typedef unsigned char   undefined;

typedef unsigned char    bool;
typedef unsigned char    byte;
typedef unsigned int    dword;
typedef unsigned long long    GUID;
typedef pointer32 ImageBaseOffset32;

typedef long long    longlong;
typedef unsigned long long    qword;
typedef unsigned char    uchar;
typedef unsigned int    uint;
typedef unsigned long    ulong;
typedef unsigned long long    ulonglong;
typedef unsigned char    undefined1;
typedef unsigned short    undefined2;
typedef unsigned int    undefined4;
typedef unsigned long long    undefined8;
typedef unsigned short    ushort;
typedef unsigned short    wchar16;
typedef short    wchar_t;
typedef unsigned short    word;
typedef struct _s_IPToStateMapEntry _s_IPToStateMapEntry, *P_s_IPToStateMapEntry;

typedef struct _s_IPToStateMapEntry IPToStateMapEntry;

typedef int __ehstate_t;

struct _s_IPToStateMapEntry {
    ImageBaseOffset32 Ip;
    __ehstate_t state;
};

typedef struct _s__RTTIBaseClassDescriptor _s__RTTIBaseClassDescriptor, *P_s__RTTIBaseClassDescriptor;

typedef struct _s__RTTIBaseClassDescriptor RTTIBaseClassDescriptor;

typedef RTTIBaseClassDescriptor *RTTIBaseClassDescriptor *32 __((image-base-relative));

typedef RTTIBaseClassDescriptor *32 __((image-base-relative)) *RTTIBaseClassDescriptor *32 __((image-base-relative)) *32 __((image-base-relative));

typedef struct PMD PMD, *PPMD;

struct PMD {
    int mdisp;
    int pdisp;
    int vdisp;
};

struct _s__RTTIBaseClassDescriptor {
    ImageBaseOffset32 pTypeDescriptor; // ref to TypeDescriptor (RTTI 0) for class
    dword numContainedBases; // count of extended classes in BaseClassArray (RTTI 2)
    struct PMD where; // member displacement structure
    dword attributes; // bit flags
    ImageBaseOffset32 pClassHierarchyDescriptor; // ref to ClassHierarchyDescriptor (RTTI 3) for class
};

typedef struct _com_error _com_error, *P_com_error;

struct _com_error { // PlaceHolder Class Structure
};

typedef struct _s_UnwindMapEntry _s_UnwindMapEntry, *P_s_UnwindMapEntry;

typedef struct _s_UnwindMapEntry UnwindMapEntry;

struct _s_UnwindMapEntry {
    __ehstate_t toState;
    ImageBaseOffset32 action;
};

typedef union IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryUnion IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryUnion, *PIMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryUnion;

typedef struct IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryStruct IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryStruct, *PIMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryStruct;

struct IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryStruct {
    dword OffsetToDirectory:31;
    dword DataIsDirectory:1;
};

union IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryUnion {
    dword OffsetToData;
    struct IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryStruct IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryStruct;
};

typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY _IMAGE_RUNTIME_FUNCTION_ENTRY, *P_IMAGE_RUNTIME_FUNCTION_ENTRY;

struct _IMAGE_RUNTIME_FUNCTION_ENTRY {
    ImageBaseOffset32 BeginAddress;
    dword EndAddress; // Apply ImageBaseOffset32 to see reference
    ImageBaseOffset32 UnwindInfoAddressOrData;
};

typedef struct _s_HandlerType _s_HandlerType, *P_s_HandlerType;

typedef struct _s_HandlerType HandlerType;

struct _s_HandlerType {
    uint adjectives;
    ImageBaseOffset32 dispType;
    int dispCatchObj;
    ImageBaseOffset32 dispOfHandler;
    dword dispFrame;
};

typedef struct type_info type_info, *Ptype_info;

struct type_info { // PlaceHolder Class Structure
};

typedef struct CLIENT_ID CLIENT_ID, *PCLIENT_ID;

struct CLIENT_ID {
    void *UniqueProcess;
    void *UniqueThread;
};

typedef struct _s__RTTIClassHierarchyDescriptor _s__RTTIClassHierarchyDescriptor, *P_s__RTTIClassHierarchyDescriptor;

typedef struct _s__RTTIClassHierarchyDescriptor RTTIClassHierarchyDescriptor;

struct _s__RTTIClassHierarchyDescriptor {
    dword signature;
    dword attributes; // bit flags
    dword numBaseClasses; // number of base classes (i.e. rtti1Count)
    RTTIBaseClassDescriptor *32 __((image-base-relative)) *32 __((image-base-relative)) pBaseClassArray; // ref to BaseClassArray (RTTI 2)
};

typedef struct _s_TryBlockMapEntry _s_TryBlockMapEntry, *P_s_TryBlockMapEntry;

typedef struct _s_TryBlockMapEntry TryBlockMapEntry;

struct _s_TryBlockMapEntry {
    __ehstate_t tryLow;
    __ehstate_t tryHigh;
    __ehstate_t catchHigh;
    int nCatches;
    ImageBaseOffset32 dispHandlerArray;
};

typedef struct _s__RTTICompleteObjectLocator _s__RTTICompleteObjectLocator, *P_s__RTTICompleteObjectLocator;

typedef struct _s__RTTICompleteObjectLocator RTTICompleteObjectLocator;

struct _s__RTTICompleteObjectLocator {
    dword signature;
    dword offset; // offset of vbtable within class
    dword cdOffset; // constructor displacement offset
    ImageBaseOffset32 pTypeDescriptor; // ref to TypeDescriptor (RTTI 0) for class
    ImageBaseOffset32 pClassDescriptor; // ref to ClassHierarchyDescriptor (RTTI 3)
};

typedef struct _s_FuncInfo _s_FuncInfo, *P_s_FuncInfo;

struct _s_FuncInfo {
    uint magicNumber_and_bbtFlags;
    __ehstate_t maxState;
    ImageBaseOffset32 dispUnwindMap;
    uint nTryBlocks;
    ImageBaseOffset32 dispTryBlockMap;
    uint nIPMapEntries;
    ImageBaseOffset32 dispIPToStateMap;
    int dispUnwindHelp;
    ImageBaseOffset32 dispESTypeList;
    int EHFlags;
};

typedef ulonglong __uint64;

typedef struct _s_FuncInfo FuncInfo;

typedef ulong DWORD;

typedef DWORD LCTYPE;

typedef struct _SYSTEM_INFO _SYSTEM_INFO, *P_SYSTEM_INFO;

typedef struct _SYSTEM_INFO *LPSYSTEM_INFO;

typedef union _union_552 _union_552, *P_union_552;

typedef void *LPVOID;

typedef ulonglong ULONG_PTR;

typedef ULONG_PTR DWORD_PTR;

typedef ushort WORD;

typedef struct _struct_553 _struct_553, *P_struct_553;

struct _struct_553 {
    WORD wProcessorArchitecture;
    WORD wReserved;
};

union _union_552 {
    DWORD dwOemId;
    struct _struct_553 s;
};

struct _SYSTEM_INFO {
    union _union_552 u;
    DWORD dwPageSize;
    LPVOID lpMinimumApplicationAddress;
    LPVOID lpMaximumApplicationAddress;
    DWORD_PTR dwActiveProcessorMask;
    DWORD dwNumberOfProcessors;
    DWORD dwProcessorType;
    DWORD dwAllocationGranularity;
    WORD wProcessorLevel;
    WORD wProcessorRevision;
};

typedef struct _SECURITY_ATTRIBUTES _SECURITY_ATTRIBUTES, *P_SECURITY_ATTRIBUTES;

typedef int BOOL;

struct _SECURITY_ATTRIBUTES {
    DWORD nLength;
    LPVOID lpSecurityDescriptor;
    BOOL bInheritHandle;
};

typedef struct _OVERLAPPED _OVERLAPPED, *P_OVERLAPPED;

typedef union _union_540 _union_540, *P_union_540;

typedef void *HANDLE;

typedef struct _struct_541 _struct_541, *P_struct_541;

typedef void *PVOID;

struct _struct_541 {
    DWORD Offset;
    DWORD OffsetHigh;
};

union _union_540 {
    struct _struct_541 s;
    PVOID Pointer;
};

struct _OVERLAPPED {
    ULONG_PTR Internal;
    ULONG_PTR InternalHigh;
    union _union_540 u;
    HANDLE hEvent;
};

typedef struct _SYSTEMTIME _SYSTEMTIME, *P_SYSTEMTIME;

struct _SYSTEMTIME {
    WORD wYear;
    WORD wMonth;
    WORD wDayOfWeek;
    WORD wDay;
    WORD wHour;
    WORD wMinute;
    WORD wSecond;
    WORD wMilliseconds;
};

typedef struct _RTL_CRITICAL_SECTION _RTL_CRITICAL_SECTION, *P_RTL_CRITICAL_SECTION;

typedef struct _RTL_CRITICAL_SECTION *PRTL_CRITICAL_SECTION;

typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;

typedef struct _RTL_CRITICAL_SECTION_DEBUG _RTL_CRITICAL_SECTION_DEBUG, *P_RTL_CRITICAL_SECTION_DEBUG;

typedef struct _RTL_CRITICAL_SECTION_DEBUG *PRTL_CRITICAL_SECTION_DEBUG;

typedef long LONG;

typedef struct _LIST_ENTRY _LIST_ENTRY, *P_LIST_ENTRY;

typedef struct _LIST_ENTRY LIST_ENTRY;

struct _RTL_CRITICAL_SECTION {
    PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
    LONG LockCount;
    LONG RecursionCount;
    HANDLE OwningThread;
    HANDLE LockSemaphore;
    ULONG_PTR SpinCount;
};

struct _LIST_ENTRY {
    struct _LIST_ENTRY *Flink;
    struct _LIST_ENTRY *Blink;
};

struct _RTL_CRITICAL_SECTION_DEBUG {
    WORD Type;
    WORD CreatorBackTraceIndex;
    struct _RTL_CRITICAL_SECTION *CriticalSection;
    LIST_ENTRY ProcessLocksList;
    DWORD EntryCount;
    DWORD ContentionCount;
    DWORD Flags;
    WORD CreatorBackTraceIndexHigh;
    WORD SpareWORD;
};

typedef struct _OVERLAPPED *LPOVERLAPPED;

typedef DWORD (*PTHREAD_START_ROUTINE)(LPVOID);

typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;

typedef struct _EXCEPTION_POINTERS _EXCEPTION_POINTERS, *P_EXCEPTION_POINTERS;

typedef LONG (*PTOP_LEVEL_EXCEPTION_FILTER)(struct _EXCEPTION_POINTERS *);

typedef struct _EXCEPTION_RECORD _EXCEPTION_RECORD, *P_EXCEPTION_RECORD;

typedef struct _EXCEPTION_RECORD EXCEPTION_RECORD;

typedef EXCEPTION_RECORD *PEXCEPTION_RECORD;

typedef struct _CONTEXT _CONTEXT, *P_CONTEXT;

typedef struct _CONTEXT *PCONTEXT;

typedef ulonglong DWORD64;

typedef union _union_54 _union_54, *P_union_54;

typedef struct _M128A _M128A, *P_M128A;

typedef struct _M128A M128A;

typedef struct _XSAVE_FORMAT _XSAVE_FORMAT, *P_XSAVE_FORMAT;

typedef struct _XSAVE_FORMAT XSAVE_FORMAT;

typedef XSAVE_FORMAT XMM_SAVE_AREA32;

typedef struct _struct_55 _struct_55, *P_struct_55;

typedef ulonglong ULONGLONG;

typedef longlong LONGLONG;

typedef uchar BYTE;

struct _M128A {
    ULONGLONG Low;
    LONGLONG High;
};

struct _XSAVE_FORMAT {
    WORD ControlWord;
    WORD StatusWord;
    BYTE TagWord;
    BYTE Reserved1;
    WORD ErrorOpcode;
    DWORD ErrorOffset;
    WORD ErrorSelector;
    WORD Reserved2;
    DWORD DataOffset;
    WORD DataSelector;
    WORD Reserved3;
    DWORD MxCsr;
    DWORD MxCsr_Mask;
    M128A FloatRegisters[8];
    M128A XmmRegisters[16];
    BYTE Reserved4[96];
};

struct _struct_55 {
    M128A Header[2];
    M128A Legacy[8];
    M128A Xmm0;
    M128A Xmm1;
    M128A Xmm2;
    M128A Xmm3;
    M128A Xmm4;
    M128A Xmm5;
    M128A Xmm6;
    M128A Xmm7;
    M128A Xmm8;
    M128A Xmm9;
    M128A Xmm10;
    M128A Xmm11;
    M128A Xmm12;
    M128A Xmm13;
    M128A Xmm14;
    M128A Xmm15;
};

union _union_54 {
    XMM_SAVE_AREA32 FltSave;
    struct _struct_55 s;
};

struct _CONTEXT {
    DWORD64 P1Home;
    DWORD64 P2Home;
    DWORD64 P3Home;
    DWORD64 P4Home;
    DWORD64 P5Home;
    DWORD64 P6Home;
    DWORD ContextFlags;
    DWORD MxCsr;
    WORD SegCs;
    WORD SegDs;
    WORD SegEs;
    WORD SegFs;
    WORD SegGs;
    WORD SegSs;
    DWORD EFlags;
    DWORD64 Dr0;
    DWORD64 Dr1;
    DWORD64 Dr2;
    DWORD64 Dr3;
    DWORD64 Dr6;
    DWORD64 Dr7;
    DWORD64 Rax;
    DWORD64 Rcx;
    DWORD64 Rdx;
    DWORD64 Rbx;
    DWORD64 Rsp;
    DWORD64 Rbp;
    DWORD64 Rsi;
    DWORD64 Rdi;
    DWORD64 R8;
    DWORD64 R9;
    DWORD64 R10;
    DWORD64 R11;
    DWORD64 R12;
    DWORD64 R13;
    DWORD64 R14;
    DWORD64 R15;
    DWORD64 Rip;
    union _union_54 u;
    M128A VectorRegister[26];
    DWORD64 VectorControl;
    DWORD64 DebugControl;
    DWORD64 LastBranchToRip;
    DWORD64 LastBranchFromRip;
    DWORD64 LastExceptionToRip;
    DWORD64 LastExceptionFromRip;
};

struct _EXCEPTION_RECORD {
    DWORD ExceptionCode;
    DWORD ExceptionFlags;
    struct _EXCEPTION_RECORD *ExceptionRecord;
    PVOID ExceptionAddress;
    DWORD NumberParameters;
    ULONG_PTR ExceptionInformation[15];
};

struct _EXCEPTION_POINTERS {
    PEXCEPTION_RECORD ExceptionRecord;
    PCONTEXT ContextRecord;
};

typedef struct _SECURITY_ATTRIBUTES *LPSECURITY_ATTRIBUTES;

typedef struct _SYSTEMTIME *LPSYSTEMTIME;

typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;

typedef struct _DISPATCHER_CONTEXT _DISPATCHER_CONTEXT, *P_DISPATCHER_CONTEXT;

struct _DISPATCHER_CONTEXT {
};

typedef enum _EXCEPTION_DISPOSITION {
    ExceptionContinueExecution=0,
    ExceptionContinueSearch=1,
    ExceptionNestedException=2,
    ExceptionCollidedUnwind=3
} _EXCEPTION_DISPOSITION;

typedef enum _EXCEPTION_DISPOSITION EXCEPTION_DISPOSITION;

typedef DWORD ULONG;

typedef wchar_t WCHAR;

typedef WCHAR OLECHAR;

typedef OLECHAR *LPCOLESTR;

typedef struct DotNetPdbInfo DotNetPdbInfo, *PDotNetPdbInfo;

struct DotNetPdbInfo {
    char signature[4];
    GUID guid;
    dword age;
    char pdbpath[60];
};

typedef struct _iobuf _iobuf, *P_iobuf;

struct _iobuf {
    char *_ptr;
    int _cnt;
    char *_base;
    int _flag;
    int _file;
    int _charbuf;
    int _bufsiz;
    char *_tmpfname;
};

typedef struct _iobuf FILE;

typedef struct _COORD _COORD, *P_COORD;

typedef struct _COORD COORD;

typedef short SHORT;

struct _COORD {
    SHORT X;
    SHORT Y;
};

typedef struct _SMALL_RECT _SMALL_RECT, *P_SMALL_RECT;

typedef struct _SMALL_RECT SMALL_RECT;

struct _SMALL_RECT {
    SHORT Left;
    SHORT Top;
    SHORT Right;
    SHORT Bottom;
};

typedef struct _CONSOLE_SCREEN_BUFFER_INFO _CONSOLE_SCREEN_BUFFER_INFO, *P_CONSOLE_SCREEN_BUFFER_INFO;

typedef struct _CONSOLE_SCREEN_BUFFER_INFO *PCONSOLE_SCREEN_BUFFER_INFO;

struct _CONSOLE_SCREEN_BUFFER_INFO {
    COORD dwSize;
    COORD dwCursorPosition;
    WORD wAttributes;
    SMALL_RECT srWindow;
    COORD dwMaximumWindowSize;
};

typedef int PMFN;

typedef struct _s_ThrowInfo _s_ThrowInfo, *P_s_ThrowInfo;

struct _s_ThrowInfo {
    uint attributes;
    PMFN pmfnUnwind;
    int pForwardCompat;
    int pCatchableTypeArray;
};

typedef struct TypeDescriptor TypeDescriptor, *PTypeDescriptor;

struct TypeDescriptor {
    void *pVFTable;
    void *spare;
    char name[0];
};

typedef struct _s_ThrowInfo ThrowInfo;

typedef char *va_list;

typedef ulonglong uintptr_t;

typedef ushort wint_t;

typedef longlong __time64_t;

typedef ulonglong size_t;

typedef int errno_t;

typedef size_t rsize_t;

typedef struct bad_alloc bad_alloc, *Pbad_alloc;

struct bad_alloc { // PlaceHolder Class Structure
};


// WARNING! conflicting data type names: /guiddef.h/GUID - /GUID

typedef GUID CLSID;

typedef CLSID *LPCLSID;

typedef struct _GUID _GUID, *P_GUID;

struct _GUID {
    ulong Data1;
    ushort Data2;
    ushort Data3;
    uchar Data4[8];
};

typedef GUID IID;

typedef uchar *RPC_CSTR;

typedef ushort *RPC_WSTR;

typedef GUID UUID;

typedef long RPC_STATUS;

typedef char CHAR;

typedef union _LARGE_INTEGER _LARGE_INTEGER, *P_LARGE_INTEGER;

typedef struct _struct_19 _struct_19, *P_struct_19;

typedef struct _struct_20 _struct_20, *P_struct_20;

struct _struct_20 {
    DWORD LowPart;
    LONG HighPart;
};

struct _struct_19 {
    DWORD LowPart;
    LONG HighPart;
};

union _LARGE_INTEGER {
    struct _struct_19 s;
    struct _struct_20 u;
    LONGLONG QuadPart;
};

typedef union _LARGE_INTEGER LARGE_INTEGER;

typedef struct _RUNTIME_FUNCTION _RUNTIME_FUNCTION, *P_RUNTIME_FUNCTION;

struct _RUNTIME_FUNCTION {
    DWORD BeginAddress;
    DWORD EndAddress;
    DWORD UnwindData;
};

typedef struct _IMAGE_SECTION_HEADER _IMAGE_SECTION_HEADER, *P_IMAGE_SECTION_HEADER;

typedef union _union_238 _union_238, *P_union_238;

union _union_238 {
    DWORD PhysicalAddress;
    DWORD VirtualSize;
};

struct _IMAGE_SECTION_HEADER {
    BYTE Name[8];
    union _union_238 Misc;
    DWORD VirtualAddress;
    DWORD SizeOfRawData;
    DWORD PointerToRawData;
    DWORD PointerToRelocations;
    DWORD PointerToLinenumbers;
    WORD NumberOfRelocations;
    WORD NumberOfLinenumbers;
    DWORD Characteristics;
};

typedef enum _HEAP_INFORMATION_CLASS {
    HeapCompatibilityInformation=0,
    HeapEnableTerminationOnCorruption=1
} _HEAP_INFORMATION_CLASS;

typedef enum _HEAP_INFORMATION_CLASS HEAP_INFORMATION_CLASS;

typedef struct _RUNTIME_FUNCTION *PRUNTIME_FUNCTION;

typedef EXCEPTION_DISPOSITION (EXCEPTION_ROUTINE)(struct _EXCEPTION_RECORD *, PVOID, struct _CONTEXT *, PVOID);

typedef WCHAR *LPWSTR;

typedef struct _IMAGE_SECTION_HEADER *PIMAGE_SECTION_HEADER;

typedef WCHAR *LPCWSTR;

typedef struct _M128A *PM128A;

typedef struct _UNWIND_HISTORY_TABLE_ENTRY _UNWIND_HISTORY_TABLE_ENTRY, *P_UNWIND_HISTORY_TABLE_ENTRY;

typedef struct _UNWIND_HISTORY_TABLE_ENTRY UNWIND_HISTORY_TABLE_ENTRY;

struct _UNWIND_HISTORY_TABLE_ENTRY {
    DWORD64 ImageBase;
    PRUNTIME_FUNCTION FunctionEntry;
};

typedef union _union_61 _union_61, *P_union_61;

typedef struct _struct_62 _struct_62, *P_struct_62;

struct _struct_62 {
    PM128A Xmm0;
    PM128A Xmm1;
    PM128A Xmm2;
    PM128A Xmm3;
    PM128A Xmm4;
    PM128A Xmm5;
    PM128A Xmm6;
    PM128A Xmm7;
    PM128A Xmm8;
    PM128A Xmm9;
    PM128A Xmm10;
    PM128A Xmm11;
    PM128A Xmm12;
    PM128A Xmm13;
    PM128A Xmm14;
    PM128A Xmm15;
};

union _union_61 {
    PM128A FloatingContext[16];
    struct _struct_62 s;
};

typedef union _union_63 _union_63, *P_union_63;

typedef ulonglong *PDWORD64;

typedef struct _struct_64 _struct_64, *P_struct_64;

struct _struct_64 {
    PDWORD64 Rax;
    PDWORD64 Rcx;
    PDWORD64 Rdx;
    PDWORD64 Rbx;
    PDWORD64 Rsp;
    PDWORD64 Rbp;
    PDWORD64 Rsi;
    PDWORD64 Rdi;
    PDWORD64 R8;
    PDWORD64 R9;
    PDWORD64 R10;
    PDWORD64 R11;
    PDWORD64 R12;
    PDWORD64 R13;
    PDWORD64 R14;
    PDWORD64 R15;
};

union _union_63 {
    PDWORD64 IntegerContext[16];
    struct _struct_64 s;
};

typedef struct _UNWIND_HISTORY_TABLE _UNWIND_HISTORY_TABLE, *P_UNWIND_HISTORY_TABLE;

typedef struct _UNWIND_HISTORY_TABLE *PUNWIND_HISTORY_TABLE;

struct _UNWIND_HISTORY_TABLE {
    DWORD Count;
    BYTE LocalHint;
    BYTE GlobalHint;
    BYTE Search;
    BYTE Once;
    DWORD64 LowAddress;
    DWORD64 HighAddress;
    UNWIND_HISTORY_TABLE_ENTRY Entry[12];
};

typedef long HRESULT;

typedef CHAR *LPCSTR;

typedef LONG *PLONG;

typedef CHAR *LPSTR;

typedef struct _KNONVOLATILE_CONTEXT_POINTERS _KNONVOLATILE_CONTEXT_POINTERS, *P_KNONVOLATILE_CONTEXT_POINTERS;

typedef struct _KNONVOLATILE_CONTEXT_POINTERS *PKNONVOLATILE_CONTEXT_POINTERS;

struct _KNONVOLATILE_CONTEXT_POINTERS {
    union _union_61 u;
    union _union_63 u2;
};

typedef EXCEPTION_ROUTINE *PEXCEPTION_ROUTINE;

typedef DWORD ACCESS_MASK;

typedef DWORD LCID;

typedef HANDLE *PHANDLE;

typedef struct IMAGE_DOS_HEADER IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;

struct IMAGE_DOS_HEADER {
    char e_magic[2]; // Magic number
    word e_cblp; // Bytes of last page
    word e_cp; // Pages in file
    word e_crlc; // Relocations
    word e_cparhdr; // Size of header in paragraphs
    word e_minalloc; // Minimum extra paragraphs needed
    word e_maxalloc; // Maximum extra paragraphs needed
    word e_ss; // Initial (relative) SS value
    word e_sp; // Initial SP value
    word e_csum; // Checksum
    word e_ip; // Initial IP value
    word e_cs; // Initial (relative) CS value
    word e_lfarlc; // File address of relocation table
    word e_ovno; // Overlay number
    word e_res[4][4]; // Reserved words
    word e_oemid; // OEM identifier (for e_oeminfo)
    word e_oeminfo; // OEM information; e_oemid specific
    word e_res2[10][10]; // Reserved words
    dword e_lfanew; // File address of new exe header
    byte e_program[64]; // Actual DOS program
};

typedef ULONG_PTR HCRYPTPROV;

typedef struct tm tm, *Ptm;

struct tm {
    int tm_sec;
    int tm_min;
    int tm_hour;
    int tm_mday;
    int tm_mon;
    int tm_year;
    int tm_wday;
    int tm_yday;
    int tm_isdst;
};

typedef long clock_t;

typedef longlong INT_PTR;

typedef ULONG_PTR SIZE_T;

typedef struct _FILETIME _FILETIME, *P_FILETIME;

typedef struct _FILETIME *LPFILETIME;

struct _FILETIME {
    DWORD dwLowDateTime;
    DWORD dwHighDateTime;
};

typedef INT_PTR (*FARPROC)(void);

typedef struct HKEY__ HKEY__, *PHKEY__;

struct HKEY__ {
    int unused;
};

typedef DWORD *LPDWORD;

typedef struct HKEY__ *HKEY;

typedef HKEY *PHKEY;

typedef struct HINSTANCE__ HINSTANCE__, *PHINSTANCE__;

struct HINSTANCE__ {
    int unused;
};

typedef HANDLE HGLOBAL;

typedef BOOL *LPBOOL;

typedef BYTE *PBYTE;

typedef int *LPINT;

typedef struct HINSTANCE__ *HINSTANCE;

typedef void *LPCVOID;

typedef struct HRSRC__ HRSRC__, *PHRSRC__;

typedef struct HRSRC__ *HRSRC;

struct HRSRC__ {
    int unused;
};

typedef struct HWND__ HWND__, *PHWND__;

typedef struct HWND__ *HWND;

struct HWND__ {
    int unused;
};

typedef HINSTANCE HMODULE;

typedef HANDLE HLOCAL;

typedef long *LPLONG;

typedef uint UINT;

typedef struct IMAGE_RESOURCE_DIRECTORY_ENTRY_NameStruct IMAGE_RESOURCE_DIRECTORY_ENTRY_NameStruct, *PIMAGE_RESOURCE_DIRECTORY_ENTRY_NameStruct;

struct IMAGE_RESOURCE_DIRECTORY_ENTRY_NameStruct {
    dword NameOffset:31;
    dword NameIsString:1;
};

typedef struct IMAGE_DEBUG_DIRECTORY IMAGE_DEBUG_DIRECTORY, *PIMAGE_DEBUG_DIRECTORY;

struct IMAGE_DEBUG_DIRECTORY {
    dword Characteristics;
    dword TimeDateStamp;
    word MajorVersion;
    word MinorVersion;
    dword Type;
    dword SizeOfData;
    dword AddressOfRawData;
    dword PointerToRawData;
};

typedef struct IMAGE_FILE_HEADER IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;

struct IMAGE_FILE_HEADER {
    word Machine; // 34404
    word NumberOfSections;
    dword TimeDateStamp;
    dword PointerToSymbolTable;
    dword NumberOfSymbols;
    word SizeOfOptionalHeader;
    word Characteristics;
};

typedef struct IMAGE_RESOURCE_DIRECTORY_ENTRY IMAGE_RESOURCE_DIRECTORY_ENTRY, *PIMAGE_RESOURCE_DIRECTORY_ENTRY;

typedef union IMAGE_RESOURCE_DIRECTORY_ENTRY_NameUnion IMAGE_RESOURCE_DIRECTORY_ENTRY_NameUnion, *PIMAGE_RESOURCE_DIRECTORY_ENTRY_NameUnion;

union IMAGE_RESOURCE_DIRECTORY_ENTRY_NameUnion {
    struct IMAGE_RESOURCE_DIRECTORY_ENTRY_NameStruct IMAGE_RESOURCE_DIRECTORY_ENTRY_NameStruct;
    dword Name;
    word Id;
};

struct IMAGE_RESOURCE_DIRECTORY_ENTRY {
    union IMAGE_RESOURCE_DIRECTORY_ENTRY_NameUnion NameUnion;
    union IMAGE_RESOURCE_DIRECTORY_ENTRY_DirectoryUnion DirectoryUnion;
};

typedef struct IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER64, *PIMAGE_OPTIONAL_HEADER64;

typedef struct IMAGE_DATA_DIRECTORY IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY;

struct IMAGE_DATA_DIRECTORY {
    ImageBaseOffset32 VirtualAddress;
    dword Size;
};

struct IMAGE_OPTIONAL_HEADER64 {
    word Magic;
    byte MajorLinkerVersion;
    byte MinorLinkerVersion;
    dword SizeOfCode;
    dword SizeOfInitializedData;
    dword SizeOfUninitializedData;
    ImageBaseOffset32 AddressOfEntryPoint;
    ImageBaseOffset32 BaseOfCode;
    pointer64 ImageBase;
    dword SectionAlignment;
    dword FileAlignment;
    word MajorOperatingSystemVersion;
    word MinorOperatingSystemVersion;
    word MajorImageVersion;
    word MinorImageVersion;
    word MajorSubsystemVersion;
    word MinorSubsystemVersion;
    dword Win32VersionValue;
    dword SizeOfImage;
    dword SizeOfHeaders;
    dword CheckSum;
    word Subsystem;
    word DllCharacteristics;
    qword SizeOfStackReserve;
    qword SizeOfStackCommit;
    qword SizeOfHeapReserve;
    qword SizeOfHeapCommit;
    dword LoaderFlags;
    dword NumberOfRvaAndSizes;
    struct IMAGE_DATA_DIRECTORY DataDirectory[16];
};

typedef struct IMAGE_SECTION_HEADER IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;

typedef union Misc Misc, *PMisc;

typedef enum SectionFlags {
    IMAGE_SCN_TYPE_NO_PAD=8,
    IMAGE_SCN_RESERVED_0001=16,
    IMAGE_SCN_CNT_CODE=32,
    IMAGE_SCN_CNT_INITIALIZED_DATA=64,
    IMAGE_SCN_CNT_UNINITIALIZED_DATA=128,
    IMAGE_SCN_LNK_OTHER=256,
    IMAGE_SCN_LNK_INFO=512,
    IMAGE_SCN_RESERVED_0040=1024,
    IMAGE_SCN_LNK_REMOVE=2048,
    IMAGE_SCN_LNK_COMDAT=4096,
    IMAGE_SCN_GPREL=32768,
    IMAGE_SCN_MEM_16BIT=131072,
    IMAGE_SCN_MEM_PURGEABLE=131072,
    IMAGE_SCN_MEM_LOCKED=262144,
    IMAGE_SCN_MEM_PRELOAD=524288,
    IMAGE_SCN_ALIGN_1BYTES=1048576,
    IMAGE_SCN_ALIGN_2BYTES=2097152,
    IMAGE_SCN_ALIGN_4BYTES=3145728,
    IMAGE_SCN_ALIGN_8BYTES=4194304,
    IMAGE_SCN_ALIGN_16BYTES=5242880,
    IMAGE_SCN_ALIGN_32BYTES=6291456,
    IMAGE_SCN_ALIGN_64BYTES=7340032,
    IMAGE_SCN_ALIGN_128BYTES=8388608,
    IMAGE_SCN_ALIGN_256BYTES=9437184,
    IMAGE_SCN_ALIGN_512BYTES=10485760,
    IMAGE_SCN_ALIGN_1024BYTES=11534336,
    IMAGE_SCN_ALIGN_2048BYTES=12582912,
    IMAGE_SCN_ALIGN_4096BYTES=13631488,
    IMAGE_SCN_ALIGN_8192BYTES=14680064,
    IMAGE_SCN_LNK_NRELOC_OVFL=16777216,
    IMAGE_SCN_MEM_DISCARDABLE=33554432,
    IMAGE_SCN_MEM_NOT_CACHED=67108864,
    IMAGE_SCN_MEM_NOT_PAGED=134217728,
    IMAGE_SCN_MEM_SHARED=268435456,
    IMAGE_SCN_MEM_EXECUTE=536870912,
    IMAGE_SCN_MEM_READ=1073741824,
    IMAGE_SCN_MEM_WRITE=2147483648
} SectionFlags;

union Misc {
    dword PhysicalAddress;
    dword VirtualSize;
};

struct IMAGE_SECTION_HEADER {
    char Name[8];
    union Misc Misc;
    ImageBaseOffset32 VirtualAddress;
    dword SizeOfRawData;
    dword PointerToRawData;
    dword PointerToRelocations;
    dword PointerToLinenumbers;
    word NumberOfRelocations;
    word NumberOfLinenumbers;
    enum SectionFlags Characteristics;
};

typedef struct IMAGE_NT_HEADERS64 IMAGE_NT_HEADERS64, *PIMAGE_NT_HEADERS64;

struct IMAGE_NT_HEADERS64 {
    char Signature[4];
    struct IMAGE_FILE_HEADER FileHeader;
    struct IMAGE_OPTIONAL_HEADER64 OptionalHeader;
};

typedef struct IMAGE_THUNK_DATA64 IMAGE_THUNK_DATA64, *PIMAGE_THUNK_DATA64;

struct IMAGE_THUNK_DATA64 {
    qword StartAddressOfRawData;
    qword EndAddressOfRawData;
    qword AddressOfIndex;
    qword AddressOfCallBacks;
    dword SizeOfZeroFill;
    dword Characteristics;
};

typedef struct IMAGE_RESOURCE_DATA_ENTRY IMAGE_RESOURCE_DATA_ENTRY, *PIMAGE_RESOURCE_DATA_ENTRY;

struct IMAGE_RESOURCE_DATA_ENTRY {
    dword OffsetToData;
    dword Size;
    dword CodePage;
    dword Reserved;
};

typedef struct IMAGE_RESOURCE_DIRECTORY IMAGE_RESOURCE_DIRECTORY, *PIMAGE_RESOURCE_DIRECTORY;

struct IMAGE_RESOURCE_DIRECTORY {
    dword Characteristics;
    dword TimeDateStamp;
    word MajorVersion;
    word MinorVersion;
    word NumberOfNamedEntries;
    word NumberOfIdEntries;
};

typedef struct IMAGE_DIRECTORY_ENTRY_EXPORT IMAGE_DIRECTORY_ENTRY_EXPORT, *PIMAGE_DIRECTORY_ENTRY_EXPORT;

struct IMAGE_DIRECTORY_ENTRY_EXPORT {
    dword Characteristics;
    dword TimeDateStamp;
    word MajorVersion;
    word MinorVersion;
    ImageBaseOffset32 Name;
    dword Base;
    dword NumberOfFunctions;
    dword NumberOfNames;
    ImageBaseOffset32 AddressOfFunctions;
    ImageBaseOffset32 AddressOfNames;
    ImageBaseOffset32 AddressOfNameOrdinals;
};

typedef LONG LSTATUS;

typedef ACCESS_MASK REGSAM;

typedef void (TIMECALLBACK)(UINT, UINT, DWORD_PTR, DWORD_PTR, DWORD_PTR);

typedef TIMECALLBACK *LPTIMECALLBACK;

typedef UINT MMRESULT;

typedef ushort u_short;

typedef struct sockaddr sockaddr, *Psockaddr;

struct sockaddr {
    u_short sa_family;
    char sa_data[14];
};

typedef struct CWin32Heap CWin32Heap, *PCWin32Heap;

struct CWin32Heap { // PlaceHolder Structure
};

typedef struct CStringData CStringData, *PCStringData;

struct CStringData { // PlaceHolder Structure
};

typedef struct CAtlStringMgr CAtlStringMgr, *PCAtlStringMgr;

struct CAtlStringMgr { // PlaceHolder Structure
};

typedef struct CAtlBaseModule CAtlBaseModule, *PCAtlBaseModule;

struct CAtlBaseModule { // PlaceHolder Structure
};

typedef struct exception exception, *Pexception;

struct exception { // PlaceHolder Structure
};

typedef struct _Container_base12 _Container_base12, *P_Container_base12;

struct _Container_base12 { // PlaceHolder Structure
};

typedef struct basic_streambuf<char,struct_std::char_traits<char>_> basic_streambuf<char,struct_std::char_traits<char>_>, *Pbasic_streambuf<char,struct_std::char_traits<char>_>;

struct basic_streambuf<char,struct_std::char_traits<char>_> { // PlaceHolder Structure
};

typedef struct basic_ostream<char,struct_std::char_traits<char>_> basic_ostream<char,struct_std::char_traits<char>_>, *Pbasic_ostream<char,struct_std::char_traits<char>_>;

struct basic_ostream<char,struct_std::char_traits<char>_> { // PlaceHolder Structure
};

typedef struct locale locale, *Plocale;

struct locale { // PlaceHolder Structure
};

typedef enum _Uninitialized {
} _Uninitialized;

typedef struct _Mutex _Mutex, *P_Mutex;

struct _Mutex { // PlaceHolder Structure
};

typedef struct basic_ios<char,struct_std::char_traits<char>_> basic_ios<char,struct_std::char_traits<char>_>, *Pbasic_ios<char,struct_std::char_traits<char>_>;

struct basic_ios<char,struct_std::char_traits<char>_> { // PlaceHolder Structure
};

typedef struct _Container_base0 _Container_base0, *P_Container_base0;

struct _Container_base0 { // PlaceHolder Structure
};

typedef int (*_onexit_t)(void);

typedef void (*_invalid_parameter_handler)(wchar_t *, wchar_t *, wchar_t *, uint, uintptr_t);

typedef void (*_purecall_handler)(void);

typedef struct IUnknownVtbl IUnknownVtbl, *PIUnknownVtbl;

typedef struct IUnknown IUnknown, *PIUnknown;

struct IUnknownVtbl {
    HRESULT (*QueryInterface)(struct IUnknown *, IID *, void **);
    ULONG (*AddRef)(struct IUnknown *);
    ULONG (*Release)(struct IUnknown *);
};

struct IUnknown {
    struct IUnknownVtbl *lpVtbl;
};

typedef struct IUnknown *LPUNKNOWN;



undefined DAT_140281ec0;
undefined DAT_140281ed0;
undefined DAT_140281ee0;
undefined DAT_140281eb0;
ulonglong DAT_1403223c0;
undefined DAT_140281ea0;
undefined DAT_140281ef0;
undefined DAT_140281f08;
undefined1 DAT_140281f00;
undefined DAT_140281f18;
undefined DAT_140281f38;
undefined DAT_140281f48;
undefined DAT_140281f58;
undefined DAT_140281f28;
undefined DAT_140281f68;
undefined DAT_140281f78;
pointer[3] vftable;
pointer[1] vftable;
undefined *DAT_14032f248;
undefined DAT_14032f2a0;
undefined DAT_14032f2a8;
undefined DAT_14032f2c8;
undefined DAT_14032f2d0;
undefined DAT_14032f2d4;
undefined1 DAT_14032f2d6;
undefined DAT_14032f2d8;
undefined DAT_14032f2e0;
undefined DAT_14032f2e8;
undefined DAT_14032f2f0;
undefined DAT_14032f2f8;
undefined DAT_14032f300;
undefined DAT_14032f310;
undefined DAT_14032f318;
undefined DAT_14032f320;
undefined DAT_14032f328;
undefined *PTR_DAT_1403200a0;
undefined DAT_14032f330;
undefined DAT_14032f338;
undefined DAT_14032f340;
undefined DAT_14032f348;
int DAT_14032f35c;
undefined *PTR_u_PIDL_compiler_is_incompatible_to_1403200e0;
undefined DAT_14032f368;
undefined DAT_14032f370;
undefined DAT_14032f378;
undefined DAT_14032f390;
undefined1 DAT_14032f398;
undefined DAT_14032f3e8;
undefined DAT_14032f3a0;
undefined DAT_14032f3a8;
undefined DAT_14032f3b0;
undefined DAT_14032f3c0;
undefined DAT_14032f3b8;
undefined DAT_14032f3e0;
undefined DAT_14032f3c4;
undefined DAT_14032f3c8;
undefined DAT_14032f3cc;
undefined DAT_14032f3d0;
undefined DAT_14032f3d8;
undefined DAT_14032f988;
undefined DAT_14032f990;
undefined DAT_14032f998;
undefined DAT_140378d80;
undefined DAT_140378d88;
undefined DAT_140378d90;
pointer[163] vftable;
undefined DAT_14032efec;
undefined DAT_14032f380;
undefined DAT_14032f388;
pointer[18] vftable;
undefined DAT_14032f3f0;
undefined DAT_14032f428;
undefined DAT_14032f848;
undefined DAT_14032f99c;
pointer[11] vftable;
pointer[270] vftable;
pointer[16] vftable;
undefined8 DAT_14032f248;
undefined LAB_140257ca0;
undefined *PTR_s_option\dbc_serveroptionlog.xml_140325b48;
uint DAT_14037923c;
undefined DAT_1403200f0;
undefined8 *DAT_14032f258;
undefined8 *DAT_14032f250;
undefined8 *DAT_14032f270;
longlong DAT_14032f260;
longlong *DAT_14032f250;
int DAT_14032f034;
undefined8 DAT_14032f060;
longlong DAT_14032f258;
int DAT_14032efdc;
int DAT_14032efd4;
int DAT_14032efd8;
char DAT_14032efe8;
char DAT_14032efe9;
pointer[2] vftable;
char DAT_14032efe7;
undefined4 DAT_14032eff0;
char DAT_14032efea;
undefined4 DAT_14032f000;
undefined4 DAT_14032eff8;
undefined4 DAT_14032f004;
undefined4 DAT_14032effc;
pointer PTR_s_Server_Shutdown._1403276f8;
undefined *PTR_s_Keyboard_UnLocked._140327890;
undefined *PTR_s_ServiceControl_Print._140327848;
undefined *PTR_s_Enable_Connect._140327800;
undefined *PTR_s_PROTOCOL_Info._140327758;
undefined *PTR_s_Show_FPS._140327770;
undefined *PTR_s_ForceDBAllClose._1403277d0;
undefined *PTR_s_Network_Status._140327728;
undefined *PTR_s_TestLog._140327830;
longlong DAT_14032f268;
undefined *PTR_s_CustomOption_Init._140327878;
undefined *PTR_s_Keyboard_Locked._140327710;
undefined *PTR_s_Print_Connect._1403277e8;
undefined4 DAT_14032efd8;
undefined4 DAT_14032efdc;
undefined *PTR_s_PROTOCOL_Count_Clear._140327740;
undefined *PTR_s_Statistics._140327860;
undefined *PTR_s_ADO_Data_Mapping_Test._1403277a0;
undefined *PTR_s_CharacterTable_BackUp._140327818;
uint DAT_14032efd4;
undefined *PTR_s_Enable_Profile._140327788;
undefined8 DAT_14032f260;
undefined *PTR_s_PrintOption._1403277b8;
undefined DAT_14031d928;
undefined4 DAT_1402877f0;
int DAT_140320d70;
undefined FUN_140002750;
undefined *PTR_cerr_140259330;
undefined DAT_14031d988;
undefined DAT_14031d8a0;
undefined *PTR_DAT_140320098;
undefined *PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0;
undefined1 DAT_14028931c;
undefined DAT_140289530;
undefined DAT_14028984c;
undefined DAT_140289c74;
undefined1 DAT_140289c8c;
undefined DAT_140289e1c;
undefined DAT_14028a354;
undefined DAT_14028a328;
undefined DAT_14028a330;
undefined DAT_14028a338;
undefined DAT_14028ab1c;
undefined DAT_14028ad18;
undefined DAT_14028ad30;
undefined DAT_14028b4c8;
undefined DAT_14028b470;
undefined DAT_14028b474;
undefined DAT_14028b3e4;
undefined8 DAT_14028c250;
undefined UNK_14028c388;
undefined1 DAT_14028c3ac;
undefined DAT_14028c4d8;
undefined8 DAT_14032f278;
undefined4 UNK_00000000;
undefined FUN_1400a1070;
DWORD DAT_14032f034;
undefined8 *DAT_14032f278;
uint DAT_140379240;
undefined LAB_1400a1130;
undefined LAB_140257b80;
int DAT_14032effc;
int DAT_14032f004;
int DAT_14032eff8;
int DAT_14032f000;
undefined DAT_14028c994;
undefined UNK_1400a6ca9;
undefined *PTR_s_gold_01_1403263b0;
undefined DAT_14028cd10;
undefined DAT_14028cd44;
undefined DAT_14028d628;
undefined DAT_14028d83c;
undefined DAT_14028d88c;
undefined DAT_14028e438;
undefined1 DAT_14028e384;
undefined DAT_14028e750;
undefined DAT_14028e798;
undefined DAT_14028ea4c;
undefined DAT_14028ed14;
undefined DAT_14028ed18;
undefined DAT_14028f034;
undefined DAT_14028f47c;
undefined *PTR_s_permission00_140326370;
undefined DAT_14028fa98;
undefined DAT_140290e28;
undefined DAT_14029114c;
undefined *PTR_s_type_01_140326170;
undefined *PTR_s_item_id_01_140326270;
undefined2 DAT_140292440;
undefined2 DAT_140292450;
undefined DAT_140292470;
undefined *PTR_s_key01_140325e50;
undefined DAT_140292940;
pointer[4] vftable;
undefined8 DAT_14032f250;
undefined thunk_FUN_14004f990;
undefined FUN_14004fa30;
undefined4 DAT_14032f190;
undefined DAT_14032f194;
undefined DAT_14032f198;
undefined DAT_14032f19c;
undefined DAT_140286700;
pointer[7] vftable;
pointer[17] vftable;
ulonglong DAT_140327918;
undefined1 DAT_140327900;
undefined1 DAT_140325ab8;
char DAT_140378fcc;
ulonglong DAT_1403278f0;
undefined8 DAT_1403278d8;
undefined1 DAT_140292ff4;
undefined8 DAT_14032f048;
pointer[15] vftable;
undefined1 DAT_14032efe0;
undefined1 DAT_14032efe1;
undefined1 DAT_14032efe2;
undefined1 DAT_14032efe3;
undefined1 DAT_14032efe4;
undefined1 DAT_14032efe5;
undefined1 DAT_14032efe6;
undefined *PTR_`vftable'_1402593c8;
undefined DAT_1402932c0;
ulonglong DAT_140327940;
undefined8 DAT_140327928;
undefined DAT_1402937e0;
undefined *PTR__BADOFF_1402593e0;
pointer[23] vftable;
pointer[14] vftable;
pointer[29] vftable;
undefined8 DAT_14032f288;
int DAT_140378ff8;
undefined DAT_1402936a0;
undefined DAT_1402936a8;
undefined DAT_1402936b0;
undefined8 DAT_14032f268;
undefined8 *DAT_14032f280;
undefined8 *DAT_14032f260;
undefined8 *DAT_14032f268;
undefined8 *DAT_14032f288;
undefined8 *DAT_14032f290;
undefined8 DAT_14032f270;
undefined8 DAT_14032f280;
undefined8 DAT_14032f290;
undefined DAT_1402943e0;
undefined8 DAT_14032f258;
LPCRITICAL_SECTION DAT_14032f298;
undefined8 DAT_14032f210;
void *DAT_14032f208;
undefined DAT_14032f200;
longlong *DAT_14032f208;
undefined8 *DAT_14032f208;
longlong DAT_14032f210;
longlong DAT_14032f208;
pointer[8] vftable;
undefined DAT_14032f220;
undefined FUN_140149280;
LPTOP_LEVEL_EXCEPTION_FILTER DAT_14032f040;
undefined FUN_140149620;
uint DAT_140325b58;
undefined *PTR_s_&amp;_140325b50;
undefined4 DAT_140325b68;
undefined *PTR_DAT_140325b60;
undefined4 DAT_140325b78;
undefined *PTR_DAT_140325b70;
undefined4 DAT_140325b88;
undefined *PTR_s_&quot;_140325b80;
undefined4 DAT_140325b98;
undefined *PTR_s_&apos;_140325b90;
undefined *PTR_s_Error_when_TiXmlDocument_added_t_140325b40;
undefined *PTR_s_Memory_allocation_failed._140325ad8;
undefined *PTR_s_Failed_to_open_file_140325ad0;
undefined *PTR_s_Error_document_empty._140325b28;
ulonglong DAT_14032f050;
undefined DAT_140295760;
undefined DAT_140295764;
undefined DAT_140295770;
undefined DAT_140295774;
undefined DAT_1402957bc;
undefined DAT_140295808;
undefined DAT_1402861a0;
pointer PTR_s_&amp;_140325b50;
undefined4 DAT_140325b58;
undefined1 DAT_140325b5c;
char DAT_140325ab8;
pointer PTR_s_No_error_140325ac0;
undefined1 DAT_140295c28;
undefined *PTR_s_Error_parsing_Element._140325ae0;
undefined DAT_140295748;
undefined1 DAT_140295818;
undefined *PTR_s_Error_reading_Element_value._140325af0;
undefined *PTR_s_Error_parsing_Unknown._140325b10;
undefined DAT_140295814;
undefined1 DAT_14029582c;
undefined *PTR_s_Error_parsing_Declaration._140325b20;
undefined DAT_140286e98;
undefined2 DAT_140288b80;
undefined *PTR_u_Cannot_use_internal_buffer_becau_140320030;
undefined *PTR_u_Cannot_use_external_buffer_becau_140320028;
undefined DAT_140259ea0;
undefined DAT_14025a0b0;
undefined4 DAT_140320450;
undefined2 DAT_140320454;
short *DAT_1403284e8;
undefined DAT_1403284b0;
undefined2 *DAT_1403284e8;
undefined *PTR_u_error:_ArrayPtr_is_null!_140320000;
uint DAT_140328528;
undefined1 DAT_140328520;
undefined LAB_140257e60;
undefined DAT_1403284f0;
pointer[5] vftable;
undefined1 DAT_140320dfc;
undefined DAT_14025b120;
undefined DAT_14025b1d0;
undefined8 DAT_140320d68;
undefined4 DAT_140320d78;
undefined DAT_14032e680;
uint DAT_140328718;
undefined DAT_1403286b0;
int DAT_1403288e8;
int DAT_140328740;
undefined *DAT_1403286b8;
longlong DAT_1403286d0;
char DAT_1403203c0;
uint DAT_140328748;
undefined DAT_140328744;
undefined DAT_140328788;
undefined *PTR_PTR_140322350;
char DAT_140320400;
uint DAT_1403287c4;
undefined LAB_140257e90;
undefined DAT_1403287c0;
undefined DAT_140328858;
undefined DAT_14025b900;
undefined DAT_14025b904;
char DAT_140320440;
uint DAT_140328818;
undefined LAB_140257ec0;
undefined DAT_1403287d0;
undefined DAT_140328820;
undefined *PTR_u_Duplicated_RMI_ID_is_found._Revi_140320fc8;
undefined *PTR_u_Already_async_callback_may_occur_140320fd8;
int DAT_140320dc0;
short DAT_140320454;
int DAT_140320450;
undefined *PTR_u_CListNode_reports_a_consistency_p_1403212b8;
char DAT_1403288ef;
undefined UNK_14015e30e;
undefined UNK_14015e314;
undefined UNK_14015e36b;
int DAT_140320e08;
undefined DAT_140328530;
undefined UNK_14015fd0f;
pointer PTR_vftable_140321570;
double DAT_140320dc8;
undefined *PTR_DAT_1403204e8;
undefined *PTR_DAT_1403204e0;
undefined *PTR_DAT_1403204d8;
undefined *PTR_DAT_1403204d0;
undefined *PTR_DAT_1403204c8;
undefined *PTR_DAT_1403204c0;
undefined *PTR_DAT_1403204b8;
undefined *PTR_DAT_1403204b0;
undefined *PTR_DAT_1403204a8;
undefined *PTR_DAT_1403204a0;
undefined *PTR_DAT_140320498;
undefined *PTR_DAT_140320490;
undefined *PTR_DAT_140320488;
undefined *PTR_DAT_140320480;
undefined *PTR_DAT_140320478;
undefined *PTR_DAT_140320470;
undefined *PTR_DAT_140320468;
undefined *PTR_DAT_140320460;
undefined *PTR_DAT_140320458;
undefined *PTR_DAT_140320500;
undefined *PTR_DAT_140320508;
undefined *PTR_DAT_140320510;
undefined *PTR_DAT_140320518;
undefined *PTR_DAT_140320520;
undefined *PTR_DAT_140320528;
undefined *PTR_DAT_140320530;
undefined *PTR_DAT_140320538;
undefined *PTR_DAT_140320540;
undefined *PTR_DAT_140320548;
undefined *PTR_DAT_140320550;
undefined *PTR_DAT_140320558;
undefined *PTR_DAT_140320560;
undefined *PTR_DAT_140320568;
undefined *PTR_DAT_140320570;
undefined *PTR_DAT_140320578;
undefined *PTR_DAT_140320580;
double DAT_140328928;
undefined UNK_1401692ad;
undefined UNK_1401692da;
undefined UNK_1401692ec;
undefined UNK_140169319;
undefined DAT_14025e700;
undefined2 DAT_140328898;
undefined DAT_140328890;
double DAT_140320d28;
undefined UNK_14016a422;
undefined UNK_14016a428;
undefined UNK_14016a42e;
undefined UNK_14016a434;
undefined UNK_14016a43a;
undefined UNK_14016a440;
undefined UNK_14016a446;
undefined UNK_14016a44c;
undefined UNK_14016a452;
undefined UNK_14016a4fd;
TypeDescriptor RTTI_Type_Descriptor;
undefined DAT_140320d88;
undefined *PTR_u_Collection_object_can_use_fast_h_140320e48;
undefined *PTR_DAT_1403204f0;
undefined *PTR_DAT_1403204f8;
undefined DAT_14025ee50;
undefined DAT_14025ef60;
int DAT_1403288c0;
undefined8 DAT_1403288c8;
undefined DAT_14025f240;
undefined DAT_14025f3c0;
undefined DAT_14025f4c0;
int DAT_140320dc4;
undefined DAT_140320de0;
undefined DAT_140320d00;
undefined DAT_14025fcc0;
undefined DAT_14031d7e0;
double DAT_140320dd0;
undefined8 DAT_140320dd8;
undefined DAT_140260770;
undefined UNK_14017828b;
undefined UNK_140178299;
undefined UNK_14017849a;
undefined UNK_1401784a0;
undefined UNK_1401784ac;
undefined UNK_140178925;
undefined UNK_140178952;
undefined UNK_14017897f;
undefined UNK_14017898b;
undefined4 DAT_140320d40;
pointer[6] vftable;
pointer[43] vftable;
pointer[69] vftable;
pointer[26] vftable;
pointer[28] vftable;
pointer PTR_vftable_140320448;
double DAT_140320cd8;
double DAT_140320d10;
undefined DAT_140261268;
undefined DAT_1402612a0;
undefined DAT_1403285f0;
undefined DAT_1402615e8;
undefined DAT_140261930;
undefined DAT_140261a30;
int DAT_140320cc8;
double DAT_140320cc0;
undefined DAT_1403288f0;
char DAT_140328940;
undefined FUN_1401826e0;
undefined DAT_140328948;
undefined DAT_140328980;
undefined DAT_140263738;
char DAT_140320e40;
uint DAT_1403293a0;
undefined8 DAT_140329398;
undefined DAT_1403293a8;
undefined FUN_140257fa0;
undefined1 UNK_00000000;
char DAT_140320f00;
uint DAT_1403293e8;
undefined8 DAT_1403293e0;
undefined DAT_1403293f0;
undefined FUN_140257fd0;
undefined DAT_1402640d0;
undefined8 DAT_140329440;
undefined DAT_1402641d8;
undefined DAT_140264328;
undefined *DAT_140329440;
char DAT_140320fc0;
uint DAT_140329ea8;
undefined DAT_140329490;
undefined DAT_140329e68;
undefined LAB_140258020;
undefined DAT_140329e70;
undefined DAT_140329eb0;
pointer[27] vftable;
undefined *PTR_u_Wrong_RMI_ID_is_found._RMI_ID_sh_140320fd0;
undefined DAT_140264fa0;
undefined DAT_140265570;
undefined DAT_140265590;
undefined8 *DAT_14032a030;
undefined DAT_14032a038;
undefined DAT_140265b10;
undefined DAT_140265c60;
undefined DAT_140265dc0;
undefined UNK_14018f403;
undefined UNK_14018f804;
undefined UNK_14018f831;
undefined UNK_14018f85e;
undefined UNK_14018f86a;
undefined UNK_14018f897;
undefined UNK_14018f8da;
undefined DAT_140266228;
undefined1 DAT_1403285c0;
undefined1 DAT_1403285e0;
undefined UNK_14018fd17;
undefined UNK_14019004a;
undefined UNK_140190081;
undefined8 DAT_140320db0;
undefined8 DAT_140320d28;
undefined4 DAT_140320c9c;
undefined8 DAT_140320cd8;
undefined8 DAT_140320ce0;
undefined8 DAT_140320d80;
undefined8 DAT_140320d08;
undefined DAT_140266b50;
undefined DAT_140266b90;
undefined4 DAT_140320c98;
undefined DAT_140266f10;
undefined *PTR_u_exception_due_to_not_using_Inter_140320010;
undefined DAT_140267410;
undefined FUN_14018f100;
undefined FUN_140195bb0;
undefined FUN_140193d30;
undefined FUN_140193d60;
undefined DAT_140294c8c;
undefined DAT_140267788;
undefined DAT_140267828;
undefined LAB_140197ad0;
undefined LAB_1401981e0;
undefined DAT_140268240;
undefined DAT_14026a440;
undefined DAT_14026a840;
undefined DAT_14026ac40;
undefined DAT_14026b040;
undefined1 DAT_14026b440;
undefined DAT_140268440;
undefined DAT_140268840;
undefined DAT_140268c40;
undefined DAT_140269040;
undefined DAT_140268340;
undefined DAT_140269440;
undefined DAT_140269840;
undefined DAT_140269c40;
undefined DAT_14026a040;
undefined DAT_14026b468;
undefined DAT_14026b470;
undefined DAT_14026b478;
undefined DAT_14026b46c;
undefined DAT_14026b474;
undefined DAT_14026b47c;
undefined DAT_14026b5b8;
undefined DAT_14026b5f0;
undefined DAT_14026b620;
undefined DAT_140328938;
char DAT_140321440;
uint DAT_140329fc0;
undefined LAB_140258040;
undefined DAT_140329f00;
undefined DAT_140329fc8;
pointer[9] vftable;
undefined4 DAT_1403213a8;
undefined4 DAT_1403213ac;
undefined4 DAT_1403213b0;
undefined4 DAT_1403213b4;
undefined *PTR_u_RequestLogin_1403212f8;
undefined *PTR_u_NotifyCommon_ReceiveRmi_140321308;
undefined *PTR_u_NotifyCli_ConnectionState_140321310;
undefined *PTR_u_NotifyCli_Peers_Clear_140321318;
undefined *PTR_u_NotifyCli_Peers_AddOrEdit_140321320;
undefined *PTR_u_NotifySrv_ClientEmpty_140321328;
undefined *PTR_u_NotifySrv_Clients_AddOrEdit_140321330;
undefined *PTR_u_NotifySrv_Clients_Remove_140321338;
undefined *PTR_u_NotifyLoginFailed_1403213a0;
undefined *PTR_u_NotifyLoginOk_140321398;
undefined *PTR_u_NotifyCommon_SendRmi_140321300;
undefined DAT_14026c2a0;
int DAT_140320d78;
pointer[10] vftable;
undefined8 DAT_14032a030;
int DAT_140320d48;
undefined FUN_14019f1b0;
undefined LAB_14019f100;
undefined DAT_140320d50;
char DAT_140320d74;
undefined DAT_140320d58;
undefined4 DAT_140320c78;
int DAT_140320d1c;
undefined4 DAT_140320c7c;
undefined1 DAT_140320d75;
undefined *PTR_u_www.nettention.co.kr_1403216d8;
undefined4 DAT_1403216e0;
undefined *PTR_s_GET_/PNReport/ReportError.php?Te_1403216e8;
undefined *PTR_s_HTTP/1.1_User-Agent:_Mozilla/5.0_1403216f0;
undefined FUN_1401a6e40;
char DAT_140321740;
uint DAT_14032a140;
undefined LAB_1402580f0;
undefined DAT_14032a080;
undefined DAT_14032a148;
undefined DAT_14026da70;
undefined DAT_14026dae0;
undefined LAB_1401a76a0;
undefined DAT_14026dba0;
undefined4 DAT_140320c80;
undefined4 DAT_140320c84;
undefined DAT_14026df08;
undefined DAT_14026df50;
undefined DAT_14026df88;
undefined DAT_14026dfc8;
pointer PTR_s_LibTomMath_140275560;
pointer PTR_DAT_1402756f0;
pointer PTR_s_fortuna_140275770;
undefined DAT_140379280;
undefined DAT_1403792c0;
undefined DAT_140379300;
undefined8 DAT_140379340;
char DAT_140321800;
uint DAT_14032b220;
undefined DAT_14032a1c0;
undefined DAT_14032b228;
undefined FUN_140258110;
undefined *DAT_1403793d0;
undefined4 DAT_140320ca0;
undefined4 DAT_1403288e4;
undefined4 DAT_140320dc0;
undefined *PTR_u_exception_due_to_using_external_b_140320018;
undefined DAT_14026e640;
undefined LAB_1401ac830;
undefined LAB_1401ac840;
undefined FUN_1401d1190;
undefined FUN_1401d11a0;
undefined DAT_14026ef40;
undefined DAT_14026f340;
undefined DAT_14026f740;
undefined DAT_14026fb40;
undefined DAT_14026e690;
undefined DAT_14026ee90;
undefined DAT_14026ef10;
undefined DAT_1402715e0;
undefined LAB_1401af0a0;
undefined4 DAT_140320d18;
double DAT_140320ca8;
undefined8 UNK_00000100;
undefined4 UNK_00000284;
undefined8 UNK_000002b8;
undefined8 DAT_140320d60;
int UNK_00000140;
short UNK_00000144;
undefined UNK_1401b17be;
undefined UNK_1401b17c4;
undefined UNK_1401b181d;
double DAT_140320c88;
undefined DAT_140320d98;
double DAT_140320d30;
undefined *PTR_DAT_1403218e0;
undefined *PTR_DAT_1403218d8;
undefined *PTR_DAT_1403218d0;
undefined *PTR_DAT_1403218c8;
undefined *PTR_DAT_1403218c0;
undefined *PTR_DAT_1403218b8;
undefined *PTR_DAT_1403218b0;
undefined *PTR_DAT_1403218a8;
undefined *PTR_DAT_1403218a0;
undefined *PTR_DAT_140321898;
undefined *PTR_DAT_140321890;
undefined *PTR_DAT_140321888;
undefined *PTR_DAT_140321880;
undefined *PTR_DAT_140321878;
undefined *PTR_DAT_140321870;
undefined *PTR_DAT_140321868;
undefined *PTR_DAT_140321860;
undefined *PTR_DAT_140321858;
undefined *PTR_DAT_140321850;
undefined *PTR_DAT_140321900;
undefined *PTR_DAT_1403218f8;
undefined *PTR_DAT_1403218f0;
undefined *PTR_DAT_1403218e8;
undefined *PTR_DAT_140321908;
undefined *PTR_DAT_140321910;
undefined *PTR_DAT_140321918;
undefined *PTR_DAT_140321920;
undefined *PTR_DAT_140321928;
undefined *PTR_DAT_140321938;
undefined *PTR_DAT_140321940;
undefined *PTR_DAT_140321948;
undefined *PTR_DAT_140321950;
undefined *PTR_DAT_140321958;
undefined *PTR_DAT_140321960;
undefined *PTR_DAT_140321968;
undefined *PTR_DAT_140321970;
undefined *PTR_DAT_140321978;
undefined *PTR_DAT_140321980;
undefined *PTR_DAT_140321988;
undefined *PTR_DAT_140321990;
undefined *PTR_DAT_140321998;
undefined *PTR_DAT_1403219a0;
undefined *PTR_DAT_1403219a8;
undefined *PTR_DAT_1403219b0;
undefined *PTR_DAT_1403219b8;
undefined8 DAT_140320d20;
undefined DAT_140320d38;
undefined DAT_140273240;
int DAT_14032b280;
undefined DAT_14032b288;
undefined *PTR_DAT_140321930;
pointer PTR_vftable_1403221b0;
undefined DAT_1402739c0;
undefined DAT_140273a38;
undefined8 DAT_140320cb0;
undefined DAT_140320de8;
undefined8 UNK_00000000;
undefined DAT_140273f90;
undefined *PTR_u_Cannot_send_messages_unless_conn_1403219c0;
longlong DAT_140320cc0;
pointer[57] vftable;
undefined8 DAT_140320cc0;
undefined8 DAT_140320d30;
undefined8 DAT_140320dd0;
undefined DAT_1402749f0;
pointer[13] vftable;
undefined DAT_140274d40;
int DAT_140320cb8;
undefined8 DAT_140328930;
undefined8 DAT_140320ca8;
undefined DAT_140294c90;
DWORD DAT_14032b2b8;
int DAT_14032b2b0;
uint DAT_14032b2b0;
uint DAT_14032b2f8;
undefined DAT_14032b2b8;
undefined LAB_140258170;
undefined DAT_14032b2c0;
char DAT_1403288ed;
char DAT_1403288ec;
int DAT_140320d7c;
double DAT_140320db0;
undefined8 DAT_14032bd10;
undefined8 DAT_14032b310;
undefined4 DAT_140275540;
undefined DAT_140275544;
longlong DAT_140379340;
undefined *DAT_1403793a0;
undefined *DAT_140379350;
undefined *DAT_140379360;
undefined *DAT_140379378;
undefined *DAT_140379400;
undefined *DAT_140379438;
undefined *DAT_140379440;
undefined *DAT_140379458;
undefined *DAT_140379408;
undefined *DAT_140379420;
undefined *DAT_140379370;
undefined *DAT_1403793a8;
undefined *DAT_1403794c0;
undefined1 DAT_1402768b0;
undefined DAT_1402769b0;
undefined DAT_140276ab0;
undefined DAT_140275810;
undefined DAT_140275812;
undefined DAT_140275814;
undefined DAT_140275816;
pointer PTR_FUN_140275818;
undefined1 DAT_140276390;
undefined DAT_140276240;
undefined DAT_1402762c0;
undefined DAT_140276bb0;
undefined DAT_140276c30;
undefined DAT_140276ad6;
undefined DAT_140276b16;
undefined DAT_140276d60;
undefined DAT_140276da0;
pointer PTR_DAT_140321e58;
pointer PTR_DAT_140321e78;
undefined DAT_140321e98;
undefined DAT_1402763b0;
undefined DAT_140276830;
char DAT_140321f00;
uint DAT_14032e3a0;
undefined LAB_140258180;
undefined DAT_14032e310;
undefined DAT_14032e3a8;
double DAT_140320c90;
undefined DAT_140276ff0;
undefined DAT_140277110;
undefined DAT_140277738;
undefined DAT_140320df0;
undefined DAT_140277820;
undefined DAT_140277908;
undefined DAT_1402779d8;
char DAT_140320d77;
undefined4 DAT_140320ca4;
uint DAT_140320ca4;
undefined LAB_1401d38c0;
undefined LAB_1401dc620;
longlong DAT_140320ca8;
pointer PTR_DAT_14026d670;
undefined DAT_14026d678;
undefined DAT_14026d67c;
undefined DAT_14029580c;
undefined4 DAT_14032e3f0;
undefined2 DAT_14032e3f4;
undefined *DAT_14032e3e0;
undefined DAT_140278340;
undefined DAT_1402785c0;
undefined DAT_140278720;
int DAT_140320cbc;
undefined DAT_1403288e0;
undefined DAT_1402787f0;
undefined DAT_140278838;
undefined DAT_140328540;
undefined DAT_140328550;
undefined DAT_140328560;
undefined DAT_140328570;
undefined DAT_140328580;
undefined DAT_140328578;
undefined DAT_140328584;
undefined DAT_140328548;
undefined DAT_140328558;
undefined DAT_140328568;
undefined8 UNK_140328538;
undefined4 UNK_140328574;
undefined4 UNK_14032857c;
undefined4 UNK_140328588;
undefined4 UNK_14032858c;
undefined1 DAT_140320588;
double DAT_140320d20;
double DAT_140328930;
undefined DAT_140320da0;
undefined DAT_140278d90;
undefined4 DAT_1403285b8;
char DAT_140322261;
undefined8 DAT_1403285b0;
char DAT_140322262;
undefined DAT_1403222a8;
int DAT_1403222c8;
undefined DAT_1403222c0;
int DAT_1403222cc;
double DAT_140322280;
double DAT_140322270;
double DAT_140322278;
longlong DAT_140322268;
double DAT_1403222b8;
uint DAT_14032e668;
undefined4 DAT_140322294;
undefined4 DAT_14032e670;
undefined DAT_1403222b0;
int DAT_14032e670;
undefined *DAT_1403793e0;
undefined *DAT_140379398;
undefined *DAT_140379480;
undefined *DAT_1403793f8;
undefined *DAT_140379448;
undefined *DAT_1403793e8;
undefined *DAT_1403793d8;
undefined DAT_1402790d0;
undefined *PTR_s_0123456789ABCDEFGHIJKLMNOPQRSTUV_1403222d0;
int DAT_1403222e0;
int DAT_1403222d8;
int DAT_1403222e4;
int DAT_1403222dc;
undefined4 DAT_14027dde0;
undefined DAT_14027ae90;
undefined DAT_14027b290;
undefined DAT_14027b690;
undefined DAT_14027ba90;
undefined DAT_14027ca90;
undefined DAT_14027ce90;
undefined DAT_14027d290;
undefined DAT_14027d690;
undefined4 DAT_14027da94;
undefined DAT_14027daac;
undefined DAT_14027dab0;
undefined DAT_140279290;
undefined DAT_14027a290;
undefined DAT_14027a690;
undefined DAT_14027aa90;
undefined DAT_140279a90;
undefined DAT_140279e90;
undefined DAT_14027be90;
undefined DAT_14027c290;
undefined DAT_14027c690;
undefined *DAT_140379488;
undefined DAT_14032b338;
undefined DAT_14032bd1c;
undefined4 DAT_14032e660;
undefined2 DAT_14032e664;
undefined DAT_14032e400;
undefined DAT_140320d90;
undefined FUN_1401f0500;
int DAT_14032e66c;
undefined FUN_1401f4bf0;
undefined FUN_1401f7fe0;
undefined FUN_1401eb750;
undefined FUN_1401f8170;
undefined FUN_1401f8290;
undefined FUN_1401f83f0;
undefined4 DAT_14027e1e0;
undefined4 DAT_14027e1e4;
undefined4 DAT_14027e430;
undefined4 DAT_14027e434;
undefined *DAT_1403793b0;
undefined *DAT_1403793b8;
undefined FUN_1401f85e0;
undefined FUN_1401f8920;
undefined *PTR_DAT_1403222e8;
undefined FUN_1401fdfac;
undefined FUN_1401fdfcc;
undefined DAT_14027e790;
undefined DAT_14027ef90;
undefined DAT_14027f010;
pointer PTR_FUN_14027f088;
undefined DAT_14027f080;
undefined DAT_14027f082;
undefined DAT_14027f084;
undefined DAT_14027f086;
undefined DAT_140281920;
undefined1 DAT_140281a20;
undefined DAT_140281b20;
undefined UNK_14027efae;
undefined DAT_14027efee;
undefined DAT_14027f230;
undefined DAT_14027f270;
undefined DAT_14027f2b0;
undefined DAT_14027f6b0;
undefined DAT_14027fab0;
undefined DAT_14027feb0;
undefined DAT_1402802b0;
undefined DAT_1402806b0;
undefined DAT_140280ab0;
undefined DAT_140280eb0;
undefined1 DAT_140281400;
undefined DAT_1402812b0;
undefined DAT_140281330;
undefined DAT_140281c20;
undefined DAT_140281ca0;
pointer PTR_DAT_1403222f0;
pointer PTR_DAT_140322310;
undefined DAT_140322330;
undefined DAT_140281420;
undefined DAT_1402818a0;
undefined1 DAT_14032ecb0;
IMAGE_DOS_HEADER IMAGE_DOS_HEADER_140000000;
undefined DAT_140281d38;
undefined *PTR_LAB_140281d48;
undefined *PTR_Allocate_140281d70;
undefined *PTR_FUN_140322380;
undefined DAT_140281da0;
undefined UNK_14020157f;
undefined UNK_1402015c6;
undefined UNK_1402015f2;
pointer PTR_FUN_140281dd8;
undefined DAT_14031d810;
uintptr_t DAT_1403223c0;
undefined _type_info_dtor_internal_method;
PVOID DAT_1403794e8;
PVOID DAT_1403794e0;
undefined4 DAT_14032eca4;
undefined4 DAT_14032eca0;
undefined FUN_140202204;
undefined DAT_14032e71c;
undefined DAT_14032e718;
undefined4 DAT_14032e700;
undefined8 DAT_14032e708;
undefined8 DAT_14032e710;
void *DAT_1403794d0;
int DAT_1403794c8;
undefined8 DAT_1403794d8;
undefined *PTR___initenv_1402597e0;
uint DAT_14032e720;
int DAT_14032e704;
void *StackBase;
int DAT_14032e724;
undefined DAT_140259a68;
undefined DAT_140259df0;
undefined DAT_140259df8;
undefined DAT_140259e10;
undefined4 DAT_14032e704;
undefined *PTR__fmode_140259810;
undefined4 DAT_14032ecac;
undefined *PTR__commode_140259808;
undefined4 DAT_14032eca8;
int DAT_1403223ec;
int DAT_1403223e8;
undefined FUN_140202320;
void *StackLimit;
undefined DAT_14032e7d0;
DWORD64 DAT_14032e8c8;
undefined DAT_14032e740;
undefined DAT_14032e850;
undefined DAT_14032e730;
undefined DAT_14032e734;
undefined8 DAT_1403223c0;
undefined8 DAT_1403223c8;
int DAT_14032e7c8;
undefined DAT_14032e868;
pointer PTR_DAT_140281df0;
undefined FUN_140202168;
undefined8 DAT_1402a6c90;
undefined8 DAT_1402a6ca0;
ulonglong DAT_1403223c8;
undefined2 DAT_140289584;
byte DAT_14032f19d;
byte DAT_14032f19b;
byte DAT_14032f19a;
byte DAT_14032f19c;
byte DAT_14032f199;
undefined DAT_14032f196;
ushort DAT_14032f194;
byte DAT_14032f19f;
byte DAT_14032f198;
byte DAT_14032f19e;
uint DAT_140379238;
int DAT_140379230;
undefined LAB_140257cb0;
undefined4 DAT_140378dc8;
ulonglong DAT_140379220;
undefined DAT_140379208;
ulonglong DAT_1403791f8;
undefined DAT_140379218;
undefined DAT_1403791e0;
ulonglong DAT_1403791d0;
undefined DAT_1403791f0;
undefined DAT_1403791b8;
ulonglong DAT_1403791a8;
undefined DAT_1403791c8;
undefined DAT_140379190;
ulonglong DAT_140379180;
undefined DAT_1403791a0;
undefined DAT_140379168;
ulonglong DAT_140379158;
undefined DAT_140379178;
undefined DAT_140379140;
ulonglong DAT_140379130;
undefined DAT_140379150;
undefined DAT_140379118;
ulonglong DAT_140379108;
undefined DAT_140379128;
undefined DAT_1403790f0;
ulonglong DAT_1403790e0;
undefined DAT_140379100;
undefined DAT_1403790c8;
ulonglong DAT_1403790b8;
undefined DAT_1403790d8;
undefined DAT_1403790a0;
ulonglong DAT_140379090;
undefined DAT_1403790b0;
undefined DAT_140379078;
ulonglong DAT_140379068;
undefined DAT_140379088;
undefined DAT_140379050;
undefined DAT_140379060;
ulonglong DAT_140379038;
undefined DAT_140379020;
void *DAT_140379000;
undefined DAT_140379030;
void *DAT_140379008;
undefined DAT_140379010;
ulonglong DAT_140378db8;
undefined DAT_140378da0;
undefined DAT_140378db0;
undefined DAT_140378dd0;
undefined8 DAT_140378da0;
undefined8 DAT_140379068;
undefined8 DAT_140379050;
undefined8 DAT_140379090;
undefined8 DAT_1403790b8;
undefined8 DAT_1403790e0;
undefined8 DAT_140379108;
undefined8 DAT_140379130;
undefined8 DAT_140379158;
undefined8 DAT_140379180;
undefined8 DAT_1403791a8;
undefined8 DAT_1403791d0;
undefined8 DAT_1403791f8;
undefined8 DAT_140379220;
undefined8 DAT_140379208;
undefined4 DAT_140379230;
undefined8 DAT_140379000;
undefined8 DAT_140379020;
undefined8 DAT_140378db8;
undefined8 DAT_140379008;
undefined8 DAT_140379038;
undefined DAT_14016a573;
undefined DAT_14016a4b7;
undefined DAT_14016aa42;
undefined DAT_14017b3ce;
undefined DAT_140261210;
undefined DAT_14018d78c;
undefined DAT_140192e83;
undefined DAT_1401933e7;
undefined DAT_140194e23;
undefined DAT_140199eb2;
undefined DAT_14019a166;
undefined DAT_14019a45d;
undefined DAT_14019a682;
undefined DAT_1401a5b27;
undefined DAT_1401a9e60;
undefined DAT_1401aa0e8;
undefined DAT_1401c0e29;
undefined DAT_1401c0d25;
undefined DAT_1401c0d2a;
undefined DAT_1401c0d2f;
undefined DAT_1401c337f;
undefined DAT_1401d777c;
undefined DAT_1401d773c;
undefined DAT_1401dbee2;
undefined DAT_1401dc03f;
undefined DAT_1401dd67d;
undefined DAT_140002b0d;
undefined DAT_140002974;
undefined DAT_140001e7d;
undefined DAT_140056ce1;
undefined DAT_14004d3ec;
undefined DAT_140002410;
undefined DAT_14013bf2d;
undefined DAT_1400a0815;
undefined DAT_1400a006b;
undefined DAT_14009e6e5;
undefined DAT_14009dbfd;
undefined DAT_14009d353;
undefined DAT_14009cbe1;
undefined DAT_14009bc8d;
undefined DAT_14009a5f0;
undefined DAT_140098cb5;
undefined DAT_14009803e;
undefined DAT_140097341;
undefined DAT_140096f77;
undefined DAT_14009695b;
undefined DAT_1400965b2;
undefined DAT_140095435;
undefined DAT_140094b1c;
undefined DAT_140094663;
undefined DAT_14009415b;
undefined DAT_1400938c8;
undefined DAT_1400927a3;
undefined DAT_1400907bc;
undefined DAT_14008e6f8;
undefined DAT_14008e480;
undefined DAT_14008d883;
undefined DAT_14008c818;
undefined DAT_14008b8fe;
undefined DAT_140089ca9;
undefined DAT_140087684;

undefined8 * FUN_140001000(undefined8 *param_1,undefined8 param_2)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  
  puVar1 = operator_new(0x18);
  if (puVar1 == (undefined8 *)0x0) {
    puVar1 = (undefined8 *)0x0;
  }
  else {
    puVar1[1] = 0;
    *(undefined4 *)(puVar1 + 2) = 1;
    uVar2 = FUN_140201490(param_2);
    *puVar1 = uVar2;
  }
  *param_1 = puVar1;
  if (puVar1 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  return param_1;
}



void FUN_140001080(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong lVar3;
  
  plVar2 = (longlong *)*param_1;
  if (plVar2 != (longlong *)0x0) {
    LOCK();
    plVar1 = plVar2 + 2;
    lVar3 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if (((int)lVar3 == 1) && (plVar2 != (longlong *)0x0)) {
      if (*plVar2 != 0) {
        Ordinal_6();
      }
      if ((void *)plVar2[1] != (void *)0x0) {
        operator_delete__((void *)plVar2[1]);
      }
      operator_delete(plVar2);
    }
    *param_1 = 0;
  }
  return;
}



void Ordinal_9(void)

{
                    // WARNING: Could not recover jumptable at 0x0001400010e0. Too many branches
                    // WARNING: Treating indirect jump as call
  Ordinal_9();
  return;
}



undefined8 *
FUN_1400010f0(longlong param_1,undefined8 *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined8 *puVar2;
  undefined8 local_res8;
  
  local_res8 = 0;
  if (*(longlong *)(param_1 + 0x10) != 0) {
    (**(code **)(**(longlong **)(param_1 + 0x10) + 0x28))
              (*(longlong **)(param_1 + 0x10),&local_res8,param_3,param_4,0xfffffffffffffffe);
  }
  uVar1 = local_res8;
  puVar2 = operator_new(0x18);
  if (puVar2 != (undefined8 *)0x0) {
    puVar2[1] = 0;
    *(undefined4 *)(puVar2 + 2) = 1;
    *puVar2 = uVar1;
  }
  *param_2 = puVar2;
  if (puVar2 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  return param_2;
}



undefined8 *
FUN_140001180(longlong param_1,undefined8 *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined8 *puVar2;
  undefined8 local_res8;
  
  local_res8 = 0;
  if (*(longlong *)(param_1 + 0x10) != 0) {
    (**(code **)(**(longlong **)(param_1 + 0x10) + 0x20))
              (*(longlong **)(param_1 + 0x10),&local_res8,param_3,param_4,0xfffffffffffffffe);
  }
  uVar1 = local_res8;
  puVar2 = operator_new(0x18);
  if (puVar2 != (undefined8 *)0x0) {
    puVar2[1] = 0;
    *(undefined4 *)(puVar2 + 2) = 1;
    *puVar2 = uVar1;
  }
  *param_2 = puVar2;
  if (puVar2 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  return param_2;
}



longlong FUN_140001210(longlong param_1)

{
  longlong *lpBuffer;
  longlong lVar1;
  int iVar2;
  char *_DstBuf;
  longlong lVar3;
  char *_Format;
  
  lpBuffer = (longlong *)(param_1 + 0x18);
  if (*(longlong *)(param_1 + 0x18) == 0) {
    FormatMessageA(0x1300,(LPCVOID)0x0,*(DWORD *)(param_1 + 8),0x400,(LPSTR)lpBuffer,0,
                   (va_list *)0x0);
    if ((LPCSTR)*lpBuffer == (LPCSTR)0x0) {
      _DstBuf = LocalAlloc(0,0x20);
      *lpBuffer = (longlong)_DstBuf;
      if (_DstBuf == (char *)0x0) {
        return 0;
      }
      if ((*(int *)(param_1 + 8) + 0x7ffbfe00U < 0xfe00) && ((short)*(int *)(param_1 + 8) != 0x200))
      {
        _Format = "IDispatch error #%d";
      }
      else {
        _Format = "Unknown error 0x%0lX";
      }
      sprintf_s(_DstBuf,0x20,_Format);
    }
    else {
      iVar2 = lstrlenA((LPCSTR)*lpBuffer);
      if (1 < iVar2) {
        lVar3 = (longlong)iVar2;
        lVar1 = *lpBuffer;
        if (*(char *)(lVar3 + -1 + lVar1) != '\n') {
          return lVar1;
        }
        *(undefined1 *)(lVar3 + -1 + lVar1) = 0;
        lVar1 = *lpBuffer;
        if (*(char *)(lVar3 + -2 + lVar1) != '\r') {
          return lVar1;
        }
        *(undefined1 *)(lVar3 + -2 + lVar1) = 0;
        return *lpBuffer;
      }
    }
  }
  return *lpBuffer;
}



void * FUN_140001320(IUnknown *param_1,void *param_2)

{
  ULONG UVar1;
  undefined1 local_28 [32];
  
  Ordinal_8(local_28);
  UVar1 = (*param_1->lpVtbl[3].AddRef)(param_1);
  if ((int)UVar1 < 0) {
    _com_issue_errorex(UVar1,param_1,(_GUID *)&DAT_140281ec0);
  }
  memcpy_s(param_2,0x18,local_28,0x18);
  return param_2;
}



undefined8 * FUN_140001390(IUnknown *param_1,undefined8 *param_2,undefined8 *param_3)

{
  HRESULT HVar1;
  void *local_res8;
  IID local_28;
  undefined8 local_18;
  
  local_res8 = (void *)0x0;
  local_28._0_8_ = *param_3;
  local_28.Data4 = *(uchar (*) [8])(param_3 + 1);
  local_18 = param_3[2];
  HVar1 = (*param_1->lpVtbl[4].QueryInterface)(param_1,&local_28,&local_res8);
  if (HVar1 < 0) {
    _com_issue_errorex(HVar1,param_1,(_GUID *)&DAT_140281ed0);
    *param_2 = local_res8;
    return param_2;
  }
  *param_2 = local_res8;
  return param_2;
}



void FUN_140001420(IUnknown *param_1,longlong *param_2,void **param_3)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong lVar3;
  HRESULT HVar4;
  IID *riid;
  
  if ((undefined8 *)*param_2 == (undefined8 *)0x0) {
    riid = (IID *)0x0;
  }
  else {
    riid = *(IID **)*param_2;
  }
  HVar4 = (*param_1->lpVtbl[4].QueryInterface)(param_1,riid,param_3);
  if (HVar4 < 0) {
    _com_issue_errorex(HVar4,param_1,(_GUID *)&DAT_140281ee0);
  }
  plVar2 = (longlong *)*param_2;
  if (plVar2 != (longlong *)0x0) {
    LOCK();
    plVar1 = plVar2 + 2;
    lVar3 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if (((int)lVar3 == 1) && (plVar2 != (longlong *)0x0)) {
      if (*plVar2 != 0) {
        Ordinal_6();
      }
      if ((void *)plVar2[1] != (void *)0x0) {
        operator_delete__((void *)plVar2[1]);
      }
      operator_delete(plVar2);
    }
    *param_2 = 0;
  }
  return;
}



undefined8 * FUN_1400014c0(IUnknown *param_1,undefined8 *param_2)

{
  ULONG UVar1;
  
  UVar1 = (*param_1->lpVtbl[5].Release)(param_1);
  if ((int)UVar1 < 0) {
    _com_issue_errorex(UVar1,param_1,(_GUID *)&DAT_140281ee0);
    *param_2 = 0;
    return param_2;
  }
  *param_2 = 0;
  return param_2;
}



undefined8 * FUN_140001540(IUnknown *param_1,undefined8 *param_2,longlong *param_3,uint param_4)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong lVar3;
  HRESULT HVar4;
  IID *riid;
  
  riid = (IID *)0x0;
  if ((undefined8 *)*param_3 != (undefined8 *)0x0) {
    riid = *(IID **)*param_3;
  }
  HVar4 = (*param_1->lpVtbl[6].QueryInterface)(param_1,riid,(void **)(ulonglong)param_4);
  if (HVar4 < 0) {
    _com_issue_errorex(HVar4,param_1,(_GUID *)&DAT_140281ee0);
  }
  *param_2 = 0;
  plVar2 = (longlong *)*param_3;
  if (plVar2 != (longlong *)0x0) {
    LOCK();
    plVar1 = plVar2 + 2;
    lVar3 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if (((int)lVar3 == 1) && (plVar2 != (longlong *)0x0)) {
      if (*plVar2 != 0) {
        Ordinal_6();
      }
      if ((void *)plVar2[1] != (void *)0x0) {
        operator_delete__((void *)plVar2[1]);
      }
      operator_delete(plVar2);
    }
    *param_3 = 0;
  }
  return param_2;
}



undefined8 * FUN_140001660(IUnknown *param_1,undefined8 *param_2)

{
  ULONG UVar1;
  
  UVar1 = (*param_1->lpVtbl[6].AddRef)(param_1);
  if ((int)UVar1 < 0) {
    _com_issue_errorex(UVar1,param_1,(_GUID *)&DAT_140281ee0);
    *param_2 = 0;
    return param_2;
  }
  *param_2 = 0;
  return param_2;
}



undefined8 FUN_1400016d0(longlong *param_1,undefined8 param_2)

{
  if (*param_1 == 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  FUN_1400014c0();
  return param_2;
}



void FUN_140001710(longlong *param_1,IID *param_2,void **param_3)

{
  IUnknown *pIVar1;
  HRESULT HVar2;
  ULONG UVar3;
  undefined8 uVar4;
  undefined1 local_res8 [8];
  
  pIVar1 = (IUnknown *)*param_1;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  HVar2 = (*pIVar1->lpVtbl[3].QueryInterface)(pIVar1,param_2,param_3);
  if (HVar2 < 0) {
    _com_issue_errorex(HVar2,pIVar1,(_GUID *)&DAT_140281ee0);
  }
  uVar4 = FUN_140001000(local_res8,param_3);
  if (*param_1 == 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  FUN_140001420(*param_1,uVar4);
  pIVar1 = (IUnknown *)*param_1;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar1->lpVtbl[6].Release)(pIVar1);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281ee0);
  }
  return;
}



void FUN_1400017e0(longlong *param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  IUnknown *This;
  ULONG UVar1;
  undefined8 *puVar2;
  longlong *local_res8;
  longlong *local_res10;
  
  local_res10 = param_2;
  if (*param_1 == 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar2 = (undefined8 *)FUN_140001660(*param_1,&local_res8,param_3,param_4,0xfffffffffffffffe);
  This = (IUnknown *)*puVar2;
  if (This == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar1 = (*This->lpVtbl[3].AddRef)(This);
  if ((int)UVar1 < 0) {
    _com_issue_errorex(UVar1,This,(_GUID *)&DAT_140281eb0);
  }
  if (local_res8 != (longlong *)0x0) {
    (**(code **)(*local_res8 + 0x10))();
  }
  if ((longlong *)*param_2 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*param_2 + 0x10))();
  }
  return;
}



undefined8
FUN_140001880(longlong *param_1,undefined8 param_2,longlong *param_3,undefined8 param_4,
             undefined4 param_5,undefined8 param_6,undefined8 param_7)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong lVar3;
  longlong local_res8;
  
  local_res8 = *param_3;
  if (local_res8 != 0) {
    LOCK();
    *(int *)(local_res8 + 0x10) = *(int *)(local_res8 + 0x10) + 1;
    UNLOCK();
  }
  if (*param_1 == 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  FUN_140001540(*param_1,param_2,&local_res8,param_4,param_5,param_6,param_7);
  plVar2 = (longlong *)*param_3;
  if (plVar2 != (longlong *)0x0) {
    LOCK();
    plVar1 = plVar2 + 2;
    lVar3 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if (((int)lVar3 == 1) && (plVar2 != (longlong *)0x0)) {
      if (*plVar2 != 0) {
        Ordinal_6();
      }
      if ((void *)plVar2[1] != (void *)0x0) {
        operator_delete__((void *)plVar2[1]);
      }
      operator_delete(plVar2);
    }
    *param_3 = 0;
  }
  Ordinal_9(param_7);
  return param_2;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

DWORD FUN_140001970(undefined8 param_1)

{
  ulonglong _Size;
  longlong lVar1;
  int iVar2;
  int iVar3;
  DWORD DVar4;
  ulonglong uVar5;
  undefined4 *puVar6;
  undefined4 *puVar7;
  undefined1 *puVar8;
  undefined1 *puVar9;
  undefined1 auStackY_48 [32];
  ulonglong local_18 [2];
  
  puVar8 = auStackY_48;
  puVar9 = auStackY_48;
  local_18[0] = DAT_1403223c0 ^ (ulonglong)local_18;
  iVar2 = lstrlenA("ADODB.Command");
  iVar3 = MultiByteToWideChar(0,0,"ADODB.Command",iVar2 + 1,(LPWSTR)0x0,0);
  if (iVar3 == 0) {
LAB_140001a6e:
    *(undefined8 *)(puVar9 + -8) = 0x140001a74;
    DVar4 = GetLastError();
    if (0 < (int)DVar4) {
      DVar4 = DVar4 & 0xffff | 0x80070000;
    }
  }
  else {
    _Size = (longlong)iVar3 * 2 + 0x10;
    if (_Size < 0x401) {
      uVar5 = (longlong)iVar3 * 2 + 0x1f;
      if (uVar5 <= _Size) {
        uVar5 = 0xffffffffffffff0;
      }
      lVar1 = -(uVar5 & 0xfffffffffffffff0);
      puVar9 = auStackY_48 + lVar1;
      puVar8 = auStackY_48 + lVar1;
      puVar6 = (undefined4 *)((longlong)local_18 + lVar1);
      if (puVar6 != (undefined4 *)0x0) {
        *puVar6 = 0xcccc;
LAB_140001a29:
        puVar7 = puVar6 + 4;
        puVar9 = puVar8;
        goto LAB_140001a2d;
      }
    }
    else {
      puVar6 = malloc(_Size);
      puVar7 = (undefined4 *)0x0;
      puVar9 = auStackY_48;
      if (puVar6 != (undefined4 *)0x0) {
        *puVar6 = 0xdddd;
        goto LAB_140001a29;
      }
LAB_140001a2d:
      if (puVar7 != (undefined4 *)0x0) {
        *(int *)(puVar9 + 0x28) = iVar3;
        *(undefined4 **)(puVar9 + 0x20) = puVar7;
        *(undefined8 *)(puVar9 + -8) = 0x140001a57;
        iVar2 = MultiByteToWideChar(0,0,"ADODB.Command",iVar2 + 1,*(LPWSTR *)(puVar9 + 0x20),
                                    *(int *)(puVar9 + 0x28));
        if (iVar2 != 0) {
          *(undefined8 *)(puVar9 + -8) = 0x140001a8d;
          DVar4 = FUN_140001ad0(param_1,puVar7);
          if (puVar7[-4] == 0xdddd) {
            *(undefined8 *)(puVar9 + -8) = 0x140001aa2;
            free(puVar7 + -4);
          }
          goto LAB_140001aa4;
        }
        if (puVar7[-4] == 0xdddd) {
          *(undefined8 *)(puVar9 + -8) = 0x140001a6e;
          free(puVar7 + -4);
        }
        goto LAB_140001a6e;
      }
    }
    DVar4 = 0x8007000e;
  }
LAB_140001aa4:
  *(undefined8 *)(puVar9 + -8) = 0x140001ab0;
  return DVar4;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140001ad0(void **param_1,LPCOLESTR param_2)

{
  int iVar1;
  undefined1 auStackY_58 [32];
  LPUNKNOWN local_28;
  CLSID local_20;
  ulonglong local_10;
  
  local_10 = DAT_1403223c0 ^ (ulonglong)auStackY_58;
  if (param_2 == (LPCOLESTR)0x0) {
    return -0x7ff8ffa9;
  }
  if (*param_2 == L'{') {
    iVar1 = CLSIDFromString(param_2,&local_20);
  }
  else {
    iVar1 = CLSIDFromProgID(param_2,&local_20);
  }
  if (-1 < iVar1) {
    if (*param_1 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*param_1 + 0x10))();
    }
    iVar1 = CoCreateInstance(&local_20,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,&local_28);
    if (-1 < iVar1) {
      iVar1 = OleRun(local_28);
      if (-1 < iVar1) {
        iVar1 = (*local_28->lpVtbl->QueryInterface)(local_28,(IID *)&DAT_140281ef0,param_1);
      }
      (*local_28->lpVtbl->Release)(local_28);
      if (-1 < iVar1) {
        return iVar1;
      }
    }
    *param_1 = (void *)0x0;
  }
  return iVar1;
}



ULONG FUN_140001bc0(IUnknown *param_1,undefined8 *param_2,undefined8 *param_3,undefined8 *param_4)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong lVar3;
  ULONG UVar4;
  
  UVar4 = (*param_1->lpVtbl[6].Release)(param_1);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,param_1,(_GUID *)&DAT_140281f08);
  }
  plVar2 = (longlong *)*param_2;
  if (plVar2 != (longlong *)0x0) {
    LOCK();
    plVar1 = plVar2 + 2;
    lVar3 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if (((int)lVar3 == 1) && (plVar2 != (longlong *)0x0)) {
      if (*plVar2 != 0) {
        Ordinal_6();
      }
      if ((void *)plVar2[1] != (void *)0x0) {
        operator_delete__((void *)plVar2[1]);
      }
      operator_delete(plVar2);
    }
    *param_2 = 0;
  }
  plVar2 = (longlong *)*param_3;
  if (plVar2 != (longlong *)0x0) {
    LOCK();
    plVar1 = plVar2 + 2;
    lVar3 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if (((int)lVar3 == 1) && (plVar2 != (longlong *)0x0)) {
      if (*plVar2 != 0) {
        Ordinal_6();
      }
      if ((void *)plVar2[1] != (void *)0x0) {
        operator_delete__((void *)plVar2[1]);
      }
      operator_delete(plVar2);
    }
    *param_3 = 0;
  }
  plVar2 = (longlong *)*param_4;
  if (plVar2 != (longlong *)0x0) {
    LOCK();
    plVar1 = plVar2 + 2;
    lVar3 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if (((int)lVar3 == 1) && (plVar2 != (longlong *)0x0)) {
      if (*plVar2 != 0) {
        Ordinal_6();
      }
      if ((void *)plVar2[1] != (void *)0x0) {
        operator_delete__((void *)plVar2[1]);
      }
      operator_delete(plVar2);
    }
    *param_4 = 0;
  }
  return UVar4;
}



uint FUN_140001d30(longlong *param_1,char *param_2)

{
  char cVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  longlong lVar8;
  char *pcVar9;
  int local_res10 [2];
  undefined1 local_res18 [8];
  undefined1 local_res20 [8];
  undefined8 uVar10;
  int *piVar11;
  undefined1 *puVar12;
  undefined1 *puVar13;
  
  uVar10 = 0xfffffffffffffffe;
  if (param_2 != (char *)0x0) {
    pIVar2 = (IUnknown *)*param_1;
    if (pIVar2 != (IUnknown *)0x0) {
      local_res10[0] = 0;
      UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
      }
      if (local_res10[0] != 0) {
        return 0;
      }
    }
    lVar8 = -1;
    pcVar9 = param_2;
    do {
      if (lVar8 == 0) break;
      lVar8 = lVar8 + -1;
      cVar1 = *pcVar9;
      pcVar9 = pcVar9 + 1;
    } while (cVar1 != '\0');
    if (lVar8 != -2) {
      param_1[1] = (longlong)param_2;
      piVar11 = local_res10;
      puVar12 = local_res18;
      puVar13 = local_res20;
      uVar5 = FUN_140001000(local_res10,&DAT_140281f00);
      uVar6 = FUN_140001000(local_res18,&DAT_140281f00);
      uVar7 = FUN_140001000(local_res20,param_1[1]);
      if (*param_1 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      iVar4 = FUN_140001bc0(*param_1,uVar7,uVar6,uVar5,uVar10,piVar11,puVar12,puVar13);
      if (iVar4 == 0) {
        pIVar2 = (IUnknown *)*param_1;
        if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar3 = (*pIVar2->lpVtbl[9].Release)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
        }
      }
      return -(uint)(iVar4 != 0) & 0xfffffffe;
    }
  }
  return 0xffffffff;
}



void FUN_140001e90(undefined8 *param_1,undefined8 param_2,void **param_3)

{
  IUnknown *This;
  ULONG UVar1;
  HRESULT HVar2;
  IID *riid;
  IID *This_00;
  ulong local_res8;
  
  This_00 = (IID *)*param_1;
  if (This_00 != (IID *)0x0) {
    riid = (IID *)&local_res8;
    local_res8 = 0;
    UVar1 = (*(*(IUnknownVtbl **)This_00)[0xb].AddRef)((IUnknown *)This_00);
    if ((int)UVar1 < 0) {
      param_3 = (void **)&DAT_140281f08;
      _com_issue_errorex(UVar1,(IUnknown *)This_00,(_GUID *)&DAT_140281f08);
      riid = This_00;
    }
    if (local_res8 != 0) {
      This = (IUnknown *)*param_1;
      if (This == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar2 = (*This->lpVtbl[5].QueryInterface)(This,riid,param_3);
      if (HVar2 < 0) {
        _com_issue_errorex(HVar2,This,(_GUID *)&DAT_140281f08);
      }
    }
  }
  return;
}



longlong * FUN_140001f20(longlong *param_1,longlong *param_2)

{
  param_1 = (longlong *)*param_1;
  *param_2 = (longlong)param_1;
  if (param_1 != (longlong *)0x0) {
    (**(code **)(*param_1 + 8))();
  }
  return param_2;
}



void FUN_140001f50(longlong *param_1)

{
  if ((longlong *)*param_1 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*param_1 + 0x10))();
  }
  return;
}



HRESULT FUN_140001f70(void **param_1)

{
  HRESULT HVar1;
  LPUNKNOWN local_res8;
  
  if (*param_1 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*param_1 + 0x10))();
  }
  HVar1 = CoCreateInstance((IID *)&DAT_140281f38,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_res8);
  if (-1 < HVar1) {
    HVar1 = OleRun(local_res8);
    if (-1 < HVar1) {
      HVar1 = (*local_res8->lpVtbl->QueryInterface)(local_res8,(IID *)&DAT_140281f18,param_1);
    }
    (*local_res8->lpVtbl->Release)(local_res8);
    if (-1 < HVar1) {
      return HVar1;
    }
  }
  *param_1 = (void *)0x0;
  return HVar1;
}



void * FUN_140002000(IUnknown *param_1,void *param_2)

{
  ULONG UVar1;
  undefined1 local_28 [32];
  
  Ordinal_8(local_28);
  UVar1 = (*param_1->lpVtbl[4].AddRef)(param_1);
  if ((int)UVar1 < 0) {
    _com_issue_errorex(UVar1,param_1,(_GUID *)&DAT_140281f48);
  }
  memcpy_s(param_2,0x18,local_28,0x18);
  return param_2;
}



undefined8 * FUN_140002070(IUnknown *param_1,undefined8 *param_2)

{
  ULONG UVar1;
  
  UVar1 = (*param_1->lpVtbl[3].AddRef)(param_1);
  if ((int)UVar1 < 0) {
    _com_issue_errorex(UVar1,param_1,(_GUID *)&DAT_140281f58);
    *param_2 = 0;
    return param_2;
  }
  *param_2 = 0;
  return param_2;
}



undefined8 * FUN_140002100(IUnknown *param_1,undefined8 *param_2,void **param_3)

{
  HRESULT HVar1;
  undefined8 local_res8;
  
  local_res8._0_4_ = 0;
  local_res8._4_2_ = 0;
  local_res8._6_2_ = 0;
  HVar1 = (*param_1->lpVtbl[7].QueryInterface)(param_1,(IID *)&local_res8,param_3);
  if (HVar1 < 0) {
    _com_issue_errorex(HVar1,param_1,(_GUID *)&DAT_140281f28);
    *param_2 = local_res8;
    return param_2;
  }
  *param_2 = local_res8;
  return param_2;
}



longlong * FUN_140002170(longlong *param_1)

{
  longlong *plVar1;
  
  *param_1 = 0;
  param_1[1] = 0;
  Ordinal_8(param_1 + 4);
  Ordinal_8(param_1 + 7);
  plVar1 = (longlong *)*param_1;
  if (plVar1 != (longlong *)0x0) {
    *param_1 = 0;
    (**(code **)(*plVar1 + 0x10))();
  }
  param_1[0xe] = (longlong)&DAT_140281f00;
  param_1[0xb] = (longlong)&DAT_140281f00;
  *(undefined4 *)(param_1 + 0xc) = 0;
  param_1[0xd] = 0;
  FUN_1400024d0(param_1);
  *(undefined4 *)(param_1 + 10) = 2;
  *(undefined4 *)(param_1 + 2) = 1;
  return param_1;
}



void FUN_140002200(longlong *param_1)

{
  FUN_140002440();
  if ((longlong *)*param_1 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*param_1 + 0x10))();
    *param_1 = 0;
  }
  param_1[0xd] = 0;
  param_1[0xe] = (longlong)&DAT_140281f00;
  param_1[0xb] = (longlong)&DAT_140281f00;
  *(undefined4 *)(param_1 + 0xc) = 0;
  *(undefined4 *)(param_1 + 10) = 0;
  Ordinal_9(param_1 + 7);
  Ordinal_9(param_1 + 4);
  if ((longlong *)param_1[1] != (longlong *)0x0) {
    (**(code **)(*(longlong *)param_1[1] + 0x10))();
  }
  if ((longlong *)*param_1 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*param_1 + 0x10))();
  }
  return;
}



undefined8 FUN_140002290(longlong *param_1,undefined8 param_2,undefined8 param_3,byte *param_4)

{
  int iVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined4 local_98;
  undefined4 uStack_94;
  undefined1 local_90 [24];
  longlong *local_78;
  undefined1 local_70 [24];
  undefined2 local_58 [4];
  undefined8 local_50;
  undefined8 local_40;
  undefined1 local_38 [32];
  
  local_40 = 0xfffffffffffffffe;
  local_98 = 0;
  Ordinal_8(local_90);
  local_58[0] = 8;
  local_50 = FUN_140201490(param_3);
  if (*param_1 == 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  plVar2 = (longlong *)FUN_140002100(*param_1,&local_78);
  if (*plVar2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  plVar2 = (longlong *)FUN_140002070(*plVar2,&local_98,local_58);
  if (*plVar2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  uVar3 = FUN_140002000(*plVar2,local_38);
  Ordinal_8(local_70);
  iVar1 = Ordinal_10(local_70,uVar3);
  if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar1);
  }
  iVar1 = Ordinal_10(local_90,local_70);
  if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar1);
  }
  Ordinal_9(local_70);
  Ordinal_9(local_38);
  if ((longlong *)CONCAT44(uStack_94,local_98) != (longlong *)0x0) {
    (**(code **)(*(longlong *)CONCAT44(uStack_94,local_98) + 0x10))();
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  Ordinal_9(local_58);
  *param_4 = *param_4 & 1;
  Ordinal_8(param_2);
  iVar1 = Ordinal_10(param_2,local_90);
  if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar1);
  }
  Ordinal_9(local_90);
  return param_2;
}



// WARNING: Removing unreachable block (ram,0x00014000248f)
// WARNING: Removing unreachable block (ram,0x000140002497)
// WARNING: Removing unreachable block (ram,0x0001400024a2)
// WARNING: Removing unreachable block (ram,0x0001400024b2)

void FUN_140002440(undefined8 *param_1)

{
  IUnknown *This;
  ULONG UVar1;
  
  This = (IUnknown *)*param_1;
  if ((This != (IUnknown *)0x0) && (UVar1 = (*This->lpVtbl[0x12].AddRef)(This), (int)UVar1 < 0)) {
    _com_issue_errorex(UVar1,This,(_GUID *)&DAT_140281f28);
  }
  return;
}



HRESULT FUN_1400024d0(void **param_1)

{
  HRESULT HVar1;
  LPUNKNOWN local_res8;
  
  if (*param_1 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*param_1 + 0x10))();
  }
  HVar1 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_res8);
  if (-1 < HVar1) {
    HVar1 = OleRun(local_res8);
    if (-1 < HVar1) {
      HVar1 = (*local_res8->lpVtbl->QueryInterface)(local_res8,(IID *)&DAT_140281f68,param_1);
    }
    (*local_res8->lpVtbl->Release)(local_res8);
    if (-1 < HVar1) {
      return HVar1;
    }
  }
  *param_1 = (void *)0x0;
  return HVar1;
}



undefined8 * FUN_140002560(undefined8 *param_1)

{
  undefined8 *puVar1;
  
  *param_1 = CmdQueue::vftable;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[5] = 0;
  *(undefined4 *)(param_1 + 6) = 0;
  InitializeCriticalSection((LPCRITICAL_SECTION)(param_1 + 7));
  puVar1 = operator_new(0x58);
  if (puVar1 != (undefined8 *)0x0) {
    *puVar1 = 0;
    puVar1[1] = 0;
    puVar1[2] = 0;
    *(undefined4 *)(puVar1 + 3) = 0;
    InitializeCriticalSection((LPCRITICAL_SECTION)(puVar1 + 4));
    param_1[3] = puVar1;
    return param_1;
  }
  param_1[3] = 0;
  return param_1;
}



void * FUN_140002600(void *param_1,uint param_2)

{
  FUN_140002630();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140002630(undefined8 *param_1)

{
  int iVar1;
  undefined2 local_res8 [4];
  
  *param_1 = CmdQueue::vftable;
  if (param_1[1] != 0) {
    local_res8[0] = 0;
    EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 7));
    iVar1 = FUN_1400a1430(param_1[3],local_res8);
    if (iVar1 != 0) {
      ReleaseSemaphore((HANDLE)param_1[2],1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 7));
    WaitForSingleObject((HANDLE)param_1[1],0xffffffff);
    CloseHandle((HANDLE)param_1[1]);
    printf("command thread end!\n");
  }
  if ((HANDLE)param_1[2] != (HANDLE)0x0) {
    CloseHandle((HANDLE)param_1[2]);
  }
  if (param_1[3] != 0) {
    FUN_1400026f0();
    param_1[3] = 0;
  }
                    // WARNING: Could not recover jumptable at 0x0001400026e7. Too many branches
                    // WARNING: Treating indirect jump as call
  DeleteCriticalSection((LPCRITICAL_SECTION)(param_1 + 7));
  return;
}



undefined8 * FUN_1400026f0(undefined8 *param_1)

{
  EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 4));
  if ((void *)*param_1 != (void *)0x0) {
    operator_delete__((void *)*param_1);
    *param_1 = 0;
  }
  LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 4));
  DeleteCriticalSection((LPCRITICAL_SECTION)(param_1 + 4));
  operator_delete(param_1);
  return param_1;
}



void FUN_140002750(void)

{
  FUN_140002780();
  return;
}



undefined8 FUN_140002780(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  while( true ) {
    if ((int)param_1[6] != 1) {
      return 0;
    }
    WaitForSingleObject((HANDLE)param_1[2],0xffffffff);
    EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 7));
    iVar1 = FUN_1400a15d0(param_1[3],param_1 + 0xc,param_3,param_4,uVar2);
    LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 7));
    if (iVar1 != 1) break;
    (**(code **)(*param_1 + 8))(param_1);
  }
  return 0;
}



basic_ostream<> * FUN_140002810(basic_ostream<> *param_1,char *param_2)

{
  longlong lVar1;
  char cVar2;
  bool bVar3;
  int iVar4;
  __int64 _Var5;
  ulonglong uVar6;
  int iVar7;
  char *pcVar8;
  longlong lVar9;
  
  iVar7 = 0;
  uVar6 = 0xffffffffffffffff;
  pcVar8 = param_2;
  do {
    if (uVar6 == 0) break;
    uVar6 = uVar6 - 1;
    cVar2 = *pcVar8;
    pcVar8 = pcVar8 + 1;
  } while (cVar2 != '\0');
  lVar1 = ~uVar6 - 1;
  lVar9 = *(longlong *)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x28);
  if ((lVar9 < 1) || (lVar9 <= lVar1)) {
    lVar9 = 0;
  }
  else {
    lVar9 = lVar9 - lVar1;
  }
  if (*(longlong **)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48) !=
      (longlong *)0x0) {
    (**(code **)(**(longlong **)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48) + 8)
    )();
  }
  if ((*(int *)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x10) == 0) &&
     (*(basic_ostream<> **)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x50) !=
      (basic_ostream<> *)0x0)) {
    std::basic_ostream<>::flush
              (*(basic_ostream<> **)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x50))
    ;
  }
  if (*(int *)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x10) != 0) {
    iVar7 = 4;
    goto LAB_140002985;
  }
  if ((*(uint *)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x18) & 0x1c0) == 0x40) {
LAB_140002909:
    _Var5 = std::basic_streambuf<>::sputn
                      (*(basic_streambuf<> **)
                        (param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48),param_2,
                       lVar1);
    if (_Var5 == lVar1) {
      for (; 0 < lVar9; lVar9 = lVar9 + -1) {
        iVar4 = std::basic_streambuf<>::sputc
                          (*(basic_streambuf<> **)
                            (param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48),
                           (char)param_1[(longlong)*(int *)(*(longlong *)param_1 + 4) + 0x58]);
        if (iVar4 == -1) goto LAB_14000295b;
      }
    }
    else {
LAB_14000295b:
      iVar7 = 4;
    }
  }
  else {
    for (; 0 < lVar9; lVar9 = lVar9 + -1) {
      iVar4 = std::basic_streambuf<>::sputc
                        (*(basic_streambuf<> **)
                          (param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48),
                         (char)param_1[(longlong)*(int *)(*(longlong *)param_1 + 4) + 0x58]);
      if (iVar4 == -1) {
        iVar7 = 4;
        break;
      }
    }
    if (iVar7 == 0) goto LAB_140002909;
  }
  *(undefined8 *)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x28) = 0;
LAB_140002985:
  std::basic_ios<>::setstate
            ((basic_ios<> *)(param_1 + *(int *)(*(longlong *)param_1 + 4)),iVar7,false);
  bVar3 = std::uncaught_exception();
  if (!bVar3) {
    std::basic_ostream<>::_Osfx(param_1);
  }
  if (*(longlong **)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48) !=
      (longlong *)0x0) {
    (**(code **)(**(longlong **)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48) +
                0x10))();
  }
  return param_1;
}



basic_ostream<> * FUN_1400029e0(basic_ostream<> *param_1)

{
  bool bVar1;
  int iVar2;
  longlong lVar3;
  int iVar4;
  longlong lVar5;
  int iVar6;
  
  iVar4 = 0;
  if (*(longlong **)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48) !=
      (longlong *)0x0) {
    (**(code **)(**(longlong **)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48) + 8)
    )();
  }
  if ((*(int *)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x10) == 0) &&
     (*(basic_ostream<> **)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x50) !=
      (basic_ostream<> *)0x0)) {
    std::basic_ostream<>::flush
              (*(basic_ostream<> **)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x50))
    ;
  }
  lVar3 = (longlong)*(int *)(*(longlong *)param_1 + 4);
  if (*(int *)(param_1 + lVar3 + 0x10) == 0) {
    if (*(longlong *)(param_1 + lVar3 + 0x28) < 2) {
      lVar5 = 0;
    }
    else {
      lVar5 = *(longlong *)(param_1 + lVar3 + 0x28) + -1;
    }
    iVar6 = 4;
    if ((*(uint *)(param_1 + lVar3 + 0x18) & 0x1c0) == 0x40) {
LAB_140002ac0:
      iVar2 = std::basic_streambuf<>::sputc
                        (*(basic_streambuf<> **)
                          (param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48),'\n');
      if (iVar2 == -1) {
        iVar4 = iVar6;
      }
      for (; (iVar4 == 0 && (0 < lVar5)); lVar5 = lVar5 + -1) {
        iVar2 = std::basic_streambuf<>::sputc
                          (*(basic_streambuf<> **)
                            (param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48),
                           (char)param_1[(longlong)*(int *)(*(longlong *)param_1 + 4) + 0x58]);
        if (iVar2 == -1) {
          iVar4 = iVar6;
        }
      }
    }
    else {
      while (iVar4 == 0) {
        if (lVar5 < 1) goto LAB_140002ac0;
        iVar2 = std::basic_streambuf<>::sputc
                          (*(basic_streambuf<> **)
                            (param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48),
                           (char)param_1[(longlong)*(int *)(*(longlong *)param_1 + 4) + 0x58]);
        if (iVar2 == -1) {
          iVar4 = iVar6;
        }
        lVar5 = lVar5 + -1;
      }
    }
  }
  *(undefined8 *)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x28) = 0;
  std::basic_ios<>::setstate
            ((basic_ios<> *)(param_1 + *(int *)(*(longlong *)param_1 + 4)),iVar4,false);
  bVar1 = std::uncaught_exception();
  if (!bVar1) {
    std::basic_ostream<>::_Osfx(param_1);
  }
  if (*(longlong **)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48) !=
      (longlong *)0x0) {
    (**(code **)(**(longlong **)(param_1 + (longlong)*(int *)(*(longlong *)param_1 + 4) + 0x48) +
                0x10))();
  }
  return param_1;
}



void FUN_140002b90(longlong *param_1)

{
  longlong *plVar1;
  bool bVar2;
  
  bVar2 = std::uncaught_exception();
  if (!bVar2) {
    std::basic_ostream<>::_Osfx((basic_ostream<> *)*param_1);
  }
  plVar1 = *(longlong **)((longlong)*(int *)(*(longlong *)*param_1 + 4) + 0x48 + *param_1);
  if (plVar1 != (longlong *)0x0) {
    (**(code **)(*plVar1 + 0x10))();
  }
  return;
}



void FUN_140002be0(longlong *param_1)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)((longlong)*(int *)(*(longlong *)*param_1 + 4) + 0x48 + *param_1);
  if (plVar1 != (longlong *)0x0) {
    (**(code **)(*plVar1 + 0x10))();
  }
  return;
}



undefined8 * FUN_140002c10(undefined8 *param_1,byte param_2)

{
  *param_1 = CConfig::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined1
FUN_140002c40(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2af9);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"ERROR_NOTIFY",0x2af9);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140002d30(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2af9);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"ERROR_NOTIFY",0x2af9);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140002e30(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined1 *param_6,undefined4 *param_7,undefined1 *param_8,
             undefined4 *param_9,undefined4 *param_10,undefined4 *param_11,undefined4 *param_12,
             undefined8 param_13)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2afa);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_14004fd90(local_30,*param_6);
  FUN_14004fe70(local_30,*param_7);
  FUN_14004fd90(local_30,*param_8);
  FUN_14004fe70(local_30,*param_9);
  FUN_14004fe70(local_30,*param_10);
  FUN_14004fe70(local_30,*param_11);
  FUN_14004fe70(local_30,*param_12);
  FUN_140155ee0(local_30,param_13);
  uVar1 = (**(code **)(*param_1 + 0x18))(param_1,local_res10,1,param_3,local_30,L"RESP_AUTH",0x2afa)
  ;
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140002fc0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined1 *param_7,undefined4 *param_8,
             undefined1 *param_9,undefined4 *param_10,undefined4 *param_11,undefined4 *param_12,
             undefined4 *param_13,undefined8 param_14)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2afa);
  FUN_14004fe70(local_30,*param_5);
  FUN_140157600(local_30,param_6);
  FUN_14004fd90(local_30,*param_7);
  FUN_14004fe70(local_30,*param_8);
  FUN_14004fd90(local_30,*param_9);
  FUN_14004fe70(local_30,*param_10);
  FUN_14004fe70(local_30,*param_11);
  FUN_14004fe70(local_30,*param_12);
  FUN_14004fe70(local_30,*param_13);
  FUN_140155ee0(local_30,param_14);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_AUTH",0x2afa);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140003160(longlong *param_1,undefined4 param_2,undefined8 param_3,longlong *param_4)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined4 local_res10 [2];
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2afb);
  FUN_14004fe70(local_40,(param_4[1] - *param_4) / 0xc);
  puVar2 = (undefined4 *)*param_4;
  if (puVar2 != (undefined4 *)param_4[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      FUN_14004fe70(local_40,puVar2[1]);
      FUN_14004fe70(local_40,puVar2[2]);
      puVar2 = puVar2 + 3;
    } while (puVar2 != (undefined4 *)param_4[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_40,L"RESP_READ_ITEM_DROPGROUP",0x2afb);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140003290(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2afb);
  FUN_14004fe70(local_40,(param_5[1] - *param_5) / 0xc);
  puVar2 = (undefined4 *)*param_5;
  if (puVar2 != (undefined4 *)param_5[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      FUN_14004fe70(local_40,puVar2[1]);
      FUN_14004fe70(local_40,puVar2[2]);
      puVar2 = puVar2 + 3;
    } while (puVar2 != (undefined4 *)param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_ITEM_DROPGROUP",0x2afb);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1400033d0(longlong *param_1,undefined4 param_2,undefined8 param_3,longlong *param_4)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2afc);
  FUN_14004fe70(local_40,(param_4[1] - *param_4) / 0x14);
  lVar2 = *param_4;
  if (lVar2 != param_4[1]) {
    do {
      FUN_140157600(local_40,lVar2);
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x10));
      lVar2 = lVar2 + 0x14;
    } while (lVar2 != param_4[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_40,L"RESP_READ_GUILD",0x2afc);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1400034f0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2afc);
  FUN_14004fe70(local_40,(param_5[1] - *param_5) / 0x14);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140157600(local_40,lVar2);
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x10));
      lVar2 = lVar2 + 0x14;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_GUILD",0x2afc);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140003630(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2afd);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  FUN_14012fd10(local_30,param_6);
  FUN_140157600(local_30,param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_CHARACTER_CREATE",0x2afd);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140003740(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,undefined8 param_7,undefined8 param_8)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2afd);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_14012fd10(local_30,param_7);
  FUN_140157600(local_30,param_8);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_CHARACTER_CREATE",0x2afd);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140003860(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2afe);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_CHARACTER_DELETE",0x2afe);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140003960(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2afe);
  FUN_14004fe70(local_30,*param_5);
  FUN_140157600(local_30,param_6);
  FUN_14004fe70(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_CHARACTER_DELETE",0x2afe);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140003a70(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2aff);
  FUN_14004fe70(local_30,*param_4);
  FUN_14012fd10(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_CHARACTER_GET",0x2aff);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140003b60(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2aff);
  FUN_14004fe70(local_30,*param_5);
  FUN_14012fd10(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_CHARACTER_GET",0x2aff);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140003c50(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b00);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_MONEY",0x2b00);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140003d40(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b00);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_READ_MONEY",0x2b00);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140003e40(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b01);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,(param_5[1] - *param_5) / 0xc0);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140132040(local_30,lVar2);
      lVar2 = lVar2 + 0xc0;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))(param_1,local_res10,1,param_3,local_30,L"RESP_ITEM",0x2b01)
  ;
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140003f80(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b01);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,(param_6[1] - *param_6) / 0xc0);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140132040(local_40,lVar2);
      lVar2 = lVar2 + 0xc0;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_ITEM",0x2b01);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1400040c0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b02);
  FUN_14004fe70(local_30,*param_4);
  FUN_140046050(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_SKILL",0x2b02);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1400041b0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b02);
  FUN_14004fe70(local_30,*param_5);
  FUN_140046050(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_SKILL",0x2b02);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1400042a0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 *puVar3;
  undefined4 local_res10 [2];
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b03);
  FUN_14004fe70(local_40,*param_4);
  puVar3 = param_5 + 0x20;
  lVar2 = 0x20;
  do {
    FUN_14004fe70(local_40,*param_5);
    FUN_140157600(local_40,puVar3);
    puVar3 = puVar3 + 4;
    param_5 = param_5 + 1;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  FUN_14004fe70(local_40,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_40,L"RESP_READ_QUICKSLOT",0x2b03);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1400043d0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 *puVar3;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b03);
  FUN_14004fe70(local_40,*param_5);
  puVar3 = param_6 + 0x20;
  lVar2 = 0x20;
  do {
    FUN_14004fe70(local_40,*param_6);
    FUN_140157600(local_40,puVar3);
    puVar3 = puVar3 + 4;
    param_6 = param_6 + 1;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  FUN_14004fe70(local_40,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_QUICKSLOT",0x2b03);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140004510(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b04);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,param_5[1] - *param_5 >> 2);
  puVar2 = (undefined4 *)*param_5;
  if (puVar2 != (undefined4 *)param_5[1]) {
    do {
      FUN_14004fe70(local_30,*puVar2);
      puVar2 = puVar2 + 1;
    } while (puVar2 != (undefined4 *)param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GET_KEY_MAP",0x2b04);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140004630(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b04);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,param_6[1] - *param_6 >> 2);
  puVar2 = (undefined4 *)*param_6;
  if (puVar2 != (undefined4 *)param_6[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      puVar2 = puVar2 + 1;
    } while (puVar2 != (undefined4 *)param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_GET_KEY_MAP",0x2b04);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140004760(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5,undefined1 *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b05);
  FUN_14004fe70(local_40,*param_4);
  FUN_14004fe70(local_40,(param_5[1] - *param_5) / 0x38);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140157600(local_40,lVar2);
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x10));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x14));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x18));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x1a));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x1e));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x22));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x26));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x2a));
      FUN_14004fbc0(local_40,*(undefined8 *)(lVar2 + 0x2e));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x36));
      lVar2 = lVar2 + 0x38;
    } while (lVar2 != param_5[1]);
  }
  FUN_14004fd90(local_40,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_40,L"RESP_QUEST",0x2b05);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140004910(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6,undefined1 *param_7)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b05);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,(param_6[1] - *param_6) / 0x38);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140157600(local_40,lVar2);
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x10));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x14));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x18));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x1a));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x1e));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x22));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x26));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x2a));
      FUN_14004fbc0(local_40,*(undefined8 *)(lVar2 + 0x2e));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x36));
      lVar2 = lVar2 + 0x38;
    } while (lVar2 != param_6[1]);
  }
  FUN_14004fd90(local_40,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_QUEST",0x2b05);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140004b00(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b06);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_SKILL_RESET",0x2b06);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140004bf0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b06);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_SKILL_RESET",0x2b06);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140004cf0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b07);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,(param_5[1] - *param_5) / 0x122);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_14012fd10(local_30,lVar2);
      lVar2 = lVar2 + 0x122;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_CHARACTER_GET_LIST",0x2b07);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140004e30(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b07);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,(param_6[1] - *param_6) / 0x122);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_14012fd10(local_40,lVar2);
      lVar2 = lVar2 + 0x122;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_CHARACTER_GET_LIST",0x2b07);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140004f70(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b08);
  FUN_14004fe70(local_30,*param_4);
  FUN_140130030(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_SELECT_DUEL_INFO",0x2b08);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005060(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b08);
  FUN_14004fe70(local_30,*param_5);
  FUN_140130030(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_SELECT_DUEL_INFO",0x2b08);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005150(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b09);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  FUN_140046120(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_SELECT_BATTLE_RANK_LIST",0x2b09);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005250(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,undefined8 param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b09);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_140046120(local_30,param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_SELECT_BATTLE_RANK_LIST",0x2b09
                    );
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005360(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b0a);
  FUN_14004fe70(local_30,*param_4);
  FUN_1400461d0(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_FRIEND",0x2b0a);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005450(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b0a);
  FUN_14004fe70(local_30,*param_5);
  FUN_1400461d0(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_FRIEND",0x2b0a);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005540(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b0b);
  FUN_14004fe70(local_40,*param_4);
  lVar2 = SUB168(SEXT816(-0x608b85ead287c92f) * SEXT816(param_5[1] - *param_5),8) +
          (param_5[1] - *param_5);
  FUN_14004fe70(local_40,(lVar2 >> 9) - (lVar2 >> 0x3f));
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140157600(local_40,lVar2);
      FUN_140157600(local_40,lVar2 + 0x10);
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x31c));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 800));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x322));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x326));
      FUN_14004fbc0(local_40,*(undefined8 *)(lVar2 + 0x328));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x330));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x332));
      FUN_140155f60(local_40,lVar2 + 0x20);
      FUN_140155f60(local_40,lVar2 + 0x40);
      FUN_140155f60(local_40,lVar2 + 0x60);
      lVar2 = lVar2 + 0x336;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))(param_1,local_res10,1,param_3,local_40,L"RESP_MAIL",0x2b0b)
  ;
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005720(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b0b);
  FUN_14004fe70(local_40,*param_5);
  lVar2 = SUB168(SEXT816(-0x608b85ead287c92f) * SEXT816(param_6[1] - *param_6),8) +
          (param_6[1] - *param_6);
  FUN_14004fe70(local_40,(lVar2 >> 9) - (lVar2 >> 0x3f));
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140157600(local_40,lVar2);
      FUN_140157600(local_40,lVar2 + 0x10);
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x31c));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 800));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x322));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x326));
      FUN_14004fbc0(local_40,*(undefined8 *)(lVar2 + 0x328));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x330));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x332));
      FUN_140155f60(local_40,lVar2 + 0x20);
      FUN_140155f60(local_40,lVar2 + 0x40);
      FUN_140155f60(local_40,lVar2 + 0x60);
      lVar2 = lVar2 + 0x336;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_MAIL",0x2b0b);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005920(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b0c);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,(param_5[1] - *param_5) / 0xd0);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_1401323d0(local_30,lVar2);
      lVar2 = lVar2 + 0xd0;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_MAIL_ITEM",0x2b0c);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005a60(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b0c);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,(param_6[1] - *param_6) / 0xd0);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_1401323d0(local_40,lVar2);
      lVar2 = lVar2 + 0xd0;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_MAIL_ITEM",0x2b0c);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005ba0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b0d);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,(param_5[1] - *param_5) / 0xc);
  puVar2 = (undefined4 *)*param_5;
  if (puVar2 != (undefined4 *)param_5[1]) {
    do {
      FUN_14004fe70(local_30,*puVar2);
      FUN_140050340(local_30,*(undefined2 *)(puVar2 + 1));
      FUN_140050340(local_30,*(undefined2 *)((longlong)puVar2 + 6));
      FUN_140050340(local_30,*(undefined2 *)(puVar2 + 2));
      FUN_140050340(local_30,*(undefined2 *)((longlong)puVar2 + 10));
      puVar2 = puVar2 + 3;
    } while (puVar2 != (undefined4 *)param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_DUNGEON_RANK",0x2b0d);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005d10(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b0d);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,(param_6[1] - *param_6) / 0xc);
  puVar2 = (undefined4 *)*param_6;
  if (puVar2 != (undefined4 *)param_6[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      FUN_140050340(local_40,*(undefined2 *)(puVar2 + 1));
      FUN_140050340(local_40,*(undefined2 *)((longlong)puVar2 + 6));
      FUN_140050340(local_40,*(undefined2 *)(puVar2 + 2));
      FUN_140050340(local_40,*(undefined2 *)((longlong)puVar2 + 10));
      puVar2 = puVar2 + 3;
    } while (puVar2 != (undefined4 *)param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_DUNGEON_RANK",0x2b0d);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005e80(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b0e);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,(param_5[1] - *param_5) / 0x1c);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140157600(local_30,lVar2);
      FUN_14004fe70(local_30,*(undefined4 *)(lVar2 + 0x10));
      FUN_14004fe70(local_30,*(undefined4 *)(lVar2 + 0x14));
      FUN_14004fe70(local_30,*(undefined4 *)(lVar2 + 0x18));
      lVar2 = lVar2 + 0x1c;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_TITLE",0x2b0e);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140005fe0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b0e);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,(param_6[1] - *param_6) / 0x1c);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140157600(local_40,lVar2);
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x10));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x14));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x18));
      lVar2 = lVar2 + 0x1c;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_TITLE",0x2b0e);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140006140(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b0f);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_IS_PUSH_QUEUE",0x2b0f);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140006230(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b0f);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_IS_PUSH_QUEUE",0x2b0f);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140006330(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b10);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_140046290(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_ITEM_EQUIP_SIMPLE",0x2b10);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140006430(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b10);
  FUN_14004fe70(local_30,*param_5);
  FUN_140157600(local_30,param_6);
  FUN_140046290(local_30,param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_ITEM_EQUIP_SIMPLE",0x2b10);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140006530(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b11);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_ITEM_EQUIP_SIMPLE_END",0x2b11);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140006610(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b11);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_ITEM_EQUIP_SIMPLE_END",0x2b11);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1400066f0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,undefined4 *param_6,undefined4 *param_7,undefined4 *param_8,
             undefined8 param_9,undefined8 param_10)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b12);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_14004fe70(local_30,*param_7);
  FUN_14004fe70(local_30,*param_8);
  FUN_140155f20(local_30,param_9);
  FUN_140130130(local_30,param_10);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GUILD_CREATE",0x2b12);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140006840(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,undefined4 *param_7,undefined4 *param_8,
             undefined4 *param_9,undefined8 param_10,undefined8 param_11)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b12);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_14004fe70(local_30,*param_7);
  FUN_14004fe70(local_30,*param_8);
  FUN_14004fe70(local_30,*param_9);
  FUN_140155f20(local_30,param_10);
  FUN_140130130(local_30,param_11);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_GUILD_CREATE",0x2b12);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1400069a0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b13);
  FUN_14004fe70(local_30,*param_4);
  FUN_140130130(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_GUILD_INFO",0x2b13);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140006a90(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b13);
  FUN_14004fe70(local_30,*param_5);
  FUN_140130130(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_READ_GUILD_INFO",0x2b13);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140006b80(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined1 *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b14);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,param_4[1]);
  FUN_140157600(local_30,param_4 + 2);
  FUN_14004fd90(local_30,*param_5);
  FUN_140157600(local_30,param_6);
  FUN_140046350(local_30,param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_GUILD_MEMBER",0x2b14);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140006cb0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined1 *param_6,undefined8 param_7,undefined8 param_8)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b14);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,param_5[1]);
  FUN_140157600(local_30,param_5 + 2);
  FUN_14004fd90(local_30,*param_6);
  FUN_140157600(local_30,param_7);
  FUN_140046350(local_30,param_8);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_READ_GUILD_MEMBER",0x2b14);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140006df0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b15);
  FUN_14004fe70(local_30,*param_4);
  FUN_140050340(local_30,*(undefined2 *)(param_5 + 0x20));
  FUN_140050340(local_30,*(undefined2 *)(param_5 + 0x22));
  FUN_140050340(local_30,*(undefined2 *)(param_5 + 0x24));
  FUN_140155f60(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_OTHER_CHARACTER_INFO",0x2b15);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140006f10(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b15);
  FUN_14004fe70(local_30,*param_5);
  FUN_140050340(local_30,*(undefined2 *)(param_6 + 0x20));
  FUN_140050340(local_30,*(undefined2 *)(param_6 + 0x22));
  FUN_140050340(local_30,*(undefined2 *)(param_6 + 0x24));
  FUN_140155f60(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_OTHER_CHARACTER_INFO",0x2b15);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140007040(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b16);
  FUN_14004fe70(local_30,*param_4);
  lVar2 = SUB168(SEXT816(-0x6c657a3bf6c657a3) * SEXT816(param_5[1] - *param_5),8) +
          (param_5[1] - *param_5);
  FUN_14004fe70(local_30,(lVar2 >> 6) - (lVar2 >> 0x3f));
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140132270(local_30,lVar2);
      lVar2 = lVar2 + 0x6f;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_OTHER_CHARACTER_EQUIP_ITEM",
                     0x2b16);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140007180(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b16);
  FUN_14004fe70(local_40,*param_5);
  lVar2 = SUB168(SEXT816(-0x6c657a3bf6c657a3) * SEXT816(param_6[1] - *param_6),8) +
          (param_6[1] - *param_6);
  FUN_14004fe70(local_40,(lVar2 >> 6) - (lVar2 >> 0x3f));
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140132270(local_40,lVar2);
      lVar2 = lVar2 + 0x6f;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_OTHER_CHARACTER_EQUIP_ITEM",
                     0x2b16);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1400072d0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b17);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,param_5[1] - *param_5 >> 5);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140157600(local_30,lVar2);
      FUN_140050340(local_30,*(undefined2 *)(lVar2 + 0x10));
      FUN_140050340(local_30,*(undefined2 *)(lVar2 + 0x12));
      FUN_14004fe70(local_30,*(undefined4 *)(lVar2 + 0x14));
      FUN_140050340(local_30,*(undefined2 *)(lVar2 + 0x18));
      FUN_14004fe70(local_30,*(undefined4 *)(lVar2 + 0x1a));
      FUN_140050340(local_30,*(undefined2 *)(lVar2 + 0x1e));
      lVar2 = lVar2 + 0x20;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_ITEM_LIGHT",0x2b17);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140007440(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b17);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,param_6[1] - *param_6 >> 5);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140157600(local_40,lVar2);
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x10));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x12));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x14));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x18));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x1a));
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x1e));
      lVar2 = lVar2 + 0x20;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_ITEM_LIGHT",0x2b17);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1400075c0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b18);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,param_5[1] - *param_5 >> 5);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140157600(local_30,lVar2);
      FUN_14004fe70(local_30,*(undefined4 *)(lVar2 + 0x10));
      FUN_14004fe70(local_30,*(undefined4 *)(lVar2 + 0x14));
      FUN_14004fbc0(local_30,*(undefined8 *)(lVar2 + 0x18));
      lVar2 = lVar2 + 0x20;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_QUEST_FINISH",0x2b18);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140007710(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b18);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,param_6[1] - *param_6 >> 5);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140157600(local_40,lVar2);
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x10));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x14));
      FUN_14004fbc0(local_40,*(undefined8 *)(lVar2 + 0x18));
      lVar2 = lVar2 + 0x20;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_QUEST_FINISH",0x2b18);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140007860(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined2 *param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b19);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_140050340(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_CHARACTER_CREATE_STEP01",0x2b19);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140007960(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined2 *param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b19);
  FUN_14004fe70(local_30,*param_5);
  FUN_140157600(local_30,param_6);
  FUN_140050340(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_CHARACTER_CREATE_STEP01",0x2b19
                    );
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140007a70(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b1a);
  FUN_140050340(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_DBC_THREAD_COUNT",0x2b1a);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140007b50(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined2 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b1a);
  FUN_140050340(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_DBC_THREAD_COUNT",0x2b1a);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140007c30(longlong *param_1,undefined4 param_2,undefined8 param_3,longlong *param_4)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b1b);
  FUN_14004fe70(local_40,(param_4[1] - *param_4) / 0x182);
  lVar2 = *param_4;
  if (lVar2 != param_4[1]) {
    do {
      FUN_140132d30(local_40,lVar2);
      lVar2 = lVar2 + 0x182;
    } while (lVar2 != param_4[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_40,L"RESP_READ_AUCTIONLIST",0x2b1b);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140007d50(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b1b);
  FUN_14004fe70(local_40,(param_5[1] - *param_5) / 0x182);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140132d30(local_40,lVar2);
      lVar2 = lVar2 + 0x182;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_AUCTIONLIST",0x2b1b);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140007e80(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b1c);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,(param_5[1] - *param_5) / 0xaf);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_14013b110(local_30,lVar2);
      lVar2 = lVar2 + 0xaf;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_PETLIST",0x2b1c);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140007fc0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b1c);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,(param_6[1] - *param_6) / 0xaf);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_14013b110(local_40,lVar2);
      lVar2 = lVar2 + 0xaf;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_PETLIST",0x2b1c);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140008100(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b1d);
  FUN_140157600(local_30,param_4);
  lVar2 = SUB168(SEXT816(-0x4de9bd37a6f4de9b) * SEXT816(param_5[1] - *param_5),8) +
          (param_5[1] - *param_5);
  FUN_14004fe70(local_30,(lVar2 >> 6) - (lVar2 >> 0x3f));
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140157600(local_30,lVar2);
      FUN_14004fe70(local_30,*(undefined4 *)(lVar2 + 0x10));
      FUN_140155f60(local_30,lVar2 + 0x14);
      FUN_140155f60(local_30,lVar2 + 0x3c);
      lVar2 = lVar2 + 0x5c;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GLUILD_INCREASE_EXP_LOG",0x2b1d);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140008270(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b1d);
  FUN_140157600(local_40,param_5);
  lVar2 = SUB168(SEXT816(-0x4de9bd37a6f4de9b) * SEXT816(param_6[1] - *param_6),8) +
          (param_6[1] - *param_6);
  FUN_14004fe70(local_40,(lVar2 >> 6) - (lVar2 >> 0x3f));
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140157600(local_40,lVar2);
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x10));
      FUN_140155f60(local_40,lVar2 + 0x14);
      FUN_140155f60(local_40,lVar2 + 0x3c);
      lVar2 = lVar2 + 0x5c;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_GLUILD_INCREASE_EXP_LOG",0x2b1d
                    );
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1400083d0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 *param_6,undefined4 *param_7,undefined1 *param_8)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b1e);
  FUN_140157600(local_30,param_4);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fcb0(local_30,*param_6);
  FUN_14004fe70(local_30,*param_7);
  FUN_14004fd90(local_30,*param_8);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GUILD_STORAGE_INFO",0x2b1e);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140008500(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5,undefined4 *param_6,undefined8 *param_7,undefined4 *param_8,
             undefined1 *param_9)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b1e);
  FUN_140157600(local_30,param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_14004fcb0(local_30,*param_7);
  FUN_14004fe70(local_30,*param_8);
  FUN_14004fd90(local_30,*param_9);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_GUILD_STORAGE_INFO",0x2b1e);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140008630(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  undefined1 *puVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b1f);
  FUN_140157600(local_30,param_4);
  FUN_14004fe70(local_30,(param_5[1] - *param_5) / 0x85);
  puVar2 = (undefined1 *)*param_5;
  if (puVar2 != (undefined1 *)param_5[1]) {
    do {
      FUN_14004fd90(local_30,*puVar2);
      FUN_140155f60(local_30,puVar2 + 1);
      FUN_140155f60(local_30,puVar2 + 0x29);
      FUN_140155f60(local_30,puVar2 + 0x49);
      puVar2 = puVar2 + 0x85;
    } while (puVar2 != (undefined1 *)param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GUILD_USE_LOG",0x2b1f);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1400087a0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5,longlong *param_6)

{
  undefined1 uVar1;
  undefined1 *puVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b1f);
  FUN_140157600(local_40,param_5);
  FUN_14004fe70(local_40,(param_6[1] - *param_6) / 0x85);
  puVar2 = (undefined1 *)*param_6;
  if (puVar2 != (undefined1 *)param_6[1]) {
    do {
      FUN_14004fd90(local_40,*puVar2);
      FUN_140155f60(local_40,puVar2 + 1);
      FUN_140155f60(local_40,puVar2 + 0x29);
      FUN_140155f60(local_40,puVar2 + 0x49);
      puVar2 = puVar2 + 0x85;
    } while (puVar2 != (undefined1 *)param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_GUILD_USE_LOG",0x2b1f);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140008910(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b20);
  FUN_140157600(local_30,param_4);
  FUN_14004fe70(local_30,(param_5[1] - *param_5) / 0xc0);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140132040(local_30,lVar2);
      lVar2 = lVar2 + 0xc0;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GUILD_STORAGE_ITEM_LIST",0x2b20);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140008a50(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b20);
  FUN_140157600(local_40,param_5);
  FUN_14004fe70(local_40,(param_6[1] - *param_6) / 0xc0);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140132040(local_40,lVar2);
      lVar2 = lVar2 + 0xc0;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_GUILD_STORAGE_ITEM_LIST",0x2b20
                    );
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140008b90(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b21);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_14004fe70(local_30,(param_6[1] - *param_6) / 0x18);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140157600(local_30,lVar2);
      FUN_14004fe70(local_30,*(undefined4 *)(lVar2 + 0x10));
      FUN_14004fe70(local_30,*(undefined4 *)(lVar2 + 0x14));
      lVar2 = lVar2 + 0x18;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_CASH_EFFECTINFO",0x2b21);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140008d00(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b21);
  FUN_14004fe70(local_40,*param_5);
  FUN_140157600(local_40,param_6);
  FUN_14004fe70(local_40,(param_7[1] - *param_7) / 0x18);
  lVar2 = *param_7;
  if (lVar2 != param_7[1]) {
    do {
      FUN_140157600(local_40,lVar2);
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x10));
      FUN_14004fe70(local_40,*(undefined4 *)(lVar2 + 0x14));
      lVar2 = lVar2 + 0x18;
    } while (lVar2 != param_7[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_CASH_EFFECTINFO",0x2b21);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140008e70(longlong *param_1,undefined4 param_2,undefined8 param_3,longlong *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 *puVar3;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b22);
  FUN_14004fe70(local_30,param_4[1] - *param_4 >> 3);
  lVar2 = *param_4;
  if (lVar2 != param_4[1]) {
    do {
      FUN_140155f20(local_30,lVar2);
      lVar2 = lVar2 + 8;
    } while (lVar2 != param_4[1]);
  }
  FUN_14004fe70(local_30,param_5[1] - *param_5 >> 2);
  puVar3 = (undefined4 *)*param_5;
  if (puVar3 != (undefined4 *)param_5[1]) {
    do {
      FUN_14004fe70(local_30,*puVar3);
      puVar3 = puVar3 + 1;
    } while (puVar3 != (undefined4 *)param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_AUTH_BLACKLISTIP",0x2b22);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140008fc0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             longlong *param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 *puVar3;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b22);
  FUN_14004fe70(local_40,param_5[1] - *param_5 >> 3);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140155f20(local_40,lVar2);
      lVar2 = lVar2 + 8;
    } while (lVar2 != param_5[1]);
  }
  FUN_14004fe70(local_40,param_6[1] - *param_6 >> 2);
  puVar3 = (undefined4 *)*param_6;
  if (puVar3 != (undefined4 *)param_6[1]) {
    do {
      FUN_14004fe70(local_40,*puVar3);
      puVar3 = puVar3 + 1;
    } while (puVar3 != (undefined4 *)param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_AUTH_BLACKLISTIP",0x2b22);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140009120(longlong *param_1,undefined4 param_2,undefined8 param_3,longlong *param_4)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b23);
  FUN_14004fe70(local_40,(param_4[1] - *param_4) / 0x62);
  lVar2 = *param_4;
  if (lVar2 != param_4[1]) {
    do {
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x40));
      FUN_140155f60(local_40,lVar2);
      FUN_140155f60(local_40,lVar2 + 0x42);
      lVar2 = lVar2 + 0x62;
    } while (lVar2 != param_4[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_40,L"RESP_READ_AUTH_PCROOMIP",0x2b23);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140009250(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b23);
  FUN_14004fe70(local_40,(param_5[1] - *param_5) / 0x62);
  lVar2 = *param_5;
  if (lVar2 != param_5[1]) {
    do {
      FUN_140050340(local_40,*(undefined2 *)(lVar2 + 0x40));
      FUN_140155f60(local_40,lVar2);
      FUN_140155f60(local_40,lVar2 + 0x42);
      lVar2 = lVar2 + 0x62;
    } while (lVar2 != param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_AUTH_PCROOMIP",0x2b23);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140009390(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b24);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_NEW_MAIL_EXIST",0x2b24);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140009470(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b24);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_NEW_MAIL_EXIST",0x2b24);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140009550(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8,
             undefined4 *param_9)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b25);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  FUN_140157600(local_30,param_6);
  FUN_140155f20(local_30,param_7);
  FUN_14004fe70(local_30,*param_8);
  FUN_14004fe70(local_30,*param_9);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_ADD_FRIEND",0x2b25);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140009690(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,undefined8 param_7,undefined8 param_8,
             undefined4 *param_9,undefined4 *param_10)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b25);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_140157600(local_30,param_7);
  FUN_140155f20(local_30,param_8);
  FUN_14004fe70(local_30,*param_9);
  FUN_14004fe70(local_30,*param_10);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_ADD_FRIEND",0x2b25);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1400097d0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8,
             undefined4 *param_9,undefined8 param_10)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b26);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  FUN_140157600(local_30,param_6);
  FUN_140155f20(local_30,param_7);
  FUN_14004fe70(local_30,*param_8);
  FUN_14004fe70(local_30,*param_9);
  FUN_140155f20(local_30,param_10);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_ADD_BAN",0x2b26);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140009920(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,undefined8 param_7,undefined8 param_8,
             undefined4 *param_9,undefined4 *param_10,undefined8 param_11)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b26);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_140157600(local_30,param_7);
  FUN_140155f20(local_30,param_8);
  FUN_14004fe70(local_30,*param_9);
  FUN_14004fe70(local_30,*param_10);
  FUN_140155f20(local_30,param_11);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_ADD_BAN",0x2b26);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140009a80(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b27);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_14004fe70(local_30,(param_6[1] - *param_6) / 0xa4);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140130d20(local_30,lVar2);
      lVar2 = lVar2 + 0xa4;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_REARING_INFO",0x2b27);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140009bd0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b27);
  FUN_14004fe70(local_40,*param_5);
  FUN_140157600(local_40,param_6);
  FUN_14004fe70(local_40,(param_7[1] - *param_7) / 0xa4);
  lVar2 = *param_7;
  if (lVar2 != param_7[1]) {
    do {
      FUN_140130d20(local_40,lVar2);
      lVar2 = lVar2 + 0xa4;
    } while (lVar2 != param_7[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_REARING_INFO",0x2b27);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140009d30(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b28);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_140046410(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_CASH_PRODUCT_LIST",0x2b28);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140009e30(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b28);
  FUN_14004fe70(local_30,*param_5);
  FUN_140157600(local_30,param_6);
  FUN_140046410(local_30,param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_READ_CASH_PRODUCT_LIST",0x2b28)
  ;
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140009f30(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined1 *param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b29);
  FUN_14004fe70(local_30,*param_4);
  FUN_140155f20(local_30,param_5);
  FUN_14004fd90(local_30,*param_6);
  FUN_14004fe70(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_INSERT_CASH_PRODUCT",0x2b29);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000a040(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined1 *param_7,undefined4 *param_8)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b29);
  FUN_14004fe70(local_30,*param_5);
  FUN_140155f20(local_30,param_6);
  FUN_14004fd90(local_30,*param_7);
  FUN_14004fe70(local_30,*param_8);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_INSERT_CASH_PRODUCT",0x2b29);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000a160(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b2a);
  FUN_14004fe70(local_30,*param_4);
  FUN_140155f20(local_30,param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_14004fe70(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_CHARACTER_GET_SIMPLE",0x2b2a);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000a270(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined4 *param_7,undefined4 *param_8)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b2a);
  FUN_14004fe70(local_30,*param_5);
  FUN_140155f20(local_30,param_6);
  FUN_14004fe70(local_30,*param_7);
  FUN_14004fe70(local_30,*param_8);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_CHARACTER_GET_SIMPLE",0x2b2a);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000a390(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined1 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b2b);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fd90(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GM_AUTH",0x2b2b);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000a480(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined1 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b2b);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fd90(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_GM_AUTH",0x2b2b);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000a580(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b2c);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_14004fe70(local_30,(param_6[1] - *param_6) / 0xc0);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140132040(local_30,lVar2);
      lVar2 = lVar2 + 0xc0;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_PET_INVENTORY_ITEM",0x2b2c);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000a6d0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b2c);
  FUN_14004fe70(local_40,*param_5);
  FUN_140157600(local_40,param_6);
  FUN_14004fe70(local_40,(param_7[1] - *param_7) / 0xc0);
  lVar2 = *param_7;
  if (lVar2 != param_7[1]) {
    do {
      FUN_140132040(local_40,lVar2);
      lVar2 = lVar2 + 0xc0;
    } while (lVar2 != param_7[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_PET_INVENTORY_ITEM",0x2b2c
                    );
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000a830(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5,undefined1 *param_6)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b2d);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,param_5[1] - *param_5 >> 2);
  puVar2 = (undefined4 *)*param_5;
  if (puVar2 != (undefined4 *)param_5[1]) {
    do {
      FUN_14004fe70(local_30,*puVar2);
      puVar2 = puVar2 + 1;
    } while (puVar2 != (undefined4 *)param_5[1]);
  }
  FUN_14004fd90(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_FORTUNE",0x2b2d);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000a960(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6,undefined1 *param_7)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b2d);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,param_6[1] - *param_6 >> 2);
  puVar2 = (undefined4 *)*param_6;
  if (puVar2 != (undefined4 *)param_6[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      puVar2 = puVar2 + 1;
    } while (puVar2 != (undefined4 *)param_6[1]);
  }
  FUN_14004fd90(local_40,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_FORTUNE",0x2b2d);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_14000aaa0(longlong *param_1,undefined4 param_2,undefined8 param_3,longlong *param_4)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined4 local_res10 [2];
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b2e);
  FUN_14004fe70(local_40,(param_4[1] - *param_4) / 0x2b1);
  puVar2 = (undefined4 *)*param_4;
  if (puVar2 != (undefined4 *)param_4[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      FUN_140157600(local_40,puVar2 + 1);
      FUN_140157600(local_40,puVar2 + 5);
      FUN_14004fd90(local_40,*(undefined1 *)(puVar2 + 9));
      FUN_14004fd90(local_40,*(undefined1 *)((longlong)puVar2 + 0x25));
      FUN_14004fd90(local_40,*(undefined1 *)((longlong)puVar2 + 0x26));
      FUN_14004fbc0(local_40,*(undefined8 *)((longlong)puVar2 + 0x2a9));
      FUN_140155f60(local_40,(longlong)puVar2 + 0x27);
      FUN_140155f60(local_40,(longlong)puVar2 + 0x47);
      FUN_140155f60(local_40,(longlong)puVar2 + 0xab);
      puVar2 = (undefined4 *)((longlong)puVar2 + 0x2b1);
    } while (puVar2 != (undefined4 *)param_4[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_40,L"RESP_READ_INQUIRY",0x2b2e);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000ac40(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b2e);
  FUN_14004fe70(local_40,(param_5[1] - *param_5) / 0x2b1);
  puVar2 = (undefined4 *)*param_5;
  if (puVar2 != (undefined4 *)param_5[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      FUN_140157600(local_40,puVar2 + 1);
      FUN_140157600(local_40,puVar2 + 5);
      FUN_14004fd90(local_40,*(undefined1 *)(puVar2 + 9));
      FUN_14004fd90(local_40,*(undefined1 *)((longlong)puVar2 + 0x25));
      FUN_14004fd90(local_40,*(undefined1 *)((longlong)puVar2 + 0x26));
      FUN_14004fbc0(local_40,*(undefined8 *)((longlong)puVar2 + 0x2a9));
      FUN_140155f60(local_40,(longlong)puVar2 + 0x27);
      FUN_140155f60(local_40,(longlong)puVar2 + 0x47);
      FUN_140155f60(local_40,(longlong)puVar2 + 0xab);
      puVar2 = (undefined4 *)((longlong)puVar2 + 0x2b1);
    } while (puVar2 != (undefined4 *)param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_INQUIRY",0x2b2e);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000adf0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined1 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b2f);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fd90(local_30,*param_5);
  FUN_140155f20(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_INQUIRY_CHARACTER",0x2b2f);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000aef0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined1 *param_6,undefined8 param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b2f);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fd90(local_30,*param_6);
  FUN_140155f20(local_30,param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_READ_INQUIRY_CHARACTER",0x2b2f)
  ;
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000b000(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b30);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_4 + 1);
  FUN_140157600(local_30,param_4 + 5);
  FUN_14004fd90(local_30,*(undefined1 *)(param_4 + 9));
  FUN_14004fd90(local_30,*(undefined1 *)((longlong)param_4 + 0x25));
  FUN_14004fd90(local_30,*(undefined1 *)((longlong)param_4 + 0x26));
  FUN_14004fbc0(local_30,*(undefined8 *)((longlong)param_4 + 0x2a9));
  FUN_140155f60(local_30,(longlong)param_4 + 0x27);
  FUN_140155f60(local_30,(longlong)param_4 + 0x47);
  FUN_140155f60(local_30,(longlong)param_4 + 0xab);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_INSERT_INQUIRY_BY_GM",0x2b30);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000b160(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b30);
  FUN_14004fe70(local_30,*param_5);
  FUN_140157600(local_30,param_5 + 1);
  FUN_140157600(local_30,param_5 + 5);
  FUN_14004fd90(local_30,*(undefined1 *)(param_5 + 9));
  FUN_14004fd90(local_30,*(undefined1 *)((longlong)param_5 + 0x25));
  FUN_14004fd90(local_30,*(undefined1 *)((longlong)param_5 + 0x26));
  FUN_14004fbc0(local_30,*(undefined8 *)((longlong)param_5 + 0x2a9));
  FUN_140155f60(local_30,(longlong)param_5 + 0x27);
  FUN_140155f60(local_30,(longlong)param_5 + 0x47);
  FUN_140155f60(local_30,(longlong)param_5 + 0xab);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_INSERT_INQUIRY_BY_GM",0x2b30);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000b2d0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b31);
  FUN_140155f20(local_30,param_4);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_CONNECTION_TEST",0x2b31);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000b3c0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b31);
  FUN_140155f20(local_30,param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_CONNECTION_TEST",0x2b31);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_14000b4b0(longlong *param_1,undefined4 param_2,undefined8 param_3,longlong *param_4)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined4 local_res10 [2];
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b32);
  FUN_14004fe70(local_40,(param_4[1] - *param_4) / 0x108);
  puVar2 = (undefined4 *)*param_4;
  if (puVar2 != (undefined4 *)param_4[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      FUN_14004fe70(local_40,puVar2[1]);
      FUN_140155f60(local_40,puVar2 + 2);
      puVar2 = puVar2 + 0x42;
    } while (puVar2 != (undefined4 *)param_4[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_40,L"RESP_REAL_TIME_EVENT",0x2b32);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000b5e0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b32);
  FUN_14004fe70(local_40,(param_5[1] - *param_5) / 0x108);
  puVar2 = (undefined4 *)*param_5;
  if (puVar2 != (undefined4 *)param_5[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      FUN_14004fe70(local_40,puVar2[1]);
      FUN_140155f60(local_40,puVar2 + 2);
      puVar2 = puVar2 + 0x42;
    } while (puVar2 != (undefined4 *)param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_REAL_TIME_EVENT",0x2b32);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000b730(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b33);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,(param_5[1] - *param_5) / 0xc);
  puVar2 = (undefined4 *)*param_5;
  if (puVar2 != (undefined4 *)param_5[1]) {
    do {
      FUN_14004fe70(local_30,*puVar2);
      FUN_14004fe70(local_30,puVar2[1]);
      FUN_14004fae0(local_30,puVar2[2]);
      puVar2 = puVar2 + 3;
    } while (puVar2 != (undefined4 *)param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_BUFF",0x2b33);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000b880(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b33);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,(param_6[1] - *param_6) / 0xc);
  puVar2 = (undefined4 *)*param_6;
  if (puVar2 != (undefined4 *)param_6[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      FUN_14004fe70(local_40,puVar2[1]);
      FUN_14004fae0(local_40,puVar2[2]);
      puVar2 = puVar2 + 3;
    } while (puVar2 != (undefined4 *)param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_BUFF",0x2b33);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000b9d0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined1 *param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b34);
  FUN_14004fe70(local_30,*param_4);
  FUN_140155f20(local_30,param_5);
  FUN_14004fd90(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_UPDATE_CHARACTER_NAME",0x2b34);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000bad0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined1 *param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b34);
  FUN_14004fe70(local_30,*param_5);
  FUN_140155f20(local_30,param_6);
  FUN_14004fd90(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_UPDATE_CHARACTER_NAME",0x2b34);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000bbe0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b35);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_CHATACTER_ALL_DATA",0x2b35);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000bcc0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b35);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_READ_CHATACTER_ALL_DATA",0x2b35
                    );
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_14000bda0(longlong *param_1,undefined4 param_2,undefined8 param_3,longlong *param_4)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined4 local_res10 [2];
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b36);
  FUN_14004fe70(local_40,(param_4[1] - *param_4) / 0x84);
  puVar2 = (undefined4 *)*param_4;
  if (puVar2 != (undefined4 *)param_4[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      FUN_140155f60(local_40,puVar2 + 1);
      puVar2 = puVar2 + 0x21;
    } while (puVar2 != (undefined4 *)param_4[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_40,L"RESP_READ_WORLD_SERVER",0x2b36);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000bed0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b36);
  FUN_14004fe70(local_40,(param_5[1] - *param_5) / 0x84);
  puVar2 = (undefined4 *)*param_5;
  if (puVar2 != (undefined4 *)param_5[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      FUN_140155f60(local_40,puVar2 + 1);
      puVar2 = puVar2 + 0x21;
    } while (puVar2 != (undefined4 *)param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_WORLD_SERVER",0x2b36);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000c010(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7,undefined4 *param_8,
             undefined4 *param_9)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b37);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_140157600(local_30,param_6);
  FUN_14004fe70(local_30,*param_7);
  FUN_14004fe70(local_30,*param_8);
  FUN_14004fe70(local_30,*param_9);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_REWARD_COUPON",0x2b37);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000c150(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8,
             undefined4 *param_9,undefined4 *param_10)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b37);
  FUN_14004fe70(local_30,*param_5);
  FUN_140157600(local_30,param_6);
  FUN_140157600(local_30,param_7);
  FUN_14004fe70(local_30,*param_8);
  FUN_14004fe70(local_30,*param_9);
  FUN_14004fe70(local_30,*param_10);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_REWARD_COUPON",0x2b37);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000c290(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             undefined8 param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b38);
  FUN_140157600(local_30,param_4);
  FUN_140155f20(local_30,param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_PC_ROOM_POINT",0x2b38);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000c390(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b38);
  FUN_140157600(local_30,param_5);
  FUN_140155f20(local_30,param_6);
  FUN_14004fe70(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_PC_ROOM_POINT",0x2b38);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000c490(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b39);
  FUN_14004fe70(local_30,*param_4);
  FUN_1400464d0(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_REWARD",0x2b39);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000c580(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b39);
  FUN_14004fe70(local_30,*param_5);
  FUN_1400464d0(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_READ_REWARD",0x2b39);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000c670(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b3a);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GUILD_TOTAL_CNT",0x2b3a);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000c750(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b3a);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_GUILD_TOTAL_CNT",0x2b3a);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_14000c830(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b3b);
  FUN_140046590(local_30,param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GUILD_LOAD_INFO",0x2b3b);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000c910(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b3b);
  FUN_140046590(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_GUILD_LOAD_INFO",0x2b3b);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000c9f0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined8 param_6,undefined2 *param_7,undefined2 *param_8,
             undefined4 *param_9)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b3c);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_140157600(local_30,param_6);
  FUN_140050340(local_30,*param_7);
  FUN_140050340(local_30,*param_8);
  FUN_14004fe70(local_30,*param_9);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_INVEN_SLOT",0x2b3c);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000cb30(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined2 *param_8,
             undefined2 *param_9,undefined4 *param_10)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b3c);
  FUN_14004fe70(local_30,*param_5);
  FUN_140157600(local_30,param_6);
  FUN_140157600(local_30,param_7);
  FUN_140050340(local_30,*param_8);
  FUN_140050340(local_30,*param_9);
  FUN_14004fe70(local_30,*param_10);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_INVEN_SLOT",0x2b3c);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000cc80(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b3d);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_EXTERN_CASH_BALANCE",0x2b3d);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000cd80(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b3d);
  FUN_14004fe70(local_30,*param_5);
  FUN_140157600(local_30,param_6);
  FUN_14004fe70(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_EXTERN_CASH_BALANCE",0x2b3d);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000ce90(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,longlong *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b3e);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_14004fe70(local_30,(param_6[1] - *param_6) / 0xc0);
  lVar2 = *param_6;
  if (lVar2 != param_6[1]) {
    do {
      FUN_140132040(local_30,lVar2);
      lVar2 = lVar2 + 0xc0;
    } while (lVar2 != param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_ACCOUNT_STORAGE_ITEM",0x2b3e
                    );
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000cfe0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b3e);
  FUN_14004fe70(local_40,*param_5);
  FUN_140157600(local_40,param_6);
  FUN_14004fe70(local_40,(param_7[1] - *param_7) / 0xc0);
  lVar2 = *param_7;
  if (lVar2 != param_7[1]) {
    do {
      FUN_140132040(local_40,lVar2);
      lVar2 = lVar2 + 0xc0;
    } while (lVar2 != param_7[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_ACCOUNT_STORAGE_ITEM",
                     0x2b3e);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000d140(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined4 *param_7,undefined4 *param_8,
             undefined4 *param_9)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b3f);
  FUN_14004fe70(local_30,*param_4);
  FUN_140157600(local_30,param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_14004fe70(local_30,*param_7);
  FUN_14004fe70(local_30,*param_8);
  FUN_14004fe70(local_30,*param_9);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_READ_UNI_ACCOUNT_INFO",0x2b3f);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000d280(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined4 *param_7,undefined4 *param_8,
             undefined4 *param_9,undefined4 *param_10)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b3f);
  FUN_14004fe70(local_30,*param_5);
  FUN_140157600(local_30,param_6);
  FUN_14004fe70(local_30,*param_7);
  FUN_14004fe70(local_30,*param_8);
  FUN_14004fe70(local_30,*param_9);
  FUN_14004fe70(local_30,*param_10);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_READ_UNI_ACCOUNT_INFO",0x2b3f);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000d3d0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             longlong *param_5)

{
  undefined1 uVar1;
  undefined1 *puVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b40);
  FUN_140157600(local_30,param_4);
  FUN_14004fe70(local_30,(param_5[1] - *param_5) / 9);
  puVar2 = (undefined1 *)*param_5;
  if (puVar2 != (undefined1 *)param_5[1]) {
    do {
      FUN_14004fd90(local_30,*puVar2);
      FUN_14004fe70(local_30,*(undefined4 *)(puVar2 + 1));
      FUN_14004fe70(local_30,*(undefined4 *)(puVar2 + 5));
      puVar2 = puVar2 + 9;
    } while (puVar2 != (undefined1 *)param_5[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GUILD_SKILL_LIST",0x2b40);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000d520(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5,longlong *param_6)

{
  undefined1 uVar1;
  undefined1 *puVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b40);
  FUN_140157600(local_40,param_5);
  FUN_14004fe70(local_40,(param_6[1] - *param_6) / 9);
  puVar2 = (undefined1 *)*param_6;
  if (puVar2 != (undefined1 *)param_6[1]) {
    do {
      FUN_14004fd90(local_40,*puVar2);
      FUN_14004fe70(local_40,*(undefined4 *)(puVar2 + 1));
      FUN_14004fe70(local_40,*(undefined4 *)(puVar2 + 5));
      puVar2 = puVar2 + 9;
    } while (puVar2 != (undefined1 *)param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_GUILD_SKILL_LIST",0x2b40);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000d670(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined1 *param_5,undefined4 *param_6,undefined1 *param_7,undefined4 *param_8)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b41);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,param_4[1]);
  FUN_140157600(local_30,param_4 + 2);
  FUN_14004fd90(local_30,*param_5);
  FUN_14004fe70(local_30,*(undefined4 *)(param_5 + 1));
  FUN_14004fe70(local_30,*(undefined4 *)(param_5 + 5));
  FUN_140157600(local_30,param_5 + 9);
  FUN_14004fe70(local_30,*param_6);
  FUN_14004fd90(local_30,*param_7);
  FUN_14004fe70(local_30,*param_8);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GUILD_SKILL_LEARN",0x2b41);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000d7e0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined1 *param_6,undefined4 *param_7,undefined1 *param_8,
             undefined4 *param_9)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b41);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,param_5[1]);
  FUN_140157600(local_30,param_5 + 2);
  FUN_14004fd90(local_30,*param_6);
  FUN_14004fe70(local_30,*(undefined4 *)(param_6 + 1));
  FUN_14004fe70(local_30,*(undefined4 *)(param_6 + 5));
  FUN_140157600(local_30,param_6 + 9);
  FUN_14004fe70(local_30,*param_7);
  FUN_14004fd90(local_30,*param_8);
  FUN_14004fe70(local_30,*param_9);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_GUILD_SKILL_LEARN",0x2b41);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000d960(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined2 *param_7,undefined4 *param_8)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b42);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,param_4[1]);
  FUN_140157600(local_30,param_4 + 2);
  FUN_140155f20(local_30,param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_14004fe70(local_30,param_6[1]);
  FUN_140157600(local_30,param_6 + 2);
  FUN_140050340(local_30,*param_7);
  FUN_140050340(local_30,param_7[1]);
  FUN_140050340(local_30,param_7[2]);
  FUN_140157600(local_30,param_7 + 7);
  FUN_140157600(local_30,param_7 + 0xf);
  FUN_14004fbc0(local_30,*(undefined8 *)(param_7 + 3));
  FUN_140155f60(local_30,param_7 + 0x17);
  FUN_140155f60(local_30,param_7 + 0x27);
  FUN_14004fe70(local_30,*param_8);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_INSERT_GUILD_MEMBER",0x2b42);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000db00(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined4 *param_7,undefined2 *param_8,
             undefined4 *param_9)

{
  undefined1 uVar1;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b42);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,param_5[1]);
  FUN_140157600(local_40,param_5 + 2);
  FUN_140155f20(local_40,param_6);
  FUN_14004fe70(local_40,*param_7);
  FUN_14004fe70(local_40,param_7[1]);
  FUN_140157600(local_40,param_7 + 2);
  FUN_140050340(local_40,*param_8);
  FUN_140050340(local_40,param_8[1]);
  FUN_140050340(local_40,param_8[2]);
  FUN_140157600(local_40,param_8 + 7);
  FUN_140157600(local_40,param_8 + 0xf);
  FUN_14004fbc0(local_40,*(undefined8 *)(param_8 + 3));
  FUN_140155f60(local_40,param_8 + 0x17);
  FUN_140155f60(local_40,param_8 + 0x27);
  FUN_14004fe70(local_40,*param_9);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_INSERT_GUILD_MEMBER",0x2b42);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000dca0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined1 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b43);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,param_4[1]);
  FUN_140157600(local_30,param_4 + 2);
  FUN_14004fd90(local_30,*param_5);
  FUN_14004fe70(local_30,*(undefined4 *)(param_5 + 1));
  FUN_140157600(local_30,param_5 + 5);
  FUN_140157600(local_30,param_5 + 0x15);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GUILD_MEMBER_REMOVE",0x2b43);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000dde0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined1 *param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b43);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,param_5[1]);
  FUN_140157600(local_30,param_5 + 2);
  FUN_14004fd90(local_30,*param_6);
  FUN_14004fe70(local_30,*(undefined4 *)(param_6 + 1));
  FUN_140157600(local_30,param_6 + 5);
  FUN_140157600(local_30,param_6 + 0x15);
  FUN_14004fe70(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_GUILD_MEMBER_REMOVE",0x2b43);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000df40(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b44);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,param_4[1]);
  FUN_140157600(local_30,param_4 + 2);
  FUN_140157600(local_30,param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_GUILD_DISBAND",0x2b44);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000e060(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b44);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,param_5[1]);
  FUN_140157600(local_30,param_5 + 2);
  FUN_140157600(local_30,param_6);
  FUN_14004fe70(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_GUILD_DISBAND",0x2b44);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000e190(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b45);
  FUN_14004fe70(local_30,*param_4);
  FUN_140155ee0(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_SECOND_PASS",0x2b45);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000e280(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b45);
  FUN_14004fe70(local_30,*param_5);
  FUN_140155ee0(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_SECOND_PASS",0x2b45);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000e370(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b46);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_SET_SECOND_PASS",0x2b46);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000e450(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x2b46);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_SET_SECOND_PASS",0x2b46);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000e530(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 *puVar3;
  undefined4 local_res10 [2];
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b47);
  FUN_14004fe70(local_40,*param_4);
  puVar3 = param_5 + 0x20;
  lVar2 = 0x20;
  do {
    FUN_14004fe70(local_40,*param_5);
    FUN_140157600(local_40,puVar3);
    puVar3 = puVar3 + 4;
    param_5 = param_5 + 1;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_40,L"RESP_READ_QUICKSLOT_EX",0x2b47);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14000e650(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined4 *puVar3;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x2b47);
  FUN_14004fe70(local_40,*param_5);
  puVar3 = param_6 + 0x20;
  lVar2 = 0x20;
  do {
    FUN_14004fe70(local_40,*param_6);
    FUN_140157600(local_40,puVar3);
    puVar3 = puVar3 + 4;
    param_6 = param_6 + 1;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"RESP_READ_QUICKSLOT_EX",0x2b47);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}


/*
Unable to decompile 'FUN_14000e780'
Cause: Exception while decompiling 14000e780: process: timeout

*/


wchar_t * FUN_140042570(undefined4 param_1)

{
  switch(param_1) {
  case 0x2af9:
    return L"ERROR_NOTIFY";
  case 0x2afa:
    return L"RESP_AUTH";
  case 0x2afb:
    return L"RESP_READ_ITEM_DROPGROUP";
  case 0x2afc:
    return L"RESP_READ_GUILD";
  case 0x2afd:
    return L"RESP_CHARACTER_CREATE";
  case 0x2afe:
    return L"RESP_CHARACTER_DELETE";
  case 0x2aff:
    return L"RESP_CHARACTER_GET";
  case 0x2b00:
    return L"RESP_READ_MONEY";
  case 0x2b01:
    return L"RESP_ITEM";
  case 0x2b02:
    return L"RESP_SKILL";
  case 0x2b03:
    return L"RESP_READ_QUICKSLOT";
  case 0x2b04:
    return L"RESP_GET_KEY_MAP";
  case 0x2b05:
    return L"RESP_QUEST";
  case 0x2b06:
    return L"RESP_SKILL_RESET";
  case 0x2b07:
    return L"RESP_CHARACTER_GET_LIST";
  case 0x2b08:
    return L"RESP_SELECT_DUEL_INFO";
  case 0x2b09:
    return L"RESP_SELECT_BATTLE_RANK_LIST";
  case 0x2b0a:
    return L"RESP_FRIEND";
  case 0x2b0b:
    return L"RESP_MAIL";
  case 0x2b0c:
    return L"RESP_MAIL_ITEM";
  case 0x2b0d:
    return L"RESP_READ_DUNGEON_RANK";
  case 0x2b0e:
    return L"RESP_TITLE";
  case 0x2b0f:
    return L"RESP_IS_PUSH_QUEUE";
  case 0x2b10:
    return L"RESP_ITEM_EQUIP_SIMPLE";
  case 0x2b11:
    return L"RESP_ITEM_EQUIP_SIMPLE_END";
  case 0x2b12:
    return L"RESP_GUILD_CREATE";
  case 0x2b13:
    return L"RESP_READ_GUILD_INFO";
  case 0x2b14:
    return L"RESP_READ_GUILD_MEMBER";
  case 0x2b15:
    return L"RESP_OTHER_CHARACTER_INFO";
  case 0x2b16:
    return L"RESP_OTHER_CHARACTER_EQUIP_ITEM";
  case 0x2b17:
    return L"RESP_ITEM_LIGHT";
  case 0x2b18:
    return L"RESP_QUEST_FINISH";
  case 0x2b19:
    return L"RESP_CHARACTER_CREATE_STEP01";
  case 0x2b1a:
    return L"RESP_DBC_THREAD_COUNT";
  case 0x2b1b:
    return L"RESP_READ_AUCTIONLIST";
  case 0x2b1c:
    return L"RESP_READ_PETLIST";
  case 0x2b1d:
    return L"RESP_GLUILD_INCREASE_EXP_LOG";
  case 0x2b1e:
    return L"RESP_GUILD_STORAGE_INFO";
  case 0x2b1f:
    return L"RESP_GUILD_USE_LOG";
  case 0x2b20:
    return L"RESP_GUILD_STORAGE_ITEM_LIST";
  case 0x2b21:
    return L"RESP_READ_CASH_EFFECTINFO";
  case 0x2b22:
    return L"RESP_READ_AUTH_BLACKLISTIP";
  case 0x2b23:
    return L"RESP_READ_AUTH_PCROOMIP";
  case 0x2b24:
    return L"RESP_NEW_MAIL_EXIST";
  case 0x2b25:
    return L"RESP_ADD_FRIEND";
  case 0x2b26:
    return L"RESP_ADD_BAN";
  case 0x2b27:
    return L"RESP_READ_REARING_INFO";
  case 0x2b28:
    return L"RESP_READ_CASH_PRODUCT_LIST";
  case 0x2b29:
    return L"RESP_INSERT_CASH_PRODUCT";
  case 0x2b2a:
    return L"RESP_CHARACTER_GET_SIMPLE";
  case 0x2b2b:
    return L"RESP_GM_AUTH";
  case 0x2b2c:
    return L"RESP_READ_PET_INVENTORY_ITEM";
  case 0x2b2d:
    return L"RESP_READ_FORTUNE";
  case 0x2b2e:
    return L"RESP_READ_INQUIRY";
  case 0x2b2f:
    return L"RESP_READ_INQUIRY_CHARACTER";
  case 0x2b30:
    return L"RESP_INSERT_INQUIRY_BY_GM";
  case 0x2b31:
    return L"RESP_CONNECTION_TEST";
  case 0x2b32:
    return L"RESP_REAL_TIME_EVENT";
  case 0x2b33:
    return L"RESP_READ_BUFF";
  case 0x2b34:
    return L"RESP_UPDATE_CHARACTER_NAME";
  case 0x2b35:
    return L"RESP_READ_CHATACTER_ALL_DATA";
  case 0x2b36:
    return L"RESP_READ_WORLD_SERVER";
  case 0x2b37:
    return L"RESP_REWARD_COUPON";
  case 0x2b38:
    return L"RESP_PC_ROOM_POINT";
  case 0x2b39:
    return L"RESP_READ_REWARD";
  case 0x2b3a:
    return L"RESP_GUILD_TOTAL_CNT";
  case 0x2b3b:
    return L"RESP_GUILD_LOAD_INFO";
  case 0x2b3c:
    return L"RESP_INVEN_SLOT";
  case 0x2b3d:
    return L"RESP_EXTERN_CASH_BALANCE";
  case 0x2b3e:
    return L"RESP_READ_ACCOUNT_STORAGE_ITEM";
  case 0x2b3f:
    return L"RESP_READ_UNI_ACCOUNT_INFO";
  case 0x2b40:
    return L"RESP_GUILD_SKILL_LIST";
  case 0x2b41:
    return L"RESP_GUILD_SKILL_LEARN";
  case 0x2b42:
    return L"RESP_INSERT_GUILD_MEMBER";
  case 0x2b43:
    return L"RESP_GUILD_MEMBER_REMOVE";
  case 0x2b44:
    return L"RESP_GUILD_DISBAND";
  case 0x2b45:
    return L"RESP_SECOND_PASS";
  case 0x2b46:
    return L"RESP_SET_SECOND_PASS";
  case 0x2b47:
    return L"RESP_READ_QUICKSLOT_EX";
  default:
    return L"RmiName_Unknown";
  }
}



wchar_t * FUN_140042960(undefined4 param_1)

{
  switch(param_1) {
  case 0x2ee1:
    return L"REQ_AUTH";
  case 0x2ee2:
    return L"REQ_LOGOUT";
  case 0x2ee3:
    return L"REQ_SAVE_FIRST_CHARACTER";
  case 0x2ee4:
    return L"REQ_SAVE_IP";
  case 0x2ee5:
    return L"REQ_READ_ALL_ITEM_DROPGROUP";
  case 0x2ee6:
    return L"REQ_READ_ALL_GUILD";
  case 0x2ee7:
    return L"REQ_READ_GUILD_MEMBER";
  case 0x2ee8:
    return L"REQ_INSERT_GUILD_MEMBER";
  case 0x2ee9:
    return L"REQ_INSERT_ITEM";
  case 0x2eea:
    return L"REQ_INSERT_SKILL";
  case 0x2eeb:
    return L"REQ_UPDATE_SKILL_LEVEL";
  case 0x2eec:
    return L"REQ_SAVE_SKILL_RESET";
  case 0x2eed:
    return L"REQ_MOVE_INVENTORY_TO_EQUIP";
  case 0x2eee:
    return L"REQ_MOVE_CASH_TO_EQUIP";
  case 0x2eef:
    return L"REQ_MOVE_EQUIP_TO_INVENTORY";
  case 0x2ef0:
    return L"REQ_MOVE_EQUIP_TO_CASH";
  case 0x2ef1:
    return L"REQ_ITEM_PAGE_SLOT_UPDATE";
  case 0x2ef2:
    return L"REQ_ITEM_UPDATE";
  case 0x2ef3:
    return L"REQ_ITEM_OWNER_UPDATE";
  case 0x2ef4:
    return L"REQ_ITEM_PAGE_OWNER_UPDATE";
  case 0x2ef5:
    return L"REQ_ITEM_DURABILITY_UPDATE";
  case 0x2ef6:
    return L"REQ_UPDATE_REMAINTIME_ITEM";
  case 0x2ef7:
    return L"REQ_UPDATE_ITEM_BINDS";
  case 0x2ef8:
    return L"REQ_INSERT_QUEST";
  case 0x2ef9:
    return L"REQ_UPDATE_QUEST";
  case 0x2efa:
    return L"REQ_DELETE_QUEST";
  case 0x2efb:
    return L"REQ_UPDATE_QUEST_SHOW";
  case 0x2efc:
    return L"REQ_CHARACTER_READ_ALL_DATA";
  case 0x2efd:
    return L"REQ_UPDATE_CHARACTER_GIVE_UP";
  case 0x2efe:
    return L"REQ_UPDATE_CHARACTER_HEARTS";
  case 0x2eff:
    return L"REQ_UPDATE_CHARACTER_FATIGUE";
  case 0x2f00:
    return L"REQ_UPDATE_CHARACTER_LEVEL_AND_SP";
  case 0x2f01:
    return L"REQ_UPDATE_CHARACTER_EXP";
  case 0x2f02:
    return L"REQ_UPDATE_CHARACTER_SP";
  case 0x2f03:
    return L"REQ_UPDATE_CHARACTER_JOB";
  case 0x2f04:
    return L"REQ_SAVE_MONEY";
  case 0x2f05:
    return L"REQ_UPDATE_CHARACTER_FIRST_LOGIN";
  case 0x2f06:
    return L"REQ_SAVE_ITEM_INVEN";
  case 0x2f07:
    return L"REQ_SAVE_ITEM_QUICKSLOT";
  case 0x2f08:
    return L"REQ_SAVE_ITEM_BOOTH";
  case 0x2f09:
    return L"REQ_SAVE_ITEM_STORAGE";
  case 0x2f0a:
    return L"REQ_UPDATE_STORAGE_USEABLE_COUNT";
  case 0x2f0b:
    return L"REQ_CHARACTER_CREATE";
  case 0x2f0c:
    return L"REQ_CHARACTER_DELETE";
  case 0x2f0d:
    return L"REQ_CHARACTER_LIST";
  case 0x2f0e:
    return L"REQ_CHARACTER_GET";
  case 0x2f0f:
    return L"REQ_CHARACTER_GET_BY_NAME";
  case 0x2f10:
    return L"REQ_CHARACTER_GET_SIMPLE";
  case 0x2f11:
    return L"REQ_MAIL_SEND";
  case 0x2f12:
    return L"REQ_MAIL_DEL";
  case 0x2f13:
    return L"REQ_MAIL_UPDATE";
  case 0x2f14:
    return L"REQ_MAIL_LIST";
  case 0x2f15:
    return L"REQ_MAIL_OPEN";
  case 0x2f16:
    return L"REQ_MAIL_NEW_LIST";
  case 0x2f17:
    return L"REQ_MAIL_ITEM_MOVE";
  case 0x2f18:
    return L"REQ_MAIL_GOLD_PAYMAENT";
  case 0x2f19:
    return L"REQ_MAIL_RETURN";
  case 0x2f1a:
    return L"REQ_UPDATE_DUEL_INFO";
  case 0x2f1b:
    return L"REQ_SELECT_BATTLE_RANK_LIST";
  case 0x2f1c:
    return L"REQ_FRIEND_LIST";
  case 0x2f1d:
    return L"REQ_ADD_FRIEND";
  case 0x2f1e:
    return L"REQ_DEL_FRIEND";
  case 0x2f1f:
    return L"REQ_ADD_BAN";
  case 0x2f20:
    return L"REQ_DEL_BAN";
  case 0x2f21:
    return L"REQ_UPDATE_MEMO_BAN";
  case 0x2f22:
    return L"REQ_UPDATE_DUNGEON_RANK";
  case 0x2f23:
    return L"REQ_ADD_CHARACTER_TITLE";
  case 0x2f24:
    return L"REQ_EQUIP_CHARACTER_TITLE";
  case 0x2f25:
    return L"REQ_UNEQUIP_CHARACTER_TITLE";
  case 0x2f26:
    return L"REQ_IS_PUSH_QUEUE";
  case 0x2f27:
    return L"REQ_CHARACTER_EQUIP_ITEM";
  case 0x2f28:
    return L"REQ_SAVE_INVENTORY_STORAGE_MONEY";
  case 0x2f29:
    return L"REQ_CREATE_GUILD";
  case 0x2f2a:
    return L"REQ_READ_GUILD";
  case 0x2f2b:
    return L"REQ_READ_GUILD_SERVER";
  case 0x2f2c:
    return L"REQ_UPDATE_GUILD_PERMISSION";
  case 0x2f2d:
    return L"REQ_UPDATE_GUILD_LEADER";
  case 0x2f2e:
    return L"REQ_UPDATE_GUILD_NOTICE";
  case 0x2f2f:
    return L"REQ_UPDATE_GUILD_ICON";
  case 0x2f30:
    return L"REQ_GUILD_MEMBER_REMOVE";
  case 0x2f31:
    return L"REQ_UPDATE_GUILD_MEMBER_ALIASE";
  case 0x2f32:
    return L"REQ_UPDATE_GUILD_MEMBER_GRADE";
  case 0x2f33:
    return L"REQ_UPDATE_CHARACTER_LOBBY";
  case 0x2f34:
    return L"REQ_DISBAND_GUILD";
  case 0x2f35:
    return L"REQ_GUILD_MEMBER_LOGOUT_TIME";
  case 0x2f36:
    return L"REQ_OTHER_CHARACTER_INFO";
  case 0x2f37:
    return L"REQ_CHARACTER_CREATE_STEP01";
  case 0x2f38:
    return L"REQ_UPDATE_CHARACTER_TUTORIAL";
  case 0x2f39:
    return L"REQ_ALL_DELETE_QUEST";
  case 0x2f3a:
    return L"REQ_MOVE_CASH_TO_EQUIP_COSTUMEPACK";
  case 0x2f3b:
    return L"REQ_SAVE_SERVER_INFO";
  case 0x2f3c:
    return L"REQ_SERVER_GROUP_ID";
  case 0x2f3d:
    return L"REQ_LOG_PLAY_TIME";
  case 0x2f3e:
    return L"REQ_LOG_DUNGEON_CLEAR";
  case 0x2f3f:
    return L"REQ_LOG_LEVEL_UP";
  case 0x2f40:
    return L"REQ_LOG_DUNGEON";
  case 0x2f41:
    return L"REQ_LOG_SKILL_LEARN";
  case 0x2f42:
    return L"REQ_LOG_GOLD";
  case 0x2f43:
    return L"REQ_LOG_ITEM";
  case 0x2f44:
    return L"REQ_READ_ALL_AUCTIONLIST";
  case 0x2f45:
    return L"REQ_REGISTER_AUCTIONITEM";
  case 0x2f46:
    return L"REQ_DELETE_AUCTIONITEM";
  case 0x2f47:
    return L"REQ_UPDATE_AUCTIONITEM";
  case 0x2f48:
    return L"REQ_SENDMAIL_AUCTIONMNG";
  case 0x2f49:
    return L"REQ_SAVE_KEY_MAP";
  case 0x2f4a:
    return L"REQ_UPDATE_EVENT_FATIGUE";
  case 0x2f4b:
    return L"REQ_UPDATE_EVENT_HEARTS";
  case 0x2f4c:
    return L"REQ_UPDATE_EVENT_FORTUNE";
  case 0x2f4d:
    return L"REQ_UPDATE_EVENT_DAY_PARTY_MISSION";
  case 0x2f4e:
    return L"REQ_PET_DELETE";
  case 0x2f4f:
    return L"REQ_PET_CREATE";
  case 0x2f50:
    return L"REQ_PET_UPDATE";
  case 0x2f51:
    return L"REQ_PET_READLIST";
  case 0x2f52:
    return L"REQ_PET_LEVEL_UPDATE";
  case 0x2f53:
    return L"REQ_PET_EXP_UPDATE";
  case 0x2f54:
    return L"REQ_PET_NAME_UPDATE";
  case 0x2f55:
    return L"REQ_PET_INTIMACY_LEVEL_UPDATE";
  case 0x2f56:
    return L"REQ_PET_INTIMACY_EXP_UPDATE";
  case 0x2f57:
    return L"REQ_UPDATE_CHARACTER_BATTLE_POINT";
  case 0x2f58:
    return L"REQ_UPDATE_CHARACTER_BATTLE_EXP";
  case 0x2f59:
    return L"REQ_UPDATE_CHARACTER_BATTLE_LADDER";
  case 0x2f5a:
    return L"REQ_READ_CASH_EFFECTINFO";
  case 0x2f5b:
    return L"REQ_INSERT_CASH_EFFECTINFO";
  case 0x2f5c:
    return L"REQ_UPDATE_CASH_EFFECTINFO";
  case 0x2f5d:
    return L"REQ_DELETE_CASH_EFFECTINFO";
  case 0x2f5e:
    return L"REQ_READ_AUTH_BLACKLISTIP";
  case 0x2f5f:
    return L"REQ_READ_AUTH_PCROOMIP";
  case 0x2f60:
    return L"REQ_GUILD_INCREASE_EXP";
  case 0x2f61:
    return L"REQ_GUILD_INCREASE_EXP_LOG";
  case 0x2f62:
    return L"REQ_GUILD_LEVEL_UP";
  case 0x2f63:
    return L"REQ_GUILD_STORAGE_INFO";
  case 0x2f64:
    return L"REQ_GUILD_STORAGE_INFO_CHANGE";
  case 0x2f65:
    return L"REQ_GUILD_USE_LOG";
  case 0x2f66:
    return L"REQ_GUILD_STORAGE_ITEM_LIST";
  case 0x2f67:
    return L"REQ_GUILD_DEPOSIT";
  case 0x2f68:
    return L"REQ_GUILD_PAYMENT";
  case 0x2f69:
    return L"REQ_GUILD_STORAGE_PUSH_ITEM";
  case 0x2f6a:
    return L"REQ_GUILD_STORAGE_POP_ITEM";
  case 0x2f6b:
    return L"REQ_GUILD_STORAGE_ITEM_CHANGE_COUNT";
  case 0x2f6c:
    return L"REQ_GUILD_STORAGE_USE_LOG";
  case 0x2f6d:
    return L"REQ_UPDATE_CHARACTER_DICE_POINT";
  case 0x2f6e:
    return L"REQ_STATUS_ADDITION_HP";
  case 0x2f6f:
    return L"REQ_STATUS_ADDITION_MP";
  case 0x2f70:
    return L"REQ_STATUS_ADDITION_PHYSICATTACK";
  case 0x2f71:
    return L"REQ_STATUS_ADDITION_PHYSICDEFENSE";
  case 0x2f72:
    return L"REQ_STATUS_ADDITION_MAGICATTACK";
  case 0x2f73:
    return L"REQ_STATUS_ADDITION_MAGICDEFENSE";
  case 0x2f74:
    return L"REG_PACKET_OVERLOAD_LOG";
  case 0x2f75:
    return L"REQ_UPDATE_CHARACTER_FATIGUE_STORAGE";
  case 0x2f76:
    return L"REQ_MAIL_SEND_CREATE_ITEM";
  case 0x2f77:
    return L"REQ_MAIL_NEW_EXIST";
  case 0x2f78:
    return L"REQ_UPDATE_ITEM_LOCK";
  case 0x2f79:
    return L"REQ_UPDATE_CHARACTER_GUILD_POINT";
  case 0x2f7a:
    return L"REQ_SERVER_MCU";
  case 0x2f7b:
    return L"REQ_READ_REARING_LISTINFO";
  case 0x2f7c:
    return L"REQ_INSERT_REARING_INFO";
  case 0x2f7d:
    return L"REQ_UPDATE_REARING_INFO";
  case 0x2f7e:
    return L"REQ_DELETE_REARING_INFO";
  case 0x2f7f:
    return L"REQ_UPDATE_REARING_TURN";
  case 0x2f80:
    return L"REQ_CREATE_GUILD_STORAGE";
  case 0x2f81:
    return L"REQ_GUILD_STORAGE_EXTENSION";
  case 0x2f82:
    return L"REQ_LOG_ITEM_ENCHANT";
  case 0x2f83:
    return L"REQ_READ_CASH_PRODUCT_LIST";
  case 0x2f84:
    return L"REQ_INSERT_CASH_PRODUCT";
  case 0x2f85:
    return L"REQ_UPDATE_CASH_PRODUCT";
  case 0x2f86:
    return L"REQ_CHARACTER_ROB";
  case 0x2f87:
    return L"REQ_LOG_PVP_ROOM";
  case 0x2f88:
    return L"REQ_LOG_PVP_BATTLE";
  case 0x2f89:
    return L"REQ_LOG_PVP_RESULT";
  case 0x2f8a:
    return L"REQ_LOG_PVP_DEATH";
  case 0x2f8b:
    return L"REQ_UPDATE_FORTUNE";
  case 0x2f8c:
    return L"REQ_ITEM_UPDATE_CODE_OPTION";
  case 0x2f8d:
    return L"REQ_ADD_INQUIRY_COUNT";
  case 0x2f8e:
    return L"REQ_INSERT_INQUIRY";
  case 0x2f8f:
    return L"REQ_INSERT_INQUIRY_BY_GM";
  case 0x2f90:
    return L"REQ_UPDATE_INQUIRY";
  case 0x2f91:
    return L"REQ_UPDATE_INQUIRY_TYPE";
  case 0x2f92:
    return L"REQ_READ_INQUIRY";
  case 0x2f93:
    return L"REQ_DELETE_INQUIRY";
  case 0x2f94:
    return L"REQ_GM_AUTH";
  case 0x2f95:
    return L"REQ_INSERT_BLACKIP";
  case 0x2f96:
    return L"REQ_ADD_PET_INVENTORY_ITEM";
  case 0x2f97:
    return L"REQ_READ_PET_INVENTORY_ITEM";
  case 0x2f98:
    return L"REQ_MOVE_PET_INVEN_TO_INVEN";
  case 0x2f99:
    return L"REQ_DELETE_PET_INVENTORY_ITEM";
  case 0x2f9a:
    return L"REQ_UPDATE_PET_TYPE";
  case 0x2f9b:
    return L"REQ_UPDATE_PET_STET";
  case 0x2f9c:
    return L"REQ_UPDATE_DAY_ATTACH";
  case 0x2f9d:
    return L"REQ_RESET_BATTLE_INFO";
  case 0x2f9e:
    return L"REQ_PET_ITEM_UPDATE";
  case 0x2f9f:
    return L"REQ_GUILD_LOG";
  case 0x2fa0:
    return L"REQ_PET_EAT_STATUS";
  case 0x2fa1:
    return L"REQ_GUILD_STORAGE_ITEM_UPDATE";
  case 0x2fa2:
    return L"REQ_UPDATE_EVENT_INQUIRY";
  case 0x2fa3:
    return L"REQ_UPDATE_INQUIRY_COUNT";
  case 0x2fa4:
    return L"REQ_QUEST_LOG";
  case 0x2fa5:
    return L"REQ_LOG_CHARACTER";
  case 0x2fa6:
    return L"REQ_LOG_ITEMTRADE";
  case 0x2fa7:
    return L"REQ_LOG_INQUIRY_COMPLETE";
  case 0x2fa8:
    return L"REQ_LOG_INQUIRY_CHATTING";
  case 0x2fa9:
    return L"REQ_LOG_MONITOR_NOTICE";
  case 0x2faa:
    return L"REQ_LOG_MONITOR_USER";
  case 0x2fab:
    return L"REQ_LOG_MONITOR_COMMAND";
  case 0x2fac:
    return L"REQ_UPDATE_EVENT_MAILATTACH";
  case 0x2fad:
    return L"REQ_CASHBUY_LOG";
  case 0x2fae:
    return L"REQ_LOGINOUT_LOG";
  case 0x2faf:
    return L"REQ_CONNECTION_LOG";
  case 0x2fb0:
    return L"REQ_LEARNSKILL_LOG";
  case 0x2fb1:
    return L"REQ_MAIL_LOG";
  case 0x2fb2:
    return L"REQ_CHAT_LOG";
  case 0x2fb3:
    return L"REQ_CONNECTION_TEST";
  case 0x2fb4:
    return L"REQ_LOGOUT_LOG";
  case 0x2fb5:
    return L"REQ_LOG_AUCTION";
  case 0x2fb6:
    return L"REQ_LOG_ITEMMAIL";
  case 0x2fb7:
    return L"REQ_LOG_ITEMS";
  case 0x2fb8:
    return L"REQ_UPDATE_CHARACTER_BLOCK";
  case 0x2fb9:
    return L"REQ_REAL_TIME_EVENT";
  case 0x2fba:
    return L"REQ_DEL_CHARACTER_TITLE";
  case 0x2fbb:
    return L"REQ_INSERT_BUFF";
  case 0x2fbc:
    return L"REQ_UPDATE_BUFF";
  case 0x2fbd:
    return L"REQ_DELETE_BUFF";
  case 0x2fbe:
    return L"REQ_READ_BUFF";
  case 0x2fbf:
    return L"REQ_UPDATE_CHARACTER_BLOCK_BY_NAME";
  case 0x2fc0:
    return L"REQ_UPDATE_CASH_MILEAGE";
  case 0x2fc1:
    return L"REQ_SEND_MAIL_REWARD_ITEM";
  case 0x2fc2:
    return L"REQ_UPDATE_CHARACTER_NAME";
  case 0x2fc3:
    return L"REQ_READ_WORLD_SERVER";
  case 0x2fc4:
    return L"REQ_REWARD_COUPON";
  case 0x2fc5:
    return L"REQ_PC_ROOM_POINT";
  case 0x2fc6:
    return L"REQ_SAVE_PC_ROOM_POINT";
  case 0x2fc7:
    return L"REQ_LOG_PET";
  case 0x2fc8:
    return L"REQ_LOG_ACCOUNT";
  case 0x2fc9:
    return L"REQ_UPDATE_PVP_LADDER";
  case 0x2fca:
    return L"REQ_READ_REWARD";
  case 0x2fcb:
    return L"REQ_REWARD_ITEM";
  case 0x2fcc:
    return L"REQ_CHARACTER_EQUIP_ITEM_END";
  case 0x2fcd:
    return L"REQ_LOG_PVP_LADDER";
  case 0x2fce:
    return L"REQ_UPDATE_PCROOM_REMAINTIME";
  case 0x2fcf:
    return L"REQ_UPDATE_CHARACTER_TUTORIAL_STEP";
  case 0x2fd0:
    return L"REQ_LOG_INQUIRY";
  case 0x2fd1:
    return L"REQ_GUILD_TOTAL_CNT";
  case 0x2fd2:
    return L"REQ_GUILD_LOAD_INFO";
  case 0x2fd3:
    return L"REQ_INVEN_SLOT";
  case 0x2fd4:
    return L"REQ_LOG_GUILD_STORAGE_ITEM";
  case 0x2fd5:
    return L"REQ_EXTERN_CASH_BALANCE";
  case 0x2fd6:
    return L"REQ_UPDATE_DAY_PARTY_MISSION";
  case 0x2fd7:
    return L"REQ_READ_ACCOUNT_STORAGE_ITEM";
  case 0x2fd8:
    return L"REQ_UPDATE_ACCOUNT_STORAGE_ITEM";
  case 0x2fd9:
    return L"REQ_CREATE_ACCOUNT_STORAGE_ITEM";
  case 0x2fda:
    return L"REQ_DELETE_ACCOUNT_STORAGE_ITEM";
  case 0x2fdb:
    return L"REQ_READ_SKILL";
  case 0x2fdc:
    return L"REQ_UPDATE_UNI_ACCOUNT_INFO";
  case 0x2fdd:
    return L"REQ_UPDATE_UNI_ACCOUNT_PLAYTIME";
  case 0x2fde:
    return L"REQ_GUILD_SKILL_LEARN";
  case 0x2fdf:
    return L"REQ_GUILD_SKILL_LIST";
  case 0x2fe0:
    return L"REQ_GUILD_SKILL_LOG";
  case 0x2fe1:
    return L"REQ_SECOND_PASS";
  case 0x2fe2:
    return L"REQ_SET_SECOND_PASS";
  case 0x2fe3:
    return L"REQ_LOG_CASH";
  case 0x2fe4:
    return L"REQ_LOG_AUTH_LOGIN";
  case 0x2fe5:
    return L"REQ_SET_TIME_SKILLRESET";
  case 0x2fe6:
    return L"REQ_DELETE_SKILL_ALL";
  case 0x2fe7:
    return L"REQ_SAVE_ITEM_QUICKSLOT_EX";
  default:
    return L"RmiName_Unknown";
  }
}



// WARNING: Removing unreachable block (ram,0x000140043807)
// WARNING: Removing unreachable block (ram,0x000140043810)
// WARNING: Removing unreachable block (ram,0x000140043831)
// WARNING: Removing unreachable block (ram,0x00014004383a)
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

undefined *
FUN_1400435f0(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  
  DAT_14032f248 = &DAT_14032f2a0;
  _DAT_14032f2a0 = Proud::INetServerEvent::vftable;
  FUN_140157ba0(&DAT_14032f2a8,param_2,param_3,param_4,0xfffffffffffffffe);
  _DAT_14032f2a8 = SERVERS2DBC_PROTOCOL::Stub::vftable;
  _DAT_14032f2c8 = MagiAgentReceive::vftable;
  _DAT_14032f2d0 = 0;
  _DAT_14032f2d4 = 0;
  DAT_14032f2d6 = 0;
  _DAT_14032f2d8 = 0;
  _DAT_14032f2e0 = MagiServerBase::vftable;
  _DAT_14032f2e8 = 0;
  _DAT_14032f2f0 = 0;
  _DAT_14032f2f8 = 0;
  _DAT_14032f300 = 0;
  _DAT_14032f310 = 0;
  _DAT_14032f318 = 0;
  _DAT_14032f320 = MagiBaseServerNetwork::vftable;
  _DAT_14032f328 = 0;
  FUN_1401568c0();
  _DAT_14032f330 = PTR_DAT_1403200a0;
  _DAT_14032f338 = 0;
  _DAT_14032f340 = 0;
  _DAT_14032f2a0 = CDBCServer::vftable;
  _DAT_14032f2a8 = CDBCServer::vftable;
  _DAT_14032f2c8 = CDBCServer::vftable;
  _DAT_14032f2e0 = CDBCServer::vftable;
  _DAT_14032f320 = CDBCServer::vftable;
  FUN_140156ca0();
  _DAT_14032f348 = DBC2SERVERS_PROTOCOL::Proxy::vftable;
  if (DAT_14032f35c != 1) {
    FUN_1401580e0();
  }
  _DAT_14032f368 = 0;
  _DAT_14032f370 = 0;
  _DAT_14032f378 = 0;
  _DAT_14032f390 = 0;
  DAT_14032f398 = 0;
  _DAT_14032f3e8 = 0;
  _DAT_14032f3a0 = 0;
  _DAT_14032f3a8 = 0;
  _DAT_14032f3b0 = 0;
  _DAT_14032f3c0 = 0x11;
  _DAT_14032f3b8 = 0;
  _DAT_14032f3e0 = 0;
  _DAT_14032f3c4 = 0x3f400000;
  _DAT_14032f3c8 = 0x3e800000;
  _DAT_14032f3cc = 0x40100000;
  _DAT_14032f3d0 = 0x26;
  _DAT_14032f3d8 = 0;
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_14032f3f0,uVar1,1);
  _DAT_14032f988 = 0;
  _DAT_14032f990 = 0;
  _DAT_14032f998 = 1;
  _DAT_140378d80 = 0;
  _DAT_140378d88 = 0;
  _DAT_140378d90 = 0;
  _DAT_14032efec = timeGetTime();
  _DAT_14032f380 = 0;
  _DAT_14032f388 = 0;
  memset(&DAT_14032f428,0,0x420);
  memset(&DAT_14032f848,0,0x140);
  memset(&DAT_14032f99c,0,300000);
  wprintf(L"-----------------------------------\n");
  wprintf(L"%d\t\tCOMMAND_MAX_SIZE\n");
  wprintf(L"%d\t\tON_DBLOBBYWRITETHREAD_COUNT\n");
  wprintf(L"%d\t\tON_DBLOBBYRESULT_QUEUE_SIZE\n");
  wprintf(L"%d\t\tON_DBLOBBYRESULT_LOCAL_BUF_SIZE\n");
  wprintf(L"-----------------------------------\n");
  return &DAT_14032f2a0;
}



void * FUN_140043970(void *param_1,uint param_2)

{
  FUN_1400439e0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void thunk_FUN_140157bd0(void)

{
  FUN_140157bd0();
  return;
}



void * FUN_1400439b0(void *param_1,uint param_2)

{
  FUN_140157bd0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1400439e0(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  *param_1 = CDBCServer::vftable;
  param_1[1] = CDBCServer::vftable;
  param_1[5] = CDBCServer::vftable;
  param_1[8] = CDBCServer::vftable;
  param_1[0x10] = CDBCServer::vftable;
  FUN_1400440a0();
  FUN_140156c00(param_1 + 0x2a);
  FUN_140045960(param_1 + 0x1f);
  FUN_140156cd0(param_1 + 0x15);
  param_1[0x10] = MagiBaseServerNetwork::vftable;
  puVar1 = (undefined8 *)param_1[0x11];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1,param_3,param_4,uVar2);
  }
  param_1[0x11] = 0;
  FUN_14004f990(param_1 + 0x12);
  param_1[8] = MagiServerBase::vftable;
  if ((void *)param_1[10] != (void *)0x0) {
    operator_delete((void *)param_1[10]);
  }
  param_1[10] = 0;
  param_1[0xb] = 0;
  param_1[0xc] = 0;
  param_1[5] = MagiAgentReceive::vftable;
  FUN_140157bd0(param_1 + 1);
  *param_1 = Proud::INetServerEvent::vftable;
  FUN_140157ce0(param_1);
  DAT_14032f248 = 0;
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140043b00(longlong param_1)

{
  undefined *puVar1;
  char cVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  void *pvVar5;
  longlong *plVar6;
  ulonglong uVar7;
  undefined8 *puVar8;
  longlong lVar9;
  char *pcVar10;
  longlong lVar11;
  undefined8 *puVar12;
  undefined1 auStack_358 [32];
  void *local_338;
  undefined8 *local_330;
  undefined8 local_328;
  undefined1 local_320;
  undefined7 uStack_31f;
  undefined8 local_310;
  ulonglong local_308;
  void *local_2f8 [3];
  ulonglong local_2e0;
  undefined **local_2c8;
  char local_2c0 [136];
  char local_238;
  undefined1 local_237 [255];
  CHAR local_138 [272];
  ulonglong local_28;
  
  puVar1 = PTR_s_option_dbc_serveroptionlog_xml_140325b48;
  local_328 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_358;
  if ((DAT_14037923c & 1) == 0) {
    DAT_14037923c = DAT_14037923c | 1;
    FUN_1402053b0();
    atexit((_func_5014 *)&LAB_140257ca0);
  }
  local_338 = operator_new(0xe8);
  puVar12 = (undefined8 *)0x0;
  puVar3 = puVar12;
  if (local_338 != (void *)0x0) {
    puVar3 = (undefined8 *)FUN_1402031c0(local_338);
  }
  DAT_14032f258 = puVar3;
  FUN_140203450(puVar3);
  local_338 = operator_new(0x98);
  puVar3 = puVar12;
  if (local_338 != (void *)0x0) {
    puVar3 = (undefined8 *)FUN_140205c00(local_338);
  }
  DAT_14032f250 = puVar3;
  local_338 = operator_new(8);
  puVar3 = puVar12;
  if (local_338 != (void *)0x0) {
    puVar3 = (undefined8 *)FUN_1401452f0();
  }
  local_308 = 0xf;
  local_310 = 0;
  local_320 = 0;
  uVar7 = 0xffffffffffffffff;
  pcVar10 = puVar1;
  do {
    if (uVar7 == 0) break;
    uVar7 = uVar7 - 1;
    cVar2 = *pcVar10;
    pcVar10 = pcVar10 + 1;
  } while (cVar2 != '\0');
  DAT_14032f270 = puVar3;
  FUN_14004d4d0(&local_320,puVar1,~uVar7 - 1);
  FUN_1402026a0(local_2f8,&local_320);
  if (0xf < local_308) {
    operator_delete((void *)CONCAT71(uStack_31f,local_320));
  }
  local_308 = 0xf;
  local_310 = 0;
  local_320 = 0;
  *(undefined1 *)(DAT_14032f260 + 0x1e8) = 0xc;
  FUN_14013cda0();
  local_338 = operator_new(0xf0);
  puVar3 = puVar12;
  if (local_338 != (void *)0x0) {
    puVar3 = (undefined8 *)FUN_140142f30(local_338);
  }
  *(undefined8 **)(param_1 + 0x70) = puVar3;
  local_338 = (void *)CONCAT44(local_338._4_4_,1);
  *(undefined4 *)(param_1 + 0x48) = 1;
  printf("STEP : AGENT \n");
  lVar11 = *(longlong *)(param_1 + 0x70);
  if ((lVar11 != 0) && (*(char *)(lVar11 + 0x1a) != '\0')) {
    (**(code **)(*(longlong *)(lVar11 + 0x68) + 0xb0))
              ((longlong *)(lVar11 + 0x68),1,&DAT_1403200f0,&local_338);
  }
  if ((*(longlong *)(param_1 + 0x70) == 0) || (cVar2 = FUN_140143470(), cVar2 != '\0')) {
    puVar4 = operator_new(0x1f48);
    lVar11 = 0x7d;
    puVar3 = puVar12;
    if (puVar4 != (undefined8 *)0x0) {
      *(undefined4 *)(puVar4 + 1000) = 0;
      lVar9 = 0x7d;
      puVar8 = puVar4;
      do {
        *puVar8 = 0;
        puVar8[1] = 0;
        puVar8[2] = 0;
        puVar8[3] = 0;
        puVar8[4] = 0;
        puVar8[5] = 0;
        puVar8[6] = 0;
        puVar8[7] = 0;
        lVar9 = lVar9 + -1;
        puVar3 = puVar4;
        puVar8 = puVar8 + 8;
      } while (lVar9 != 0);
    }
    *(undefined8 **)(param_1 + 200) = puVar3;
    if (*(longlong *)(DAT_14032f260 + 0x118) != 0) {
      puVar4 = operator_new(0x1f48);
      puVar3 = puVar12;
      if (puVar4 != (undefined8 *)0x0) {
        *(undefined4 *)(puVar4 + 1000) = 0;
        puVar8 = puVar4;
        do {
          *puVar8 = 0;
          puVar8[1] = 0;
          puVar8[2] = 0;
          puVar8[3] = 0;
          puVar8[4] = 0;
          puVar8[5] = 0;
          puVar8[6] = 0;
          puVar8[7] = 0;
          lVar11 = lVar11 + -1;
          puVar3 = puVar4;
          puVar8 = puVar8 + 8;
        } while (lVar11 != 0);
      }
      *(undefined8 **)(param_1 + 0xd8) = puVar3;
    }
    puVar4 = operator_new(0x49510);
    puVar3 = puVar12;
    local_330 = puVar4;
    if (puVar4 != (undefined8 *)0x0) {
      *puVar4 = 0;
      puVar4[0x21] = 500;
      puVar4[0x22] = param_1;
      puVar4[0x23] = 0;
      memset(puVar4 + 1,0,0x100);
      FUN_1400a1870(puVar4);
      puVar3 = puVar4;
    }
    *(undefined8 **)(param_1 + 0xe0) = puVar3;
    puVar4 = operator_new(0x49510);
    puVar3 = puVar12;
    local_330 = puVar4;
    if (puVar4 != (undefined8 *)0x0) {
      *puVar4 = 0;
      puVar4[0x21] = 500;
      puVar4[0x22] = param_1;
      puVar4[0x23] = 0;
      memset(puVar4 + 1,0,0x100);
      FUN_1400a1870(puVar4,3);
      puVar3 = puVar4;
    }
    *(undefined8 **)(param_1 + 0xe8) = puVar3;
    puVar3 = operator_new(0x58);
    if (puVar3 != (undefined8 *)0x0) {
      *puVar3 = 0;
      puVar3[1] = 0;
      puVar3[2] = 0;
      *(undefined4 *)(puVar3 + 3) = 0;
      InitializeCriticalSection((LPCRITICAL_SECTION)(puVar3 + 4));
      puVar12 = puVar3;
    }
    *(undefined8 **)(param_1 + 0xf0) = puVar12;
    FUN_1400a1870(*(undefined8 *)(param_1 + 0xe0),2);
    FUN_1400a1e90(*(undefined8 *)(param_1 + 0xe0));
    FUN_1400a1870(*(undefined8 *)(param_1 + 0xe8));
    FUN_1400a1e90(*(undefined8 *)(param_1 + 0xe8));
    memset((void *)(param_1 + 0x188),0,0x420);
    memset((void *)(param_1 + 0x5a8),0,0x140);
    FUN_1400443a0(param_1);
    puVar3 = *(undefined8 **)(param_1 + 0xf0);
    EnterCriticalSection((LPCRITICAL_SECTION)(puVar3 + 4));
    if ((void *)*puVar3 != (void *)0x0) {
      operator_delete__((void *)*puVar3);
      *puVar3 = 0;
    }
    pvVar5 = operator_new(300000);
    *puVar3 = pvVar5;
    puVar3[1] = 300000;
    puVar3[2] = 0;
    *(undefined4 *)(puVar3 + 3) = 0;
    LeaveCriticalSection((LPCRITICAL_SECTION)(puVar3 + 4));
    FUN_1401588f0(0);
    plVar6 = (longlong *)FUN_140179c70();
    *(longlong **)(param_1 + 0x88) = plVar6;
    (**(code **)(*plVar6 + 0x130))(plVar6,param_1);
    (**(code **)(**(longlong **)(param_1 + 0x88) + 0x10))
              (*(longlong **)(param_1 + 0x88),param_1 + 8);
    (**(code **)(**(longlong **)(param_1 + 0x88) + 8))
              (*(longlong **)(param_1 + 0x88),param_1 + 0xa8);
    local_2c8 = CServerConfig::vftable;
    local_238 = '\0';
    memset(local_237,0,0xff);
    GetCurrentDirectoryA(0x104,local_138);
    sprintf(&local_238,"%s\\%s");
    strcpy_s(local_2c0,0x80,&local_238);
    lVar11 = DAT_14032f260;
    *(undefined4 *)(param_1 + 0x98) = *(undefined4 *)(DAT_14032f260 + 0x80);
    puVar3 = (undefined8 *)(lVar11 + 0x30);
    if (7 < *(ulonglong *)(lVar11 + 0x48)) {
      puVar3 = (undefined8 *)*puVar3;
    }
    FUN_14004ce80(param_1 + 0x90,puVar3);
    FUN_14013ba70(param_1 + 0x80);
    local_2c8 = CConfig::vftable;
  }
  if (7 < local_2e0) {
    operator_delete(local_2f8[0]);
  }
  return;
}



void FUN_1400440a0(longlong param_1)

{
  void *pvVar1;
  undefined8 *puVar2;
  longlong lVar3;
  
  puVar2 = *(undefined8 **)(param_1 + 0x49ae0);
  if (puVar2 != (undefined8 *)0x0) {
    (**(code **)*puVar2)(puVar2,1);
  }
  puVar2 = *(undefined8 **)(param_1 + 0x70);
  *(undefined8 *)(param_1 + 0x49ae0) = 0;
  if (puVar2 != (undefined8 *)0x0) {
    (**(code **)*puVar2)(puVar2,1);
  }
  puVar2 = DAT_14032f270;
  *(undefined8 *)(param_1 + 0x70) = 0;
  if (puVar2 != (undefined8 *)0x0) {
    (**(code **)*puVar2)(puVar2,1);
  }
  if (DAT_14032f250 != (undefined8 *)0x0) {
    (**(code **)*DAT_14032f250)(DAT_14032f250,1);
  }
  if (DAT_14032f258 != (undefined8 *)0x0) {
    (**(code **)*DAT_14032f258)(DAT_14032f258,1);
  }
  if (*(longlong *)(param_1 + 0xd8) != 0) {
    FUN_140044250();
    *(undefined8 *)(param_1 + 0xd8) = 0;
  }
  if (*(longlong *)(param_1 + 200) != 0) {
    FUN_140044250();
  }
  *(undefined8 *)(param_1 + 200) = 0;
  puVar2 = (undefined8 *)(param_1 + 0xe0);
  lVar3 = 2;
  do {
    pvVar1 = (void *)*puVar2;
    if (pvVar1 != (void *)0x0) {
      FUN_1400a1cd0(pvVar1);
      operator_delete(pvVar1);
    }
    *puVar2 = 0;
    puVar2 = puVar2 + 1;
    lVar3 = lVar3 + -1;
  } while (lVar3 != 0);
  puVar2 = *(undefined8 **)(param_1 + 0xf0);
  if (puVar2 != (undefined8 *)0x0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(puVar2 + 4));
    if ((void *)*puVar2 != (void *)0x0) {
      operator_delete__((void *)*puVar2);
      *puVar2 = 0;
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(puVar2 + 4));
    DeleteCriticalSection((LPCRITICAL_SECTION)(puVar2 + 4));
    operator_delete(puVar2);
  }
  *(undefined8 *)(param_1 + 0xf0) = 0;
  if (*(void **)(param_1 + 0x6f0) != (void *)0x0) {
    operator_delete__(*(void **)(param_1 + 0x6f0));
    *(undefined8 *)(param_1 + 0x6f0) = 0;
  }
  operator_delete__(*(void **)(param_1 + 0x6e8));
  *(undefined8 *)(param_1 + 0x6e8) = 0;
  puVar2 = *(undefined8 **)(param_1 + 0x88);
  if (puVar2 != (undefined8 *)0x0) {
    (**(code **)*puVar2)(puVar2,1);
  }
  *(undefined8 *)(param_1 + 0x88) = 0;
  return;
}



longlong * FUN_140044250(longlong *param_1)

{
  undefined8 *puVar1;
  longlong *plVar2;
  int iVar3;
  
  iVar3 = 0;
  plVar2 = param_1;
  if ((short)param_1[1000] != 0) {
    do {
      puVar1 = (undefined8 *)*plVar2;
      if (puVar1 != (undefined8 *)0x0) {
        (**(code **)*puVar1)(puVar1,1);
      }
      *plVar2 = 0;
      iVar3 = iVar3 + 1;
      plVar2 = plVar2 + 1;
    } while (iVar3 < (int)(uint)*(ushort *)(param_1 + 1000));
  }
  operator_delete(param_1);
  return param_1;
}



void FUN_1400442c0(longlong param_1)

{
  longlong *plVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  uint uVar4;
  longlong lVar5;
  ulonglong uVar6;
  
  plVar1 = (longlong *)(param_1 + 0xe0);
  lVar5 = 2;
  do {
    if (((longlong *)*plVar1 != (longlong *)0x0) && (*(longlong *)*plVar1 != 0)) {
      FUN_140001e90();
    }
    plVar1 = plVar1 + 1;
    lVar5 = lVar5 + -1;
  } while (lVar5 != 0);
  uVar2 = 0;
  uVar3 = uVar2;
  uVar6 = uVar2;
  if (*(short *)(param_1 + 0xd0) != 0) {
    do {
      (**(code **)(**(longlong **)(*(longlong *)(param_1 + 200) + uVar3) + 0x10))();
      uVar4 = (int)uVar6 + 1;
      uVar3 = uVar3 + 8;
      uVar6 = (ulonglong)uVar4;
    } while ((int)uVar4 < (int)(uint)*(ushort *)(param_1 + 0xd0));
  }
  if ((*(longlong *)(DAT_14032f260 + 0x118) != 0) &&
     (uVar3 = uVar2, *(short *)(param_1 + 0xd0) != 0)) {
    do {
      (**(code **)(**(longlong **)(uVar3 + *(longlong *)(param_1 + 0xd8)) + 0x10))();
      uVar4 = (int)uVar2 + 1;
      uVar2 = (ulonglong)uVar4;
      uVar3 = uVar3 + 8;
    } while ((int)uVar4 < (int)(uint)*(ushort *)(param_1 + 0xd0));
  }
  return;
}



void FUN_1400443a0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined1 auVar1 [16];
  ushort uVar2;
  __uint64 _Var3;
  void *pvVar4;
  ulonglong uVar5;
  ushort uVar6;
  uint uVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  undefined8 uVar12;
  
  uVar12 = 0xfffffffffffffffe;
  uVar6 = (ushort)*(undefined4 *)(DAT_14032f260 + 0x14c);
  *(ushort *)(param_1 + 0xd0) = uVar6;
  uVar2 = 1000;
  if (uVar6 < 0x3e9) {
    uVar2 = uVar6;
  }
  *(ushort *)(param_1 + 0xd0) = uVar2;
  wprintf(L"DBCommandThreadCount\t[%d]\n");
  auVar1 = ZEXT816(4) * ZEXT216(*(ushort *)(param_1 + 0xd0));
  _Var3 = auVar1._0_8_;
  if (auVar1._8_8_ != 0) {
    _Var3 = 0xffffffffffffffff;
  }
  pvVar4 = operator_new(_Var3);
  *(void **)(param_1 + 0x6e8) = pvVar4;
  uVar11 = 0;
  uVar8 = uVar11;
  uVar9 = uVar11;
  uVar10 = uVar11;
  if (*(short *)(param_1 + 0xd0) != 0) {
    do {
      *(undefined4 *)(uVar10 + *(longlong *)(param_1 + 0x6e8)) = 0;
      pvVar4 = operator_new(0x2dc730);
      uVar5 = uVar11;
      if (pvVar4 != (void *)0x0) {
        uVar5 = FUN_1400a16f0(pvVar4,param_1,3,param_4,uVar12);
      }
      *(ulonglong *)(uVar9 + *(longlong *)(param_1 + 200)) = uVar5;
      uVar7 = (int)uVar8 + 1;
      uVar8 = (ulonglong)uVar7;
      uVar9 = uVar9 + 8;
      uVar10 = uVar10 + 4;
    } while ((int)uVar7 < (int)(uint)*(ushort *)(param_1 + 0xd0));
  }
  FUN_140047160(*(undefined8 *)(param_1 + 200),*(undefined2 *)(param_1 + 0xd0));
  if (*(longlong *)(DAT_14032f260 + 0x118) != 0) {
    auVar1 = ZEXT816(4) * ZEXT216(*(ushort *)(param_1 + 0xd0));
    _Var3 = auVar1._0_8_;
    if (auVar1._8_8_ != 0) {
      _Var3 = 0xffffffffffffffff;
    }
    pvVar4 = operator_new(_Var3);
    *(void **)(param_1 + 0x6f0) = pvVar4;
    uVar8 = uVar11;
    uVar9 = uVar11;
    uVar10 = uVar11;
    if (*(short *)(param_1 + 0xd0) != 0) {
      do {
        *(undefined4 *)(uVar10 + *(longlong *)(param_1 + 0x6f0)) = 0;
        pvVar4 = operator_new(0x2dc730);
        uVar5 = uVar11;
        if (pvVar4 != (void *)0x0) {
          uVar5 = FUN_1400a16f0(pvVar4,param_1,4);
        }
        *(ulonglong *)(uVar9 + *(longlong *)(param_1 + 0xd8)) = uVar5;
        uVar7 = (int)uVar8 + 1;
        uVar8 = (ulonglong)uVar7;
        uVar9 = uVar9 + 8;
        uVar10 = uVar10 + 4;
      } while ((int)uVar7 < (int)(uint)*(ushort *)(param_1 + 0xd0));
    }
    FUN_140047160(*(undefined8 *)(param_1 + 0xd8),*(undefined2 *)(param_1 + 0xd0));
  }
  return;
}



int FUN_140044590(longlong param_1)

{
  double dVar1;
  undefined8 *puVar2;
  uint *puVar3;
  uint *puVar4;
  DWORD DVar5;
  undefined4 uVar6;
  DWORD DVar7;
  int iVar8;
  int iVar9;
  void *pvVar10;
  longlong *plVar11;
  longlong *plVar12;
  uint uVar13;
  ulonglong uVar15;
  longlong *plVar16;
  longlong lVar17;
  undefined4 uVar18;
  undefined4 uVar19;
  undefined4 uVar20;
  undefined4 uVar21;
  undefined4 uVar22;
  undefined4 uVar23;
  undefined4 uVar24;
  longlong *local_res8;
  undefined4 local_c0;
  undefined8 local_bc;
  undefined2 local_b4;
  uint local_b2;
  undefined2 local_ae;
  char *local_a8;
  DWORD local_a0;
  longlong *plVar14;
  
  iVar8 = 2;
  plVar16 = (longlong *)0x0;
  GetTickCount();
  GetTickCount();
  pvVar10 = operator_new(0x18);
  plVar11 = plVar16;
  if (pvVar10 != (void *)0x0) {
    plVar11 = (longlong *)FUN_140205630(pvVar10);
  }
  plVar12 = DAT_14032f250;
  puVar2 = (undefined8 *)DAT_14032f250[2];
  if (puVar2 != (undefined8 *)0x0) {
    (**(code **)*puVar2)(puVar2,1);
    plVar12[2] = 0;
  }
  plVar12[2] = (longlong)plVar11;
  if (plVar11 != (longlong *)0x0) {
    lVar17 = (**(code **)(*plVar11 + 8))(plVar11);
    plVar12[6] = lVar17;
    plVar12[7] = lVar17;
  }
  plVar12[0x12] = 0x3ff0000000000000;
  plVar12 = operator_new(0x28);
  plVar11 = plVar16;
  local_res8 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    *plVar12 = (longlong)Magi::Timer::vftable;
    plVar11 = DAT_14032f250;
    plVar12[1] = (longlong)DAT_14032f250;
    plVar12[2] = 0;
    plVar12[3] = 0;
    *(undefined1 *)(plVar12 + 4) = 0;
    *(undefined4 *)((longlong)plVar12 + 0x24) = 0x3f800000;
    (**(code **)(*plVar11 + 0x10))(plVar11,plVar12);
    plVar11 = plVar12;
  }
  *(longlong **)(param_1 + 0x49ae0) = plVar11;
  uVar18 = 0;
  uVar19 = 0;
  uVar20 = (undefined4)plVar11[2];
  uVar21 = (undefined4)((ulonglong)plVar11[2] >> 0x20);
  FUN_14013b5a0(param_1 + 0x40,*(undefined8 *)(param_1 + 0x70));
  local_res8 = (longlong *)CONCAT44(local_res8._4_4_,5);
  *(undefined4 *)(param_1 + 0x48) = 5;
  if (DAT_14032f034 != 0) {
    printf("********************************\n");
    timeGetTime();
    printf("** Server Load Time : %u sec\n");
    printf("********************************\n");
  }
  printf("STEP : SERVER_RUN \n");
  lVar17 = *(longlong *)(param_1 + 0x70);
  plVar11 = plVar16;
  uVar23 = uVar18;
  uVar24 = uVar19;
  if ((lVar17 != 0) && (*(char *)(lVar17 + 0x1a) != '\0')) {
    (**(code **)(*(longlong *)(lVar17 + 0x68) + 0xb0))
              ((longlong *)(lVar17 + 0x68),1,&DAT_1403200f0,&local_res8);
  }
  do {
    Sleep(10);
    FUN_1402059f0(DAT_14032f250);
    dVar1 = *(double *)(*(longlong *)(param_1 + 0x49ae0) + 0x10);
    local_a8 = "AgentSession->Process";
    DVar5 = timeGetTime();
    local_a0 = DVar5;
    if ((*(longlong *)(param_1 + 0x70) != 0) && (*(char *)(DAT_14032f260 + 0x150) != '\0')) {
      FUN_140143f50(*(longlong *)(param_1 + 0x70),dVar1);
      if ((*(longlong *)(param_1 + 0x70) != 0) &&
         ((*(char *)(*(longlong *)(param_1 + 0x70) + 0x1a) != '\0' &&
          (*(double *)(param_1 + 0x78) + 1.0 <= dVar1)))) {
        *(double *)(param_1 + 0x78) = dVar1;
        uVar13 = 0;
        if (*(short *)(param_1 + 0xd0) != 0) {
          plVar12 = *(longlong **)(param_1 + 200);
          uVar15 = (ulonglong)*(ushort *)(param_1 + 0xd0);
          plVar14 = plVar16;
          do {
            uVar13 = (int)plVar14 + *(int *)(*(longlong *)(*plVar12 + 0x18) + 0x18);
            plVar14 = (longlong *)(ulonglong)uVar13;
            plVar12 = plVar12 + 1;
            uVar15 = uVar15 - 1;
          } while (uVar15 != 0);
        }
        if (*(longlong **)(param_1 + 0x88) != (longlong *)0x0) {
          uVar6 = (**(code **)(**(longlong **)(param_1 + 0x88) + 0xa8))();
          FUN_140143720(*(undefined8 *)(param_1 + 0x70),uVar6,uVar13);
        }
      }
    }
    DVar7 = timeGetTime();
    if ((0x32 < DVar7 - DVar5) && (DAT_14032f258 != 0)) {
      FUN_140202ec0(DAT_14032f258,"% 9d [ ms ] %s\n",DVar7 - DVar5,"AgentSession->Process");
    }
    uVar6 = SUB84(dVar1,0);
    uVar22 = (undefined4)((ulonglong)dVar1 >> 0x20);
    if (DAT_14032efdc == 0) {
      if ((10.0 < dVar1 - (double)CONCAT44(uVar21,uVar20)) &&
         (uVar20 = uVar6, uVar21 = uVar22, DAT_14032efd4 != 0)) {
        FUN_140044ea0(param_1);
      }
      lVar17 = *(longlong *)(param_1 + 0xf0);
      if ((lVar17 != 0) && (0 < *(int *)(lVar17 + 0x18))) {
        iVar8 = FUN_1400a15d0(lVar17,param_1 + 0x6fc);
        while (iVar8 == 1) {
          FUN_14011b960(param_1,param_1 + 0x6fc);
          iVar8 = FUN_1400a15d0(*(undefined8 *)(param_1 + 0xf0),param_1 + 0x6fc);
        }
      }
      iVar8 = FUN_140044ff0(param_1);
      if (DAT_14032efd8 != 0) {
        DAT_14032efd8 = 0;
        wprintf(L"-DBC SERVER [CODE:%d]-----------------------------------------------------\n");
        wprintf(L"PRIVATE NETWORK : ADDRESS[ %s ] PORT[ %d ]\n");
        if ((0 < *(int *)(param_1 + 0x9c)) && (*(int *)(param_1 + 0xa0) != 0)) {
          wprintf(L"UDP : PORT [ %d ] COUNT [ %d ]\n");
        }
        FUN_14013b640(param_1 + 0x40);
      }
      if (DAT_14032efe8 != '\0') {
        DAT_14032efe8 = '\0';
        FUN_14011c730(param_1);
      }
      if (DAT_14032efe9 != '\0') {
        DAT_14032efe9 = '\0';
        FUN_14005b0a0(param_1);
        FUN_14005b140(param_1);
        FUN_14005b1e0(param_1);
        FUN_14005b280(param_1);
        FUN_14005b320(param_1);
        FUN_14005b3c0(param_1);
      }
    }
    if ((iVar8 != 2) && ((int)plVar11 == 0)) {
      plVar11 = (longlong *)0x1;
    }
    if ((DAT_14032efdc == 1) && ((int)plVar11 == 0)) {
      plVar11 = (longlong *)0x1;
      FUN_1400a0b40(&DAT_14032f060,"ShutDown.Log","CDBCServer::Poll()");
    }
    if (*(char *)(param_1 + 0x30) != '\0') {
      printf("Agent Shutdown\n");
      DAT_14032efdc = 1;
    }
    if (*(char *)(param_1 + 0x35) == '\0') {
LAB_140044ad1:
      if (*(char *)(param_1 + 0x36) != '\0') goto LAB_140044ad7;
    }
    else {
      local_bc = 0;
      local_b4 = 0;
      local_c0 = 0x514000e;
      iVar9 = FUN_1400d54f0(*(undefined8 *)(param_1 + 0xe8),&local_c0);
      printf("CHARACTER_DELETE_TABLE COUNT : %d \n");
      local_res8 = (longlong *)CONCAT44(local_res8._4_4_,iVar9);
      plVar12 = (longlong *)(*(longlong *)(param_1 + 0x70) + 0x68);
      (**(code **)(*plVar12 + 0xd0))(plVar12,1,&DAT_1403200f0,&local_res8);
      if (iVar9 != 0) {
        if (iVar9 < 0) {
          *(undefined2 *)(param_1 + 0x35) = 0x100;
          printf("CHARACTER_DELETE_TABLE DB Error\n");
        }
        goto LAB_140044ad1;
      }
      *(undefined2 *)(param_1 + 0x35) = 0x100;
LAB_140044ad7:
      plVar12 = (longlong *)(*(longlong *)(param_1 + 0x70) + 0x68);
      (**(code **)(*plVar12 + 0xe0))(plVar12,1,&DAT_1403200f0);
      *(undefined1 *)(param_1 + 0x36) = 0;
    }
    lVar17 = DAT_14032f260;
    if ((int)plVar11 == 1) {
      do {
        plVar11 = plVar16;
        plVar12 = plVar16;
        plVar14 = plVar16;
        if (*(short *)(param_1 + 0xd0) != 0) {
          do {
            if ((*(int *)(*(longlong *)
                           (*(longlong *)((longlong)plVar12 + *(longlong *)(param_1 + 200)) + 0x18)
                         + 0x18) < 1) &&
               (*(int *)(*(longlong *)(param_1 + 0x6e8) + (longlong)plVar11) == 0)) {
              *(undefined4 *)(*(longlong *)(param_1 + 0x6e8) + (longlong)plVar11) = 1;
            }
            if (((*(longlong *)(lVar17 + 0x118) != 0) &&
                (*(int *)(*(longlong *)
                           (*(longlong *)((longlong)plVar12 + *(longlong *)(param_1 + 200)) + 0x18)
                         + 0x18) < 1)) &&
               (*(int *)(*(longlong *)(param_1 + 0x6f0) + (longlong)plVar11) == 0)) {
              *(undefined4 *)(*(longlong *)(param_1 + 0x6f0) + (longlong)plVar11) = 1;
            }
            uVar13 = (int)plVar14 + 1;
            plVar11 = (longlong *)((longlong)plVar11 + 4);
            plVar12 = plVar12 + 1;
            plVar14 = (longlong *)(ulonglong)uVar13;
          } while ((int)uVar13 < (int)(uint)*(ushort *)(param_1 + 0xd0));
        }
        plVar11 = plVar16;
        plVar12 = plVar16;
        while( true ) {
          if ((int)(uint)*(ushort *)(param_1 + 0xd0) <= (int)plVar12) {
            lVar17 = param_1 + 0x150;
            local_a8 = (char *)lVar17;
            FUN_140156b50(lVar17);
            local_a0 = CONCAT31(local_a0._1_3_,1);
            plVar11 = plVar16;
            if (*(longlong *)(param_1 + 0x118) != 0) {
              plVar11 = *(longlong **)(param_1 + 0x108);
            }
            goto joined_r0x000140044d47;
          }
          if ((*(int *)((longlong)plVar11 + *(longlong *)(param_1 + 0x6e8)) == 0) ||
             ((*(longlong *)(lVar17 + 0x118) != 0 &&
              (*(int *)((longlong)plVar11 + *(longlong *)(param_1 + 0x6f0)) == 0)))) break;
          plVar12 = (longlong *)(ulonglong)((int)plVar12 + 1);
          plVar11 = (longlong *)((longlong)plVar11 + 4);
        }
      } while( true );
    }
    if (DAT_14032efe7 != '\0') {
      printf("RetryConnectSession\n");
      iVar9 = (int)(*(longlong *)(param_1 + 0x58) - *(longlong *)(param_1 + 0x50) >> 3);
      plVar12 = plVar16;
      if (0 < iVar9) {
        do {
          if (*(longlong *)(*(longlong *)(param_1 + 0x50) + (longlong)plVar12 * 8) != 0) {
            *(undefined1 *)
             (*(longlong *)(*(longlong *)(param_1 + 0x50) + (longlong)plVar12 * 8) + 0x1c) = 1;
          }
          plVar12 = (longlong *)((longlong)plVar12 + 1);
        } while ((longlong)plVar12 < (longlong)iVar9);
      }
      DAT_14032efe7 = DAT_14032efe7 == '\0';
    }
    if (0.03333333507180214 <= dVar1 - (double)CONCAT44(uVar19,uVar18)) {
      *(int *)(param_1 + 0x49af0) = *(int *)(param_1 + 0x49af0) + 1;
      uVar18 = uVar6;
      uVar19 = uVar22;
    }
    if (1.0 <= dVar1 - (double)CONCAT44(uVar24,uVar23)) {
      DAT_14032eff0 = *(undefined4 *)(param_1 + 0x49af0);
      *(undefined4 *)(param_1 + 0x49af0) = 0;
      uVar23 = uVar6;
      uVar24 = uVar22;
      if ((DAT_14032efea != '\0') && (*(longlong *)(param_1 + 0xf0) != 0)) {
        iVar9 = *(int *)(*(longlong *)(param_1 + 0xf0) + 0x18);
        printf("FPS : %d\n");
        if (0 < iVar9) {
          printf("Result Queue Count : %d\n");
        }
        plVar12 = plVar16;
        plVar14 = plVar16;
        if (*(short *)(param_1 + 0xd0) != 0) {
          do {
            if (0 < *(int *)(*(longlong *)
                              (*(longlong *)((longlong)plVar12 + *(longlong *)(param_1 + 200)) +
                              0x18) + 0x18)) {
              printf("Write Queue Count Index[%d]: %d\n");
            }
            uVar13 = (int)plVar14 + 1;
            plVar12 = plVar12 + 1;
            plVar14 = (longlong *)(ulonglong)uVar13;
          } while ((int)uVar13 < (int)(uint)*(ushort *)(param_1 + 0xd0));
        }
      }
    }
    *(double *)(param_1 + 0x49ae8) = dVar1;
  } while( true );
joined_r0x000140044d47:
  do {
    do {
      if (plVar11 == (longlong *)0x0) {
        FUN_140045850(param_1 + 0xf8);
        FUN_140156be0(lVar17);
        return iVar8;
      }
      if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005,0x465,0x14);
      }
      plVar12 = plVar16;
      if (plVar11 != (longlong *)0x0) {
        plVar12 = (longlong *)plVar11[2];
      }
      plVar14 = plVar11 + 1;
      plVar11 = plVar12;
    } while (((undefined8 *)*plVar14 == (undefined8 *)0x0) ||
            (puVar3 = *(uint **)*plVar14, puVar3 == (uint *)0x0));
    local_ae = (undefined2)puVar3[1];
    local_b2 = *puVar3;
    local_b4 = 0;
    local_c0 = 0x4650014;
    local_bc = 0;
    FUN_140118840(*(undefined8 *)(param_1 + 0xe0));
    uVar15 = (ulonglong)*puVar3 % (ulonglong)*(uint *)(param_1 + 0x120);
  } while (*(longlong *)(param_1 + 0x100) == 0);
  puVar4 = *(uint **)(*(longlong *)(param_1 + 0x100) + uVar15 * 8);
  while( true ) {
    if ((puVar4 == (uint *)0x0) || ((uint)uVar15 != puVar4[8] % *(uint *)(param_1 + 0x120)))
    goto joined_r0x000140044d47;
    if (*puVar4 == *puVar3) break;
    puVar4 = *(uint **)(puVar4 + 4);
  }
  FUN_140045d00(param_1 + 0xf8,puVar4);
  goto joined_r0x000140044d47;
}



void FUN_140044ea0(longlong param_1)

{
  undefined8 uVar1;
  int iVar2;
  longlong lVar3;
  uint *puVar4;
  ulonglong uVar5;
  
  FUN_140148cd0(L"PROTOCOL COUNT---------------------\n");
  iVar2 = 0x2ee1;
  puVar4 = (uint *)(param_1 + 0x18c);
  lVar3 = 0x107;
  do {
    uVar5 = (ulonglong)*puVar4;
    if (0 < (int)*puVar4) {
      uVar1 = FUN_140042960(iVar2);
      FUN_140148cd0(L"Count [%d]\t PROTOCOL [%d] %s\n",uVar5 & 0xffffffff,iVar2,uVar1);
    }
    iVar2 = iVar2 + 1;
    puVar4 = puVar4 + 1;
    lVar3 = lVar3 + -1;
  } while (lVar3 != 0);
  FUN_140148cd0(L"Resp-------------------------------\n");
  iVar2 = 0x2af9;
  puVar4 = (uint *)(param_1 + 0x5ac);
  lVar3 = 0x4f;
  do {
    uVar5 = (ulonglong)*puVar4;
    if (0 < (int)*puVar4) {
      uVar1 = FUN_140042570(iVar2);
      FUN_140148cd0(L"Count [%d]\t PROTOCOL [%d] %s\n",uVar5 & 0xffffffff,iVar2,uVar1);
    }
    iVar2 = iVar2 + 1;
    puVar4 = puVar4 + 1;
    lVar3 = lVar3 + -1;
  } while (lVar3 != 0);
  FUN_140148cd0(L"-----------------------------------\n");
  FUN_140148cd0(L"Request Queue : Max[%d] MaxLen[%d]\n",DAT_14032eff8,DAT_14032f000);
  FUN_140148cd0(L"Result  Queue : Max[%d] MaxLen[%d]\n",DAT_14032effc,DAT_14032f004);
  FUN_140148cd0(L"-----------------------------------\n");
  memset((void *)(param_1 + 0x18c),0,0x41c);
  memset((void *)(param_1 + 0x5ac),0,0x13c);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140044ff0(longlong param_1)

{
  longlong *plVar1;
  ushort uVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  undefined **ppuVar6;
  longlong lVar7;
  int *piVar8;
  undefined1 auStack_d8 [32];
  undefined8 local_b8;
  undefined8 local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 local_70;
  undefined4 local_68;
  undefined1 local_58;
  undefined7 uStack_57;
  undefined8 local_48;
  ulonglong local_40;
  ulonglong local_30;
  
  local_30 = DAT_1403223c0 ^ (ulonglong)auStack_d8;
  iVar3 = _kbhit();
  while (iVar3 != 0) {
    iVar3 = _getch();
    iVar3 = (int)(char)iVar3;
    if (*(int *)(param_1 + 0x6f8) == 0) {
      iVar4 = toupper(iVar3);
      switch(iVar4) {
      case 0x30:
        FUN_1401409f0(DAT_14032f260);
        printf("%s\n");
        break;
      case 0x31:
        DAT_14032efd4 = (uint)(DAT_14032efd4 == 0);
        printf("%s %s\n");
        break;
      case 0x32:
        *(bool *)(param_1 + 0x35) = *(char *)(param_1 + 0x35) == '\0';
        printf("%s %s\n");
        break;
      default:
        printf("........... Message : Unknown Control Command.\n");
        break;
      case 0x39:
        FUN_140113340(*(undefined8 *)(param_1 + 0xe0));
        printf("%s\n");
        break;
      case 0x41:
        DAT_14032efe9 = DAT_14032efe9 == '\0';
        printf("%s %s\n");
        break;
      case 0x43:
        printf("PROTOCOL COUNT CLEAR---------------\n");
        memset((void *)(param_1 + 0x18c),0,0x41c);
        printf("Resp-------------------------------\n");
        memset((void *)(param_1 + 0x5ac),0,0x13c);
        printf("-----------------------------------\n");
        printf("%s\n");
        break;
      case 0x45:
        DAT_14032efdc = 1;
        printf("Shutdown\n");
        return 0;
      case 0x46:
        DAT_14032efd8 = 1;
        printf("%s\n");
        break;
      case 0x4c:
        *(undefined4 *)(param_1 + 0x6f8) = 1;
        printf("%s %s\n");
        break;
      case 0x4d:
        FUN_1401447c0(DAT_14032f268);
        if (*(longlong *)(param_1 + 0x70) != 0) {
          *(undefined1 *)(*(longlong *)(param_1 + 0x70) + 0x18) =
               *(undefined1 *)(DAT_14032f268 + 0x16);
        }
        printf("%s\n");
        break;
      case 0x4f:
        DAT_14032efe8 = DAT_14032efe8 == '\0';
        printf("%s %s\n");
        break;
      case 0x50:
        plVar1 = *(longlong **)(param_1 + 0x88);
        if (plVar1 != (longlong *)0x0) {
          local_78 = 0;
          local_b0 = 0;
          local_b8 = 0;
          local_a0 = 0;
          local_a8 = 0;
          local_80 = 0;
          local_88 = 0;
          local_90 = 0;
          local_98 = 0;
          local_70 = 0;
          local_68 = 0;
          (**(code **)(*plVar1 + 0xb0))(plVar1,&local_b8);
          printf("--------------------------------------------------\n");
          printf("%I64u totalTcpReceiveCount\n");
          printf("%I64u totalTcpReceiveBytes\n");
          printf("%I64u totalTcpSendCount\n");
          printf("%I64u totalTcpSendBytes\n");
          printf("%u p2pConnectionPairCount\n");
          printf("%u p2pDirectConnectionPairCount\n");
          printf("%u clientCount\n");
          printf("--------------------------------------------------\n");
        }
        printf("%s\n");
        break;
      case 0x51:
        FUN_1400442c0(param_1);
        printf("%s\n");
        break;
      case 0x52:
        DAT_14032efea = DAT_14032efea == '\0';
        printf("%s %s\n");
        break;
      case 0x53:
        printf("PROTOCOL COUNT---------------------\n");
        timeGetTime();
        printf("ELAPSED TIME : %uo %um %us---------------\n");
        iVar4 = 0x2ee1;
        piVar8 = (int *)(param_1 + 0x18c);
        lVar7 = 0x107;
        do {
          if (0 < *piVar8) {
            FUN_140042960(iVar4);
            wprintf(L"Count [%d]\t PROTOCOL [%d] %s\n");
          }
          iVar4 = iVar4 + 1;
          piVar8 = piVar8 + 1;
          lVar7 = lVar7 + -1;
        } while (lVar7 != 0);
        printf("Resp-------------------------------\n");
        iVar4 = 0x2af9;
        piVar8 = (int *)(param_1 + 0x5ac);
        lVar7 = 0x4f;
        do {
          if (0 < *piVar8) {
            FUN_140042570(iVar4);
            wprintf(L"Count [%d]\t PROTOCOL [%d] %s\n");
          }
          iVar4 = iVar4 + 1;
          piVar8 = piVar8 + 1;
          lVar7 = lVar7 + -1;
        } while (lVar7 != 0);
        printf("-----------------------------------\n");
        wprintf(L"Request Queue : Max[%d] MaxLen[%d]\n");
        wprintf(L"Result  Queue : Max[%d] MaxLen[%d]\n");
        printf("-----------------------------------\n");
        printf("%s\n");
        break;
      case 0x54:
        DAT_14032efe7 = DAT_14032efe7 == '\0';
        printf("%s %s\n");
        break;
      case 0x56:
        uVar5 = FUN_1402054d0();
        FUN_1402037f0(uVar5);
        printf("%s\n");
      }
    }
    else {
      iVar4 = toupper(iVar3);
      if (iVar4 == 0x55) {
        *(undefined4 *)(param_1 + 0x6f8) = 0;
        printf("%s\n");
        ppuVar6 = &PTR_s_Server_Shutdown__1403276f8;
        do {
          uVar2 = GetAsyncKeyState(0xa0);
          if (((uVar2 & 0x8001) != 0) || (*(char *)(ppuVar6 + 1) == '\0')) {
            printf(" \'%c\'\t: %s\n");
          }
          ppuVar6 = ppuVar6 + 3;
        } while ((longlong)ppuVar6 < 0x1403278c0);
      }
    }
    iVar3 = toupper(iVar3);
    if (iVar3 == 0x49) {
      printf("%s\n");
      printf("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n");
      GetCurrentProcessId();
      printf("ProcessID : %u\n");
      printf("SVN : %d\n");
      printf("Resource : %d\n");
      printf("Build Date : %s\n");
      FUN_140202ae0(&local_58);
      printf("PROTOCOL : %s\n");
      if (0xf < local_40) {
        operator_delete((void *)CONCAT71(uStack_57,local_58));
      }
      local_40 = 0xf;
      local_48 = 0;
      local_58 = 0;
      printf("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n");
    }
    iVar3 = _kbhit();
  }
  return 2;
}



undefined8 * FUN_1400457d0(longlong *param_1,undefined8 *param_2,int param_3)

{
  int iVar1;
  undefined *puVar2;
  
  puVar2 = (undefined *)*param_1;
  if (param_3 < 0) {
    param_3 = 0;
  }
  iVar1 = 0;
  if ((puVar2 != (undefined *)0x0) && (iVar1 = 0, puVar2 != PTR_DAT_1403200a0)) {
    iVar1 = *(int *)(puVar2 + -8);
  }
  if (iVar1 <= param_3) {
    FUN_1401568c0();
    *param_2 = PTR_DAT_1403200a0;
    FUN_14004f4f0(param_2,param_1);
    return param_2;
  }
  if (puVar2 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  FUN_14004f400(param_2,puVar2);
  return param_2;
}



void FUN_140045850(longlong param_1)

{
  uint uVar1;
  ulonglong uVar2;
  longlong lVar3;
  longlong lVar4;
  float fVar5;
  float fVar6;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_140045aa0();
  lVar3 = *(longlong *)(param_1 + 0x10);
  while (lVar3 != 0) {
    lVar3 = *(longlong *)(lVar3 + 0x10);
    FUN_140045c50(param_1);
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_140045aa0(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar1 = FUN_140045bd0(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    lVar3 = 0;
    *(uint *)(param_1 + 0x28) = uVar1;
    fVar6 = (float)uVar1 * *(float *)(param_1 + 0x34);
    if ((9.223372e+18 < fVar6) && (fVar6 = fVar6 - 9.223372e+18, fVar6 < 9.223372e+18)) {
      lVar3 = -0x8000000000000000;
    }
    fVar5 = (float)uVar1 * *(float *)(param_1 + 0x30);
    lVar4 = 0;
    *(longlong *)(param_1 + 0x38) = (longlong)fVar6 + lVar3;
    if ((9.223372e+18 < fVar5) && (fVar5 = fVar5 - 9.223372e+18, fVar5 < 9.223372e+18)) {
      lVar4 = -0x8000000000000000;
    }
    uVar2 = (longlong)fVar5 + lVar4;
    if ((ulonglong)((longlong)fVar5 + lVar4) < 0x11) {
      uVar2 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar2;
  }
  FUN_140045aa0(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



void FUN_140045960(void)

{
  FUN_140045850();
  return;
}



void FUN_140045980(undefined8 *param_1)

{
  if ((void *)*param_1 != (void *)0x0) {
    operator_delete((void *)*param_1);
  }
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  return;
}



undefined8 FUN_1400459b0(longlong param_1,uint param_2,char param_3)

{
  void *_Dst;
  ulonglong uVar1;
  longlong lVar2;
  longlong lVar3;
  size_t _Size;
  float fVar4;
  float fVar5;
  
  if (*(longlong *)(param_1 + 8) != 0) {
    FUN_140156970();
    *(undefined8 *)(param_1 + 8) = 0;
  }
  if (param_3 != '\0') {
    _Size = (ulonglong)param_2 << 3;
    _Dst = (void *)FUN_140156940(_Size);
    *(void **)(param_1 + 8) = _Dst;
    if (_Dst == (void *)0x0) {
      return 0;
    }
    memset(_Dst,0,_Size);
  }
  lVar2 = 0;
  *(uint *)(param_1 + 0x28) = param_2;
  fVar4 = (float)param_2;
  fVar5 = fVar4 * *(float *)(param_1 + 0x34);
  if ((9.223372e+18 < fVar5) && (fVar5 = fVar5 - 9.223372e+18, fVar5 < 9.223372e+18)) {
    lVar2 = -0x8000000000000000;
  }
  fVar4 = fVar4 * *(float *)(param_1 + 0x30);
  lVar3 = 0;
  *(longlong *)(param_1 + 0x38) = (longlong)fVar5 + lVar2;
  if ((9.223372e+18 < fVar4) && (fVar4 = fVar4 - 9.223372e+18, fVar4 < 9.223372e+18)) {
    lVar3 = -0x8000000000000000;
  }
  uVar1 = (longlong)fVar4 + lVar3;
  if ((ulonglong)((longlong)fVar4 + lVar3) < 0x11) {
    uVar1 = 0;
  }
  *(ulonglong *)(param_1 + 0x40) = uVar1;
  return CONCAT71((int7)(uVar1 >> 8),1);
}



void FUN_140045aa0(char *param_1)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  int iVar4;
  undefined1 local_58 [88];
  
  if (*param_1 != '\0') {
    iVar4 = 0;
    if ((*(longlong *)(param_1 + 0x20) != 0) && (*(longlong *)(param_1 + 8) == 0)) {
      FUN_140156300(local_58,L"CFastMap consistency error #0!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    lVar1 = *(longlong *)(param_1 + 0x10);
    lVar3 = lVar1;
    while (lVar3 != 0) {
      lVar2 = *(longlong *)(lVar3 + 0x10);
      if ((lVar2 != 0) && (*(longlong *)(lVar2 + 0x18) != lVar3)) {
        FUN_140156300(local_58,L"CFastMap consistency error #1!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      if ((lVar3 == lVar1) && (*(longlong *)(lVar3 + 0x18) != 0)) {
        FUN_140156300(local_58,L"CFastMap consistency error #2!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      if ((lVar3 == *(longlong *)(param_1 + 0x18)) && (lVar2 != 0)) {
        FUN_140156300(local_58,L"CFastMap consistency error #3!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      iVar4 = iVar4 + 1;
      lVar3 = lVar2;
    }
    if (iVar4 != *(int *)(param_1 + 0x20)) {
      for (; lVar1 != 0; lVar1 = *(longlong *)(lVar1 + 0x10)) {
      }
      FUN_140156300(local_58,L"CFastMap consistency error #4!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
  }
  return;
}



uint FUN_140045bd0(longlong param_1,longlong param_2)

{
  uint uVar1;
  longlong lVar2;
  uint *puVar3;
  int iVar4;
  uint uVar5;
  float fVar6;
  
  fVar6 = (float)param_2;
  if (param_2 < 0) {
    fVar6 = fVar6 + 1.8446744e+19;
  }
  fVar6 = fVar6 / *(float *)(param_1 + 0x2c);
  lVar2 = 0;
  if ((9.223372e+18 < fVar6) && (fVar6 = fVar6 - 9.223372e+18, fVar6 < 9.223372e+18)) {
    lVar2 = -0x8000000000000000;
  }
  uVar5 = (uint)((longlong)fVar6 + lVar2);
  if (0xffffffff < (ulonglong)((longlong)fVar6 + lVar2)) {
    uVar5 = 0xffffffff;
  }
  iVar4 = 0;
  if (0x11 < uVar5) {
    puVar3 = &DAT_1402877f0;
    do {
      puVar3 = puVar3 + 1;
      iVar4 = iVar4 + 1;
    } while (*puVar3 < uVar5);
  }
  uVar1 = (&DAT_1402877f0)[iVar4];
  if ((&DAT_1402877f0)[iVar4] == 0xffffffff) {
    uVar1 = uVar5;
  }
  return uVar1;
}



void FUN_140045c50(longlong param_1,longlong param_2)

{
  undefined8 *puVar1;
  void *pvVar2;
  longlong *plVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if ((*(longlong *)(param_2 + 8) != 0) &&
     (*(longlong *)(*(longlong *)(param_2 + 8) + 8) =
           *(longlong *)(*(longlong *)(param_2 + 8) + 8) + -1,
     *(longlong *)(*(longlong *)(param_2 + 8) + 8) == 0)) {
    puVar1 = *(undefined8 **)(param_2 + 8);
    pvVar2 = (void *)*puVar1;
    if (pvVar2 != (void *)0x0) {
      operator_delete(pvVar2);
    }
    FUN_140156970(puVar1);
  }
  plVar3 = *(longlong **)(param_1 + 0x50);
  if (plVar3 != (longlong *)0x0) {
    (**(code **)(*plVar3 + 0x18))(plVar3,param_2);
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    return;
  }
  FUN_140156970(param_2);
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
  return;
}



void FUN_140045d00(longlong param_1,longlong param_2)

{
  uint uVar1;
  ulonglong uVar2;
  uint uVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar1 = *(uint *)(param_1 + 0x28);
  uVar2 = (ulonglong)*(uint *)(param_2 + 0x20) % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x20) == 1) {
    *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    *(undefined8 *)(param_1 + 0x10) = 0;
    *(undefined8 *)(param_1 + 0x18) = 0;
  }
  else {
    uVar3 = (uint)uVar2;
    if (((*(longlong *)(param_2 + 0x18) == 0) ||
        (*(uint *)(*(longlong *)(param_2 + 0x18) + 0x20) % uVar1 != uVar3)) &&
       ((*(longlong *)(param_2 + 0x10) == 0 ||
        (*(uint *)(*(longlong *)(param_2 + 0x10) + 0x20) % uVar1 != uVar3)))) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    }
    else if (param_2 == *(longlong *)(*(longlong *)(param_1 + 8) + (longlong)(int)uVar3 * 8)) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = *(undefined8 *)(param_2 + 0x10);
    }
    if (param_2 == *(longlong *)(param_1 + 0x10)) {
      *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_2 + 0x10);
      *(undefined8 *)(param_2 + 0x18) = 0;
    }
    if (param_2 == *(longlong *)(param_1 + 0x18)) {
      *(undefined8 *)(param_1 + 0x18) = *(undefined8 *)(param_2 + 0x18);
      *(undefined8 *)(param_2 + 0x10) = 0;
    }
    if (*(longlong *)(param_2 + 0x18) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x18) + 0x10) = *(undefined8 *)(param_2 + 0x10);
    }
    if (*(longlong *)(param_2 + 0x10) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x10) + 0x18) = *(undefined8 *)(param_2 + 0x18);
    }
  }
  FUN_140045c50(param_1,param_2);
  FUN_140045aa0(param_1);
  return;
}



void FUN_140045e00(longlong param_1,uint param_2)

{
  ulonglong uVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  void *_Dst;
  longlong lVar5;
  longlong lVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  int iVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  float fVar12;
  float fVar13;
  
  if (param_2 == 0) {
    param_2 = FUN_140045bd0();
  }
  if (param_2 != *(uint *)(param_1 + 0x28)) {
    if (*(longlong *)(param_1 + 8) == 0) {
      lVar5 = 0;
      *(uint *)(param_1 + 0x28) = param_2;
      fVar13 = (float)param_2 * *(float *)(param_1 + 0x34);
      if ((9.223372e+18 < fVar13) && (fVar13 = fVar13 - 9.223372e+18, fVar13 < 9.223372e+18)) {
        lVar5 = -0x8000000000000000;
      }
      fVar12 = (float)param_2 * *(float *)(param_1 + 0x30);
      lVar6 = 0;
      *(longlong *)(param_1 + 0x38) = (longlong)fVar13 + lVar5;
      if ((9.223372e+18 < fVar12) && (fVar12 = fVar12 - 9.223372e+18, fVar12 < 9.223372e+18)) {
        lVar6 = -0x8000000000000000;
      }
      *(longlong *)(param_1 + 0x40) = (longlong)fVar12 + lVar6;
      if ((ulonglong)((longlong)fVar12 + lVar6) < 0x11) {
        *(undefined8 *)(param_1 + 0x40) = 0;
        return;
      }
    }
    else {
      _Dst = (void *)FUN_140156940((ulonglong)param_2 << 3);
      if (_Dst == (void *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x8007000e);
      }
      memset(_Dst,0,(ulonglong)param_2 << 3);
      uVar7 = 0;
      uVar4 = *(ulonglong *)(param_1 + 0x10);
      uVar10 = uVar7;
      uVar11 = uVar7;
      while (uVar4 != 0) {
        uVar1 = *(ulonglong *)(uVar4 + 0x10);
        uVar3 = (ulonglong)*(uint *)(uVar4 + 0x20) % (ulonglong)param_2;
        lVar5 = *(longlong *)((longlong)_Dst + uVar3 * 8);
        iVar9 = (int)uVar10;
        if (iVar9 == 0) {
          *(undefined8 *)(uVar4 + 0x18) = 0;
          *(undefined8 *)(uVar4 + 0x10) = 0;
          uVar10 = 1;
          uVar7 = uVar4;
          uVar11 = uVar4;
        }
        else if (lVar5 == 0) {
          *(undefined8 *)(uVar4 + 0x18) = 0;
          *(ulonglong *)(uVar4 + 0x10) = uVar7;
          if (uVar7 != 0) {
            *(ulonglong *)(uVar7 + 0x18) = uVar4;
          }
          uVar10 = (ulonglong)(iVar9 + 1);
          uVar7 = uVar4;
        }
        else {
          uVar8 = uVar4;
          if (*(longlong *)(lVar5 + 0x18) != 0) {
            *(ulonglong *)(*(longlong *)(lVar5 + 0x18) + 0x10) = uVar4;
            uVar8 = uVar7;
          }
          uVar2 = *(undefined8 *)(lVar5 + 0x18);
          *(longlong *)(uVar4 + 0x10) = lVar5;
          uVar10 = (ulonglong)(iVar9 + 1);
          *(undefined8 *)(uVar4 + 0x18) = uVar2;
          *(ulonglong *)(lVar5 + 0x18) = uVar4;
          uVar7 = uVar8;
        }
        *(ulonglong *)((longlong)_Dst + uVar3 * 8) = uVar4;
        uVar4 = uVar1;
      }
      FUN_140156970(*(undefined8 *)(param_1 + 8));
      *(void **)(param_1 + 8) = _Dst;
      *(uint *)(param_1 + 0x28) = param_2;
      *(ulonglong *)(param_1 + 0x10) = uVar7;
      *(ulonglong *)(param_1 + 0x18) = uVar11;
      FUN_140045aa0(param_1);
      lVar5 = 0;
      fVar13 = (float)*(uint *)(param_1 + 0x28) * *(float *)(param_1 + 0x34);
      if ((9.223372e+18 < fVar13) && (fVar13 = fVar13 - 9.223372e+18, fVar13 < 9.223372e+18)) {
        lVar5 = -0x8000000000000000;
      }
      fVar12 = (float)*(uint *)(param_1 + 0x28) * *(float *)(param_1 + 0x30);
      lVar6 = 0;
      *(longlong *)(param_1 + 0x38) = (longlong)fVar13 + lVar5;
      if ((9.223372e+18 < fVar12) && (fVar12 = fVar12 - 9.223372e+18, fVar12 < 9.223372e+18)) {
        lVar6 = -0x8000000000000000;
      }
      *(longlong *)(param_1 + 0x40) = (longlong)fVar12 + lVar6;
      if ((ulonglong)((longlong)fVar12 + lVar6) < 0x11) {
        *(undefined8 *)(param_1 + 0x40) = 0;
      }
    }
  }
  return;
}



undefined8 FUN_140046050(undefined8 param_1,longlong *param_2)

{
  undefined2 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  FUN_14004fe70(param_1,(param_2[1] - *param_2) / 0x1b);
  lVar3 = *param_2;
  if (lVar3 != param_2[1]) {
    do {
      uVar1 = *(undefined2 *)(lVar3 + 0x10);
      uVar2 = FUN_140157600(param_1,lVar3);
      FUN_140050340(uVar2,uVar1);
      FUN_140050340(uVar2,*(undefined2 *)(lVar3 + 0x12));
      FUN_14004fe70(uVar2,*(undefined4 *)(lVar3 + 0x14));
      FUN_140050340(uVar2,*(undefined2 *)(lVar3 + 0x18));
      FUN_14004fd90(uVar2,*(undefined1 *)(lVar3 + 0x1a));
      lVar3 = lVar3 + 0x1b;
    } while (lVar3 != param_2[1]);
  }
  return param_1;
}



undefined8 FUN_140046120(undefined8 param_1,longlong *param_2)

{
  undefined2 *puVar1;
  
  FUN_14004fe70(param_1,(param_2[1] - *param_2) / 0x34);
  puVar1 = (undefined2 *)*param_2;
  if (puVar1 != (undefined2 *)param_2[1]) {
    do {
      FUN_140050340(param_1,*puVar1);
      FUN_140050340(param_1,puVar1[0x11]);
      FUN_14004fcb0(param_1,*(undefined8 *)(puVar1 + 0x12));
      FUN_14004fe70(param_1,*(undefined4 *)(puVar1 + 0x16));
      FUN_14004fe70(param_1,*(undefined4 *)(puVar1 + 0x18));
      FUN_140155f60(param_1,puVar1 + 1);
      puVar1 = puVar1 + 0x1a;
    } while (puVar1 != (undefined2 *)param_2[1]);
  }
  return param_1;
}



undefined8 FUN_1400461d0(undefined8 param_1,longlong *param_2)

{
  longlong lVar1;
  
  FUN_14004fe70(param_1,(param_2[1] - *param_2) / 0x88);
  lVar1 = *param_2;
  if (lVar1 != param_2[1]) {
    do {
      FUN_140157600(param_1,lVar1);
      FUN_140157600(param_1,lVar1 + 0x10);
      FUN_140050340(param_1,*(undefined2 *)(lVar1 + 0x20));
      FUN_140050340(param_1,*(undefined2 *)(lVar1 + 0x22));
      FUN_14004fe70(param_1,*(undefined4 *)(lVar1 + 0x84));
      FUN_140155f60(param_1,lVar1 + 0x24);
      FUN_140155f60(param_1,lVar1 + 0x44);
      lVar1 = lVar1 + 0x88;
    } while (lVar1 != param_2[1]);
  }
  return param_1;
}



undefined8 FUN_140046290(undefined8 param_1,longlong *param_2)

{
  undefined2 *puVar1;
  
  FUN_14004fe70(param_1,param_2[1] - *param_2 >> 5);
  puVar1 = (undefined2 *)*param_2;
  if (puVar1 != (undefined2 *)param_2[1]) {
    do {
      FUN_140050340(param_1,*puVar1);
      FUN_14004fe70(param_1,*(undefined4 *)(puVar1 + 1));
      FUN_14004fe70(param_1,*(undefined4 *)(puVar1 + 4));
      FUN_14004fe70(param_1,*(undefined4 *)(puVar1 + 6));
      FUN_14004fe70(param_1,*(undefined4 *)(puVar1 + 8));
      FUN_14004fe70(param_1,*(undefined4 *)(puVar1 + 10));
      FUN_14004fe70(param_1,*(undefined4 *)(puVar1 + 0xc));
      FUN_14004fe70(param_1,*(undefined4 *)(puVar1 + 0xe));
      FUN_140050340(param_1,puVar1[3]);
      puVar1 = puVar1 + 0x10;
    } while (puVar1 != (undefined2 *)param_2[1]);
  }
  return param_1;
}



undefined8 FUN_140046350(undefined8 param_1,longlong *param_2)

{
  longlong lVar1;
  
  FUN_14004fe70(param_1,(param_2[1] - *param_2) / 0x5e);
  lVar1 = *param_2;
  if (lVar1 != param_2[1]) {
    do {
      FUN_140157600(param_1,lVar1);
      FUN_140050340(param_1,*(undefined2 *)(lVar1 + 0x50));
      FUN_140050340(param_1,*(undefined2 *)(lVar1 + 0x52));
      FUN_140050340(param_1,*(undefined2 *)(lVar1 + 0x54));
      FUN_14004fbc0(param_1,*(undefined8 *)(lVar1 + 0x56));
      FUN_140155f60(param_1,lVar1 + 0x10);
      FUN_140155f60(param_1,lVar1 + 0x30);
      lVar1 = lVar1 + 0x5e;
    } while (lVar1 != param_2[1]);
  }
  return param_1;
}



undefined8 FUN_140046410(undefined8 param_1,longlong *param_2)

{
  longlong lVar1;
  
  FUN_14004fe70(param_1,(param_2[1] - *param_2) / 0x50);
  lVar1 = *param_2;
  if (lVar1 != param_2[1]) {
    do {
      FUN_140157600(param_1,lVar1);
      FUN_140157600(param_1,lVar1 + 0x10);
      FUN_14004fe70(param_1,*(undefined4 *)(lVar1 + 0x20));
      FUN_14004fe70(param_1,*(undefined4 *)(lVar1 + 0x24));
      FUN_14004fe70(param_1,*(undefined4 *)(lVar1 + 0x28));
      FUN_14004fe70(param_1,*(undefined4 *)(lVar1 + 0x2c));
      FUN_140155f60(param_1,lVar1 + 0x30);
      lVar1 = lVar1 + 0x50;
    } while (lVar1 != param_2[1]);
  }
  return param_1;
}



undefined8 FUN_1400464d0(undefined8 param_1,longlong *param_2)

{
  undefined4 *puVar1;
  
  FUN_14004fe70(param_1,(param_2[1] - *param_2) / 0x41);
  puVar1 = (undefined4 *)*param_2;
  if (puVar1 != (undefined4 *)param_2[1]) {
    do {
      FUN_14004fe70(param_1,*puVar1);
      FUN_140157600(param_1,puVar1 + 1);
      FUN_14004fe70(param_1,puVar1[0xd]);
      FUN_14004fe70(param_1,puVar1[0xe]);
      FUN_14004fd90(param_1,*(undefined1 *)(puVar1 + 0xf));
      FUN_14004fe70(param_1,*(undefined4 *)((longlong)puVar1 + 0x3d));
      FUN_140155f60(param_1,puVar1 + 5);
      puVar1 = (undefined4 *)((longlong)puVar1 + 0x41);
    } while (puVar1 != (undefined4 *)param_2[1]);
  }
  return param_1;
}



undefined8 FUN_140046590(undefined8 param_1,longlong *param_2)

{
  longlong lVar1;
  
  lVar1 = SUB168(SEXT816(-0x7bdef7bdef7bdef7) * SEXT816(param_2[1] - *param_2),8) +
          (param_2[1] - *param_2);
  FUN_14004fe70(param_1,(lVar1 >> 4) - (lVar1 >> 0x3f));
  lVar1 = *param_2;
  if (lVar1 != param_2[1]) {
    do {
      FUN_140157600(param_1,lVar1);
      FUN_14004fe70(param_1,*(undefined4 *)(lVar1 + 0x10));
      FUN_14004fe70(param_1,*(undefined4 *)(lVar1 + 0x14));
      FUN_140050340(param_1,*(undefined2 *)(lVar1 + 0x18));
      FUN_140050340(param_1,*(undefined2 *)(lVar1 + 0x1a));
      FUN_14004fd90(param_1,*(undefined1 *)(lVar1 + 0x1e));
      FUN_14004fd90(param_1,*(undefined1 *)(lVar1 + 0x1c));
      FUN_14004fd90(param_1,*(undefined1 *)(lVar1 + 0x1d));
      lVar1 = lVar1 + 0x1f;
    } while (lVar1 != param_2[1]);
  }
  return param_1;
}



undefined8 FUN_140046660(undefined8 param_1,ulonglong *param_2)

{
  void *_Src;
  void *_Dst;
  uint *puVar1;
  uint *puVar2;
  char cVar3;
  uint uVar4;
  ulonglong uVar5;
  uint local_res10 [2];
  uint local_res18 [2];
  
  FUN_1401543d0(param_1,local_res10,4);
  uVar4 = local_res10[0];
  if (((int)local_res10[0] < 0) || (DAT_140320d70 <= (int)local_res10[0])) {
    FUN_140157570(local_res10[0]);
  }
  FUN_140047450(param_2,(longlong)(int)uVar4);
  _Src = (void *)param_2[1];
  _Dst = (void *)*param_2;
  if (((longlong)_Src - (longlong)_Dst >> 2 != 0) && (_Dst != _Src)) {
    memmove(_Dst,_Src,0);
    param_2[1] = (ulonglong)_Dst;
  }
  if (0 < (int)uVar4) {
    uVar5 = (ulonglong)uVar4;
    uVar4 = local_res10[0];
    do {
      cVar3 = FUN_1401543d0(param_1,local_res18,4);
      puVar1 = (uint *)param_2[1];
      if (cVar3 != '\0') {
        uVar4 = local_res18[0];
      }
      if ((local_res10 < puVar1) && (puVar2 = (uint *)*param_2, puVar2 <= local_res10)) {
        if (puVar1 == (uint *)param_2[2]) {
          FUN_14004a5d0(param_2,1);
        }
        if ((undefined4 *)param_2[1] != (undefined4 *)0x0) {
          *(undefined4 *)param_2[1] =
               *(undefined4 *)(*param_2 + ((longlong)local_res10 - (longlong)puVar2 >> 2) * 4);
        }
      }
      else {
        if (puVar1 == (uint *)param_2[2]) {
          FUN_14004a5d0(param_2,1);
        }
        if ((uint *)param_2[1] != (uint *)0x0) {
          *(uint *)param_2[1] = uVar4;
        }
      }
      param_2[1] = param_2[1] + 4;
      uVar5 = uVar5 - 1;
    } while (uVar5 != 0);
  }
  return param_1;
}



void FUN_1400467b0(undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"<Array %d>",param_2[1] - *param_2 >> 2,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x0001400468e0)

undefined8 FUN_140046860(undefined8 param_1,ulonglong *param_2)

{
  undefined4 *puVar1;
  ulonglong uVar2;
  undefined4 *puVar3;
  undefined1 auStack_58 [32];
  uint local_38 [2];
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  FUN_1401543d0(param_1,local_38,4);
  if (((int)local_38[0] < 0) || (DAT_140320d70 <= (int)local_38[0])) {
    FUN_140157570(local_38[0]);
  }
  FUN_140047340(param_2,(longlong)(int)local_38[0]);
  uVar2 = *param_2;
  if (((longlong)(param_2[1] - uVar2) >> 4 != 0) && (uVar2 != param_2[1])) {
    param_2[1] = uVar2;
  }
  if (0 < (int)local_38[0]) {
    uVar2 = (ulonglong)local_38[0];
    do {
      FUN_140157550(param_1,&local_30);
      puVar1 = (undefined4 *)param_2[1];
      if ((&local_30 < puVar1) && (puVar3 = (undefined4 *)*param_2, puVar3 <= &local_30)) {
        if (puVar1 == (undefined4 *)param_2[2]) {
          FUN_14004a550(param_2,1);
        }
        puVar1 = (undefined4 *)param_2[1];
        puVar3 = (undefined4 *)
                 (((longlong)&local_30 - (longlong)puVar3 & 0xfffffffffffffff0U) + *param_2);
        if (puVar1 != (undefined4 *)0x0) {
          *puVar1 = *puVar3;
          puVar1[1] = puVar3[1];
          puVar1[2] = puVar3[2];
          puVar1[3] = puVar3[3];
        }
      }
      else {
        if (puVar1 == (undefined4 *)param_2[2]) {
          FUN_14004a550(param_2,1);
        }
        puVar1 = (undefined4 *)param_2[1];
        if (puVar1 != (undefined4 *)0x0) {
          *puVar1 = local_30;
          puVar1[1] = local_2c;
          puVar1[2] = local_28;
          puVar1[3] = local_24;
        }
      }
      param_2[1] = param_2[1] + 0x10;
      uVar2 = uVar2 - 1;
    } while (uVar2 != 0);
  }
  return param_1;
}



void FUN_1400469f0(undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"<Array %d>",param_2[1] - *param_2 >> 4,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x000140046b30)

undefined8 FUN_140046aa0(undefined8 param_1,ulonglong *param_2)

{
  undefined4 *puVar1;
  undefined8 *puVar2;
  ulonglong uVar3;
  longlong lVar4;
  uint uVar5;
  char cVar6;
  longlong lVar7;
  ulonglong uVar8;
  undefined1 auStack_78 [32];
  uint local_58 [2];
  undefined4 local_50;
  undefined4 uStack_4c;
  undefined4 local_48;
  undefined4 uStack_44;
  undefined2 local_40;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  FUN_1401543d0(param_1,local_58,4);
  uVar5 = local_58[0];
  if (((int)local_58[0] < 0) || (DAT_140320d70 <= (int)local_58[0])) {
    FUN_140157570(local_58[0]);
  }
  FUN_14004a060(param_2,(longlong)(int)uVar5);
  uVar8 = *param_2;
  lVar7 = param_2[1] - uVar8;
  lVar4 = lVar7 >> 0x3f;
  if ((lVar7 / 0x12 + lVar4 != lVar4) && (uVar8 != param_2[1])) {
    param_2[1] = uVar8;
  }
  if (0 < (int)uVar5) {
    uVar8 = (ulonglong)uVar5;
    do {
      local_50 = 0;
      local_40 = 0;
      uStack_4c = 0;
      local_48 = 0;
      uStack_44 = 0;
      FUN_140157550(param_1,&local_50);
      cVar6 = FUN_1401543d0(param_1,local_58,2);
      puVar1 = (undefined4 *)param_2[1];
      if (cVar6 != '\0') {
        local_40 = (undefined2)local_58[0];
      }
      if ((&local_50 < puVar1) && ((undefined4 *)*param_2 <= &local_50)) {
        lVar4 = ((longlong)&local_50 - (longlong)*param_2) / 0x12;
        if (puVar1 == (undefined4 *)param_2[2]) {
          FUN_14004bb80(param_2,1);
        }
        puVar2 = (undefined8 *)param_2[1];
        uVar3 = *param_2;
        if (puVar2 != (undefined8 *)0x0) {
          *puVar2 = *(undefined8 *)(uVar3 + lVar4 * 0x12);
          puVar2[1] = *(undefined8 *)(uVar3 + 8 + lVar4 * 0x12);
          *(undefined2 *)(puVar2 + 2) = *(undefined2 *)(uVar3 + 0x10 + lVar4 * 0x12);
        }
      }
      else {
        if (puVar1 == (undefined4 *)param_2[2]) {
          FUN_14004bb80(param_2,1);
        }
        puVar2 = (undefined8 *)param_2[1];
        if (puVar2 != (undefined8 *)0x0) {
          *puVar2 = CONCAT44(uStack_4c,local_50);
          puVar2[1] = CONCAT44(uStack_44,local_48);
          *(undefined2 *)(puVar2 + 2) = local_40;
        }
      }
      param_2[1] = param_2[1] + 0x12;
      uVar8 = uVar8 - 1;
    } while (uVar8 != 0);
  }
  return param_1;
}



void FUN_140046cc0(undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"<Array %d>",(param_2[1] - *param_2) / 0x12,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140046d80(undefined8 param_1,ulonglong *param_2)

{
  void *_Src;
  void *_Dst;
  uint *puVar1;
  uint *puVar2;
  uint uVar3;
  char cVar4;
  undefined2 uVar5;
  ulonglong uVar6;
  uint local_res10 [2];
  undefined2 local_res18 [4];
  
  FUN_1401543d0(param_1,local_res10,4);
  uVar3 = local_res10[0];
  if (((int)local_res10[0] < 0) || (DAT_140320d70 <= (int)local_res10[0])) {
    FUN_140157570(local_res10[0]);
  }
  FUN_14004a190(param_2,(longlong)(int)uVar3);
  _Src = (void *)param_2[1];
  _Dst = (void *)*param_2;
  if (((longlong)_Src - (longlong)_Dst >> 1 != 0) && (_Dst != _Src)) {
    memmove(_Dst,_Src,0);
    param_2[1] = (ulonglong)_Dst;
  }
  if (0 < (int)uVar3) {
    uVar6 = (ulonglong)uVar3;
    uVar5 = (undefined2)local_res10[0];
    do {
      cVar4 = FUN_1401543d0(param_1,local_res18,2);
      puVar1 = (uint *)param_2[1];
      if (cVar4 != '\0') {
        uVar5 = local_res18[0];
      }
      local_res10[0] = CONCAT22(local_res10[0]._2_2_,uVar5);
      if ((local_res10 < puVar1) && (puVar2 = (uint *)*param_2, puVar2 <= local_res10)) {
        if (puVar1 == (uint *)param_2[2]) {
          FUN_14004bc20(param_2,1);
        }
        if ((undefined2 *)param_2[1] != (undefined2 *)0x0) {
          *(undefined2 *)param_2[1] =
               *(undefined2 *)(*param_2 + ((longlong)local_res10 - (longlong)puVar2 >> 1) * 2);
        }
      }
      else {
        if (puVar1 == (uint *)param_2[2]) {
          FUN_14004bc20(param_2,1);
        }
        if ((undefined2 *)param_2[1] != (undefined2 *)0x0) {
          *(undefined2 *)param_2[1] = uVar5;
        }
      }
      param_2[1] = param_2[1] + 2;
      uVar6 = uVar6 - 1;
    } while (uVar6 != 0);
  }
  return param_1;
}



void FUN_140046ee0(undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"<Array %d>",param_2[1] - *param_2 >> 1,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140046f90(undefined8 param_1,undefined8 param_2)

{
  ulonglong uVar1;
  undefined1 auStack_a8 [32];
  uint local_88 [4];
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_68;
  undefined8 local_60;
  undefined4 local_58;
  undefined8 local_54;
  undefined8 local_4c;
  undefined8 local_44;
  undefined8 local_3c;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_a8;
  FUN_1401543d0(param_1,local_88,4);
  uVar1 = (ulonglong)local_88[0];
  if (((int)local_88[0] < 0) || (DAT_140320d70 <= (int)local_88[0])) {
    FUN_140157570(local_88[0]);
  }
  FUN_14004a2a0(param_2,(longlong)(int)local_88[0]);
  FUN_14004a3e0(param_2);
  if (0 < (int)local_88[0]) {
    do {
      local_68 = 0;
      local_60 = 0;
      local_58 = 0;
      local_54 = 0;
      local_4c = 0;
      local_78 = 0;
      uStack_74 = 0;
      uStack_70 = 0;
      uStack_6c = 0;
      local_44 = 0;
      local_3c = 0;
      FUN_140130eb0(param_1,&local_78);
      FUN_14004a480(param_2,&local_78);
      uVar1 = uVar1 - 1;
    } while (uVar1 != 0);
  }
  return param_1;
}



void FUN_140047080(undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"<Array %d>",(param_2[1] - *param_2) / 0x44,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



void FUN_140047150(void)

{
  DAT_14032f248 = 0;
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140047160(undefined8 *param_1,ushort param_2)

{
  ulong uVar1;
  void *_ArgList;
  undefined8 *puVar2;
  DWORD DVar3;
  HANDLE pvVar4;
  void *pvVar5;
  uintptr_t uVar6;
  int *piVar7;
  ulong *puVar8;
  undefined8 uVar9;
  basic_ostream<> *pbVar10;
  undefined8 *puVar11;
  int iVar12;
  undefined1 auStackY_278 [32];
  uint local_248 [4];
  char local_238 [512];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_278;
  iVar12 = 0;
  puVar11 = param_1;
  if (param_2 != 0) {
    do {
      _ArgList = (void *)*puVar11;
      pvVar4 = CreateSemaphoreA((LPSECURITY_ATTRIBUTES)0x0,0,0x7fffffff,(LPCSTR)0x0);
      *(HANDLE *)((longlong)_ArgList + 0x10) = pvVar4;
      if (pvVar4 == (HANDLE)0x0) {
        return 0xfffffff6;
      }
      puVar2 = *(undefined8 **)((longlong)_ArgList + 0x18);
      EnterCriticalSection((LPCRITICAL_SECTION)(puVar2 + 4));
      if ((void *)*puVar2 != (void *)0x0) {
        operator_delete__((void *)*puVar2);
        *puVar2 = 0;
      }
      pvVar5 = operator_new(3000000);
      puVar2[1] = 3000000;
      *puVar2 = pvVar5;
      puVar2[2] = 0;
      *(undefined4 *)(puVar2 + 3) = 0;
      LeaveCriticalSection((LPCRITICAL_SECTION)(puVar2 + 4));
      *(undefined4 *)((longlong)_ArgList + 0x30) = 1;
      uVar6 = _beginthreadex((void *)0x0,0x200000,FUN_140002750,_ArgList,0,local_248);
      *(uintptr_t *)((longlong)_ArgList + 8) = uVar6;
      if (uVar6 == 0) {
        DVar3 = GetLastError();
        printf("CmdQueue::Init - run_CarryOut faile[%d]\n",(ulonglong)DVar3);
        piVar7 = _errno();
        iVar12 = *piVar7;
        puVar8 = __doserrno();
        uVar1 = *puVar8;
        strerror_s(local_238,0x200,iVar12);
        uVar9 = FUN_140002810(cerr_exref,"Begin thread error: ");
        uVar9 = FUN_140002810(uVar9,local_238);
        FUN_1400029e0(uVar9);
        pbVar10 = (basic_ostream<> *)FUN_140002810(cerr_exref,"Begin thread DOS error code: ");
        pbVar10 = std::basic_ostream<>::operator<<(pbVar10,uVar1);
        FUN_1400029e0(pbVar10);
        return 0xfffffff6;
      }
      printf("command thread start!\n");
      iVar12 = iVar12 + 1;
      puVar11 = puVar11 + 1;
    } while (iVar12 < (int)(uint)param_2);
  }
  *(ushort *)(param_1 + 1000) = param_2;
  return 0;
}



void FUN_140047340(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0xfffffffffffffff < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)(param_1[2] - *param_1 >> 4) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 << 4);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004bf80(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x10);
    param_1[1] = (longlong)(pcVar4 + (lVar2 - (longlong)pvVar1 & 0xfffffffffffffff0));
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140047450(longlong *param_1,ulonglong param_2)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  void *_Dst;
  
  if (0x3fffffffffffffff < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)(param_1[2] - *param_1 >> 2) < param_2) {
    _Dst = (void *)FUN_14004cbe0(param_1 + 3);
    memmove(_Dst,(void *)*param_1,param_1[1] - *param_1 & 0xfffffffffffffffc);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)((longlong)_Dst + param_2 * 4);
    param_1[1] = (longlong)((longlong)_Dst + (lVar2 - (longlong)pvVar1 >> 2) * 4);
    *param_1 = (longlong)_Dst;
  }
  return;
}



void FUN_140047510(longlong *param_1,undefined4 *param_2)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  
  puVar1 = (undefined4 *)param_1[1];
  if ((param_2 < puVar1) && (puVar2 = (undefined4 *)*param_1, puVar2 <= param_2)) {
    if (puVar1 == (undefined4 *)param_1[2]) {
      FUN_14004a5d0(param_1,1);
    }
    if ((undefined4 *)param_1[1] != (undefined4 *)0x0) {
      *(undefined4 *)param_1[1] =
           *(undefined4 *)(*param_1 + ((longlong)param_2 - (longlong)puVar2 >> 2) * 4);
      param_1[1] = param_1[1] + 4;
      return;
    }
  }
  else {
    if (puVar1 == (undefined4 *)param_1[2]) {
      FUN_14004a5d0(param_1,1);
    }
    if ((undefined4 *)param_1[1] != (undefined4 *)0x0) {
      *(undefined4 *)param_1[1] = *param_2;
    }
  }
  param_1[1] = param_1[1] + 4;
  return;
}



void FUN_1400475a0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  code *pcVar2;
  char *pcVar3;
  longlong lVar4;
  longlong lVar5;
  char *local_res10;
  undefined8 uVar6;
  undefined **local_30 [3];
  
  uVar6 = 0xfffffffffffffffe;
  if (0x1fffffffffffffff < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar2 = (code *)swi(3);
    (*pcVar2)();
    return;
  }
  if ((ulonglong)(param_1[2] - *param_1 >> 3) < param_2) {
    local_res10 = (char *)0x0;
    if ((param_2 != 0) && (local_res10 = operator_new(param_2 * 8), local_res10 == (char *)0x0)) {
      std::exception::exception((exception *)local_30,&local_res10);
      local_30[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_30,(ThrowInfo *)&DAT_14031d988);
    }
    pcVar3 = local_res10;
    FUN_14004bfd0(*param_1,param_1[1],local_res10,param_4,uVar6);
    lVar1 = param_1[1];
    lVar4 = *param_1;
    lVar5 = lVar1 - lVar4;
    if (lVar4 != 0) {
      for (; lVar4 != lVar1; lVar4 = lVar4 + 8) {
        FUN_14004f990(lVar4);
      }
      operator_delete((void *)*param_1);
    }
    param_1[2] = (longlong)(pcVar3 + param_2 * 8);
    param_1[1] = (longlong)(pcVar3 + (lVar5 >> 3) * 8);
    *param_1 = (longlong)pcVar3;
  }
  return;
}



void FUN_1400476d0(ulonglong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  undefined8 *puVar3;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  uVar1 = param_1[1];
  if ((param_2 < uVar1) && (uVar2 = *param_1, uVar2 <= param_2)) {
    if (uVar1 == param_1[2]) {
      FUN_14004a650(param_1);
    }
    uVar1 = *param_1;
    puVar3 = (undefined8 *)param_1[1];
    if (puVar3 != (undefined8 *)0x0) {
      FUN_1401568c0();
      *puVar3 = PTR_DAT_1403200a0;
      FUN_14004f4f0(puVar3,uVar1 + ((longlong)(param_2 - uVar2) >> 3) * 8,param_3,param_4,uVar4);
    }
  }
  else {
    if (uVar1 == param_1[2]) {
      FUN_14004a650(param_1);
    }
    puVar3 = (undefined8 *)param_1[1];
    if (puVar3 != (undefined8 *)0x0) {
      FUN_1401568c0();
      *puVar3 = PTR_DAT_1403200a0;
      FUN_14004f4f0(puVar3,param_2);
    }
  }
  param_1[1] = param_1[1] + 8;
  return;
}



void FUN_1400477a0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x29cbc14e5e0a72f < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x62) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x62);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c040(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x62);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x62) * 0x62);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_1400478e0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0xf83e0f83e0f83e < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x108) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x108);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c0a0(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x108);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x108) * 0x108);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140047a20(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x1f07c1f07c1f07c < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x84) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x84);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c100(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x84);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x84) * 0x84);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140047b60(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  code *pcVar2;
  char *pcVar3;
  longlong lVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x1555555555555555 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar2 = (code *)swi(3);
    (*pcVar2)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0xc) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0xc);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar3 = local_res10;
    FUN_14004c4d0(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar4 = (param_1[1] - (longlong)pvVar1) / 6 + (param_1[1] - (longlong)pvVar1 >> 0x3f);
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar3 + param_2 * 0xc);
    param_1[1] = (longlong)(pcVar3 + ((lVar4 >> 1) - (lVar4 >> 0x3f)) * 0xc);
    *param_1 = (longlong)pcVar3;
  }
  return;
}



void FUN_140047ca0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0xccccccccccccccc < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x14) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x14);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c160(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x14);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x14) * 0x14);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140047de0(ulonglong *param_1,undefined8 *param_2)

{
  undefined8 *puVar1;
  ulonglong uVar2;
  longlong lVar3;
  
  puVar1 = (undefined8 *)param_1[1];
  if ((param_2 < puVar1) && ((undefined8 *)*param_1 <= param_2)) {
    lVar3 = ((longlong)param_2 - (longlong)*param_1) / 0x14;
    if (puVar1 == (undefined8 *)param_1[2]) {
      FUN_14004a9e0(param_1);
    }
    puVar1 = (undefined8 *)param_1[1];
    uVar2 = *param_1;
    if (puVar1 != (undefined8 *)0x0) {
      *puVar1 = *(undefined8 *)(uVar2 + lVar3 * 0x14);
      puVar1[1] = *(undefined8 *)(uVar2 + 8 + lVar3 * 0x14);
      *(undefined4 *)(puVar1 + 2) = *(undefined4 *)(uVar2 + 0x10 + lVar3 * 0x14);
      param_1[1] = param_1[1] + 0x14;
      return;
    }
  }
  else {
    if (puVar1 == (undefined8 *)param_1[2]) {
      FUN_14004a9e0(param_1);
    }
    puVar1 = (undefined8 *)param_1[1];
    if (puVar1 != (undefined8 *)0x0) {
      *puVar1 = *param_2;
      puVar1[1] = param_2[1];
      *(undefined4 *)(puVar1 + 2) = *(undefined4 *)(param_2 + 2);
    }
  }
  param_1[1] = param_1[1] + 0x14;
  return;
}



void FUN_140047eb0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  code *pcVar2;
  char *pcVar3;
  longlong lVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x155555555555555 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar2 = (code *)swi(3);
    (*pcVar2)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0xc0) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0xc0);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar3 = local_res10;
    FUN_14004c1b0(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar4 = (param_1[1] - (longlong)pvVar1) / 6 + (param_1[1] - (longlong)pvVar1 >> 0x3f);
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar3 + param_2 * 0xc0);
    param_1[1] = (longlong)(pcVar3 + ((lVar4 >> 5) - (lVar4 >> 0x3f)) * 0xc0);
    *param_1 = (longlong)pcVar3;
  }
  return;
}



void FUN_140047ff0(ulonglong *param_1,void *param_2)

{
  void *pvVar1;
  longlong lVar2;
  
  pvVar1 = (void *)param_1[1];
  if ((param_2 < pvVar1) && ((void *)*param_1 <= param_2)) {
    lVar2 = (longlong)param_2 - (longlong)*param_1;
    lVar2 = lVar2 / 6 + (lVar2 >> 0x3f);
    if (pvVar1 == (void *)param_1[2]) {
      FUN_14004aaa0(param_1);
    }
    pvVar1 = (void *)param_1[1];
    param_2 = (void *)(((lVar2 >> 5) - (lVar2 >> 0x3f)) * 0xc0 + *param_1);
  }
  else {
    if (pvVar1 == (void *)param_1[2]) {
      FUN_14004aaa0(param_1);
    }
    pvVar1 = (void *)param_1[1];
  }
  if (pvVar1 != (void *)0x0) {
    memcpy(pvVar1,param_2,0xc0);
  }
  param_1[1] = param_1[1] + 0xc0;
  return;
}



void FUN_140048090(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x97b425ed097b425 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x1b) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x1b);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c210(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x1b);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x1b) * 0x1b);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_1400481c0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x492492492492492 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x38) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x38);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c270(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x38);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x38) * 0x38);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140048300(ulonglong *param_1,undefined8 *param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  puVar1 = (undefined8 *)param_1[1];
  if ((param_2 < puVar1) && (puVar2 = (undefined8 *)*param_1, puVar2 <= param_2)) {
    if (puVar1 == (undefined8 *)param_1[2]) {
      FUN_14004ac10(param_1);
    }
    param_2 = (undefined8 *)((((longlong)param_2 - (longlong)puVar2) / 0x38) * 0x38 + *param_1);
  }
  else if (puVar1 == (undefined8 *)param_1[2]) {
    FUN_14004ac10(param_1);
  }
  puVar1 = (undefined8 *)param_1[1];
  if (puVar1 != (undefined8 *)0x0) {
    *puVar1 = *param_2;
    puVar1[1] = param_2[1];
    puVar1[2] = param_2[2];
    puVar1[3] = param_2[3];
    puVar1[4] = param_2[4];
    puVar1[5] = param_2[5];
    puVar1[6] = param_2[6];
  }
  param_1[1] = param_1[1] + 0x38;
  return;
}



void FUN_1400483c0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0xe1fc780e1fc780 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x122) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x122);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c2e0(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x122);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x122) * 0x122);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140048500(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x4ec4ec4ec4ec4ec < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x34) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x34);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c340(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x34);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x34) * 0x34);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140048640(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x1e1e1e1e1e1e1e1 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x88) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x88);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c3b0(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x88);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x88) * 0x88);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140048780(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  code *pcVar2;
  char *pcVar3;
  longlong lVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x4fba3d0a96bc1b < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar2 = (code *)swi(3);
    (*pcVar2)();
    return;
  }
  lVar4 = SUB168(SEXT816(-0x608b85ead287c92f) * SEXT816(param_1[2] - *param_1),8) +
          (param_1[2] - *param_1);
  if ((ulonglong)((lVar4 >> 9) - (lVar4 >> 0x3f)) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x336);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar3 = local_res10;
    FUN_14004c410(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar4 = (param_1[1] - (longlong)pvVar1) +
            SUB168(SEXT816(-0x608b85ead287c92f) * SEXT816(param_1[1] - (longlong)pvVar1),8);
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar3 + param_2 * 0x336);
    param_1[1] = (longlong)(pcVar3 + ((lVar4 >> 9) - (lVar4 >> 0x3f)) * 0x336);
    *param_1 = (longlong)pcVar3;
  }
  return;
}



void FUN_1400488c0(ulonglong *param_1,void *param_2)

{
  void *pvVar1;
  longlong lVar2;
  
  pvVar1 = (void *)param_1[1];
  if ((param_2 < pvVar1) && ((void *)*param_1 <= param_2)) {
    lVar2 = (longlong)param_2 - (longlong)*param_1;
    lVar2 = lVar2 + SUB168(SEXT816(-0x608b85ead287c92f) * SEXT816(lVar2),8);
    if (pvVar1 == (void *)param_1[2]) {
      FUN_14004af10(param_1);
    }
    if ((void *)param_1[1] != (void *)0x0) {
      memcpy((void *)param_1[1],(void *)(((lVar2 >> 9) - (lVar2 >> 0x3f)) * 0x336 + *param_1),0x336)
      ;
    }
    param_1[1] = param_1[1] + 0x336;
    return;
  }
  if (pvVar1 == (void *)param_1[2]) {
    FUN_14004af10(param_1);
  }
  if ((void *)param_1[1] != (void *)0x0) {
    memcpy((void *)param_1[1],param_2,0x336);
  }
  param_1[1] = param_1[1] + 0x336;
  return;
}



void FUN_140048990(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x13b13b13b13b13b < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0xd0) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0xd0);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c470(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0xd0);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0xd0) * 0xd0);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140048ad0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x924924924924924 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x1c) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x1c);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c510(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x1c);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x1c) * 0x1c);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140048c10(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x7ffffffffffffff < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)(param_1[2] - *param_1 >> 5) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 << 5);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c620(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x20);
    param_1[1] = (longlong)(pcVar4 + (lVar2 - (longlong)pvVar1 & 0xffffffffffffffe0));
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140048d20(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x2b9310572620ae4 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x5e) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x5e);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c560(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x5e);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x5e) * 0x5e);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140048e60(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  code *pcVar2;
  char *pcVar3;
  longlong lVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x24e6a171024e6a1 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar2 = (code *)swi(3);
    (*pcVar2)();
    return;
  }
  lVar4 = SUB168(SEXT816(-0x6c657a3bf6c657a3) * SEXT816(param_1[2] - *param_1),8) +
          (param_1[2] - *param_1);
  if ((ulonglong)((lVar4 >> 6) - (lVar4 >> 0x3f)) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x6f);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar3 = local_res10;
    FUN_14004c5c0(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar4 = (param_1[1] - (longlong)pvVar1) +
            SUB168(SEXT816(-0x6c657a3bf6c657a3) * SEXT816(param_1[1] - (longlong)pvVar1),8);
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar3 + param_2 * 0x6f);
    param_1[1] = (longlong)(pcVar3 + ((lVar4 >> 6) - (lVar4 >> 0x3f)) * 0x6f);
    *param_1 = (longlong)pcVar3;
  }
  return;
}



void FUN_140048fa0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0xa9c84a47a07f56 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x182) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x182);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c670(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x182);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x182) * 0x182);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_1400490e0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x1767dce434a9b10 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0xaf) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0xaf);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c6d0(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0xaf);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0xaf) * 0xaf);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140049220(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  code *pcVar2;
  char *pcVar3;
  longlong lVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x2c8590b21642c85 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar2 = (code *)swi(3);
    (*pcVar2)();
    return;
  }
  lVar4 = SUB168(SEXT816(-0x4de9bd37a6f4de9b) * SEXT816(param_1[2] - *param_1),8) +
          (param_1[2] - *param_1);
  if ((ulonglong)((lVar4 >> 6) - (lVar4 >> 0x3f)) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x5c);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar3 = local_res10;
    FUN_14004c730(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar4 = (param_1[1] - (longlong)pvVar1) +
            SUB168(SEXT816(-0x4de9bd37a6f4de9b) * SEXT816(param_1[1] - (longlong)pvVar1),8);
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar3 + param_2 * 0x5c);
    param_1[1] = (longlong)(pcVar3 + ((lVar4 >> 6) - (lVar4 >> 0x3f)) * 0x5c);
    *param_1 = (longlong)pcVar3;
  }
  return;
}



void FUN_140049360(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x1ecc07b301ecc07 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x85) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x85);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c790(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x85);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x85) * 0x85);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_1400494a0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  code *pcVar2;
  char *pcVar3;
  longlong lVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0xaaaaaaaaaaaaaaa < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar2 = (code *)swi(3);
    (*pcVar2)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x18) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x18);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar3 = local_res10;
    FUN_14004c7f0(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar4 = (param_1[1] - (longlong)pvVar1) / 6 + (param_1[1] - (longlong)pvVar1 >> 0x3f);
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar3 + param_2 * 0x18);
    param_1[1] = (longlong)(pcVar3 + ((lVar4 >> 2) - (lVar4 >> 0x3f)) * 0x18);
    *param_1 = (longlong)pcVar3;
  }
  return;
}



void FUN_1400495e0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x18f9c18f9c18f9c < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0xa4) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0xa4);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c840(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0xa4);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0xa4) * 0xa4);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140049720(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x333333333333333 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x50) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x50);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c8a0(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x50);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x50) * 0x50);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140049860(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x5f1e1885c2527c < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x2b1) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x2b1);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c900(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x2b1);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x2b1) * 0x2b1);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_1400499a0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  code *pcVar2;
  char *pcVar3;
  longlong lVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x1555555555555555 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar2 = (code *)swi(3);
    (*pcVar2)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0xc) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0xc);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar3 = local_res10;
    FUN_14004c960(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar4 = (param_1[1] - (longlong)pvVar1) / 6 + (param_1[1] - (longlong)pvVar1 >> 0x3f);
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar3 + param_2 * 0xc);
    param_1[1] = (longlong)(pcVar3 + ((lVar4 >> 1) - (lVar4 >> 0x3f)) * 0xc);
    *param_1 = (longlong)pcVar3;
  }
  return;
}



void FUN_140049ae0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x3f03f03f03f03f0 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x41) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x41);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004c9a0(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x41);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x41) * 0x41);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140049c20(ulonglong *param_1,undefined8 *param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  puVar1 = (undefined8 *)param_1[1];
  if ((param_2 < puVar1) && (puVar2 = (undefined8 *)*param_1, puVar2 <= param_2)) {
    if (puVar1 == (undefined8 *)param_1[2]) {
      FUN_14004b960(param_1);
    }
    param_2 = (undefined8 *)((((longlong)param_2 - (longlong)puVar2) / 0x41) * 0x41 + *param_1);
  }
  else if (puVar1 == (undefined8 *)param_1[2]) {
    FUN_14004b960(param_1);
  }
  puVar1 = (undefined8 *)param_1[1];
  if (puVar1 != (undefined8 *)0x0) {
    *puVar1 = *param_2;
    puVar1[1] = param_2[1];
    puVar1[2] = param_2[2];
    puVar1[3] = param_2[3];
    puVar1[4] = param_2[4];
    puVar1[5] = param_2[5];
    puVar1[6] = param_2[6];
    puVar1[7] = param_2[7];
    *(undefined1 *)(puVar1 + 8) = *(undefined1 *)(param_2 + 8);
  }
  param_1[1] = param_1[1] + 0x41;
  return;
}



void FUN_140049cf0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  code *pcVar2;
  char *pcVar3;
  longlong lVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x842108421084210 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar2 = (code *)swi(3);
    (*pcVar2)();
    return;
  }
  lVar4 = SUB168(SEXT816(-0x7bdef7bdef7bdef7) * SEXT816(param_1[2] - *param_1),8) +
          (param_1[2] - *param_1);
  if ((ulonglong)((lVar4 >> 4) - (lVar4 >> 0x3f)) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x1f);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar3 = local_res10;
    FUN_14004ca20(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar4 = (param_1[1] - (longlong)pvVar1) +
            SUB168(SEXT816(-0x7bdef7bdef7bdef7) * SEXT816(param_1[1] - (longlong)pvVar1),8);
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar3 + param_2 * 0x1f);
    param_1[1] = (longlong)(pcVar3 + ((lVar4 >> 4) - (lVar4 >> 0x3f)) * 0x1f);
    *param_1 = (longlong)pcVar3;
  }
  return;
}



void FUN_140049e30(ulonglong *param_1,undefined8 *param_2)

{
  undefined8 *puVar1;
  longlong lVar2;
  undefined8 *puVar3;
  
  puVar1 = (undefined8 *)param_1[1];
  if ((param_2 < puVar1) && ((undefined8 *)*param_1 <= param_2)) {
    lVar2 = (longlong)param_2 - (longlong)*param_1;
    lVar2 = lVar2 + SUB168(SEXT816(-0x7bdef7bdef7bdef7) * SEXT816(lVar2),8);
    if (puVar1 == (undefined8 *)param_1[2]) {
      FUN_14004ba20(param_1);
    }
    puVar1 = (undefined8 *)param_1[1];
    puVar3 = (undefined8 *)(((lVar2 >> 4) - (lVar2 >> 0x3f)) * 0x1f + *param_1);
    if (puVar1 != (undefined8 *)0x0) {
      *puVar1 = *puVar3;
      puVar1[1] = puVar3[1];
      puVar1[2] = puVar3[2];
      *(undefined4 *)(puVar1 + 3) = *(undefined4 *)(puVar3 + 3);
      *(undefined2 *)((longlong)puVar1 + 0x1c) = *(undefined2 *)((longlong)puVar3 + 0x1c);
      *(undefined1 *)((longlong)puVar1 + 0x1e) = *(undefined1 *)((longlong)puVar3 + 0x1e);
    }
    param_1[1] = param_1[1] + 0x1f;
    return;
  }
  if (puVar1 == (undefined8 *)param_1[2]) {
    FUN_14004ba20(param_1);
  }
  puVar1 = (undefined8 *)param_1[1];
  if (puVar1 != (undefined8 *)0x0) {
    *puVar1 = *param_2;
    puVar1[1] = param_2[1];
    puVar1[2] = param_2[2];
    *(undefined4 *)(puVar1 + 3) = *(undefined4 *)(param_2 + 3);
    *(undefined2 *)((longlong)puVar1 + 0x1c) = *(undefined2 *)((longlong)param_2 + 0x1c);
    *(undefined1 *)((longlong)puVar1 + 0x1e) = *(undefined1 *)((longlong)param_2 + 0x1e);
  }
  param_1[1] = param_1[1] + 0x1f;
  return;
}



void FUN_140049f30(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x1c71c71c71c71c71 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 9) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 9);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004ca80(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 9);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 9) * 9);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_14004a060(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0xe38e38e38e38e38 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x12) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x12);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004cac0(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x12);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x12) * 0x12);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_14004a190(longlong *param_1,ulonglong param_2)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined **local_20 [3];
  
  if (0x7fffffffffffffff < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)(param_1[2] - *param_1 >> 1) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 2);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    memmove(local_res10,(void *)*param_1,(param_1[1] - *param_1 >> 1) * 2);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 2);
    param_1[1] = (longlong)(pcVar4 + (lVar2 - (longlong)pvVar1 >> 1) * 2);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_14004a2a0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x3c3c3c3c3c3c3c3 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x44) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x44);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_14004cb10(*param_1,param_1[1],local_res10,param_4,uVar5);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x44);
    param_1[1] = (longlong)(pcVar4 + ((lVar2 - (longlong)pvVar1) / 0x44) * 0x44);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x00014004a41a)
// WARNING: Removing unreachable block (ram,0x00014004a420)

void FUN_14004a3e0(longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar1 = *param_1;
  lVar3 = param_1[1] - lVar1;
  lVar2 = lVar3 >> 0x3f;
  if ((lVar3 / 0x44 + lVar2 != lVar2) && (lVar1 != param_1[1])) {
    param_1[1] = lVar1;
  }
  return;
}



void FUN_14004a480(ulonglong *param_1,undefined8 *param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  puVar1 = (undefined8 *)param_1[1];
  if ((param_2 < puVar1) && (puVar2 = (undefined8 *)*param_1, puVar2 <= param_2)) {
    if (puVar1 == (undefined8 *)param_1[2]) {
      FUN_14004bca0(param_1,1);
    }
    param_2 = (undefined8 *)((((longlong)param_2 - (longlong)puVar2) / 0x44) * 0x44 + *param_1);
  }
  else if (puVar1 == (undefined8 *)param_1[2]) {
    FUN_14004bca0(param_1,1);
  }
  puVar1 = (undefined8 *)param_1[1];
  if (puVar1 != (undefined8 *)0x0) {
    *puVar1 = *param_2;
    puVar1[1] = param_2[1];
    puVar1[2] = param_2[2];
    puVar1[3] = param_2[3];
    puVar1[4] = param_2[4];
    puVar1[5] = param_2[5];
    puVar1[6] = param_2[6];
    puVar1[7] = param_2[7];
    *(undefined4 *)(puVar1 + 8) = *(undefined4 *)(param_2 + 8);
  }
  param_1[1] = param_1[1] + 0x44;
  return;
}



void FUN_14004a550(longlong *param_1,longlong param_2)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = param_1[1] - *param_1 >> 4;
  if (0xfffffffffffffffU - param_2 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + param_2;
  uVar2 = param_1[2] - *param_1 >> 4;
  if (uVar2 < uVar3) {
    if (0xfffffffffffffff - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140047340(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140047340(param_1,uVar2);
  }
  return;
}



void FUN_14004a5d0(longlong *param_1,longlong param_2)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = param_1[1] - *param_1 >> 2;
  if (0x3fffffffffffffffU - param_2 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + param_2;
  uVar2 = param_1[2] - *param_1 >> 2;
  if (uVar2 < uVar3) {
    if (0x3fffffffffffffff - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140047450(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140047450(param_1,uVar2);
  }
  return;
}



void FUN_14004a650(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = param_1[1] - *param_1 >> 3;
  if (0x1ffffffffffffffe < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = param_1[2] - *param_1 >> 3;
  if (uVar2 < uVar3) {
    if (0x1fffffffffffffff - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_1400475a0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_1400475a0(param_1,uVar2);
  }
  return;
}



void FUN_14004a6e0(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x62;
  if (0x29cbc14e5e0a72e < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x62;
  if (uVar2 < uVar3) {
    if (0x29cbc14e5e0a72f - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_1400477a0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_1400477a0(param_1,uVar2);
  }
  return;
}



void FUN_14004a7a0(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x108;
  if (0xf83e0f83e0f83d < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x108;
  if (uVar2 < uVar3) {
    if (0xf83e0f83e0f83e - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_1400478e0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_1400478e0(param_1,uVar2);
  }
  return;
}



void FUN_14004a860(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x84;
  if (0x1f07c1f07c1f07b < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x84;
  if (uVar2 < uVar3) {
    if (0x1f07c1f07c1f07c - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140047a20(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140047a20(param_1,uVar2);
  }
  return;
}



void FUN_14004a920(longlong *param_1)

{
  code *pcVar1;
  longlong lVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  lVar2 = param_1[1] - *param_1;
  lVar2 = lVar2 / 6 + (lVar2 >> 0x3f);
  uVar4 = (lVar2 >> 1) - (lVar2 >> 0x3f);
  if (0x1555555555555554 < uVar4) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar4 = uVar4 + 1;
  uVar3 = (param_1[2] - *param_1) / 0xc;
  if (uVar3 < uVar4) {
    if (0x1555555555555555 - (uVar3 >> 1) < uVar3) {
      uVar3 = 0;
      if (uVar4 != 0) {
        uVar3 = uVar4;
      }
      FUN_140047b60(param_1,uVar3);
      return;
    }
    uVar3 = uVar3 + (uVar3 >> 1);
    if (uVar3 < uVar4) {
      uVar3 = uVar4;
    }
    FUN_140047b60(param_1,uVar3);
  }
  return;
}



void FUN_14004a9e0(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x14;
  if (0xccccccccccccccb < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x14;
  if (uVar2 < uVar3) {
    if (0xccccccccccccccc - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140047ca0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140047ca0(param_1,uVar2);
  }
  return;
}



void FUN_14004aaa0(longlong *param_1)

{
  code *pcVar1;
  longlong lVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  lVar2 = param_1[1] - *param_1;
  lVar2 = lVar2 / 6 + (lVar2 >> 0x3f);
  uVar4 = (lVar2 >> 5) - (lVar2 >> 0x3f);
  if (0x155555555555554 < uVar4) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar4 = uVar4 + 1;
  uVar3 = (param_1[2] - *param_1) / 0xc0;
  if (uVar3 < uVar4) {
    if (0x155555555555555 - (uVar3 >> 1) < uVar3) {
      uVar3 = 0;
      if (uVar4 != 0) {
        uVar3 = uVar4;
      }
      FUN_140047eb0(param_1,uVar3);
      return;
    }
    uVar3 = uVar3 + (uVar3 >> 1);
    if (uVar3 < uVar4) {
      uVar3 = uVar4;
    }
    FUN_140047eb0(param_1,uVar3);
  }
  return;
}



void FUN_14004ab60(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x1b;
  if (0x97b425ed097b424 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x1b;
  if (uVar2 < uVar3) {
    if (0x97b425ed097b425 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140048090(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140048090(param_1,uVar2);
  }
  return;
}



void FUN_14004ac10(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x38;
  if (0x492492492492491 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x38;
  if (uVar2 < uVar3) {
    if (0x492492492492492 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_1400481c0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_1400481c0(param_1,uVar2);
  }
  return;
}



void FUN_14004acd0(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x122;
  if (0xe1fc780e1fc77f < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x122;
  if (uVar2 < uVar3) {
    if (0xe1fc780e1fc780 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_1400483c0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_1400483c0(param_1,uVar2);
  }
  return;
}



void FUN_14004ad90(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x34;
  if (0x4ec4ec4ec4ec4eb < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x34;
  if (uVar2 < uVar3) {
    if (0x4ec4ec4ec4ec4ec - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140048500(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140048500(param_1,uVar2);
  }
  return;
}



void FUN_14004ae50(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x88;
  if (0x1e1e1e1e1e1e1e0 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x88;
  if (uVar2 < uVar3) {
    if (0x1e1e1e1e1e1e1e1 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140048640(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140048640(param_1,uVar2);
  }
  return;
}



void FUN_14004af10(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  longlong lVar3;
  ulonglong uVar4;
  
  lVar3 = param_1[1] - *param_1;
  lVar3 = lVar3 + SUB168(SEXT816(-0x608b85ead287c92f) * SEXT816(lVar3),8);
  uVar4 = (lVar3 >> 9) - (lVar3 >> 0x3f);
  if (0x4fba3d0a96bc1a < uVar4) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar4 = uVar4 + 1;
  lVar3 = param_1[2] - *param_1;
  lVar3 = SUB168(SEXT816(-0x608b85ead287c92f) * SEXT816(lVar3),8) + lVar3;
  uVar2 = (lVar3 >> 9) - (lVar3 >> 0x3f);
  if (uVar2 < uVar4) {
    if (0x4fba3d0a96bc1b - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
    }
    else {
      uVar2 = uVar2 + (uVar2 >> 1);
    }
    if (uVar2 < uVar4) {
      uVar2 = uVar4;
    }
    FUN_140048780(param_1,uVar2);
  }
  return;
}



void FUN_14004afc0(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0xd0;
  if (0x13b13b13b13b13a < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0xd0;
  if (uVar2 < uVar3) {
    if (0x13b13b13b13b13b - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140048990(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140048990(param_1,uVar2);
  }
  return;
}



void FUN_14004b080(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x1c;
  if (0x924924924924923 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x1c;
  if (uVar2 < uVar3) {
    if (0x924924924924924 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140048ad0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140048ad0(param_1,uVar2);
  }
  return;
}



void FUN_14004b140(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x5e;
  if (0x2b9310572620ae3 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x5e;
  if (uVar2 < uVar3) {
    if (0x2b9310572620ae4 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140048d20(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140048d20(param_1,uVar2);
  }
  return;
}



void FUN_14004b200(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  longlong lVar3;
  ulonglong uVar4;
  
  lVar3 = param_1[1] - *param_1;
  lVar3 = lVar3 + SUB168(SEXT816(-0x6c657a3bf6c657a3) * SEXT816(lVar3),8);
  uVar4 = (lVar3 >> 6) - (lVar3 >> 0x3f);
  if (0x24e6a171024e6a0 < uVar4) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar4 = uVar4 + 1;
  lVar3 = param_1[2] - *param_1;
  lVar3 = SUB168(SEXT816(-0x6c657a3bf6c657a3) * SEXT816(lVar3),8) + lVar3;
  uVar2 = (lVar3 >> 6) - (lVar3 >> 0x3f);
  if (uVar2 < uVar4) {
    if (0x24e6a171024e6a1 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
    }
    else {
      uVar2 = uVar2 + (uVar2 >> 1);
    }
    if (uVar2 < uVar4) {
      uVar2 = uVar4;
    }
    FUN_140048e60(param_1,uVar2);
  }
  return;
}



void FUN_14004b2b0(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x182;
  if (0xa9c84a47a07f55 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x182;
  if (uVar2 < uVar3) {
    if (0xa9c84a47a07f56 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140048fa0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140048fa0(param_1,uVar2);
  }
  return;
}



void FUN_14004b370(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0xaf;
  if (0x1767dce434a9b0f < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0xaf;
  if (uVar2 < uVar3) {
    if (0x1767dce434a9b10 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_1400490e0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_1400490e0(param_1,uVar2);
  }
  return;
}



void FUN_14004b430(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  longlong lVar3;
  ulonglong uVar4;
  
  lVar3 = param_1[1] - *param_1;
  lVar3 = lVar3 + SUB168(SEXT816(-0x4de9bd37a6f4de9b) * SEXT816(lVar3),8);
  uVar4 = (lVar3 >> 6) - (lVar3 >> 0x3f);
  if (0x2c8590b21642c84 < uVar4) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar4 = uVar4 + 1;
  lVar3 = param_1[2] - *param_1;
  lVar3 = SUB168(SEXT816(-0x4de9bd37a6f4de9b) * SEXT816(lVar3),8) + lVar3;
  uVar2 = (lVar3 >> 6) - (lVar3 >> 0x3f);
  if (uVar2 < uVar4) {
    if (0x2c8590b21642c85 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
    }
    else {
      uVar2 = uVar2 + (uVar2 >> 1);
    }
    if (uVar2 < uVar4) {
      uVar2 = uVar4;
    }
    FUN_140049220(param_1,uVar2);
  }
  return;
}



void FUN_14004b4e0(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x85;
  if (0x1ecc07b301ecc06 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x85;
  if (uVar2 < uVar3) {
    if (0x1ecc07b301ecc07 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140049360(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140049360(param_1,uVar2);
  }
  return;
}



void FUN_14004b5a0(longlong *param_1)

{
  code *pcVar1;
  longlong lVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  lVar2 = param_1[1] - *param_1;
  lVar2 = lVar2 / 6 + (lVar2 >> 0x3f);
  uVar4 = (lVar2 >> 2) - (lVar2 >> 0x3f);
  if (0xaaaaaaaaaaaaaa9 < uVar4) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar4 = uVar4 + 1;
  uVar3 = (param_1[2] - *param_1) / 0x18;
  if (uVar3 < uVar4) {
    if (0xaaaaaaaaaaaaaaa - (uVar3 >> 1) < uVar3) {
      uVar3 = 0;
      if (uVar4 != 0) {
        uVar3 = uVar4;
      }
      FUN_1400494a0(param_1,uVar3);
      return;
    }
    uVar3 = uVar3 + (uVar3 >> 1);
    if (uVar3 < uVar4) {
      uVar3 = uVar4;
    }
    FUN_1400494a0(param_1,uVar3);
  }
  return;
}



void FUN_14004b660(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0xa4;
  if (0x18f9c18f9c18f9b < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0xa4;
  if (uVar2 < uVar3) {
    if (0x18f9c18f9c18f9c - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_1400495e0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_1400495e0(param_1,uVar2);
  }
  return;
}



void FUN_14004b720(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x50;
  if (0x333333333333332 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x50;
  if (uVar2 < uVar3) {
    if (0x333333333333333 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140049720(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140049720(param_1,uVar2);
  }
  return;
}



void FUN_14004b7e0(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x2b1;
  if (0x5f1e1885c2527b < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x2b1;
  if (uVar2 < uVar3) {
    if (0x5f1e1885c2527c - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140049860(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140049860(param_1,uVar2);
  }
  return;
}



void FUN_14004b8a0(longlong *param_1)

{
  code *pcVar1;
  longlong lVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  lVar2 = param_1[1] - *param_1;
  lVar2 = lVar2 / 6 + (lVar2 >> 0x3f);
  uVar4 = (lVar2 >> 1) - (lVar2 >> 0x3f);
  if (0x1555555555555554 < uVar4) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar4 = uVar4 + 1;
  uVar3 = (param_1[2] - *param_1) / 0xc;
  if (uVar3 < uVar4) {
    if (0x1555555555555555 - (uVar3 >> 1) < uVar3) {
      uVar3 = 0;
      if (uVar4 != 0) {
        uVar3 = uVar4;
      }
      FUN_1400499a0(param_1,uVar3);
      return;
    }
    uVar3 = uVar3 + (uVar3 >> 1);
    if (uVar3 < uVar4) {
      uVar3 = uVar4;
    }
    FUN_1400499a0(param_1,uVar3);
  }
  return;
}



void FUN_14004b960(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x41;
  if (0x3f03f03f03f03ef < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x41;
  if (uVar2 < uVar3) {
    if (0x3f03f03f03f03f0 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140049ae0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140049ae0(param_1,uVar2);
  }
  return;
}



void FUN_14004ba20(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  longlong lVar3;
  ulonglong uVar4;
  
  lVar3 = param_1[1] - *param_1;
  lVar3 = lVar3 + SUB168(SEXT816(-0x7bdef7bdef7bdef7) * SEXT816(lVar3),8);
  uVar4 = (lVar3 >> 4) - (lVar3 >> 0x3f);
  if (0x84210842108420f < uVar4) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar4 = uVar4 + 1;
  lVar3 = param_1[2] - *param_1;
  lVar3 = SUB168(SEXT816(-0x7bdef7bdef7bdef7) * SEXT816(lVar3),8) + lVar3;
  uVar2 = (lVar3 >> 4) - (lVar3 >> 0x3f);
  if (uVar2 < uVar4) {
    if (0x842108421084210 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
    }
    else {
      uVar2 = uVar2 + (uVar2 >> 1);
    }
    if (uVar2 < uVar4) {
      uVar2 = uVar4;
    }
    FUN_140049cf0(param_1,uVar2);
  }
  return;
}



void FUN_14004bad0(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 9;
  if (0x1c71c71c71c71c70 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 9;
  if (uVar2 < uVar3) {
    if (0x1c71c71c71c71c71 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140049f30(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140049f30(param_1,uVar2);
  }
  return;
}



void FUN_14004bb80(longlong *param_1,longlong param_2)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x12;
  if (0xe38e38e38e38e38U - param_2 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + param_2;
  uVar2 = (param_1[2] - *param_1) / 0x12;
  if (uVar2 < uVar3) {
    if (0xe38e38e38e38e38 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
    }
    else {
      uVar2 = uVar2 + (uVar2 >> 1);
    }
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_14004a060(param_1,uVar2);
  }
  return;
}



void FUN_14004bc20(longlong *param_1,longlong param_2)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = param_1[1] - *param_1 >> 1;
  if (0x7fffffffffffffffU - param_2 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + param_2;
  uVar2 = param_1[2] - *param_1 >> 1;
  if (uVar2 < uVar3) {
    if (0x7fffffffffffffff - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_14004a190(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_14004a190(param_1,uVar2);
  }
  return;
}



void FUN_14004bca0(longlong *param_1,longlong param_2)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x44;
  if (0x3c3c3c3c3c3c3c3U - param_2 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + param_2;
  uVar2 = (param_1[2] - *param_1) / 0x44;
  if (uVar2 < uVar3) {
    if (0x3c3c3c3c3c3c3c3 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
    }
    else {
      uVar2 = uVar2 + (uVar2 >> 1);
    }
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_14004a2a0(param_1,uVar2);
  }
  return;
}



void FUN_14004bd50(longlong *param_1)

{
  undefined8 *puVar1;
  void *pvVar2;
  
  if ((*param_1 != 0) &&
     (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
     *(longlong *)(*param_1 + 8) == 0)) {
    puVar1 = (undefined8 *)*param_1;
    pvVar2 = (void *)*puVar1;
    if (pvVar2 != (void *)0x0) {
      operator_delete(pvVar2);
    }
    FUN_140156970(puVar1);
  }
  return;
}



undefined2 * FUN_14004bda0(undefined4 *param_1,undefined4 *param_2,undefined2 *param_3)

{
  undefined4 *puVar1;
  longlong lVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  
  if (param_1 != param_2) {
    puVar3 = param_1 + 0x1d;
    puVar4 = (undefined4 *)(param_3 + 0x3a);
    do {
      *param_3 = *(undefined2 *)(puVar3 + -0x1d);
      *(undefined2 *)((longlong)puVar4 + -0x72) = *(undefined2 *)((longlong)puVar3 + -0x72);
      lVar2 = 0x10;
      *(undefined8 *)(puVar4 + -0x1c) = *(undefined8 *)(puVar3 + -0x1c);
      *(undefined8 *)(puVar4 + -0x1a) = *(undefined8 *)(puVar3 + -0x1a);
      *(undefined8 *)(puVar4 + -0x18) = *(undefined8 *)(puVar3 + -0x18);
      *(undefined8 *)(puVar4 + -0x16) = *(undefined8 *)(puVar3 + -0x16);
      puVar4[-0x14] = puVar3[-0x14];
      puVar1 = puVar4 + -0x13;
      do {
        lVar2 = lVar2 + -1;
        *(undefined2 *)puVar1 =
             *(undefined2 *)((longlong)puVar3 + (-0x74 - (longlong)param_3) + (longlong)puVar1);
        puVar1 = (undefined4 *)((longlong)puVar1 + 2);
      } while (lVar2 != 0);
      param_3 = param_3 + 0x52;
      *(undefined2 *)(puVar4 + -0xb) = *(undefined2 *)(puVar3 + -0xb);
      *(undefined4 *)((longlong)puVar4 + -0x2a) = *(undefined4 *)((longlong)puVar3 + -0x2a);
      *(undefined4 *)((longlong)puVar4 + -0x26) = *(undefined4 *)((longlong)puVar3 + -0x26);
      *(undefined8 *)((longlong)puVar4 + -0x22) = *(undefined8 *)((longlong)puVar3 + -0x22);
      *(undefined4 *)((longlong)puVar4 + -0x1a) = *(undefined4 *)((longlong)puVar3 + -0x1a);
      *(undefined4 *)((longlong)puVar4 + -0x16) = *(undefined4 *)((longlong)puVar3 + -0x16);
      *(undefined4 *)((longlong)puVar4 + -0x12) = *(undefined4 *)((longlong)puVar3 + -0x12);
      *(undefined2 *)((longlong)puVar4 + -0xe) = *(undefined2 *)((longlong)puVar3 + -0xe);
      puVar4[-3] = puVar3[-3];
      puVar4[-2] = puVar3[-2];
      puVar4[-1] = puVar3[-1];
      *puVar4 = *puVar3;
      puVar4[1] = puVar3[1];
      puVar4[2] = puVar3[2];
      puVar4[3] = puVar3[3];
      puVar4[4] = puVar3[4];
      puVar4[5] = puVar3[5];
      puVar4[6] = puVar3[6];
      puVar4[7] = puVar3[7];
      puVar4[8] = puVar3[8];
      puVar4[9] = puVar3[9];
      puVar4[10] = puVar3[10];
      puVar4[0xb] = puVar3[0xb];
      puVar1 = puVar3 + 0xc;
      puVar3 = puVar3 + 0x29;
      puVar4 = puVar4 + 0x29;
    } while (puVar1 != param_2);
  }
  return param_3;
}



undefined4 * FUN_14004bf80(undefined4 *param_1,undefined4 *param_2,undefined4 *param_3)

{
  for (; param_1 != param_2; param_1 = param_1 + 4) {
    if (param_3 != (undefined4 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      param_3[2] = param_1[2];
      param_3[3] = param_1[3];
    }
    param_3 = param_3 + 4;
  }
  return param_3;
}



undefined8 * FUN_14004bfd0(longlong param_1,longlong param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = param_1 + 8) {
    if (param_3 != (undefined8 *)0x0) {
      FUN_1401568c0();
      *param_3 = PTR_DAT_1403200a0;
      FUN_14004f4f0(param_3,param_1);
    }
    param_3 = param_3 + 1;
  }
  return param_3;
}



void * FUN_14004c040(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x62)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x62);
    }
    param_3 = (void *)((longlong)param_3 + 0x62);
  }
  return param_3;
}



void * FUN_14004c0a0(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x108)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x108);
    }
    param_3 = (void *)((longlong)param_3 + 0x108);
  }
  return param_3;
}



void * FUN_14004c100(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x84)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x84);
    }
    param_3 = (void *)((longlong)param_3 + 0x84);
  }
  return param_3;
}



undefined8 * FUN_14004c160(undefined8 *param_1,undefined8 *param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = (undefined8 *)((longlong)param_1 + 0x14)) {
    if (param_3 != (undefined8 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      *(undefined4 *)(param_3 + 2) = *(undefined4 *)(param_1 + 2);
    }
    param_3 = (undefined8 *)((longlong)param_3 + 0x14);
  }
  return param_3;
}



void * FUN_14004c1b0(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0xc0)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0xc0);
    }
    param_3 = (void *)((longlong)param_3 + 0xc0);
  }
  return param_3;
}



undefined8 * FUN_14004c210(undefined8 *param_1,undefined8 *param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = (undefined8 *)((longlong)param_1 + 0x1b)) {
    if (param_3 != (undefined8 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      param_3[2] = param_1[2];
      *(undefined2 *)(param_3 + 3) = *(undefined2 *)(param_1 + 3);
      *(undefined1 *)((longlong)param_3 + 0x1a) = *(undefined1 *)((longlong)param_1 + 0x1a);
    }
    param_3 = (undefined8 *)((longlong)param_3 + 0x1b);
  }
  return param_3;
}



undefined8 * FUN_14004c270(undefined8 *param_1,undefined8 *param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = param_1 + 7) {
    if (param_3 != (undefined8 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      param_3[2] = param_1[2];
      param_3[3] = param_1[3];
      param_3[4] = param_1[4];
      param_3[5] = param_1[5];
      param_3[6] = param_1[6];
    }
    param_3 = param_3 + 7;
  }
  return param_3;
}



void * FUN_14004c2e0(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x122)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x122);
    }
    param_3 = (void *)((longlong)param_3 + 0x122);
  }
  return param_3;
}



undefined8 * FUN_14004c340(undefined8 *param_1,undefined8 *param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = (undefined8 *)((longlong)param_1 + 0x34)) {
    if (param_3 != (undefined8 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      param_3[2] = param_1[2];
      param_3[3] = param_1[3];
      param_3[4] = param_1[4];
      param_3[5] = param_1[5];
      *(undefined4 *)(param_3 + 6) = *(undefined4 *)(param_1 + 6);
    }
    param_3 = (undefined8 *)((longlong)param_3 + 0x34);
  }
  return param_3;
}



void * FUN_14004c3b0(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x88)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x88);
    }
    param_3 = (void *)((longlong)param_3 + 0x88);
  }
  return param_3;
}



void * FUN_14004c410(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x336)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x336);
    }
    param_3 = (void *)((longlong)param_3 + 0x336);
  }
  return param_3;
}



void * FUN_14004c470(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0xd0)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0xd0);
    }
    param_3 = (void *)((longlong)param_3 + 0xd0);
  }
  return param_3;
}



undefined8 * FUN_14004c4d0(undefined8 *param_1,undefined8 *param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = (undefined8 *)((longlong)param_1 + 0xc)) {
    if (param_3 != (undefined8 *)0x0) {
      *param_3 = *param_1;
      *(undefined4 *)(param_3 + 1) = *(undefined4 *)(param_1 + 1);
    }
    param_3 = (undefined8 *)((longlong)param_3 + 0xc);
  }
  return param_3;
}



undefined8 * FUN_14004c510(undefined8 *param_1,undefined8 *param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = (undefined8 *)((longlong)param_1 + 0x1c)) {
    if (param_3 != (undefined8 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      param_3[2] = param_1[2];
      *(undefined4 *)(param_3 + 3) = *(undefined4 *)(param_1 + 3);
    }
    param_3 = (undefined8 *)((longlong)param_3 + 0x1c);
  }
  return param_3;
}



void * FUN_14004c560(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x5e)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x5e);
    }
    param_3 = (void *)((longlong)param_3 + 0x5e);
  }
  return param_3;
}



void * FUN_14004c5c0(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x6f)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x6f);
    }
    param_3 = (void *)((longlong)param_3 + 0x6f);
  }
  return param_3;
}



undefined8 * FUN_14004c620(undefined8 *param_1,undefined8 *param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = param_1 + 4) {
    if (param_3 != (undefined8 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      param_3[2] = param_1[2];
      param_3[3] = param_1[3];
    }
    param_3 = param_3 + 4;
  }
  return param_3;
}



void * FUN_14004c670(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x182)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x182);
    }
    param_3 = (void *)((longlong)param_3 + 0x182);
  }
  return param_3;
}



void * FUN_14004c6d0(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0xaf)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0xaf);
    }
    param_3 = (void *)((longlong)param_3 + 0xaf);
  }
  return param_3;
}



void * FUN_14004c730(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x5c)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x5c);
    }
    param_3 = (void *)((longlong)param_3 + 0x5c);
  }
  return param_3;
}



void * FUN_14004c790(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x85)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x85);
    }
    param_3 = (void *)((longlong)param_3 + 0x85);
  }
  return param_3;
}



undefined8 * FUN_14004c7f0(undefined8 *param_1,undefined8 *param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = param_1 + 3) {
    if (param_3 != (undefined8 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      param_3[2] = param_1[2];
    }
    param_3 = param_3 + 3;
  }
  return param_3;
}



void * FUN_14004c840(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0xa4)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0xa4);
    }
    param_3 = (void *)((longlong)param_3 + 0xa4);
  }
  return param_3;
}



void * FUN_14004c8a0(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x50)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x50);
    }
    param_3 = (void *)((longlong)param_3 + 0x50);
  }
  return param_3;
}



void * FUN_14004c900(void *param_1,void *param_2,void *param_3)

{
  for (; param_1 != param_2; param_1 = (void *)((longlong)param_1 + 0x2b1)) {
    if (param_3 != (void *)0x0) {
      memcpy(param_3,param_1,0x2b1);
    }
    param_3 = (void *)((longlong)param_3 + 0x2b1);
  }
  return param_3;
}



undefined4 * FUN_14004c960(undefined4 *param_1,undefined4 *param_2,undefined4 *param_3)

{
  for (; param_1 != param_2; param_1 = param_1 + 3) {
    if (param_3 != (undefined4 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      param_3[2] = param_1[2];
    }
    param_3 = param_3 + 3;
  }
  return param_3;
}



undefined8 * FUN_14004c9a0(undefined8 *param_1,undefined8 *param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = (undefined8 *)((longlong)param_1 + 0x41)) {
    if (param_3 != (undefined8 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      param_3[2] = param_1[2];
      param_3[3] = param_1[3];
      param_3[4] = param_1[4];
      param_3[5] = param_1[5];
      param_3[6] = param_1[6];
      param_3[7] = param_1[7];
      *(undefined1 *)(param_3 + 8) = *(undefined1 *)(param_1 + 8);
    }
    param_3 = (undefined8 *)((longlong)param_3 + 0x41);
  }
  return param_3;
}



undefined8 * FUN_14004ca20(undefined8 *param_1,undefined8 *param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = (undefined8 *)((longlong)param_1 + 0x1f)) {
    if (param_3 != (undefined8 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      param_3[2] = param_1[2];
      *(undefined4 *)(param_3 + 3) = *(undefined4 *)(param_1 + 3);
      *(undefined2 *)((longlong)param_3 + 0x1c) = *(undefined2 *)((longlong)param_1 + 0x1c);
      *(undefined1 *)((longlong)param_3 + 0x1e) = *(undefined1 *)((longlong)param_1 + 0x1e);
    }
    param_3 = (undefined8 *)((longlong)param_3 + 0x1f);
  }
  return param_3;
}



undefined1 * FUN_14004ca80(undefined1 *param_1,undefined1 *param_2,undefined1 *param_3)

{
  for (; param_1 != param_2; param_1 = param_1 + 9) {
    if (param_3 != (undefined1 *)0x0) {
      *param_3 = *param_1;
      *(undefined4 *)(param_3 + 1) = *(undefined4 *)(param_1 + 1);
      *(undefined4 *)(param_3 + 5) = *(undefined4 *)(param_1 + 5);
    }
    param_3 = param_3 + 9;
  }
  return param_3;
}



undefined8 * FUN_14004cac0(undefined8 *param_1,undefined8 *param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = (undefined8 *)((longlong)param_1 + 0x12)) {
    if (param_3 != (undefined8 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      *(undefined2 *)(param_3 + 2) = *(undefined2 *)(param_1 + 2);
    }
    param_3 = (undefined8 *)((longlong)param_3 + 0x12);
  }
  return param_3;
}



undefined8 * FUN_14004cb10(undefined8 *param_1,undefined8 *param_2,undefined8 *param_3)

{
  for (; param_1 != param_2; param_1 = (undefined8 *)((longlong)param_1 + 0x44)) {
    if (param_3 != (undefined8 *)0x0) {
      *param_3 = *param_1;
      param_3[1] = param_1[1];
      param_3[2] = param_1[2];
      param_3[3] = param_1[3];
      param_3[4] = param_1[4];
      param_3[5] = param_1[5];
      param_3[6] = param_1[6];
      param_3[7] = param_1[7];
      *(undefined4 *)(param_3 + 8) = *(undefined4 *)(param_1 + 8);
    }
    param_3 = (undefined8 *)((longlong)param_3 + 0x44);
  }
  return param_3;
}



void FUN_14004cb90(longlong param_1)

{
  FUN_140043970(param_1 + -8);
  return;
}



void FUN_14004cba0(longlong param_1)

{
  FUN_140043970(param_1 + -0x40);
  return;
}



void FUN_14004cbb0(longlong param_1)

{
  FUN_140043970(param_1 + -0x80);
  return;
}



undefined8 FUN_14004cbc0(void)

{
  return 0x2fe8;
}



undefined8 FUN_14004cbd0(void)

{
  return 12000;
}



void * FUN_14004cbe0(undefined8 param_1,ulonglong param_2)

{
  void *pvVar1;
  char *local_res10 [3];
  undefined **local_28 [5];
  
  if (param_2 == 0) {
    return (void *)0x0;
  }
  if ((param_2 < 0x4000000000000000) && (pvVar1 = operator_new(param_2 * 4), pvVar1 != (void *)0x0))
  {
    return pvVar1;
  }
  local_res10[0] = (char *)0x0;
  std::exception::exception((exception *)local_28,local_res10);
  local_28[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_28,(ThrowInfo *)&DAT_14031d988);
}



void FUN_14004cc50(longlong *param_1,longlong *param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  undefined *puVar4;
  int iVar5;
  undefined4 uVar6;
  undefined *puVar7;
  
  puVar4 = (undefined *)*param_2;
  if (((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_1403200a0)) && (0 < *(int *)(puVar4 + -8))
     ) {
    puVar7 = (undefined *)*param_1;
    iVar5 = 0;
    if ((puVar7 != (undefined *)0x0) && (puVar7 != PTR_DAT_1403200a0)) {
      iVar5 = *(int *)(puVar7 + -8);
    }
    iVar3 = *(int *)(puVar4 + -8) + iVar5;
    iVar1 = 0;
    if ((puVar7 != (undefined *)0x0) && (iVar1 = 0, puVar7 != PTR_DAT_1403200a0)) {
      iVar1 = *(int *)(puVar7 + -8);
    }
    if (((iVar3 <= iVar1) && (iVar3 = 0, puVar7 != (undefined *)0x0)) &&
       (puVar7 != PTR_DAT_1403200a0)) {
      iVar3 = *(int *)(puVar7 + -8);
    }
    iVar1 = 0;
    iVar2 = 1;
    if (1 < iVar3) {
      iVar2 = iVar3;
    }
    if ((puVar7 != (undefined *)0x0) && (puVar7 != PTR_DAT_1403200a0)) {
      iVar1 = *(int *)(puVar7 + -8);
    }
    if (iVar1 < iVar2) {
      FUN_14004f590(param_1,iVar2);
    }
    FUN_14004f670(param_1);
    puVar4 = (undefined *)*param_2;
    uVar6 = 0;
    puVar7 = (undefined *)*param_1;
    if ((undefined *)*param_1 == (undefined *)0x0) {
      puVar7 = PTR_DAT_1403200a0;
    }
    if ((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_1403200a0)) {
      uVar6 = *(undefined4 *)(puVar4 + -8);
    }
    if (puVar4 == (undefined *)0x0) {
      puVar4 = PTR_DAT_1403200a0;
    }
    FUN_140156770(puVar7 + (longlong)iVar5 * 2,puVar4,uVar6);
    puVar4 = (undefined *)*param_2;
    iVar1 = 0;
    if ((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_1403200a0)) {
      iVar1 = *(int *)(puVar4 + -8);
    }
    iVar3 = 0;
    iVar2 = 0;
    if (0 < iVar1 + iVar5) {
      iVar2 = iVar1 + iVar5;
    }
    puVar4 = (undefined *)*param_1;
    if ((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_1403200a0)) {
      iVar3 = *(int *)(puVar4 + -8);
    }
    if ((iVar3 <= iVar2) && (iVar2 = 0, puVar4 != (undefined *)0x0)) {
      if (puVar4 == PTR_DAT_1403200a0) {
        return;
      }
      iVar2 = *(int *)(puVar4 + -8);
    }
    if (((puVar4 != PTR_DAT_1403200a0) && (puVar4 != (undefined *)0x0)) &&
       ((int *)(puVar4 + -8) != (int *)0x0)) {
      *(int *)(puVar4 + -8) = iVar2;
      *(undefined2 *)(puVar4 + (longlong)iVar2 * 2) = 0;
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14004cdc0(undefined8 param_1,wchar_t *param_2,va_list param_3)

{
  int iVar1;
  undefined8 uVar2;
  undefined1 auStack_858 [32];
  wchar_t local_838 [1040];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_858;
  if (param_2 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  iVar1 = vswprintf_s(local_838,0x400,param_2,param_3);
  uVar2 = FUN_14004f760(param_1,iVar1);
  FUN_140156770(uVar2,local_838,iVar1);
  FUN_14004f380(param_1);
  return;
}



void FUN_14004ce50(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 local_res18;
  undefined8 local_res20;
  
  local_res18 = param_3;
  local_res20 = param_4;
  FUN_14004cdc0(param_1,param_2,&local_res18);
  return;
}



longlong * FUN_14004ce80(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  undefined *puVar2;
  int iVar3;
  int iVar4;
  undefined *puVar5;
  int iVar6;
  undefined *puVar7;
  undefined *local_res8;
  undefined8 uVar8;
  
  uVar8 = 0xfffffffffffffffe;
  FUN_1401568c0();
  puVar2 = PTR_DAT_1403200a0;
  local_res8 = PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(param_2);
  iVar6 = 0;
  if ((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) {
    iVar6 = *(int *)(puVar2 + -8);
  }
  iVar4 = iVar3;
  if (((iVar3 <= iVar6) && (iVar4 = 0, puVar2 != (undefined *)0x0)) && (puVar2 != PTR_DAT_1403200a0)
     ) {
    iVar4 = *(int *)(puVar2 + -8);
  }
  iVar6 = 1;
  if (1 < iVar4) {
    iVar6 = iVar4;
  }
  iVar4 = 0;
  if ((puVar2 != (undefined *)0x0) && (iVar4 = 0, puVar2 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(puVar2 + -8);
  }
  if (iVar4 < iVar6) {
    FUN_14004f590(&local_res8);
  }
  FUN_14004f670(&local_res8);
  puVar2 = local_res8;
  puVar7 = local_res8;
  if (local_res8 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar7,param_2,iVar3,param_4,uVar8);
  puVar7 = puVar2;
  if (puVar2 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar7);
  puVar7 = PTR_DAT_1403200a0;
  iVar6 = 0;
  if (0 < iVar3) {
    iVar6 = iVar3;
  }
  iVar3 = 0;
  if ((puVar2 != (undefined *)0x0) && (iVar3 = 0, puVar2 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(puVar2 + -8);
  }
  if ((iVar3 <= iVar6) && (iVar6 = 0, puVar2 != (undefined *)0x0)) {
    if (puVar2 == PTR_DAT_1403200a0) goto LAB_14004cfa0;
    iVar6 = *(int *)(puVar2 + -8);
  }
  if (((puVar2 != PTR_DAT_1403200a0) && (puVar2 != (undefined *)0x0)) &&
     ((int *)(puVar2 + -8) != (int *)0x0)) {
    *(int *)(puVar2 + -8) = iVar6;
    *(undefined2 *)(puVar2 + (longlong)iVar6 * 2) = 0;
  }
LAB_14004cfa0:
  puVar5 = (undefined *)*param_1;
  if ((undefined *)*param_1 == (undefined *)0x0) {
    puVar5 = puVar7;
  }
  *param_1 = (longlong)puVar5;
  if (puVar2 != puVar5) {
    uVar8 = FUN_1401568c0();
    FUN_140156b50(uVar8);
    FUN_14004f990(param_1);
    *param_1 = (longlong)puVar2;
    if (((puVar2 != PTR_DAT_1403200a0) && (puVar2 != (undefined *)0x0)) &&
       (puVar2 != (undefined *)0x8)) {
      *(int *)(puVar2 + -4) = *(int *)(puVar2 + -4) + 1;
    }
    FUN_140156be0(uVar8);
    puVar7 = PTR_DAT_1403200a0;
  }
  if (((puVar2 != (undefined *)0x0) && (puVar2 != puVar7)) && (puVar2 + -8 != (undefined *)0x0)) {
    uVar8 = FUN_1401568c0();
    FUN_140156b50(uVar8);
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
    FUN_140156be0(uVar8);
  }
  return param_1;
}



void FUN_14004d060(undefined8 *param_1)

{
  if (7 < (ulonglong)param_1[3]) {
    operator_delete((void *)*param_1);
  }
  param_1[3] = 7;
  param_1[2] = 0;
  *(undefined2 *)param_1 = 0;
  return;
}



void FUN_14004d090(undefined8 *param_1)

{
  if (0xf < (ulonglong)param_1[3]) {
    operator_delete((void *)*param_1);
  }
  param_1[3] = 0xf;
  param_1[2] = 0;
  *(undefined1 *)param_1 = 0;
  return;
}



longlong * FUN_14004d0d0(longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  code *pcVar1;
  longlong *plVar2;
  longlong *plVar3;
  ulonglong uVar4;
  longlong lVar5;
  
  if ((ulonglong)param_1[2] < param_2) {
    std::_Xout_of_range("invalid string position");
    pcVar1 = (code *)swi(3);
    plVar2 = (longlong *)(*pcVar1)();
    return plVar2;
  }
  uVar4 = param_1[2] - param_2;
  if (uVar4 < param_3) {
    param_3 = uVar4;
  }
  if (param_3 != 0) {
    plVar2 = param_1;
    plVar3 = param_1;
    if (0xf < (ulonglong)param_1[3]) {
      plVar2 = (longlong *)*param_1;
      plVar3 = (longlong *)*param_1;
    }
    memmove((void *)((longlong)plVar2 + param_2),(void *)((longlong)plVar3 + param_3 + param_2),
            uVar4 - param_3);
    lVar5 = param_1[2] - param_3;
    param_1[2] = lVar5;
    if (0xf < (ulonglong)param_1[3]) {
      *(undefined1 *)(*param_1 + lVar5) = 0;
      return param_1;
    }
    *(undefined1 *)((longlong)param_1 + lVar5) = 0;
  }
  return param_1;
}



undefined8 *
FUN_14004d170(undefined8 *param_1,undefined8 *param_2,ulonglong param_3,ulonglong param_4)

{
  code *pcVar1;
  char cVar2;
  undefined8 *puVar3;
  ulonglong _Size;
  
  if (param_3 <= (ulonglong)param_2[2]) {
    _Size = param_2[2] - param_3;
    if (param_4 < _Size) {
      _Size = param_4;
    }
    if (param_1 == param_2) {
      FUN_14004d0d0(param_1,_Size + param_3,0xffffffffffffffff);
      FUN_14004d0d0(param_1,0,param_3);
    }
    else {
      cVar2 = FUN_14004d460(param_1,_Size);
      if (cVar2 != '\0') {
        if (0xf < (ulonglong)param_2[3]) {
          param_2 = (undefined8 *)*param_2;
        }
        puVar3 = param_1;
        if (0xf < (ulonglong)param_1[3]) {
          puVar3 = (undefined8 *)*param_1;
        }
        memcpy(puVar3,(void *)((longlong)param_2 + param_3),_Size);
        param_1[2] = _Size;
        puVar3 = param_1;
        if (0xf < (ulonglong)param_1[3]) {
          puVar3 = (undefined8 *)*param_1;
        }
        *(undefined1 *)((longlong)puVar3 + _Size) = 0;
      }
    }
    return param_1;
  }
  std::_Xout_of_range("invalid string position");
  pcVar1 = (code *)swi(3);
  puVar3 = (undefined8 *)(*pcVar1)();
  return puVar3;
}



exception * FUN_14004d250(exception *param_1,uint param_2)

{
  *(undefined ***)param_1 = std::bad_alloc::vftable;
  std::exception::~exception(param_1);
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



exception * FUN_14004d290(exception *param_1,exception *param_2)

{
  std::exception::exception(param_1,param_2);
  *(undefined ***)param_1 = std::bad_alloc::vftable;
  return param_1;
}



void * FUN_14004d2c0(__uint64 param_1)

{
  void *pvVar1;
  char *local_res8 [4];
  undefined **local_28 [5];
  
  pvVar1 = (void *)0x0;
  if ((param_1 != 0) && (pvVar1 = operator_new(param_1), pvVar1 == (void *)0x0)) {
    local_res8[0] = (char *)0x0;
    std::exception::exception((exception *)local_28,local_res8);
    local_28[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_28,(ThrowInfo *)&DAT_14031d988);
  }
  return pvVar1;
}



void FUN_14004d320(undefined8 *param_1,ulonglong param_2,size_t param_3)

{
  ulonglong uVar1;
  undefined8 *_Dst;
  ulonglong uVar2;
  undefined8 *_Src;
  ulonglong uVar3;
  char *local_res20;
  undefined **local_40 [4];
  
  uVar3 = param_2 | 0xf;
  if (uVar3 != 0xffffffffffffffff) {
    uVar1 = param_1[3];
    uVar2 = uVar1 >> 1;
    param_2 = uVar3;
    if ((uVar3 / 3 < uVar2) && (param_2 = 0xfffffffffffffffe, uVar1 <= -uVar2 - 2)) {
      param_2 = uVar2 + uVar1;
    }
  }
  _Dst = (undefined8 *)0x0;
  if ((param_2 + 1 != 0) && (_Dst = operator_new(param_2 + 1), _Dst == (undefined8 *)0x0)) {
    local_res20 = (char *)0x0;
    std::exception::exception((exception *)local_40,&local_res20);
    local_40[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_40,(ThrowInfo *)&DAT_14031d988);
  }
  if (param_3 != 0) {
    _Src = param_1;
    if (0xf < (ulonglong)param_1[3]) {
      _Src = (undefined8 *)*param_1;
    }
    memcpy(_Dst,_Src,param_3);
  }
  if (0xf < (ulonglong)param_1[3]) {
    operator_delete((void *)*param_1);
  }
  *(undefined1 *)param_1 = 0;
  *param_1 = _Dst;
  param_1[3] = param_2;
  param_1[2] = param_3;
  if (0xf < param_2) {
    param_1 = _Dst;
  }
  *(undefined1 *)((longlong)param_1 + param_3) = 0;
  return;
}



undefined1 FUN_14004d460(undefined8 *param_1,ulonglong param_2)

{
  code *pcVar1;
  undefined1 uVar2;
  
  if (param_2 == 0xffffffffffffffff) {
    std::_Xlength_error("string too long");
    pcVar1 = (code *)swi(3);
    uVar2 = (*pcVar1)();
    return uVar2;
  }
  if ((ulonglong)param_1[3] < param_2) {
    FUN_14004d320(param_1,param_2,param_1[2]);
    return param_2 != 0;
  }
  if (param_2 == 0) {
    param_1[2] = 0;
    if (0xf < (ulonglong)param_1[3]) {
      param_1 = (undefined8 *)*param_1;
    }
    *(undefined1 *)param_1 = 0;
  }
  return param_2 != 0;
}



undefined8 * FUN_14004d4d0(undefined8 *param_1,undefined8 *param_2,size_t param_3)

{
  ulonglong uVar1;
  char cVar2;
  undefined8 *puVar3;
  
  if (param_2 != (undefined8 *)0x0) {
    uVar1 = param_1[3];
    puVar3 = param_1;
    if (0xf < uVar1) {
      puVar3 = (undefined8 *)*param_1;
    }
    if (puVar3 <= param_2) {
      puVar3 = param_1;
      if (0xf < uVar1) {
        puVar3 = (undefined8 *)*param_1;
      }
      if (param_2 < (undefined8 *)((longlong)puVar3 + param_1[2])) {
        puVar3 = param_1;
        if (0xf < uVar1) {
          puVar3 = (undefined8 *)*param_1;
        }
        puVar3 = (undefined8 *)
                 FUN_14004d170(param_1,param_1,(longlong)param_2 - (longlong)puVar3,param_3);
        return puVar3;
      }
    }
  }
  cVar2 = FUN_14004d460(param_1,param_3);
  if (cVar2 != '\0') {
    puVar3 = param_1;
    if (0xf < (ulonglong)param_1[3]) {
      puVar3 = (undefined8 *)*param_1;
    }
    memcpy(puVar3,param_2,param_3);
    param_1[2] = param_3;
    puVar3 = param_1;
    if (0xf < (ulonglong)param_1[3]) {
      puVar3 = (undefined8 *)*param_1;
    }
    *(undefined1 *)((longlong)puVar3 + param_3) = 0;
  }
  return param_1;
}



void * FUN_14004d5a0(void *param_1,uint param_2)

{
  FUN_140157ce0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void thunk_FUN_140156cd0(void)

{
  FUN_140156cd0();
  return;
}



undefined8 FUN_14004d5e0(void)

{
  return 11000;
}



undefined8 FUN_14004d5f0(void)

{
  return 0x2b48;
}



// Library Function - Single Match
//  public: virtual void * __ptr64 __cdecl std::bad_alloc::`scalar deleting destructor'(unsigned
// int) __ptr64
// 
// Libraries: Visual Studio 2012 Release, Visual Studio 2015 Release

void * __thiscall std::bad_alloc::_scalar_deleting_destructor_(bad_alloc *this,uint param_1)

{
  *(undefined ***)this = Proud::INetServerEvent::vftable;
  FUN_140157ce0();
  if ((param_1 & 1) != 0) {
    operator_delete(this);
  }
  return this;
}



void FUN_14004d640(void)

{
  return;
}



void FUN_14004d650(undefined8 *param_1)

{
  *param_1 = Proud::INetServerEvent::vftable;
  FUN_140157ce0();
  return;
}



undefined8 * FUN_14004d6c0(undefined8 *param_1)

{
  *param_1 = 0;
  *(undefined4 *)(param_1 + 1) = 0;
  *(undefined8 *)((longlong)param_1 + 0xc) = 0;
  *(undefined8 *)((longlong)param_1 + 0x14) = 0;
  *(undefined8 *)((longlong)param_1 + 0x1c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x24) = 0;
  *(undefined8 *)((longlong)param_1 + 0x2c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x34) = 0;
  FUN_14004edf0();
  *(undefined8 *)((longlong)param_1 + 0x3c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x44) = 0;
  *(undefined8 *)((longlong)param_1 + 0x4c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x54) = 0;
  return param_1;
}



undefined8 * FUN_14004d740(undefined8 *param_1)

{
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[5] = 0;
  *(undefined4 *)(param_1 + 6) = 0;
  param_1[4] = 0;
  memset((void *)((longlong)param_1 + 0x54),0,100);
  *(undefined8 *)((longlong)param_1 + 0x34) = 0;
  *(undefined8 *)((longlong)param_1 + 0x3c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x44) = 0;
  *(undefined8 *)((longlong)param_1 + 0x4c) = 0;
  memset(param_1 + 0x17,0,0x1fe);
  return param_1;
}



undefined4 * FUN_14004d7c0(undefined4 *param_1)

{
  *param_1 = 0;
  param_1[2] = 0;
  *(undefined8 *)(param_1 + 3) = 0;
  *(undefined8 *)(param_1 + 5) = 0;
  *(undefined8 *)(param_1 + 7) = 0;
  *(undefined8 *)(param_1 + 0x2c) = 0;
  *(undefined8 *)(param_1 + 0x2e) = 0;
  *(undefined8 *)(param_1 + 0x30) = 0;
  *(undefined8 *)(param_1 + 9) = 0;
  memset(param_1 + 0xb,0,100);
  *(undefined8 *)(param_1 + 0x24) = 0;
  *(undefined8 *)(param_1 + 0x26) = 0;
  *(undefined8 *)(param_1 + 0x28) = 0;
  *(undefined8 *)(param_1 + 0x2a) = 0;
  return param_1;
}



undefined8 * FUN_14004d850(undefined8 *param_1)

{
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  *(undefined8 *)((longlong)param_1 + 0xac) = 0;
  *(undefined8 *)((longlong)param_1 + 0xdc) = 0;
  *(undefined8 *)((longlong)param_1 + 0xe4) = 0;
  *(undefined8 *)((longlong)param_1 + 0xec) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb4) = 0;
  *(undefined8 *)((longlong)param_1 + 0xf4) = 0;
  *(undefined8 *)((longlong)param_1 + 0xfc) = 0;
  *(undefined8 *)((longlong)param_1 + 0x104) = 0;
  *(undefined8 *)((longlong)param_1 + 0x10c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x114) = 0;
  *(undefined8 *)((longlong)param_1 + 0x11c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x124) = 0;
  *(undefined8 *)((longlong)param_1 + 300) = 0;
  *(undefined8 *)((longlong)param_1 + 0x174) = 0;
  *(undefined1 *)((longlong)param_1 + 0x17c) = 0;
  *(undefined4 *)((longlong)param_1 + 0x17d) = 0;
  memset(param_1 + 5,0,100);
  *(undefined8 *)((longlong)param_1 + 0x8c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x94) = 0;
  *(undefined8 *)((longlong)param_1 + 0x9c) = 0;
  *(undefined8 *)((longlong)param_1 + 0xa4) = 0;
  *(undefined8 *)((longlong)param_1 + 0xbc) = 0;
  *(undefined8 *)((longlong)param_1 + 0xc4) = 0;
  *(undefined8 *)((longlong)param_1 + 0xcc) = 0;
  *(undefined8 *)((longlong)param_1 + 0xd4) = 0;
  param_1[0x1e] = 0;
  param_1[0x1f] = 0;
  param_1[0x20] = 0;
  param_1[0x21] = 0;
  param_1[0x22] = 0;
  param_1[0x23] = 0;
  param_1[0x24] = 0;
  param_1[0x25] = 0;
  *(undefined4 *)(param_1 + 0x26) = 0;
  *(undefined8 *)((longlong)param_1 + 0x134) = 0;
  *(undefined8 *)((longlong)param_1 + 0x13c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x144) = 0;
  *(undefined8 *)((longlong)param_1 + 0x14c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x154) = 0;
  *(undefined8 *)((longlong)param_1 + 0x15c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x164) = 0;
  *(undefined8 *)((longlong)param_1 + 0x16c) = 0;
  *(undefined4 *)((longlong)param_1 + 0x174) = 0;
  return param_1;
}



undefined8 * FUN_14004d9e0(undefined8 *param_1)

{
  undefined4 *puVar1;
  longlong lVar2;
  
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  param_1[9] = 0;
  param_1[0xb] = 0;
  param_1[10] = 0;
  param_1[0xc] = 0;
  *(undefined2 *)(param_1 + 0xd) = 0;
  *(undefined8 *)((longlong)param_1 + 0x6a) = 0;
  *(undefined8 *)((longlong)param_1 + 0xae) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb6) = 0;
  *(undefined8 *)((longlong)param_1 + 0xbe) = 0;
  *(undefined4 *)((longlong)param_1 + 0xc6) = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[7] = 0;
  param_1[8] = 0;
  puVar1 = (undefined4 *)((longlong)param_1 + 0x7e);
  lVar2 = 3;
  do {
    puVar1[-3] = 0;
    *puVar1 = 0;
    puVar1[3] = 0;
    puVar1[6] = 0;
    puVar1[9] = 0;
    puVar1 = puVar1 + 1;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  return param_1;
}



undefined8 * FUN_14004daa0(undefined8 *param_1)

{
  undefined4 *puVar1;
  longlong lVar2;
  
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  param_1[9] = 0;
  param_1[0xb] = 0;
  param_1[10] = 0;
  param_1[0xc] = 0;
  *(undefined2 *)(param_1 + 0xd) = 0;
  *(undefined4 *)((longlong)param_1 + 0x6a) = 0;
  *(undefined8 *)((longlong)param_1 + 0xaa) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb2) = 0;
  *(undefined4 *)((longlong)param_1 + 0xda) = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[7] = 0;
  param_1[8] = 0;
  *(undefined8 *)((longlong)param_1 + 0xba) = 0;
  *(undefined8 *)((longlong)param_1 + 0xc2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xca) = 0;
  *(undefined8 *)((longlong)param_1 + 0xd2) = 0;
  puVar1 = (undefined4 *)((longlong)param_1 + 0x7a);
  lVar2 = 3;
  do {
    puVar1[-3] = 0;
    *puVar1 = 0;
    puVar1[3] = 0;
    puVar1[6] = 0;
    puVar1[9] = 0;
    puVar1 = puVar1 + 1;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  return param_1;
}



undefined8 * FUN_14004db70(undefined8 *param_1)

{
  undefined4 *puVar1;
  longlong lVar2;
  
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  param_1[9] = 0;
  param_1[0xb] = 0;
  param_1[10] = 0;
  param_1[0xc] = 0;
  *(undefined2 *)(param_1 + 0xd) = 0;
  *(undefined4 *)((longlong)param_1 + 0x6a) = 0;
  *(undefined8 *)((longlong)param_1 + 0xaa) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xba) = 0;
  *(undefined8 *)((longlong)param_1 + 0xc2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xca) = 0;
  *(undefined4 *)((longlong)param_1 + 0xf2) = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[7] = 0;
  param_1[8] = 0;
  *(undefined8 *)((longlong)param_1 + 0xd2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xda) = 0;
  *(undefined8 *)((longlong)param_1 + 0xe2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xea) = 0;
  puVar1 = (undefined4 *)((longlong)param_1 + 0x7a);
  lVar2 = 3;
  do {
    puVar1[-3] = 0;
    *puVar1 = 0;
    puVar1[3] = 0;
    puVar1[6] = 0;
    puVar1[9] = 0;
    puVar1 = puVar1 + 1;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  return param_1;
}



undefined8 * FUN_14004dc50(undefined8 *param_1)

{
  *param_1 = 0;
  param_1[1] = 0;
  param_1[3] = 0;
  param_1[2] = 0;
  param_1[4] = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[7] = 0;
  param_1[8] = 0;
  param_1[9] = 0;
  param_1[10] = 0;
  param_1[0xb] = 0;
  *(undefined2 *)(param_1 + 0xc) = 0;
  *(undefined8 *)((longlong)param_1 + 0x62) = 0;
  *(undefined8 *)((longlong)param_1 + 0x6a) = 0;
  *(undefined8 *)((longlong)param_1 + 0x72) = 0;
  *(undefined8 *)((longlong)param_1 + 0x7a) = 0;
  *(undefined8 *)((longlong)param_1 + 0x82) = 0;
  *(undefined8 *)((longlong)param_1 + 0x8a) = 0;
  *(undefined8 *)((longlong)param_1 + 0x92) = 0;
  *(undefined8 *)((longlong)param_1 + 0x9a) = 0;
  memset((void *)((longlong)param_1 + 0xa2),0,700);
  return param_1;
}



undefined8 * FUN_14004dd00(undefined8 *param_1)

{
  *param_1 = 0;
  param_1[1] = 0;
  param_1[3] = 0;
  param_1[2] = 0;
  param_1[4] = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  *(undefined1 *)(param_1 + 8) = 0;
  param_1[7] = 0;
  *(undefined4 *)((longlong)param_1 + 0x41) = 0;
  *(undefined8 *)((longlong)param_1 + 0x45) = 0;
  *(undefined8 *)((longlong)param_1 + 0x4d) = 0;
  *(undefined8 *)((longlong)param_1 + 0x55) = 0;
  *(undefined8 *)((longlong)param_1 + 0x5d) = 0;
  *(undefined8 *)((longlong)param_1 + 0x65) = 0;
  *(undefined8 *)((longlong)param_1 + 0x6d) = 0;
  *(undefined2 *)((longlong)param_1 + 0x75) = 0;
  *(undefined8 *)((longlong)param_1 + 0x77) = 0;
  *(undefined8 *)((longlong)param_1 + 0x7f) = 0;
  *(undefined8 *)((longlong)param_1 + 0x87) = 0;
  *(undefined8 *)((longlong)param_1 + 0x8f) = 0;
  *(undefined8 *)((longlong)param_1 + 0x97) = 0;
  *(undefined8 *)((longlong)param_1 + 0x9f) = 0;
  *(undefined8 *)((longlong)param_1 + 0xa7) = 0;
  *(undefined8 *)((longlong)param_1 + 0xaf) = 0;
  memset((void *)((longlong)param_1 + 0xb7),0,700);
  return param_1;
}



longlong FUN_14004de30(longlong param_1)

{
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  *(undefined4 *)(param_1 + 0x28) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x2c) = 0;
  *(undefined8 *)(param_1 + 0x34) = 0;
  *(undefined4 *)(param_1 + 0x3c) = 0;
  *(undefined8 *)(param_1 + 0x40) = 0;
  *(undefined8 *)(param_1 + 0x48) = 0;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined8 *)(param_1 + 0x58) = 0;
  *(undefined8 *)(param_1 + 0x60) = 0;
  *(undefined8 *)(param_1 + 0x68) = 0;
  *(undefined8 *)(param_1 + 0x70) = 0;
  *(undefined8 *)(param_1 + 0x78) = 0;
  memset((void *)(param_1 + 0x80),0,100);
  return param_1;
}



undefined4 * FUN_14004dfe0(undefined4 *param_1)

{
  *param_1 = 0;
  *(undefined2 *)(param_1 + 1) = 0;
  *(undefined4 *)((longlong)param_1 + 6) = 0;
  *(undefined1 *)((longlong)param_1 + 10) = 0;
  *(undefined1 *)((longlong)param_1 + 0x229) = 0;
  memset((void *)((longlong)param_1 + 0xb),0,0x1fe);
  *(undefined8 *)((longlong)param_1 + 0x209) = 0;
  *(undefined8 *)((longlong)param_1 + 0x211) = 0;
  *(undefined8 *)((longlong)param_1 + 0x219) = 0;
  *(undefined8 *)((longlong)param_1 + 0x221) = 0;
  return param_1;
}



undefined2 * FUN_14004e040(undefined2 *param_1)

{
  *param_1 = 0;
  *(undefined8 *)(param_1 + 1) = 0;
  *(undefined4 *)(param_1 + 5) = 0;
  *(undefined8 *)(param_1 + 7) = 0;
  *(undefined8 *)(param_1 + 0xb) = 0;
  *(undefined8 *)(param_1 + 0xf) = 0;
  *(undefined8 *)(param_1 + 0x13) = 0;
  memset(param_1 + 0x17,0,0x1fe);
  return param_1;
}



undefined8 * FUN_14004e080(undefined8 *param_1)

{
  *param_1 = 0;
  param_1[1] = 0;
  *(undefined1 *)((longlong)param_1 + 0xd4) = 0;
  *(undefined8 *)((longlong)param_1 + 0xd9) = 0;
  *(undefined8 *)((longlong)param_1 + 0xe1) = 0;
  memset(param_1 + 2,0,100);
  *(undefined8 *)((longlong)param_1 + 0x74) = 0;
  *(undefined8 *)((longlong)param_1 + 0x7c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x84) = 0;
  *(undefined8 *)((longlong)param_1 + 0x8c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x94) = 0;
  *(undefined8 *)((longlong)param_1 + 0x9c) = 0;
  *(undefined8 *)((longlong)param_1 + 0xa4) = 0;
  *(undefined8 *)((longlong)param_1 + 0xac) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb4) = 0;
  *(undefined8 *)((longlong)param_1 + 0xbc) = 0;
  *(undefined8 *)((longlong)param_1 + 0xc4) = 0;
  *(undefined8 *)((longlong)param_1 + 0xcc) = 0;
  *(undefined2 *)((longlong)param_1 + 0xd5) = 0;
  *(undefined2 *)((longlong)param_1 + 0xd7) = 0;
  return param_1;
}



undefined8 * FUN_14004e120(undefined8 *param_1)

{
  undefined8 *puVar1;
  longlong lVar2;
  
  lVar2 = 0;
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  *(undefined8 *)((longlong)param_1 + 0xac) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb4) = 0;
  *(undefined8 *)((longlong)param_1 + 0xbc) = 0;
  *(undefined8 *)((longlong)param_1 + 0xc4) = 0;
  param_1[0x2a] = 0;
  param_1[0x2c] = 0;
  param_1[0x2b] = 0;
  param_1[0x2d] = 0;
  param_1[0x2e] = 0;
  *(undefined4 *)(param_1 + 0x2f) = 0;
  *(undefined4 *)((longlong)param_1 + 0x1af) = 0;
  *(undefined8 *)((longlong)param_1 + 0x1b3) = 0;
  *(undefined8 *)((longlong)param_1 + 0x1bb) = 0;
  *(undefined8 *)((longlong)param_1 + 0x1c3) = 0;
  puVar1 = param_1 + 0x31;
  do {
    *(undefined4 *)((longlong)puVar1 + -0xc) = 0;
    *(undefined4 *)puVar1 = 0;
    *(undefined4 *)((longlong)puVar1 + 0xc) = 0;
    *(undefined4 *)(puVar1 + 3) = 0;
    *(undefined1 *)((longlong)param_1 + lVar2 + 0x1ac) = 0;
    lVar2 = lVar2 + 1;
    puVar1 = (undefined8 *)((longlong)puVar1 + 4);
  } while (lVar2 < 3);
  memset(param_1 + 5,0,100);
  *(undefined8 *)((longlong)param_1 + 0x8c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x94) = 0;
  *(undefined8 *)((longlong)param_1 + 0x9c) = 0;
  *(undefined8 *)((longlong)param_1 + 0xa4) = 0;
  memset((void *)((longlong)param_1 + 0xcc),0,100);
  param_1[0x26] = 0;
  param_1[0x27] = 0;
  param_1[0x28] = 0;
  param_1[0x29] = 0;
  return param_1;
}



undefined8 * FUN_14004e280(undefined8 *param_1)

{
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  *(undefined2 *)((longlong)param_1 + 0x8c) = 0;
  *(undefined8 *)((longlong)param_1 + 0xae) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb6) = 0;
  *(undefined4 *)((longlong)param_1 + 0xbe) = 0;
  *(undefined8 *)((longlong)param_1 + 0xe2) = 0;
  param_1[4] = 0;
  memset(param_1 + 5,0,100);
  *(undefined8 *)((longlong)param_1 + 0x8e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x96) = 0;
  *(undefined8 *)((longlong)param_1 + 0x9e) = 0;
  *(undefined8 *)((longlong)param_1 + 0xa6) = 0;
  *(undefined8 *)((longlong)param_1 + 0xc2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xca) = 0;
  *(undefined8 *)((longlong)param_1 + 0xd2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xda) = 0;
  return param_1;
}



undefined8 * FUN_14004e3b0(undefined8 *param_1)

{
  *param_1 = 0;
  param_1[1] = 0;
  param_1[0xc] = 0;
  param_1[2] = 0;
  param_1[0xd] = 0;
  *(undefined2 *)(param_1 + 0xe) = 0;
  *(undefined4 *)((longlong)param_1 + 0xce) = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[7] = 0;
  param_1[8] = 0;
  param_1[9] = 0;
  param_1[10] = 0;
  param_1[0xb] = 0;
  *(undefined8 *)((longlong)param_1 + 0x72) = 0;
  *(undefined8 *)((longlong)param_1 + 0x7a) = 0;
  *(undefined8 *)((longlong)param_1 + 0x82) = 0;
  *(undefined8 *)((longlong)param_1 + 0x8a) = 0;
  *(undefined8 *)((longlong)param_1 + 0x92) = 0;
  *(undefined8 *)((longlong)param_1 + 0x9a) = 0;
  *(undefined8 *)((longlong)param_1 + 0xa2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xaa) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xba) = 0;
  *(undefined8 *)((longlong)param_1 + 0xc2) = 0;
  *(undefined4 *)((longlong)param_1 + 0xca) = 0;
  return param_1;
}



undefined4 * FUN_14004e4e0(undefined4 *param_1)

{
  *param_1 = 0;
  *(undefined8 *)(param_1 + 1) = 0;
  *(undefined8 *)(param_1 + 3) = 0;
  *(undefined8 *)(param_1 + 0x1e) = 0;
  *(undefined1 *)(param_1 + 0x2a) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)((longlong)param_1 + 0xa9) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb1) = 0;
  *(undefined8 *)((longlong)param_1 + 0xc1) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb9) = 0;
  *(undefined8 *)((longlong)param_1 + 0xc9) = 0;
  *(undefined8 *)((longlong)param_1 + 0xd1) = 0;
  *(undefined8 *)((longlong)param_1 + 0xd9) = 0;
  *(undefined8 *)((longlong)param_1 + 0xe1) = 0;
  *(undefined8 *)((longlong)param_1 + 0xe9) = 0;
  *(undefined8 *)((longlong)param_1 + 0xf1) = 0;
  *(undefined8 *)(param_1 + 0x22) = 0;
  *(undefined8 *)(param_1 + 0x24) = 0;
  *(undefined8 *)(param_1 + 0x26) = 0;
  *(undefined8 *)(param_1 + 0x28) = 0;
  memset(param_1 + 5,0,100);
  return param_1;
}



undefined4 * FUN_14004e5b0(undefined4 *param_1)

{
  undefined8 *puVar1;
  longlong lVar2;
  
  *param_1 = 0;
  *(undefined8 *)(param_1 + 1) = 0;
  *(undefined8 *)(param_1 + 3) = 0;
  *(undefined8 *)(param_1 + 0x1e) = 0;
  *(undefined8 *)(param_1 + 0x2a) = 0;
  param_1[0x2c] = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x2d) = 0;
  *(undefined8 *)(param_1 + 0x31) = 0;
  *(undefined8 *)(param_1 + 0x2f) = 0;
  *(undefined8 *)(param_1 + 0x33) = 0;
  *(undefined8 *)(param_1 + 0x8f) = 0;
  *(undefined8 *)(param_1 + 0x35) = 0;
  *(undefined8 *)(param_1 + 0x91) = 0;
  *(undefined8 *)(param_1 + 0xed) = 0;
  *(undefined8 *)(param_1 + 0xef) = 0;
  *(undefined8 *)(param_1 + 0xf9) = 0;
  *(undefined8 *)(param_1 + 0x93) = 0;
  memset(param_1 + 5,0,100);
  *(undefined8 *)(param_1 + 0x22) = 0;
  *(undefined8 *)(param_1 + 0x24) = 0;
  *(undefined8 *)(param_1 + 0x26) = 0;
  *(undefined8 *)(param_1 + 0x28) = 0;
  *(undefined8 *)(param_1 + 0xf1) = 0;
  *(undefined8 *)(param_1 + 0xf3) = 0;
  *(undefined8 *)(param_1 + 0xf5) = 0;
  *(undefined8 *)(param_1 + 0xf7) = 0;
  *(undefined8 *)(param_1 + 0x37) = 0;
  *(undefined8 *)(param_1 + 0x39) = 0;
  *(undefined8 *)(param_1 + 0x3b) = 0;
  *(undefined8 *)(param_1 + 0x3d) = 0;
  *(undefined8 *)(param_1 + 0x95) = 0;
  *(undefined8 *)(param_1 + 0x97) = 0;
  *(undefined8 *)(param_1 + 0x99) = 0;
  *(undefined8 *)(param_1 + 0x9b) = 0;
  lVar2 = 10;
  puVar1 = (undefined8 *)(param_1 + 0x9d);
  do {
    lVar2 = lVar2 + -1;
    puVar1[-0x2f] = 0;
    puVar1[-0x2e] = 0;
    puVar1[-0x2d] = 0;
    puVar1[-0x2c] = 0;
    *puVar1 = 0;
    puVar1[1] = 0;
    puVar1[2] = 0;
    puVar1[3] = 0;
    puVar1 = puVar1 + 4;
  } while (lVar2 != 0);
  return param_1;
}



undefined8 FUN_14004e870(undefined8 param_1,undefined4 *param_2)

{
  char cVar1;
  undefined4 local_res8 [2];
  
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *param_2 = local_res8[0];
  }
  return param_1;
}



undefined8 * FUN_14004e8b0(undefined8 *param_1)

{
  param_1[4] = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[7] = 0;
  param_1[8] = 0;
  param_1[9] = 0;
  param_1[10] = 0;
  *(undefined2 *)(param_1 + 0xb) = 0;
  *(undefined8 *)((longlong)param_1 + 0x5a) = 0;
  *(undefined2 *)((longlong)param_1 + 0x62) = 0;
  *(undefined8 *)((longlong)param_1 + 100) = 0;
  *(undefined8 *)((longlong)param_1 + 0x6c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x74) = 0;
  *(undefined4 *)((longlong)param_1 + 0x7c) = 0;
  *(undefined2 *)(param_1 + 0x10) = 0;
  *(undefined8 *)((longlong)param_1 + 0x82) = 0;
  *(undefined8 *)((longlong)param_1 + 0x8a) = 0;
  *(undefined8 *)((longlong)param_1 + 0x92) = 0;
  *(undefined2 *)((longlong)param_1 + 0x9a) = 0;
  *(undefined1 *)((longlong)param_1 + 0x9c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x9d) = 0;
  *(undefined8 *)((longlong)param_1 + 0xa5) = 0;
  *(undefined8 *)((longlong)param_1 + 0xad) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb5) = 0;
  *(undefined8 *)((longlong)param_1 + 0xdd) = 0;
  *(undefined8 *)((longlong)param_1 + 0xe5) = 0;
  *(undefined8 *)((longlong)param_1 + 0xed) = 0;
  *(undefined8 *)((longlong)param_1 + 0xfd) = 0;
  *(undefined8 *)((longlong)param_1 + 0xf5) = 0;
  *(undefined8 *)((longlong)param_1 + 0x105) = 0;
  *(undefined2 *)((longlong)param_1 + 0x10d) = 0;
  *(undefined8 *)((longlong)param_1 + 0x10f) = 0;
  *(undefined2 *)((longlong)param_1 + 0x153) = 0;
  *(undefined4 *)((longlong)param_1 + 0x155) = 0;
  *(undefined1 *)((longlong)param_1 + 0x181) = 0;
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  *(undefined8 *)((longlong)param_1 + 0xbd) = 0;
  *(undefined8 *)((longlong)param_1 + 0xc5) = 0;
  *(undefined8 *)((longlong)param_1 + 0xcd) = 0;
  *(undefined8 *)((longlong)param_1 + 0xd5) = 0;
  *(undefined8 *)((longlong)param_1 + 0x117) = 0;
  *(undefined8 *)((longlong)param_1 + 0x11f) = 0;
  *(undefined8 *)((longlong)param_1 + 0x127) = 0;
  *(undefined8 *)((longlong)param_1 + 0x12f) = 0;
  *(undefined8 *)((longlong)param_1 + 0x137) = 0;
  *(undefined8 *)((longlong)param_1 + 0x13f) = 0;
  *(undefined8 *)((longlong)param_1 + 0x147) = 0;
  *(undefined4 *)((longlong)param_1 + 0x14f) = 0;
  memset((void *)((longlong)param_1 + 0x159),0,0x28);
  return param_1;
}



void FUN_14004ea80(undefined4 param_1)

{
  undefined4 local_res8 [8];
  
  local_res8[0] = param_1;
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_res8,(ThrowInfo *)&DAT_14031d8a0);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 * FUN_14004eaa0(undefined4 *param_1)

{
  errno_t eVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined8 local_78;
  undefined4 local_70;
  __time64_t local_68;
  short local_60;
  short local_5e;
  undefined2 local_5c;
  undefined2 local_5a;
  undefined2 local_58;
  undefined2 local_56;
  undefined2 local_54;
  undefined2 local_52;
  undefined8 local_50;
  undefined8 local_48;
  tm local_40;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  *param_1 = 0;
  *(undefined8 *)(param_1 + 1) = 0;
  *(undefined8 *)(param_1 + 3) = 0;
  *(undefined8 *)(param_1 + 5) = 0;
  *(undefined8 *)(param_1 + 7) = 0;
  local_68 = _time64((__time64_t *)0x0);
  local_78 = 0;
  local_70 = 0;
  eVar1 = _localtime64_s(&local_40,&local_68);
  if (eVar1 == 0) {
    local_60 = (short)local_40.tm_year + 0x76c;
    local_52 = 0;
    local_5e = (short)local_40.tm_mon + 1;
    local_5c = (undefined2)local_40.tm_wday;
    local_5a = (undefined2)local_40.tm_mday;
    local_58 = (undefined2)local_40.tm_hour;
    local_56 = (undefined2)local_40.tm_min;
    local_54 = (undefined2)local_40.tm_sec;
    iVar2 = Ordinal_184();
    local_50 = 0;
    local_48 = 0;
    if (iVar2 != 0) {
      Ordinal_185(local_78);
    }
  }
  *(undefined8 *)(param_1 + 0xb) = 0;
  *(undefined8 *)(param_1 + 9) = local_78;
  *(undefined8 *)(param_1 + 0xd) = 0;
  *(undefined8 *)(param_1 + 0xf) = 0;
  *(undefined8 *)(param_1 + 0x11) = 0;
  *(undefined8 *)(param_1 + 0x13) = 0;
  memset(param_1 + 0x15,0,100);
  return param_1;
}



undefined4 * FUN_14004ebf0(undefined4 *param_1)

{
  *param_1 = 0;
  *(undefined8 *)(param_1 + 1) = 0;
  *(undefined8 *)(param_1 + 3) = 0;
  *(undefined8 *)((longlong)param_1 + 0x46) = 0;
  *(undefined8 *)((longlong)param_1 + 0x76) = 0;
  *(undefined8 *)((longlong)param_1 + 0x4e) = 0;
  *(undefined1 *)((longlong)param_1 + 0x7e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x87) = 0;
  *(undefined8 *)((longlong)param_1 + 0x8f) = 0;
  *(undefined8 *)((longlong)param_1 + 0x97) = 0;
  *(undefined4 *)((longlong)param_1 + 0x9f) = 0;
  *(undefined1 *)((longlong)param_1 + 0xa3) = 0;
  *(undefined2 *)(param_1 + 0x29) = 0;
  *(undefined1 *)((longlong)param_1 + 0xa6) = 0;
  *(undefined8 *)((longlong)param_1 + 0xa7) = 0;
  *(undefined4 *)((longlong)param_1 + 0xaf) = 0;
  *(undefined8 *)(param_1 + 5) = 0;
  *(undefined8 *)(param_1 + 7) = 0;
  *(undefined8 *)(param_1 + 9) = 0;
  *(undefined8 *)(param_1 + 0xb) = 0;
  *(undefined8 *)(param_1 + 0xd) = 0;
  *(undefined8 *)(param_1 + 0xf) = 0;
  *(undefined2 *)(param_1 + 0x11) = 0;
  *(undefined8 *)((longlong)param_1 + 0x56) = 0;
  *(undefined8 *)((longlong)param_1 + 0x5e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x66) = 0;
  *(undefined8 *)((longlong)param_1 + 0x6e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x7f) = 0;
  return param_1;
}



undefined8 * FUN_14004eca0(undefined8 *param_1)

{
  *param_1 = 0;
  *(undefined4 *)(param_1 + 1) = 0;
  *(undefined8 *)((longlong)param_1 + 0xc) = 0;
  *(undefined8 *)((longlong)param_1 + 0x14) = 0;
  *(undefined8 *)((longlong)param_1 + 0x1c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x2c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x34) = 0;
  *(undefined8 *)((longlong)param_1 + 0x3c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x24) = 0;
  memset((void *)((longlong)param_1 + 100),0,100);
  *(undefined8 *)((longlong)param_1 + 0x44) = 0;
  *(undefined8 *)((longlong)param_1 + 0x4c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x54) = 0;
  *(undefined8 *)((longlong)param_1 + 0x5c) = 0;
  return param_1;
}



undefined8 FUN_14004ed20(undefined8 param_1,undefined8 *param_2)

{
  char cVar1;
  undefined8 local_res8;
  
  cVar1 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar1 != '\0') {
    *param_2 = local_res8;
  }
  return param_1;
}



undefined1 FUN_14004ed60(undefined8 param_1,undefined8 *param_2)

{
  char cVar1;
  undefined8 local_res18 [2];
  
  cVar1 = FUN_1401543d0(param_1,local_res18,8);
  if (cVar1 == '\0') {
    return 0;
  }
  *param_2 = local_res18[0];
  return 1;
}



undefined8 FUN_14004eda0(undefined8 param_1,undefined8 *param_2)

{
  char cVar1;
  undefined8 local_res8;
  
  cVar1 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar1 != '\0') {
    *param_2 = local_res8;
  }
  return param_1;
}



undefined1 FUN_14004ede0(void)

{
  return 0;
}



undefined4 * FUN_14004edf0(undefined4 *param_1)

{
  undefined4 *puVar1;
  longlong lVar2;
  
  lVar2 = 0;
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[4] = 0;
  param_1[3] = 0;
  param_1[6] = 0;
  *(undefined2 *)(param_1 + 5) = 0xffff;
  *(undefined2 *)((longlong)param_1 + 0x16) = 0xffff;
  *(undefined2 *)(param_1 + 7) = 0;
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined2 *)(param_1 + 10) = 0;
  param_1[0xb] = 0;
  *(undefined2 *)(param_1 + 0x12) = 0;
  *(undefined8 *)(param_1 + 0x1a) = 0;
  param_1[0x1c] = 0;
  *(undefined2 *)(param_1 + 0x1f) = 0;
  param_1[0x20] = 0;
  param_1[0x21] = 0;
  param_1[0x22] = 0;
  param_1[0x24] = 0;
  param_1[0x23] = 0;
  *(undefined8 *)(param_1 + 0x26) = 0;
  *(undefined2 *)(param_1 + 0x25) = 1;
  *(undefined8 *)(param_1 + 0x28) = 0;
  *(undefined2 *)((longlong)param_1 + 0x96) = 3;
  *(undefined1 *)(param_1 + 0x34) = 0;
  puVar1 = param_1 + 0xf;
  do {
    puVar1[-3] = 0;
    *puVar1 = 0;
    *(undefined1 *)((longlong)param_1 + lVar2 + 100) = 0;
    lVar2 = lVar2 + 1;
    puVar1[4] = 0;
    puVar1[7] = 0;
    puVar1 = puVar1 + 1;
  } while (lVar2 < 3);
  *(undefined8 *)(param_1 + 0x1d) = 0;
  memset(param_1 + 0x2a,0,0x28);
  return param_1;
}



undefined4 * FUN_14004ef40(undefined4 *param_1)

{
  *param_1 = 0;
  *(undefined2 *)(param_1 + 1) = 0;
  *(undefined8 *)((longlong)param_1 + 6) = 0;
  *(undefined8 *)((longlong)param_1 + 0xe) = 0;
  *(undefined8 *)((longlong)param_1 + 0x16) = 0;
  *(undefined8 *)((longlong)param_1 + 0x1e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x26) = 0;
  *(undefined8 *)((longlong)param_1 + 0x2e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x36) = 0;
  *(undefined8 *)((longlong)param_1 + 0x3e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x46) = 0;
  *(undefined8 *)((longlong)param_1 + 0x4e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x56) = 0;
  *(undefined8 *)((longlong)param_1 + 0x5e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x66) = 0;
  return param_1;
}



undefined4 * FUN_14004efd0(undefined4 *param_1)

{
  *param_1 = 0;
  *(undefined8 *)(param_1 + 1) = 0;
  *(undefined8 *)(param_1 + 3) = 0;
  *(undefined8 *)(param_1 + 5) = 0;
  *(undefined2 *)(param_1 + 9) = 0;
  *(undefined8 *)(param_1 + 7) = 0;
  *(undefined1 *)((longlong)param_1 + 0x26) = 0;
  *(undefined8 *)((longlong)param_1 + 0x2a9) = 0;
  *(undefined8 *)((longlong)param_1 + 0x27) = 0;
  *(undefined8 *)((longlong)param_1 + 0x2f) = 0;
  *(undefined8 *)((longlong)param_1 + 0x37) = 0;
  *(undefined8 *)((longlong)param_1 + 0x3f) = 0;
  memset((void *)((longlong)param_1 + 0x47),0,100);
  memset((void *)((longlong)param_1 + 0xab),0,0x1fe);
  return param_1;
}



undefined8 FUN_14004f060(undefined8 param_1,undefined2 *param_2)

{
  char cVar1;
  undefined2 local_res8 [4];
  
  cVar1 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar1 != '\0') {
    *param_2 = local_res8[0];
  }
  return param_1;
}



undefined8 FUN_14004f0a0(undefined8 param_1,undefined2 *param_2)

{
  undefined8 uVar1;
  undefined2 local_res18 [8];
  
  uVar1 = FUN_1401543d0(param_1,local_res18,2);
  if ((char)uVar1 == '\0') {
    return uVar1;
  }
  *param_2 = local_res18[0];
  return CONCAT71((uint7)(byte)((ushort)local_res18[0] >> 8),1);
}



undefined8 * FUN_14004f0e0(undefined8 *param_1)

{
  *param_1 = 0;
  param_1[1] = 0;
  param_1[7] = 0;
  param_1[8] = 0;
  param_1[9] = 0;
  param_1[10] = 0;
  *(undefined2 *)(param_1 + 0xb) = 0;
  *(undefined4 *)((longlong)param_1 + 0x2c2) = 0;
  *(undefined2 *)((longlong)param_1 + 0x2c6) = 0;
  *(undefined1 *)(param_1 + 0x59) = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  memset((void *)((longlong)param_1 + 0x5a),0,200);
  memset((void *)((longlong)param_1 + 0x122),0,400);
  *(undefined8 *)((longlong)param_1 + 0x2b2) = 0;
  *(undefined8 *)((longlong)param_1 + 0x2ba) = 0;
  return param_1;
}



undefined8 FUN_14004f190(undefined8 param_1,undefined1 *param_2)

{
  undefined8 uVar1;
  undefined1 local_res18 [16];
  
  uVar1 = FUN_1401543d0(param_1,local_res18,1);
  if ((char)uVar1 == '\0') {
    return uVar1;
  }
  *param_2 = local_res18[0];
  return 1;
}



undefined8 * FUN_14004f1d0(undefined8 *param_1)

{
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  *(undefined2 *)(param_1 + 4) = 0;
  param_1[3] = 0;
  *(undefined4 *)((longlong)param_1 + 0x42) = 0;
  *(undefined2 *)((longlong)param_1 + 0x46) = 0;
  param_1[9] = 0;
  param_1[10] = 0;
  *(undefined4 *)(param_1 + 0xb) = 0;
  *(undefined2 *)((longlong)param_1 + 0x5c) = 0;
  *(undefined4 *)((longlong)param_1 + 0x5e) = 0;
  *(undefined2 *)((longlong)param_1 + 0x62) = 0;
  *(undefined8 *)((longlong)param_1 + 100) = 0;
  *(undefined8 *)((longlong)param_1 + 0x6c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x7c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x74) = 0;
  *(undefined4 *)((longlong)param_1 + 0x84) = 0;
  *(undefined2 *)(param_1 + 0x11) = 0;
  *(undefined8 *)((longlong)param_1 + 0x8a) = 0;
  *(undefined1 *)((longlong)param_1 + 0x92) = 0;
  *(undefined8 *)((longlong)param_1 + 0x93) = 0;
  *(undefined8 *)((longlong)param_1 + 0x9b) = 0;
  *(undefined2 *)((longlong)param_1 + 0xa3) = 0;
  *(undefined1 *)((longlong)param_1 + 0xa5) = 0;
  *(undefined8 *)((longlong)param_1 + 0xa6) = 0;
  *(undefined8 *)((longlong)param_1 + 0xae) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb6) = 0;
  *(undefined2 *)((longlong)param_1 + 0xbe) = 0;
  *(undefined4 *)(param_1 + 0x18) = 0;
  *(undefined2 *)((longlong)param_1 + 0xc4) = 0;
  *(undefined4 *)((longlong)param_1 + 0xc6) = 7;
  *(undefined8 *)((longlong)param_1 + 0xca) = 0;
  *(undefined8 *)((longlong)param_1 + 0xd2) = 0;
  *(undefined8 *)((longlong)param_1 + 0x22) = 0;
  *(undefined8 *)((longlong)param_1 + 0x2a) = 0;
  *(undefined8 *)((longlong)param_1 + 0x32) = 0;
  *(undefined8 *)((longlong)param_1 + 0x3a) = 0;
  *(undefined8 *)((longlong)param_1 + 0xda) = 0;
  *(undefined8 *)((longlong)param_1 + 0xe2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xea) = 0;
  *(undefined8 *)((longlong)param_1 + 0xf2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xfa) = 0;
  *(undefined8 *)((longlong)param_1 + 0x102) = 0;
  *(undefined8 *)((longlong)param_1 + 0x10a) = 0;
  *(undefined8 *)((longlong)param_1 + 0x112) = 0;
  *(undefined8 *)((longlong)param_1 + 0x11a) = 0;
  return param_1;
}



undefined8 * FUN_14004f310(undefined8 *param_1)

{
  FUN_1401568c0();
  *param_1 = PTR_DAT_140320098;
  return param_1;
}



undefined8 FUN_14004f340(undefined8 param_1,undefined1 *param_2)

{
  char cVar1;
  undefined1 local_res8 [8];
  
  cVar1 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar1 != '\0') {
    *param_2 = local_res8[0];
  }
  return param_1;
}



void FUN_14004f380(longlong *param_1)

{
  int iVar1;
  int iVar2;
  undefined *puVar3;
  
  puVar3 = (undefined *)*param_1;
  if ((undefined *)*param_1 == (undefined *)0x0) {
    puVar3 = PTR_DAT_1403200a0;
  }
  iVar1 = FUN_140156740(puVar3);
  iVar2 = 0;
  if (0 < iVar1) {
    iVar2 = iVar1;
  }
  puVar3 = (undefined *)*param_1;
  iVar1 = 0;
  if ((puVar3 != (undefined *)0x0) && (iVar1 = 0, puVar3 != PTR_DAT_1403200a0)) {
    iVar1 = *(int *)(puVar3 + -8);
  }
  if ((iVar1 <= iVar2) && (iVar2 = 0, puVar3 != (undefined *)0x0)) {
    if (puVar3 == PTR_DAT_1403200a0) {
      return;
    }
    iVar2 = *(int *)(puVar3 + -8);
  }
  if (((puVar3 != PTR_DAT_1403200a0) && (puVar3 != (undefined *)0x0)) &&
     ((int *)(puVar3 + -8) != (int *)0x0)) {
    *(int *)(puVar3 + -8) = iVar2;
    *(undefined2 *)(puVar3 + (longlong)iVar2 * 2) = 0;
  }
  return;
}



undefined8 * FUN_14004f400(undefined8 *param_1,undefined8 param_2,int param_3)

{
  int iVar1;
  int iVar2;
  undefined8 uVar3;
  
  FUN_1401568c0();
  *param_1 = PTR_DAT_1403200a0;
  iVar2 = FUN_140156740(param_2);
  iVar1 = iVar2;
  if ((0 < param_3) && (iVar1 = param_3, iVar2 < param_3)) {
    iVar1 = iVar2;
  }
  uVar3 = FUN_14004f760(param_1,iVar1);
  FUN_140156770(uVar3,param_2,iVar1);
  FUN_14004f380(param_1);
  return param_1;
}



undefined8 * FUN_14004f480(undefined8 *param_1,undefined8 param_2)

{
  FUN_1401568c0();
  *param_1 = PTR_DAT_1403200a0;
  FUN_14004f4f0(param_1,param_2);
  return param_1;
}



void FUN_14004f4c0(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  FUN_14004f990(param_3);
  FUN_14004f990(param_4);
  return;
}



void FUN_14004f4f0(longlong *param_1,longlong *param_2)

{
  undefined *puVar1;
  undefined8 uVar2;
  
  puVar1 = (undefined *)*param_1;
  if ((undefined *)*param_1 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  *param_1 = (longlong)puVar1;
  if ((undefined *)*param_2 != puVar1) {
    uVar2 = FUN_1401568c0();
    FUN_140156b50(uVar2);
    FUN_14004f990(param_1);
    puVar1 = (undefined *)*param_2;
    *param_1 = (longlong)puVar1;
    if (((puVar1 != PTR_DAT_1403200a0) && (puVar1 != (undefined *)0x0)) &&
       (puVar1 != (undefined *)0x8)) {
      *(int *)(puVar1 + -4) = *(int *)(puVar1 + -4) + 1;
    }
    FUN_140156be0(uVar2);
  }
  return;
}



void FUN_14004f590(longlong *param_1,int param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  undefined *puVar4;
  
  puVar4 = PTR_DAT_1403200a0;
  puVar1 = (undefined *)*param_1;
  if ((undefined *)*param_1 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  *param_1 = (longlong)puVar1;
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 == 0) {
    FUN_14004f990(param_1);
    return;
  }
  iVar3 = 0;
  if (puVar1 != (undefined *)0x0) {
    if (puVar1 == puVar4) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(puVar1 + -8);
    }
  }
  if (param_2 != iVar3) {
    piVar2 = (int *)FUN_140156940();
    if (piVar2 != (int *)0x0) {
      *piVar2 = 0;
      piVar2[1] = 1;
    }
    puVar1 = PTR_DAT_1403200a0;
    *piVar2 = param_2;
    puVar4 = (undefined *)*param_1;
    if (puVar4 == (undefined *)0x0) {
      iVar3 = 0;
    }
    else if (puVar4 == puVar1) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(puVar4 + -8);
    }
    if (iVar3 <= param_2) {
      if ((puVar4 == (undefined *)0x0) || (puVar4 == puVar1)) {
        param_2 = 0;
      }
      else {
        param_2 = *(int *)(puVar4 + -8);
      }
    }
    if (puVar4 == (undefined *)0x0) {
      puVar4 = puVar1;
    }
    FUN_140156770(piVar2 + 2,puVar4,param_2);
    FUN_14004f990(param_1);
    *param_1 = (longlong)(piVar2 + 2);
  }
  return;
}



void FUN_14004f670(longlong *param_1)

{
  undefined *puVar1;
  undefined8 *puVar2;
  undefined4 *puVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  undefined *puVar6;
  
  puVar6 = (undefined *)*param_1;
  if (puVar6 == (undefined *)0x0) {
    *param_1 = (longlong)PTR_DAT_1403200a0;
  }
  else if ((puVar6 != PTR_DAT_1403200a0) && ((int *)(puVar6 + -8) != (int *)0x0)) {
    if (*(int *)(puVar6 + -4) < 2) {
      return;
    }
    if (*(int *)(puVar6 + -8) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    puVar3 = (undefined4 *)FUN_140156940();
    uVar4 = 0;
    if (puVar3 != (undefined4 *)0x0) {
      *puVar3 = 0;
      puVar3[1] = 1;
    }
    puVar1 = PTR_DAT_1403200a0;
    puVar6 = (undefined *)*param_1;
    if (puVar6 == (undefined *)0x0) {
      uVar5 = 0;
    }
    else {
      uVar5 = uVar4;
      if (puVar6 != PTR_DAT_1403200a0) {
        uVar5 = *(undefined4 *)(puVar6 + -8);
      }
    }
    *puVar3 = uVar5;
    puVar6 = (undefined *)*param_1;
    if ((puVar6 != (undefined *)0x0) && (puVar6 != puVar1)) {
      uVar4 = *(undefined4 *)(puVar6 + -8);
    }
    if (puVar6 == (undefined *)0x0) {
      puVar6 = puVar1;
    }
    FUN_140156770(puVar3 + 2,puVar6,uVar4);
    FUN_14004f990(param_1);
    *param_1 = (longlong)(puVar3 + 2);
    return;
  }
  puVar2 = (undefined8 *)FUN_140156940();
  *puVar2 = 0;
  *(undefined2 *)(puVar2 + 1) = 0;
  if (puVar2 != (undefined8 *)0x0) {
    *(undefined4 *)puVar2 = 0;
    *(undefined4 *)((longlong)puVar2 + 4) = 1;
  }
  *(undefined2 *)(puVar2 + 1) = 0;
  *param_1 = (longlong)(puVar2 + 1);
  return;
}



undefined * FUN_14004f760(longlong *param_1,int param_2)

{
  int iVar1;
  undefined *puVar2;
  int iVar3;
  
  puVar2 = (undefined *)*param_1;
  iVar3 = 0;
  if ((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(puVar2 + -8);
  }
  if (((param_2 <= iVar3) && (param_2 = 0, puVar2 != (undefined *)0x0)) &&
     (puVar2 != PTR_DAT_1403200a0)) {
    param_2 = *(int *)(puVar2 + -8);
  }
  iVar3 = 1;
  if (1 < param_2) {
    iVar3 = param_2;
  }
  iVar1 = 0;
  if ((puVar2 != (undefined *)0x0) && (iVar1 = 0, puVar2 != PTR_DAT_1403200a0)) {
    iVar1 = *(int *)(puVar2 + -8);
  }
  if (iVar1 < iVar3) {
    FUN_14004f590(param_1,iVar3);
  }
  FUN_14004f670(param_1);
  puVar2 = (undefined *)*param_1;
  if ((undefined *)*param_1 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  return puVar2;
}



void FUN_14004f7e0(longlong *param_1,int param_2)

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  
  puVar1 = (undefined *)*param_1;
  iVar3 = 0;
  if (0 < param_2) {
    iVar3 = param_2;
  }
  iVar2 = 0;
  if ((puVar1 != (undefined *)0x0) && (iVar2 = 0, puVar1 != PTR_DAT_1403200a0)) {
    iVar2 = *(int *)(puVar1 + -8);
  }
  if ((iVar2 <= iVar3) && (iVar3 = 0, puVar1 != (undefined *)0x0)) {
    if (puVar1 == PTR_DAT_1403200a0) {
      return;
    }
    iVar3 = *(int *)(puVar1 + -8);
  }
  if (((puVar1 != PTR_DAT_1403200a0) && (puVar1 != (undefined *)0x0)) &&
     ((int *)(puVar1 + -8) != (int *)0x0)) {
    *(int *)(puVar1 + -8) = iVar3;
    *(undefined2 *)(puVar1 + (longlong)iVar3 * 2) = 0;
  }
  return;
}



void FUN_14004f840(longlong *param_1,longlong param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  undefined *puVar6;
  
  if (param_2 != 0) {
    iVar1 = FUN_140156740(param_2);
    puVar6 = (undefined *)*param_1;
    iVar4 = 0;
    if ((puVar6 != (undefined *)0x0) && (iVar4 = 0, puVar6 != PTR_DAT_1403200a0)) {
      iVar4 = *(int *)(puVar6 + -8);
    }
    iVar5 = iVar4 + iVar1;
    iVar2 = 0;
    if ((puVar6 != (undefined *)0x0) && (iVar2 = 0, puVar6 != PTR_DAT_1403200a0)) {
      iVar2 = *(int *)(puVar6 + -8);
    }
    iVar3 = iVar5;
    if (((iVar5 <= iVar2) && (iVar3 = 0, puVar6 != (undefined *)0x0)) &&
       (puVar6 != PTR_DAT_1403200a0)) {
      iVar3 = *(int *)(puVar6 + -8);
    }
    iVar2 = 1;
    if (1 < iVar3) {
      iVar2 = iVar3;
    }
    iVar3 = 0;
    if ((puVar6 != (undefined *)0x0) && (puVar6 != PTR_DAT_1403200a0)) {
      iVar3 = *(int *)(puVar6 + -8);
    }
    if (iVar3 < iVar2) {
      FUN_14004f590(param_1);
    }
    FUN_14004f670(param_1);
    puVar6 = (undefined *)*param_1;
    if ((undefined *)*param_1 == (undefined *)0x0) {
      puVar6 = PTR_DAT_1403200a0;
    }
    FUN_140156770(puVar6 + (longlong)iVar4 * 2,param_2,iVar1);
    puVar6 = (undefined *)*param_1;
    iVar4 = 0;
    iVar1 = 0;
    if (0 < iVar5) {
      iVar1 = iVar5;
    }
    if ((puVar6 != (undefined *)0x0) && (puVar6 != PTR_DAT_1403200a0)) {
      iVar4 = *(int *)(puVar6 + -8);
    }
    if ((iVar4 <= iVar1) && (iVar1 = 0, puVar6 != (undefined *)0x0)) {
      if (puVar6 == PTR_DAT_1403200a0) {
        return;
      }
      iVar1 = *(int *)(puVar6 + -8);
    }
    if (((puVar6 != PTR_DAT_1403200a0) && (puVar6 != (undefined *)0x0)) &&
       ((int *)(puVar6 + -8) != (int *)0x0)) {
      *(int *)(puVar6 + -8) = iVar1;
      *(undefined2 *)(puVar6 + (longlong)iVar1 * 2) = 0;
    }
  }
  return;
}



void FUN_14004f990(longlong *param_1)

{
  int *piVar1;
  undefined *puVar2;
  undefined8 uVar3;
  
  puVar2 = (undefined *)*param_1;
  if (((puVar2 == (undefined *)0x0) || (puVar2 == PTR_DAT_1403200a0)) ||
     (puVar2 + -8 == (undefined *)0x0)) {
    *param_1 = (longlong)PTR_DAT_1403200a0;
  }
  else {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
    FUN_140156be0(uVar3);
    *param_1 = (longlong)PTR_DAT_1403200a0;
  }
  return;
}



void thunk_FUN_14004f990(longlong *param_1)

{
  int *piVar1;
  undefined *puVar2;
  undefined8 uVar3;
  
  puVar2 = (undefined *)*param_1;
  if (((puVar2 == (undefined *)0x0) || (puVar2 == PTR_DAT_1403200a0)) ||
     (puVar2 + -8 == (undefined *)0x0)) {
    *param_1 = (longlong)PTR_DAT_1403200a0;
  }
  else {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
    FUN_140156be0(uVar3);
    *param_1 = (longlong)PTR_DAT_1403200a0;
  }
  return;
}



undefined8 * FUN_14004fa30(undefined8 *param_1)

{
  FUN_1401568c0();
  *param_1 = PTR_DAT_1403200a0;
  return param_1;
}



undefined8 FUN_14004fa60(undefined8 param_1,undefined4 *param_2)

{
  undefined8 uVar1;
  undefined4 local_res18 [4];
  
  uVar1 = FUN_1401543d0(param_1,local_res18,4);
  if ((char)uVar1 == '\0') {
    return uVar1;
  }
  *param_2 = local_res18[0];
  return CONCAT71((uint7)(uint3)((uint)local_res18[0] >> 8),1);
}



undefined8 FUN_14004faa0(undefined8 param_1,undefined4 *param_2)

{
  char cVar1;
  undefined4 local_res8 [2];
  
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *param_2 = local_res8[0];
  }
  return param_1;
}



void FUN_14004fae0(longlong param_1,undefined4 param_2)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  undefined1 local_58 [80];
  
  lVar4 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (*(longlong *)(param_1 + 0x10) == 0) {
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(lVar2 + 0x18);
    FUN_140050060(lVar2,iVar1 + 4);
    if (*(int *)(lVar2 + 0x18) != 0) {
      lVar4 = *(longlong *)(lVar2 + 0x10);
    }
    *(undefined4 *)(iVar1 + lVar4) = param_2;
    goto LAB_14004fba1;
  }
  if (*(longlong *)(param_1 + 0x10) == 0) {
    FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  iVar1 = *(int *)(param_1 + 0x18);
  iVar3 = iVar1 + 4;
  if ((iVar3 < 0) || (*(int *)(param_1 + 0x1c) < iVar3)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(int *)(param_1 + 0x18) = iVar3;
  *(undefined4 *)((longlong)iVar1 + *(longlong *)(param_1 + 0x10)) = param_2;
LAB_14004fba1:
  FUN_1400501f0(param_1);
  return;
}



void FUN_14004fbc0(longlong param_1,undefined8 param_2)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  undefined1 local_58 [80];
  
  lVar4 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (*(longlong *)(param_1 + 0x10) == 0) {
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(lVar2 + 0x18);
    FUN_140050060(lVar2,iVar1 + 8);
    if (*(int *)(lVar2 + 0x18) != 0) {
      lVar4 = *(longlong *)(lVar2 + 0x10);
    }
    *(undefined8 *)(iVar1 + lVar4) = param_2;
    goto LAB_14004fc85;
  }
  if (*(longlong *)(param_1 + 0x10) == 0) {
    FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  iVar1 = *(int *)(param_1 + 0x18);
  iVar3 = iVar1 + 8;
  if ((iVar3 < 0) || (*(int *)(param_1 + 0x1c) < iVar3)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(int *)(param_1 + 0x18) = iVar3;
  *(undefined8 *)((longlong)iVar1 + *(longlong *)(param_1 + 0x10)) = param_2;
LAB_14004fc85:
  FUN_1400501f0(param_1);
  return;
}



void FUN_14004fcb0(longlong param_1,undefined8 param_2)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  undefined1 local_58 [80];
  
  lVar4 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (*(longlong *)(param_1 + 0x10) == 0) {
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(lVar2 + 0x18);
    FUN_140050060(lVar2,iVar1 + 8);
    if (*(int *)(lVar2 + 0x18) != 0) {
      lVar4 = *(longlong *)(lVar2 + 0x10);
    }
    *(undefined8 *)(iVar1 + lVar4) = param_2;
    goto LAB_14004fd68;
  }
  if (*(longlong *)(param_1 + 0x10) == 0) {
    FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  iVar1 = *(int *)(param_1 + 0x18);
  iVar3 = iVar1 + 8;
  if ((iVar3 < 0) || (*(int *)(param_1 + 0x1c) < iVar3)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(int *)(param_1 + 0x18) = iVar3;
  *(undefined8 *)((longlong)iVar1 + *(longlong *)(param_1 + 0x10)) = param_2;
LAB_14004fd68:
  FUN_1400501f0(param_1);
  return;
}



void FUN_14004fd90(longlong param_1,undefined1 param_2)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  undefined1 local_58 [80];
  
  lVar4 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (*(longlong *)(param_1 + 0x10) == 0) {
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(lVar2 + 0x18);
    FUN_140050060(lVar2,iVar1 + 1);
    if (*(int *)(lVar2 + 0x18) != 0) {
      lVar4 = *(longlong *)(lVar2 + 0x10);
    }
    *(undefined1 *)(iVar1 + lVar4) = param_2;
    goto LAB_14004fe49;
  }
  if (*(longlong *)(param_1 + 0x10) == 0) {
    FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  iVar1 = *(int *)(param_1 + 0x18);
  iVar3 = iVar1 + 1;
  if ((iVar3 < 0) || (*(int *)(param_1 + 0x1c) < iVar3)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(int *)(param_1 + 0x18) = iVar3;
  *(undefined1 *)((longlong)iVar1 + *(longlong *)(param_1 + 0x10)) = param_2;
LAB_14004fe49:
  FUN_1400501f0(param_1);
  return;
}



void FUN_14004fe70(longlong param_1,undefined4 param_2)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  undefined1 local_58 [80];
  
  lVar4 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (*(longlong *)(param_1 + 0x10) == 0) {
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(lVar2 + 0x18);
    FUN_140050060(lVar2,iVar1 + 4);
    if (*(int *)(lVar2 + 0x18) != 0) {
      lVar4 = *(longlong *)(lVar2 + 0x10);
    }
    *(undefined4 *)(iVar1 + lVar4) = param_2;
    goto LAB_14004ff28;
  }
  if (*(longlong *)(param_1 + 0x10) == 0) {
    FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  iVar1 = *(int *)(param_1 + 0x18);
  iVar3 = iVar1 + 4;
  if ((iVar3 < 0) || (*(int *)(param_1 + 0x1c) < iVar3)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(int *)(param_1 + 0x18) = iVar3;
  *(undefined4 *)((longlong)iVar1 + *(longlong *)(param_1 + 0x10)) = param_2;
LAB_14004ff28:
  FUN_1400501f0(param_1);
  return;
}



void FUN_14004ff50(longlong *param_1,undefined8 param_2,int param_3)

{
  longlong lVar1;
  int iVar2;
  undefined1 local_58 [88];
  
  if (param_3 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_3 != 0) {
    if (*param_1 == 0) {
      FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    lVar1 = param_1[1];
    iVar2 = (int)lVar1 + param_3;
    if ((iVar2 < 0) || (*(int *)((longlong)param_1 + 0xc) < iVar2)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(int *)(param_1 + 1) = iVar2;
    FUN_140050120(*param_1 + (longlong)(int)lVar1,param_2,(longlong)param_3);
  }
  return;
}



int FUN_14004ffc0(longlong param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  int iVar4;
  
  iVar4 = *(int *)(param_1 + 0x24);
  if (iVar4 == 0) {
    iVar2 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
    iVar4 = 0x400;
    if (iVar2 < 0x400) {
      iVar4 = iVar2;
    }
    iVar2 = 4;
    if (4 < iVar4) {
      iVar2 = iVar4;
    }
    iVar4 = iVar2 + param_2;
    if (iVar2 + param_2 < *(int *)(param_1 + 0x20)) {
      iVar4 = *(int *)(param_1 + 0x20);
    }
    return iVar4;
  }
  if (iVar4 != 1) {
    if (iVar4 != 2) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (param_2 < *(int *)(param_1 + 0x20)) {
      param_2 = *(int *)(param_1 + 0x20);
    }
    return param_2;
  }
  uVar1 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
  uVar3 = 0x10;
  if (0x10 < (int)uVar1) {
    uVar3 = uVar1;
  }
  if (uVar3 < 0x41) {
    uVar3 = 0x40;
  }
  iVar4 = uVar3 + param_2;
  if ((int)(uVar3 + param_2) < *(int *)(param_1 + 0x20)) {
    iVar4 = *(int *)(param_1 + 0x20);
  }
  return iVar4;
}



void FUN_140050060(longlong param_1,int param_2)

{
  longlong *plVar1;
  int iVar2;
  longlong lVar3;
  undefined1 local_58 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 != *(int *)(param_1 + 0x18)) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar2 = FUN_14004ffc0();
      plVar1 = *(longlong **)(param_1 + 8);
      lVar3 = (longlong)iVar2;
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar1 == (longlong *)0x0) {
          lVar3 = FUN_140156940(lVar3);
        }
        else {
          lVar3 = (**(code **)(*plVar1 + 8))(plVar1,lVar3);
        }
      }
      else {
        if (plVar1 == (longlong *)0x0) {
          lVar3 = FUN_1401569a0(*(undefined8 *)(param_1 + 0x10),lVar3);
        }
        else {
          lVar3 = (**(code **)(*plVar1 + 0x10))(plVar1,*(undefined8 *)(param_1 + 0x10),lVar3);
        }
        if (lVar3 == 0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
      }
      *(longlong *)(param_1 + 0x10) = lVar3;
      *(int *)(param_1 + 0x1c) = iVar2;
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_140050120(undefined8 *param_1,undefined8 *param_2,size_t param_3)

{
  undefined1 uVar1;
  undefined8 uVar2;
  undefined8 *puVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  
  if (param_3 < 0x21) {
    uVar5 = (ulonglong)((uint)param_3 & 7);
    for (uVar4 = param_3 >> 3; uVar4 != 0; uVar4 = uVar4 - 1) {
      uVar2 = *param_2;
      param_2 = param_2 + 1;
      *param_1 = uVar2;
      param_1 = param_1 + 1;
    }
    if (uVar5 != 0) {
      puVar3 = param_2;
      do {
        uVar1 = *(undefined1 *)puVar3;
        puVar3 = (undefined8 *)((longlong)puVar3 + 1);
        uVar5 = uVar5 - 1;
        *(undefined1 *)((longlong)param_1 + (-1 - (longlong)param_2) + (longlong)puVar3) = uVar1;
      } while (uVar5 != 0);
      return;
    }
  }
  else {
    memcpy(param_1,param_2,param_3);
  }
  return;
}



void FUN_140050180(longlong param_1,undefined8 param_2,int param_3)

{
  int iVar1;
  longlong lVar2;
  
  if (param_3 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_3 != 0) {
    iVar1 = *(int *)(param_1 + 0x18);
    FUN_140050060(param_1,iVar1 + param_3);
    if (*(int *)(param_1 + 0x18) == 0) {
      lVar2 = 0;
    }
    else {
      lVar2 = *(longlong *)(param_1 + 0x10);
    }
    FUN_140050120(lVar2 + iVar1,param_2,(longlong)param_3);
  }
  return;
}



void FUN_1400501f0(longlong param_1)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  undefined1 local_58 [80];
  
  if (*(char *)(param_1 + 0x20) != '\0') {
    lVar2 = *(longlong *)(param_1 + 8);
    if (lVar2 == 0) {
      if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
    }
    else if (*(longlong *)(param_1 + 0x10) == 0) {
      if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      iVar1 = *(int *)(lVar2 + 0x18);
      FUN_140050060(lVar2,iVar1 + 1);
      if (*(int *)(lVar2 + 0x18) == 0) {
        *(undefined1 *)(longlong)iVar1 = 0xfe;
        return;
      }
      ((undefined1 *)(longlong)iVar1)[*(longlong *)(lVar2 + 0x10)] = 0xfe;
      return;
    }
    if (*(longlong *)(param_1 + 0x10) == 0) {
      FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    iVar1 = *(int *)(param_1 + 0x18);
    iVar3 = iVar1 + 1;
    if ((iVar3 < 0) || (*(int *)(param_1 + 0x1c) < iVar3)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(int *)(param_1 + 0x18) = iVar3;
    *(undefined1 *)((longlong)iVar1 + *(longlong *)(param_1 + 0x10)) = 0xfe;
  }
  return;
}



void FUN_1400502d0(longlong param_1,undefined8 param_2,int param_3)

{
  if (param_3 == 0) {
    return;
  }
  *(undefined4 *)(param_1 + 4) = 0;
  if (*(longlong *)(param_1 + 8) == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (*(longlong *)(param_1 + 0x10) == 0) {
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140050180();
      FUN_1400501f0(param_1);
      return;
    }
                    // WARNING: Subroutine does not return
    FUN_1401561e0();
  }
  FUN_14004ff50(param_1 + 0x10);
  FUN_1400501f0(param_1);
  return;
}



void FUN_140050340(longlong param_1,undefined2 param_2)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  undefined1 local_58 [80];
  
  lVar4 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (*(longlong *)(param_1 + 0x10) == 0) {
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(lVar2 + 0x18);
    FUN_140050060(lVar2,iVar1 + 2);
    if (*(int *)(lVar2 + 0x18) != 0) {
      lVar4 = *(longlong *)(lVar2 + 0x10);
    }
    *(undefined2 *)(iVar1 + lVar4) = param_2;
    goto LAB_1400503fb;
  }
  if (*(longlong *)(param_1 + 0x10) == 0) {
    FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  iVar1 = *(int *)(param_1 + 0x18);
  iVar3 = iVar1 + 2;
  if ((iVar3 < 0) || (*(int *)(param_1 + 0x1c) < iVar3)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(int *)(param_1 + 0x18) = iVar3;
  *(undefined2 *)((longlong)iVar1 + *(longlong *)(param_1 + 0x10)) = param_2;
LAB_1400503fb:
  FUN_1400501f0(param_1);
  return;
}



void * FUN_140050420(void *param_1,uint param_2)

{
  FUN_140156260();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140050450(longlong *param_1,longlong *param_2)

{
  undefined *puVar1;
  undefined8 uVar2;
  
  puVar1 = (undefined *)*param_1;
  if ((undefined *)*param_1 == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  *param_1 = (longlong)puVar1;
  if ((undefined *)*param_2 != puVar1) {
    uVar2 = FUN_1401568c0();
    FUN_140156b50(uVar2);
    FUN_140050520(param_1);
    puVar1 = (undefined *)*param_2;
    *param_1 = (longlong)puVar1;
    if (((puVar1 != PTR_DAT_140320098) && (puVar1 != (undefined *)0x0)) &&
       (puVar1 != (undefined *)0x8)) {
      *(int *)(puVar1 + -4) = *(int *)(puVar1 + -4) + 1;
    }
    FUN_140156be0(uVar2);
  }
  return;
}



void FUN_1400504f0(undefined8 *param_1)

{
  if (*(char *)(param_1 + 1) != '\0') {
    FUN_140156be0(*param_1);
    *(undefined1 *)(param_1 + 1) = 0;
  }
  return;
}



void FUN_140050520(longlong *param_1)

{
  int *piVar1;
  undefined *puVar2;
  undefined8 uVar3;
  
  puVar2 = (undefined *)*param_1;
  if (((puVar2 == (undefined *)0x0) || (puVar2 == PTR_DAT_140320098)) ||
     (puVar2 + -8 == (undefined *)0x0)) {
    *param_1 = (longlong)PTR_DAT_140320098;
  }
  else {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
    FUN_140156be0(uVar3);
    *param_1 = (longlong)PTR_DAT_140320098;
  }
  return;
}



void thunk_FUN_140050520(longlong *param_1)

{
  int *piVar1;
  undefined *puVar2;
  undefined8 uVar3;
  
  puVar2 = (undefined *)*param_1;
  if (((puVar2 == (undefined *)0x0) || (puVar2 == PTR_DAT_140320098)) ||
     (puVar2 + -8 == (undefined *)0x0)) {
    *param_1 = (longlong)PTR_DAT_140320098;
  }
  else {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
    FUN_140156be0(uVar3);
    *param_1 = (longlong)PTR_DAT_140320098;
  }
  return;
}



exception *
FUN_1400505c0(exception *param_1,exception *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  
  uVar1 = 0xfffffffffffffffe;
  std::exception::exception(param_1,param_2);
  *(undefined ***)param_1 = Proud::Exception::vftable;
  *(undefined4 *)(param_1 + 0x18) = *(undefined4 *)(param_2 + 0x18);
  *(undefined8 *)(param_1 + 0x20) = *(undefined8 *)(param_2 + 0x20);
  *(undefined8 *)(param_1 + 0x28) = *(undefined8 *)(param_2 + 0x28);
  *(undefined8 *)(param_1 + 0x30) = *(undefined8 *)(param_2 + 0x30);
  *(undefined4 *)(param_1 + 0x38) = *(undefined4 *)(param_2 + 0x38);
  FUN_1401568c0();
  *(undefined **)(param_1 + 0x40) = PTR_DAT_140320098;
  FUN_140050450(param_1 + 0x40,param_2 + 0x40,param_3,param_4,uVar1);
  return param_1;
}



void FUN_140050650(longlong *param_1)

{
  if (*param_1 != 0) {
    if (*(int *)((longlong)param_1 + 0xc) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_1 + 1) = 0;
  }
  return;
}



void FUN_140050680(longlong param_1)

{
  FUN_1401560e0();
  if (*(longlong *)(param_1 + 8) != 0) {
    if (*(int *)(param_1 + 0x14) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_1 + 0x10) = 0;
  }
  return;
}



void FUN_1400506c0(longlong param_1)

{
  FUN_1401560e0(param_1 + 8);
  if (*(longlong *)(param_1 + 0x10) != 0) {
    if (*(int *)(param_1 + 0x1c) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_1 + 0x18) = 0;
  }
  return;
}



longlong * FUN_140050710(longlong param_1,longlong *param_2,uint param_3)

{
  longlong *plVar1;
  uint *puVar2;
  ulonglong uVar3;
  undefined8 *puVar4;
  undefined8 *local_res8;
  
  puVar4 = (undefined8 *)0x0;
  local_res8 = (undefined8 *)0x0;
  uVar3 = (ulonglong)param_3 % (ulonglong)*(uint *)(param_1 + 0x120);
  if (*(longlong *)(param_1 + 0x100) != 0) {
    for (puVar2 = *(uint **)(*(longlong *)(param_1 + 0x100) + uVar3 * 8);
        (puVar2 != (uint *)0x0 && ((uint)uVar3 == puVar2[8] % *(uint *)(param_1 + 0x120)));
        puVar2 = *(uint **)(puVar2 + 4)) {
      if (*puVar2 == param_3) {
        if (*(longlong *)(puVar2 + 2) != 0) {
          *(longlong *)(*(longlong *)(puVar2 + 2) + 8) =
               *(longlong *)(*(longlong *)(puVar2 + 2) + 8) + 1;
          local_res8 = *(undefined8 **)(puVar2 + 2);
        }
        *param_2 = 0;
        if (local_res8 != (undefined8 *)0x0) {
          local_res8[1] = local_res8[1] + 1;
          if ((*param_2 != 0) &&
             (*(longlong *)(*param_2 + 8) = *(longlong *)(*param_2 + 8) + -1,
             *(longlong *)(*param_2 + 8) == 0)) {
            puVar4 = (undefined8 *)*param_2;
          }
          *param_2 = (longlong)local_res8;
          if (puVar4 != (undefined8 *)0x0) {
            if ((void *)*puVar4 != (void *)0x0) {
              operator_delete((void *)*puVar4);
            }
            FUN_140156970(puVar4);
          }
        }
        if (local_res8 != (undefined8 *)0x0) {
          plVar1 = local_res8 + 1;
          *plVar1 = *plVar1 + -1;
          if (*plVar1 == 0) {
            if ((void *)*local_res8 != (void *)0x0) {
              operator_delete((void *)*local_res8);
            }
            FUN_140156970(local_res8);
            return param_2;
          }
          return param_2;
        }
        return param_2;
      }
    }
  }
  *param_2 = 0;
  return param_2;
}



void FUN_140050850(longlong param_1,longlong param_2)

{
  int *piVar1;
  undefined8 *puVar2;
  longlong *plVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  undefined8 *puVar6;
  undefined *puVar7;
  undefined2 local_res8 [4];
  undefined8 *local_res10;
  undefined *local_50 [2];
  undefined8 local_40;
  undefined1 local_38;
  longlong local_30;
  undefined1 local_28;
  
  local_30 = param_1 + 0x150;
  FUN_140156b50();
  local_28 = 1;
  puVar2 = operator_new(0xc);
  puVar6 = (undefined8 *)0x0;
  if (puVar2 == (undefined8 *)0x0) {
    local_res10 = (undefined8 *)0x0;
  }
  else {
    *puVar2 = 0;
    *(undefined4 *)(puVar2 + 1) = 0;
    local_res10 = (undefined8 *)FUN_140156940(0x10);
    local_res10[1] = 1;
    *local_res10 = puVar2;
  }
  puVar2 = local_res10;
  puVar4 = puVar6;
  if (local_res10 != (undefined8 *)0x0) {
    puVar4 = (undefined8 *)*local_res10;
  }
  *(undefined4 *)puVar4 = *(undefined4 *)(param_2 + 0x30);
  puVar4 = puVar6;
  if (local_res10 != (undefined8 *)0x0) {
    puVar4 = (undefined8 *)*local_res10;
  }
  plVar3 = (longlong *)FUN_140056860(param_1 + 0xf8,puVar4);
  if (puVar2 != (undefined8 *)*plVar3) {
    if (puVar2 != (undefined8 *)0x0) {
      puVar2[1] = puVar2[1] + 1;
      puVar2 = local_res10;
    }
    puVar4 = puVar6;
    if ((*plVar3 != 0) &&
       (*(longlong *)(*plVar3 + 8) = *(longlong *)(*plVar3 + 8) + -1, puVar2 = local_res10,
       *(longlong *)(*plVar3 + 8) == 0)) {
      puVar4 = (undefined8 *)*plVar3;
    }
    *plVar3 = (longlong)puVar2;
    if (puVar4 != (undefined8 *)0x0) {
      if ((void *)*puVar4 != (void *)0x0) {
        operator_delete((void *)*puVar4);
      }
      FUN_140156970(puVar4);
    }
  }
  FUN_140159940(local_50,param_2);
  puVar7 = local_50[0];
  if (local_50[0] == (undefined *)0x0) {
    puVar7 = PTR_DAT_140320098;
  }
  puVar4 = puVar6;
  if (puVar2 != (undefined8 *)0x0) {
    puVar4 = (undefined8 *)*puVar2;
  }
  FUN_1400a0950("Server Join [%d][%s]\n",*(undefined4 *)puVar4,puVar7);
  *(int *)(param_1 + 0x630) = *(int *)(param_1 + 0x630) + 1;
  local_res8[0] = *(undefined2 *)(param_1 + 0xd0);
  if (puVar2 != (undefined8 *)0x0) {
    puVar6 = (undefined8 *)*puVar2;
  }
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x240))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)puVar6,&DAT_1403200f0,local_res8);
  if (((local_50[0] != (undefined *)0x0) && (local_50[0] != PTR_DAT_140320098)) &&
     (local_50[0] + -8 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_40 = uVar5;
    FUN_140156b50(uVar5);
    local_38 = 1;
    piVar1 = (int *)(local_50[0] + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_50[0] + -8);
    }
    FUN_140156be0(uVar5);
    local_38 = 0;
  }
  puVar6 = local_res10;
  local_50[0] = PTR_DAT_140320098;
  if (puVar2 != (undefined8 *)0x0) {
    plVar3 = puVar2 + 1;
    *plVar3 = *plVar3 + -1;
    if (*plVar3 == 0) {
      if ((void *)*local_res10 != (void *)0x0) {
        operator_delete((void *)*local_res10);
      }
      FUN_140156970(puVar6);
    }
  }
  FUN_140156be0(local_30);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140050a90(longlong param_1,longlong param_2,undefined8 param_3)

{
  int *piVar1;
  short sVar2;
  uint *puVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  ulonglong uVar6;
  short *psVar7;
  undefined2 *puVar8;
  longlong lVar9;
  undefined4 *puVar10;
  short *psVar11;
  undefined *puVar12;
  undefined1 auStack_f8 [32];
  undefined8 *local_d8;
  undefined2 local_d0;
  undefined2 local_ce;
  undefined8 local_cc;
  undefined2 local_c4;
  undefined4 local_c2;
  undefined2 local_be;
  undefined *local_b8;
  undefined *local_b0 [2];
  longlong local_a0;
  undefined1 local_98;
  undefined8 local_90;
  undefined1 local_88;
  undefined8 local_80;
  undefined1 local_78;
  undefined8 local_70;
  undefined2 local_68;
  undefined6 uStack_66;
  undefined8 local_58;
  ulonglong local_50;
  ulonglong local_40;
  
  local_70 = 0xfffffffffffffffe;
  local_40 = DAT_1403223c0 ^ (ulonglong)auStack_f8;
  lVar9 = param_1 + 0x150;
  local_a0 = lVar9;
  FUN_140156b50(lVar9);
  local_98 = 1;
  puVar4 = (undefined8 *)FUN_140050710(param_1,&local_d8,*(undefined4 *)(param_2 + 0x30));
  puVar10 = (undefined4 *)0x0;
  if ((undefined8 *)*puVar4 != (undefined8 *)0x0) {
    puVar10 = *(undefined4 **)*puVar4;
  }
  if ((local_d8 != (undefined8 *)0x0) &&
     (local_d8[1] = local_d8[1] + -1, lVar9 = local_a0, local_d8[1] == 0)) {
    if ((void *)*local_d8 != (void *)0x0) {
      operator_delete((void *)*local_d8);
    }
    FUN_140156970(local_d8);
    lVar9 = local_a0;
  }
  if (puVar10 != (undefined4 *)0x0) {
    local_be = *(undefined2 *)(puVar10 + 1);
    local_c2 = *puVar10;
    local_c4 = 0;
    local_ce = 0x465;
    local_d0 = 0x14;
    local_cc = 0;
    FUN_140118840(*(undefined8 *)(param_1 + 0xe0));
  }
  uVar6 = (ulonglong)*(uint *)(param_2 + 0x30) % (ulonglong)*(uint *)(param_1 + 0x120);
  if (*(longlong *)(param_1 + 0x100) != 0) {
    puVar3 = *(uint **)(*(longlong *)(param_1 + 0x100) + uVar6 * 8);
    while( true ) {
      if ((puVar3 == (uint *)0x0) || ((uint)uVar6 != puVar3[8] % *(uint *)(param_1 + 0x120)))
      goto LAB_140050bdc;
      if (*puVar3 == *(uint *)(param_2 + 0x30)) break;
      puVar3 = *(uint **)(puVar3 + 4);
    }
    FUN_140045d00(param_1 + 0xf8,puVar3);
  }
LAB_140050bdc:
  FUN_140159940(local_b0,param_2);
  puVar4 = (undefined8 *)FUN_140182070(param_3,&local_b8);
  psVar7 = (short *)*puVar4;
  if ((short *)*puVar4 == (short *)0x0) {
    psVar7 = (short *)PTR_DAT_1403200a0;
  }
  local_50 = 7;
  local_58 = 0;
  local_68 = 0;
  uVar6 = 0xffffffffffffffff;
  psVar11 = psVar7;
  do {
    if (uVar6 == 0) break;
    uVar6 = uVar6 - 1;
    sVar2 = *psVar11;
    psVar11 = psVar11 + 1;
  } while (sVar2 != 0);
  FUN_140056dd0(&local_68,psVar7,~uVar6 - 1);
  if (((local_b8 != (undefined *)0x0) && (local_b8 != PTR_DAT_1403200a0)) &&
     (local_b8 + -8 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_80 = uVar5;
    FUN_140156b50(uVar5);
    local_78 = 1;
    piVar1 = (int *)(local_b8 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_b8 + -8);
    }
    FUN_140156be0(uVar5);
  }
  local_b8 = PTR_DAT_1403200a0;
  puVar12 = local_b0[0];
  if (local_b0[0] == (undefined *)0x0) {
    puVar12 = PTR_DAT_140320098;
  }
  FUN_1400a0950("Server Leave [%d][%s] ",*(undefined4 *)(param_2 + 0x30),puVar12);
  puVar8 = &local_68;
  if (7 < local_50) {
    puVar8 = (undefined2 *)CONCAT62(uStack_66,local_68);
  }
  FUN_1400a09c0(L"[%s]\n",puVar8);
  if (7 < local_50) {
    operator_delete((void *)CONCAT62(uStack_66,local_68));
  }
  local_50 = 7;
  local_58 = 0;
  local_68 = 0;
  if (((local_b0[0] != (undefined *)0x0) && (local_b0[0] != PTR_DAT_140320098)) &&
     (local_b0[0] + -8 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_90 = uVar5;
    FUN_140156b50(uVar5);
    local_88 = 1;
    piVar1 = (int *)(local_b0[0] + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_b0[0] + -8);
    }
    FUN_140156be0(uVar5);
  }
  local_b0[0] = PTR_DAT_140320098;
  FUN_140156be0(lVar9);
  return;
}



undefined1 FUN_140050d70(void)

{
  return 1;
}



void FUN_140050d80(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined *puVar4;
  undefined *local_res18 [2];
  
  plVar2 = (longlong *)FUN_140182070(param_2,local_res18,param_3,param_4,0xfffffffffffffffe);
  puVar4 = (undefined *)*plVar2;
  if ((undefined *)*plVar2 == (undefined *)0x0) {
    puVar4 = PTR_DAT_1403200a0;
  }
  FUN_140148b90(L"OnError CDBCServer : %s",puVar4);
  if (((local_res18[0] != (undefined *)0x0) && (local_res18[0] != PTR_DAT_1403200a0)) &&
     (local_res18[0] + -8 != (undefined *)0x0)) {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    piVar1 = (int *)(local_res18[0] + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res18[0] + -8);
    }
    FUN_140156be0(uVar3);
  }
  return;
}



void FUN_140050e20(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined *puVar4;
  undefined *local_res18 [2];
  
  plVar2 = (longlong *)FUN_140182070(param_2,local_res18,param_3,param_4,0xfffffffffffffffe);
  puVar4 = (undefined *)*plVar2;
  if ((undefined *)*plVar2 == (undefined *)0x0) {
    puVar4 = PTR_DAT_1403200a0;
  }
  FUN_140148b90(L"OnWarning CDBCServer : %s",puVar4);
  if (((local_res18[0] != (undefined *)0x0) && (local_res18[0] != PTR_DAT_1403200a0)) &&
     (local_res18[0] + -8 != (undefined *)0x0)) {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    piVar1 = (int *)(local_res18[0] + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res18[0] + -8);
    }
    FUN_140156be0(uVar3);
  }
  return;
}



void FUN_140050ec0(undefined8 param_1,longlong *param_2)

{
  undefined8 uVar1;
  
  uVar1 = (**(code **)(*param_2 + 8))(param_2);
  FUN_140148a40("OnException CDBCServer : %s",uVar1);
  return;
}



undefined8
FUN_140050ee0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x588) = *(int *)(param_1 + 0x588) + 1;
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  FUN_140122060(param_1 + -8,param_2,*param_5,param_6,puVar1);
  return 1;
}



undefined8
FUN_140050f20(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x584) = *(int *)(param_1 + 0x584) + 1;
  puVar1 = (undefined *)*param_5;
  if ((undefined *)*param_5 == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  FUN_140122130(param_1 + -8,param_2,*param_4,puVar1);
  return 1;
}



undefined8
FUN_140050f60(longlong param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5,undefined8 param_6,longlong *param_7,undefined4 *param_8,
             longlong *param_9,longlong *param_10,longlong *param_11)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined *puVar3;
  undefined *puVar4;
  undefined *puVar5;
  
  *(int *)(param_1 + 0x184) = *(int *)(param_1 + 0x184) + 1;
  puVar2 = (undefined *)*param_11;
  if ((undefined *)*param_11 == (undefined *)0x0) {
    puVar2 = PTR_DAT_140320098;
  }
  puVar5 = (undefined *)*param_10;
  if ((undefined *)*param_10 == (undefined *)0x0) {
    puVar5 = PTR_DAT_140320098;
  }
  puVar1 = (undefined *)*param_9;
  if ((undefined *)*param_9 == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  puVar3 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar3 = PTR_DAT_1403200a0;
  }
  puVar4 = (undefined *)*param_5;
  if ((undefined *)*param_5 == (undefined *)0x0) {
    puVar4 = PTR_DAT_140320098;
  }
  FUN_140122590(param_1 + -8,param_2,*param_4,puVar4,puVar3,*param_8,puVar1,puVar5,puVar2);
  return 1;
}



undefined8
FUN_140051030(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5,longlong *param_6)

{
  undefined *puVar1;
  undefined *puVar2;
  
  *(int *)(param_1 + 0x450) = *(int *)(param_1 + 0x450) + 1;
  puVar2 = (undefined *)*param_6;
  if ((undefined *)*param_6 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_5;
  if ((undefined *)*param_5 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140122940(param_1 + -8,param_2,*param_4,puVar1,puVar2);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140051080(longlong param_1)

{
  char *_Source;
  wchar_t *pwVar1;
  ushort *in_stack_00000028;
  longlong *in_stack_00000030;
  undefined4 *in_stack_00000038;
  undefined4 *in_stack_00000040;
  longlong *in_stack_00000048;
  undefined4 *in_stack_00000050;
  longlong *in_stack_00000058;
  undefined4 *in_stack_00000060;
  undefined4 *in_stack_00000068;
  short *in_stack_00000070;
  undefined8 *in_stack_00000078;
  short *in_stack_00000080;
  undefined1 auStack_118 [32];
  int local_f8;
  undefined4 local_f4;
  undefined4 local_f0;
  undefined4 local_ec;
  undefined4 local_e8;
  undefined4 local_e4;
  undefined4 local_e0;
  undefined4 local_dc;
  undefined4 local_d8;
  uint local_d4;
  char local_d0 [50];
  wchar_t local_9e [32];
  int local_5e;
  undefined8 local_5a;
  undefined4 local_52;
  undefined4 local_4e;
  undefined4 local_4a;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  *(int *)(param_1 + 0x4d0) = *(int *)(param_1 + 0x4d0) + 1;
  local_f8 = (int)*in_stack_00000080;
  local_f4 = *in_stack_00000038;
  local_d0[0] = '\0';
  local_d0[1] = '\0';
  local_d0[2] = '\0';
  local_d0[3] = '\0';
  local_d0[4] = '\0';
  local_d0[5] = '\0';
  local_d0[6] = '\0';
  local_d0[7] = '\0';
  local_f0 = in_stack_00000038[1];
  local_d0[8] = '\0';
  local_d0[9] = '\0';
  local_d0[10] = '\0';
  local_d0[0xb] = '\0';
  local_d0[0xc] = '\0';
  local_d0[0xd] = '\0';
  local_d0[0xe] = '\0';
  local_d0[0xf] = '\0';
  local_ec = in_stack_00000038[2];
  local_d0[0x10] = '\0';
  local_d0[0x11] = '\0';
  local_d0[0x12] = '\0';
  local_d0[0x13] = '\0';
  local_d0[0x14] = '\0';
  local_d0[0x15] = '\0';
  local_d0[0x16] = '\0';
  local_d0[0x17] = '\0';
  local_e8 = in_stack_00000038[3];
  local_e4 = *in_stack_00000040;
  _Source = (char *)*in_stack_00000030;
  if ((char *)*in_stack_00000030 == (char *)0x0) {
    _Source = PTR_DAT_140320098;
  }
  local_e0 = in_stack_00000040[1];
  local_dc = in_stack_00000040[2];
  local_d0[0x18] = '\0';
  local_d0[0x19] = '\0';
  local_d0[0x1a] = '\0';
  local_d0[0x1b] = '\0';
  local_d0[0x1c] = '\0';
  local_d0[0x1d] = '\0';
  local_d0[0x1e] = '\0';
  local_d0[0x1f] = '\0';
  local_d8 = in_stack_00000040[3];
  local_d0[0x20] = '\0';
  local_d0[0x21] = '\0';
  local_d0[0x22] = '\0';
  local_d0[0x23] = '\0';
  local_d0[0x24] = '\0';
  local_d0[0x25] = '\0';
  local_d0[0x26] = '\0';
  local_d0[0x27] = '\0';
  local_d0[0x28] = '\0';
  local_d0[0x29] = '\0';
  local_d0[0x2a] = '\0';
  local_d0[0x2b] = '\0';
  local_d0[0x2c] = '\0';
  local_d0[0x2d] = '\0';
  local_d0[0x2e] = '\0';
  local_d0[0x2f] = '\0';
  local_d4 = (uint)*in_stack_00000028;
  local_52 = *in_stack_00000050;
  local_d0[0x30] = '\0';
  local_d0[0x31] = '\0';
  local_4e = *in_stack_00000060;
  local_9e[0] = L'\0';
  local_9e[1] = L'\0';
  local_9e[2] = L'\0';
  local_9e[3] = L'\0';
  local_4a = *in_stack_00000068;
  local_9e[4] = L'\0';
  local_9e[5] = L'\0';
  local_9e[6] = L'\0';
  local_9e[7] = L'\0';
  local_5e = (int)*in_stack_00000070;
  local_9e[8] = L'\0';
  local_9e[9] = L'\0';
  local_9e[10] = L'\0';
  local_9e[0xb] = L'\0';
  local_5a = *in_stack_00000078;
  local_9e[0xc] = L'\0';
  local_9e[0xd] = L'\0';
  local_9e[0xe] = L'\0';
  local_9e[0xf] = L'\0';
  local_9e[0x10] = L'\0';
  local_9e[0x11] = L'\0';
  local_9e[0x12] = L'\0';
  local_9e[0x13] = L'\0';
  local_9e[0x14] = L'\0';
  local_9e[0x15] = L'\0';
  local_9e[0x16] = L'\0';
  local_9e[0x17] = L'\0';
  local_9e[0x18] = L'\0';
  local_9e[0x19] = L'\0';
  local_9e[0x1a] = L'\0';
  local_9e[0x1b] = L'\0';
  local_9e[0x1c] = L'\0';
  local_9e[0x1d] = L'\0';
  local_9e[0x1e] = L'\0';
  local_9e[0x1f] = L'\0';
  strncpy(local_d0,_Source,0x31);
  pwVar1 = (wchar_t *)*in_stack_00000048;
  if ((wchar_t *)*in_stack_00000048 == (wchar_t *)0x0) {
    pwVar1 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcsncpy(local_9e,pwVar1,0xf);
  pwVar1 = (wchar_t *)*in_stack_00000058;
  if ((wchar_t *)*in_stack_00000058 == (wchar_t *)0x0) {
    pwVar1 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcsncpy(local_9e + 0x10,pwVar1,0xf);
  return 1;
}



undefined1 FUN_140051230(longlong param_1)

{
  *(int *)(param_1 + 0x188) = *(int *)(param_1 + 0x188) + 1;
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140051240(longlong param_1)

{
  undefined1 auStack_58 [32];
  undefined2 local_38;
  undefined2 local_36;
  undefined8 local_34;
  undefined2 local_2c;
  undefined8 local_2a;
  undefined8 local_22;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  *(int *)(param_1 + 0x18c) = *(int *)(param_1 + 0x18c) + 1;
  local_2a = 0;
  local_22 = 0;
  local_2c = 0;
  local_34 = 0;
  local_36 = 0x448;
  local_38 = 0x1e;
  FUN_140117db0(*(undefined8 *)(param_1 + 0xd8),&local_38);
  return 1;
}



undefined8
FUN_1400512c0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             longlong *param_5,longlong *param_6,undefined2 *param_7)

{
  undefined *puVar1;
  undefined *puVar2;
  
  *(int *)(param_1 + 400) = *(int *)(param_1 + 400) + 1;
  puVar2 = (undefined *)*param_6;
  if ((undefined *)*param_6 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_5;
  if ((undefined *)*param_5 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140122c00(param_1 + -8,param_4,puVar1,puVar2,param_2,*param_7);
  return 1;
}



undefined8
FUN_140051320(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             undefined2 *param_5,undefined8 param_6,longlong *param_7,longlong *param_8,
             longlong *param_9)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined *puVar3;
  
  *(int *)(param_1 + 0x2ec) = *(int *)(param_1 + 0x2ec) + 1;
  puVar3 = (undefined *)*param_9;
  if ((undefined *)*param_9 == (undefined *)0x0) {
    puVar3 = PTR_DAT_140320098;
  }
  puVar2 = (undefined *)*param_8;
  if ((undefined *)*param_8 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140122aa0(param_1 + -8,param_6,puVar1,puVar2,puVar3,param_2,*param_5);
  return 1;
}



undefined1 FUN_1400513a0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4)

{
  *(int *)(param_1 + 0x194) = *(int *)(param_1 + 0x194) + 1;
  FUN_14012b590(param_1 + -8,*param_4,param_2);
  return 1;
}



undefined8
FUN_1400513d0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined2 *param_5)

{
  *(int *)(param_1 + 0x198) = *(int *)(param_1 + 0x198) + 1;
  FUN_1401288e0(param_1 + -8,*param_4,param_2,*param_5);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8
FUN_140051400(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 *param_7)

{
  undefined1 auStack_98 [32];
  undefined8 *local_78;
  undefined4 local_70;
  undefined2 local_68;
  undefined2 local_66;
  undefined4 local_64;
  undefined4 local_60;
  undefined2 local_5c;
  undefined8 local_5a;
  undefined8 local_52;
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  *(int *)(param_1 + 0x1f0) = *(int *)(param_1 + 0x1f0) + 1;
  local_70 = 0;
  local_78 = param_7;
  FUN_14012ed70(param_1 + -8,*param_4,param_2,*param_5);
  local_70 = 1;
  local_78 = param_7;
  FUN_14012ed70(param_1 + -8,*param_4,param_2,*param_5);
  local_70 = 2;
  local_78 = param_7;
  FUN_14012ed70(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = param_7;
  FUN_14012eab0(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = param_7;
  FUN_14012b4b0(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = (undefined8 *)param_6;
  FUN_14012cda0(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = (undefined8 *)param_6;
  FUN_14012d180(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = param_7;
  FUN_140126750(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = param_7;
  FUN_14012f170(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = param_7;
  FUN_14012e7a0(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = param_7;
  FUN_14012f800(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = (undefined8 *)param_6;
  FUN_140122ce0(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = param_7;
  FUN_140122ed0(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = param_7;
  FUN_140124d30(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = param_7;
  FUN_14005a1b0(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = param_7;
  FUN_140127280(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = (undefined8 *)param_6;
  FUN_14012c8d0(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = param_7;
  FUN_140127960(param_1 + -8,*param_4,param_2,*param_5);
  local_78 = param_7;
  FUN_140127df0(param_1 + -8,*param_4,param_2,*param_5);
  local_66 = 0x4d0;
  local_68 = 0x1e;
  local_64 = *param_5;
  local_5c = 0;
  local_5a = *param_7;
  local_52 = param_7[1];
  local_60 = param_2;
  FUN_1400cc3b0(*(undefined8 *)(param_1 + 0xd8),&local_68);
  local_78 = param_7;
  FUN_14012e110(param_1 + -8,*param_4,param_2,*param_5);
  FUN_140127fd0(param_1 + -8,*param_4,param_2,*param_5);
  return 1;
}



undefined8
FUN_1400516e0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined2 *param_5,undefined4 *param_6,undefined4 *param_7,undefined2 *param_8,
             undefined2 *param_9,longlong *param_10,undefined8 param_11,longlong *param_12,
             undefined4 *param_13,undefined4 *param_14)

{
  undefined *puVar1;
  undefined *puVar2;
  
  *(int *)(param_1 + 0x2a4) = *(int *)(param_1 + 0x2a4) + 1;
  puVar2 = (undefined *)*param_12;
  if ((undefined *)*param_12 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_10;
  if ((undefined *)*param_10 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140128a70(param_1 + -8,*param_4,*param_5,param_2,*param_6,*param_7,*param_8,*param_9,puVar1,
                param_11,puVar2,*param_13,*param_14);
  return 1;
}



undefined1 FUN_1400517b0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *(int *)(param_1 + 0x2a8) = *(int *)(param_1 + 0x2a8) + 1;
  FUN_140129460(param_1 + -8,param_2,param_4);
  return 1;
}



undefined8
FUN_1400517d0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined1 *param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x19c) = *(int *)(param_1 + 0x19c) + 1;
  FUN_140129540(param_1 + -8,*param_4,param_2,param_5,*param_6,param_7);
  return 1;
}



undefined8
FUN_140051820(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x2b4) = *(int *)(param_1 + 0x2b4) + 1;
  FUN_140128c50(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7);
  return 1;
}



undefined8
FUN_140051860(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x2b8) = *(int *)(param_1 + 0x2b8) + 1;
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_1401299b0(param_1 + -8,*param_4,param_2,*param_5,param_6,puVar1);
  return 1;
}



undefined8
FUN_1400518b0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 700) = *(int *)(param_1 + 700) + 1;
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140129880(param_1 + -8,*param_4,param_2,*param_5,param_6,puVar1);
  return 1;
}



undefined8
FUN_140051900(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x2c0) = *(int *)(param_1 + 0x2c0) + 1;
  FUN_140128d50(param_1 + -8,*param_4,param_2,param_5,param_6);
  return 1;
}



undefined8
FUN_140051940(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,longlong *param_8)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x2c4) = *(int *)(param_1 + 0x2c4) + 1;
  puVar1 = (undefined *)*param_8;
  if ((undefined *)*param_8 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140129650(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,puVar1);
  return 1;
}



undefined8
FUN_1400519a0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8)

{
  *(int *)(param_1 + 0x2c8) = *(int *)(param_1 + 0x2c8) + 1;
  FUN_140129780(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,*param_8);
  return 1;
}



undefined8
FUN_140051a00(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 *param_7)

{
  *(int *)(param_1 + 0x2b0) = *(int *)(param_1 + 0x2b0) + 1;
  FUN_140129ae0(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_140051a50(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,longlong *param_6,undefined8 param_7,undefined8 param_8)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x1a0) = *(int *)(param_1 + 0x1a0) + 1;
  puVar1 = (undefined *)*param_6;
  if ((undefined *)*param_6 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140129240(param_1 + -8,*param_4,param_2,param_5,puVar1,param_7,param_8);
  return 1;
}



undefined8
FUN_140051ab0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined2 *param_7)

{
  *(int *)(param_1 + 0x2d8) = *(int *)(param_1 + 0x2d8) + 1;
  FUN_140128f50(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  FUN_140128e70(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140051b40(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x2d4) = *(int *)(param_1 + 0x2d4) + 1;
  FUN_140129040(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7);
  return 1;
}



undefined8
FUN_140051b80(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x2d0) = *(int *)(param_1 + 0x2d0) + 1;
  FUN_140129140(param_1 + -8,*param_4,param_2,param_5,param_6);
  return 1;
}



undefined8
FUN_140051bc0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8,
             undefined8 param_9)

{
  *(int *)(param_1 + 0x1a4) = *(int *)(param_1 + 0x1a4) + 1;
  FUN_14012b650(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,*param_8,param_9);
  return 1;
}



undefined8
FUN_140051c20(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8,
             undefined4 *param_9,undefined4 *param_10,undefined4 *param_11)

{
  *(int *)(param_1 + 0x2e8) = *(int *)(param_1 + 0x2e8) + 1;
  FUN_14012bff0(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,param_8,*param_9,*param_10,
                *param_11);
  return 1;
}



undefined8
FUN_140051cb0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8,
             undefined4 *param_9,undefined4 *param_10)

{
  *(int *)(param_1 + 0x1b8) = *(int *)(param_1 + 0x1b8) + 1;
  FUN_14012c140(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,param_8,*param_9,*param_10);
  return 1;
}



undefined8
FUN_140051d30(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8,
             undefined4 *param_9,undefined4 *param_10)

{
  *(int *)(param_1 + 0x1b4) = *(int *)(param_1 + 0x1b4) + 1;
  FUN_14012c280(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,param_8,*param_9,*param_10);
  return 1;
}



undefined8
FUN_140051db0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8,
             undefined4 *param_9,undefined4 *param_10)

{
  *(int *)(param_1 + 0x1bc) = *(int *)(param_1 + 0x1bc) + 1;
  FUN_14012c3c0(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,param_8,*param_9,*param_10);
  return 1;
}



undefined8
FUN_140051e30(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8,
             undefined4 *param_9,undefined4 *param_10)

{
  *(int *)(param_1 + 0x1c0) = *(int *)(param_1 + 0x1c0) + 1;
  FUN_14012c500(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,param_8,*param_9,*param_10);
  return 1;
}



undefined8
FUN_140051eb0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8,
             undefined4 *param_9)

{
  *(int *)(param_1 + 0x1c4) = *(int *)(param_1 + 0x1c4) + 1;
  FUN_14012bbb0(param_1 + -8,*param_4,param_2,param_6,param_5,param_7,*param_8,*param_9);
  return 1;
}



undefined8
FUN_140051f10(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             longlong param_5)

{
  *(int *)(param_1 + 0x430) = *(int *)(param_1 + 0x430) + 1;
  FUN_14012bce0(param_1 + -8,*param_4,param_2,param_5,*(undefined4 *)(param_5 + 0x18),param_5 + 0x30
                ,param_5 + 0x3c,*(undefined4 *)(param_5 + 0x2c));
  return 1;
}



undefined8
FUN_140051f60(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x1c8) = *(int *)(param_1 + 0x1c8) + 1;
  FUN_14012be00(param_1 + -8,*param_4,param_2,param_6,param_5,param_7);
  return 1;
}



undefined8
FUN_140051fa0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x1cc) = *(int *)(param_1 + 0x1cc) + 1;
  FUN_14012b970(param_1 + -8,*param_4,param_2,param_6,param_5,param_7);
  return 1;
}



undefined8
FUN_140051fe0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8,
             undefined4 *param_9)

{
  *(int *)(param_1 + 0x1d0) = *(int *)(param_1 + 0x1d0) + 1;
  FUN_14012ba80(param_1 + -8,*param_4,param_2,param_6,param_5,param_7,*param_8,*param_9);
  return 1;
}



undefined8
FUN_140052040(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x1d4) = *(int *)(param_1 + 0x1d4) + 1;
  FUN_14012b790(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_140052080(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7)

{
  *(int *)(param_1 + 0x1dc) = *(int *)(param_1 + 0x1dc) + 1;
  FUN_14012b870(param_1 + -8,*param_4,param_2,param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_1400520c0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,longlong *param_6)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x3e0) = *(int *)(param_1 + 0x3e0) + 1;
  puVar1 = (undefined *)*param_6;
  if ((undefined *)*param_6 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_14012c7e0(param_1 + -8,*param_4,param_2,param_5,puVar1);
  return 1;
}



undefined8
FUN_140052110(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 500) = *(int *)(param_1 + 500) + 1;
  FUN_140125710(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_140052150(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,longlong *param_6,longlong *param_7)

{
  undefined *puVar1;
  undefined *puVar2;
  
  *(int *)(param_1 + 0x418) = *(int *)(param_1 + 0x418) + 1;
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  puVar2 = (undefined *)*param_6;
  if ((undefined *)*param_6 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  FUN_140127750(param_1 + -8,*param_4,param_5,puVar2,puVar1);
  return 1;
}



undefined8
FUN_1400521b0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x1f8) = *(int *)(param_1 + 0x1f8) + 1;
  FUN_1401257f0(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_1400521f0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined1 *param_7)

{
  *(int *)(param_1 + 0x1fc) = *(int *)(param_1 + 0x1fc) + 1;
  FUN_140125460(param_1 + -8,*param_4,param_2,param_5,*param_6,*param_7);
  return 1;
}



undefined8
FUN_140052240(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined8 *param_7,undefined4 *param_8,
             undefined4 *param_9)

{
  *(int *)(param_1 + 0x200) = *(int *)(param_1 + 0x200) + 1;
  FUN_1401258d0(param_1 + -8,*param_4,param_2,param_5,*param_6,*param_7);
  FUN_1401259c0(param_1 + -8,*param_4,param_2,param_5,*param_8,*param_9);
  return 1;
}



undefined8
FUN_1400522d0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 *param_6)

{
  *(int *)(param_1 + 0x204) = *(int *)(param_1 + 0x204) + 1;
  FUN_1401252a0(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_140052310(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined4 *param_7)

{
  *(int *)(param_1 + 0x208) = *(int *)(param_1 + 0x208) + 1;
  FUN_1401259c0(param_1 + -8,*param_4,param_2,param_5,*param_6,*param_7);
  return 1;
}



undefined8
FUN_140052360(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x20c) = *(int *)(param_1 + 0x20c) + 1;
  FUN_140125ab0(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_1400523a0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 *param_6,undefined8 *param_7)

{
  *(int *)(param_1 + 0x59c) = *(int *)(param_1 + 0x59c) + 1;
  FUN_14012eb90(param_1 + -8,*param_4,param_2,param_5,*param_6,*param_7);
  return 1;
}



undefined8
FUN_1400523f0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 *param_6,undefined8 *param_7,int *param_8)

{
  int iVar1;
  
  *(int *)(param_1 + 0x21c) = *(int *)(param_1 + 0x21c) + 1;
  iVar1 = *param_8;
  if (((iVar1 == 0) || (iVar1 == 1)) || (iVar1 == 2)) {
    FUN_14012ee70(param_1 + -8,*param_4,param_2,param_5,*param_6,*param_7,iVar1);
  }
  return 1;
}



undefined1 FUN_140052460(longlong param_1)

{
  *(int *)(param_1 + 0x220) = *(int *)(param_1 + 0x220) + 1;
  return 1;
}



undefined8
FUN_140052470(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined4 *param_7)

{
  *(int *)(param_1 + 0x2a0) = *(int *)(param_1 + 0x2a0) + 1;
  FUN_1401262e0(param_1 + -8,*param_4,param_2,param_5,*param_6,*param_7);
  return 1;
}



undefined8
FUN_1400524c0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x210) = *(int *)(param_1 + 0x210) + 1;
  FUN_140126200(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_140052500(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x4e0) = *(int *)(param_1 + 0x4e0) + 1;
  FUN_140125f70(param_1 + -8,*param_4,param_2,param_5);
  return 1;
}



undefined1 FUN_140052530(longlong param_1,undefined8 param_2,undefined8 param_3,longlong *param_4)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x4fc) = *(int *)(param_1 + 0x4fc) + 1;
  puVar1 = (undefined *)*param_4;
  if ((undefined *)*param_4 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140126040(param_1 + -8,param_2,puVar1);
  return 1;
}



undefined8
FUN_140052560(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x2cc) = *(int *)(param_1 + 0x2cc) + 1;
  FUN_140126120(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_1400525a0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined4 *param_7)

{
  *(int *)(param_1 + 0x214) = *(int *)(param_1 + 0x214) + 1;
  FUN_140125620(param_1 + -8,*param_4,param_2,param_5,*param_6,*param_7);
  return 1;
}



undefined8
FUN_1400525f0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x35c) = *(int *)(param_1 + 0x35c) + 1;
  FUN_140125010(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_140052630(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 *param_6)

{
  *(int *)(param_1 + 0x360) = *(int *)(param_1 + 0x360) + 1;
  FUN_140124e10(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_140052670(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined4 *param_7)

{
  *(int *)(param_1 + 0x364) = *(int *)(param_1 + 0x364) + 1;
  FUN_1401250f0(param_1 + -8,*param_4,param_2,param_5,*param_6,*param_7);
  return 1;
}



undefined8
FUN_1400526c0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x2e0) = *(int *)(param_1 + 0x2e0) + 1;
  FUN_140125550(param_1 + -8,*param_4,param_2,param_5);
  return 1;
}



undefined1 FUN_1400526f0(longlong param_1)

{
  *(int *)(param_1 + 0x224) = *(int *)(param_1 + 0x224) + 1;
  return 1;
}



undefined8
FUN_140052700(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x228) = *(int *)(param_1 + 0x228) + 1;
  FUN_14012f500(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_140052740(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x1d8) = *(int *)(param_1 + 0x1d8) + 1;
  FUN_14012bf20(param_1 + -8,*param_4,param_2,param_5);
  return 1;
}



undefined8
FUN_140052770(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7,undefined2 *param_8,
             undefined2 *param_9,undefined8 param_10,undefined4 *param_11,longlong *param_12)

{
  undefined *puVar1;
  undefined *puVar2;
  
  *(int *)(param_1 + 0x22c) = *(int *)(param_1 + 0x22c) + 1;
  puVar2 = (undefined *)*param_12;
  if ((undefined *)*param_12 == (undefined *)0x0) {
    puVar2 = PTR_DAT_140320098;
  }
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140124960(param_1 + -8,*param_4,param_2,*param_5,param_6,puVar1,*param_8,*param_9,param_10,
                *param_11,puVar2);
  return 1;
}



undefined8
FUN_140052830(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined2 *param_7)

{
  *(int *)(param_1 + 0x2dc) = *(int *)(param_1 + 0x2dc) + 1;
  FUN_140124b40(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_140052880(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x230) = *(int *)(param_1 + 0x230) + 1;
  FUN_140124c30(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7);
  return 1;
}



undefined8
FUN_1400528c0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined2 *param_7)

{
  *(int *)(param_1 + 0x234) = *(int *)(param_1 + 0x234) + 1;
  FUN_14012d180(param_1 + -8,*param_4,param_2,*param_5,param_6);
  FUN_140125e80(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_140052950(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined2 *param_7)

{
  *(int *)(param_1 + 0x238) = *(int *)(param_1 + 0x238) + 1;
  FUN_140125b90(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_1400529a0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,longlong *param_6,undefined2 *param_7)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x23c) = *(int *)(param_1 + 0x23c) + 1;
  puVar1 = (undefined *)*param_6;
  if ((undefined *)*param_6 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140125c80(param_1 + -8,*param_4,param_2,*param_5,puVar1,*param_7);
  return 1;
}



undefined8
FUN_140052a00(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,longlong *param_6,undefined2 *param_7)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x240) = *(int *)(param_1 + 0x240) + 1;
  puVar1 = (undefined *)*param_6;
  if ((undefined *)*param_6 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140125d80(param_1 + -8,*param_4,param_2,*param_5,puVar1,*param_7);
  return 1;
}



undefined8
FUN_140052a60(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined4 *param_7,undefined4 *param_8,
             undefined8 param_9,undefined4 *param_10,undefined4 *param_11)

{
  *(int *)(param_1 + 0x1a8) = *(int *)(param_1 + 0x1a8) + 1;
  FUN_14012f040(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7,*param_8,param_9,*param_10,
                *param_11);
  return 1;
}



undefined8
FUN_140052af0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined4 *param_7)

{
  *(int *)(param_1 + 0x1ac) = *(int *)(param_1 + 0x1ac) + 1;
  FUN_14012f250(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_140052b40(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x598) = *(int *)(param_1 + 0x598) + 1;
  FUN_14012f420(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140052b80(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x1b0) = *(int *)(param_1 + 0x1b0) + 1;
  FUN_14012f340(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140052bc0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7,undefined4 *param_8,
             undefined4 *param_9)

{
  *(int *)(param_1 + 0x1e0) = *(int *)(param_1 + 0x1e0) + 1;
  FUN_14012e690(param_1 + -8,*param_4,param_2,param_6,param_5,*param_7,*param_8,*param_9);
  return 1;
}



undefined8
FUN_140052c30(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7,undefined4 *param_8,
             undefined4 *param_9,undefined4 *param_10,undefined4 *param_11,undefined4 *param_12,
             undefined8 *param_13)

{
  *(int *)(param_1 + 0x1e4) = *(int *)(param_1 + 0x1e4) + 1;
  FUN_14012e880(param_1 + -8,*param_4,param_2,param_5,param_6,*param_7,*param_8,*param_9,*param_10,
                *param_11,*param_12,*param_13);
  return 1;
}



undefined8
FUN_140052ce0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x1ec) = *(int *)(param_1 + 0x1ec) + 1;
  FUN_14012e9d0(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_140052d20(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x2e4) = *(int *)(param_1 + 0x2e4) + 1;
  FUN_14012e4d0(param_1 + -8,*param_4,param_2,param_5);
  return 1;
}



undefined8
FUN_140052d50(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x1e8) = *(int *)(param_1 + 0x1e8) + 1;
  FUN_14012e5a0(param_1 + -8,*param_4,param_2,param_5,param_6);
  return 1;
}



undefined8
FUN_140052d90(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,longlong *param_8,
             longlong *param_9,longlong *param_10,undefined4 *param_11,undefined4 *param_12,
             undefined4 *param_13,undefined4 *param_14,undefined8 param_15)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined *puVar3;
  
  *(int *)(param_1 + 0x244) = *(int *)(param_1 + 0x244) + 1;
  puVar3 = (undefined *)*param_10;
  if ((undefined *)*param_10 == (undefined *)0x0) {
    puVar3 = PTR_DAT_1403200a0;
  }
  puVar2 = (undefined *)*param_9;
  if ((undefined *)*param_9 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_8;
  if ((undefined *)*param_8 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_14012d520(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,puVar1,puVar2,puVar3,
                *param_11,*param_12,*param_13,*param_14,param_15);
  return 1;
}



undefined8
FUN_140052e80(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x248) = *(int *)(param_1 + 0x248) + 1;
  FUN_14012d440(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined1 FUN_140052ec0(longlong param_1)

{
  *(int *)(param_1 + 0x24c) = *(int *)(param_1 + 0x24c) + 1;
  return 1;
}



undefined1
FUN_140052ed0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x250) = *(int *)(param_1 + 0x250) + 1;
  FUN_14012d740(param_1 + -8,*param_4,param_2,*param_5,param_6);
  FUN_14012d820(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140052f50(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined1 *param_7)

{
  *(int *)(param_1 + 0x254) = *(int *)(param_1 + 0x254) + 1;
  FUN_14012d900(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_140052fa0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8,
             undefined8 param_9,undefined8 param_10)

{
  *(int *)(param_1 + 0x25c) = *(int *)(param_1 + 0x25c) + 1;
  FUN_14012dad0(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,param_8,param_9,param_10);
  return 1;
}



undefined1
FUN_140053010(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 600) = *(int *)(param_1 + 600) + 1;
  FUN_14012d9f0(param_1 + -8,*param_4,param_2,*param_5,param_6);
  FUN_14012d820(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140053090(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x260) = *(int *)(param_1 + 0x260) + 1;
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_14012dcf0(param_1 + -8,*param_4,param_2,*param_5,param_6,puVar1);
  return 1;
}



undefined8
FUN_1400530e0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x264) = *(int *)(param_1 + 0x264) + 1;
  FUN_14012de20(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140053120(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined4 *param_7,undefined8 *param_8,
             undefined4 *param_9,undefined4 *param_10,undefined4 *param_11,undefined1 *param_12)

{
  *(int *)(param_1 + 0x268) = *(int *)(param_1 + 0x268) + 1;
  FUN_140124ef0(param_1 + -8,*param_4,*param_5,param_6,*param_7,*param_8,*param_9,*param_10,
                *param_11,*param_12);
  return 1;
}



undefined8
FUN_1400531b0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x26c) = *(int *)(param_1 + 0x26c) + 1;
  FUN_1401251e0(param_1 + -8,*param_4,param_2,*param_5,*param_6);
  return 1;
}



undefined8
FUN_1400531f0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x270) = *(int *)(param_1 + 0x270) + 1;
  FUN_140128800(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140053230(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x274) = *(int *)(param_1 + 0x274) + 1;
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140128600(param_1 + -8,*param_4,param_2,*param_5,param_6,puVar1);
  return 1;
}



undefined8
FUN_140053280(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x278) = *(int *)(param_1 + 0x278) + 1;
  FUN_140128700(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7);
  return 1;
}



undefined8
FUN_1400532c0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7,longlong *param_8)

{
  undefined *puVar1;
  undefined *puVar2;
  
  *(int *)(param_1 + 0x27c) = *(int *)(param_1 + 0x27c) + 1;
  puVar2 = (undefined *)*param_8;
  if ((undefined *)*param_8 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_1401245c0(param_1 + -8,*param_4,param_2,*param_5,param_6,puVar1,puVar2);
  return 1;
}



undefined8
FUN_140053330(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x280) = *(int *)(param_1 + 0x280) + 1;
  FUN_140124710(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7);
  return 1;
}



undefined8
FUN_140053370(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,longlong *param_8)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x284) = *(int *)(param_1 + 0x284) + 1;
  puVar1 = (undefined *)*param_8;
  if ((undefined *)*param_8 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140124810(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,puVar1);
  return 1;
}



undefined8
FUN_1400533d0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined4 *param_7,undefined2 *param_8,
             undefined2 *param_9,undefined2 *param_10,undefined2 *param_11)

{
  *(int *)(param_1 + 0x288) = *(int *)(param_1 + 0x288) + 1;
  FUN_140122fb0(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7,*param_8,*param_9,*param_10,
                *param_11);
  return 1;
}



undefined8
FUN_140053470(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8,
             undefined4 *param_9,undefined4 *param_10)

{
  *(int *)(param_1 + 0x28c) = *(int *)(param_1 + 0x28c) + 1;
  FUN_14012f5e0(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,*param_8,*param_9,*param_10);
  return 1;
}



undefined8
FUN_1400534f0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x4e8) = *(int *)(param_1 + 0x4e8) + 1;
  FUN_14012f700(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7);
  return 1;
}



undefined8
FUN_140053530(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x290) = *(int *)(param_1 + 0x290) + 1;
  FUN_14012f8e0(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7);
  return 1;
}



undefined8
FUN_140053570(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x294) = *(int *)(param_1 + 0x294) + 1;
  FUN_14012f9e0(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_1400535b0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined2 *param_6)

{
  *(int *)(param_1 + 0x298) = *(int *)(param_1 + 0x298) + 1;
  FUN_1401230d0(param_1 + -8,*param_4,param_2,*param_5,*param_6);
  return 1;
}



undefined8
FUN_1400535f0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5)

{
  *(int *)(param_1 + 0x29c) = *(int *)(param_1 + 0x29c) + 1;
  FUN_14012c640(param_1 + -8,*param_4,param_2,*param_5);
  return 1;
}



undefined8
FUN_140053620(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x29c) = *(int *)(param_1 + 0x29c) + 1;
  FUN_14012c700(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8 FUN_140053660(longlong param_1,undefined4 param_2,undefined8 param_3,ushort *param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 *local_res8;
  
  *(int *)(param_1 + 0x2f0) = *(int *)(param_1 + 0x2f0) + 1;
  FUN_140156b50(param_1 + 0x148);
  plVar1 = (longlong *)FUN_140050710(param_1 + -8,&local_res8,param_2);
  lVar2 = 0;
  if ((longlong *)*plVar1 != (longlong *)0x0) {
    lVar2 = *(longlong *)*plVar1;
  }
  if ((local_res8 != (undefined8 *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0))
  {
    if ((void *)*local_res8 != (void *)0x0) {
      operator_delete((void *)*local_res8);
    }
    FUN_140156970(local_res8);
  }
  if (lVar2 != 0) {
    *(uint *)(lVar2 + 4) = (uint)*param_4;
  }
  FUN_140156be0(param_1 + 0x148);
  return 1;
}



undefined8
FUN_140053730(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             void *param_5)

{
  undefined1 local_d8 [208];
  
  *(int *)(param_1 + 0x2f4) = *(int *)(param_1 + 0x2f4) + 1;
  memcpy(local_d8,param_5,200);
  FUN_1400575d0(param_1 + -8,*param_4,local_d8);
  return 1;
}



undefined1
FUN_140053790(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x2f8) = *(int *)(param_1 + 0x2f8) + 1;
  FUN_140057710(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_1400537c0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x2fc) = *(int *)(param_1 + 0x2fc) + 1;
  FUN_140057930(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_1400537f0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x300) = *(int *)(param_1 + 0x300) + 1;
  FUN_140057820(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined8
FUN_140053820(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined2 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x308) = *(int *)(param_1 + 0x308) + 1;
  FUN_140057a50(param_1 + -8,*param_4,*param_5,param_6);
  return 1;
}



undefined8
FUN_140053850(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined2 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x408) = *(int *)(param_1 + 0x408) + 1;
  FUN_140057c70(param_1 + -8,*param_4,*param_5,param_6);
  return 1;
}



undefined8
FUN_140053880(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined2 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x30c) = *(int *)(param_1 + 0x30c) + 1;
  FUN_140057b60(param_1 + -8,*param_4,*param_5,param_6);
  return 1;
}



undefined1 FUN_1400538b0(longlong param_1)

{
  *(int *)(param_1 + 0x310) = *(int *)(param_1 + 0x310) + 1;
  FUN_140056ec0(param_1 + -8);
  return 1;
}



undefined1 FUN_1400538d0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *(int *)(param_1 + 0x314) = *(int *)(param_1 + 0x314) + 1;
  FUN_140056f60(param_1 + -8,param_2,param_4);
  return 1;
}



undefined1 FUN_1400538f0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *(int *)(param_1 + 0x318) = *(int *)(param_1 + 0x318) + 1;
  FUN_140057040(param_1 + -8,param_2,param_4);
  return 1;
}



undefined8
FUN_140053910(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7,undefined8 param_8)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x31c) = *(int *)(param_1 + 0x31c) + 1;
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140057120(param_1 + -8,param_2,param_4,*param_5,param_6,puVar1,param_8);
  return 1;
}



undefined8
FUN_140053970(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7,longlong *param_8,
             undefined4 *param_9)

{
  undefined *puVar1;
  undefined *puVar2;
  
  *(int *)(param_1 + 800) = *(int *)(param_1 + 800) + 1;
  puVar2 = (undefined *)*param_8;
  if ((undefined *)*param_8 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140057260(param_1 + -8,param_2,param_4,*param_5,param_6,puVar1,puVar2,*param_9);
  return 1;
}



undefined8
FUN_1400539f0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x324) = *(int *)(param_1 + 0x324) + 1;
  FUN_140122dc0(param_1 + -8,*param_4,param_5,param_6);
  return 1;
}



undefined8
FUN_140053a20(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined1 *param_6)

{
  *(int *)(param_1 + 0x328) = *(int *)(param_1 + 0x328) + 1;
  FUN_1401263d0(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_140053a60(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined1 *param_6)

{
  *(int *)(param_1 + 0x32c) = *(int *)(param_1 + 0x32c) + 1;
  FUN_1401264b0(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_140053aa0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined1 *param_6)

{
  *(int *)(param_1 + 0x330) = *(int *)(param_1 + 0x330) + 1;
  FUN_140126590(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_140053ae0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined1 *param_6)

{
  *(int *)(param_1 + 0x334) = *(int *)(param_1 + 0x334) + 1;
  FUN_140126590(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8
FUN_140053b20(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             undefined8 *param_5,undefined1 *param_6)

{
  undefined1 auStack_58 [32];
  undefined2 local_38;
  undefined2 local_36;
  undefined4 local_34;
  undefined4 local_30;
  undefined2 local_2c;
  undefined8 local_2a;
  undefined8 local_22;
  undefined1 local_1a;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  *(int *)(param_1 + 0x488) = *(int *)(param_1 + 0x488) + 1;
  local_36 = 0x4d9;
  local_38 = 0x1f;
  local_2a = *param_5;
  local_22 = param_5[1];
  local_2c = 0;
  local_1a = *param_6;
  local_34 = 0;
  local_30 = param_2;
  FUN_1400bc380(*(undefined8 *)(param_1 + 0xd8),&local_38);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8
FUN_140053bb0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             undefined8 *param_5,undefined1 *param_6)

{
  undefined1 auStack_58 [32];
  undefined2 local_38;
  undefined2 local_36;
  undefined4 local_34;
  undefined4 local_30;
  undefined2 local_2c;
  undefined8 local_2a;
  undefined8 local_22;
  undefined1 local_1a;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  *(int *)(param_1 + 0x48c) = *(int *)(param_1 + 0x48c) + 1;
  local_36 = 0x4da;
  local_38 = 0x1f;
  local_2a = *param_5;
  local_22 = param_5[1];
  local_2c = 0;
  local_1a = *param_6;
  local_34 = 0;
  local_30 = param_2;
  FUN_1400bb480(*(undefined8 *)(param_1 + 0xd8),&local_38);
  return 1;
}



undefined8
FUN_140053c40(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x338) = *(int *)(param_1 + 0x338) + 1;
  FUN_140059cc0(param_1 + -8,*param_4,param_2,param_5);
  return 1;
}



undefined8
FUN_140053c70(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined8 param_7,undefined2 *param_8,
             longlong *param_9,undefined2 *param_10,undefined2 *param_11,undefined4 *param_12,
             undefined4 *param_13,undefined4 *param_14,undefined4 *param_15,undefined4 *param_16,
             undefined4 *param_17,undefined4 *param_18,undefined4 *param_19,undefined4 *param_20,
             undefined4 *param_21,undefined4 *param_22,undefined4 *param_23,undefined4 *param_24,
             undefined4 *param_25,undefined4 *param_26,undefined4 *param_27,undefined4 *param_28,
             undefined4 *param_29,undefined8 *param_30)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x33c) = *(int *)(param_1 + 0x33c) + 1;
  puVar1 = (undefined *)*param_9;
  if ((undefined *)*param_9 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140059d90(param_1 + -8,*param_4,param_2,param_5,param_6,param_7,*param_8,puVar1,*param_10,
                *param_11,*param_12,*param_13,*param_14,*param_15,*param_16,*param_17,*param_18,
                *param_19,*param_20,*param_21,*param_22,*param_23,*param_24,*param_25,*param_26,
                *param_27,*param_28,*param_29,*param_30);
  return 1;
}



undefined8
FUN_140053e60(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7,undefined8 *param_8,
             undefined2 *param_9,undefined8 *param_10,undefined4 *param_11,undefined4 *param_12,
             undefined4 *param_13,undefined4 *param_14,undefined4 *param_15,undefined4 *param_16,
             undefined4 *param_17,undefined4 *param_18,undefined4 *param_19,undefined4 *param_20,
             undefined4 *param_21,undefined4 *param_22,undefined4 *param_23,undefined4 *param_24,
             undefined4 *param_25,undefined4 *param_26,undefined4 *param_27,undefined4 *param_28)

{
  *(int *)(param_1 + 0x340) = *(int *)(param_1 + 0x340) + 1;
  FUN_140059fe0(param_1 + -8,*param_4,param_2,param_5,param_6,*param_7,*param_8,*param_9,*param_10,
                *param_11,*param_12,*param_13,*param_14,*param_15,*param_16,*param_17,*param_18,
                *param_19,*param_20,*param_21,*param_22,*param_23,*param_24,*param_25,*param_26,
                *param_27,*param_28);
  return 1;
}



undefined8
FUN_140054000(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x344) = *(int *)(param_1 + 0x344) + 1;
  FUN_14005a1b0(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140054040(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7,undefined8 *param_8,
             undefined4 *param_9)

{
  *(int *)(param_1 + 0x348) = *(int *)(param_1 + 0x348) + 1;
  FUN_14005a290(param_1 + -8,*param_4,param_2,param_5,param_6,*param_7,*param_8,*param_9);
  return 1;
}



undefined8
FUN_1400540b0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined8 *param_7)

{
  *(int *)(param_1 + 0x34c) = *(int *)(param_1 + 0x34c) + 1;
  FUN_14005a3a0(param_1 + -8,*param_4,param_2,param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_1400540f0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,longlong *param_7)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x350) = *(int *)(param_1 + 0x350) + 1;
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_14005a490(param_1 + -8,*param_4,param_2,param_5,param_6,puVar1);
  return 1;
}



undefined8
FUN_140054140(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7,undefined8 *param_8)

{
  *(int *)(param_1 + 0x354) = *(int *)(param_1 + 0x354) + 1;
  FUN_14005a5b0(param_1 + -8,*param_4,param_2,param_5,param_6,*param_7,*param_8);
  return 1;
}



undefined8
FUN_1400541a0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined8 *param_7)

{
  *(int *)(param_1 + 0x358) = *(int *)(param_1 + 0x358) + 1;
  FUN_14005a6b0(param_1 + -8,*param_4,param_2,param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_1400541e0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x368) = *(int *)(param_1 + 0x368) + 1;
  FUN_140126750(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140054220(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x36c) = *(int *)(param_1 + 0x36c) + 1;
  FUN_140126830(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7);
  return 1;
}



undefined8
FUN_140054260(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8)

{
  *(int *)(param_1 + 0x370) = *(int *)(param_1 + 0x370) + 1;
  FUN_140126930(param_1 + -8,*param_4,param_2,*param_5,param_7,param_6,*param_8);
  return 1;
}



undefined8
FUN_1400542c0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x374) = *(int *)(param_1 + 0x374) + 1;
  FUN_140126a30(param_1 + -8,*param_4,param_2,*param_5,param_7,param_6);
  return 1;
}



undefined1 FUN_140054300(longlong param_1)

{
  *(int *)(param_1 + 0x378) = *(int *)(param_1 + 0x378) + 1;
  FUN_140123190(param_1 + -8);
  return 1;
}



undefined1 FUN_140054320(longlong param_1)

{
  *(int *)(param_1 + 0x37c) = *(int *)(param_1 + 0x37c) + 1;
  FUN_140123350(param_1 + -8);
  return 1;
}



undefined8
FUN_140054340(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x3b4) = *(int *)(param_1 + 0x3b4) + 1;
  FUN_140125380(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_140054380(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined2 *param_7)

{
  *(int *)(param_1 + 0x3b8) = *(int *)(param_1 + 0x3b8) + 1;
  FUN_140126b30(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_1400543d0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined2 *param_7)

{
  *(int *)(param_1 + 0x3bc) = *(int *)(param_1 + 0x3bc) + 1;
  FUN_140126c20(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_140054420(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined2 *param_7)

{
  *(int *)(param_1 + 0x3c0) = *(int *)(param_1 + 0x3c0) + 1;
  FUN_140126d10(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_140054470(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined2 *param_7)

{
  *(int *)(param_1 + 0x3c4) = *(int *)(param_1 + 0x3c4) + 1;
  FUN_140126e00(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_1400544c0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined2 *param_7)

{
  *(int *)(param_1 + 0x3c8) = *(int *)(param_1 + 0x3c8) + 1;
  FUN_140126ef0(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_140054510(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined2 *param_7)

{
  *(int *)(param_1 + 0x3cc) = *(int *)(param_1 + 0x3cc) + 1;
  FUN_140126fe0(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_140054560(longlong param_1,undefined8 param_2,undefined8 param_3,longlong *param_4,
             undefined4 *param_5)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x3d0) = *(int *)(param_1 + 0x3d0) + 1;
  puVar1 = (undefined *)*param_4;
  if ((undefined *)*param_4 == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  FUN_140057e30(param_1 + -8,puVar1,*param_5);
  return 1;
}



undefined8
FUN_140054590(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x3d4) = *(int *)(param_1 + 0x3d4) + 1;
  FUN_1401270d0(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_1400545d0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7,longlong *param_8,
             longlong *param_9,undefined4 *param_10,undefined4 *param_11,undefined4 *param_12,
             undefined4 *param_13,undefined4 *param_14,undefined8 param_15)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined *puVar3;
  
  *(int *)(param_1 + 0x3d8) = *(int *)(param_1 + 0x3d8) + 1;
  puVar3 = (undefined *)*param_9;
  if ((undefined *)*param_9 == (undefined *)0x0) {
    puVar3 = PTR_DAT_1403200a0;
  }
  puVar2 = (undefined *)*param_8;
  if ((undefined *)*param_8 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_14012df00(param_1 + -8,*param_4,param_2,*param_5,param_6,puVar1,puVar2,puVar3,*param_10,
                *param_11,*param_12,*param_13,*param_14,param_15);
  return 1;
}



undefined8
FUN_1400546c0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x3dc) = *(int *)(param_1 + 0x3dc) + 1;
  FUN_14012e110(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140054700(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,longlong *param_8,
             undefined4 *param_9,longlong *param_10)

{
  undefined *puVar1;
  undefined *puVar2;
  
  *(int *)(param_1 + 0x380) = *(int *)(param_1 + 0x380) + 1;
  puVar2 = (undefined *)*param_10;
  if ((undefined *)*param_10 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_8;
  if ((undefined *)*param_8 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140129c10(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,puVar1,*param_9,puVar2);
  return 1;
}



undefined8
FUN_1400547a0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 900) = *(int *)(param_1 + 900) + 1;
  FUN_140129d60(param_1 + -8,*param_4,param_2,param_5);
  return 1;
}



undefined8
FUN_1400547d0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8,
             undefined4 *param_9,undefined4 *param_10)

{
  *(int *)(param_1 + 0x388) = *(int *)(param_1 + 0x388) + 1;
  FUN_140129e30(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,*param_8,*param_9,*param_10);
  return 1;
}



undefined8
FUN_140054850(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7,undefined1 *param_8)

{
  *(int *)(param_1 + 0x578) = *(int *)(param_1 + 0x578) + 1;
  FUN_140129f50(param_1 + -8,*param_4,param_2,param_5,param_6,*param_7,*param_8);
  return 1;
}



undefined8
FUN_1400548b0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x57c) = *(int *)(param_1 + 0x57c) + 1;
  FUN_14012a090(param_1 + -8,*param_4,param_2,param_5);
  return 1;
}



undefined8
FUN_1400548e0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x38c) = *(int *)(param_1 + 0x38c) + 1;
  FUN_14012a990(param_1 + -8,*param_4,param_2,param_5);
  return 1;
}



undefined8
FUN_140054910(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined8 *param_7,undefined4 *param_8,
             undefined1 *param_9)

{
  *(int *)(param_1 + 0x390) = *(int *)(param_1 + 0x390) + 1;
  FUN_14012aa60(param_1 + -8,*param_4,param_2,param_5,*param_6,*param_7,*param_8,*param_9);
  return 1;
}



undefined8
FUN_140054980(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x394) = *(int *)(param_1 + 0x394) + 1;
  FUN_14012a160(param_1 + -8,*param_4,param_2,param_5);
  return 1;
}



undefined8
FUN_1400549b0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x398) = *(int *)(param_1 + 0x398) + 1;
  FUN_14012a7b0(param_1 + -8,*param_4,param_2,param_5);
  return 1;
}



undefined8
FUN_1400549e0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7)

{
  *(int *)(param_1 + 0x39c) = *(int *)(param_1 + 0x39c) + 1;
  FUN_14012a3b0(param_1 + -8,*param_4,param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_140054a20(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7)

{
  *(int *)(param_1 + 0x3a0) = *(int *)(param_1 + 0x3a0) + 1;
  FUN_14012a4a0(param_1 + -8,*param_4,param_5,param_6,*param_7);
  return 1;
}



undefined8
FUN_140054a60(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8,
             undefined8 param_9)

{
  *(int *)(param_1 + 0x3a4) = *(int *)(param_1 + 0x3a4) + 1;
  FUN_14012a590(param_1 + -8,*param_4,param_5,param_6,param_7,*param_8,param_9);
  return 1;
}



undefined8
FUN_140054ac0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x3a8) = *(int *)(param_1 + 0x3a8) + 1;
  FUN_14012a6d0(param_1 + -8,*param_4,param_5,param_6);
  return 1;
}



undefined8
FUN_140054af0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8)

{
  *(int *)(param_1 + 0x3ac) = *(int *)(param_1 + 0x3ac) + 1;
  FUN_14012a880(param_1 + -8,*param_4,param_5,param_6,param_7,*param_8);
  return 1;
}



undefined8
FUN_140054b30(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined1 *param_6,longlong *param_7,longlong *param_8,
             longlong *param_9)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined *puVar3;
  
  *(int *)(param_1 + 0x3b0) = *(int *)(param_1 + 0x3b0) + 1;
  puVar3 = (undefined *)*param_9;
  if ((undefined *)*param_9 == (undefined *)0x0) {
    puVar3 = PTR_DAT_1403200a0;
  }
  puVar2 = (undefined *)*param_8;
  if ((undefined *)*param_8 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_14012a230(param_1 + -8,*param_4,param_5,*param_6,puVar1,puVar2,puVar3);
  return 1;
}



undefined8
FUN_140054bb0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x3e4) = *(int *)(param_1 + 0x3e4) + 1;
  FUN_1401271b0(param_1 + -8,*param_4,param_5,*param_6);
  return 1;
}



undefined8
FUN_140054be0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5)

{
  *(int *)(param_1 + 1000) = *(int *)(param_1 + 1000) + 1;
  FUN_140057d80(param_1 + -8,*param_4,*param_5);
  return 1;
}



undefined8
FUN_140054c10(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x3ec) = *(int *)(param_1 + 0x3ec) + 1;
  FUN_140127280(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140054c50(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x3f0) = *(int *)(param_1 + 0x3f0) + 1;
  FUN_140127360(param_1 + -8,*param_4,param_2,param_5,param_6);
  return 1;
}



undefined8
FUN_140054c90(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x3f4) = *(int *)(param_1 + 0x3f4) + 1;
  FUN_140127470(param_1 + -8,*param_4,param_2,param_5,param_6);
  return 1;
}



undefined8
FUN_140054cd0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x3f8) = *(int *)(param_1 + 0x3f8) + 1;
  FUN_140127580(param_1 + -8,*param_4,param_2,param_5,param_6);
  return 1;
}



undefined8
FUN_140054d10(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x3fc) = *(int *)(param_1 + 0x3fc) + 1;
  FUN_140127670(param_1 + -8,*param_4,param_2,param_5,param_6);
  return 1;
}



undefined8
FUN_140054d50(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8,
             undefined4 *param_9)

{
  *(int *)(param_1 + 0x400) = *(int *)(param_1 + 0x400) + 1;
  FUN_14012ab60(param_1 + -8,*param_4,param_5,param_6,*param_8,*param_9);
  return 1;
}



undefined8
FUN_140054da0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined1 *param_7,undefined4 *param_8,
             undefined4 *param_9,undefined4 *param_10)

{
  *(int *)(param_1 + 0x400) = *(int *)(param_1 + 0x400) + 1;
  FUN_14012ac60(param_1 + -8,*param_4,param_5,param_6,*param_7,*param_8,*param_9,*param_10);
  return 1;
}



undefined8
FUN_140054e10(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x40c) = *(int *)(param_1 + 0x40c) + 1;
  FUN_14012c8d0(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140054e50(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7,undefined8 param_8,
             undefined4 *param_9)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x410) = *(int *)(param_1 + 0x410) + 1;
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_14012c9b0(param_1 + -8,*param_4,param_2,*param_5,param_6,puVar1,param_8,*param_9);
  return 1;
}



undefined8
FUN_140054ec0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x414) = *(int *)(param_1 + 0x414) + 1;
  FUN_14012cca0(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7);
  FUN_14012c8d0(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140054f50(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined2 *param_5,undefined2 *param_6)

{
  *(int *)(param_1 + 0x2ac) = *(int *)(param_1 + 0x2ac) + 1;
  FUN_1401289a0(param_1 + -8,*param_4,param_2,*param_5,*param_6);
  return 1;
}



undefined1
FUN_140054f90(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x41c) = *(int *)(param_1 + 0x41c) + 1;
  FUN_140057f30(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_140054fc0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x420) = *(int *)(param_1 + 0x420) + 1;
  FUN_140058060(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_140054ff0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x424) = *(int *)(param_1 + 0x424) + 1;
  FUN_140058170(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_140055020(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x428) = *(int *)(param_1 + 0x428) + 1;
  FUN_140058280(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_140055050(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x494) = *(int *)(param_1 + 0x494) + 1;
  FUN_1400584b0(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_140055080(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x498) = *(int *)(param_1 + 0x498) + 1;
  FUN_1400583a0(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1 FUN_1400550b0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *(int *)(param_1 + 0x49c) = *(int *)(param_1 + 0x49c) + 1;
  FUN_1400585c0(param_1 + -8,param_4);
  return 1;
}



undefined1 FUN_1400550d0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *(int *)(param_1 + 0x4a0) = *(int *)(param_1 + 0x4a0) + 1;
  FUN_140058730(param_1 + -8,param_4);
  return 1;
}



undefined1 FUN_1400550f0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *(int *)(param_1 + 0x4a4) = *(int *)(param_1 + 0x4a4) + 1;
  FUN_140058840(param_1 + -8,param_4);
  return 1;
}



undefined1 FUN_140055110(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *(int *)(param_1 + 0x4a8) = *(int *)(param_1 + 0x4a8) + 1;
  FUN_140058960(param_1 + -8,param_4);
  return 1;
}



undefined1 FUN_140055130(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *(int *)(param_1 + 0x4ac) = *(int *)(param_1 + 0x4ac) + 1;
  FUN_140058a30(param_1 + -8,param_4);
  return 1;
}



undefined8
FUN_140055150(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined8 param_7,undefined1 *param_8)

{
  *(int *)(param_1 + 0x42c) = *(int *)(param_1 + 0x42c) + 1;
  FUN_140123450(param_1 + -8,*param_4,param_5,*param_6,param_7,*param_8);
  return 1;
}



undefined8
FUN_1400551a0(longlong param_1,undefined8 param_2,undefined8 param_3,longlong *param_4,
             undefined1 *param_5)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x454) = *(int *)(param_1 + 0x454) + 1;
  puVar1 = (undefined *)*param_4;
  if ((undefined *)*param_4 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_1401239a0(param_1 + -8,puVar1,*param_5);
  return 1;
}



undefined8
FUN_1400551e0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8,
             undefined8 param_9)

{
  *(int *)(param_1 + 0x458) = *(int *)(param_1 + 0x458) + 1;
  FUN_14005a8f0(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,*param_8,param_9);
  return 1;
}



undefined8
FUN_140055240(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x45c) = *(int *)(param_1 + 0x45c) + 1;
  FUN_14005aa30(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140055280(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8,
             undefined4 *param_9,undefined4 *param_10)

{
  *(int *)(param_1 + 0x460) = *(int *)(param_1 + 0x460) + 1;
  FUN_14005ab10(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7,param_8,*param_9,*param_10);
  return 1;
}



undefined8
FUN_140055300(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined4 *param_7)

{
  *(int *)(param_1 + 0x470) = *(int *)(param_1 + 0x470) + 1;
  FUN_140123a70(param_1 + -8,*param_4,param_5,*param_6,*param_7);
  return 1;
}



undefined1
FUN_140055340(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x474) = *(int *)(param_1 + 0x474) + 1;
  FUN_140127890(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined8
FUN_140055370(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x464) = *(int *)(param_1 + 0x464) + 1;
  FUN_14005ac50(param_1 + -8,*param_4,param_2,*param_5,param_6,param_7);
  return 1;
}



undefined8
FUN_1400553b0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x478) = *(int *)(param_1 + 0x478) + 1;
  FUN_14005ad50(param_1 + -8,*param_4,param_2,param_6,param_5,param_7);
  return 1;
}



undefined8
FUN_1400553f0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined1 *param_7)

{
  *(int *)(param_1 + 0x468) = *(int *)(param_1 + 0x468) + 1;
  FUN_14005ae70(param_1 + -8,*param_4,param_2,param_6,*param_7);
  return 1;
}



undefined8
FUN_140055430(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7,undefined4 *param_8,
             undefined4 *param_9,undefined4 *param_10,undefined4 *param_11,undefined4 *param_12,
             undefined4 *param_13,undefined4 *param_14,undefined4 *param_15)

{
  *(int *)(param_1 + 0x46c) = *(int *)(param_1 + 0x46c) + 1;
  FUN_14005af50(param_1 + -8,*param_4,param_2,param_6,*param_7,*param_8,*param_9,*param_10,*param_11
                ,*param_12,*param_13,*param_14,*param_15);
  return 1;
}



undefined1
FUN_1400554f0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x47c) = *(int *)(param_1 + 0x47c) + 1;
  FUN_14012ad70(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_140055520(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x580) = *(int *)(param_1 + 0x580) + 1;
  FUN_14012ae80(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined8 FUN_140055550(longlong param_1)

{
  void *in_stack_00000028;
  undefined1 local_2c8 [704];
  
  *(int *)(param_1 + 0x438) = *(int *)(param_1 + 0x438) + 1;
  memcpy(local_2c8,in_stack_00000028,0x2b1);
  FUN_140123580(param_1 + -8,local_2c8);
  return 1;
}



undefined8
FUN_1400555a0(longlong param_1,undefined8 param_2,undefined8 param_3,longlong *param_4,
             undefined1 *param_5,longlong *param_6,undefined8 param_7,undefined8 param_8,
             longlong *param_9)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined *puVar3;
  
  *(int *)(param_1 + 0x43c) = *(int *)(param_1 + 0x43c) + 1;
  puVar3 = (undefined *)*param_9;
  if ((undefined *)*param_9 == (undefined *)0x0) {
    puVar3 = PTR_DAT_140320098;
  }
  puVar2 = (undefined *)*param_6;
  if ((undefined *)*param_6 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_4;
  if ((undefined *)*param_4 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140123660(param_1 + -8,param_2,puVar1,*param_5,puVar2,puVar3,param_7,param_8);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140055620(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 *param_4)

{
  undefined1 auStack_58 [32];
  undefined2 local_38;
  undefined2 local_36;
  undefined8 local_34;
  undefined2 local_2c;
  undefined8 local_2a;
  undefined8 local_22;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  *(int *)(param_1 + 0x434) = *(int *)(param_1 + 0x434) + 1;
  local_2c = 0;
  local_34 = 0;
  local_36 = 0x4d2;
  local_38 = 0x1e;
  local_2a = *param_4;
  local_22 = param_4[1];
  FUN_1400ca580(*(undefined8 *)(param_1 + 0xd8),&local_38);
  return 1;
}



undefined8 FUN_140055690(longlong param_1)

{
  undefined *puVar1;
  undefined8 in_stack_00000028;
  undefined1 *in_stack_00000030;
  longlong *in_stack_00000038;
  
  *(int *)(param_1 + 0x440) = *(int *)(param_1 + 0x440) + 1;
  puVar1 = (undefined *)*in_stack_00000038;
  if ((undefined *)*in_stack_00000038 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_1401237e0(param_1 + -8,in_stack_00000028,*in_stack_00000030,puVar1);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8
FUN_1400556d0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 *param_4,
             undefined1 *param_5)

{
  undefined1 auStack_58 [32];
  undefined2 local_38;
  undefined2 local_36;
  undefined8 local_34;
  undefined2 local_2c;
  undefined8 local_2a;
  undefined8 local_22;
  undefined1 local_1a;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  *(int *)(param_1 + 0x444) = *(int *)(param_1 + 0x444) + 1;
  local_36 = 0x4d3;
  local_2c = 0;
  local_38 = 0x1f;
  local_2a = *param_4;
  local_34 = 0;
  local_22 = param_4[1];
  local_1a = *param_5;
  FUN_1400cacd0(*(undefined8 *)(param_1 + 0xd8),&local_38);
  return 1;
}



undefined1 FUN_140055750(longlong param_1)

{
  *(int *)(param_1 + 0x448) = *(int *)(param_1 + 0x448) + 1;
  FUN_1401238a0(param_1 + -8);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140055770(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 *param_4)

{
  undefined1 auStack_58 [32];
  undefined2 local_38;
  undefined2 local_36;
  undefined8 local_34;
  undefined2 local_2c;
  undefined8 local_2a;
  undefined8 local_22;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  *(int *)(param_1 + 0x44c) = *(int *)(param_1 + 0x44c) + 1;
  local_2c = 0;
  local_34 = 0;
  local_36 = 0x4d4;
  local_38 = 0x1e;
  local_2a = *param_4;
  local_22 = param_4[1];
  FUN_1400cb090(*(undefined8 *)(param_1 + 0xd8),&local_38);
  return 1;
}



undefined8
FUN_1400557e0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7,undefined4 *param_8,
             undefined4 *param_9,undefined4 *param_10,undefined4 *param_11,undefined4 *param_12,
             undefined4 *param_13)

{
  *(int *)(param_1 + 0x480) = *(int *)(param_1 + 0x480) + 1;
  FUN_14005a7a0(param_1 + -8,*param_4,param_2,param_5,param_6,*param_7,*param_8,*param_9,*param_10,
                *param_11,*param_12,*param_13);
  return 1;
}



undefined8
FUN_140055890(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7,undefined4 *param_8,
             undefined4 *param_9)

{
  *(int *)(param_1 + 0x484) = *(int *)(param_1 + 0x484) + 1;
  FUN_14012b110(param_1 + -8,*param_4,param_5,param_6,*param_7,*param_8,*param_9);
  return 1;
}



undefined1
FUN_1400558f0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x490) = *(int *)(param_1 + 0x490) + 1;
  FUN_14012afe0(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined8
FUN_140055920(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined1 *param_6)

{
  *(int *)(param_1 + 0x4b0) = *(int *)(param_1 + 0x4b0) + 1;
  FUN_140127a40(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined1
FUN_140055960(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x4b4) = *(int *)(param_1 + 0x4b4) + 1;
  FUN_140058b40(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_140055990(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x4b8) = *(int *)(param_1 + 0x4b8) + 1;
  FUN_140058c80(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_1400559c0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x4bc) = *(int *)(param_1 + 0x4bc) + 1;
  FUN_140058df0(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_1400559f0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x4c0) = *(int *)(param_1 + 0x4c0) + 1;
  FUN_140058f30(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_140055a20(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x4c4) = *(int *)(param_1 + 0x4c4) + 1;
  FUN_140059060(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_140055a50(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x4c8) = *(int *)(param_1 + 0x4c8) + 1;
  FUN_140059170(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined8 FUN_140055a80(longlong param_1,undefined4 param_2)

{
  *(int *)(param_1 + 0x4cc) = *(int *)(param_1 + 0x4cc) + 1;
  printf("REQ_CONNECTION_TEST [ %d ]\n");
  (**(code **)(*(longlong *)(param_1 + 0xa0) + 0x3b0))
            ((longlong *)(param_1 + 0xa0),param_2,&DAT_1403200f0,param_1 + 0x88,param_1 + 0x90);
  return 1;
}



undefined1
FUN_140055ae0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x4d4) = *(int *)(param_1 + 0x4d4) + 1;
  FUN_140059280(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_140055b10(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x4d8) = *(int *)(param_1 + 0x4d8) + 1;
  FUN_140059390(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_140055b40(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x4dc) = *(int *)(param_1 + 0x4dc) + 1;
  FUN_1400594a0(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1 FUN_140055b70(longlong param_1)

{
  *(int *)(param_1 + 0x4e4) = *(int *)(param_1 + 0x4e4) + 1;
  FUN_140123b50(param_1 + -8);
  return 1;
}



undefined8
FUN_140055b90(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  undefined4 local_18;
  undefined4 local_14;
  undefined4 local_10;
  
  *(int *)(param_1 + 0x4ec) = *(int *)(param_1 + 0x4ec) + 1;
  local_18 = *param_6;
  local_14 = param_6[1];
  local_10 = param_6[2];
  FUN_140127b20(param_1 + -8,*param_4,param_5,&local_18);
  return 1;
}



undefined8
FUN_140055be0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  undefined4 local_18;
  undefined4 local_14;
  undefined4 local_10;
  
  *(int *)(param_1 + 0x4f0) = *(int *)(param_1 + 0x4f0) + 1;
  local_18 = *param_6;
  local_14 = param_6[1];
  local_10 = param_6[2];
  FUN_140127c10(param_1 + -8,*param_4,param_5,&local_18);
  return 1;
}



undefined8
FUN_140055c30(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  undefined4 local_18;
  undefined4 local_14;
  undefined4 local_10;
  
  *(int *)(param_1 + 0x4f4) = *(int *)(param_1 + 0x4f4) + 1;
  local_18 = *param_6;
  local_14 = param_6[1];
  local_10 = param_6[2];
  FUN_140127d00(param_1 + -8,*param_4,param_5,&local_18);
  return 1;
}



undefined8
FUN_140055c80(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x4f8) = *(int *)(param_1 + 0x4f8) + 1;
  FUN_140127df0(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8
FUN_140055cc0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             undefined8 *param_5,undefined4 *param_6)

{
  undefined1 auStack_58 [32];
  undefined2 local_38;
  undefined2 local_36;
  undefined4 local_34;
  undefined4 local_30;
  undefined2 local_2c;
  undefined8 local_2a;
  undefined8 local_22;
  undefined4 local_1a;
  ulonglong local_10;
  
  local_10 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  *(int *)(param_1 + 0x500) = *(int *)(param_1 + 0x500) + 1;
  local_36 = 0x4f7;
  local_38 = 0x22;
  local_2a = *param_5;
  local_22 = param_5[1];
  local_2c = 0;
  local_1a = *param_6;
  local_34 = 0;
  local_30 = param_2;
  FUN_1400ceb50(*(undefined8 *)(param_1 + 0xd8),&local_38);
  return 1;
}



undefined8
FUN_140055d50(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             longlong *param_5,longlong *param_6,longlong *param_7,undefined4 *param_8,
             undefined4 *param_9,undefined4 *param_10,undefined8 param_11,undefined4 *param_12)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined *puVar3;
  
  *(int *)(param_1 + 0x504) = *(int *)(param_1 + 0x504) + 1;
  puVar3 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar3 = PTR_DAT_1403200a0;
  }
  puVar2 = (undefined *)*param_6;
  if ((undefined *)*param_6 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_5;
  if ((undefined *)*param_5 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_14012e1f0(param_1 + -8,*param_4,param_2,puVar1,puVar2,puVar3,*param_8,*param_9,*param_10,
                param_11,*param_12);
  return 1;
}



undefined8
FUN_140055e10(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,longlong *param_7)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x508) = *(int *)(param_1 + 0x508) + 1;
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140127ed0(param_1 + -8,*param_4,param_2,*param_5,param_6,puVar1);
  return 1;
}



undefined1 FUN_140055e60(longlong param_1)

{
  *(int *)(param_1 + 0x50c) = *(int *)(param_1 + 0x50c) + 1;
  FUN_140123c20(param_1 + -8);
  return 1;
}



undefined8
FUN_140055e80(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined8 param_7,longlong *param_8,
             longlong *param_9,longlong *param_10,undefined4 *param_11,longlong *param_12,
             undefined8 *param_13)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined *puVar3;
  undefined *puVar4;
  
  *(int *)(param_1 + 0x510) = *(int *)(param_1 + 0x510) + 1;
  puVar4 = (undefined *)*param_12;
  if ((undefined *)*param_12 == (undefined *)0x0) {
    puVar4 = PTR_DAT_1403200a0;
  }
  puVar3 = (undefined *)*param_10;
  if ((undefined *)*param_10 == (undefined *)0x0) {
    puVar3 = PTR_DAT_1403200a0;
  }
  puVar2 = (undefined *)*param_9;
  if ((undefined *)*param_9 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_8;
  if ((undefined *)*param_8 == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  FUN_140123cf0(param_1 + -8,param_2,*param_4,*param_5,param_6,param_7,puVar1,puVar2,puVar3,
                *param_11,puVar4,*param_13);
  return 1;
}



undefined8
FUN_140055f60(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
             longlong *param_5)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x514) = *(int *)(param_1 + 0x514) + 1;
  puVar1 = (undefined *)*param_5;
  if ((undefined *)*param_5 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140123ef0(param_1 + -8,param_2,param_4,puVar1);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8
FUN_140055f90(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 *param_4,
             undefined4 *param_5)

{
  undefined1 auStack_58 [32];
  undefined2 local_38;
  undefined2 local_36;
  undefined4 local_34;
  undefined4 local_30;
  undefined2 local_2c;
  undefined8 local_2a;
  undefined8 local_22;
  undefined4 local_1a;
  ulonglong local_10;
  
  local_10 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  *(int *)(param_1 + 0x518) = *(int *)(param_1 + 0x518) + 1;
  local_36 = 0x505;
  local_38 = 0x22;
  local_2a = *param_4;
  local_2c = 0;
  local_22 = param_4[1];
  local_34 = 0;
  local_1a = *param_5;
  local_30 = param_2;
  FUN_1400d22f0(*(undefined8 *)(param_1 + 0xd8),&local_38);
  return 1;
}



undefined1
FUN_140056020(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x51c) = *(int *)(param_1 + 0x51c) + 1;
  FUN_1400597e0(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined1
FUN_140056050(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x520) = *(int *)(param_1 + 0x520) + 1;
  FUN_1400596a0(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined8
FUN_140056080(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined1 *param_6)

{
  *(int *)(param_1 + 0x524) = *(int *)(param_1 + 0x524) + 1;
  FUN_140126670(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_1400560c0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined2 *param_5,undefined2 *param_6)

{
  *(int *)(param_1 + 0x528) = *(int *)(param_1 + 0x528) + 1;
  FUN_140128090(param_1 + -8,*param_4,param_2,*param_5,*param_6);
  return 1;
}



undefined8
FUN_140056100(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined2 *param_5,undefined2 *param_6,longlong *param_7,longlong *param_8,
             longlong *param_9,undefined2 *param_10,void *param_11,undefined2 *param_12,
             undefined2 *param_13,undefined2 *param_14,undefined2 *param_15)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined *puVar3;
  undefined1 local_e8 [224];
  
  *(int *)(param_1 + 0x52c) = *(int *)(param_1 + 0x52c) + 1;
  memcpy(local_e8,param_11,0xd4);
  puVar3 = (undefined *)*param_9;
  if ((undefined *)*param_9 == (undefined *)0x0) {
    puVar3 = PTR_DAT_1403200a0;
  }
  puVar2 = (undefined *)*param_8;
  if ((undefined *)*param_8 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  puVar1 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140128160(param_1 + -8,*param_4,param_2,*param_5,*param_6,puVar1,puVar2,puVar3,*param_10,
                local_e8,*param_12,*param_14,*param_13,*param_15);
  return 1;
}



undefined1
FUN_140056220(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x534) = *(int *)(param_1 + 0x534) + 1;
  FUN_1400595b0(param_1 + -8,*param_4,param_5);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8
FUN_140056250(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 *param_4,
             undefined4 *param_5)

{
  undefined1 auStack_58 [32];
  undefined2 local_38;
  undefined2 local_36;
  undefined4 local_34;
  undefined4 local_30;
  undefined2 local_2c;
  undefined8 local_2a;
  undefined8 local_22;
  undefined4 local_1a;
  ulonglong local_10;
  
  local_10 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  *(int *)(param_1 + 0x538) = *(int *)(param_1 + 0x538) + 1;
  local_36 = 0x50d;
  local_38 = 0x22;
  local_2a = *param_4;
  local_2c = 0;
  local_22 = param_4[1];
  local_34 = 0;
  local_1a = *param_5;
  local_30 = param_2;
  FUN_1400d4b50(*(undefined8 *)(param_1 + 0xd8),&local_38);
  return 1;
}



undefined8
FUN_1400562e0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x53c) = *(int *)(param_1 + 0x53c) + 1;
  FUN_140124130(param_1 + -8,*param_4,param_5,*param_6);
  return 1;
}



undefined1
FUN_140056310(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x540) = *(int *)(param_1 + 0x540) + 1;
  FUN_1400598f0(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined8
FUN_140056340(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined2 *param_5)

{
  *(int *)(param_1 + 0x544) = *(int *)(param_1 + 0x544) + 1;
  FUN_14012b230(param_1 + -8,*param_4,param_2,*param_5);
  return 1;
}



undefined8
FUN_140056370(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined2 *param_5)

{
  *(int *)(param_1 + 0x548) = *(int *)(param_1 + 0x548) + 1;
  FUN_14012b2f0(param_1 + -8,*param_4,param_2,*param_5);
  return 1;
}



undefined8
FUN_1400563a0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined8 *param_7,undefined8 *param_8,
             undefined2 *param_9,undefined2 *param_10)

{
  undefined8 local_48;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined8 local_2a;
  undefined8 local_22;
  undefined2 local_1a;
  undefined2 local_18;
  
  *(int *)(param_1 + 0x54c) = *(int *)(param_1 + 0x54c) + 1;
  local_48 = 0;
  local_40 = 0;
  local_3c = 0;
  local_3a = *param_7;
  local_32 = param_7[1];
  local_2a = *param_8;
  local_22 = param_8[1];
  local_1a = *param_9;
  local_18 = *param_10;
  FUN_14012b3b0(param_1 + -8,*param_4,param_2,*param_6,&local_48);
  return 1;
}



undefined1
FUN_140056450(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5)

{
  *(int *)(param_1 + 0x550) = *(int *)(param_1 + 0x550) + 1;
  FUN_140059a30(param_1 + -8,*param_4,param_5);
  return 1;
}



undefined8
FUN_140056480(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x554) = *(int *)(param_1 + 0x554) + 1;
  FUN_140128350(param_1 + -8,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_1400564b0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x558) = *(int *)(param_1 + 0x558) + 1;
  FUN_140128440(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_1400564f0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x55c) = *(int *)(param_1 + 0x55c) + 1;
  FUN_14012cda0(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140056530(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x560) = *(int *)(param_1 + 0x560) + 1;
  FUN_14012ce80(param_1 + -8,*param_4,param_2,param_5,param_6);
  return 1;
}



undefined8
FUN_140056570(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6,undefined8 param_7)

{
  *(int *)(param_1 + 0x564) = *(int *)(param_1 + 0x564) + 1;
  FUN_14012cf80(param_1 + -8,*param_4,param_2,param_5,*param_6,param_7);
  return 1;
}



undefined8
FUN_1400565b0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x568) = *(int *)(param_1 + 0x568) + 1;
  FUN_14012d090(param_1 + -8,*param_4,param_2,param_5,param_6);
  return 1;
}



undefined8
FUN_1400565f0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6)

{
  *(int *)(param_1 + 0x56c) = *(int *)(param_1 + 0x56c) + 1;
  FUN_14012f170(param_1 + -8,*param_4,param_2,*param_5,param_6);
  return 1;
}



undefined8
FUN_140056630(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,undefined4 *param_7,undefined4 *param_8,
             undefined4 *param_9)

{
  *(int *)(param_1 + 0x570) = *(int *)(param_1 + 0x570) + 1;
  FUN_14012d260(param_1 + -8,*param_4,param_2,*param_5,param_6,*param_7,*param_8,*param_9);
  return 1;
}



undefined8
FUN_1400566a0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  *(int *)(param_1 + 0x574) = *(int *)(param_1 + 0x574) + 1;
  FUN_14012d360(param_1 + -8,*param_4,param_2,param_5,*param_6);
  return 1;
}



undefined8
FUN_1400566e0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
             longlong *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined *puVar1;
  
  *(int *)(param_1 + 0x58c) = *(int *)(param_1 + 0x58c) + 1;
  puVar1 = (undefined *)*param_5;
  if ((undefined *)*param_5 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140059bb0(param_1 + -8,param_7,param_4,puVar1,param_6);
  return 1;
}



undefined8
FUN_140056720(longlong param_1,undefined8 param_2,undefined8 param_3,undefined2 *param_4,
             longlong *param_5,undefined8 param_6,longlong *param_7,undefined4 *param_8,
             longlong *param_9,longlong *param_10,longlong *param_11)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined *puVar3;
  undefined *puVar4;
  undefined *puVar5;
  
  *(int *)(param_1 + 0x590) = *(int *)(param_1 + 0x590) + 1;
  puVar2 = (undefined *)*param_11;
  if ((undefined *)*param_11 == (undefined *)0x0) {
    puVar2 = PTR_DAT_140320098;
  }
  puVar5 = (undefined *)*param_10;
  if ((undefined *)*param_10 == (undefined *)0x0) {
    puVar5 = PTR_DAT_140320098;
  }
  puVar1 = (undefined *)*param_9;
  if ((undefined *)*param_9 == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  puVar4 = (undefined *)*param_7;
  if ((undefined *)*param_7 == (undefined *)0x0) {
    puVar4 = PTR_DAT_1403200a0;
  }
  puVar3 = (undefined *)*param_5;
  if ((undefined *)*param_5 == (undefined *)0x0) {
    puVar3 = PTR_DAT_140320098;
  }
  FUN_1401223c0(param_1 + -8,*param_4,puVar3,puVar4,*param_8,puVar1,puVar5,puVar2);
  return 1;
}



undefined8
FUN_1400567d0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined2 *param_4,
             undefined4 *param_5,undefined8 param_6,int *param_7)

{
  *(int *)(param_1 + 0x594) = *(int *)(param_1 + 0x594) + 1;
  FUN_140128520(param_1 + -8,*param_4,param_2,param_6,*param_7);
  if (*param_7 == 1) {
    FUN_14012f170(param_1 + -8,*param_4,param_2,*param_5,param_6);
  }
  return 1;
}



uint * FUN_140056860(longlong param_1,uint *param_2)

{
  uint uVar1;
  uint uVar2;
  longlong lVar3;
  ulonglong uVar4;
  char cVar5;
  uint *puVar6;
  
  uVar1 = *param_2;
  uVar2 = *(uint *)(param_1 + 0x28);
  lVar3 = *(longlong *)(param_1 + 8);
  uVar4 = (ulonglong)uVar1 % (ulonglong)uVar2;
  if (lVar3 != 0) {
    for (puVar6 = *(uint **)(lVar3 + uVar4 * 8);
        (puVar6 != (uint *)0x0 && ((uint)uVar4 == puVar6[8] % uVar2));
        puVar6 = *(uint **)(puVar6 + 4)) {
      if (*puVar6 == uVar1) goto LAB_1400568fd;
    }
    if (lVar3 != 0) goto LAB_1400568d9;
  }
  cVar5 = FUN_1400459b0(param_1,(ulonglong)uVar2,CONCAT71((int7)((ulonglong)lVar3 >> 8),1));
  if (cVar5 == '\0') {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x8007000e);
  }
LAB_1400568d9:
  FUN_140045aa0(param_1);
  puVar6 = (uint *)FUN_140056920(param_1,param_2,uVar4,uVar1);
  FUN_140045aa0(param_1);
LAB_1400568fd:
  return puVar6 + 2;
}



undefined4 * FUN_140056920(longlong param_1,undefined4 *param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  undefined4 *puVar4;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar4 = (undefined4 *)FUN_140156940(0x28);
  }
  else {
    puVar4 = (undefined4 *)
             (**(code **)(*plVar1 + 8))(plVar1,0x28,param_3,param_4,0xfffffffffffffffe);
  }
  if (puVar4 != (undefined4 *)0x0) {
    *puVar4 = *param_2;
    *(undefined8 *)(puVar4 + 2) = 0;
    puVar4[8] = param_4;
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_140045aa0(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined4 **)(param_1 + 0x10) = puVar4;
    *(undefined4 **)(param_1 + 0x18) = puVar4;
    *(undefined8 *)(puVar4 + 6) = 0;
    *(undefined8 *)(puVar4 + 4) = 0;
  }
  else {
    FUN_140045aa0(param_1);
    FUN_140045aa0(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      *(undefined8 *)(puVar4 + 6) = 0;
      *(longlong *)(puVar4 + 4) = lVar2;
      if (lVar2 != 0) {
        *(undefined4 **)(lVar2 + 0x18) = puVar4;
      }
      *(undefined4 **)(param_1 + 0x10) = puVar4;
    }
    else {
      if (*(longlong *)(lVar2 + 0x18) == 0) {
        *(undefined4 **)(param_1 + 0x10) = puVar4;
      }
      else {
        *(undefined4 **)(*(longlong *)(lVar2 + 0x18) + 0x10) = puVar4;
      }
      *(undefined8 *)(puVar4 + 6) = *(undefined8 *)(lVar2 + 0x18);
      *(longlong *)(puVar4 + 4) = lVar2;
      *(undefined4 **)(lVar2 + 0x18) = puVar4;
    }
  }
  *(undefined4 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar4;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_140045aa0(param_1);
  FUN_140045aa0(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar3 = FUN_140045bd0(param_1);
    FUN_140045e00(param_1,uVar3);
  }
  FUN_140045aa0(param_1);
  return puVar4;
}



undefined8 * FUN_140056a70(undefined8 *param_1,ulonglong param_2,ulonglong param_3)

{
  longlong lVar1;
  code *pcVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  ulonglong uVar5;
  
  if ((ulonglong)param_1[2] < param_2) {
    std::_Xout_of_range("invalid string position");
    pcVar2 = (code *)swi(3);
    puVar3 = (undefined8 *)(*pcVar2)();
    return puVar3;
  }
  uVar5 = param_1[2] - param_2;
  if (uVar5 < param_3) {
    param_3 = uVar5;
  }
  if (param_3 != 0) {
    puVar4 = param_1;
    puVar3 = param_1;
    if (7 < (ulonglong)param_1[3]) {
      puVar4 = (undefined8 *)*param_1;
      puVar3 = (undefined8 *)*param_1;
    }
    memmove((void *)((longlong)puVar4 + param_2 * 2),
            (void *)((longlong)puVar3 + (param_2 + param_3) * 2),(uVar5 - param_3) * 2);
    lVar1 = param_1[2];
    param_1[2] = lVar1 - param_3;
    puVar3 = param_1;
    if (7 < (ulonglong)param_1[3]) {
      puVar3 = (undefined8 *)*param_1;
    }
    *(undefined2 *)((longlong)puVar3 + (lVar1 - param_3) * 2) = 0;
  }
  return param_1;
}



undefined8 *
FUN_140056b10(undefined8 *param_1,undefined8 *param_2,ulonglong param_3,ulonglong param_4)

{
  code *pcVar1;
  char cVar2;
  undefined8 *puVar3;
  ulonglong uVar4;
  
  if (param_3 <= (ulonglong)param_2[2]) {
    uVar4 = param_2[2] - param_3;
    if (param_4 < uVar4) {
      uVar4 = param_4;
    }
    if (param_1 == param_2) {
      FUN_140056a70(param_1,uVar4 + param_3,0xffffffffffffffff);
      FUN_140056a70(param_1,0,param_3);
    }
    else {
      cVar2 = FUN_140056d50(param_1,uVar4);
      if (cVar2 != '\0') {
        if (7 < (ulonglong)param_2[3]) {
          param_2 = (undefined8 *)*param_2;
        }
        puVar3 = param_1;
        if (7 < (ulonglong)param_1[3]) {
          puVar3 = (undefined8 *)*param_1;
        }
        memcpy(puVar3,(void *)((longlong)param_2 + param_3 * 2),uVar4 * 2);
        param_1[2] = uVar4;
        puVar3 = param_1;
        if (7 < (ulonglong)param_1[3]) {
          puVar3 = (undefined8 *)*param_1;
        }
        *(undefined2 *)((longlong)puVar3 + uVar4 * 2) = 0;
      }
    }
    return param_1;
  }
  std::_Xout_of_range("invalid string position");
  pcVar1 = (code *)swi(3);
  puVar3 = (undefined8 *)(*pcVar1)();
  return puVar3;
}



void * FUN_140056bf0(ulonglong param_1)

{
  void *pvVar1;
  char *local_res8 [4];
  undefined **local_28 [5];
  
  if (param_1 == 0) {
    return (void *)0x0;
  }
  if ((param_1 < 0x8000000000000000) && (pvVar1 = operator_new(param_1 * 2), pvVar1 != (void *)0x0))
  {
    return pvVar1;
  }
  local_res8[0] = (char *)0x0;
  std::exception::exception((exception *)local_28,local_res8);
  local_28[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_28,(ThrowInfo *)&DAT_14031d988);
}



void FUN_140056c60(undefined8 *param_1,ulonglong param_2,longlong param_3)

{
  ulonglong uVar1;
  undefined8 *_Dst;
  ulonglong uVar2;
  undefined8 *_Src;
  ulonglong uVar3;
  
  uVar3 = param_2 | 7;
  if (uVar3 < 0x7fffffffffffffff) {
    uVar1 = param_1[3];
    uVar2 = uVar1 >> 1;
    param_2 = uVar3;
    if ((uVar3 / 3 < uVar2) && (param_2 = uVar2 + uVar1, 0x7ffffffffffffffe - uVar2 < uVar1)) {
      param_2 = 0x7ffffffffffffffe;
    }
  }
  _Dst = (undefined8 *)FUN_140056bf0(param_2 + 1);
  if (param_3 != 0) {
    _Src = param_1;
    if (7 < (ulonglong)param_1[3]) {
      _Src = (undefined8 *)*param_1;
    }
    memcpy(_Dst,_Src,param_3 * 2);
  }
  if (7 < (ulonglong)param_1[3]) {
    operator_delete((void *)*param_1);
  }
  *param_1 = _Dst;
  param_1[3] = param_2;
  param_1[2] = param_3;
  if (7 < param_2) {
    param_1 = _Dst;
  }
  *(undefined2 *)((longlong)param_1 + param_3 * 2) = 0;
  return;
}



undefined1 FUN_140056d50(undefined8 *param_1,ulonglong param_2)

{
  code *pcVar1;
  undefined1 uVar2;
  
  if (0x7ffffffffffffffe < param_2) {
    std::_Xlength_error("string too long");
    pcVar1 = (code *)swi(3);
    uVar2 = (*pcVar1)();
    return uVar2;
  }
  if ((ulonglong)param_1[3] < param_2) {
    FUN_140056c60(param_1,param_2,param_1[2]);
    return param_2 != 0;
  }
  if (param_2 == 0) {
    param_1[2] = 0;
    if (7 < (ulonglong)param_1[3]) {
      param_1 = (undefined8 *)*param_1;
    }
    *(undefined2 *)param_1 = 0;
  }
  return param_2 != 0;
}



undefined8 * FUN_140056dd0(undefined8 *param_1,undefined8 *param_2,longlong param_3)

{
  ulonglong uVar1;
  char cVar2;
  undefined8 *puVar3;
  
  if (param_2 != (undefined8 *)0x0) {
    uVar1 = param_1[3];
    puVar3 = param_1;
    if (7 < uVar1) {
      puVar3 = (undefined8 *)*param_1;
    }
    if (puVar3 <= param_2) {
      puVar3 = param_1;
      if (7 < uVar1) {
        puVar3 = (undefined8 *)*param_1;
      }
      if (param_2 < (undefined8 *)((longlong)puVar3 + param_1[2] * 2)) {
        puVar3 = param_1;
        if (7 < uVar1) {
          puVar3 = (undefined8 *)*param_1;
        }
        puVar3 = (undefined8 *)
                 FUN_140056b10(param_1,param_1,(longlong)param_2 - (longlong)puVar3 >> 1,param_3);
        return puVar3;
      }
    }
  }
  cVar2 = FUN_140056d50(param_1,param_3);
  if (cVar2 != '\0') {
    puVar3 = param_1;
    if (7 < (ulonglong)param_1[3]) {
      puVar3 = (undefined8 *)*param_1;
    }
    memcpy(puVar3,param_2,param_3 * 2);
    param_1[2] = param_3;
    puVar3 = param_1;
    if (7 < (ulonglong)param_1[3]) {
      puVar3 = (undefined8 *)*param_1;
    }
    *(undefined2 *)(param_3 * 2 + (longlong)puVar3) = 0;
  }
  return param_1;
}



int FUN_140056ec0(longlong param_1,undefined4 param_2)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined4 local_14;
  undefined4 local_10;
  undefined4 local_c;
  
  local_16 = 0x471;
  local_c = 0;
  local_18 = 0x10;
  local_14 = 0;
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 != 0) {
    local_10 = param_2;
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    return iVar2;
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140056f60(longlong param_1,undefined4 param_2,void *param_3)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_1d8 [32];
  undefined8 local_1b8;
  undefined4 local_1b0;
  undefined2 local_1ac;
  undefined1 local_1aa [30];
  undefined2 local_18c;
  undefined2 local_cf;
  undefined2 local_59;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_1d8;
  local_1ac = 0;
  FUN_14004e8b0(local_1aa);
  local_1b8 = 0x4720190;
  local_1b0 = param_2;
  memcpy(local_1aa,param_3,0x182);
  local_18c = 0;
  lVar1 = **(longlong **)(param_1 + 200);
  local_cf = 0;
  local_59 = 0;
  if (lVar1 == 0) {
    iVar2 = 0;
  }
  else {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_1b8);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140057040(longlong param_1,undefined4 param_2,undefined8 *param_3)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x473;
  local_3c = 0;
  local_48 = 0x1e;
  local_3a = *param_3;
  local_44 = 0;
  local_32 = param_3[1];
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 != 0) {
    local_40 = param_2;
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    return iVar2;
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140057120(longlong param_1,undefined4 param_2,undefined8 *param_3,undefined4 param_4,
                 undefined8 *param_5,wchar_t *param_6,undefined8 *param_7)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_b8 [32];
  undefined2 local_98;
  undefined2 local_96;
  undefined4 local_94;
  undefined4 local_90;
  undefined2 local_8c;
  undefined8 local_8a;
  undefined8 local_82;
  undefined4 local_7a;
  undefined8 local_76;
  undefined8 local_6e;
  undefined8 local_66;
  undefined8 local_5e;
  wchar_t local_56 [12];
  ulonglong local_3e;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_b8;
  local_56[0] = L'\0';
  local_56[1] = L'\0';
  local_56[2] = L'\0';
  local_56[3] = L'\0';
  local_56[4] = L'\0';
  local_56[5] = L'\0';
  local_56[6] = L'\0';
  local_56[7] = L'\0';
  local_56[8] = L'\0';
  local_56[9] = L'\0';
  local_56[10] = L'\0';
  local_56[0xb] = L'\0';
  local_3e = 0;
  local_96 = 0x474;
  local_98 = 0x62;
  local_8a = *param_3;
  local_82 = param_3[1];
  local_66 = *param_5;
  local_5e = param_5[1];
  local_76 = *param_7;
  local_6e = param_7[1];
  local_8c = 0;
  local_94 = 0;
  local_90 = param_2;
  local_7a = param_4;
  wcsncpy(local_56,param_6,0xf);
  local_3e = local_3e & 0xffffffffffff;
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 == 0) {
    iVar2 = 0;
  }
  else {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_98);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140057260(longlong param_1,undefined4 param_2,undefined8 param_3,undefined4 param_4,
                 undefined8 *param_5,wchar_t *param_6,wchar_t *param_7,undefined4 param_8)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_468 [32];
  undefined8 local_448;
  undefined4 local_440;
  undefined2 local_43c;
  undefined4 local_43a;
  undefined8 local_436;
  undefined8 local_42e;
  undefined8 local_426;
  undefined8 local_41e;
  undefined1 local_416 [212];
  wchar_t local_342 [12];
  ulonglong local_32a;
  wchar_t local_322 [349];
  undefined2 local_68;
  undefined4 local_66;
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_468;
  local_43c = 0;
  local_426 = 0;
  local_41e = 0;
  FUN_14004edf0(local_416);
  local_66 = 0;
  local_342[0] = L'\0';
  local_342[1] = L'\0';
  local_342[2] = L'\0';
  local_342[3] = L'\0';
  local_342[4] = L'\0';
  local_342[5] = L'\0';
  local_342[6] = L'\0';
  local_342[7] = L'\0';
  local_342[8] = L'\0';
  local_342[9] = L'\0';
  local_342[10] = L'\0';
  local_342[0xb] = L'\0';
  local_32a = 0;
  memset(local_322,0,700);
  local_436 = *param_5;
  local_42e = param_5[1];
  local_448 = 0x47503e6;
  local_440 = param_2;
  local_43a = param_4;
  FUN_1400573e0(local_416,param_3);
  wcsncpy(local_342,param_6,0xf);
  wcsncpy(local_322,param_7,0x15d);
  local_32a = local_32a & 0xffffffffffff;
  local_66 = param_8;
  local_68 = 0;
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 == 0) {
    iVar2 = 0;
  }
  else {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_448);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



undefined4 * FUN_1400573e0(undefined4 *param_1,undefined4 *param_2)

{
  *(undefined2 *)(param_1 + 5) = *(undefined2 *)(param_2 + 5);
  *(undefined2 *)((longlong)param_1 + 0x16) = *(undefined2 *)((longlong)param_2 + 0x16);
  *param_1 = *param_2;
  param_1[1] = param_2[1];
  param_1[2] = param_2[2];
  param_1[3] = param_2[3];
  param_1[6] = param_2[6];
  *(undefined2 *)(param_1 + 7) = *(undefined2 *)(param_2 + 7);
  param_1[8] = param_2[8];
  param_1[9] = param_2[9];
  *(undefined2 *)(param_1 + 10) = *(undefined2 *)(param_2 + 10);
  param_1[0xc] = param_2[0xc];
  param_1[0xd] = param_2[0xd];
  param_1[0xe] = param_2[0xe];
  param_1[0xf] = param_2[0xf];
  param_1[0x10] = param_2[0x10];
  param_1[0x11] = param_2[0x11];
  param_1[0xb] = param_2[0xb];
  *(undefined2 *)(param_1 + 0x12) = *(undefined2 *)(param_2 + 0x12);
  param_1[0x13] = param_2[0x13];
  param_1[0x14] = param_2[0x14];
  param_1[0x15] = param_2[0x15];
  param_1[0x16] = param_2[0x16];
  param_1[0x17] = param_2[0x17];
  param_1[0x18] = param_2[0x18];
  *(undefined1 *)(param_1 + 0x19) = *(undefined1 *)(param_2 + 0x19);
  *(undefined1 *)((longlong)param_1 + 0x65) = *(undefined1 *)((longlong)param_2 + 0x65);
  *(undefined1 *)((longlong)param_1 + 0x66) = *(undefined1 *)((longlong)param_2 + 0x66);
  param_1[0x1a] = param_2[0x1a];
  *(undefined2 *)(param_1 + 0x1b) = *(undefined2 *)(param_2 + 0x1b);
  *(undefined2 *)((longlong)param_1 + 0x6e) = *(undefined2 *)((longlong)param_2 + 0x6e);
  param_1[0x1c] = param_2[0x1c];
  *(undefined2 *)(param_1 + 0x1f) = *(undefined2 *)(param_2 + 0x1f);
  param_1[0x20] = param_2[0x20];
  param_1[0x21] = param_2[0x21];
  param_1[0x22] = param_2[0x22];
  param_1[0x23] = param_2[0x23];
  param_1[0x24] = param_2[0x24];
  *(undefined2 *)(param_1 + 0x25) = *(undefined2 *)(param_2 + 0x25);
  *(undefined2 *)((longlong)param_1 + 0x96) = *(undefined2 *)((longlong)param_2 + 0x96);
  param_1[0x26] = param_2[0x26];
  param_1[0x27] = param_2[0x27];
  param_1[0x28] = param_2[0x28];
  param_1[0x29] = param_2[0x29];
  param_1[0x1a] = param_2[0x1a];
  *(undefined1 *)(param_1 + 0x34) = *(undefined1 *)(param_2 + 0x34);
  param_1[0x2a] = param_2[0x2a];
  param_1[0x2b] = param_2[0x2b];
  param_1[0x2c] = param_2[0x2c];
  param_1[0x2d] = param_2[0x2d];
  param_1[0x2e] = param_2[0x2e];
  param_1[0x2f] = param_2[0x2f];
  param_1[0x30] = param_2[0x30];
  param_1[0x31] = param_2[0x31];
  param_1[0x32] = param_2[0x32];
  param_1[0x33] = param_2[0x33];
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1400575d0(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_128 [32];
  undefined2 local_108;
  undefined2 local_106;
  undefined8 local_104;
  undefined2 local_fc;
  undefined1 local_fa [68];
  undefined8 local_b6;
  undefined8 local_ae;
  undefined8 local_a6;
  undefined8 local_9e;
  undefined1 local_96 [110];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_128;
  iVar1 = 0;
  local_fc = 0;
  memset(local_96,0,100);
  local_106 = 0x468;
  local_b6 = 0;
  local_ae = 0;
  local_a6 = 0;
  local_9e = 0;
  local_108 = 0xd6;
  local_104 = 0;
  memcpy(local_fa,param_3,200);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_108);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140057710(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_118 [32];
  undefined4 local_f8;
  undefined8 local_f4;
  undefined2 local_ec;
  undefined1 local_ea [194];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  iVar1 = 0;
  local_ec = 0;
  FUN_14004ebf0(local_ea);
  local_f8 = 0x46900c1;
  local_f4 = 0;
  memcpy(local_ea,param_3,0xb3);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_f8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140057820(longlong param_1,short param_2,undefined8 *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  undefined1 local_28;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  iVar1 = 0;
  local_56 = 0x46c;
  local_4c = 0;
  local_58 = 0x31;
  local_4a = *param_3;
  local_54 = 0;
  local_42 = param_3[1];
  local_3a = param_3[2];
  local_32 = param_3[3];
  local_2a = *(undefined2 *)(param_3 + 4);
  local_28 = *(undefined1 *)((longlong)param_3 + 0x22);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_58);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140057930(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_118 [32];
  undefined4 local_f8;
  undefined4 uStack_f4;
  undefined4 local_f0;
  undefined2 local_ec;
  undefined1 local_ea [82];
  undefined2 local_98;
  undefined2 local_34;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  iVar1 = 0;
  local_f8 = 0;
  uStack_f4 = 0;
  local_f0 = 0;
  local_ec = 0;
  FUN_14004eaa0(local_ea);
  local_f8 = 0x46a00c6;
  uStack_f4 = 0;
  local_f0 = 0;
  memcpy(local_ea,param_3,0xb8);
  local_98 = 0;
  local_34 = 0;
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_f8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140057a50(longlong param_1,short param_2,undefined2 param_3,void *param_4)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_168 [32];
  undefined4 local_148;
  undefined4 uStack_144;
  undefined4 local_140;
  undefined2 uStack_13c;
  undefined2 uStack_13a;
  undefined1 local_138 [256];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_168;
  iVar1 = 0;
  local_148 = 0;
  uStack_144 = 0;
  local_140 = 0;
  uStack_13c = 0;
  uStack_13a = 0;
  FUN_140133330(local_138);
  local_148 = 0x46e010c;
  uStack_144 = 0;
  local_140 = 0;
  uStack_13a = param_3;
  memcpy(local_138,param_4,0xfc);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_148);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140057b60(longlong param_1,short param_2,undefined2 param_3,void *param_4)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_168 [32];
  undefined4 local_148;
  undefined8 local_144;
  undefined2 local_13c;
  undefined2 local_13a;
  undefined1 local_138 [256];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_168;
  iVar1 = 0;
  local_13c = 0;
  FUN_140133260(local_138);
  local_148 = 0x46f010b;
  local_144 = 0;
  local_13a = param_3;
  memcpy(local_138,param_4,0xfb);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_148);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140057c70(longlong param_1,short param_2,undefined2 param_3,void *param_4)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_138 [32];
  undefined4 local_118;
  undefined4 uStack_114;
  undefined4 local_110;
  undefined2 uStack_10c;
  undefined2 uStack_10a;
  undefined1 local_108 [208];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_138;
  iVar1 = 0;
  local_118 = 0;
  uStack_114 = 0;
  local_110 = 0;
  uStack_10c = 0;
  uStack_10a = 0;
  FUN_1401330e0(local_108);
  local_118 = 0x4b100d7;
  uStack_114 = 0;
  local_110 = 0;
  uStack_10a = param_3;
  memcpy(local_108,param_4,199);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_118);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



int FUN_140057d80(longlong param_1,undefined2 param_2,undefined4 param_3)

{
  longlong lVar1;
  int iVar2;
  longlong *plVar3;
  undefined2 local_28;
  undefined2 local_26;
  undefined8 local_24;
  undefined2 local_1c;
  undefined2 local_1a;
  undefined4 local_18;
  
  iVar2 = 0;
  local_26 = 0x4a5;
  local_1c = 0;
  local_28 = 0x14;
  local_24 = 0;
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    plVar3 = *(longlong **)(param_1 + 200);
  }
  else {
    plVar3 = *(longlong **)(param_1 + 0xd8);
  }
  lVar1 = *plVar3;
  if (lVar1 != 0) {
    local_1a = param_2;
    local_18 = param_3;
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_28);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140057e30(longlong param_1,char *param_2,undefined4 param_3)

{
  longlong lVar1;
  int iVar2;
  longlong *plVar3;
  undefined1 auStack_c8 [32];
  undefined4 local_a8;
  undefined8 local_a4;
  undefined2 local_9c;
  char local_9a [100];
  undefined4 local_36;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_c8;
  iVar2 = 0;
  local_9c = 0;
  local_36 = 0;
  memset(local_9a,0,100);
  local_a8 = 0x49e0076;
  local_a4 = 0;
  strncpy(local_9a,param_2,100);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    plVar3 = *(longlong **)(param_1 + 200);
  }
  else {
    plVar3 = *(longlong **)(param_1 + 0xd8);
  }
  lVar1 = *plVar3;
  if (lVar1 != 0) {
    local_36 = param_3;
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_a8);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140057f30(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_f8 [32];
  undefined2 local_d8;
  undefined2 local_d6;
  undefined8 local_d4;
  undefined2 local_cc;
  undefined1 local_ca [36];
  undefined8 local_a6;
  undefined8 local_9e;
  undefined8 local_96;
  undefined8 local_8e;
  undefined8 local_69;
  undefined8 local_61;
  undefined8 local_59;
  undefined8 local_51;
  undefined8 local_49;
  undefined8 local_41;
  undefined8 local_39;
  undefined8 local_31;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_f8;
  iVar1 = 0;
  local_a6 = 0;
  local_9e = 0;
  local_96 = 0;
  local_8e = 0;
  local_cc = 0;
  local_69 = 0;
  local_61 = 0;
  local_59 = 0;
  local_51 = 0;
  local_49 = 0;
  local_41 = 0;
  local_39 = 0;
  local_31 = 0;
  local_d6 = 0x4ba;
  local_d4 = 0;
  local_d8 = 0xaf;
  memcpy(local_ca,param_3,0xa1);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_d8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140058060(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_448 [32];
  undefined4 local_428;
  undefined8 local_424;
  undefined2 local_41c;
  undefined1 local_41a [1010];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_448;
  iVar1 = 0;
  local_41c = 0;
  FUN_14004e5b0(local_41a);
  local_428 = 0x4bb03fa;
  local_424 = 0;
  memcpy(local_41a,param_3,0x3ec);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_428);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140058170(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_158 [32];
  undefined4 local_138;
  undefined8 local_134;
  undefined2 local_12c;
  undefined1 local_12a [258];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_158;
  iVar1 = 0;
  local_12c = 0;
  FUN_14004e4e0(local_12a);
  local_138 = 0x4bc0107;
  local_134 = 0;
  memcpy(local_12a,param_3,0xf9);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_138);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140058280(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_e8 [32];
  undefined2 local_c8;
  undefined2 local_c6;
  undefined8 local_c4;
  undefined2 local_bc;
  undefined1 local_ba [36];
  undefined8 local_96;
  undefined8 local_8e;
  undefined8 local_86;
  undefined8 local_7e;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_e8;
  iVar1 = 0;
  local_96 = 0;
  local_8e = 0;
  local_86 = 0;
  local_bc = 0;
  local_7e = 0;
  local_5a = 0;
  local_52 = 0;
  local_4a = 0;
  local_42 = 0;
  local_c6 = 0x4d8;
  local_c8 = 0x9a;
  local_c4 = 0;
  memcpy(local_ba,param_3,0x8c);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_c8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1400583a0(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_228 [32];
  undefined4 local_208;
  undefined8 local_204;
  undefined2 local_1fc;
  undefined1 local_1fa [466];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_228;
  iVar1 = 0;
  local_1fc = 0;
  FUN_14004e120(local_1fa);
  local_208 = 0x4dd01d9;
  local_204 = 0;
  memcpy(local_1fa,param_3,0x1cb);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_208);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1400584b0(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_148 [32];
  undefined4 local_128;
  undefined8 local_124;
  undefined2 local_11c;
  undefined1 local_11a [242];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_148;
  iVar1 = 0;
  local_11c = 0;
  FUN_14004e280(local_11a);
  local_128 = 0x4dc00f8;
  local_124 = 0;
  memcpy(local_11a,param_3,0xea);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_128);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1400585c0(longlong param_1,void *param_2)

{
  longlong lVar1;
  int iVar2;
  longlong *plVar3;
  undefined1 auStack_138 [32];
  undefined2 local_118;
  undefined2 local_116;
  undefined8 local_114;
  undefined2 local_10c;
  undefined1 local_10a [16];
  undefined1 local_fa [100];
  undefined8 local_96;
  undefined8 local_8e;
  undefined8 local_86;
  undefined8 local_7e;
  undefined8 local_76;
  undefined8 local_6e;
  undefined8 local_66;
  undefined8 local_5e;
  undefined8 local_56;
  undefined8 local_4e;
  undefined8 local_46;
  undefined8 local_3e;
  undefined2 local_35;
  undefined2 local_33;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_138;
  iVar2 = 0;
  local_10c = 0;
  memset(local_fa,0,100);
  local_76 = 0;
  local_6e = 0;
  local_66 = 0;
  local_5e = 0;
  local_56 = 0;
  local_4e = 0;
  local_46 = 0;
  local_3e = 0;
  local_35 = 0;
  local_33 = 0;
  local_116 = 0x4de;
  local_96 = 0;
  local_8e = 0;
  local_86 = 0;
  local_7e = 0;
  local_118 = 0xf7;
  local_114 = 0;
  memcpy(local_10a,param_2,0xe9);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    plVar3 = *(longlong **)(param_1 + 200);
  }
  else {
    plVar3 = *(longlong **)(param_1 + 0xd8);
  }
  lVar1 = *plVar3;
  if (lVar1 != 0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_118);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140058730(longlong param_1,void *param_2)

{
  longlong lVar1;
  int iVar2;
  longlong *plVar3;
  undefined1 auStack_278 [32];
  undefined4 local_258;
  undefined8 local_254;
  undefined2 local_24c;
  undefined1 local_24a [14];
  undefined8 local_23c;
  undefined8 local_234;
  undefined8 local_22c;
  undefined8 local_224;
  undefined1 local_21c [516];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_278;
  iVar2 = 0;
  local_23c = 0;
  local_234 = 0;
  local_24c = 0;
  local_22c = 0;
  local_224 = 0;
  memset(local_21c,0,0x1fe);
  local_258 = 0x4df023a;
  local_254 = 0;
  memcpy(local_24a,param_2,0x22c);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    plVar3 = *(longlong **)(param_1 + 200);
  }
  else {
    plVar3 = *(longlong **)(param_1 + 0xd8);
  }
  lVar1 = *plVar3;
  if (lVar1 != 0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_258);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140058840(longlong param_1,void *param_2)

{
  longlong lVar1;
  int iVar2;
  longlong *plVar3;
  undefined1 auStack_278 [32];
  undefined2 local_258;
  undefined2 local_256;
  undefined8 local_254;
  undefined2 local_24c;
  undefined1 local_24a [11];
  undefined1 local_23f [510];
  undefined8 local_41;
  undefined8 local_39;
  undefined8 local_31;
  undefined8 local_29;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_278;
  iVar2 = 0;
  local_24c = 0;
  memset(local_23f,0,0x1fe);
  local_256 = 0x4e0;
  local_41 = 0;
  local_39 = 0;
  local_31 = 0;
  local_29 = 0;
  local_258 = 0x238;
  local_254 = 0;
  memcpy(local_24a,param_2,0x22a);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    plVar3 = *(longlong **)(param_1 + 200);
  }
  else {
    plVar3 = *(longlong **)(param_1 + 0xd8);
  }
  lVar1 = *plVar3;
  if (lVar1 != 0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_258);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



int FUN_140058960(longlong param_1,undefined8 *param_2)

{
  longlong lVar1;
  int iVar2;
  longlong *plVar3;
  undefined2 local_38;
  undefined2 local_36;
  undefined8 local_34;
  undefined2 local_2c;
  undefined8 local_2a;
  undefined8 local_22;
  undefined8 local_1a;
  undefined1 local_12;
  
  iVar2 = 0;
  local_36 = 0x4e1;
  local_2c = 0;
  local_38 = 0x27;
  local_2a = *param_2;
  local_34 = 0;
  local_22 = param_2[1];
  local_1a = param_2[2];
  local_12 = *(undefined1 *)(param_2 + 3);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    plVar3 = *(longlong **)(param_1 + 200);
  }
  else {
    plVar3 = *(longlong **)(param_1 + 0xd8);
  }
  lVar1 = *plVar3;
  if (lVar1 != 0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_38);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140058a30(longlong param_1,undefined8 *param_2)

{
  longlong lVar1;
  int iVar2;
  longlong *plVar3;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined2 local_4c;
  undefined6 uStack_4a;
  undefined2 local_44;
  undefined6 uStack_42;
  undefined2 local_3c;
  undefined6 uStack_3a;
  undefined2 local_34;
  undefined6 uStack_32;
  undefined2 local_2c;
  undefined6 uStack_2a;
  undefined2 uStack_24;
  undefined4 local_22;
  undefined2 local_1e;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  iVar2 = 0;
  local_4c = 0;
  local_56 = 0x4e2;
  local_58 = 0x3c;
  local_54 = 0;
  uStack_4a = (undefined6)*param_2;
  local_44 = (undefined2)((ulonglong)*param_2 >> 0x30);
  uStack_42 = (undefined6)param_2[1];
  local_3c = (undefined2)((ulonglong)param_2[1] >> 0x30);
  uStack_3a = (undefined6)param_2[2];
  local_34 = (undefined2)((ulonglong)param_2[2] >> 0x30);
  uStack_32 = (undefined6)param_2[3];
  local_2c = (undefined2)((ulonglong)param_2[3] >> 0x30);
  uStack_2a = (undefined6)param_2[4];
  uStack_24 = (undefined2)((ulonglong)param_2[4] >> 0x30);
  local_22 = *(undefined4 *)(param_2 + 5);
  local_1e = *(undefined2 *)((longlong)param_2 + 0x2c);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    plVar3 = *(longlong **)(param_1 + 200);
  }
  else {
    plVar3 = *(longlong **)(param_1 + 0xd8);
  }
  lVar1 = *plVar3;
  if (lVar1 != 0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140058b40(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_108 [32];
  undefined2 local_e8;
  undefined2 local_e6;
  undefined8 local_e4;
  undefined2 local_dc;
  undefined1 local_da [44];
  undefined8 local_ae;
  undefined4 local_a6;
  undefined8 local_a2;
  undefined8 local_9a;
  undefined8 local_92;
  undefined8 local_8a;
  undefined8 local_82;
  undefined8 local_7a;
  undefined2 local_72;
  undefined8 local_70;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_108;
  local_ae = 0;
  local_a6 = 0;
  local_a2 = 0;
  local_9a = 0;
  local_92 = 0;
  local_8a = 0;
  local_82 = 0;
  local_7a = 0;
  local_72 = 0;
  local_70 = 0;
  local_68 = 0;
  local_60 = 0;
  local_58 = 0;
  local_50 = 0;
  local_48 = 0;
  local_40 = 0;
  local_38 = 0;
  local_e6 = 0x4e4;
  iVar1 = 0;
  local_dc = 0;
  local_e8 = 0xb8;
  local_e4 = 0;
  memcpy(local_da,param_3,0xaa);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_e8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140058c80(longlong param_1,short param_2,int *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_138 [32];
  undefined2 local_118;
  undefined2 local_116;
  undefined8 local_114;
  undefined2 local_10c;
  undefined8 local_10a;
  undefined8 local_102;
  undefined2 local_f8;
  undefined2 local_f6;
  undefined8 local_f4;
  undefined2 local_ec;
  undefined1 local_ea [85];
  undefined8 local_95;
  undefined8 local_8d;
  undefined8 local_85;
  undefined8 local_7d;
  undefined8 local_75;
  undefined8 local_6d;
  undefined2 local_65;
  undefined8 local_63;
  undefined8 local_5b;
  undefined8 local_53;
  undefined8 local_4b;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_138;
  iVar1 = 0;
  if (*param_3 == 0x67) {
    local_116 = 0x447;
    local_10c = 0;
    local_118 = 0x1e;
    local_10a = *(undefined8 *)(param_3 + 2);
    local_114 = 0;
    local_102 = *(undefined8 *)(param_3 + 4);
    FUN_140117b30(*(undefined8 *)(param_1 + 0xe0),&local_118);
  }
  local_95 = 0;
  local_8d = 0;
  local_85 = 0;
  local_7d = 0;
  local_75 = 0;
  local_6d = 0;
  local_65 = 0;
  local_63 = 0;
  local_5b = 0;
  local_53 = 0;
  local_4b = 0;
  local_f6 = 0x4e5;
  local_ec = 0;
  local_f8 = 0xb5;
  local_f4 = 0;
  memcpy(local_ea,param_3,0xa7);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_f8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140058df0(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_148 [32];
  undefined4 local_128;
  undefined8 local_124;
  undefined2 local_11c;
  undefined1 local_11a [64];
  undefined8 local_da;
  undefined8 local_d2;
  undefined8 local_ca;
  undefined8 local_c2;
  undefined8 local_ba;
  undefined8 local_b2;
  undefined8 local_aa;
  undefined8 local_a2;
  undefined1 local_9a [114];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_148;
  iVar1 = 0;
  local_11c = 0;
  local_da = 0;
  local_d2 = 0;
  local_ca = 0;
  local_c2 = 0;
  local_ba = 0;
  local_b2 = 0;
  local_aa = 0;
  local_a2 = 0;
  memset(local_9a,0,100);
  local_128 = 0x4e600f2;
  local_124 = 0;
  memcpy(local_11a,param_3,0xe4);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_128);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140058f30(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_c8 [32];
  undefined2 local_a8;
  undefined2 local_a6;
  undefined8 local_a4;
  undefined2 local_9c;
  undefined1 local_9a [31];
  undefined8 local_7b;
  undefined8 local_73;
  undefined8 local_6b;
  undefined8 local_63;
  undefined8 local_5b;
  undefined8 local_53;
  undefined2 local_4b;
  undefined8 local_49;
  undefined8 local_41;
  undefined8 local_39;
  undefined8 local_31;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_c8;
  iVar1 = 0;
  local_9c = 0;
  local_7b = 0;
  local_73 = 0;
  local_6b = 0;
  local_63 = 0;
  local_5b = 0;
  local_53 = 0;
  local_4b = 0;
  local_49 = 0;
  local_41 = 0;
  local_39 = 0;
  local_31 = 0;
  local_a6 = 0x4e7;
  local_a4 = 0;
  local_a8 = 0x7f;
  memcpy(local_9a,param_3,0x71);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_a8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140059060(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_3d8 [32];
  undefined4 local_3b8;
  undefined8 local_3b4;
  undefined2 local_3ac;
  undefined1 local_3aa [898];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_3d8;
  iVar1 = 0;
  local_3ac = 0;
  FUN_14004dd00(local_3aa);
  local_3b8 = 0x4e80381;
  local_3b4 = 0;
  memcpy(local_3aa,param_3,0x373);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_3b8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140059170(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_3b8 [32];
  undefined4 local_398;
  undefined8 local_394;
  undefined2 local_38c;
  undefined1 local_38a [866];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_3b8;
  iVar1 = 0;
  local_38c = 0;
  FUN_14004dc50(local_38a);
  local_398 = 0x4e9036c;
  local_394 = 0;
  memcpy(local_38a,param_3,0x35e);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_398);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140059280(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_158 [32];
  undefined4 local_138;
  undefined8 local_134;
  undefined2 local_12c;
  undefined1 local_12a [258];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_158;
  iVar1 = 0;
  local_12c = 0;
  FUN_14004db70(local_12a);
  local_138 = 0x4eb0104;
  local_134 = 0;
  memcpy(local_12a,param_3,0xf6);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_138);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140059390(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_138 [32];
  undefined4 local_118;
  undefined8 local_114;
  undefined2 local_10c;
  undefined1 local_10a [226];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_138;
  iVar1 = 0;
  local_10c = 0;
  FUN_14004daa0(local_10a);
  local_118 = 0x4ec00ec;
  local_114 = 0;
  memcpy(local_10a,param_3,0xde);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_118);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1400594a0(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_128 [32];
  undefined4 local_108;
  undefined8 local_104;
  undefined2 local_fc;
  undefined1 local_fa [210];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_128;
  iVar1 = 0;
  local_fc = 0;
  FUN_14004d9e0(local_fa);
  local_108 = 0x4ed00d8;
  local_104 = 0;
  memcpy(local_fa,param_3,0xca);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_108);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



int FUN_1400595b0(longlong param_1,short param_2,undefined8 *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined2 local_38;
  undefined2 local_36;
  undefined8 local_34;
  undefined2 local_2c;
  undefined8 local_2a;
  undefined8 local_22;
  undefined8 local_1a;
  
  local_36 = 0x50c;
  local_2c = 0;
  local_38 = 0x26;
  local_2a = *param_3;
  local_34 = 0;
  local_22 = param_3[1];
  local_1a = param_3[2];
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_38);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      return iVar1;
    }
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1400596a0(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_128 [32];
  undefined2 local_108;
  undefined2 local_106;
  undefined8 local_104;
  undefined2 local_fc;
  undefined1 local_fa [44];
  undefined1 local_ce [100];
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_128;
  iVar1 = 0;
  local_fc = 0;
  memset(local_ce,0,100);
  local_106 = 0x507;
  local_6a = 0;
  local_62 = 0;
  local_5a = 0;
  local_52 = 0;
  local_108 = 0xd6;
  local_104 = 0;
  memcpy(local_fa,param_3,200);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_108);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1400597e0(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_1d8 [32];
  undefined4 local_1b8;
  undefined8 local_1b4;
  undefined2 local_1ac;
  undefined1 local_1aa [386];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_1d8;
  iVar1 = 0;
  local_1ac = 0;
  FUN_14004d850(local_1aa);
  local_1b8 = 0x506018f;
  local_1b4 = 0;
  memcpy(local_1aa,param_3,0x181);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_1b8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1400598f0(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_318 [32];
  undefined4 local_2f8;
  undefined8 local_2f4;
  undefined2 local_2ec;
  undefined1 local_2ea [52];
  undefined8 local_2b6;
  undefined8 local_2ae;
  undefined8 local_2a6;
  undefined8 local_29e;
  undefined1 local_296 [100];
  undefined1 local_232 [522];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_318;
  iVar1 = 0;
  local_2ec = 0;
  memset(local_296,0,100);
  local_2b6 = 0;
  local_2ae = 0;
  local_2a6 = 0;
  local_29e = 0;
  memset(local_232,0,0x1fe);
  local_2f8 = 0x50f02c4;
  local_2f4 = 0;
  memcpy(local_2ea,param_3,0x2b6);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_2f8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140059a30(longlong param_1,short param_2,undefined4 *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_198 [32];
  undefined4 local_178;
  undefined4 uStack_174;
  undefined4 local_170;
  undefined2 local_16c;
  undefined4 local_16a;
  undefined4 local_166;
  undefined4 local_162;
  undefined8 local_15e;
  undefined8 local_156;
  undefined8 local_14e;
  undefined8 local_146;
  undefined8 local_13e;
  undefined8 local_136;
  wchar_t local_12e [16];
  undefined1 local_10e [214];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_198;
  iVar1 = 0;
  local_178 = 0;
  uStack_174 = 0;
  local_170 = 0;
  local_16c = 0;
  FUN_14004d6c0(&local_16a);
  local_16a = *param_3;
  local_166 = param_3[1];
  local_178 = 0x513013e;
  local_162 = param_3[2];
  uStack_174 = 0;
  local_170 = 0;
  local_15e = *(undefined8 *)(param_3 + 3);
  local_156 = *(undefined8 *)(param_3 + 5);
  local_14e = *(undefined8 *)(param_3 + 7);
  local_146 = *(undefined8 *)(param_3 + 9);
  local_13e = *(undefined8 *)(param_3 + 0xb);
  local_136 = *(undefined8 *)(param_3 + 0xd);
  FUN_1400573e0(local_10e,param_3 + 0x17);
  if ((wchar_t *)(param_3 + 0xf) != (wchar_t *)0x0) {
    wcsncpy_s(local_12e,0x10,(wchar_t *)(param_3 + 0xf),0xf);
  }
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_178);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140059bb0(longlong param_1,undefined2 *param_2,undefined4 *param_3,wchar_t *param_4,
                 undefined4 *param_5)

{
  longlong lVar1;
  int iVar2;
  longlong *plVar3;
  undefined1 auStack_a8 [32];
  undefined2 local_88;
  undefined2 local_86;
  undefined8 local_84;
  undefined2 local_7c;
  undefined2 local_7a;
  undefined4 local_78;
  undefined4 local_74;
  undefined4 local_70;
  undefined4 local_6c;
  undefined4 local_68;
  wchar_t local_64 [12];
  ulonglong local_4c;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_a8;
  local_64[0] = L'\0';
  local_64[1] = L'\0';
  local_64[2] = L'\0';
  local_64[3] = L'\0';
  local_64[4] = L'\0';
  local_64[5] = L'\0';
  local_64[6] = L'\0';
  local_64[7] = L'\0';
  local_64[8] = L'\0';
  local_64[9] = L'\0';
  local_64[10] = L'\0';
  local_64[0xb] = L'\0';
  local_4c = 0;
  iVar2 = 0;
  local_86 = 0x522;
  local_88 = 0x44;
  local_74 = *param_3;
  local_70 = param_3[1];
  local_7c = 0;
  local_6c = param_3[2];
  local_84 = 0;
  local_68 = param_3[3];
  local_7a = *param_2;
  local_78 = *param_5;
  wcsncpy(local_64,param_4,0xf);
  local_4c = local_4c & 0xffffffffffff;
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    plVar3 = *(longlong **)(param_1 + 200);
  }
  else {
    plVar3 = *(longlong **)(param_1 + 0xd8);
  }
  lVar1 = *plVar3;
  if (lVar1 != 0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_88);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140059cc0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x478;
  local_3c = 0;
  local_48 = 0x1e;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140059d90(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined2 param_7,wchar_t *param_8,
                 undefined2 param_9,undefined2 param_10,undefined4 param_11,undefined4 param_12,
                 undefined4 param_13,undefined4 param_14,undefined4 param_15,undefined4 param_16,
                 undefined4 param_17,undefined4 param_18,undefined4 param_19,undefined4 param_20,
                 undefined4 param_21,undefined4 param_22,undefined4 param_23,undefined4 param_24,
                 undefined4 param_25,undefined4 param_26,undefined4 param_27,undefined4 param_28,
                 undefined8 param_29)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_118 [32];
  undefined2 local_f8;
  undefined2 local_f6;
  undefined4 local_f4;
  undefined4 local_f0;
  undefined2 local_ec;
  undefined8 local_ea;
  undefined8 local_e2;
  undefined8 local_da;
  undefined8 local_d2;
  undefined8 local_ca;
  undefined8 local_c2;
  undefined2 local_ba;
  wchar_t local_b8 [16];
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined4 local_78;
  undefined4 local_74;
  undefined4 local_70;
  undefined8 local_6c;
  undefined4 local_64;
  undefined4 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_50;
  undefined8 local_4c;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  iVar2 = 0;
  local_74 = 0;
  local_70 = 0;
  local_64 = 0;
  local_b8[0] = L'\0';
  local_b8[1] = L'\0';
  local_b8[2] = L'\0';
  local_b8[3] = L'\0';
  local_b8[4] = L'\0';
  local_b8[5] = L'\0';
  local_b8[6] = L'\0';
  local_b8[7] = L'\0';
  local_60 = 0;
  local_5c = 0;
  local_58 = 0;
  local_54 = 0;
  local_b8[8] = L'\0';
  local_b8[9] = L'\0';
  local_b8[10] = L'\0';
  local_b8[0xb] = L'\0';
  local_b8[0xc] = L'\0';
  local_b8[0xd] = L'\0';
  local_b8[0xe] = L'\0';
  local_b8[0xf] = L'\0';
  local_f6 = 0x479;
  local_f8 = 0xb4;
  local_ea = *param_4;
  local_e2 = param_4[1];
  local_da = *param_5;
  local_d2 = param_5[1];
  local_ca = *param_6;
  local_ec = 0;
  local_c2 = param_6[1];
  local_98 = 0;
  local_90 = 0;
  local_88 = 0;
  local_80 = 0;
  local_78 = 0;
  local_ba = param_7;
  local_6c = 0;
  local_50 = 0;
  local_4c = 0;
  local_f4 = 0;
  local_f0 = param_3;
  wcscpy_s(local_b8,0x10,param_8);
  local_74 = param_19;
  local_70 = param_20;
  local_98 = CONCAT44(param_11,CONCAT22(param_10,param_9));
  local_90 = CONCAT44(param_13,param_12);
  local_88 = CONCAT44(param_15,param_14);
  local_80 = CONCAT44(param_17,param_16);
  local_78 = param_18;
  local_6c = CONCAT44(param_22,param_21);
  local_64 = param_23;
  local_50 = param_28;
  local_60 = param_24;
  local_5c = param_25;
  local_4c = param_29;
  local_58 = param_26;
  local_54 = param_27;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_f8);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140059fe0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined4 param_6,undefined8 param_7,undefined2 param_8,
                 undefined8 param_9,undefined4 param_10,undefined4 param_11,undefined4 param_12,
                 undefined4 param_13,undefined4 param_14,undefined4 param_15,undefined4 param_16,
                 undefined4 param_17,undefined4 param_18,undefined4 param_19,undefined4 param_20,
                 undefined4 param_21,undefined4 param_22,undefined4 param_23,undefined4 param_24,
                 undefined4 param_25,undefined4 param_26,undefined4 param_27)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_e8 [32];
  undefined2 local_c8;
  undefined2 local_c6;
  undefined4 local_c4;
  undefined4 local_c0;
  undefined2 local_bc;
  undefined8 local_ba;
  undefined8 local_b2;
  undefined8 local_aa;
  undefined8 local_a2;
  undefined4 local_9a;
  undefined8 local_96;
  undefined2 local_8e;
  undefined8 local_8c;
  undefined4 local_84;
  undefined4 local_80;
  undefined4 local_7c;
  undefined4 local_78;
  undefined4 local_74;
  undefined4 local_70;
  undefined4 local_6c;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_60;
  undefined4 local_5c;
  undefined1 local_58;
  undefined4 local_57;
  undefined4 local_53;
  undefined4 local_4f;
  undefined4 local_4b;
  undefined4 local_47;
  undefined4 local_43;
  undefined4 local_3f;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_e8;
  local_8c = param_9;
  local_5c = param_20;
  local_c6 = 0x47a;
  local_bc = 0;
  local_60 = param_19;
  local_c8 = 0x8d;
  local_ba = *param_4;
  local_58 = 0;
  local_4f = param_23;
  local_4b = param_24;
  local_b2 = param_4[1];
  local_47 = param_25;
  local_aa = *param_5;
  local_c4 = 0;
  local_43 = param_26;
  local_3f = param_27;
  local_a2 = param_5[1];
  local_9a = param_6;
  local_96 = param_7;
  local_8e = param_8;
  local_84 = param_10;
  local_80 = param_11;
  local_7c = param_12;
  local_78 = param_13;
  local_74 = param_14;
  local_70 = param_15;
  local_6c = param_16;
  local_68 = param_17;
  local_64 = param_18;
  local_57 = param_21;
  local_53 = param_22;
  local_c0 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_c8);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005a1b0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x47b;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005a290(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined4 param_6,undefined8 param_7,undefined4 param_8)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_88 [32];
  undefined2 local_68;
  undefined2 local_66;
  undefined4 local_64;
  undefined4 local_60;
  undefined2 local_5c;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined8 local_36;
  undefined4 local_2e;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  local_66 = 0x483;
  local_68 = 0x3e;
  local_5a = *param_4;
  local_5c = 0;
  local_64 = 0;
  local_52 = param_4[1];
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = param_6;
  local_36 = param_7;
  local_2e = param_8;
  local_60 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_68);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005a3a0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined8 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined8 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x503;
  local_58 = 0x36;
  local_4a = *param_4;
  local_4c = 0;
  local_54 = 0;
  local_42 = param_4[1];
  local_3a = *param_5;
  local_32 = param_5[1];
  local_2a = param_6;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005a490(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,wchar_t *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_a8 [32];
  undefined2 local_88;
  undefined2 local_86;
  undefined4 local_84;
  undefined4 local_80;
  undefined2 local_7c;
  undefined8 local_7a;
  undefined8 local_72;
  undefined8 local_6a;
  undefined8 local_62;
  wchar_t local_52 [12];
  ulonglong local_3a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_a8;
  iVar2 = 0;
  local_7c = 0;
  local_52[0] = L'\0';
  local_52[1] = L'\0';
  local_52[2] = L'\0';
  local_52[3] = L'\0';
  local_52[4] = L'\0';
  local_52[5] = L'\0';
  local_52[6] = L'\0';
  local_52[7] = L'\0';
  local_52[8] = L'\0';
  local_52[9] = L'\0';
  local_52[10] = L'\0';
  local_52[0xb] = L'\0';
  local_3a = 0;
  local_86 = 0x484;
  local_88 = 0x56;
  local_7a = *param_4;
  local_84 = 0;
  local_72 = param_4[1];
  local_6a = *param_5;
  local_62 = param_5[1];
  local_80 = param_3;
  wcsncpy(local_52,param_6,0xf);
  local_3a = local_3a & 0xffffffffffff;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    iVar2 = 0;
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_88);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005a5b0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined4 param_6,undefined8 param_7)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_88 [32];
  undefined2 local_68;
  undefined2 local_66;
  undefined4 local_64;
  undefined4 local_60;
  undefined2 local_5c;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined8 local_36;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  local_66 = 0x485;
  local_68 = 0x3a;
  local_5a = *param_4;
  local_5c = 0;
  local_64 = 0;
  local_52 = param_4[1];
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = param_6;
  local_36 = param_7;
  local_60 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_68);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005a6b0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined8 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined8 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x486;
  local_58 = 0x36;
  local_4a = *param_4;
  local_4c = 0;
  local_54 = 0;
  local_42 = param_4[1];
  local_3a = *param_5;
  local_32 = param_5[1];
  local_2a = param_6;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005a7a0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8,
                 undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 param_12)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined4 local_4a;
  undefined4 local_46;
  undefined4 local_42;
  undefined4 local_3e;
  undefined4 local_3a;
  undefined4 local_36;
  undefined4 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_76 = 0x4d5;
  local_6c = 0;
  local_78 = 0x4a;
  local_6a = *param_4;
  local_74 = 0;
  local_62 = param_4[1];
  local_5a = *param_5;
  local_52 = param_5[1];
  local_42 = param_8;
  local_4a = param_6;
  local_3e = param_9;
  local_3a = param_10;
  local_46 = param_7;
  local_36 = param_11;
  local_32 = param_12;
  local_70 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005a8f0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined2 param_7,undefined8 param_8)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_188 [32];
  undefined4 local_168;
  undefined4 local_164;
  undefined4 local_160;
  undefined2 local_15c;
  undefined8 local_15a;
  undefined8 local_152;
  undefined8 local_14a;
  undefined8 local_142;
  undefined2 local_13a;
  undefined1 local_138 [224];
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_188;
  local_15c = 0;
  FUN_14004edf0(local_138);
  local_15a = *param_5;
  local_152 = param_5[1];
  local_14a = *param_6;
  local_142 = param_6[1];
  local_168 = 0x4c50104;
  local_13a = param_7;
  local_164 = param_4;
  local_160 = param_3;
  FUN_1400573e0(local_138,param_8);
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_168);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005aa30(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4c6;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005ab10(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined8 *param_7,undefined4 param_8,
                 undefined4 param_9)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined4 local_36;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_76 = 0x4c7;
  local_78 = 0x46;
  local_5a = *param_6;
  local_52 = param_6[1];
  local_6a = *param_5;
  local_62 = param_5[1];
  local_6c = 0;
  local_4a = *param_7;
  local_42 = param_7[1];
  local_3a = param_8;
  local_36 = param_9;
  local_74 = param_4;
  local_70 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005ac50(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x4cb;
  local_4c = 0;
  local_58 = 0x2e;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005ad50(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined8 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_178 [32];
  undefined8 local_158;
  undefined4 local_150;
  undefined2 local_14c;
  undefined8 local_14a;
  undefined8 local_142;
  undefined8 local_13a;
  undefined8 local_132;
  undefined1 local_12a [226];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_178;
  local_14c = 0;
  FUN_14004edf0(local_12a);
  local_13a = *param_4;
  local_132 = param_4[1];
  local_14a = *param_5;
  local_142 = param_5[1];
  local_158 = 0x4c80102;
  local_150 = param_3;
  FUN_1400573e0(local_12a,param_6);
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_158);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005ae70(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined1 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined1 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4cd;
  local_3c = 0;
  local_48 = 0x1f;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14005af50(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8,
                 undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined4 param_12,
                 undefined4 param_13)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined4 local_5a;
  undefined4 local_56;
  undefined4 local_52;
  undefined4 local_4e;
  undefined4 local_4a;
  undefined4 local_46;
  undefined4 local_42;
  undefined4 local_3e;
  undefined4 local_3a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_76 = 0x4ce;
  local_6c = 0;
  local_78 = 0x42;
  local_6a = *param_4;
  local_74 = 0;
  local_62 = param_4[1];
  local_5a = param_5;
  local_3e = param_12;
  local_3a = param_13;
  local_56 = param_6;
  local_52 = param_7;
  local_4e = param_8;
  local_4a = param_9;
  local_46 = param_10;
  local_42 = param_11;
  local_70 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



int FUN_14005b0a0(longlong param_1)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined8 local_14;
  undefined2 local_c;
  
  local_16 = 0x4f9;
  local_c = 0;
  local_18 = 0xe;
  local_14 = 0;
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 != 0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    return iVar2;
  }
  return 0;
}



int FUN_14005b140(longlong param_1)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined8 local_14;
  undefined2 local_c;
  
  local_16 = 0x4fa;
  local_c = 0;
  local_18 = 0xe;
  local_14 = 0;
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 != 0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    return iVar2;
  }
  return 0;
}



int FUN_14005b1e0(longlong param_1)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined8 local_14;
  undefined2 local_c;
  
  local_16 = 0x4fb;
  local_c = 0;
  local_18 = 0xe;
  local_14 = 0;
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 != 0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    return iVar2;
  }
  return 0;
}



int FUN_14005b280(longlong param_1)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined8 local_14;
  undefined2 local_c;
  
  local_16 = 0x4fc;
  local_c = 0;
  local_18 = 0xe;
  local_14 = 0;
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 != 0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    return iVar2;
  }
  return 0;
}



int FUN_14005b320(longlong param_1)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined8 local_14;
  undefined2 local_c;
  
  local_16 = 0x4fd;
  local_c = 0;
  local_18 = 0xe;
  local_14 = 0;
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 != 0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    return iVar2;
  }
  return 0;
}



int FUN_14005b3c0(longlong param_1)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined8 local_14;
  undefined2 local_c;
  
  local_16 = 0x4fe;
  local_c = 0;
  local_18 = 0xe;
  local_14 = 0;
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 != 0) {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    return iVar2;
  }
  return 0;
}



void FUN_14005b460(longlong param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  void *_Src;
  longlong lVar1;
  void *pvVar2;
  int iVar3;
  void *local_40;
  void *local_38;
  void *local_30;
  
  iVar3 = 0;
  local_40 = (void *)0x0;
  local_38 = (void *)0x0;
  local_30 = (void *)0x0;
  FUN_140048fa0(&local_40,(longlong)*(short *)(param_2 + 0xe),param_3,param_4,0xfffffffffffffffe);
  if (0 < *(short *)(param_2 + 0xe)) {
    pvVar2 = (void *)(param_2 + 0x10);
    do {
      if ((pvVar2 < local_38) && (local_40 <= pvVar2)) {
        lVar1 = (longlong)pvVar2 - (longlong)local_40;
        if (local_38 == local_30) {
          FUN_14004b2b0(&local_40);
        }
        _Src = (void *)((lVar1 / 0x182) * 0x182 + (longlong)local_40);
      }
      else {
        _Src = pvVar2;
        if (local_38 == local_30) {
          FUN_14004b2b0(&local_40);
        }
      }
      if (local_38 != (void *)0x0) {
        memcpy(local_38,_Src,0x182);
      }
      local_38 = (void *)((longlong)local_38 + 0x182);
      pvVar2 = (void *)((longlong)pvVar2 + 0x182);
      iVar3 = iVar3 + 1;
    } while (iVar3 < *(short *)(param_2 + 0xe));
  }
  *(int *)(param_1 + 0x634) = *(int *)(param_1 + 0x634) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x250))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,&local_40);
  if (local_40 != (void *)0x0) {
    operator_delete(local_40);
  }
  return;
}



void FUN_14005b5d0(longlong param_1,longlong param_2)

{
  void *_Src;
  longlong lVar1;
  void *pvVar2;
  int iVar3;
  undefined4 local_res10 [2];
  void *local_50;
  void *local_48;
  void *local_40;
  
  if ((*(short *)(param_2 + 0xc) == 0xe9) || (*(short *)(param_2 + 0xc) == 0xea)) {
    iVar3 = 0;
    local_50 = (void *)0x0;
    local_48 = (void *)0x0;
    local_40 = (void *)0x0;
    if (*(short *)(param_2 + 0xe) < 1) {
      *(int *)(param_1 + 0x638) = *(int *)(param_1 + 0x638) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x260))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,&local_50);
    }
    else {
      pvVar2 = (void *)(param_2 + 0x10);
      if (0 < *(short *)(param_2 + 0xe)) {
        do {
          if ((pvVar2 < local_48) && (local_50 <= pvVar2)) {
            lVar1 = (longlong)pvVar2 - (longlong)local_50;
            if (local_48 == local_40) {
              FUN_14004b370(&local_50);
            }
            _Src = (void *)((lVar1 / 0xaf) * 0xaf + (longlong)local_50);
          }
          else {
            _Src = pvVar2;
            if (local_48 == local_40) {
              FUN_14004b370(&local_50);
            }
          }
          if (local_48 != (void *)0x0) {
            memcpy(local_48,_Src,0xaf);
          }
          local_48 = (void *)((longlong)local_48 + 0xaf);
          pvVar2 = (void *)((longlong)pvVar2 + 0xaf);
          iVar3 = iVar3 + 1;
        } while (iVar3 < *(short *)(param_2 + 0xe));
      }
      *(int *)(param_1 + 0x638) = *(int *)(param_1 + 0x638) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x260))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,&local_50);
      if (local_50 != local_48) {
        local_48 = local_50;
      }
    }
    if (local_50 != (void *)0x0) {
      operator_delete(local_50);
    }
  }
  return;
}



void FUN_14005b7a0(longlong param_1,longlong param_2)

{
  void *_Src;
  longlong lVar1;
  void *pvVar2;
  int iVar3;
  undefined4 local_res10 [2];
  void *local_50;
  void *local_48;
  void *local_40;
  
  if ((*(short *)(param_2 + 0xc) == 0xe9) || (*(short *)(param_2 + 0xc) == 0xea)) {
    iVar3 = 0;
    local_50 = (void *)0x0;
    local_48 = (void *)0x0;
    local_40 = (void *)0x0;
    if (*(short *)(param_2 + 0x1e) < 1) {
      *(int *)(param_1 + 0x678) = *(int *)(param_1 + 0x678) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x360))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe,&local_50,0xfffffffffffffffe);
    }
    else {
      pvVar2 = (void *)(param_2 + 0x20);
      if (0 < *(short *)(param_2 + 0x1e)) {
        do {
          if ((pvVar2 < local_48) && (local_50 <= pvVar2)) {
            lVar1 = ((longlong)pvVar2 - (longlong)local_50) / 6 +
                    ((longlong)pvVar2 - (longlong)local_50 >> 0x3f);
            if (local_48 == local_40) {
              FUN_14004aaa0(&local_50);
            }
            _Src = (void *)(((lVar1 >> 5) - (lVar1 >> 0x3f)) * 0xc0 + (longlong)local_50);
          }
          else {
            _Src = pvVar2;
            if (local_48 == local_40) {
              FUN_14004aaa0(&local_50);
            }
          }
          if (local_48 != (void *)0x0) {
            memcpy(local_48,_Src,0xc0);
          }
          local_48 = (void *)((longlong)local_48 + 0xc0);
          pvVar2 = (void *)((longlong)pvVar2 + 0xc0);
          iVar3 = iVar3 + 1;
        } while (iVar3 < *(short *)(param_2 + 0x1e));
      }
      *(int *)(param_1 + 0x678) = *(int *)(param_1 + 0x678) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x360))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe,&local_50);
      if (local_50 != local_48) {
        local_48 = local_50;
      }
    }
    if (local_50 != (void *)0x0) {
      operator_delete(local_50);
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_14005b980(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined6 uVar2;
  IUnknown *This;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  undefined8 uVar8;
  wchar_t *pwVar9;
  char *riid;
  wchar_t *pwVar10;
  undefined2 uVar11;
  char *ppvObject;
  wchar_t *pwVar13;
  undefined1 auStackY_908 [32];
  char local_8d8 [4];
  int local_8d4;
  uint local_8d0;
  short local_8cc;
  short local_8c8;
  undefined8 local_8c0;
  undefined4 local_8b8;
  undefined2 uStack_8b4;
  short sStack_8b2;
  IUnknown *local_8a8;
  longlong *local_8a0;
  undefined4 local_898;
  undefined1 local_888 [24];
  undefined1 local_870 [24];
  undefined4 local_858;
  undefined1 *local_850;
  undefined4 local_848;
  undefined8 local_840;
  undefined1 *local_838;
  wchar_t *local_828;
  wchar_t *local_820;
  wchar_t *local_818;
  longlong *local_810;
  LPUNKNOWN local_808;
  undefined8 *local_800;
  undefined8 *local_7f8;
  undefined8 local_7f0;
  undefined1 local_7e8;
  undefined8 local_7e0;
  undefined1 local_7d8;
  undefined8 local_7d0;
  undefined1 local_7c8;
  undefined8 local_7c0;
  undefined1 local_7b8;
  undefined8 local_7b0;
  undefined1 local_7a8;
  longlong *local_7a0;
  longlong *local_798;
  undefined8 local_790;
  undefined1 local_788;
  undefined8 local_780;
  undefined1 local_778;
  undefined8 local_770;
  undefined1 local_768;
  undefined8 local_760;
  undefined1 local_758;
  undefined8 local_750;
  undefined1 local_748;
  undefined8 local_740;
  undefined1 local_738;
  undefined8 local_730;
  undefined1 local_728;
  undefined8 local_720;
  undefined8 local_718;
  undefined8 local_710;
  undefined8 local_708;
  short local_700 [16];
  undefined4 local_6e0;
  undefined4 uStack_6dc;
  undefined4 uStack_6d8;
  undefined4 uStack_6d4;
  undefined4 local_6d0;
  undefined4 uStack_6cc;
  undefined4 uStack_6c8;
  undefined4 uStack_6c4;
  undefined4 local_6b8;
  undefined4 uStack_6b4;
  undefined4 uStack_6b0;
  undefined4 uStack_6ac;
  undefined8 local_6a8;
  undefined1 local_6a0 [24];
  undefined1 local_688 [24];
  undefined1 local_670 [24];
  undefined1 local_658 [24];
  undefined1 local_640 [24];
  undefined1 local_628 [24];
  undefined1 local_610 [24];
  undefined1 local_5f8 [24];
  undefined1 local_5e0 [24];
  undefined1 local_5c8 [24];
  undefined1 local_5b0 [24];
  undefined1 local_598 [24];
  undefined1 local_580 [24];
  undefined1 local_568 [24];
  undefined1 local_550 [24];
  undefined1 local_538 [24];
  undefined1 local_520 [24];
  undefined1 local_508 [24];
  undefined1 local_4f0 [24];
  undefined1 local_4d8 [24];
  undefined1 local_4c0 [24];
  undefined1 local_4a8 [24];
  undefined1 local_490 [24];
  undefined1 local_478 [24];
  undefined1 local_460 [24];
  undefined1 local_448 [24];
  undefined1 local_430 [24];
  undefined1 local_418 [24];
  undefined1 local_400 [24];
  undefined1 local_3e8 [24];
  undefined1 local_3d0 [24];
  undefined1 local_3b8 [24];
  undefined1 local_3a0 [24];
  undefined1 local_388 [24];
  undefined1 local_370 [24];
  undefined1 local_358 [24];
  undefined1 local_340 [24];
  undefined1 local_328 [24];
  undefined1 local_310 [24];
  undefined1 local_2f8 [24];
  undefined1 local_2e0 [24];
  undefined1 local_2c8 [24];
  undefined1 local_2b0 [24];
  undefined1 local_298 [24];
  undefined1 local_280 [24];
  undefined1 local_268 [24];
  undefined1 local_250 [24];
  IID local_238;
  undefined2 local_21a;
  undefined4 local_218;
  undefined4 uStack_214;
  undefined4 uStack_210;
  undefined4 uStack_20c;
  undefined4 local_208;
  undefined4 uStack_204;
  undefined4 uStack_200;
  undefined4 uStack_1fc;
  undefined4 local_1f8;
  undefined4 uStack_1f4;
  undefined4 uStack_1f0;
  undefined4 uStack_1ec;
  undefined2 local_1e8;
  undefined2 local_1e6;
  undefined4 local_1e4;
  undefined2 local_1e0;
  undefined4 local_1de;
  undefined4 local_1da;
  undefined2 local_1d6;
  undefined4 local_1d4;
  undefined4 local_1d0;
  undefined4 local_1cc;
  undefined4 local_1c8;
  undefined4 local_1c4;
  undefined4 local_1c0;
  undefined4 local_1bc;
  undefined2 local_1b8;
  undefined4 local_1b6;
  undefined4 local_1b2;
  undefined4 local_1ae;
  undefined4 local_1aa;
  undefined4 local_1a6;
  undefined4 local_1a2;
  undefined1 local_19e;
  undefined1 local_19d;
  undefined1 local_19c;
  undefined2 local_19b;
  undefined2 local_199;
  undefined4 local_197;
  undefined4 local_193;
  undefined4 local_18f;
  undefined4 local_18b;
  undefined2 local_187;
  undefined2 local_185;
  undefined4 local_183;
  undefined4 local_17f;
  wchar_t local_17b [15];
  undefined2 local_15d;
  undefined8 local_15b;
  undefined8 uStack_153;
  undefined8 local_14b;
  undefined8 local_143;
  undefined4 local_13b;
  undefined4 local_137;
  undefined8 local_133;
  undefined2 local_12b;
  undefined4 local_129;
  undefined1 local_df [40];
  undefined1 local_b7;
  wchar_t local_a8;
  undefined1 local_a6 [96];
  undefined2 local_46;
  ulonglong local_38;
  uint uVar12;
  
  local_6a8 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_908;
  pIVar1 = *(IUnknown **)*param_1;
  pwVar13 = (wchar_t *)0x0;
  local_800 = param_1;
  local_7f8 = param_2;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_14005ba1a:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (wchar_t *)0x0;
    }
  }
  else {
    local_8d4 = 0;
    UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_8d4 == 0) goto LAB_14005ba1a;
  }
  local_8b8 = *(undefined4 *)(param_2 + 1);
  local_8c0._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_8c0._0_4_ = CONCAT22(0x23b1,(short)*param_2);
  uStack_8b4 = 0xcd;
  local_8d4 = 0;
  sStack_8b2 = 0;
  uVar12 = 0x10;
  uVar11 = 0x10;
  local_8d0 = 0x10;
  local_810 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_810);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_8a8 = (IUnknown *)0x0;
  local_8a0 = (longlong *)0x0;
  Ordinal_8(local_888);
  Ordinal_8(local_870);
  pIVar1 = local_8a8;
  if ((local_8a8 != (IUnknown *)0x0) && (local_8a8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_838 = &DAT_140281f00;
  local_850 = &DAT_140281f00;
  local_848 = 0;
  local_840 = 0;
  if (local_8a8 != (IUnknown *)0x0) {
    (*local_8a8->lpVtbl->Release)(local_8a8);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_808);
  if (-1 < HVar5) {
    HVar5 = OleRun(local_808);
    if (-1 < HVar5) {
      HVar5 = (*local_808->lpVtbl->QueryInterface)(local_808,(IID *)&DAT_140281f68,&local_8a8);
    }
    (*local_808->lpVtbl->Release)(local_808);
    if (-1 < HVar5) goto LAB_14005bb98;
  }
  local_8a8 = (IUnknown *)0x0;
LAB_14005bb98:
  local_858 = 2;
  local_898 = 1;
  local_8d8[0] = '\x01';
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_798);
  FUN_140001710(&local_810,*puVar6,"dbo.up_read_all_auctionlist");
  if (local_798 != (longlong *)0x0) {
    (**(code **)(*local_798 + 0x10))();
  }
  puVar6 = (undefined8 *)FUN_1400016d0(&local_810,&local_7a0);
  This = local_8a8;
  pIVar1 = (IUnknown *)*puVar6;
  if (local_8a8 != pIVar1) {
    local_8a8 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_7a0 != (longlong *)0x0) {
    (**(code **)(*local_7a0 + 0x10))();
  }
  pIVar1 = local_8a8;
  if (local_8a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_8cc = 0;
  UVar3 = (*local_8a8->lpVtbl[6].Release)(local_8a8);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
  }
  if (local_8cc == -1) {
    uStack_8b4 = 0xd0;
    pwVar10 = pwVar13;
  }
  else {
    while( true ) {
      pIVar1 = local_8a8;
      uVar11 = (undefined2)uVar12;
      if (local_8a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_8c8 = 0;
      UVar3 = (*local_8a8->lpVtbl[6].Release)(local_8a8);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_8c8 == -1) break;
      FUN_14004e8b0(&local_238);
      uVar7 = FUN_140002290(&local_8a8,local_418,"seller_name",local_8d8);
      FUN_140062840(uVar7,&local_818);
      FUN_1401568c0();
      pwVar10 = (wchar_t *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pwVar10 = pwVar13;
      }
      if (local_818 != (wchar_t *)PTR_DAT_1403200a0) {
        uVar7 = FUN_1401568c0();
        local_748 = 0;
        local_750 = uVar7;
        FUN_140156b50(uVar7);
        local_748 = 1;
        if (((pwVar10 != (wchar_t *)0x0) && (pwVar10 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar10 + -4 != (wchar_t *)0x0)) {
          uVar8 = FUN_1401568c0();
          local_7e8 = 0;
          local_7f0 = uVar8;
          FUN_140156b50(uVar8);
          local_7e8 = 1;
          pwVar9 = pwVar10 + -2;
          *(int *)pwVar9 = *(int *)pwVar9 + -1;
          if (*(int *)pwVar9 == 0) {
            FUN_140156970(pwVar10 + -4);
          }
          FUN_140156be0(uVar8);
          local_7e8 = 0;
        }
        pwVar10 = local_818;
        if (((local_818 != (wchar_t *)PTR_DAT_1403200a0) && (local_818 != (wchar_t *)0x0)) &&
           (local_818 != (wchar_t *)0x8)) {
          *(int *)(local_818 + -2) = *(int *)(local_818 + -2) + 1;
        }
        FUN_140156be0(uVar7);
        local_748 = 0;
      }
      pwVar9 = pwVar10;
      if (pwVar10 == (wchar_t *)0x0) {
        pwVar9 = (wchar_t *)PTR_DAT_1403200a0;
      }
      wcsncpy((wchar_t *)&local_238,pwVar9,0xf);
      if (((pwVar10 != (wchar_t *)0x0) && (pwVar10 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar10 + -4 != (wchar_t *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_788 = 0;
        local_790 = uVar7;
        FUN_140156b50(uVar7);
        local_788 = 1;
        pwVar9 = pwVar10 + -2;
        *(int *)pwVar9 = *(int *)pwVar9 + -1;
        if (*(int *)pwVar9 == 0) {
          FUN_140156970(pwVar10 + -4);
        }
        FUN_140156be0(uVar7);
        local_788 = 0;
      }
      pwVar10 = local_818;
      if (((local_818 != (wchar_t *)0x0) && (local_818 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar9 = local_818 + -4, pwVar9 != (wchar_t *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_728 = 0;
        local_730 = uVar7;
        FUN_140156b50(uVar7);
        local_728 = 1;
        pwVar10 = pwVar10 + -2;
        *(int *)pwVar10 = *(int *)pwVar10 + -1;
        if (*(int *)pwVar10 == 0) {
          FUN_140156970(pwVar9);
        }
        FUN_140156be0(uVar7);
        local_728 = 0;
      }
      local_818 = (wchar_t *)PTR_DAT_1403200a0;
      Ordinal_9(local_418);
      local_21a = 0;
      uVar7 = FUN_140002290(&local_8a8,local_250,"character_id",local_8d8);
      FUN_1400625d0(uVar7,&local_6d0);
      local_218 = local_6d0;
      uStack_214 = uStack_6cc;
      uStack_210 = uStack_6c8;
      uStack_20c = uStack_6c4;
      Ordinal_9(local_250);
      uVar7 = FUN_140002290(&local_8a8,local_448,"auth_id",local_8d8);
      FUN_1400625d0(uVar7,&local_6b8);
      local_1f8 = local_6b8;
      uStack_1f4 = uStack_6b4;
      uStack_1f0 = uStack_6b0;
      uStack_1ec = uStack_6ac;
      Ordinal_9(local_448);
      uVar7 = FUN_140002290(&local_8a8,local_658,"item_uid",local_8d8);
      FUN_1400625d0(uVar7,&local_6e0);
      local_208 = local_6e0;
      uStack_204 = uStack_6dc;
      uStack_200 = uStack_6d8;
      uStack_1fc = uStack_6d4;
      Ordinal_9(local_658);
      uVar7 = FUN_140002290(&local_8a8,local_328,"page_index",local_8d8);
      FUN_140182560(uVar7);
      local_1e8 = FUN_140062550(uVar7);
      Ordinal_9(local_328);
      uVar7 = FUN_140002290(&local_8a8,local_628,"slot_index",local_8d8);
      FUN_140182560(uVar7);
      local_1e6 = FUN_140062550(uVar7);
      Ordinal_9(local_628);
      uVar7 = FUN_140002290(&local_8a8,local_6a0,&DAT_14028931c,local_8d8);
      FUN_140182560(uVar7);
      local_1e4 = FUN_140062550(uVar7);
      Ordinal_9(local_6a0);
      uVar7 = FUN_140002290(&local_8a8,local_5f8,"use_cnt",local_8d8);
      FUN_140182560(uVar7);
      local_1e0 = FUN_140062550(uVar7);
      Ordinal_9(local_5f8);
      uVar7 = FUN_140002290(&local_8a8,local_298,"remain_time",local_8d8);
      FUN_140182560(uVar7);
      local_1de = FUN_140062550(uVar7);
      Ordinal_9(local_298);
      uVar7 = FUN_140002290(&local_8a8,local_5c8,"durability",local_8d8);
      FUN_140182560(uVar7);
      local_1da = FUN_140062550(uVar7);
      Ordinal_9(local_5c8);
      uVar7 = FUN_140002290(&local_8a8,local_3e8,"enhance_level",local_8d8);
      FUN_140182560(uVar7);
      local_1d6 = FUN_140062550(uVar7);
      Ordinal_9(local_3e8);
      uVar7 = FUN_140002290(&local_8a8,local_598,"option_1_code",local_8d8);
      FUN_140182560(uVar7);
      local_1d4 = FUN_140062550(uVar7);
      Ordinal_9(local_598);
      uVar7 = FUN_140002290(&local_8a8,local_2f8,"option_1_value",local_8d8);
      FUN_140182560(uVar7);
      local_1d0 = FUN_140062550(uVar7);
      Ordinal_9(local_2f8);
      uVar7 = FUN_140002290(&local_8a8,local_568,"option_2_code",local_8d8);
      FUN_140182560(uVar7);
      local_1cc = FUN_140062550(uVar7);
      Ordinal_9(local_568);
      uVar7 = FUN_140002290(&local_8a8,local_3b8,"option_2_value",local_8d8);
      FUN_140182560(uVar7);
      local_1c8 = FUN_140062550(uVar7);
      Ordinal_9(local_3b8);
      uVar7 = FUN_140002290(&local_8a8,local_538,"option_3_code",local_8d8);
      FUN_140182560(uVar7);
      local_1c4 = FUN_140062550(uVar7);
      Ordinal_9(local_538);
      uVar7 = FUN_140002290(&local_8a8,local_280,"option_3_value",local_8d8);
      FUN_140182560(uVar7);
      local_1c0 = FUN_140062550(uVar7);
      Ordinal_9(local_280);
      uVar7 = FUN_140002290(&local_8a8,local_508,"option_group",local_8d8);
      FUN_140182560(uVar7);
      local_1bc = FUN_140062550(uVar7);
      Ordinal_9(local_508);
      uVar7 = FUN_140002290(&local_8a8,local_388,"ReconNum",local_8d8);
      FUN_140182560(uVar7);
      local_187 = FUN_140062550(uVar7);
      Ordinal_9(local_388);
      uVar7 = FUN_140002290(&local_8a8,local_4d8,"ReconState",local_8d8);
      FUN_140182560(uVar7);
      local_185 = FUN_140062550(uVar7);
      Ordinal_9(local_4d8);
      uVar7 = FUN_140002290(&local_8a8,local_2c8,"socket_count",local_8d8);
      FUN_140182560(uVar7);
      local_1b8 = FUN_140062550(uVar7);
      Ordinal_9(local_2c8);
      uVar7 = FUN_140002290(&local_8a8,local_4a8,"socket_1_code",local_8d8);
      FUN_140182560(uVar7);
      local_1b6 = FUN_140062550(uVar7);
      Ordinal_9(local_4a8);
      uVar7 = FUN_140002290(&local_8a8,local_358,"socket_1_value",local_8d8);
      FUN_140182560(uVar7);
      local_1b2 = FUN_140062550(uVar7);
      Ordinal_9(local_358);
      uVar7 = FUN_140002290(&local_8a8,local_478,"socket_2_code",local_8d8);
      FUN_140182560(uVar7);
      local_1ae = FUN_140062550(uVar7);
      Ordinal_9(local_478);
      uVar7 = FUN_140002290(&local_8a8,local_268,"socket_2_value",local_8d8);
      FUN_140182560(uVar7);
      local_1aa = FUN_140062550(uVar7);
      Ordinal_9(local_268);
      uVar7 = FUN_140002290(&local_8a8,local_688,"socket_3_code",local_8d8);
      FUN_140182560(uVar7);
      local_1a6 = FUN_140062550(uVar7);
      Ordinal_9(local_688);
      uVar7 = FUN_140002290(&local_8a8,local_670,"socket_3_value",local_8d8);
      FUN_140182560(uVar7);
      local_1a2 = FUN_140062550(uVar7);
      Ordinal_9(local_670);
      uVar7 = FUN_140002290(&local_8a8,local_640,"socket_1_color",local_8d8);
      FUN_140182560(uVar7);
      local_19e = FUN_1400624d0(uVar7);
      Ordinal_9(local_640);
      uVar7 = FUN_140002290(&local_8a8,local_610,"socket_2_color",local_8d8);
      FUN_140182560(uVar7);
      local_19d = FUN_1400624d0(uVar7);
      Ordinal_9(local_610);
      uVar7 = FUN_140002290(&local_8a8,local_5e0,"socket_3_color",local_8d8);
      FUN_140182560(uVar7);
      local_19c = FUN_1400624d0(uVar7);
      Ordinal_9(local_5e0);
      uVar7 = FUN_140002290(&local_8a8,local_5b0,"expire_time",local_8d8);
      FUN_140182560(uVar7);
      local_129 = FUN_140062550(uVar7);
      Ordinal_9(local_5b0);
      uVar7 = FUN_140002290(&local_8a8,local_580,"selling_price",local_8d8);
      FUN_140182560(uVar7);
      local_183 = FUN_140062550(uVar7);
      Ordinal_9(local_580);
      uVar7 = FUN_140002290(&local_8a8,local_550,"start_price",local_8d8);
      FUN_140182560(uVar7);
      local_17f = FUN_140062550(uVar7);
      Ordinal_9(local_550);
      uVar7 = FUN_140002290(&local_8a8,local_520,"bidder_name",local_8d8);
      FUN_140062840(uVar7,&local_828);
      FUN_1401568c0();
      pwVar10 = (wchar_t *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pwVar10 = pwVar13;
      }
      if (local_828 != (wchar_t *)PTR_DAT_1403200a0) {
        uVar7 = FUN_1401568c0();
        local_7b8 = 0;
        local_7c0 = uVar7;
        FUN_140156b50(uVar7);
        local_7b8 = 1;
        if (((pwVar10 != (wchar_t *)0x0) && (pwVar10 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar10 + -4 != (wchar_t *)0x0)) {
          uVar8 = FUN_1401568c0();
          local_768 = 0;
          local_770 = uVar8;
          FUN_140156b50(uVar8);
          local_768 = 1;
          pwVar9 = pwVar10 + -2;
          *(int *)pwVar9 = *(int *)pwVar9 + -1;
          if (*(int *)pwVar9 == 0) {
            FUN_140156970(pwVar10 + -4);
          }
          FUN_140156be0(uVar8);
          local_768 = 0;
        }
        pwVar10 = local_828;
        if (((local_828 != (wchar_t *)PTR_DAT_1403200a0) && (local_828 != (wchar_t *)0x0)) &&
           (local_828 != (wchar_t *)0x8)) {
          *(int *)(local_828 + -2) = *(int *)(local_828 + -2) + 1;
        }
        FUN_140156be0(uVar7);
        local_7b8 = 0;
      }
      pwVar9 = pwVar10;
      if (pwVar10 == (wchar_t *)0x0) {
        pwVar9 = (wchar_t *)PTR_DAT_1403200a0;
      }
      wcsncpy(local_17b,pwVar9,0xf);
      if (((pwVar10 != (wchar_t *)0x0) && (pwVar10 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar10 + -4 != (wchar_t *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_7a8 = 0;
        local_7b0 = uVar7;
        FUN_140156b50(uVar7);
        local_7a8 = 1;
        pwVar9 = pwVar10 + -2;
        *(int *)pwVar9 = *(int *)pwVar9 + -1;
        if (*(int *)pwVar9 == 0) {
          FUN_140156970(pwVar10 + -4);
        }
        FUN_140156be0(uVar7);
        local_7a8 = 0;
      }
      pwVar10 = local_828;
      if (((local_828 != (wchar_t *)0x0) && (local_828 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar9 = local_828 + -4, pwVar9 != (wchar_t *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_7d8 = 0;
        local_7e0 = uVar7;
        FUN_140156b50(uVar7);
        local_7d8 = 1;
        pwVar10 = pwVar10 + -2;
        *(int *)pwVar10 = *(int *)pwVar10 + -1;
        if (*(int *)pwVar10 == 0) {
          FUN_140156970(pwVar9);
        }
        FUN_140156be0(uVar7);
        local_7d8 = 0;
      }
      local_828 = (wchar_t *)PTR_DAT_1403200a0;
      Ordinal_9(local_520);
      local_15d = 0;
      FUN_140002290(&local_8a8,local_700,"bidder_auth_uid",local_8d8);
      if (local_700[0] == 1) {
        local_15b = CONCAT44(uStack_1f4,local_1f8);
        uStack_153 = CONCAT44(uStack_1ec,uStack_1f0);
      }
      else {
        FUN_1400625d0(local_700,&local_710);
        local_15b = local_710;
        uStack_153 = local_708;
      }
      uVar7 = FUN_140002290(&local_8a8,local_4f0,"bidder_uid",local_8d8);
      FUN_1400625d0(uVar7,&local_720);
      local_14b = local_720;
      local_143 = local_718;
      Ordinal_9(local_4f0);
      uVar7 = FUN_140002290(&local_8a8,local_4c0,"bid_price",local_8d8);
      FUN_140182560(uVar7);
      local_13b = FUN_140062550(uVar7);
      Ordinal_9(local_4c0);
      uVar7 = FUN_140002290(&local_8a8,local_490,"periodtime",local_8d8);
      FUN_140182560(uVar7);
      local_137 = FUN_140062550(uVar7);
      Ordinal_9(local_490);
      uVar7 = FUN_140002290(&local_8a8,local_460,"registertime",local_8d8);
      FUN_140182560(uVar7);
      local_133 = FUN_140182640(uVar7);
      Ordinal_9(local_460);
      uVar7 = FUN_140002290(&local_8a8,local_430,"activity_value",local_8d8);
      FUN_140182560(uVar7);
      local_12b = FUN_140062550(uVar7);
      Ordinal_9(local_430);
      uVar7 = FUN_140002290(&local_8a8,local_400,&DAT_140289530,local_8d8);
      FUN_140182560(uVar7);
      local_19b = FUN_140062550(uVar7);
      Ordinal_9(local_400);
      uVar7 = FUN_140002290(&local_8a8,local_3d0,"acquireroute",local_8d8);
      FUN_140182560(uVar7);
      local_199 = FUN_140062550(uVar7);
      Ordinal_9(local_3d0);
      uVar7 = FUN_140002290(&local_8a8,local_3a0,"physical",local_8d8);
      FUN_140182560(uVar7);
      local_197 = FUN_140062550(uVar7);
      Ordinal_9(local_3a0);
      uVar7 = FUN_140002290(&local_8a8,local_370,"magical",local_8d8);
      FUN_140182560(uVar7);
      local_193 = FUN_140062550(uVar7);
      Ordinal_9(local_370);
      uVar7 = FUN_140002290(&local_8a8,local_340,"durabilitymax",local_8d8);
      FUN_140182560(uVar7);
      local_18f = FUN_140062550(uVar7);
      Ordinal_9(local_340);
      uVar7 = FUN_140002290(&local_8a8,local_310,"weight",local_8d8);
      FUN_140182560(uVar7);
      local_18b = FUN_140062550(uVar7);
      Ordinal_9(local_310);
      local_a8 = L'\0';
      memset(local_a6,0,0x62);
      uVar7 = FUN_140002290(&local_8a8,local_2e0,"stararray",local_8d8);
      FUN_140062840(uVar7,&local_820);
      FUN_1401568c0();
      pwVar10 = (wchar_t *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pwVar10 = pwVar13;
      }
      if (local_820 != (wchar_t *)PTR_DAT_1403200a0) {
        uVar7 = FUN_1401568c0();
        local_778 = 0;
        local_780 = uVar7;
        FUN_140156b50(uVar7);
        local_778 = 1;
        if (((pwVar10 != (wchar_t *)0x0) && (pwVar10 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar10 + -4 != (wchar_t *)0x0)) {
          uVar8 = FUN_1401568c0();
          local_7c8 = 0;
          local_7d0 = uVar8;
          FUN_140156b50(uVar8);
          local_7c8 = 1;
          pwVar9 = pwVar10 + -2;
          *(int *)pwVar9 = *(int *)pwVar9 + -1;
          if (*(int *)pwVar9 == 0) {
            FUN_140156970(pwVar10 + -4);
          }
          FUN_140156be0(uVar8);
          local_7c8 = 0;
        }
        pwVar10 = local_820;
        if (((local_820 != (wchar_t *)PTR_DAT_1403200a0) && (local_820 != (wchar_t *)0x0)) &&
           (local_820 != (wchar_t *)0x8)) {
          *(int *)(local_820 + -2) = *(int *)(local_820 + -2) + 1;
        }
        FUN_140156be0(uVar7);
        local_778 = 0;
      }
      pwVar9 = pwVar10;
      if (pwVar10 == (wchar_t *)0x0) {
        pwVar9 = (wchar_t *)PTR_DAT_1403200a0;
      }
      wcsncpy(&local_a8,pwVar9,0x31);
      if (((pwVar10 != (wchar_t *)0x0) && (pwVar10 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar10 + -4 != (wchar_t *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_758 = 0;
        local_760 = uVar7;
        FUN_140156b50(uVar7);
        local_758 = 1;
        pwVar9 = pwVar10 + -2;
        *(int *)pwVar9 = *(int *)pwVar9 + -1;
        if (*(int *)pwVar9 == 0) {
          FUN_140156970(pwVar10 + -4);
        }
        FUN_140156be0(uVar7);
        local_758 = 0;
      }
      pwVar10 = local_820;
      if (((local_820 != (wchar_t *)0x0) && (local_820 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar9 = local_820 + -4, pwVar9 != (wchar_t *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_738 = 0;
        local_740 = uVar7;
        FUN_140156b50(uVar7);
        local_738 = 1;
        pwVar10 = pwVar10 + -2;
        *(int *)pwVar10 = *(int *)pwVar10 + -1;
        if (*(int *)pwVar10 == 0) {
          FUN_140156970(pwVar9);
        }
        FUN_140156be0(uVar7);
        local_738 = 0;
      }
      local_820 = (wchar_t *)PTR_DAT_1403200a0;
      Ordinal_9(local_2e0);
      local_46 = 0;
      FUN_140202c40(local_df,&local_a8);
      uVar7 = FUN_140002290(&local_8a8,local_2b0,"starcount",local_8d8);
      FUN_140182560(uVar7);
      local_b7 = FUN_1400624d0(uVar7);
      Ordinal_9(local_2b0);
      uVar12 = local_8d0;
      riid = (char *)&local_238;
      ppvObject = (char *)0x182;
      memcpy((void *)((longlong)(int)local_8d0 + 0x130 + (longlong)param_1),riid,0x182);
      local_8d0 = uVar12 + 0x182;
      sStack_8b2 = (short)local_8d4 + 1;
      local_8d4 = CONCAT22((short)((uint)local_8d4 >> 0x10),sStack_8b2);
      if (50000 < local_8d0) {
        uVar2 = local_8c0._2_6_;
        local_8c0 = CONCAT62(local_8c0._2_6_,(short)local_8d0);
        uVar7 = local_8c0;
        riid = (char *)(param_1 + 0x26);
        local_8c0._4_2_ = SUB62(uVar2,2);
        local_8c0._6_2_ = SUB62(uVar2,4);
        ((IID *)riid)->Data1 = (undefined4)local_8c0;
        ((IID *)riid)->Data2 = local_8c0._4_2_;
        ((IID *)riid)->Data3 = local_8c0._6_2_;
        param_1[0x27] = CONCAT26(sStack_8b2,CONCAT24(uStack_8b4,local_8b8));
        local_8c0 = uVar7;
        iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar4 == 0) {
          ppvObject = "DB Result Queue push error";
          riid = "DBResultQueue_Error.Log";
          FUN_1400a0b40(param_1[0x23]);
        }
        local_8d0 = 0x10;
        local_8d4 = 0;
        sStack_8b2 = 0;
      }
      pIVar1 = local_8a8;
      uVar12 = local_8d0;
      if (local_8a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar5 = (*local_8a8->lpVtbl[0xc].QueryInterface)(local_8a8,(IID *)riid,(void **)ppvObject);
      if (HVar5 < 0) {
        _com_issue_errorex(HVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      Ordinal_9(local_700);
    }
    pwVar10 = (wchar_t *)0x1;
    if (local_8d8[0] == '\0') {
      uStack_8b4 = 0xce;
      pwVar10 = pwVar13;
    }
  }
  local_8c0 = CONCAT62(local_8c0._2_6_,uVar11);
  param_1[0x26] = local_8c0;
  param_1[0x27] = CONCAT26(sStack_8b2,CONCAT24(uStack_8b4,local_8b8));
  iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
  if (iVar4 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar1 = local_8a8;
  if (local_8a8 != (IUnknown *)0x0) {
    local_8d0 = 0;
    UVar3 = (*local_8a8->lpVtbl[0x12].AddRef)(local_8a8);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
    }
    pIVar1 = local_8a8;
    if (local_8d0 != 0) {
      if (local_8a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*local_8a8->lpVtbl[10].Release)(local_8a8);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_8a8 != (IUnknown *)0x0) {
      (*local_8a8->lpVtbl->Release)(local_8a8);
      local_8a8 = (IUnknown *)0x0;
    }
  }
  local_840 = 0;
  local_838 = &DAT_140281f00;
  local_850 = &DAT_140281f00;
  local_848 = 0;
  local_858 = 0;
  Ordinal_9(local_870);
  Ordinal_9(local_888);
  if (local_8a0 != (longlong *)0x0) {
    (**(code **)(*local_8a0 + 0x10))();
  }
  if (local_8a8 != (IUnknown *)0x0) {
    (*local_8a8->lpVtbl->Release)(local_8a8);
  }
  if (local_810 != (longlong *)0x0) {
    (**(code **)(*local_810 + 0x10))();
  }
  return pwVar10;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_14005d2c0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  short sVar2;
  undefined4 uVar3;
  IUnknown *pIVar4;
  ULONG UVar5;
  int iVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  undefined8 uVar12;
  longlong *plVar13;
  undefined1 auStack_188 [32];
  undefined4 local_168;
  undefined8 local_160;
  undefined8 *local_158;
  longlong *local_148;
  longlong *local_140;
  longlong *local_138;
  longlong *local_130;
  undefined4 local_128;
  undefined4 uStack_124;
  uint uStack_120;
  undefined4 uStack_11c;
  longlong *local_108;
  longlong *local_100;
  undefined2 local_f8 [4];
  longlong local_f0 [3];
  longlong local_d8;
  undefined8 *local_d0;
  undefined8 local_b8;
  undefined2 local_a8;
  undefined1 local_a6 [96];
  undefined2 local_46;
  ulonglong local_38;
  
  local_b8 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_188;
  plVar13 = (longlong *)0x0;
  local_f8[0] = 0;
  pIVar4 = *(IUnknown **)*param_1;
  local_d8 = param_2;
  local_d0 = param_1;
  if (pIVar4 == (IUnknown *)0x0) {
LAB_14005d362:
    iVar6 = FUN_1400a1e90(param_1);
    if (iVar6 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return 0;
    }
  }
  else {
    local_140 = (longlong *)((ulonglong)local_140 & 0xffffffff00000000);
    UVar5 = (*pIVar4->lpVtbl[0xb].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_140 == 0) goto LAB_14005d362;
  }
  local_148 = (longlong *)0x0;
  iVar6 = FUN_140001970(&local_148);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_140);
  FUN_140001710(&local_148,*puVar7,"dbo.up_insert_auctionItem");
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  local_130 = (longlong *)&local_128;
  uVar8 = FUN_1400623f0(&local_128,param_2 + 0xe);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_108 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("seller_name");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_140 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_160 = 0x10;
  local_168 = 1;
  local_158 = (undefined8 *)uVar8;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_100,&local_140,0xca);
  local_108 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_130);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_130 != (longlong *)0x0) {
    (**(code **)(*local_130 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_100 = local_f0;
  local_128 = *(undefined4 *)(param_2 + 0x3e);
  uStack_124 = *(undefined4 *)(param_2 + 0x42);
  uStack_120 = *(undefined4 *)(param_2 + 0x46);
  uStack_11c = *(undefined4 *)(param_2 + 0x4a);
  uVar8 = FUN_140062280(local_f0,&local_128);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_108 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("item_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_160 = 0x26;
  local_168 = 1;
  local_158 = (undefined8 *)uVar8;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_138,&local_130,0xca);
  local_100 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = local_f0;
  local_128 = *(undefined4 *)(param_2 + 0x2e);
  uStack_124 = *(undefined4 *)(param_2 + 0x32);
  uStack_120 = *(undefined4 *)(param_2 + 0x36);
  uStack_11c = *(undefined4 *)(param_2 + 0x3a);
  uVar8 = FUN_140062280(local_f0,&local_128);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_160 = 0x26;
  local_168 = 1;
  local_158 = (undefined8 *)uVar8;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,0xca);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = local_f0;
  local_128 = *(undefined4 *)(param_2 + 0x4e);
  uStack_124 = *(undefined4 *)(param_2 + 0x52);
  uStack_120 = *(uint *)(param_2 + 0x56);
  uStack_11c = *(undefined4 *)(param_2 + 0x5a);
  uVar8 = FUN_140062280(local_f0,&local_128);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("auth_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_160 = 0x26;
  local_168 = 1;
  local_158 = (undefined8 *)uVar8;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,0xca);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  sVar2 = *(short *)(param_2 + 0x5e);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,(int)sVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("page_index");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  sVar2 = *(short *)(param_2 + 0x60);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,(int)sVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("slot_index");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x62);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490(&DAT_14028931c);
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  sVar2 = *(short *)(param_2 + 0x66);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,(int)sVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("use_cnt");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x68);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("remain_time");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  Ordinal_8(&local_128);
  if (((short)local_128 != 3) && ((short)local_128 != 10)) {
    if ((short)local_128 == 0xb) {
      uStack_120 = uStack_120 & 0xffff0000;
      goto LAB_14005de4f;
    }
    iVar6 = Ordinal_9(&local_128);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_128 = CONCAT22(local_128._2_2_,3);
  }
  uStack_120 = 0;
LAB_14005de4f:
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("gcode");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x6c);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("durability");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  sVar2 = *(short *)(param_2 + 0x70);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,(int)sVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("enhance_level");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x72);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("option_1_code");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x76);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("option_1_value");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x7a);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("option_2_code");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x7e);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("option_2_value");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x82);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("option_3_code");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x86);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("option_3_value");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x8a);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("OptionGroup");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  sVar2 = *(short *)(param_2 + 0xbf);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,(int)sVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("ReconNum");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  sVar2 = *(short *)(param_2 + 0xc1);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,(int)sVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("ReconState");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  sVar2 = *(short *)(param_2 + 0x8e);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,(int)sVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Socket_count");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x90);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Socket_1_code");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x94);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Socket_1_value");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_138 = (longlong *)&local_128;
  uVar3 = *(undefined4 *)(param_2 + 0x98);
  Ordinal_8(&local_128);
  FUN_140062080(&local_128,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_100 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Socket_2_code");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_130 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_158 = (undefined8 *)&local_128;
  local_160 = 4;
  local_168 = 1;
  plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
  local_138 = plVar11;
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 != (IUnknown *)0x0) {
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = (longlong *)&local_128;
    uVar3 = *(undefined4 *)(param_2 + 0x9c);
    Ordinal_8(&local_128);
    FUN_140062080(&local_128,uVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("Socket_2_value");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_158 = (undefined8 *)&local_128;
    local_160 = 4;
    local_168 = 1;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = (longlong *)&local_128;
    uVar3 = *(undefined4 *)(param_2 + 0xa0);
    Ordinal_8(&local_128);
    FUN_140062080(&local_128,uVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("Socket_3_code");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_158 = (undefined8 *)&local_128;
    local_160 = 4;
    local_168 = 1;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = (longlong *)&local_128;
    uVar3 = *(undefined4 *)(param_2 + 0xa4);
    Ordinal_8(&local_128);
    FUN_140062080(&local_128,uVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("Socket_3_value");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_158 = (undefined8 *)&local_128;
    local_160 = 4;
    local_168 = 1;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = (longlong *)&local_128;
    uVar3 = *(undefined4 *)(param_2 + 0x11d);
    Ordinal_8(&local_128);
    FUN_140062080(&local_128,uVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("expire_time");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_158 = (undefined8 *)&local_128;
    local_160 = 4;
    local_168 = 1;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = (longlong *)&local_128;
    uVar3 = *(undefined4 *)(param_2 + 0xc3);
    Ordinal_8(&local_128);
    FUN_140062080(&local_128,uVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("selling_price");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_158 = (undefined8 *)&local_128;
    local_160 = 4;
    local_168 = 1;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = (longlong *)&local_128;
    uVar3 = *(undefined4 *)(param_2 + 199);
    Ordinal_8(&local_128);
    FUN_140062080(&local_128,uVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("start_price");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_158 = (undefined8 *)&local_128;
    local_160 = 4;
    local_168 = 1;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = local_f0;
    uVar8 = FUN_1400623f0(local_f0,local_f8);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("bidder_name");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_160 = 0x10;
    local_168 = 1;
    local_158 = (undefined8 *)uVar8;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,0xca);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = local_f0;
    local_128 = *(undefined4 *)(param_2 + 0x4e);
    uStack_124 = *(undefined4 *)(param_2 + 0x52);
    uStack_120 = *(undefined4 *)(param_2 + 0x56);
    uStack_11c = *(undefined4 *)(param_2 + 0x5a);
    uVar8 = FUN_140062280(local_f0,&local_128);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("bidder_auth_uid");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_160 = 0x26;
    local_168 = 1;
    local_158 = (undefined8 *)uVar8;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,0xca);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = local_f0;
    local_128 = *(undefined4 *)(param_2 + 0x2e);
    uStack_124 = *(undefined4 *)(param_2 + 0x32);
    uStack_120 = *(undefined4 *)(param_2 + 0x36);
    uStack_11c = *(undefined4 *)(param_2 + 0x3a);
    uVar8 = FUN_140062280(local_f0,&local_128);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("bidder_uid");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_160 = 0x26;
    local_168 = 1;
    local_158 = (undefined8 *)uVar8;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,0xca);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = (longlong *)&local_128;
    uVar3 = *(undefined4 *)(param_2 + 0x10b);
    Ordinal_8(&local_128);
    FUN_140062080(&local_128,uVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("bid_price");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_158 = (undefined8 *)&local_128;
    local_160 = 4;
    local_168 = 1;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = (longlong *)&local_128;
    uVar3 = *(undefined4 *)(param_2 + 0x10f);
    Ordinal_8(&local_128);
    FUN_140062080(&local_128,uVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("periodtime");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_158 = (undefined8 *)&local_128;
    local_160 = 4;
    local_168 = 1;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = (longlong *)&local_128;
    uVar8 = *(undefined8 *)(param_2 + 0x113);
    Ordinal_8(&local_128);
    uVar8 = FUN_1401824f0(local_f0,uVar8);
    iVar6 = Ordinal_10(&local_128,uVar8);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    Ordinal_9(local_f0);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("registertime");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_158 = (undefined8 *)&local_128;
    local_160 = 8;
    local_168 = 1;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,0x14);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = (longlong *)&local_128;
    sVar2 = *(short *)(param_2 + 0x11b);
    Ordinal_8(&local_128);
    FUN_140062080(&local_128,(int)sVar2);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("activity_value");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_158 = (undefined8 *)&local_128;
    local_160 = 4;
    local_168 = 1;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,3);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_138 = (longlong *)&local_128;
    uVar1 = *(undefined1 *)(param_2 + 0xa8);
    Ordinal_8(&local_128);
    if ((short)local_128 != 0x11) {
      iVar6 = Ordinal_9(&local_128);
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar6);
      }
      local_128 = CONCAT22(local_128._2_2_,0x11);
    }
    uStack_120 = CONCAT31(uStack_120._1_3_,uVar1);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_100 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("socket_1_color");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_130 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_158 = (undefined8 *)&local_128;
    local_160 = 1;
    local_168 = 1;
    plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,0x10);
    local_138 = plVar11;
    if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 != (IUnknown *)0x0) {
      UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
      }
      if (local_140 != (longlong *)0x0) {
        (**(code **)(*local_140 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      local_138 = (longlong *)&local_128;
      uVar1 = *(undefined1 *)(param_2 + 0xa9);
      Ordinal_8(&local_128);
      if ((short)local_128 != 0x11) {
        iVar6 = Ordinal_9(&local_128);
        if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar6);
        }
        local_128 = CONCAT22(local_128._2_2_,0x11);
      }
      uStack_120 = CONCAT31(uStack_120._1_3_,uVar1);
      plVar9 = operator_new(0x18);
      plVar11 = plVar13;
      local_100 = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar10 = FUN_140201490("socket_2_color");
        *plVar9 = lVar10;
        plVar11 = plVar9;
      }
      local_130 = plVar11;
      if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      local_158 = (undefined8 *)&local_128;
      local_160 = 1;
      local_168 = 1;
      plVar11 = (longlong *)FUN_140001880(&local_148,&local_108,&local_130,0x10);
      local_138 = plVar11;
      if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_148,&local_140);
      pIVar4 = (IUnknown *)*puVar7;
      if (pIVar4 != (IUnknown *)0x0) {
        UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
        }
        if (local_140 != (longlong *)0x0) {
          (**(code **)(*local_140 + 0x10))();
        }
        if ((longlong *)*plVar11 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar11 + 0x10))();
        }
        local_138 = (longlong *)&local_128;
        uVar1 = *(undefined1 *)(param_2 + 0xaa);
        Ordinal_8(&local_128);
        if ((short)local_128 != 0x11) {
          iVar6 = Ordinal_9(&local_128);
          if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(iVar6);
          }
          local_128 = CONCAT22(local_128._2_2_,0x11);
        }
        uStack_120 = CONCAT31(uStack_120._1_3_,uVar1);
        plVar9 = operator_new(0x18);
        plVar11 = plVar13;
        local_100 = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar10 = FUN_140201490("socket_3_color");
          *plVar9 = lVar10;
          plVar11 = plVar9;
        }
        local_130 = plVar11;
        if (plVar11 != (longlong *)0x0) {
          local_158 = (undefined8 *)&local_128;
          local_160 = 1;
          local_168 = 1;
          uVar8 = FUN_140001880(&local_148,&local_108,&local_130,0x10);
          FUN_1400017e0(&local_148,uVar8);
          local_138 = local_f0;
          uVar8 = FUN_1400623f0(local_f0,param_2 + 0x125);
          plVar11 = operator_new(0x18);
          local_100 = plVar11;
          if (plVar11 != (longlong *)0x0) {
            plVar11[1] = 0;
            *(undefined4 *)(plVar11 + 2) = 1;
            lVar10 = FUN_140201490("item_name");
            *plVar11 = lVar10;
            plVar13 = plVar11;
          }
          local_130 = plVar13;
          if (plVar13 != (longlong *)0x0) {
            local_160 = 0x1e;
            local_168 = 1;
            local_158 = (undefined8 *)uVar8;
            uVar8 = FUN_140001880(&local_148,&local_108,&local_130,0xca);
            FUN_1400017e0(&local_148,uVar8);
            local_138 = (longlong *)&local_128;
            sVar2 = *(short *)(param_2 + 0x161);
            Ordinal_8(&local_128);
            FUN_140062080(&local_128,(int)sVar2);
            uVar8 = FUN_140001000(&local_100,"item_level");
            local_158 = (undefined8 *)&local_128;
            local_160 = 1;
            local_168 = 1;
            uVar8 = FUN_140001880(&local_148,&local_108,uVar8,0x10);
            FUN_1400017e0(&local_148,uVar8);
            local_138 = (longlong *)&local_128;
            uVar3 = *(undefined4 *)(param_2 + 0x163);
            Ordinal_8(&local_128);
            FUN_140062080(&local_128,uVar3);
            uVar8 = FUN_140001000(&local_100,"item_category");
            local_158 = (undefined8 *)&local_128;
            local_160 = 4;
            local_168 = 1;
            uVar8 = FUN_140001880(&local_148,&local_108,uVar8,3);
            FUN_1400017e0(&local_148,uVar8);
            local_138 = (longlong *)&local_128;
            sVar2 = *(short *)(param_2 + 0xab);
            Ordinal_8(&local_128);
            FUN_140062080(&local_128,(int)sVar2);
            uVar8 = FUN_140001000(&local_100,&DAT_140289530);
            local_158 = (undefined8 *)&local_128;
            local_160 = 1;
            local_168 = 1;
            uVar8 = FUN_140001880(&local_148,&local_108,uVar8,0x10);
            FUN_1400017e0(&local_148,uVar8);
            local_138 = (longlong *)&local_128;
            sVar2 = *(short *)(param_2 + 0xad);
            Ordinal_8(&local_128);
            FUN_140062080(&local_128,(int)sVar2);
            uVar8 = FUN_140001000(&local_100,"acquireroute");
            local_158 = (undefined8 *)&local_128;
            local_160 = 1;
            local_168 = 1;
            uVar8 = FUN_140001880(&local_148,&local_108,uVar8,0x10);
            FUN_1400017e0(&local_148,uVar8);
            local_138 = (longlong *)&local_128;
            uVar3 = *(undefined4 *)(param_2 + 0xaf);
            Ordinal_8(&local_128);
            FUN_140062080(&local_128,uVar3);
            uVar8 = FUN_140001000(&local_100,"physical");
            local_158 = (undefined8 *)&local_128;
            local_160 = 4;
            local_168 = 1;
            uVar8 = FUN_140001880(&local_148,&local_108,uVar8,3);
            FUN_1400017e0(&local_148,uVar8);
            local_138 = (longlong *)&local_128;
            uVar3 = *(undefined4 *)(param_2 + 0xb3);
            Ordinal_8(&local_128);
            FUN_140062080(&local_128,uVar3);
            uVar8 = FUN_140001000(&local_100,"magical");
            local_158 = (undefined8 *)&local_128;
            local_160 = 4;
            local_168 = 1;
            uVar8 = FUN_140001880(&local_148,&local_108,uVar8,3);
            FUN_1400017e0(&local_148,uVar8);
            local_138 = (longlong *)&local_128;
            uVar3 = *(undefined4 *)(param_2 + 0xb7);
            Ordinal_8(&local_128);
            FUN_140062080(&local_128,uVar3);
            uVar8 = FUN_140001000(&local_100,"durabilitymax");
            local_158 = (undefined8 *)&local_128;
            local_160 = 4;
            local_168 = 1;
            uVar8 = FUN_140001880(&local_148,&local_108,uVar8,3);
            FUN_1400017e0(&local_148,uVar8);
            local_138 = (longlong *)&local_128;
            uVar3 = *(undefined4 *)(param_2 + 0xbb);
            Ordinal_8(&local_128);
            FUN_140062080(&local_128,uVar3);
            uVar8 = FUN_140001000(&local_100,"weight");
            local_158 = (undefined8 *)&local_128;
            local_160 = 4;
            local_168 = 1;
            FUN_140001880(&local_148,&local_108,uVar8,3);
            FUN_1400017e0(&local_148);
            local_a8 = 0;
            memset(local_a6,0,0x62);
            FUN_140202470(param_2 + 0x167,&local_a8);
            local_46 = 0;
            local_138 = local_f0;
            uVar8 = FUN_1400623f0(local_f0,&local_a8);
            uVar12 = FUN_140001000(&local_100,"stararray");
            local_160 = 0x32;
            local_168 = 1;
            local_158 = (undefined8 *)uVar8;
            uVar8 = FUN_140001880(&local_148,&local_108,uVar12,0xca);
            FUN_1400017e0(&local_148,uVar8);
            local_138 = local_f0;
            uVar8 = FUN_140062020(local_f0,*(undefined1 *)(param_2 + 399));
            uVar12 = FUN_140001000(&local_100,"starcount");
            local_160 = 1;
            local_168 = 1;
            local_158 = (undefined8 *)uVar8;
            uVar8 = FUN_140001880(&local_148,&local_108,uVar12,0x10);
            FUN_1400017e0(&local_148,uVar8);
            FUN_1400016d0(&local_148,&local_130);
            if (local_130 != (longlong *)0x0) {
              (**(code **)(*local_130 + 0x10))();
            }
            if (local_148 != (longlong *)0x0) {
              (**(code **)(*local_148 + 0x10))();
            }
            return 1;
          }
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140060890(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140060923;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140060923:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_delete_auctionarticle");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_uid");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_140060b10(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  longlong *local_88;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [5];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140060ba6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140060ba6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_auctionarticle");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_78;
  local_88 = *(longlong **)(param_2 + 0xe);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_uid");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x22);
  uStack_74 = *(undefined4 *)(param_2 + 0x26);
  uStack_70 = *(undefined4 *)(param_2 + 0x2a);
  uStack_6c = *(undefined4 *)(param_2 + 0x2e);
  uVar6 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("bid_auth_uid");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_88 = local_58;
    local_78 = *(undefined4 *)(param_2 + 0x32);
    uStack_74 = *(undefined4 *)(param_2 + 0x36);
    uStack_70 = *(undefined4 *)(param_2 + 0x3a);
    uStack_6c = *(undefined4 *)(param_2 + 0x3e);
    uVar6 = FUN_140062280(local_58,&local_78);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("bid_uid");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
    local_88 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_88 = local_58;
      uVar6 = FUN_1400623f0(local_58,param_2 + 0x42);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("bidder");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x10,uVar6);
      local_88 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_88 = (longlong *)&local_78;
        uVar1 = *(undefined4 *)(param_2 + 0x1e);
        Ordinal_8(&local_78);
        FUN_140062080(&local_78,uVar1);
        plVar9 = operator_new(0x18);
        local_98[0] = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("bid_price");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_78);
        local_88 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140061220(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined4 *puVar10;
  undefined8 uVar11;
  longlong *plVar12;
  undefined1 auStack_118 [32];
  undefined4 local_f8;
  undefined8 local_f0;
  longlong *local_e8;
  longlong *local_d8;
  longlong *local_d0;
  longlong *local_c8;
  longlong *local_c0;
  longlong *local_b8;
  longlong *local_b0;
  undefined8 *local_a8;
  longlong local_a0;
  longlong local_98 [4];
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_58;
  short local_50 [4];
  undefined4 local_48;
  ulonglong local_38;
  
  local_58 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  pIVar3 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  local_a8 = param_1;
  local_a0 = param_2;
  if (pIVar3 == (IUnknown *)0x0) {
LAB_1400612ae:
    iVar5 = FUN_1400a1e90(param_1);
    if (iVar5 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return 0;
    }
  }
  else {
    local_d8 = (longlong *)((ulonglong)local_d8 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_d8 == 0) goto LAB_1400612ae;
  }
  local_d0 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_d0);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_d8);
  FUN_140001710(&local_d0,*puVar6,"dbo.up_insert_auctionsendmail");
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  local_c8 = (longlong *)local_50;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(local_50);
  FUN_140062080(local_50,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar12;
  local_b8 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("money");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_d8 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = (longlong *)local_50;
  local_f0 = 4;
  local_f8 = 1;
  plVar9 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,3);
  local_b8 = plVar9;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong *)0x0) {
    (**(code **)(*local_c8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = local_98;
  puVar10 = (undefined4 *)FUN_140182810(local_50);
  local_78 = *puVar10;
  uStack_74 = puVar10[1];
  uStack_70 = puVar10[2];
  uStack_6c = puVar10[3];
  uVar11 = FUN_140061f30(local_98,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar12;
  local_b8 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("NewMailID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_c8 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x26;
  local_f8 = 1;
  local_e8 = (longlong *)uVar11;
  plVar9 = (longlong *)FUN_140001880(&local_d0,&local_c0,&local_c8,0xca);
  local_b0 = plVar9;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_c0 = local_98;
  local_78 = *(undefined4 *)(param_2 + 0x12);
  uStack_74 = *(undefined4 *)(param_2 + 0x16);
  uStack_70 = *(undefined4 *)(param_2 + 0x1a);
  uStack_6c = *(undefined4 *)(param_2 + 0x1e);
  uVar11 = FUN_140062280(local_98,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar12;
  local_b0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_c8 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x26;
  local_f8 = 1;
  local_e8 = (longlong *)uVar11;
  plVar9 = (longlong *)FUN_140001880(&local_d0,&local_b8,&local_c8,0xca);
  local_c0 = plVar9;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_c0 = (longlong *)local_50;
  sVar1 = *(short *)(param_2 + 0x46);
  Ordinal_8(local_50);
  FUN_140062080(local_50,(int)sVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar12;
  local_b0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("page_index");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_c8 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = (longlong *)local_50;
  local_f0 = 4;
  local_f8 = 1;
  plVar9 = (longlong *)FUN_140001880(&local_d0,&local_b8,&local_c8,3);
  local_c0 = plVar9;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_c0 = (longlong *)local_50;
  sVar1 = *(short *)(param_2 + 0x48);
  Ordinal_8(local_50);
  FUN_140062080(local_50,(int)sVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar12;
  local_b0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("slot_index");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_c8 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = (longlong *)local_50;
  local_f0 = 4;
  local_f8 = 1;
  plVar9 = (longlong *)FUN_140001880(&local_d0,&local_b8,&local_c8,3);
  local_c0 = plVar9;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_c0 = (longlong *)local_50;
  uVar2 = *(undefined4 *)(param_2 + 0x4a);
  Ordinal_8(local_50);
  FUN_140062080(local_50,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar12;
  local_b0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028931c);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_c8 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = (longlong *)local_50;
  local_f0 = 4;
  local_f8 = 1;
  plVar9 = (longlong *)FUN_140001880(&local_d0,&local_b8,&local_c8,3);
  local_c0 = plVar9;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_c0 = (longlong *)local_50;
  Ordinal_8(local_50);
  if ((local_50[0] != 3) && (local_50[0] != 10)) {
    if (local_50[0] == 0xb) {
      local_48 = (uint)local_48._2_2_ << 0x10;
      goto LAB_140061a78;
    }
    iVar5 = Ordinal_9(local_50);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_50[0] = 3;
  }
  local_48 = 0;
LAB_140061a78:
  plVar7 = operator_new(0x18);
  plVar9 = plVar12;
  local_b0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("gcode");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_c8 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = (longlong *)local_50;
  local_f0 = 4;
  local_f8 = 1;
  plVar9 = (longlong *)FUN_140001880(&local_d0,&local_b8,&local_c8,3);
  local_c0 = plVar9;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_c0 = local_98;
  uVar11 = FUN_1400623f0(local_98,param_2 + 0x106);
  plVar7 = operator_new(0x18);
  plVar9 = plVar12;
  local_b0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("recver_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_c8 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x10;
  local_f8 = 1;
  local_e8 = (longlong *)uVar11;
  plVar9 = (longlong *)FUN_140001880(&local_d0,&local_b8,&local_c8,0xca);
  local_c0 = plVar9;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_c0 = local_98;
  uVar11 = FUN_1400623f0(local_98,param_2 + 0x126);
  plVar7 = operator_new(0x18);
  plVar9 = plVar12;
  local_b0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028984c);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_c8 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 100;
  local_f8 = 1;
  local_e8 = (longlong *)uVar11;
  plVar9 = (longlong *)FUN_140001880(&local_d0,&local_b8,&local_c8,0xca);
  local_c0 = plVar9;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_c0 = (longlong *)local_50;
  uVar2 = *(undefined4 *)(param_2 + 0x3e2);
  Ordinal_8(local_50);
  FUN_140062080(local_50,uVar2);
  plVar9 = operator_new(0x18);
  local_b0 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar8 = FUN_140201490("mailtype");
    *plVar9 = lVar8;
    plVar12 = plVar9;
  }
  local_c8 = plVar12;
  if (plVar12 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = (longlong *)local_50;
  local_f0 = 4;
  local_f8 = 1;
  plVar12 = (longlong *)FUN_140001880(&local_d0,&local_b8,&local_c8,3);
  local_c0 = plVar12;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_d8 != (longlong *)0x0) {
      (**(code **)(*local_d8 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    FUN_1400a2c10(&local_d0,param_2 + 0x32);
    FUN_1400016d0(&local_d0,&local_c8);
    if (local_c8 != (longlong *)0x0) {
      (**(code **)(*local_c8 + 0x10))();
    }
    if (local_d0 != (longlong *)0x0) {
      (**(code **)(*local_d0 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined2 * FUN_140061f30(undefined2 *param_1,undefined8 param_2)

{
  int *piVar1;
  int iVar2;
  longlong *plVar3;
  longlong lVar4;
  undefined8 uVar5;
  undefined *puVar6;
  undefined *local_38;
  undefined8 local_30;
  undefined2 *local_28;
  undefined8 local_20;
  undefined1 local_18;
  
  local_30 = 0xfffffffffffffffe;
  local_28 = param_1;
  Ordinal_8();
  plVar3 = (longlong *)FUN_140182e50(param_2,&local_38);
  puVar6 = (undefined *)*plVar3;
  if ((undefined *)*plVar3 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  iVar2 = Ordinal_9(param_1);
  if (iVar2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  *param_1 = 8;
  if (puVar6 == (undefined *)0x0) {
    *(undefined8 *)(param_1 + 4) = 0;
  }
  else {
    lVar4 = Ordinal_2(puVar6);
    *(longlong *)(param_1 + 4) = lVar4;
    if (lVar4 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
  }
  if (((local_38 != (undefined *)0x0) && (local_38 != PTR_DAT_1403200a0)) &&
     (local_38 + -8 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_20 = uVar5;
    FUN_140156b50(uVar5);
    local_18 = 1;
    piVar1 = (int *)(local_38 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_38 + -8);
    }
    FUN_140156be0(uVar5);
  }
  return param_1;
}



short * FUN_140062020(short *param_1,undefined1 param_2)

{
  int iVar1;
  
  Ordinal_8();
  if (*param_1 != 0x11) {
    iVar1 = Ordinal_9(param_1);
    if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar1);
    }
    *param_1 = 0x11;
  }
  *(undefined1 *)(param_1 + 4) = param_2;
  return param_1;
}



short * FUN_140062080(short *param_1,int param_2)

{
  short sVar1;
  int iVar2;
  
  sVar1 = *param_1;
  if ((sVar1 == 3) || (sVar1 == 10)) {
    *(int *)(param_1 + 4) = param_2;
    return param_1;
  }
  if (sVar1 == 0xb) {
    param_1[4] = -(ushort)(param_2 != 0);
    return param_1;
  }
  iVar2 = Ordinal_9();
  if (iVar2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  *(int *)(param_1 + 4) = param_2;
  *param_1 = 3;
  return param_1;
}



longlong * FUN_140062100(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  undefined *puVar2;
  char cVar3;
  undefined *puVar4;
  undefined *local_res20;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res20 = PTR_DAT_1403200a0;
  cVar3 = FUN_140182bd0(param_2,&local_res20,param_3,param_4,uVar5);
  if (cVar3 == '\0') {
    FUN_1401568c0();
    puVar2 = local_res20;
    puVar4 = PTR_DAT_1403200a0;
    *param_1 = (longlong)PTR_DAT_1403200a0;
    if (local_res20 == (undefined *)0x0) {
      return param_1;
    }
    if (local_res20 == puVar4) {
      return param_1;
    }
    puVar4 = local_res20 + -8;
    if (puVar4 == (undefined *)0x0) {
      return param_1;
    }
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar4);
    }
  }
  else {
    FUN_1401568c0();
    puVar4 = PTR_DAT_1403200a0;
    *param_1 = (longlong)PTR_DAT_1403200a0;
    if (puVar4 == (undefined *)0x0) {
      *param_1 = 0;
    }
    if (local_res20 != (undefined *)*param_1) {
      uVar5 = FUN_1401568c0();
      FUN_140156b50(uVar5);
      FUN_14004f990(param_1);
      *param_1 = (longlong)local_res20;
      if (((local_res20 != PTR_DAT_1403200a0) && (local_res20 != (undefined *)0x0)) &&
         (local_res20 != (undefined *)0x8)) {
        *(int *)(local_res20 + -4) = *(int *)(local_res20 + -4) + 1;
      }
      FUN_140156be0(uVar5);
      puVar4 = PTR_DAT_1403200a0;
    }
    puVar2 = local_res20;
    if (local_res20 == (undefined *)0x0) {
      return param_1;
    }
    if (local_res20 == puVar4) {
      return param_1;
    }
    puVar4 = local_res20 + -8;
    if (puVar4 == (undefined *)0x0) {
      return param_1;
    }
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar4);
    }
  }
  FUN_140156be0(uVar5);
  return param_1;
}



undefined2 * FUN_140062280(undefined2 *param_1,undefined8 param_2)

{
  int *piVar1;
  int iVar2;
  longlong *plVar3;
  longlong lVar4;
  undefined8 uVar5;
  undefined *puVar6;
  undefined *local_38;
  undefined8 local_30;
  undefined2 *local_28;
  undefined8 local_20;
  undefined1 local_18;
  
  local_30 = 0xfffffffffffffffe;
  local_28 = param_1;
  Ordinal_8();
  plVar3 = (longlong *)FUN_140062100(&local_38,param_2);
  puVar6 = (undefined *)*plVar3;
  if ((undefined *)*plVar3 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  iVar2 = Ordinal_9(param_1);
  if (iVar2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  *param_1 = 8;
  if (puVar6 == (undefined *)0x0) {
    *(undefined8 *)(param_1 + 4) = 0;
  }
  else {
    lVar4 = Ordinal_2(puVar6);
    *(longlong *)(param_1 + 4) = lVar4;
    if (lVar4 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
  }
  if (((local_38 != (undefined *)0x0) && (local_38 != PTR_DAT_1403200a0)) &&
     (local_38 + -8 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_20 = uVar5;
    FUN_140156b50(uVar5);
    local_18 = 1;
    piVar1 = (int *)(local_38 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_38 + -8);
    }
    FUN_140156be0(uVar5);
  }
  return param_1;
}



undefined2 * FUN_140062370(undefined2 *param_1,longlong *param_2)

{
  int iVar1;
  undefined4 uVar2;
  longlong lVar3;
  
  iVar1 = Ordinal_9();
  if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar1);
  }
  *param_1 = 8;
  param_2 = (longlong *)*param_2;
  if ((param_2 == (longlong *)0x0) || (*param_2 == 0)) {
    *(undefined8 *)(param_1 + 4) = 0;
  }
  else {
    lVar3 = *param_2;
    uVar2 = Ordinal_149(lVar3);
    lVar3 = Ordinal_150(lVar3,uVar2);
    *(longlong *)(param_1 + 4) = lVar3;
    if (lVar3 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
  }
  return param_1;
}



undefined8 FUN_1400623f0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong lVar3;
  longlong *local_res18;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  Ordinal_8();
  plVar2 = operator_new(0x18);
  if (plVar2 == (longlong *)0x0) {
    plVar2 = (longlong *)0x0;
  }
  else {
    plVar2[1] = 0;
    *(undefined4 *)(plVar2 + 2) = 1;
    local_res18 = plVar2;
    lVar3 = Ordinal_2(param_2);
    *plVar2 = lVar3;
    if ((lVar3 == 0) && (param_2 != 0)) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
  }
  local_res18 = plVar2;
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  FUN_140062370(param_1,&local_res18,param_3,param_4,uVar4);
  LOCK();
  plVar1 = plVar2 + 2;
  lVar3 = *plVar1;
  *(int *)plVar1 = (int)*plVar1 + -1;
  UNLOCK();
  if ((int)lVar3 == 1) {
    if (*plVar2 != 0) {
      Ordinal_6();
    }
    if ((void *)plVar2[1] != (void *)0x0) {
      operator_delete__((void *)plVar2[1]);
    }
    operator_delete(plVar2);
  }
  return param_1;
}



undefined1 FUN_1400624d0(short *param_1)

{
  int iVar1;
  undefined8 uVar2;
  short local_20 [4];
  undefined1 local_18;
  
  uVar2 = 0xfffffffffffffffe;
  if (*param_1 == 0x11) {
    local_18 = (undefined1)param_1[4];
  }
  else {
    Ordinal_8(local_20);
    if ((local_20 != param_1) || (local_20[0] != 0x11)) {
      iVar1 = Ordinal_12(local_20,param_1,0,0x11,uVar2);
      if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar1);
      }
    }
    Ordinal_9(local_20);
  }
  return local_18;
}



undefined4 FUN_140062550(short *param_1)

{
  int iVar1;
  undefined8 uVar2;
  short local_20 [4];
  undefined4 local_18;
  
  uVar2 = 0xfffffffffffffffe;
  if (*param_1 == 3) {
    local_18 = *(undefined4 *)(param_1 + 4);
  }
  else {
    Ordinal_8(local_20);
    if ((local_20 != param_1) || (local_20[0] != 3)) {
      iVar1 = Ordinal_12(local_20,param_1,0,3,uVar2);
      if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar1);
      }
    }
    Ordinal_9(local_20);
  }
  return local_18;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 * FUN_1400625d0(short *param_1,undefined4 *param_2)

{
  longlong *plVar1;
  void *pvVar2;
  longlong *plVar3;
  char cVar4;
  int iVar5;
  longlong lVar6;
  undefined1 auStack_a8 [32];
  longlong *local_88 [2];
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  short local_60 [4];
  undefined8 local_58;
  undefined8 local_48;
  undefined4 local_38;
  undefined4 uStack_34;
  undefined4 uStack_30;
  undefined4 uStack_2c;
  ulonglong local_28;
  
  local_48 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_a8;
  FUN_140182560();
  lVar6 = 0;
  local_88[0] = (longlong *)0x0;
  if (*param_1 == 8) {
    FUN_140062740(local_88,*(undefined8 *)(param_1 + 4));
  }
  else {
    Ordinal_8(local_60);
    if ((local_60 != param_1) || (local_60[0] != 8)) {
      iVar5 = Ordinal_12(local_60,param_1,0);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
    }
    FUN_140062740(local_88,local_58);
    Ordinal_9(local_60);
  }
  plVar1 = local_88[0];
  if (local_88[0] != (longlong *)0x0) {
    lVar6 = *local_88[0];
  }
  cVar4 = FUN_140183000(lVar6,&local_38);
  plVar3 = local_88[0];
  if (cVar4 == '\0') {
    local_78 = 0;
    uStack_74 = 0;
    uStack_70 = 0;
    uStack_6c = 0;
  }
  else {
    local_78 = local_38;
    uStack_74 = uStack_34;
    uStack_70 = uStack_30;
    uStack_6c = uStack_2c;
  }
  *param_2 = local_78;
  param_2[1] = uStack_74;
  param_2[2] = uStack_70;
  param_2[3] = uStack_6c;
  if (plVar1 != (longlong *)0x0) {
    LOCK();
    plVar1 = plVar1 + 2;
    lVar6 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if ((int)lVar6 == 1) {
      if (*local_88[0] != 0) {
        Ordinal_6();
      }
      pvVar2 = (void *)plVar3[1];
      if (pvVar2 != (void *)0x0) {
        operator_delete__(pvVar2);
      }
      operator_delete(plVar3);
    }
  }
  return param_2;
}



longlong * FUN_140062740(longlong *param_1,longlong param_2)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong lVar3;
  
  if (param_2 != 0) {
    if ((longlong *)*param_1 == (longlong *)0x0) {
      lVar3 = 0;
    }
    else {
      lVar3 = *(longlong *)*param_1;
    }
    if (lVar3 == param_2) {
      return param_1;
    }
  }
  plVar2 = (longlong *)*param_1;
  if (plVar2 != (longlong *)0x0) {
    LOCK();
    plVar1 = plVar2 + 2;
    lVar3 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if (((int)lVar3 == 1) && (plVar2 != (longlong *)0x0)) {
      if (*plVar2 != 0) {
        Ordinal_6();
      }
      if ((void *)plVar2[1] != (void *)0x0) {
        operator_delete__((void *)plVar2[1]);
      }
      operator_delete(plVar2);
    }
    *param_1 = 0;
  }
  plVar2 = operator_new(0x18);
  if (plVar2 == (longlong *)0x0) {
    plVar2 = (longlong *)0x0;
  }
  else {
    plVar2[1] = 0;
    *(undefined4 *)(plVar2 + 2) = 1;
    lVar3 = Ordinal_2(param_2);
    *plVar2 = lVar3;
    if ((lVar3 == 0) && (param_2 != 0)) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
  }
  *param_1 = (longlong)plVar2;
  if (plVar2 != (longlong *)0x0) {
    return param_1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 * FUN_140062840(short *param_1,undefined8 *param_2)

{
  longlong *plVar1;
  void *pvVar2;
  longlong *plVar3;
  int iVar4;
  undefined4 uVar5;
  longlong lVar6;
  longlong *local_res18 [2];
  undefined8 uVar7;
  short local_30 [4];
  undefined8 local_28;
  
  uVar7 = 0xfffffffffffffffe;
  lVar6 = 0;
  FUN_140182560();
  local_res18[0] = (longlong *)0x0;
  if (*param_1 == 8) {
    FUN_140062740(local_res18,*(undefined8 *)(param_1 + 4));
  }
  else {
    Ordinal_8(local_30);
    if ((local_30 != param_1) || (local_30[0] != 8)) {
      iVar4 = Ordinal_12(local_30,param_1,0,8,uVar7);
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar4);
      }
    }
    FUN_140062740(local_res18,local_28);
    Ordinal_9(local_30);
  }
  plVar1 = local_res18[0];
  if (local_res18[0] != (longlong *)0x0) {
    lVar6 = *local_res18[0];
  }
  FUN_1401568c0();
  *param_2 = PTR_DAT_1403200a0;
  uVar5 = FUN_140156740(lVar6);
  uVar7 = FUN_14004f760(param_2,uVar5);
  FUN_140156770(uVar7,lVar6,uVar5);
  FUN_14004f380(param_2);
  plVar3 = local_res18[0];
  if (plVar1 != (longlong *)0x0) {
    LOCK();
    plVar1 = plVar1 + 2;
    lVar6 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if ((int)lVar6 == 1) {
      if (*local_res18[0] != 0) {
        Ordinal_6();
      }
      pvVar2 = (void *)plVar3[1];
      if (pvVar2 != (void *)0x0) {
        operator_delete__(pvVar2);
      }
      operator_delete(plVar3);
    }
  }
  return param_2;
}



undefined8 FUN_140062980(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  undefined4 local_98;
  undefined4 uStack_94;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  longlong *local_78;
  longlong *local_70;
  longlong local_68 [4];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140062a1a;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140062a1a:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_auction");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,&local_98);
  local_70 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_98);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x16);
  uStack_94 = *(undefined4 *)(param_2 + 0x1a);
  uStack_90 = *(undefined4 *)(param_2 + 0x1e);
  uStack_8c = *(undefined4 *)(param_2 + 0x22);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x26);
  uStack_94 = *(undefined4 *)(param_2 + 0x2a);
  uStack_90 = *(undefined4 *)(param_2 + 0x2e);
  uStack_8c = *(undefined4 *)(param_2 + 0x32);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  uVar10 = FUN_1400623f0(local_68,param_2 + 0x36);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x10,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x56);
  uStack_94 = *(undefined4 *)(param_2 + 0x5a);
  uStack_90 = *(undefined4 *)(param_2 + 0x5e);
  uStack_8c = *(undefined4 *)(param_2 + 0x62);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_guid");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x66);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x6a);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_header");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x6e);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("enchant_level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x72);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_active");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar1 = *(undefined1 *)(param_2 + 0x76);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x11) {
    iVar5 = Ordinal_9(&local_98);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_98 = CONCAT22(local_98._2_2_,0x11);
  }
  uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("socket_count");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar1 = *(undefined1 *)(param_2 + 0x77);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x11) {
    iVar5 = Ordinal_9(&local_98);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_98 = CONCAT22(local_98._2_2_,0x11);
  }
  uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("remain_recon");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x78);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("durability");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x7c);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x80);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option2");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x84);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option3");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x88);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option_value1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x8c);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option_value2");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x90);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option_value3");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x94);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_option1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x98);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_option2");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x9c);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_option3");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0xa0);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_value1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xa4);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_value2");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xa8);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_value3");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xac);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_color1");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xb0);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_color2");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xb4);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_color3");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xb8);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_count");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xbc);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("start_price");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xc0);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("before_price");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xc4);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("buy_price");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 200);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("guarantee_price");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xcc);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("commission");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xd0);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("auction_period");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xd4);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("before_money");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xd8);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("after_money");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xdc);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("change_money");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = local_68;
      uVar10 = FUN_1400623f0(local_68,param_2 + 0xe0);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("target_name");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x10,uVar10);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_a0 = (longlong *)&local_98;
        uVar2 = *(undefined4 *)(param_2 + 0x100);
        Ordinal_8(&local_98);
        FUN_140062080(&local_98,uVar2);
        plVar9 = operator_new(0x18);
        local_78 = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("result");
          *plVar9 = lVar8;
          plVar11 = plVar9;
        }
        local_res18 = plVar11;
        if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
        local_a0 = plVar11;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar11 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar11 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140065990(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  undefined8 uVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_b8;
  longlong *local_b0;
  undefined4 local_a8;
  undefined4 uStack_a4;
  undefined8 uStack_a0;
  longlong *local_88;
  longlong *local_80;
  longlong local_78 [4];
  undefined8 local_58;
  
  local_58 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140065a2f;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140065a2f:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_play_time");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar1 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("log_type");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,3,1,4,&local_a8);
  local_80 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_88 = (longlong *)&local_a8;
  uVar1 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("server");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_b0,&local_res18,3,1,4,&local_a8);
  local_88 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar1 = *(undefined4 *)(param_2 + 0x16);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("channel_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_b0 = local_78;
  local_a8 = *(undefined4 *)(param_2 + 0x1a);
  uStack_a4 = *(undefined4 *)(param_2 + 0x1e);
  uStack_a0 = *(undefined8 *)(param_2 + 0x22);
  uVar9 = FUN_140062280(local_78,&local_a8);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
  local_b0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_b0 = local_78;
  uVar9 = FUN_1400623f0(local_78,param_2 + 0x72);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("bcust_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x32,uVar9);
  local_b0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_b0 = local_78;
  local_a8 = *(undefined4 *)(param_2 + 0x2a);
  uStack_a4 = *(undefined4 *)(param_2 + 0x2e);
  uStack_a0 = *(undefined8 *)(param_2 + 0x32);
  uVar9 = FUN_140062280(local_78,&local_a8);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
  local_b0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_b0 = local_78;
  uVar9 = FUN_1400623f0(local_78,param_2 + 0x52);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_name");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
  local_b0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar1 = *(undefined4 *)(param_2 + 0x3a);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_class");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar1 = *(undefined4 *)(param_2 + 0x3e);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_level");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar9 = *(undefined8 *)(param_2 + 0x42);
  Ordinal_8(&local_a8);
  if (((short)local_a8 != 5) && ((short)local_a8 != 7)) {
    iVar4 = Ordinal_9(&local_a8);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_a8 = CONCAT22(local_a8._2_2_,5);
  }
  uStack_a0 = uVar9;
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("startTime");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,5,1,8,&local_a8);
  local_b0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar9 = *(undefined8 *)(param_2 + 0x4a);
  Ordinal_8(&local_a8);
  if (((short)local_a8 != 5) && ((short)local_a8 != 7)) {
    iVar4 = Ordinal_9(&local_a8);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_a8 = CONCAT22(local_a8._2_2_,5);
  }
  uStack_a0 = uVar9;
  plVar8 = operator_new(0x18);
  local_88 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar7 = FUN_140201490("endTime");
    *plVar8 = lVar7;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,5,1,8,&local_a8);
  local_b0 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140066800(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_b8;
  longlong *local_b0;
  longlong *local_a8 [2];
  undefined4 local_98;
  undefined4 uStack_94;
  undefined8 uStack_90;
  longlong *local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_68 [4];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14006689b;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14006689b:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_level_up");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_b8 = (longlong *)&local_98;
  local_78 = *(longlong **)(param_2 + 0x12);
  uStack_70 = *(undefined4 *)(param_2 + 0x1a);
  uStack_6c = *(undefined4 *)(param_2 + 0x1e);
  uVar6 = FUN_140062280(&local_98,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_b0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("AuthID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_a8,&local_res18,0xca,1,0x26,uVar6);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a8[0] = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x22);
  uStack_94 = *(undefined4 *)(param_2 + 0x26);
  uStack_90 = *(undefined8 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_b0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("CharID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,0xca,1,0x26,uVar6);
  local_a8[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)&local_98;
  uVar1 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a8[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_b0,&local_res18,3,1,4,&local_98);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)&local_98;
  uVar6 = *(undefined8 *)(param_2 + 0x32);
  Ordinal_8(&local_98);
  if (((short)local_98 != 5) && ((short)local_98 != 7)) {
    iVar4 = Ordinal_9(&local_98);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_98 = CONCAT22(local_98._2_2_,5);
  }
  uStack_90 = uVar6;
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a8[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_140289c74);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_b0,&local_res18,5,1,8,&local_98);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_78 = (longlong *)&local_98;
    uVar1 = *(undefined4 *)(param_2 + 0x3a);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_a8[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Class");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_b0,&local_res18,2,1,2,&local_98);
    local_78 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_78 = (longlong *)&local_98;
    uVar1 = *(undefined4 *)(param_2 + 0x3e);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_a8[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Level");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_b0,&local_res18,2,1,2,&local_98);
    local_78 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_78 = local_68;
    uVar6 = FUN_1400623f0(local_68,param_2 + 0x42);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_a8[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490(&DAT_140289c8c);
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_b0,&local_res18,0xca,1,0x10,uVar6);
    local_78 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_b8 != (longlong *)0x0) {
        (**(code **)(*local_b8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_78 = local_68;
      uVar6 = FUN_1400623f0(local_68,param_2 + 0x62);
      plVar9 = operator_new(0x18);
      local_a8[0] = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("bcust_id");
        *plVar9 = lVar8;
        plVar10 = plVar9;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_b0,&local_res18,0xca,1,0x32,uVar6);
      local_78 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_b8 != (longlong *)0x0) {
          (**(code **)(*local_b8 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400672f0(undefined8 *param_1,longlong param_2)

{
  undefined2 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140067386;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140067386:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_character");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,3,1,4,&local_78);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,3,1,4,&local_78);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x16);
  uStack_74 = *(undefined4 *)(param_2 + 0x1a);
  uStack_70 = *(undefined4 *)(param_2 + 0x1e);
  uStack_6c = *(undefined4 *)(param_2 + 0x22);
  uVar10 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined2 *)(param_2 + 0x9a);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x12) {
    iVar5 = Ordinal_9(&local_78);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_78 = CONCAT22(local_78._2_2_,0x12);
  }
  uStack_70 = CONCAT22(uStack_70._2_2_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("channelid");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0x36);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("bcust_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x32,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x26);
  uStack_74 = *(undefined4 *)(param_2 + 0x2a);
  uStack_70 = *(undefined4 *)(param_2 + 0x2e);
  uStack_6c = *(undefined4 *)(param_2 + 0x32);
  uVar10 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0x9c);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0xbc);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_class");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0xc0);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_Job");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0xc4);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_Level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 200);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("guildpoint");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0xcc);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_count");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0xd0);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("b_character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar2 = *(undefined4 *)(param_2 + 0xf0);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("b_Job");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar2 = *(undefined4 *)(param_2 + 0xf4);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar2);
    plVar9 = operator_new(0x18);
    local_88 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("b_Level");
      *plVar9 = lVar8;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
    local_90 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400685c0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  longlong *local_60;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140068656;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140068656:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_loginout");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,3,1,4,&local_88);
  local_60 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,2,1,2,&local_88);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x16);
  uStack_84 = *(undefined4 *)(param_2 + 0x1a);
  uStack_80 = *(undefined4 *)(param_2 + 0x1e);
  uStack_7c = *(undefined4 *)(param_2 + 0x22);
  uVar10 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x26);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("channel_group");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,2,1,2,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x2a);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("channel_num");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_14006a8f0(local_58,param_2 + 99);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("bcust_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x32,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x2e);
  uStack_84 = *(undefined4 *)(param_2 + 0x32);
  uStack_80 = *(undefined4 *)(param_2 + 0x36);
  uStack_7c = *(undefined4 *)(param_2 + 0x3a);
  uVar10 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0x95);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x10,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x3e);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("inven_gold");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x42);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("storage_gold");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar1 = *(undefined1 *)(param_2 + 0x46);
  Ordinal_8(&local_88);
  if ((short)local_88 != 0x11) {
    iVar5 = Ordinal_9(&local_88);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_88 = CONCAT22(local_88._2_2_,0x11);
  }
  uStack_80 = CONCAT31(uStack_80._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,2,1,2,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar10 = *(undefined8 *)(param_2 + 0x47);
  Ordinal_8(&local_88);
  uVar10 = FUN_140182530(local_58,uVar10);
  iVar5 = Ordinal_10(&local_88,uVar10);
  if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  Ordinal_9(local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_exp");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0x14,1,8,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x4f);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("targetmap");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_88;
    uVar2 = *(undefined4 *)(param_2 + 0x53);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_68 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("playpoint");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_88;
    uVar2 = *(undefined4 *)(param_2 + 0x57);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_68 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("skillpoint");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_88;
    uVar2 = *(undefined4 *)(param_2 + 0x5b);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_68 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("guildpoint");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_90 = (longlong *)&local_88;
      uVar2 = *(undefined4 *)(param_2 + 0x5f);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,uVar2);
      plVar9 = operator_new(0x18);
      local_68 = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490(&DAT_140289e1c);
        *plVar9 = lVar8;
        plVar11 = plVar9;
      }
      local_res18 = plVar11;
      if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar11 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
      local_90 = plVar11;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar11 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar11 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140069b00(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  undefined8 uVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140069b96;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140069b96:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_cashbuy");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("log_type");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,3,1,4,&local_78);
  local_80 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_88 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x12);
  uStack_74 = *(undefined4 *)(param_2 + 0x16);
  uStack_70 = *(undefined4 *)(param_2 + 0x1a);
  uStack_6c = *(undefined4 *)(param_2 + 0x1e);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar9);
  local_88 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x22);
  uStack_74 = *(undefined4 *)(param_2 + 0x26);
  uStack_70 = *(undefined4 *)(param_2 + 0x2a);
  uStack_6c = *(undefined4 *)(param_2 + 0x2e);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("product_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x32);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("productcode");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x36);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("productcount");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  uVar9 = FUN_14006a8f0(local_58,param_2 + 0x46);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("bcust_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x32,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  uVar9 = FUN_1400623f0(local_58,param_2 + 0x78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_name");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  uVar9 = FUN_1400623f0(local_58,param_2 + 0x98);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("gift_recvname");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x3a);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("addopt1");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar1 = *(undefined4 *)(param_2 + 0x3e);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar1);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("addopt2");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = (longlong *)&local_78;
      uVar1 = *(undefined4 *)(param_2 + 0x42);
      Ordinal_8(&local_78);
      FUN_140062080(&local_78,uVar1);
      plVar8 = operator_new(0x18);
      local_88 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar7 = FUN_140201490("addopt3");
        *plVar8 = lVar7;
        plVar10 = plVar8;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
      local_90 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8
FUN_14006a8f0(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong lVar3;
  longlong *local_res18;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  Ordinal_8();
  plVar2 = operator_new(0x18);
  if (plVar2 == (longlong *)0x0) {
    plVar2 = (longlong *)0x0;
  }
  else {
    plVar2[1] = 0;
    *(undefined4 *)(plVar2 + 2) = 1;
    local_res18 = plVar2;
    lVar3 = FUN_140201490(param_2);
    *plVar2 = lVar3;
  }
  local_res18 = plVar2;
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  FUN_140062370(param_1,&local_res18,param_3,param_4,uVar4);
  LOCK();
  plVar1 = plVar2 + 2;
  lVar3 = *plVar1;
  *(int *)plVar1 = (int)*plVar1 + -1;
  UNLOCK();
  if ((int)lVar3 == 1) {
    if (*plVar2 != 0) {
      Ordinal_6();
    }
    if ((void *)plVar2[1] != (void *)0x0) {
      operator_delete__((void *)plVar2[1]);
    }
    operator_delete(plVar2);
  }
  return param_1;
}



undefined8 FUN_14006a9c0(undefined8 *param_1,longlong param_2)

{
  char cVar1;
  short sVar2;
  undefined4 uVar3;
  IUnknown *pIVar4;
  ULONG UVar5;
  int iVar6;
  undefined8 *puVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  undefined8 uVar11;
  longlong *plVar12;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  longlong *local_60 [2];
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  pIVar4 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  if (pIVar4 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar5 = (*pIVar4->lpVtbl[0xb].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14006aa56;
  }
  iVar6 = FUN_1400a1e90(param_1);
  if (iVar6 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14006aa56:
  local_res20 = (longlong *)0x0;
  iVar6 = FUN_140001970(&local_res20);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar7,"dbo.up_insert_log_dungeon");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_88;
  sVar2 = *(short *)(param_2 + 0xf);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,(int)sVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_60[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("log_type");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,3,1,4,&local_88);
  local_60[0] = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = local_40;
  local_88 = *(undefined4 *)(param_2 + 0x21);
  uStack_84 = *(undefined4 *)(param_2 + 0x25);
  uStack_80 = *(undefined4 *)(param_2 + 0x29);
  uStack_7c = *(undefined4 *)(param_2 + 0x2d);
  uVar11 = FUN_140062280(local_40,&local_88);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_60[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("intance_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar11);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar3 = *(undefined4 *)(param_2 + 0x19);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar3);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_68 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("world_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,local_60,&local_res18,2,1,2,&local_88);
  local_90 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar3 = *(undefined4 *)(param_2 + 0x1d);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar3);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_68 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("dungeonid");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,local_60,&local_res18,3,1,4,&local_88);
  local_90 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  sVar2 = *(short *)(param_2 + 0x11);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,(int)sVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_68 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("difficulty");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,local_60,&local_res18,0x10,1,1,&local_88);
  local_90 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 != (IUnknown *)0x0) {
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_90 = (longlong *)&local_88;
    cVar1 = *(char *)(param_2 + 0xe);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,(int)cVar1);
    plVar8 = operator_new(0x18);
    plVar10 = plVar12;
    local_68 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("membercountstart");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,local_60,&local_res18,0x10,1,1,&local_88);
    local_90 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_90 = (longlong *)&local_88;
    uVar3 = *(undefined4 *)(param_2 + 0x15);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar3);
    plVar8 = operator_new(0x18);
    plVar10 = plVar12;
    local_68 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("death");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,local_60,&local_res18,0x10,1,1,&local_88);
    local_90 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 != (IUnknown *)0x0) {
      UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_90 = (longlong *)&local_88;
      sVar2 = *(short *)(param_2 + 0x13);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,(int)sVar2);
      plVar10 = operator_new(0x18);
      local_68 = plVar10;
      if (plVar10 != (longlong *)0x0) {
        plVar10[1] = 0;
        *(undefined4 *)(plVar10 + 2) = 1;
        lVar9 = FUN_140201490("rebirth");
        *plVar10 = lVar9;
        plVar12 = plVar10;
      }
      local_res18 = plVar12;
      if (plVar12 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar12 = (longlong *)FUN_140001880(&local_res20,local_60,&local_res18,0x10,1,1,&local_88);
      local_90 = plVar12;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar4 = (IUnknown *)*puVar7;
      if (pIVar4 != (IUnknown *)0x0) {
        UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar12 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar12 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14006b450(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined2 uVar2;
  short sVar3;
  undefined4 uVar4;
  IUnknown *pIVar5;
  ULONG UVar6;
  int iVar7;
  undefined8 *puVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  undefined8 uVar12;
  longlong *plVar13;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  undefined4 local_98;
  undefined4 uStack_94;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  longlong *local_78;
  longlong *local_70;
  longlong local_68 [4];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar5 = *(IUnknown **)*param_1;
  plVar13 = (longlong *)0x0;
  if (pIVar5 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar6 = (*pIVar5->lpVtbl[0xb].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14006b4ec;
  }
  iVar7 = FUN_1400a1e90(param_1);
  if (iVar7 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14006b4ec:
  local_res20 = (longlong *)0x0;
  iVar7 = FUN_140001970(&local_res20);
  if ((iVar7 < 0) && (iVar7 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar7);
  }
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar8,"dbo.up_insert_log_dungeon_clear");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_98;
  uVar4 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar4);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_70 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("log_type");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,&local_98);
  local_70 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_78 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x12);
  uStack_94 = *(undefined4 *)(param_2 + 0x16);
  uStack_90 = *(undefined4 *)(param_2 + 0x1a);
  uStack_8c = *(undefined4 *)(param_2 + 0x1e);
  uVar12 = FUN_140062280(local_68,&local_98);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_70 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("instance_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar12);
  local_78 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = local_68;
  uVar12 = FUN_14006a8f0(local_68,param_2 + 0x22);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("bcust_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x32,uVar12);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x54);
  uStack_94 = *(undefined4 *)(param_2 + 0x58);
  uStack_90 = *(undefined4 *)(param_2 + 0x5c);
  uStack_8c = *(undefined4 *)(param_2 + 0x60);
  uVar12 = FUN_140062280(local_68,&local_98);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar12);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = local_68;
  uVar12 = FUN_1400623f0(local_68,param_2 + 100);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_name");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x10,uVar12);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar4 = *(undefined4 *)(param_2 + 0x84);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar4);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_class");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar4 = *(undefined4 *)(param_2 + 0x88);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar4);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_level");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar1 = *(undefined1 *)(param_2 + 0x8c);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x11) {
    iVar7 = Ordinal_9(&local_98);
    if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar7);
    }
    local_98 = CONCAT22(local_98._2_2_,0x11);
  }
  uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("membercountclear");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = local_68;
  uVar12 = FUN_1400623f0(local_68,param_2 + 0x8d);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("clearrank");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,4,uVar12);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined2 *)(param_2 + 0x95);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x12) {
    iVar7 = Ordinal_9(&local_98);
    if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar7);
    }
    local_98 = CONCAT22(local_98._2_2_,0x12);
  }
  uStack_90 = CONCAT22(uStack_90._2_2_,uVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("stylishpoint");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,2,1,2,&local_98);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined2 *)(param_2 + 0x97);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x12) {
    iVar7 = Ordinal_9(&local_98);
    if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar7);
    }
    local_98 = CONCAT22(local_98._2_2_,0x12);
  }
  uStack_90 = CONCAT22(uStack_90._2_2_,uVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("hitcount");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,2,1,2,&local_98);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined2 *)(param_2 + 0x99);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x12) {
    iVar7 = Ordinal_9(&local_98);
    if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar7);
    }
    local_98 = CONCAT22(local_98._2_2_,0x12);
  }
  uStack_90 = CONCAT22(uStack_90._2_2_,uVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("chain");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,2,1,2,&local_98);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 != (IUnknown *)0x0) {
    UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined2 *)(param_2 + 0x9b);
    Ordinal_8(&local_98);
    if ((short)local_98 != 0x12) {
      iVar7 = Ordinal_9(&local_98);
      if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar7);
      }
      local_98 = CONCAT22(local_98._2_2_,0x12);
    }
    uStack_90 = CONCAT22(uStack_90._2_2_,uVar2);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("killcount");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,2,1,2,&local_98);
    local_a0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar5 = (IUnknown *)*puVar8;
    if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar4 = *(undefined4 *)(param_2 + 0x9d);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar4);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("cleartime");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar5 = (IUnknown *)*puVar8;
    if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar4 = *(undefined4 *)(param_2 + 0xa1);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar4);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("cardid");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar5 = (IUnknown *)*puVar8;
    if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar4 = *(undefined4 *)(param_2 + 0xa5);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar4);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("cardrewardid");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar5 = (IUnknown *)*puVar8;
    if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar4 = *(undefined4 *)(param_2 + 0xa9);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar4);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("cardrewardcount");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar5 = (IUnknown *)*puVar8;
    if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar4 = *(undefined4 *)(param_2 + 0xad);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar4);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("addexp");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar5 = (IUnknown *)*puVar8;
    if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar1 = *(undefined1 *)(param_2 + 0xb1);
    Ordinal_8(&local_98);
    if ((short)local_98 != 0x11) {
      iVar7 = Ordinal_9(&local_98);
      if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar7);
      }
      local_98 = CONCAT22(local_98._2_2_,0x11);
    }
    uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("death");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
    local_a0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar5 = (IUnknown *)*puVar8;
    if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    sVar3 = *(short *)(param_2 + 0xb2);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,(int)sVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("rebirth");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,2,1,2,&local_98);
    local_a0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar5 = (IUnknown *)*puVar8;
    if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar1 = *(undefined1 *)(param_2 + 0xb4);
    Ordinal_8(&local_98);
    if ((short)local_98 != 0x11) {
      iVar7 = Ordinal_9(&local_98);
      if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar7);
      }
      local_98 = CONCAT22(local_98._2_2_,0x11);
    }
    uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("replay");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
    local_a0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar5 = (IUnknown *)*puVar8;
    if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar4 = *(undefined4 *)(param_2 + 0xb5);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar4);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("dungeonid");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar5 = (IUnknown *)*puVar8;
    if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar4 = *(undefined4 *)(param_2 + 0xb9);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar4);
    plVar9 = operator_new(0x18);
    plVar11 = plVar13;
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("difficulty");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar5 = (IUnknown *)*puVar8;
    if (pIVar5 != (IUnknown *)0x0) {
      UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar4 = *(undefined4 *)(param_2 + 0xbd);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar4);
      plVar11 = operator_new(0x18);
      local_78 = plVar11;
      if (plVar11 != (longlong *)0x0) {
        plVar11[1] = 0;
        *(undefined4 *)(plVar11 + 2) = 1;
        lVar10 = FUN_140201490("playpoint");
        *plVar11 = lVar10;
        plVar13 = plVar11;
      }
      local_res18 = plVar13;
      if (plVar13 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar13 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar13;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar5 = (IUnknown *)*puVar8;
      if (pIVar5 != (IUnknown *)0x0) {
        UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar13 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar13 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14006d260(undefined8 *param_1,longlong param_2)

{
  undefined2 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14006d2f6;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14006d2f6:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_guild");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,3,1,4,&local_78);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,3,1,4,&local_78);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x16);
  uStack_74 = *(undefined4 *)(param_2 + 0x1a);
  uStack_70 = *(undefined4 *)(param_2 + 0x1e);
  uStack_6c = *(undefined4 *)(param_2 + 0x22);
  uVar10 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Guild_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0x26);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Guild_Name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x14,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0x4e);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Guild_Master");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar2 = *(undefined4 *)(param_2 + 0x6e);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Guild_MemberCount");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar2 = *(undefined4 *)(param_2 + 0x72);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Guild_Level");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar10 = *(undefined8 *)(param_2 + 0x76);
    Ordinal_8(&local_78);
    uVar10 = FUN_140182530(local_58,uVar10);
    iVar5 = Ordinal_10(&local_78,uVar10);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    Ordinal_9(local_58);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Guild_Exp");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0x14,1,8,&local_78);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar1 = *(undefined2 *)(param_2 + 0x7e);
    Ordinal_8(&local_78);
    if ((short)local_78 != 0x12) {
      iVar5 = Ordinal_9(&local_78);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_78 = CONCAT22(local_78._2_2_,0x12);
    }
    uStack_70 = CONCAT22(uStack_70._2_2_,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Guild_SkillCount");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
      local_90 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_90 = local_58;
      uVar10 = FUN_1400623f0(local_58,param_2 + 0x80);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_88 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("Guild_Target");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar10);
      local_90 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_90 = local_58;
        uVar10 = FUN_1400623f0(local_58,param_2 + 0xa0);
        plVar7 = operator_new(0x18);
        plVar9 = plVar11;
        local_88 = plVar7;
        if (plVar7 != (longlong *)0x0) {
          plVar7[1] = 0;
          *(undefined4 *)(plVar7 + 2) = 1;
          lVar8 = FUN_140201490("Auth_Grade");
          *plVar7 = lVar8;
          plVar9 = plVar7;
        }
        local_res18 = plVar9;
        if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x14,uVar10);
        local_90 = plVar9;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_98 != (longlong *)0x0) {
            (**(code **)(*local_98 + 0x10))();
          }
          if ((longlong *)*plVar9 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar9 + 0x10))();
          }
          local_90 = (longlong *)&local_78;
          uVar2 = *(undefined4 *)(param_2 + 0xdc);
          Ordinal_8(&local_78);
          FUN_140062080(&local_78,uVar2);
          plVar9 = operator_new(0x18);
          local_88 = plVar9;
          if (plVar9 != (longlong *)0x0) {
            plVar9[1] = 0;
            *(undefined4 *)(plVar9 + 2) = 1;
            lVar8 = FUN_140201490("Guild_Point");
            *plVar9 = lVar8;
            plVar11 = plVar9;
          }
          local_res18 = plVar11;
          if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          plVar11 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
          local_90 = plVar11;
          if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
          pIVar3 = (IUnknown *)*puVar6;
          if (pIVar3 != (IUnknown *)0x0) {
            UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
            if ((int)UVar4 < 0) {
              _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
            }
            if (local_98 != (longlong *)0x0) {
              (**(code **)(*local_98 + 0x10))();
            }
            if ((longlong *)*plVar11 != (longlong *)0x0) {
              (**(code **)(*(longlong *)*plVar11 + 0x10))();
            }
            FUN_1400016d0(&local_res20,&local_res18);
            if (local_res18 != (longlong *)0x0) {
              (**(code **)(*local_res18 + 0x10))();
            }
            if (local_res20 != (longlong *)0x0) {
              (**(code **)(*local_res20 + 0x10))();
            }
            return 1;
          }
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14006e1c0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  longlong *local_60;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14006e256;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14006e256:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_learnguildskill");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x1b);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,3,1,4,&local_88);
  local_60 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x1f);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,3,1,4,&local_88);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x23);
  uStack_84 = *(undefined4 *)(param_2 + 0x27);
  uStack_80 = *(undefined4 *)(param_2 + 0x2b);
  uStack_7c = *(undefined4 *)(param_2 + 0x2f);
  uVar10 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("guild_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x33);
  uStack_84 = *(undefined4 *)(param_2 + 0x37);
  uStack_80 = *(undefined4 *)(param_2 + 0x3b);
  uStack_7c = *(undefined4 *)(param_2 + 0x3f);
  uVar10 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0x43);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x10,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_88;
    uVar2 = *(undefined4 *)(param_2 + 0xf);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_68 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("skill_table_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_88;
    uVar2 = *(undefined4 *)(param_2 + 0x13);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_68 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("skill_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,8,&local_88);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_90 = (longlong *)&local_88;
      uVar1 = *(undefined1 *)(param_2 + 0xe);
      Ordinal_8(&local_88);
      if ((short)local_88 != 0x11) {
        iVar5 = Ordinal_9(&local_88);
        if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar5);
        }
        local_88 = CONCAT22(local_88._2_2_,0x11);
      }
      uStack_80 = CONCAT31(uStack_80._1_3_,uVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_68 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("skill_level");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,2,1,2,&local_88);
      local_90 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_90 = (longlong *)&local_88;
        uVar2 = *(undefined4 *)(param_2 + 0x17);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,uVar2);
        plVar9 = operator_new(0x18);
        local_68 = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("learn_cost");
          *plVar9 = lVar8;
          plVar11 = plVar9;
        }
        local_res18 = plVar11;
        if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar11 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,0x10,&local_88);
        local_90 = plVar11;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_98 != (longlong *)0x0) {
            (**(code **)(*local_98 + 0x10))();
          }
          if ((longlong *)*plVar11 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar11 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14006ed90(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  undefined4 local_98;
  undefined4 uStack_94;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  longlong *local_78;
  longlong *local_70;
  longlong local_68 [4];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14006ee2a;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14006ee2a:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_items");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,&local_98);
  local_70 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_98);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x16);
  uStack_94 = *(undefined4 *)(param_2 + 0x1a);
  uStack_90 = *(undefined4 *)(param_2 + 0x1e);
  uStack_8c = *(undefined4 *)(param_2 + 0x22);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x26);
  uStack_94 = *(undefined4 *)(param_2 + 0x2a);
  uStack_90 = *(undefined4 *)(param_2 + 0x2e);
  uStack_8c = *(undefined4 *)(param_2 + 0x32);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  uVar10 = FUN_1400623f0(local_68,param_2 + 0x36);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x10,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x56);
  uStack_94 = *(undefined4 *)(param_2 + 0x5a);
  uStack_90 = *(undefined4 *)(param_2 + 0x5e);
  uStack_8c = *(undefined4 *)(param_2 + 0x62);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_guid");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x66);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_ID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x6a);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_header");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x6e);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("enchant_level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x72);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_active");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar1 = *(undefined1 *)(param_2 + 0x76);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x11) {
    iVar5 = Ordinal_9(&local_98);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_98 = CONCAT22(local_98._2_2_,0x11);
  }
  uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("socket_count");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar1 = *(undefined1 *)(param_2 + 0x77);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x11) {
    iVar5 = Ordinal_9(&local_98);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_98 = CONCAT22(local_98._2_2_,0x11);
  }
  uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_recon");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x78);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("durability");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x7c);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_140289530);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x80);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x84);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option2");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x88);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option3");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x8c);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option_value1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x90);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option_value2");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x94);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option_value3");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x98);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_option1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x9c);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_option2");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0xa0);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_option3");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xa4);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_value1");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xa8);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_value2");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xac);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_value3");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xb0);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_color1");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xb4);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_color2");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xb8);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_color3");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xbc);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_count");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xc0);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("before_money");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xc4);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("after_money");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 200);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("change_money");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xcc);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("before_date");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_a0 = (longlong *)&local_98;
        uVar2 = *(undefined4 *)(param_2 + 0xd0);
        Ordinal_8(&local_98);
        FUN_140062080(&local_98,uVar2);
        plVar7 = operator_new(0x18);
        plVar9 = plVar11;
        local_78 = plVar7;
        if (plVar7 != (longlong *)0x0) {
          plVar7[1] = 0;
          *(undefined4 *)(plVar7 + 2) = 1;
          lVar8 = FUN_140201490("after_date");
          *plVar7 = lVar8;
          plVar9 = plVar7;
        }
        local_res18 = plVar9;
        if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
        local_a0 = plVar9;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar9 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar9 + 0x10))();
          }
          local_a0 = (longlong *)&local_98;
          uVar2 = *(undefined4 *)(param_2 + 0xd4);
          Ordinal_8(&local_98);
          FUN_140062080(&local_98,uVar2);
          plVar9 = operator_new(0x18);
          local_78 = plVar9;
          if (plVar9 != (longlong *)0x0) {
            plVar9[1] = 0;
            *(undefined4 *)(plVar9 + 2) = 1;
            lVar8 = FUN_140201490("result");
            *plVar9 = lVar8;
            plVar11 = plVar9;
          }
          local_res18 = plVar11;
          if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
          local_a0 = plVar11;
          if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
          pIVar3 = (IUnknown *)*puVar6;
          if (pIVar3 != (IUnknown *)0x0) {
            UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
            if ((int)UVar4 < 0) {
              _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
            }
            if (local_a8 != (longlong *)0x0) {
              (**(code **)(*local_a8 + 0x10))();
            }
            if ((longlong *)*plVar11 != (longlong *)0x0) {
              (**(code **)(*(longlong *)*plVar11 + 0x10))();
            }
            FUN_1400016d0(&local_res20,&local_res18);
            if (local_res18 != (longlong *)0x0) {
              (**(code **)(*local_res18 + 0x10))();
            }
            if (local_res20 != (longlong *)0x0) {
              (**(code **)(*local_res20 + 0x10))();
            }
            return 1;
          }
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140071900(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  short sVar2;
  undefined2 uVar3;
  undefined4 uVar4;
  IUnknown *pIVar5;
  ULONG UVar6;
  int iVar7;
  undefined8 *puVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  undefined8 uVar12;
  longlong *plVar13;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  undefined4 local_98;
  undefined4 uStack_94;
  undefined8 uStack_90;
  longlong *local_78;
  longlong *local_70;
  longlong local_68 [4];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar5 = *(IUnknown **)*param_1;
  plVar13 = (longlong *)0x0;
  if (pIVar5 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar6 = (*pIVar5->lpVtbl[0xb].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14007199b;
  }
  iVar7 = FUN_1400a1e90(param_1);
  if (iVar7 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14007199b:
  local_res20 = (longlong *)0x0;
  iVar7 = FUN_140001970(&local_res20);
  if ((iVar7 < 0) && (iVar7 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar7);
  }
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar8,"dbo.up_insert_log_item_enchant");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_98;
  sVar2 = *(short *)(param_2 + 0xe);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,(int)sVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_70 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("world");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,&local_98);
  local_70 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_78 = (longlong *)&local_98;
  uVar12 = *(undefined8 *)(param_2 + 0x10);
  Ordinal_8(&local_98);
  if (((short)local_98 != 5) && ((short)local_98 != 7)) {
    iVar7 = Ordinal_9(&local_98);
    if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar7);
    }
    local_98 = CONCAT22(local_98._2_2_,5);
  }
  uStack_90 = uVar12;
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_70 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490(&DAT_14028a328);
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,5,1,8,&local_98);
  local_78 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x1c);
  uStack_94 = *(undefined4 *)(param_2 + 0x20);
  uStack_90 = *(undefined8 *)(param_2 + 0x24);
  uVar12 = FUN_140062280(local_68,&local_98);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("AuthID");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar12);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x2c);
  uStack_94 = *(undefined4 *)(param_2 + 0x30);
  uStack_90 = *(undefined8 *)(param_2 + 0x34);
  uVar12 = FUN_140062280(local_68,&local_98);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("CharID");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar12);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = local_68;
  uVar12 = FUN_1400623f0(local_68,param_2 + 0x3c);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490(&DAT_14028a330);
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x10,uVar12);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar4 = *(undefined4 *)(param_2 + 0x18);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar4);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490(&DAT_14028a338);
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,2,1,2,&local_98);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0xc0);
  uStack_94 = *(undefined4 *)(param_2 + 0xc4);
  uStack_90 = *(undefined8 *)(param_2 + 200);
  uVar12 = FUN_140062280(local_68,&local_98);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("ItemID");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar12);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar3 = *(undefined2 *)(param_2 + 0xd0);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x12) {
    iVar7 = Ordinal_9(&local_98);
    if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar7);
    }
    local_98 = CONCAT22(local_98._2_2_,0x12);
  }
  uStack_90 = CONCAT62(uStack_90._2_6_,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Item_kind");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar1 = *(undefined1 *)(param_2 + 0xd2);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x11) {
    iVar7 = Ordinal_9(&local_98);
    if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar7);
    }
    local_98 = CONCAT22(local_98._2_2_,0x11);
  }
  uStack_90 = CONCAT71(uStack_90._1_7_,uVar1);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("enchant_level");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar4 = *(undefined4 *)(param_2 + 0xd3);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar4);
  plVar9 = operator_new(0x18);
  plVar11 = plVar13;
  local_78 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490(&DAT_14028a354);
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
  local_a0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_a0 = local_68;
  uVar12 = FUN_1400623f0(local_68,param_2 + 0x5c);
  plVar11 = operator_new(0x18);
  local_78 = plVar11;
  if (plVar11 != (longlong *)0x0) {
    plVar11[1] = 0;
    *(undefined4 *)(plVar11 + 2) = 1;
    lVar10 = FUN_140201490("bcust_id");
    *plVar11 = lVar10;
    plVar13 = plVar11;
  }
  local_res18 = plVar13;
  if (plVar13 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar13 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x32,uVar12);
  local_a0 = plVar13;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar5 = (IUnknown *)*puVar8;
  if (pIVar5 != (IUnknown *)0x0) {
    UVar6 = (*pIVar5->lpVtbl[3].AddRef)(pIVar5);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar5,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar13 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar13 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140072790(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  undefined4 local_98;
  undefined4 uStack_94;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  longlong *local_78;
  longlong *local_70;
  longlong local_68 [4];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14007282a;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14007282a:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_item");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x10);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,&local_98);
  local_70 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x14);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,2,1,2,&local_98);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x18);
  uStack_94 = *(undefined4 *)(param_2 + 0x1c);
  uStack_90 = *(undefined4 *)(param_2 + 0x20);
  uStack_8c = *(undefined4 *)(param_2 + 0x24);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  uVar10 = FUN_1400623f0(local_68,param_2 + 0x28);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("bcust_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x81,1,0x32,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x8c);
  uStack_94 = *(undefined4 *)(param_2 + 0x90);
  uStack_90 = *(undefined4 *)(param_2 + 0x94);
  uStack_8c = *(undefined4 *)(param_2 + 0x98);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  uVar10 = FUN_1400623f0(local_68,param_2 + 0x9c);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x10,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0xbc);
  uStack_94 = *(undefined4 *)(param_2 + 0xc0);
  uStack_90 = *(undefined4 *)(param_2 + 0xc4);
  uStack_8c = *(undefined4 *)(param_2 + 200);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_guid");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0xcc);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0xd0);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_header");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar1 = *(undefined1 *)(param_2 + 0xd4);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x11) {
    iVar5 = Ordinal_9(&local_98);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_98 = CONCAT22(local_98._2_2_,0x11);
  }
  uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("enchant_level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,2,1,2,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0xd5);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_active");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar1 = *(undefined1 *)(param_2 + 0xd9);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x11) {
    iVar5 = Ordinal_9(&local_98);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_98 = CONCAT22(local_98._2_2_,0x11);
  }
  uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("socket_count");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,2,1,2,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar1 = *(undefined1 *)(param_2 + 0xda);
    Ordinal_8(&local_98);
    if ((short)local_98 != 0x11) {
      iVar5 = Ordinal_9(&local_98);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_98 = CONCAT22(local_98._2_2_,0x11);
    }
    uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("remain_recon");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,2,1,2,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xdb);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_option1");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xdf);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_option2");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xe3);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_option3");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xf3);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_count");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xf7);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("target_itemid");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xfb);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("before_money");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xff);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("after_money");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0x103);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("change_money");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0x107);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("result");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xe7);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("item_option_value1");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xeb);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("item_option_value2");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_a0 = (longlong *)&local_98;
        uVar2 = *(undefined4 *)(param_2 + 0xef);
        Ordinal_8(&local_98);
        FUN_140062080(&local_98,uVar2);
        plVar9 = operator_new(0x18);
        local_78 = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("item_option_value3");
          *plVar9 = lVar8;
          plVar11 = plVar9;
        }
        local_res18 = plVar11;
        if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
        local_a0 = plVar11;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar11 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar11 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140074660(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  undefined4 local_98;
  undefined4 uStack_94;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  longlong *local_78;
  longlong *local_70;
  longlong local_68 [4];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400746fa;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400746fa:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_itemtrade");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,&local_98);
  local_70 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_98);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x16);
  uStack_94 = *(undefined4 *)(param_2 + 0x1a);
  uStack_90 = *(undefined4 *)(param_2 + 0x1e);
  uStack_8c = *(undefined4 *)(param_2 + 0x22);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  uVar10 = FUN_1400623f0(local_68,param_2 + 0x36);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("bcust_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x32,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x26);
  uStack_94 = *(undefined4 *)(param_2 + 0x2a);
  uStack_90 = *(undefined4 *)(param_2 + 0x2e);
  uStack_8c = *(undefined4 *)(param_2 + 0x32);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  uVar10 = FUN_1400623f0(local_68,param_2 + 0x9a);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x10,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0xba);
  uStack_94 = *(undefined4 *)(param_2 + 0xbe);
  uStack_90 = *(undefined4 *)(param_2 + 0xc2);
  uStack_8c = *(undefined4 *)(param_2 + 0xc6);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("other_auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  uVar10 = FUN_1400623f0(local_68,param_2 + 0xda);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("other_bcust_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x32,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0xca);
  uStack_94 = *(undefined4 *)(param_2 + 0xce);
  uStack_90 = *(undefined4 *)(param_2 + 0xd2);
  uStack_8c = *(undefined4 *)(param_2 + 0xd6);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("other_character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  uVar10 = FUN_1400623f0(local_68,param_2 + 0x13e);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("other_character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x10,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x15e);
  uStack_94 = *(undefined4 *)(param_2 + 0x162);
  uStack_90 = *(undefined4 *)(param_2 + 0x166);
  uStack_8c = *(undefined4 *)(param_2 + 0x16a);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_guid");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x16e);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_ID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x172);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_header");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x176);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("enchant_level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x17a);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_active");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x17e);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("socket_count");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x182);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_recon");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x186);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("durability");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x18a);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x18e);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option2");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x192);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option3");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x196);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option_value1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x19a);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option_value2");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x19e);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option_value3");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x1a2);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_option1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x1a6);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_option2");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x1aa);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_option3");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x1ae);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_value1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0x1b2);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_value2");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0x1b6);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_value3");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar1 = *(undefined1 *)(param_2 + 0x1ba);
    Ordinal_8(&local_98);
    if ((short)local_98 != 0x11) {
      iVar5 = Ordinal_9(&local_98);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_98 = CONCAT22(local_98._2_2_,0x11);
    }
    uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_color1");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar1 = *(undefined1 *)(param_2 + 0x1bb);
    Ordinal_8(&local_98);
    if ((short)local_98 != 0x11) {
      iVar5 = Ordinal_9(&local_98);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_98 = CONCAT22(local_98._2_2_,0x11);
    }
    uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_color2");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar1 = *(undefined1 *)(param_2 + 0x1bc);
      Ordinal_8(&local_98);
      if ((short)local_98 != 0x11) {
        iVar5 = Ordinal_9(&local_98);
        if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar5);
        }
        local_98 = CONCAT22(local_98._2_2_,0x11);
      }
      uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("item_socket_color3");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar10 = *(undefined8 *)(param_2 + 0x1c1);
      Ordinal_8(&local_98);
      uVar10 = FUN_140182530(local_68,uVar10);
      iVar5 = Ordinal_10(&local_98,uVar10);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      Ordinal_9(local_68);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("before_money");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar10 = *(undefined8 *)(param_2 + 0x1c9);
      Ordinal_8(&local_98);
      uVar10 = FUN_140182530(local_68,uVar10);
      iVar5 = Ordinal_10(&local_98,uVar10);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      Ordinal_9(local_68);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("after_money");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar10 = *(undefined8 *)(param_2 + 0x1d1);
      Ordinal_8(&local_98);
      uVar10 = FUN_140182530(local_68,uVar10);
      iVar5 = Ordinal_10(&local_98,uVar10);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      Ordinal_9(local_68);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("change_money");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_a0 = (longlong *)&local_98;
        uVar2 = *(undefined4 *)(param_2 + 0x1bd);
        Ordinal_8(&local_98);
        FUN_140062080(&local_98,uVar2);
        plVar9 = operator_new(0x18);
        local_78 = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("item_count");
          *plVar9 = lVar8;
          plVar11 = plVar9;
        }
        local_res18 = plVar11;
        if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
        local_a0 = plVar11;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar11 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar11 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140077390(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_b8;
  longlong *local_b0;
  undefined4 local_a8;
  undefined4 uStack_a4;
  undefined4 uStack_a0;
  undefined4 uStack_9c;
  longlong *local_88;
  longlong *local_80;
  longlong local_78 [4];
  undefined8 local_58;
  
  local_58 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14007742d;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14007742d:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_pet");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,3,1,4,&local_a8);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_b8,&local_res18,3,1,4,&local_a8);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = local_78;
  local_a8 = *(undefined4 *)(param_2 + 0x16);
  uStack_a4 = *(undefined4 *)(param_2 + 0x1a);
  uStack_a0 = *(undefined4 *)(param_2 + 0x1e);
  uStack_9c = *(undefined4 *)(param_2 + 0x22);
  uVar10 = FUN_140062280(local_78,&local_a8);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = local_78;
  uVar10 = FUN_1400623f0(local_78,param_2 + 0x36);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("bcust_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x32,uVar10);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = local_78;
  local_a8 = *(undefined4 *)(param_2 + 0x26);
  uStack_a4 = *(undefined4 *)(param_2 + 0x2a);
  uStack_a0 = *(undefined4 *)(param_2 + 0x2e);
  uStack_9c = *(undefined4 *)(param_2 + 0x32);
  uVar10 = FUN_140062280(local_78,&local_a8);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = local_78;
  uVar10 = FUN_1400623f0(local_78,param_2 + 0x9a);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar10);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = local_78;
  local_a8 = *(undefined4 *)(param_2 + 0xba);
  uStack_a4 = *(undefined4 *)(param_2 + 0xbe);
  uStack_a0 = *(undefined4 *)(param_2 + 0xc2);
  uStack_9c = *(undefined4 *)(param_2 + 0xc6);
  uVar10 = FUN_140062280(local_78,&local_a8);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("PetID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = local_78;
  uVar10 = FUN_1400623f0(local_78,param_2 + 0xca);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_Name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar10);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0xea);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_ID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0xee);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_Level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar10 = *(undefined8 *)(param_2 + 0xf2);
  Ordinal_8(&local_a8);
  uVar10 = FUN_140182530(local_78,uVar10);
  iVar5 = Ordinal_10(&local_a8,uVar10);
  if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  Ordinal_9(local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_Exp");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0xfa);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_Step");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0xfe);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_Health");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x102);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_Strength");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x106);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_PetSpeaking");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x10a);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_PetNature");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x10e);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_PetInt");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x112);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_PetBrawn");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x116);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_Charm");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x11a);
  Ordinal_8(&local_a8);
  if ((short)local_a8 != 4) {
    iVar5 = Ordinal_9(&local_a8);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_a8 = CONCAT22(local_a8._2_2_,4);
  }
  uStack_a0 = uVar2;
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_Height");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,4,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x11e);
  Ordinal_8(&local_a8);
  if ((short)local_a8 != 4) {
    iVar5 = Ordinal_9(&local_a8);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_a8 = CONCAT22(local_a8._2_2_,4);
  }
  uStack_a0 = uVar2;
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_Weight");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,4,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x122);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_HP");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b0 != (longlong *)0x0) {
    (**(code **)(*local_b0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x126);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Pet_MP");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b8 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x12a);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_PhysicalAttack");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x12e);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_PhysicalDefense");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x132);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_MagicAttack");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x136);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_MagicDefense");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x13a);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_Critical");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x13e);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_Loyalty");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x142);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_ChangeHealth");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x146);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_ChangeStrength");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x14a);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_ChangePetSpeaking");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x14e);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_ChangePetNature");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x152);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_ChangePetInt");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x156);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_ChangePetBrawn");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x15a);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_ChangeCharm");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b8 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x15e);
    Ordinal_8(&local_a8);
    if ((short)local_a8 != 4) {
      iVar5 = Ordinal_9(&local_a8);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_a8 = CONCAT22(local_a8._2_2_,4);
    }
    uStack_a0 = uVar2;
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("Pet_ChangeHeight");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,4,1,4,&local_a8);
    local_b8 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_b0 != (longlong *)0x0) {
        (**(code **)(*local_b0 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_b8 = (longlong *)&local_a8;
      uVar2 = *(undefined4 *)(param_2 + 0x162);
      Ordinal_8(&local_a8);
      if ((short)local_a8 != 4) {
        iVar5 = Ordinal_9(&local_a8);
        if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar5);
        }
        local_a8 = CONCAT22(local_a8._2_2_,4);
      }
      uStack_a0 = uVar2;
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_88 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("Pet_ChangeWeight");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,4,1,4,&local_a8);
      local_b8 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_b0 != (longlong *)0x0) {
        (**(code **)(*local_b0 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_b8 = (longlong *)&local_a8;
      uVar2 = *(undefined4 *)(param_2 + 0x166);
      Ordinal_8(&local_a8);
      FUN_140062080(&local_a8,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_88 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("Pet_ChangeHP");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
      local_b8 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_b0 != (longlong *)0x0) {
        (**(code **)(*local_b0 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_b8 = (longlong *)&local_a8;
      uVar2 = *(undefined4 *)(param_2 + 0x16a);
      Ordinal_8(&local_a8);
      FUN_140062080(&local_a8,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_88 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("Pet_ChangeMP");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
      local_b8 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_b0 != (longlong *)0x0) {
          (**(code **)(*local_b0 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_b8 = (longlong *)&local_a8;
        uVar2 = *(undefined4 *)(param_2 + 0x16e);
        Ordinal_8(&local_a8);
        FUN_140062080(&local_a8,uVar2);
        plVar9 = operator_new(0x18);
        local_88 = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("Pet_ChangePhysicalAttack");
          *plVar9 = lVar8;
          plVar11 = plVar9;
        }
        local_res18 = plVar11;
        if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar11 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
        local_b8 = plVar11;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b0);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_b0 != (longlong *)0x0) {
            (**(code **)(*local_b0 + 0x10))();
          }
          if ((longlong *)*plVar11 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar11 + 0x10))();
          }
          local_res18 = (longlong *)&local_a8;
          uVar2 = *(undefined4 *)(param_2 + 0x172);
          Ordinal_8(&local_a8);
          FUN_140062080(&local_a8,uVar2);
          uVar10 = FUN_140001000(&local_b8,"Pet_ChangePhysicalDefense");
          uVar10 = FUN_140001880(&local_res20,&local_88,uVar10,3,1,4,&local_a8);
          FUN_1400017e0(&local_res20,uVar10);
          local_res18 = (longlong *)&local_a8;
          uVar2 = *(undefined4 *)(param_2 + 0x176);
          Ordinal_8(&local_a8);
          FUN_140062080(&local_a8,uVar2);
          uVar10 = FUN_140001000(&local_b8,"Pet_ChangeMagicAttack");
          uVar10 = FUN_140001880(&local_res20,&local_88,uVar10,3,1,4,&local_a8);
          FUN_1400017e0(&local_res20,uVar10);
          local_res18 = (longlong *)&local_a8;
          uVar2 = *(undefined4 *)(param_2 + 0x17a);
          Ordinal_8(&local_a8);
          FUN_140062080(&local_a8,uVar2);
          uVar10 = FUN_140001000(&local_b8,"Pet_ChangeMagicDefense");
          uVar10 = FUN_140001880(&local_res20,&local_88,uVar10,3,1,4,&local_a8);
          FUN_1400017e0(&local_res20,uVar10);
          local_res18 = (longlong *)&local_a8;
          uVar2 = *(undefined4 *)(param_2 + 0x17e);
          Ordinal_8(&local_a8);
          FUN_140062080(&local_a8,uVar2);
          uVar10 = FUN_140001000(&local_b8,"Pet_ChangeCritical");
          uVar10 = FUN_140001880(&local_res20,&local_88,uVar10,3,1,4,&local_a8);
          FUN_1400017e0(&local_res20,uVar10);
          local_res18 = (longlong *)&local_a8;
          uVar2 = *(undefined4 *)(param_2 + 0x182);
          Ordinal_8(&local_a8);
          FUN_140062080(&local_a8,uVar2);
          uVar10 = FUN_140001000(&local_b8,"Pet_ChangeLoyalty");
          uVar10 = FUN_140001880(&local_res20,&local_88,uVar10,3,1,4,&local_a8);
          FUN_1400017e0(&local_res20,uVar10);
          local_res18 = (longlong *)&local_a8;
          uVar2 = *(undefined4 *)(param_2 + 0x186);
          Ordinal_8(&local_a8);
          FUN_140062080(&local_a8,uVar2);
          uVar10 = FUN_140001000(&local_b8,"Pet_Slot");
          uVar10 = FUN_140001880(&local_res20,&local_88,uVar10,3,1,4,&local_a8);
          FUN_1400017e0(&local_res20,uVar10);
          local_res18 = (longlong *)&local_a8;
          uVar1 = *(undefined1 *)(param_2 + 0x18a);
          Ordinal_8(&local_a8);
          FUN_140062080(&local_a8,uVar1);
          uVar10 = FUN_140001000(&local_b8,"Pet_Pick");
          uVar10 = FUN_140001880(&local_res20,&local_88,uVar10,0x10,1,1,&local_a8);
          FUN_1400017e0(&local_res20,uVar10);
          local_res18 = (longlong *)&local_a8;
          uVar2 = *(undefined4 *)(param_2 + 0x18b);
          Ordinal_8(&local_a8);
          FUN_140062080(&local_a8,uVar2);
          uVar10 = FUN_140001000(&local_b8,"Pet_Period");
          uVar10 = FUN_140001880(&local_res20,&local_88,uVar10,3,1,4,&local_a8);
          FUN_1400017e0(&local_res20,uVar10);
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14007a8b0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  undefined8 uVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14007a946;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14007a946:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_Account");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("log_type");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,3,1,4,&local_78);
  local_80 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_88 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("log_result");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,3,1,4,&local_78);
  local_88 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x16);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("world_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x1a);
  uStack_74 = *(undefined4 *)(param_2 + 0x1e);
  uStack_70 = *(undefined4 *)(param_2 + 0x22);
  uStack_6c = *(undefined4 *)(param_2 + 0x26);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  uVar9 = FUN_1400623f0(local_58,param_2 + 0x3a);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("bcust_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x32,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_58;
    local_78 = *(undefined4 *)(param_2 + 0x2a);
    uStack_74 = *(undefined4 *)(param_2 + 0x2e);
    uStack_70 = *(undefined4 *)(param_2 + 0x32);
    uStack_6c = *(undefined4 *)(param_2 + 0x36);
    uVar9 = FUN_140062280(local_58,&local_78);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("character_id");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_58;
    uVar9 = FUN_1400623f0(local_58,param_2 + 0x9e);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("character_name");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = (longlong *)&local_78;
      uVar1 = *(undefined4 *)(param_2 + 0xbe);
      Ordinal_8(&local_78);
      FUN_140062080(&local_78,uVar1);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("character_class");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = (longlong *)&local_78;
      uVar1 = *(undefined4 *)(param_2 + 0xc2);
      Ordinal_8(&local_78);
      FUN_140062080(&local_78,uVar1);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("character_job");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = (longlong *)&local_78;
      uVar1 = *(undefined4 *)(param_2 + 0xc6);
      Ordinal_8(&local_78);
      FUN_140062080(&local_78,uVar1);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("character_level");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar8 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar8 + 0x10))();
        }
        local_90 = (longlong *)&local_78;
        uVar1 = *(undefined4 *)(param_2 + 0xd2);
        Ordinal_8(&local_78);
        FUN_140062080(&local_78,uVar1);
        plVar6 = operator_new(0x18);
        plVar8 = plVar10;
        local_88 = plVar6;
        if (plVar6 != (longlong *)0x0) {
          plVar6[1] = 0;
          *(undefined4 *)(plVar6 + 2) = 1;
          lVar7 = FUN_140201490("nChange");
          *plVar6 = lVar7;
          plVar8 = plVar6;
        }
        local_res18 = plVar8;
        if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
        local_90 = plVar8;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar8 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar8 + 0x10))();
        }
        local_90 = (longlong *)&local_78;
        uVar1 = *(undefined4 *)(param_2 + 0xca);
        Ordinal_8(&local_78);
        FUN_140062080(&local_78,uVar1);
        plVar6 = operator_new(0x18);
        plVar8 = plVar10;
        local_88 = plVar6;
        if (plVar6 != (longlong *)0x0) {
          plVar6[1] = 0;
          *(undefined4 *)(plVar6 + 2) = 1;
          lVar7 = FUN_140201490("nBefore");
          *plVar6 = lVar7;
          plVar8 = plVar6;
        }
        local_res18 = plVar8;
        if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
        local_90 = plVar8;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_98 != (longlong *)0x0) {
            (**(code **)(*local_98 + 0x10))();
          }
          if ((longlong *)*plVar8 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar8 + 0x10))();
          }
          local_90 = (longlong *)&local_78;
          uVar1 = *(undefined4 *)(param_2 + 0xce);
          Ordinal_8(&local_78);
          FUN_140062080(&local_78,uVar1);
          plVar8 = operator_new(0x18);
          local_88 = plVar8;
          if (plVar8 != (longlong *)0x0) {
            plVar8[1] = 0;
            *(undefined4 *)(plVar8 + 2) = 1;
            lVar7 = FUN_140201490("nAfter");
            *plVar8 = lVar7;
            plVar10 = plVar8;
          }
          local_res18 = plVar10;
          if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
          local_90 = plVar10;
          if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
          pIVar2 = (IUnknown *)*puVar5;
          if (pIVar2 != (IUnknown *)0x0) {
            UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
            if ((int)UVar3 < 0) {
              _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
            }
            if (local_98 != (longlong *)0x0) {
              (**(code **)(*local_98 + 0x10))();
            }
            if ((longlong *)*plVar10 != (longlong *)0x0) {
              (**(code **)(*(longlong *)*plVar10 + 0x10))();
            }
            FUN_1400016d0(&local_res20,&local_res18);
            if (local_res18 != (longlong *)0x0) {
              (**(code **)(*local_res18 + 0x10))();
            }
            if (local_res20 != (longlong *)0x0) {
              (**(code **)(*local_res20 + 0x10))();
            }
            return 1;
          }
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14007b910(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_78;
  longlong *local_70;
  longlong local_68 [3];
  longlong *local_50;
  longlong *local_48 [3];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar9 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14007b9a6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14007b9a6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_pvp_ladder");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_78 = local_68;
  uVar1 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(local_68);
  FUN_140062080(local_68,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_48[0] = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("req_game");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_50,&local_res18,3,1,4,local_68);
  local_48[0] = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_50 = local_68;
  uVar1 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(local_68);
  FUN_140062080(local_68,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_48[0] = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("cancel_game");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,local_68);
  local_50 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_70 = local_68;
  uVar1 = *(undefined4 *)(param_2 + 0x16);
  Ordinal_8(local_68);
  FUN_140062080(local_68,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_50 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("start_game");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,local_48,&local_res18,3,1,4,local_68);
  local_70 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_70 = local_68;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_68);
  FUN_140062080(local_68,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_50 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("killend_game");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,local_48,&local_res18,3,1,4,local_68);
  local_70 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_70 = local_68;
  uVar1 = *(undefined4 *)(param_2 + 0x22);
  Ordinal_8(local_68);
  FUN_140062080(local_68,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_50 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("timeend_game");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,local_48,&local_res18,3,1,4,local_68);
  local_70 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_78 != (longlong *)0x0) {
      (**(code **)(*local_78 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_70 = local_68;
    uVar1 = *(undefined4 *)(param_2 + 0x1a);
    Ordinal_8(local_68);
    FUN_140062080(local_68,uVar1);
    plVar8 = operator_new(0x18);
    local_50 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar7 = FUN_140201490("point");
      *plVar8 = lVar7;
      plVar9 = plVar8;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,local_48,&local_res18,3,1,4,local_68);
    local_70 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_78 != (longlong *)0x0) {
        (**(code **)(*local_78 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14007c160(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  undefined8 uVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14007c1f6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14007c1f6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_inquiry");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("log_type");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,3,1,4,&local_78);
  local_80 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_88 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("world_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,3,1,4,&local_78);
  local_88 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x16);
  uStack_74 = *(undefined4 *)(param_2 + 0x1a);
  uStack_70 = *(undefined4 *)(param_2 + 0x1e);
  uStack_6c = *(undefined4 *)(param_2 + 0x22);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  uVar9 = FUN_1400623f0(local_58,param_2 + 0x62);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("bcust_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x32,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x26);
  uStack_74 = *(undefined4 *)(param_2 + 0x2a);
  uStack_70 = *(undefined4 *)(param_2 + 0x2e);
  uStack_6c = *(undefined4 *)(param_2 + 0x32);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_58;
    uVar9 = FUN_1400623f0(local_58,param_2 + 0x42);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("character_name");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar1 = *(undefined4 *)(param_2 + 0x3a);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar1);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("character_class");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar1 = *(undefined4 *)(param_2 + 0x3e);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar1);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("character_job");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = (longlong *)&local_78;
      uVar1 = *(undefined4 *)(param_2 + 0x36);
      Ordinal_8(&local_78);
      FUN_140062080(&local_78,uVar1);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("character_level");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = local_58;
      uVar9 = FUN_1400623f0(local_58,param_2 + 0xc6);
      plVar8 = operator_new(0x18);
      local_88 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar7 = FUN_140201490("inquiry_memo");
        *plVar8 = lVar7;
        plVar10 = plVar8;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0xff,uVar9);
      local_90 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14007ce30(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  undefined8 uVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_178;
  longlong *local_170;
  undefined4 local_168;
  undefined4 uStack_164;
  undefined4 uStack_160;
  undefined4 uStack_15c;
  longlong *local_148;
  longlong *local_140;
  longlong local_138 [5];
  undefined8 local_110;
  undefined4 local_108;
  undefined4 uStack_104;
  undefined4 uStack_100;
  undefined4 uStack_fc;
  undefined4 local_f0;
  short local_ec;
  undefined4 local_e4;
  short local_e0;
  undefined4 local_dc;
  undefined4 local_d8;
  undefined4 local_d4;
  undefined4 local_d0;
  undefined4 local_cc;
  undefined4 local_c8;
  undefined4 local_c4;
  undefined1 local_c0;
  undefined4 local_bc;
  undefined4 local_b8;
  undefined4 local_b4;
  undefined4 local_b0;
  undefined4 local_ac;
  undefined4 local_a8;
  undefined1 local_a4;
  undefined1 local_a3;
  undefined1 local_a2;
  undefined1 local_9c;
  undefined2 local_8c;
  short local_74;
  
  local_110 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14007cec8;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14007cec8:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  memcpy(&local_108,(void *)(param_2 + 0x6a),0xd4);
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_guild_storage_items");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_178 = (longlong *)&local_168;
  uVar1 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_140 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("log_type");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_148,&local_res18,3,1,4,&local_168);
  local_140 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_148 = (longlong *)&local_168;
  uVar1 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_140 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("world_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_170,&local_res18,3,1,4,&local_168);
  local_148 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = local_138;
  local_168 = *(undefined4 *)(param_2 + 0x1a);
  uStack_164 = *(undefined4 *)(param_2 + 0x1e);
  uStack_160 = *(undefined4 *)(param_2 + 0x22);
  uStack_15c = *(undefined4 *)(param_2 + 0x26);
  uVar9 = FUN_140062280(local_138,&local_168);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("guild_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,0xca,1,0x26,uVar9);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = local_138;
  local_168 = *(undefined4 *)(param_2 + 0x2a);
  uStack_164 = *(undefined4 *)(param_2 + 0x2e);
  uStack_160 = *(undefined4 *)(param_2 + 0x32);
  uStack_15c = *(undefined4 *)(param_2 + 0x36);
  uVar9 = FUN_140062280(local_138,&local_168);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,0xca,1,0x26,uVar9);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = local_138;
  local_168 = *(undefined4 *)(param_2 + 0x3a);
  uStack_164 = *(undefined4 *)(param_2 + 0x3e);
  uStack_160 = *(undefined4 *)(param_2 + 0x42);
  uStack_15c = *(undefined4 *)(param_2 + 0x46);
  uVar9 = FUN_140062280(local_138,&local_168);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,0xca,1,0x26,uVar9);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = local_138;
  uVar9 = FUN_1400623f0(local_138,param_2 + 0x4a);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_name");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,0xca,1,0x10,uVar9);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  uVar1 = *(undefined4 *)(param_2 + 0x16);
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("move_count");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = local_138;
  local_168 = local_108;
  uStack_164 = uStack_104;
  uStack_160 = uStack_100;
  uStack_15c = uStack_fc;
  uVar9 = FUN_140062280(local_138,&local_168);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_guid");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,0xca,1,0x26,uVar9);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_f0);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_ID");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_dc);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_header");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,(int)local_e0);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("enchant_level");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  if ((short)local_168 != 0x12) {
    iVar4 = Ordinal_9(&local_168);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_168 = CONCAT22(local_168._2_2_,0x12);
  }
  uStack_160 = CONCAT22(uStack_160._2_2_,local_8c);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_active");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  if ((short)local_168 != 0x11) {
    iVar4 = Ordinal_9(&local_168);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_168 = CONCAT22(local_168._2_2_,0x11);
  }
  uStack_160 = CONCAT31(uStack_160._1_3_,local_c0);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("socket_count");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,0x10,1,1,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  if ((short)local_168 != 0x11) {
    iVar4 = Ordinal_9(&local_168);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_168 = CONCAT22(local_168._2_2_,0x11);
  }
  uStack_160 = CONCAT31(uStack_160._1_3_,local_9c);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_recon");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,0x10,1,1,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_e4);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("durability");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,(int)local_74);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490(&DAT_140289530);
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_d8);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_option1");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_d4);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_option2");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_d0);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_option3");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_cc);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_option_value1");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_c8);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_option_value2");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_c4);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_option_value3");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_bc);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_socket_option1");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_b8);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_socket_option2");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_b4);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_socket_option3");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_b0);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_socket_value1");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_ac);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_socket_value2");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  FUN_140062080(&local_168,local_a8);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_socket_value3");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  if ((short)local_168 != 0x11) {
    iVar4 = Ordinal_9(&local_168);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_168 = CONCAT22(local_168._2_2_,0x11);
  }
  uStack_160 = CONCAT31(uStack_160._1_3_,local_a4);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_socket_color1");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_170 = (longlong *)&local_168;
  Ordinal_8(&local_168);
  if ((short)local_168 != 0x11) {
    iVar4 = Ordinal_9(&local_168);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_168 = CONCAT22(local_168._2_2_,0x11);
  }
  uStack_160 = CONCAT31(uStack_160._1_3_,local_a3);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_148 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_socket_color2");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
  local_170 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_178 != (longlong *)0x0) {
      (**(code **)(*local_178 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_170 = (longlong *)&local_168;
    Ordinal_8(&local_168);
    if ((short)local_168 != 0x11) {
      iVar4 = Ordinal_9(&local_168);
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar4);
      }
      local_168 = CONCAT22(local_168._2_2_,0x11);
    }
    uStack_160 = CONCAT31(uStack_160._1_3_,local_a2);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_148 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("item_socket_color3");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
    local_170 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_178 != (longlong *)0x0) {
        (**(code **)(*local_178 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_170 = (longlong *)&local_168;
      Ordinal_8(&local_168);
      FUN_140062080(&local_168,(int)local_ec);
      plVar8 = operator_new(0x18);
      local_148 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar7 = FUN_140201490("item_count");
        *plVar8 = lVar7;
        plVar10 = plVar8;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_res18,3,1,4,&local_168);
      local_170 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_178);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_178 != (longlong *)0x0) {
          (**(code **)(*local_178 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14007f560(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14007f5f6;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14007f5f6:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_mail");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,3,1,4,&local_78);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,2,1,2,&local_78);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x16);
  uStack_74 = *(undefined4 *)(param_2 + 0x1a);
  uStack_70 = *(undefined4 *)(param_2 + 0x1e);
  uStack_6c = *(undefined4 *)(param_2 + 0x22);
  uVar10 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0x26);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("channel_group");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0x2a);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("channel_num");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x2e);
  uStack_74 = *(undefined4 *)(param_2 + 0x32);
  uStack_70 = *(undefined4 *)(param_2 + 0x36);
  uStack_6c = *(undefined4 *)(param_2 + 0x3a);
  uVar10 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("mail_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_14006a8f0(local_58,param_2 + 0x53);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("bcust_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x32,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x3e);
  uStack_74 = *(undefined4 *)(param_2 + 0x42);
  uStack_70 = *(undefined4 *)(param_2 + 0x46);
  uStack_6c = *(undefined4 *)(param_2 + 0x4a);
  uVar10 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0x85);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0xa5);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("receiver_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0xc5);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028984c);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,100,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined1 *)(param_2 + 0x4e);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x11) {
    iVar5 = Ordinal_9(&local_78);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_78 = CONCAT22(local_78._2_2_,0x11);
  }
  uStack_70 = CONCAT31(uStack_70._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("return_day");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar2 = *(undefined4 *)(param_2 + 0x4f);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar2);
    plVar9 = operator_new(0x18);
    local_88 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("req_gold");
      *plVar9 = lVar8;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
    local_90 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400805c0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  undefined4 local_98;
  undefined4 uStack_94;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  longlong *local_78;
  longlong *local_70;
  longlong local_68 [4];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14008065a;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14008065a:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_itemmail");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,&local_98);
  local_70 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_98);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x16);
  uStack_94 = *(undefined4 *)(param_2 + 0x1a);
  uStack_90 = *(undefined4 *)(param_2 + 0x1e);
  uStack_8c = *(undefined4 *)(param_2 + 0x22);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x26);
  uStack_94 = *(undefined4 *)(param_2 + 0x2a);
  uStack_90 = *(undefined4 *)(param_2 + 0x2e);
  uStack_8c = *(undefined4 *)(param_2 + 0x32);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  uVar10 = FUN_1400623f0(local_68,param_2 + 0x36);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x10,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x56);
  uStack_94 = *(undefined4 *)(param_2 + 0x5a);
  uStack_90 = *(undefined4 *)(param_2 + 0x5e);
  uStack_8c = *(undefined4 *)(param_2 + 0x62);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_guid");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x66);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_ID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x6a);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_header");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x6e);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("enchant_level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x72);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_active");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar1 = *(undefined1 *)(param_2 + 0x76);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x11) {
    iVar5 = Ordinal_9(&local_98);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_98 = CONCAT22(local_98._2_2_,0x11);
  }
  uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("socket_count");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar1 = *(undefined1 *)(param_2 + 0x77);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x11) {
    iVar5 = Ordinal_9(&local_98);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_98 = CONCAT22(local_98._2_2_,0x11);
  }
  uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_recon");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x78);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("durability");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x7c);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x80);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option2");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x84);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option3");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x88);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option_value1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x8c);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option_value2");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x90);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_option_value3");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x94);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_option1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x98);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_option2");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x9c);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_option3");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0xa0);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_socket_value1");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xa4);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_value2");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xa8);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_value3");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xac);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_color1");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xb0);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_color2");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0xb4);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_socket_color3");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xb8);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("item_count");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xbc);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("before_money");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xc0);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("after_money");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_98;
      uVar2 = *(undefined4 *)(param_2 + 0xc4);
      Ordinal_8(&local_98);
      FUN_140062080(&local_98,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("change_money");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_a0 = local_68;
        uVar10 = FUN_1400623f0(local_68,param_2 + 200);
        plVar7 = operator_new(0x18);
        plVar9 = plVar11;
        local_78 = plVar7;
        if (plVar7 != (longlong *)0x0) {
          plVar7[1] = 0;
          *(undefined4 *)(plVar7 + 2) = 1;
          lVar8 = FUN_140201490("target_name");
          *plVar7 = lVar8;
          plVar9 = plVar7;
        }
        local_res18 = plVar9;
        if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x10,uVar10);
        local_a0 = plVar9;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_a0 = (longlong *)&local_98;
        uVar2 = *(undefined4 *)(param_2 + 0xe8);
        Ordinal_8(&local_98);
        FUN_140062080(&local_98,uVar2);
        plVar9 = operator_new(0x18);
        local_78 = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("mail_type");
          *plVar9 = lVar8;
          plVar11 = plVar9;
        }
        local_res18 = plVar11;
        if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
        local_a0 = plVar11;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar11 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar11 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140082ed0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined2 uVar2;
  undefined4 uVar3;
  IUnknown *pIVar4;
  ULONG UVar5;
  int iVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  longlong *plVar12;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_b8;
  longlong *local_b0;
  short local_a8 [4];
  undefined8 local_a0;
  longlong *local_90;
  longlong *local_88;
  longlong local_80 [4];
  undefined8 local_60;
  
  local_60 = 0xfffffffffffffffe;
  pIVar4 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  if (pIVar4 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar5 = (*pIVar4->lpVtbl[0xb].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140082f6f;
  }
  iVar6 = FUN_1400a1e90(param_1);
  if (iVar6 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140082f6f:
  local_res20 = (longlong *)0x0;
  iVar6 = FUN_140001970(&local_res20);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar7,"dbo.up_insert_log_inquiry_complete");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_b8 = (longlong *)local_a8;
  uVar8 = *(undefined8 *)(param_2 + 0xe);
  Ordinal_8(local_a8);
  uVar8 = FUN_140182530(local_80,uVar8);
  iVar6 = Ordinal_10(local_a8,uVar8);
  if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  Ordinal_9(local_80);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_88 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("log_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,3,1,4,local_a8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_90 = (longlong *)local_a8;
  uVar3 = *(undefined4 *)(param_2 + 0x16);
  Ordinal_8(local_a8);
  FUN_140062080(local_a8,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_88 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("log_type");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_b0,&local_res18,3,1,4,local_a8);
  local_90 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_b0 = (longlong *)local_a8;
  uVar2 = *(undefined2 *)(param_2 + 0x1a);
  Ordinal_8(local_a8);
  if (local_a8[0] != 0x12) {
    iVar6 = Ordinal_9(local_a8);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_a8[0] = 0x12;
  }
  local_a0 = CONCAT62(local_a0._2_6_,uVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("world_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,2,1,2,local_a8);
  local_b0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_b0 = (longlong *)local_a8;
  uVar1 = *(undefined1 *)(param_2 + 0x1c);
  Ordinal_8(local_a8);
  if (local_a8[0] != 0x11) {
    iVar6 = Ordinal_9(local_a8);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_a8[0] = 0x11;
  }
  local_a0 = CONCAT71(local_a0._1_7_,uVar1);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("end_status");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0x10,1,1,local_a8);
  local_b0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_b0 = (longlong *)local_a8;
  uVar1 = *(undefined1 *)(param_2 + 0x1d);
  Ordinal_8(local_a8);
  if (local_a8[0] != 0x11) {
    iVar6 = Ordinal_9(local_a8);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_a8[0] = 0x11;
  }
  local_a0 = CONCAT71(local_a0._1_7_,uVar1);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("start_status");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0x10,1,1,local_a8);
  local_b0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_b0 = local_80;
  uVar8 = FUN_1400623f0(local_80,param_2 + 0x1e);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("target_bcustno");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0x81,1,0x32,uVar8);
  local_b0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_b0 = local_80;
  uVar8 = FUN_1400623f0(local_80,param_2 + 0x82);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("target_character");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x10,uVar8);
  local_b0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_b0 = local_80;
  uVar8 = FUN_1400623f0(local_80,param_2 + 0xa2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490(&DAT_14028ab1c);
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x10,uVar8);
  local_b0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_b0 = local_80;
  uVar8 = FUN_1400623f0(local_80,param_2 + 0xc2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("former_GM");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x10,uVar8);
  local_b0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_b0 = (longlong *)local_a8;
  uVar1 = *(undefined1 *)(param_2 + 0xe2);
  Ordinal_8(local_a8);
  if (local_a8[0] != 0x11) {
    iVar6 = Ordinal_9(local_a8);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_a8[0] = 0x11;
  }
  local_a0 = CONCAT71(local_a0._1_7_,uVar1);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("remain_number");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0x10,1,1,local_a8);
  local_b0 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 != (IUnknown *)0x0) {
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_b0 = local_80;
    uVar8 = FUN_1400623f0(local_80,param_2 + 0xe3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar12;
    local_90 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("inquery_use");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,1,uVar8);
    local_b0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_b0 = local_80;
    uVar8 = FUN_1400623f0(local_80,param_2 + 0xe5);
    plVar9 = operator_new(0x18);
    plVar11 = plVar12;
    local_90 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("group_processing");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,1,uVar8);
    local_b0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_b0 = (longlong *)local_a8;
    uVar8 = *(undefined8 *)(param_2 + 0xe7);
    Ordinal_8(local_a8);
    if ((local_a8[0] != 5) && (local_a8[0] != 7)) {
      iVar6 = Ordinal_9(local_a8);
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar6);
      }
      local_a8[0] = 5;
    }
    local_a0 = uVar8;
    plVar9 = operator_new(0x18);
    plVar11 = plVar12;
    local_90 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("post_time");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,5,1,8,local_a8);
    local_b0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_b0 = (longlong *)local_a8;
    uVar8 = *(undefined8 *)(param_2 + 0xef);
    Ordinal_8(local_a8);
    if ((local_a8[0] != 5) && (local_a8[0] != 7)) {
      iVar6 = Ordinal_9(local_a8);
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar6);
      }
      local_a8[0] = 5;
    }
    local_a0 = uVar8;
    plVar11 = operator_new(0x18);
    local_90 = plVar11;
    if (plVar11 != (longlong *)0x0) {
      plVar11[1] = 0;
      *(undefined4 *)(plVar11 + 2) = 1;
      lVar10 = FUN_140201490("start_time");
      *plVar11 = lVar10;
      plVar12 = plVar11;
    }
    local_res18 = plVar12;
    if (plVar12 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar12 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,5,1,8,local_a8);
    local_b0 = plVar12;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 != (IUnknown *)0x0) {
      UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
      }
      if (local_b8 != (longlong *)0x0) {
        (**(code **)(*local_b8 + 0x10))();
      }
      if ((longlong *)*plVar12 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar12 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140084110(undefined8 *param_1,longlong param_2)

{
  undefined2 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  short local_78 [4];
  undefined2 local_70;
  longlong local_60 [4];
  undefined8 local_40;
  
  local_40 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400841a6;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400841a6:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_inquiry_chatting");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)local_78;
  uVar1 = *(undefined2 *)(param_2 + 0xe);
  Ordinal_8(local_78);
  if (local_78[0] != 0x12) {
    iVar5 = Ordinal_9(local_78);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_78[0] = 0x12;
  }
  local_70 = uVar1;
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,2,1,2,local_78);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)local_78;
  uVar10 = *(undefined8 *)(param_2 + 0x10);
  Ordinal_8(local_78);
  uVar10 = FUN_140182530(local_60,uVar10);
  iVar5 = Ordinal_10(local_78,uVar10);
  if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  Ordinal_9(local_60);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("inquiry_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,3,1,4,local_78);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)local_78;
  uVar2 = *(undefined4 *)(param_2 + 0x18);
  Ordinal_8(local_78);
  FUN_140062080(local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("chatting_number");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_60;
  uVar10 = FUN_1400623f0(local_60,param_2 + 0x1c);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("sender");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = local_60;
    uVar10 = FUN_1400623f0(local_60,param_2 + 0x3c);
    plVar9 = operator_new(0x18);
    local_88 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("chatting");
      *plVar9 = lVar8;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0xff,uVar10);
    local_90 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140084850(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined2 uVar2;
  undefined4 uVar3;
  IUnknown *pIVar4;
  ULONG UVar5;
  int iVar6;
  undefined8 *puVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  undefined8 uVar11;
  longlong *plVar12;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  short local_80 [4];
  undefined2 local_78;
  longlong *local_68;
  longlong *local_60;
  longlong *local_58 [3];
  undefined8 local_40;
  
  local_40 = 0xfffffffffffffffe;
  pIVar4 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  if (pIVar4 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar5 = (*pIVar4->lpVtbl[0xb].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400848ea;
  }
  iVar6 = FUN_1400a1e90(param_1);
  if (iVar6 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400848ea:
  local_res20 = (longlong *)0x0;
  iVar6 = FUN_140001970(&local_res20);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar7,"dbo.up_insert_log_monitor_notice");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = (longlong *)local_80;
  uVar3 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar3);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_58[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("log_type");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
  local_58[0] = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_60 = (longlong *)local_80;
  uVar2 = *(undefined2 *)(param_2 + 0x12);
  Ordinal_8(local_80);
  if (local_80[0] != 0x12) {
    iVar6 = Ordinal_9(local_80);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_80[0] = 0x12;
  }
  local_78 = uVar2;
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_58[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("world_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,2,1,2,local_80);
  local_60 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)local_80;
  uVar3 = *(undefined4 *)(param_2 + 0x14);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar3);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_60 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("target");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,3,1,4,local_80);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)local_80;
  uVar1 = *(undefined1 *)(param_2 + 0x18);
  Ordinal_8(local_80);
  if (local_80[0] != 0x11) {
    iVar6 = Ordinal_9(local_80);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_80[0] = 0x11;
  }
  local_78 = CONCAT11(local_78._1_1_,uVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_60 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("notice_type");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,0x10,1,1,local_80);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 != (IUnknown *)0x0) {
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_68 = (longlong *)local_80;
    uVar1 = *(undefined1 *)(param_2 + 0x237);
    Ordinal_8(local_80);
    if (local_80[0] != 0x11) {
      iVar6 = Ordinal_9(local_80);
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar6);
      }
      local_80[0] = 0x11;
    }
    local_78 = CONCAT11(local_78._1_1_,uVar1);
    plVar8 = operator_new(0x18);
    plVar10 = plVar12;
    local_60 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("notice_cycle");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,0x10,1,1,local_80);
    local_68 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 != (IUnknown *)0x0) {
      UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_68 = (longlong *)local_80;
      uVar11 = FUN_1400623f0(local_80,param_2 + 0x19);
      plVar8 = operator_new(0x18);
      plVar10 = plVar12;
      local_60 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar9 = FUN_140201490("notice");
        *plVar8 = lVar9;
        plVar10 = plVar8;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,0xca,1,0xff,uVar11);
      local_68 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_88);
      pIVar4 = (IUnknown *)*puVar7;
      if (pIVar4 != (IUnknown *)0x0) {
        UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
        }
        if (local_88 != (longlong *)0x0) {
          (**(code **)(*local_88 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        local_68 = (longlong *)local_80;
        uVar11 = FUN_1400623f0(local_80,param_2 + 0x217);
        plVar10 = operator_new(0x18);
        local_60 = plVar10;
        if (plVar10 != (longlong *)0x0) {
          plVar10[1] = 0;
          *(undefined4 *)(plVar10 + 2) = 1;
          lVar9 = FUN_140201490("gm_ID");
          *plVar10 = lVar9;
          plVar12 = plVar10;
        }
        local_res18 = plVar12;
        if (plVar12 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar12 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,0xca,1,0x10,uVar11);
        local_68 = plVar12;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar7 = (undefined8 *)FUN_140001660(local_res20,&local_88);
        pIVar4 = (IUnknown *)*puVar7;
        if (pIVar4 != (IUnknown *)0x0) {
          UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
          }
          if (local_88 != (longlong *)0x0) {
            (**(code **)(*local_88 + 0x10))();
          }
          if ((longlong *)*plVar12 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar12 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140085200(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  short local_88 [4];
  undefined4 local_80;
  longlong *local_70;
  longlong *local_68;
  longlong *local_60;
  longlong *local_58 [3];
  undefined8 local_40;
  
  local_40 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140085298;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140085298:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_monitor_user");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_70 = (longlong *)local_88;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(local_88);
  FUN_140062080(local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_58[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_88);
  local_58[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_60 = (longlong *)local_88;
  uVar1 = *(undefined1 *)(param_2 + 0x12);
  Ordinal_8(local_88);
  if (local_88[0] != 0x11) {
    iVar5 = Ordinal_9(local_88);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_88[0] = 0x11;
  }
  local_80 = CONCAT31(local_80._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_58[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,3,1,4,local_88);
  local_60 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x13);
  Ordinal_8(local_88);
  if (local_88[0] != 0x17) {
    iVar5 = Ordinal_9(local_88);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_88[0] = 0x17;
  }
  local_80 = uVar2;
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028ad18);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,3,1,4,local_88);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x17);
  Ordinal_8(local_88);
  if (local_88[0] != 0x17) {
    iVar5 = Ordinal_9(local_88);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_88[0] = 0x17;
  }
  local_80 = uVar2;
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("lobby");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,3,1,4,local_88);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_70);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_70 != (longlong *)0x0) {
      (**(code **)(*local_70 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)local_88;
    uVar2 = *(undefined4 *)(param_2 + 0x1f);
    Ordinal_8(local_88);
    if (local_88[0] != 0x17) {
      iVar5 = Ordinal_9(local_88);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_88[0] = 0x17;
    }
    local_80 = uVar2;
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_60 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("dungeon");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,3,1,4,local_88);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_70);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_70 != (longlong *)0x0) {
      (**(code **)(*local_70 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)local_88;
    uVar2 = *(undefined4 *)(param_2 + 0x1b);
    Ordinal_8(local_88);
    if (local_88[0] != 0x17) {
      iVar5 = Ordinal_9(local_88);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_88[0] = 0x17;
    }
    local_80 = uVar2;
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_60 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490(&DAT_14028ad30);
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,3,1,4,local_88);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_70);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_70 != (longlong *)0x0) {
        (**(code **)(*local_70 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)local_88;
      uVar2 = *(undefined4 *)(param_2 + 0x23);
      Ordinal_8(local_88);
      if (local_88[0] != 0x17) {
        iVar5 = Ordinal_9(local_88);
        if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar5);
        }
        local_88[0] = 0x17;
      }
      local_80 = uVar2;
      plVar9 = operator_new(0x18);
      local_60 = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("total");
        *plVar9 = lVar8;
        plVar10 = plVar9;
      }
      local_res18 = plVar10;
      if (plVar10 != (longlong *)0x0) {
        plVar10 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,3,1,4,local_88);
        local_68 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_70);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_70 != (longlong *)0x0) {
            (**(code **)(*local_70 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_140085c30(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  short local_80 [4];
  undefined1 local_78;
  longlong *local_68;
  longlong *local_60;
  longlong *local_58 [3];
  undefined8 local_40;
  
  local_40 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140085cca;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140085cca:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_monitor_command");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = (longlong *)local_80;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_58[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
  local_58[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_60 = (longlong *)local_80;
  uVar1 = *(undefined1 *)(param_2 + 0x12);
  Ordinal_8(local_80);
  if (local_80[0] != 0x11) {
    iVar5 = Ordinal_9(local_80);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_80[0] = 0x11;
  }
  local_78 = uVar1;
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_58[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,3,1,4,local_80);
  local_60 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)local_80;
  uVar1 = *(undefined1 *)(param_2 + 0x13);
  Ordinal_8(local_80);
  if (local_80[0] != 0x11) {
    iVar5 = Ordinal_9(local_80);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_80[0] = 0x11;
  }
  local_78 = uVar1;
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("server_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,3,1,4,local_80);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)local_80;
  uVar10 = FUN_1400623f0(local_80,param_2 + 0x14);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("gm_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,0xca,1,0x10,uVar10);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)local_80;
    uVar2 = *(undefined4 *)(param_2 + 0x34);
    Ordinal_8(local_80);
    FUN_140062080(local_80,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_60 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("command");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,3,1,4,local_80);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)local_80;
      uVar2 = *(undefined4 *)(param_2 + 0x38);
      Ordinal_8(local_80);
      FUN_140062080(local_80,uVar2);
      plVar9 = operator_new(0x18);
      local_60 = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("server_code");
        *plVar9 = lVar8;
        plVar11 = plVar9;
      }
      local_res18 = plVar11;
      if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar11 = (longlong *)FUN_140001880(&local_res20,local_58,&local_res18,3,1,4,local_80);
      local_68 = plVar11;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_88 != (longlong *)0x0) {
          (**(code **)(*local_88 + 0x10))();
        }
        if ((longlong *)*plVar11 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar11 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400864b0(undefined8 *param_1,longlong param_2)

{
  undefined2 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140086546;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140086546:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_cash_info");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_78;
  uVar1 = *(undefined2 *)(param_2 + 0xe);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x12) {
    iVar5 = Ordinal_9(&local_78);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_78 = CONCAT22(local_78._2_2_,0x12);
  }
  uStack_70 = CONCAT22(uStack_70._2_2_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,2,1,2,&local_78);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x14);
  uStack_74 = *(undefined4 *)(param_2 + 0x18);
  uStack_70 = *(undefined4 *)(param_2 + 0x1c);
  uStack_6c = *(undefined4 *)(param_2 + 0x20);
  uVar10 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar10);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = local_58;
    uVar10 = FUN_1400623f0(local_58,param_2 + 0x24);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("character_name");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar10);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_90 = (longlong *)&local_78;
      uVar2 = *(undefined4 *)(param_2 + 0x10);
      Ordinal_8(&local_78);
      FUN_140062080(&local_78,uVar2);
      plVar9 = operator_new(0x18);
      local_88 = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("cash_balance");
        *plVar9 = lVar8;
        plVar11 = plVar9;
      }
      local_res18 = plVar11;
      if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar11 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
      local_90 = plVar11;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar11 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar11 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140086ac0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140086b56;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140086b56:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_pvp_room");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,2,1,2,&local_78);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x12);
  uStack_74 = *(undefined4 *)(param_2 + 0x16);
  uStack_70 = *(undefined4 *)(param_2 + 0x1a);
  uStack_6c = *(undefined4 *)(param_2 + 0x1e);
  uVar10 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar10);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x22);
  uStack_74 = *(undefined4 *)(param_2 + 0x26);
  uStack_70 = *(undefined4 *)(param_2 + 0x2a);
  uStack_6c = *(undefined4 *)(param_2 + 0x2e);
  uVar10 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0x32);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined1 *)(param_2 + 0x52);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x11) {
    iVar5 = Ordinal_9(&local_78);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_78 = CONCAT22(local_78._2_2_,0x11);
  }
  uStack_70 = CONCAT31(uStack_70._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("channel_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x53);
  uStack_74 = *(undefined4 *)(param_2 + 0x57);
  uStack_70 = *(undefined4 *)(param_2 + 0x5b);
  uStack_6c = *(undefined4 *)(param_2 + 0x5f);
  uVar10 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("room_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar2 = *(undefined4 *)(param_2 + 0x6b);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("room_world");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar10 = *(undefined8 *)(param_2 + 99);
  Ordinal_8(&local_78);
  uVar10 = FUN_140182530(local_58,uVar10);
  iVar5 = Ordinal_10(&local_78,uVar10);
  if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  Ordinal_9(local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("room_number");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0x6f);
  plVar9 = operator_new(0x18);
  local_88 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar8 = FUN_140201490("room_name");
    *plVar9 = lVar8;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x32,uVar10);
  local_90 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400876c0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  undefined8 uVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140087756;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140087756:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_pvp_battle");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("log_type");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,2,1,2,&local_78);
  local_80 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_88 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x12);
  uStack_74 = *(undefined4 *)(param_2 + 0x16);
  uStack_70 = *(undefined4 *)(param_2 + 0x1a);
  uStack_6c = *(undefined4 *)(param_2 + 0x1e);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar9);
  local_88 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  uVar9 = FUN_1400623f0(local_58,param_2 + 0x22);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("bcust_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x32,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x86);
  uStack_74 = *(undefined4 *)(param_2 + 0x8a);
  uStack_70 = *(undefined4 *)(param_2 + 0x8e);
  uStack_6c = *(undefined4 *)(param_2 + 0x92);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  uVar9 = FUN_1400623f0(local_58,param_2 + 0x96);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_name");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xb6);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_class");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xba);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_level");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0x10,1,1,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xbe);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("channel_type");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0xc2);
  uStack_74 = *(undefined4 *)(param_2 + 0xc6);
  uStack_70 = *(undefined4 *)(param_2 + 0xca);
  uStack_6c = *(undefined4 *)(param_2 + 0xce);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("room_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar1 = *(undefined4 *)(param_2 + 0xd2);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar1);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("room_world");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar1 = *(undefined4 *)(param_2 + 0xd6);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar1);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("room_type");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_58;
    local_78 = *(undefined4 *)(param_2 + 0xda);
    uStack_74 = *(undefined4 *)(param_2 + 0xde);
    uStack_70 = *(undefined4 *)(param_2 + 0xe2);
    uStack_6c = *(undefined4 *)(param_2 + 0xe6);
    uVar9 = FUN_140062280(local_58,&local_78);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("red_leader_id");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_58;
    uVar9 = FUN_1400623f0(local_58,param_2 + 0xea);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("red_leader_name");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_58;
    uVar9 = FUN_1400623f0(local_58,param_2 + 0x10a);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("red_name1");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_58;
    uVar9 = FUN_1400623f0(local_58,param_2 + 0x12a);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("red_name2");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_58;
    uVar9 = FUN_1400623f0(local_58,param_2 + 0x14a);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("red_name3");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = local_58;
      uVar9 = FUN_1400623f0(local_58,param_2 + 0x16a);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("red_name4");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = (longlong *)&local_78;
      uVar1 = *(undefined4 *)(param_2 + 0x24a);
      Ordinal_8(&local_78);
      FUN_140062080(&local_78,uVar1);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("red_kill_count");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = (longlong *)&local_78;
      uVar1 = *(undefined4 *)(param_2 + 0x24e);
      Ordinal_8(&local_78);
      FUN_140062080(&local_78,uVar1);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("red_total_damage");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = local_58;
      local_78 = *(undefined4 *)(param_2 + 0x252);
      uStack_74 = *(undefined4 *)(param_2 + 0x256);
      uStack_70 = *(undefined4 *)(param_2 + 0x25a);
      uStack_6c = *(undefined4 *)(param_2 + 0x25e);
      uVar9 = FUN_140062280(local_58,&local_78);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("blue_leader_id");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = local_58;
      uVar9 = FUN_1400623f0(local_58,param_2 + 0x262);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("blue_leader_name");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = local_58;
      uVar9 = FUN_1400623f0(local_58,param_2 + 0x282);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("blue_name1");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = local_58;
      uVar9 = FUN_1400623f0(local_58,param_2 + 0x2a2);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("blue_name2");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = local_58;
      uVar9 = FUN_1400623f0(local_58,param_2 + 0x2c2);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("blue_name3");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = local_58;
      uVar9 = FUN_1400623f0(local_58,param_2 + 0x2e2);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("blue_name4");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = (longlong *)&local_78;
      uVar1 = *(undefined4 *)(param_2 + 0x3c2);
      Ordinal_8(&local_78);
      FUN_140062080(&local_78,uVar1);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("blue_kill_count");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = (longlong *)&local_78;
      uVar1 = *(undefined4 *)(param_2 + 0x3c6);
      Ordinal_8(&local_78);
      FUN_140062080(&local_78,uVar1);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("blue_total_damage");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar8 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar8 + 0x10))();
        }
        local_90 = (longlong *)&local_78;
        uVar1 = *(undefined4 *)(param_2 + 0x3ca);
        Ordinal_8(&local_78);
        FUN_140062080(&local_78,uVar1);
        plVar6 = operator_new(0x18);
        plVar8 = plVar10;
        local_88 = plVar6;
        if (plVar6 != (longlong *)0x0) {
          plVar6[1] = 0;
          *(undefined4 *)(plVar6 + 2) = 1;
          lVar7 = FUN_140201490("user_start_count");
          *plVar6 = lVar7;
          plVar8 = plVar6;
        }
        local_res18 = plVar8;
        if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
        local_90 = plVar8;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar8 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar8 + 0x10))();
        }
        local_90 = (longlong *)&local_78;
        uVar1 = *(undefined4 *)(param_2 + 0x3ce);
        Ordinal_8(&local_78);
        FUN_140062080(&local_78,uVar1);
        plVar6 = operator_new(0x18);
        plVar8 = plVar10;
        local_88 = plVar6;
        if (plVar6 != (longlong *)0x0) {
          plVar6[1] = 0;
          *(undefined4 *)(plVar6 + 2) = 1;
          lVar7 = FUN_140201490("user_end_count");
          *plVar6 = lVar7;
          plVar8 = plVar6;
        }
        local_res18 = plVar8;
        if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
        local_90 = plVar8;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar8 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar8 + 0x10))();
        }
        local_90 = local_58;
        uVar9 = FUN_1400623f0(local_58,param_2 + 0x3d2);
        plVar6 = operator_new(0x18);
        plVar8 = plVar10;
        local_88 = plVar6;
        if (plVar6 != (longlong *)0x0) {
          plVar6[1] = 0;
          *(undefined4 *)(plVar6 + 2) = 1;
          lVar7 = FUN_140201490("win_character_name");
          *plVar6 = lVar7;
          plVar8 = plVar6;
        }
        local_res18 = plVar8;
        if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
        local_90 = plVar8;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_98 != (longlong *)0x0) {
            (**(code **)(*local_98 + 0x10))();
          }
          if ((longlong *)*plVar8 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar8 + 0x10))();
          }
          local_90 = (longlong *)&local_78;
          uVar1 = *(undefined4 *)(param_2 + 0x3f2);
          Ordinal_8(&local_78);
          FUN_140062080(&local_78,uVar1);
          plVar6 = operator_new(0x18);
          plVar8 = plVar10;
          local_88 = plVar6;
          if (plVar6 != (longlong *)0x0) {
            plVar6[1] = 0;
            *(undefined4 *)(plVar6 + 2) = 1;
            lVar7 = FUN_140201490("win_team");
            *plVar6 = lVar7;
            plVar8 = plVar6;
          }
          local_res18 = plVar8;
          if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
          local_90 = plVar8;
          if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
          pIVar2 = (IUnknown *)*puVar5;
          if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_98 != (longlong *)0x0) {
            (**(code **)(*local_98 + 0x10))();
          }
          if ((longlong *)*plVar8 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar8 + 0x10))();
          }
          local_90 = (longlong *)&local_78;
          uVar1 = *(undefined4 *)(param_2 + 0x3f6);
          Ordinal_8(&local_78);
          FUN_140062080(&local_78,uVar1);
          plVar8 = operator_new(0x18);
          local_88 = plVar8;
          if (plVar8 != (longlong *)0x0) {
            plVar8[1] = 0;
            *(undefined4 *)(plVar8 + 2) = 1;
            lVar7 = FUN_140201490("clear_time");
            *plVar8 = lVar7;
            plVar10 = plVar8;
          }
          local_res18 = plVar10;
          if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
          local_90 = plVar10;
          if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
          pIVar2 = (IUnknown *)*puVar5;
          if (pIVar2 != (IUnknown *)0x0) {
            UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
            if ((int)UVar3 < 0) {
              _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
            }
            if (local_98 != (longlong *)0x0) {
              (**(code **)(*local_98 + 0x10))();
            }
            if ((longlong *)*plVar10 != (longlong *)0x0) {
              (**(code **)(*(longlong *)*plVar10 + 0x10))();
            }
            FUN_1400016d0(&local_res20,&local_res18);
            if (local_res18 != (longlong *)0x0) {
              (**(code **)(*local_res18 + 0x10))();
            }
            if (local_res20 != (longlong *)0x0) {
              (**(code **)(*local_res20 + 0x10))();
            }
            return 1;
          }
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140089ce0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  longlong *local_60;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140089d76;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140089d76:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_pvp_result");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,3,1,4,&local_88);
  local_60 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x12);
  uStack_84 = *(undefined4 *)(param_2 + 0x16);
  uStack_80 = *(undefined4 *)(param_2 + 0x1a);
  uStack_7c = *(undefined4 *)(param_2 + 0x1e);
  uVar10 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar10);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0x22);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("bcust_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x32,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x86);
  uStack_84 = *(undefined4 *)(param_2 + 0x8a);
  uStack_80 = *(undefined4 *)(param_2 + 0x8e);
  uStack_7c = *(undefined4 *)(param_2 + 0x92);
  uVar10 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0x96);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x10,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar1 = *(undefined1 *)(param_2 + 0xb6);
  Ordinal_8(&local_88);
  if ((short)local_88 != 0x11) {
    iVar5 = Ordinal_9(&local_88);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_88 = CONCAT22(local_88._2_2_,0x11);
  }
  uStack_80 = CONCAT31(uStack_80._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_class");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,2,1,2,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0xb7);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0x10,1,1,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0xbb);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("channel_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_88 = *(undefined4 *)(param_2 + 0xbf);
  uStack_84 = *(undefined4 *)(param_2 + 0xc3);
  uStack_80 = *(undefined4 *)(param_2 + 199);
  uStack_7c = *(undefined4 *)(param_2 + 0xcb);
  uVar10 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("room_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0xcf);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("room_world");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,2,1,2,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0xd3);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("room_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0xd7);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("room_map");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_88;
    uVar2 = *(undefined4 *)(param_2 + 0xdb);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_68 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("pvp_team");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,2,1,2,&local_88);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_88;
    uVar2 = *(undefined4 *)(param_2 + 0xdf);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_68 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("pvp_score");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_88;
    uVar2 = *(undefined4 *)(param_2 + 0xe3);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_68 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("pvp_point");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_90 = (longlong *)&local_88;
      uVar2 = *(undefined4 *)(param_2 + 0xe7);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_68 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("pvp_grade");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
      local_90 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_90 = (longlong *)&local_88;
      uVar2 = *(undefined4 *)(param_2 + 0xeb);
      Ordinal_8(&local_88);
      if ((short)local_88 != 0x17) {
        iVar5 = Ordinal_9(&local_88);
        if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar5);
        }
        local_88 = CONCAT22(local_88._2_2_,0x17);
      }
      uStack_80 = uVar2;
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_68 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("pvp_totalscore");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
      local_90 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_90 = (longlong *)&local_88;
        uVar2 = *(undefined4 *)(param_2 + 0xef);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,uVar2);
        plVar7 = operator_new(0x18);
        plVar9 = plVar11;
        local_68 = plVar7;
        if (plVar7 != (longlong *)0x0) {
          plVar7[1] = 0;
          *(undefined4 *)(plVar7 + 2) = 1;
          lVar8 = FUN_140201490("pvp_totalpoint");
          *plVar7 = lVar8;
          plVar9 = plVar7;
        }
        local_res18 = plVar9;
        if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
        local_90 = plVar9;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_90 = (longlong *)&local_88;
        uVar2 = *(undefined4 *)(param_2 + 0xf3);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,uVar2);
        plVar7 = operator_new(0x18);
        plVar9 = plVar11;
        local_68 = plVar7;
        if (plVar7 != (longlong *)0x0) {
          plVar7[1] = 0;
          *(undefined4 *)(plVar7 + 2) = 1;
          lVar8 = FUN_140201490("pvp_rank");
          *plVar7 = lVar8;
          plVar9 = plVar7;
        }
        local_res18 = plVar9;
        if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
        local_90 = plVar9;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_98 != (longlong *)0x0) {
            (**(code **)(*local_98 + 0x10))();
          }
          if ((longlong *)*plVar9 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar9 + 0x10))();
          }
          local_90 = (longlong *)&local_88;
          uVar2 = *(undefined4 *)(param_2 + 0xf7);
          Ordinal_8(&local_88);
          FUN_140062080(&local_88,uVar2);
          plVar7 = operator_new(0x18);
          plVar9 = plVar11;
          local_68 = plVar7;
          if (plVar7 != (longlong *)0x0) {
            plVar7[1] = 0;
            *(undefined4 *)(plVar7 + 2) = 1;
            lVar8 = FUN_140201490("pvp_kill");
            *plVar7 = lVar8;
            plVar9 = plVar7;
          }
          local_res18 = plVar9;
          if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
          local_90 = plVar9;
          if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
          pIVar3 = (IUnknown *)*puVar6;
          if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_98 != (longlong *)0x0) {
            (**(code **)(*local_98 + 0x10))();
          }
          if ((longlong *)*plVar9 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar9 + 0x10))();
          }
          local_90 = (longlong *)&local_88;
          uVar2 = *(undefined4 *)(param_2 + 0xfb);
          Ordinal_8(&local_88);
          FUN_140062080(&local_88,uVar2);
          plVar7 = operator_new(0x18);
          plVar9 = plVar11;
          local_68 = plVar7;
          if (plVar7 != (longlong *)0x0) {
            plVar7[1] = 0;
            *(undefined4 *)(plVar7 + 2) = 1;
            lVar8 = FUN_140201490("pvp_die");
            *plVar7 = lVar8;
            plVar9 = plVar7;
          }
          local_res18 = plVar9;
          if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
          local_90 = plVar9;
          if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
          pIVar3 = (IUnknown *)*puVar6;
          if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_98 != (longlong *)0x0) {
            (**(code **)(*local_98 + 0x10))();
          }
          if ((longlong *)*plVar9 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar9 + 0x10))();
          }
          local_90 = (longlong *)&local_88;
          uVar2 = *(undefined4 *)(param_2 + 0xff);
          Ordinal_8(&local_88);
          FUN_140062080(&local_88,uVar2);
          plVar7 = operator_new(0x18);
          plVar9 = plVar11;
          local_68 = plVar7;
          if (plVar7 != (longlong *)0x0) {
            plVar7[1] = 0;
            *(undefined4 *)(plVar7 + 2) = 1;
            lVar8 = FUN_140201490("pvp_damage");
            *plVar7 = lVar8;
            plVar9 = plVar7;
          }
          local_res18 = plVar9;
          if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
          local_90 = plVar9;
          if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
          pIVar3 = (IUnknown *)*puVar6;
          if (pIVar3 != (IUnknown *)0x0) {
            UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
            if ((int)UVar4 < 0) {
              _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
            }
            if (local_98 != (longlong *)0x0) {
              (**(code **)(*local_98 + 0x10))();
            }
            if ((longlong *)*plVar9 != (longlong *)0x0) {
              (**(code **)(*(longlong *)*plVar9 + 0x10))();
            }
            local_90 = (longlong *)&local_88;
            uVar2 = *(undefined4 *)(param_2 + 0x103);
            Ordinal_8(&local_88);
            FUN_140062080(&local_88,uVar2);
            plVar9 = operator_new(0x18);
            local_68 = plVar9;
            if (plVar9 != (longlong *)0x0) {
              plVar9[1] = 0;
              *(undefined4 *)(plVar9 + 2) = 1;
              lVar8 = FUN_140201490("pvp_cleartime");
              *plVar9 = lVar8;
              plVar11 = plVar9;
            }
            local_res18 = plVar11;
            if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x8007000e);
            }
            plVar11 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88)
            ;
            local_90 = plVar11;
            if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
            pIVar3 = (IUnknown *)*puVar6;
            if (pIVar3 != (IUnknown *)0x0) {
              UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
              if ((int)UVar4 < 0) {
                _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
              }
              if (local_98 != (longlong *)0x0) {
                (**(code **)(*local_98 + 0x10))();
              }
              if ((longlong *)*plVar11 != (longlong *)0x0) {
                (**(code **)(*(longlong *)*plVar11 + 0x10))();
              }
              FUN_1400016d0(&local_res20,&local_res18);
              if (local_res18 != (longlong *)0x0) {
                (**(code **)(*local_res18 + 0x10))();
              }
              if (local_res20 != (longlong *)0x0) {
                (**(code **)(*local_res20 + 0x10))();
              }
              return 1;
            }
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14008b930(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  undefined8 uVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14008b9c6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14008b9c6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_pvp_death");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("log_type");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,3,1,4,&local_78);
  local_80 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_88 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x12);
  uStack_74 = *(undefined4 *)(param_2 + 0x16);
  uStack_70 = *(undefined4 *)(param_2 + 0x1a);
  uStack_6c = *(undefined4 *)(param_2 + 0x1e);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("room_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar9);
  local_88 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x22);
  uStack_74 = *(undefined4 *)(param_2 + 0x26);
  uStack_70 = *(undefined4 *)(param_2 + 0x2a);
  uStack_6c = *(undefined4 *)(param_2 + 0x2e);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  uVar9 = FUN_1400623f0(local_58,param_2 + 0x32);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_name");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x52);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_class");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x56);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_job");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0x10,1,1,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x5a);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_level");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0x10,1,1,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x5e);
  uStack_74 = *(undefined4 *)(param_2 + 0x62);
  uStack_70 = *(undefined4 *)(param_2 + 0x66);
  uStack_6c = *(undefined4 *)(param_2 + 0x6a);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("kill_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  uVar9 = FUN_1400623f0(local_58,param_2 + 0x6e);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("kill_name");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x8e);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("kill_class");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,2,1,2,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar1 = *(undefined4 *)(param_2 + 0x92);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar1);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("kill_job");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0x10,1,1,&local_78);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar1 = *(undefined4 *)(param_2 + 0x96);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar1);
    plVar8 = operator_new(0x18);
    local_88 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar7 = FUN_140201490("kill_level");
      *plVar8 = lVar7;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0x10,1,1,&local_78);
    local_90 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14008c850(undefined8 *param_1,longlong param_2)

{
  undefined2 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  longlong *local_60;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14008c8e6;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14008c8e6:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_quest");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,3,1,4,&local_88);
  local_60 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,2,1,2,&local_88);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x18);
  uStack_84 = *(undefined4 *)(param_2 + 0x1c);
  uStack_80 = *(undefined4 *)(param_2 + 0x20);
  uStack_7c = *(undefined4 *)(param_2 + 0x24);
  uVar10 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar1 = *(undefined2 *)(param_2 + 0x16);
  Ordinal_8(&local_88);
  if ((short)local_88 != 0x12) {
    iVar5 = Ordinal_9(&local_88);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_88 = CONCAT22(local_88._2_2_,0x12);
  }
  uStack_80 = CONCAT22(uStack_80._2_2_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("channel_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,2,1,2,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_14006a8f0(local_58,param_2 + 0x50);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("bcust_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x32,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x28);
  uStack_84 = *(undefined4 *)(param_2 + 0x2c);
  uStack_80 = *(undefined4 *)(param_2 + 0x30);
  uStack_7c = *(undefined4 *)(param_2 + 0x34);
  uVar10 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x26,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_58;
  uVar10 = FUN_1400623f0(local_58,param_2 + 0x82);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0xca,1,0x10,uVar10);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x38);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_class");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,2,1,2,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x3c);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_job");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0x10,1,1,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x40);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0x10,1,1,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)&local_88;
    uVar2 = *(undefined4 *)(param_2 + 0x44);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_68 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("quest_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_90 = (longlong *)&local_88;
      uVar2 = *(undefined4 *)(param_2 + 0x48);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_68 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("quest_type");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
      local_90 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_90 = (longlong *)&local_88;
        uVar2 = *(undefined4 *)(param_2 + 0x4c);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,uVar2);
        plVar9 = operator_new(0x18);
        local_68 = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("quest_exp");
          *plVar9 = lVar8;
          plVar11 = plVar9;
        }
        local_res18 = plVar11;
        if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar11 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,&local_88);
        local_90 = plVar11;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_98 != (longlong *)0x0) {
            (**(code **)(*local_98 + 0x10))();
          }
          if ((longlong *)*plVar11 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar11 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14008d8b0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  undefined4 local_98;
  undefined4 uStack_94;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  longlong *local_78;
  longlong *local_70;
  longlong local_68 [4];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14008d94a;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14008d94a:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_learnskill");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("log_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,&local_98);
  local_70 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = local_68;
  local_98 = *(undefined4 *)(param_2 + 0x12);
  uStack_94 = *(undefined4 *)(param_2 + 0x16);
  uStack_90 = *(undefined4 *)(param_2 + 0x1a);
  uStack_8c = *(undefined4 *)(param_2 + 0x1e);
  uVar10 = FUN_140062280(local_68,&local_98);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar10);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x22);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("skill_table_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x26);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("skill_level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = (longlong *)&local_98;
  uVar1 = *(undefined1 *)(param_2 + 0x2a);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x11) {
    iVar5 = Ordinal_9(&local_98);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_98 = CONCAT22(local_98._2_2_,0x11);
  }
  uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_class");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,2,1,2,&local_98);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar1 = *(undefined1 *)(param_2 + 0x2b);
    Ordinal_8(&local_98);
    if ((short)local_98 != 0x11) {
      iVar5 = Ordinal_9(&local_98);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_98 = CONCAT22(local_98._2_2_,0x11);
    }
    uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("character_level");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x10,1,1,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = (longlong *)&local_98;
    uVar1 = *(undefined1 *)(param_2 + 0x2c);
    Ordinal_8(&local_98);
    if ((short)local_98 != 0x11) {
      iVar5 = Ordinal_9(&local_98);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_98 = CONCAT22(local_98._2_2_,0x11);
    }
    uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_78 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("skillpoint_use");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,&local_98);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = local_68;
      uVar10 = FUN_14006a8f0(local_68,param_2 + 0x2d);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_78 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("bcustid");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x32,uVar10);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = local_68;
      uVar10 = FUN_1400623f0(local_68,param_2 + 0x5f);
      plVar9 = operator_new(0x18);
      local_78 = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("character_name");
        *plVar9 = lVar8;
        plVar11 = plVar9;
      }
      local_res18 = plVar11;
      if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar11 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x10,uVar10);
      local_a0 = plVar11;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar11 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar11 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14008e4b0(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14008e543;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14008e543:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_delete_pet");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("pet_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_14008e730(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_c8 [2];
  undefined4 local_b8;
  undefined4 uStack_b4;
  undefined4 uStack_b0;
  undefined4 uStack_ac;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong local_78 [4];
  undefined8 local_58;
  
  local_58 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14008e7cd;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14008e7cd:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_create_pet");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_c8[0] = (longlong *)&local_b8;
  local_88 = *(longlong **)(param_2 + 0xe);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140062280(&local_b8,&local_88);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_98 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("pet_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar7);
  local_98 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_90 = local_78;
  local_b8 = *(undefined4 *)(param_2 + 0x1e);
  uStack_b4 = *(undefined4 *)(param_2 + 0x22);
  uStack_b0 = *(undefined4 *)(param_2 + 0x26);
  uStack_ac = *(undefined4 *)(param_2 + 0x2a);
  uVar7 = FUN_140062280(local_78,&local_b8);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_98 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("character_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar7);
  local_90 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = local_78;
  local_b8 = *(undefined4 *)(param_2 + 0x2e);
  uStack_b4 = *(undefined4 *)(param_2 + 0x32);
  uStack_b0 = *(undefined4 *)(param_2 + 0x36);
  uStack_ac = *(undefined4 *)(param_2 + 0x3a);
  uVar7 = FUN_140062280(local_78,&local_b8);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("AuthID");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0xca,1,0x26,uVar7);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  sVar1 = *(short *)(param_2 + 0x3e);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("server");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,2,1,2,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = local_78;
  uVar7 = FUN_1400623f0(local_78,param_2 + 0x40);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490(&DAT_14028a330);
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0xca,1,0x10,uVar7);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  sVar1 = *(short *)(param_2 + 0x60);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490(&DAT_14028b3e4);
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  sVar1 = *(short *)(param_2 + 0x62);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("inventory_count");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0x10,1,1,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 100);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("Expire_Time");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x68);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("Vital");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x6c);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("Intelligence");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x70);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("Strength");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x74);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("Resilient");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x78);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("Eloquence");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x7c);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("Charm");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x80);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("Temper");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x84);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 4) {
    iVar5 = Ordinal_9(&local_b8);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_b8 = CONCAT22(local_b8._2_2_,4);
  }
  uStack_b0 = uVar2;
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("fHeight");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x88);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 4) {
    iVar5 = Ordinal_9(&local_b8);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_b8 = CONCAT22(local_b8._2_2_,4);
  }
  uStack_b0 = uVar2;
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("fWeight");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x8c);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490(&DAT_14028b470);
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x90);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490(&DAT_14028b474);
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x94);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 4) {
    iVar5 = Ordinal_9(&local_b8);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_b8 = CONCAT22(local_b8._2_2_,4);
  }
  uStack_b0 = uVar2;
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("physical_attack");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x98);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 4) {
    iVar5 = Ordinal_9(&local_b8);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_b8 = CONCAT22(local_b8._2_2_,4);
  }
  uStack_b0 = uVar2;
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("physical_defence");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0x9c);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 4) {
    iVar5 = Ordinal_9(&local_b8);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_b8 = CONCAT22(local_b8._2_2_,4);
  }
  uStack_b0 = uVar2;
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("magical_attack");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar2 = *(undefined4 *)(param_2 + 0xa0);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 4) {
    iVar5 = Ordinal_9(&local_b8);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_b8 = CONCAT22(local_b8._2_2_,4);
  }
  uStack_b0 = uVar2;
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_90 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("magical_defence");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8[0] != (longlong *)0x0) {
      (**(code **)(*local_c8[0] + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_88 = (longlong *)&local_b8;
    uVar2 = *(undefined4 *)(param_2 + 0xa4);
    Ordinal_8(&local_b8);
    if ((short)local_b8 != 4) {
      iVar5 = Ordinal_9(&local_b8);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_b8 = CONCAT22(local_b8._2_2_,4);
    }
    uStack_b0 = uVar2;
    plVar8 = operator_new(0x18);
    plVar10 = plVar11;
    local_90 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("loyalty");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
    local_88 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_c8[0] != (longlong *)0x0) {
        (**(code **)(*local_c8[0] + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_88 = (longlong *)&local_b8;
      uVar2 = *(undefined4 *)(param_2 + 0xa8);
      Ordinal_8(&local_b8);
      FUN_140062080(&local_b8,uVar2);
      plVar8 = operator_new(0x18);
      plVar10 = plVar11;
      local_90 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar9 = FUN_140201490("Level");
        *plVar8 = lVar9;
        plVar10 = plVar8;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
      local_88 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_c8[0] != (longlong *)0x0) {
          (**(code **)(*local_c8[0] + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        local_88 = (longlong *)&local_b8;
        uVar7 = *(undefined8 *)(param_2 + 0xac);
        Ordinal_8(&local_b8);
        uVar7 = FUN_140182530(local_78,uVar7);
        iVar5 = Ordinal_10(&local_b8,uVar7);
        if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar5);
        }
        Ordinal_9(local_78);
        plVar10 = operator_new(0x18);
        local_90 = plVar10;
        if (plVar10 != (longlong *)0x0) {
          plVar10[1] = 0;
          *(undefined4 *)(plVar10 + 2) = 1;
          lVar9 = FUN_140201490(&DAT_14028b4c8);
          *plVar10 = lVar9;
          plVar11 = plVar10;
        }
        local_res18 = plVar11;
        if (plVar11 != (longlong *)0x0) {
          plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
          local_88 = plVar11;
          if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          puVar6 = (undefined8 *)FUN_140001660(local_res20,local_c8);
          pIVar3 = (IUnknown *)*puVar6;
          if (pIVar3 != (IUnknown *)0x0) {
            UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
            if ((int)UVar4 < 0) {
              _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
            }
            if (local_c8[0] != (longlong *)0x0) {
              (**(code **)(*local_c8[0] + 0x10))();
            }
            if ((longlong *)*plVar11 != (longlong *)0x0) {
              (**(code **)(*(longlong *)*plVar11 + 0x10))();
            }
            FUN_1400016d0(&local_res20,&local_res18);
            if (local_res18 != (longlong *)0x0) {
              (**(code **)(*local_res18 + 0x10))();
            }
            if (local_res20 != (longlong *)0x0) {
              (**(code **)(*local_res20 + 0x10))();
            }
            return 1;
          }
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140090800(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  short sVar2;
  undefined4 uVar3;
  IUnknown *pIVar4;
  ULONG UVar5;
  int iVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  longlong *plVar12;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_c8 [2];
  undefined4 local_b8;
  undefined4 uStack_b4;
  undefined8 uStack_b0;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong local_78 [4];
  undefined8 local_58;
  
  local_58 = 0xfffffffffffffffe;
  pIVar4 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  if (pIVar4 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar5 = (*pIVar4->lpVtbl[0xb].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14009089d;
  }
  iVar6 = FUN_1400a1e90(param_1);
  if (iVar6 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14009089d:
  local_res20 = (longlong *)0x0;
  iVar6 = FUN_140001970(&local_res20);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar7,"dbo.up_update_pet");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_c8[0] = (longlong *)&local_b8;
  local_88 = *(longlong **)(param_2 + 0xe);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar8 = FUN_140062280(&local_b8,&local_88);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_98 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("pet_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar8);
  local_98 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_90 = local_78;
  local_b8 = *(undefined4 *)(param_2 + 0x1e);
  uStack_b4 = *(undefined4 *)(param_2 + 0x22);
  uStack_b0 = *(undefined8 *)(param_2 + 0x26);
  uVar8 = FUN_140062280(local_78,&local_b8);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_98 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar8);
  local_90 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar3 = *(undefined4 *)(param_2 + 0x2e);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Level");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar8 = *(undefined8 *)(param_2 + 0x32);
  Ordinal_8(&local_b8);
  uVar8 = FUN_1401824f0(local_78,uVar8);
  iVar6 = Ordinal_10(&local_b8,uVar8);
  if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  Ordinal_9(local_78);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Experience");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0x14,1,8,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  sVar2 = *(short *)(param_2 + 0x3a);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,(int)sVar2);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("inventory_count");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0x10,1,1,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar8 = *(undefined8 *)(param_2 + 0x3c);
  Ordinal_8(&local_b8);
  if (((short)local_b8 != 5) && ((short)local_b8 != 7)) {
    iVar6 = Ordinal_9(&local_b8);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_b8 = CONCAT22(local_b8._2_2_,5);
  }
  uStack_b0 = uVar8;
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("CreateTime");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,5,1,8,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar3 = *(undefined4 *)(param_2 + 0x44);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Expire_Time");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar3 = *(undefined4 *)(param_2 + 0x48);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Class");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar3 = *(undefined4 *)(param_2 + 0x4c);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Vital");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar3 = *(undefined4 *)(param_2 + 0x50);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Intelligence");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar3 = *(undefined4 *)(param_2 + 0x54);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Strength");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar3 = *(undefined4 *)(param_2 + 0x58);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Resilient");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar3 = *(undefined4 *)(param_2 + 0x5c);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Eloquence");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar3 = *(undefined4 *)(param_2 + 0x60);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Charm");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar3 = *(undefined4 *)(param_2 + 100);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Temper");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar3 = *(undefined4 *)(param_2 + 0x68);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 4) {
    iVar6 = Ordinal_9(&local_b8);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_b8 = CONCAT22(local_b8._2_2_,4);
  }
  uStack_b0 = CONCAT44(uStack_b0._4_4_,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("fHeight");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar3 = *(undefined4 *)(param_2 + 0x6c);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 4) {
    iVar6 = Ordinal_9(&local_b8);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_b8 = CONCAT22(local_b8._2_2_,4);
  }
  uStack_b0 = CONCAT44(uStack_b0._4_4_,uVar3);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_90 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("fWeight");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
  local_88 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar4 = (IUnknown *)*puVar7;
  if (pIVar4 != (IUnknown *)0x0) {
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8[0] != (longlong *)0x0) {
      (**(code **)(*local_c8[0] + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_88 = (longlong *)&local_b8;
    uVar1 = *(undefined1 *)(param_2 + 0x70);
    Ordinal_8(&local_b8);
    if ((short)local_b8 != 0x11) {
      iVar6 = Ordinal_9(&local_b8);
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar6);
      }
      local_b8 = CONCAT22(local_b8._2_2_,0x11);
    }
    uStack_b0 = CONCAT71(uStack_b0._1_7_,uVar1);
    plVar9 = operator_new(0x18);
    plVar11 = plVar12;
    local_90 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("pet_type");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0x10,1,1,&local_b8);
    local_88 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8[0] != (longlong *)0x0) {
      (**(code **)(*local_c8[0] + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_88 = (longlong *)&local_b8;
    uVar3 = *(undefined4 *)(param_2 + 0x71);
    Ordinal_8(&local_b8);
    FUN_140062080(&local_b8,uVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar12;
    local_90 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490(&DAT_14028b470);
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,1,&local_b8);
    local_88 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8[0] != (longlong *)0x0) {
      (**(code **)(*local_c8[0] + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_88 = (longlong *)&local_b8;
    uVar3 = *(undefined4 *)(param_2 + 0x75);
    Ordinal_8(&local_b8);
    FUN_140062080(&local_b8,uVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar12;
    local_90 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490(&DAT_14028b474);
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,1,&local_b8);
    local_88 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8[0] != (longlong *)0x0) {
      (**(code **)(*local_c8[0] + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_88 = (longlong *)&local_b8;
    uVar3 = *(undefined4 *)(param_2 + 0x79);
    Ordinal_8(&local_b8);
    if ((short)local_b8 != 4) {
      iVar6 = Ordinal_9(&local_b8);
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar6);
      }
      local_b8 = CONCAT22(local_b8._2_2_,4);
    }
    uStack_b0 = CONCAT44(uStack_b0._4_4_,uVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar12;
    local_90 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("physical_attack");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
    local_88 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8[0] != (longlong *)0x0) {
      (**(code **)(*local_c8[0] + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    local_88 = (longlong *)&local_b8;
    uVar3 = *(undefined4 *)(param_2 + 0x7d);
    Ordinal_8(&local_b8);
    if ((short)local_b8 != 4) {
      iVar6 = Ordinal_9(&local_b8);
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar6);
      }
      local_b8 = CONCAT22(local_b8._2_2_,4);
    }
    uStack_b0 = CONCAT44(uStack_b0._4_4_,uVar3);
    plVar9 = operator_new(0x18);
    plVar11 = plVar12;
    local_90 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("physical_defence");
      *plVar9 = lVar10;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
    local_88 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
    pIVar4 = (IUnknown *)*puVar7;
    if (pIVar4 != (IUnknown *)0x0) {
      UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
      }
      if (local_c8[0] != (longlong *)0x0) {
        (**(code **)(*local_c8[0] + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      local_88 = (longlong *)&local_b8;
      uVar3 = *(undefined4 *)(param_2 + 0x81);
      Ordinal_8(&local_b8);
      if ((short)local_b8 != 4) {
        iVar6 = Ordinal_9(&local_b8);
        if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar6);
        }
        local_b8 = CONCAT22(local_b8._2_2_,4);
      }
      uStack_b0 = CONCAT44(uStack_b0._4_4_,uVar3);
      plVar9 = operator_new(0x18);
      plVar11 = plVar12;
      local_90 = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar10 = FUN_140201490("magical_attack");
        *plVar9 = lVar10;
        plVar11 = plVar9;
      }
      local_res18 = plVar11;
      if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
      local_88 = plVar11;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
      pIVar4 = (IUnknown *)*puVar7;
      if (pIVar4 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
      }
      if (local_c8[0] != (longlong *)0x0) {
        (**(code **)(*local_c8[0] + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      local_88 = (longlong *)&local_b8;
      uVar3 = *(undefined4 *)(param_2 + 0x85);
      Ordinal_8(&local_b8);
      if ((short)local_b8 != 4) {
        iVar6 = Ordinal_9(&local_b8);
        if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar6);
        }
        local_b8 = CONCAT22(local_b8._2_2_,4);
      }
      uStack_b0 = CONCAT44(uStack_b0._4_4_,uVar3);
      plVar9 = operator_new(0x18);
      plVar11 = plVar12;
      local_90 = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar10 = FUN_140201490("magical_defence");
        *plVar9 = lVar10;
        plVar11 = plVar9;
      }
      local_res18 = plVar11;
      if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar11 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
      local_88 = plVar11;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
      pIVar4 = (IUnknown *)*puVar7;
      if (pIVar4 != (IUnknown *)0x0) {
        UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
        }
        if (local_c8[0] != (longlong *)0x0) {
          (**(code **)(*local_c8[0] + 0x10))();
        }
        if ((longlong *)*plVar11 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar11 + 0x10))();
        }
        local_88 = (longlong *)&local_b8;
        uVar3 = *(undefined4 *)(param_2 + 0x89);
        Ordinal_8(&local_b8);
        if ((short)local_b8 != 4) {
          iVar6 = Ordinal_9(&local_b8);
          if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(iVar6);
          }
          local_b8 = CONCAT22(local_b8._2_2_,4);
        }
        uStack_b0 = CONCAT44(uStack_b0._4_4_,uVar3);
        plVar11 = operator_new(0x18);
        local_90 = plVar11;
        if (plVar11 != (longlong *)0x0) {
          plVar11[1] = 0;
          *(undefined4 *)(plVar11 + 2) = 1;
          lVar10 = FUN_140201490("loyalty");
          *plVar11 = lVar10;
          plVar12 = plVar11;
        }
        local_res18 = plVar12;
        if (plVar12 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar12 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
        local_88 = plVar12;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar7 = (undefined8 *)FUN_140001660(local_res20,local_c8);
        pIVar4 = (IUnknown *)*puVar7;
        if (pIVar4 != (IUnknown *)0x0) {
          UVar5 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar4,(_GUID *)&DAT_140281eb0);
          }
          if (local_c8[0] != (longlong *)0x0) {
            (**(code **)(*local_c8[0] + 0x10))();
          }
          if ((longlong *)*plVar12 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar12 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400927e0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined6 uVar2;
  IUnknown *This;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  undefined4 uVar6;
  undefined8 *puVar7;
  wchar_t *pwVar8;
  longlong lVar9;
  longlong *plVar10;
  undefined8 uVar11;
  undefined8 uVar12;
  wchar_t *pwVar13;
  char *riid;
  wchar_t *pwVar14;
  char *ppvObject;
  wchar_t *pwVar15;
  uint uVar16;
  undefined1 auStackY_5a8 [32];
  char local_568 [4];
  uint local_564;
  short local_560;
  short local_55c;
  undefined8 local_558;
  undefined4 local_550;
  undefined2 uStack_54c;
  short sStack_54a;
  longlong *local_548;
  int local_540;
  wchar_t *local_538 [2];
  IUnknown *local_528;
  longlong *local_520;
  undefined4 local_518;
  undefined1 local_508 [24];
  undefined1 local_4f0 [24];
  undefined4 local_4d8;
  undefined1 *local_4d0;
  undefined4 local_4c8;
  undefined8 local_4c0;
  undefined1 *local_4b8;
  longlong *local_4a8;
  LPUNKNOWN local_4a0;
  undefined8 *local_498;
  undefined8 *local_490;
  wchar_t *local_488;
  undefined8 local_480;
  undefined1 local_478;
  undefined8 local_470;
  undefined1 local_468;
  longlong *local_460;
  wchar_t *local_458;
  undefined8 local_450;
  undefined1 local_448;
  undefined8 local_440;
  undefined1 local_438;
  undefined1 local_430 [8];
  ulong local_428 [2];
  uchar auStack_420 [4];
  uchar auStack_41c [12];
  undefined4 local_410;
  undefined4 uStack_40c;
  undefined4 uStack_408;
  undefined4 uStack_404;
  undefined4 local_3f8;
  undefined4 uStack_3f4;
  undefined4 uStack_3f0;
  undefined4 uStack_3ec;
  undefined4 local_3e8;
  undefined4 uStack_3e4;
  undefined4 uStack_3e0;
  undefined4 uStack_3dc;
  undefined8 local_3d0;
  undefined1 local_3c8 [24];
  undefined1 local_3b0 [24];
  undefined1 local_398 [24];
  undefined1 local_380 [24];
  undefined1 local_368 [24];
  undefined1 local_350 [24];
  undefined1 local_338 [24];
  undefined1 local_320 [24];
  undefined1 local_308 [24];
  undefined1 local_2f0 [24];
  undefined1 local_2d8 [24];
  undefined1 local_2c0 [24];
  undefined1 local_2a8 [24];
  undefined1 local_290 [24];
  undefined1 local_278 [24];
  undefined1 local_260 [24];
  undefined1 local_248 [24];
  undefined1 local_230 [24];
  undefined1 local_218 [24];
  undefined1 local_200 [24];
  undefined1 local_1e8 [24];
  undefined1 local_1d0 [24];
  undefined1 local_1b8 [24];
  undefined1 local_1a0 [24];
  undefined1 local_188 [24];
  undefined1 local_170 [24];
  undefined1 local_158 [24];
  longlong local_140 [3];
  undefined1 local_128 [32];
  IID local_108;
  undefined4 local_f8;
  undefined4 uStack_f4;
  undefined4 uStack_f0;
  undefined4 uStack_ec;
  undefined4 local_e8;
  undefined4 uStack_e4;
  undefined4 uStack_e0;
  undefined4 uStack_dc;
  undefined2 local_d8;
  wchar_t local_d6 [12];
  ulonglong local_be;
  undefined2 local_b6;
  undefined4 local_b4;
  undefined8 local_b0;
  undefined2 local_a8;
  undefined8 local_a6;
  undefined8 local_9e;
  undefined8 local_96;
  undefined8 local_8e;
  undefined8 local_86;
  undefined4 local_7e;
  undefined4 local_7a;
  undefined1 local_76;
  undefined8 local_75;
  undefined4 local_6d;
  undefined4 local_69;
  undefined4 local_65;
  undefined4 local_61;
  undefined4 local_5d;
  ulonglong local_58;
  
  local_3d0 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStackY_5a8;
  local_550 = *(undefined4 *)(param_2 + 1);
  local_558._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_558._0_4_ = CONCAT22(0x23bb,(short)*param_2);
  uStack_54c = 0xe9;
  pwVar15 = (wchar_t *)0x0;
  pwVar14 = (wchar_t *)0x0;
  local_564 = 0;
  sStack_54a = 0;
  uVar16 = 0x10;
  pIVar1 = *(IUnknown **)*param_1;
  local_498 = param_1;
  local_490 = param_2;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400928c0:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (wchar_t *)0x0;
    }
  }
  else {
    local_540 = 0;
    UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_540 == 0) goto LAB_1400928c0;
  }
  local_548 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_548);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_528 = (IUnknown *)0x0;
  local_520 = (longlong *)0x0;
  Ordinal_8(local_508);
  Ordinal_8(local_4f0);
  pIVar1 = local_528;
  if ((local_528 != (IUnknown *)0x0) && (local_528 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_4b8 = &DAT_140281f00;
  local_4d0 = &DAT_140281f00;
  local_4c8 = 0;
  local_4c0 = 0;
  if (local_528 != (IUnknown *)0x0) {
    (*local_528->lpVtbl->Release)(local_528);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_4a0);
  if (-1 < HVar5) {
    HVar5 = OleRun(local_4a0);
    if (-1 < HVar5) {
      HVar5 = (*local_4a0->lpVtbl->QueryInterface)(local_4a0,(IID *)&DAT_140281f68,&local_528);
    }
    (*local_4a0->lpVtbl->Release)(local_4a0);
    if (-1 < HVar5) goto LAB_140092a0b;
  }
  local_528 = (IUnknown *)0x0;
LAB_140092a0b:
  local_4d8 = 2;
  local_518 = 1;
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_460);
  FUN_140001710(&local_548,*puVar7,"dbo.up_read_pet");
  if (local_460 != (longlong *)0x0) {
    (**(code **)(*local_460 + 0x10))();
  }
  local_4a8 = local_140;
  local_3f8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_3f4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_3f0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_3ec = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_140,&local_3f8);
  pwVar8 = operator_new(0x18);
  local_458 = pwVar15;
  local_488 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("character_id");
    *(longlong *)pwVar8 = lVar9;
    local_458 = pwVar8;
  }
  if (local_458 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_548,local_430,&local_458,0xca);
  local_4a8 = plVar10;
  if (local_548 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_548,&local_488);
  pIVar1 = (IUnknown *)*puVar7;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_488 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_488 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    puVar7 = (undefined8 *)FUN_1400016d0(&local_548,&local_4a8);
    This = local_528;
    pIVar1 = (IUnknown *)*puVar7;
    if (local_528 != pIVar1) {
      local_528 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_4a8 != (longlong *)0x0) {
      (**(code **)(*local_4a8 + 0x10))();
    }
    pIVar1 = local_528;
    local_568[0] = '\x01';
    if (local_528 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_55c = 0;
    UVar3 = (*local_528->lpVtbl[6].Release)(local_528);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
    }
    if (local_55c == -1) {
      uStack_54c = 0xea;
      pwVar14 = pwVar15;
    }
    else {
      while( true ) {
        pIVar1 = local_528;
        if (local_528 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_560 = 0;
        UVar3 = (*local_528->lpVtbl[6].Release)(local_528);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
        }
        if (local_560 == -1) break;
        local_108.Data1 = 0;
        local_108.Data2 = 0;
        local_108.Data3 = 0;
        local_108.Data4[0] = '\0';
        local_108.Data4[1] = '\0';
        local_108.Data4[2] = '\0';
        local_108.Data4[3] = '\0';
        local_108.Data4[4] = '\0';
        local_108.Data4[5] = '\0';
        local_108.Data4[6] = '\0';
        local_108.Data4[7] = '\0';
        local_f8 = 0;
        uStack_f4 = 0;
        uStack_f0 = 0;
        uStack_ec = 0;
        local_e8 = 0;
        uStack_e4 = 0;
        uStack_e0 = 0;
        uStack_dc = 0;
        local_d8 = 0;
        local_b6 = 0;
        local_b4 = 0;
        local_b0 = 0;
        local_a8 = 0;
        local_a6 = 0;
        local_9e = 0;
        local_96 = 0;
        local_8e = 0;
        local_86 = 0;
        local_7e = 0;
        local_7a = 0;
        local_75 = 0;
        local_6d = 0;
        local_69 = 0;
        local_65 = 0;
        local_61 = 0;
        local_5d = 0;
        local_d6[0] = L'\0';
        local_d6[1] = L'\0';
        local_d6[2] = L'\0';
        local_d6[3] = L'\0';
        local_d6[4] = L'\0';
        local_d6[5] = L'\0';
        local_d6[6] = L'\0';
        local_d6[7] = L'\0';
        local_d6[8] = L'\0';
        local_d6[9] = L'\0';
        local_d6[10] = L'\0';
        local_d6[0xb] = L'\0';
        local_be = 0;
        local_76 = local_560 == -1;
        uVar11 = FUN_140002290(&local_528,local_3c8,"pet_id",local_568);
        FUN_1400625d0(uVar11,local_428);
        local_108.Data1 = local_428[0];
        local_108.Data2 = (undefined2)local_428[1];
        local_108.Data3 = local_428[1]._2_2_;
        local_108.Data4[0] = auStack_420[0];
        local_108.Data4[1] = auStack_420[1];
        local_108.Data4[2] = auStack_420[2];
        local_108.Data4[3] = auStack_420[3];
        local_108.Data4[4] = auStack_41c[0];
        local_108.Data4[5] = auStack_41c[1];
        local_108.Data4[6] = auStack_41c[2];
        local_108.Data4[7] = auStack_41c[3];
        Ordinal_9(local_3c8);
        uVar11 = FUN_140002290(&local_528,local_398,"character_id",local_568);
        FUN_1400625d0(uVar11,&local_410);
        local_f8 = local_410;
        uStack_f4 = uStack_40c;
        uStack_f0 = uStack_408;
        uStack_ec = uStack_404;
        Ordinal_9(local_398);
        uVar11 = FUN_140002290(&local_528,local_248,"AuthID",local_568);
        FUN_1400625d0(uVar11,&local_3e8);
        local_e8 = local_3e8;
        uStack_e4 = uStack_3e4;
        uStack_e0 = uStack_3e0;
        uStack_dc = uStack_3dc;
        Ordinal_9(local_248);
        uVar11 = FUN_140002290(&local_528,local_368,"server",local_568);
        FUN_140182560(uVar11);
        local_d8 = FUN_140062550(uVar11);
        Ordinal_9(local_368);
        uVar11 = FUN_140002290(&local_528,local_158,&DAT_14028a330,local_568);
        FUN_140062840(uVar11,local_538);
        FUN_1401568c0();
        pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar8 = pwVar15;
        }
        if (local_538[0] != (wchar_t *)PTR_DAT_1403200a0) {
          uVar11 = FUN_1401568c0();
          local_438 = 0;
          local_440 = uVar11;
          FUN_140156b50(uVar11);
          local_438 = 1;
          if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar8 + -4 != (wchar_t *)0x0)) {
            uVar12 = FUN_1401568c0();
            local_478 = 0;
            local_480 = uVar12;
            FUN_140156b50(uVar12);
            local_478 = 1;
            pwVar14 = pwVar8 + -2;
            *(int *)pwVar14 = *(int *)pwVar14 + -1;
            if (*(int *)pwVar14 == 0) {
              FUN_140156970(pwVar8 + -4);
            }
            FUN_140156be0(uVar12);
            local_478 = 0;
          }
          pwVar8 = local_538[0];
          if (((local_538[0] != (wchar_t *)PTR_DAT_1403200a0) && (local_538[0] != (wchar_t *)0x0))
             && (local_538[0] != (wchar_t *)0x8)) {
            *(int *)(local_538[0] + -2) = *(int *)(local_538[0] + -2) + 1;
          }
          FUN_140156be0(uVar11);
          local_438 = 0;
          pwVar14 = (wchar_t *)(ulonglong)local_564;
        }
        pwVar13 = pwVar8;
        if (pwVar8 == (wchar_t *)0x0) {
          pwVar13 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_d6,pwVar13,0xf);
        if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar8 + -4 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_468 = 0;
          local_470 = uVar11;
          FUN_140156b50(uVar11);
          local_468 = 1;
          pwVar13 = pwVar8 + -2;
          *(int *)pwVar13 = *(int *)pwVar13 + -1;
          if (*(int *)pwVar13 == 0) {
            FUN_140156970(pwVar8 + -4);
          }
          FUN_140156be0(uVar11);
          local_468 = 0;
        }
        pwVar8 = local_538[0];
        if (((local_538[0] != (wchar_t *)0x0) && (local_538[0] != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar13 = local_538[0] + -4, pwVar13 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_448 = 0;
          local_450 = uVar11;
          FUN_140156b50(uVar11);
          local_448 = 1;
          pwVar8 = pwVar8 + -2;
          *(int *)pwVar8 = *(int *)pwVar8 + -1;
          if (*(int *)pwVar8 == 0) {
            FUN_140156970(pwVar13);
          }
          FUN_140156be0(uVar11);
          local_448 = 0;
        }
        local_538[0] = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_158);
        local_be = local_be & 0xffffffffffff;
        uVar11 = FUN_140002290(&local_528,local_338,&DAT_14028b3e4,local_568);
        FUN_140182560(uVar11);
        local_b6 = FUN_140062550(uVar11);
        Ordinal_9(local_338);
        uVar11 = FUN_140002290(&local_528,local_218,"Level",local_568);
        FUN_140182560(uVar11);
        local_b4 = FUN_140062550(uVar11);
        Ordinal_9(local_218);
        uVar11 = FUN_140002290(&local_528,local_308,"Experience",local_568);
        FUN_140182560(uVar11);
        local_b0 = FUN_140182640(uVar11);
        Ordinal_9(local_308);
        uVar11 = FUN_140002290(&local_528,local_188,"inventory_count",local_568);
        FUN_140182560(uVar11);
        local_a8 = FUN_140062550(uVar11);
        Ordinal_9(local_188);
        uVar11 = FUN_140002290(&local_528,local_2d8,"CreateTime",local_568);
        FUN_140182560(uVar11);
        local_a6 = FUN_140098d80(uVar11);
        Ordinal_9(local_2d8);
        uVar11 = FUN_140002290(&local_528,local_1e8,"Expire_Time",local_568);
        FUN_140182560(uVar11);
        uVar6 = FUN_140062550(uVar11);
        local_9e = CONCAT44(local_9e._4_4_,uVar6);
        Ordinal_9(local_1e8);
        uVar11 = FUN_140002290(&local_528,local_2a8,"Vital",local_568);
        FUN_140182560(uVar11);
        uVar6 = FUN_140062550(uVar11);
        local_9e = CONCAT44(uVar6,(undefined4)local_9e);
        Ordinal_9(local_2a8);
        uVar11 = FUN_140002290(&local_528,local_128,"Intelligence",local_568);
        FUN_140182560(uVar11);
        uVar6 = FUN_140062550(uVar11);
        local_96 = CONCAT44(local_96._4_4_,uVar6);
        Ordinal_9(local_128);
        uVar11 = FUN_140002290(&local_528,local_278,"Strength",local_568);
        FUN_140182560(uVar11);
        uVar6 = FUN_140062550(uVar11);
        local_96 = CONCAT44(uVar6,(undefined4)local_96);
        Ordinal_9(local_278);
        uVar11 = FUN_140002290(&local_528,local_1b8,"Resilient",local_568);
        FUN_140182560(uVar11);
        uVar6 = FUN_140062550(uVar11);
        local_8e = CONCAT44(local_8e._4_4_,uVar6);
        Ordinal_9(local_1b8);
        uVar11 = FUN_140002290(&local_528,local_3b0,"Eloquence",local_568);
        FUN_140182560(uVar11);
        uVar6 = FUN_140062550(uVar11);
        local_8e = CONCAT44(uVar6,(undefined4)local_8e);
        Ordinal_9(local_3b0);
        uVar11 = FUN_140002290(&local_528,local_380,"Charm",local_568);
        FUN_140182560(uVar11);
        uVar6 = FUN_140062550(uVar11);
        local_86 = CONCAT44(local_86._4_4_,uVar6);
        Ordinal_9(local_380);
        uVar11 = FUN_140002290(&local_528,local_350,"Temper",local_568);
        FUN_140182560(uVar11);
        uVar6 = FUN_140062550(uVar11);
        local_86 = CONCAT44(uVar6,(undefined4)local_86);
        Ordinal_9(local_350);
        uVar11 = FUN_140002290(&local_528,local_320,"Height",local_568);
        FUN_140182560(uVar11);
        local_7e = FUN_140098cf0(uVar11);
        Ordinal_9(local_320);
        uVar11 = FUN_140002290(&local_528,local_2f0,"Weight",local_568);
        FUN_140182560(uVar11);
        local_7a = FUN_140098cf0(uVar11);
        Ordinal_9(local_2f0);
        uVar11 = FUN_140002290(&local_528,local_2c0,"Pet_Type",local_568);
        FUN_140182560(uVar11);
        local_76 = FUN_1400624d0(uVar11);
        Ordinal_9(local_2c0);
        uVar11 = FUN_140002290(&local_528,local_290,&DAT_14028b470,local_568);
        FUN_140182560(uVar11);
        uVar6 = FUN_140062550(uVar11);
        local_75 = CONCAT44(local_75._4_4_,uVar6);
        Ordinal_9(local_290);
        uVar11 = FUN_140002290(&local_528,local_260,&DAT_14028b474,local_568);
        FUN_140182560(uVar11);
        uVar6 = FUN_140062550(uVar11);
        local_75 = CONCAT44(uVar6,(undefined4)local_75);
        Ordinal_9(local_260);
        uVar11 = FUN_140002290(&local_528,local_230,"physical_attack",local_568);
        FUN_140182560(uVar11);
        local_6d = FUN_140098cf0(uVar11);
        Ordinal_9(local_230);
        uVar11 = FUN_140002290(&local_528,local_200,"physical_defence",local_568);
        FUN_140182560(uVar11);
        local_69 = FUN_140098cf0(uVar11);
        Ordinal_9(local_200);
        uVar11 = FUN_140002290(&local_528,local_1d0,"magical_attack",local_568);
        FUN_140182560(uVar11);
        local_65 = FUN_140098cf0(uVar11);
        Ordinal_9(local_1d0);
        uVar11 = FUN_140002290(&local_528,local_1a0,"magical_defence",local_568);
        FUN_140182560(uVar11);
        local_61 = FUN_140098cf0(uVar11);
        Ordinal_9(local_1a0);
        uVar11 = FUN_140002290(&local_528,local_170,"loyalty",local_568);
        FUN_140182560(uVar11);
        local_5d = FUN_140098cf0(uVar11);
        Ordinal_9(local_170);
        riid = (char *)&local_108;
        ppvObject = (char *)0xaf;
        memcpy((void *)((longlong)(int)uVar16 + 0x130 + (longlong)param_1),riid,0xaf);
        uVar16 = uVar16 + 0xaf;
        sStack_54a = (short)pwVar14 + 1;
        pwVar14 = (wchar_t *)CONCAT62((int6)((ulonglong)pwVar14 >> 0x10),sStack_54a);
        local_564 = (uint)pwVar14;
        if (50000 < uVar16) {
          uVar2 = local_558._2_6_;
          local_558 = CONCAT62(local_558._2_6_,(short)uVar16);
          uVar11 = local_558;
          riid = (char *)(param_1 + 0x26);
          local_558._4_2_ = SUB62(uVar2,2);
          local_558._6_2_ = SUB62(uVar2,4);
          ((IID *)riid)->Data1 = (undefined4)local_558;
          ((IID *)riid)->Data2 = local_558._4_2_;
          ((IID *)riid)->Data3 = local_558._6_2_;
          param_1[0x27] = CONCAT26(sStack_54a,CONCAT24(uStack_54c,local_550));
          local_558 = uVar11;
          iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
          if (iVar4 == 0) {
            ppvObject = "DB Result Queue push error";
            riid = "DBResultQueue_Error.Log";
            FUN_1400a0b40(param_1[0x23]);
          }
          uVar16 = 0x10;
          local_564 = 0;
          sStack_54a = 0;
          pwVar14 = pwVar15;
        }
        pIVar1 = local_528;
        if (local_528 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar5 = (*local_528->lpVtbl[0xc].QueryInterface)(local_528,(IID *)riid,(void **)ppvObject);
        if (HVar5 < 0) {
          _com_issue_errorex(HVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      pwVar14 = (wchar_t *)0x1;
      if (local_568[0] == '\0') {
        uStack_54c = 0xeb;
        pwVar14 = pwVar15;
      }
    }
    local_558 = CONCAT62(local_558._2_6_,(short)uVar16);
    param_1[0x26] = local_558;
    param_1[0x27] = CONCAT26(sStack_54a,CONCAT24(uStack_54c,local_550));
    iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar4 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar1 = local_528;
    if (local_528 != (IUnknown *)0x0) {
      local_564 = 0;
      UVar3 = (*local_528->lpVtbl[0x12].AddRef)(local_528);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_528;
      if (local_564 != 0) {
        if (local_528 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar3 = (*local_528->lpVtbl[10].Release)(local_528);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_528 != (IUnknown *)0x0) {
        (*local_528->lpVtbl->Release)(local_528);
        local_528 = (IUnknown *)0x0;
      }
    }
    local_4c0 = 0;
    local_4b8 = &DAT_140281f00;
    local_4d0 = &DAT_140281f00;
    local_4c8 = 0;
    local_4d8 = 0;
    Ordinal_9(local_4f0);
    Ordinal_9(local_508);
    if (local_520 != (longlong *)0x0) {
      (**(code **)(*local_520 + 0x10))();
    }
    if (local_528 != (IUnknown *)0x0) {
      (*local_528->lpVtbl->Release)(local_528);
    }
    if (local_548 != (longlong *)0x0) {
      (**(code **)(*local_548 + 0x10))();
    }
    return pwVar14;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140093a30(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140093ac6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140093ac6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_pet_level");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("pet_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  uVar1 = *(undefined4 *)(param_2 + 0x2e);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  uVar6 = *(undefined8 *)(param_2 + 0x32);
  Ordinal_8(&local_88);
  uVar6 = FUN_1401824f0(local_58,uVar6);
  iVar4 = Ordinal_10(&local_88,uVar6);
  if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  Ordinal_9(local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Experience");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0x14,1,8,&local_88);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    uVar1 = *(undefined4 *)(param_2 + 0x3a);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar1);
    plVar9 = operator_new(0x18);
    local_98[0] = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("inventory_count");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0x10,1,1,&local_88);
    local_68 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140094190(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar9 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140094226;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140094226:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_pet_exp");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_88,&local_68);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_a0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("pet_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_58,&local_88);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_a0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    uVar5 = *(undefined8 *)(param_2 + 0x2e);
    Ordinal_8(&local_88);
    uVar5 = FUN_1401824f0(local_58,uVar5);
    iVar3 = Ordinal_10(&local_88,uVar5);
    if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar3);
    }
    Ordinal_9(local_58);
    plVar8 = operator_new(0x18);
    local_98[0] = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar7 = FUN_140201490("Experience");
      *plVar8 = lVar7;
      plVar9 = plVar8;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0x14,1,8,&local_88);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140094690(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_b8;
  longlong *local_b0;
  longlong *local_a8 [2];
  longlong *local_98;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  longlong local_88 [4];
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar9 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140094726;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140094726:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_pet_name");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_b8 = (longlong *)&local_68;
  local_98 = *(longlong **)(param_2 + 0xe);
  uStack_90 = *(undefined4 *)(param_2 + 0x16);
  uStack_8c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_68,&local_98);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_b0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("pet_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,local_a8,&local_res18,0xca,1,0x26,uVar5);
  local_b0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_a8[0] = local_88;
  local_68 = *(undefined4 *)(param_2 + 0x1e);
  uStack_64 = *(undefined4 *)(param_2 + 0x22);
  uStack_60 = *(undefined4 *)(param_2 + 0x26);
  uStack_5c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_88,&local_68);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_b0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a8[0] = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_98 = local_88;
    uVar5 = FUN_1400623f0(local_88,param_2 + 0x36);
    plVar8 = operator_new(0x18);
    local_a8[0] = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar7 = FUN_140201490(&DAT_14028a330);
      *plVar8 = lVar7;
      plVar9 = plVar8;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_b0,&local_res18,0xca,1,0x10,uVar5);
    local_98 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_b8 != (longlong *)0x0) {
        (**(code **)(*local_b8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140094b50(undefined8 *param_1,undefined8 *param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *local_res20;
  undefined4 local_1b8;
  undefined4 uStack_1b4;
  undefined4 local_1b0;
  undefined2 local_1ac;
  longlong *local_1a8;
  longlong *local_1a0;
  longlong *local_198;
  longlong *local_190;
  longlong *local_188;
  longlong *local_180;
  longlong *local_178;
  longlong *local_170;
  longlong *local_168;
  longlong *local_160;
  longlong *local_158;
  longlong *local_150;
  longlong *local_148;
  longlong *local_140;
  longlong *local_138;
  longlong *local_130;
  longlong *local_128;
  longlong *local_120;
  longlong *local_118;
  undefined1 local_110 [24];
  undefined1 local_f8 [24];
  undefined1 local_e0 [24];
  undefined1 local_c8 [24];
  undefined1 local_b0 [8];
  undefined8 local_a8;
  undefined4 local_98;
  undefined4 uStack_94;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined1 local_68 [24];
  undefined1 local_50 [32];
  
  local_a8 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if ((pIVar3 != (IUnknown *)0x0) && (UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3), (int)UVar4 < 0)
     ) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    uVar7 = 0;
  }
  else {
    local_res20 = (longlong *)0x0;
    iVar5 = FUN_140001970(&local_res20);
    if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_1b0 = *(undefined4 *)(param_2 + 1);
    _local_1b8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x24050000);
    local_1ac = 0x96;
    _local_1b8 = CONCAT62(stack0xfffffffffffffe4a,0xe);
    puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_160);
    FUN_140001710(&local_res20,*puVar6,"dbo.up_create_pet_inventory_item");
    if (local_160 != (longlong *)0x0) {
      (**(code **)(*local_160 + 0x10))();
    }
    local_88 = *(undefined4 *)((longlong)param_2 + 0xe);
    uStack_84 = *(undefined4 *)((longlong)param_2 + 0x12);
    uStack_80 = *(undefined4 *)((longlong)param_2 + 0x16);
    uStack_7c = *(undefined4 *)((longlong)param_2 + 0x1a);
    uVar7 = FUN_140062280(local_68,&local_88);
    plVar8 = operator_new(0x18);
    local_140 = plVar10;
    local_1a8 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("pet_id");
      *plVar8 = lVar9;
      local_140 = plVar8;
    }
    if (local_140 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_1a0,&local_140,0xca,1,0x26,uVar7);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_120);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_120 != (longlong *)0x0) {
      (**(code **)(*local_120 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_98 = *(undefined4 *)((longlong)param_2 + 0x1e);
    uStack_94 = *(undefined4 *)((longlong)param_2 + 0x22);
    uStack_90 = *(undefined4 *)((longlong)param_2 + 0x26);
    uStack_8c = *(undefined4 *)((longlong)param_2 + 0x2a);
    uVar7 = FUN_140062280(local_50,&local_98);
    plVar8 = operator_new(0x18);
    local_190 = plVar10;
    local_1a0 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("auth_id");
      *plVar8 = lVar9;
      local_190 = plVar8;
    }
    if (local_190 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_158,&local_190,0xca,1,0x26,uVar7);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_168);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_168 != (longlong *)0x0) {
      (**(code **)(*local_168 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    sVar1 = *(short *)((longlong)param_2 + 0x44);
    Ordinal_8(local_e0);
    FUN_140062080(local_e0,(int)sVar1);
    plVar8 = operator_new(0x18);
    local_180 = plVar10;
    local_158 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("page_index");
      *plVar8 = lVar9;
      local_180 = plVar8;
    }
    if (local_180 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_198,&local_180,3,1,4,local_e0);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_138);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_138 != (longlong *)0x0) {
      (**(code **)(*local_138 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    sVar1 = *(short *)((longlong)param_2 + 0x46);
    Ordinal_8(local_f8);
    FUN_140062080(local_f8,(int)sVar1);
    plVar8 = operator_new(0x18);
    local_170 = plVar10;
    local_198 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("slot_index");
      *plVar8 = lVar9;
      local_170 = plVar8;
    }
    if (local_170 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_188,&local_170,3,1,4,local_f8);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_128);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_128 != (longlong *)0x0) {
      (**(code **)(*local_128 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    uVar2 = *(undefined4 *)(param_2 + 9);
    Ordinal_8(local_c8);
    FUN_140062080(local_c8,uVar2);
    plVar8 = operator_new(0x18);
    local_118 = plVar10;
    local_188 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490(&DAT_14028931c);
      *plVar8 = lVar9;
      local_118 = plVar8;
    }
    if (local_118 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_178,&local_118,3,1,4,local_c8);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_148);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_148 != (longlong *)0x0) {
      (**(code **)(*local_148 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    sVar1 = *(short *)((longlong)param_2 + 0x2e);
    Ordinal_8(local_110);
    FUN_140062080(local_110,(int)sVar1);
    plVar8 = operator_new(0x18);
    local_178 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("gcode");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_150 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,local_b0,&local_150,3,1,4,local_110);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_130);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_130 != (longlong *)0x0) {
      (**(code **)(*local_130 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    FUN_1400a2c10(&local_res20,param_2 + 6);
    FUN_1400016d0(&local_res20,&local_1a8);
    if (local_1a8 != (longlong *)0x0) {
      (**(code **)(*local_1a8 + 0x10))();
    }
    iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_1b8);
    if (iVar5 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    uVar7 = 1;
  }
  return uVar7;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_1400954b0(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  undefined8 uVar3;
  undefined6 uVar4;
  IUnknown *This;
  char cVar5;
  int iVar6;
  HRESULT HVar7;
  ULONG UVar8;
  undefined8 *puVar9;
  longlong *plVar10;
  longlong lVar11;
  char *riid;
  uint uVar12;
  char *ppvObject;
  longlong *plVar13;
  undefined1 auStackY_288 [32];
  char local_248 [4];
  uint local_244;
  short local_240;
  short local_23c;
  longlong *local_238;
  int local_230;
  undefined4 uVar14;
  undefined8 local_220;
  undefined2 uStack_214;
  undefined2 uStack_212;
  undefined6 uStack_210;
  undefined2 uStack_20a;
  undefined6 uStack_208;
  ushort local_202;
  LPUNKNOWN local_1f8;
  longlong *local_1f0;
  IUnknown *local_1e8;
  longlong *local_1e0;
  undefined4 local_1d8;
  undefined1 local_1c8 [24];
  undefined1 local_1b0 [24];
  undefined4 local_198;
  undefined1 *local_190;
  undefined4 local_188;
  undefined8 local_180;
  undefined1 *local_178;
  longlong *local_168;
  undefined8 *local_160;
  longlong *local_158;
  longlong *local_150;
  undefined4 local_148;
  undefined4 uStack_144;
  undefined4 uStack_140;
  undefined4 uStack_13c;
  undefined1 local_138 [16];
  undefined8 local_128;
  longlong local_118 [4];
  IID local_f8;
  undefined8 local_e8;
  undefined2 local_e0;
  undefined8 local_de;
  undefined2 local_d6;
  undefined8 local_d4;
  undefined8 local_cc;
  undefined8 local_c4;
  undefined4 local_bc;
  undefined2 local_b8;
  undefined8 local_b6;
  undefined8 local_ae;
  undefined8 local_a6;
  undefined2 local_9e;
  undefined1 local_9c;
  undefined8 local_9b;
  undefined8 local_93;
  undefined2 local_8b;
  undefined8 local_89;
  undefined8 local_81;
  undefined8 local_79;
  undefined8 local_71;
  undefined8 local_69;
  undefined1 local_61 [40];
  undefined1 local_39;
  ulonglong local_38;
  
  local_128 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_288;
  local_238 = (longlong *)0x0;
  local_160 = param_2;
  iVar6 = FUN_140001970(&local_238);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  local_1e8 = (IUnknown *)0x0;
  local_1e0 = (longlong *)0x0;
  Ordinal_8(local_1c8);
  Ordinal_8(local_1b0);
  pIVar2 = local_1e8;
  if ((local_1e8 != (IUnknown *)0x0) && (local_1e8 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_180 = 0;
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  HVar7 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_1f8);
  if (-1 < HVar7) {
    HVar7 = OleRun(local_1f8);
    if (-1 < HVar7) {
      HVar7 = (*local_1f8->lpVtbl->QueryInterface)(local_1f8,(IID *)&DAT_140281f68,&local_1e8);
    }
    (*local_1f8->lpVtbl->Release)(local_1f8);
    if (-1 < HVar7) goto LAB_14009562a;
  }
  local_1e8 = (IUnknown *)0x0;
LAB_14009562a:
  local_198 = 2;
  uVar14 = 1;
  local_1d8 = 1;
  local_248[0] = '\x01';
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_220 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x24060000);
  uStack_214 = 0xe9;
  plVar13 = (longlong *)0x0;
  local_202 = 0;
  uStack_212 = (undefined2)*(undefined8 *)((longlong)param_2 + 0xe);
  uStack_210 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0xe) >> 0x10);
  uStack_20a = (undefined2)*(undefined8 *)((longlong)param_2 + 0x16);
  uStack_208 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x16) >> 0x10);
  uVar12 = 0x20;
  local_244 = 0x20;
  pIVar2 = *(IUnknown **)*param_1;
  if ((pIVar2 != (IUnknown *)0x0) && (UVar8 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2), (int)UVar8 < 0)
     ) {
    _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f08);
  }
  iVar6 = FUN_1400a1e90(param_1);
  if (iVar6 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_1e8;
    if (local_1e8 != (IUnknown *)0x0) {
      local_244 = 0;
      UVar8 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
      if ((int)UVar8 < 0) {
        _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_1e8;
      if (local_244 != 0) {
        if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar8 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
        if ((int)UVar8 < 0) {
          _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_1e8 != (IUnknown *)0x0) {
        (*local_1e8->lpVtbl->Release)(local_1e8);
        local_1e8 = (IUnknown *)0x0;
      }
    }
    local_180 = 0;
    local_178 = &DAT_140281f00;
    local_190 = &DAT_140281f00;
    local_188 = 0;
    local_198 = 0;
    Ordinal_9(local_1b0);
    Ordinal_9(local_1c8);
    if (local_1e0 != (longlong *)0x0) {
      (**(code **)(*local_1e0 + 0x10))();
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
    }
    if (local_238 != (longlong *)0x0) {
      (**(code **)(*local_238 + 0x10))();
    }
    return 0;
  }
  puVar9 = (undefined8 *)FUN_140001f20(*param_1,&local_158);
  FUN_140001710(&local_238,*puVar9,"dbo.up_read_pet_inventory");
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  local_1f0 = local_118;
  local_148 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_144 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_140 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_13c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_118,&local_148);
  plVar10 = operator_new(0x18);
  local_150 = (longlong *)0x0;
  local_168 = plVar10;
  if (plVar10 != (longlong *)0x0) {
    plVar10[1] = 0;
    *(undefined4 *)(plVar10 + 2) = 1;
    lVar11 = FUN_140201490("pet_id");
    *plVar10 = lVar11;
    local_150 = plVar10;
  }
  if (local_150 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_238,local_138,&local_150,0xca);
  local_1f0 = plVar10;
  if (local_238 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_238,&local_168);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar8 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar8 < 0) {
    _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_168 != (longlong *)0x0) {
    (**(code **)(*local_168 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  puVar9 = (undefined8 *)FUN_1400016d0(&local_238,&local_1f0);
  This = local_1e8;
  pIVar2 = (IUnknown *)*puVar9;
  if (local_1e8 != pIVar2) {
    local_1e8 = pIVar2;
    if (pIVar2 != (IUnknown *)0x0) {
      (*pIVar2->lpVtbl->AddRef)(pIVar2);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_1f0 != (longlong *)0x0) {
    (**(code **)(*local_1f0 + 0x10))();
  }
  pIVar2 = local_1e8;
  if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_23c = 0;
  UVar8 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
  if ((int)UVar8 < 0) {
    _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
  }
  if (local_23c != -1) {
    while( true ) {
      pIVar2 = local_1e8;
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_240 = 0;
      UVar8 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
      if ((int)UVar8 < 0) {
        _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_240 == -1) break;
      local_f8.Data1 = 0;
      local_f8.Data2 = 0;
      local_f8.Data3 = 0;
      local_f8.Data4[0] = '\0';
      local_f8.Data4[1] = '\0';
      local_f8.Data4[2] = '\0';
      local_f8.Data4[3] = '\0';
      local_f8.Data4[4] = '\0';
      local_f8.Data4[5] = '\0';
      local_f8.Data4[6] = '\0';
      local_f8.Data4[7] = '\0';
      local_e8 = 0;
      local_e0 = 0;
      local_de = 0;
      local_d6 = 0;
      local_d4 = 0;
      local_cc = 0;
      local_c4 = 0;
      local_bc = 0;
      local_b8 = 0;
      local_b6 = 0;
      local_ae = 0;
      local_a6 = 0;
      local_9e = 0;
      local_9b = 0;
      local_8b = 0;
      local_89 = 0;
      local_81 = 0;
      local_79 = 0;
      local_71 = 0;
      local_69 = 0;
      local_39 = 0;
      local_93 = 0;
      local_9c = local_240 == -1;
      memset(local_61,0,0x28);
      cVar5 = FUN_1400a1f60(&local_1e8,&local_f8,local_248);
      if (cVar5 == '\0') break;
      riid = (char *)&local_f8;
      ppvObject = (char *)0xc0;
      memcpy((void *)((longlong)(int)uVar12 + 0x130 + (longlong)param_1),riid,0xc0);
      local_244 = uVar12 + 0xc0;
      local_202 = (short)plVar13 + 1;
      plVar13 = (longlong *)(ulonglong)local_202;
      if (50000 < local_244) {
        uVar4 = local_220._2_6_;
        local_220 = CONCAT62(local_220._2_6_,(short)local_244);
        uVar3 = local_220;
        riid = (char *)(param_1 + 0x26);
        local_220._4_2_ = SUB62(uVar4,2);
        local_220._6_2_ = SUB62(uVar4,4);
        ((IID *)riid)->Data1 = (undefined4)local_220;
        ((IID *)riid)->Data2 = local_220._4_2_;
        ((IID *)riid)->Data3 = local_220._6_2_;
        param_1[0x27] = CONCAT26(uStack_212,CONCAT24(0xe9,uVar1));
        param_1[0x28] = CONCAT26(uStack_20a,uStack_210);
        param_1[0x29] = CONCAT26(local_202,uStack_208);
        iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar6 == 0) {
          ppvObject = "DB Result Queue push error";
          riid = "DBResultQueue_Error.Log";
          FUN_1400a0b40(param_1[0x23]);
        }
        local_244 = 0x20;
        local_202 = 0;
        plVar13 = (longlong *)0x0;
        local_220 = uVar3;
      }
      pIVar2 = local_1e8;
      uVar12 = local_244;
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar7 = (*local_1e8->lpVtbl[0xc].QueryInterface)(local_1e8,(IID *)riid,(void **)ppvObject);
      if (HVar7 < 0) {
        _com_issue_errorex(HVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_248[0] == '\0') {
      uStack_214 = 0x95;
      uVar14 = 0;
    }
  }
  local_220 = CONCAT62(local_220._2_6_,(short)uVar12);
  param_1[0x26] = local_220;
  param_1[0x27] = CONCAT26(uStack_212,CONCAT24(uStack_214,uVar1));
  param_1[0x28] = CONCAT26(uStack_20a,uStack_210);
  param_1[0x29] = CONCAT26(local_202,uStack_208);
  iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
  if (iVar6 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar2 = local_1e8;
  if (local_1e8 != (IUnknown *)0x0) {
    local_230 = 0;
    UVar8 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
    if ((int)UVar8 < 0) {
      _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
    }
    pIVar2 = local_1e8;
    if (local_230 != 0) {
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar8 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
      if ((int)UVar8 < 0) {
        _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
      local_1e8 = (IUnknown *)0x0;
    }
  }
  local_180 = 0;
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_198 = 0;
  Ordinal_9(local_1b0);
  Ordinal_9(local_1c8);
  if (local_1e0 != (longlong *)0x0) {
    (**(code **)(*local_1e0 + 0x10))();
  }
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  if (local_238 != (longlong *)0x0) {
    (**(code **)(*local_238 + 0x10))();
  }
  return uVar14;
}



undefined8 FUN_140095eb0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140095f46;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140095f46:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_item_move_pet_inventory_to_inventory");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("pet_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = local_58;
    local_88 = *(undefined4 *)(param_2 + 0x2e);
    uStack_84 = *(undefined4 *)(param_2 + 0x32);
    uStack_80 = *(undefined4 *)(param_2 + 0x36);
    uStack_7c = *(undefined4 *)(param_2 + 0x3a);
    uVar6 = FUN_140062280(local_58,&local_88);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      uVar1 = *(undefined4 *)(param_2 + 0x3e);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,uVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("page_index");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_68 = (longlong *)&local_88;
        uVar1 = *(undefined4 *)(param_2 + 0x42);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,uVar1);
        plVar9 = operator_new(0x18);
        local_98[0] = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("slot_index");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
        local_68 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400965e0(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_48;
  longlong local_40 [4];
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140096678;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140096678:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_delete_pet_inventory");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = &local_78;
  local_88 = *(undefined4 *)(param_2 + 0xe);
  uStack_84 = *(undefined4 *)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_78,&local_88);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("pet_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_98[0] = local_40;
  local_78._0_4_ = *(undefined4 *)(param_2 + 0x1e);
  local_78._4_4_ = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_78);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140096990(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140096a26;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140096a26:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_pet_item_update");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("pet_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_40;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_40,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    sVar1 = *(short *)(param_2 + 0x42);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,(int)sVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("page_index");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      sVar1 = *(short *)(param_2 + 0x44);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,(int)sVar1);
      plVar9 = operator_new(0x18);
      local_98[0] = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("slot_index");
        *plVar9 = lVar8;
        plVar10 = plVar9;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400a2c10(&local_res20,param_2 + 0x2e);
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140096fb0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong local_78;
  undefined1 local_70;
  longlong *local_60;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140097046;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140097046:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_pet_type");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = &local_78;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_58);
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("pet_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_60 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = &local_78;
  uVar1 = *(undefined1 *)(param_2 + 0x1e);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x11) {
    iVar4 = Ordinal_9(&local_78);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_78._0_2_ = 0x11;
  }
  local_70 = uVar1;
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("pet_type");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,&local_78);
    local_80 = plVar7;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar7 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar7 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_140097370(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  short local_a0 [4];
  undefined4 local_98;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_58;
  
  local_58 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14009740d;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14009740d:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_pet_stet");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)local_a0;
  local_78 = *(longlong **)(param_2 + 0xe);
  uStack_70 = *(undefined4 *)(param_2 + 0x16);
  uStack_6c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_a0,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("pet_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar6);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Vital");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_a0);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x22);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Intelligence");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x26);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Strength");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x2a);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Resilient");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x2e);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Eloquence");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x32);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Charm");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x36);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Temper");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x3a);
  Ordinal_8(local_a0);
  if (local_a0[0] != 4) {
    iVar4 = Ordinal_9(local_a0);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_a0[0] = 4;
  }
  local_98 = uVar1;
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("fHeight");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,4,1,4,local_a0);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_78 = (longlong *)local_a0;
    uVar1 = *(undefined4 *)(param_2 + 0x3e);
    Ordinal_8(local_a0);
    if (local_a0[0] != 4) {
      iVar4 = Ordinal_9(local_a0);
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar4);
      }
      local_a0[0] = 4;
    }
    local_98 = uVar1;
    plVar9 = operator_new(0x18);
    local_88 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("fWeight");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,4,1,4,local_a0);
    local_78 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140098080(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_c8 [2];
  undefined4 local_b8;
  undefined4 uStack_b4;
  undefined4 uStack_b0;
  undefined4 uStack_ac;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_70;
  longlong local_60 [6];
  
  local_70 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14009811d;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14009811d:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_pet_status");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_c8[0] = (longlong *)&local_b8;
  local_88 = *(longlong **)(param_2 + 0xe);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_b8,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("pet_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar6);
  local_98 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_60;
  local_b8 = *(undefined4 *)(param_2 + 0x1e);
  uStack_b4 = *(undefined4 *)(param_2 + 0x22);
  uStack_b0 = *(undefined4 *)(param_2 + 0x26);
  uStack_ac = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_60,&local_b8);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar6);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar1 = *(undefined4 *)(param_2 + 0x2e);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028b470);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar1 = *(undefined4 *)(param_2 + 0x32);
  Ordinal_8(&local_b8);
  FUN_140062080(&local_b8,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028b474);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,3,1,4,&local_b8);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar1 = *(undefined4 *)(param_2 + 0x36);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 4) {
    iVar4 = Ordinal_9(&local_b8);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_b8 = CONCAT22(local_b8._2_2_,4);
  }
  uStack_b0 = uVar1;
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("physical_attack");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar1 = *(undefined4 *)(param_2 + 0x3a);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 4) {
    iVar4 = Ordinal_9(&local_b8);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_b8 = CONCAT22(local_b8._2_2_,4);
  }
  uStack_b0 = uVar1;
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("physical_defence");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar1 = *(undefined4 *)(param_2 + 0x3e);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 4) {
    iVar4 = Ordinal_9(&local_b8);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_b8 = CONCAT22(local_b8._2_2_,4);
  }
  uStack_b0 = uVar1;
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("magical_attack");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar1 = *(undefined4 *)(param_2 + 0x42);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 4) {
    iVar4 = Ordinal_9(&local_b8);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_b8 = CONCAT22(local_b8._2_2_,4);
  }
  uStack_b0 = uVar1;
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("magical_defence");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8[0] != (longlong *)0x0) {
      (**(code **)(*local_c8[0] + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_88 = (longlong *)&local_b8;
    uVar1 = *(undefined4 *)(param_2 + 0x46);
    Ordinal_8(&local_b8);
    if ((short)local_b8 != 4) {
      iVar4 = Ordinal_9(&local_b8);
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar4);
      }
      local_b8 = CONCAT22(local_b8._2_2_,4);
    }
    uStack_b0 = uVar1;
    plVar9 = operator_new(0x18);
    local_90 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("loyalty");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,4,1,4,&local_b8);
    local_88 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_c8[0] != (longlong *)0x0) {
        (**(code **)(*local_c8[0] + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined4 FUN_140098cf0(short *param_1)

{
  int iVar1;
  undefined8 uVar2;
  short local_30 [4];
  undefined4 local_28;
  
  uVar2 = 0xfffffffffffffffe;
  if (*param_1 == 4) {
    local_28 = *(undefined4 *)(param_1 + 4);
  }
  else {
    Ordinal_8(local_30);
    if ((local_30 != param_1) || (local_30[0] != 4)) {
      iVar1 = Ordinal_12(local_30,param_1,0,4,uVar2);
      if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar1);
      }
    }
    Ordinal_9(local_30);
  }
  return local_28;
}



undefined8 FUN_140098d80(short *param_1)

{
  int iVar1;
  undefined8 uVar2;
  short local_30 [4];
  undefined8 local_28;
  
  uVar2 = 0xfffffffffffffffe;
  if (*param_1 == 5) {
    local_28 = *(undefined8 *)(param_1 + 4);
  }
  else {
    Ordinal_8(local_30);
    if ((local_30 != param_1) || (local_30[0] != 5)) {
      iVar1 = Ordinal_12(local_30,param_1,0,5,uVar2);
      if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar1);
      }
    }
    Ordinal_9(local_30);
  }
  return local_28;
}



void FUN_140098e10(int *param_1,int *param_2,longlong *param_3)

{
  int iVar1;
  undefined8 *puVar2;
  int local_48;
  undefined8 local_44;
  undefined1 local_38 [24];
  undefined1 local_20 [32];
  
  iVar1 = *param_2;
  if (iVar1 < 1) {
    return;
  }
  if (param_3[4] != 0) {
    for (puVar2 = *(undefined8 **)
                   (*param_3 + ((ulonglong)(longlong)*param_1 % (ulonglong)param_3[1]) * 8);
        puVar2 != (undefined8 *)0x0; puVar2 = (undefined8 *)*puVar2) {
      if (*param_1 == *(int *)(puVar2 + 1)) {
        if (puVar2 != (undefined8 *)0x0) {
          *(int *)(puVar2 + 2) = *(int *)(puVar2 + 2) + iVar1;
          *(int *)((longlong)puVar2 + 0xc) = *(int *)((longlong)puVar2 + 0xc) + 1;
          return;
        }
        break;
      }
    }
  }
  local_48 = *param_1;
  local_44 = CONCAT44(iVar1,1);
  if (param_3[4] != 0) {
    FUN_14009ed70(param_3,local_38,&local_48,&local_48);
    return;
  }
  FUN_14009ef00(param_3,local_20,&local_48);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140098ec0(undefined8 param_1,longlong param_2)

{
  undefined8 *puVar1;
  errno_t eVar2;
  undefined8 *puVar3;
  undefined1 auStack_1a8 [32];
  uint local_188;
  uint local_180;
  uint local_178;
  uint local_170;
  FILE *local_168;
  undefined8 *local_160;
  undefined8 *local_158;
  _SYSTEMTIME local_150;
  char local_138;
  undefined1 local_137 [271];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_1a8;
  local_138 = '\0';
  memset(local_137,0,0x103);
  local_168 = (FILE *)0x0;
  GetLocalTime(&local_150);
  local_170 = (uint)local_150.wHour;
  local_178 = (uint)local_150.wDay;
  local_180 = (uint)local_150.wMonth;
  local_188 = (uint)local_150.wYear;
  FUN_14009e980(&local_138,0x104,"LOG_%s_%04d-%02d-%02d_%02d.txt",param_1);
  eVar2 = fopen_s(&local_168,&local_138,"wt");
  if (eVar2 != 0) {
    return;
  }
  if (local_168 == (FILE *)0x0) {
    return;
  }
  if (*(longlong *)(param_2 + 0x20) == 0) {
    local_160 = (undefined8 *)0x0;
  }
  else {
    local_160 = *(undefined8 **)(param_2 + 0x30);
    if (local_160 != (undefined8 *)0x0) {
      local_158 = (undefined8 *)*local_160;
      puVar3 = local_160;
      puVar1 = local_158;
      goto joined_r0x000140098fb7;
    }
  }
  local_158 = (undefined8 *)0x0;
  puVar3 = local_160;
  puVar1 = local_158;
joined_r0x000140098fb7:
  while (puVar1 != (undefined8 *)0x0) {
    local_188 = *(uint *)((longlong)puVar1 + 0xc);
    fprintf(local_168,"%s\t%d\tCount\t%d\n");
    for (puVar1 = (undefined8 *)*puVar1; puVar1 == (undefined8 *)0x0; puVar1 = (undefined8 *)*puVar1
        ) {
      puVar1 = puVar3 + 1;
      puVar3 = puVar3 + 1;
    }
    if (puVar3 == puVar1) {
      puVar1 = (undefined8 *)0x0;
    }
  }
  fclose(local_168);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140099030(undefined8 param_1,longlong param_2)

{
  undefined8 *puVar1;
  errno_t eVar2;
  undefined8 *puVar3;
  undefined1 auStack_1a8 [32];
  uint local_188;
  uint local_180;
  uint local_178;
  uint local_170;
  FILE *local_168;
  undefined8 *local_160;
  undefined8 *local_158;
  _SYSTEMTIME local_150;
  char local_138;
  undefined1 local_137 [271];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_1a8;
  local_138 = '\0';
  memset(local_137,0,0x103);
  local_168 = (FILE *)0x0;
  GetLocalTime(&local_150);
  local_170 = (uint)local_150.wHour;
  local_178 = (uint)local_150.wDay;
  local_180 = (uint)local_150.wMonth;
  local_188 = (uint)local_150.wYear;
  FUN_14009e980(&local_138,0x104,"LOG_%s_%04d-%02d-%02d_%02d.txt",param_1);
  eVar2 = fopen_s(&local_168,&local_138,"wt");
  if (eVar2 != 0) {
    return;
  }
  if (local_168 == (FILE *)0x0) {
    return;
  }
  if (*(longlong *)(param_2 + 0x20) == 0) {
    local_160 = (undefined8 *)0x0;
  }
  else {
    local_160 = *(undefined8 **)(param_2 + 0x30);
    if (local_160 != (undefined8 *)0x0) {
      local_158 = (undefined8 *)*local_160;
      puVar3 = local_160;
      puVar1 = local_158;
      goto joined_r0x000140099127;
    }
  }
  local_158 = (undefined8 *)0x0;
  puVar3 = local_160;
  puVar1 = local_158;
joined_r0x000140099127:
  while (puVar1 != (undefined8 *)0x0) {
    local_180 = *(uint *)(puVar1 + 2);
    local_188 = *(uint *)((longlong)puVar1 + 0xc);
    local_178 = (int)local_180 / (int)local_188;
    fprintf(local_168,"%s\t%d\tCount\t%d\tTotal\t%d\tAVG\t%d\n");
    for (puVar1 = (undefined8 *)*puVar1; puVar1 == (undefined8 *)0x0; puVar1 = (undefined8 *)*puVar1
        ) {
      puVar1 = puVar3 + 1;
      puVar3 = puVar3 + 1;
    }
    if (puVar3 == puVar1) {
      puVar1 = (undefined8 *)0x0;
    }
  }
  fclose(local_168);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1400991c0(longlong param_1)

{
  undefined8 *puVar1;
  errno_t eVar2;
  undefined8 *puVar3;
  undefined1 auStack_218 [32];
  undefined8 local_1f8;
  uint local_1f0;
  uint local_1e8;
  undefined4 local_1e0;
  undefined4 local_1d8;
  undefined4 local_1d0;
  undefined4 local_1c8;
  undefined4 local_1c0;
  undefined4 local_1b8;
  undefined4 local_1b0;
  undefined4 local_1a8;
  undefined4 local_1a0;
  undefined4 local_198;
  undefined4 local_190;
  undefined4 local_188;
  undefined4 local_180;
  undefined4 local_178;
  undefined4 local_170;
  undefined4 local_168;
  FILE *local_158;
  undefined8 *local_150;
  undefined8 *local_148;
  _SYSTEMTIME local_140;
  char local_128;
  undefined1 local_127 [271];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_218;
  local_128 = '\0';
  memset(local_127,0,0x103);
  local_158 = (FILE *)0x0;
  GetLocalTime(&local_140);
  local_1e8 = (uint)local_140.wHour;
  local_1f0 = (uint)local_140.wDay;
  local_1f8 = CONCAT44(local_1f8._4_4_,(uint)local_140.wMonth);
  FUN_14009e980(&local_128,0x104,"LOG_PVP_%04d-%02d-%02d_%02d.txt",local_140.wYear);
  eVar2 = fopen_s(&local_158,&local_128,"wt");
  if (eVar2 != 0) {
    return;
  }
  if (local_158 == (FILE *)0x0) goto LAB_1400993e3;
  if (*(longlong *)(param_1 + 0x20) == 0) {
    local_150 = (undefined8 *)0x0;
LAB_1400992c9:
    local_148 = (undefined8 *)0x0;
    puVar3 = local_150;
    puVar1 = local_148;
  }
  else {
    local_150 = *(undefined8 **)(param_1 + 0x30);
    if (local_150 == (undefined8 *)0x0) goto LAB_1400992c9;
    local_148 = (undefined8 *)*local_150;
    puVar3 = local_150;
    puVar1 = local_148;
  }
  while (puVar1 != (undefined8 *)0x0) {
    local_168 = *(undefined4 *)((longlong)puVar1 + 100);
    local_170 = *(undefined4 *)(puVar1 + 0xc);
    local_178 = *(undefined4 *)((longlong)puVar1 + 0x5c);
    local_180 = *(undefined4 *)(puVar1 + 0xb);
    local_188 = *(undefined4 *)((longlong)puVar1 + 0x54);
    local_190 = *(undefined4 *)(puVar1 + 10);
    local_198 = *(undefined4 *)((longlong)puVar1 + 0x4c);
    local_1a0 = *(undefined4 *)(puVar1 + 9);
    local_1a8 = *(undefined4 *)((longlong)puVar1 + 0x44);
    local_1b0 = *(undefined4 *)(puVar1 + 8);
    local_1b8 = *(undefined4 *)((longlong)puVar1 + 0x3c);
    local_1c0 = *(undefined4 *)(puVar1 + 7);
    local_1c8 = *(undefined4 *)((longlong)puVar1 + 0x34);
    local_1d0 = *(undefined4 *)(puVar1 + 6);
    local_1d8 = *(undefined4 *)((longlong)puVar1 + 0x2c);
    local_1e0 = *(undefined4 *)(puVar1 + 5);
    local_1e8 = *(uint *)((longlong)puVar1 + 0x24);
    local_1f0 = *(uint *)(puVar1 + 4);
    local_1f8 = puVar1[3];
    fprintf(local_158,
            "CLASS\t%d\tCOUNT\t%d\tEXP\t%I64d\tPoint\t%d\tDisconnect\t%d\tTotalWin\t%d\tTotalLose\t%d\tPvpWin\t%d\tPvpLose\t%d\tTeamWin\t%d\tTeamLose\t%d\tLeaderWin\t%d\tLeaderLose\t%d\tTagWin\t%d\tTagLose\t%d\tDeathWin\t%d\tDeathLose\t%d\tLadderWin\t%d\tLadderLose\t%d\tDuel_ladder_point\t%d\tDuel_ladder_exp\t%d\n"
           );
    for (puVar1 = (undefined8 *)*puVar1; puVar1 == (undefined8 *)0x0; puVar1 = (undefined8 *)*puVar1
        ) {
      puVar1 = puVar3 + 1;
      puVar3 = puVar3 + 1;
    }
    if (puVar3 == puVar1) {
      puVar1 = (undefined8 *)0x0;
    }
  }
  fclose(local_158);
LAB_1400993e3:
  printf("Completed Report_PVP\n");
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

bool FUN_140099420(undefined8 *param_1,undefined8 param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  int iVar2;
  HRESULT HVar3;
  ULONG UVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  int iVar8;
  int iVar9;
  int iVar10;
  longlong lVar11;
  undefined8 *puVar12;
  undefined8 uVar13;
  IID *riid;
  longlong lVar14;
  void **ppvObject;
  ulonglong *puVar15;
  ulonglong *puVar16;
  ulonglong uVar17;
  bool bVar18;
  undefined1 auStackY_478 [32];
  char local_448 [4];
  uint local_444;
  undefined4 local_440;
  undefined8 local_438;
  longlong *local_430;
  int local_428 [3];
  undefined4 local_41c;
  int local_418 [3];
  undefined4 local_40c;
  int local_408 [3];
  undefined4 local_3fc;
  undefined8 local_3f8;
  int local_3f0 [3];
  undefined4 local_3e4;
  int local_3e0 [3];
  int local_3d4;
  int local_3d0;
  IID local_3c8 [2];
  IUnknown *local_3a8;
  longlong *local_3a0;
  undefined4 local_398;
  undefined1 local_388 [24];
  undefined1 local_370 [24];
  undefined4 local_358;
  undefined1 *local_350;
  undefined4 local_348;
  undefined8 local_340;
  undefined1 *local_338;
  undefined8 *local_328;
  IID local_320 [2];
  IID local_300;
  IID local_2e8 [2];
  IID local_2c8;
  IID local_2b0;
  undefined8 local_298;
  IID local_290;
  IID local_278;
  IID local_260;
  undefined1 local_248 [24];
  undefined1 local_230 [24];
  undefined1 local_218 [32];
  longlong local_1f8;
  ulonglong local_1f0;
  undefined1 local_1e0;
  longlong local_1d8;
  undefined4 local_1d0;
  undefined8 local_1c8;
  undefined8 local_1c0;
  longlong local_1b8;
  ulonglong local_1b0;
  undefined1 local_1a0;
  longlong local_198;
  undefined4 local_190;
  undefined8 local_188;
  undefined8 local_180;
  longlong local_178;
  ulonglong local_170;
  undefined1 local_160;
  longlong local_158;
  undefined4 local_150;
  undefined8 local_148;
  undefined8 local_140;
  longlong local_138;
  ulonglong local_130;
  undefined1 local_120;
  longlong local_118;
  undefined4 local_110;
  undefined8 local_108;
  undefined8 local_100;
  longlong local_f8;
  ulonglong local_f0;
  undefined1 local_e0;
  longlong local_d8;
  undefined4 local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  longlong local_b8;
  ulonglong local_b0;
  undefined1 local_a0;
  longlong local_98;
  undefined4 local_90;
  undefined8 local_88;
  undefined8 local_80;
  longlong local_78;
  ulonglong local_70;
  undefined1 local_60;
  longlong local_58;
  undefined4 local_50;
  undefined8 local_48;
  undefined8 local_40;
  ulonglong local_38;
  
  local_298 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_478;
  uVar17 = 0;
  local_430 = (longlong *)0x0;
  local_328 = param_1;
  iVar2 = FUN_140001970(&local_430);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_3a8 = (IUnknown *)0x0;
  local_3a0 = (longlong *)0x0;
  Ordinal_8(local_388);
  Ordinal_8(local_370);
  pIVar1 = local_3a8;
  if ((local_3a8 != (IUnknown *)0x0) && (local_3a8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_338 = &DAT_140281f00;
  local_350 = &DAT_140281f00;
  local_348 = 0;
  local_340 = 0;
  if (local_3a8 != (IUnknown *)0x0) {
    (*local_3a8->lpVtbl->Release)(local_3a8);
  }
  HVar3 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           (LPVOID *)&local_438);
  if (HVar3 < 0) {
LAB_140099580:
    local_3a8 = (IUnknown *)0x0;
  }
  else {
    HVar3 = OleRun((LPUNKNOWN)CONCAT44(local_438._4_4_,(int)local_438));
    if (-1 < HVar3) {
      HVar3 = (*(code *)**(undefined8 **)CONCAT44(local_438._4_4_,(int)local_438))
                        ((undefined8 *)CONCAT44(local_438._4_4_,(int)local_438),&DAT_140281f68,
                         &local_3a8);
    }
    (**(code **)(*(longlong *)CONCAT44(local_438._4_4_,(int)local_438) + 0x10))();
    if (HVar3 < 0) goto LAB_140099580;
  }
  local_358 = 2;
  bVar18 = true;
  local_398 = 1;
  local_448[0] = '\x01';
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_444 = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_444 != 0) goto LAB_14009972c;
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_3a8;
    if (local_3a8 != (IUnknown *)0x0) {
      local_444 = 0;
      UVar4 = (*local_3a8->lpVtbl[0x12].AddRef)(local_3a8);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_3a8;
      if (local_444 != 0) {
        if (local_3a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*local_3a8->lpVtbl[10].Release)(local_3a8);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_3a8 != (IUnknown *)0x0) {
        (*local_3a8->lpVtbl->Release)(local_3a8);
        local_3a8 = (IUnknown *)0x0;
      }
    }
    local_340 = 0;
    local_338 = &DAT_140281f00;
    local_350 = &DAT_140281f00;
    local_348 = 0;
    local_358 = 0;
    Ordinal_9(local_370);
    Ordinal_9(local_388);
    if (local_3a0 != (longlong *)0x0) {
      (**(code **)(*local_3a0 + 0x10))();
    }
    if (local_3a8 != (IUnknown *)0x0) {
      (*local_3a8->lpVtbl->Release)(local_3a8);
    }
    if (local_430 != (longlong *)0x0) {
      (**(code **)(*local_430 + 0x10))();
    }
    return false;
  }
LAB_14009972c:
  puVar16 = &DAT_14028c250;
  puVar15 = &DAT_14028c250;
  lVar14 = 0x28;
  do {
    lVar11 = lVar14 / 2;
    if (puVar15[lVar11] < 0xb) {
      puVar15 = puVar15 + lVar11 + 1;
      lVar11 = lVar14 + (-1 - lVar11);
    }
    lVar14 = lVar11;
  } while (0 < lVar11);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_f0 = *puVar15;
  local_f8 = 0;
  local_e0 = 0;
  local_d8 = 0;
  local_d0 = 0x3f800000;
  local_c8 = 0;
  local_c0 = 0;
  puVar15 = &DAT_14028c250;
  lVar14 = 0x28;
  do {
    lVar11 = lVar14 / 2;
    if (puVar15[lVar11] < 0xb) {
      puVar15 = puVar15 + lVar11 + 1;
      lVar11 = lVar14 + (-1 - lVar11);
    }
    lVar14 = lVar11;
  } while (0 < lVar11);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_130 = *puVar15;
  local_138 = 0;
  local_120 = 0;
  local_118 = 0;
  local_110 = 0x3f800000;
  local_108 = 0;
  local_100 = 0;
  puVar15 = &DAT_14028c250;
  lVar14 = 0x28;
  do {
    lVar11 = lVar14 / 2;
    if (puVar15[lVar11] < 0xb) {
      puVar15 = puVar15 + lVar11 + 1;
      lVar11 = lVar14 + (-1 - lVar11);
    }
    lVar14 = lVar11;
  } while (0 < lVar11);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_b0 = *puVar15;
  local_b8 = 0;
  local_a0 = 0;
  local_98 = 0;
  local_90 = 0x3f800000;
  local_88 = 0;
  local_80 = 0;
  puVar15 = &DAT_14028c250;
  lVar14 = 0x28;
  do {
    lVar11 = lVar14 / 2;
    if (puVar15[lVar11] < 0xb) {
      puVar15 = puVar15 + lVar11 + 1;
      lVar11 = lVar14 + (-1 - lVar11);
    }
    lVar14 = lVar11;
  } while (0 < lVar11);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_170 = *puVar15;
  local_178 = 0;
  local_160 = 0;
  local_158 = 0;
  local_150 = 0x3f800000;
  local_148 = 0;
  local_140 = 0;
  puVar15 = &DAT_14028c250;
  lVar14 = 0x28;
  do {
    lVar11 = lVar14 / 2;
    if (puVar15[lVar11] < 0xb) {
      puVar15 = puVar15 + lVar11 + 1;
      lVar11 = lVar14 + (-1 - lVar11);
    }
    lVar14 = lVar11;
  } while (0 < lVar11);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_1b0 = *puVar15;
  local_1b8 = 0;
  local_1a0 = 0;
  local_198 = 0;
  local_190 = 0x3f800000;
  local_188 = 0;
  local_180 = 0;
  puVar15 = &DAT_14028c250;
  lVar14 = 0x28;
  do {
    lVar11 = lVar14 / 2;
    if (puVar15[lVar11] < 0xb) {
      puVar15 = puVar15 + lVar11 + 1;
      lVar11 = lVar14 + (-1 - lVar11);
    }
    lVar14 = lVar11;
  } while (0 < lVar11);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_1f0 = *puVar15;
  local_1f8 = 0;
  local_1e0 = 0;
  local_1d8 = 0;
  local_1d0 = 0x3f800000;
  local_1c8 = 0;
  local_1c0 = 0;
  lVar14 = 0x28;
  do {
    lVar11 = lVar14 / 2;
    if (puVar16[lVar11] < 0xb) {
      puVar16 = puVar16 + lVar11 + 1;
      lVar11 = lVar14 + (-1 - lVar11);
    }
    lVar14 = lVar11;
  } while (0 < lVar11);
  if (puVar16 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar16 = (ulonglong *)&UNK_14028c388;
  }
  local_70 = *puVar16;
  local_78 = 0;
  local_60 = 0;
  local_58 = 0;
  local_50 = 0x3f800000;
  local_48 = 0;
  local_40 = 0;
  local_444 = 0;
  puVar12 = (undefined8 *)FUN_140001f20(*param_1,&local_438);
  FUN_140001710(&local_430,*puVar12,"dbo.up_read_item_inventory_statistics");
  if ((longlong *)CONCAT44(local_438._4_4_,(int)local_438) != (longlong *)0x0) {
    (**(code **)(*(longlong *)CONCAT44(local_438._4_4_,(int)local_438) + 0x10))();
  }
  puVar12 = (undefined8 *)FUN_1400016d0(&local_430,&local_438);
  This = local_3a8;
  pIVar1 = (IUnknown *)*puVar12;
  if (local_3a8 != pIVar1) {
    local_3a8 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if ((longlong *)CONCAT44(local_438._4_4_,(int)local_438) != (longlong *)0x0) {
    (**(code **)(*(longlong *)CONCAT44(local_438._4_4_,(int)local_438) + 0x10))();
  }
  pIVar1 = local_3a8;
  if (local_3a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_440 = (uint)local_440._2_2_ << 0x10;
  UVar4 = (*local_3a8->lpVtbl[6].Release)(local_3a8);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
  }
  if ((short)local_440 != -1) {
    while( true ) {
      pIVar1 = local_3a8;
      if (local_3a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_440 = local_440 & 0xffff0000;
      UVar4 = (*local_3a8->lpVtbl[6].Release)(local_3a8);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_440 == -1) break;
      uVar13 = FUN_140002290(&local_3a8,&local_278,&DAT_14028931c,local_448);
      FUN_140182560(uVar13);
      iVar2 = FUN_140062550(uVar13);
      Ordinal_9(&local_278);
      uVar13 = FUN_140002290(&local_3a8,local_2e8,"enhance_level",local_448);
      FUN_140182560(uVar13);
      iVar5 = FUN_140062550(uVar13);
      Ordinal_9(local_2e8);
      uVar13 = FUN_140002290(&local_3a8,&local_260,"gcode",local_448);
      FUN_140182560(uVar13);
      iVar6 = FUN_140062550(uVar13);
      Ordinal_9(&local_260);
      uVar13 = FUN_140002290(&local_3a8,local_248,"option_1_code",local_448);
      FUN_140182560(uVar13);
      iVar7 = FUN_140062550(uVar13);
      Ordinal_9(local_248);
      uVar13 = FUN_140002290(&local_3a8,local_230,"option_2_code",local_448);
      FUN_140182560(uVar13);
      iVar8 = FUN_140062550(uVar13);
      Ordinal_9(local_230);
      uVar13 = FUN_140002290(&local_3a8,local_218,"option_3_code",local_448);
      FUN_140182560(uVar13);
      local_440 = FUN_140062550(uVar13);
      Ordinal_9(local_218);
      uVar13 = FUN_140002290(&local_3a8,local_320,"option_group",local_448);
      FUN_140182560(uVar13);
      iVar9 = FUN_140062550(uVar13);
      Ordinal_9(local_320);
      uVar13 = FUN_140002290(&local_3a8,&local_2c8,"socket_1_code",local_448);
      FUN_140182560(uVar13);
      local_3d4 = FUN_140062550(uVar13);
      Ordinal_9(&local_2c8);
      uVar13 = FUN_140002290(&local_3a8,&local_2b0,"socket_2_code",local_448);
      FUN_140182560(uVar13);
      local_3e0[2] = FUN_140062550(uVar13);
      Ordinal_9(&local_2b0);
      uVar13 = FUN_140002290(&local_3a8,&local_290,"socket_3_code",local_448);
      FUN_140182560(uVar13);
      local_3d0 = FUN_140062550(uVar13);
      Ordinal_9(&local_290);
      riid = &local_300;
      uVar13 = FUN_140002290(&local_3a8,riid,"activity_value",local_448);
      FUN_140182560(uVar13);
      iVar10 = FUN_140062550(uVar13);
      Ordinal_9(&local_300);
      if (0 < iVar2) {
        if (local_d8 != 0) {
          riid = (IID *)((ulonglong)(longlong)iVar2 % local_f0);
          for (puVar12 = *(undefined8 **)(local_f8 + (longlong)riid * 8);
              puVar12 != (undefined8 *)0x0; puVar12 = (undefined8 *)*puVar12) {
            if (iVar2 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_140099fa5;
              }
              break;
            }
          }
        }
        local_40c = 1;
        local_418[2] = iVar2;
        if (local_d8 == 0) {
          riid = local_3c8;
          FUN_14009ebc0(&local_f8,riid,local_418 + 2);
        }
        else {
          riid = &local_278;
          FUN_14009ea40(&local_f8,riid,local_418 + 2,local_418 + 2);
        }
      }
LAB_140099fa5:
      if (0 < iVar5) {
        if (local_118 != 0) {
          riid = (IID *)((ulonglong)(longlong)iVar5 % local_130);
          for (puVar12 = *(undefined8 **)(local_138 + (longlong)riid * 8);
              puVar12 != (undefined8 *)0x0; puVar12 = (undefined8 *)*puVar12) {
            if (iVar5 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009a03e;
              }
              break;
            }
          }
        }
        local_3e0[1] = 1;
        local_3e0[0] = iVar5;
        if (local_118 == 0) {
          riid = local_2e8;
          FUN_14009ebc0(&local_138,riid,local_3e0);
        }
        else {
          riid = local_3c8;
          FUN_14009ea40(&local_138,riid,local_3e0,local_3e0);
        }
      }
LAB_14009a03e:
      if (0 < iVar6) {
        if (local_98 != 0) {
          riid = (IID *)((ulonglong)(longlong)iVar6 % local_b0);
          for (puVar12 = *(undefined8 **)(local_b8 + (longlong)riid * 8);
              puVar12 != (undefined8 *)0x0; puVar12 = (undefined8 *)*puVar12) {
            if (iVar6 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009a0da;
              }
              break;
            }
          }
        }
        local_3fc = 1;
        local_408[2] = iVar6;
        if (local_98 == 0) {
          riid = &local_260;
          FUN_14009ebc0(&local_b8,riid,local_408 + 2);
        }
        else {
          riid = local_3c8;
          FUN_14009ea40(&local_b8,riid,local_408 + 2,local_408 + 2);
        }
      }
LAB_14009a0da:
      if (0 < iVar9) {
        if (local_158 != 0) {
          riid = (IID *)((ulonglong)(longlong)iVar9 % local_170);
          for (puVar12 = *(undefined8 **)(local_178 + (longlong)riid * 8);
              puVar12 != (undefined8 *)0x0; puVar12 = (undefined8 *)*puVar12) {
            if (iVar9 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009a16e;
              }
              break;
            }
          }
        }
        local_428[1] = 1;
        local_428[0] = iVar9;
        if (local_158 == 0) {
          riid = local_320;
          FUN_14009ebc0(&local_178,riid,local_428);
        }
        else {
          riid = local_3c8;
          FUN_14009ea40(&local_178,riid,local_428,local_428);
        }
      }
LAB_14009a16e:
      if (0 < iVar7) {
        if (local_198 != 0) {
          riid = (IID *)((ulonglong)(longlong)iVar7 % local_1b0);
          for (puVar12 = *(undefined8 **)(local_1b8 + (longlong)riid * 8);
              puVar12 != (undefined8 *)0x0; puVar12 = (undefined8 *)*puVar12) {
            if (iVar7 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009a20a;
              }
              break;
            }
          }
        }
        local_3f0[1] = 1;
        local_3f0[0] = iVar7;
        if (local_198 == 0) {
          riid = local_320;
          FUN_14009ebc0(&local_1b8,riid,local_3f0);
        }
        else {
          riid = local_3c8;
          FUN_14009ea40(&local_1b8,riid,local_3f0,local_3f0);
        }
      }
LAB_14009a20a:
      if (0 < iVar8) {
        if (local_198 != 0) {
          riid = (IID *)((ulonglong)(longlong)iVar8 % local_1b0);
          for (puVar12 = *(undefined8 **)(local_1b8 + (longlong)riid * 8);
              puVar12 != (undefined8 *)0x0; puVar12 = (undefined8 *)*puVar12) {
            if (iVar8 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009a2aa;
              }
              break;
            }
          }
        }
        local_3e4 = 1;
        local_3f0[2] = iVar8;
        if (local_198 == 0) {
          riid = local_320;
          FUN_14009ebc0(&local_1b8,riid,local_3f0 + 2);
        }
        else {
          riid = local_3c8;
          FUN_14009ea40(&local_1b8,riid,local_3f0 + 2,local_3f0 + 2);
        }
      }
LAB_14009a2aa:
      if (0 < (int)local_440) {
        if (local_198 != 0) {
          riid = (IID *)((ulonglong)(longlong)(int)local_440 % local_1b0);
          for (puVar12 = *(undefined8 **)(local_1b8 + (longlong)riid * 8);
              puVar12 != (undefined8 *)0x0; puVar12 = (undefined8 *)*puVar12) {
            if (local_440 == *(uint *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009a33e;
              }
              break;
            }
          }
        }
        local_428[2] = local_440;
        local_41c = 1;
        if (local_198 == 0) {
          riid = local_320;
          FUN_14009ebc0(&local_1b8,riid,local_428 + 2);
        }
        else {
          riid = local_3c8;
          FUN_14009ea40(&local_1b8,riid,local_428 + 2,local_428 + 2);
        }
      }
LAB_14009a33e:
      if (0 < local_3d4) {
        if (local_1d8 != 0) {
          riid = (IID *)((ulonglong)(longlong)local_3d4 % local_1f0);
          for (puVar12 = *(undefined8 **)(local_1f8 + (longlong)riid * 8);
              puVar12 != (undefined8 *)0x0; puVar12 = (undefined8 *)*puVar12) {
            if (local_3d4 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009a3d3;
              }
              break;
            }
          }
        }
        local_418[0] = local_3d4;
        local_418[1] = 1;
        if (local_1d8 == 0) {
          riid = &local_2c8;
          FUN_14009ebc0(&local_1f8,riid,local_418);
        }
        else {
          riid = local_3c8;
          FUN_14009ea40(&local_1f8,riid,local_418,local_418);
        }
      }
LAB_14009a3d3:
      if (0 < local_3e0[2]) {
        if (local_1d8 != 0) {
          riid = (IID *)((ulonglong)(longlong)local_3e0[2] % local_1f0);
          for (puVar12 = *(undefined8 **)(local_1f8 + (longlong)riid * 8);
              puVar12 != (undefined8 *)0x0; puVar12 = (undefined8 *)*puVar12) {
            if (local_3e0[2] == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009a46e;
              }
              break;
            }
          }
        }
        local_408[0] = local_3e0[2];
        local_408[1] = 1;
        if (local_1d8 == 0) {
          riid = &local_2b0;
          FUN_14009ebc0(&local_1f8,riid,local_408);
        }
        else {
          riid = local_3c8;
          FUN_14009ea40(&local_1f8,riid,local_408,local_408);
        }
      }
LAB_14009a46e:
      ppvObject = (void **)(longlong)local_3d0;
      if (0 < local_3d0) {
        if (local_1d8 != 0) {
          riid = (IID *)((ulonglong)ppvObject % local_1f0);
          for (puVar12 = *(undefined8 **)(local_1f8 + (longlong)riid * 8);
              puVar12 != (undefined8 *)0x0; puVar12 = (undefined8 *)*puVar12) {
            if (local_3d0 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009a50f;
              }
              break;
            }
          }
        }
        local_3f8._0_4_ = local_3d0;
        local_3f8._4_4_ = 1;
        ppvObject = (void **)&local_3f8;
        if (local_1d8 == 0) {
          riid = &local_290;
          FUN_14009ebc0(&local_1f8);
        }
        else {
          riid = local_3c8;
          FUN_14009ea40(&local_1f8,riid,ppvObject,&local_3f8);
        }
      }
LAB_14009a50f:
      if (0 < iVar10) {
        if (local_58 != 0) {
          riid = (IID *)((ulonglong)(longlong)iVar10 % local_70);
          for (puVar12 = *(undefined8 **)(local_78 + (longlong)riid * 8);
              puVar12 != (undefined8 *)0x0; puVar12 = (undefined8 *)*puVar12) {
            if (iVar10 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009a59c;
              }
              break;
            }
          }
        }
        local_438._4_4_ = 1;
        ppvObject = (void **)&local_438;
        local_438._0_4_ = iVar10;
        if (local_58 == 0) {
          riid = &local_300;
          FUN_14009ebc0(&local_78);
        }
        else {
          riid = local_3c8;
          FUN_14009ea40(&local_78,riid,ppvObject,&local_438);
        }
      }
LAB_14009a59c:
      pIVar1 = local_3a8;
      if (local_3a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar3 = (*local_3a8->lpVtbl[0xc].QueryInterface)(local_3a8,riid,ppvObject);
      if (HVar3 < 0) {
        _com_issue_errorex(HVar3,pIVar1,(_GUID *)&DAT_140281f28);
      }
      local_444 = local_444 + 1;
    }
    bVar18 = local_448[0] != '\0';
    uVar17 = (ulonglong)local_444;
  }
  FUN_140098ec0("Inven_ItemCode",&local_f8);
  printf("Completed %s Report_ItemCode\n","Inven_ItemCode");
  FUN_140098ec0("Inven_EnhanceLevel",&local_138);
  printf("Completed %s Report_EnhanceLevel\n","Inven_EnhanceLevel");
  FUN_140098ec0("Inven_ItemGCode",&local_b8);
  printf("Completed %s Report_ItemGCode\n","Inven_ItemGCode");
  FUN_140098ec0("Inven_OptionGroup",&local_178);
  printf("Completed %s Report_OptionGroup\n","Inven_OptionGroup");
  FUN_140098ec0("Inven_OptionCode",&local_1b8);
  printf("Completed %s Report_OptionCode\n","Inven_OptionCode");
  FUN_140098ec0("Inven_SocketCode",&local_1f8);
  printf("Completed %s Report_SocketCode\n","Inven_SocketCode");
  FUN_140098ec0("Inven_Activity",&local_78);
  printf("Completed %s Report_Activity\n","Inven_Activity");
  printf("Total Item Count : %d\n",uVar17);
  if (local_78 != 0) {
    FUN_14009e9b0(&local_78);
  }
  if (local_1f8 != 0) {
    FUN_14009e9b0(&local_1f8);
  }
  if (local_1b8 != 0) {
    FUN_14009e9b0(&local_1b8);
  }
  if (local_178 != 0) {
    FUN_14009e9b0(&local_178);
  }
  if (local_b8 != 0) {
    FUN_14009e9b0(&local_b8);
  }
  if (local_138 != 0) {
    FUN_14009e9b0(&local_138);
  }
  if (local_f8 != 0) {
    FUN_14009e9b0(&local_f8);
  }
  FUN_140002200(&local_3a8);
  if (local_430 != (longlong *)0x0) {
    (**(code **)(*local_430 + 0x10))();
  }
  return bVar18;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

bool FUN_14009a820(undefined8 *param_1,undefined8 param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  int iVar2;
  HRESULT HVar3;
  ULONG UVar4;
  uint uVar5;
  int iVar6;
  int iVar7;
  int iVar8;
  int iVar9;
  longlong lVar10;
  undefined8 *puVar11;
  undefined8 uVar12;
  IID *riid;
  longlong lVar13;
  void **ppvObject;
  ulonglong *puVar14;
  ulonglong *puVar15;
  ulonglong uVar16;
  bool bVar17;
  undefined1 auStackY_538 [32];
  char local_508 [4];
  undefined4 local_504;
  uint local_500;
  undefined8 local_4f8;
  longlong *local_4f0;
  undefined1 local_4e8 [24];
  int local_4d0 [3];
  undefined4 local_4c4;
  int local_4c0 [3];
  undefined4 local_4b4;
  uint local_4b0 [3];
  undefined4 local_4a4;
  int local_4a0 [3];
  undefined4 local_494;
  int local_490 [3];
  undefined4 local_484;
  int local_480;
  int local_47c;
  undefined4 local_478;
  undefined4 local_474;
  int local_470;
  int local_46c;
  int local_468;
  IID local_464;
  IUnknown *local_448;
  longlong *local_440;
  undefined4 local_438;
  undefined1 local_428 [24];
  undefined1 local_410 [24];
  undefined4 local_3f8;
  undefined1 *local_3f0;
  undefined4 local_3e8;
  undefined8 local_3e0;
  undefined1 *local_3d8;
  undefined8 *local_3c8;
  undefined1 local_3c0 [24];
  undefined8 local_3a8;
  undefined1 local_390 [24];
  undefined1 local_378 [24];
  undefined1 local_360 [24];
  undefined1 local_348 [24];
  undefined1 local_330 [24];
  undefined1 local_318 [24];
  undefined1 local_300 [24];
  undefined1 local_2e8 [24];
  undefined1 local_2d0 [24];
  longlong local_2b8;
  ulonglong local_2b0;
  undefined1 local_2a0;
  longlong local_298;
  undefined4 local_290;
  undefined8 local_288;
  undefined8 local_280;
  longlong local_278;
  ulonglong local_270;
  undefined1 local_260;
  longlong local_258;
  undefined4 local_250;
  undefined8 local_248;
  undefined8 local_240;
  longlong local_238;
  ulonglong local_230;
  undefined1 local_220;
  longlong local_218;
  undefined4 local_210;
  undefined8 local_208;
  undefined8 local_200;
  longlong local_1f8;
  ulonglong local_1f0;
  undefined1 local_1e0;
  longlong local_1d8;
  undefined4 local_1d0;
  undefined8 local_1c8;
  undefined8 local_1c0;
  longlong local_1b8;
  ulonglong local_1b0;
  undefined1 local_1a0;
  longlong local_198;
  undefined4 local_190;
  undefined8 local_188;
  undefined8 local_180;
  longlong local_178;
  ulonglong local_170;
  undefined1 local_160;
  longlong local_158;
  undefined4 local_150;
  undefined8 local_148;
  undefined8 local_140;
  longlong local_138;
  ulonglong local_130;
  undefined1 local_120;
  longlong local_118;
  undefined4 local_110;
  undefined8 local_108;
  undefined8 local_100;
  void *local_f8;
  ulonglong local_f0;
  undefined1 local_e0;
  undefined8 local_d8;
  undefined4 local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  longlong local_b8;
  ulonglong local_b0;
  undefined1 local_a0;
  undefined8 local_98;
  undefined4 local_90;
  undefined8 local_88;
  undefined8 local_80;
  longlong local_78;
  ulonglong local_70;
  undefined1 local_60;
  undefined8 local_58;
  undefined4 local_50;
  undefined8 local_48;
  undefined8 local_40;
  ulonglong local_38;
  
  local_3a8 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_538;
  uVar16 = 0;
  local_4f0 = (longlong *)0x0;
  local_3c8 = param_1;
  iVar2 = FUN_140001970(&local_4f0);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_448 = (IUnknown *)0x0;
  local_440 = (longlong *)0x0;
  Ordinal_8(local_428);
  Ordinal_8(local_410);
  pIVar1 = local_448;
  if ((local_448 != (IUnknown *)0x0) && (local_448 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_3d8 = &DAT_140281f00;
  local_3f0 = &DAT_140281f00;
  local_3e8 = 0;
  local_3e0 = 0;
  if (local_448 != (IUnknown *)0x0) {
    (*local_448->lpVtbl->Release)(local_448);
  }
  HVar3 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           (LPVOID *)&local_4f8);
  if (HVar3 < 0) {
LAB_14009a980:
    local_448 = (IUnknown *)0x0;
  }
  else {
    HVar3 = OleRun((LPUNKNOWN)CONCAT44(local_4f8._4_4_,(int)local_4f8));
    if (-1 < HVar3) {
      HVar3 = (*(code *)**(undefined8 **)CONCAT44(local_4f8._4_4_,(int)local_4f8))
                        ((undefined8 *)CONCAT44(local_4f8._4_4_,(int)local_4f8),&DAT_140281f68,
                         &local_448);
    }
    (**(code **)(*(longlong *)CONCAT44(local_4f8._4_4_,(int)local_4f8) + 0x10))();
    if (HVar3 < 0) goto LAB_14009a980;
  }
  local_3f8 = 2;
  bVar17 = true;
  local_438 = 1;
  local_508[0] = '\x01';
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_500 = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_500 != 0) goto LAB_14009ab2c;
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_448;
    if (local_448 != (IUnknown *)0x0) {
      local_500 = 0;
      UVar4 = (*local_448->lpVtbl[0x12].AddRef)(local_448);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_448;
      if (local_500 != 0) {
        if (local_448 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*local_448->lpVtbl[10].Release)(local_448);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_448 != (IUnknown *)0x0) {
        (*local_448->lpVtbl->Release)(local_448);
        local_448 = (IUnknown *)0x0;
      }
    }
    local_3e0 = 0;
    local_3d8 = &DAT_140281f00;
    local_3f0 = &DAT_140281f00;
    local_3e8 = 0;
    local_3f8 = 0;
    Ordinal_9(local_410);
    Ordinal_9(local_428);
    if (local_440 != (longlong *)0x0) {
      (**(code **)(*local_440 + 0x10))();
    }
    if (local_448 != (IUnknown *)0x0) {
      (*local_448->lpVtbl->Release)(local_448);
    }
    if (local_4f0 != (longlong *)0x0) {
      (**(code **)(*local_4f0 + 0x10))();
    }
    return false;
  }
LAB_14009ab2c:
  puVar14 = &DAT_14028c250;
  puVar15 = &DAT_14028c250;
  lVar13 = 0x28;
  do {
    lVar10 = lVar13 / 2;
    if (puVar15[lVar10] < 0xb) {
      puVar15 = puVar15 + lVar10 + 1;
      lVar10 = lVar13 + (-1 - lVar10);
    }
    lVar13 = lVar10;
  } while (0 < lVar10);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_230 = *puVar15;
  local_238 = 0;
  local_220 = 0;
  local_218 = 0;
  local_210 = 0x3f800000;
  local_208 = 0;
  local_200 = 0;
  puVar15 = &DAT_14028c250;
  lVar13 = 0x28;
  do {
    lVar10 = lVar13 / 2;
    if (puVar15[lVar10] < 0xb) {
      puVar15 = puVar15 + lVar10 + 1;
      lVar10 = lVar13 + (-1 - lVar10);
    }
    lVar13 = lVar10;
  } while (0 < lVar10);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_1f0 = *puVar15;
  local_1f8 = 0;
  local_1e0 = 0;
  local_1d8 = 0;
  local_1d0 = 0x3f800000;
  local_1c8 = 0;
  local_1c0 = 0;
  puVar15 = &DAT_14028c250;
  lVar13 = 0x28;
  do {
    lVar10 = lVar13 / 2;
    if (puVar15[lVar10] < 0xb) {
      puVar15 = puVar15 + lVar10 + 1;
      lVar10 = lVar13 + (-1 - lVar10);
    }
    lVar13 = lVar10;
  } while (0 < lVar10);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_130 = *puVar15;
  local_138 = 0;
  local_120 = 0;
  local_118 = 0;
  local_110 = 0x3f800000;
  local_108 = 0;
  local_100 = 0;
  puVar15 = &DAT_14028c250;
  lVar13 = 0x28;
  do {
    lVar10 = lVar13 / 2;
    if (puVar15[lVar10] < 0xb) {
      puVar15 = puVar15 + lVar10 + 1;
      lVar10 = lVar13 + (-1 - lVar10);
    }
    lVar13 = lVar10;
  } while (0 < lVar10);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_170 = *puVar15;
  local_178 = 0;
  local_160 = 0;
  local_158 = 0;
  local_150 = 0x3f800000;
  local_148 = 0;
  local_140 = 0;
  puVar15 = &DAT_14028c250;
  lVar13 = 0x28;
  do {
    lVar10 = lVar13 / 2;
    if (puVar15[lVar10] < 0xb) {
      puVar15 = puVar15 + lVar10 + 1;
      lVar10 = lVar13 + (-1 - lVar10);
    }
    lVar13 = lVar10;
  } while (0 < lVar10);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_270 = *puVar15;
  local_278 = 0;
  local_260 = 0;
  local_258 = 0;
  local_250 = 0x3f800000;
  local_248 = 0;
  local_240 = 0;
  puVar15 = &DAT_14028c250;
  lVar13 = 0x28;
  do {
    lVar10 = lVar13 / 2;
    if (puVar15[lVar10] < 0xb) {
      puVar15 = puVar15 + lVar10 + 1;
      lVar10 = lVar13 + (-1 - lVar10);
    }
    lVar13 = lVar10;
  } while (0 < lVar10);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_2b0 = *puVar15;
  local_2b8 = 0;
  local_2a0 = 0;
  local_298 = 0;
  local_290 = 0x3f800000;
  local_288 = 0;
  local_280 = 0;
  puVar15 = &DAT_14028c250;
  lVar13 = 0x28;
  do {
    lVar10 = lVar13 / 2;
    if (puVar15[lVar10] < 0xb) {
      puVar15 = puVar15 + lVar10 + 1;
      lVar10 = lVar13 + (-1 - lVar10);
    }
    lVar13 = lVar10;
  } while (0 < lVar10);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_1b0 = *puVar15;
  local_1b8 = 0;
  local_1a0 = 0;
  local_198 = 0;
  local_190 = 0x3f800000;
  local_188 = 0;
  local_180 = 0;
  puVar15 = &DAT_14028c250;
  lVar13 = 0x28;
  do {
    lVar10 = lVar13 / 2;
    if (puVar15[lVar10] < 0xb) {
      puVar15 = puVar15 + lVar10 + 1;
      lVar10 = lVar13 + (-1 - lVar10);
    }
    lVar13 = lVar10;
  } while (0 < lVar10);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_b0 = *puVar15;
  local_b8 = 0;
  local_a0 = 0;
  local_98 = 0;
  local_90 = 0x3f800000;
  local_88 = 0;
  local_80 = 0;
  puVar15 = &DAT_14028c250;
  lVar13 = 0x28;
  do {
    lVar10 = lVar13 / 2;
    if (puVar15[lVar10] < 0xb) {
      puVar15 = puVar15 + lVar10 + 1;
      lVar10 = lVar13 + (-1 - lVar10);
    }
    lVar13 = lVar10;
  } while (0 < lVar10);
  if (puVar15 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar15 = (ulonglong *)&UNK_14028c388;
  }
  local_70 = *puVar15;
  local_78 = 0;
  local_60 = 0;
  local_58 = 0;
  local_50 = 0x3f800000;
  local_48 = 0;
  local_40 = 0;
  lVar13 = 0x28;
  do {
    lVar10 = lVar13 / 2;
    if (puVar14[lVar10] < 0xb) {
      puVar14 = puVar14 + lVar10 + 1;
      lVar10 = lVar13 + (-1 - lVar10);
    }
    lVar13 = lVar10;
  } while (0 < lVar10);
  if (puVar14 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar14 = (ulonglong *)&UNK_14028c388;
  }
  local_f0 = *puVar14;
  local_f8 = (void *)0x0;
  local_e0 = 0;
  local_d8 = 0;
  local_d0 = 0x3f800000;
  local_c8 = 0;
  local_c0 = 0;
  local_500 = 0;
  puVar11 = (undefined8 *)FUN_140001f20(*param_1,&local_4f8);
  FUN_140001710(&local_4f0,*puVar11,"dbo.up_read_all_auctionlist_statistics");
  if ((longlong *)CONCAT44(local_4f8._4_4_,(int)local_4f8) != (longlong *)0x0) {
    (**(code **)(*(longlong *)CONCAT44(local_4f8._4_4_,(int)local_4f8) + 0x10))();
  }
  puVar11 = (undefined8 *)FUN_1400016d0(&local_4f0,&local_4f8);
  This = local_448;
  pIVar1 = (IUnknown *)*puVar11;
  if (local_448 != pIVar1) {
    local_448 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if ((longlong *)CONCAT44(local_4f8._4_4_,(int)local_4f8) != (longlong *)0x0) {
    (**(code **)(*(longlong *)CONCAT44(local_4f8._4_4_,(int)local_4f8) + 0x10))();
  }
  pIVar1 = local_448;
  if (local_448 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_504 = (uint)local_504._2_2_ << 0x10;
  UVar4 = (*local_448->lpVtbl[6].Release)(local_448);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
  }
  if ((short)local_504 != -1) {
    while( true ) {
      pIVar1 = local_448;
      if (local_448 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_504 = local_504 & 0xffff0000;
      UVar4 = (*local_448->lpVtbl[6].Release)(local_448);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_504 == -1) break;
      uVar12 = FUN_140002290(&local_448,local_3c0,&DAT_14028931c,local_508);
      FUN_140182560(uVar12);
      uVar5 = FUN_140062550(uVar12);
      local_504 = uVar5;
      Ordinal_9(local_3c0);
      uVar12 = FUN_140002290(&local_448,local_3c0,"enhance_level",local_508);
      FUN_140182560(uVar12);
      iVar2 = FUN_140062550(uVar12);
      Ordinal_9(local_3c0);
      uVar12 = FUN_140002290(&local_448,local_2e8,"gcode",local_508);
      FUN_140182560(uVar12);
      iVar6 = FUN_140062550(uVar12);
      Ordinal_9(local_2e8);
      uVar12 = FUN_140002290(&local_448,local_2d0,"option_1_code",local_508);
      FUN_140182560(uVar12);
      iVar7 = FUN_140062550(uVar12);
      Ordinal_9(local_2d0);
      uVar12 = FUN_140002290(&local_448,local_330,"option_2_code",local_508);
      FUN_140182560(uVar12);
      iVar8 = FUN_140062550(uVar12);
      Ordinal_9(local_330);
      uVar12 = FUN_140002290(&local_448,local_300,"option_3_code",local_508);
      FUN_140182560(uVar12);
      local_46c = FUN_140062550(uVar12);
      Ordinal_9(local_300);
      uVar12 = FUN_140002290(&local_448,local_318,"option_group",local_508);
      FUN_140182560(uVar12);
      iVar9 = FUN_140062550(uVar12);
      Ordinal_9(local_318);
      uVar12 = FUN_140002290(&local_448,local_348,"socket_1_code",local_508);
      FUN_140182560(uVar12);
      local_47c = FUN_140062550(uVar12);
      Ordinal_9(local_348);
      uVar12 = FUN_140002290(&local_448,local_390,"socket_2_code",local_508);
      FUN_140182560(uVar12);
      local_468 = FUN_140062550(uVar12);
      Ordinal_9(local_390);
      uVar12 = FUN_140002290(&local_448,local_378,"socket_3_code",local_508);
      FUN_140182560(uVar12);
      local_470 = FUN_140062550(uVar12);
      Ordinal_9(local_378);
      uVar12 = FUN_140002290(&local_448,local_360,"activity_value",local_508);
      FUN_140182560(uVar12);
      local_480 = FUN_140062550(uVar12);
      Ordinal_9(local_360);
      uVar12 = FUN_140002290(&local_448,local_4e8,"start_price",local_508);
      FUN_140182560(uVar12);
      local_478 = FUN_140062550(uVar12);
      Ordinal_9(local_4e8);
      uVar12 = FUN_140002290(&local_448,local_4e8,"bid_price",local_508);
      FUN_140182560(uVar12);
      local_474 = FUN_140062550(uVar12);
      Ordinal_9(local_4e8);
      uVar12 = FUN_140002290(&local_448,local_4e8,"selling_price",local_508);
      FUN_140182560(uVar12);
      local_464.Data1 = FUN_140062550(uVar12);
      Ordinal_9(local_4e8);
      if (0 < (int)uVar5) {
        if (local_218 != 0) {
          for (puVar11 = *(undefined8 **)
                          (local_238 + ((ulonglong)(longlong)(int)uVar5 % local_230) * 8);
              puVar11 != (undefined8 *)0x0; puVar11 = (undefined8 *)*puVar11) {
            if (uVar5 == *(uint *)(puVar11 + 1)) {
              if (puVar11 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar11 + 0xc) = *(int *)((longlong)puVar11 + 0xc) + 1;
                goto LAB_14009b608;
              }
              break;
            }
          }
        }
        local_4b0[1] = 1;
        local_4b0[0] = uVar5;
        if (local_218 == 0) {
          FUN_14009ebc0(&local_238,&local_464.Data2,local_4b0);
        }
        else {
          FUN_14009ea40(&local_238,local_4e8,local_4b0,local_4b0);
        }
      }
LAB_14009b608:
      if (0 < iVar2) {
        if (local_1d8 != 0) {
          for (puVar11 = *(undefined8 **)(local_1f8 + ((ulonglong)(longlong)iVar2 % local_1f0) * 8);
              puVar11 != (undefined8 *)0x0; puVar11 = (undefined8 *)*puVar11) {
            if (iVar2 == *(int *)(puVar11 + 1)) {
              if (puVar11 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar11 + 0xc) = *(int *)((longlong)puVar11 + 0xc) + 1;
                goto LAB_14009b692;
              }
              break;
            }
          }
        }
        local_4d0[1] = 1;
        local_4d0[0] = iVar2;
        if (local_1d8 == 0) {
          FUN_14009ebc0(&local_1f8,local_4e8,local_4d0);
        }
        else {
          FUN_14009ea40(&local_1f8,&local_464.Data2,local_4d0,local_4d0);
        }
      }
LAB_14009b692:
      if (0 < iVar6) {
        if (local_118 != 0) {
          for (puVar11 = *(undefined8 **)(local_138 + ((ulonglong)(longlong)iVar6 % local_130) * 8);
              puVar11 != (undefined8 *)0x0; puVar11 = (undefined8 *)*puVar11) {
            if (iVar6 == *(int *)(puVar11 + 1)) {
              if (puVar11 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar11 + 0xc) = *(int *)((longlong)puVar11 + 0xc) + 1;
                goto LAB_14009b734;
              }
              break;
            }
          }
        }
        local_490[1] = 1;
        local_490[0] = iVar6;
        if (local_118 == 0) {
          FUN_14009ebc0(&local_138,local_4e8,local_490);
        }
        else {
          FUN_14009ea40(&local_138,&local_464.Data2,local_490,local_490);
        }
      }
LAB_14009b734:
      if (0 < iVar9) {
        if (local_158 != 0) {
          for (puVar11 = *(undefined8 **)(local_178 + ((ulonglong)(longlong)iVar9 % local_170) * 8);
              puVar11 != (undefined8 *)0x0; puVar11 = (undefined8 *)*puVar11) {
            if (iVar9 == *(int *)(puVar11 + 1)) {
              if (puVar11 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar11 + 0xc) = *(int *)((longlong)puVar11 + 0xc) + 1;
                goto LAB_14009b7be;
              }
              break;
            }
          }
        }
        local_4c0[1] = 1;
        local_4c0[0] = iVar9;
        if (local_158 == 0) {
          FUN_14009ebc0(&local_178,local_4e8,local_4c0);
        }
        else {
          FUN_14009ea40(&local_178,&local_464.Data2,local_4c0,local_4c0);
        }
      }
LAB_14009b7be:
      if (0 < iVar7) {
        if (local_258 != 0) {
          for (puVar11 = *(undefined8 **)(local_278 + ((ulonglong)(longlong)iVar7 % local_270) * 8);
              puVar11 != (undefined8 *)0x0; puVar11 = (undefined8 *)*puVar11) {
            if (iVar7 == *(int *)(puVar11 + 1)) {
              if (puVar11 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar11 + 0xc) = *(int *)((longlong)puVar11 + 0xc) + 1;
                goto LAB_14009b857;
              }
              break;
            }
          }
        }
        local_4b4 = 1;
        local_4c0[2] = iVar7;
        if (local_258 == 0) {
          FUN_14009ebc0(&local_278,local_4e8,local_4c0 + 2);
        }
        else {
          FUN_14009ea40(&local_278,&local_464.Data2,local_4c0 + 2,local_4c0 + 2);
        }
      }
LAB_14009b857:
      if (0 < iVar8) {
        if (local_258 != 0) {
          for (puVar11 = *(undefined8 **)(local_278 + ((ulonglong)(longlong)iVar8 % local_270) * 8);
              puVar11 != (undefined8 *)0x0; puVar11 = (undefined8 *)*puVar11) {
            if (iVar8 == *(int *)(puVar11 + 1)) {
              if (puVar11 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar11 + 0xc) = *(int *)((longlong)puVar11 + 0xc) + 1;
                goto LAB_14009b8e1;
              }
              break;
            }
          }
        }
        local_4c4 = 1;
        local_4d0[2] = iVar8;
        if (local_258 == 0) {
          FUN_14009ebc0(&local_278,local_4e8,local_4d0 + 2);
        }
        else {
          FUN_14009ea40(&local_278,&local_464.Data2,local_4d0 + 2,local_4d0 + 2);
        }
      }
LAB_14009b8e1:
      if (0 < local_46c) {
        if (local_258 != 0) {
          for (puVar11 = *(undefined8 **)
                          (local_278 + ((ulonglong)(longlong)local_46c % local_270) * 8);
              puVar11 != (undefined8 *)0x0; puVar11 = (undefined8 *)*puVar11) {
            if (local_46c == *(int *)(puVar11 + 1)) {
              if (puVar11 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar11 + 0xc) = *(int *)((longlong)puVar11 + 0xc) + 1;
                goto LAB_14009b97f;
              }
              break;
            }
          }
        }
        local_4b0[2] = local_46c;
        local_4a4 = 1;
        if (local_258 == 0) {
          FUN_14009ebc0(&local_278,local_4e8,local_4b0 + 2);
        }
        else {
          FUN_14009ea40(&local_278,&local_464.Data2,local_4b0 + 2,local_4b0 + 2);
        }
      }
LAB_14009b97f:
      if (0 < local_47c) {
        if (local_298 != 0) {
          for (puVar11 = *(undefined8 **)
                          (local_2b8 + ((ulonglong)(longlong)local_47c % local_2b0) * 8);
              puVar11 != (undefined8 *)0x0; puVar11 = (undefined8 *)*puVar11) {
            if (local_47c == *(int *)(puVar11 + 1)) {
              if (puVar11 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar11 + 0xc) = *(int *)((longlong)puVar11 + 0xc) + 1;
                goto LAB_14009ba1d;
              }
              break;
            }
          }
        }
        local_4a0[2] = local_47c;
        local_494 = 1;
        if (local_298 == 0) {
          FUN_14009ebc0(&local_2b8,local_4e8,local_4a0 + 2);
        }
        else {
          FUN_14009ea40(&local_2b8,&local_464.Data2,local_4a0 + 2,local_4a0 + 2);
        }
      }
LAB_14009ba1d:
      if (0 < local_468) {
        if (local_298 != 0) {
          for (puVar11 = *(undefined8 **)
                          (local_2b8 + ((ulonglong)(longlong)local_468 % local_2b0) * 8);
              puVar11 != (undefined8 *)0x0; puVar11 = (undefined8 *)*puVar11) {
            if (local_468 == *(int *)(puVar11 + 1)) {
              if (puVar11 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar11 + 0xc) = *(int *)((longlong)puVar11 + 0xc) + 1;
                goto LAB_14009babb;
              }
              break;
            }
          }
        }
        local_490[2] = local_468;
        local_484 = 1;
        if (local_298 == 0) {
          FUN_14009ebc0(&local_2b8,local_4e8,local_490 + 2);
        }
        else {
          FUN_14009ea40(&local_2b8,&local_464.Data2,local_490 + 2,local_490 + 2);
        }
      }
LAB_14009babb:
      if (0 < local_470) {
        if (local_298 != 0) {
          for (puVar11 = *(undefined8 **)
                          (local_2b8 + ((ulonglong)(longlong)local_470 % local_2b0) * 8);
              puVar11 != (undefined8 *)0x0; puVar11 = (undefined8 *)*puVar11) {
            if (local_470 == *(int *)(puVar11 + 1)) {
              if (puVar11 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar11 + 0xc) = *(int *)((longlong)puVar11 + 0xc) + 1;
                goto LAB_14009bb59;
              }
              break;
            }
          }
        }
        local_4a0[0] = local_470;
        local_4a0[1] = 1;
        if (local_298 == 0) {
          FUN_14009ebc0(&local_2b8,local_4e8,local_4a0);
        }
        else {
          FUN_14009ea40(&local_2b8,&local_464.Data2,local_4a0,local_4a0);
        }
      }
LAB_14009bb59:
      if (0 < local_480) {
        if (local_198 != 0) {
          for (puVar11 = *(undefined8 **)
                          (local_1b8 + ((ulonglong)(longlong)local_480 % local_1b0) * 8);
              puVar11 != (undefined8 *)0x0; puVar11 = (undefined8 *)*puVar11) {
            if (local_480 == *(int *)(puVar11 + 1)) {
              if (puVar11 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar11 + 0xc) = *(int *)((longlong)puVar11 + 0xc) + 1;
                goto LAB_14009bbeb;
              }
              break;
            }
          }
        }
        local_4f8._0_4_ = local_480;
        local_4f8._4_4_ = 1;
        if (local_198 == 0) {
          FUN_14009ebc0(&local_1b8,local_4e8,&local_4f8);
        }
        else {
          FUN_14009ea40(&local_1b8,&local_464.Data2,&local_4f8,&local_4f8);
        }
      }
LAB_14009bbeb:
      FUN_140098e10(&local_504,&local_478,&local_b8);
      FUN_140098e10(&local_504,&local_474,&local_78);
      ppvObject = &local_f8;
      riid = &local_464;
      FUN_140098e10(&local_504);
      pIVar1 = local_448;
      if (local_448 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar3 = (*local_448->lpVtbl[0xc].QueryInterface)(local_448,riid,ppvObject);
      if (HVar3 < 0) {
        _com_issue_errorex(HVar3,pIVar1,(_GUID *)&DAT_140281f28);
      }
      local_500 = local_500 + 1;
    }
    bVar17 = local_508[0] != '\0';
    uVar16 = (ulonglong)local_500;
  }
  FUN_140098ec0("auction_ItemCode",&local_238);
  printf("Completed %s Report_ItemCode\n","auction_ItemCode");
  FUN_140098ec0("auction_EnhanceLevel",&local_1f8);
  printf("Completed %s Report_EnhanceLevel\n","auction_EnhanceLevel");
  FUN_140098ec0("auction_ItemGCode",&local_138);
  printf("Completed %s Report_ItemGCode\n","auction_ItemGCode");
  FUN_140098ec0("auction_OptionGroup",&local_178);
  printf("Completed %s Report_OptionGroup\n","auction_OptionGroup");
  FUN_140098ec0("auction_OptionCode",&local_278);
  printf("Completed %s Report_OptionCode\n","auction_OptionCode");
  FUN_140098ec0("auction_SocketCode",&local_2b8);
  printf("Completed %s Report_SocketCode\n","auction_SocketCode");
  FUN_140098ec0("auction_Activity",&local_1b8);
  printf("Completed %s Report_Activity\n","auction_Activity");
  FUN_140099030("auction_Start_price",&local_b8);
  printf("Completed %s Report_Start_price\n","auction_Start_price");
  FUN_140099030("auction_Bid_price",&local_78);
  printf("Completed %s Report_Bid_price\n","auction_Bid_price");
  FUN_140099030("auction_Selling_price",&local_f8);
  printf("Completed %s Report_Selling_price\n","auction_Selling_price");
  printf("Total Item Count : %d\n",uVar16);
  if (local_f8 != (void *)0x0) {
    FUN_14009e9b0(&local_f8);
  }
  if (local_78 != 0) {
    FUN_14009e9b0(&local_78);
  }
  if (local_b8 != 0) {
    FUN_14009e9b0(&local_b8);
  }
  if (local_1b8 != 0) {
    FUN_14009e9b0(&local_1b8);
  }
  if (local_2b8 != 0) {
    FUN_14009e9b0(&local_2b8);
  }
  if (local_278 != 0) {
    FUN_14009e9b0(&local_278);
  }
  if (local_178 != 0) {
    FUN_14009e9b0(&local_178);
  }
  if (local_138 != 0) {
    FUN_14009e9b0(&local_138);
  }
  if (local_1f8 != 0) {
    FUN_14009e9b0(&local_1f8);
  }
  if (local_238 != 0) {
    FUN_14009e9b0(&local_238);
  }
  FUN_140002200(&local_448);
  if (local_4f0 != (longlong *)0x0) {
    (**(code **)(*local_4f0 + 0x10))();
  }
  return bVar17;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

bool FUN_14009bf80(undefined8 *param_1,undefined8 param_2)

{
  longlong *plVar1;
  IUnknown *pIVar2;
  undefined8 *puVar3;
  IUnknown *This;
  int iVar4;
  HRESULT HVar5;
  ULONG UVar6;
  int iVar7;
  int iVar8;
  int iVar9;
  int iVar10;
  int iVar11;
  longlong lVar12;
  undefined8 *puVar13;
  undefined8 uVar14;
  IID *riid;
  longlong *plVar15;
  longlong lVar16;
  ulonglong *puVar17;
  bool bVar18;
  undefined1 auStackY_288 [32];
  char local_258 [4];
  uint local_254;
  undefined1 local_250 [24];
  int local_238;
  undefined4 uStack_234;
  longlong *local_230;
  IUnknown *local_228;
  longlong *local_220;
  undefined4 local_218;
  undefined1 local_208 [24];
  undefined1 local_1f0 [24];
  undefined4 local_1d8;
  undefined1 *local_1d0;
  undefined4 local_1c8;
  undefined8 local_1c0;
  undefined1 *local_1b8;
  undefined4 local_1a8;
  undefined4 uStack_1a4;
  longlong lStack_1a0;
  undefined8 local_198;
  undefined8 uStack_190;
  undefined8 local_188;
  undefined8 uStack_180;
  undefined8 local_178;
  undefined8 uStack_170;
  undefined8 local_168;
  undefined8 uStack_160;
  undefined8 local_158;
  int local_148;
  int local_144;
  int local_140;
  int local_13c;
  int local_138;
  int local_134;
  int local_130;
  int local_12c;
  int local_128;
  int local_124;
  int local_120;
  undefined8 *local_118;
  longlong local_110;
  undefined1 local_108 [40];
  undefined8 local_e0;
  uint local_d8 [2];
  undefined8 local_d0;
  longlong lStack_c8;
  undefined8 local_c0;
  undefined8 uStack_b8;
  undefined8 local_b0;
  undefined8 uStack_a8;
  undefined8 local_a0;
  undefined8 uStack_98;
  undefined4 local_90;
  undefined4 uStack_8c;
  undefined4 uStack_88;
  undefined4 uStack_84;
  undefined8 local_80;
  longlong *local_78;
  ulonglong local_70;
  undefined1 local_60;
  longlong local_58;
  undefined4 local_50;
  undefined8 local_48;
  undefined8 local_40;
  ulonglong local_38;
  
  local_e0 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_288;
  local_230 = (longlong *)0x0;
  local_118 = param_1;
  iVar4 = FUN_140001970(&local_230);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_228 = (IUnknown *)0x0;
  local_220 = (longlong *)0x0;
  Ordinal_8(local_208);
  Ordinal_8(local_1f0);
  pIVar2 = local_228;
  if ((local_228 != (IUnknown *)0x0) && (local_228 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_1b8 = &DAT_140281f00;
  local_1d0 = &DAT_140281f00;
  local_1c8 = 0;
  local_1c0 = 0;
  if (local_228 != (IUnknown *)0x0) {
    (*local_228->lpVtbl->Release)(local_228);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           (LPVOID *)&local_238);
  if (HVar5 < 0) {
LAB_14009c0cc:
    local_228 = (IUnknown *)0x0;
  }
  else {
    HVar5 = OleRun((LPUNKNOWN)CONCAT44(uStack_234,local_238));
    if (-1 < HVar5) {
      HVar5 = (*(code *)**(undefined8 **)CONCAT44(uStack_234,local_238))
                        ((undefined8 *)CONCAT44(uStack_234,local_238),&DAT_140281f68,&local_228);
    }
    (**(code **)(*(longlong *)CONCAT44(uStack_234,local_238) + 0x10))();
    if (HVar5 < 0) goto LAB_14009c0cc;
  }
  local_1d8 = 2;
  bVar18 = true;
  local_218 = 1;
  local_258[0] = '\x01';
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_254 = 0;
    UVar6 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_254 != 0) goto LAB_14009c25c;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_228;
    if (local_228 != (IUnknown *)0x0) {
      local_254 = 0;
      UVar6 = (*local_228->lpVtbl[0x12].AddRef)(local_228);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_228;
      if (local_254 != 0) {
        if (local_228 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar6 = (*local_228->lpVtbl[10].Release)(local_228);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_228 != (IUnknown *)0x0) {
        (*local_228->lpVtbl->Release)(local_228);
        local_228 = (IUnknown *)0x0;
      }
    }
    local_1c0 = 0;
    local_1b8 = &DAT_140281f00;
    local_1d0 = &DAT_140281f00;
    local_1c8 = 0;
    local_1d8 = 0;
    Ordinal_9(local_1f0);
    Ordinal_9(local_208);
    if (local_220 != (longlong *)0x0) {
      (**(code **)(*local_220 + 0x10))();
    }
    if (local_228 != (IUnknown *)0x0) {
      (*local_228->lpVtbl->Release)(local_228);
    }
    if (local_230 != (longlong *)0x0) {
      (**(code **)(*local_230 + 0x10))();
    }
    return false;
  }
LAB_14009c25c:
  puVar17 = &DAT_14028c250;
  lVar16 = 0x28;
  do {
    lVar12 = lVar16 / 2;
    if (puVar17[lVar12] < 0xb) {
      puVar17 = puVar17 + lVar12 + 1;
      lVar12 = lVar16 + (-1 - lVar12);
    }
    lVar16 = lVar12;
  } while (0 < lVar12);
  if (puVar17 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar17 = (ulonglong *)&UNK_14028c388;
  }
  local_70 = *puVar17;
  local_78 = (longlong *)0x0;
  local_60 = 0;
  local_58 = 0;
  local_50 = 0x3f800000;
  local_48 = 0;
  local_40 = 0;
  puVar13 = (undefined8 *)FUN_140001f20(*param_1,&local_238);
  FUN_140001710(&local_230,*puVar13,"dbo.up_get_duel_info_statistics");
  if ((longlong *)CONCAT44(uStack_234,local_238) != (longlong *)0x0) {
    (**(code **)(*(longlong *)CONCAT44(uStack_234,local_238) + 0x10))();
  }
  puVar13 = (undefined8 *)FUN_1400016d0(&local_230,&local_238);
  This = local_228;
  pIVar2 = (IUnknown *)*puVar13;
  if (local_228 != pIVar2) {
    local_228 = pIVar2;
    if (pIVar2 != (IUnknown *)0x0) {
      (*pIVar2->lpVtbl->AddRef)(pIVar2);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if ((longlong *)CONCAT44(uStack_234,local_238) != (longlong *)0x0) {
    (**(code **)(*(longlong *)CONCAT44(uStack_234,local_238) + 0x10))();
  }
  pIVar2 = local_228;
  if (local_228 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_254 = local_254 & 0xffff0000;
  UVar6 = (*local_228->lpVtbl[6].Release)(local_228);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
  }
  if ((short)local_254 == -1) {
LAB_14009cbdf:
    FUN_1400991c0(&local_78);
    if (local_78 != (longlong *)0x0) {
      plVar1 = local_78 + local_70;
      for (plVar15 = local_78; plVar15 != plVar1; plVar15 = plVar15 + 1) {
        puVar13 = (undefined8 *)*plVar15;
        *plVar15 = 0;
        while (puVar13 != (undefined8 *)0x0) {
          puVar3 = (undefined8 *)*puVar13;
          operator_delete(puVar13);
          puVar13 = puVar3;
        }
      }
      operator_delete(local_78);
      local_78 = (longlong *)0x0;
    }
    pIVar2 = local_228;
    if (local_228 != (IUnknown *)0x0) {
      local_254 = 0;
      UVar6 = (*local_228->lpVtbl[0x12].AddRef)(local_228);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_228;
      if (local_254 != 0) {
        if (local_228 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar6 = (*local_228->lpVtbl[10].Release)(local_228);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_228 != (IUnknown *)0x0) {
        (*local_228->lpVtbl->Release)(local_228);
        local_228 = (IUnknown *)0x0;
      }
    }
    local_1c0 = 0;
    local_1b8 = &DAT_140281f00;
    local_1d0 = &DAT_140281f00;
    local_1c8 = 0;
    local_1d8 = 0;
    Ordinal_9(local_1f0);
    Ordinal_9(local_208);
    if (local_220 != (longlong *)0x0) {
      (**(code **)(*local_220 + 0x10))();
    }
    if (local_228 != (IUnknown *)0x0) {
      (*local_228->lpVtbl->Release)(local_228);
    }
    if (local_230 != (longlong *)0x0) {
      (**(code **)(*local_230 + 0x10))();
    }
    return bVar18;
  }
LAB_14009c3d0:
  do {
    pIVar2 = local_228;
    if (local_228 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_254 = local_254 & 0xffff0000;
    UVar6 = (*local_228->lpVtbl[6].Release)(local_228);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
    }
    if ((short)local_254 == -1) {
      bVar18 = local_258[0] != '\0';
      goto LAB_14009cbdf;
    }
    local_1a8 = 0;
    lStack_1a0 = 0;
    local_198 = 0;
    uStack_190 = 0;
    local_188 = 0;
    uStack_180 = 0;
    local_178 = 0;
    uStack_170 = 0;
    local_168 = 0;
    uStack_160 = 0;
    local_158 = 0;
    uVar14 = FUN_140002290(&local_228,local_108,"char_class",local_258);
    FUN_140182560(uVar14);
    local_254 = FUN_140062550(uVar14);
    Ordinal_9(local_108);
    uVar14 = FUN_140002290(&local_228,local_250,"duel_exp",local_258);
    FUN_140182560(uVar14);
    lStack_1a0 = FUN_140182640(uVar14);
    local_110 = lStack_1a0;
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"duel_point",local_258);
    FUN_140182560(uVar14);
    local_130 = FUN_140062550(uVar14);
    local_198 = CONCAT44(local_198._4_4_,local_130);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"duel_disconnect",local_258);
    FUN_140182560(uVar14);
    local_144 = FUN_140062550(uVar14);
    local_198 = CONCAT44(local_144,(undefined4)local_198);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"total_win",local_258);
    FUN_140182560(uVar14);
    local_13c = FUN_140062550(uVar14);
    uStack_190 = CONCAT44(uStack_190._4_4_,local_13c);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"total_lose",local_258);
    FUN_140182560(uVar14);
    local_120 = FUN_140062550(uVar14);
    uStack_190 = CONCAT44(local_120,(undefined4)uStack_190);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"pvp_win",local_258);
    FUN_140182560(uVar14);
    local_124 = FUN_140062550(uVar14);
    local_188 = CONCAT44(local_188._4_4_,local_124);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"pvp_lose",local_258);
    FUN_140182560(uVar14);
    local_140 = FUN_140062550(uVar14);
    local_188 = CONCAT44(local_140,(undefined4)local_188);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"team_win",local_258);
    FUN_140182560(uVar14);
    local_128 = FUN_140062550(uVar14);
    uStack_180 = CONCAT44(uStack_180._4_4_,local_128);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"team_lose",local_258);
    FUN_140182560(uVar14);
    local_12c = FUN_140062550(uVar14);
    uStack_180 = CONCAT44(local_12c,(undefined4)uStack_180);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"leader_win",local_258);
    FUN_140182560(uVar14);
    local_138 = FUN_140062550(uVar14);
    local_178 = CONCAT44(local_178._4_4_,local_138);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"leader_lose",local_258);
    FUN_140182560(uVar14);
    local_134 = FUN_140062550(uVar14);
    local_178 = CONCAT44(local_134,(undefined4)local_178);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"tag_win",local_258);
    FUN_140182560(uVar14);
    local_148 = FUN_140062550(uVar14);
    uStack_170 = CONCAT44(uStack_170._4_4_,local_148);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"tag_lose",local_258);
    FUN_140182560(uVar14);
    local_238 = FUN_140062550(uVar14);
    uStack_170 = CONCAT44(local_238,(undefined4)uStack_170);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"death_win",local_258);
    FUN_140182560(uVar14);
    iVar4 = FUN_140062550(uVar14);
    local_168 = CONCAT44(local_168._4_4_,iVar4);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"death_lose",local_258);
    FUN_140182560(uVar14);
    iVar7 = FUN_140062550(uVar14);
    local_168 = CONCAT44(iVar7,(undefined4)local_168);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"ladder_win",local_258);
    FUN_140182560(uVar14);
    iVar8 = FUN_140062550(uVar14);
    uStack_160 = CONCAT44(uStack_160._4_4_,iVar8);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"ladder_lose",local_258);
    FUN_140182560(uVar14);
    iVar9 = FUN_140062550(uVar14);
    uStack_160 = CONCAT44(iVar9,(undefined4)uStack_160);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"duel_ladder_point",local_258);
    FUN_140182560(uVar14);
    iVar10 = FUN_140062550(uVar14);
    local_158 = CONCAT44(local_158._4_4_,iVar10);
    Ordinal_9(local_250);
    uVar14 = FUN_140002290(&local_228,local_250,"duel_ladder_exp",local_258);
    FUN_140182560(uVar14);
    iVar11 = FUN_140062550(uVar14);
    local_158 = CONCAT44(iVar11,(undefined4)local_158);
    Ordinal_9(local_250);
    pIVar2 = local_228;
    if (local_58 != 0) {
      riid = (IID *)((ulonglong)(longlong)(int)local_254 % local_70);
      for (puVar13 = (undefined8 *)local_78[(longlong)riid]; puVar13 != (undefined8 *)0x0;
          puVar13 = (undefined8 *)*puVar13) {
        if (local_254 == *(uint *)(puVar13 + 1)) {
          if (puVar13 != (undefined8 *)0x0) {
            *(int *)(puVar13 + 2) = *(int *)(puVar13 + 2) + 1;
            puVar13[3] = puVar13[3] + local_110;
            *(int *)(puVar13 + 4) = *(int *)(puVar13 + 4) + local_130;
            *(int *)((longlong)puVar13 + 0x24) = *(int *)((longlong)puVar13 + 0x24) + local_144;
            *(int *)(puVar13 + 5) = *(int *)(puVar13 + 5) + local_13c;
            *(int *)((longlong)puVar13 + 0x2c) = *(int *)((longlong)puVar13 + 0x2c) + local_120;
            *(int *)(puVar13 + 6) = *(int *)(puVar13 + 6) + local_124;
            *(int *)((longlong)puVar13 + 0x34) = *(int *)((longlong)puVar13 + 0x34) + local_140;
            *(int *)(puVar13 + 7) = *(int *)(puVar13 + 7) + local_128;
            *(int *)((longlong)puVar13 + 0x3c) = *(int *)((longlong)puVar13 + 0x3c) + local_12c;
            *(int *)(puVar13 + 8) = *(int *)(puVar13 + 8) + local_138;
            *(int *)((longlong)puVar13 + 0x44) = *(int *)((longlong)puVar13 + 0x44) + local_134;
            *(int *)(puVar13 + 9) = *(int *)(puVar13 + 9) + local_148;
            *(int *)((longlong)puVar13 + 0x4c) = *(int *)((longlong)puVar13 + 0x4c) + local_238;
            *(int *)(puVar13 + 10) = *(int *)(puVar13 + 10) + iVar4;
            *(int *)((longlong)puVar13 + 0x54) = *(int *)((longlong)puVar13 + 0x54) + iVar7;
            *(int *)(puVar13 + 0xb) = *(int *)(puVar13 + 0xb) + iVar8;
            *(int *)((longlong)puVar13 + 0x5c) = *(int *)((longlong)puVar13 + 0x5c) + iVar9;
            *(int *)(puVar13 + 0xc) = *(int *)(puVar13 + 0xc) + iVar10;
            *(int *)((longlong)puVar13 + 100) = *(int *)((longlong)puVar13 + 100) + iVar11;
            if (local_228 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            HVar5 = (*local_228->lpVtbl[0xc].QueryInterface)
                              (local_228,riid,(void **)(longlong)(int)local_254);
            if (HVar5 < 0) {
              _com_issue_errorex(HVar5,pIVar2,(_GUID *)&DAT_140281f28);
            }
            goto LAB_14009c3d0;
          }
          break;
        }
      }
    }
    local_1a8 = 1;
    local_d8[0] = local_254;
    local_d0 = CONCAT44(uStack_1a4,1);
    lStack_c8 = lStack_1a0;
    local_c0 = local_198;
    uStack_b8 = uStack_190;
    local_b0 = local_188;
    uStack_a8 = uStack_180;
    local_a0 = local_178;
    uStack_98 = uStack_170;
    local_90 = (undefined4)local_168;
    uStack_8c = local_168._4_4_;
    uStack_88 = (undefined4)uStack_160;
    uStack_84 = uStack_160._4_4_;
    local_80 = local_158;
    if (local_58 == 0) {
      FUN_14009f1e0(&local_78,local_108,local_d8);
    }
    else {
      FUN_14009f0b0(&local_78,local_250,local_d8,local_d8);
    }
  } while( true );
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x00014009d447)
// WARNING: Removing unreachable block (ram,0x00014009d451)
// WARNING: Removing unreachable block (ram,0x00014009d45c)
// WARNING: Removing unreachable block (ram,0x00014009d46c)
// WARNING: Removing unreachable block (ram,0x00014009cfae)
// WARNING: Removing unreachable block (ram,0x00014009cfb8)
// WARNING: Removing unreachable block (ram,0x00014009cfc3)
// WARNING: Removing unreachable block (ram,0x00014009cfd3)

undefined4 FUN_14009cda0(undefined8 *param_1,undefined8 param_2)

{
  longlong *plVar1;
  IUnknown *pIVar2;
  undefined8 *puVar3;
  IUnknown *This;
  int iVar4;
  HRESULT HVar5;
  ULONG UVar6;
  longlong lVar7;
  undefined8 *puVar8;
  undefined8 uVar9;
  IID *riid;
  ulonglong uVar10;
  longlong *plVar11;
  longlong lVar12;
  char *ppvObject;
  ulonglong *puVar13;
  undefined4 uVar14;
  undefined1 auStackY_198 [32];
  char local_164 [4];
  short local_160;
  undefined8 local_158;
  longlong *local_150;
  IUnknown *local_148;
  longlong *local_140;
  undefined4 local_138;
  undefined1 local_128 [24];
  undefined1 local_110 [24];
  undefined4 local_f8;
  undefined1 *local_f0;
  undefined4 local_e8;
  undefined8 local_e0;
  undefined1 *local_d8;
  undefined8 *local_c8;
  undefined8 local_c0;
  IID local_b8 [2];
  IID local_90;
  longlong *local_78;
  ulonglong local_70;
  undefined1 local_60;
  longlong local_58;
  undefined4 local_50;
  undefined8 local_48;
  undefined8 local_40;
  ulonglong local_38;
  
  local_c0 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_198;
  uVar10 = 0;
  local_150 = (longlong *)0x0;
  local_c8 = param_1;
  iVar4 = FUN_140001970(&local_150);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_148 = (IUnknown *)0x0;
  local_140 = (longlong *)0x0;
  Ordinal_8(local_128);
  Ordinal_8(local_110);
  pIVar2 = local_148;
  if ((local_148 != (IUnknown *)0x0) && (local_148 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_d8 = &DAT_140281f00;
  local_f0 = &DAT_140281f00;
  local_e8 = 0;
  local_e0 = 0;
  if (local_148 != (IUnknown *)0x0) {
    (*local_148->lpVtbl->Release)(local_148);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           (LPVOID *)&local_158);
  if (-1 < HVar5) {
    HVar5 = OleRun((LPUNKNOWN)CONCAT44(local_158._4_4_,(int)local_158));
    if (-1 < HVar5) {
      HVar5 = (*(code *)**(undefined8 **)CONCAT44(local_158._4_4_,(int)local_158))
                        ((undefined8 *)CONCAT44(local_158._4_4_,(int)local_158),&DAT_140281f68,
                         &local_148);
    }
    (**(code **)(*(longlong *)CONCAT44(local_158._4_4_,(int)local_158) + 0x10))();
    if (-1 < HVar5) goto LAB_14009ceeb;
  }
  local_148 = (IUnknown *)0x0;
LAB_14009ceeb:
  local_f8 = 2;
  local_138 = 1;
  local_164[0] = '\x01';
  pIVar2 = *(IUnknown **)*param_1;
  if ((pIVar2 != (IUnknown *)0x0) && (UVar6 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2), (int)UVar6 < 0)
     ) {
    _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f08);
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_148;
    if (local_148 != (IUnknown *)0x0) {
      UVar6 = (*local_148->lpVtbl[0x12].AddRef)(local_148);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_148 != (IUnknown *)0x0) {
        (*local_148->lpVtbl->Release)(local_148);
        local_148 = (IUnknown *)0x0;
      }
    }
    local_e0 = 0;
    local_d8 = &DAT_140281f00;
    local_f0 = &DAT_140281f00;
    local_e8 = 0;
    local_f8 = 0;
    Ordinal_9(local_110);
    Ordinal_9(local_128);
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if (local_148 != (IUnknown *)0x0) {
      (*local_148->lpVtbl->Release)(local_148);
    }
    if (local_150 != (longlong *)0x0) {
      (**(code **)(*local_150 + 0x10))();
    }
    uVar14 = 0;
  }
  else {
    puVar13 = &DAT_14028c250;
    lVar12 = 0x28;
    do {
      lVar7 = lVar12 / 2;
      if (puVar13[lVar7] < 0xb) {
        puVar13 = puVar13 + lVar7 + 1;
        lVar7 = lVar12 + (-1 - lVar7);
      }
      lVar12 = lVar7;
    } while (0 < lVar7);
    if (puVar13 == (ulonglong *)"dbo.up_read_realtimeevent") {
      puVar13 = (ulonglong *)&UNK_14028c388;
    }
    local_70 = *puVar13;
    local_78 = (longlong *)0x0;
    local_60 = 0;
    local_58 = 0;
    local_50 = 0x3f800000;
    local_48 = 0;
    local_40 = 0;
    puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_158);
    FUN_140001710(&local_150,*puVar8,"dbo.up_read_quest_statistics");
    if ((longlong *)CONCAT44(local_158._4_4_,(int)local_158) != (longlong *)0x0) {
      (**(code **)(*(longlong *)CONCAT44(local_158._4_4_,(int)local_158) + 0x10))();
    }
    puVar8 = (undefined8 *)FUN_1400016d0(&local_150,&local_158);
    This = local_148;
    pIVar2 = (IUnknown *)*puVar8;
    if (local_148 != pIVar2) {
      local_148 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if ((longlong *)CONCAT44(local_158._4_4_,(int)local_158) != (longlong *)0x0) {
      (**(code **)(*(longlong *)CONCAT44(local_158._4_4_,(int)local_158) + 0x10))();
    }
    pIVar2 = local_148;
    if (local_148 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_160 = 0;
    UVar6 = (*local_148->lpVtbl[6].Release)(local_148);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
    }
    uVar14 = 1;
    if (local_160 != -1) {
      while( true ) {
        pIVar2 = local_148;
        if (local_148 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_160 = 0;
        UVar6 = (*local_148->lpVtbl[6].Release)(local_148);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
        if (local_160 == -1) break;
        ppvObject = "quest_code";
        riid = local_b8;
        uVar9 = FUN_140002290(&local_148,riid,"quest_code",local_164);
        FUN_140182560(uVar9);
        iVar4 = FUN_140062550(uVar9);
        Ordinal_9(local_b8);
        if (0 < iVar4) {
          if (local_58 != 0) {
            riid = (IID *)((ulonglong)(longlong)iVar4 % local_70);
            for (puVar8 = (undefined8 *)local_78[(longlong)riid]; puVar8 != (undefined8 *)0x0;
                puVar8 = (undefined8 *)*puVar8) {
              if (iVar4 == *(int *)(puVar8 + 1)) {
                if (puVar8 != (undefined8 *)0x0) {
                  *(int *)((longlong)puVar8 + 0xc) = *(int *)((longlong)puVar8 + 0xc) + 1;
                  goto LAB_14009d302;
                }
                break;
              }
            }
          }
          local_158._4_4_ = 1;
          ppvObject = (char *)&local_158;
          local_158._0_4_ = iVar4;
          if (local_58 == 0) {
            riid = &local_90;
            FUN_14009ebc0(&local_78);
          }
          else {
            riid = local_b8;
            FUN_14009ea40(&local_78,riid,ppvObject,&local_158);
          }
        }
LAB_14009d302:
        pIVar2 = local_148;
        uVar10 = (ulonglong)((int)uVar10 + 1);
        if (local_148 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar5 = (*local_148->lpVtbl[0xc].QueryInterface)(local_148,riid,(void **)ppvObject);
        if (HVar5 < 0) {
          _com_issue_errorex(HVar5,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      uVar14 = 1;
      if (local_164[0] == '\0') {
        uVar14 = 0;
      }
    }
    FUN_140098ec0("Quest",&local_78);
    printf("Completed %s Report_Quest\n","Quest");
    printf("Total Quest Count : %d\n",uVar10);
    if (local_78 != (longlong *)0x0) {
      plVar1 = local_78 + local_70;
      for (plVar11 = local_78; plVar11 != plVar1; plVar11 = plVar11 + 1) {
        puVar8 = (undefined8 *)*plVar11;
        *plVar11 = 0;
        while (puVar8 != (undefined8 *)0x0) {
          puVar3 = (undefined8 *)*puVar8;
          operator_delete(puVar8);
          puVar8 = puVar3;
        }
      }
      operator_delete(local_78);
      local_78 = (longlong *)0x0;
    }
    pIVar2 = local_148;
    if (local_148 != (IUnknown *)0x0) {
      UVar6 = (*local_148->lpVtbl[0x12].AddRef)(local_148);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_148 != (IUnknown *)0x0) {
        (*local_148->lpVtbl->Release)(local_148);
        local_148 = (IUnknown *)0x0;
      }
    }
    local_e0 = 0;
    local_d8 = &DAT_140281f00;
    local_f0 = &DAT_140281f00;
    local_e8 = 0;
    local_f8 = 0;
    Ordinal_9(local_110);
    Ordinal_9(local_128);
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if (local_148 != (IUnknown *)0x0) {
      (*local_148->lpVtbl->Release)(local_148);
    }
    if (local_150 != (longlong *)0x0) {
      (**(code **)(*local_150 + 0x10))();
    }
  }
  return uVar14;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_14009d530(undefined8 *param_1,undefined8 param_2)

{
  IUnknown *pIVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  IUnknown *This;
  int iVar4;
  HRESULT HVar5;
  ULONG UVar6;
  longlong lVar7;
  undefined8 *puVar8;
  undefined8 uVar9;
  IID *riid;
  ulonglong uVar10;
  undefined8 *puVar11;
  longlong lVar12;
  char *ppvObject;
  ulonglong *puVar13;
  undefined4 uVar14;
  undefined1 auStackY_198 [32];
  char local_168 [4];
  uint local_164;
  short local_160;
  int local_158;
  undefined4 uStack_154;
  longlong *local_150;
  IUnknown *local_148;
  longlong *local_140;
  undefined4 local_138;
  undefined1 local_128 [24];
  undefined1 local_110 [24];
  undefined4 local_f8;
  undefined1 *local_f0;
  undefined4 local_e8;
  undefined8 local_e0;
  undefined1 *local_d8;
  undefined8 *local_c8;
  IID local_c0;
  undefined8 local_a8;
  IID local_90;
  undefined8 *local_78;
  ulonglong local_70;
  undefined1 local_60;
  longlong local_58;
  undefined4 local_50;
  undefined8 local_48;
  undefined8 local_40;
  ulonglong local_38;
  
  local_a8 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_198;
  uVar10 = 0;
  local_150 = (longlong *)0x0;
  local_c8 = param_1;
  iVar4 = FUN_140001970(&local_150);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_148 = (IUnknown *)0x0;
  local_140 = (longlong *)0x0;
  Ordinal_8(local_128);
  Ordinal_8(local_110);
  pIVar1 = local_148;
  if ((local_148 != (IUnknown *)0x0) && (local_148 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_d8 = &DAT_140281f00;
  local_f0 = &DAT_140281f00;
  local_e8 = 0;
  local_e0 = 0;
  if (local_148 != (IUnknown *)0x0) {
    (*local_148->lpVtbl->Release)(local_148);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           (LPVOID *)&local_158);
  if (HVar5 < 0) {
LAB_14009d678:
    local_148 = (IUnknown *)0x0;
  }
  else {
    HVar5 = OleRun((LPUNKNOWN)CONCAT44(uStack_154,local_158));
    if (-1 < HVar5) {
      HVar5 = (*(code *)**(undefined8 **)CONCAT44(uStack_154,local_158))
                        ((undefined8 *)CONCAT44(uStack_154,local_158),&DAT_140281f68,&local_148);
    }
    (**(code **)(*(longlong *)CONCAT44(uStack_154,local_158) + 0x10))();
    if (HVar5 < 0) goto LAB_14009d678;
  }
  local_f8 = 2;
  local_138 = 1;
  local_168[0] = '\x01';
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_164 = 0;
    UVar6 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_164 != 0) goto LAB_14009d809;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_148;
    if (local_148 != (IUnknown *)0x0) {
      local_164 = 0;
      UVar6 = (*local_148->lpVtbl[0x12].AddRef)(local_148);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_148;
      if (local_164 != 0) {
        if (local_148 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar6 = (*local_148->lpVtbl[10].Release)(local_148);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_148 != (IUnknown *)0x0) {
        (*local_148->lpVtbl->Release)(local_148);
        local_148 = (IUnknown *)0x0;
      }
    }
    local_e0 = 0;
    local_d8 = &DAT_140281f00;
    local_f0 = &DAT_140281f00;
    local_e8 = 0;
    local_f8 = 0;
    Ordinal_9(local_110);
    Ordinal_9(local_128);
    if (local_140 != (longlong *)0x0) {
      (**(code **)(*local_140 + 0x10))();
    }
    if (local_148 != (IUnknown *)0x0) {
      (*local_148->lpVtbl->Release)(local_148);
    }
    if (local_150 != (longlong *)0x0) {
      (**(code **)(*local_150 + 0x10))();
    }
    return 0;
  }
LAB_14009d809:
  puVar13 = &DAT_14028c250;
  lVar12 = 0x28;
  do {
    lVar7 = lVar12 / 2;
    if (puVar13[lVar7] < 0xb) {
      puVar13 = puVar13 + lVar7 + 1;
      lVar7 = lVar12 + (-1 - lVar7);
    }
    lVar12 = lVar7;
  } while (0 < lVar7);
  if (puVar13 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar13 = (ulonglong *)&UNK_14028c388;
  }
  local_70 = *puVar13;
  local_78 = (undefined8 *)0x0;
  local_60 = 0;
  local_58 = 0;
  local_50 = 0x3f800000;
  local_48 = 0;
  local_40 = 0;
  local_164 = 0;
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_158);
  FUN_140001710(&local_150,*puVar8,"dbo.up_read_dungeon_rank_statistics");
  if ((longlong *)CONCAT44(uStack_154,local_158) != (longlong *)0x0) {
    (**(code **)(*(longlong *)CONCAT44(uStack_154,local_158) + 0x10))();
  }
  puVar8 = (undefined8 *)FUN_1400016d0(&local_150,&local_158);
  This = local_148;
  pIVar1 = (IUnknown *)*puVar8;
  if (local_148 != pIVar1) {
    local_148 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if ((longlong *)CONCAT44(uStack_154,local_158) != (longlong *)0x0) {
    (**(code **)(*(longlong *)CONCAT44(uStack_154,local_158) + 0x10))();
  }
  pIVar1 = local_148;
  if (local_148 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_160 = 0;
  UVar6 = (*local_148->lpVtbl[6].Release)(local_148);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f28);
  }
  uVar14 = 1;
  if (local_160 != -1) {
    while( true ) {
      pIVar1 = local_148;
      if (local_148 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_160 = 0;
      UVar6 = (*local_148->lpVtbl[6].Release)(local_148);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_160 == -1) break;
      uVar9 = FUN_140002290(&local_148,&local_90,"world_id",local_168);
      FUN_140182560(uVar9);
      iVar4 = FUN_140062550(uVar9);
      Ordinal_9(&local_90);
      uVar9 = FUN_140002290(&local_148,&local_c0,"difficulty",local_168);
      FUN_140182560(uVar9);
      FUN_140062550(uVar9);
      Ordinal_9(&local_c0);
      uVar9 = FUN_140002290(&local_148,&local_c0,"rank_normal",local_168);
      FUN_140182560(uVar9);
      FUN_140062550(uVar9);
      Ordinal_9(&local_c0);
      uVar9 = FUN_140002290(&local_148,&local_c0,"rank_hard",local_168);
      FUN_140182560(uVar9);
      FUN_140062550(uVar9);
      Ordinal_9(&local_c0);
      ppvObject = "rank_veryhard";
      riid = &local_c0;
      uVar9 = FUN_140002290(&local_148,riid,"rank_veryhard",local_168);
      FUN_140182560(uVar9);
      FUN_140062550(uVar9);
      Ordinal_9(&local_c0);
      if (0 < iVar4) {
        if (local_58 != 0) {
          riid = (IID *)((ulonglong)(longlong)iVar4 % local_70);
          for (puVar8 = (undefined8 *)local_78[(longlong)riid]; puVar8 != (undefined8 *)0x0;
              puVar8 = (undefined8 *)*puVar8) {
            if (iVar4 == *(int *)(puVar8 + 1)) {
              if (puVar8 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar8 + 0xc) = *(int *)((longlong)puVar8 + 0xc) + 1;
                goto LAB_14009dbae;
              }
              break;
            }
          }
        }
        uStack_154 = 1;
        ppvObject = (char *)&local_158;
        local_158 = iVar4;
        if (local_58 == 0) {
          riid = &local_90;
          FUN_14009ebc0(&local_78);
        }
        else {
          riid = &local_c0;
          FUN_14009ea40(&local_78,riid,ppvObject,&local_158);
        }
      }
LAB_14009dbae:
      pIVar1 = local_148;
      local_164 = (int)uVar10 + 1;
      uVar10 = (ulonglong)local_164;
      if (local_148 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar5 = (*local_148->lpVtbl[0xc].QueryInterface)(local_148,riid,(void **)ppvObject);
      if (HVar5 < 0) {
        _com_issue_errorex(HVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    uVar14 = 1;
    if (local_168[0] == '\0') {
      uVar14 = 0;
    }
  }
  FUN_140098ec0("Dungeon",&local_78);
  printf("Completed %s Report_Dungeon\n","Dungeon");
  printf("Total Dungeon Count : %d\n",uVar10);
  if (local_78 != (undefined8 *)0x0) {
    puVar8 = local_78 + local_70;
    for (puVar11 = local_78; puVar11 != puVar8; puVar11 = puVar11 + 1) {
      puVar2 = (undefined8 *)*puVar11;
      *puVar11 = 0;
      while (puVar2 != (undefined8 *)0x0) {
        puVar3 = (undefined8 *)*puVar2;
        operator_delete(puVar2);
        puVar2 = puVar3;
      }
    }
    operator_delete(local_78);
    local_78 = (undefined8 *)0x0;
  }
  pIVar1 = local_148;
  if (local_148 != (IUnknown *)0x0) {
    local_164 = 0;
    UVar6 = (*local_148->lpVtbl[0x12].AddRef)(local_148);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f28);
    }
    pIVar1 = local_148;
    if (local_164 != 0) {
      if (local_148 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar6 = (*local_148->lpVtbl[10].Release)(local_148);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_148 != (IUnknown *)0x0) {
      (*local_148->lpVtbl->Release)(local_148);
      local_148 = (IUnknown *)0x0;
    }
  }
  local_e0 = 0;
  local_d8 = &DAT_140281f00;
  local_f0 = &DAT_140281f00;
  local_e8 = 0;
  local_f8 = 0;
  Ordinal_9(local_110);
  Ordinal_9(local_128);
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  if (local_148 != (IUnknown *)0x0) {
    (*local_148->lpVtbl->Release)(local_148);
  }
  if (local_150 != (longlong *)0x0) {
    (**(code **)(*local_150 + 0x10))();
  }
  return uVar14;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

bool FUN_14009dde0(undefined8 *param_1,undefined8 param_2)

{
  longlong *plVar1;
  IUnknown *pIVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  IUnknown *This;
  int iVar5;
  HRESULT HVar6;
  ULONG UVar7;
  int iVar8;
  int iVar9;
  int iVar10;
  longlong lVar11;
  undefined8 *puVar12;
  undefined8 uVar13;
  IID *riid;
  longlong *plVar14;
  undefined8 *puVar15;
  longlong lVar16;
  char *ppvObject;
  ulonglong *puVar17;
  ulonglong *puVar18;
  ulonglong uVar19;
  bool bVar20;
  undefined1 auStackY_248 [32];
  char local_218 [4];
  uint local_214;
  short local_210;
  int local_208;
  undefined4 uStack_204;
  longlong *local_200;
  int local_1f8;
  undefined4 local_1f4;
  int local_1f0;
  undefined4 local_1ec;
  int local_1e8;
  undefined4 local_1e4;
  IUnknown *local_1d8;
  longlong *local_1d0;
  undefined4 local_1c8;
  undefined1 local_1b8 [24];
  undefined1 local_1a0 [24];
  undefined4 local_188;
  undefined1 *local_180;
  undefined4 local_178;
  undefined8 local_170;
  undefined1 *local_168;
  undefined8 *local_158;
  IID local_150;
  IID local_138;
  undefined8 local_120;
  IID local_108;
  IID local_f0;
  IID local_d8 [2];
  longlong *local_b8;
  ulonglong local_b0;
  undefined1 local_a0;
  longlong local_98;
  undefined4 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined8 *local_78;
  ulonglong local_70;
  undefined1 local_60;
  longlong local_58;
  undefined4 local_50;
  undefined8 local_48;
  undefined8 local_40;
  ulonglong local_38;
  
  local_120 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_248;
  uVar19 = 0;
  local_200 = (longlong *)0x0;
  local_158 = param_1;
  iVar5 = FUN_140001970(&local_200);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_1d8 = (IUnknown *)0x0;
  local_1d0 = (longlong *)0x0;
  Ordinal_8(local_1b8);
  Ordinal_8(local_1a0);
  pIVar2 = local_1d8;
  if ((local_1d8 != (IUnknown *)0x0) && (local_1d8 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_168 = &DAT_140281f00;
  local_180 = &DAT_140281f00;
  local_178 = 0;
  local_170 = 0;
  if (local_1d8 != (IUnknown *)0x0) {
    (*local_1d8->lpVtbl->Release)(local_1d8);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           (LPVOID *)&local_208);
  if (HVar6 < 0) {
LAB_14009df2e:
    local_1d8 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun((LPUNKNOWN)CONCAT44(uStack_204,local_208));
    if (-1 < HVar6) {
      HVar6 = (*(code *)**(undefined8 **)CONCAT44(uStack_204,local_208))
                        ((undefined8 *)CONCAT44(uStack_204,local_208),&DAT_140281f68,&local_1d8);
    }
    (**(code **)(*(longlong *)CONCAT44(uStack_204,local_208) + 0x10))();
    if (HVar6 < 0) goto LAB_14009df2e;
  }
  local_188 = 2;
  bVar20 = true;
  local_1c8 = 1;
  local_218[0] = '\x01';
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_214 = 0;
    UVar7 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_214 != 0) goto LAB_14009e0c5;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_1d8;
    if (local_1d8 != (IUnknown *)0x0) {
      local_214 = 0;
      UVar7 = (*local_1d8->lpVtbl[0x12].AddRef)(local_1d8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_1d8;
      if (local_214 != 0) {
        if (local_1d8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar7 = (*local_1d8->lpVtbl[10].Release)(local_1d8);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_1d8 != (IUnknown *)0x0) {
        (*local_1d8->lpVtbl->Release)(local_1d8);
        local_1d8 = (IUnknown *)0x0;
      }
    }
    local_170 = 0;
    local_168 = &DAT_140281f00;
    local_180 = &DAT_140281f00;
    local_178 = 0;
    local_188 = 0;
    Ordinal_9(local_1a0);
    Ordinal_9(local_1b8);
    if (local_1d0 != (longlong *)0x0) {
      (**(code **)(*local_1d0 + 0x10))();
    }
    if (local_1d8 != (IUnknown *)0x0) {
      (*local_1d8->lpVtbl->Release)(local_1d8);
    }
    if (local_200 != (longlong *)0x0) {
      (**(code **)(*local_200 + 0x10))();
    }
    return false;
  }
LAB_14009e0c5:
  puVar18 = &DAT_14028c250;
  puVar17 = &DAT_14028c250;
  lVar16 = 0x28;
  do {
    lVar11 = lVar16 / 2;
    if (puVar17[lVar11] < 0xb) {
      puVar17 = puVar17 + lVar11 + 1;
      lVar11 = lVar16 + (-1 - lVar11);
    }
    lVar16 = lVar11;
  } while (0 < lVar11);
  if (puVar17 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar17 = (ulonglong *)&UNK_14028c388;
  }
  local_70 = *puVar17;
  local_78 = (undefined8 *)0x0;
  local_60 = 0;
  local_58 = 0;
  local_50 = 0x3f800000;
  local_48 = 0;
  local_40 = 0;
  lVar16 = 0x28;
  do {
    lVar11 = lVar16 / 2;
    if (puVar18[lVar11] < 0xb) {
      puVar18 = puVar18 + lVar11 + 1;
      lVar11 = lVar16 + (-1 - lVar11);
    }
    lVar16 = lVar11;
  } while (0 < lVar11);
  if (puVar18 == (ulonglong *)"dbo.up_read_realtimeevent") {
    puVar18 = (ulonglong *)&UNK_14028c388;
  }
  local_b0 = *puVar18;
  local_b8 = (longlong *)0x0;
  local_a0 = 0;
  local_98 = 0;
  local_90 = 0x3f800000;
  local_88 = 0;
  local_80 = 0;
  local_214 = 0;
  puVar12 = (undefined8 *)FUN_140001f20(*param_1,&local_208);
  FUN_140001710(&local_200,*puVar12,"dbo.up_read_cash_product_list_statistics");
  if ((longlong *)CONCAT44(uStack_204,local_208) != (longlong *)0x0) {
    (**(code **)(*(longlong *)CONCAT44(uStack_204,local_208) + 0x10))();
  }
  puVar12 = (undefined8 *)FUN_1400016d0(&local_200,&local_208);
  This = local_1d8;
  pIVar2 = (IUnknown *)*puVar12;
  if (local_1d8 != pIVar2) {
    local_1d8 = pIVar2;
    if (pIVar2 != (IUnknown *)0x0) {
      (*pIVar2->lpVtbl->AddRef)(pIVar2);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if ((longlong *)CONCAT44(uStack_204,local_208) != (longlong *)0x0) {
    (**(code **)(*(longlong *)CONCAT44(uStack_204,local_208) + 0x10))();
  }
  pIVar2 = local_1d8;
  if (local_1d8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_210 = 0;
  UVar7 = (*local_1d8->lpVtbl[6].Release)(local_1d8);
  if ((int)UVar7 < 0) {
    _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
  }
  if (local_210 != -1) {
    while( true ) {
      pIVar2 = local_1d8;
      if (local_1d8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_210 = 0;
      UVar7 = (*local_1d8->lpVtbl[6].Release)(local_1d8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_210 == -1) break;
      uVar13 = FUN_140002290(&local_1d8,&local_f0,"CashCode",local_218);
      FUN_140182560(uVar13);
      iVar5 = FUN_140062550(uVar13);
      Ordinal_9(&local_f0);
      uVar13 = FUN_140002290(&local_1d8,&local_150,"State",local_218);
      FUN_140182560(uVar13);
      FUN_140062550(uVar13);
      Ordinal_9(&local_150);
      uVar13 = FUN_140002290(&local_1d8,&local_150,"AddOpt1",local_218);
      FUN_140182560(uVar13);
      iVar8 = FUN_140062550(uVar13);
      Ordinal_9(&local_150);
      uVar13 = FUN_140002290(&local_1d8,&local_108,"AddOpt2",local_218);
      FUN_140182560(uVar13);
      iVar9 = FUN_140062550(uVar13);
      Ordinal_9(&local_108);
      ppvObject = "AddOpt3";
      riid = local_d8;
      uVar13 = FUN_140002290(&local_1d8,riid,"AddOpt3",local_218);
      FUN_140182560(uVar13);
      iVar10 = FUN_140062550(uVar13);
      Ordinal_9(local_d8);
      if (0 < iVar5) {
        if (local_58 != 0) {
          riid = (IID *)((ulonglong)(longlong)iVar5 % local_70);
          for (puVar12 = (undefined8 *)local_78[(longlong)riid]; puVar12 != (undefined8 *)0x0;
              puVar12 = (undefined8 *)*puVar12) {
            if (iVar5 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009e4e4;
              }
              break;
            }
          }
        }
        local_1ec = 1;
        ppvObject = (char *)&local_1f0;
        local_1f0 = iVar5;
        if (local_58 == 0) {
          riid = &local_138;
          FUN_14009ebc0(&local_78);
        }
        else {
          riid = &local_f0;
          FUN_14009ea40(&local_78,riid,ppvObject,&local_1f0);
        }
      }
LAB_14009e4e4:
      if (0 < iVar8) {
        if (local_98 != 0) {
          riid = (IID *)((ulonglong)(longlong)iVar8 % local_b0);
          for (puVar12 = (undefined8 *)local_b8[(longlong)riid]; puVar12 != (undefined8 *)0x0;
              puVar12 = (undefined8 *)*puVar12) {
            if (iVar8 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009e56f;
              }
              break;
            }
          }
        }
        local_1f4 = 1;
        ppvObject = (char *)&local_1f8;
        local_1f8 = iVar8;
        if (local_98 == 0) {
          riid = &local_150;
          FUN_14009ebc0(&local_b8);
        }
        else {
          riid = &local_138;
          FUN_14009ea40(&local_b8,riid,ppvObject,&local_1f8);
        }
      }
LAB_14009e56f:
      if (0 < iVar9) {
        if (local_98 != 0) {
          riid = (IID *)((ulonglong)(longlong)iVar9 % local_b0);
          for (puVar12 = (undefined8 *)local_b8[(longlong)riid]; puVar12 != (undefined8 *)0x0;
              puVar12 = (undefined8 *)*puVar12) {
            if (iVar9 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009e5ff;
              }
              break;
            }
          }
        }
        local_1e4 = 1;
        ppvObject = (char *)&local_1e8;
        local_1e8 = iVar9;
        if (local_98 == 0) {
          riid = &local_108;
          FUN_14009ebc0(&local_b8);
        }
        else {
          riid = &local_138;
          FUN_14009ea40(&local_b8,riid,ppvObject,&local_1e8);
        }
      }
LAB_14009e5ff:
      if (0 < iVar10) {
        if (local_98 != 0) {
          riid = (IID *)((ulonglong)(longlong)iVar10 % local_b0);
          for (puVar12 = (undefined8 *)local_b8[(longlong)riid]; puVar12 != (undefined8 *)0x0;
              puVar12 = (undefined8 *)*puVar12) {
            if (iVar10 == *(int *)(puVar12 + 1)) {
              if (puVar12 != (undefined8 *)0x0) {
                *(int *)((longlong)puVar12 + 0xc) = *(int *)((longlong)puVar12 + 0xc) + 1;
                goto LAB_14009e68d;
              }
              break;
            }
          }
        }
        uStack_204 = 1;
        ppvObject = (char *)&local_208;
        local_208 = iVar10;
        if (local_98 == 0) {
          riid = local_d8;
          FUN_14009ebc0(&local_b8);
        }
        else {
          riid = &local_138;
          FUN_14009ea40(&local_b8,riid,ppvObject,&local_208);
        }
      }
LAB_14009e68d:
      pIVar2 = local_1d8;
      local_214 = (int)uVar19 + 1;
      uVar19 = (ulonglong)local_214;
      if (local_1d8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar6 = (*local_1d8->lpVtbl[0xc].QueryInterface)(local_1d8,riid,(void **)ppvObject);
      if (HVar6 < 0) {
        _com_issue_errorex(HVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    bVar20 = local_218[0] != '\0';
  }
  FUN_140098ec0("CashCode",&local_78);
  printf("Completed %s Report_CashCode\n","CashCode");
  FUN_140098ec0("CashOption",&local_b8);
  printf("Completed %s Report_CashOption\n","CashOption");
  printf("Total CashCode Count : %d\n",uVar19);
  if (local_b8 != (longlong *)0x0) {
    plVar1 = local_b8 + local_b0;
    for (plVar14 = local_b8; plVar14 != plVar1; plVar14 = plVar14 + 1) {
      puVar12 = (undefined8 *)*plVar14;
      *plVar14 = 0;
      while (puVar12 != (undefined8 *)0x0) {
        puVar15 = (undefined8 *)*puVar12;
        operator_delete(puVar12);
        puVar12 = puVar15;
      }
    }
    operator_delete(local_b8);
    local_b8 = (longlong *)0x0;
  }
  if (local_78 != (undefined8 *)0x0) {
    puVar12 = local_78 + local_70;
    for (puVar15 = local_78; puVar15 != puVar12; puVar15 = puVar15 + 1) {
      puVar3 = (undefined8 *)*puVar15;
      *puVar15 = 0;
      while (puVar3 != (undefined8 *)0x0) {
        puVar4 = (undefined8 *)*puVar3;
        operator_delete(puVar3);
        puVar3 = puVar4;
      }
    }
    operator_delete(local_78);
    local_78 = (undefined8 *)0x0;
  }
  pIVar2 = local_1d8;
  if (local_1d8 != (IUnknown *)0x0) {
    local_214 = 0;
    UVar7 = (*local_1d8->lpVtbl[0x12].AddRef)(local_1d8);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
    }
    pIVar2 = local_1d8;
    if (local_214 != 0) {
      if (local_1d8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar7 = (*local_1d8->lpVtbl[10].Release)(local_1d8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_1d8 != (IUnknown *)0x0) {
      (*local_1d8->lpVtbl->Release)(local_1d8);
      local_1d8 = (IUnknown *)0x0;
    }
  }
  local_170 = 0;
  local_168 = &DAT_140281f00;
  local_180 = &DAT_140281f00;
  local_178 = 0;
  local_188 = 0;
  Ordinal_9(local_1a0);
  Ordinal_9(local_1b8);
  if (local_1d0 != (longlong *)0x0) {
    (**(code **)(*local_1d0 + 0x10))();
  }
  if (local_1d8 != (IUnknown *)0x0) {
    (*local_1d8->lpVtbl->Release)(local_1d8);
  }
  if (local_200 != (longlong *)0x0) {
    (**(code **)(*local_200 + 0x10))();
  }
  return bVar20;
}



void FUN_14009e960(longlong *param_1)

{
  if (*param_1 != 0) {
    FUN_14009e9b0();
  }
  return;
}



void FUN_14009e980(char *param_1,size_t param_2,char *param_3,undefined8 param_4)

{
  undefined8 local_res20;
  
  local_res20 = param_4;
  _vsnprintf_s(param_1,0x104,param_2,param_3,(va_list)&local_res20);
  return;
}



void FUN_14009e9b0(undefined8 *param_1)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  
  puVar4 = (undefined8 *)*param_1;
  puVar1 = puVar4 + param_1[1];
  for (; puVar4 != puVar1; puVar4 = puVar4 + 1) {
    puVar2 = (undefined8 *)*puVar4;
    *puVar4 = 0;
    while (puVar2 != (undefined8 *)0x0) {
      puVar3 = (undefined8 *)*puVar2;
      operator_delete(puVar2);
      puVar2 = puVar3;
    }
  }
  operator_delete((void *)*param_1);
  *param_1 = 0;
  return;
}



undefined8 * FUN_14009ea40(longlong *param_1,undefined8 *param_2,int *param_3,undefined4 *param_4)

{
  int iVar1;
  char cVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  char *local_res8;
  undefined **local_38 [4];
  
  iVar1 = *param_3;
  puVar5 = (undefined8 *)(*param_1 + ((ulonglong)(longlong)iVar1 % (ulonglong)param_1[1]) * 8);
  puVar3 = (undefined8 *)*puVar5;
  do {
    if (puVar3 == (undefined8 *)0x0) {
LAB_14009eab4:
      puVar3 = operator_new(0x10);
      if (puVar3 != (undefined8 *)0x0) {
        *puVar3 = 0;
        puVar3[1] = puVar3;
        if (puVar3 + 1 != (undefined8 *)0x0) {
          *(undefined4 *)(puVar3 + 1) = *param_4;
          *(undefined4 *)((longlong)puVar3 + 0xc) = param_4[1];
        }
        cVar2 = FUN_14009f330(param_1);
        if (cVar2 != '\0') {
          puVar5 = (undefined8 *)
                   (*param_1 + ((ulonglong)(longlong)iVar1 % (ulonglong)param_1[1]) * 8);
        }
        *puVar3 = *puVar5;
        *puVar5 = puVar3;
        param_1[4] = param_1[4] + 1;
        puVar4 = (undefined8 *)param_1[6];
        if (puVar5 < (undefined8 *)param_1[6]) {
          puVar4 = puVar5;
        }
        param_1[6] = (longlong)puVar4;
        *param_2 = puVar5;
        param_2[1] = puVar3;
        *(undefined1 *)(param_2 + 2) = 1;
        return param_2;
      }
      local_res8 = (char *)0x0;
      std::exception::exception((exception *)local_38,&local_res8);
      local_38[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_38,(ThrowInfo *)&DAT_14031d988);
    }
    if (iVar1 == *(int *)(puVar3 + 1)) {
      if (puVar3 != (undefined8 *)0x0) {
        *param_2 = puVar5;
        param_2[1] = puVar3;
        *(undefined1 *)(param_2 + 2) = 0;
        return param_2;
      }
      goto LAB_14009eab4;
    }
    puVar3 = (undefined8 *)*puVar3;
  } while( true );
}



undefined8 * FUN_14009ebc0(longlong *param_1,undefined8 *param_2,int *param_3)

{
  int *piVar1;
  char **ppcVar2;
  undefined8 *puVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong lVar6;
  char **ppcVar7;
  char *local_res8;
  undefined **local_38 [4];
  
  puVar5 = operator_new(0x10);
  if (puVar5 != (undefined8 *)0x0) {
    *puVar5 = 0;
    puVar5[1] = puVar5;
    piVar1 = (int *)(puVar5 + 1);
    if (piVar1 != (int *)0x0) {
      *piVar1 = *param_3;
      *(int *)((longlong)puVar5 + 0xc) = param_3[1];
    }
    iVar4 = *piVar1;
    if (*param_1 == 0) {
      local_res8 = (char *)FUN_14009f3a0(param_1,1);
      ppcVar2 = (char **)(param_1 + 1);
      ppcVar7 = &local_res8;
      if (local_res8 <= *ppcVar2) {
        ppcVar7 = ppcVar2;
      }
      *ppcVar2 = *ppcVar7;
      FUN_14009f7b0(param_1);
      FUN_14009f8a0(param_1);
    }
    else if ((ulonglong)param_1[7] < 2) {
      local_res8 = (char *)(((ulonglong)param_1[4] >> 1) + param_1[4]);
      lVar6 = FUN_14009f3a0(param_1);
      if (lVar6 != param_1[1]) {
        FUN_14009f480(param_1);
      }
    }
    puVar3 = (undefined8 *)(*param_1 + ((ulonglong)(longlong)iVar4 % (ulonglong)param_1[1]) * 8);
    *puVar5 = *puVar3;
    *puVar3 = puVar5;
    param_1[4] = param_1[4] + 1;
    param_1[6] = (longlong)puVar3;
    *param_2 = puVar3;
    param_2[1] = puVar5;
    *(undefined1 *)(param_2 + 2) = 1;
    return param_2;
  }
  local_res8 = (char *)0x0;
  std::exception::exception((exception *)local_38,&local_res8);
  local_38[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_38,(ThrowInfo *)&DAT_14031d988);
}



undefined8 * FUN_14009ed70(longlong *param_1,undefined8 *param_2,int *param_3,undefined4 *param_4)

{
  int iVar1;
  char cVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  char *local_res8;
  undefined **local_38;
  undefined8 local_30;
  undefined8 local_28;
  
  iVar1 = *param_3;
  puVar5 = (undefined8 *)(*param_1 + ((ulonglong)(longlong)iVar1 % (ulonglong)param_1[1]) * 8);
  puVar3 = (undefined8 *)*puVar5;
  do {
    if (puVar3 == (undefined8 *)0x0) {
LAB_14009ede4:
      puVar3 = operator_new(0x18);
      if (puVar3 != (undefined8 *)0x0) {
        *puVar3 = 0;
        puVar3[1] = local_30;
        puVar3[2] = local_28;
        if (puVar3 + 1 != (undefined8 *)0x0) {
          *(undefined4 *)(puVar3 + 1) = *param_4;
          *(undefined8 *)((longlong)puVar3 + 0xc) = *(undefined8 *)(param_4 + 1);
        }
        cVar2 = FUN_14009f330(param_1);
        if (cVar2 != '\0') {
          puVar5 = (undefined8 *)
                   (*param_1 + ((ulonglong)(longlong)iVar1 % (ulonglong)param_1[1]) * 8);
        }
        *puVar3 = *puVar5;
        *puVar5 = puVar3;
        param_1[4] = param_1[4] + 1;
        puVar4 = (undefined8 *)param_1[6];
        if (puVar5 < (undefined8 *)param_1[6]) {
          puVar4 = puVar5;
        }
        param_1[6] = (longlong)puVar4;
        *param_2 = puVar5;
        param_2[1] = puVar3;
        *(undefined1 *)(param_2 + 2) = 1;
        return param_2;
      }
      local_res8 = (char *)0x0;
      std::exception::exception((exception *)&local_38,&local_res8);
      local_38 = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
      _CxxThrowException(&local_38,(ThrowInfo *)&DAT_14031d988);
    }
    if (iVar1 == *(int *)(puVar3 + 1)) {
      if (puVar3 != (undefined8 *)0x0) {
        *param_2 = puVar5;
        param_2[1] = puVar3;
        *(undefined1 *)(param_2 + 2) = 0;
        return param_2;
      }
      goto LAB_14009ede4;
    }
    puVar3 = (undefined8 *)*puVar3;
  } while( true );
}



undefined8 * FUN_14009ef00(longlong *param_1,undefined8 *param_2,int *param_3)

{
  int *piVar1;
  char **ppcVar2;
  undefined8 *puVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong lVar6;
  char **ppcVar7;
  char *local_res8;
  undefined **local_38;
  undefined8 local_30;
  undefined8 local_28;
  
  puVar5 = operator_new(0x18);
  if (puVar5 != (undefined8 *)0x0) {
    *puVar5 = 0;
    puVar5[1] = local_30;
    puVar5[2] = local_28;
    piVar1 = (int *)(puVar5 + 1);
    if (piVar1 != (int *)0x0) {
      *piVar1 = *param_3;
      *(undefined8 *)((longlong)puVar5 + 0xc) = *(undefined8 *)(param_3 + 1);
    }
    iVar4 = *piVar1;
    if (*param_1 == 0) {
      local_res8 = (char *)FUN_14009f3a0(param_1,1);
      ppcVar2 = (char **)(param_1 + 1);
      ppcVar7 = &local_res8;
      if (local_res8 <= *ppcVar2) {
        ppcVar7 = ppcVar2;
      }
      *ppcVar2 = *ppcVar7;
      FUN_14009f7b0(param_1);
      FUN_14009f8a0(param_1);
    }
    else if ((ulonglong)param_1[7] < 2) {
      local_res8 = (char *)(((ulonglong)param_1[4] >> 1) + param_1[4]);
      lVar6 = FUN_14009f3a0(param_1);
      if (lVar6 != param_1[1]) {
        FUN_14009f480(param_1);
      }
    }
    puVar3 = (undefined8 *)(*param_1 + ((ulonglong)(longlong)iVar4 % (ulonglong)param_1[1]) * 8);
    *puVar5 = *puVar3;
    *puVar3 = puVar5;
    param_1[4] = param_1[4] + 1;
    param_1[6] = (longlong)puVar3;
    *param_2 = puVar3;
    param_2[1] = puVar5;
    *(undefined1 *)(param_2 + 2) = 1;
    return param_2;
  }
  local_res8 = (char *)0x0;
  std::exception::exception((exception *)&local_38,&local_res8);
  local_38 = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
  _CxxThrowException(&local_38,(ThrowInfo *)&DAT_14031d988);
}



longlong * FUN_14009f0b0(longlong *param_1,longlong *param_2,int *param_3,undefined4 *param_4)

{
  int iVar1;
  undefined8 *puVar2;
  char cVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  longlong *local_30;
  undefined8 *local_28;
  undefined2 local_20;
  
  iVar1 = *param_3;
  puVar5 = (undefined8 *)(*param_1 + ((ulonglong)(longlong)iVar1 % (ulonglong)param_1[1]) * 8);
  puVar2 = (undefined8 *)*puVar5;
  do {
    if (puVar2 == (undefined8 *)0x0) {
LAB_14009f124:
      local_28 = (undefined8 *)0x0;
      local_20 = 0;
      local_30 = param_1;
      FUN_14009f6d0(&local_30);
      puVar2 = local_28;
      if (local_28 + 1 != (undefined8 *)0x0) {
        *(undefined4 *)(local_28 + 1) = *param_4;
        memcpy(local_28 + 2,param_4 + 2,0x58);
      }
      local_20 = CONCAT11(1,(undefined1)local_20);
      cVar3 = FUN_14009f330(param_1);
      if (cVar3 != '\0') {
        puVar5 = (undefined8 *)(*param_1 + ((ulonglong)(longlong)iVar1 % (ulonglong)param_1[1]) * 8)
        ;
      }
      *puVar2 = *puVar5;
      *puVar5 = puVar2;
      param_1[4] = param_1[4] + 1;
      puVar4 = (undefined8 *)param_1[6];
      if (puVar5 < (undefined8 *)param_1[6]) {
        puVar4 = puVar5;
      }
      param_1[6] = (longlong)puVar4;
      *param_2 = (longlong)puVar5;
      param_2[1] = (longlong)puVar2;
      *(undefined1 *)(param_2 + 2) = 1;
      return param_2;
    }
    if (iVar1 == *(int *)(puVar2 + 1)) {
      if (puVar2 != (undefined8 *)0x0) {
        *param_2 = (longlong)puVar5;
        param_2[1] = (longlong)puVar2;
        *(undefined1 *)(param_2 + 2) = 0;
        return param_2;
      }
      goto LAB_14009f124;
    }
    puVar2 = (undefined8 *)*puVar2;
  } while( true );
}



longlong * FUN_14009f1e0(longlong *param_1,longlong *param_2,int *param_3)

{
  int *piVar1;
  ulonglong *puVar2;
  undefined8 *puVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong lVar6;
  ulonglong *puVar7;
  ulonglong local_res8 [2];
  longlong *local_30;
  undefined8 *local_28;
  undefined2 local_20;
  
  local_28 = (undefined8 *)0x0;
  local_20 = 0;
  local_30 = param_1;
  FUN_14009f6d0(&local_30);
  puVar5 = local_28;
  piVar1 = (int *)(local_28 + 1);
  if (piVar1 != (int *)0x0) {
    *piVar1 = *param_3;
    memcpy(local_28 + 2,param_3 + 2,0x58);
  }
  local_20 = CONCAT11(1,(undefined1)local_20);
  iVar4 = *piVar1;
  if (*param_1 == 0) {
    local_res8[0] = FUN_14009f3a0(param_1,1);
    puVar2 = (ulonglong *)(param_1 + 1);
    puVar7 = local_res8;
    if (local_res8[0] <= *puVar2) {
      puVar7 = puVar2;
    }
    *puVar2 = *puVar7;
    FUN_14009f7b0(param_1);
    FUN_14009f8a0(param_1);
  }
  else {
    local_res8[1] = 1;
    if ((ulonglong)param_1[7] < 2) {
      local_res8[0] = ((ulonglong)param_1[4] >> 1) + param_1[4];
      lVar6 = FUN_14009f3a0(param_1);
      if (lVar6 != param_1[1]) {
        FUN_14009f480(param_1);
      }
    }
  }
  puVar3 = (undefined8 *)(*param_1 + ((ulonglong)(longlong)iVar4 % (ulonglong)param_1[1]) * 8);
  *puVar5 = *puVar3;
  *puVar3 = puVar5;
  param_1[4] = param_1[4] + 1;
  param_1[6] = (longlong)puVar3;
  *param_2 = (longlong)puVar3;
  param_2[1] = (longlong)puVar5;
  *(undefined1 *)(param_2 + 2) = 1;
  return param_2;
}



undefined8 FUN_14009f330(longlong param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong *puVar2;
  ulonglong local_res8;
  ulonglong local_res10 [3];
  
  local_res10[0] = param_2;
  if (*(ulonglong *)(param_1 + 0x38) <= param_2) {
    local_res8 = (*(ulonglong *)(param_1 + 0x20) >> 1) + *(ulonglong *)(param_1 + 0x20);
    puVar2 = &local_res8;
    if (local_res8 <= param_2) {
      puVar2 = local_res10;
    }
    lVar1 = FUN_14009f3a0(param_1,*puVar2);
    if (lVar1 != *(longlong *)(param_1 + 8)) {
      FUN_14009f480(param_1,lVar1);
      return 1;
    }
  }
  return 0;
}



undefined8 FUN_14009f3a0(longlong param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  char *pcVar4;
  double dVar5;
  
  dVar5 = (double)param_2;
  if (param_2 < 0) {
    dVar5 = dVar5 + 1.8446744073709552e+19;
  }
  dVar5 = floor(dVar5 / (double)*(float *)(param_1 + 0x28));
  if (dVar5 < 1.8446744073709552e+19) {
    lVar1 = 0;
    if ((9.223372036854776e+18 < dVar5) &&
       (dVar5 = dVar5 - 9.223372036854776e+18, dVar5 < 9.223372036854776e+18)) {
      lVar1 = -0x8000000000000000;
    }
    lVar1 = (longlong)dVar5 + lVar1;
  }
  else {
    lVar1 = -1;
  }
  pcVar4 = "\x05";
  lVar3 = 0x28;
  do {
    lVar2 = lVar3 / 2;
    if (*(ulonglong *)(pcVar4 + lVar2 * 8) < lVar1 + 1U) {
      pcVar4 = pcVar4 + (lVar2 + 1) * 8;
      lVar2 = lVar3 + (-1 - lVar2);
    }
    lVar3 = lVar2;
  } while (0 < lVar2);
  if (pcVar4 == "dbo.up_read_realtimeevent") {
    return 0xfffffffb;
  }
  return *(undefined8 *)pcVar4;
}



void FUN_14009f480(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong *plVar8;
  longlong lVar9;
  ulonglong uVar10;
  undefined8 *puVar11;
  longlong *plVar12;
  double dVar13;
  longlong *local_30;
  ulonglong local_28;
  
  lVar9 = param_1[4];
  lVar1 = param_1[1];
  lVar2 = *param_1;
  local_30 = (longlong *)0x0;
  local_28 = param_2;
  FUN_14009f7b0(&local_30,param_2,lVar1,param_4,0xfffffffffffffffe);
  lVar3 = param_1[1];
  puVar4 = (undefined8 *)*param_1;
  *param_1 = 0;
  param_1[1] = lVar3;
  param_1[4] = 0;
  for (plVar12 = (longlong *)param_1[6]; plVar12 != (longlong *)(lVar2 + lVar1 * 8);
      plVar12 = plVar12 + 1) {
    plVar8 = (longlong *)*plVar12;
    while (plVar8 != (longlong *)0x0) {
      uVar10 = (ulonglong)(longlong)(int)plVar8[1] % local_28;
      *plVar12 = *plVar8;
      *plVar8 = local_30[uVar10];
      local_30[uVar10] = (longlong)plVar8;
      plVar8 = (longlong *)*plVar12;
    }
  }
  param_1[4] = lVar9;
  plVar12 = (longlong *)*param_1;
  *param_1 = (longlong)local_30;
  uVar10 = param_1[1];
  param_1[1] = local_28;
  if (param_1[4] == 0) {
    param_1[6] = *param_1 + local_28 * 8;
  }
  else {
    plVar8 = (longlong *)*param_1;
    param_1[6] = (longlong)plVar8;
    lVar9 = *plVar8;
    while (lVar9 == 0) {
      plVar8 = plVar8 + 1;
      param_1[6] = (longlong)plVar8;
      lVar9 = *plVar8;
    }
  }
  dVar13 = (double)param_1[1];
  if (param_1[1] < 0) {
    dVar13 = dVar13 + 1.8446744073709552e+19;
  }
  local_30 = plVar12;
  local_28 = uVar10;
  dVar13 = ceil((double)*(float *)(param_1 + 5) * dVar13);
  lVar9 = -1;
  if (dVar13 < 1.8446744073709552e+19) {
    lVar9 = 0;
    if ((9.223372036854776e+18 < dVar13) &&
       (dVar13 = dVar13 - 9.223372036854776e+18, dVar13 < 9.223372036854776e+18)) {
      lVar9 = -0x8000000000000000;
    }
    lVar9 = (longlong)dVar13 + lVar9;
  }
  param_1[7] = lVar9;
  if (puVar4 != (undefined8 *)0x0) {
    for (puVar11 = puVar4; puVar11 != puVar4 + lVar3; puVar11 = puVar11 + 1) {
      puVar5 = (undefined8 *)*puVar11;
      *puVar11 = 0;
      while (puVar5 != (undefined8 *)0x0) {
        puVar6 = (undefined8 *)*puVar5;
        operator_delete(puVar5);
        puVar5 = puVar6;
      }
    }
    operator_delete(puVar4);
    uVar10 = local_28;
    plVar12 = local_30;
  }
  if (plVar12 != (longlong *)0x0) {
    plVar8 = plVar12 + uVar10;
    plVar7 = plVar12;
    for (; plVar12 != plVar8; plVar12 = plVar12 + 1) {
      puVar4 = (undefined8 *)*plVar12;
      *plVar12 = 0;
      while (puVar4 != (undefined8 *)0x0) {
        puVar11 = (undefined8 *)*puVar4;
        operator_delete(puVar4);
        puVar4 = puVar11;
      }
      plVar7 = local_30;
    }
    operator_delete(plVar7);
  }
  return;
}



void FUN_14009f6d0(longlong param_1)

{
  undefined8 *puVar1;
  char *local_res8 [4];
  undefined **local_98 [5];
  undefined8 uStack_70;
  undefined8 local_68;
  undefined8 uStack_60;
  undefined8 local_58;
  undefined8 uStack_50;
  undefined8 local_48;
  undefined8 uStack_40;
  undefined8 local_38;
  undefined8 uStack_30;
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  
  if (*(longlong *)(param_1 + 8) != 0) {
    *(undefined1 *)(param_1 + 0x11) = 0;
    return;
  }
  *(undefined2 *)(param_1 + 0x10) = 0;
  puVar1 = operator_new(0x68);
  if (puVar1 != (undefined8 *)0x0) {
    *(undefined8 **)(param_1 + 8) = puVar1;
    *puVar1 = 0;
    puVar1[1] = uStack_70;
    puVar1[2] = local_68;
    puVar1[3] = uStack_60;
    puVar1[4] = local_58;
    puVar1[5] = uStack_50;
    puVar1[6] = local_48;
    puVar1[7] = uStack_40;
    puVar1[8] = local_38;
    puVar1[9] = uStack_30;
    puVar1[10] = local_28;
    puVar1[0xb] = uStack_20;
    puVar1[0xc] = local_18;
    *(undefined1 *)(param_1 + 0x10) = 1;
    return;
  }
  local_res8[0] = (char *)0x0;
  std::exception::exception((exception *)local_98,local_res8);
  local_98[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_98,(ThrowInfo *)&DAT_14031d988);
}



void FUN_14009f7b0(undefined8 *param_1)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  ulonglong uVar3;
  char *local_res8;
  undefined **local_40 [3];
  undefined8 *local_28;
  undefined8 local_20;
  undefined8 local_18;
  ulonglong local_10;
  
  local_28 = param_1 + 2;
  puVar1 = (undefined8 *)0x0;
  local_18 = 0;
  local_20 = 0;
  uVar3 = param_1[1] + 1;
  if ((uVar3 != 0) &&
     ((local_10 = uVar3, 0x1fffffffffffffff < uVar3 ||
      (puVar1 = operator_new(uVar3 * 8), puVar1 == (undefined8 *)0x0)))) {
    local_res8 = (char *)0x0;
    std::exception::exception((exception *)local_40,&local_res8);
    local_40[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_40,(ThrowInfo *)&DAT_14031d988);
  }
  for (puVar2 = puVar1; puVar2 != puVar1 + uVar3; puVar2 = puVar2 + 1) {
    if (puVar2 != (undefined8 *)0x0) {
      *puVar2 = 0;
    }
  }
  puVar1[param_1[1]] = puVar1 + param_1[1];
  *param_1 = puVar1;
  return;
}



void FUN_14009f8a0(longlong *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  
  if (param_1[4] == 0) {
    param_1[6] = *param_1 + param_1[1] * 8;
  }
  else {
    plVar1 = (longlong *)*param_1;
    param_1[6] = (longlong)plVar1;
    if (*plVar1 == 0) {
      do {
        plVar1 = plVar1 + 1;
        param_1[6] = (longlong)plVar1;
      } while (*plVar1 == 0);
      lVar2 = FUN_14009f930(param_1);
      param_1[7] = lVar2;
      return;
    }
  }
  lVar2 = FUN_14009f930(param_1);
  param_1[7] = lVar2;
  return;
}



void FUN_14009f910(longlong param_1)

{
  if (*(void **)(param_1 + 8) != (void *)0x0) {
    operator_delete(*(void **)(param_1 + 8));
  }
  return;
}



longlong FUN_14009f930(longlong param_1)

{
  longlong lVar1;
  double dVar2;
  
  dVar2 = (double)*(longlong *)(param_1 + 8);
  if (*(longlong *)(param_1 + 8) < 0) {
    dVar2 = dVar2 + 1.8446744073709552e+19;
  }
  dVar2 = ceil((double)*(float *)(param_1 + 0x28) * dVar2);
  lVar1 = -1;
  if (dVar2 < 1.8446744073709552e+19) {
    lVar1 = 0;
    if ((9.223372036854776e+18 < dVar2) &&
       (dVar2 = dVar2 - 9.223372036854776e+18, dVar2 < 9.223372036854776e+18)) {
      lVar1 = -0x8000000000000000;
    }
    lVar1 = (longlong)dVar2 + lVar1;
  }
  return lVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

IID * FUN_14009f9b0(undefined8 *param_1,undefined8 param_2,longlong param_3)

{
  uchar *puVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  undefined2 uVar3;
  ULONG UVar4;
  int iVar5;
  HRESULT HVar6;
  ulong uVar7;
  undefined4 uVar8;
  undefined8 *puVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  longlong lVar12;
  void *_Dst;
  IID *riid;
  IID *pIVar13;
  IID *pIVar14;
  undefined1 auStackY_2a8 [32];
  char local_278 [4];
  uint local_274;
  IID *local_270;
  longlong *local_268;
  LPUNKNOWN local_260;
  undefined8 local_258;
  undefined8 *local_250;
  IUnknown *local_248;
  longlong *local_240;
  undefined4 local_238;
  undefined1 local_228 [24];
  undefined1 local_210 [24];
  undefined4 local_1f8;
  undefined1 *local_1f0;
  undefined4 local_1e8;
  undefined8 local_1e0;
  undefined1 *local_1d8;
  undefined8 local_1c8;
  undefined1 local_1c0;
  undefined8 local_1b8;
  undefined1 local_1b0;
  undefined8 local_1a8;
  undefined1 local_1a0;
  undefined8 local_198;
  undefined1 local_190;
  undefined1 local_188 [40];
  undefined8 local_160;
  IID local_158 [16];
  undefined2 local_52;
  ulonglong local_48;
  
  local_160 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStackY_2a8;
  pIVar2 = *(IUnknown **)*param_1;
  local_258 = param_2;
  local_250 = param_1;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_14009fa3f:
    iVar5 = FUN_1400a1e90(param_1);
    if (iVar5 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (IID *)0x0;
    }
  }
  else {
    local_274 = 0;
    UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_274 == 0) goto LAB_14009fa3f;
  }
  local_268 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_268);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_248 = (IUnknown *)0x0;
  local_240 = (longlong *)0x0;
  Ordinal_8(local_228);
  Ordinal_8(local_210);
  pIVar2 = local_248;
  if ((local_248 != (IUnknown *)0x0) && (local_248 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_1d8 = &DAT_140281f00;
  local_1f0 = &DAT_140281f00;
  local_1e8 = 0;
  local_1e0 = 0;
  if (local_248 != (IUnknown *)0x0) {
    (*local_248->lpVtbl->Release)(local_248);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_260);
  if (HVar6 < 0) {
LAB_14009fb64:
    local_248 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_260);
    if (-1 < HVar6) {
      HVar6 = (*local_260->lpVtbl->QueryInterface)(local_260,(IID *)&DAT_140281f68,&local_248);
    }
    (*local_260->lpVtbl->Release)(local_260);
    if (HVar6 < 0) goto LAB_14009fb64;
  }
  local_1f8 = 2;
  local_238 = 1;
  local_278[0] = '\x01';
  puVar9 = (undefined8 *)FUN_140001f20(*param_1,&local_270);
  FUN_140001710(&local_268,*puVar9,"dbo.up_read_realtimeevent");
  if (local_270 != (IID *)0x0) {
    (**(code **)(*(longlong *)local_270 + 0x10))();
  }
  puVar9 = (undefined8 *)FUN_1400016d0(&local_268,&local_270);
  This = local_248;
  pIVar2 = (IUnknown *)*puVar9;
  if (local_248 != pIVar2) {
    local_248 = pIVar2;
    if (pIVar2 != (IUnknown *)0x0) {
      (*pIVar2->lpVtbl->AddRef)(pIVar2);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_270 != (IID *)0x0) {
    (**(code **)(*(longlong *)local_270 + 0x10))();
  }
  pIVar2 = local_248;
  if (local_248 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_274 = local_274 & 0xffff0000;
  UVar4 = (*local_248->lpVtbl[6].Release)(local_248);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
  }
  if ((short)local_274 == -1) {
    uVar3 = 0x133;
  }
  else {
    while( true ) {
      pIVar2 = local_248;
      if (local_248 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_274 = local_274 & 0xffff0000;
      UVar4 = (*local_248->lpVtbl[6].Release)(local_248);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_274 == -1) break;
      local_158[0].Data1 = 0;
      local_158[0].Data2 = 0;
      local_158[0].Data3 = 0;
      memset(local_158[0].Data4,0,0x100);
      uVar10 = FUN_140002290(&local_248,local_188,&DAT_14028c3ac,local_278);
      FUN_140182560(uVar10);
      uVar7 = FUN_140062550(uVar10);
      local_158[0].Data1 = uVar7;
      Ordinal_9(local_188);
      uVar10 = FUN_140002290(&local_248,local_188,"value",local_278);
      FUN_140182560(uVar10);
      uVar8 = FUN_140062550(uVar10);
      local_158[0]._4_4_ = uVar8;
      Ordinal_9(local_188);
      uVar10 = FUN_140002290(&local_248,local_188,"information",local_278);
      FUN_140062840(uVar10,&local_270);
      FUN_1401568c0();
      pIVar14 = (IID *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pIVar14 = (IID *)0x0;
      }
      if (local_270 != (IID *)PTR_DAT_1403200a0) {
        uVar10 = FUN_1401568c0();
        local_1c0 = 0;
        local_1c8 = uVar10;
        FUN_140156b50(uVar10);
        local_1c0 = 1;
        if (((pIVar14 != (IID *)0x0) && (pIVar14 != (IID *)PTR_DAT_1403200a0)) &&
           (pIVar14[-1].Data4 != (uchar *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_190 = 0;
          local_198 = uVar11;
          FUN_140156b50(uVar11);
          local_190 = 1;
          puVar1 = pIVar14[-1].Data4 + 4;
          *(int *)puVar1 = *(int *)puVar1 + -1;
          if (*(int *)puVar1 == 0) {
            FUN_140156970(pIVar14[-1].Data4);
          }
          FUN_140156be0(uVar11);
          local_190 = 0;
        }
        pIVar14 = local_270;
        if (((local_270 != (IID *)PTR_DAT_1403200a0) && (local_270 != (IID *)0x0)) &&
           (local_270 != (IID *)0x8)) {
          *(int *)(local_270[-1].Data4 + 4) = *(int *)(local_270[-1].Data4 + 4) + 1;
        }
        FUN_140156be0(uVar10);
        local_1c0 = 0;
      }
      riid = pIVar14;
      if (pIVar14 == (IID *)0x0) {
        riid = (IID *)PTR_DAT_1403200a0;
      }
      wcsncpy((wchar_t *)local_158[0].Data4,(wchar_t *)riid,0x7f);
      if (((pIVar14 != (IID *)0x0) && (pIVar14 != (IID *)PTR_DAT_1403200a0)) &&
         (pIVar14[-1].Data4 != (uchar *)0x0)) {
        uVar10 = FUN_1401568c0();
        local_1b0 = 0;
        local_1b8 = uVar10;
        FUN_140156b50(uVar10);
        local_1b0 = 1;
        puVar1 = pIVar14[-1].Data4 + 4;
        *(int *)puVar1 = *(int *)puVar1 + -1;
        if (*(int *)puVar1 == 0) {
          FUN_140156970(pIVar14[-1].Data4);
        }
        FUN_140156be0(uVar10);
        local_1b0 = 0;
      }
      pIVar14 = local_270;
      if (((local_270 != (IID *)0x0) && (local_270 != (IID *)PTR_DAT_1403200a0)) &&
         (pIVar13 = local_270 + -1, pIVar13->Data4 != (uchar *)0x0)) {
        uVar10 = FUN_1401568c0();
        local_1a0 = 0;
        local_1a8 = uVar10;
        FUN_140156b50(uVar10);
        local_1a0 = 1;
        puVar1 = pIVar14[-1].Data4 + 4;
        *(int *)puVar1 = *(int *)puVar1 + -1;
        if (*(int *)puVar1 == 0) {
          FUN_140156970(pIVar13->Data4);
        }
        FUN_140156be0(uVar10);
        local_1a0 = 0;
      }
      local_270 = (IID *)PTR_DAT_1403200a0;
      Ordinal_9(local_188);
      local_52 = 0;
      pIVar14 = *(IID **)(param_3 + 0x16);
      if ((local_158 < pIVar14) && (*(IID **)(param_3 + 0xe) <= local_158)) {
        lVar12 = (longlong)local_158 - (longlong)*(IID **)(param_3 + 0xe);
        riid = SUB168(SEXT816(0xf83e0f83e0f83e1) * SEXT816(lVar12),8);
        if (pIVar14 == *(IID **)(param_3 + 0x1e)) {
          FUN_14004a7a0(param_3 + 0xe);
        }
        pIVar13 = (IID *)((lVar12 / 0x108) * 0x108 + *(longlong *)(param_3 + 0xe));
        _Dst = *(void **)(param_3 + 0x16);
        if (_Dst != (void *)0x0) {
LAB_14009fffd:
          pIVar14 = (IID *)0x108;
          memcpy(_Dst,pIVar13,0x108);
          riid = pIVar13;
        }
      }
      else {
        if (pIVar14 == *(IID **)(param_3 + 0x1e)) {
          FUN_14004a7a0(param_3 + 0xe);
        }
        _Dst = *(void **)(param_3 + 0x16);
        if (_Dst != (void *)0x0) {
          pIVar13 = local_158;
          goto LAB_14009fffd;
        }
      }
      pIVar2 = local_248;
      *(longlong *)(param_3 + 0x16) = *(longlong *)(param_3 + 0x16) + 0x108;
      if (local_248 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar6 = (*local_248->lpVtbl[0xc].QueryInterface)(local_248,riid,(void **)pIVar14);
      if (HVar6 < 0) {
        _com_issue_errorex(HVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    pIVar14 = (IID *)0x1;
    if (local_278[0] != '\0') goto LAB_1400a0069;
    uVar3 = 0x134;
  }
  *(undefined2 *)(param_3 + 0xc) = uVar3;
  pIVar14 = (IID *)0x0;
LAB_1400a0069:
  pIVar2 = local_248;
  if (local_248 != (IUnknown *)0x0) {
    local_274 = 0;
    UVar4 = (*local_248->lpVtbl[0x12].AddRef)(local_248);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
    }
    pIVar2 = local_248;
    if (local_274 != 0) {
      if (local_248 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*local_248->lpVtbl[10].Release)(local_248);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_248 != (IUnknown *)0x0) {
      (*local_248->lpVtbl->Release)(local_248);
      local_248 = (IUnknown *)0x0;
    }
  }
  local_1e0 = 0;
  local_1d8 = &DAT_140281f00;
  local_1f0 = &DAT_140281f00;
  local_1e8 = 0;
  local_1f8 = 0;
  Ordinal_9(local_210);
  Ordinal_9(local_228);
  if (local_240 != (longlong *)0x0) {
    (**(code **)(*local_240 + 0x10))();
  }
  if (local_248 != (IUnknown *)0x0) {
    (*local_248->lpVtbl->Release)(local_248);
  }
  if (local_268 != (longlong *)0x0) {
    (**(code **)(*local_268 + 0x10))();
  }
  return pIVar14;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

IID * FUN_1400a01b0(undefined8 *param_1,undefined8 param_2,longlong param_3)

{
  uchar *puVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  undefined8 uVar8;
  longlong lVar9;
  void *_Dst;
  IID *riid;
  IID *pIVar10;
  IID *pIVar11;
  undefined1 auStackY_228 [32];
  char local_1f8 [4];
  uint local_1f4;
  IID *local_1f0;
  longlong *local_1e8;
  LPUNKNOWN local_1e0;
  undefined8 local_1d8;
  undefined8 *local_1d0;
  IUnknown *local_1c8;
  longlong *local_1c0;
  undefined4 local_1b8;
  undefined1 local_1a8 [24];
  undefined1 local_190 [24];
  undefined4 local_178;
  undefined1 *local_170;
  undefined4 local_168;
  undefined8 local_160;
  undefined1 *local_158;
  undefined8 local_148;
  undefined1 local_140;
  undefined8 local_138;
  undefined1 local_130;
  undefined8 local_128;
  undefined1 local_120;
  undefined8 local_118;
  undefined1 local_110;
  undefined1 local_108 [40];
  undefined8 local_e0;
  IID local_d8 [8];
  undefined2 local_56;
  ulonglong local_48;
  
  local_e0 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStackY_228;
  pIVar2 = *(IUnknown **)*param_1;
  local_1d8 = param_2;
  local_1d0 = param_1;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_1400a023f:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (IID *)0x0;
    }
  }
  else {
    local_1f4 = 0;
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_1f4 == 0) goto LAB_1400a023f;
  }
  local_1e8 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_1e8);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_1c8 = (IUnknown *)0x0;
  local_1c0 = (longlong *)0x0;
  Ordinal_8(local_1a8);
  Ordinal_8(local_190);
  pIVar2 = local_1c8;
  if ((local_1c8 != (IUnknown *)0x0) && (local_1c8 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_158 = &DAT_140281f00;
  local_170 = &DAT_140281f00;
  local_168 = 0;
  local_160 = 0;
  if (local_1c8 != (IUnknown *)0x0) {
    (*local_1c8->lpVtbl->Release)(local_1c8);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_1e0);
  if (HVar5 < 0) {
LAB_1400a0364:
    local_1c8 = (IUnknown *)0x0;
  }
  else {
    HVar5 = OleRun(local_1e0);
    if (-1 < HVar5) {
      HVar5 = (*local_1e0->lpVtbl->QueryInterface)(local_1e0,(IID *)&DAT_140281f68,&local_1c8);
    }
    (*local_1e0->lpVtbl->Release)(local_1e0);
    if (HVar5 < 0) goto LAB_1400a0364;
  }
  local_178 = 2;
  local_1b8 = 1;
  local_1f8[0] = '\x01';
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_1f0);
  FUN_140001710(&local_1e8,*puVar6,"dbo.up_read_world_server");
  if (local_1f0 != (IID *)0x0) {
    (**(code **)(*(longlong *)local_1f0 + 0x10))();
  }
  puVar6 = (undefined8 *)FUN_1400016d0(&local_1e8,&local_1f0);
  This = local_1c8;
  pIVar2 = (IUnknown *)*puVar6;
  if (local_1c8 != pIVar2) {
    local_1c8 = pIVar2;
    if (pIVar2 != (IUnknown *)0x0) {
      (*pIVar2->lpVtbl->AddRef)(pIVar2);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_1f0 != (IID *)0x0) {
    (**(code **)(*(longlong *)local_1f0 + 0x10))();
  }
  pIVar2 = local_1c8;
  if (local_1c8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_1f4 = local_1f4 & 0xffff0000;
  UVar3 = (*local_1c8->lpVtbl[6].Release)(local_1c8);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f28);
  }
  if ((short)local_1f4 != -1) {
    while( true ) {
      pIVar2 = local_1c8;
      if (local_1c8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_1f4 = local_1f4 & 0xffff0000;
      UVar3 = (*local_1c8->lpVtbl[6].Release)(local_1c8);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_1f4 == -1) break;
      local_d8[0].Data1 = 0;
      memset(&local_d8[0].Data2,0,0x80);
      uVar7 = FUN_140002290(&local_1c8,local_108,"World",local_1f8);
      FUN_140182560(uVar7);
      local_d8[0].Data1 = FUN_140062550(uVar7);
      Ordinal_9(local_108);
      uVar7 = FUN_140002290(&local_1c8,local_108,&DAT_14028a330,local_1f8);
      FUN_140062840(uVar7,&local_1f0);
      FUN_1401568c0();
      pIVar11 = (IID *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pIVar11 = (IID *)0x0;
      }
      if (local_1f0 != (IID *)PTR_DAT_1403200a0) {
        uVar7 = FUN_1401568c0();
        local_140 = 0;
        local_148 = uVar7;
        FUN_140156b50(uVar7);
        local_140 = 1;
        if (((pIVar11 != (IID *)0x0) && (pIVar11 != (IID *)PTR_DAT_1403200a0)) &&
           (pIVar11[-1].Data4 != (uchar *)0x0)) {
          uVar8 = FUN_1401568c0();
          local_110 = 0;
          local_118 = uVar8;
          FUN_140156b50(uVar8);
          local_110 = 1;
          puVar1 = pIVar11[-1].Data4 + 4;
          *(int *)puVar1 = *(int *)puVar1 + -1;
          if (*(int *)puVar1 == 0) {
            FUN_140156970(pIVar11[-1].Data4);
          }
          FUN_140156be0(uVar8);
          local_110 = 0;
        }
        pIVar11 = local_1f0;
        if (((local_1f0 != (IID *)PTR_DAT_1403200a0) && (local_1f0 != (IID *)0x0)) &&
           (local_1f0 != (IID *)0x8)) {
          *(int *)(local_1f0[-1].Data4 + 4) = *(int *)(local_1f0[-1].Data4 + 4) + 1;
        }
        FUN_140156be0(uVar7);
        local_140 = 0;
      }
      riid = pIVar11;
      if (pIVar11 == (IID *)0x0) {
        riid = (IID *)PTR_DAT_1403200a0;
      }
      wcsncpy((wchar_t *)&local_d8[0].Data2,(wchar_t *)riid,0x3f);
      if (((pIVar11 != (IID *)0x0) && (pIVar11 != (IID *)PTR_DAT_1403200a0)) &&
         (pIVar11[-1].Data4 != (uchar *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_130 = 0;
        local_138 = uVar7;
        FUN_140156b50(uVar7);
        local_130 = 1;
        puVar1 = pIVar11[-1].Data4 + 4;
        *(int *)puVar1 = *(int *)puVar1 + -1;
        if (*(int *)puVar1 == 0) {
          FUN_140156970(pIVar11[-1].Data4);
        }
        FUN_140156be0(uVar7);
        local_130 = 0;
      }
      pIVar11 = local_1f0;
      if (((local_1f0 != (IID *)0x0) && (local_1f0 != (IID *)PTR_DAT_1403200a0)) &&
         (pIVar10 = local_1f0 + -1, pIVar10->Data4 != (uchar *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_120 = 0;
        local_128 = uVar7;
        FUN_140156b50(uVar7);
        local_120 = 1;
        puVar1 = pIVar11[-1].Data4 + 4;
        *(int *)puVar1 = *(int *)puVar1 + -1;
        if (*(int *)puVar1 == 0) {
          FUN_140156970(pIVar10->Data4);
        }
        FUN_140156be0(uVar7);
        local_120 = 0;
      }
      local_1f0 = (IID *)PTR_DAT_1403200a0;
      Ordinal_9(local_108);
      local_56 = 0;
      pIVar11 = *(IID **)(param_3 + 0x16);
      if ((local_d8 < pIVar11) && (*(IID **)(param_3 + 0xe) <= local_d8)) {
        lVar9 = (longlong)local_d8 - (longlong)*(IID **)(param_3 + 0xe);
        riid = SUB168(SEXT816(0xf83e0f83e0f83e1) * SEXT816(lVar9),8);
        if (pIVar11 == *(IID **)(param_3 + 0x1e)) {
          FUN_14004a860(param_3 + 0xe);
        }
        pIVar10 = (IID *)((lVar9 / 0x84) * 0x84 + *(longlong *)(param_3 + 0xe));
        _Dst = *(void **)(param_3 + 0x16);
        if (_Dst != (void *)0x0) {
LAB_1400a07b3:
          pIVar11 = (IID *)0x84;
          memcpy(_Dst,pIVar10,0x84);
          riid = pIVar10;
        }
      }
      else {
        if (pIVar11 == *(IID **)(param_3 + 0x1e)) {
          FUN_14004a860(param_3 + 0xe);
        }
        _Dst = *(void **)(param_3 + 0x16);
        if (_Dst != (void *)0x0) {
          pIVar10 = local_d8;
          goto LAB_1400a07b3;
        }
      }
      pIVar2 = local_1c8;
      *(longlong *)(param_3 + 0x16) = *(longlong *)(param_3 + 0x16) + 0x84;
      if (local_1c8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar5 = (*local_1c8->lpVtbl[0xc].QueryInterface)(local_1c8,riid,(void **)pIVar11);
      if (HVar5 < 0) {
        _com_issue_errorex(HVar5,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    pIVar11 = (IID *)0x1;
    if (local_1f8[0] != '\0') goto LAB_1400a0813;
  }
  *(undefined2 *)(param_3 + 0xc) = 0;
  pIVar11 = (IID *)0x0;
LAB_1400a0813:
  pIVar2 = local_1c8;
  if (local_1c8 != (IUnknown *)0x0) {
    local_1f4 = 0;
    UVar3 = (*local_1c8->lpVtbl[0x12].AddRef)(local_1c8);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f28);
    }
    pIVar2 = local_1c8;
    if (local_1f4 != 0) {
      if (local_1c8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*local_1c8->lpVtbl[10].Release)(local_1c8);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_1c8 != (IUnknown *)0x0) {
      (*local_1c8->lpVtbl->Release)(local_1c8);
      local_1c8 = (IUnknown *)0x0;
    }
  }
  local_160 = 0;
  local_158 = &DAT_140281f00;
  local_170 = &DAT_140281f00;
  local_168 = 0;
  local_178 = 0;
  Ordinal_9(local_190);
  Ordinal_9(local_1a8);
  if (local_1c0 != (longlong *)0x0) {
    (**(code **)(*local_1c0 + 0x10))();
  }
  if (local_1c8 != (IUnknown *)0x0) {
    (*local_1c8->lpVtbl->Release)(local_1c8);
  }
  if (local_1e8 != (longlong *)0x0) {
    (**(code **)(*local_1e8 + 0x10))();
  }
  return pIVar11;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1400a0950(char *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined1 auStackY_448 [32];
  char local_418 [1024];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStackY_448;
  local_res10 = param_2;
  local_res18 = param_3;
  local_res20 = param_4;
  _vsnprintf_s(local_418,0x400,0xffffffffffffffff,param_1,(va_list)&local_res10);
  OutputDebugStringA(local_418);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1400a09c0(wchar_t *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined1 auStack_438 [32];
  wchar_t local_418 [512];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_438;
  local_res10 = param_2;
  local_res18 = param_3;
  local_res20 = param_4;
  iVar1 = _vscwprintf(param_1,(va_list)&local_res10);
  vswprintf_s(local_418,(longlong)(iVar1 + 1),param_1,(va_list)&local_res10);
  OutputDebugStringW(local_418);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1400a0a40(char *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined1 auStackY_848 [32];
  char local_818 [2048];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStackY_848;
  local_res10 = param_2;
  local_res18 = param_3;
  local_res20 = param_4;
  iVar1 = _vscprintf(param_1,(va_list)&local_res10);
  _vsnprintf_s(local_818,0x800,(longlong)(iVar1 + 1),param_1,(va_list)&local_res10);
  OutputDebugStringA(local_818);
  return;
}



undefined8 * FUN_1400a0ac0(undefined8 *param_1)

{
  BOOL BVar1;
  DWORD DVar2;
  
  *param_1 = 0;
  strncpy((char *)(param_1 + 0x11),".\\Server_Log\\",0x80);
  BVar1 = CreateDirectoryA((LPCSTR)(param_1 + 0x11),(LPSECURITY_ATTRIBUTES)0x0);
  if (BVar1 == 0) {
    DVar2 = GetLastError();
    if (DVar2 != 0xb7) {
      printf("Couldn\'t create new svrlog directory[%u].\n");
    }
  }
  InitializeCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x21));
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1400a0b40(longlong *param_1,undefined8 param_2,char *param_3,undefined8 param_4)

{
  int iVar1;
  tm *_Tm;
  FILE *pFVar2;
  undefined8 local_res20;
  undefined1 auStack_cf8 [32];
  undefined8 local_cd8;
  __time64_t local_cc8 [2];
  char local_cb8;
  undefined1 local_cb7 [127];
  char local_c38;
  undefined1 local_c37 [127];
  char local_bb8;
  undefined1 local_bb7 [127];
  char local_b38;
  undefined1 local_b37 [1023];
  char local_738 [768];
  char local_438;
  undefined1 local_437 [1023];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_cf8;
  local_res20 = param_4;
  EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x21));
  local_438 = '\0';
  memset(local_437,0,0x3ff);
  local_c38 = '\0';
  memset(local_c37,0,0x7f);
  local_cb8 = '\0';
  memset(local_cb7,0,0x7f);
  local_bb8 = '\0';
  memset(local_bb7,0,0x7f);
  local_b38 = '\0';
  memset(local_b37,0,0x3ff);
  _time64(local_cc8);
  _Tm = _localtime64(local_cc8);
  strftime(&local_c38,0x80,"%Y%m%d",_Tm);
  local_cd8 = param_2;
  sprintf(&local_438,"%s[%s] %s");
  EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x21));
  EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x21));
  if ((FILE *)*param_1 != (FILE *)0x0) {
    fclose((FILE *)*param_1);
    *param_1 = 0;
  }
  LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x21));
  pFVar2 = fopen(&local_438,"at");
  *param_1 = (longlong)pFVar2;
  LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x21));
  if (*param_1 != 0) {
    _vsnprintf(&local_b38,0x400,param_3,(va_list)&local_res20);
    printf("%s\n");
    _strtime(&local_bb8);
    _strdate(&local_cb8);
    iVar1 = sprintf(local_738,"[%s %s]");
    sprintf(local_738 + iVar1,"%s");
    fprintf((FILE *)*param_1,"%s\r\n");
    EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x21));
    if ((FILE *)*param_1 != (FILE *)0x0) {
      fclose((FILE *)*param_1);
      *param_1 = 0;
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x21));
  }
  LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x21));
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1400a0da0(longlong param_1)

{
  PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo;
  DWORD DVar1;
  BOOL BVar2;
  uchar *puVar3;
  uchar *puVar4;
  HANDLE pvVar5;
  undefined1 auStack_168 [32];
  undefined8 local_148;
  undefined8 local_140;
  uchar local_128;
  undefined1 local_127 [271];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_168;
  DVar1 = GetCurrentProcessId();
  local_128 = '\0';
  *(DWORD *)(param_1 + 0x248) = DVar1;
  memset(local_127,0,0x103);
  DVar1 = GetModuleFileNameA((HMODULE)0x0,(LPSTR)&local_128,0x104);
  if (0 < (int)DVar1) {
    puVar3 = _mbsrchr(&local_128,0x5c);
    puVar4 = _mbsrchr(&local_128,0x2e);
    puVar4 = puVar4 + (-1 - (longlong)puVar3);
    if ((uchar *)0x104 < puVar4) {
      puVar4 = (uchar *)0x104;
    }
    memcpy((void *)(param_1 + 0x3c),puVar3 + 1,(size_t)puVar4);
    FUN_1400a0f90(param_1,param_1 + 0x3c);
    pvVar5 = GetStdHandle(0xfffffff5);
    *(HANDLE *)(param_1 + 8) = pvVar5;
    if (pvVar5 != (HANDLE)0xffffffffffffffff) {
      FUN_1400a0f00(param_1);
      pvVar5 = *(HANDLE *)(param_1 + 8);
      if (pvVar5 != (HANDLE)0xffffffffffffffff) {
        lpConsoleScreenBufferInfo = (PCONSOLE_SCREEN_BUFFER_INFO)(param_1 + 0x10);
        local_148 = 0;
        local_140 = 0;
        (lpConsoleScreenBufferInfo->dwSize).X = 0;
        (lpConsoleScreenBufferInfo->dwSize).Y = 0;
        (lpConsoleScreenBufferInfo->dwCursorPosition).X = 0;
        (lpConsoleScreenBufferInfo->dwCursorPosition).Y = 0;
        *(undefined8 *)(param_1 + 0x18) = 0;
        *(undefined4 *)(param_1 + 0x20) = 0;
        *(undefined2 *)(param_1 + 0x24) = 0;
        BVar2 = GetConsoleScreenBufferInfo(pvVar5,lpConsoleScreenBufferInfo);
        if (BVar2 != 0) {
          *(undefined2 *)(param_1 + 0x24c) = *(undefined2 *)(param_1 + 0x18);
        }
      }
      return 1;
    }
  }
  return 0;
}



BOOL FUN_1400a0f00(longlong param_1)

{
  BOOL BVar1;
  DWORD local_res10 [2];
  
  if (*(HANDLE *)(param_1 + 8) == (HANDLE)0xffffffffffffffff) {
    return 0;
  }
  BVar1 = GetConsoleScreenBufferInfo
                    (*(HANDLE *)(param_1 + 8),(PCONSOLE_SCREEN_BUFFER_INFO)(param_1 + 0x26));
  if (BVar1 == 0) {
    return 0;
  }
  FillConsoleOutputAttribute
            (*(HANDLE *)(param_1 + 8),*(ushort *)(param_1 + 0x2e) & 0xf | 0x10,
             (int)*(short *)(param_1 + 0x28) * (int)*(short *)(param_1 + 0x26),(COORD)0x0,
             local_res10);
  BVar1 = SetConsoleTextAttribute(*(HANDLE *)(param_1 + 8),0x17);
  return BVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1400a0f90(longlong param_1,longlong param_2)

{
  longlong lVar1;
  undefined1 auStack_148 [32];
  CHAR local_128;
  undefined1 local_127 [271];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_148;
  lVar1 = param_1 + 0x3c;
  if (param_2 != 0) {
    lVar1 = param_2;
  }
  FUN_1400a1400(param_1 + 0x141,"%s [%u]",lVar1,*(undefined4 *)(param_1 + 0x248));
  local_128 = '\0';
  memset(local_127,0,0x103);
  FUN_1400a13d0(&local_128,&DAT_14028c4d8,param_1 + 0x141);
  SetConsoleTitleA(&local_128);
  return;
}



undefined8 * FUN_1400a1030(undefined8 *param_1,byte param_2)

{
  DAT_14032f278 = 0;
  *param_1 = MBISingleton<>::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1400a1070(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined4 param_4)

{
  undefined1 auStack_1078 [32];
  undefined8 local_1058;
  undefined4 local_1050;
  undefined8 local_1048;
  wchar_t local_1038 [2048];
  ulonglong local_38;
  undefined8 uStack_28;
  
  uStack_28 = 0x1400a107f;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_1078;
  if (DAT_14032f258 != 0) {
    local_1058 = CONCAT44(local_1058._4_4_,param_4);
    FUN_140202de0(DAT_14032f258,L"Invalid parameter detected in function %s. File: %s Line: %d\n",
                  param_2,param_3);
    if (DAT_14032f258 != 0) {
      FUN_140202de0(DAT_14032f258,L"Expression: %s\n",param_1);
    }
  }
  local_1058 = param_3;
  local_1050 = param_4;
  local_1048 = param_1;
  swprintf_s(local_1038,0x800,
             L"Invalid parameter detected in function %s. File: %s Line: %u\nExpression: %s\n");
  uRam0000000000000000 = 1;
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe

undefined8 FUN_1400a1140(int param_1,longlong param_2)

{
  char cVar1;
  DWORD DVar2;
  _invalid_parameter_handler _Handler;
  HANDLE *ppvVar3;
  ulonglong uVar4;
  undefined4 local_res18 [2];
  undefined1 local_res20 [8];
  HANDLE local_2018;
  undefined1 local_2010 [8192];
  undefined8 uStack_10;
  
  uStack_10 = 0x1400a114c;
  DAT_14032f034 = timeGetTime();
  setlocale(0,(char *)0x0);
  printf("Locale is: %s\n");
  FUN_140148e40(local_res20);
  cVar1 = FUN_140148e80(local_res20);
  if (cVar1 != '\0') {
    FUN_1401496b0();
    FUN_1400a1320();
    FUN_1400a0da0(DAT_14032f278);
    if (1 < param_1) {
      PTR_s_option_dbc_serveroptionlog_xml_140325b48 = *(undefined **)(param_2 + 8);
    }
    local_2018 = (HANDLE)0x0;
    memset(local_2010,0,0x2000);
    DVar2 = GetProcessHeaps(0x400,&local_2018);
    if (DVar2 != 0) {
      ppvVar3 = &local_2018;
      uVar4 = (ulonglong)DVar2;
      do {
        local_res18[0] = 2;
        HeapSetInformation(*ppvVar3,HeapCompatibilityInformation,local_res18,4);
        ppvVar3 = ppvVar3 + 1;
        uVar4 = uVar4 - 1;
      } while (uVar4 != 0);
    }
    _Handler = _set_invalid_parameter_handler(FUN_1400a1070);
    _set_purecall_handler((_purecall_handler)&LAB_1400a1130);
    if ((DAT_140379240 & 1) == 0) {
      DAT_140379240 = DAT_140379240 | 1;
      FUN_1400435f0();
      atexit((_func_5014 *)&LAB_140257b80);
    }
    printf("----------------------------------------------------------------------------\n");
    printf(" DBC server has been initialized successfully.\n");
    printf("----------------------------------------------------------------------------\n");
    FUN_140043b00(DAT_14032f248);
    FUN_140044590(DAT_14032f248);
    FUN_1400440a0(DAT_14032f248);
    if (DAT_14032f278 != (undefined8 *)0x0) {
      (**(code **)*DAT_14032f278)(DAT_14032f278,1);
    }
    FUN_1401496e0();
    _set_invalid_parameter_handler(_Handler);
  }
  FUN_140148e50(local_res20);
  return 0;
}



void FUN_1400a1320(void)

{
  undefined8 *puVar1;
  
  puVar1 = operator_new(0x250);
  if (puVar1 != (undefined8 *)0x0) {
    puVar1[2] = 0;
    *(undefined8 *)((longlong)puVar1 + 0x26) = 0;
    puVar1[3] = 0;
    *(undefined8 *)((longlong)puVar1 + 0x2e) = 0;
    *(undefined4 *)(puVar1 + 4) = 0;
    *(undefined4 *)((longlong)puVar1 + 0x36) = 0;
    *(undefined2 *)((longlong)puVar1 + 0x24) = 0;
    *(undefined2 *)((longlong)puVar1 + 0x3a) = 0;
    *puVar1 = CConsoleControl::vftable;
    puVar1[1] = 0xffffffffffffffff;
    *(undefined4 *)(puVar1 + 0x49) = 0;
    memset((void *)((longlong)puVar1 + 0x3c),0,0x105);
    memset((void *)((longlong)puVar1 + 0x141),0,0x105);
    DAT_14032f278 = puVar1;
    *(undefined2 *)((longlong)puVar1 + 0x24c) = 0x17;
    return;
  }
  DAT_14032f278 = (undefined8 *)0x0;
  return;
}



void FUN_1400a13d0(char *param_1,char *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 local_res18;
  undefined8 local_res20;
  
  local_res18 = param_3;
  local_res20 = param_4;
  vsprintf_s(param_1,0x104,param_2,(va_list)&local_res18);
  return;
}



void FUN_1400a1400(char *param_1,char *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 local_res18;
  undefined8 local_res20;
  
  local_res18 = param_3;
  local_res20 = param_4;
  vsprintf_s(param_1,0x105,param_2,(va_list)&local_res18);
  return;
}



undefined8 FUN_1400a1430(longlong *param_1,ushort *param_2)

{
  ushort uVar1;
  ushort uVar2;
  bool bVar3;
  uint uVar4;
  int iVar5;
  char *pcVar6;
  int iVar7;
  
  EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 4));
  uVar1 = *param_2;
  iVar5 = (int)param_1[1];
  uVar2 = param_2[1];
  *(uint *)(param_1 + 9) = (uint)uVar1;
  uVar4 = iVar5 - *(int *)((longlong)param_1 + 0x14);
  if (uVar1 != uVar4 && (int)uVar4 <= (int)(uint)uVar1) {
    LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 4));
    return 0;
  }
  iVar7 = (int)param_1[2];
  if (iVar5 < (int)(iVar7 + (uint)uVar1)) {
    iVar5 = iVar5 - iVar7;
    *(int *)((longlong)param_1 + 0x4c) = iVar5;
    *(uint *)(param_1 + 10) = (uint)uVar1 - iVar5;
    memcpy((void *)((longlong)iVar7 + *param_1),param_2,(longlong)iVar5);
    memcpy((void *)*param_1,
           (void *)((longlong)*(int *)((longlong)param_1 + 0x4c) + (longlong)param_2),
           (longlong)(int)param_1[10]);
    *(int *)(param_1 + 2) = (int)param_1[10];
  }
  else {
    memcpy((void *)((longlong)iVar7 + *param_1),param_2,(ulonglong)uVar1);
    *(int *)(param_1 + 2) = (int)param_1[2] + (int)param_1[9];
    iVar5 = (int)param_1[2];
    if (iVar5 == (int)param_1[1]) {
      iVar5 = 0;
    }
    *(int *)(param_1 + 2) = iVar5;
  }
  *(int *)(param_1 + 3) = (int)param_1[3] + 1;
  *(int *)((longlong)param_1 + 0x14) = *(int *)((longlong)param_1 + 0x14) + (int)param_1[9];
  iVar5 = (int)param_1[3];
  if (uVar2 < 0x2329) {
    bVar3 = DAT_14032eff8 < iVar5;
    if (bVar3) {
      DAT_14032eff8 = iVar5;
    }
    iVar5 = *(int *)((longlong)param_1 + 0x14);
    if ((*(int *)((longlong)param_1 + 0x14) <= DAT_14032f000) && (iVar5 = DAT_14032f000, !bVar3))
    goto LAB_1400a159a;
    DAT_14032f000 = iVar5;
    pcVar6 = "Request Queue : Cur[%d] Max[%d]-Len[%d] MaxLen[%d]\n";
    iVar5 = DAT_14032f000;
    iVar7 = DAT_14032eff8;
  }
  else {
    bVar3 = DAT_14032effc < iVar5;
    if (bVar3) {
      DAT_14032effc = iVar5;
    }
    iVar5 = *(int *)((longlong)param_1 + 0x14);
    iVar7 = DAT_14032effc;
    if (DAT_14032f004 < iVar5) {
      pcVar6 = "Result  Queue : Cur[%d] Max[%d]-Len[%d] MaxLen[%d]\n";
      DAT_14032f004 = iVar5;
    }
    else {
      if (!bVar3) goto LAB_1400a159a;
      pcVar6 = "Result  Queue : Cur[%d] Max[%d]-Len[%d] MaxLen[%d]\n";
      iVar5 = DAT_14032f004;
    }
  }
  FUN_1400a0a40(pcVar6,(int)param_1[3],iVar7,*(undefined4 *)((longlong)param_1 + 0x14),iVar5);
LAB_1400a159a:
  LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 4));
  return 1;
}



undefined8 FUN_1400a15d0(undefined8 *param_1,void *param_2)

{
  int iVar1;
  undefined1 *puVar2;
  int iVar3;
  uint uVar4;
  undefined2 local_res8;
  
  EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 4));
  if (*(int *)((longlong)param_1 + 0x14) == 0) {
    LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 4));
    return 0;
  }
  iVar3 = *(int *)(param_1 + 1);
  iVar1 = *(int *)((longlong)param_1 + 0xc);
  puVar2 = (undefined1 *)*param_1;
  if (iVar1 == iVar3 + -1) {
    local_res8 = CONCAT11(*puVar2,puVar2[iVar1]);
  }
  else {
    local_res8 = *(ushort *)(puVar2 + iVar1);
  }
  iVar1 = *(int *)((longlong)param_1 + 0xc);
  uVar4 = (uint)local_res8;
  if (iVar3 < (int)((uint)local_res8 + iVar1)) {
    iVar3 = iVar3 - iVar1;
    *(int *)((longlong)param_1 + 0x4c) = iVar3;
    *(uint *)(param_1 + 10) = uVar4 - iVar3;
    memcpy(param_2,puVar2 + iVar1,(longlong)iVar3);
    memcpy((void *)((longlong)*(int *)((longlong)param_1 + 0x4c) + (longlong)param_2),
           (void *)*param_1,(longlong)*(int *)(param_1 + 10));
    *(undefined4 *)((longlong)param_1 + 0xc) = *(undefined4 *)(param_1 + 10);
  }
  else {
    memcpy(param_2,puVar2 + iVar1,(ulonglong)local_res8);
    *(int *)((longlong)param_1 + 0xc) = *(int *)((longlong)param_1 + 0xc) + uVar4;
    iVar3 = *(int *)((longlong)param_1 + 0xc);
    if (iVar3 == *(int *)(param_1 + 1)) {
      iVar3 = 0;
    }
    *(int *)((longlong)param_1 + 0xc) = iVar3;
  }
  *(int *)((longlong)param_1 + 0x14) = *(int *)((longlong)param_1 + 0x14) - uVar4;
  *(int *)(param_1 + 3) = *(int *)(param_1 + 3) + -1;
  LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 4));
  return 1;
}



void FUN_1400a16e0(undefined8 *param_1)

{
  *param_1 = CConfig::vftable;
  return;
}



undefined8 * FUN_1400a16f0(undefined8 *param_1,undefined8 param_2,undefined4 param_3)

{
  undefined8 uVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  
  FUN_140002560();
  *param_1 = CDBLobbyWriteCmdQueue::vftable;
  puVar3 = (undefined8 *)0x0;
  param_1[0x5b8e4] = 0;
  param_1[0x5b8e5] = param_2;
  puVar2 = operator_new(0x49510);
  if (puVar2 != (undefined8 *)0x0) {
    uVar1 = param_1[0x5b8e5];
    *puVar2 = 0;
    puVar2[0x21] = 500;
    puVar2[0x22] = uVar1;
    puVar2[0x23] = 0;
    memset(puVar2 + 1,0,0x100);
    FUN_1400a1870(puVar2,param_3);
    puVar3 = puVar2;
  }
  param_1[0x5b8e4] = puVar3;
  FUN_1400a1e90(puVar3);
  return param_1;
}



undefined8 * FUN_1400a17b0(undefined8 *param_1,uint param_2)

{
  void *pvVar1;
  
  *param_1 = CDBLobbyWriteCmdQueue::vftable;
  pvVar1 = (void *)param_1[0x5b8e4];
  if (pvVar1 != (void *)0x0) {
    FUN_1400a1cd0(pvVar1);
    operator_delete(pvVar1);
    param_1[0x5b8e4] = 0;
  }
  FUN_140002630(param_1);
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1400a1830(longlong param_1,longlong param_2)

{
  FUN_1400a4610(*(undefined8 *)(param_1 + 0x2dc720),*(undefined2 *)(param_2 + 2),param_2);
  return;
}



void FUN_1400a1850(longlong param_1)

{
  if (**(longlong **)(param_1 + 0x2dc720) != 0) {
    FUN_140001e90();
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1400a1870(undefined8 *param_1,int param_2)

{
  char cVar1;
  longlong lVar2;
  int iVar3;
  undefined8 uVar4;
  undefined8 *puVar5;
  void *pvVar6;
  ulonglong uVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong lVar10;
  undefined1 auStack_2e8 [32];
  undefined8 *local_2c8;
  undefined8 local_2c0;
  undefined **local_2b8;
  char local_2b0 [136];
  char local_228;
  undefined1 local_227 [255];
  CHAR local_128 [280];
  ulonglong local_10;
  
  local_2c0 = 0xfffffffffffffffe;
  local_10 = DAT_1403223c0 ^ (ulonglong)auStack_2e8;
  if (*(int *)((longlong)param_1 + 0x10c) != 1) {
    CoInitialize((LPVOID)0x0);
    local_2c8 = operator_new(0x78);
    uVar4 = 0;
    if (local_2c8 != (void *)0x0) {
      uVar4 = FUN_140002170(local_2c8);
    }
    param_1[0x24] = uVar4;
    puVar5 = operator_new(8);
    local_2c8 = puVar5;
    if (puVar5 == (undefined8 *)0x0) {
      puVar5 = (undefined8 *)0x0;
    }
    else {
      *puVar5 = 0;
      iVar3 = FUN_140001970(puVar5);
      if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar3);
      }
    }
    param_1[0x25] = puVar5;
    pvVar6 = operator_new(0x130);
    uVar4 = 0;
    if (pvVar6 != (void *)0x0) {
      uVar4 = FUN_1400a0ac0(pvVar6);
    }
    param_1[0x23] = uVar4;
    puVar5 = operator_new(0x20);
    if (puVar5 == (undefined8 *)0x0) {
      puVar5 = (undefined8 *)0x0;
    }
    else {
      *puVar5 = 0;
      puVar5[1] = &DAT_140281f00;
      puVar5[2] = &DAT_140281f00;
      *(undefined4 *)(puVar5 + 3) = 0;
      FUN_140001f70(puVar5);
    }
    *param_1 = puVar5;
    local_2b8 = CServerConfig::vftable;
    local_228 = '\0';
    memset(local_227,0,0xff);
    GetCurrentDirectoryA(0x104,local_128);
    sprintf(&local_228,"%s\\%s");
    strcpy_s(local_2b0,0x80,&local_228);
    lVar10 = DAT_14032f260;
    if (param_2 == 1) {
      plVar8 = (longlong *)(DAT_14032f260 + 0xb8);
      plVar9 = plVar8;
      if (0xf < *(ulonglong *)(DAT_14032f260 + 0xd0)) {
        plVar9 = (longlong *)*plVar8;
      }
      uVar7 = 0xffffffffffffffff;
      do {
        if (uVar7 == 0) break;
        uVar7 = uVar7 - 1;
        cVar1 = *(char *)plVar9;
        plVar9 = (longlong *)((longlong)plVar9 + 1);
      } while (cVar1 != '\0');
      if (~uVar7 - 1 < 0x100) {
        if (0xf < *(ulonglong *)(DAT_14032f260 + 0xd0)) {
          plVar8 = (longlong *)*plVar8;
        }
        lVar2 = 8 - (longlong)plVar8;
        do {
          cVar1 = *(char *)plVar8;
          *(char *)((longlong)plVar8 + (longlong)param_1 + lVar2) = cVar1;
          plVar8 = (longlong *)((longlong)plVar8 + 1);
        } while (cVar1 != '\0');
      }
      else {
        printf("Error Web String Max.!\n");
        lVar10 = DAT_14032f260;
      }
      *(undefined4 *)(param_1 + 0x21) = *(undefined4 *)(lVar10 + 0x134);
      printf("WEB : %s\n");
    }
    else if (param_2 == 2) {
      plVar8 = (longlong *)(DAT_14032f260 + 0x90);
      plVar9 = plVar8;
      if (0xf < *(ulonglong *)(DAT_14032f260 + 0xa8)) {
        plVar9 = (longlong *)*plVar8;
      }
      uVar7 = 0xffffffffffffffff;
      do {
        if (uVar7 == 0) break;
        uVar7 = uVar7 - 1;
        cVar1 = *(char *)plVar9;
        plVar9 = (longlong *)((longlong)plVar9 + 1);
      } while (cVar1 != '\0');
      if (~uVar7 - 1 < 0x100) {
        if (0xf < *(ulonglong *)(DAT_14032f260 + 0xa8)) {
          plVar8 = (longlong *)*plVar8;
        }
        lVar2 = 8 - (longlong)plVar8;
        do {
          cVar1 = *(char *)plVar8;
          *(char *)((longlong)plVar8 + (longlong)param_1 + lVar2) = cVar1;
          plVar8 = (longlong *)((longlong)plVar8 + 1);
        } while (cVar1 != '\0');
      }
      else {
        printf("Error Account String Max.!\n");
        lVar10 = DAT_14032f260;
      }
      *(undefined4 *)(param_1 + 0x21) = *(undefined4 *)(lVar10 + 0x134);
      printf("AUTH : %s\n");
    }
    else if (param_2 == 3) {
      plVar8 = (longlong *)(DAT_14032f260 + 0xe0);
      plVar9 = plVar8;
      if (0xf < *(ulonglong *)(DAT_14032f260 + 0xf8)) {
        plVar9 = (longlong *)*plVar8;
      }
      uVar7 = 0xffffffffffffffff;
      do {
        if (uVar7 == 0) break;
        uVar7 = uVar7 - 1;
        cVar1 = *(char *)plVar9;
        plVar9 = (longlong *)((longlong)plVar9 + 1);
      } while (cVar1 != '\0');
      if (~uVar7 - 1 < 0x100) {
        if (0xf < *(ulonglong *)(DAT_14032f260 + 0xf8)) {
          plVar8 = (longlong *)*plVar8;
        }
        lVar2 = 8 - (longlong)plVar8;
        do {
          cVar1 = *(char *)plVar8;
          *(char *)((longlong)plVar8 + (longlong)param_1 + lVar2) = cVar1;
          plVar8 = (longlong *)((longlong)plVar8 + 1);
        } while (cVar1 != '\0');
      }
      else {
        printf("Error Game String Max.!\n");
        lVar10 = DAT_14032f260;
      }
      *(undefined4 *)(param_1 + 0x21) = *(undefined4 *)(lVar10 + 0x138);
      printf("GAME : %s\n");
    }
    else if (param_2 == 4) {
      plVar8 = (longlong *)(DAT_14032f260 + 0x108);
      plVar9 = plVar8;
      if (0xf < *(ulonglong *)(DAT_14032f260 + 0x120)) {
        plVar9 = (longlong *)*plVar8;
      }
      uVar7 = 0xffffffffffffffff;
      do {
        if (uVar7 == 0) break;
        uVar7 = uVar7 - 1;
        cVar1 = *(char *)plVar9;
        plVar9 = (longlong *)((longlong)plVar9 + 1);
      } while (cVar1 != '\0');
      if (~uVar7 - 1 < 0x100) {
        if (0xf < *(ulonglong *)(DAT_14032f260 + 0x120)) {
          plVar8 = (longlong *)*plVar8;
        }
        lVar2 = 8 - (longlong)plVar8;
        do {
          cVar1 = *(char *)plVar8;
          *(char *)((longlong)plVar8 + (longlong)param_1 + lVar2) = cVar1;
          plVar8 = (longlong *)((longlong)plVar8 + 1);
        } while (cVar1 != '\0');
      }
      else {
        printf("Error GameLog String Max.!\n");
        lVar10 = DAT_14032f260;
      }
      *(undefined4 *)(param_1 + 0x21) = *(undefined4 *)(lVar10 + 0x13c);
      printf("GAME LOG: %s\n");
    }
    else {
      printf("Error Type Miss !!!\n");
    }
    iVar3 = *(int *)(param_1 + 0x21);
    if (iVar3 == 0) {
      iVar3 = 500;
    }
    *(int *)(param_1 + 0x21) = iVar3;
    *(undefined4 *)((longlong)param_1 + 0x10c) = 1;
  }
  return;
}



void FUN_1400a1cd0(undefined8 *param_1)

{
  void *pvVar1;
  longlong *plVar2;
  undefined8 *puVar3;
  
  if (*(int *)((longlong)param_1 + 0x10c) != 0) {
    pvVar1 = (void *)param_1[0x24];
    if (pvVar1 != (void *)0x0) {
      FUN_140002200(pvVar1);
      operator_delete(pvVar1);
    }
    plVar2 = (longlong *)param_1[0x25];
    if (plVar2 != (longlong *)0x0) {
      if ((longlong *)*plVar2 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar2 + 0x10))();
      }
      operator_delete(plVar2);
    }
    plVar2 = (longlong *)*param_1;
    if (plVar2 != (longlong *)0x0) {
      FUN_140001e90(plVar2);
      if ((longlong *)*plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      (**(code **)(*(longlong *)*plVar2 + 0x10))();
      *plVar2 = 0;
      plVar2[1] = (longlong)&DAT_140281f00;
      plVar2[2] = (longlong)&DAT_140281f00;
      *(undefined4 *)(plVar2 + 3) = 0;
      operator_delete(plVar2);
    }
    *param_1 = 0;
    puVar3 = (undefined8 *)param_1[0x23];
    if (puVar3 != (undefined8 *)0x0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(puVar3 + 0x21));
      if ((FILE *)*puVar3 != (FILE *)0x0) {
        fclose((FILE *)*puVar3);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(puVar3 + 0x21));
      DeleteCriticalSection((LPCRITICAL_SECTION)(puVar3 + 0x21));
      operator_delete(puVar3);
    }
    param_1[0x23] = 0;
    CoUninitialize();
    *(undefined4 *)((longlong)param_1 + 0x10c) = 0;
  }
  return;
}



ulonglong FUN_1400a1e10(longlong param_1,undefined8 *param_2,undefined2 param_3)

{
  ulonglong uVar1;
  undefined2 local_18;
  undefined2 uStack_16;
  undefined4 uStack_14;
  undefined4 local_10;
  undefined2 local_c;
  
  local_10 = *(undefined4 *)(param_2 + 1);
  uStack_14 = (undefined4)((ulonglong)*param_2 >> 0x20);
  _local_18 = CONCAT22(10000,(short)*param_2);
  local_c = param_3;
  uVar1 = FUN_1400a1430(*(undefined8 *)(*(longlong *)(param_1 + 0x110) + 0xf0),&local_18);
  if ((int)uVar1 == 0) {
    FUN_1400a0b40(*(undefined8 *)(param_1 + 0x118),"PushDBErrorReport.Log",
                  "DB Result Queue push error");
    uVar1 = uVar1 & 0xffffffff;
  }
  return uVar1;
}



// WARNING: Removing unreachable block (ram,0x0001400a1ee4)

undefined4 FUN_1400a1e90(undefined8 *param_1)

{
  IUnknown *This;
  ULONG UVar1;
  int iVar2;
  
  This = *(IUnknown **)*param_1;
  if ((This != (IUnknown *)0x0) && (UVar1 = (*This->lpVtbl[0xb].AddRef)(This), (int)UVar1 < 0)) {
    _com_issue_errorex(UVar1,This,(_GUID *)&DAT_140281f08);
  }
  iVar2 = FUN_140001d30(*param_1,param_1 + 1);
  if (iVar2 == 0) {
    printf(". ");
    return 1;
  }
  FUN_1400a0b40(param_1[0x23],"Error_ADO DB Connect.Log",
                "DB Connect failed\n Connection String = %s",param_1 + 1);
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined1 FUN_1400a1f60(undefined8 param_1,undefined4 *param_2,undefined1 *param_3)

{
  wchar_t *pwVar1;
  undefined1 uVar2;
  undefined2 uVar3;
  int iVar4;
  undefined4 uVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  wchar_t *pwVar8;
  wchar_t *pwVar9;
  undefined1 auStack_168 [32];
  undefined1 local_148 [8];
  undefined8 local_140;
  undefined4 local_138;
  undefined1 local_128 [24];
  undefined4 local_110;
  undefined4 uStack_10c;
  undefined4 local_108;
  undefined4 uStack_104;
  short local_100 [4];
  undefined4 local_f8;
  undefined8 local_e8;
  undefined1 local_e0;
  short local_d8 [12];
  undefined8 local_c0;
  wchar_t local_b8;
  undefined1 local_b6 [96];
  undefined2 local_56;
  ulonglong local_48;
  
  local_c0 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_168;
  local_148[0] = 1;
  FUN_140002290(param_1,local_100,"deferment_time",local_148);
  if (local_100[0] == 1) {
    *(undefined4 *)((longlong)param_2 + 0x7f) = 0;
  }
  else {
    FUN_140182560(local_100);
    if (local_100[0] != 3) {
      Ordinal_8(&local_140);
      iVar4 = Ordinal_12(&local_140,local_100,0,3);
      uVar5 = local_138;
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar4);
      }
      Ordinal_9(&local_140);
      local_f8 = uVar5;
    }
    *(undefined4 *)((longlong)param_2 + 0x7f) = local_f8;
  }
  FUN_140002290(param_1,local_d8,"link_id",local_148);
  if (local_d8[0] == 1) {
    *(undefined8 *)((longlong)param_2 + 0x6f) = 0;
    uVar6 = 0;
  }
  else {
    FUN_1400625d0(local_d8,&local_110);
    *(ulonglong *)((longlong)param_2 + 0x6f) = CONCAT44(uStack_10c,local_110);
    uVar6 = CONCAT44(uStack_104,local_108);
  }
  *(undefined8 *)((longlong)param_2 + 0x77) = uVar6;
  uVar6 = FUN_140002290(param_1,&local_140,"item_uid",param_3);
  FUN_1400625d0(uVar6,&local_110);
  *param_2 = local_110;
  param_2[1] = uStack_10c;
  param_2[2] = local_108;
  param_2[3] = uStack_104;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"page_index",param_3);
  FUN_140182560(uVar6);
  uVar3 = FUN_140062550(uVar6);
  *(undefined2 *)(param_2 + 4) = uVar3;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"slot_index",param_3);
  FUN_140182560(uVar6);
  uVar3 = FUN_140062550(uVar6);
  *(undefined2 *)((longlong)param_2 + 0x12) = uVar3;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,&DAT_14028931c,param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  param_2[5] = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"use_cnt",param_3);
  FUN_140182560(uVar6);
  uVar3 = FUN_140062550(uVar6);
  *(undefined2 *)(param_2 + 6) = uVar3;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"remain_time",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x1a) = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"durability",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x1e) = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"enhance_level",param_3);
  FUN_140182560(uVar6);
  uVar3 = FUN_140062550(uVar6);
  *(undefined2 *)((longlong)param_2 + 0x22) = uVar3;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"option_1_code",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  param_2[9] = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"option_1_value",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  param_2[10] = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"option_2_code",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  param_2[0xb] = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"option_2_value",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  param_2[0xc] = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"option_3_code",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  param_2[0xd] = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"option_3_value",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  param_2[0xe] = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"option_group",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  param_2[0xf] = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"ReconNum",param_3);
  FUN_140182560(uVar6);
  uVar3 = FUN_140062550(uVar6);
  *(undefined2 *)((longlong)param_2 + 0x5d) = uVar3;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"ReconState",param_3);
  FUN_140182560(uVar6);
  uVar3 = FUN_140062550(uVar6);
  *(undefined2 *)((longlong)param_2 + 0x5f) = uVar3;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"socket_count",param_3);
  FUN_140182560(uVar6);
  uVar3 = FUN_140062550(uVar6);
  *(undefined2 *)(param_2 + 0x10) = uVar3;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"socket_1_code",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x42) = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"socket_1_value",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x46) = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"socket_2_code",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x4a) = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"socket_2_value",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x4e) = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"socket_3_code",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x52) = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"socket_3_value",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x56) = uVar5;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"socket_1_color",param_3);
  FUN_140182560(uVar6);
  uVar2 = FUN_1400624d0(uVar6);
  *(undefined1 *)((longlong)param_2 + 0x5a) = uVar2;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"socket_2_color",param_3);
  FUN_140182560(uVar6);
  uVar2 = FUN_1400624d0(uVar6);
  *(undefined1 *)((longlong)param_2 + 0x5b) = uVar2;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,&local_140,"socket_3_color",param_3);
  FUN_140182560(uVar6);
  uVar2 = FUN_1400624d0(uVar6);
  *(undefined1 *)(param_2 + 0x17) = uVar2;
  Ordinal_9(&local_140);
  uVar6 = FUN_140002290(param_1,local_128,"lock_pwd",param_3);
  FUN_140062840(uVar6,&local_110);
  FUN_1401568c0();
  pwVar9 = (wchar_t *)PTR_DAT_1403200a0;
  if (PTR_DAT_1403200a0 == (undefined *)0x0) {
    pwVar9 = (wchar_t *)0x0;
  }
  pwVar1 = (wchar_t *)CONCAT44(uStack_10c,local_110);
  if (pwVar1 != (wchar_t *)PTR_DAT_1403200a0) {
    uVar6 = FUN_1401568c0();
    local_e8 = uVar6;
    FUN_140156b50(uVar6);
    local_e0 = 1;
    if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
       (pwVar9 + -4 != (wchar_t *)0x0)) {
      uVar7 = FUN_1401568c0();
      local_140 = uVar7;
      FUN_140156b50(uVar7);
      local_138 = CONCAT31(local_138._1_3_,1);
      pwVar8 = pwVar9 + -2;
      *(int *)pwVar8 = *(int *)pwVar8 + -1;
      if (*(int *)pwVar8 == 0) {
        FUN_140156970(pwVar9 + -4);
      }
      FUN_140156be0(uVar7);
    }
    if (((pwVar1 != (wchar_t *)PTR_DAT_1403200a0) && (pwVar1 != (wchar_t *)0x0)) &&
       (pwVar1 != (wchar_t *)0x8)) {
      *(int *)(pwVar1 + -2) = *(int *)(pwVar1 + -2) + 1;
    }
    FUN_140156be0(uVar6);
    pwVar9 = pwVar1;
  }
  pwVar8 = pwVar9;
  if (pwVar9 == (wchar_t *)0x0) {
    pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcsncpy((wchar_t *)((longlong)param_2 + 0x65),pwVar8,3);
  if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar9 + -4 != (wchar_t *)0x0)) {
    uVar6 = FUN_1401568c0();
    local_140 = uVar6;
    FUN_140156b50(uVar6);
    local_138 = CONCAT31(local_138._1_3_,1);
    pwVar8 = pwVar9 + -2;
    *(int *)pwVar8 = *(int *)pwVar8 + -1;
    if (*(int *)pwVar8 == 0) {
      FUN_140156970(pwVar9 + -4);
    }
    FUN_140156be0(uVar6);
  }
  if (((pwVar1 != (wchar_t *)0x0) && (pwVar1 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 + -4 != (wchar_t *)0x0)) {
    uVar6 = FUN_1401568c0();
    local_140 = uVar6;
    FUN_140156b50(uVar6);
    local_138 = CONCAT31(local_138._1_3_,1);
    pwVar9 = pwVar1 + -2;
    *(int *)pwVar9 = *(int *)pwVar9 + -1;
    if (*(int *)pwVar9 == 0) {
      FUN_140156970(pwVar1 + -4);
    }
    FUN_140156be0(uVar6);
  }
  Ordinal_9(local_128);
  *(undefined2 *)((longlong)param_2 + 0x6b) = 0;
  uVar6 = FUN_140002290(param_1,local_128,"expire_time",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x61) = uVar5;
  Ordinal_9(local_128);
  uVar6 = FUN_140002290(param_1,local_128,"activity_value",param_3);
  FUN_140182560(uVar6);
  uVar3 = FUN_140062550(uVar6);
  *(undefined2 *)((longlong)param_2 + 0x6d) = uVar3;
  Ordinal_9(local_128);
  uVar6 = FUN_140002290(param_1,local_128,&DAT_140289530,param_3);
  FUN_140182560(uVar6);
  uVar3 = FUN_140062550(uVar6);
  *(undefined2 *)((longlong)param_2 + 0x83) = uVar3;
  Ordinal_9(local_128);
  uVar6 = FUN_140002290(param_1,local_128,"acquireroute",param_3);
  FUN_140182560(uVar6);
  uVar3 = FUN_140062550(uVar6);
  *(undefined2 *)((longlong)param_2 + 0x85) = uVar3;
  Ordinal_9(local_128);
  uVar6 = FUN_140002290(param_1,local_128,"physical",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x87) = uVar5;
  Ordinal_9(local_128);
  uVar6 = FUN_140002290(param_1,local_128,"magical",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x8b) = uVar5;
  Ordinal_9(local_128);
  uVar6 = FUN_140002290(param_1,local_128,"durabilitymax",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x8f) = uVar5;
  Ordinal_9(local_128);
  uVar6 = FUN_140002290(param_1,local_128,"weight",param_3);
  FUN_140182560(uVar6);
  uVar5 = FUN_140062550(uVar6);
  *(undefined4 *)((longlong)param_2 + 0x93) = uVar5;
  Ordinal_9(local_128);
  local_b8 = L'\0';
  memset(local_b6,0,0x62);
  uVar6 = FUN_140002290(param_1,local_128,"stararray",param_3);
  FUN_140062840(uVar6,&local_110);
  FUN_1401568c0();
  pwVar9 = (wchar_t *)PTR_DAT_1403200a0;
  if (PTR_DAT_1403200a0 == (undefined *)0x0) {
    pwVar9 = (wchar_t *)0x0;
  }
  pwVar1 = (wchar_t *)CONCAT44(uStack_10c,local_110);
  if (pwVar1 != (wchar_t *)PTR_DAT_1403200a0) {
    uVar6 = FUN_1401568c0();
    local_140 = uVar6;
    FUN_140156b50(uVar6);
    local_138 = CONCAT31(local_138._1_3_,1);
    if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
       (pwVar9 + -4 != (wchar_t *)0x0)) {
      uVar7 = FUN_1401568c0();
      local_e8 = uVar7;
      FUN_140156b50(uVar7);
      local_e0 = 1;
      pwVar8 = pwVar9 + -2;
      *(int *)pwVar8 = *(int *)pwVar8 + -1;
      if (*(int *)pwVar8 == 0) {
        FUN_140156970(pwVar9 + -4);
      }
      FUN_140156be0(uVar7);
    }
    if (((pwVar1 != (wchar_t *)PTR_DAT_1403200a0) && (pwVar1 != (wchar_t *)0x0)) &&
       (pwVar1 != (wchar_t *)0x8)) {
      *(int *)(pwVar1 + -2) = *(int *)(pwVar1 + -2) + 1;
    }
    FUN_140156be0(uVar6);
    pwVar9 = pwVar1;
  }
  pwVar8 = pwVar9;
  if (pwVar9 == (wchar_t *)0x0) {
    pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcsncpy(&local_b8,pwVar8,0x31);
  if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar9 + -4 != (wchar_t *)0x0)) {
    uVar6 = FUN_1401568c0();
    local_140 = uVar6;
    FUN_140156b50(uVar6);
    local_138 = CONCAT31(local_138._1_3_,1);
    pwVar8 = pwVar9 + -2;
    *(int *)pwVar8 = *(int *)pwVar8 + -1;
    if (*(int *)pwVar8 == 0) {
      FUN_140156970(pwVar9 + -4);
    }
    FUN_140156be0(uVar6);
  }
  if (((pwVar1 != (wchar_t *)0x0) && (pwVar1 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 + -4 != (wchar_t *)0x0)) {
    uVar6 = FUN_1401568c0();
    local_140 = uVar6;
    FUN_140156b50(uVar6);
    local_138 = CONCAT31(local_138._1_3_,1);
    pwVar9 = pwVar1 + -2;
    *(int *)pwVar9 = *(int *)pwVar9 + -1;
    if (*(int *)pwVar9 == 0) {
      FUN_140156970(pwVar1 + -4);
    }
    FUN_140156be0(uVar6);
  }
  Ordinal_9(local_128);
  local_56 = 0;
  FUN_140202c40((longlong)param_2 + 0x97,&local_b8);
  uVar6 = FUN_140002290(param_1,local_128,"starcount",param_3);
  FUN_140182560(uVar6);
  uVar2 = FUN_1400624d0(uVar6);
  *(undefined1 *)((longlong)param_2 + 0xbf) = uVar2;
  Ordinal_9(local_128);
  uVar2 = *param_3;
  Ordinal_9(local_d8);
  Ordinal_9(local_100);
  return uVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1400a2c10(undefined8 param_1,undefined4 *param_2)

{
  undefined1 uVar1;
  short sVar2;
  undefined2 uVar3;
  undefined4 uVar4;
  int iVar5;
  undefined8 uVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  undefined8 *puVar9;
  undefined8 *puVar10;
  undefined1 auStack_168 [32];
  undefined4 local_148;
  undefined8 local_140;
  undefined4 *local_138;
  undefined8 *local_128 [2];
  undefined4 local_118;
  undefined4 uStack_114;
  undefined4 uStack_110;
  undefined4 uStack_10c;
  undefined4 *local_f8;
  undefined4 *local_f0;
  undefined8 *local_e8;
  undefined4 local_e0 [6];
  undefined8 local_c8;
  undefined4 local_c0 [6];
  undefined2 local_a8;
  undefined1 local_a6 [96];
  undefined2 local_46;
  ulonglong local_38;
  
  local_c8 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_168;
  local_f0 = local_e0;
  local_118 = *param_2;
  uStack_114 = param_2[1];
  uStack_110 = param_2[2];
  uStack_10c = param_2[3];
  uVar6 = FUN_140062280(local_e0,&local_118);
  puVar7 = operator_new(0x18);
  puVar10 = (undefined8 *)0x0;
  local_128[0] = puVar10;
  local_e8 = puVar7;
  if (puVar7 != (undefined8 *)0x0) {
    puVar7[1] = 0;
    *(undefined4 *)(puVar7 + 2) = 1;
    uVar8 = FUN_140201490("item_id");
    *puVar7 = uVar8;
    local_128[0] = puVar7;
  }
  if (local_128[0] == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_140 = 0x26;
  local_148 = 1;
  local_138 = (undefined4 *)uVar6;
  uVar6 = FUN_140001880(param_1,&local_f8,local_128,0xca);
  FUN_1400017e0(param_1,uVar6);
  local_f8 = &local_118;
  sVar2 = *(short *)(param_2 + 7);
  Ordinal_8(&local_118);
  FUN_140062080(&local_118,(int)sVar2);
  puVar9 = operator_new(0x18);
  puVar7 = puVar10;
  local_e8 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar6 = FUN_140201490("use_cnt");
    *puVar9 = uVar6;
    puVar7 = puVar9;
  }
  local_128[0] = puVar7;
  if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_138 = &local_118;
  local_140 = 4;
  local_148 = 1;
  uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
  FUN_1400017e0(param_1,uVar6);
  local_f8 = &local_118;
  uVar4 = param_2[9];
  Ordinal_8(&local_118);
  FUN_140062080(&local_118,uVar4);
  puVar9 = operator_new(0x18);
  puVar7 = puVar10;
  local_e8 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar6 = FUN_140201490("durability");
    *puVar9 = uVar6;
    puVar7 = puVar9;
  }
  local_128[0] = puVar7;
  if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_138 = &local_118;
  local_140 = 4;
  local_148 = 1;
  uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
  FUN_1400017e0(param_1,uVar6);
  local_f8 = &local_118;
  uVar4 = param_2[0x28];
  Ordinal_8(&local_118);
  FUN_140062080(&local_118,uVar4);
  puVar9 = operator_new(0x18);
  puVar7 = puVar10;
  local_e8 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar6 = FUN_140201490("durabilitymax");
    *puVar9 = uVar6;
    puVar7 = puVar9;
  }
  local_128[0] = puVar7;
  if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_138 = &local_118;
  local_140 = 4;
  local_148 = 1;
  uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
  FUN_1400017e0(param_1,uVar6);
  local_f8 = &local_118;
  uVar4 = param_2[0x1a];
  Ordinal_8(&local_118);
  FUN_140062080(&local_118,uVar4);
  puVar9 = operator_new(0x18);
  puVar7 = puVar10;
  local_e8 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar6 = FUN_140201490("weight");
    *puVar9 = uVar6;
    puVar7 = puVar9;
  }
  local_128[0] = puVar7;
  if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_138 = &local_118;
  local_140 = 4;
  local_148 = 1;
  uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
  FUN_1400017e0(param_1,uVar6);
  local_f8 = &local_118;
  sVar2 = *(short *)(param_2 + 0x25);
  Ordinal_8(&local_118);
  FUN_140062080(&local_118,(int)sVar2);
  puVar9 = operator_new(0x18);
  puVar7 = puVar10;
  local_e8 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar6 = FUN_140201490(&DAT_140289530);
    *puVar9 = uVar6;
    puVar7 = puVar9;
  }
  local_128[0] = puVar7;
  if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_138 = &local_118;
  local_140 = 1;
  local_148 = 1;
  uVar6 = FUN_140001880(param_1,&local_f0,local_128,0x10);
  FUN_1400017e0(param_1,uVar6);
  local_f8 = &local_118;
  sVar2 = *(short *)((longlong)param_2 + 0x96);
  Ordinal_8(&local_118);
  FUN_140062080(&local_118,(int)sVar2);
  puVar9 = operator_new(0x18);
  puVar7 = puVar10;
  local_e8 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar6 = FUN_140201490("acquireroute");
    *puVar9 = uVar6;
    puVar7 = puVar9;
  }
  local_128[0] = puVar7;
  if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_138 = &local_118;
  local_140 = 1;
  local_148 = 1;
  uVar6 = FUN_140001880(param_1,&local_f0,local_128,0x10);
  FUN_1400017e0(param_1,uVar6);
  local_f8 = &local_118;
  sVar2 = *(short *)(param_2 + 10);
  Ordinal_8(&local_118);
  FUN_140062080(&local_118,(int)sVar2);
  puVar9 = operator_new(0x18);
  puVar7 = puVar10;
  local_e8 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar6 = FUN_140201490("enhance_level");
    *puVar9 = uVar6;
    puVar7 = puVar9;
  }
  local_128[0] = puVar7;
  if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_138 = &local_118;
  local_140 = 4;
  local_148 = 1;
  uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
  FUN_1400017e0(param_1,uVar6);
  local_f8 = &local_118;
  uVar3 = *(undefined2 *)(param_2 + 0x1f);
  Ordinal_8(&local_118);
  if ((short)local_118 != 0x12) {
    iVar5 = Ordinal_9(&local_118);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_118 = CONCAT22(local_118._2_2_,0x12);
  }
  uStack_110 = CONCAT22(uStack_110._2_2_,uVar3);
  puVar9 = operator_new(0x18);
  puVar7 = puVar10;
  local_e8 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar6 = FUN_140201490("activity_value");
    *puVar9 = uVar6;
    puVar7 = puVar9;
  }
  local_128[0] = puVar7;
  if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_138 = &local_118;
  local_140 = 4;
  local_148 = 1;
  uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
  FUN_1400017e0(param_1,uVar6);
  local_f8 = &local_118;
  uVar4 = param_2[0xb];
  Ordinal_8(&local_118);
  FUN_140062080(&local_118,uVar4);
  puVar9 = operator_new(0x18);
  puVar7 = puVar10;
  local_e8 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar6 = FUN_140201490("OptionGroup");
    *puVar9 = uVar6;
    puVar7 = puVar9;
  }
  local_128[0] = puVar7;
  if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_138 = &local_118;
  local_140 = 4;
  local_148 = 1;
  uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
  FUN_1400017e0(param_1,uVar6);
  local_f8 = &local_118;
  uVar4 = param_2[0xc];
  Ordinal_8(&local_118);
  FUN_140062080(&local_118,uVar4);
  puVar9 = operator_new(0x18);
  puVar7 = puVar10;
  local_e8 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar6 = FUN_140201490("option_1_code");
    *puVar9 = uVar6;
    puVar7 = puVar9;
  }
  local_128[0] = puVar7;
  if (puVar7 != (undefined8 *)0x0) {
    local_138 = &local_118;
    local_140 = 4;
    local_148 = 1;
    uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
    FUN_1400017e0(param_1,uVar6);
    local_f8 = &local_118;
    uVar4 = param_2[0xf];
    Ordinal_8(&local_118);
    FUN_140062080(&local_118,uVar4);
    puVar9 = operator_new(0x18);
    puVar7 = puVar10;
    local_e8 = puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar6 = FUN_140201490("option_1_value");
      *puVar9 = uVar6;
      puVar7 = puVar9;
    }
    local_128[0] = puVar7;
    if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_138 = &local_118;
    local_140 = 4;
    local_148 = 1;
    uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
    FUN_1400017e0(param_1,uVar6);
    local_f8 = &local_118;
    uVar4 = param_2[0xd];
    Ordinal_8(&local_118);
    FUN_140062080(&local_118,uVar4);
    puVar9 = operator_new(0x18);
    puVar7 = puVar10;
    local_e8 = puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar6 = FUN_140201490("option_2_code");
      *puVar9 = uVar6;
      puVar7 = puVar9;
    }
    local_128[0] = puVar7;
    if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_138 = &local_118;
    local_140 = 4;
    local_148 = 1;
    uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
    FUN_1400017e0(param_1,uVar6);
    local_f8 = &local_118;
    uVar4 = param_2[0x10];
    Ordinal_8(&local_118);
    FUN_140062080(&local_118,uVar4);
    puVar9 = operator_new(0x18);
    puVar7 = puVar10;
    local_e8 = puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar6 = FUN_140201490("option_2_value");
      *puVar9 = uVar6;
      puVar7 = puVar9;
    }
    local_128[0] = puVar7;
    if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_138 = &local_118;
    local_140 = 4;
    local_148 = 1;
    uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
    FUN_1400017e0(param_1,uVar6);
    local_f8 = &local_118;
    uVar4 = param_2[0xe];
    Ordinal_8(&local_118);
    FUN_140062080(&local_118,uVar4);
    puVar9 = operator_new(0x18);
    puVar7 = puVar10;
    local_e8 = puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar6 = FUN_140201490("option_3_code");
      *puVar9 = uVar6;
      puVar7 = puVar9;
    }
    local_128[0] = puVar7;
    if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_138 = &local_118;
    local_140 = 4;
    local_148 = 1;
    uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
    FUN_1400017e0(param_1,uVar6);
    local_f8 = &local_118;
    uVar4 = param_2[0x11];
    Ordinal_8(&local_118);
    FUN_140062080(&local_118,uVar4);
    puVar9 = operator_new(0x18);
    puVar7 = puVar10;
    local_e8 = puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar6 = FUN_140201490("option_3_value");
      *puVar9 = uVar6;
      puVar7 = puVar9;
    }
    local_128[0] = puVar7;
    if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_138 = &local_118;
    local_140 = 4;
    local_148 = 1;
    uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
    FUN_1400017e0(param_1,uVar6);
    local_f8 = &local_118;
    sVar2 = *(short *)(param_2 + 0x12);
    Ordinal_8(&local_118);
    FUN_140062080(&local_118,(int)sVar2);
    puVar9 = operator_new(0x18);
    puVar7 = puVar10;
    local_e8 = puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar6 = FUN_140201490("Socket_count");
      *puVar9 = uVar6;
      puVar7 = puVar9;
    }
    local_128[0] = puVar7;
    if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_138 = &local_118;
    local_140 = 4;
    local_148 = 1;
    uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
    FUN_1400017e0(param_1,uVar6);
    local_f8 = &local_118;
    uVar4 = param_2[0x13];
    Ordinal_8(&local_118);
    FUN_140062080(&local_118,uVar4);
    puVar9 = operator_new(0x18);
    puVar7 = puVar10;
    local_e8 = puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar6 = FUN_140201490("Socket_1_code");
      *puVar9 = uVar6;
      puVar7 = puVar9;
    }
    local_128[0] = puVar7;
    if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_138 = &local_118;
    local_140 = 4;
    local_148 = 1;
    uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
    FUN_1400017e0(param_1,uVar6);
    local_f8 = &local_118;
    uVar4 = param_2[0x16];
    Ordinal_8(&local_118);
    FUN_140062080(&local_118,uVar4);
    puVar9 = operator_new(0x18);
    puVar7 = puVar10;
    local_e8 = puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar6 = FUN_140201490("Socket_1_value");
      *puVar9 = uVar6;
      puVar7 = puVar9;
    }
    local_128[0] = puVar7;
    if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_138 = &local_118;
    local_140 = 4;
    local_148 = 1;
    uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
    FUN_1400017e0(param_1,uVar6);
    local_f8 = &local_118;
    uVar4 = param_2[0x14];
    Ordinal_8(&local_118);
    FUN_140062080(&local_118,uVar4);
    puVar9 = operator_new(0x18);
    puVar7 = puVar10;
    local_e8 = puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar6 = FUN_140201490("Socket_2_code");
      *puVar9 = uVar6;
      puVar7 = puVar9;
    }
    local_128[0] = puVar7;
    if (puVar7 != (undefined8 *)0x0) {
      local_138 = &local_118;
      local_140 = 4;
      local_148 = 1;
      uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
      FUN_1400017e0(param_1,uVar6);
      local_f8 = &local_118;
      uVar4 = param_2[0x17];
      Ordinal_8(&local_118);
      FUN_140062080(&local_118,uVar4);
      puVar9 = operator_new(0x18);
      puVar7 = puVar10;
      local_e8 = puVar9;
      if (puVar9 != (undefined8 *)0x0) {
        puVar9[1] = 0;
        *(undefined4 *)(puVar9 + 2) = 1;
        uVar6 = FUN_140201490("Socket_2_value");
        *puVar9 = uVar6;
        puVar7 = puVar9;
      }
      local_128[0] = puVar7;
      if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      local_138 = &local_118;
      local_140 = 4;
      local_148 = 1;
      uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
      FUN_1400017e0(param_1,uVar6);
      local_f8 = &local_118;
      uVar4 = param_2[0x15];
      Ordinal_8(&local_118);
      FUN_140062080(&local_118,uVar4);
      puVar9 = operator_new(0x18);
      puVar7 = puVar10;
      local_e8 = puVar9;
      if (puVar9 != (undefined8 *)0x0) {
        puVar9[1] = 0;
        *(undefined4 *)(puVar9 + 2) = 1;
        uVar6 = FUN_140201490("Socket_3_code");
        *puVar9 = uVar6;
        puVar7 = puVar9;
      }
      local_128[0] = puVar7;
      if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      local_138 = &local_118;
      local_140 = 4;
      local_148 = 1;
      uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
      FUN_1400017e0(param_1,uVar6);
      local_f8 = &local_118;
      uVar4 = param_2[0x18];
      Ordinal_8(&local_118);
      FUN_140062080(&local_118,uVar4);
      puVar9 = operator_new(0x18);
      puVar7 = puVar10;
      local_e8 = puVar9;
      if (puVar9 != (undefined8 *)0x0) {
        puVar9[1] = 0;
        *(undefined4 *)(puVar9 + 2) = 1;
        uVar6 = FUN_140201490("Socket_3_value");
        *puVar9 = uVar6;
        puVar7 = puVar9;
      }
      local_128[0] = puVar7;
      if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      local_138 = &local_118;
      local_140 = 4;
      local_148 = 1;
      uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
      FUN_1400017e0(param_1,uVar6);
      local_f8 = &local_118;
      uVar1 = *(undefined1 *)(param_2 + 0x19);
      Ordinal_8(&local_118);
      if ((short)local_118 != 0x11) {
        iVar5 = Ordinal_9(&local_118);
        if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar5);
        }
        local_118 = CONCAT22(local_118._2_2_,0x11);
      }
      uStack_110 = CONCAT31(uStack_110._1_3_,uVar1);
      puVar9 = operator_new(0x18);
      puVar7 = puVar10;
      local_e8 = puVar9;
      if (puVar9 != (undefined8 *)0x0) {
        puVar9[1] = 0;
        *(undefined4 *)(puVar9 + 2) = 1;
        uVar6 = FUN_140201490("socket_1_color");
        *puVar9 = uVar6;
        puVar7 = puVar9;
      }
      local_128[0] = puVar7;
      if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      local_138 = &local_118;
      local_140 = 1;
      local_148 = 1;
      uVar6 = FUN_140001880(param_1,&local_f0,local_128,0x10);
      FUN_1400017e0(param_1,uVar6);
      local_f8 = &local_118;
      uVar1 = *(undefined1 *)((longlong)param_2 + 0x65);
      Ordinal_8(&local_118);
      if ((short)local_118 != 0x11) {
        iVar5 = Ordinal_9(&local_118);
        if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar5);
        }
        local_118 = CONCAT22(local_118._2_2_,0x11);
      }
      uStack_110 = CONCAT31(uStack_110._1_3_,uVar1);
      puVar9 = operator_new(0x18);
      puVar7 = puVar10;
      local_e8 = puVar9;
      if (puVar9 != (undefined8 *)0x0) {
        puVar9[1] = 0;
        *(undefined4 *)(puVar9 + 2) = 1;
        uVar6 = FUN_140201490("socket_2_color");
        *puVar9 = uVar6;
        puVar7 = puVar9;
      }
      local_128[0] = puVar7;
      if (puVar7 != (undefined8 *)0x0) {
        local_138 = &local_118;
        local_140 = 1;
        local_148 = 1;
        uVar6 = FUN_140001880(param_1,&local_f0,local_128,0x10);
        FUN_1400017e0(param_1,uVar6);
        local_f8 = &local_118;
        uVar1 = *(undefined1 *)((longlong)param_2 + 0x66);
        Ordinal_8(&local_118);
        if ((short)local_118 != 0x11) {
          iVar5 = Ordinal_9(&local_118);
          if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(iVar5);
          }
          local_118 = CONCAT22(local_118._2_2_,0x11);
        }
        uStack_110 = CONCAT31(uStack_110._1_3_,uVar1);
        puVar9 = operator_new(0x18);
        puVar7 = puVar10;
        local_e8 = puVar9;
        if (puVar9 != (undefined8 *)0x0) {
          puVar9[1] = 0;
          *(undefined4 *)(puVar9 + 2) = 1;
          uVar6 = FUN_140201490("socket_3_color");
          *puVar9 = uVar6;
          puVar7 = puVar9;
        }
        local_128[0] = puVar7;
        if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        local_138 = &local_118;
        local_140 = 1;
        local_148 = 1;
        uVar6 = FUN_140001880(param_1,&local_f0,local_128,0x10);
        FUN_1400017e0(param_1,uVar6);
        local_f8 = &local_118;
        uVar4 = param_2[8];
        Ordinal_8(&local_118);
        FUN_140062080(&local_118,uVar4);
        puVar9 = operator_new(0x18);
        puVar7 = puVar10;
        local_e8 = puVar9;
        if (puVar9 != (undefined8 *)0x0) {
          puVar9[1] = 0;
          *(undefined4 *)(puVar9 + 2) = 1;
          uVar6 = FUN_140201490("remain_time");
          *puVar9 = uVar6;
          puVar7 = puVar9;
        }
        local_128[0] = puVar7;
        if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        local_138 = &local_118;
        local_140 = 4;
        local_148 = 1;
        uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
        FUN_1400017e0(param_1,uVar6);
        local_f8 = &local_118;
        uVar4 = param_2[0x1c];
        Ordinal_8(&local_118);
        FUN_140062080(&local_118,uVar4);
        puVar9 = operator_new(0x18);
        puVar7 = puVar10;
        local_e8 = puVar9;
        if (puVar9 != (undefined8 *)0x0) {
          puVar9[1] = 0;
          *(undefined4 *)(puVar9 + 2) = 1;
          uVar6 = FUN_140201490("expire_time");
          *puVar9 = uVar6;
          puVar7 = puVar9;
        }
        local_128[0] = puVar7;
        if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        local_138 = &local_118;
        local_140 = 4;
        local_148 = 1;
        uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
        FUN_1400017e0(param_1,uVar6);
        local_f8 = &local_118;
        uVar4 = param_2[0x24];
        Ordinal_8(&local_118);
        FUN_140062080(&local_118,uVar4);
        puVar9 = operator_new(0x18);
        puVar7 = puVar10;
        local_e8 = puVar9;
        if (puVar9 != (undefined8 *)0x0) {
          puVar9[1] = 0;
          *(undefined4 *)(puVar9 + 2) = 1;
          uVar6 = FUN_140201490("deferment_time");
          *puVar9 = uVar6;
          puVar7 = puVar9;
        }
        local_128[0] = puVar7;
        if (puVar7 != (undefined8 *)0x0) {
          local_138 = &local_118;
          local_140 = 4;
          local_148 = 1;
          uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
          FUN_1400017e0(param_1,uVar6);
          local_f8 = local_e0;
          uVar4 = param_2[0x26];
          Ordinal_8(local_e0);
          FUN_140062080(local_e0,uVar4);
          puVar9 = operator_new(0x18);
          puVar7 = puVar10;
          local_e8 = puVar9;
          if (puVar9 != (undefined8 *)0x0) {
            puVar9[1] = 0;
            *(undefined4 *)(puVar9 + 2) = 1;
            uVar6 = FUN_140201490("physical");
            *puVar9 = uVar6;
            puVar7 = puVar9;
          }
          local_128[0] = puVar7;
          if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          local_138 = local_e0;
          local_140 = 4;
          local_148 = 1;
          uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
          FUN_1400017e0(param_1,uVar6);
          local_f8 = &local_118;
          uVar4 = param_2[0x27];
          Ordinal_8(&local_118);
          FUN_140062080(&local_118,uVar4);
          puVar9 = operator_new(0x18);
          puVar7 = puVar10;
          local_e8 = puVar9;
          if (puVar9 != (undefined8 *)0x0) {
            puVar9[1] = 0;
            *(undefined4 *)(puVar9 + 2) = 1;
            uVar6 = FUN_140201490("magical");
            *puVar9 = uVar6;
            puVar7 = puVar9;
          }
          local_128[0] = puVar7;
          if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          local_138 = &local_118;
          local_140 = 4;
          local_148 = 1;
          uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
          FUN_1400017e0(param_1,uVar6);
          local_f8 = local_e0;
          sVar2 = *(short *)(param_2 + 0x1b);
          Ordinal_8(local_e0);
          FUN_140062080(local_e0,(int)sVar2);
          puVar9 = operator_new(0x18);
          puVar7 = puVar10;
          local_e8 = puVar9;
          if (puVar9 != (undefined8 *)0x0) {
            puVar9[1] = 0;
            *(undefined4 *)(puVar9 + 2) = 1;
            uVar6 = FUN_140201490("ReconNum");
            *puVar9 = uVar6;
            puVar7 = puVar9;
          }
          local_128[0] = puVar7;
          if (puVar7 != (undefined8 *)0x0) {
            local_138 = local_e0;
            local_140 = 4;
            local_148 = 1;
            uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
            FUN_1400017e0(param_1,uVar6);
            local_f8 = &local_118;
            sVar2 = *(short *)((longlong)param_2 + 0x6e);
            Ordinal_8(&local_118);
            FUN_140062080(&local_118,(int)sVar2);
            puVar9 = operator_new(0x18);
            puVar7 = puVar10;
            local_e8 = puVar9;
            if (puVar9 != (undefined8 *)0x0) {
              puVar9[1] = 0;
              *(undefined4 *)(puVar9 + 2) = 1;
              uVar6 = FUN_140201490("ReconState");
              *puVar9 = uVar6;
              puVar7 = puVar9;
            }
            local_128[0] = puVar7;
            if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x8007000e);
            }
            local_138 = &local_118;
            local_140 = 4;
            local_148 = 1;
            uVar6 = FUN_140001880(param_1,&local_f0,local_128,3);
            FUN_1400017e0(param_1,uVar6);
            local_f8 = local_e0;
            local_118 = param_2[0x20];
            uStack_114 = param_2[0x21];
            uStack_110 = param_2[0x22];
            uStack_10c = param_2[0x23];
            uVar6 = FUN_140062280(local_e0,&local_118);
            puVar9 = operator_new(0x18);
            puVar7 = puVar10;
            local_e8 = puVar9;
            if (puVar9 != (undefined8 *)0x0) {
              puVar9[1] = 0;
              *(undefined4 *)(puVar9 + 2) = 1;
              uVar8 = FUN_140201490("link_id");
              *puVar9 = uVar8;
              puVar7 = puVar9;
            }
            local_128[0] = puVar7;
            if (puVar7 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x8007000e);
            }
            local_140 = 0x26;
            local_148 = 1;
            local_138 = (undefined4 *)uVar6;
            FUN_140001880(param_1,&local_f0,local_128,0xca);
            FUN_1400017e0(param_1);
            local_a8 = 0;
            memset(local_a6,0,0x62);
            FUN_140202470(param_2 + 0x2a,&local_a8);
            local_46 = 0;
            local_f8 = local_c0;
            uVar6 = FUN_1400623f0(local_c0,&local_a8);
            puVar9 = operator_new(0x18);
            puVar7 = puVar10;
            local_e8 = puVar9;
            if (puVar9 != (undefined8 *)0x0) {
              puVar9[1] = 0;
              *(undefined4 *)(puVar9 + 2) = 1;
              uVar8 = FUN_140201490("stararray");
              *puVar9 = uVar8;
              puVar7 = puVar9;
            }
            local_128[0] = puVar7;
            if (puVar7 != (undefined8 *)0x0) {
              local_140 = 0x32;
              local_148 = 1;
              local_138 = (undefined4 *)uVar6;
              uVar6 = FUN_140001880(param_1,&local_f0,local_128,0xca);
              FUN_1400017e0(param_1,uVar6);
              local_f8 = &local_118;
              uVar1 = *(undefined1 *)(param_2 + 0x34);
              Ordinal_8(&local_118);
              if ((short)local_118 != 0x11) {
                iVar5 = Ordinal_9(&local_118);
                if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
                  FUN_1402013e0(iVar5);
                }
                local_118 = CONCAT22(local_118._2_2_,0x11);
              }
              uStack_110 = CONCAT31(uStack_110._1_3_,uVar1);
              puVar7 = operator_new(0x18);
              local_e8 = puVar7;
              if (puVar7 != (undefined8 *)0x0) {
                puVar7[1] = 0;
                *(undefined4 *)(puVar7 + 2) = 1;
                uVar6 = FUN_140201490("starcount");
                *puVar7 = uVar6;
                puVar10 = puVar7;
              }
              local_128[0] = puVar10;
              if (puVar10 != (undefined8 *)0x0) {
                local_138 = &local_118;
                local_140 = 1;
                local_148 = 1;
                uVar6 = FUN_140001880(param_1,&local_f0,local_128,0x10);
                FUN_1400017e0(param_1,uVar6);
                return 1;
              }
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x8007000e);
            }
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}


/*
Unable to decompile 'FUN_1400a4610'
Cause: 
Low-level Error: Flow exceeded maximum allowable instructions
*/


void FUN_1400a6790(undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4,
                  undefined4 param_5,undefined8 param_6)

{
  void *pvVar1;
  longlong *plVar2;
  longlong lVar3;
  undefined8 uVar4;
  longlong *plVar5;
  longlong *local_40;
  longlong *local_38;
  longlong *local_30;
  undefined8 local_28;
  
  local_28 = 0xfffffffffffffffe;
  plVar2 = operator_new(0x18);
  plVar5 = (longlong *)0x0;
  local_30 = plVar5;
  if (plVar2 != (longlong *)0x0) {
    plVar2[1] = 0;
    *(undefined4 *)(plVar2 + 2) = 1;
    local_30 = plVar2;
    lVar3 = FUN_140201490(&DAT_14028c994);
    *plVar2 = lVar3;
    local_30 = plVar2;
  }
  if (local_30 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  uVar4 = (**(code **)(*param_2 + 8))(param_2);
  plVar2 = operator_new(0x18);
  local_38 = plVar5;
  if (plVar2 != (longlong *)0x0) {
    plVar2[1] = 0;
    *(undefined4 *)(plVar2 + 2) = 1;
    local_38 = plVar2;
    lVar3 = FUN_140201490(uVar4);
    *plVar2 = lVar3;
    local_38 = plVar2;
  }
  if (local_38 != (longlong *)0x0) {
    plVar2 = operator_new(0x18);
    if (plVar2 != (longlong *)0x0) {
      plVar2[1] = 0;
      *(undefined4 *)(plVar2 + 2) = 1;
      local_40 = plVar2;
      lVar3 = FUN_140201490(&DAT_14028c994);
      *plVar2 = lVar3;
      plVar5 = plVar2;
    }
    local_40 = plVar5;
    if (plVar5 != (longlong *)0x0) {
      FUN_1400a6ba0(param_1,&local_30,&local_38,&local_40,param_3,param_4,param_5,param_6,1);
      plVar5 = local_40;
      if (local_40 != (longlong *)0x0) {
        LOCK();
        plVar2 = local_40 + 2;
        lVar3 = *plVar2;
        *(int *)plVar2 = (int)*plVar2 + -1;
        UNLOCK();
        if ((int)lVar3 == 1) {
          if (*local_40 != 0) {
            Ordinal_6();
          }
          pvVar1 = (void *)plVar5[1];
          if (pvVar1 != (void *)0x0) {
            operator_delete__(pvVar1);
          }
          operator_delete(plVar5);
        }
      }
      plVar5 = local_38;
      if (local_38 != (longlong *)0x0) {
        LOCK();
        plVar2 = local_38 + 2;
        lVar3 = *plVar2;
        *(int *)plVar2 = (int)*plVar2 + -1;
        UNLOCK();
        if ((int)lVar3 == 1) {
          if (*local_38 != 0) {
            Ordinal_6();
          }
          pvVar1 = (void *)plVar5[1];
          if (pvVar1 != (void *)0x0) {
            operator_delete__(pvVar1);
          }
          operator_delete(plVar5);
        }
      }
      plVar5 = local_30;
      if (local_30 != (longlong *)0x0) {
        LOCK();
        plVar2 = local_30 + 2;
        lVar3 = *plVar2;
        *(int *)plVar2 = (int)*plVar2 + -1;
        UNLOCK();
        if ((int)lVar3 == 1) {
          if (*local_30 != 0) {
            Ordinal_6();
          }
          pvVar1 = (void *)plVar5[1];
          if (pvVar1 != (void *)0x0) {
            operator_delete__(pvVar1);
          }
          operator_delete(plVar5);
        }
      }
      return;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



void FUN_1400a69d0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4,
                  undefined4 param_5,undefined8 param_6)

{
  longlong *plVar1;
  void *pvVar2;
  undefined8 uVar3;
  longlong *plVar4;
  longlong lVar5;
  longlong *local_40;
  longlong *local_38;
  longlong *local_30;
  undefined8 local_28;
  
  local_28 = 0xfffffffffffffffe;
  FUN_140001180(param_2,&local_30);
  FUN_1400010f0(param_2,&local_38);
  uVar3 = FUN_140001210(param_2);
  plVar4 = operator_new(0x18);
  if (plVar4 == (longlong *)0x0) {
    plVar4 = (longlong *)0x0;
  }
  else {
    plVar4[1] = 0;
    *(undefined4 *)(plVar4 + 2) = 1;
    local_40 = plVar4;
    lVar5 = FUN_140201490(uVar3);
    *plVar4 = lVar5;
  }
  local_40 = plVar4;
  if (plVar4 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  FUN_1400a6ba0(param_1,&local_30,&local_38,&local_40,param_3,param_4,param_5,param_6,
                *(undefined4 *)(param_2 + 8));
  plVar4 = local_40;
  if (local_40 != (longlong *)0x0) {
    LOCK();
    plVar1 = local_40 + 2;
    lVar5 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if ((int)lVar5 == 1) {
      if (*local_40 != 0) {
        Ordinal_6();
      }
      pvVar2 = (void *)plVar4[1];
      if (pvVar2 != (void *)0x0) {
        operator_delete__(pvVar2);
      }
      operator_delete(plVar4);
    }
  }
  if (local_38 != (longlong *)0x0) {
    LOCK();
    plVar4 = local_38 + 2;
    lVar5 = *plVar4;
    *(int *)plVar4 = (int)*plVar4 + -1;
    UNLOCK();
    if ((int)lVar5 == 1) {
      if (*local_38 != 0) {
        Ordinal_6();
      }
      if ((void *)local_38[1] != (void *)0x0) {
        operator_delete__((void *)local_38[1]);
      }
      operator_delete(local_38);
    }
  }
  if (local_30 != (longlong *)0x0) {
    LOCK();
    plVar4 = local_30 + 2;
    lVar5 = *plVar4;
    *(int *)plVar4 = (int)*plVar4 + -1;
    UNLOCK();
    if ((int)lVar5 == 1) {
      if (*local_30 != 0) {
        Ordinal_6();
      }
      if ((void *)local_30[1] != (void *)0x0) {
        operator_delete__((void *)local_30[1]);
      }
      operator_delete(local_30);
    }
  }
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1400a6ba0(longlong param_1,longlong *param_2,longlong *param_3,longlong *param_4,
                  undefined8 param_5,undefined8 param_6,undefined4 param_7,undefined8 param_8,
                  uint param_9)

{
  short sVar1;
  undefined8 *puVar2;
  longlong lVar3;
  void *pvVar4;
  errno_t eVar5;
  int iVar6;
  char *pcVar7;
  char *pcVar8;
  longlong lVar9;
  undefined8 uVar10;
  ulonglong uVar11;
  char *_Source;
  undefined2 *puVar12;
  uint uVar13;
  short *psVar14;
  undefined1 *puVar15;
  undefined1 *puVar16;
  uint uVar17;
  short *psVar18;
  uint uVar19;
  uint uVar20;
  undefined *puStack_f30;
  undefined1 auStack_f28 [32];
  uint local_f08 [2];
  char *local_f00;
  uint local_ef8;
  uint local_ef0;
  char *local_ee8;
  undefined8 local_ee0;
  undefined8 local_ed8;
  char *local_ed0;
  char *local_ec8;
  char *local_ec0;
  undefined8 local_eb8;
  int local_eb0;
  undefined8 local_ea8;
  undefined8 local_ea0;
  __time64_t local_e98 [2];
  short local_e88;
  short local_e86;
  undefined2 local_e84;
  short local_e82;
  short local_e80;
  short local_e7e;
  short local_e7c;
  undefined2 local_e7a;
  undefined8 local_e78;
  undefined8 local_e70;
  undefined8 local_e68;
  ushort local_e5c;
  undefined2 local_e58;
  undefined6 uStack_e56;
  undefined8 local_e48;
  ulonglong local_e40;
  tm local_e30;
  undefined1 local_e08 [16];
  undefined1 local_df8 [16];
  undefined1 local_de8 [6];
  ushort local_de2;
  undefined1 local_dd8 [10];
  ushort local_dce;
  undefined1 local_dc8 [16];
  undefined1 local_db8 [8];
  ushort local_db0;
  undefined1 local_da8 [8];
  ushort local_da0;
  undefined1 local_d98 [12];
  ushort local_d8c;
  undefined1 local_d88 [10];
  ushort local_d7e;
  undefined1 local_d78 [16];
  undefined1 local_d68 [6];
  ushort local_d62;
  char local_d58;
  undefined1 local_d57 [255];
  char local_c58;
  undefined1 local_c57 [511];
  char local_a58;
  undefined1 local_a57 [511];
  char local_858;
  undefined1 local_857 [1023];
  char local_458;
  undefined1 local_457 [1031];
  ulonglong local_50;
  
  puVar15 = auStack_f28;
  local_e98[1] = 0xfffffffffffffffe;
  local_50 = DAT_1403223c0 ^ (ulonglong)&local_eb8;
  local_ea8 = param_5;
  local_ea0 = param_6;
  local_e68 = param_8;
  local_d58 = '\0';
  puStack_f30 = (undefined *)0x1400a6c1a;
  memset(local_d57,0,0xff);
  local_c58 = '\0';
  puStack_f30 = (undefined *)0x1400a6c35;
  memset(local_c57,0,0x1ff);
  local_a58 = '\0';
  puStack_f30 = (undefined *)0x1400a6c50;
  memset(local_a57,0,0x1ff);
  local_458 = '\0';
  puStack_f30 = (undefined *)0x1400a6c6b;
  memset(local_457,0,0x3ff);
  _Source = (char *)0x0;
  if (*param_2 == 0) {
    puStack_f30 = (undefined *)0x1400a6c7e;
    pcVar7 = operator_new(0x18);
    pcVar8 = _Source;
    if (pcVar7 != (char *)0x0) {
      pcVar7[8] = '\0';
      pcVar7[9] = '\0';
      pcVar7[10] = '\0';
      pcVar7[0xb] = '\0';
      pcVar7[0xc] = '\0';
      pcVar7[0xd] = '\0';
      pcVar7[0xe] = '\0';
      pcVar7[0xf] = '\0';
      pcVar7[0x10] = '\x01';
      pcVar7[0x11] = '\0';
      pcVar7[0x12] = '\0';
      pcVar7[0x13] = '\0';
      pcVar7[0] = '\0';
      pcVar7[1] = '\0';
      pcVar7[2] = '\0';
      pcVar7[3] = '\0';
      pcVar7[4] = '\0';
      pcVar7[5] = '\0';
      pcVar7[6] = '\0';
      pcVar7[7] = '\0';
      pcVar8 = pcVar7;
    }
    *param_2 = (longlong)pcVar8;
    if (pcVar8 == (char *)0x0) {
                    // WARNING: Subroutine does not return
      puStack_f30 = &UNK_1400a6ca9;
      FUN_1402013e0(0x8007000e);
    }
  }
  param_2 = (longlong *)*param_2;
  puVar16 = auStack_f28;
  if (*param_2 == 0) goto LAB_1400a722a;
  pcVar8 = _Source;
  if (param_2 != (longlong *)0x0) {
    if (param_2[1] == 0) {
      puStack_f30 = (undefined *)0x1400a6ccb;
      lVar9 = FUN_140201620(*param_2);
      param_2[1] = lVar9;
    }
    pcVar8 = (char *)param_2[1];
  }
  puStack_f30 = (undefined *)0x1400a6ceb;
  strncpy(&local_d58,pcVar8,0x100);
  puVar2 = (undefined8 *)*param_3;
  pcVar8 = _Source;
  if (puVar2 != (undefined8 *)0x0) {
    if (puVar2[1] == 0) {
      puStack_f30 = (undefined *)0x1400a6d02;
      uVar10 = FUN_140201620(*puVar2);
      puVar2[1] = uVar10;
    }
    pcVar8 = (char *)puVar2[1];
  }
  puStack_f30 = (undefined *)0x1400a6d22;
  strncpy(&local_c58,pcVar8,0x200);
  puVar2 = (undefined8 *)*param_4;
  if (puVar2 != (undefined8 *)0x0) {
    if (puVar2[1] == 0) {
      puStack_f30 = (undefined *)0x1400a6d39;
      uVar10 = FUN_140201620(*puVar2);
      puVar2[1] = uVar10;
    }
    _Source = (char *)puVar2[1];
  }
  puStack_f30 = (undefined *)0x1400a6d59;
  strncpy(&local_a58,_Source,0x200);
  puStack_f30 = (undefined *)0x1400a6d61;
  local_e98[0] = _time64((__time64_t *)0x0);
  local_eb8 = 0;
  local_eb0 = 0;
  puStack_f30 = (undefined *)0x1400a6d83;
  eVar5 = _localtime64_s(&local_e30,local_e98);
  if (eVar5 == 0) {
    local_e88 = (short)local_e30.tm_year + 0x76c;
    local_e86 = (short)local_e30.tm_mon + 1;
    local_e84 = (undefined2)local_e30.tm_wday;
    local_e82 = (short)local_e30.tm_mday;
    local_e80 = (short)local_e30.tm_hour;
    local_e7e = (short)local_e30.tm_min;
    local_e7c = (short)local_e30.tm_sec;
    local_e7a = 0;
    puStack_f30 = (undefined *)0x1400a6df6;
    iVar6 = Ordinal_184(&local_e88,&local_eb8);
    local_e78 = 0;
    local_e70 = 0;
    if (iVar6 == 0) goto LAB_1400a6e77;
    puStack_f30 = (undefined *)0x1400a6e13;
    iVar6 = Ordinal_185(local_eb8,&local_e78);
    if ((((iVar6 == 0) || (local_e88 != (short)local_e78)) || (local_e86 != local_e78._2_2_)) ||
       (((local_e82 != local_e78._6_2_ || (local_e80 != (short)local_e70)) ||
        ((local_e7e != local_e70._2_2_ || (local_e7c != local_e70._4_2_)))))) goto LAB_1400a6e77;
    local_eb0 = 0;
    puStack_f30 = (undefined *)0x1400a6e69;
    iVar6 = Ordinal_185(local_eb8,local_d98);
    if (iVar6 == 0) goto LAB_1400a6e7e;
    uVar20 = (uint)local_d8c;
  }
  else {
LAB_1400a6e77:
    local_eb0 = 1;
LAB_1400a6e7e:
    uVar20 = 0xffffffff;
  }
  if (local_eb0 == 0) {
    puStack_f30 = (undefined *)0x1400a6e9a;
    iVar6 = Ordinal_185(local_eb8,local_dd8);
    if (iVar6 == 0) goto LAB_1400a6ea8;
    uVar19 = (uint)local_dce;
  }
  else {
LAB_1400a6ea8:
    uVar19 = 0xffffffff;
  }
  if (local_eb0 == 0) {
    puStack_f30 = (undefined *)0x1400a6ec4;
    iVar6 = Ordinal_185(local_eb8,local_db8);
    if (iVar6 == 0) goto LAB_1400a6ed1;
    uVar17 = (uint)local_db0;
  }
  else {
LAB_1400a6ed1:
    uVar17 = 0xffffffff;
  }
  if (local_eb0 == 0) {
    puStack_f30 = (undefined *)0x1400a6eec;
    iVar6 = Ordinal_185(local_eb8,local_de8);
    if (iVar6 == 0) goto LAB_1400a6ef9;
    uVar13 = (uint)local_de2;
  }
  else {
LAB_1400a6ef9:
    uVar13 = 0xffffffff;
  }
  if (local_eb0 == 0) {
    puStack_f30 = (undefined *)0x1400a6f14;
    Ordinal_185(local_eb8,local_e08);
  }
  if (local_eb0 == 0) {
    puStack_f30 = (undefined *)0x1400a6f3c;
    Ordinal_185(local_eb8,local_dc8);
  }
  local_ec0 = &local_c58;
  local_ec8 = &local_d58;
  local_ed0 = (char *)CONCAT44(local_ed0._4_4_,param_7);
  local_ed8 = local_ea8;
  local_ee0 = local_e68;
  local_ee8 = &local_a58;
  local_f00 = (char *)CONCAT44(local_f00._4_4_,uVar17);
  puStack_f30 = (undefined *)0x1400a6fb9;
  local_f08[0] = uVar13;
  local_ef8 = uVar19;
  local_ef0 = uVar20;
  sprintf(&local_458,
          "%d/%d/%d %d:%d:%d\nmeaning = %s \nProcedureName = %s\nSource = %s [%d] Line\n%s \nDescription = %s"
         );
  local_f00 = &local_458;
  local_f08[0] = param_9;
  puStack_f30 = (undefined *)0x1400a6fed;
  FUN_1400a0b40(*(undefined8 *)(param_1 + 0x118),"AdoError.Log","DB Error: %s\nCode = %lx\n%s",
                local_ea0);
  lVar9 = *(longlong *)(*(longlong *)(param_1 + 0x110) + 0x70);
  puVar16 = auStack_f28;
  if (lVar9 == 0) goto LAB_1400a722a;
  local_858 = '\0';
  puStack_f30 = (undefined *)0x1400a701c;
  memset(local_857,0,0x3ff);
  if (local_eb0 == 0) {
    puStack_f30 = (undefined *)0x1400a7031;
    iVar6 = Ordinal_185(local_eb8,&local_e68);
    if (iVar6 == 0) goto LAB_1400a703c;
    uVar20 = (uint)local_e5c;
  }
  else {
LAB_1400a703c:
    uVar20 = 0xffffffff;
  }
  if (local_eb0 == 0) {
    puStack_f30 = (undefined *)0x1400a7058;
    iVar6 = Ordinal_185(local_eb8,local_d88);
    if (iVar6 == 0) goto LAB_1400a7066;
    uVar19 = (uint)local_d7e;
  }
  else {
LAB_1400a7066:
    uVar19 = 0xffffffff;
  }
  if (local_eb0 == 0) {
    puStack_f30 = (undefined *)0x1400a7082;
    iVar6 = Ordinal_185(local_eb8,local_da8);
    if (iVar6 == 0) goto LAB_1400a708f;
    uVar17 = (uint)local_da0;
  }
  else {
LAB_1400a708f:
    uVar17 = 0xffffffff;
  }
  if (local_eb0 == 0) {
    puStack_f30 = (undefined *)0x1400a70aa;
    iVar6 = Ordinal_185(local_eb8,local_d68);
    if (iVar6 == 0) goto LAB_1400a70b7;
    uVar13 = (uint)local_d62;
  }
  else {
LAB_1400a70b7:
    uVar13 = 0xffffffff;
  }
  if (local_eb0 == 0) {
    puStack_f30 = (undefined *)0x1400a70d2;
    Ordinal_185(local_eb8,local_d78);
  }
  if (local_eb0 == 0) {
    puStack_f30 = (undefined *)0x1400a70fa;
    Ordinal_185(local_eb8,local_df8);
  }
  local_ed0 = &local_c58;
  local_ed8 = CONCAT44(local_ed8._4_4_,param_7);
  local_ee0 = local_ea0;
  local_ee8 = (char *)local_ea8;
  local_f00 = (char *)CONCAT44(local_f00._4_4_,uVar17);
  puStack_f30 = (undefined *)0x1400a7158;
  local_f08[0] = uVar13;
  local_ef8 = uVar19;
  local_ef0 = uVar20;
  sprintf(&local_858,"%d/%d/%d %d:%d:%d-Src[ %s ] Fun[ %s ] Line[ %d ] %s");
  puStack_f30 = (undefined *)0x1400a7165;
  iVar6 = lstrlenA(&local_858);
  iVar6 = iVar6 + 1;
  if (iVar6 < 0x40000000) {
    uVar11 = (longlong)iVar6 * 2 + 0xf;
    if (uVar11 <= (ulonglong)((longlong)iVar6 * 2)) {
      uVar11 = 0xffffffffffffff0;
    }
    puStack_f30 = (undefined *)0x1400a7195;
    lVar3 = -(uVar11 & 0xfffffffffffffff0);
    puVar15 = auStack_f28 + lVar3;
    psVar14 = (short *)((longlong)&local_eb8 + lVar3);
    if (psVar14 == (short *)0x0) goto LAB_1400a71ce;
    *psVar14 = 0;
    *(int *)((longlong)&local_f00 + lVar3) = iVar6;
    *(short **)((longlong)local_f08 + lVar3) = psVar14;
    *(undefined8 *)(auStack_f28 + lVar3 + -8) = 0x1400a71c6;
    iVar6 = MultiByteToWideChar(3,0,&local_858,-1,*(LPWSTR *)((longlong)local_f08 + lVar3),
                                *(int *)((longlong)&local_f00 + lVar3));
    puVar16 = auStack_f28 + lVar3;
    if (iVar6 == 0) {
      psVar14 = (short *)0x0;
      puVar16 = auStack_f28 + lVar3;
    }
  }
  else {
LAB_1400a71ce:
    psVar14 = (short *)0x0;
    puVar16 = puVar15;
  }
  local_e40 = 7;
  local_e48 = 0;
  local_e58 = 0;
  uVar11 = 0xffffffffffffffff;
  psVar18 = psVar14;
  do {
    if (uVar11 == 0) break;
    uVar11 = uVar11 - 1;
    sVar1 = *psVar18;
    psVar18 = psVar18 + 1;
  } while (sVar1 != 0);
  *(undefined8 *)(puVar16 + -8) = 0x1400a7201;
  FUN_140056dd0(&local_e58,psVar14,~uVar11 - 1);
  puVar12 = &local_e58;
  if (7 < local_e40) {
    puVar12 = (undefined2 *)CONCAT62(uStack_e56,local_e58);
  }
  *(undefined8 *)(puVar16 + -8) = 0x1400a7218;
  FUN_140143880(lVar9,puVar12);
  if (7 < local_e40) {
    pvVar4 = (void *)CONCAT62(uStack_e56,local_e58);
    *(undefined8 *)(puVar16 + -8) = 0x1400a722a;
    operator_delete(pvVar4);
  }
LAB_1400a722a:
  *(undefined8 *)(puVar16 + -8) = 0x1400a7239;
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1400a7250(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  ULONG UVar2;
  int iVar3;
  HRESULT HVar4;
  undefined4 uVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  undefined8 uVar9;
  longlong *plVar10;
  undefined1 auStackY_2d8 [32];
  char local_298 [4];
  short local_294;
  longlong *local_290;
  undefined8 *local_288;
  wchar_t *local_280;
  longlong *local_278;
  LPUNKNOWN local_270;
  longlong *local_268;
  longlong *local_260;
  undefined8 *local_258;
  longlong *local_250;
  IUnknown *local_248;
  longlong *local_240;
  undefined4 local_238;
  undefined1 local_228 [24];
  undefined1 local_210 [24];
  undefined4 local_1f8;
  undefined1 *local_1f0;
  undefined4 local_1e8;
  undefined8 local_1e0;
  undefined1 *local_1d8;
  longlong *local_1c8;
  longlong *local_1c0;
  longlong *local_1b8;
  longlong *local_1b0;
  longlong *local_1a8;
  longlong *local_1a0;
  undefined8 local_198;
  undefined8 local_190;
  undefined8 local_188;
  undefined1 local_180 [8];
  undefined4 local_178;
  undefined4 uStack_174;
  undefined4 uStack_170;
  undefined4 uStack_16c;
  longlong local_158 [3];
  undefined1 local_140 [24];
  undefined1 local_128 [24];
  undefined1 local_110 [24];
  longlong local_f8 [3];
  longlong local_e0 [3];
  undefined2 local_c8;
  undefined2 uStack_c6;
  undefined4 uStack_c4;
  undefined4 local_c0;
  undefined2 local_bc;
  undefined4 local_ba;
  undefined8 local_b6;
  undefined8 local_ae;
  undefined8 local_a6;
  wchar_t local_9e [12];
  ulonglong local_86;
  wchar_t local_7e [28];
  ulonglong local_46;
  ulonglong local_38;
  
  local_188 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_2d8;
  pIVar1 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  local_288 = param_1;
  local_258 = param_2;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400a72e4:
    iVar3 = FUN_1400a1e90(param_1);
    if (iVar3 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (longlong *)0x0;
    }
  }
  else {
    local_280 = (wchar_t *)((ulonglong)local_280 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_280 == 0) goto LAB_1400a72e4;
  }
  local_290 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_290);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_248 = (IUnknown *)0x0;
  local_240 = (longlong *)0x0;
  Ordinal_8(local_228);
  Ordinal_8(local_210);
  pIVar1 = local_248;
  if ((local_248 != (IUnknown *)0x0) && (local_248 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_1d8 = &DAT_140281f00;
  local_1f0 = &DAT_140281f00;
  local_1e8 = 0;
  local_1e0 = 0;
  if (local_248 != (IUnknown *)0x0) {
    (*local_248->lpVtbl->Release)(local_248);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_270);
  if (-1 < HVar4) {
    HVar4 = OleRun(local_270);
    if (-1 < HVar4) {
      HVar4 = (*local_270->lpVtbl->QueryInterface)(local_270,(IID *)&DAT_140281f68,&local_248);
    }
    (*local_270->lpVtbl->Release)(local_270);
    if (-1 < HVar4) goto LAB_1400a7422;
  }
  local_248 = (IUnknown *)0x0;
LAB_1400a7422:
  local_1f8 = 2;
  local_238 = 1;
  local_298[0] = '\x01';
  local_ba = 0;
  local_b6 = 0;
  local_ae = 0;
  local_a6 = 0;
  local_9e[0] = L'\0';
  local_9e[1] = L'\0';
  local_9e[2] = L'\0';
  local_9e[3] = L'\0';
  local_9e[4] = L'\0';
  local_9e[5] = L'\0';
  local_9e[6] = L'\0';
  local_9e[7] = L'\0';
  local_9e[8] = L'\0';
  local_9e[9] = L'\0';
  local_9e[10] = L'\0';
  local_9e[0xb] = L'\0';
  local_86 = 0;
  local_7e[0] = L'\0';
  local_7e[1] = L'\0';
  local_7e[2] = L'\0';
  local_7e[3] = L'\0';
  local_7e[4] = L'\0';
  local_7e[5] = L'\0';
  local_7e[6] = L'\0';
  local_7e[7] = L'\0';
  local_7e[8] = L'\0';
  local_7e[9] = L'\0';
  local_7e[10] = L'\0';
  local_7e[0xb] = L'\0';
  local_7e[0xc] = L'\0';
  local_7e[0xd] = L'\0';
  local_7e[0xe] = L'\0';
  local_7e[0xf] = L'\0';
  local_7e[0x10] = L'\0';
  local_7e[0x11] = L'\0';
  local_7e[0x12] = L'\0';
  local_7e[0x13] = L'\0';
  local_7e[0x14] = L'\0';
  local_7e[0x15] = L'\0';
  local_7e[0x16] = L'\0';
  local_7e[0x17] = L'\0';
  local_7e[0x18] = L'\0';
  local_7e[0x19] = L'\0';
  local_7e[0x1a] = L'\0';
  local_7e[0x1b] = L'\0';
  local_46 = 0;
  local_c0 = *(undefined4 *)(param_2 + 1);
  uStack_c4 = (undefined4)((ulonglong)*param_2 >> 0x20);
  _local_c8 = CONCAT22(0x2329,(short)*param_2);
  local_bc = 0xa6;
  wcsncpy(local_9e,(wchar_t *)((longlong)param_2 + 0x1e),0xf);
  local_280 = (wchar_t *)((longlong)param_2 + 0x3e);
  wcsncpy(local_7e,local_280,0x1f);
  local_86 = local_86 & 0xffffffffffff;
  local_46 = local_46 & 0xffffffffffff;
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_1b0);
  FUN_140001710(&local_290,*puVar6,"dbo.up_add_ban");
  if (local_1b0 != (longlong *)0x0) {
    (**(code **)(*local_1b0 + 0x10))();
  }
  local_278 = local_e0;
  local_178 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_174 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_170 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_16c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_e0,&local_178);
  plVar7 = operator_new(0x18);
  local_1a0 = plVar10;
  local_250 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_1a0 = plVar7;
  }
  if (local_1a0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_290,&local_268,&local_1a0,0xca);
  local_278 = plVar7;
  if (local_290 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_290,&local_1c8);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_1c8 != (longlong *)0x0) {
    (**(code **)(*local_1c8 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_268 = local_f8;
  FUN_1400623f0(local_f8,(wchar_t *)((longlong)param_2 + 0x1e));
  plVar7 = operator_new(0x18);
  local_1c0 = plVar10;
  local_278 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("ban_name");
    *plVar7 = lVar8;
    local_1c0 = plVar7;
  }
  if (local_1c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_290,&local_260,&local_1c0,0xca);
  local_268 = plVar7;
  if (local_290 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_290,&local_1b8);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_1b8 != (longlong *)0x0) {
    (**(code **)(*local_1b8 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_260 = local_158;
  FUN_1400623f0(local_158,local_280);
  plVar7 = operator_new(0x18);
  local_1a8 = plVar10;
  local_268 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("ban_memo");
    *plVar7 = lVar8;
    local_1a8 = plVar7;
  }
  if (local_1a8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_290,local_180,&local_1a8,0xca);
  local_260 = plVar7;
  if (local_290 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_290,&local_250);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_250 != (longlong *)0x0) {
      (**(code **)(*local_250 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_290,&local_278);
    This = local_248;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_248 != pIVar1) {
      local_248 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_278 != (longlong *)0x0) {
      (**(code **)(*local_278 + 0x10))();
    }
    pIVar1 = local_248;
    if (local_248 != (IUnknown *)0x0) {
      local_294 = 0;
      UVar2 = (*local_248->lpVtbl[6].Release)(local_248);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_294 == -1) {
        local_bc = 0xa7;
        plVar7 = plVar10;
      }
      else {
        uVar9 = FUN_140002290(&local_248,local_110,"character_id",local_298);
        FUN_1400625d0(uVar9,&local_198);
        local_b6 = local_198;
        local_ae = local_190;
        Ordinal_9(local_110);
        uVar9 = FUN_140002290(&local_248,local_140,"Class",local_298);
        FUN_140182560(uVar9);
        uVar5 = FUN_140062550(uVar9);
        local_a6._4_4_ = uVar5;
        Ordinal_9(local_140);
        uVar9 = FUN_140002290(&local_248,local_128,"Level",local_298);
        FUN_140182560(uVar9);
        uVar5 = FUN_140062550(uVar9);
        local_a6 = CONCAT44(local_a6._4_4_,uVar5);
        Ordinal_9(local_128);
        plVar7 = (longlong *)0x1;
        if (local_298[0] == '\0') {
          local_bc = 0xa8;
          plVar7 = plVar10;
        }
      }
      _local_c8 = CONCAT62(_uStack_c6,0x8a);
      memcpy(param_1 + 0x26,&local_c8,0x8a);
      iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),param_1 + 0x26);
      if (iVar3 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_248;
      if (local_248 != (IUnknown *)0x0) {
        local_288 = (undefined8 *)((ulonglong)local_288 & 0xffffffff00000000);
        UVar2 = (*local_248->lpVtbl[0x12].AddRef)(local_248);
        if ((int)UVar2 < 0) {
          _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_248;
        if ((int)local_288 != 0) {
          if (local_248 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar2 = (*local_248->lpVtbl[10].Release)(local_248);
          if ((int)UVar2 < 0) {
            _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_248 != (IUnknown *)0x0) {
          (*local_248->lpVtbl->Release)(local_248);
          local_248 = (IUnknown *)0x0;
        }
      }
      local_1e0 = 0;
      local_1d8 = &DAT_140281f00;
      local_1f0 = &DAT_140281f00;
      local_1e8 = 0;
      local_1f8 = 0;
      Ordinal_9(local_210);
      Ordinal_9(local_228);
      if (local_240 != (longlong *)0x0) {
        (**(code **)(*local_240 + 0x10))();
      }
      if (local_248 != (IUnknown *)0x0) {
        (*local_248->lpVtbl->Release)(local_248);
      }
      if (local_290 != (longlong *)0x0) {
        (**(code **)(*local_290 + 0x10))();
      }
      return plVar7;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400a7c80(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_48;
  longlong local_40 [4];
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400a7d18;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400a7d18:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_del_ban");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = &local_78;
  local_88 = *(undefined4 *)(param_2 + 0xe);
  uStack_84 = *(undefined4 *)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_78,&local_88);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_98[0] = local_40;
  local_78._0_4_ = *(undefined4 *)(param_2 + 0x1e);
  local_78._4_4_ = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_78);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("ban_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400a8030(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_b8;
  longlong *local_b0;
  longlong *local_a8 [2];
  longlong *local_98;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  longlong local_88 [4];
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar9 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400a80c6;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400a80c6:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_ban_memo");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_b8 = (longlong *)&local_68;
  local_98 = *(longlong **)(param_2 + 0xe);
  uStack_90 = *(undefined4 *)(param_2 + 0x16);
  uStack_8c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_68,&local_98);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_b0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,local_a8,&local_res18,0xca,1,0x26,uVar5);
  local_b0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_a8[0] = local_88;
  local_68 = *(undefined4 *)(param_2 + 0x1e);
  uStack_64 = *(undefined4 *)(param_2 + 0x22);
  uStack_60 = *(undefined4 *)(param_2 + 0x26);
  uStack_5c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_88,&local_68);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_b0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("ban_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a8[0] = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_98 = local_88;
    uVar5 = FUN_1400623f0(local_88,param_2 + 0x2e);
    plVar8 = operator_new(0x18);
    local_a8[0] = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar7 = FUN_140201490("ban_memo");
      *plVar8 = lVar7;
      plVar9 = plVar8;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_b0,&local_res18,0xca,1,0x20,uVar5);
    local_98 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_b8 != (longlong *)0x0) {
        (**(code **)(*local_b8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400a84f0(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400a8583;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400a8583:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_create_booth");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400a8770(undefined8 *param_1,longlong param_2)

{
  int iVar1;
  IUnknown *pIVar2;
  undefined *puVar3;
  ULONG UVar4;
  int iVar5;
  int iVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  longlong *plVar12;
  longlong *local_res10;
  longlong *local_res18;
  longlong local_res20;
  longlong *local_98;
  short local_90 [4];
  int local_88;
  longlong *local_78;
  longlong *local_70;
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  local_res20 = param_2;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res10 = (longlong *)((ulonglong)local_res10 & 0xffffffff00000000);
    UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res10 != 0) goto LAB_1400a8810;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400a8810:
  local_res18 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res18);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_res10);
  FUN_140001710(&local_res18,*puVar7,"dbo.up_save_item_booth");
  if (local_res10 != (longlong *)0x0) {
    (**(code **)(*local_res10 + 0x10))();
  }
  local_98 = (longlong *)local_90;
  local_68 = *(undefined4 *)(param_2 + 0xe);
  uStack_64 = *(undefined4 *)(param_2 + 0x12);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar8 = FUN_140062280(local_90,&local_68);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_70 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res10 = plVar11;
  if (plVar11 != (longlong *)0x0) {
    plVar11 = (longlong *)FUN_140001880(&local_res18,&local_78,&local_res10,0xca,1,0x26,uVar8);
    local_70 = plVar11;
    if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res18,&local_98);
    pIVar2 = (IUnknown *)*puVar7;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    plVar9 = plVar12;
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    while( true ) {
      iVar5 = (int)plVar9;
      if (0xb < iVar5) {
        FUN_1400016d0(&local_res18,&local_res10);
        if (local_res10 != (longlong *)0x0) {
          (**(code **)(*local_res10 + 0x10))();
        }
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        return 1;
      }
      local_78 = (longlong *)local_90;
      iVar1 = *(int *)(param_2 + 0x1e + (longlong)iVar5 * 4);
      Ordinal_8(local_90);
      if ((local_90[0] != 3) && (local_90[0] != 10)) {
        if (local_90[0] == 0xb) {
          local_88 = CONCAT22(local_88._2_2_,-(ushort)(iVar1 != 0));
          iVar1 = local_88;
        }
        else {
          iVar6 = Ordinal_9(local_90);
          if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(iVar6);
          }
          local_90[0] = 3;
        }
      }
      local_88 = iVar1;
      puVar3 = (&PTR_s_gold_01_1403263b0)[iVar5];
      plVar9 = operator_new(0x18);
      plVar11 = plVar12;
      local_70 = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar10 = FUN_140201490(puVar3);
        *plVar9 = lVar10;
        plVar11 = plVar9;
      }
      local_res10 = plVar11;
      if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar11 = (longlong *)FUN_140001880(&local_res18,&local_68,&local_res10,3,1,4,local_90);
      local_78 = plVar11;
      if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_res18,&local_98);
      pIVar2 = (IUnknown *)*puVar7;
      if (pIVar2 == (IUnknown *)0x0) break;
      UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      plVar9 = (longlong *)(ulonglong)(iVar5 + 1);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400a8b80(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400a8c18;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400a8c18:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_booth_useable_count");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  sVar1 = *(short *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,(int)sVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("useable_count");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1400a8f30(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *This;
  ULONG UVar1;
  int iVar2;
  undefined1 auStack_58 [32];
  int local_38;
  undefined4 local_30;
  undefined4 uStack_2c;
  undefined4 local_28;
  undefined2 local_24;
  undefined8 local_22;
  undefined8 local_1a;
  undefined2 local_12;
  ulonglong local_10;
  
  local_10 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  This = *(IUnknown **)*param_1;
  if (This != (IUnknown *)0x0) {
    local_38 = 0;
    UVar1 = (*This->lpVtbl[0xb].AddRef)(This);
    if ((int)UVar1 < 0) {
      _com_issue_errorex(UVar1,This,(_GUID *)&DAT_140281f08);
    }
    if (local_38 != 0) goto LAB_1400a8fba;
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400a8fba:
  local_28 = *(undefined4 *)(param_2 + 1);
  _local_30 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23a10000);
  local_24 = 0x8b;
  _local_30 = CONCAT62(stack0xffffffffffffffd2,0x20);
  local_22 = *(undefined8 *)((longlong)param_2 + 0xe);
  local_1a = *(undefined8 *)((longlong)param_2 + 0x16);
  local_12 = *(undefined2 *)((longlong)param_2 + 0x1e);
  iVar2 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_30);
  if (iVar2 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400a9070(undefined8 *param_1,undefined8 *param_2)

{
  undefined2 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  IUnknown *This;
  ULONG UVar4;
  int iVar5;
  HRESULT HVar6;
  undefined8 *puVar7;
  wchar_t *pwVar8;
  longlong lVar9;
  undefined4 *puVar10;
  longlong *plVar11;
  undefined8 uVar12;
  undefined8 uVar13;
  wchar_t *pwVar14;
  wchar_t *pwVar15;
  undefined1 auStackY_988 [32];
  char local_948 [8];
  longlong *local_940;
  short local_938;
  undefined8 *local_930;
  int local_928;
  IUnknown *local_918;
  longlong *local_910;
  undefined4 local_908;
  undefined1 local_8f8 [24];
  undefined1 local_8e0 [24];
  undefined4 local_8c8;
  undefined1 *local_8c0;
  undefined4 local_8b8;
  undefined8 local_8b0;
  undefined1 *local_8a8;
  wchar_t *local_898;
  wchar_t *local_890;
  wchar_t *local_888;
  wchar_t *local_880;
  wchar_t *local_878;
  wchar_t *local_870;
  wchar_t local_868 [4];
  wchar_t *local_860;
  LPUNKNOWN local_858;
  wchar_t *local_850;
  wchar_t local_848 [4];
  wchar_t *local_840;
  undefined8 *local_838;
  wchar_t *local_830;
  longlong *local_828;
  undefined4 local_820;
  undefined4 local_81c;
  undefined4 local_818;
  undefined4 local_814;
  wchar_t local_810 [4];
  undefined2 local_808;
  wchar_t local_7f8 [4];
  undefined2 local_7f0;
  wchar_t *local_7e0;
  longlong *local_7d8;
  longlong *local_7d0;
  wchar_t *local_7c8;
  longlong *local_7c0;
  longlong *local_7b8;
  longlong *local_7b0;
  wchar_t *local_7a8;
  wchar_t *local_7a0;
  longlong *local_798;
  wchar_t *local_790;
  longlong *local_788;
  wchar_t *local_780;
  wchar_t *local_778;
  undefined8 local_770;
  undefined1 local_768;
  undefined8 local_760;
  undefined1 local_758;
  undefined8 local_750;
  undefined1 local_748;
  undefined8 local_740;
  undefined1 local_738;
  undefined8 local_730;
  undefined1 local_728;
  undefined8 local_720;
  undefined1 local_718;
  undefined8 local_710;
  undefined1 local_708;
  undefined8 local_700;
  undefined1 local_6f8;
  undefined8 local_6f0;
  undefined1 local_6e8;
  undefined8 local_6e0;
  undefined1 local_6d8;
  undefined8 local_6d0;
  undefined1 local_6c8;
  undefined8 local_6c0;
  undefined1 local_6b8;
  longlong local_6b0 [3];
  short local_698 [12];
  undefined4 local_680;
  undefined4 uStack_67c;
  undefined4 uStack_678;
  undefined4 uStack_674;
  undefined4 local_668;
  undefined4 uStack_664;
  undefined4 uStack_660;
  undefined4 uStack_65c;
  undefined8 local_658;
  undefined4 local_648;
  undefined4 uStack_644;
  undefined4 uStack_640;
  undefined4 uStack_63c;
  undefined1 local_638 [8];
  undefined4 local_630;
  undefined4 uStack_62c;
  undefined4 uStack_628;
  undefined4 uStack_624;
  undefined1 local_620 [24];
  undefined1 local_608 [24];
  wchar_t local_5f0 [12];
  undefined1 local_5d8 [24];
  wchar_t local_5c0 [12];
  undefined1 local_5a8 [24];
  undefined1 local_590 [24];
  undefined1 local_578 [24];
  undefined1 local_560 [24];
  undefined1 local_548 [24];
  undefined1 local_530 [24];
  undefined1 local_518 [24];
  undefined1 local_500 [24];
  undefined1 local_4e8 [24];
  undefined1 local_4d0 [24];
  undefined1 local_4b8 [24];
  undefined1 local_4a0 [24];
  undefined1 local_488 [24];
  undefined1 local_470 [24];
  undefined1 local_458 [24];
  undefined1 local_440 [24];
  undefined1 local_428 [24];
  undefined1 local_410 [24];
  undefined1 local_3f8 [24];
  wchar_t local_3e0 [12];
  undefined1 local_3c8 [24];
  wchar_t local_3b0 [12];
  undefined1 local_398 [24];
  undefined1 local_380 [24];
  undefined1 local_368 [24];
  undefined1 local_350 [24];
  undefined1 local_338 [24];
  undefined1 local_320 [24];
  undefined1 local_308 [24];
  undefined1 local_2f0 [24];
  undefined1 local_2d8 [24];
  undefined1 local_2c0 [24];
  undefined1 local_2a8 [24];
  undefined1 local_290 [24];
  undefined1 local_278 [24];
  undefined1 local_260 [24];
  undefined1 local_248 [24];
  undefined1 local_230 [24];
  undefined1 local_218 [24];
  undefined1 local_200 [24];
  undefined1 local_1e8 [24];
  undefined1 local_1d0 [24];
  undefined1 local_1b8 [32];
  undefined4 local_198;
  undefined4 uStack_194;
  undefined4 local_190;
  undefined2 local_18c;
  short local_18a;
  undefined4 local_188;
  undefined4 uStack_184;
  undefined4 uStack_180;
  undefined4 uStack_17c;
  undefined4 local_178;
  undefined4 uStack_174;
  undefined4 uStack_170;
  undefined4 uStack_16c;
  undefined2 local_168;
  wchar_t local_166 [15];
  undefined2 local_148;
  undefined2 local_146;
  undefined2 local_144;
  undefined2 local_142;
  undefined8 local_140;
  undefined4 local_138;
  undefined4 local_134;
  undefined4 local_130;
  undefined2 local_12c;
  undefined4 local_12a;
  undefined2 local_126;
  undefined4 local_124;
  undefined4 local_120;
  undefined4 local_11c;
  undefined4 local_118;
  undefined4 local_114;
  undefined4 local_110;
  undefined2 local_10c;
  undefined2 local_10a;
  undefined2 local_108;
  undefined2 local_106;
  undefined4 local_104;
  undefined2 local_100;
  undefined4 local_fe;
  undefined2 local_fa;
  undefined1 local_f8;
  undefined1 local_f7;
  undefined8 local_f5;
  undefined4 local_ed;
  undefined1 local_e9;
  undefined1 local_e8;
  undefined1 local_e7;
  undefined2 local_e2;
  undefined2 local_e0;
  undefined2 local_de;
  undefined2 local_dc;
  undefined2 local_da;
  undefined2 local_d8;
  undefined2 local_d6;
  undefined2 local_d4;
  undefined4 local_d2;
  undefined4 local_ce;
  undefined2 local_ca;
  undefined8 local_be;
  undefined8 local_66;
  undefined8 local_5e;
  undefined1 local_48 [16];
  ulonglong local_38;
  
  local_658 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_988;
  pIVar3 = *(IUnknown **)*param_1;
  pwVar15 = (wchar_t *)0x0;
  local_930 = param_1;
  local_838 = param_2;
  if (pIVar3 == (IUnknown *)0x0) {
LAB_1400a9107:
    iVar5 = FUN_1400a1e90(param_1);
    if (iVar5 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (wchar_t *)0x0;
    }
  }
  else {
    local_928 = 0;
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if (local_928 == 0) goto LAB_1400a9107;
  }
  local_940 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_940);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_918 = (IUnknown *)0x0;
  local_910 = (longlong *)0x0;
  Ordinal_8(local_8f8);
  Ordinal_8(local_8e0);
  pIVar3 = local_918;
  if ((local_918 != (IUnknown *)0x0) && (local_918 = (IUnknown *)0x0, pIVar3 != (IUnknown *)0x0)) {
    (*pIVar3->lpVtbl->Release)(pIVar3);
  }
  local_8a8 = &DAT_140281f00;
  local_8c0 = &DAT_140281f00;
  local_8b8 = 0;
  local_8b0 = 0;
  if (local_918 != (IUnknown *)0x0) {
    (*local_918->lpVtbl->Release)(local_918);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_858);
  if (-1 < HVar6) {
    HVar6 = OleRun(local_858);
    if (-1 < HVar6) {
      HVar6 = (*local_858->lpVtbl->QueryInterface)(local_858,(IID *)&DAT_140281f68,&local_918);
    }
    (*local_858->lpVtbl->Release)(local_858);
    if (-1 < HVar6) goto LAB_1400a923d;
  }
  local_918 = (IUnknown *)0x0;
LAB_1400a923d:
  local_8c8 = 2;
  local_908 = 1;
  local_948[0] = '\x01';
  local_18a = 0;
  FUN_14004f1d0(&local_188);
  local_190 = *(undefined4 *)(param_2 + 1);
  _local_198 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x232e0000);
  local_18c = 0x8b;
  _local_198 = CONCAT62(stack0xfffffffffffffe6a,0x142);
  local_66 = *(undefined8 *)((longlong)param_2 + 0x74);
  local_5e = *(undefined8 *)((longlong)param_2 + 0x7c);
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_798);
  FUN_140001710(&local_940,*puVar7,"dbo.up_create_character");
  if (local_798 != (longlong *)0x0) {
    (**(code **)(*local_798 + 0x10))();
  }
  local_890 = local_3e0;
  FUN_14006a8f0(local_3e0,(longlong)param_2 + 0x1e);
  pwVar8 = operator_new(0x18);
  local_7a0 = pwVar15;
  local_830 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("bcust_id");
    *(longlong *)pwVar8 = lVar9;
    local_7a0 = pwVar8;
  }
  if (local_7a0 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar8 = (wchar_t *)FUN_140001880(&local_940,&local_878,&local_7a0,0xca);
  local_890 = pwVar8;
  if (local_940 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_940,&local_7c0);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_7c0 != (longlong *)0x0) {
    (**(code **)(*local_7c0 + 0x10))();
  }
  if (*(longlong **)pwVar8 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar8 + 0x10))();
  }
  local_878 = local_5f0;
  local_648 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_644 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_640 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_63c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_5f0,&local_648);
  pwVar8 = operator_new(0x18);
  local_780 = pwVar15;
  local_890 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("auth_id");
    *(longlong *)pwVar8 = lVar9;
    local_780 = pwVar8;
  }
  if (local_780 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar8 = (wchar_t *)FUN_140001880(&local_940,&local_870,&local_780,0xca);
  local_878 = pwVar8;
  if (local_940 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_940,&local_7b0);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_7b0 != (longlong *)0x0) {
    (**(code **)(*local_7b0 + 0x10))();
  }
  if (*(longlong **)pwVar8 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar8 + 0x10))();
  }
  local_870 = local_3b0;
  puVar10 = (undefined4 *)FUN_140182810(local_48);
  local_668 = *puVar10;
  uStack_664 = puVar10[1];
  uStack_660 = puVar10[2];
  uStack_65c = puVar10[3];
  FUN_140061f30(local_3b0,&local_668);
  pwVar8 = operator_new(0x18);
  local_790 = pwVar15;
  local_878 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("char_id");
    *(longlong *)pwVar8 = lVar9;
    local_790 = pwVar8;
  }
  if (local_790 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar8 = (wchar_t *)FUN_140001880(&local_940,&local_860,&local_790,0xca);
  local_870 = pwVar8;
  if (local_940 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_940,&local_7d8);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_7d8 != (longlong *)0x0) {
    (**(code **)(*local_7d8 + 0x10))();
  }
  if (*(longlong **)pwVar8 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar8 + 0x10))();
  }
  local_860 = local_5c0;
  FUN_1400623f0(local_5c0,param_2 + 10);
  pwVar8 = operator_new(0x18);
  local_7c8 = pwVar15;
  local_870 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490(&DAT_140289c8c);
    *(longlong *)pwVar8 = lVar9;
    local_7c8 = pwVar8;
  }
  if (local_7c8 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar8 = (wchar_t *)FUN_140001880(&local_940,&local_850,&local_7c8,0xca);
  local_860 = pwVar8;
  if (local_940 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_940,&local_7b8);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_7b8 != (longlong *)0x0) {
    (**(code **)(*local_7b8 + 0x10))();
  }
  if (*(longlong **)pwVar8 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar8 + 0x10))();
  }
  local_850 = local_7f8;
  uVar1 = *(undefined2 *)(param_2 + 0xe);
  Ordinal_8(local_7f8);
  if (local_7f8[0] != L'\x12') {
    iVar5 = Ordinal_9(local_7f8);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_7f8[0] = L'\x12';
  }
  local_7f0 = uVar1;
  pwVar8 = operator_new(0x18);
  local_7a8 = pwVar15;
  local_860 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("class");
    *(longlong *)pwVar8 = lVar9;
    local_7a8 = pwVar8;
  }
  if (local_7a8 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar8 = (wchar_t *)FUN_140001880(&local_940,&local_840,&local_7a8,3);
  local_850 = pwVar8;
  if (local_940 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_940,&local_788);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_788 != (longlong *)0x0) {
    (**(code **)(*local_788 + 0x10))();
  }
  if (*(longlong **)pwVar8 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar8 + 0x10))();
  }
  local_840 = local_810;
  uVar1 = *(undefined2 *)((longlong)param_2 + 0x72);
  Ordinal_8(local_810);
  if (local_810[0] != L'\x12') {
    iVar5 = Ordinal_9(local_810);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_810[0] = L'\x12';
  }
  local_808 = uVar1;
  pwVar8 = operator_new(0x18);
  local_778 = pwVar15;
  local_850 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("server");
    *(longlong *)pwVar8 = lVar9;
    local_778 = pwVar8;
  }
  if (local_778 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar8 = (wchar_t *)FUN_140001880(&local_940,&local_828,&local_778,2);
  local_840 = pwVar8;
  if (local_940 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_940,&local_7d0);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_7d0 != (longlong *)0x0) {
      (**(code **)(*local_7d0 + 0x10))();
    }
    if (*(longlong **)pwVar8 != (longlong *)0x0) {
      (**(code **)(**(longlong **)pwVar8 + 0x10))();
    }
    local_828 = local_6b0;
    uVar2 = *(undefined4 *)((longlong)param_2 + 0x84);
    Ordinal_8(local_6b0);
    FUN_140062080(local_6b0,uVar2);
    pwVar8 = operator_new(0x18);
    local_7e0 = pwVar15;
    local_840 = pwVar8;
    if (pwVar8 != (wchar_t *)0x0) {
      pwVar8[4] = L'\0';
      pwVar8[5] = L'\0';
      pwVar8[6] = L'\0';
      pwVar8[7] = L'\0';
      pwVar8[8] = L'\x01';
      pwVar8[9] = L'\0';
      lVar9 = FUN_140201490("lobby_id");
      *(longlong *)pwVar8 = lVar9;
      local_7e0 = pwVar8;
    }
    if (local_7e0 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_940,local_638,&local_7e0,3);
    local_828 = plVar11;
    if (local_940 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_940,&local_830);
    pIVar3 = (IUnknown *)*puVar7;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_830 != (wchar_t *)0x0) {
        (**(code **)(*(longlong *)local_830 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      puVar7 = (undefined8 *)FUN_1400016d0(&local_940,&local_890);
      This = local_918;
      pIVar3 = (IUnknown *)*puVar7;
      if (local_918 != pIVar3) {
        local_918 = pIVar3;
        if (pIVar3 != (IUnknown *)0x0) {
          (*pIVar3->lpVtbl->AddRef)(pIVar3);
        }
        if (This != (IUnknown *)0x0) {
          (*This->lpVtbl->Release)(This);
        }
      }
      if (local_890 != (wchar_t *)0x0) {
        (**(code **)(*(longlong *)local_890 + 0x10))();
      }
      pIVar3 = local_918;
      if (local_918 != (IUnknown *)0x0) {
        local_938 = 0;
        UVar4 = (*local_918->lpVtbl[6].Release)(local_918);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f28);
        }
        pwVar8 = pwVar15;
        if (local_938 == -1) {
          local_18c = 0x8f;
        }
        else {
          uVar12 = FUN_140002290(&local_918,local_230,"FIRST_CHARACTER",local_948);
          FUN_140182560(uVar12);
          local_18a = FUN_140062550(uVar12);
          Ordinal_9(local_230);
          if (local_18a < 0) {
            if (local_18a == -1) {
              local_18c = 0x8e;
            }
          }
          else {
            uVar12 = FUN_140002290(&local_918,local_590,"character_id",local_948);
            FUN_1400625d0(uVar12,&local_630);
            local_188 = local_630;
            uStack_184 = uStack_62c;
            uStack_180 = uStack_628;
            uStack_17c = uStack_624;
            Ordinal_9(local_590);
            uVar12 = FUN_140002290(&local_918,local_380,"AuthID",local_948);
            FUN_1400625d0(uVar12,&local_680);
            local_178 = local_680;
            uStack_174 = uStack_67c;
            uStack_170 = uStack_678;
            uStack_16c = uStack_674;
            Ordinal_9(local_380);
            uVar12 = FUN_140002290(&local_918,local_560,"server",local_948);
            FUN_140182560(uVar12);
            local_168 = FUN_140062550(uVar12);
            Ordinal_9(local_560);
            uVar12 = FUN_140002290(&local_918,local_290,&DAT_14028a330,local_948);
            FUN_140062840(uVar12,&local_888);
            FUN_1401568c0();
            pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
            if (PTR_DAT_1403200a0 == (undefined *)0x0) {
              pwVar8 = pwVar15;
            }
            if (local_888 != (wchar_t *)PTR_DAT_1403200a0) {
              uVar12 = FUN_1401568c0();
              local_6d8 = 0;
              local_6e0 = uVar12;
              FUN_140156b50(uVar12);
              local_6d8 = 1;
              if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
                 (pwVar8 + -4 != (wchar_t *)0x0)) {
                uVar13 = FUN_1401568c0();
                local_718 = 0;
                local_720 = uVar13;
                FUN_140156b50(uVar13);
                local_718 = 1;
                pwVar14 = pwVar8 + -2;
                *(int *)pwVar14 = *(int *)pwVar14 + -1;
                if (*(int *)pwVar14 == 0) {
                  FUN_140156970(pwVar8 + -4);
                }
                FUN_140156be0(uVar13);
              }
              pwVar8 = local_888;
              if (((local_888 != (wchar_t *)PTR_DAT_1403200a0) && (local_888 != (wchar_t *)0x0)) &&
                 (local_888 != (wchar_t *)0x8)) {
                *(int *)(local_888 + -2) = *(int *)(local_888 + -2) + 1;
              }
              FUN_140156be0(uVar12);
            }
            pwVar14 = pwVar8;
            if (pwVar8 == (wchar_t *)0x0) {
              pwVar14 = (wchar_t *)PTR_DAT_1403200a0;
            }
            wcsncpy(local_166,pwVar14,0xf);
            if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar8 + -4 != (wchar_t *)0x0)) {
              uVar12 = FUN_1401568c0();
              local_6f8 = 0;
              local_700 = uVar12;
              FUN_140156b50(uVar12);
              local_6f8 = 1;
              pwVar14 = pwVar8 + -2;
              *(int *)pwVar14 = *(int *)pwVar14 + -1;
              if (*(int *)pwVar14 == 0) {
                FUN_140156970(pwVar8 + -4);
              }
              FUN_140156be0(uVar12);
            }
            if (((local_888 != (wchar_t *)0x0) && (local_888 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (local_888 + -4 != (wchar_t *)0x0)) {
              uVar12 = FUN_1401568c0();
              local_768 = 0;
              local_770 = uVar12;
              FUN_140156b50(uVar12);
              local_768 = 1;
              pwVar8 = local_888 + -2;
              *(int *)pwVar8 = *(int *)pwVar8 + -1;
              if (*(int *)pwVar8 == 0) {
                FUN_140156970(local_888 + -4);
              }
              FUN_140156be0(uVar12);
            }
            local_888 = (wchar_t *)PTR_DAT_1403200a0;
            Ordinal_9(local_290);
            local_148 = 0;
            uVar12 = FUN_140002290(&local_918,local_530,"Class",local_948);
            FUN_140182560(uVar12);
            local_146 = FUN_140062550(uVar12);
            Ordinal_9(local_530);
            uVar12 = FUN_140002290(&local_918,local_350,&DAT_14028b3e4,local_948);
            FUN_140182560(uVar12);
            local_144 = FUN_140062550(uVar12);
            Ordinal_9(local_350);
            uVar12 = FUN_140002290(&local_918,local_500,"Level",local_948);
            FUN_140182560(uVar12);
            local_142 = FUN_140062550(uVar12);
            Ordinal_9(local_500);
            uVar12 = FUN_140002290(&local_918,local_1d0,"Experience",local_948);
            FUN_140182560(uVar12);
            local_140 = FUN_140182640(uVar12);
            Ordinal_9(local_1d0);
            uVar12 = FUN_140002290(&local_918,local_4d0,"Stamina",local_948);
            FUN_140182560(uVar12);
            local_138 = FUN_140062550(uVar12);
            Ordinal_9(local_4d0);
            uVar12 = FUN_140002290(&local_918,local_320,&DAT_14028cd10,local_948);
            FUN_140182560(uVar12);
            local_134 = FUN_140062550(uVar12);
            Ordinal_9(local_320);
            uVar12 = FUN_140002290(&local_918,local_4a0,"Total_SP",local_948);
            FUN_140182560(uVar12);
            local_130 = FUN_140062550(uVar12);
            Ordinal_9(local_4a0);
            uVar12 = FUN_140002290(&local_918,local_260,"Fatigue",local_948);
            FUN_140182560(uVar12);
            local_12c = FUN_140062550(uVar12);
            Ordinal_9(local_260);
            uVar12 = FUN_140002290(&local_918,local_470,"LobbyID",local_948);
            FUN_140182560(uVar12);
            local_12a = FUN_140062550(uVar12);
            Ordinal_9(local_470);
            uVar12 = FUN_140002290(&local_918,local_2f0,"StartPoint",local_948);
            FUN_140182560(uVar12);
            local_126 = FUN_140062550(uVar12);
            Ordinal_9(local_2f0);
            uVar12 = FUN_140002290(&local_918,local_440,&DAT_14028cd44,local_948);
            FUN_140182560(uVar12);
            local_124 = FUN_140062550(uVar12);
            Ordinal_9(local_440);
            uVar12 = FUN_140002290(&local_918,local_200,"individual_roomID",local_948);
            FUN_140182560(uVar12);
            local_120 = FUN_140062550(uVar12);
            Ordinal_9(local_200);
            FUN_140002290(&local_918,local_698,"GuildID",local_948);
            if (local_698[0] == 1) {
              local_11c = 0;
              local_118 = 0;
              local_114 = 0;
              local_814 = 0;
            }
            else {
              FUN_1400625d0(local_698,&local_820);
              local_11c = local_820;
              local_118 = local_81c;
              local_114 = local_818;
            }
            local_110 = local_814;
            uVar12 = FUN_140002290(&local_918,local_620,"Hearts",local_948);
            FUN_140182560(uVar12);
            local_10c = FUN_140062550(uVar12);
            Ordinal_9(local_620);
            uVar12 = FUN_140002290(&local_918,local_410,"Fortune",local_948);
            FUN_140182560(uVar12);
            local_10a = FUN_140062550(uVar12);
            Ordinal_9(local_410);
            uVar12 = FUN_140002290(&local_918,local_3f8,"first_login",local_948);
            FUN_140182560(uVar12);
            local_108 = FUN_140062550(uVar12);
            Ordinal_9(local_3f8);
            uVar12 = FUN_140002290(&local_918,local_2c0,"tutorial",local_948);
            FUN_140182560(uVar12);
            local_106 = FUN_140062550(uVar12);
            Ordinal_9(local_2c0);
            uVar12 = FUN_140002290(&local_918,local_608,"give_up",local_948);
            FUN_140182560(uVar12);
            local_104 = FUN_140062550(uVar12);
            Ordinal_9(local_608);
            uVar12 = FUN_140002290(&local_918,local_5d8,"Block_Type",local_948);
            FUN_140182560(uVar12);
            local_100 = FUN_140062550(uVar12);
            Ordinal_9(local_5d8);
            uVar12 = FUN_140002290(&local_918,local_5a8,"storage_gold",local_948);
            FUN_140182560(uVar12);
            local_fe = FUN_140062550(uVar12);
            Ordinal_9(local_5a8);
            uVar12 = FUN_140002290(&local_918,local_578,"storage_count",local_948);
            FUN_140182560(uVar12);
            local_fa = FUN_140062550(uVar12);
            Ordinal_9(local_578);
            uVar12 = FUN_140002290(&local_918,local_548,"CreateTime",local_948);
            FUN_140182560(uVar12);
            local_f5 = FUN_140098d80(uVar12);
            Ordinal_9(local_548);
            uVar12 = FUN_140002290(&local_918,local_518,"LastLogin",local_948);
            FUN_140182560(uVar12);
            local_be = FUN_140098d80(uVar12);
            Ordinal_9(local_518);
            uVar12 = FUN_140002290(&local_918,local_4e8,"Expire_Time",local_948);
            FUN_140182560(uVar12);
            local_ed = FUN_140062550(uVar12);
            Ordinal_9(local_4e8);
            uVar12 = FUN_140002290(&local_918,local_4b8,"event_fatigue",local_948);
            FUN_140182560(uVar12);
            local_e9 = FUN_1400624d0(uVar12);
            Ordinal_9(local_4b8);
            uVar12 = FUN_140002290(&local_918,local_488,"event_hearts",local_948);
            FUN_140182560(uVar12);
            local_e8 = FUN_1400624d0(uVar12);
            Ordinal_9(local_488);
            uVar12 = FUN_140002290(&local_918,local_458,"event_fortune",local_948);
            FUN_140182560(uVar12);
            local_e7 = FUN_1400624d0(uVar12);
            Ordinal_9(local_458);
            uVar12 = FUN_140002290(&local_918,local_428,"dice_point",local_948);
            FUN_140182560(uVar12);
            local_e2 = FUN_140062550(uVar12);
            Ordinal_9(local_428);
            uVar12 = FUN_140002290(&local_918,local_3c8,"Addition_HP",local_948);
            FUN_140182560(uVar12);
            local_e0 = FUN_140062550(uVar12);
            Ordinal_9(local_3c8);
            uVar12 = FUN_140002290(&local_918,local_398,"Addition_MP",local_948);
            FUN_140182560(uVar12);
            local_de = FUN_140062550(uVar12);
            Ordinal_9(local_398);
            uVar12 = FUN_140002290(&local_918,local_368,"Addition_Physic_Attack",local_948);
            FUN_140182560(uVar12);
            local_dc = FUN_140062550(uVar12);
            Ordinal_9(local_368);
            uVar12 = FUN_140002290(&local_918,local_338,"Addition_Physic_Defense",local_948);
            FUN_140182560(uVar12);
            local_da = FUN_140062550(uVar12);
            Ordinal_9(local_338);
            uVar12 = FUN_140002290(&local_918,local_308,"Addition_Magic_Attack",local_948);
            FUN_140182560(uVar12);
            local_d8 = FUN_140062550(uVar12);
            Ordinal_9(local_308);
            uVar12 = FUN_140002290(&local_918,local_2d8,"Addition_Magic_Defense",local_948);
            FUN_140182560(uVar12);
            local_d6 = FUN_140062550(uVar12);
            Ordinal_9(local_2d8);
            uVar12 = FUN_140002290(&local_918,local_2a8,"Permission",local_948);
            FUN_140182560(uVar12);
            local_d4 = FUN_140062550(uVar12);
            Ordinal_9(local_2a8);
            uVar12 = FUN_140002290(&local_918,local_278,"FatigueStorage",local_948);
            FUN_140182560(uVar12);
            local_d2 = FUN_140062550(uVar12);
            Ordinal_9(local_278);
            uVar12 = FUN_140002290(&local_918,local_248,"DayAttachGold",local_948);
            FUN_140182560(uVar12);
            local_ce = FUN_140062550(uVar12);
            Ordinal_9(local_248);
            uVar12 = FUN_140002290(&local_918,local_218,"DayAttachItem",local_948);
            FUN_140182560(uVar12);
            local_ca = FUN_140062550(uVar12);
            Ordinal_9(local_218);
            uVar12 = FUN_140002290(&local_918,local_1e8,"IsTradeEnable",local_948);
            FUN_140062840(uVar12,&local_898);
            FUN_1401568c0();
            pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
            if (PTR_DAT_1403200a0 == (undefined *)0x0) {
              pwVar8 = pwVar15;
            }
            if (local_898 != (wchar_t *)PTR_DAT_1403200a0) {
              uVar12 = FUN_1401568c0();
              local_748 = 0;
              local_750 = uVar12;
              FUN_140156b50(uVar12);
              local_748 = 1;
              if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
                 (pwVar8 + -4 != (wchar_t *)0x0)) {
                uVar13 = FUN_1401568c0();
                local_6e8 = 0;
                local_6f0 = uVar13;
                FUN_140156b50(uVar13);
                local_6e8 = 1;
                pwVar14 = pwVar8 + -2;
                *(int *)pwVar14 = *(int *)pwVar14 + -1;
                if (*(int *)pwVar14 == 0) {
                  FUN_140156970(pwVar8 + -4);
                }
                FUN_140156be0(uVar13);
              }
              pwVar8 = local_898;
              if (((local_898 != (wchar_t *)PTR_DAT_1403200a0) && (local_898 != (wchar_t *)0x0)) &&
                 (local_898 != (wchar_t *)0x8)) {
                *(int *)(local_898 + -2) = *(int *)(local_898 + -2) + 1;
              }
              FUN_140156be0(uVar12);
            }
            pwVar14 = pwVar8;
            if (pwVar8 == (wchar_t *)0x0) {
              pwVar14 = (wchar_t *)PTR_DAT_1403200a0;
            }
            wcsncpy(local_868,pwVar14,1);
            if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar8 + -4 != (wchar_t *)0x0)) {
              uVar12 = FUN_1401568c0();
              local_728 = 0;
              local_730 = uVar12;
              FUN_140156b50(uVar12);
              local_728 = 1;
              pwVar14 = pwVar8 + -2;
              *(int *)pwVar14 = *(int *)pwVar14 + -1;
              if (*(int *)pwVar14 == 0) {
                FUN_140156970(pwVar8 + -4);
              }
              FUN_140156be0(uVar12);
            }
            if (((local_898 != (wchar_t *)0x0) && (local_898 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (local_898 + -4 != (wchar_t *)0x0)) {
              uVar12 = FUN_1401568c0();
              local_6b8 = 0;
              local_6c0 = uVar12;
              FUN_140156b50(uVar12);
              local_6b8 = 1;
              pwVar8 = local_898 + -2;
              *(int *)pwVar8 = *(int *)pwVar8 + -1;
              if (*(int *)pwVar8 == 0) {
                FUN_140156970(local_898 + -4);
              }
              FUN_140156be0(uVar12);
            }
            local_898 = (wchar_t *)PTR_DAT_1403200a0;
            Ordinal_9(local_1e8);
            local_f8 = local_868[0] == L'Y';
            uVar12 = FUN_140002290(&local_918,local_1b8,"IsMoveEnable",local_948);
            FUN_140062840(uVar12,&local_880);
            FUN_1401568c0();
            pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
            if (PTR_DAT_1403200a0 == (undefined *)0x0) {
              pwVar8 = pwVar15;
            }
            if (local_880 != (wchar_t *)PTR_DAT_1403200a0) {
              uVar12 = FUN_1401568c0();
              local_708 = 0;
              local_710 = uVar12;
              FUN_140156b50(uVar12);
              local_708 = 1;
              if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
                 (pwVar8 + -4 != (wchar_t *)0x0)) {
                uVar13 = FUN_1401568c0();
                local_6c8 = 0;
                local_6d0 = uVar13;
                FUN_140156b50(uVar13);
                local_6c8 = 1;
                pwVar14 = pwVar8 + -2;
                *(int *)pwVar14 = *(int *)pwVar14 + -1;
                if (*(int *)pwVar14 == 0) {
                  FUN_140156970(pwVar8 + -4);
                }
                FUN_140156be0(uVar13);
              }
              pwVar8 = local_880;
              if (((local_880 != (wchar_t *)PTR_DAT_1403200a0) && (local_880 != (wchar_t *)0x0)) &&
                 (local_880 != (wchar_t *)0x8)) {
                *(int *)(local_880 + -2) = *(int *)(local_880 + -2) + 1;
              }
              FUN_140156be0(uVar12);
            }
            pwVar14 = pwVar8;
            if (pwVar8 == (wchar_t *)0x0) {
              pwVar14 = (wchar_t *)PTR_DAT_1403200a0;
            }
            wcsncpy(local_848,pwVar14,1);
            if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar8 + -4 != (wchar_t *)0x0)) {
              uVar12 = FUN_1401568c0();
              local_758 = 0;
              local_760 = uVar12;
              FUN_140156b50(uVar12);
              local_758 = 1;
              pwVar14 = pwVar8 + -2;
              *(int *)pwVar14 = *(int *)pwVar14 + -1;
              if (*(int *)pwVar14 == 0) {
                FUN_140156970(pwVar8 + -4);
              }
              FUN_140156be0(uVar12);
            }
            if (((local_880 != (wchar_t *)0x0) && (local_880 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (local_880 + -4 != (wchar_t *)0x0)) {
              uVar12 = FUN_1401568c0();
              local_738 = 0;
              local_740 = uVar12;
              FUN_140156b50(uVar12);
              local_738 = 1;
              pwVar8 = local_880 + -2;
              *(int *)pwVar8 = *(int *)pwVar8 + -1;
              if (*(int *)pwVar8 == 0) {
                FUN_140156970(local_880 + -4);
              }
              FUN_140156be0(uVar12);
            }
            local_880 = (wchar_t *)PTR_DAT_1403200a0;
            Ordinal_9(local_1b8);
            local_f7 = local_848[0] == L'Y';
            Ordinal_9(local_698);
            pwVar8 = (wchar_t *)0x1;
            if (local_948[0] == '\0') {
              local_18c = 0x8c;
              pwVar8 = pwVar15;
            }
          }
        }
        iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_198);
        if (iVar5 == 0) {
          FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
        }
        pIVar3 = local_918;
        if (local_918 != (IUnknown *)0x0) {
          local_930 = (undefined8 *)((ulonglong)local_930 & 0xffffffff00000000);
          UVar4 = (*local_918->lpVtbl[0x12].AddRef)(local_918);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f28);
          }
          pIVar3 = local_918;
          if ((int)local_930 != 0) {
            if (local_918 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            UVar4 = (*local_918->lpVtbl[10].Release)(local_918);
            if ((int)UVar4 < 0) {
              _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f28);
            }
          }
          if (local_918 != (IUnknown *)0x0) {
            (*local_918->lpVtbl->Release)(local_918);
            local_918 = (IUnknown *)0x0;
          }
        }
        local_8b0 = 0;
        local_8a8 = &DAT_140281f00;
        local_8c0 = &DAT_140281f00;
        local_8b8 = 0;
        local_8c8 = 0;
        Ordinal_9(local_8e0);
        Ordinal_9(local_8f8);
        if (local_910 != (longlong *)0x0) {
          (**(code **)(*local_910 + 0x10))();
        }
        if (local_918 != (IUnknown *)0x0) {
          (*local_918->lpVtbl->Release)(local_918);
        }
        if (local_940 != (longlong *)0x0) {
          (**(code **)(*local_940 + 0x10))();
        }
        return pwVar8;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1400ab0a0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  undefined1 auStack_158 [32];
  undefined4 local_138;
  undefined8 local_130;
  undefined8 local_128;
  int local_118;
  longlong *local_110;
  longlong *local_108;
  longlong *local_100;
  undefined8 *local_f8;
  undefined8 *local_f0;
  longlong *local_e8;
  longlong *local_e0;
  longlong *local_d8;
  longlong *local_d0;
  longlong *local_c8;
  undefined1 local_c0 [8];
  undefined4 local_b8;
  undefined4 uStack_b4;
  undefined4 uStack_b0;
  undefined4 uStack_ac;
  undefined4 local_a8;
  undefined4 uStack_a4;
  undefined4 uStack_a0;
  undefined4 uStack_9c;
  undefined8 local_90;
  longlong local_80 [3];
  longlong local_68 [3];
  undefined4 local_50;
  undefined4 uStack_4c;
  undefined4 local_48;
  undefined2 local_44;
  undefined8 local_42;
  undefined8 local_3a;
  ulonglong local_30;
  
  local_90 = 0xfffffffffffffffe;
  local_30 = DAT_1403223c0 ^ (ulonglong)auStack_158;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  local_f8 = param_2;
  local_f0 = param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_118 = 0;
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_118 != 0) goto LAB_1400ab14e;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400ab14e:
  local_48 = *(undefined4 *)(param_2 + 1);
  _local_50 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23390000);
  local_44 = 0x99;
  local_42 = *(undefined8 *)((longlong)param_2 + 0x1e);
  local_3a = *(undefined8 *)((longlong)param_2 + 0x26);
  _local_50 = CONCAT62(stack0xffffffffffffffb2,0x1e);
  local_110 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_110);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_c8);
  FUN_140001710(&local_110,*puVar4,"dbo.up_delete_character");
  if (local_c8 != (longlong *)0x0) {
    (**(code **)(*local_c8 + 0x10))();
  }
  local_108 = local_80;
  local_b8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_b4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_b0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_ac = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar5 = FUN_140062280(local_80,&local_b8);
  plVar6 = operator_new(0x18);
  local_d8 = plVar8;
  local_e8 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    local_d8 = plVar6;
  }
  if (local_d8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_130 = 0x26;
  local_138 = 1;
  local_128 = uVar5;
  plVar6 = (longlong *)FUN_140001880(&local_110,&local_100,&local_d8,0xca);
  local_108 = plVar6;
  if (local_110 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_110,&local_d0);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_d0 != (longlong *)0x0) {
    (**(code **)(*local_d0 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_100 = local_68;
  local_a8 = *(undefined4 *)((longlong)param_2 + 0x1e);
  uStack_a4 = *(undefined4 *)((longlong)param_2 + 0x22);
  uStack_a0 = *(undefined4 *)((longlong)param_2 + 0x26);
  uStack_9c = *(undefined4 *)((longlong)param_2 + 0x2a);
  uVar5 = FUN_140062280(local_68,&local_a8);
  plVar6 = operator_new(0x18);
  local_108 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_e0 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_130 = 0x26;
  local_138 = 1;
  local_128 = uVar5;
  plVar8 = (longlong *)FUN_140001880(&local_110,local_c0,&local_e0,0xca);
  local_100 = plVar8;
  if (local_110 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_110,&local_e8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_e8 != (longlong *)0x0) {
      (**(code **)(*local_e8 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    FUN_1400016d0(&local_110,&local_108);
    if (local_108 != (longlong *)0x0) {
      (**(code **)(*local_108 + 0x10))();
    }
    iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_50);
    if (iVar3 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    if (local_110 != (longlong *)0x0) {
      (**(code **)(*local_110 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400ab500(undefined8 *param_1,undefined8 *param_2)

{
  undefined2 uVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  int iVar3;
  HRESULT HVar4;
  ULONG UVar5;
  undefined8 *puVar6;
  wchar_t *pwVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  wchar_t *pwVar12;
  wchar_t *pwVar13;
  undefined1 auStackY_998 [32];
  char local_958 [4];
  short local_954;
  longlong *local_950;
  undefined8 *local_948;
  IUnknown *local_938;
  longlong *local_930;
  undefined4 local_928;
  undefined1 local_918 [24];
  undefined1 local_900 [24];
  undefined4 local_8e8;
  undefined1 *local_8e0;
  undefined4 local_8d8;
  undefined8 local_8d0;
  undefined1 *local_8c8;
  undefined8 *local_8b8;
  int local_8b0;
  wchar_t *local_8a8;
  wchar_t *local_8a0;
  wchar_t *local_898;
  wchar_t *local_890;
  wchar_t *local_888;
  wchar_t *local_880;
  LPUNKNOWN local_878;
  wchar_t local_870 [2];
  wchar_t local_86c [2];
  wchar_t *local_868;
  longlong *local_860;
  longlong local_858;
  undefined2 local_850;
  wchar_t *local_840;
  longlong *local_838;
  wchar_t *local_830;
  longlong *local_828;
  undefined8 local_820;
  undefined8 local_818;
  undefined8 local_810;
  undefined1 local_808;
  undefined8 local_800;
  undefined1 local_7f8;
  undefined8 local_7f0;
  undefined1 local_7e8;
  undefined8 local_7e0;
  undefined1 local_7d8;
  undefined8 local_7d0;
  undefined1 local_7c8;
  undefined8 local_7c0;
  undefined8 local_7b8;
  undefined8 local_7b0;
  undefined1 local_7a8;
  undefined8 local_7a0;
  undefined1 local_798;
  undefined8 local_790;
  undefined8 local_788;
  undefined8 local_780;
  undefined1 local_778;
  undefined8 local_770;
  undefined1 local_768;
  undefined8 local_760;
  undefined1 local_758;
  undefined8 local_750;
  undefined1 local_748;
  undefined8 local_740;
  undefined1 local_738;
  undefined8 local_730;
  undefined1 local_728;
  undefined8 local_720;
  undefined1 local_718;
  undefined8 local_710;
  undefined1 local_708;
  undefined8 local_700;
  undefined1 local_6f8;
  undefined8 local_6f0;
  undefined1 local_6e8;
  undefined8 local_6e0;
  undefined1 local_6d8;
  undefined8 local_6d0;
  undefined1 local_6c8;
  undefined8 local_6c0;
  undefined1 local_6b8;
  short local_6b0 [12];
  undefined8 local_698;
  undefined1 local_690 [24];
  undefined4 local_678;
  undefined4 uStack_674;
  undefined4 uStack_670;
  undefined4 uStack_66c;
  undefined1 local_660 [24];
  undefined1 local_648 [24];
  undefined1 local_630 [24];
  undefined1 local_618 [24];
  undefined1 local_600 [24];
  undefined1 local_5e8 [24];
  undefined1 local_5d0 [24];
  undefined1 local_5b8 [24];
  undefined1 local_5a0 [24];
  undefined1 local_588 [24];
  undefined1 local_570 [24];
  undefined1 local_558 [24];
  undefined1 local_540 [24];
  undefined1 local_528 [24];
  undefined1 local_510 [24];
  undefined1 local_4f8 [24];
  undefined1 local_4e0 [24];
  undefined1 local_4c8 [24];
  undefined1 local_4b0 [24];
  undefined1 local_498 [24];
  undefined1 local_480 [24];
  undefined1 local_468 [24];
  undefined1 local_450 [24];
  undefined1 local_438 [24];
  undefined1 local_420 [24];
  undefined1 local_408 [24];
  undefined1 local_3f0 [24];
  undefined1 local_3d8 [24];
  undefined1 local_3c0 [24];
  undefined1 local_3a8 [24];
  undefined1 local_390 [24];
  undefined1 local_378 [24];
  undefined1 local_360 [24];
  undefined1 local_348 [24];
  undefined1 local_330 [24];
  undefined1 local_318 [24];
  undefined1 local_300 [24];
  undefined1 local_2e8 [24];
  undefined1 local_2d0 [24];
  undefined1 local_2b8 [24];
  undefined1 local_2a0 [24];
  undefined1 local_288 [24];
  undefined1 local_270 [24];
  undefined1 local_258 [24];
  undefined1 local_240 [24];
  undefined1 local_228 [24];
  undefined1 local_210 [24];
  undefined1 local_1f8 [24];
  undefined1 local_1e0 [24];
  undefined1 local_1c8 [24];
  undefined1 local_1b0 [24];
  wchar_t local_198 [12];
  undefined1 local_180 [24];
  undefined4 local_168;
  undefined4 uStack_164;
  undefined4 local_160;
  undefined2 local_15c;
  undefined8 local_15a;
  undefined8 local_152;
  undefined8 local_14a;
  undefined8 local_142;
  undefined2 local_13a;
  wchar_t local_138 [15];
  undefined2 local_11a;
  undefined2 local_118;
  undefined2 local_116;
  undefined2 local_114;
  undefined8 local_112;
  undefined4 local_10a;
  undefined4 local_106;
  undefined4 local_102;
  undefined2 local_fe;
  undefined4 local_fc;
  undefined2 local_f8;
  undefined4 local_f6;
  undefined4 local_f2;
  undefined8 local_ee;
  undefined8 local_e6;
  undefined2 local_de;
  undefined2 local_dc;
  undefined2 local_da;
  undefined2 local_d8;
  undefined4 local_d6;
  undefined2 local_d2;
  undefined4 local_d0;
  undefined2 local_cc;
  undefined1 local_ca;
  undefined1 local_c9;
  undefined8 local_c7;
  undefined4 local_bf;
  undefined1 local_bb;
  undefined1 local_ba;
  undefined1 local_b9;
  undefined1 local_b8;
  undefined1 local_b5;
  undefined2 local_b4;
  undefined2 local_b2;
  undefined2 local_b0;
  undefined2 local_ae;
  undefined2 local_ac;
  undefined2 local_aa;
  undefined2 local_a8;
  undefined2 local_a6;
  undefined4 local_a4;
  undefined4 local_a0;
  undefined2 local_9c;
  undefined4 local_9a;
  undefined2 local_96;
  undefined4 local_94;
  undefined8 local_90;
  undefined4 local_88;
  undefined4 local_84;
  wchar_t local_80 [20];
  wchar_t local_58 [16];
  ulonglong local_38;
  
  local_698 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_998;
  pwVar13 = (wchar_t *)0x0;
  local_950 = (longlong *)0x0;
  local_948 = param_1;
  local_8b8 = param_2;
  iVar3 = FUN_140001970(&local_950);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_938 = (IUnknown *)0x0;
  local_930 = (longlong *)0x0;
  Ordinal_8(local_918);
  Ordinal_8(local_900);
  pIVar2 = local_938;
  if ((local_938 != (IUnknown *)0x0) && (local_938 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_8c8 = &DAT_140281f00;
  local_8e0 = &DAT_140281f00;
  local_8d8 = 0;
  local_8d0 = 0;
  if (local_938 != (IUnknown *)0x0) {
    (*local_938->lpVtbl->Release)(local_938);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_878);
  if (HVar4 < 0) {
LAB_1400ab65f:
    local_938 = (IUnknown *)0x0;
  }
  else {
    HVar4 = OleRun(local_878);
    if (-1 < HVar4) {
      HVar4 = (*local_878->lpVtbl->QueryInterface)(local_878,(IID *)&DAT_140281f68,&local_938);
    }
    (*local_878->lpVtbl->Release)(local_878);
    if (HVar4 < 0) goto LAB_1400ab65f;
  }
  local_8e8 = 2;
  local_928 = 1;
  local_958[0] = '\x01';
  FUN_14004f1d0(&local_15a);
  local_160 = *(undefined4 *)(param_2 + 1);
  _local_168 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x233e0000);
  local_15c = 99;
  _local_168 = CONCAT62(stack0xfffffffffffffe9a,0x130);
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_8b0 = 0;
    UVar5 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_8b0 != 0) goto LAB_1400ab85a;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_938;
    if (local_938 != (IUnknown *)0x0) {
      local_8b8 = (undefined8 *)((ulonglong)local_8b8 & 0xffffffff00000000);
      UVar5 = (*local_938->lpVtbl[0x12].AddRef)(local_938);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_938;
      if ((int)local_8b8 != 0) {
        if (local_938 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar5 = (*local_938->lpVtbl[10].Release)(local_938);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_938 != (IUnknown *)0x0) {
        (*local_938->lpVtbl->Release)(local_938);
        local_938 = (IUnknown *)0x0;
      }
    }
    local_8d0 = 0;
    local_8c8 = &DAT_140281f00;
    local_8e0 = &DAT_140281f00;
    local_8d8 = 0;
    local_8e8 = 0;
    Ordinal_9(local_900);
    Ordinal_9(local_918);
    if (local_930 != (longlong *)0x0) {
      (**(code **)(*local_930 + 0x10))();
    }
    if (local_938 != (IUnknown *)0x0) {
      (*local_938->lpVtbl->Release)(local_938);
    }
    if (local_950 != (longlong *)0x0) {
      (**(code **)(*local_950 + 0x10))();
    }
    return (wchar_t *)0x0;
  }
LAB_1400ab85a:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_838);
  FUN_140001710(&local_950,*puVar6,"dbo.up_get_character");
  if (local_838 != (longlong *)0x0) {
    (**(code **)(*local_838 + 0x10))();
  }
  local_898 = local_198;
  local_678 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_674 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_670 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_66c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_198,&local_678);
  pwVar7 = operator_new(0x18);
  local_840 = pwVar13;
  local_868 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("character_id");
    *(longlong *)pwVar7 = lVar8;
    local_840 = pwVar7;
  }
  if (local_840 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar7 = (wchar_t *)FUN_140001880(&local_950,&local_860,&local_840,0xca);
  local_898 = pwVar7;
  if (local_950 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_950,&local_828);
  pIVar2 = (IUnknown *)*puVar6;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_828 != (longlong *)0x0) {
    (**(code **)(*local_828 + 0x10))();
  }
  if (*(longlong **)pwVar7 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar7 + 0x10))();
  }
  local_860 = &local_858;
  uVar1 = *(undefined2 *)((longlong)param_2 + 0x1e);
  Ordinal_8(&local_858);
  if ((short)local_858 != 0x12) {
    iVar3 = Ordinal_9(&local_858);
    if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar3);
    }
    local_858._0_2_ = 0x12;
  }
  local_850 = uVar1;
  pwVar7 = operator_new(0x18);
  local_830 = pwVar13;
  local_898 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("server");
    *(longlong *)pwVar7 = lVar8;
    local_830 = pwVar7;
  }
  if (local_830 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_950,local_690,&local_830,2);
  local_860 = plVar9;
  if (local_950 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_950,&local_868);
  pIVar2 = (IUnknown *)*puVar6;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar5 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_868 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_868 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_950,&local_898);
    This = local_938;
    pIVar2 = (IUnknown *)*puVar6;
    if (local_938 != pIVar2) {
      local_938 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_898 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_898 + 0x10))();
    }
    pIVar2 = local_938;
    if (local_938 != (IUnknown *)0x0) {
      local_954 = 0;
      UVar5 = (*local_938->lpVtbl[6].Release)(local_938);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_954 == -1) {
        local_15c = 0x66;
        pwVar7 = pwVar13;
      }
      else {
        uVar10 = FUN_140002290(&local_938,local_660,"character_id",local_958);
        FUN_1400625d0(uVar10,&local_820);
        local_15a = local_820;
        local_152 = local_818;
        Ordinal_9(local_660);
        uVar10 = FUN_140002290(&local_938,local_630,"AuthID",local_958);
        FUN_1400625d0(uVar10,&local_7c0);
        local_14a = local_7c0;
        local_142 = local_7b8;
        Ordinal_9(local_630);
        uVar10 = FUN_140002290(&local_938,local_3c0,"server",local_958);
        FUN_140182560(uVar10);
        local_13a = FUN_140062550(uVar10);
        Ordinal_9(local_3c0);
        uVar10 = FUN_140002290(&local_938,local_600,&DAT_14028a330,local_958);
        FUN_140062840(uVar10,&local_880);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_880 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_7d8 = 0;
          local_7e0 = uVar10;
          FUN_140156b50(uVar10);
          local_7d8 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_6c8 = 0;
            local_6d0 = uVar11;
            FUN_140156b50(uVar11);
            local_6c8 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_880;
          if (((local_880 != (wchar_t *)PTR_DAT_1403200a0) && (local_880 != (wchar_t *)0x0)) &&
             (local_880 != (wchar_t *)0x8)) {
            *(int *)(local_880 + -2) = *(int *)(local_880 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_138,pwVar12,0xf);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_7a8 = 0;
          local_7b0 = uVar10;
          FUN_140156b50(uVar10);
          local_7a8 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_880 != (wchar_t *)0x0) && (local_880 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_880 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_728 = 0;
          local_730 = uVar10;
          FUN_140156b50(uVar10);
          local_728 = 1;
          pwVar7 = local_880 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_880 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_880 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_600);
        local_11a = 0;
        uVar10 = FUN_140002290(&local_938,local_1b0,"Class",local_958);
        FUN_140182560(uVar10);
        local_118 = FUN_140062550(uVar10);
        Ordinal_9(local_1b0);
        uVar10 = FUN_140002290(&local_938,local_5d0,&DAT_14028b3e4,local_958);
        FUN_140182560(uVar10);
        local_116 = FUN_140062550(uVar10);
        Ordinal_9(local_5d0);
        uVar10 = FUN_140002290(&local_938,local_390,"Level",local_958);
        FUN_140182560(uVar10);
        local_114 = FUN_140062550(uVar10);
        Ordinal_9(local_390);
        uVar10 = FUN_140002290(&local_938,local_5a0,"Experience",local_958);
        FUN_140182560(uVar10);
        local_112 = FUN_140182640(uVar10);
        Ordinal_9(local_5a0);
        uVar10 = FUN_140002290(&local_938,local_270,"Stamina",local_958);
        FUN_140182560(uVar10);
        local_10a = FUN_140062550(uVar10);
        Ordinal_9(local_270);
        uVar10 = FUN_140002290(&local_938,local_570,&DAT_14028cd10,local_958);
        FUN_140182560(uVar10);
        local_106 = FUN_140062550(uVar10);
        Ordinal_9(local_570);
        uVar10 = FUN_140002290(&local_938,local_360,"Total_SP",local_958);
        FUN_140182560(uVar10);
        local_102 = FUN_140062550(uVar10);
        Ordinal_9(local_360);
        uVar10 = FUN_140002290(&local_938,local_540,"Fatigue",local_958);
        FUN_140182560(uVar10);
        local_fe = FUN_140062550(uVar10);
        Ordinal_9(local_540);
        uVar10 = FUN_140002290(&local_938,local_1e0,"LobbyID",local_958);
        FUN_140182560(uVar10);
        local_fc = FUN_140062550(uVar10);
        Ordinal_9(local_1e0);
        uVar10 = FUN_140002290(&local_938,local_510,"StartPoint",local_958);
        FUN_140182560(uVar10);
        local_f8 = FUN_140062550(uVar10);
        Ordinal_9(local_510);
        uVar10 = FUN_140002290(&local_938,local_330,&DAT_14028cd44,local_958);
        FUN_140182560(uVar10);
        local_f6 = FUN_140062550(uVar10);
        Ordinal_9(local_330);
        uVar10 = FUN_140002290(&local_938,local_4e0,"individual_roomID",local_958);
        FUN_140182560(uVar10);
        local_f2 = FUN_140062550(uVar10);
        Ordinal_9(local_4e0);
        FUN_140002290(&local_938,local_6b0,"GuildID",local_958);
        if (local_6b0[0] == 1) {
          local_ee = 0;
          local_788 = 0;
        }
        else {
          FUN_1400625d0(local_6b0,&local_790);
          local_ee = local_790;
        }
        local_e6 = local_788;
        uVar10 = FUN_140002290(&local_938,local_240,"Hearts",local_958);
        FUN_140182560(uVar10);
        local_de = FUN_140062550(uVar10);
        Ordinal_9(local_240);
        uVar10 = FUN_140002290(&local_938,local_4b0,"Fortune",local_958);
        FUN_140182560(uVar10);
        local_dc = FUN_140062550(uVar10);
        Ordinal_9(local_4b0);
        uVar10 = FUN_140002290(&local_938,local_300,"first_login",local_958);
        FUN_140182560(uVar10);
        local_da = FUN_140062550(uVar10);
        Ordinal_9(local_300);
        uVar10 = FUN_140002290(&local_938,local_480,"tutorial",local_958);
        FUN_140182560(uVar10);
        local_d8 = FUN_140062550(uVar10);
        Ordinal_9(local_480);
        uVar10 = FUN_140002290(&local_938,local_180,"give_up",local_958);
        FUN_140182560(uVar10);
        local_d6 = FUN_140062550(uVar10);
        Ordinal_9(local_180);
        uVar10 = FUN_140002290(&local_938,local_450,"Block_Type",local_958);
        FUN_140182560(uVar10);
        local_d2 = FUN_140062550(uVar10);
        Ordinal_9(local_450);
        uVar10 = FUN_140002290(&local_938,local_2d0,"storage_gold",local_958);
        FUN_140182560(uVar10);
        local_d0 = FUN_140062550(uVar10);
        Ordinal_9(local_2d0);
        uVar10 = FUN_140002290(&local_938,local_420,"storage_count",local_958);
        FUN_140182560(uVar10);
        local_cc = FUN_140062550(uVar10);
        Ordinal_9(local_420);
        uVar10 = FUN_140002290(&local_938,local_210,"CreateTime",local_958);
        FUN_140182560(uVar10);
        local_c7 = FUN_140098d80(uVar10);
        Ordinal_9(local_210);
        uVar10 = FUN_140002290(&local_938,local_3f0,"LastLogin",local_958);
        FUN_140182560(uVar10);
        local_90 = FUN_140098d80(uVar10);
        Ordinal_9(local_3f0);
        uVar10 = FUN_140002290(&local_938,local_2a0,"IsTradeEnable",local_958);
        FUN_140062840(uVar10,&local_888);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_888 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_6e8 = 0;
          local_6f0 = uVar10;
          FUN_140156b50(uVar10);
          local_6e8 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_768 = 0;
            local_770 = uVar11;
            FUN_140156b50(uVar11);
            local_768 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_888;
          if (((local_888 != (wchar_t *)PTR_DAT_1403200a0) && (local_888 != (wchar_t *)0x0)) &&
             (local_888 != (wchar_t *)0x8)) {
            *(int *)(local_888 + -2) = *(int *)(local_888 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_86c,pwVar12,1);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_708 = 0;
          local_710 = uVar10;
          FUN_140156b50(uVar10);
          local_708 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_888 != (wchar_t *)0x0) && (local_888 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_888 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_748 = 0;
          local_750 = uVar10;
          FUN_140156b50(uVar10);
          local_748 = 1;
          pwVar7 = local_888 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_888 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_888 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_2a0);
        local_ca = local_86c[0] == L'Y';
        uVar10 = FUN_140002290(&local_938,local_648,"IsMoveEnable",local_958);
        FUN_140062840(uVar10,&local_8a0);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_8a0 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_7e8 = 0;
          local_7f0 = uVar10;
          FUN_140156b50(uVar10);
          local_7e8 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_808 = 0;
            local_810 = uVar11;
            FUN_140156b50(uVar11);
            local_808 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_8a0;
          if (((local_8a0 != (wchar_t *)PTR_DAT_1403200a0) && (local_8a0 != (wchar_t *)0x0)) &&
             (local_8a0 != (wchar_t *)0x8)) {
            *(int *)(local_8a0 + -2) = *(int *)(local_8a0 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_870,pwVar12,1);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_7f8 = 0;
          local_800 = uVar10;
          FUN_140156b50(uVar10);
          local_7f8 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_8a0 != (wchar_t *)0x0) && (local_8a0 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_8a0 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_798 = 0;
          local_7a0 = uVar10;
          FUN_140156b50(uVar10);
          local_798 = 1;
          pwVar7 = local_8a0 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_8a0 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_8a0 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_648);
        local_c9 = local_870[0] == L'Y';
        uVar10 = FUN_140002290(&local_938,local_618,"Expire_Time",local_958);
        FUN_140182560(uVar10);
        local_bf = FUN_140062550(uVar10);
        Ordinal_9(local_618);
        uVar10 = FUN_140002290(&local_938,local_5e8,"event_fatigue",local_958);
        FUN_140182560(uVar10);
        local_bb = FUN_1400624d0(uVar10);
        Ordinal_9(local_5e8);
        uVar10 = FUN_140002290(&local_938,local_5b8,"event_hearts",local_958);
        FUN_140182560(uVar10);
        local_ba = FUN_1400624d0(uVar10);
        Ordinal_9(local_5b8);
        uVar10 = FUN_140002290(&local_938,local_588,"event_fortune",local_958);
        FUN_140182560(uVar10);
        local_b9 = FUN_1400624d0(uVar10);
        Ordinal_9(local_588);
        uVar10 = FUN_140002290(&local_938,local_558,"event_mailattach",local_958);
        FUN_140182560(uVar10);
        local_b8 = FUN_1400624d0(uVar10);
        Ordinal_9(local_558);
        uVar10 = FUN_140002290(&local_938,local_528,"event_daypartymission",local_958);
        FUN_140182560(uVar10);
        local_b5 = FUN_1400624d0(uVar10);
        Ordinal_9(local_528);
        uVar10 = FUN_140002290(&local_938,local_4f8,"dice_point",local_958);
        FUN_140182560(uVar10);
        local_b4 = FUN_140062550(uVar10);
        Ordinal_9(local_4f8);
        uVar10 = FUN_140002290(&local_938,local_4c8,"Addition_HP",local_958);
        FUN_140182560(uVar10);
        local_b2 = FUN_140062550(uVar10);
        Ordinal_9(local_4c8);
        uVar10 = FUN_140002290(&local_938,local_498,"Addition_MP",local_958);
        FUN_140182560(uVar10);
        local_b0 = FUN_140062550(uVar10);
        Ordinal_9(local_498);
        uVar10 = FUN_140002290(&local_938,local_468,"Addition_Physic_Attack",local_958);
        FUN_140182560(uVar10);
        local_ae = FUN_140062550(uVar10);
        Ordinal_9(local_468);
        uVar10 = FUN_140002290(&local_938,local_438,"Addition_Physic_Defense",local_958);
        FUN_140182560(uVar10);
        local_ac = FUN_140062550(uVar10);
        Ordinal_9(local_438);
        uVar10 = FUN_140002290(&local_938,local_408,"Addition_Magic_Attack",local_958);
        FUN_140182560(uVar10);
        local_aa = FUN_140062550(uVar10);
        Ordinal_9(local_408);
        uVar10 = FUN_140002290(&local_938,local_3d8,"Addition_Magic_Defense",local_958);
        FUN_140182560(uVar10);
        local_a8 = FUN_140062550(uVar10);
        Ordinal_9(local_3d8);
        uVar10 = FUN_140002290(&local_938,local_3a8,"Permission",local_958);
        FUN_140182560(uVar10);
        local_a6 = FUN_140062550(uVar10);
        Ordinal_9(local_3a8);
        uVar10 = FUN_140002290(&local_938,local_378,"FatigueStorage",local_958);
        FUN_140182560(uVar10);
        local_a4 = FUN_140062550(uVar10);
        Ordinal_9(local_378);
        uVar10 = FUN_140002290(&local_938,local_348,"DayAttachGold",local_958);
        FUN_140182560(uVar10);
        local_a0 = FUN_140062550(uVar10);
        Ordinal_9(local_348);
        uVar10 = FUN_140002290(&local_938,local_318,"DayAttachItem",local_958);
        FUN_140182560(uVar10);
        local_9c = FUN_140062550(uVar10);
        Ordinal_9(local_318);
        uVar10 = FUN_140002290(&local_938,local_2e8,"GuildPoint",local_958);
        FUN_140182560(uVar10);
        local_9a = FUN_140062550(uVar10);
        Ordinal_9(local_2e8);
        uVar10 = FUN_140002290(&local_938,local_2b8,"tutorial_step",local_958);
        FUN_140182560(uVar10);
        local_96 = FUN_140062550(uVar10);
        Ordinal_9(local_2b8);
        uVar10 = FUN_140002290(&local_938,local_288,"daypartymission",local_958);
        FUN_140182560(uVar10);
        local_88 = FUN_140062550(uVar10);
        Ordinal_9(local_288);
        uVar10 = FUN_140002290(&local_938,local_258,"time_sp",local_958);
        FUN_140182560(uVar10);
        local_84 = FUN_140062550(uVar10);
        Ordinal_9(local_258);
        uVar10 = FUN_140002290(&local_938,local_228,"guild_grade",local_958);
        FUN_140182560(uVar10);
        local_94 = FUN_140062550(uVar10);
        Ordinal_9(local_228);
        uVar10 = FUN_140002290(&local_938,local_1f8,"guild_alias_name",local_958);
        FUN_140062840(uVar10,&local_8a8);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_8a8 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_778 = 0;
          local_780 = uVar10;
          FUN_140156b50(uVar10);
          local_778 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_758 = 0;
            local_760 = uVar11;
            FUN_140156b50(uVar11);
            local_758 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_8a8;
          if (((local_8a8 != (wchar_t *)PTR_DAT_1403200a0) && (local_8a8 != (wchar_t *)0x0)) &&
             (local_8a8 != (wchar_t *)0x8)) {
            *(int *)(local_8a8 + -2) = *(int *)(local_8a8 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy_s(local_58,0x10,pwVar12,0xf);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_738 = 0;
          local_740 = uVar10;
          FUN_140156b50(uVar10);
          local_738 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_8a8 != (wchar_t *)0x0) && (local_8a8 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_8a8 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_718 = 0;
          local_720 = uVar10;
          FUN_140156b50(uVar10);
          local_718 = 1;
          pwVar7 = local_8a8 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_8a8 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_8a8 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_1f8);
        uVar10 = FUN_140002290(&local_938,local_1c8,"guild_name",local_958);
        FUN_140062840(uVar10,&local_890);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_890 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_6f8 = 0;
          local_700 = uVar10;
          FUN_140156b50(uVar10);
          local_6f8 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_6d8 = 0;
            local_6e0 = uVar11;
            FUN_140156b50(uVar11);
            local_6d8 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_890;
          if (((local_890 != (wchar_t *)PTR_DAT_1403200a0) && (local_890 != (wchar_t *)0x0)) &&
             (local_890 != (wchar_t *)0x8)) {
            *(int *)(local_890 + -2) = *(int *)(local_890 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy_s(local_80,0x14,pwVar12,0x13);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_6b8 = 0;
          local_6c0 = uVar10;
          FUN_140156b50(uVar10);
          local_6b8 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_890 != (wchar_t *)0x0) && (local_890 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_890 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_7c8 = 0;
          local_7d0 = uVar10;
          FUN_140156b50(uVar10);
          local_7c8 = 1;
          pwVar7 = local_890 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_890 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_890 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_1c8);
        Ordinal_9(local_6b0);
        pwVar7 = (wchar_t *)0x1;
        if (local_958[0] == '\0') {
          local_15c = 100;
          pwVar7 = pwVar13;
        }
      }
      iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_168);
      if (iVar3 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar2 = local_938;
      if (local_938 != (IUnknown *)0x0) {
        local_948 = (undefined8 *)((ulonglong)local_948 & 0xffffffff00000000);
        UVar5 = (*local_938->lpVtbl[0x12].AddRef)(local_938);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
        }
        pIVar2 = local_938;
        if ((int)local_948 != 0) {
          if (local_938 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar5 = (*local_938->lpVtbl[10].Release)(local_938);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_938 != (IUnknown *)0x0) {
          (*local_938->lpVtbl->Release)(local_938);
          local_938 = (IUnknown *)0x0;
        }
      }
      local_8d0 = 0;
      local_8c8 = &DAT_140281f00;
      local_8e0 = &DAT_140281f00;
      local_8d8 = 0;
      local_8e8 = 0;
      Ordinal_9(local_900);
      Ordinal_9(local_918);
      if (local_930 != (longlong *)0x0) {
        (**(code **)(*local_930 + 0x10))();
      }
      if (local_938 != (IUnknown *)0x0) {
        (*local_938->lpVtbl->Release)(local_938);
      }
      if (local_950 != (longlong *)0x0) {
        (**(code **)(*local_950 + 0x10))();
      }
      return pwVar7;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400ad530(undefined8 *param_1,undefined8 *param_2)

{
  undefined2 uVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  int iVar3;
  HRESULT HVar4;
  ULONG UVar5;
  undefined8 *puVar6;
  wchar_t *pwVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  wchar_t *pwVar12;
  wchar_t *pwVar13;
  undefined1 auStackY_958 [32];
  char local_918 [4];
  short local_914;
  longlong *local_910;
  undefined8 *local_908;
  IUnknown *local_8f8;
  longlong *local_8f0;
  undefined4 local_8e8;
  undefined1 local_8d8 [24];
  undefined1 local_8c0 [24];
  undefined4 local_8a8;
  undefined1 *local_8a0;
  undefined4 local_898;
  undefined8 local_890;
  undefined1 *local_888;
  undefined8 *local_878;
  int local_870;
  wchar_t *local_868;
  wchar_t *local_860;
  wchar_t *local_858;
  wchar_t *local_850;
  wchar_t *local_848;
  wchar_t *local_840;
  LPUNKNOWN local_838;
  wchar_t local_830 [2];
  wchar_t local_82c [2];
  wchar_t *local_828;
  longlong *local_820;
  longlong local_818;
  undefined2 local_810;
  wchar_t *local_800;
  longlong *local_7f8;
  wchar_t *local_7f0;
  longlong *local_7e8;
  undefined8 local_7e0;
  undefined8 local_7d8;
  undefined8 local_7d0;
  undefined1 local_7c8;
  undefined8 local_7c0;
  undefined1 local_7b8;
  undefined8 local_7b0;
  undefined1 local_7a8;
  undefined8 local_7a0;
  undefined8 local_798;
  undefined8 local_790;
  undefined1 local_788;
  undefined8 local_780;
  undefined1 local_778;
  undefined8 local_770;
  undefined1 local_768;
  undefined8 local_760;
  undefined1 local_758;
  undefined8 local_750;
  undefined1 local_748;
  undefined8 local_740;
  undefined1 local_738;
  undefined8 local_730;
  undefined1 local_728;
  undefined8 local_720;
  undefined1 local_718;
  undefined8 local_710;
  undefined1 local_708;
  undefined8 local_700;
  undefined1 local_6f8;
  undefined8 local_6f0;
  undefined1 local_6e8;
  undefined8 local_6e0;
  undefined8 local_6d8;
  undefined8 local_6d0;
  undefined1 local_6c8;
  undefined8 local_6c0;
  undefined1 local_6b8;
  undefined8 local_6b0;
  undefined1 local_6a8;
  undefined8 local_6a0;
  undefined1 local_698;
  undefined8 local_690;
  undefined1 local_688;
  undefined8 local_680;
  undefined1 local_678;
  short local_670 [16];
  undefined8 local_650;
  undefined1 local_648 [16];
  undefined1 local_638 [24];
  undefined1 local_620 [24];
  undefined1 local_608 [24];
  undefined1 local_5f0 [24];
  undefined1 local_5d8 [24];
  undefined1 local_5c0 [24];
  undefined1 local_5a8 [24];
  undefined1 local_590 [24];
  undefined1 local_578 [24];
  undefined1 local_560 [24];
  undefined1 local_548 [24];
  undefined1 local_530 [24];
  undefined1 local_518 [24];
  undefined1 local_500 [24];
  undefined1 local_4e8 [24];
  undefined1 local_4d0 [24];
  undefined1 local_4b8 [24];
  undefined1 local_4a0 [24];
  undefined1 local_488 [24];
  undefined1 local_470 [24];
  undefined1 local_458 [24];
  undefined1 local_440 [24];
  undefined1 local_428 [24];
  undefined1 local_410 [24];
  undefined1 local_3f8 [24];
  undefined1 local_3e0 [24];
  undefined1 local_3c8 [24];
  undefined1 local_3b0 [24];
  undefined1 local_398 [24];
  undefined1 local_380 [24];
  undefined1 local_368 [24];
  undefined1 local_350 [24];
  undefined1 local_338 [24];
  undefined1 local_320 [24];
  undefined1 local_308 [24];
  undefined1 local_2f0 [24];
  undefined1 local_2d8 [24];
  undefined1 local_2c0 [24];
  undefined1 local_2a8 [24];
  undefined1 local_290 [24];
  undefined1 local_278 [24];
  undefined1 local_260 [24];
  undefined1 local_248 [24];
  undefined1 local_230 [24];
  undefined1 local_218 [24];
  undefined1 local_200 [24];
  undefined1 local_1e8 [24];
  undefined1 local_1d0 [24];
  undefined1 local_1b8 [24];
  wchar_t local_1a0 [12];
  undefined1 local_188 [32];
  undefined4 local_168;
  undefined4 uStack_164;
  undefined4 local_160;
  undefined2 local_15c;
  undefined8 local_15a;
  undefined8 local_152;
  undefined8 local_14a;
  undefined8 local_142;
  undefined2 local_13a;
  wchar_t local_138 [15];
  undefined2 local_11a;
  undefined2 local_118;
  undefined2 local_116;
  undefined2 local_114;
  undefined8 local_112;
  undefined4 local_10a;
  undefined4 local_106;
  undefined4 local_102;
  undefined2 local_fe;
  undefined4 local_fc;
  undefined2 local_f8;
  undefined4 local_f6;
  undefined4 local_f2;
  undefined8 local_ee;
  undefined8 local_e6;
  undefined2 local_de;
  undefined2 local_dc;
  undefined2 local_da;
  undefined2 local_d8;
  undefined4 local_d6;
  undefined2 local_d2;
  undefined4 local_d0;
  undefined2 local_cc;
  undefined1 local_ca;
  undefined1 local_c9;
  undefined4 local_bf;
  undefined1 local_bb;
  undefined1 local_ba;
  undefined1 local_b9;
  undefined1 local_b8;
  undefined1 local_b5;
  undefined2 local_b4;
  undefined2 local_b2;
  undefined2 local_b0;
  undefined2 local_ae;
  undefined2 local_ac;
  undefined2 local_aa;
  undefined2 local_a8;
  undefined2 local_a6;
  undefined4 local_a4;
  undefined4 local_a0;
  undefined2 local_9c;
  undefined4 local_9a;
  undefined2 local_96;
  undefined4 local_94;
  undefined4 local_88;
  undefined4 local_84;
  wchar_t local_80 [20];
  wchar_t local_58 [16];
  ulonglong local_38;
  
  local_650 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_958;
  pwVar13 = (wchar_t *)0x0;
  local_910 = (longlong *)0x0;
  local_908 = param_1;
  local_878 = param_2;
  iVar3 = FUN_140001970(&local_910);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_8f8 = (IUnknown *)0x0;
  local_8f0 = (longlong *)0x0;
  Ordinal_8(local_8d8);
  Ordinal_8(local_8c0);
  pIVar2 = local_8f8;
  if ((local_8f8 != (IUnknown *)0x0) && (local_8f8 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_888 = &DAT_140281f00;
  local_8a0 = &DAT_140281f00;
  local_898 = 0;
  local_890 = 0;
  if (local_8f8 != (IUnknown *)0x0) {
    (*local_8f8->lpVtbl->Release)(local_8f8);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_838);
  if (HVar4 < 0) {
LAB_1400ad68f:
    local_8f8 = (IUnknown *)0x0;
  }
  else {
    HVar4 = OleRun(local_838);
    if (-1 < HVar4) {
      HVar4 = (*local_838->lpVtbl->QueryInterface)(local_838,(IID *)&DAT_140281f68,&local_8f8);
    }
    (*local_838->lpVtbl->Release)(local_838);
    if (HVar4 < 0) goto LAB_1400ad68f;
  }
  local_8a8 = 2;
  local_8e8 = 1;
  local_918[0] = '\x01';
  FUN_14004f1d0(&local_15a);
  local_160 = *(undefined4 *)(param_2 + 1);
  _local_168 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x233f0000);
  local_15c = 99;
  _local_168 = CONCAT62(stack0xfffffffffffffe9a,0x130);
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_870 = 0;
    UVar5 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_870 != 0) goto LAB_1400ad88a;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_8f8;
    if (local_8f8 != (IUnknown *)0x0) {
      local_878 = (undefined8 *)((ulonglong)local_878 & 0xffffffff00000000);
      UVar5 = (*local_8f8->lpVtbl[0x12].AddRef)(local_8f8);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_8f8;
      if ((int)local_878 != 0) {
        if (local_8f8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar5 = (*local_8f8->lpVtbl[10].Release)(local_8f8);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_8f8 != (IUnknown *)0x0) {
        (*local_8f8->lpVtbl->Release)(local_8f8);
        local_8f8 = (IUnknown *)0x0;
      }
    }
    local_890 = 0;
    local_888 = &DAT_140281f00;
    local_8a0 = &DAT_140281f00;
    local_898 = 0;
    local_8a8 = 0;
    Ordinal_9(local_8c0);
    Ordinal_9(local_8d8);
    if (local_8f0 != (longlong *)0x0) {
      (**(code **)(*local_8f0 + 0x10))();
    }
    if (local_8f8 != (IUnknown *)0x0) {
      (*local_8f8->lpVtbl->Release)(local_8f8);
    }
    if (local_910 != (longlong *)0x0) {
      (**(code **)(*local_910 + 0x10))();
    }
    return (wchar_t *)0x0;
  }
LAB_1400ad88a:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_7f8);
  FUN_140001710(&local_910,*puVar6,"dbo.up_get_character_by_name");
  if (local_7f8 != (longlong *)0x0) {
    (**(code **)(*local_7f8 + 0x10))();
  }
  local_858 = local_1a0;
  FUN_1400623f0(local_1a0,(longlong)param_2 + 0xe);
  pwVar7 = operator_new(0x18);
  local_800 = pwVar13;
  local_828 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490(&DAT_140289c8c);
    *(longlong *)pwVar7 = lVar8;
    local_800 = pwVar7;
  }
  if (local_800 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar7 = (wchar_t *)FUN_140001880(&local_910,&local_820,&local_800,0xca);
  local_858 = pwVar7;
  if (local_910 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_910,&local_7e8);
  pIVar2 = (IUnknown *)*puVar6;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_7e8 != (longlong *)0x0) {
    (**(code **)(*local_7e8 + 0x10))();
  }
  if (*(longlong **)pwVar7 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar7 + 0x10))();
  }
  local_820 = &local_818;
  uVar1 = *(undefined2 *)((longlong)param_2 + 0x2e);
  Ordinal_8(&local_818);
  if ((short)local_818 != 0x12) {
    iVar3 = Ordinal_9(&local_818);
    if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar3);
    }
    local_818._0_2_ = 0x12;
  }
  local_810 = uVar1;
  pwVar7 = operator_new(0x18);
  local_7f0 = pwVar13;
  local_858 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("server");
    *(longlong *)pwVar7 = lVar8;
    local_7f0 = pwVar7;
  }
  if (local_7f0 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_910,local_648,&local_7f0,2);
  local_820 = plVar9;
  if (local_910 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_910,&local_828);
  pIVar2 = (IUnknown *)*puVar6;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar5 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_828 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_828 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_910,&local_858);
    This = local_8f8;
    pIVar2 = (IUnknown *)*puVar6;
    if (local_8f8 != pIVar2) {
      local_8f8 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_858 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_858 + 0x10))();
    }
    pIVar2 = local_8f8;
    if (local_8f8 != (IUnknown *)0x0) {
      local_914 = 0;
      UVar5 = (*local_8f8->lpVtbl[6].Release)(local_8f8);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_914 == -1) {
        local_15c = 0x66;
        pwVar7 = pwVar13;
      }
      else {
        uVar10 = FUN_140002290(&local_8f8,local_638,"character_id",local_918);
        FUN_1400625d0(uVar10,&local_7e0);
        local_15a = local_7e0;
        local_152 = local_7d8;
        Ordinal_9(local_638);
        uVar10 = FUN_140002290(&local_8f8,local_608,"AuthID",local_918);
        FUN_1400625d0(uVar10,&local_7a0);
        local_14a = local_7a0;
        local_142 = local_798;
        Ordinal_9(local_608);
        uVar10 = FUN_140002290(&local_8f8,local_1b8,"server",local_918);
        FUN_140182560(uVar10);
        local_13a = FUN_140062550(uVar10);
        Ordinal_9(local_1b8);
        uVar10 = FUN_140002290(&local_8f8,local_5d8,&DAT_14028a330,local_918);
        FUN_140062840(uVar10,&local_840);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_840 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_6f8 = 0;
          local_700 = uVar10;
          FUN_140156b50(uVar10);
          local_6f8 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_778 = 0;
            local_780 = uVar11;
            FUN_140156b50(uVar11);
            local_778 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_840;
          if (((local_840 != (wchar_t *)PTR_DAT_1403200a0) && (local_840 != (wchar_t *)0x0)) &&
             (local_840 != (wchar_t *)0x8)) {
            *(int *)(local_840 + -2) = *(int *)(local_840 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_138,pwVar12,0xf);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_6b8 = 0;
          local_6c0 = uVar10;
          FUN_140156b50(uVar10);
          local_6b8 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_840 != (wchar_t *)0x0) && (local_840 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_840 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_758 = 0;
          local_760 = uVar10;
          FUN_140156b50(uVar10);
          local_758 = 1;
          pwVar7 = local_840 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_840 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_840 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_5d8);
        local_11a = 0;
        uVar10 = FUN_140002290(&local_8f8,local_398,"Class",local_918);
        FUN_140182560(uVar10);
        local_118 = FUN_140062550(uVar10);
        Ordinal_9(local_398);
        uVar10 = FUN_140002290(&local_8f8,local_5a8,&DAT_14028b3e4,local_918);
        FUN_140182560(uVar10);
        local_116 = FUN_140062550(uVar10);
        Ordinal_9(local_5a8);
        uVar10 = FUN_140002290(&local_8f8,local_278,"Level",local_918);
        FUN_140182560(uVar10);
        local_114 = FUN_140062550(uVar10);
        Ordinal_9(local_278);
        uVar10 = FUN_140002290(&local_8f8,local_578,"Experience",local_918);
        FUN_140182560(uVar10);
        local_112 = FUN_140182640(uVar10);
        Ordinal_9(local_578);
        uVar10 = FUN_140002290(&local_8f8,local_368,"Stamina",local_918);
        FUN_140182560(uVar10);
        local_10a = FUN_140062550(uVar10);
        Ordinal_9(local_368);
        uVar10 = FUN_140002290(&local_8f8,local_548,&DAT_14028cd10,local_918);
        FUN_140182560(uVar10);
        local_106 = FUN_140062550(uVar10);
        Ordinal_9(local_548);
        uVar10 = FUN_140002290(&local_8f8,local_1e8,"Total_SP",local_918);
        FUN_140182560(uVar10);
        local_102 = FUN_140062550(uVar10);
        Ordinal_9(local_1e8);
        uVar10 = FUN_140002290(&local_8f8,local_518,"Fatigue",local_918);
        FUN_140182560(uVar10);
        local_fe = FUN_140062550(uVar10);
        Ordinal_9(local_518);
        uVar10 = FUN_140002290(&local_8f8,local_338,"LobbyID",local_918);
        FUN_140182560(uVar10);
        local_fc = FUN_140062550(uVar10);
        Ordinal_9(local_338);
        uVar10 = FUN_140002290(&local_8f8,local_4e8,"StartPoint",local_918);
        FUN_140182560(uVar10);
        local_f8 = FUN_140062550(uVar10);
        Ordinal_9(local_4e8);
        uVar10 = FUN_140002290(&local_8f8,local_248,&DAT_14028cd44,local_918);
        FUN_140182560(uVar10);
        local_f6 = FUN_140062550(uVar10);
        Ordinal_9(local_248);
        uVar10 = FUN_140002290(&local_8f8,local_4b8,"individual_roomID",local_918);
        FUN_140182560(uVar10);
        local_f2 = FUN_140062550(uVar10);
        Ordinal_9(local_4b8);
        FUN_140002290(&local_8f8,local_670,"GuildID",local_918);
        if (local_670[0] == 1) {
          local_ee = 0;
          local_6d8 = 0;
        }
        else {
          FUN_1400625d0(local_670,&local_6e0);
          local_ee = local_6e0;
        }
        local_e6 = local_6d8;
        uVar10 = FUN_140002290(&local_8f8,local_308,"Hearts",local_918);
        FUN_140182560(uVar10);
        local_de = FUN_140062550(uVar10);
        Ordinal_9(local_308);
        uVar10 = FUN_140002290(&local_8f8,local_488,"Fortune",local_918);
        FUN_140182560(uVar10);
        local_dc = FUN_140062550(uVar10);
        Ordinal_9(local_488);
        uVar10 = FUN_140002290(&local_8f8,local_188,"first_login",local_918);
        FUN_140182560(uVar10);
        local_da = FUN_140062550(uVar10);
        Ordinal_9(local_188);
        uVar10 = FUN_140002290(&local_8f8,local_458,"tutorial",local_918);
        FUN_140182560(uVar10);
        local_d8 = FUN_140062550(uVar10);
        Ordinal_9(local_458);
        uVar10 = FUN_140002290(&local_8f8,local_2d8,"give_up",local_918);
        FUN_140182560(uVar10);
        local_d6 = FUN_140062550(uVar10);
        Ordinal_9(local_2d8);
        uVar10 = FUN_140002290(&local_8f8,local_428,"Block_Type",local_918);
        FUN_140182560(uVar10);
        local_d2 = FUN_140062550(uVar10);
        Ordinal_9(local_428);
        uVar10 = FUN_140002290(&local_8f8,local_218,"storage_gold",local_918);
        FUN_140182560(uVar10);
        local_d0 = FUN_140062550(uVar10);
        Ordinal_9(local_218);
        uVar10 = FUN_140002290(&local_8f8,local_3f8,"storage_count",local_918);
        FUN_140182560(uVar10);
        local_cc = FUN_140062550(uVar10);
        Ordinal_9(local_3f8);
        uVar10 = FUN_140002290(&local_8f8,local_2a8,"IsTradeEnable",local_918);
        FUN_140062840(uVar10,&local_848);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_848 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_738 = 0;
          local_740 = uVar10;
          FUN_140156b50(uVar10);
          local_738 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_688 = 0;
            local_690 = uVar11;
            FUN_140156b50(uVar11);
            local_688 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_848;
          if (((local_848 != (wchar_t *)PTR_DAT_1403200a0) && (local_848 != (wchar_t *)0x0)) &&
             (local_848 != (wchar_t *)0x8)) {
            *(int *)(local_848 + -2) = *(int *)(local_848 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_82c,pwVar12,1);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_718 = 0;
          local_720 = uVar10;
          FUN_140156b50(uVar10);
          local_718 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_848 != (wchar_t *)0x0) && (local_848 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_848 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_7b8 = 0;
          local_7c0 = uVar10;
          FUN_140156b50(uVar10);
          local_7b8 = 1;
          pwVar7 = local_848 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_848 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_848 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_2a8);
        local_ca = local_82c[0] == L'Y';
        uVar10 = FUN_140002290(&local_8f8,local_3c8,"IsMoveEnable",local_918);
        FUN_140062840(uVar10,&local_860);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_860 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_7a8 = 0;
          local_7b0 = uVar10;
          FUN_140156b50(uVar10);
          local_7a8 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_7c8 = 0;
            local_7d0 = uVar11;
            FUN_140156b50(uVar11);
            local_7c8 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_860;
          if (((local_860 != (wchar_t *)PTR_DAT_1403200a0) && (local_860 != (wchar_t *)0x0)) &&
             (local_860 != (wchar_t *)0x8)) {
            *(int *)(local_860 + -2) = *(int *)(local_860 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_830,pwVar12,1);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_788 = 0;
          local_790 = uVar10;
          FUN_140156b50(uVar10);
          local_788 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_860 != (wchar_t *)0x0) && (local_860 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_860 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_768 = 0;
          local_770 = uVar10;
          FUN_140156b50(uVar10);
          local_768 = 1;
          pwVar7 = local_860 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_860 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_860 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_3c8);
        local_c9 = local_830[0] == L'Y';
        uVar10 = FUN_140002290(&local_8f8,local_620,"Expire_Time",local_918);
        FUN_140182560(uVar10);
        local_bf = FUN_140062550(uVar10);
        Ordinal_9(local_620);
        uVar10 = FUN_140002290(&local_8f8,local_5f0,"event_fatigue",local_918);
        FUN_140182560(uVar10);
        local_bb = FUN_1400624d0(uVar10);
        Ordinal_9(local_5f0);
        uVar10 = FUN_140002290(&local_8f8,local_5c0,"event_hearts",local_918);
        FUN_140182560(uVar10);
        local_ba = FUN_1400624d0(uVar10);
        Ordinal_9(local_5c0);
        uVar10 = FUN_140002290(&local_8f8,local_590,"event_fortune",local_918);
        FUN_140182560(uVar10);
        local_b9 = FUN_1400624d0(uVar10);
        Ordinal_9(local_590);
        uVar10 = FUN_140002290(&local_8f8,local_560,"event_mailattach",local_918);
        FUN_140182560(uVar10);
        local_b8 = FUN_1400624d0(uVar10);
        Ordinal_9(local_560);
        uVar10 = FUN_140002290(&local_8f8,local_530,"event_daypartymission",local_918);
        FUN_140182560(uVar10);
        local_b5 = FUN_1400624d0(uVar10);
        Ordinal_9(local_530);
        uVar10 = FUN_140002290(&local_8f8,local_500,"dice_point",local_918);
        FUN_140182560(uVar10);
        local_b4 = FUN_140062550(uVar10);
        Ordinal_9(local_500);
        uVar10 = FUN_140002290(&local_8f8,local_4d0,"Addition_HP",local_918);
        FUN_140182560(uVar10);
        local_b2 = FUN_140062550(uVar10);
        Ordinal_9(local_4d0);
        uVar10 = FUN_140002290(&local_8f8,local_4a0,"Addition_MP",local_918);
        FUN_140182560(uVar10);
        local_b0 = FUN_140062550(uVar10);
        Ordinal_9(local_4a0);
        uVar10 = FUN_140002290(&local_8f8,local_470,"Addition_Physic_Attack",local_918);
        FUN_140182560(uVar10);
        local_ae = FUN_140062550(uVar10);
        Ordinal_9(local_470);
        uVar10 = FUN_140002290(&local_8f8,local_440,"Addition_Physic_Defense",local_918);
        FUN_140182560(uVar10);
        local_ac = FUN_140062550(uVar10);
        Ordinal_9(local_440);
        uVar10 = FUN_140002290(&local_8f8,local_410,"Addition_Magic_Attack",local_918);
        FUN_140182560(uVar10);
        local_aa = FUN_140062550(uVar10);
        Ordinal_9(local_410);
        uVar10 = FUN_140002290(&local_8f8,local_3e0,"Addition_Magic_Defense",local_918);
        FUN_140182560(uVar10);
        local_a8 = FUN_140062550(uVar10);
        Ordinal_9(local_3e0);
        uVar10 = FUN_140002290(&local_8f8,local_3b0,"Permission",local_918);
        FUN_140182560(uVar10);
        local_a6 = FUN_140062550(uVar10);
        Ordinal_9(local_3b0);
        uVar10 = FUN_140002290(&local_8f8,local_380,"FatigueStorage",local_918);
        FUN_140182560(uVar10);
        local_a4 = FUN_140062550(uVar10);
        Ordinal_9(local_380);
        uVar10 = FUN_140002290(&local_8f8,local_350,"DayAttachGold",local_918);
        FUN_140182560(uVar10);
        local_a0 = FUN_140062550(uVar10);
        Ordinal_9(local_350);
        uVar10 = FUN_140002290(&local_8f8,local_320,"DayAttachItem",local_918);
        FUN_140182560(uVar10);
        local_9c = FUN_140062550(uVar10);
        Ordinal_9(local_320);
        uVar10 = FUN_140002290(&local_8f8,local_2f0,"GuildPoint",local_918);
        FUN_140182560(uVar10);
        local_9a = FUN_140062550(uVar10);
        Ordinal_9(local_2f0);
        uVar10 = FUN_140002290(&local_8f8,local_2c0,"tutorial_step",local_918);
        FUN_140182560(uVar10);
        local_96 = FUN_140062550(uVar10);
        Ordinal_9(local_2c0);
        uVar10 = FUN_140002290(&local_8f8,local_290,"daypartymission",local_918);
        FUN_140182560(uVar10);
        local_88 = FUN_140062550(uVar10);
        Ordinal_9(local_290);
        uVar10 = FUN_140002290(&local_8f8,local_260,"time_sp",local_918);
        FUN_140182560(uVar10);
        local_84 = FUN_140062550(uVar10);
        Ordinal_9(local_260);
        uVar10 = FUN_140002290(&local_8f8,local_230,"guild_grade",local_918);
        FUN_140182560(uVar10);
        local_94 = FUN_140062550(uVar10);
        Ordinal_9(local_230);
        uVar10 = FUN_140002290(&local_8f8,local_200,"guild_alias_name",local_918);
        FUN_140062840(uVar10,&local_868);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_868 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_748 = 0;
          local_750 = uVar10;
          FUN_140156b50(uVar10);
          local_748 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_728 = 0;
            local_730 = uVar11;
            FUN_140156b50(uVar11);
            local_728 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_868;
          if (((local_868 != (wchar_t *)PTR_DAT_1403200a0) && (local_868 != (wchar_t *)0x0)) &&
             (local_868 != (wchar_t *)0x8)) {
            *(int *)(local_868 + -2) = *(int *)(local_868 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy_s(local_58,0x10,pwVar12,0xf);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_708 = 0;
          local_710 = uVar10;
          FUN_140156b50(uVar10);
          local_708 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_868 != (wchar_t *)0x0) && (local_868 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_868 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_6e8 = 0;
          local_6f0 = uVar10;
          FUN_140156b50(uVar10);
          local_6e8 = 1;
          pwVar7 = local_868 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_868 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_868 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_200);
        uVar10 = FUN_140002290(&local_8f8,local_1d0,"guild_name",local_918);
        FUN_140062840(uVar10,&local_850);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_850 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_6c8 = 0;
          local_6d0 = uVar10;
          FUN_140156b50(uVar10);
          local_6c8 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_698 = 0;
            local_6a0 = uVar11;
            FUN_140156b50(uVar11);
            local_698 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_850;
          if (((local_850 != (wchar_t *)PTR_DAT_1403200a0) && (local_850 != (wchar_t *)0x0)) &&
             (local_850 != (wchar_t *)0x8)) {
            *(int *)(local_850 + -2) = *(int *)(local_850 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy_s(local_80,0x14,pwVar12,0x13);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_678 = 0;
          local_680 = uVar10;
          FUN_140156b50(uVar10);
          local_678 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_850 != (wchar_t *)0x0) && (local_850 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_850 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_6a8 = 0;
          local_6b0 = uVar10;
          FUN_140156b50(uVar10);
          local_6a8 = 1;
          pwVar7 = local_850 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_850 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_850 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_1d0);
        Ordinal_9(local_670);
        pwVar7 = (wchar_t *)0x1;
        if (local_918[0] == '\0') {
          local_15c = 100;
          pwVar7 = pwVar13;
        }
      }
      iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_168);
      if (iVar3 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar2 = local_8f8;
      if (local_8f8 != (IUnknown *)0x0) {
        local_908 = (undefined8 *)((ulonglong)local_908 & 0xffffffff00000000);
        UVar5 = (*local_8f8->lpVtbl[0x12].AddRef)(local_8f8);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
        }
        pIVar2 = local_8f8;
        if ((int)local_908 != 0) {
          if (local_8f8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar5 = (*local_8f8->lpVtbl[10].Release)(local_8f8);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_8f8 != (IUnknown *)0x0) {
          (*local_8f8->lpVtbl->Release)(local_8f8);
          local_8f8 = (IUnknown *)0x0;
        }
      }
      local_890 = 0;
      local_888 = &DAT_140281f00;
      local_8a0 = &DAT_140281f00;
      local_898 = 0;
      local_8a8 = 0;
      Ordinal_9(local_8c0);
      Ordinal_9(local_8d8);
      if (local_8f0 != (longlong *)0x0) {
        (**(code **)(*local_8f0 + 0x10))();
      }
      if (local_8f8 != (IUnknown *)0x0) {
        (*local_8f8->lpVtbl->Release)(local_8f8);
      }
      if (local_910 != (longlong *)0x0) {
        (**(code **)(*local_910 + 0x10))();
      }
      return pwVar7;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400af4c0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  undefined2 uVar2;
  int iVar3;
  HRESULT HVar4;
  ULONG UVar5;
  undefined8 *puVar6;
  wchar_t *pwVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  wchar_t *pwVar12;
  wchar_t *pwVar13;
  wchar_t *pwVar14;
  undefined1 auStackY_278 [32];
  char local_238 [4];
  short local_234;
  longlong *local_230;
  undefined8 *local_228;
  int local_220;
  undefined8 *local_218;
  wchar_t *local_210;
  wchar_t *local_208;
  LPUNKNOWN local_200;
  IUnknown *local_1f8;
  longlong *local_1f0;
  undefined4 local_1e8;
  undefined1 local_1d8 [24];
  undefined1 local_1c0 [24];
  undefined4 local_1a8;
  undefined1 *local_1a0;
  undefined4 local_198;
  undefined8 local_190;
  undefined1 *local_188;
  wchar_t *local_178;
  longlong *local_170;
  longlong local_168;
  undefined2 local_160;
  longlong *local_150;
  wchar_t *local_148;
  longlong *local_140;
  wchar_t *local_138;
  undefined8 local_130;
  undefined1 local_128;
  undefined8 local_120;
  undefined1 local_118;
  undefined8 local_110;
  undefined1 local_108;
  undefined8 local_100;
  undefined1 local_f8;
  undefined8 local_f0;
  undefined1 local_d8 [8];
  undefined1 local_d0 [24];
  undefined1 local_b8 [24];
  wchar_t local_a0 [12];
  undefined1 local_88 [24];
  undefined4 local_70;
  undefined4 uStack_6c;
  undefined4 local_68;
  undefined2 local_64;
  wchar_t local_62 [12];
  ulonglong local_4a;
  undefined4 local_42;
  ulonglong local_38;
  
  local_f0 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_278;
  pwVar13 = (wchar_t *)0x0;
  local_230 = (longlong *)0x0;
  local_228 = param_1;
  local_218 = param_2;
  iVar3 = FUN_140001970(&local_230);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_1f8 = (IUnknown *)0x0;
  local_1f0 = (longlong *)0x0;
  Ordinal_8(local_1d8);
  Ordinal_8(local_1c0);
  pIVar1 = local_1f8;
  if ((local_1f8 != (IUnknown *)0x0) && (local_1f8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_188 = &DAT_140281f00;
  local_1a0 = &DAT_140281f00;
  local_198 = 0;
  local_190 = 0;
  if (local_1f8 != (IUnknown *)0x0) {
    (*local_1f8->lpVtbl->Release)(local_1f8);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_200);
  if (HVar4 < 0) {
LAB_1400af620:
    local_1f8 = (IUnknown *)0x0;
  }
  else {
    HVar4 = OleRun(local_200);
    if (-1 < HVar4) {
      HVar4 = (*local_200->lpVtbl->QueryInterface)(local_200,(IID *)&DAT_140281f68,&local_1f8);
    }
    (*local_200->lpVtbl->Release)(local_200);
    if (HVar4 < 0) goto LAB_1400af620;
  }
  local_1a8 = 2;
  pwVar14 = (wchar_t *)0x1;
  local_1e8 = 1;
  local_238[0] = '\x01';
  local_42 = 0;
  local_62[0] = L'\0';
  local_62[1] = L'\0';
  local_62[2] = L'\0';
  local_62[3] = L'\0';
  local_62[4] = L'\0';
  local_62[5] = L'\0';
  local_62[6] = L'\0';
  local_62[7] = L'\0';
  local_62[8] = L'\0';
  local_62[9] = L'\0';
  local_62[10] = L'\0';
  local_62[0xb] = L'\0';
  local_4a = 0;
  local_68 = *(undefined4 *)(param_2 + 1);
  _local_70 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23f60000);
  local_64 = 99;
  _local_70 = CONCAT62(stack0xffffffffffffff92,0x32);
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_220 = 0;
    UVar5 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_220 != 0) goto LAB_1400af83e;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_1f8;
    if (local_1f8 != (IUnknown *)0x0) {
      local_218 = (undefined8 *)((ulonglong)local_218 & 0xffffffff00000000);
      UVar5 = (*local_1f8->lpVtbl[0x12].AddRef)(local_1f8);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_1f8;
      if ((int)local_218 != 0) {
        if (local_1f8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar5 = (*local_1f8->lpVtbl[10].Release)(local_1f8);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_1f8 != (IUnknown *)0x0) {
        (*local_1f8->lpVtbl->Release)(local_1f8);
        local_1f8 = (IUnknown *)0x0;
      }
    }
    local_190 = 0;
    local_188 = &DAT_140281f00;
    local_1a0 = &DAT_140281f00;
    local_198 = 0;
    local_1a8 = 0;
    Ordinal_9(local_1c0);
    Ordinal_9(local_1d8);
    if (local_1f0 != (longlong *)0x0) {
      (**(code **)(*local_1f0 + 0x10))();
    }
    if (local_1f8 != (IUnknown *)0x0) {
      (*local_1f8->lpVtbl->Release)(local_1f8);
    }
    if (local_230 != (longlong *)0x0) {
      (**(code **)(*local_230 + 0x10))();
    }
    return (wchar_t *)0x0;
  }
LAB_1400af83e:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_140);
  FUN_140001710(&local_230,*puVar6,"dbo.up_get_character_simpleinfo");
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  local_208 = local_a0;
  FUN_1400623f0(local_a0,(longlong)param_2 + 0xe);
  pwVar7 = operator_new(0x18);
  local_148 = pwVar13;
  local_178 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490(&DAT_140289c8c);
    *(longlong *)pwVar7 = lVar8;
    local_148 = pwVar7;
  }
  if (local_148 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar7 = (wchar_t *)FUN_140001880(&local_230,&local_170,&local_148,0xca);
  local_208 = pwVar7;
  if (local_230 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_230,&local_150);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_150 != (longlong *)0x0) {
    (**(code **)(*local_150 + 0x10))();
  }
  if (*(longlong **)pwVar7 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar7 + 0x10))();
  }
  local_170 = &local_168;
  uVar2 = *(undefined2 *)((longlong)param_2 + 0x2e);
  Ordinal_8(&local_168);
  if ((short)local_168 != 0x12) {
    iVar3 = Ordinal_9(&local_168);
    if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar3);
    }
    local_168._0_2_ = 0x12;
  }
  local_160 = uVar2;
  pwVar7 = operator_new(0x18);
  local_138 = pwVar13;
  local_208 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("server");
    *(longlong *)pwVar7 = lVar8;
    local_138 = pwVar7;
  }
  if (local_138 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_230,local_d8,&local_138,2);
  local_170 = plVar9;
  if (local_230 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_230,&local_178);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar5 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_178 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_178 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_230,&local_208);
    This = local_1f8;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_1f8 != pIVar1) {
      local_1f8 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_208 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_208 + 0x10))();
    }
    pIVar1 = local_1f8;
    if (local_1f8 != (IUnknown *)0x0) {
      local_234 = 0;
      UVar5 = (*local_1f8->lpVtbl[6].Release)(local_1f8);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_234 == -1) {
        local_62[0] = L'\0';
        local_62[1] = L'\0';
        local_62[2] = L'\0';
        local_62[3] = L'\0';
        local_62[4] = L'\0';
        local_62[5] = L'\0';
        local_62[6] = L'\0';
        local_62[7] = L'\0';
        local_62[8] = L'\0';
        local_62[9] = L'\0';
        local_62[10] = L'\0';
        local_62[0xb] = L'\0';
        local_4a = 0;
        local_42 = 0xffffffff;
      }
      else {
        uVar10 = FUN_140002290(&local_1f8,local_d0,&DAT_14028a330,local_238);
        FUN_140062840(uVar10,&local_210);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_210 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_f8 = 0;
          local_100 = uVar10;
          FUN_140156b50(uVar10);
          local_f8 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_128 = 0;
            local_130 = uVar11;
            FUN_140156b50(uVar11);
            local_128 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_210;
          if (((local_210 != (wchar_t *)PTR_DAT_1403200a0) && (local_210 != (wchar_t *)0x0)) &&
             (local_210 != (wchar_t *)0x8)) {
            *(int *)(local_210 + -2) = *(int *)(local_210 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_62,pwVar12,0xf);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_108 = 0;
          local_110 = uVar10;
          FUN_140156b50(uVar10);
          local_108 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_210 != (wchar_t *)0x0) && (local_210 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_210 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_118 = 0;
          local_120 = uVar10;
          FUN_140156b50(uVar10);
          local_118 = 1;
          pwVar7 = local_210 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_210 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_210 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_d0);
        local_4a = local_4a & 0xffffffffffff;
        uVar10 = FUN_140002290(&local_1f8,local_88,"Class",local_238);
        FUN_140182560(uVar10);
        uVar2 = FUN_140062550(uVar10);
        local_42._2_2_ = uVar2;
        Ordinal_9(local_88);
        uVar10 = FUN_140002290(&local_1f8,local_b8,"Level",local_238);
        FUN_140182560(uVar10);
        uVar2 = FUN_140062550(uVar10);
        local_42 = CONCAT22(local_42._2_2_,uVar2);
        Ordinal_9(local_b8);
        if (local_238[0] == '\0') {
          local_64 = 100;
          pwVar14 = pwVar13;
        }
      }
      iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_70);
      if (iVar3 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_1f8;
      if (local_1f8 != (IUnknown *)0x0) {
        local_228 = (undefined8 *)((ulonglong)local_228 & 0xffffffff00000000);
        UVar5 = (*local_1f8->lpVtbl[0x12].AddRef)(local_1f8);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_1f8;
        if ((int)local_228 != 0) {
          if (local_1f8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar5 = (*local_1f8->lpVtbl[10].Release)(local_1f8);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_1f8 != (IUnknown *)0x0) {
          (*local_1f8->lpVtbl->Release)(local_1f8);
          local_1f8 = (IUnknown *)0x0;
        }
      }
      local_190 = 0;
      local_188 = &DAT_140281f00;
      local_1a0 = &DAT_140281f00;
      local_198 = 0;
      local_1a8 = 0;
      Ordinal_9(local_1c0);
      Ordinal_9(local_1d8);
      if (local_1f0 != (longlong *)0x0) {
        (**(code **)(*local_1f0 + 0x10))();
      }
      if (local_1f8 != (IUnknown *)0x0) {
        (*local_1f8->lpVtbl->Release)(local_1f8);
      }
      if (local_230 != (longlong *)0x0) {
        (**(code **)(*local_230 + 0x10))();
      }
      return pwVar14;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400b0030(undefined8 *param_1,undefined8 *param_2)

{
  undefined2 uVar1;
  IUnknown *pIVar2;
  uint uVar3;
  undefined6 uVar4;
  IUnknown *This;
  int iVar5;
  HRESULT HVar6;
  ULONG UVar7;
  undefined8 *puVar8;
  wchar_t *pwVar9;
  longlong lVar10;
  longlong *plVar11;
  undefined8 uVar12;
  undefined8 uVar13;
  wchar_t *pwVar14;
  char *riid;
  char *ppvObject;
  wchar_t *pwVar15;
  undefined1 auStackY_a18 [32];
  char local_9d8 [4];
  int local_9d4;
  uint local_9d0;
  short local_9cc;
  short local_9c8;
  longlong *local_9c0;
  undefined8 local_9b8;
  undefined4 local_9b0;
  undefined2 uStack_9ac;
  short sStack_9aa;
  IUnknown *local_9a8;
  longlong *local_9a0;
  undefined4 local_998;
  undefined1 local_988 [24];
  undefined1 local_970 [24];
  undefined4 local_958;
  undefined1 *local_950;
  undefined4 local_948;
  undefined8 local_940;
  undefined1 *local_938;
  int local_928;
  wchar_t *local_920;
  undefined8 *local_918;
  wchar_t *local_910;
  wchar_t *local_908;
  wchar_t *local_900;
  wchar_t *local_8f8;
  wchar_t *local_8f0;
  wchar_t *local_8e8;
  LPUNKNOWN local_8e0;
  wchar_t local_8d8 [2];
  wchar_t local_8d4 [2];
  wchar_t local_8d0 [4];
  longlong *local_8c8;
  undefined8 *local_8c0;
  wchar_t *local_8b8;
  undefined4 local_8b0;
  undefined4 local_8ac;
  undefined4 local_8a8;
  undefined4 local_8a4;
  longlong local_8a0;
  undefined2 local_898;
  undefined8 local_888;
  undefined1 local_880;
  undefined8 local_878;
  undefined1 local_870;
  undefined8 local_868;
  undefined1 local_860;
  undefined8 local_858;
  undefined1 local_850;
  undefined8 local_848;
  undefined1 local_840;
  undefined8 local_838;
  undefined1 local_830;
  undefined8 local_828;
  undefined1 local_820;
  undefined8 local_818;
  undefined1 local_810;
  undefined8 local_808;
  undefined1 local_800;
  undefined8 local_7f8;
  undefined1 local_7f0;
  undefined8 local_7e8;
  undefined1 local_7e0;
  undefined8 local_7d8;
  undefined1 local_7d0;
  undefined8 local_7c8;
  undefined1 local_7c0;
  undefined8 local_7b8;
  undefined1 local_7b0;
  undefined8 local_7a8;
  undefined1 local_7a0;
  longlong *local_798;
  undefined8 local_790;
  undefined1 local_788;
  undefined8 local_780;
  undefined1 local_778;
  undefined8 local_770;
  undefined1 local_768;
  undefined8 local_760;
  undefined1 local_758;
  undefined8 local_750;
  undefined1 local_748;
  longlong *local_740;
  undefined8 local_738;
  undefined1 local_730;
  undefined8 local_728;
  undefined1 local_720;
  wchar_t *local_718;
  undefined8 local_710;
  undefined1 local_708;
  wchar_t *local_700;
  undefined8 local_6f8;
  undefined1 local_6f0;
  short local_6e8 [12];
  undefined4 local_6d0;
  undefined4 uStack_6cc;
  undefined4 uStack_6c8;
  undefined4 uStack_6c4;
  ulong local_6b0 [2];
  uchar auStack_6a8 [4];
  uchar auStack_6a4 [4];
  undefined8 local_6a0;
  undefined1 local_698 [16];
  undefined4 local_688;
  undefined4 uStack_684;
  undefined4 uStack_680;
  undefined4 uStack_67c;
  undefined1 local_678 [24];
  undefined1 local_660 [24];
  undefined1 local_648 [24];
  undefined1 local_630 [24];
  undefined1 local_618 [24];
  undefined1 local_600 [24];
  undefined1 local_5e8 [24];
  undefined1 local_5d0 [24];
  undefined1 local_5b8 [24];
  undefined1 local_5a0 [24];
  undefined1 local_588 [24];
  undefined1 local_570 [24];
  undefined1 local_558 [24];
  undefined1 local_540 [24];
  undefined1 local_528 [24];
  undefined1 local_510 [24];
  undefined1 local_4f8 [24];
  undefined1 local_4e0 [24];
  undefined1 local_4c8 [24];
  undefined1 local_4b0 [24];
  undefined1 local_498 [24];
  undefined1 local_480 [24];
  undefined1 local_468 [24];
  undefined1 local_450 [24];
  undefined1 local_438 [24];
  wchar_t local_420 [12];
  undefined1 local_408 [24];
  undefined1 local_3f0 [24];
  undefined1 local_3d8 [24];
  undefined1 local_3c0 [24];
  undefined1 local_3a8 [24];
  undefined1 local_390 [24];
  undefined1 local_378 [24];
  undefined1 local_360 [24];
  undefined1 local_348 [24];
  undefined1 local_330 [24];
  undefined1 local_318 [24];
  undefined1 local_300 [24];
  undefined1 local_2e8 [24];
  undefined1 local_2d0 [24];
  undefined1 local_2b8 [24];
  undefined1 local_2a0 [24];
  undefined1 local_288 [24];
  undefined1 local_270 [24];
  undefined1 local_258 [24];
  undefined1 local_240 [24];
  undefined1 local_228 [24];
  undefined1 local_210 [24];
  undefined1 local_1f8 [24];
  undefined1 local_1e0 [24];
  undefined1 local_1c8 [24];
  undefined1 local_1b0 [24];
  undefined1 local_198 [24];
  undefined1 local_180 [24];
  IID local_168;
  undefined4 local_158;
  undefined4 uStack_154;
  undefined4 uStack_150;
  undefined4 uStack_14c;
  undefined2 local_148;
  wchar_t local_146 [15];
  undefined2 local_128;
  undefined2 local_126;
  undefined2 local_124;
  undefined2 local_122;
  undefined8 local_120;
  undefined4 local_118;
  undefined4 local_114;
  undefined4 local_110;
  undefined2 local_10c;
  undefined4 local_10a;
  undefined2 local_106;
  undefined4 local_104;
  undefined4 local_100;
  undefined4 local_fc;
  undefined4 local_f8;
  undefined4 local_f4;
  undefined4 local_f0;
  undefined2 local_ec;
  undefined2 local_ea;
  undefined2 local_e8;
  undefined2 local_e6;
  undefined4 local_e4;
  undefined2 local_e0;
  undefined4 local_de;
  undefined2 local_da;
  undefined1 local_d8;
  undefined1 local_d7;
  undefined1 local_d6;
  undefined8 local_d5;
  undefined4 local_cd;
  undefined1 local_c9;
  undefined1 local_c8;
  undefined1 local_c7;
  undefined1 local_c6;
  undefined1 local_c3;
  undefined2 local_c2;
  undefined2 local_c0;
  undefined2 local_be;
  undefined2 local_bc;
  undefined2 local_ba;
  undefined2 local_b8;
  undefined2 local_b6;
  undefined2 local_b4;
  undefined4 local_b2;
  undefined4 local_ae;
  undefined2 local_aa;
  undefined4 local_a8;
  undefined2 local_a4;
  undefined4 local_a2;
  undefined8 local_9e;
  undefined4 local_96;
  undefined4 local_92;
  wchar_t local_8e [20];
  wchar_t local_66 [23];
  ulonglong local_38;
  
  local_6a0 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_a18;
  pwVar15 = (wchar_t *)0x0;
  local_9c0 = (longlong *)0x0;
  local_918 = param_1;
  local_8c0 = param_2;
  iVar5 = FUN_140001970(&local_9c0);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_9a8 = (IUnknown *)0x0;
  local_9a0 = (longlong *)0x0;
  Ordinal_8(local_988);
  Ordinal_8(local_970);
  pIVar2 = local_9a8;
  if ((local_9a8 != (IUnknown *)0x0) && (local_9a8 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_938 = &DAT_140281f00;
  local_950 = &DAT_140281f00;
  local_948 = 0;
  local_940 = 0;
  if (local_9a8 != (IUnknown *)0x0) {
    (*local_9a8->lpVtbl->Release)(local_9a8);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_8e0);
  if (HVar6 < 0) {
LAB_1400b0192:
    local_9a8 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_8e0);
    if (-1 < HVar6) {
      HVar6 = (*local_8e0->lpVtbl->QueryInterface)(local_8e0,(IID *)&DAT_140281f68,&local_9a8);
    }
    (*local_8e0->lpVtbl->Release)(local_8e0);
    if (HVar6 < 0) goto LAB_1400b0192;
  }
  local_958 = 2;
  local_998 = 1;
  local_9d8[0] = '\x01';
  local_9b0 = *(undefined4 *)(param_2 + 1);
  local_9b8._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_9b8._0_4_ = CONCAT22(0x2340,(short)*param_2);
  uStack_9ac = 0x67;
  local_9d4 = 0;
  sStack_9aa = 0;
  local_9d0 = 0x10;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_928 = 0;
    UVar7 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_928 != 0) goto LAB_1400b0374;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_9a8;
    if (local_9a8 != (IUnknown *)0x0) {
      local_9d4 = 0;
      UVar7 = (*local_9a8->lpVtbl[0x12].AddRef)(local_9a8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_9a8;
      if (local_9d4 != 0) {
        if (local_9a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar7 = (*local_9a8->lpVtbl[10].Release)(local_9a8);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_9a8 != (IUnknown *)0x0) {
        (*local_9a8->lpVtbl->Release)(local_9a8);
        local_9a8 = (IUnknown *)0x0;
      }
    }
    local_940 = 0;
    local_938 = &DAT_140281f00;
    local_950 = &DAT_140281f00;
    local_948 = 0;
    local_958 = 0;
    Ordinal_9(local_970);
    Ordinal_9(local_988);
    if (local_9a0 != (longlong *)0x0) {
      (**(code **)(*local_9a0 + 0x10))();
    }
    if (local_9a8 != (IUnknown *)0x0) {
      (*local_9a8->lpVtbl->Release)(local_9a8);
    }
    if (local_9c0 != (longlong *)0x0) {
      (**(code **)(*local_9c0 + 0x10))();
    }
    return (wchar_t *)0x0;
  }
LAB_1400b0374:
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_798);
  FUN_140001710(&local_9c0,*puVar8,"dbo.up_get_all_character");
  if (local_798 != (longlong *)0x0) {
    (**(code **)(*local_798 + 0x10))();
  }
  local_8f0 = local_420;
  local_688 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_684 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_680 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_67c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_420,&local_688);
  pwVar9 = operator_new(0x18);
  local_718 = pwVar15;
  local_8b8 = pwVar9;
  if (pwVar9 != (wchar_t *)0x0) {
    pwVar9[4] = L'\0';
    pwVar9[5] = L'\0';
    pwVar9[6] = L'\0';
    pwVar9[7] = L'\0';
    pwVar9[8] = L'\x01';
    pwVar9[9] = L'\0';
    lVar10 = FUN_140201490("AuthID");
    *(longlong *)pwVar9 = lVar10;
    local_718 = pwVar9;
  }
  if (local_718 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar9 = (wchar_t *)FUN_140001880(&local_9c0,&local_8c8,&local_718,0xca);
  local_8f0 = pwVar9;
  if (local_9c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_9c0,&local_740);
  pIVar2 = (IUnknown *)*puVar8;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar7 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar7 < 0) {
    _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_740 != (longlong *)0x0) {
    (**(code **)(*local_740 + 0x10))();
  }
  if (*(longlong **)pwVar9 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar9 + 0x10))();
  }
  local_8c8 = &local_8a0;
  uVar1 = *(undefined2 *)((longlong)param_2 + 0x1e);
  Ordinal_8(&local_8a0);
  if ((short)local_8a0 != 0x12) {
    iVar5 = Ordinal_9(&local_8a0);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_8a0._0_2_ = 0x12;
  }
  local_898 = uVar1;
  pwVar9 = operator_new(0x18);
  local_700 = pwVar15;
  local_8f0 = pwVar9;
  if (pwVar9 != (wchar_t *)0x0) {
    pwVar9[4] = L'\0';
    pwVar9[5] = L'\0';
    pwVar9[6] = L'\0';
    pwVar9[7] = L'\0';
    pwVar9[8] = L'\x01';
    pwVar9[9] = L'\0';
    lVar10 = FUN_140201490("server");
    *(longlong *)pwVar9 = lVar10;
    local_700 = pwVar9;
  }
  if (local_700 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_9c0,local_698,&local_700,3);
  local_8c8 = plVar11;
  if (local_9c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_9c0,&local_8b8);
  pIVar2 = (IUnknown *)*puVar8;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar7 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_8b8 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_8b8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    puVar8 = (undefined8 *)FUN_1400016d0(&local_9c0,&local_8f0);
    This = local_9a8;
    pIVar2 = (IUnknown *)*puVar8;
    if (local_9a8 != pIVar2) {
      local_9a8 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_8f0 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_8f0 + 0x10))();
    }
    pIVar2 = local_9a8;
    if (local_9a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_9cc = 0;
    UVar7 = (*local_9a8->lpVtbl[6].Release)(local_9a8);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
    }
    if (local_9cc == -1) {
      uStack_9ac = 0x6a;
      pwVar9 = pwVar15;
    }
    else {
      while( true ) {
        pIVar2 = local_9a8;
        if (local_9a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_9c8 = 0;
        UVar7 = (*local_9a8->lpVtbl[6].Release)(local_9a8);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
        }
        if (local_9c8 == -1) break;
        FUN_14004f1d0(&local_168);
        uVar12 = FUN_140002290(&local_9a8,local_198,"character_id",local_9d8);
        FUN_1400625d0(uVar12,local_6b0);
        local_168.Data1 = local_6b0[0];
        local_168.Data2 = (undefined2)local_6b0[1];
        local_168.Data3 = local_6b0[1]._2_2_;
        local_168.Data4[0] = auStack_6a8[0];
        local_168.Data4[1] = auStack_6a8[1];
        local_168.Data4[2] = auStack_6a8[2];
        local_168.Data4[3] = auStack_6a8[3];
        local_168.Data4[4] = auStack_6a4[0];
        local_168.Data4[5] = auStack_6a4[1];
        local_168.Data4[6] = auStack_6a4[2];
        local_168.Data4[7] = auStack_6a4[3];
        Ordinal_9(local_198);
        uVar12 = FUN_140002290(&local_9a8,local_2a0,"AuthID",local_9d8);
        FUN_1400625d0(uVar12,&local_6d0);
        local_158 = local_6d0;
        uStack_154 = uStack_6cc;
        uStack_150 = uStack_6c8;
        uStack_14c = uStack_6c4;
        Ordinal_9(local_2a0);
        uVar12 = FUN_140002290(&local_9a8,local_630,"server",local_9d8);
        FUN_140182560(uVar12);
        local_148 = FUN_140062550(uVar12);
        Ordinal_9(local_630);
        uVar12 = FUN_140002290(&local_9a8,local_3c0,&DAT_14028a330,local_9d8);
        FUN_140062840(uVar12,&local_8e8);
        FUN_1401568c0();
        pwVar9 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar9 = pwVar15;
        }
        if (local_8e8 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar12 = FUN_1401568c0();
          local_708 = 0;
          local_710 = uVar12;
          FUN_140156b50(uVar12);
          local_708 = 1;
          if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar9 + -4 != (wchar_t *)0x0)) {
            uVar13 = FUN_1401568c0();
            local_850 = 0;
            local_858 = uVar13;
            FUN_140156b50(uVar13);
            local_850 = 1;
            pwVar14 = pwVar9 + -2;
            *(int *)pwVar14 = *(int *)pwVar14 + -1;
            if (*(int *)pwVar14 == 0) {
              FUN_140156970(pwVar9 + -4);
            }
            FUN_140156be0(uVar13);
            local_850 = 0;
          }
          pwVar9 = local_8e8;
          if (((local_8e8 != (wchar_t *)PTR_DAT_1403200a0) && (local_8e8 != (wchar_t *)0x0)) &&
             (local_8e8 != (wchar_t *)0x8)) {
            *(int *)(local_8e8 + -2) = *(int *)(local_8e8 + -2) + 1;
          }
          FUN_140156be0(uVar12);
          local_708 = 0;
        }
        pwVar14 = pwVar9;
        if (pwVar9 == (wchar_t *)0x0) {
          pwVar14 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_146,pwVar14,0xf);
        if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar9 + -4 != (wchar_t *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_830 = 0;
          local_838 = uVar12;
          FUN_140156b50(uVar12);
          local_830 = 1;
          pwVar14 = pwVar9 + -2;
          *(int *)pwVar14 = *(int *)pwVar14 + -1;
          if (*(int *)pwVar14 == 0) {
            FUN_140156970(pwVar9 + -4);
          }
          FUN_140156be0(uVar12);
          local_830 = 0;
        }
        pwVar9 = local_8e8;
        if (((local_8e8 != (wchar_t *)0x0) && (local_8e8 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar14 = local_8e8 + -4, pwVar14 != (wchar_t *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_778 = 0;
          local_780 = uVar12;
          FUN_140156b50(uVar12);
          local_778 = 1;
          pwVar9 = pwVar9 + -2;
          *(int *)pwVar9 = *(int *)pwVar9 + -1;
          if (*(int *)pwVar9 == 0) {
            FUN_140156970(pwVar14);
          }
          FUN_140156be0(uVar12);
          local_778 = 0;
        }
        local_8e8 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_3c0);
        local_128 = 0;
        uVar12 = FUN_140002290(&local_9a8,local_600,"Class",local_9d8);
        FUN_140182560(uVar12);
        local_126 = FUN_140062550(uVar12);
        Ordinal_9(local_600);
        uVar12 = FUN_140002290(&local_9a8,local_1b0,&DAT_14028b3e4,local_9d8);
        FUN_140182560(uVar12);
        local_124 = FUN_140062550(uVar12);
        Ordinal_9(local_1b0);
        uVar12 = FUN_140002290(&local_9a8,local_5d0,"Level",local_9d8);
        FUN_140182560(uVar12);
        local_122 = FUN_140062550(uVar12);
        Ordinal_9(local_5d0);
        uVar12 = FUN_140002290(&local_9a8,local_390,"Experience",local_9d8);
        FUN_140182560(uVar12);
        local_120 = FUN_140182640(uVar12);
        Ordinal_9(local_390);
        uVar12 = FUN_140002290(&local_9a8,local_5a0,"Stamina",local_9d8);
        FUN_140182560(uVar12);
        local_118 = FUN_140062550(uVar12);
        Ordinal_9(local_5a0);
        uVar12 = FUN_140002290(&local_9a8,local_270,&DAT_14028cd10,local_9d8);
        FUN_140182560(uVar12);
        local_114 = FUN_140062550(uVar12);
        Ordinal_9(local_270);
        uVar12 = FUN_140002290(&local_9a8,local_570,"Total_SP",local_9d8);
        FUN_140182560(uVar12);
        local_110 = FUN_140062550(uVar12);
        Ordinal_9(local_570);
        uVar12 = FUN_140002290(&local_9a8,local_360,"Fatigue",local_9d8);
        FUN_140182560(uVar12);
        local_10c = FUN_140062550(uVar12);
        Ordinal_9(local_360);
        uVar12 = FUN_140002290(&local_9a8,local_540,"LobbyID",local_9d8);
        FUN_140182560(uVar12);
        local_10a = FUN_140062550(uVar12);
        Ordinal_9(local_540);
        uVar12 = FUN_140002290(&local_9a8,local_1e0,"StartPoint",local_9d8);
        FUN_140182560(uVar12);
        local_106 = FUN_140062550(uVar12);
        Ordinal_9(local_1e0);
        uVar12 = FUN_140002290(&local_9a8,local_510,&DAT_14028cd44,local_9d8);
        FUN_140182560(uVar12);
        local_104 = FUN_140062550(uVar12);
        Ordinal_9(local_510);
        uVar12 = FUN_140002290(&local_9a8,local_330,"individual_roomID",local_9d8);
        FUN_140182560(uVar12);
        local_100 = FUN_140062550(uVar12);
        Ordinal_9(local_330);
        FUN_140002290(&local_9a8,local_6e8,"GuildID",local_9d8);
        if (local_6e8[0] == 1) {
          local_fc = 0;
          local_f8 = 0;
          local_f4 = 0;
          local_f0 = 0;
        }
        else {
          FUN_1400625d0(local_6e8,&local_8b0);
          local_fc = local_8b0;
          local_f8 = local_8ac;
          local_f4 = local_8a8;
          local_f0 = local_8a4;
        }
        uVar12 = FUN_140002290(&local_9a8,local_4e0,"Hearts",local_9d8);
        FUN_140182560(uVar12);
        local_ec = FUN_140062550(uVar12);
        Ordinal_9(local_4e0);
        uVar12 = FUN_140002290(&local_9a8,local_240,"Fortune",local_9d8);
        FUN_140182560(uVar12);
        local_ea = FUN_140062550(uVar12);
        Ordinal_9(local_240);
        uVar12 = FUN_140002290(&local_9a8,local_4b0,"first_login",local_9d8);
        FUN_140182560(uVar12);
        local_e8 = FUN_140062550(uVar12);
        Ordinal_9(local_4b0);
        uVar12 = FUN_140002290(&local_9a8,local_300,"tutorial",local_9d8);
        FUN_140182560(uVar12);
        local_e6 = FUN_140062550(uVar12);
        Ordinal_9(local_300);
        uVar12 = FUN_140002290(&local_9a8,local_480,"give_up",local_9d8);
        FUN_140182560(uVar12);
        local_e4 = FUN_140062550(uVar12);
        Ordinal_9(local_480);
        uVar12 = FUN_140002290(&local_9a8,local_180,"Block_Type",local_9d8);
        FUN_140182560(uVar12);
        local_e0 = FUN_140062550(uVar12);
        Ordinal_9(local_180);
        uVar12 = FUN_140002290(&local_9a8,local_450,"storage_gold",local_9d8);
        FUN_140182560(uVar12);
        local_de = FUN_140062550(uVar12);
        Ordinal_9(local_450);
        uVar12 = FUN_140002290(&local_9a8,local_2d0,"storage_count",local_9d8);
        FUN_140182560(uVar12);
        local_da = FUN_140062550(uVar12);
        Ordinal_9(local_2d0);
        uVar12 = FUN_140002290(&local_9a8,local_678,"CreateTime",local_9d8);
        FUN_140182560(uVar12);
        local_d5 = FUN_140098d80(uVar12);
        Ordinal_9(local_678);
        uVar12 = FUN_140002290(&local_9a8,local_210,"LastLogin",local_9d8);
        FUN_140182560(uVar12);
        local_9e = FUN_140098d80(uVar12);
        Ordinal_9(local_210);
        uVar12 = FUN_140002290(&local_9a8,local_3f0,"IsTradeEnable",local_9d8);
        FUN_140062840(uVar12,&local_920);
        FUN_1401568c0();
        pwVar9 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar9 = pwVar15;
        }
        if (local_920 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar12 = FUN_1401568c0();
          local_720 = 0;
          local_728 = uVar12;
          FUN_140156b50(uVar12);
          local_720 = 1;
          if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar9 + -4 != (wchar_t *)0x0)) {
            uVar13 = FUN_1401568c0();
            local_810 = 0;
            local_818 = uVar13;
            FUN_140156b50(uVar13);
            local_810 = 1;
            pwVar14 = pwVar9 + -2;
            *(int *)pwVar14 = *(int *)pwVar14 + -1;
            if (*(int *)pwVar14 == 0) {
              FUN_140156970(pwVar9 + -4);
            }
            FUN_140156be0(uVar13);
            local_810 = 0;
          }
          pwVar9 = local_920;
          if (((local_920 != (wchar_t *)PTR_DAT_1403200a0) && (local_920 != (wchar_t *)0x0)) &&
             (local_920 != (wchar_t *)0x8)) {
            *(int *)(local_920 + -2) = *(int *)(local_920 + -2) + 1;
          }
          FUN_140156be0(uVar12);
          local_720 = 0;
        }
        pwVar14 = pwVar9;
        if (pwVar9 == (wchar_t *)0x0) {
          pwVar14 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_8d4,pwVar14,1);
        if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar9 + -4 != (wchar_t *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_7f0 = 0;
          local_7f8 = uVar12;
          FUN_140156b50(uVar12);
          local_7f0 = 1;
          pwVar14 = pwVar9 + -2;
          *(int *)pwVar14 = *(int *)pwVar14 + -1;
          if (*(int *)pwVar14 == 0) {
            FUN_140156970(pwVar9 + -4);
          }
          FUN_140156be0(uVar12);
          local_7f0 = 0;
        }
        pwVar9 = local_920;
        if (((local_920 != (wchar_t *)0x0) && (local_920 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar14 = local_920 + -4, pwVar14 != (wchar_t *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_758 = 0;
          local_760 = uVar12;
          FUN_140156b50(uVar12);
          local_758 = 1;
          pwVar9 = pwVar9 + -2;
          *(int *)pwVar9 = *(int *)pwVar9 + -1;
          if (*(int *)pwVar9 == 0) {
            FUN_140156970(pwVar14);
          }
          FUN_140156be0(uVar12);
          local_758 = 0;
        }
        local_920 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_3f0);
        local_d8 = local_8d4[0] == L'Y';
        uVar12 = FUN_140002290(&local_9a8,local_660,"IsMoveEnable",local_9d8);
        FUN_140062840(uVar12,&local_900);
        FUN_1401568c0();
        pwVar9 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar9 = pwVar15;
        }
        if (local_900 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar12 = FUN_1401568c0();
          local_6f0 = 0;
          local_6f8 = uVar12;
          FUN_140156b50(uVar12);
          local_6f0 = 1;
          if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar9 + -4 != (wchar_t *)0x0)) {
            uVar13 = FUN_1401568c0();
            local_7d0 = 0;
            local_7d8 = uVar13;
            FUN_140156b50(uVar13);
            local_7d0 = 1;
            pwVar14 = pwVar9 + -2;
            *(int *)pwVar14 = *(int *)pwVar14 + -1;
            if (*(int *)pwVar14 == 0) {
              FUN_140156970(pwVar9 + -4);
            }
            FUN_140156be0(uVar13);
            local_7d0 = 0;
          }
          pwVar9 = local_900;
          if (((local_900 != (wchar_t *)PTR_DAT_1403200a0) && (local_900 != (wchar_t *)0x0)) &&
             (local_900 != (wchar_t *)0x8)) {
            *(int *)(local_900 + -2) = *(int *)(local_900 + -2) + 1;
          }
          FUN_140156be0(uVar12);
          local_6f0 = 0;
        }
        pwVar14 = pwVar9;
        if (pwVar9 == (wchar_t *)0x0) {
          pwVar14 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_8d8,pwVar14,1);
        if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar9 + -4 != (wchar_t *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_7b0 = 0;
          local_7b8 = uVar12;
          FUN_140156b50(uVar12);
          local_7b0 = 1;
          pwVar14 = pwVar9 + -2;
          *(int *)pwVar14 = *(int *)pwVar14 + -1;
          if (*(int *)pwVar14 == 0) {
            FUN_140156970(pwVar9 + -4);
          }
          FUN_140156be0(uVar12);
          local_7b0 = 0;
        }
        pwVar9 = local_900;
        if (((local_900 != (wchar_t *)0x0) && (local_900 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar14 = local_900 + -4, pwVar14 != (wchar_t *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_880 = 0;
          local_888 = uVar12;
          FUN_140156b50(uVar12);
          local_880 = 1;
          pwVar9 = pwVar9 + -2;
          *(int *)pwVar9 = *(int *)pwVar9 + -1;
          if (*(int *)pwVar9 == 0) {
            FUN_140156970(pwVar14);
          }
          FUN_140156be0(uVar12);
          local_880 = 0;
        }
        local_900 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_660);
        local_d7 = local_8d8[0] == L'Y';
        uVar12 = FUN_140002290(&local_9a8,local_648,"Block_YN",local_9d8);
        FUN_140062840(uVar12,&local_910);
        FUN_1401568c0();
        pwVar9 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar9 = pwVar15;
        }
        if (local_910 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar12 = FUN_1401568c0();
          local_860 = 0;
          local_868 = uVar12;
          FUN_140156b50(uVar12);
          local_860 = 1;
          if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar9 + -4 != (wchar_t *)0x0)) {
            uVar13 = FUN_1401568c0();
            local_870 = 0;
            local_878 = uVar13;
            FUN_140156b50(uVar13);
            local_870 = 1;
            pwVar14 = pwVar9 + -2;
            *(int *)pwVar14 = *(int *)pwVar14 + -1;
            if (*(int *)pwVar14 == 0) {
              FUN_140156970(pwVar9 + -4);
            }
            FUN_140156be0(uVar13);
            local_870 = 0;
          }
          pwVar9 = local_910;
          if (((local_910 != (wchar_t *)PTR_DAT_1403200a0) && (local_910 != (wchar_t *)0x0)) &&
             (local_910 != (wchar_t *)0x8)) {
            *(int *)(local_910 + -2) = *(int *)(local_910 + -2) + 1;
          }
          FUN_140156be0(uVar12);
          local_860 = 0;
        }
        pwVar14 = pwVar9;
        if (pwVar9 == (wchar_t *)0x0) {
          pwVar14 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_8d0,pwVar14,1);
        if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar9 + -4 != (wchar_t *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_840 = 0;
          local_848 = uVar12;
          FUN_140156b50(uVar12);
          local_840 = 1;
          pwVar14 = pwVar9 + -2;
          *(int *)pwVar14 = *(int *)pwVar14 + -1;
          if (*(int *)pwVar14 == 0) {
            FUN_140156970(pwVar9 + -4);
          }
          FUN_140156be0(uVar12);
          local_840 = 0;
        }
        pwVar9 = local_910;
        if (((local_910 != (wchar_t *)0x0) && (local_910 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar14 = local_910 + -4, pwVar14 != (wchar_t *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_820 = 0;
          local_828 = uVar12;
          FUN_140156b50(uVar12);
          local_820 = 1;
          pwVar9 = pwVar9 + -2;
          *(int *)pwVar9 = *(int *)pwVar9 + -1;
          if (*(int *)pwVar9 == 0) {
            FUN_140156970(pwVar14);
          }
          FUN_140156be0(uVar12);
          local_820 = 0;
        }
        local_910 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_648);
        local_d6 = local_8d0[0] == L'Y';
        uVar12 = FUN_140002290(&local_9a8,local_618,"Expire_Time",local_9d8);
        FUN_140182560(uVar12);
        local_cd = FUN_140062550(uVar12);
        Ordinal_9(local_618);
        uVar12 = FUN_140002290(&local_9a8,local_5e8,"event_fatigue",local_9d8);
        FUN_140182560(uVar12);
        local_c9 = FUN_1400624d0(uVar12);
        Ordinal_9(local_5e8);
        uVar12 = FUN_140002290(&local_9a8,local_5b8,"event_hearts",local_9d8);
        FUN_140182560(uVar12);
        local_c8 = FUN_1400624d0(uVar12);
        Ordinal_9(local_5b8);
        uVar12 = FUN_140002290(&local_9a8,local_588,"event_fortune",local_9d8);
        FUN_140182560(uVar12);
        local_c7 = FUN_1400624d0(uVar12);
        Ordinal_9(local_588);
        uVar12 = FUN_140002290(&local_9a8,local_558,"event_mailattach",local_9d8);
        FUN_140182560(uVar12);
        local_c6 = FUN_1400624d0(uVar12);
        Ordinal_9(local_558);
        uVar12 = FUN_140002290(&local_9a8,local_528,"event_daypartymission",local_9d8);
        FUN_140182560(uVar12);
        local_c3 = FUN_1400624d0(uVar12);
        Ordinal_9(local_528);
        uVar12 = FUN_140002290(&local_9a8,local_4f8,"dice_point",local_9d8);
        FUN_140182560(uVar12);
        local_c2 = FUN_140062550(uVar12);
        Ordinal_9(local_4f8);
        uVar12 = FUN_140002290(&local_9a8,local_4c8,"Addition_HP",local_9d8);
        FUN_140182560(uVar12);
        local_c0 = FUN_140062550(uVar12);
        Ordinal_9(local_4c8);
        uVar12 = FUN_140002290(&local_9a8,local_498,"Addition_MP",local_9d8);
        FUN_140182560(uVar12);
        local_be = FUN_140062550(uVar12);
        Ordinal_9(local_498);
        uVar12 = FUN_140002290(&local_9a8,local_468,"Addition_Physic_Attack",local_9d8);
        FUN_140182560(uVar12);
        local_bc = FUN_140062550(uVar12);
        Ordinal_9(local_468);
        uVar12 = FUN_140002290(&local_9a8,local_438,"Addition_Physic_Defense",local_9d8);
        FUN_140182560(uVar12);
        local_ba = FUN_140062550(uVar12);
        Ordinal_9(local_438);
        uVar12 = FUN_140002290(&local_9a8,local_408,"Addition_Magic_Attack",local_9d8);
        FUN_140182560(uVar12);
        local_b8 = FUN_140062550(uVar12);
        Ordinal_9(local_408);
        uVar12 = FUN_140002290(&local_9a8,local_3d8,"Addition_Magic_Defense",local_9d8);
        FUN_140182560(uVar12);
        local_b6 = FUN_140062550(uVar12);
        Ordinal_9(local_3d8);
        uVar12 = FUN_140002290(&local_9a8,local_3a8,"Permission",local_9d8);
        FUN_140182560(uVar12);
        local_b4 = FUN_140062550(uVar12);
        Ordinal_9(local_3a8);
        uVar12 = FUN_140002290(&local_9a8,local_378,"FatigueStorage",local_9d8);
        FUN_140182560(uVar12);
        local_b2 = FUN_140062550(uVar12);
        Ordinal_9(local_378);
        uVar12 = FUN_140002290(&local_9a8,local_348,"DayAttachGold",local_9d8);
        FUN_140182560(uVar12);
        local_ae = FUN_140062550(uVar12);
        Ordinal_9(local_348);
        uVar12 = FUN_140002290(&local_9a8,local_318,"DayAttachItem",local_9d8);
        FUN_140182560(uVar12);
        local_aa = FUN_140062550(uVar12);
        Ordinal_9(local_318);
        uVar12 = FUN_140002290(&local_9a8,local_2e8,"GuildPoint",local_9d8);
        FUN_140182560(uVar12);
        local_a8 = FUN_140062550(uVar12);
        Ordinal_9(local_2e8);
        uVar12 = FUN_140002290(&local_9a8,local_2b8,"tutorial_step",local_9d8);
        FUN_140182560(uVar12);
        local_a4 = FUN_140062550(uVar12);
        Ordinal_9(local_2b8);
        uVar12 = FUN_140002290(&local_9a8,local_288,"daypartymission",local_9d8);
        FUN_140182560(uVar12);
        local_96 = FUN_140062550(uVar12);
        Ordinal_9(local_288);
        uVar12 = FUN_140002290(&local_9a8,local_258,"time_sp",local_9d8);
        FUN_140182560(uVar12);
        local_92 = FUN_140062550(uVar12);
        Ordinal_9(local_258);
        uVar12 = FUN_140002290(&local_9a8,local_228,"guild_grade",local_9d8);
        FUN_140182560(uVar12);
        local_a2 = FUN_140062550(uVar12);
        Ordinal_9(local_228);
        uVar12 = FUN_140002290(&local_9a8,local_1f8,"guild_alias_name",local_9d8);
        FUN_140062840(uVar12,&local_908);
        FUN_1401568c0();
        pwVar9 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar9 = pwVar15;
        }
        if (local_908 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar12 = FUN_1401568c0();
          local_7e0 = 0;
          local_7e8 = uVar12;
          FUN_140156b50(uVar12);
          local_7e0 = 1;
          if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar9 + -4 != (wchar_t *)0x0)) {
            uVar13 = FUN_1401568c0();
            local_800 = 0;
            local_808 = uVar13;
            FUN_140156b50(uVar13);
            local_800 = 1;
            pwVar14 = pwVar9 + -2;
            *(int *)pwVar14 = *(int *)pwVar14 + -1;
            if (*(int *)pwVar14 == 0) {
              FUN_140156970(pwVar9 + -4);
            }
            FUN_140156be0(uVar13);
            local_800 = 0;
          }
          pwVar9 = local_908;
          if (((local_908 != (wchar_t *)PTR_DAT_1403200a0) && (local_908 != (wchar_t *)0x0)) &&
             (local_908 != (wchar_t *)0x8)) {
            *(int *)(local_908 + -2) = *(int *)(local_908 + -2) + 1;
          }
          FUN_140156be0(uVar12);
          local_7e0 = 0;
        }
        pwVar14 = pwVar9;
        if (pwVar9 == (wchar_t *)0x0) {
          pwVar14 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy_s(local_66,0x10,pwVar14,0xf);
        if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar9 + -4 != (wchar_t *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_7c0 = 0;
          local_7c8 = uVar12;
          FUN_140156b50(uVar12);
          local_7c0 = 1;
          pwVar14 = pwVar9 + -2;
          *(int *)pwVar14 = *(int *)pwVar14 + -1;
          if (*(int *)pwVar14 == 0) {
            FUN_140156970(pwVar9 + -4);
          }
          FUN_140156be0(uVar12);
          local_7c0 = 0;
        }
        pwVar9 = local_908;
        if (((local_908 != (wchar_t *)0x0) && (local_908 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar14 = local_908 + -4, pwVar14 != (wchar_t *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_7a0 = 0;
          local_7a8 = uVar12;
          FUN_140156b50(uVar12);
          local_7a0 = 1;
          pwVar9 = pwVar9 + -2;
          *(int *)pwVar9 = *(int *)pwVar9 + -1;
          if (*(int *)pwVar9 == 0) {
            FUN_140156970(pwVar14);
          }
          FUN_140156be0(uVar12);
          local_7a0 = 0;
        }
        local_908 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_1f8);
        uVar12 = FUN_140002290(&local_9a8,local_1c8,"guild_name",local_9d8);
        FUN_140062840(uVar12,&local_8f8);
        FUN_1401568c0();
        pwVar9 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar9 = pwVar15;
        }
        if (local_8f8 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar12 = FUN_1401568c0();
          local_768 = 0;
          local_770 = uVar12;
          FUN_140156b50(uVar12);
          local_768 = 1;
          if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar9 + -4 != (wchar_t *)0x0)) {
            uVar13 = FUN_1401568c0();
            local_788 = 0;
            local_790 = uVar13;
            FUN_140156b50(uVar13);
            local_788 = 1;
            pwVar14 = pwVar9 + -2;
            *(int *)pwVar14 = *(int *)pwVar14 + -1;
            if (*(int *)pwVar14 == 0) {
              FUN_140156970(pwVar9 + -4);
            }
            FUN_140156be0(uVar13);
            local_788 = 0;
          }
          pwVar9 = local_8f8;
          if (((local_8f8 != (wchar_t *)PTR_DAT_1403200a0) && (local_8f8 != (wchar_t *)0x0)) &&
             (local_8f8 != (wchar_t *)0x8)) {
            *(int *)(local_8f8 + -2) = *(int *)(local_8f8 + -2) + 1;
          }
          FUN_140156be0(uVar12);
          local_768 = 0;
        }
        pwVar14 = pwVar9;
        if (pwVar9 == (wchar_t *)0x0) {
          pwVar14 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy_s(local_8e,0x14,pwVar14,0x13);
        if (((pwVar9 != (wchar_t *)0x0) && (pwVar9 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar9 + -4 != (wchar_t *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_748 = 0;
          local_750 = uVar12;
          FUN_140156b50(uVar12);
          local_748 = 1;
          pwVar14 = pwVar9 + -2;
          *(int *)pwVar14 = *(int *)pwVar14 + -1;
          if (*(int *)pwVar14 == 0) {
            FUN_140156970(pwVar9 + -4);
          }
          FUN_140156be0(uVar12);
          local_748 = 0;
        }
        pwVar9 = local_8f8;
        if (((local_8f8 != (wchar_t *)0x0) && (local_8f8 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar14 = local_8f8 + -4, pwVar14 != (wchar_t *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_730 = 0;
          local_738 = uVar12;
          FUN_140156b50(uVar12);
          local_730 = 1;
          pwVar9 = pwVar9 + -2;
          *(int *)pwVar9 = *(int *)pwVar9 + -1;
          if (*(int *)pwVar9 == 0) {
            FUN_140156970(pwVar14);
          }
          FUN_140156be0(uVar12);
          local_730 = 0;
        }
        local_8f8 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_1c8);
        uVar3 = local_9d0;
        riid = (char *)&local_168;
        ppvObject = (char *)0x122;
        memcpy((void *)((longlong)(int)local_9d0 + 0x130 + (longlong)param_1),riid,0x122);
        local_9d0 = uVar3 + 0x122;
        sStack_9aa = (short)local_9d4 + 1;
        local_9d4 = CONCAT22((short)((uint)local_9d4 >> 0x10),sStack_9aa);
        if (50000 < local_9d0) {
          uVar4 = local_9b8._2_6_;
          local_9b8 = CONCAT62(local_9b8._2_6_,(short)local_9d0);
          uVar12 = local_9b8;
          riid = (char *)(param_1 + 0x26);
          local_9b8._4_2_ = SUB62(uVar4,2);
          local_9b8._6_2_ = SUB62(uVar4,4);
          ((IID *)riid)->Data1 = (undefined4)local_9b8;
          ((IID *)riid)->Data2 = local_9b8._4_2_;
          ((IID *)riid)->Data3 = local_9b8._6_2_;
          param_1[0x27] = CONCAT26(sStack_9aa,CONCAT24(uStack_9ac,local_9b0));
          local_9b8 = uVar12;
          iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
          if (iVar5 == 0) {
            ppvObject = "DB Result Queue push error";
            riid = "DBResultQueue_Error.Log";
            FUN_1400a0b40(param_1[0x23]);
          }
          local_9d0 = 0x10;
          local_9d4 = 0;
          sStack_9aa = 0;
        }
        pIVar2 = local_9a8;
        if (local_9a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar6 = (*local_9a8->lpVtbl[0xc].QueryInterface)(local_9a8,(IID *)riid,(void **)ppvObject);
        if (HVar6 < 0) {
          _com_issue_errorex(HVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
        Ordinal_9(local_6e8);
      }
      pwVar9 = (wchar_t *)0x1;
      if (local_9d8[0] == '\0') {
        uStack_9ac = 0x68;
        pwVar9 = pwVar15;
      }
    }
    local_9b8 = CONCAT62(local_9b8._2_6_,(short)local_9d0);
    param_1[0x26] = local_9b8;
    param_1[0x27] = CONCAT26(sStack_9aa,CONCAT24(uStack_9ac,local_9b0));
    iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar5 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar2 = local_9a8;
    if (local_9a8 != (IUnknown *)0x0) {
      local_9d0 = 0;
      UVar7 = (*local_9a8->lpVtbl[0x12].AddRef)(local_9a8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_9a8;
      if (local_9d0 != 0) {
        if (local_9a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar7 = (*local_9a8->lpVtbl[10].Release)(local_9a8);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_9a8 != (IUnknown *)0x0) {
        (*local_9a8->lpVtbl->Release)(local_9a8);
        local_9a8 = (IUnknown *)0x0;
      }
    }
    local_940 = 0;
    local_938 = &DAT_140281f00;
    local_950 = &DAT_140281f00;
    local_948 = 0;
    local_958 = 0;
    Ordinal_9(local_970);
    Ordinal_9(local_988);
    if (local_9a0 != (longlong *)0x0) {
      (**(code **)(*local_9a0 + 0x10))();
    }
    if (local_9a8 != (IUnknown *)0x0) {
      (*local_9a8->lpVtbl->Release)(local_9a8);
    }
    if (local_9c0 != (longlong *)0x0) {
      (**(code **)(*local_9c0 + 0x10))();
    }
    return pwVar9;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400b26e0)
// WARNING: Removing unreachable block (ram,0x0001400b26ea)
// WARNING: Removing unreachable block (ram,0x0001400b26f5)
// WARNING: Removing unreachable block (ram,0x0001400b2705)

longlong * FUN_1400b2430(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  int iVar2;
  HRESULT HVar3;
  ULONG UVar4;
  undefined4 uVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  char local_res18 [8];
  longlong *local_res20;
  longlong *local_398;
  int local_390;
  int local_38c;
  IUnknown *local_388;
  longlong *local_380;
  undefined4 local_378;
  undefined1 local_368 [24];
  undefined1 local_350 [24];
  undefined4 local_338;
  undefined1 *local_330;
  undefined4 local_328;
  undefined8 local_320;
  undefined1 *local_318;
  LPUNKNOWN local_308 [2];
  undefined4 local_2f8;
  undefined4 uStack_2f4;
  undefined4 local_2f0;
  undefined2 local_2ec;
  undefined8 local_2ea;
  undefined8 local_2e2;
  undefined8 local_2da;
  undefined8 local_2d2;
  undefined8 local_2ca;
  undefined8 local_2c2;
  undefined8 local_2ba;
  undefined8 local_2b2;
  undefined8 local_2aa;
  undefined8 local_2a2;
  undefined8 local_29a;
  longlong *local_288;
  longlong *local_280;
  longlong *local_278;
  longlong *local_270 [3];
  undefined4 local_258;
  undefined4 uStack_254;
  undefined4 uStack_250;
  undefined4 uStack_24c;
  undefined1 local_248 [16];
  undefined8 local_238;
  undefined1 local_230 [24];
  undefined1 local_218 [24];
  undefined1 local_200 [24];
  undefined1 local_1e8 [24];
  undefined1 local_1d0 [24];
  undefined1 local_1b8 [24];
  undefined1 local_1a0 [24];
  undefined1 local_188 [24];
  undefined1 local_170 [24];
  undefined1 local_158 [24];
  undefined1 local_140 [24];
  undefined1 local_128 [24];
  undefined1 local_110 [24];
  undefined1 local_f8 [24];
  undefined1 local_e0 [24];
  undefined1 local_c8 [24];
  undefined1 local_b0 [24];
  undefined1 local_98 [24];
  undefined1 local_80 [24];
  undefined1 local_68 [24];
  undefined1 local_50 [32];
  
  local_238 = 0xfffffffffffffffe;
  local_398 = (longlong *)0x0;
  iVar2 = FUN_140001970(&local_398);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_388 = (IUnknown *)0x0;
  local_380 = (longlong *)0x0;
  Ordinal_8(local_368);
  Ordinal_8(local_350);
  pIVar1 = local_388;
  if ((local_388 != (IUnknown *)0x0) && (local_388 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_318 = &DAT_140281f00;
  local_330 = &DAT_140281f00;
  local_328 = 0;
  local_320 = 0;
  if (local_388 != (IUnknown *)0x0) {
    (*local_388->lpVtbl->Release)(local_388);
  }
  HVar3 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_308
                          );
  if (HVar3 < 0) {
LAB_1400b256a:
    local_388 = (IUnknown *)0x0;
  }
  else {
    HVar3 = OleRun(local_308[0]);
    if (-1 < HVar3) {
      HVar3 = (*local_308[0]->lpVtbl->QueryInterface)(local_308[0],(IID *)&DAT_140281f68,&local_388)
      ;
    }
    (*local_308[0]->lpVtbl->Release)(local_308[0]);
    if (HVar3 < 0) goto LAB_1400b256a;
  }
  local_338 = 2;
  local_378 = 1;
  local_res18[0] = '\x01';
  local_2ea = 0;
  local_2e2 = 0;
  local_2da = 0;
  local_2d2 = 0;
  local_2ca = 0;
  local_2c2 = 0;
  local_2ba = 0;
  local_2b2 = 0;
  local_2aa = 0;
  local_2a2 = 0;
  local_29a = 0;
  local_2f0 = *(undefined4 *)(param_2 + 1);
  _local_2f8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23360000);
  local_2ec = 1;
  _local_2f8 = CONCAT62(stack0xfffffffffffffd0a,0x66);
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_38c = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_38c != 0) goto LAB_1400b27a5;
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_388;
    if (local_388 != (IUnknown *)0x0) {
      UVar4 = (*local_388->lpVtbl[0x12].AddRef)(local_388);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_388 != (IUnknown *)0x0) {
        (*local_388->lpVtbl->Release)(local_388);
        local_388 = (IUnknown *)0x0;
      }
    }
    local_320 = 0;
    local_318 = &DAT_140281f00;
    local_330 = &DAT_140281f00;
    local_328 = 0;
    local_338 = 0;
    Ordinal_9(local_350);
    Ordinal_9(local_368);
    if (local_380 != (longlong *)0x0) {
      (**(code **)(*local_380 + 0x10))();
    }
    if (local_388 != (IUnknown *)0x0) {
      (*local_388->lpVtbl->Release)(local_388);
    }
    if (local_398 != (longlong *)0x0) {
      (**(code **)(*local_398 + 0x10))();
    }
    return (longlong *)0x0;
  }
LAB_1400b27a5:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_280);
  FUN_140001710(&local_398,*puVar6,"dbo.up_get_duel_info");
  if (local_280 != (longlong *)0x0) {
    (**(code **)(*local_280 + 0x10))();
  }
  local_res20 = (longlong *)local_1e8;
  local_258 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_254 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_250 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_24c = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar7 = FUN_140062280(local_1e8,&local_258);
  plVar8 = operator_new(0x18);
  local_270[0] = (longlong *)0x0;
  local_288 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("character_id");
    *plVar8 = lVar9;
    local_270[0] = plVar8;
  }
  if (local_270[0] == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_398,local_248,local_270,0xca,1,0x26,uVar7);
  local_res20 = plVar8;
  if (local_398 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_398,&local_278);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_278 != (longlong *)0x0) {
      (**(code **)(*local_278 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_398,&local_288);
    This = local_388;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_388 != pIVar1) {
      local_388 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_288 != (longlong *)0x0) {
      (**(code **)(*local_288 + 0x10))();
    }
    pIVar1 = local_388;
    if (local_388 != (IUnknown *)0x0) {
      local_res20 = (longlong *)((ulonglong)local_res20 & 0xffffffffffff0000);
      UVar4 = (*local_388->lpVtbl[6].Release)(local_388);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      plVar8 = (longlong *)0x1;
      if ((short)local_res20 != -1) {
        uVar7 = FUN_140002290(&local_388,local_80,"duel_exp",local_res18);
        FUN_140182560(uVar7);
        local_2ea = FUN_140182640(uVar7);
        Ordinal_9(local_80);
        uVar7 = FUN_140002290(&local_388,local_50,"duel_point",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2e2 = CONCAT44(local_2e2._4_4_,uVar5);
        Ordinal_9(local_50);
        uVar7 = FUN_140002290(&local_388,local_128,"duel_disconnect",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2da._4_4_ = uVar5;
        Ordinal_9(local_128);
        uVar7 = FUN_140002290(&local_388,local_230,"duel_pannelty_time",local_res18);
        FUN_140182560(uVar7);
        local_2d2 = FUN_140098d80(uVar7);
        Ordinal_9(local_230);
        uVar7 = FUN_140002290(&local_388,local_68,"total_win",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2ca = CONCAT44(local_2ca._4_4_,uVar5);
        Ordinal_9(local_68);
        uVar7 = FUN_140002290(&local_388,local_1b8,"total_lose",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2ca = CONCAT44(uVar5,(undefined4)local_2ca);
        Ordinal_9(local_1b8);
        uVar7 = FUN_140002290(&local_388,local_f8,"pvp_win",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2c2 = CONCAT44(local_2c2._4_4_,uVar5);
        Ordinal_9(local_f8);
        uVar7 = FUN_140002290(&local_388,local_188,"pvp_lose",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2c2 = CONCAT44(uVar5,(undefined4)local_2c2);
        Ordinal_9(local_188);
        uVar7 = FUN_140002290(&local_388,local_98,"team_win",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2ba = CONCAT44(local_2ba._4_4_,uVar5);
        Ordinal_9(local_98);
        uVar7 = FUN_140002290(&local_388,local_158,"team_lose",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2ba = CONCAT44(uVar5,(undefined4)local_2ba);
        Ordinal_9(local_158);
        uVar7 = FUN_140002290(&local_388,local_c8,"leader_win",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2b2 = CONCAT44(local_2b2._4_4_,uVar5);
        Ordinal_9(local_c8);
        uVar7 = FUN_140002290(&local_388,local_218,"leader_lose",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2b2 = CONCAT44(uVar5,(undefined4)local_2b2);
        Ordinal_9(local_218);
        uVar7 = FUN_140002290(&local_388,local_200,"tag_win",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2aa = CONCAT44(local_2aa._4_4_,uVar5);
        Ordinal_9(local_200);
        uVar7 = FUN_140002290(&local_388,local_1d0,"tag_lose",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2aa = CONCAT44(uVar5,(undefined4)local_2aa);
        Ordinal_9(local_1d0);
        uVar7 = FUN_140002290(&local_388,local_1a0,"death_win",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2a2 = CONCAT44(local_2a2._4_4_,uVar5);
        Ordinal_9(local_1a0);
        uVar7 = FUN_140002290(&local_388,local_170,"death_lose",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2a2 = CONCAT44(uVar5,(undefined4)local_2a2);
        Ordinal_9(local_170);
        uVar7 = FUN_140002290(&local_388,local_140,"ladder_win",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_29a = CONCAT44(local_29a._4_4_,uVar5);
        Ordinal_9(local_140);
        uVar7 = FUN_140002290(&local_388,local_110,"ladder_lose",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_29a = CONCAT44(uVar5,(undefined4)local_29a);
        Ordinal_9(local_110);
        uVar7 = FUN_140002290(&local_388,local_e0,"duel_ladder_exp",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2e2 = CONCAT44(uVar5,(undefined4)local_2e2);
        Ordinal_9(local_e0);
        uVar7 = FUN_140002290(&local_388,local_b0,"duel_ladder_point",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_2da = CONCAT44(local_2da._4_4_,uVar5);
        Ordinal_9(local_b0);
        if (local_res18[0] == '\0') {
          local_2ec = 1;
          plVar8 = (longlong *)0x0;
        }
      }
      iVar2 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_2f8);
      if (iVar2 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_388;
      if (local_388 != (IUnknown *)0x0) {
        local_390 = 0;
        UVar4 = (*local_388->lpVtbl[0x12].AddRef)(local_388);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_388;
        if (local_390 != 0) {
          if (local_388 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar4 = (*local_388->lpVtbl[10].Release)(local_388);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_388 != (IUnknown *)0x0) {
          (*local_388->lpVtbl->Release)(local_388);
          local_388 = (IUnknown *)0x0;
        }
      }
      local_320 = 0;
      local_318 = &DAT_140281f00;
      local_330 = &DAT_140281f00;
      local_328 = 0;
      local_338 = 0;
      Ordinal_9(local_350);
      Ordinal_9(local_368);
      if (local_380 != (longlong *)0x0) {
        (**(code **)(*local_380 + 0x10))();
      }
      if (local_388 != (IUnknown *)0x0) {
        (*local_388->lpVtbl->Release)(local_388);
      }
      if (local_398 != (longlong *)0x0) {
        (**(code **)(*local_398 + 0x10))();
      }
      return plVar8;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b3110(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b31a3;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b31a3:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_character_duel_disconnect");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400b3390(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong local_80 [3];
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  undefined1 local_40 [32];
  
  local_50 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b3428;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b3428:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_character_duel_Experience");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = local_80;
  local_68 = *(undefined4 *)(param_2 + 0xe);
  uStack_64 = *(undefined4 *)(param_2 + 0x12);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_80,&local_68);
  plVar6 = operator_new(0x18);
  local_90 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_90 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_88 = local_80;
  uVar5 = *(undefined8 *)(param_2 + 0x1e);
  Ordinal_8(local_80);
  uVar5 = FUN_140182530(local_40,uVar5);
  iVar3 = Ordinal_10(local_80,uVar5);
  if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  Ordinal_9(local_40);
  plVar6 = operator_new(0x18);
  local_90 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("duel_experience");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar6 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0x14,1,8,local_80);
    local_88 = plVar6;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar6 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar6 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400b3770(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong local_90 [3];
  longlong *local_78;
  longlong *local_70;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  undefined1 local_40 [24];
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b3806;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b3806:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_duel_info");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = local_90;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_90,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_70 = local_90;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_90);
  FUN_140062080(local_90,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("game_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,3,1,4,local_90);
  local_70 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = local_90;
  uVar1 = *(undefined4 *)(param_2 + 0x22);
  Ordinal_8(local_90);
  FUN_140062080(local_90,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("add_point");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_90);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = local_90;
  uVar6 = *(undefined8 *)(param_2 + 0x26);
  Ordinal_8(local_90);
  uVar6 = FUN_1401824f0(local_40,uVar6);
  iVar4 = Ordinal_10(local_90,uVar6);
  if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  Ordinal_9(local_40);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("add_exp");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,0x14,1,8,local_90);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = local_90;
  uVar1 = *(undefined4 *)(param_2 + 0x36);
  Ordinal_8(local_90);
  FUN_140062080(local_90,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("add_disconnect");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_90);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = local_90;
  uVar1 = *(undefined4 *)(param_2 + 0x2e);
  Ordinal_8(local_90);
  FUN_140062080(local_90,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_70 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("add_win");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_90);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = local_90;
  uVar1 = *(undefined4 *)(param_2 + 0x32);
  Ordinal_8(local_90);
  FUN_140062080(local_90,uVar1);
  plVar9 = operator_new(0x18);
  local_70 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar8 = FUN_140201490("add_lose");
    *plVar9 = lVar8;
    plVar10 = plVar9;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_90);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b4110(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b41a3;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b41a3:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_character_duel_lose");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400b4390(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b4428;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b4428:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_duel_point");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("duel_point");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b4740(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b47d6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b47d6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_duel_ladder");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("duel_ladder_exp");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_58 = local_70;
    uVar1 = *(undefined4 *)(param_2 + 0x22);
    Ordinal_8(local_70);
    FUN_140062080(local_70,uVar1);
    plVar9 = operator_new(0x18);
    local_80 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("duel_ladder_point");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_70);
    local_58 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b4c10(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b4ca3;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b4ca3:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_character_duel_win");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400b4e90(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b4f28;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b4f28:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_dice_point");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("dice_point");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b5240(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong local_80 [3];
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  undefined1 local_40 [32];
  
  local_50 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b52d8;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b52d8:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_character_experience");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = local_80;
  local_68 = *(undefined4 *)(param_2 + 0xe);
  uStack_64 = *(undefined4 *)(param_2 + 0x12);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_80,&local_68);
  plVar6 = operator_new(0x18);
  local_90 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_90 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_88 = local_80;
  uVar5 = *(undefined8 *)(param_2 + 0x1e);
  Ordinal_8(local_80);
  uVar5 = FUN_140182530(local_40,uVar5);
  iVar3 = Ordinal_10(local_80,uVar5);
  if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  Ordinal_9(local_40);
  plVar6 = operator_new(0x18);
  local_90 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("experience");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar6 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0x14,1,8,local_80);
    local_88 = plVar6;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar6 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar6 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1400b5620(undefined8 *param_1,undefined8 *param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  undefined6 uVar3;
  IUnknown *This;
  int iVar4;
  HRESULT HVar5;
  ULONG UVar6;
  undefined8 *puVar7;
  wchar_t *pwVar8;
  longlong lVar9;
  longlong *plVar10;
  undefined8 uVar11;
  undefined8 uVar12;
  char *riid;
  wchar_t *pwVar13;
  char *ppvObject;
  short sVar14;
  wchar_t *pwVar15;
  uint uVar16;
  undefined1 auStackY_2b8 [32];
  undefined1 local_278 [4];
  uint local_274;
  short local_270;
  short local_26c;
  undefined8 local_268;
  undefined4 local_260;
  undefined2 uStack_25c;
  undefined2 uStack_25a;
  ushort local_258;
  longlong *local_250;
  int local_248;
  int local_244;
  wchar_t *local_240;
  undefined8 *local_238;
  LPUNKNOWN local_230;
  longlong *local_228 [2];
  IUnknown *local_218;
  longlong *local_210;
  undefined4 local_208;
  undefined1 local_1f8 [24];
  undefined1 local_1e0 [24];
  undefined4 local_1c8;
  undefined1 *local_1c0;
  undefined4 local_1b8;
  undefined8 local_1b0;
  undefined1 *local_1a8;
  undefined8 *local_198;
  wchar_t *local_190;
  undefined8 local_188;
  undefined1 local_180;
  undefined8 local_178;
  undefined1 local_170;
  undefined8 local_168;
  undefined1 local_160;
  longlong *local_158;
  wchar_t *local_150;
  undefined8 local_148;
  undefined1 local_140;
  longlong local_138 [3];
  undefined1 local_120 [16];
  undefined8 local_110;
  undefined1 local_100 [24];
  undefined1 local_e8 [24];
  IID local_d0;
  undefined1 local_b8 [24];
  undefined1 local_a0 [24];
  undefined1 local_88 [24];
  undefined2 local_70;
  undefined6 uStack_6e;
  undefined2 uStack_68;
  undefined6 uStack_66;
  undefined2 uStack_60;
  undefined6 local_5e;
  undefined2 uStack_58;
  undefined6 local_56;
  undefined2 uStack_50;
  undefined2 local_4e;
  undefined4 local_4c;
  undefined4 uStack_48;
  undefined4 local_44;
  undefined4 uStack_40;
  ulonglong local_38;
  
  local_110 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_2b8;
  pwVar15 = (wchar_t *)0x0;
  local_250 = (longlong *)0x0;
  local_238 = param_1;
  local_198 = param_2;
  iVar4 = FUN_140001970(&local_250);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_218 = (IUnknown *)0x0;
  local_210 = (longlong *)0x0;
  Ordinal_8(local_1f8);
  Ordinal_8(local_1e0);
  pIVar2 = local_218;
  if ((local_218 != (IUnknown *)0x0) && (local_218 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_1a8 = &DAT_140281f00;
  local_1c0 = &DAT_140281f00;
  local_1b8 = 0;
  local_1b0 = 0;
  if (local_218 != (IUnknown *)0x0) {
    (*local_218->lpVtbl->Release)(local_218);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_230);
  if (HVar5 < 0) {
LAB_1400b5794:
    local_218 = (IUnknown *)0x0;
  }
  else {
    HVar5 = OleRun(local_230);
    if (-1 < HVar5) {
      HVar5 = (*local_230->lpVtbl->QueryInterface)(local_230,(IID *)&DAT_140281f68,&local_218);
    }
    (*local_230->lpVtbl->Release)(local_230);
    if (HVar5 < 0) goto LAB_1400b5794;
  }
  local_1c8 = 2;
  local_208 = 1;
  local_278[0] = 1;
  local_260 = *(undefined4 *)(param_2 + 1);
  local_268._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_268._0_4_ = CONCAT22(0x2335,(short)*param_2);
  uStack_25c = 1;
  uStack_25a = *(undefined2 *)((longlong)param_2 + 0xe);
  sVar14 = 0;
  pwVar13 = (wchar_t *)0x0;
  local_258 = 0;
  uVar16 = 0x12;
  local_274 = 0x12;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_248 = 0;
    UVar6 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_248 != 0) goto LAB_1400b5983;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_218;
    if (local_218 != (IUnknown *)0x0) {
      local_274 = 0;
      UVar6 = (*local_218->lpVtbl[0x12].AddRef)(local_218);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_218;
      if (local_274 != 0) {
        if (local_218 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar6 = (*local_218->lpVtbl[10].Release)(local_218);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_218 != (IUnknown *)0x0) {
        (*local_218->lpVtbl->Release)(local_218);
        local_218 = (IUnknown *)0x0;
      }
    }
    local_1b0 = 0;
    local_1a8 = &DAT_140281f00;
    local_1c0 = &DAT_140281f00;
    local_1b8 = 0;
    local_1c8 = 0;
    Ordinal_9(local_1e0);
    Ordinal_9(local_1f8);
    if (local_210 != (longlong *)0x0) {
      (**(code **)(*local_210 + 0x10))();
    }
    if (local_218 != (IUnknown *)0x0) {
      (*local_218->lpVtbl->Release)(local_218);
    }
    if (local_250 != (longlong *)0x0) {
      (**(code **)(*local_250 + 0x10))();
    }
    return 0;
  }
LAB_1400b5983:
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_158);
  FUN_140001710(&local_250,*puVar7,"dbo.up_select_battle_rank");
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  local_228[0] = local_138;
  sVar1 = *(short *)((longlong)param_2 + 0xe);
  Ordinal_8(local_138);
  FUN_140062080(local_138,(int)sVar1);
  pwVar8 = operator_new(0x18);
  local_150 = pwVar15;
  local_190 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("rank_type");
    *(longlong *)pwVar8 = lVar9;
    local_150 = pwVar8;
  }
  if (local_150 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_250,local_120,&local_150,3);
  local_228[0] = plVar10;
  if (local_250 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_250,&local_190);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar6 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_190 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_190 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    puVar7 = (undefined8 *)FUN_1400016d0(&local_250,local_228);
    This = local_218;
    pIVar2 = (IUnknown *)*puVar7;
    if (local_218 != pIVar2) {
      local_218 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_228[0] != (longlong *)0x0) {
      (**(code **)(*local_228[0] + 0x10))();
    }
    pIVar2 = local_218;
    if (local_218 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_26c = 0;
    UVar6 = (*local_218->lpVtbl[6].Release)(local_218);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
    }
    if (local_26c != -1) {
      while( true ) {
        pIVar2 = local_218;
        sVar14 = (short)pwVar13;
        if (local_218 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_270 = 0;
        UVar6 = (*local_218->lpVtbl[6].Release)(local_218);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
        if (local_270 == -1) break;
        local_70 = 0;
        local_4e = 0;
        local_4c = 0;
        uStack_48 = 0;
        local_44 = 0;
        uStack_40 = 0;
        uStack_6e = 0;
        uStack_68 = 0;
        uStack_66 = 0;
        uStack_60 = 0;
        local_5e = 0;
        uStack_58 = 0;
        local_56 = 0;
        uStack_50 = 0;
        uVar11 = FUN_140002290(&local_218,local_88,"grade",local_278);
        FUN_140182560(uVar11);
        local_70 = FUN_140062550(uVar11);
        Ordinal_9(local_88);
        uVar11 = FUN_140002290(&local_218,local_a0,"char_name",local_278);
        FUN_140062840(uVar11,&local_240);
        FUN_1401568c0();
        pwVar13 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar13 = pwVar15;
        }
        if (local_240 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar11 = FUN_1401568c0();
          local_180 = 0;
          local_188 = uVar11;
          FUN_140156b50(uVar11);
          local_180 = 1;
          if (((pwVar13 != (wchar_t *)0x0) && (pwVar13 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar13 + -4 != (wchar_t *)0x0)) {
            uVar12 = FUN_1401568c0();
            local_140 = 0;
            local_148 = uVar12;
            FUN_140156b50(uVar12);
            local_140 = 1;
            pwVar8 = pwVar13 + -2;
            *(int *)pwVar8 = *(int *)pwVar8 + -1;
            if (*(int *)pwVar8 == 0) {
              FUN_140156970(pwVar13 + -4);
            }
            FUN_140156be0(uVar12);
            local_140 = 0;
          }
          pwVar13 = local_240;
          if (((local_240 != (wchar_t *)PTR_DAT_1403200a0) && (local_240 != (wchar_t *)0x0)) &&
             (local_240 != (wchar_t *)0x8)) {
            *(int *)(local_240 + -2) = *(int *)(local_240 + -2) + 1;
          }
          FUN_140156be0(uVar11);
          local_180 = 0;
        }
        pwVar8 = pwVar13;
        if (pwVar13 == (wchar_t *)0x0) {
          pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy((wchar_t *)&uStack_6e,pwVar8,0xf);
        if (((pwVar13 != (wchar_t *)0x0) && (pwVar13 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar13 + -4 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_170 = 0;
          local_178 = uVar11;
          FUN_140156b50(uVar11);
          local_170 = 1;
          pwVar8 = pwVar13 + -2;
          *(int *)pwVar8 = *(int *)pwVar8 + -1;
          if (*(int *)pwVar8 == 0) {
            FUN_140156970(pwVar13 + -4);
          }
          FUN_140156be0(uVar11);
          local_170 = 0;
        }
        pwVar13 = local_240;
        if (((local_240 != (wchar_t *)0x0) && (local_240 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar8 = local_240 + -4, pwVar8 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_160 = 0;
          local_168 = uVar11;
          FUN_140156b50(uVar11);
          local_160 = 1;
          pwVar13 = pwVar13 + -2;
          *(int *)pwVar13 = *(int *)pwVar13 + -1;
          if (*(int *)pwVar13 == 0) {
            FUN_140156970(pwVar8);
          }
          FUN_140156be0(uVar11);
          local_160 = 0;
        }
        local_240 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_a0);
        uStack_50 = 0;
        uVar11 = FUN_140002290(&local_218,local_100,"char_class",local_278);
        FUN_140182560(uVar11);
        local_4e = FUN_140062550(uVar11);
        Ordinal_9(local_100);
        uVar11 = FUN_140002290(&local_218,local_b8,"duel_exp",local_278);
        FUN_140182560(uVar11);
        uVar11 = FUN_140182640(uVar11);
        local_4c = (undefined4)uVar11;
        uStack_48 = (undefined4)((ulonglong)uVar11 >> 0x20);
        Ordinal_9(local_b8);
        uVar11 = FUN_140002290(&local_218,local_e8,"total_win",local_278);
        FUN_140182560(uVar11);
        local_44 = FUN_140062550(uVar11);
        Ordinal_9(local_e8);
        ppvObject = "total_lose";
        riid = (char *)&local_d0;
        uVar11 = FUN_140002290(&local_218,riid,"total_lose",local_278);
        FUN_140182560(uVar11);
        uStack_40 = FUN_140062550(uVar11);
        Ordinal_9(&local_d0);
        lVar9 = (longlong)(int)uVar16;
        *(ulonglong *)(lVar9 + 0x130 + (longlong)param_1) = CONCAT62(uStack_6e,local_70);
        *(ulonglong *)(lVar9 + 0x138 + (longlong)param_1) = CONCAT62(uStack_66,uStack_68);
        *(ulonglong *)(lVar9 + 0x140 + (longlong)param_1) = CONCAT62(local_5e,uStack_60);
        *(ulonglong *)(lVar9 + 0x148 + (longlong)param_1) = CONCAT62(local_56,uStack_58);
        *(ulonglong *)(lVar9 + 0x150 + (longlong)param_1) =
             CONCAT44(local_4c,CONCAT22(local_4e,uStack_50));
        *(ulonglong *)(lVar9 + 0x158 + (longlong)param_1) = CONCAT44(local_44,uStack_48);
        *(undefined4 *)(lVar9 + 0x160 + (longlong)param_1) = uStack_40;
        local_274 = uVar16 + 0x34;
        local_258 = sVar14 + 1;
        pwVar13 = (wchar_t *)(ulonglong)local_258;
        if (50000 < local_274) {
          uVar3 = local_268._2_6_;
          local_268 = CONCAT62(local_268._2_6_,(short)local_274);
          uVar11 = local_268;
          riid = (char *)(param_1 + 0x26);
          local_268._4_2_ = SUB62(uVar3,2);
          local_268._6_2_ = SUB62(uVar3,4);
          ((IID *)riid)->Data1 = (undefined4)local_268;
          ((IID *)riid)->Data2 = local_268._4_2_;
          ((IID *)riid)->Data3 = local_268._6_2_;
          param_1[0x27] = CONCAT26(uStack_25a,CONCAT24(uStack_25c,local_260));
          *(ushort *)(param_1 + 0x28) = local_258;
          local_268 = uVar11;
          iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
          if (iVar4 == 0) {
            ppvObject = "DB Result Queue push error";
            riid = "DBResultQueue_Error.Log";
            FUN_1400a0b40(param_1[0x23]);
          }
          local_274 = 0x12;
          local_258 = 0;
          pwVar13 = pwVar15;
        }
        pIVar2 = local_218;
        uVar16 = local_274;
        if (local_218 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar5 = (*local_218->lpVtbl[0xc].QueryInterface)(local_218,(IID *)riid,(void **)ppvObject);
        if (HVar5 < 0) {
          _com_issue_errorex(HVar5,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
    }
    local_268 = CONCAT62(local_268._2_6_,(short)uVar16);
    param_1[0x26] = local_268;
    param_1[0x27] = CONCAT26(uStack_25a,CONCAT24(uStack_25c,local_260));
    *(short *)(param_1 + 0x28) = sVar14;
    iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar4 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar2 = local_218;
    if (local_218 != (IUnknown *)0x0) {
      local_244 = 0;
      UVar6 = (*local_218->lpVtbl[0x12].AddRef)(local_218);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_218;
      if (local_244 != 0) {
        if (local_218 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar6 = (*local_218->lpVtbl[10].Release)(local_218);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_218 != (IUnknown *)0x0) {
        (*local_218->lpVtbl->Release)(local_218);
        local_218 = (IUnknown *)0x0;
      }
    }
    local_1b0 = 0;
    local_1a8 = &DAT_140281f00;
    local_1c0 = &DAT_140281f00;
    local_1b8 = 0;
    local_1c8 = 0;
    Ordinal_9(local_1e0);
    Ordinal_9(local_1f8);
    if (local_210 != (longlong *)0x0) {
      (**(code **)(*local_210 + 0x10))();
    }
    if (local_218 != (IUnknown *)0x0) {
      (*local_218->lpVtbl->Release)(local_218);
    }
    if (local_250 != (longlong *)0x0) {
      (**(code **)(*local_250 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b62e0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b6377;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b6377:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_update_character_fatigue");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140062280(local_70,&local_58);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_78 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("character_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar7);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_80 = local_70;
  uVar2 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_78 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("fatigue");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_58 = local_70;
    uVar1 = *(undefined1 *)(param_2 + 0x22);
    Ordinal_8(local_70);
    FUN_140062080(local_70,uVar1);
    plVar10 = operator_new(0x18);
    local_80 = plVar10;
    if (plVar10 != (longlong *)0x0) {
      plVar10[1] = 0;
      *(undefined4 *)(plVar10 + 2) = 1;
      lVar9 = FUN_140201490(&DAT_14028d628);
      *plVar10 = lVar9;
      plVar11 = plVar10;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,0x10,1,1,local_70);
    local_58 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b67a0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b6836;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b6836:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_first_login");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("class");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_58 = local_70;
    uVar1 = *(undefined4 *)(param_2 + 0x22);
    Ordinal_8(local_70);
    FUN_140062080(local_70,uVar1);
    plVar9 = operator_new(0x18);
    local_80 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("lobby_id");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_70);
    local_58 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b6c70(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b6d03;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b6d03:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_character_tutorial");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400b6ef0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b6f88;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b6f88:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_give_up");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("give_up");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b72a0(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b7338;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b7338:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_hearts");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  sVar1 = *(short *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,(int)sVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("hearts");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b7650(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong local_80 [3];
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  undefined1 local_40 [24];
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b76e6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b76e6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_level");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = local_80;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_80,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar6);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = local_80;
  sVar1 = *(short *)(param_2 + 0x1e);
  Ordinal_8(local_80);
  FUN_140062080(local_80,(int)sVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,3,1,4,local_80);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = local_80;
    uVar6 = *(undefined8 *)(param_2 + 0x20);
    Ordinal_8(local_80);
    uVar6 = FUN_140182530(local_40,uVar6);
    iVar4 = Ordinal_10(local_80,uVar6);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    Ordinal_9(local_40);
    plVar9 = operator_new(0x18);
    local_88 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("experience");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0x14,1,8,local_80);
    local_68 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b7b50(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b7be8;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b7be8:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_job");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  sVar1 = *(short *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,(int)sVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028d83c);
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b7f00(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b7f96;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b7f96:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_sp");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_80 = local_70;
  sVar1 = *(short *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,(int)sVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028d88c);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_58 = local_70;
    sVar1 = *(short *)(param_2 + 0x20);
    Ordinal_8(local_70);
    FUN_140062080(local_70,(int)sVar1);
    plVar9 = operator_new(0x18);
    local_80 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("total_sp");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_70);
    local_58 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b83d0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b8468;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b8468:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_Stamina");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("stamina");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b8780(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b8813;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b8813:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_character_block");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400b8a00(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_78;
  undefined8 local_70;
  longlong *local_68;
  undefined1 local_60 [24];
  longlong local_48 [4];
  
  local_70 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b8a93;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b8a93:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_character_block_by_name");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_78 = local_48;
  uVar5 = FUN_1400623f0(local_48,param_2 + 0xe);
  plVar6 = operator_new(0x18);
  local_68 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_name");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_60,&local_res18,0xca,1,0x10,uVar5);
    local_68 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_78);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_78 != (longlong *)0x0) {
        (**(code **)(*local_78 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400b8c70(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b8d08;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b8d08:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_lobby");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("lobby");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b9020(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b90b8;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b90b8:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_individual_room");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("individual_room_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b93d0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b9466;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b9466:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_save_inventory_storage_money");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("inven_gold");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_58 = local_70;
    uVar1 = *(undefined4 *)(param_2 + 0x22);
    Ordinal_8(local_70);
    FUN_140062080(local_70,uVar1);
    plVar9 = operator_new(0x18);
    local_80 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("storage_gold");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_70);
    local_58 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400b98a0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400b9938;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400b9938:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_save_money");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028cd44);
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



longlong * FUN_1400b9c50(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  ULONG UVar2;
  int iVar3;
  HRESULT HVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  char local_res18 [8];
  longlong *local_res20;
  longlong *local_178;
  int local_170;
  int local_16c;
  undefined4 local_168;
  undefined4 uStack_164;
  undefined4 local_160;
  undefined2 local_15c;
  undefined4 local_15a;
  LPUNKNOWN local_150;
  longlong *local_148 [2];
  IUnknown *local_138;
  longlong *local_130;
  undefined4 local_128;
  undefined1 local_118 [24];
  undefined1 local_100 [24];
  undefined4 local_e8;
  undefined1 *local_e0;
  undefined4 local_d8;
  undefined8 local_d0;
  undefined1 *local_c8;
  longlong *local_b8;
  longlong *local_b0;
  longlong *local_a8;
  undefined8 local_a0;
  undefined1 local_98 [32];
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined1 local_68 [24];
  undefined1 local_50 [32];
  
  local_a0 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar9 = (longlong *)0x0;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400b9cc4:
    iVar3 = FUN_1400a1e90(param_1);
    if (iVar3 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (longlong *)0x0;
    }
  }
  else {
    local_16c = 0;
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_16c == 0) goto LAB_1400b9cc4;
  }
  local_15a = 0;
  local_160 = *(undefined4 *)(param_2 + 1);
  _local_168 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x235a0000);
  local_15c = 0x90;
  _local_168 = CONCAT62(stack0xfffffffffffffe9a,0x12);
  local_178 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_178);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_138 = (IUnknown *)0x0;
  local_130 = (longlong *)0x0;
  Ordinal_8(local_118);
  Ordinal_8(local_100);
  pIVar1 = local_138;
  if ((local_138 != (IUnknown *)0x0) && (local_138 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_c8 = &DAT_140281f00;
  local_e0 = &DAT_140281f00;
  local_d8 = 0;
  local_d0 = 0;
  if (local_138 != (IUnknown *)0x0) {
    (*local_138->lpVtbl->Release)(local_138);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_150);
  if (-1 < HVar4) {
    HVar4 = OleRun(local_150);
    if (-1 < HVar4) {
      HVar4 = (*local_150->lpVtbl->QueryInterface)(local_150,(IID *)&DAT_140281f68,&local_138);
    }
    (*local_150->lpVtbl->Release)(local_150);
    if (-1 < HVar4) goto LAB_1400b9e3c;
  }
  local_138 = (IUnknown *)0x0;
LAB_1400b9e3c:
  local_e8 = 2;
  local_128 = 1;
  local_res18[0] = '\x01';
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_b8);
  FUN_140001710(&local_178,*puVar5,"dbo.up_read_money");
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  local_res20 = (longlong *)local_68;
  local_78 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_74 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_70 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_6c = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar6 = FUN_140062280(local_68,&local_78);
  plVar7 = operator_new(0x18);
  local_a8 = plVar9;
  local_148[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_a8 = plVar7;
  }
  if (local_a8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_178,local_98,&local_a8,0xca,1,0x26,uVar6);
  local_res20 = plVar7;
  if (local_178 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_178,&local_b0);
  pIVar1 = (IUnknown *)*puVar5;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    puVar5 = (undefined8 *)FUN_1400016d0(&local_178,local_148);
    This = local_138;
    pIVar1 = (IUnknown *)*puVar5;
    if (local_138 != pIVar1) {
      local_138 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_148[0] != (longlong *)0x0) {
      (**(code **)(*local_148[0] + 0x10))();
    }
    pIVar1 = local_138;
    if (local_138 != (IUnknown *)0x0) {
      local_res20 = (longlong *)((ulonglong)local_res20 & 0xffffffffffff0000);
      UVar2 = (*local_138->lpVtbl[6].Release)(local_138);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_res20 == -1) {
        local_15c = 0x91;
        plVar7 = plVar9;
      }
      else {
        uVar6 = FUN_140002290(&local_138,local_50,&DAT_14028cd44,local_res18);
        FUN_140182560(uVar6);
        local_15a = FUN_140062550(uVar6);
        Ordinal_9(local_50);
        plVar7 = (longlong *)0x1;
        if (local_res18[0] == '\0') {
          local_15c = 0x92;
          plVar7 = plVar9;
        }
      }
      iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_168);
      if (iVar3 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_138;
      if (local_138 != (IUnknown *)0x0) {
        local_170 = 0;
        UVar2 = (*local_138->lpVtbl[0x12].AddRef)(local_138);
        if ((int)UVar2 < 0) {
          _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_138;
        if (local_170 != 0) {
          if (local_138 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar2 = (*local_138->lpVtbl[10].Release)(local_138);
          if ((int)UVar2 < 0) {
            _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_138 != (IUnknown *)0x0) {
          (*local_138->lpVtbl->Release)(local_138);
          local_138 = (IUnknown *)0x0;
        }
      }
      local_d0 = 0;
      local_c8 = &DAT_140281f00;
      local_e0 = &DAT_140281f00;
      local_d8 = 0;
      local_e8 = 0;
      Ordinal_9(local_100);
      Ordinal_9(local_118);
      if (local_130 != (longlong *)0x0) {
        (**(code **)(*local_130 + 0x10))();
      }
      if (local_138 != (IUnknown *)0x0) {
        (*local_138->lpVtbl->Release)(local_138);
      }
      if (local_178 != (longlong *)0x0) {
        (**(code **)(*local_178 + 0x10))();
      }
      return plVar7;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400ba4c3)
// WARNING: Removing unreachable block (ram,0x0001400ba4d0)
// WARNING: Removing unreachable block (ram,0x0001400ba4db)
// WARNING: Removing unreachable block (ram,0x0001400ba4eb)

undefined4 FUN_1400ba260(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  undefined6 uVar3;
  IUnknown *This;
  undefined2 uVar4;
  int iVar5;
  HRESULT HVar6;
  ULONG UVar7;
  undefined4 uVar8;
  undefined8 *puVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  longlong *plVar12;
  char *riid;
  char *ppvObject;
  uint uVar13;
  undefined8 *puVar14;
  char local_res10 [8];
  longlong *local_res18;
  undefined8 *local_res20;
  undefined8 local_1f0;
  undefined2 uStack_1e4;
  ushort uStack_1e2;
  longlong *local_1e0;
  undefined8 local_1d8;
  undefined4 local_1d0;
  int local_1c8;
  int local_1c4;
  undefined4 uVar15;
  LPUNKNOWN local_1b8 [2];
  IUnknown *local_1a8;
  longlong *local_1a0;
  undefined4 local_198;
  undefined1 local_188 [24];
  undefined1 local_170 [24];
  undefined4 local_158;
  undefined1 *local_150;
  undefined4 local_148;
  undefined8 local_140;
  undefined1 *local_138;
  undefined8 *local_128;
  longlong *local_120;
  undefined8 *local_118;
  longlong *local_110;
  longlong *local_108;
  undefined1 local_100 [24];
  undefined4 local_e8;
  undefined4 uStack_e4;
  undefined4 uStack_e0;
  undefined4 uStack_dc;
  undefined8 local_d0;
  undefined1 local_c8 [24];
  undefined1 local_b0 [24];
  undefined1 local_98 [24];
  IID local_80;
  undefined1 local_68 [24];
  undefined1 local_50 [24];
  
  local_d0 = 0xfffffffffffffffe;
  local_1e0 = (longlong *)0x0;
  local_128 = param_2;
  iVar5 = FUN_140001970(&local_1e0);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_1a8 = (IUnknown *)0x0;
  local_1a0 = (longlong *)0x0;
  Ordinal_8(local_188);
  Ordinal_8(local_170);
  pIVar2 = local_1a8;
  if ((local_1a8 != (IUnknown *)0x0) && (local_1a8 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_138 = &DAT_140281f00;
  local_150 = &DAT_140281f00;
  local_148 = 0;
  local_140 = 0;
  if (local_1a8 != (IUnknown *)0x0) {
    (*local_1a8->lpVtbl->Release)(local_1a8);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_1b8
                          );
  if (HVar6 < 0) {
LAB_1400ba3b4:
    local_1a8 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_1b8[0]);
    if (-1 < HVar6) {
      HVar6 = (*local_1b8[0]->lpVtbl->QueryInterface)(local_1b8[0],(IID *)&DAT_140281f68,&local_1a8)
      ;
    }
    (*local_1b8[0]->lpVtbl->Release)(local_1b8[0]);
    if (HVar6 < 0) goto LAB_1400ba3b4;
  }
  local_158 = 2;
  uVar15 = 1;
  local_198 = 1;
  local_res10[0] = '\x01';
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_1f0 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23500000);
  puVar14 = (undefined8 *)0x0;
  uStack_1e4 = 0xb4;
  uStack_1e2 = 0;
  uVar13 = 0x10;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_1c8 = 0;
    UVar7 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_1c8 != 0) goto LAB_1400ba59a;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_1a8;
    if (local_1a8 != (IUnknown *)0x0) {
      UVar7 = (*local_1a8->lpVtbl[0x12].AddRef)(local_1a8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_1a8 != (IUnknown *)0x0) {
        (*local_1a8->lpVtbl->Release)(local_1a8);
        local_1a8 = (IUnknown *)0x0;
      }
    }
    local_140 = 0;
    local_138 = &DAT_140281f00;
    local_150 = &DAT_140281f00;
    local_148 = 0;
    local_158 = 0;
    Ordinal_9(local_170);
    Ordinal_9(local_188);
    if (local_1a0 != (longlong *)0x0) {
      (**(code **)(*local_1a0 + 0x10))();
    }
    if (local_1a8 != (IUnknown *)0x0) {
      (*local_1a8->lpVtbl->Release)(local_1a8);
    }
    if (local_1e0 != (longlong *)0x0) {
      (**(code **)(*local_1e0 + 0x10))();
    }
    return 0;
  }
LAB_1400ba59a:
  puVar9 = (undefined8 *)FUN_140001f20(*param_1,&local_120);
  FUN_140001710(&local_1e0,*puVar9,"dbo.up_read_dungeon_rank");
  if (local_120 != (longlong *)0x0) {
    (**(code **)(*local_120 + 0x10))();
  }
  local_res18 = (longlong *)local_50;
  local_e8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_e4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_e0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_dc = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar10 = FUN_140062280(local_50,&local_e8);
  puVar9 = operator_new(0x18);
  local_118 = (undefined8 *)0x0;
  local_res20 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar11 = FUN_140201490("character_id");
    *puVar9 = uVar11;
    local_118 = puVar9;
  }
  if (local_118 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_1e0,local_100,&local_118,0xca,1,0x26,uVar10);
  local_res18 = plVar12;
  if (local_1e0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_1e0,&local_108);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar7 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_108 != (longlong *)0x0) {
      (**(code **)(*local_108 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    puVar9 = (undefined8 *)FUN_1400016d0(&local_1e0,&local_110);
    This = local_1a8;
    pIVar2 = (IUnknown *)*puVar9;
    if (local_1a8 != pIVar2) {
      local_1a8 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_110 != (longlong *)0x0) {
      (**(code **)(*local_110 + 0x10))();
    }
    pIVar2 = local_1a8;
    if (local_1a8 != (IUnknown *)0x0) {
      local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffffffff0000);
      UVar7 = (*local_1a8->lpVtbl[6].Release)(local_1a8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_res18 != -1) {
        while( true ) {
          pIVar2 = local_1a8;
          if (local_1a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          local_res20 = (undefined8 *)((ulonglong)local_res20 & 0xffffffffffff0000);
          UVar7 = (*local_1a8->lpVtbl[6].Release)(local_1a8);
          if ((int)UVar7 < 0) {
            _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
          }
          if ((short)local_res20 == -1) break;
          local_1d8 = 0;
          local_1d0 = 0;
          uVar10 = FUN_140002290(&local_1a8,local_c8,"world_id",local_res10);
          FUN_140182560(uVar10);
          uVar8 = FUN_140062550(uVar10);
          local_1d8 = CONCAT44(local_1d8._4_4_,uVar8);
          Ordinal_9(local_c8);
          uVar10 = FUN_140002290(&local_1a8,local_98,"difficulty",local_res10);
          FUN_140182560(uVar10);
          uVar4 = FUN_140062550(uVar10);
          local_1d8._0_6_ = CONCAT24(uVar4,(undefined4)local_1d8);
          Ordinal_9(local_98);
          uVar10 = FUN_140002290(&local_1a8,local_68,"rank_normal",local_res10);
          FUN_140182560(uVar10);
          uVar4 = FUN_140062550(uVar10);
          local_1d8 = CONCAT26(uVar4,(undefined6)local_1d8);
          Ordinal_9(local_68);
          uVar10 = FUN_140002290(&local_1a8,local_b0,"rank_hard",local_res10);
          FUN_140182560(uVar10);
          uVar4 = FUN_140062550(uVar10);
          local_1d0 = CONCAT22(local_1d0._2_2_,uVar4);
          Ordinal_9(local_b0);
          ppvObject = "rank_veryhard";
          riid = (char *)&local_80;
          uVar10 = FUN_140002290(&local_1a8,riid,"rank_veryhard",local_res10);
          FUN_140182560(uVar10);
          uVar4 = FUN_140062550(uVar10);
          local_1d0 = CONCAT22(uVar4,(undefined2)local_1d0);
          Ordinal_9(&local_80);
          *(undefined8 *)((longlong)(int)uVar13 + 0x130 + (longlong)param_1) = local_1d8;
          *(undefined4 *)((longlong)(int)uVar13 + 0x138 + (longlong)param_1) = local_1d0;
          uVar13 = uVar13 + 0xc;
          uStack_1e2 = (short)puVar14 + 1;
          puVar14 = (undefined8 *)(ulonglong)uStack_1e2;
          if (50000 < uVar13) {
            uVar3 = local_1f0._2_6_;
            local_1f0 = CONCAT62(local_1f0._2_6_,(short)uVar13);
            uVar10 = local_1f0;
            riid = (char *)(param_1 + 0x26);
            local_1f0._4_2_ = SUB62(uVar3,2);
            local_1f0._6_2_ = SUB62(uVar3,4);
            ((IID *)riid)->Data1 = (undefined4)local_1f0;
            ((IID *)riid)->Data2 = local_1f0._4_2_;
            ((IID *)riid)->Data3 = local_1f0._6_2_;
            param_1[0x27] = CONCAT26(uStack_1e2,CONCAT24(0xb4,uVar1));
            iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
            if (iVar5 == 0) {
              ppvObject = "DB Result Queue push error";
              riid = "DBResultQueue_Error.Log";
              FUN_1400a0b40(param_1[0x23]);
            }
            uVar13 = 0x10;
            uStack_1e2 = 0;
            puVar14 = (undefined8 *)0x0;
            local_1f0 = uVar10;
          }
          pIVar2 = local_1a8;
          if (local_1a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          HVar6 = (*local_1a8->lpVtbl[0xc].QueryInterface)(local_1a8,(IID *)riid,(void **)ppvObject)
          ;
          if (HVar6 < 0) {
            _com_issue_errorex(HVar6,pIVar2,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_res10[0] == '\0') {
          uStack_1e4 = 0xb5;
          uVar15 = 0;
        }
      }
      local_1f0 = CONCAT62(local_1f0._2_6_,(short)uVar13);
      param_1[0x26] = local_1f0;
      param_1[0x27] = CONCAT26(uStack_1e2,CONCAT24(uStack_1e4,uVar1));
      iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar5 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar2 = local_1a8;
      if (local_1a8 != (IUnknown *)0x0) {
        local_1c4 = 0;
        UVar7 = (*local_1a8->lpVtbl[0x12].AddRef)(local_1a8);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
        }
        pIVar2 = local_1a8;
        if (local_1c4 != 0) {
          if (local_1a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar7 = (*local_1a8->lpVtbl[10].Release)(local_1a8);
          if ((int)UVar7 < 0) {
            _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_1a8 != (IUnknown *)0x0) {
          (*local_1a8->lpVtbl->Release)(local_1a8);
          local_1a8 = (IUnknown *)0x0;
        }
      }
      local_140 = 0;
      local_138 = &DAT_140281f00;
      local_150 = &DAT_140281f00;
      local_148 = 0;
      local_158 = 0;
      Ordinal_9(local_170);
      Ordinal_9(local_188);
      if (local_1a0 != (longlong *)0x0) {
        (**(code **)(*local_1a0 + 0x10))();
      }
      if (local_1a8 != (IUnknown *)0x0) {
        (*local_1a8->lpVtbl->Release)(local_1a8);
      }
      if (local_1e0 != (longlong *)0x0) {
        (**(code **)(*local_1e0 + 0x10))();
      }
      return uVar15;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400bac50(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong local_80 [3];
  longlong *local_68;
  longlong *local_60;
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bace6;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bace6:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_update_dungeon_rank");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_80;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140062280(local_80,&local_58);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_60 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("character_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar7);
  local_60 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = local_80;
  uVar2 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_60 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("world_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_80);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_58 = local_80;
  sVar1 = *(short *)(param_2 + 0x22);
  Ordinal_8(local_80);
  FUN_140062080(local_80,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_68 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("difficulty");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0x10,1,1,local_80);
  local_58 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_58 = local_80;
  sVar1 = *(short *)(param_2 + 0x24);
  Ordinal_8(local_80);
  FUN_140062080(local_80,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_68 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("rank_normal");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0x10,1,1,local_80);
  local_58 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_58 = local_80;
  sVar1 = *(short *)(param_2 + 0x26);
  Ordinal_8(local_80);
  FUN_140062080(local_80,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_68 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("rank_hard");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0x10,1,1,local_80);
  local_58 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_58 = local_80;
    sVar1 = *(short *)(param_2 + 0x28);
    Ordinal_8(local_80);
    FUN_140062080(local_80,(int)sVar1);
    plVar10 = operator_new(0x18);
    local_68 = plVar10;
    if (plVar10 != (longlong *)0x0) {
      plVar10[1] = 0;
      *(undefined4 *)(plVar10 + 2) = 1;
      lVar9 = FUN_140201490("rank_veryhard");
      *plVar10 = lVar9;
      plVar11 = plVar10;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0x10,1,1,local_80);
    local_58 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400bb480(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong local_78;
  undefined1 local_70;
  longlong *local_60;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bb516;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bb516:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_inquiry_count");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = &local_78;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_58);
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_60 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = &local_78;
  uVar1 = *(undefined1 *)(param_2 + 0x1e);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x11) {
    iVar4 = Ordinal_9(&local_78);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_78._0_2_ = 0x11;
  }
  local_70 = uVar1;
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("count");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,&local_78);
    local_80 = plVar7;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar7 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar7 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400bb840(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong local_78;
  undefined1 local_70;
  longlong *local_60;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bb8d6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bb8d6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_event_fatigue");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = &local_78;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_58);
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_60 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = &local_78;
  uVar1 = *(undefined1 *)(param_2 + 0x1e);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x11) {
    iVar4 = Ordinal_9(&local_78);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_78._0_2_ = 0x11;
  }
  local_70 = uVar1;
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("fatigue\t\t");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,&local_78);
    local_80 = plVar7;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar7 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar7 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400bbc00(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong local_78;
  undefined1 local_70;
  longlong *local_60;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bbc96;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bbc96:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_event_fortune");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = &local_78;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_58);
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_60 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = &local_78;
  uVar1 = *(undefined1 *)(param_2 + 0x1e);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x11) {
    iVar4 = Ordinal_9(&local_78);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_78._0_2_ = 0x11;
  }
  local_70 = uVar1;
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("fortune");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,&local_78);
    local_80 = plVar7;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar7 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar7 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400bbfc0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong local_78;
  undefined1 local_70;
  longlong *local_60;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bc056;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bc056:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_event_daypartymission");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = &local_78;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_58);
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_60 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = &local_78;
  uVar1 = *(undefined1 *)(param_2 + 0x1e);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x11) {
    iVar4 = Ordinal_9(&local_78);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_78._0_2_ = 0x11;
  }
  local_70 = uVar1;
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("fortune");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,&local_78);
    local_80 = plVar7;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar7 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar7 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400bc380(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong local_78;
  undefined1 local_70;
  longlong *local_60;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bc416;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bc416:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_event_inquiry");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = &local_78;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_58);
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_60 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = &local_78;
  uVar1 = *(undefined1 *)(param_2 + 0x1e);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x11) {
    iVar4 = Ordinal_9(&local_78);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_78._0_2_ = 0x11;
  }
  local_70 = uVar1;
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("inquiry");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,&local_78);
    local_80 = plVar7;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar7 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar7 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400bc740(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong local_78;
  undefined1 local_70;
  longlong *local_60;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bc7d6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bc7d6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_event_hearts");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = &local_78;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_58);
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_60 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = &local_78;
  uVar1 = *(undefined1 *)(param_2 + 0x1e);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x11) {
    iVar4 = Ordinal_9(&local_78);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_78._0_2_ = 0x11;
  }
  local_70 = uVar1;
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("hearts");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,&local_78);
    local_80 = plVar7;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar7 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar7 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



// WARNING: Removing unreachable block (ram,0x0001400bcd84)
// WARNING: Removing unreachable block (ram,0x0001400bcd91)
// WARNING: Removing unreachable block (ram,0x0001400bcd9c)
// WARNING: Removing unreachable block (ram,0x0001400bcdac)

undefined4 FUN_1400bcb00(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  undefined6 uVar3;
  IUnknown *This;
  int iVar4;
  HRESULT HVar5;
  ULONG UVar6;
  undefined4 uVar7;
  undefined8 *puVar8;
  undefined8 uVar9;
  undefined8 uVar10;
  longlong *plVar11;
  undefined8 uVar12;
  longlong lVar13;
  char *riid;
  char *ppvObject;
  undefined8 *puVar14;
  char local_res10 [8];
  longlong *local_res18;
  undefined8 *local_res20;
  uint local_1e8;
  longlong *local_1e0;
  int local_1d8;
  undefined4 uVar15;
  undefined8 local_1c8;
  undefined2 uStack_1bc;
  undefined2 uStack_1ba;
  undefined6 uStack_1b8;
  undefined2 uStack_1b2;
  undefined6 uStack_1b0;
  ushort local_1aa;
  LPUNKNOWN local_1a8 [2];
  undefined4 local_198;
  undefined4 uStack_194;
  undefined4 uStack_190;
  undefined4 uStack_18c;
  undefined8 local_188;
  IUnknown *local_178;
  longlong *local_170;
  undefined4 local_168;
  undefined1 local_158 [24];
  undefined1 local_140 [24];
  undefined4 local_128;
  undefined1 *local_120;
  undefined4 local_118;
  undefined8 local_110;
  undefined1 *local_108;
  undefined8 *local_f8;
  longlong *local_f0;
  undefined8 *local_e8;
  longlong *local_e0;
  longlong *local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined1 local_b0 [16];
  undefined1 local_a0 [24];
  undefined1 local_88 [24];
  IID local_70;
  undefined1 local_58 [32];
  
  local_c0 = 0xfffffffffffffffe;
  local_1e0 = (longlong *)0x0;
  local_f8 = param_2;
  iVar4 = FUN_140001970(&local_1e0);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_178 = (IUnknown *)0x0;
  local_170 = (longlong *)0x0;
  Ordinal_8(local_158);
  Ordinal_8(local_140);
  pIVar2 = local_178;
  if ((local_178 != (IUnknown *)0x0) && (local_178 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_108 = &DAT_140281f00;
  local_120 = &DAT_140281f00;
  local_118 = 0;
  local_110 = 0;
  if (local_178 != (IUnknown *)0x0) {
    (*local_178->lpVtbl->Release)(local_178);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_1a8
                          );
  if (-1 < HVar5) {
    HVar5 = OleRun(local_1a8[0]);
    if (-1 < HVar5) {
      HVar5 = (*local_1a8[0]->lpVtbl->QueryInterface)(local_1a8[0],(IID *)&DAT_140281f68,&local_178)
      ;
    }
    (*local_1a8[0]->lpVtbl->Release)(local_1a8[0]);
    if (-1 < HVar5) goto LAB_1400bcc5c;
  }
  local_178 = (IUnknown *)0x0;
LAB_1400bcc5c:
  local_128 = 2;
  uVar15 = 1;
  local_168 = 1;
  local_res10[0] = '\x01';
  uStack_1ba = 0;
  uStack_1b8 = 0;
  uStack_1b2 = 0;
  uStack_1b0 = 0;
  puVar14 = (undefined8 *)0x0;
  local_1aa = 0;
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_1c8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23bc0000);
  uStack_1bc = 0xfa;
  local_1e8 = 0x20;
  pIVar2 = *(IUnknown **)*param_1;
  if ((pIVar2 != (IUnknown *)0x0) && (UVar6 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2), (int)UVar6 < 0)
     ) {
    _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f08);
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_178;
    if (local_178 != (IUnknown *)0x0) {
      UVar6 = (*local_178->lpVtbl[0x12].AddRef)(local_178);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_178 != (IUnknown *)0x0) {
        (*local_178->lpVtbl->Release)(local_178);
        local_178 = (IUnknown *)0x0;
      }
    }
    local_110 = 0;
    local_108 = &DAT_140281f00;
    local_120 = &DAT_140281f00;
    local_118 = 0;
    local_128 = 0;
    Ordinal_9(local_140);
    Ordinal_9(local_158);
    if (local_170 != (longlong *)0x0) {
      (**(code **)(*local_170 + 0x10))();
    }
    if (local_178 != (IUnknown *)0x0) {
      (*local_178->lpVtbl->Release)(local_178);
    }
    if (local_1e0 != (longlong *)0x0) {
      (**(code **)(*local_1e0 + 0x10))();
    }
    return 0;
  }
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_f0);
  FUN_140001710(&local_1e0,*puVar8,"dbo.up_select_cash_effectinfo");
  if (local_f0 != (longlong *)0x0) {
    (**(code **)(*local_f0 + 0x10))();
  }
  local_res18 = (longlong *)local_58;
  local_198 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_194 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_190 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_18c = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar9 = FUN_140062280(local_58,&local_198);
  puVar8 = operator_new(0x18);
  local_e8 = (undefined8 *)0x0;
  local_res20 = puVar8;
  if (puVar8 != (undefined8 *)0x0) {
    puVar8[1] = 0;
    *(undefined4 *)(puVar8 + 2) = 1;
    uVar10 = FUN_140201490("cha_uid");
    *puVar8 = uVar10;
    local_e8 = puVar8;
  }
  if (local_e8 != (undefined8 *)0x0) {
    plVar11 = (longlong *)FUN_140001880(&local_1e0,local_b0,&local_e8,0xca,1,0x26,uVar9);
    local_res18 = plVar11;
    if (local_1e0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_1e0,&local_d8);
    pIVar2 = (IUnknown *)*puVar8;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar6 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_d8 != (longlong *)0x0) {
        (**(code **)(*local_d8 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      puVar8 = (undefined8 *)FUN_1400016d0(&local_1e0,&local_e0);
      This = local_178;
      pIVar2 = (IUnknown *)*puVar8;
      if (local_178 != pIVar2) {
        local_178 = pIVar2;
        if (pIVar2 != (IUnknown *)0x0) {
          (*pIVar2->lpVtbl->AddRef)(pIVar2);
        }
        if (This != (IUnknown *)0x0) {
          (*This->lpVtbl->Release)(This);
        }
      }
      if (local_e0 != (longlong *)0x0) {
        (**(code **)(*local_e0 + 0x10))();
      }
      pIVar2 = local_178;
      if (local_178 != (IUnknown *)0x0) {
        local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffffffff0000);
        UVar6 = (*local_178->lpVtbl[6].Release)(local_178);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
        if ((short)local_res18 != -1) {
          uStack_1ba = (undefined2)*(undefined8 *)((longlong)param_2 + 0xe);
          uStack_1b8 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0xe) >> 0x10);
          uStack_1b2 = (undefined2)*(undefined8 *)((longlong)param_2 + 0x16);
          uStack_1b0 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x16) >> 0x10);
          while( true ) {
            pIVar2 = local_178;
            if (local_178 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            local_res20 = (undefined8 *)((ulonglong)local_res20 & 0xffffffffffff0000);
            UVar6 = (*local_178->lpVtbl[6].Release)(local_178);
            if ((int)UVar6 < 0) {
              _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
            }
            if ((short)local_res20 == -1) break;
            local_198 = 0;
            uStack_194 = 0;
            uStack_190 = 0;
            uStack_18c = 0;
            local_188 = 0;
            uVar9 = FUN_140002290(&local_178,local_88,"item_uid",local_res10);
            FUN_1400625d0(uVar9,&local_d0);
            uVar10 = local_c8;
            uVar9 = local_d0;
            Ordinal_9(local_88);
            uVar12 = FUN_140002290(&local_178,local_a0,"package_code",local_res10);
            FUN_140182560(uVar12);
            uVar7 = FUN_140062550(uVar12);
            local_188 = CONCAT44(local_188._4_4_,uVar7);
            Ordinal_9(local_a0);
            ppvObject = "expire_time";
            riid = (char *)&local_70;
            uVar12 = FUN_140002290(&local_178,riid,"expire_time",local_res10);
            FUN_140182560(uVar12);
            uVar7 = FUN_140062550(uVar12);
            local_188 = CONCAT44(uVar7,(undefined4)local_188);
            Ordinal_9(&local_70);
            lVar13 = (longlong)(int)local_1e8;
            *(undefined8 *)(lVar13 + 0x130 + (longlong)param_1) = uVar9;
            *(undefined8 *)(lVar13 + 0x138 + (longlong)param_1) = uVar10;
            *(undefined8 *)(lVar13 + 0x140 + (longlong)param_1) = local_188;
            local_1e8 = local_1e8 + 0x18;
            local_1aa = (short)puVar14 + 1;
            puVar14 = (undefined8 *)(ulonglong)local_1aa;
            if (50000 < local_1e8) {
              uVar3 = local_1c8._2_6_;
              local_1c8 = CONCAT62(local_1c8._2_6_,(short)local_1e8);
              uVar9 = local_1c8;
              riid = (char *)(param_1 + 0x26);
              local_1c8._4_2_ = SUB62(uVar3,2);
              local_1c8._6_2_ = SUB62(uVar3,4);
              ((IID *)riid)->Data1 = (undefined4)local_1c8;
              ((IID *)riid)->Data2 = local_1c8._4_2_;
              ((IID *)riid)->Data3 = local_1c8._6_2_;
              param_1[0x27] = CONCAT26(uStack_1ba,CONCAT24(0xfa,uVar1));
              param_1[0x28] = CONCAT26(uStack_1b2,uStack_1b8);
              param_1[0x29] = CONCAT26(local_1aa,uStack_1b0);
              iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
              if (iVar4 == 0) {
                ppvObject = "DB Result Queue push error";
                riid = "DBResultQueue_Error.Log";
                FUN_1400a0b40(param_1[0x23]);
              }
              local_1e8 = 0x20;
              local_1aa = 0;
              puVar14 = (undefined8 *)0x0;
              local_1c8 = uVar9;
            }
            pIVar2 = local_178;
            if (local_178 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            HVar5 = (*local_178->lpVtbl[0xc].QueryInterface)
                              (local_178,(IID *)riid,(void **)ppvObject);
            if (HVar5 < 0) {
              _com_issue_errorex(HVar5,pIVar2,(_GUID *)&DAT_140281f28);
            }
          }
          if (local_res10[0] == '\0') {
            uStack_1bc = 0xfc;
            uVar15 = 0;
          }
        }
        local_1c8 = CONCAT62(local_1c8._2_6_,(short)local_1e8);
        param_1[0x26] = local_1c8;
        param_1[0x27] = CONCAT26(uStack_1ba,CONCAT24(uStack_1bc,uVar1));
        param_1[0x28] = CONCAT26(uStack_1b2,uStack_1b8);
        param_1[0x29] = CONCAT26(local_1aa,uStack_1b0);
        iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar4 == 0) {
          FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
        }
        pIVar2 = local_178;
        if (local_178 != (IUnknown *)0x0) {
          local_1d8 = 0;
          UVar6 = (*local_178->lpVtbl[0x12].AddRef)(local_178);
          if ((int)UVar6 < 0) {
            _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
          }
          pIVar2 = local_178;
          if (local_1d8 != 0) {
            if (local_178 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            UVar6 = (*local_178->lpVtbl[10].Release)(local_178);
            if ((int)UVar6 < 0) {
              _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
            }
          }
          if (local_178 != (IUnknown *)0x0) {
            (*local_178->lpVtbl->Release)(local_178);
            local_178 = (IUnknown *)0x0;
          }
        }
        local_110 = 0;
        local_108 = &DAT_140281f00;
        local_120 = &DAT_140281f00;
        local_118 = 0;
        local_128 = 0;
        Ordinal_9(local_140);
        Ordinal_9(local_158);
        if (local_170 != (longlong *)0x0) {
          (**(code **)(*local_170 + 0x10))();
        }
        if (local_178 != (IUnknown *)0x0) {
          (*local_178->lpVtbl->Release)(local_178);
        }
        if (local_1e0 != (longlong *)0x0) {
          (**(code **)(*local_1e0 + 0x10))();
        }
        return uVar15;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400bd4e0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bd576;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bd576:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_cash_effectinfo");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0x1e);
  uStack_60 = *(undefined4 *)(param_2 + 0x26);
  uStack_5c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_40;
  local_88 = *(undefined4 *)(param_2 + 0xe);
  uStack_84 = *(undefined4 *)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_40,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    uVar1 = *(undefined4 *)(param_2 + 0x2e);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("package_code");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      uVar1 = *(undefined4 *)(param_2 + 0x32);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,uVar1);
      plVar9 = operator_new(0x18);
      local_98[0] = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("expire_time");
        *plVar9 = lVar8;
        plVar10 = plVar9;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400bdaf0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bdb88;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bdb88:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_cash_effectinfo");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0x1e);
  uStack_54 = *(undefined4 *)(param_2 + 0x22);
  uStack_50 = *(undefined4 *)(param_2 + 0x26);
  uStack_4c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_uid");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x2e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("expire_time");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400bdea0(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bdf33;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bdf33:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_delete_cash_effectinfo");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0x1e);
  uStack_54 = *(undefined4 *)(param_2 + 0x22);
  uStack_50 = *(undefined4 *)(param_2 + 0x26);
  uStack_4c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_uid");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400be120(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400be1b8;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400be1b8:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_addition_status_hp");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("addition_hp");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400be4d0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400be568;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400be568:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_addition_status_mp");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("addition_mp");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400be880(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400be918;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400be918:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_addition_status_physicattack");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("addition_physicattack");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400bec30(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400becc8;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400becc8:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_addition_status_physicdefense");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("addition_physicdefense");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400befe0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bf078;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bf078:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_addition_status_magicattack");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("addition_magicattack");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400bf390(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bf428;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bf428:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_addition_status_magicdefense");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("addition_magicdefense");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400bf740(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bf7d8;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bf7d8:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_fatiguestorage");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("fatigue");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400bfaf0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400bfb88;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400bfb88:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_guild_point");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("guildpoint");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_1400bfea0(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  undefined6 uVar3;
  IUnknown *This;
  undefined2 uVar4;
  int iVar5;
  HRESULT HVar6;
  ULONG UVar7;
  undefined4 uVar8;
  undefined8 *puVar9;
  wchar_t *pwVar10;
  longlong lVar11;
  longlong *plVar12;
  undefined8 uVar13;
  undefined8 uVar14;
  wchar_t *pwVar15;
  char *riid;
  char *ppvObject;
  wchar_t *pwVar16;
  uint uVar17;
  wchar_t *pwVar18;
  undefined1 auStackY_5a8 [32];
  char local_568 [4];
  short local_564;
  short local_560;
  longlong *local_558;
  int local_550;
  int local_54c;
  int local_548;
  undefined4 uVar19;
  undefined8 local_540;
  undefined2 uStack_534;
  ushort local_522;
  IUnknown *local_518;
  longlong *local_510;
  undefined4 local_508;
  undefined1 local_4f8 [24];
  undefined1 local_4e0 [24];
  undefined4 local_4c8;
  undefined1 *local_4c0;
  undefined4 local_4b8;
  undefined8 local_4b0;
  undefined1 *local_4a8;
  wchar_t *local_498;
  longlong *local_490;
  LPUNKNOWN local_488;
  wchar_t *local_480;
  undefined8 *local_478;
  undefined8 *local_470;
  undefined4 local_468;
  undefined4 local_464;
  undefined4 local_460;
  undefined4 local_45c;
  undefined4 local_458;
  uchar local_454 [4];
  uchar local_450 [4];
  undefined4 local_44c;
  undefined8 local_448;
  undefined1 local_440;
  undefined8 local_438;
  undefined1 local_430;
  undefined8 local_428;
  undefined1 local_420;
  undefined8 local_418;
  undefined1 local_410;
  wchar_t *local_408;
  longlong *local_400 [3];
  undefined4 local_3e8;
  undefined4 uStack_3e4;
  undefined4 uStack_3e0;
  undefined4 uStack_3dc;
  undefined1 local_3d0 [8];
  undefined8 local_3c8;
  undefined1 local_3c0 [24];
  undefined1 local_3a8 [24];
  undefined1 local_390 [24];
  undefined1 local_378 [24];
  undefined1 local_360 [24];
  undefined1 local_348 [24];
  undefined1 local_330 [24];
  undefined1 local_318 [24];
  undefined1 local_300 [24];
  undefined1 local_2e8 [24];
  undefined1 local_2d0 [24];
  undefined1 local_2b8 [24];
  undefined1 local_2a0 [24];
  undefined1 local_288 [24];
  undefined1 local_270 [24];
  undefined1 local_258 [24];
  undefined1 local_240 [24];
  undefined1 local_228 [24];
  undefined1 local_210 [24];
  undefined1 local_1f8 [24];
  undefined1 local_1e0 [24];
  undefined1 local_1c8 [24];
  undefined1 local_1b0 [24];
  undefined1 local_198 [24];
  undefined1 local_180 [24];
  undefined1 local_168 [24];
  undefined1 local_150 [24];
  longlong local_138 [3];
  undefined1 local_120 [24];
  IID local_108;
  undefined4 local_f8;
  undefined4 local_f4;
  undefined4 local_f0;
  undefined4 local_ec;
  undefined4 local_e8;
  undefined4 local_e4;
  wchar_t local_e0 [12];
  ulonglong local_c8;
  undefined2 local_c0;
  undefined8 local_be;
  undefined8 local_b6;
  undefined8 local_ae;
  undefined4 local_a6;
  undefined2 local_a2;
  undefined8 local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined4 local_70;
  undefined4 local_6c;
  undefined4 local_68;
  ulonglong local_58;
  
  local_3c8 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStackY_5a8;
  pwVar16 = (wchar_t *)0x0;
  local_558 = (longlong *)0x0;
  local_478 = param_1;
  local_470 = param_2;
  iVar5 = FUN_140001970(&local_558);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_518 = (IUnknown *)0x0;
  local_510 = (longlong *)0x0;
  Ordinal_8(local_4f8);
  Ordinal_8(local_4e0);
  pIVar2 = local_518;
  if ((local_518 != (IUnknown *)0x0) && (local_518 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_4a8 = &DAT_140281f00;
  local_4c0 = &DAT_140281f00;
  local_4b8 = 0;
  local_4b0 = 0;
  if (local_518 != (IUnknown *)0x0) {
    (*local_518->lpVtbl->Release)(local_518);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_488);
  if (HVar6 < 0) {
LAB_1400c001c:
    local_518 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_488);
    if (-1 < HVar6) {
      HVar6 = (*local_488->lpVtbl->QueryInterface)(local_488,(IID *)&DAT_140281f68,&local_518);
    }
    (*local_488->lpVtbl->Release)(local_488);
    if (HVar6 < 0) goto LAB_1400c001c;
  }
  local_4c8 = 2;
  uVar19 = 1;
  local_508 = 1;
  local_568[0] = '\x01';
  pwVar18 = (wchar_t *)0x0;
  local_522 = 0;
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_540 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23e60000);
  uStack_534 = 0x106;
  uVar17 = 0x20;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_54c = 0;
    UVar7 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_54c != 0) goto LAB_1400c0221;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_518;
    if (local_518 != (IUnknown *)0x0) {
      local_548 = 0;
      UVar7 = (*local_518->lpVtbl[0x12].AddRef)(local_518);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_518;
      if (local_548 != 0) {
        if (local_518 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar7 = (*local_518->lpVtbl[10].Release)(local_518);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_518 != (IUnknown *)0x0) {
        (*local_518->lpVtbl->Release)(local_518);
        local_518 = (IUnknown *)0x0;
      }
    }
    local_4b0 = 0;
    local_4a8 = &DAT_140281f00;
    local_4c0 = &DAT_140281f00;
    local_4b8 = 0;
    local_4c8 = 0;
    Ordinal_9(local_4e0);
    Ordinal_9(local_4f8);
    if (local_510 != (longlong *)0x0) {
      (**(code **)(*local_510 + 0x10))();
    }
    if (local_518 != (IUnknown *)0x0) {
      (*local_518->lpVtbl->Release)(local_518);
    }
    if (local_558 != (longlong *)0x0) {
      (**(code **)(*local_558 + 0x10))();
    }
    return 0;
  }
LAB_1400c0221:
  puVar9 = (undefined8 *)FUN_140001f20(*param_1,local_400);
  FUN_140001710(&local_558,*puVar9,"dbo.up_read_rearing_listinfo");
  if (local_400[0] != (longlong *)0x0) {
    (**(code **)(*local_400[0] + 0x10))();
  }
  local_490 = local_138;
  local_3e8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_3e4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_3e0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_3dc = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_138,&local_3e8);
  pwVar10 = operator_new(0x18);
  local_408 = pwVar16;
  local_480 = pwVar10;
  if (pwVar10 != (wchar_t *)0x0) {
    pwVar10[4] = L'\0';
    pwVar10[5] = L'\0';
    pwVar10[6] = L'\0';
    pwVar10[7] = L'\0';
    pwVar10[8] = L'\x01';
    pwVar10[9] = L'\0';
    lVar11 = FUN_140201490("cha_uid");
    *(longlong *)pwVar10 = lVar11;
    local_408 = pwVar10;
  }
  if (local_408 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_558,local_3d0,&local_408,0xca);
  local_490 = plVar12;
  if (local_558 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_558,&local_480);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar7 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_480 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_480 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    puVar9 = (undefined8 *)FUN_1400016d0(&local_558,&local_490);
    This = local_518;
    pIVar2 = (IUnknown *)*puVar9;
    if (local_518 != pIVar2) {
      local_518 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_490 != (longlong *)0x0) {
      (**(code **)(*local_490 + 0x10))();
    }
    pIVar2 = local_518;
    if (local_518 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_560 = 0;
    UVar7 = (*local_518->lpVtbl[6].Release)(local_518);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
    }
    if (local_560 != -1) {
      while( true ) {
        pIVar2 = local_518;
        if (local_518 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_564 = 0;
        UVar7 = (*local_518->lpVtbl[6].Release)(local_518);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
        }
        if (local_564 == -1) break;
        local_108.Data1 = 0;
        local_108.Data2 = 0;
        local_108.Data3 = 0;
        local_108.Data4[0] = '\0';
        local_108.Data4[1] = '\0';
        local_108.Data4[2] = '\0';
        local_108.Data4[3] = '\0';
        local_108.Data4[4] = '\0';
        local_108.Data4[5] = '\0';
        local_108.Data4[6] = '\0';
        local_108.Data4[7] = '\0';
        local_f8 = 0;
        local_f4 = 0;
        local_f0 = 0;
        local_ec = 0;
        local_e8 = 0;
        local_e4 = 0;
        local_c0 = 0;
        local_be = 0;
        local_b6 = 0;
        local_ae = 0;
        local_a6 = 0;
        local_a2 = 0;
        local_a0 = 0;
        local_98 = 0;
        local_90 = 0;
        local_88 = 0;
        local_80 = 0;
        local_78 = 0;
        local_70 = 0;
        local_6c = 0;
        local_68 = 0;
        local_e0[0] = L'\0';
        local_e0[1] = L'\0';
        local_e0[2] = L'\0';
        local_e0[3] = L'\0';
        local_e0[4] = L'\0';
        local_e0[5] = L'\0';
        local_e0[6] = L'\0';
        local_e0[7] = L'\0';
        local_e0[8] = L'\0';
        local_e0[9] = L'\0';
        local_e0[10] = L'\0';
        local_e0[0xb] = L'\0';
        local_c8 = 0;
        uVar13 = FUN_140002290(&local_518,local_168,"table_id",local_568);
        FUN_140182560(uVar13);
        uVar4 = FUN_140062550(uVar13);
        local_108.Data1 = CONCAT22(local_108.Data1._2_2_,uVar4);
        Ordinal_9(local_168);
        uVar13 = FUN_140002290(&local_518,local_3c0,"group_id",local_568);
        FUN_140182560(uVar13);
        uVar4 = FUN_140062550(uVar13);
        local_108.Data1 = CONCAT22(uVar4,(undefined2)local_108.Data1);
        Ordinal_9(local_3c0);
        uVar13 = FUN_140002290(&local_518,local_390,"rearing_id",local_568);
        FUN_1400625d0(uVar13,&local_458);
        local_108.Data2 = (ushort)local_458;
        local_108.Data3 = local_458._2_2_;
        local_108.Data4[0] = local_454[0];
        local_108.Data4[1] = local_454[1];
        local_108.Data4[2] = local_454[2];
        local_108.Data4[3] = local_454[3];
        local_108.Data4[4] = local_450[0];
        local_108.Data4[5] = local_450[1];
        local_108.Data4[6] = local_450[2];
        local_108.Data4[7] = local_450[3];
        local_f8 = local_44c;
        Ordinal_9(local_390);
        uVar13 = FUN_140002290(&local_518,local_240,"char_id",local_568);
        FUN_1400625d0(uVar13,&local_468);
        local_f4 = local_468;
        local_f0 = local_464;
        local_ec = local_460;
        local_e8 = local_45c;
        Ordinal_9(local_240);
        uVar13 = FUN_140002290(&local_518,local_360,&DAT_14028e384,local_568);
        FUN_140182560(uVar13);
        local_e4 = FUN_140062550(uVar13);
        Ordinal_9(local_360);
        uVar13 = FUN_140002290(&local_518,local_150,&DAT_14028a330,local_568);
        FUN_140062840(uVar13,&local_498);
        FUN_1401568c0();
        pwVar10 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar10 = pwVar16;
        }
        if (local_498 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar13 = FUN_1401568c0();
          local_430 = 0;
          local_438 = uVar13;
          FUN_140156b50(uVar13);
          local_430 = 1;
          if (((pwVar10 != (wchar_t *)0x0) && (pwVar10 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar10 + -4 != (wchar_t *)0x0)) {
            uVar14 = FUN_1401568c0();
            local_440 = 0;
            local_448 = uVar14;
            FUN_140156b50(uVar14);
            local_440 = 1;
            pwVar15 = pwVar10 + -2;
            *(int *)pwVar15 = *(int *)pwVar15 + -1;
            if (*(int *)pwVar15 == 0) {
              FUN_140156970(pwVar10 + -4);
            }
            FUN_140156be0(uVar14);
            local_440 = 0;
          }
          pwVar10 = local_498;
          if (((local_498 != (wchar_t *)PTR_DAT_1403200a0) && (local_498 != (wchar_t *)0x0)) &&
             (local_498 != (wchar_t *)0x8)) {
            *(int *)(local_498 + -2) = *(int *)(local_498 + -2) + 1;
          }
          FUN_140156be0(uVar13);
          local_430 = 0;
        }
        pwVar15 = pwVar10;
        if (pwVar10 == (wchar_t *)0x0) {
          pwVar15 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_e0,pwVar15,0xf);
        if (((pwVar10 != (wchar_t *)0x0) && (pwVar10 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar10 + -4 != (wchar_t *)0x0)) {
          uVar13 = FUN_1401568c0();
          local_420 = 0;
          local_428 = uVar13;
          FUN_140156b50(uVar13);
          local_420 = 1;
          pwVar15 = pwVar10 + -2;
          *(int *)pwVar15 = *(int *)pwVar15 + -1;
          if (*(int *)pwVar15 == 0) {
            FUN_140156970(pwVar10 + -4);
          }
          FUN_140156be0(uVar13);
          local_420 = 0;
        }
        pwVar10 = local_498;
        if (((local_498 != (wchar_t *)0x0) && (local_498 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar15 = local_498 + -4, pwVar15 != (wchar_t *)0x0)) {
          uVar13 = FUN_1401568c0();
          local_410 = 0;
          local_418 = uVar13;
          FUN_140156b50(uVar13);
          local_410 = 1;
          pwVar10 = pwVar10 + -2;
          *(int *)pwVar10 = *(int *)pwVar10 + -1;
          if (*(int *)pwVar10 == 0) {
            FUN_140156970(pwVar15);
          }
          FUN_140156be0(uVar13);
          local_410 = 0;
        }
        local_498 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_150);
        local_c8 = local_c8 & 0xffffffffffff;
        uVar13 = FUN_140002290(&local_518,local_330,&DAT_14028d83c,local_568);
        FUN_140182560(uVar13);
        local_c0 = FUN_140062550(uVar13);
        Ordinal_9(local_330);
        uVar13 = FUN_140002290(&local_518,local_210,"level",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_be = CONCAT44(local_be._4_4_,uVar8);
        Ordinal_9(local_210);
        uVar13 = FUN_140002290(&local_518,local_300,"index",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_ae = CONCAT44(local_ae._4_4_,uVar8);
        Ordinal_9(local_300);
        uVar13 = FUN_140002290(&local_518,local_180,"actionpoint",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_ae = CONCAT44(uVar8,(undefined4)local_ae);
        Ordinal_9(local_180);
        uVar13 = FUN_140002290(&local_518,local_2d0,"usedturn",local_568);
        FUN_140182560(uVar13);
        local_a6 = FUN_140062550(uVar13);
        Ordinal_9(local_2d0);
        uVar13 = FUN_140002290(&local_518,local_1e0,"endingid",local_568);
        FUN_140182560(uVar13);
        local_a2 = FUN_140062550(uVar13);
        Ordinal_9(local_1e0);
        uVar13 = FUN_140002290(&local_518,local_2a0,"rewarditem",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_a0 = CONCAT44(local_a0._4_4_,uVar8);
        Ordinal_9(local_2a0);
        uVar13 = FUN_140002290(&local_518,local_120,"createtime",local_568);
        FUN_140182560(uVar13);
        local_b6 = FUN_140098d80(uVar13);
        Ordinal_9(local_120);
        uVar13 = FUN_140002290(&local_518,local_270,"vital",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_a0 = CONCAT44(uVar8,(undefined4)local_a0);
        Ordinal_9(local_270);
        uVar13 = FUN_140002290(&local_518,local_1b0,"intelligence",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_98 = CONCAT44(local_98._4_4_,uVar8);
        Ordinal_9(local_1b0);
        uVar13 = FUN_140002290(&local_518,local_3a8,"strength",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_98 = CONCAT44(uVar8,(undefined4)local_98);
        Ordinal_9(local_3a8);
        uVar13 = FUN_140002290(&local_518,local_378,"temper",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_90 = CONCAT44(local_90._4_4_,uVar8);
        Ordinal_9(local_378);
        uVar13 = FUN_140002290(&local_518,local_348,"charm",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_90 = CONCAT44(uVar8,(undefined4)local_90);
        Ordinal_9(local_348);
        uVar13 = FUN_140002290(&local_518,local_318,"exhaust",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_80 = CONCAT44(local_80._4_4_,uVar8);
        Ordinal_9(local_318);
        uVar13 = FUN_140002290(&local_518,local_2e8,"angry",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_80 = CONCAT44(uVar8,(undefined4)local_80);
        Ordinal_9(local_2e8);
        uVar13 = FUN_140002290(&local_518,local_2b8,"normal",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_78 = CONCAT44(local_78._4_4_,uVar8);
        Ordinal_9(local_2b8);
        uVar13 = FUN_140002290(&local_518,local_288,&DAT_14028e438,local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_78 = CONCAT44(uVar8,(undefined4)local_78);
        Ordinal_9(local_288);
        uVar13 = FUN_140002290(&local_518,local_258,"sadness",local_568);
        FUN_140182560(uVar13);
        local_70 = FUN_140062550(uVar13);
        Ordinal_9(local_258);
        uVar13 = FUN_140002290(&local_518,local_228,"height",local_568);
        FUN_140182560(uVar13);
        local_6c = FUN_140098cf0(uVar13);
        Ordinal_9(local_228);
        uVar13 = FUN_140002290(&local_518,local_1f8,"weight",local_568);
        FUN_140182560(uVar13);
        local_68 = FUN_140098cf0(uVar13);
        Ordinal_9(local_1f8);
        uVar13 = FUN_140002290(&local_518,local_1c8,"resilent",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_88 = CONCAT44(local_88._4_4_,uVar8);
        Ordinal_9(local_1c8);
        uVar13 = FUN_140002290(&local_518,local_198,"eloquence",local_568);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_88 = CONCAT44(uVar8,(undefined4)local_88);
        Ordinal_9(local_198);
        riid = (char *)&local_108;
        ppvObject = (char *)0xa4;
        memcpy((void *)((longlong)(int)uVar17 + 0x130 + (longlong)param_1),riid,0xa4);
        uVar17 = uVar17 + 0xa4;
        local_522 = (short)pwVar18 + 1;
        pwVar18 = (wchar_t *)(ulonglong)local_522;
        if (50000 < uVar17) {
          uVar3 = local_540._2_6_;
          local_540 = CONCAT62(local_540._2_6_,(short)uVar17);
          uVar13 = local_540;
          riid = (char *)(param_1 + 0x26);
          local_540._4_2_ = SUB62(uVar3,2);
          local_540._6_2_ = SUB62(uVar3,4);
          ((IID *)riid)->Data1 = (undefined4)local_540;
          ((IID *)riid)->Data2 = local_540._4_2_;
          ((IID *)riid)->Data3 = local_540._6_2_;
          param_1[0x27] = (ulonglong)CONCAT24(0x106,uVar1);
          param_1[0x28] = 0;
          param_1[0x29] = (ulonglong)local_522 << 0x30;
          iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
          if (iVar5 == 0) {
            ppvObject = "DB Result Queue push error";
            riid = "DBResultQueue_Error.Log";
            FUN_1400a0b40(param_1[0x23]);
          }
          uVar17 = 0x20;
          local_522 = 0;
          pwVar18 = pwVar16;
          local_540 = uVar13;
        }
        pIVar2 = local_518;
        if (local_518 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar6 = (*local_518->lpVtbl[0xc].QueryInterface)(local_518,(IID *)riid,(void **)ppvObject);
        if (HVar6 < 0) {
          _com_issue_errorex(HVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_568[0] == '\0') {
        uStack_534 = 0x108;
        uVar19 = 0;
      }
    }
    local_540 = CONCAT62(local_540._2_6_,(short)uVar17);
    param_1[0x26] = local_540;
    param_1[0x27] = (ulonglong)CONCAT24(uStack_534,uVar1);
    param_1[0x28] = 0;
    param_1[0x29] = (ulonglong)local_522 << 0x30;
    iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar5 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar2 = local_518;
    if (local_518 != (IUnknown *)0x0) {
      local_550 = 0;
      UVar7 = (*local_518->lpVtbl[0x12].AddRef)(local_518);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_518;
      if (local_550 != 0) {
        if (local_518 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar7 = (*local_518->lpVtbl[10].Release)(local_518);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_518 != (IUnknown *)0x0) {
        (*local_518->lpVtbl->Release)(local_518);
        local_518 = (IUnknown *)0x0;
      }
    }
    local_4b0 = 0;
    local_4a8 = &DAT_140281f00;
    local_4c0 = &DAT_140281f00;
    local_4b8 = 0;
    local_4c8 = 0;
    Ordinal_9(local_4e0);
    Ordinal_9(local_4f8);
    if (local_510 != (longlong *)0x0) {
      (**(code **)(*local_510 + 0x10))();
    }
    if (local_518 != (IUnknown *)0x0) {
      (*local_518->lpVtbl->Release)(local_518);
    }
    if (local_558 != (longlong *)0x0) {
      (**(code **)(*local_558 + 0x10))();
    }
    return uVar19;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400c12d0(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_b8;
  longlong *local_b0;
  undefined4 local_a8;
  undefined4 uStack_a4;
  undefined8 uStack_a0;
  longlong *local_88;
  longlong *local_80;
  longlong local_78 [4];
  undefined8 local_58;
  
  local_58 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400c136d;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400c136d:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_rearing_info");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_b8 = (longlong *)&local_a8;
  sVar1 = *(short *)(param_2 + 0x1e);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,(int)sVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("table_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0x10,1,1,&local_a8);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_a8;
  sVar1 = *(short *)(param_2 + 0x20);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,(int)sVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("group_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_b0,&local_res18,0x10,1,1,&local_a8);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = local_78;
  local_a8 = *(undefined4 *)(param_2 + 0x22);
  uStack_a4 = *(undefined4 *)(param_2 + 0x26);
  uStack_a0 = *(undefined8 *)(param_2 + 0x2a);
  uVar10 = FUN_140062280(local_78,&local_a8);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("reating_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = local_78;
  local_a8 = *(undefined4 *)(param_2 + 0x32);
  uStack_a4 = *(undefined4 *)(param_2 + 0x36);
  uStack_a0 = *(undefined8 *)(param_2 + 0x3a);
  uVar10 = FUN_140062280(local_78,&local_a8);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("char_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar10);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x42);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028e384);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0x10,1,1,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = local_78;
  uVar10 = FUN_1400623f0(local_78,param_2 + 0x46);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_140289c8c);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar10);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  sVar1 = *(short *)(param_2 + 0x66);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,(int)sVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028d83c);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0x10,1,1,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x68);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x78);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("index");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0x10,1,1,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x7c);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("actionpoint");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x80);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("usedturn");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  sVar1 = *(short *)(param_2 + 0x84);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,(int)sVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("endingid");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x86);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("rewarditem");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar10 = *(undefined8 *)(param_2 + 0x70);
  Ordinal_8(&local_a8);
  if (((short)local_a8 != 5) && ((short)local_a8 != 7)) {
    iVar5 = Ordinal_9(&local_a8);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_a8 = CONCAT22(local_a8._2_2_,5);
  }
  uStack_a0 = uVar10;
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("createtime");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0x14,1,8,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x8a);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("vital");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x8e);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("intelligence");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x92);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("strength");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x96);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("temper");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0x9a);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("charm");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0xa6);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("exhaust");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0xaa);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("angry");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0xae);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("normal");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0xb2);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028e438);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0xb6);
  Ordinal_8(&local_a8);
  FUN_140062080(&local_a8,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("sadness");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_b0 = (longlong *)&local_a8;
  uVar2 = *(undefined4 *)(param_2 + 0xba);
  Ordinal_8(&local_a8);
  if ((short)local_a8 != 4) {
    iVar5 = Ordinal_9(&local_a8);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_a8 = CONCAT22(local_a8._2_2_,4);
  }
  uStack_a0 = CONCAT44(uStack_a0._4_4_,uVar2);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("height");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
  local_b0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b0 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0xbe);
    Ordinal_8(&local_a8);
    if ((short)local_a8 != 4) {
      iVar5 = Ordinal_9(&local_a8);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_a8 = CONCAT22(local_a8._2_2_,4);
    }
    uStack_a0 = CONCAT44(uStack_a0._4_4_,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("weight");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b0 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0x9e);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_88 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("resilent");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_b0 = (longlong *)&local_a8;
    uVar2 = *(undefined4 *)(param_2 + 0xa2);
    Ordinal_8(&local_a8);
    FUN_140062080(&local_a8,uVar2);
    plVar9 = operator_new(0x18);
    local_88 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("eloquence");
      *plVar9 = lVar8;
      plVar11 = plVar9;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_a8);
    local_b0 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_b8 != (longlong *)0x0) {
        (**(code **)(*local_b8 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400c34d0(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  short local_a0 [4];
  undefined4 local_98;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_58;
  
  local_58 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400c356d;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400c356d:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_update_rearing_info");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)local_a0;
  local_78 = *(longlong **)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x2a);
  uStack_6c = *(undefined4 *)(param_2 + 0x2e);
  uVar7 = FUN_140062280(local_a0,&local_78);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_80 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("rearing_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar7);
  local_80 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_88 = (longlong *)local_a0;
  sVar1 = *(short *)(param_2 + 0x1e);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_80 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("table_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_a0);
  local_88 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  sVar1 = *(short *)(param_2 + 0x66);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_88 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490(&DAT_14028d83c);
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0x10,1,1,local_a0);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar2 = *(undefined4 *)(param_2 + 0x68);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_88 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("level");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar2 = *(undefined4 *)(param_2 + 0x7c);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_88 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("actionpoint");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar2 = *(undefined4 *)(param_2 + 0x80);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_88 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("usedturn");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  sVar1 = *(short *)(param_2 + 0x84);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_88 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("endingid");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar2 = *(undefined4 *)(param_2 + 0x86);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_88 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("rewarditem");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar2 = *(undefined4 *)(param_2 + 0x8a);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_88 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("vital");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar2 = *(undefined4 *)(param_2 + 0x8e);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_88 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("intelligence");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_78 = (longlong *)local_a0;
    uVar2 = *(undefined4 *)(param_2 + 0x92);
    Ordinal_8(local_a0);
    FUN_140062080(local_a0,uVar2);
    plVar8 = operator_new(0x18);
    plVar10 = plVar11;
    local_88 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("strength");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
    local_78 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_78 = (longlong *)local_a0;
    uVar2 = *(undefined4 *)(param_2 + 0x96);
    Ordinal_8(local_a0);
    FUN_140062080(local_a0,uVar2);
    plVar8 = operator_new(0x18);
    plVar10 = plVar11;
    local_88 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("temper");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
    local_78 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_78 = (longlong *)local_a0;
    uVar2 = *(undefined4 *)(param_2 + 0x9a);
    Ordinal_8(local_a0);
    FUN_140062080(local_a0,uVar2);
    plVar8 = operator_new(0x18);
    plVar10 = plVar11;
    local_88 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("charm");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
    local_78 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_78 = (longlong *)local_a0;
    uVar2 = *(undefined4 *)(param_2 + 0x9e);
    Ordinal_8(local_a0);
    FUN_140062080(local_a0,uVar2);
    plVar8 = operator_new(0x18);
    plVar10 = plVar11;
    local_88 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("resilent");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
    local_78 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_78 = (longlong *)local_a0;
    uVar2 = *(undefined4 *)(param_2 + 0xa2);
    Ordinal_8(local_a0);
    FUN_140062080(local_a0,uVar2);
    plVar8 = operator_new(0x18);
    plVar10 = plVar11;
    local_88 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("eloquence");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
    local_78 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_78 = (longlong *)local_a0;
      uVar2 = *(undefined4 *)(param_2 + 0xa6);
      Ordinal_8(local_a0);
      FUN_140062080(local_a0,uVar2);
      plVar8 = operator_new(0x18);
      plVar10 = plVar11;
      local_88 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar9 = FUN_140201490("exhaust");
        *plVar8 = lVar9;
        plVar10 = plVar8;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
      local_78 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_78 = (longlong *)local_a0;
      uVar2 = *(undefined4 *)(param_2 + 0xaa);
      Ordinal_8(local_a0);
      FUN_140062080(local_a0,uVar2);
      plVar8 = operator_new(0x18);
      plVar10 = plVar11;
      local_88 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar9 = FUN_140201490("angry");
        *plVar8 = lVar9;
        plVar10 = plVar8;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
      local_78 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_78 = (longlong *)local_a0;
      uVar2 = *(undefined4 *)(param_2 + 0xae);
      Ordinal_8(local_a0);
      FUN_140062080(local_a0,uVar2);
      plVar8 = operator_new(0x18);
      plVar10 = plVar11;
      local_88 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar9 = FUN_140201490("normal");
        *plVar8 = lVar9;
        plVar10 = plVar8;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
      local_78 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_78 = (longlong *)local_a0;
      uVar2 = *(undefined4 *)(param_2 + 0xb2);
      Ordinal_8(local_a0);
      FUN_140062080(local_a0,uVar2);
      plVar8 = operator_new(0x18);
      plVar10 = plVar11;
      local_88 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar9 = FUN_140201490(&DAT_14028e438);
        *plVar8 = lVar9;
        plVar10 = plVar8;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
      local_78 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_78 = (longlong *)local_a0;
      uVar2 = *(undefined4 *)(param_2 + 0xb6);
      Ordinal_8(local_a0);
      FUN_140062080(local_a0,uVar2);
      plVar8 = operator_new(0x18);
      plVar10 = plVar11;
      local_88 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar9 = FUN_140201490("sadness");
        *plVar8 = lVar9;
        plVar10 = plVar8;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
      local_78 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_78 = (longlong *)local_a0;
      uVar2 = *(undefined4 *)(param_2 + 0xba);
      Ordinal_8(local_a0);
      if (local_a0[0] != 4) {
        iVar5 = Ordinal_9(local_a0);
        if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar5);
        }
        local_a0[0] = 4;
      }
      local_98 = uVar2;
      plVar8 = operator_new(0x18);
      plVar10 = plVar11;
      local_88 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar9 = FUN_140201490("height");
        *plVar8 = lVar9;
        plVar10 = plVar8;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,4,1,4,local_a0);
      local_78 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        local_78 = (longlong *)local_a0;
        uVar2 = *(undefined4 *)(param_2 + 0xbe);
        Ordinal_8(local_a0);
        if (local_a0[0] != 4) {
          iVar5 = Ordinal_9(local_a0);
          if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(iVar5);
          }
          local_a0[0] = 4;
        }
        local_98 = uVar2;
        plVar8 = operator_new(0x18);
        plVar10 = plVar11;
        local_88 = plVar8;
        if (plVar8 != (longlong *)0x0) {
          plVar8[1] = 0;
          *(undefined4 *)(plVar8 + 2) = 1;
          lVar9 = FUN_140201490("weight");
          *plVar8 = lVar9;
          plVar10 = plVar8;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,4,1,4,local_a0);
        local_78 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          local_78 = (longlong *)local_a0;
          uVar2 = *(undefined4 *)(param_2 + 0x78);
          Ordinal_8(local_a0);
          FUN_140062080(local_a0,uVar2);
          plVar10 = operator_new(0x18);
          local_88 = plVar10;
          if (plVar10 != (longlong *)0x0) {
            plVar10[1] = 0;
            *(undefined4 *)(plVar10 + 2) = 1;
            lVar9 = FUN_140201490("index");
            *plVar10 = lVar9;
            plVar11 = plVar10;
          }
          local_res18 = plVar11;
          if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          plVar11 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
          local_78 = plVar11;
          if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
          pIVar3 = (IUnknown *)*puVar6;
          if (pIVar3 != (IUnknown *)0x0) {
            UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
            if ((int)UVar4 < 0) {
              _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
            }
            if (local_a8 != (longlong *)0x0) {
              (**(code **)(*local_a8 + 0x10))();
            }
            if ((longlong *)*plVar11 != (longlong *)0x0) {
              (**(code **)(*(longlong *)*plVar11 + 0x10))();
            }
            FUN_1400016d0(&local_res20,&local_res18);
            if (local_res18 != (longlong *)0x0) {
              (**(code **)(*local_res18 + 0x10))();
            }
            if (local_res20 != (longlong *)0x0) {
              (**(code **)(*local_res20 + 0x10))();
            }
            return 1;
          }
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400c50e0(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400c5173;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400c5173:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_delete_rearing_info");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0x1e);
  uStack_54 = *(undefined4 *)(param_2 + 0x22);
  uStack_50 = *(undefined4 *)(param_2 + 0x26);
  uStack_4c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("rearing_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400c5360(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400c53f8;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400c53f8:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_rearing_turn");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("rearing_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("usedturn");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400c5710(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98;
  longlong *local_90;
  longlong local_88 [4];
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar9 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400c57a6;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400c57a6:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_character_rob");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_68;
  uVar5 = FUN_14006a8f0(&local_68,param_2 + 0x3e);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_a0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("bcust_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0xca,1,0x32,uVar5);
  local_a0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_98 = local_88;
  local_68 = *(undefined4 *)(param_2 + 0xe);
  uStack_64 = *(undefined4 *)(param_2 + 0x12);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_88,&local_68);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_a0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar5);
  local_98 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_88;
    uVar5 = FUN_1400623f0(local_88,param_2 + 0x1e);
    plVar8 = operator_new(0x18);
    local_98 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar7 = FUN_140201490(&DAT_140289c8c);
      *plVar8 = lVar7;
      plVar9 = plVar8;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x10,uVar5);
    local_90 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400c5bc0(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *local_res18;
  longlong *local_res20;
  short local_88 [4];
  undefined4 local_80;
  longlong *local_70;
  longlong *local_68;
  longlong *local_60;
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar9 = (longlong *)0x0;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400c5c35:
    iVar3 = FUN_1400a1e90(param_1);
    if (iVar3 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return 0;
    }
  }
  else {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 == 0) goto LAB_1400c5c35;
  }
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_battleinfo");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_70 = (longlong *)local_88;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_88,&local_58);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_60 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar5);
  local_60 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_68 = (longlong *)local_88;
  Ordinal_8(local_88);
  if ((local_88[0] == 3) || (local_88[0] == 10)) {
LAB_1400c5e49:
    local_80 = 0;
  }
  else {
    if (local_88[0] != 0xb) {
      iVar3 = Ordinal_9(local_88);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar3);
      }
      local_88[0] = 3;
      goto LAB_1400c5e49;
    }
    local_80 = (uint)local_80._2_2_ << 0x10;
  }
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_60 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("total_win");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_88);
  local_68 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_58 = (longlong *)local_88;
  Ordinal_8(local_88);
  if ((local_88[0] == 3) || (local_88[0] == 10)) {
LAB_1400c5f9b:
    local_80 = 0;
  }
  else {
    if (local_88[0] != 0xb) {
      iVar3 = Ordinal_9(local_88);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar3);
      }
      local_88[0] = 3;
      goto LAB_1400c5f9b;
    }
    local_80 = local_80 & 0xffff0000;
  }
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_68 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("total_lose");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_88);
  local_58 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_58 = (longlong *)local_88;
  Ordinal_8(local_88);
  if ((local_88[0] == 3) || (local_88[0] == 10)) {
LAB_1400c60ed:
    local_80 = 0;
  }
  else {
    if (local_88[0] != 0xb) {
      iVar3 = Ordinal_9(local_88);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar3);
      }
      local_88[0] = 3;
      goto LAB_1400c60ed;
    }
    local_80 = local_80 & 0xffff0000;
  }
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_68 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("team_win");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_88);
  local_58 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_58 = (longlong *)local_88;
  Ordinal_8(local_88);
  if ((local_88[0] == 3) || (local_88[0] == 10)) {
LAB_1400c623f:
    local_80 = 0;
  }
  else {
    if (local_88[0] != 0xb) {
      iVar3 = Ordinal_9(local_88);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar3);
      }
      local_88[0] = 3;
      goto LAB_1400c623f;
    }
    local_80 = local_80 & 0xffff0000;
  }
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_68 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("team_lose");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_88);
  local_58 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_58 = (longlong *)local_88;
  Ordinal_8(local_88);
  if ((local_88[0] == 3) || (local_88[0] == 10)) {
LAB_1400c6391:
    local_80 = 0;
  }
  else {
    if (local_88[0] != 0xb) {
      iVar3 = Ordinal_9(local_88);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar3);
      }
      local_88[0] = 3;
      goto LAB_1400c6391;
    }
    local_80 = local_80 & 0xffff0000;
  }
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_68 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("leader_win");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_88);
  local_58 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_58 = (longlong *)local_88;
  Ordinal_8(local_88);
  if ((local_88[0] == 3) || (local_88[0] == 10)) {
LAB_1400c64e3:
    local_80 = 0;
  }
  else {
    if (local_88[0] != 0xb) {
      iVar3 = Ordinal_9(local_88);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar3);
      }
      local_88[0] = 3;
      goto LAB_1400c64e3;
    }
    local_80 = local_80 & 0xffff0000;
  }
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_68 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("leader_lose");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_88);
  local_58 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_58 = (longlong *)local_88;
  Ordinal_8(local_88);
  if ((local_88[0] == 3) || (local_88[0] == 10)) {
LAB_1400c6635:
    local_80 = 0;
  }
  else {
    if (local_88[0] != 0xb) {
      iVar3 = Ordinal_9(local_88);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar3);
      }
      local_88[0] = 3;
      goto LAB_1400c6635;
    }
    local_80 = local_80 & 0xffff0000;
  }
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_68 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("tag_win");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_88);
  local_58 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_58 = (longlong *)local_88;
  Ordinal_8(local_88);
  if ((local_88[0] == 3) || (local_88[0] == 10)) {
LAB_1400c6787:
    local_80 = 0;
  }
  else {
    if (local_88[0] != 0xb) {
      iVar3 = Ordinal_9(local_88);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar3);
      }
      local_88[0] = 3;
      goto LAB_1400c6787;
    }
    local_80 = local_80 & 0xffff0000;
  }
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_68 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("tag_lose");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_88);
  local_58 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_58 = (longlong *)local_88;
  Ordinal_8(local_88);
  if ((local_88[0] == 3) || (local_88[0] == 10)) {
LAB_1400c68d9:
    local_80 = 0;
  }
  else {
    if (local_88[0] != 0xb) {
      iVar3 = Ordinal_9(local_88);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar3);
      }
      local_88[0] = 3;
      goto LAB_1400c68d9;
    }
    local_80 = local_80 & 0xffff0000;
  }
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_68 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("death_win");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_88);
  local_58 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_58 = (longlong *)local_88;
  Ordinal_8(local_88);
  if ((local_88[0] == 3) || (local_88[0] == 10)) {
LAB_1400c6a2b:
    local_80 = 0;
  }
  else {
    if (local_88[0] != 0xb) {
      iVar3 = Ordinal_9(local_88);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar3);
      }
      local_88[0] = 3;
      goto LAB_1400c6a2b;
    }
    local_80 = local_80 & 0xffff0000;
  }
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_68 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("death_lose");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_88);
  local_58 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_58 = (longlong *)local_88;
  Ordinal_8(local_88);
  if ((local_88[0] == 3) || (local_88[0] == 10)) {
LAB_1400c6b7d:
    local_80 = 0;
  }
  else {
    if (local_88[0] != 0xb) {
      iVar3 = Ordinal_9(local_88);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar3);
      }
      local_88[0] = 3;
      goto LAB_1400c6b7d;
    }
    local_80 = local_80 & 0xffff0000;
  }
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_68 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("individual_win");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_88);
  local_58 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_70 != (longlong *)0x0) {
    (**(code **)(*local_70 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_58 = (longlong *)local_88;
  Ordinal_8(local_88);
  if ((local_88[0] != 3) && (local_88[0] != 10)) {
    if (local_88[0] == 0xb) {
      local_80 = local_80 & 0xffff0000;
      goto LAB_1400c6cd3;
    }
    iVar3 = Ordinal_9(local_88);
    if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar3);
    }
    local_88[0] = 3;
  }
  local_80 = 0;
LAB_1400c6cd3:
  plVar8 = operator_new(0x18);
  local_68 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar7 = FUN_140201490("individual_lose");
    *plVar8 = lVar7;
    plVar9 = plVar8;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_88);
  local_58 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_70);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_70 != (longlong *)0x0) {
      (**(code **)(*local_70 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1400c6e30(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  int iVar2;
  HRESULT HVar3;
  ULONG UVar4;
  undefined4 uVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  undefined8 uVar9;
  undefined1 auStackY_228 [32];
  char local_1e8 [4];
  short local_1e4;
  longlong *local_1e0;
  undefined8 *local_1d8;
  undefined8 *local_1d0;
  int local_1c8;
  LPUNKNOWN local_1c0;
  longlong *local_1b8 [2];
  IUnknown *local_1a8;
  longlong *local_1a0;
  undefined4 local_198;
  undefined1 local_188 [24];
  undefined1 local_170 [24];
  undefined4 local_158;
  undefined1 *local_150;
  undefined4 local_148;
  undefined8 local_140;
  undefined1 *local_138;
  longlong *local_128;
  longlong *local_120;
  longlong *local_118;
  undefined8 local_110;
  undefined4 local_f8;
  undefined4 uStack_f4;
  undefined4 uStack_f0;
  undefined4 uStack_ec;
  undefined1 local_e8 [16];
  undefined1 local_d8 [24];
  undefined1 local_c0 [24];
  undefined1 local_a8 [24];
  longlong local_90 [3];
  undefined1 local_78 [24];
  undefined4 local_60;
  undefined4 uStack_5c;
  undefined4 local_58;
  undefined2 local_54;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  char local_36;
  ulonglong local_30;
  
  local_110 = 0xfffffffffffffffe;
  local_30 = DAT_1403223c0 ^ (ulonglong)auStackY_228;
  local_1e0 = (longlong *)0x0;
  local_1d8 = param_1;
  local_1d0 = param_2;
  iVar2 = FUN_140001970(&local_1e0);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_1a8 = (IUnknown *)0x0;
  local_1a0 = (longlong *)0x0;
  Ordinal_8(local_188);
  Ordinal_8(local_170);
  pIVar1 = local_1a8;
  if ((local_1a8 != (IUnknown *)0x0) && (local_1a8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_138 = &DAT_140281f00;
  local_150 = &DAT_140281f00;
  local_148 = 0;
  local_140 = 0;
  if (local_1a8 != (IUnknown *)0x0) {
    (*local_1a8->lpVtbl->Release)(local_1a8);
  }
  HVar3 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_1c0);
  if (HVar3 < 0) {
LAB_1400c6f8d:
    local_1a8 = (IUnknown *)0x0;
  }
  else {
    HVar3 = OleRun(local_1c0);
    if (-1 < HVar3) {
      HVar3 = (*local_1c0->lpVtbl->QueryInterface)(local_1c0,(IID *)&DAT_140281f68,&local_1a8);
    }
    (*local_1c0->lpVtbl->Release)(local_1c0);
    if (HVar3 < 0) goto LAB_1400c6f8d;
  }
  local_158 = 2;
  local_198 = 1;
  local_1e8[0] = '\x01';
  local_52 = 0;
  local_4a = 0;
  local_36 = '\0';
  local_42 = 0;
  local_3a = 0;
  local_58 = *(undefined4 *)(param_2 + 1);
  _local_60 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x240c0000);
  local_54 = 1;
  _local_60 = CONCAT62(stack0xffffffffffffffa2,0x2b);
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_1c8 = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_1c8 != 0) goto LAB_1400c71b1;
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_1a8;
    if (local_1a8 != (IUnknown *)0x0) {
      local_1d0 = (undefined8 *)((ulonglong)local_1d0 & 0xffffffff00000000);
      UVar4 = (*local_1a8->lpVtbl[0x12].AddRef)(local_1a8);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_1a8;
      if ((int)local_1d0 != 0) {
        if (local_1a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*local_1a8->lpVtbl[10].Release)(local_1a8);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_1a8 != (IUnknown *)0x0) {
        (*local_1a8->lpVtbl->Release)(local_1a8);
        local_1a8 = (IUnknown *)0x0;
      }
    }
    local_140 = 0;
    local_138 = &DAT_140281f00;
    local_150 = &DAT_140281f00;
    local_148 = 0;
    local_158 = 0;
    Ordinal_9(local_170);
    Ordinal_9(local_188);
    if (local_1a0 != (longlong *)0x0) {
      (**(code **)(*local_1a0 + 0x10))();
    }
    if (local_1a8 != (IUnknown *)0x0) {
      (*local_1a8->lpVtbl->Release)(local_1a8);
    }
    if (local_1e0 != (longlong *)0x0) {
      (**(code **)(*local_1e0 + 0x10))();
    }
    return (longlong *)0x0;
  }
LAB_1400c71b1:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_120);
  FUN_140001710(&local_1e0,*puVar6,"dbo.up_read_fortune");
  if (local_120 != (longlong *)0x0) {
    (**(code **)(*local_120 + 0x10))();
  }
  local_1b8[0] = local_90;
  local_f8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_f4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_f0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_ec = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_90,&local_f8);
  plVar7 = operator_new(0x18);
  local_118 = (longlong *)0x0;
  local_128 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_118 = plVar7;
  }
  if (local_118 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_1e0,local_e8,&local_118,0xca);
  local_1b8[0] = plVar7;
  if (local_1e0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_1e0,&local_128);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_128 != (longlong *)0x0) {
      (**(code **)(*local_128 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_1e0,local_1b8);
    This = local_1a8;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_1a8 != pIVar1) {
      local_1a8 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_1b8[0] != (longlong *)0x0) {
      (**(code **)(*local_1b8[0] + 0x10))();
    }
    pIVar1 = local_1a8;
    if (local_1a8 != (IUnknown *)0x0) {
      local_1e4 = 0;
      UVar4 = (*local_1a8->lpVtbl[6].Release)(local_1a8);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      plVar7 = (longlong *)0x1;
      if (local_1e4 != -1) {
        uVar9 = FUN_140002290(&local_1a8,local_d8,"type_1",local_1e8);
        FUN_140182560(uVar9);
        uVar5 = FUN_140062550(uVar9);
        local_42 = CONCAT44(local_42._4_4_,uVar5);
        Ordinal_9(local_d8);
        uVar9 = FUN_140002290(&local_1a8,local_a8,"type_2",local_1e8);
        FUN_140182560(uVar9);
        uVar5 = FUN_140062550(uVar9);
        local_42 = CONCAT44(uVar5,(undefined4)local_42);
        Ordinal_9(local_a8);
        uVar9 = FUN_140002290(&local_1a8,local_78,"type_3",local_1e8);
        FUN_140182560(uVar9);
        local_3a = FUN_140062550(uVar9);
        Ordinal_9(local_78);
        uVar9 = FUN_140002290(&local_1a8,local_c0,"count",local_1e8);
        FUN_140182560(uVar9);
        local_36 = FUN_1400624d0(uVar9);
        Ordinal_9(local_c0);
        if (local_1e8[0] == '\0') {
          local_54 = 1;
          plVar7 = (longlong *)0x0;
        }
      }
      if ((local_36 != '\0') &&
         (iVar2 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_60), iVar2 == 0)) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_1a8;
      if (local_1a8 != (IUnknown *)0x0) {
        local_1d8 = (undefined8 *)((ulonglong)local_1d8 & 0xffffffff00000000);
        UVar4 = (*local_1a8->lpVtbl[0x12].AddRef)(local_1a8);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_1a8;
        if ((int)local_1d8 != 0) {
          if (local_1a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar4 = (*local_1a8->lpVtbl[10].Release)(local_1a8);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_1a8 != (IUnknown *)0x0) {
          (*local_1a8->lpVtbl->Release)(local_1a8);
          local_1a8 = (IUnknown *)0x0;
        }
      }
      local_140 = 0;
      local_138 = &DAT_140281f00;
      local_150 = &DAT_140281f00;
      local_148 = 0;
      local_158 = 0;
      Ordinal_9(local_170);
      Ordinal_9(local_188);
      if (local_1a0 != (longlong *)0x0) {
        (**(code **)(*local_1a0 + 0x10))();
      }
      if (local_1a8 != (IUnknown *)0x0) {
        (*local_1a8->lpVtbl->Release)(local_1a8);
      }
      if (local_1e0 != (longlong *)0x0) {
        (**(code **)(*local_1e0 + 0x10))();
      }
      return plVar7;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400c76b0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  short local_80 [4];
  undefined1 local_78;
  longlong *local_68;
  longlong *local_60;
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400c7746;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400c7746:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_update_fortune");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = (longlong *)local_80;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140062280(local_80,&local_58);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_60 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("character_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar7);
  local_60 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)local_80;
  uVar2 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_60 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("fortune");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_80);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_58 = (longlong *)local_80;
  uVar2 = *(undefined4 *)(param_2 + 0x22);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_68 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("type_1");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
  local_58 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_58 = (longlong *)local_80;
  uVar2 = *(undefined4 *)(param_2 + 0x26);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_68 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("type_2");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
  local_58 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_58 = (longlong *)local_80;
    uVar2 = *(undefined4 *)(param_2 + 0x2a);
    Ordinal_8(local_80);
    FUN_140062080(local_80,uVar2);
    plVar8 = operator_new(0x18);
    plVar10 = plVar11;
    local_68 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("type_3");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
    local_58 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_58 = (longlong *)local_80;
    uVar1 = *(undefined1 *)(param_2 + 0x2e);
    Ordinal_8(local_80);
    if (local_80[0] != 0x11) {
      iVar5 = Ordinal_9(local_80);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_80[0] = 0x11;
    }
    local_78 = uVar1;
    plVar10 = operator_new(0x18);
    local_68 = plVar10;
    if (plVar10 != (longlong *)0x0) {
      plVar10[1] = 0;
      *(undefined4 *)(plVar10 + 2) = 1;
      lVar9 = FUN_140201490("count");
      *plVar10 = lVar9;
      plVar11 = plVar10;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
    local_58 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400c7f10(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_78;
  longlong *local_70;
  longlong local_68;
  undefined1 local_60;
  longlong *local_50;
  undefined1 local_48 [24];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400c7fa6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400c7fa6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_blacklist");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_78 = &local_68;
  uVar6 = FUN_1400623f0(&local_68,param_2 + 0xe);
  plVar7 = operator_new(0x18);
  local_50 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028e750);
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,200,1,0x10,uVar6);
  local_50 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_70 = &local_68;
  uVar1 = *(undefined1 *)(param_2 + 0x2e);
  Ordinal_8(&local_68);
  if ((short)local_68 != 0x11) {
    iVar4 = Ordinal_9(&local_68);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_68._0_2_ = 0x11;
  }
  local_60 = uVar1;
  plVar7 = operator_new(0x18);
  local_50 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("State");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar7 = (longlong *)FUN_140001880(&local_res20,local_48,&local_res18,0x10,1,1,&local_68);
    local_70 = plVar7;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_78 != (longlong *)0x0) {
        (**(code **)(*local_78 + 0x10))();
      }
      if ((longlong *)*plVar7 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar7 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400c82c0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_c8 [2];
  undefined4 local_b8;
  undefined4 uStack_b4;
  undefined8 uStack_b0;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong local_78 [4];
  undefined8 local_58;
  
  local_58 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400c835d;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400c835d:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_Inquiry");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_c8[0] = (longlong *)&local_b8;
  local_88 = *(longlong **)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x1a);
  uStack_7c = *(undefined4 *)(param_2 + 0x1e);
  uVar6 = FUN_140062280(&local_b8,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar6);
  local_98 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_90 = local_78;
  local_b8 = *(undefined4 *)(param_2 + 0x22);
  uStack_b4 = *(undefined4 *)(param_2 + 0x26);
  uStack_b0 = *(undefined8 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_78,&local_b8);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar6);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar1 = *(undefined1 *)(param_2 + 0x32);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 0x11) {
    iVar4 = Ordinal_9(&local_b8);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_b8 = CONCAT22(local_b8._2_2_,0x11);
  }
  uStack_b0 = CONCAT71(uStack_b0._1_7_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028e384);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0x10,1,1,&local_b8);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = local_78;
  uVar6 = FUN_1400623f0(local_78,param_2 + 0x35);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0xca,1,0x10,uVar6);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = local_78;
  uVar6 = FUN_1400623f0(local_78,param_2 + 0x55);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("bcust_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0xca,1,0x32,uVar6);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8[0] != (longlong *)0x0) {
    (**(code **)(*local_c8[0] + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_b8;
  uVar1 = *(undefined1 *)(param_2 + 0x33);
  Ordinal_8(&local_b8);
  if ((short)local_b8 != 0x11) {
    iVar4 = Ordinal_9(&local_b8);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_b8 = CONCAT22(local_b8._2_2_,0x11);
  }
  uStack_b0 = CONCAT71(uStack_b0._1_7_,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("count");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0x10,1,1,&local_b8);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8[0] != (longlong *)0x0) {
      (**(code **)(*local_c8[0] + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_88 = local_78;
    uVar6 = FUN_1400623f0(local_78,param_2 + 0xb9);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_90 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490(&DAT_14028e798);
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0xca,1,0xff,uVar6);
    local_88 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8[0] != (longlong *)0x0) {
      (**(code **)(*local_c8[0] + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_88 = (longlong *)&local_b8;
    uVar1 = *(undefined1 *)(param_2 + 0x34);
    Ordinal_8(&local_b8);
    if ((short)local_b8 != 0x11) {
      iVar4 = Ordinal_9(&local_b8);
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar4);
      }
      local_b8 = CONCAT22(local_b8._2_2_,0x11);
    }
    uStack_b0 = CONCAT71(uStack_b0._1_7_,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_90 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("compulsion");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0x10,1,1,&local_b8);
    local_88 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_c8[0] != (longlong *)0x0) {
        (**(code **)(*local_c8[0] + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_88 = (longlong *)&local_b8;
      uVar6 = *(undefined8 *)(param_2 + 0x2b7);
      Ordinal_8(&local_b8);
      if (((short)local_b8 != 5) && ((short)local_b8 != 7)) {
        iVar4 = Ordinal_9(&local_b8);
        if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar4);
        }
        local_b8 = CONCAT22(local_b8._2_2_,5);
      }
      uStack_b0 = uVar6;
      plVar9 = operator_new(0x18);
      local_90 = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("registertime");
        *plVar9 = lVar8;
        plVar10 = plVar9;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,5,1,8,&local_b8);
      local_88 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,local_c8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_c8[0] != (longlong *)0x0) {
          (**(code **)(*local_c8[0] + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400c8f30(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  undefined1 uVar2;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  undefined8 *puVar6;
  wchar_t *pwVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  wchar_t *pwVar12;
  wchar_t *pwVar13;
  undefined1 auStackY_778 [32];
  char local_738 [8];
  longlong *local_730;
  short local_728;
  int local_724;
  wchar_t *local_720;
  wchar_t *local_718;
  undefined8 *local_710;
  wchar_t *local_708;
  wchar_t *local_700;
  wchar_t *local_6f8;
  wchar_t *local_6f0;
  LPUNKNOWN local_6e8;
  wchar_t *local_6e0;
  wchar_t *local_6d8;
  wchar_t *local_6d0;
  undefined8 *local_6c8;
  undefined8 *local_6c0;
  wchar_t *local_6b8;
  longlong *local_6b0;
  IUnknown *local_6a8;
  longlong *local_6a0;
  undefined4 local_698;
  undefined1 local_688 [24];
  undefined1 local_670 [24];
  undefined4 local_658;
  undefined1 *local_650;
  undefined4 local_648;
  undefined8 local_640;
  undefined1 *local_638;
  wchar_t local_628 [4];
  undefined1 local_620;
  wchar_t local_610 [4];
  undefined1 local_608;
  wchar_t *local_5f8;
  wchar_t *local_5f0;
  wchar_t *local_5e8;
  longlong *local_5e0;
  wchar_t *local_5d8;
  wchar_t *local_5d0;
  wchar_t *local_5c8;
  longlong *local_5c0;
  longlong *local_5b8;
  wchar_t *local_5b0;
  longlong *local_5a8;
  longlong *local_5a0;
  longlong *local_598;
  longlong *local_590;
  undefined8 local_588;
  undefined1 local_580;
  undefined8 local_578;
  undefined1 local_570;
  undefined8 local_568;
  undefined1 local_560;
  undefined8 local_558;
  undefined1 local_550;
  undefined8 local_548;
  undefined1 local_540;
  undefined8 local_538;
  undefined1 local_530;
  undefined8 local_528;
  undefined1 local_520;
  undefined8 local_518;
  undefined1 local_510;
  undefined8 local_508;
  undefined1 local_500;
  undefined8 local_4f8;
  undefined1 local_4f0;
  undefined8 local_4e8;
  undefined1 local_4e0;
  undefined8 local_4d8;
  undefined8 local_4d0;
  undefined8 local_4c8;
  undefined1 local_4c0;
  undefined8 local_4b8;
  undefined8 local_4b0;
  undefined8 local_498;
  undefined1 local_490 [8];
  undefined4 local_488;
  undefined4 uStack_484;
  undefined4 uStack_480;
  undefined4 uStack_47c;
  undefined4 local_478;
  undefined4 uStack_474;
  undefined4 uStack_470;
  undefined4 uStack_46c;
  undefined1 local_468 [24];
  undefined1 local_450 [24];
  wchar_t local_438 [12];
  undefined1 local_420 [24];
  longlong local_408 [3];
  undefined1 local_3f0 [24];
  wchar_t local_3d8 [12];
  undefined1 local_3c0 [24];
  undefined1 local_3a8 [24];
  undefined1 local_390 [24];
  undefined1 local_378 [24];
  undefined1 local_360 [24];
  wchar_t local_348 [12];
  wchar_t local_330 [12];
  undefined1 local_318 [32];
  undefined4 local_2f8;
  undefined4 uStack_2f4;
  undefined4 local_2f0;
  undefined2 local_2ec;
  undefined4 local_2ea;
  undefined8 local_2e6;
  undefined8 local_2de;
  undefined8 local_2d6;
  undefined8 local_2ce;
  undefined2 local_2c6;
  undefined1 local_2c4;
  wchar_t local_2c3 [12];
  ulonglong local_2ab;
  wchar_t local_2a3 [49];
  undefined2 local_241;
  wchar_t local_23f [254];
  undefined2 local_43;
  undefined8 local_41;
  ulonglong local_38;
  
  local_498 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_778;
  pwVar13 = (wchar_t *)0x0;
  local_2ea = 0;
  local_2e6 = 0;
  local_2de = 0;
  local_2d6 = 0;
  local_2ce = 0;
  local_2c6 = 0;
  local_2c4 = 0;
  local_41 = 0;
  local_2c3[0] = L'\0';
  local_2c3[1] = L'\0';
  local_2c3[2] = L'\0';
  local_2c3[3] = L'\0';
  local_2c3[4] = L'\0';
  local_2c3[5] = L'\0';
  local_2c3[6] = L'\0';
  local_2c3[7] = L'\0';
  local_2c3[8] = L'\0';
  local_2c3[9] = L'\0';
  local_2c3[10] = L'\0';
  local_2c3[0xb] = L'\0';
  local_2ab = 0;
  local_710 = param_1;
  local_6c8 = param_2;
  local_6c0 = param_1;
  memset(local_2a3,0,100);
  memset(local_23f,0,0x1fe);
  memset(&local_2ea,0,0x2b1);
  local_2f0 = *(undefined4 *)(param_2 + 1);
  _local_2f8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x24110000);
  local_2ec = 1;
  _local_2f8 = CONCAT62(stack0xfffffffffffffd0a,0x2bf);
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400c90b6:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (wchar_t *)0x0;
    }
  }
  else {
    local_724 = 0;
    UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_724 == 0) goto LAB_1400c90b6;
  }
  local_730 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_730);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_6a8 = (IUnknown *)0x0;
  local_6a0 = (longlong *)0x0;
  Ordinal_8(local_688);
  Ordinal_8(local_670);
  pIVar1 = local_6a8;
  if ((local_6a8 != (IUnknown *)0x0) && (local_6a8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_638 = &DAT_140281f00;
  local_650 = &DAT_140281f00;
  local_648 = 0;
  local_640 = 0;
  if (local_6a8 != (IUnknown *)0x0) {
    (*local_6a8->lpVtbl->Release)(local_6a8);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_6e8);
  if (-1 < HVar5) {
    HVar5 = OleRun(local_6e8);
    if (-1 < HVar5) {
      HVar5 = (*local_6e8->lpVtbl->QueryInterface)(local_6e8,(IID *)&DAT_140281f68,&local_6a8);
    }
    (*local_6e8->lpVtbl->Release)(local_6e8);
    if (-1 < HVar5) goto LAB_1400c9200;
  }
  local_6a8 = (IUnknown *)0x0;
LAB_1400c9200:
  local_658 = 2;
  local_698 = 1;
  local_738[0] = '\x01';
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_5b8);
  FUN_140001710(&local_730,*puVar6,"dbo.up_insert_Inquiry_by_gm");
  if (local_5b8 != (longlong *)0x0) {
    (**(code **)(*local_5b8 + 0x10))();
  }
  local_718 = local_610;
  uVar2 = *(undefined1 *)((longlong)param_2 + 0xe);
  Ordinal_8(local_610);
  if (local_610[0] != L'\x11') {
    iVar4 = Ordinal_9(local_610);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_610[0] = L'\x11';
  }
  local_608 = uVar2;
  pwVar7 = operator_new(0x18);
  local_5d8 = pwVar13;
  local_6b8 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490(&DAT_14028e384);
    *(longlong *)pwVar7 = lVar8;
    local_5d8 = pwVar7;
  }
  if (local_5d8 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar7 = (wchar_t *)FUN_140001880(&local_730,&local_6f8,&local_5d8,0x10);
  local_718 = pwVar7;
  if (local_730 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_730,&local_598);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_598 != (longlong *)0x0) {
    (**(code **)(*local_598 + 0x10))();
  }
  if (*(longlong **)pwVar7 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar7 + 0x10))();
  }
  local_6f8 = local_3d8;
  FUN_1400623f0(local_3d8,param_2 + 6);
  pwVar7 = operator_new(0x18);
  local_5c8 = pwVar13;
  local_718 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("character_name");
    *(longlong *)pwVar7 = lVar8;
    local_5c8 = pwVar7;
  }
  if (local_5c8 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar7 = (wchar_t *)FUN_140001880(&local_730,&local_6d8,&local_5c8,0xca);
  local_6f8 = pwVar7;
  if (local_730 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_730,&local_5a8);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_5a8 != (longlong *)0x0) {
    (**(code **)(*local_5a8 + 0x10))();
  }
  if (*(longlong **)pwVar7 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar7 + 0x10))();
  }
  local_6d8 = local_330;
  FUN_1400623f0(local_330,param_2 + 10);
  pwVar7 = operator_new(0x18);
  local_5f0 = pwVar13;
  local_6f8 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490(&DAT_14028e798);
    *(longlong *)pwVar7 = lVar8;
    local_5f0 = pwVar7;
  }
  if (local_5f0 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar7 = (wchar_t *)FUN_140001880(&local_730,&local_6f0,&local_5f0,0xca);
  local_6d8 = pwVar7;
  if (local_730 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_730,&local_5e0);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_5e0 != (longlong *)0x0) {
    (**(code **)(*local_5e0 + 0x10))();
  }
  if (*(longlong **)pwVar7 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar7 + 0x10))();
  }
  local_6f0 = local_628;
  uVar2 = *(undefined1 *)((longlong)param_2 + 0xf);
  Ordinal_8(local_628);
  if (local_628[0] != L'\x11') {
    iVar4 = Ordinal_9(local_628);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_628[0] = L'\x11';
  }
  local_620 = uVar2;
  pwVar7 = operator_new(0x18);
  local_5d0 = pwVar13;
  local_6d8 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("compulsion");
    *(longlong *)pwVar7 = lVar8;
    local_5d0 = pwVar7;
  }
  if (local_5d0 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar7 = (wchar_t *)FUN_140001880(&local_730,&local_6e0,&local_5d0,0x10);
  local_6f0 = pwVar7;
  if (local_730 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_730,&local_5c0);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_5c0 != (longlong *)0x0) {
      (**(code **)(*local_5c0 + 0x10))();
    }
    if (*(longlong **)pwVar7 != (longlong *)0x0) {
      (**(code **)(**(longlong **)pwVar7 + 0x10))();
    }
    local_6e0 = local_438;
    local_478 = *(undefined4 *)(param_2 + 2);
    uStack_474 = *(undefined4 *)((longlong)param_2 + 0x14);
    uStack_470 = *(undefined4 *)(param_2 + 3);
    uStack_46c = *(undefined4 *)((longlong)param_2 + 0x1c);
    FUN_140062280(local_438,&local_478);
    pwVar7 = operator_new(0x18);
    local_5b0 = pwVar13;
    local_6f0 = pwVar7;
    if (pwVar7 != (wchar_t *)0x0) {
      pwVar7[4] = L'\0';
      pwVar7[5] = L'\0';
      pwVar7[6] = L'\0';
      pwVar7[7] = L'\0';
      pwVar7[8] = L'\x01';
      pwVar7[9] = L'\0';
      lVar8 = FUN_140201490("auth_id");
      *(longlong *)pwVar7 = lVar8;
      local_5b0 = pwVar7;
    }
    if (local_5b0 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    pwVar7 = (wchar_t *)FUN_140001880(&local_730,&local_6d0,&local_5b0,0xca);
    local_6e0 = pwVar7;
    if (local_730 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_730,&local_590);
    pIVar1 = (IUnknown *)*puVar6;
    if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_590 != (longlong *)0x0) {
      (**(code **)(*local_590 + 0x10))();
    }
    if (*(longlong **)pwVar7 != (longlong *)0x0) {
      (**(code **)(**(longlong **)pwVar7 + 0x10))();
    }
    local_6d0 = local_348;
    local_488 = *(undefined4 *)(param_2 + 4);
    uStack_484 = *(undefined4 *)((longlong)param_2 + 0x24);
    uStack_480 = *(undefined4 *)(param_2 + 5);
    uStack_47c = *(undefined4 *)((longlong)param_2 + 0x2c);
    FUN_140062280(local_348,&local_488);
    pwVar7 = operator_new(0x18);
    local_5e8 = pwVar13;
    local_6e0 = pwVar7;
    if (pwVar7 != (wchar_t *)0x0) {
      pwVar7[4] = L'\0';
      pwVar7[5] = L'\0';
      pwVar7[6] = L'\0';
      pwVar7[7] = L'\0';
      pwVar7[8] = L'\x01';
      pwVar7[9] = L'\0';
      lVar8 = FUN_140201490("character_id");
      *(longlong *)pwVar7 = lVar8;
      local_5e8 = pwVar7;
    }
    if (local_5e8 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    pwVar7 = (wchar_t *)FUN_140001880(&local_730,&local_6b0,&local_5e8,0xca);
    local_6d0 = pwVar7;
    if (local_730 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_730,&local_5a0);
    pIVar1 = (IUnknown *)*puVar6;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_5a0 != (longlong *)0x0) {
        (**(code **)(*local_5a0 + 0x10))();
      }
      if (*(longlong **)pwVar7 != (longlong *)0x0) {
        (**(code **)(**(longlong **)pwVar7 + 0x10))();
      }
      local_6b0 = local_408;
      FUN_14006a8f0(local_408,(longlong)param_2 + 0x24e);
      pwVar7 = operator_new(0x18);
      local_5f8 = pwVar13;
      local_6d0 = pwVar7;
      if (pwVar7 != (wchar_t *)0x0) {
        pwVar7[4] = L'\0';
        pwVar7[5] = L'\0';
        pwVar7[6] = L'\0';
        pwVar7[7] = L'\0';
        pwVar7[8] = L'\x01';
        pwVar7[9] = L'\0';
        lVar8 = FUN_140201490("bcust_id");
        *(longlong *)pwVar7 = lVar8;
        local_5f8 = pwVar7;
      }
      if (local_5f8 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_730,local_490,&local_5f8,0xca);
      local_6b0 = plVar9;
      if (local_730 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_730,&local_6b8);
      pIVar1 = (IUnknown *)*puVar6;
      if (pIVar1 != (IUnknown *)0x0) {
        UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
        }
        if (local_6b8 != (wchar_t *)0x0) {
          (**(code **)(*(longlong *)local_6b8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        puVar6 = (undefined8 *)FUN_1400016d0(&local_730,&local_718);
        This = local_6a8;
        pIVar1 = (IUnknown *)*puVar6;
        if (local_6a8 != pIVar1) {
          local_6a8 = pIVar1;
          if (pIVar1 != (IUnknown *)0x0) {
            (*pIVar1->lpVtbl->AddRef)(pIVar1);
          }
          if (This != (IUnknown *)0x0) {
            (*This->lpVtbl->Release)(This);
          }
        }
        if (local_718 != (wchar_t *)0x0) {
          (**(code **)(*(longlong *)local_718 + 0x10))();
        }
        pIVar1 = local_6a8;
        if (local_6a8 != (IUnknown *)0x0) {
          local_728 = 0;
          UVar3 = (*local_6a8->lpVtbl[6].Release)(local_6a8);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
          }
          if (local_728 == -1) {
            local_2ec = 0x72;
            pwVar7 = pwVar13;
          }
          else {
            uVar10 = FUN_140002290(&local_6a8,local_378,"inquiry_id",local_738);
            FUN_140182560(uVar10);
            local_2ea = FUN_1400d6e60(uVar10);
            Ordinal_9(local_378);
            uVar10 = FUN_140002290(&local_6a8,local_468,"auth_id",local_738);
            FUN_1400625d0(uVar10,&local_4b8);
            local_2e6 = local_4b8;
            local_2de = local_4b0;
            Ordinal_9(local_468);
            uVar10 = FUN_140002290(&local_6a8,local_318,"character_id",local_738);
            FUN_1400625d0(uVar10,&local_4d8);
            local_2d6 = local_4d8;
            local_2ce = local_4d0;
            Ordinal_9(local_318);
            uVar10 = FUN_140002290(&local_6a8,local_3a8,&DAT_14028e384,local_738);
            FUN_140182560(uVar10);
            uVar2 = FUN_1400624d0(uVar10);
            local_2c6 = CONCAT11(local_2c6._1_1_,uVar2);
            Ordinal_9(local_3a8);
            uVar10 = FUN_140002290(&local_6a8,local_450,"count",local_738);
            FUN_140182560(uVar10);
            uVar2 = FUN_1400624d0(uVar10);
            local_2c6 = CONCAT11(uVar2,(undefined1)local_2c6);
            Ordinal_9(local_450);
            uVar10 = FUN_140002290(&local_6a8,local_420,"compulsion",local_738);
            FUN_140182560(uVar10);
            local_2c4 = FUN_1400624d0(uVar10);
            Ordinal_9(local_420);
            uVar10 = FUN_140002290(&local_6a8,local_3f0,&DAT_14028a328,local_738);
            FUN_140182560(uVar10);
            local_41 = FUN_140098d80(uVar10);
            Ordinal_9(local_3f0);
            uVar10 = FUN_140002290(&local_6a8,local_3c0,"character_name",local_738);
            FUN_140062840(uVar10,&local_700);
            FUN_1401568c0();
            pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
            if (PTR_DAT_1403200a0 == (undefined *)0x0) {
              pwVar7 = pwVar13;
            }
            if (local_700 != (wchar_t *)PTR_DAT_1403200a0) {
              uVar10 = FUN_1401568c0();
              local_580 = 0;
              local_588 = uVar10;
              FUN_140156b50(uVar10);
              local_580 = 1;
              if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
                 (pwVar7 + -4 != (wchar_t *)0x0)) {
                uVar11 = FUN_1401568c0();
                local_560 = 0;
                local_568 = uVar11;
                FUN_140156b50(uVar11);
                local_560 = 1;
                pwVar12 = pwVar7 + -2;
                *(int *)pwVar12 = *(int *)pwVar12 + -1;
                if (*(int *)pwVar12 == 0) {
                  FUN_140156970(pwVar7 + -4);
                }
                FUN_140156be0(uVar11);
              }
              pwVar7 = local_700;
              if (((local_700 != (wchar_t *)PTR_DAT_1403200a0) && (local_700 != (wchar_t *)0x0)) &&
                 (local_700 != (wchar_t *)0x8)) {
                *(int *)(local_700 + -2) = *(int *)(local_700 + -2) + 1;
              }
              FUN_140156be0(uVar10);
            }
            pwVar12 = pwVar7;
            if (pwVar7 == (wchar_t *)0x0) {
              pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
            }
            wcsncpy(local_2c3,pwVar12,0xf);
            if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar7 + -4 != (wchar_t *)0x0)) {
              uVar10 = FUN_1401568c0();
              local_500 = 0;
              local_508 = uVar10;
              FUN_140156b50(uVar10);
              local_500 = 1;
              pwVar12 = pwVar7 + -2;
              *(int *)pwVar12 = *(int *)pwVar12 + -1;
              if (*(int *)pwVar12 == 0) {
                FUN_140156970(pwVar7 + -4);
              }
              FUN_140156be0(uVar10);
            }
            if (((local_700 != (wchar_t *)0x0) && (local_700 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (local_700 + -4 != (wchar_t *)0x0)) {
              uVar10 = FUN_1401568c0();
              local_540 = 0;
              local_548 = uVar10;
              FUN_140156b50(uVar10);
              local_540 = 1;
              pwVar7 = local_700 + -2;
              *(int *)pwVar7 = *(int *)pwVar7 + -1;
              if (*(int *)pwVar7 == 0) {
                FUN_140156970(local_700 + -4);
              }
              FUN_140156be0(uVar10);
            }
            local_700 = (wchar_t *)PTR_DAT_1403200a0;
            Ordinal_9(local_3c0);
            uVar10 = FUN_140002290(&local_6a8,local_390,"bcust_id",local_738);
            FUN_140062840(uVar10,&local_708);
            FUN_1401568c0();
            pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
            if (PTR_DAT_1403200a0 == (undefined *)0x0) {
              pwVar7 = pwVar13;
            }
            if (local_708 != (wchar_t *)PTR_DAT_1403200a0) {
              uVar10 = FUN_1401568c0();
              local_4c0 = 0;
              local_4c8 = uVar10;
              FUN_140156b50(uVar10);
              local_4c0 = 1;
              if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
                 (pwVar7 + -4 != (wchar_t *)0x0)) {
                uVar11 = FUN_1401568c0();
                local_520 = 0;
                local_528 = uVar11;
                FUN_140156b50(uVar11);
                local_520 = 1;
                pwVar12 = pwVar7 + -2;
                *(int *)pwVar12 = *(int *)pwVar12 + -1;
                if (*(int *)pwVar12 == 0) {
                  FUN_140156970(pwVar7 + -4);
                }
                FUN_140156be0(uVar11);
              }
              pwVar7 = local_708;
              if (((local_708 != (wchar_t *)PTR_DAT_1403200a0) && (local_708 != (wchar_t *)0x0)) &&
                 (local_708 != (wchar_t *)0x8)) {
                *(int *)(local_708 + -2) = *(int *)(local_708 + -2) + 1;
              }
              FUN_140156be0(uVar10);
            }
            pwVar12 = pwVar7;
            if (pwVar7 == (wchar_t *)0x0) {
              pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
            }
            wcsncpy(local_2a3,pwVar12,0x31);
            if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar7 + -4 != (wchar_t *)0x0)) {
              uVar10 = FUN_1401568c0();
              local_4e0 = 0;
              local_4e8 = uVar10;
              FUN_140156b50(uVar10);
              local_4e0 = 1;
              pwVar12 = pwVar7 + -2;
              *(int *)pwVar12 = *(int *)pwVar12 + -1;
              if (*(int *)pwVar12 == 0) {
                FUN_140156970(pwVar7 + -4);
              }
              FUN_140156be0(uVar10);
            }
            if (((local_708 != (wchar_t *)0x0) && (local_708 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (local_708 + -4 != (wchar_t *)0x0)) {
              uVar10 = FUN_1401568c0();
              local_570 = 0;
              local_578 = uVar10;
              FUN_140156b50(uVar10);
              local_570 = 1;
              pwVar7 = local_708 + -2;
              *(int *)pwVar7 = *(int *)pwVar7 + -1;
              if (*(int *)pwVar7 == 0) {
                FUN_140156970(local_708 + -4);
              }
              FUN_140156be0(uVar10);
            }
            local_708 = (wchar_t *)PTR_DAT_1403200a0;
            Ordinal_9(local_390);
            uVar10 = FUN_140002290(&local_6a8,local_360,&DAT_14028e798,local_738);
            FUN_140062840(uVar10,&local_720);
            FUN_1401568c0();
            pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
            if (PTR_DAT_1403200a0 == (undefined *)0x0) {
              pwVar7 = pwVar13;
            }
            if (local_720 != (wchar_t *)PTR_DAT_1403200a0) {
              uVar10 = FUN_1401568c0();
              local_550 = 0;
              local_558 = uVar10;
              FUN_140156b50(uVar10);
              local_550 = 1;
              if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
                 (pwVar7 + -4 != (wchar_t *)0x0)) {
                uVar11 = FUN_1401568c0();
                local_530 = 0;
                local_538 = uVar11;
                FUN_140156b50(uVar11);
                local_530 = 1;
                pwVar12 = pwVar7 + -2;
                *(int *)pwVar12 = *(int *)pwVar12 + -1;
                if (*(int *)pwVar12 == 0) {
                  FUN_140156970(pwVar7 + -4);
                }
                FUN_140156be0(uVar11);
              }
              pwVar7 = local_720;
              if (((local_720 != (wchar_t *)PTR_DAT_1403200a0) && (local_720 != (wchar_t *)0x0)) &&
                 (local_720 != (wchar_t *)0x8)) {
                *(int *)(local_720 + -2) = *(int *)(local_720 + -2) + 1;
              }
              FUN_140156be0(uVar10);
            }
            pwVar12 = pwVar7;
            if (pwVar7 == (wchar_t *)0x0) {
              pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
            }
            wcsncpy(local_23f,pwVar12,0xfe);
            if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar7 + -4 != (wchar_t *)0x0)) {
              uVar10 = FUN_1401568c0();
              local_510 = 0;
              local_518 = uVar10;
              FUN_140156b50(uVar10);
              local_510 = 1;
              pwVar12 = pwVar7 + -2;
              *(int *)pwVar12 = *(int *)pwVar12 + -1;
              if (*(int *)pwVar12 == 0) {
                FUN_140156970(pwVar7 + -4);
              }
              FUN_140156be0(uVar10);
            }
            if (((local_720 != (wchar_t *)0x0) && (local_720 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (local_720 + -4 != (wchar_t *)0x0)) {
              uVar10 = FUN_1401568c0();
              local_4f0 = 0;
              local_4f8 = uVar10;
              FUN_140156b50(uVar10);
              local_4f0 = 1;
              pwVar7 = local_720 + -2;
              *(int *)pwVar7 = *(int *)pwVar7 + -1;
              if (*(int *)pwVar7 == 0) {
                FUN_140156970(local_720 + -4);
              }
              FUN_140156be0(uVar10);
            }
            local_720 = (wchar_t *)PTR_DAT_1403200a0;
            Ordinal_9(local_360);
            local_2ab = local_2ab & 0xffffffffffff;
            local_241 = 0;
            local_43 = 0;
            pwVar7 = (wchar_t *)0x1;
            if (local_738[0] == '\0') {
              local_2ec = 0x70;
              pwVar7 = pwVar13;
            }
          }
          puVar6 = local_710;
          iVar4 = FUN_1400a1430(*(undefined8 *)(local_710[0x22] + 0xf0),&local_2f8);
          if (iVar4 == 0) {
            FUN_1400a0b40(puVar6[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
          }
          pIVar1 = local_6a8;
          if (local_6a8 != (IUnknown *)0x0) {
            local_710 = (undefined8 *)((ulonglong)local_710 & 0xffffffff00000000);
            UVar3 = (*local_6a8->lpVtbl[0x12].AddRef)(local_6a8);
            if ((int)UVar3 < 0) {
              _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
            }
            pIVar1 = local_6a8;
            if ((int)local_710 != 0) {
              if (local_6a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(0x80004003);
              }
              UVar3 = (*local_6a8->lpVtbl[10].Release)(local_6a8);
              if ((int)UVar3 < 0) {
                _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
              }
            }
            if (local_6a8 != (IUnknown *)0x0) {
              (*local_6a8->lpVtbl->Release)(local_6a8);
              local_6a8 = (IUnknown *)0x0;
            }
          }
          local_640 = 0;
          local_638 = &DAT_140281f00;
          local_650 = &DAT_140281f00;
          local_648 = 0;
          local_658 = 0;
          Ordinal_9(local_670);
          Ordinal_9(local_688);
          if (local_6a0 != (longlong *)0x0) {
            (**(code **)(*local_6a0 + 0x10))();
          }
          if (local_6a8 != (IUnknown *)0x0) {
            (*local_6a8->lpVtbl->Release)(local_6a8);
          }
          if (local_730 != (longlong *)0x0) {
            (**(code **)(*local_730 + 0x10))();
          }
          return pwVar7;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400ca580(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400ca613;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400ca613:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_add_Inquiry_count");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400ca800(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  short local_70 [4];
  undefined1 local_68;
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400ca896;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400ca896:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_Inquiry");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = (longlong *)local_70;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_80 = (longlong *)local_70;
  uVar1 = *(undefined1 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  if (local_70[0] != 0x11) {
    iVar4 = Ordinal_9(local_70);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_70[0] = 0x11;
  }
  local_68 = uVar1;
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028e384);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,local_70);
    local_80 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_58 = (longlong *)local_70;
    uVar6 = FUN_1400623f0(local_70,param_2 + 0x1f);
    plVar9 = operator_new(0x18);
    local_80 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490(&DAT_14028e798);
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,0xca,1,0xff,uVar6);
    local_58 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400cacd0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong local_78;
  undefined1 local_70;
  longlong *local_60;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400cad66;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400cad66:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_Inquiry_type");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = &local_78;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_58);
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_60 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = &local_78;
  uVar1 = *(undefined1 *)(param_2 + 0x1e);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x11) {
    iVar4 = Ordinal_9(&local_78);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_78._0_2_ = 0x11;
  }
  local_70 = uVar1;
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028e384);
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,&local_78);
    local_80 = plVar7;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar7 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar7 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400cb090(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400cb123;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400cb123:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_delete_Inquiry");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x0001400cc1cc)
// WARNING: Removing unreachable block (ram,0x0001400cc1da)
// WARNING: Removing unreachable block (ram,0x0001400cc1e1)
// WARNING: Removing unreachable block (ram,0x0001400cc1e6)
// WARNING: Removing unreachable block (ram,0x0001400cc1f0)
// WARNING: Removing unreachable block (ram,0x0001400cc225)
// WARNING: Removing unreachable block (ram,0x0001400cc240)
// WARNING: Removing unreachable block (ram,0x0001400cc264)
// WARNING: Removing unreachable block (ram,0x0001400cc27e)
// WARNING: Removing unreachable block (ram,0x0001400cc28f)
// WARNING: Removing unreachable block (ram,0x0001400cc29b)
// WARNING: Removing unreachable block (ram,0x0001400cc2a8)
// WARNING: Removing unreachable block (ram,0x0001400cc2b3)
// WARNING: Removing unreachable block (ram,0x0001400cc2c3)
// WARNING: Removing unreachable block (ram,0x0001400cc2d4)
// WARNING: Removing unreachable block (ram,0x0001400cc2e1)
// WARNING: Removing unreachable block (ram,0x0001400cc2ef)
// WARNING: Removing unreachable block (ram,0x0001400cc342)
// WARNING: Removing unreachable block (ram,0x0001400cc349)
// WARNING: Removing unreachable block (ram,0x0001400cc356)
// WARNING: Removing unreachable block (ram,0x0001400cc35d)
// WARNING: Removing unreachable block (ram,0x0001400cc367)
// WARNING: Removing unreachable block (ram,0x0001400cc36f)

undefined4 FUN_1400cb310(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  undefined6 uVar3;
  IUnknown *This;
  undefined1 uVar4;
  int iVar5;
  HRESULT HVar6;
  ULONG UVar7;
  undefined8 *puVar8;
  undefined8 uVar9;
  undefined8 uVar10;
  wchar_t *pwVar11;
  char *riid;
  wchar_t *pwVar12;
  char *ppvObject;
  wchar_t *pwVar13;
  uint uVar14;
  ushort uVar15;
  wchar_t *pwVar16;
  undefined1 auStackY_628 [32];
  char local_5f8 [4];
  undefined8 local_5e8;
  longlong *local_5d0;
  int local_5c4;
  wchar_t *local_5c0;
  wchar_t *local_5b8;
  wchar_t *local_5b0;
  LPUNKNOWN local_5a8 [2];
  IUnknown *local_598;
  longlong *local_590;
  undefined4 local_588;
  undefined1 local_578 [24];
  undefined1 local_560 [24];
  undefined4 local_548;
  undefined1 *local_540;
  undefined4 local_538;
  undefined8 local_530;
  undefined1 *local_528;
  undefined8 *local_518;
  undefined8 *local_510;
  undefined4 local_508;
  undefined4 local_504;
  undefined4 local_500;
  undefined4 local_4fc;
  undefined4 local_4f8;
  uchar local_4f4 [4];
  uchar local_4f0 [4];
  undefined4 local_4ec;
  undefined8 local_4e8;
  undefined1 local_4e0;
  undefined8 local_4d8;
  undefined1 local_4d0;
  longlong *local_4c8;
  undefined8 local_4c0;
  undefined1 local_4b8;
  undefined8 local_4b0;
  undefined1 local_4a8;
  undefined8 local_4a0;
  undefined1 local_498;
  undefined8 local_490;
  undefined1 local_488;
  undefined8 local_480;
  undefined1 local_478;
  undefined8 local_470;
  undefined1 local_468;
  undefined8 local_460;
  undefined1 local_458;
  undefined8 local_450;
  undefined1 local_448;
  undefined8 local_440;
  undefined1 local_438;
  longlong *local_430;
  undefined8 local_428;
  undefined1 local_420;
  undefined8 local_418;
  undefined1 local_400 [24];
  undefined1 local_3e8 [24];
  undefined1 local_3d0 [24];
  undefined1 local_3b8 [24];
  undefined1 local_3a0 [24];
  undefined1 local_388 [24];
  undefined1 local_370 [24];
  undefined1 local_358 [24];
  undefined1 local_340 [24];
  undefined1 local_328 [32];
  IID local_308;
  undefined4 local_2f8;
  undefined4 local_2f4;
  undefined4 local_2f0;
  undefined4 local_2ec;
  undefined4 local_2e8;
  undefined2 local_2e4;
  undefined1 local_2e2;
  wchar_t local_2e1 [12];
  ulonglong local_2c9;
  wchar_t local_2c1 [49];
  undefined2 local_25f;
  wchar_t local_25d [254];
  undefined2 local_61;
  undefined8 local_5f;
  ulonglong local_48;
  
  local_418 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStackY_628;
  pwVar13 = (wchar_t *)0x0;
  local_5d0 = (longlong *)0x0;
  local_518 = param_2;
  local_510 = param_1;
  iVar5 = FUN_140001970(&local_5d0);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_598 = (IUnknown *)0x0;
  local_590 = (longlong *)0x0;
  Ordinal_8(local_578);
  Ordinal_8(local_560);
  pIVar2 = local_598;
  if ((local_598 != (IUnknown *)0x0) && (local_598 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_528 = &DAT_140281f00;
  local_540 = &DAT_140281f00;
  local_538 = 0;
  local_530 = 0;
  if (local_598 != (IUnknown *)0x0) {
    (*local_598->lpVtbl->Release)(local_598);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_5a8
                          );
  if (-1 < HVar6) {
    HVar6 = OleRun(local_5a8[0]);
    if (-1 < HVar6) {
      HVar6 = (*local_5a8[0]->lpVtbl->QueryInterface)(local_5a8[0],(IID *)&DAT_140281f68,&local_598)
      ;
    }
    (*local_5a8[0]->lpVtbl->Release)(local_5a8[0]);
    if (-1 < HVar6) goto LAB_1400cb490;
  }
  local_598 = (IUnknown *)0x0;
LAB_1400cb490:
  local_548 = 2;
  local_588 = 1;
  local_5f8[0] = '\x01';
  pwVar16 = (wchar_t *)0x0;
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_5e8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x24010000);
  uVar14 = 0x10;
  pIVar2 = *(IUnknown **)*param_1;
  if ((pIVar2 != (IUnknown *)0x0) && (UVar7 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2), (int)UVar7 < 0)
     ) {
    _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f08);
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 != 0) {
    puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_4c8);
    FUN_140001710(&local_5d0,*puVar8,"dbo.up_read_Inquiry");
    if (local_4c8 != (longlong *)0x0) {
      (**(code **)(*local_4c8 + 0x10))();
    }
    puVar8 = (undefined8 *)FUN_1400016d0(&local_5d0,&local_430);
    This = local_598;
    pIVar2 = (IUnknown *)*puVar8;
    if (local_598 != pIVar2) {
      local_598 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_430 != (longlong *)0x0) {
      (**(code **)(*local_430 + 0x10))();
    }
    pIVar2 = local_598;
    if (local_598 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar7 = (*local_598->lpVtbl[6].Release)(local_598);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
    }
    while( true ) {
      pIVar2 = local_598;
      if (local_598 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar7 = (*local_598->lpVtbl[6].Release)(local_598);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
      local_308.Data1 = 0;
      local_308.Data2 = 0;
      local_308.Data3 = 0;
      local_308.Data4[0] = '\0';
      local_308.Data4[1] = '\0';
      local_308.Data4[2] = '\0';
      local_308.Data4[3] = '\0';
      local_308.Data4[4] = '\0';
      local_308.Data4[5] = '\0';
      local_308.Data4[6] = '\0';
      local_308.Data4[7] = '\0';
      local_2f8 = 0;
      local_2f4 = 0;
      local_2f0 = 0;
      local_2ec = 0;
      local_2e8 = 0;
      local_2e4 = 0;
      local_2e2 = 0;
      local_5f = 0;
      local_2e1[0] = L'\0';
      local_2e1[1] = L'\0';
      local_2e1[2] = L'\0';
      local_2e1[3] = L'\0';
      local_2e1[4] = L'\0';
      local_2e1[5] = L'\0';
      local_2e1[6] = L'\0';
      local_2e1[7] = L'\0';
      local_2e1[8] = L'\0';
      local_2e1[9] = L'\0';
      local_2e1[10] = L'\0';
      local_2e1[0xb] = L'\0';
      local_2c9 = 0;
      memset(local_2c1,0,100);
      memset(local_25d,0,0x1fe);
      uVar9 = FUN_140002290(&local_598,local_388,"inquiry_id",local_5f8);
      FUN_140182560(uVar9);
      local_308.Data1 = FUN_1400d6e60(uVar9);
      Ordinal_9(local_388);
      uVar9 = FUN_140002290(&local_598,local_340,"auth_id",local_5f8);
      FUN_1400625d0(uVar9,&local_4f8);
      local_308.Data2 = (ushort)local_4f8;
      local_308.Data3 = local_4f8._2_2_;
      local_308.Data4[0] = local_4f4[0];
      local_308.Data4[1] = local_4f4[1];
      local_308.Data4[2] = local_4f4[2];
      local_308.Data4[3] = local_4f4[3];
      local_308.Data4[4] = local_4f0[0];
      local_308.Data4[5] = local_4f0[1];
      local_308.Data4[6] = local_4f0[2];
      local_308.Data4[7] = local_4f0[3];
      local_2f8 = local_4ec;
      Ordinal_9(local_340);
      uVar9 = FUN_140002290(&local_598,local_328,"character_id",local_5f8);
      FUN_1400625d0(uVar9,&local_508);
      local_2f4 = local_508;
      local_2f0 = local_504;
      local_2ec = local_500;
      local_2e8 = local_4fc;
      Ordinal_9(local_328);
      uVar9 = FUN_140002290(&local_598,local_3b8,&DAT_14028e384,local_5f8);
      FUN_140182560(uVar9);
      uVar4 = FUN_1400624d0(uVar9);
      local_2e4 = CONCAT11(local_2e4._1_1_,uVar4);
      Ordinal_9(local_3b8);
      uVar9 = FUN_140002290(&local_598,local_358,"count",local_5f8);
      FUN_140182560(uVar9);
      uVar4 = FUN_1400624d0(uVar9);
      local_2e4 = CONCAT11(uVar4,(undefined1)local_2e4);
      Ordinal_9(local_358);
      uVar9 = FUN_140002290(&local_598,local_400,"compulsion",local_5f8);
      FUN_140182560(uVar9);
      local_2e2 = FUN_1400624d0(uVar9);
      Ordinal_9(local_400);
      uVar9 = FUN_140002290(&local_598,local_3e8,&DAT_14028a328,local_5f8);
      FUN_140182560(uVar9);
      local_5f = FUN_140098d80(uVar9);
      Ordinal_9(local_3e8);
      uVar9 = FUN_140002290(&local_598,local_3d0,"character_name",local_5f8);
      FUN_140062840(uVar9,&local_5c0);
      FUN_1401568c0();
      pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pwVar12 = pwVar13;
      }
      if (local_5c0 != (wchar_t *)PTR_DAT_1403200a0) {
        uVar9 = FUN_1401568c0();
        local_488 = 0;
        local_490 = uVar9;
        FUN_140156b50(uVar9);
        local_488 = 1;
        if (((pwVar12 != (wchar_t *)0x0) && (pwVar12 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar12 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_4e0 = 0;
          local_4e8 = uVar10;
          FUN_140156b50(uVar10);
          local_4e0 = 1;
          pwVar11 = pwVar12 + -2;
          *(int *)pwVar11 = *(int *)pwVar11 + -1;
          if (*(int *)pwVar11 == 0) {
            FUN_140156970(pwVar12 + -4);
          }
          FUN_140156be0(uVar10);
          local_4e0 = 0;
        }
        pwVar12 = local_5c0;
        if (((local_5c0 != (wchar_t *)PTR_DAT_1403200a0) && (local_5c0 != (wchar_t *)0x0)) &&
           (local_5c0 != (wchar_t *)0x8)) {
          *(int *)(local_5c0 + -2) = *(int *)(local_5c0 + -2) + 1;
        }
        FUN_140156be0(uVar9);
        local_488 = 0;
      }
      pwVar11 = pwVar12;
      if (pwVar12 == (wchar_t *)0x0) {
        pwVar11 = (wchar_t *)PTR_DAT_1403200a0;
      }
      wcsncpy(local_2e1,pwVar11,0xf);
      if (((pwVar12 != (wchar_t *)0x0) && (pwVar12 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar12 + -4 != (wchar_t *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_448 = 0;
        local_450 = uVar9;
        FUN_140156b50(uVar9);
        local_448 = 1;
        pwVar11 = pwVar12 + -2;
        *(int *)pwVar11 = *(int *)pwVar11 + -1;
        if (*(int *)pwVar11 == 0) {
          FUN_140156970(pwVar12 + -4);
        }
        FUN_140156be0(uVar9);
        local_448 = 0;
      }
      pwVar12 = local_5c0;
      if (((local_5c0 != (wchar_t *)0x0) && (local_5c0 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar11 = local_5c0 + -4, pwVar11 != (wchar_t *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_468 = 0;
        local_470 = uVar9;
        FUN_140156b50(uVar9);
        local_468 = 1;
        pwVar12 = pwVar12 + -2;
        *(int *)pwVar12 = *(int *)pwVar12 + -1;
        if (*(int *)pwVar12 == 0) {
          FUN_140156970(pwVar11);
        }
        FUN_140156be0(uVar9);
        local_468 = 0;
      }
      local_5c0 = (wchar_t *)PTR_DAT_1403200a0;
      Ordinal_9(local_3d0);
      uVar9 = FUN_140002290(&local_598,local_3a0,"bcust_id",local_5f8);
      FUN_140062840(uVar9,&local_5b0);
      FUN_1401568c0();
      pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pwVar12 = pwVar13;
      }
      if (local_5b0 != (wchar_t *)PTR_DAT_1403200a0) {
        uVar9 = FUN_1401568c0();
        local_498 = 0;
        local_4a0 = uVar9;
        FUN_140156b50(uVar9);
        local_498 = 1;
        if (((pwVar12 != (wchar_t *)0x0) && (pwVar12 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar12 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_4a8 = 0;
          local_4b0 = uVar10;
          FUN_140156b50(uVar10);
          local_4a8 = 1;
          pwVar11 = pwVar12 + -2;
          *(int *)pwVar11 = *(int *)pwVar11 + -1;
          if (*(int *)pwVar11 == 0) {
            FUN_140156970(pwVar12 + -4);
          }
          FUN_140156be0(uVar10);
          local_4a8 = 0;
        }
        pwVar12 = local_5b0;
        if (((local_5b0 != (wchar_t *)PTR_DAT_1403200a0) && (local_5b0 != (wchar_t *)0x0)) &&
           (local_5b0 != (wchar_t *)0x8)) {
          *(int *)(local_5b0 + -2) = *(int *)(local_5b0 + -2) + 1;
        }
        FUN_140156be0(uVar9);
        local_498 = 0;
      }
      pwVar11 = pwVar12;
      if (pwVar12 == (wchar_t *)0x0) {
        pwVar11 = (wchar_t *)PTR_DAT_1403200a0;
      }
      wcsncpy(local_2c1,pwVar11,0x31);
      if (((pwVar12 != (wchar_t *)0x0) && (pwVar12 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar12 + -4 != (wchar_t *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_478 = 0;
        local_480 = uVar9;
        FUN_140156b50(uVar9);
        local_478 = 1;
        pwVar11 = pwVar12 + -2;
        *(int *)pwVar11 = *(int *)pwVar11 + -1;
        if (*(int *)pwVar11 == 0) {
          FUN_140156970(pwVar12 + -4);
        }
        FUN_140156be0(uVar9);
        local_478 = 0;
      }
      pwVar12 = local_5b0;
      if (((local_5b0 != (wchar_t *)0x0) && (local_5b0 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar11 = local_5b0 + -4, pwVar11 != (wchar_t *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_458 = 0;
        local_460 = uVar9;
        FUN_140156b50(uVar9);
        local_458 = 1;
        pwVar12 = pwVar12 + -2;
        *(int *)pwVar12 = *(int *)pwVar12 + -1;
        if (*(int *)pwVar12 == 0) {
          FUN_140156970(pwVar11);
        }
        FUN_140156be0(uVar9);
        local_458 = 0;
      }
      local_5b0 = (wchar_t *)PTR_DAT_1403200a0;
      Ordinal_9(local_3a0);
      uVar9 = FUN_140002290(&local_598,local_370,&DAT_14028e798,local_5f8);
      FUN_140062840(uVar9,&local_5b8);
      FUN_1401568c0();
      pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pwVar12 = pwVar13;
      }
      if (local_5b8 != (wchar_t *)PTR_DAT_1403200a0) {
        uVar9 = FUN_1401568c0();
        local_420 = 0;
        local_428 = uVar9;
        FUN_140156b50(uVar9);
        local_420 = 1;
        if (((pwVar12 != (wchar_t *)0x0) && (pwVar12 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar12 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_438 = 0;
          local_440 = uVar10;
          FUN_140156b50(uVar10);
          local_438 = 1;
          pwVar11 = pwVar12 + -2;
          *(int *)pwVar11 = *(int *)pwVar11 + -1;
          if (*(int *)pwVar11 == 0) {
            FUN_140156970(pwVar12 + -4);
          }
          FUN_140156be0(uVar10);
          local_438 = 0;
        }
        pwVar12 = local_5b8;
        if (((local_5b8 != (wchar_t *)PTR_DAT_1403200a0) && (local_5b8 != (wchar_t *)0x0)) &&
           (local_5b8 != (wchar_t *)0x8)) {
          *(int *)(local_5b8 + -2) = *(int *)(local_5b8 + -2) + 1;
        }
        FUN_140156be0(uVar9);
        local_420 = 0;
      }
      pwVar11 = pwVar12;
      if (pwVar12 == (wchar_t *)0x0) {
        pwVar11 = (wchar_t *)PTR_DAT_1403200a0;
      }
      wcsncpy(local_25d,pwVar11,0xfe);
      if (((pwVar12 != (wchar_t *)0x0) && (pwVar12 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar12 + -4 != (wchar_t *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_4d0 = 0;
        local_4d8 = uVar9;
        FUN_140156b50(uVar9);
        local_4d0 = 1;
        pwVar11 = pwVar12 + -2;
        *(int *)pwVar11 = *(int *)pwVar11 + -1;
        if (*(int *)pwVar11 == 0) {
          FUN_140156970(pwVar12 + -4);
        }
        FUN_140156be0(uVar9);
        local_4d0 = 0;
      }
      pwVar12 = local_5b8;
      if (((local_5b8 != (wchar_t *)0x0) && (local_5b8 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar11 = local_5b8 + -4, pwVar11 != (wchar_t *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_4b8 = 0;
        local_4c0 = uVar9;
        FUN_140156b50(uVar9);
        local_4b8 = 1;
        pwVar12 = pwVar12 + -2;
        *(int *)pwVar12 = *(int *)pwVar12 + -1;
        if (*(int *)pwVar12 == 0) {
          FUN_140156970(pwVar11);
        }
        FUN_140156be0(uVar9);
        local_4b8 = 0;
      }
      local_5b8 = (wchar_t *)PTR_DAT_1403200a0;
      Ordinal_9(local_370);
      local_2c9 = local_2c9 & 0xffffffffffff;
      local_25f = 0;
      local_61 = 0;
      riid = (char *)&local_308;
      ppvObject = (char *)0x2b1;
      memcpy((void *)((longlong)(int)uVar14 + 0x130 + (longlong)param_1),riid,0x2b1);
      uVar14 = uVar14 + 0x2b1;
      uVar15 = (short)pwVar16 + 1;
      pwVar16 = (wchar_t *)(ulonglong)uVar15;
      if (50000 < uVar14) {
        uVar3 = local_5e8._2_6_;
        local_5e8 = CONCAT62(local_5e8._2_6_,(short)uVar14);
        uVar9 = local_5e8;
        riid = (char *)(param_1 + 0x26);
        local_5e8._4_2_ = SUB62(uVar3,2);
        local_5e8._6_2_ = SUB62(uVar3,4);
        ((IID *)riid)->Data1 = (undefined4)local_5e8;
        ((IID *)riid)->Data2 = local_5e8._4_2_;
        ((IID *)riid)->Data3 = local_5e8._6_2_;
        param_1[0x27] = CONCAT26(uVar15,CONCAT24(0x11e,uVar1));
        iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar5 == 0) {
          ppvObject = "DB Result Queue push error";
          riid = "DBResultQueue_Error.Log";
          FUN_1400a0b40(param_1[0x23]);
        }
        uVar14 = 0x10;
        pwVar16 = pwVar13;
        local_5e8 = uVar9;
      }
      pIVar2 = local_598;
      if (local_598 == (IUnknown *)0x0) break;
      HVar6 = (*local_598->lpVtbl[0xc].QueryInterface)(local_598,(IID *)riid,(void **)ppvObject);
      if (HVar6 < 0) {
        _com_issue_errorex(HVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  FUN_1400a1e10(param_1,param_2,0);
  pIVar2 = local_598;
  if (local_598 != (IUnknown *)0x0) {
    local_5c4 = 0;
    UVar7 = (*local_598->lpVtbl[0x12].AddRef)(local_598);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
    }
    pIVar2 = local_598;
    if (local_5c4 != 0) {
      if (local_598 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar7 = (*local_598->lpVtbl[10].Release)(local_598);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_598 != (IUnknown *)0x0) {
      (*local_598->lpVtbl->Release)(local_598);
      local_598 = (IUnknown *)0x0;
    }
  }
  local_530 = 0;
  local_528 = &DAT_140281f00;
  local_540 = &DAT_140281f00;
  local_538 = 0;
  local_548 = 0;
  Ordinal_9(local_560);
  Ordinal_9(local_578);
  if (local_590 != (longlong *)0x0) {
    (**(code **)(*local_590 + 0x10))();
  }
  if (local_598 != (IUnknown *)0x0) {
    (*local_598->lpVtbl->Release)(local_598);
  }
  if (local_5d0 != (longlong *)0x0) {
    (**(code **)(*local_5d0 + 0x10))();
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400cc3b0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  int iVar2;
  HRESULT HVar3;
  ULONG UVar4;
  undefined8 *puVar5;
  wchar_t *pwVar6;
  longlong lVar7;
  longlong *plVar8;
  undefined8 uVar9;
  undefined8 uVar10;
  wchar_t *pwVar11;
  wchar_t *pwVar12;
  wchar_t *pwVar13;
  undefined1 auStackY_428 [32];
  char local_3e8 [4];
  short local_3e4;
  longlong *local_3e0;
  undefined8 *local_3d8;
  undefined8 *local_3d0;
  int local_3c8;
  wchar_t *local_3c0;
  longlong *local_3b8;
  LPUNKNOWN local_3b0;
  IUnknown *local_3a8;
  longlong *local_3a0;
  undefined4 local_398;
  undefined1 local_388 [24];
  undefined1 local_370 [24];
  undefined4 local_358;
  undefined1 *local_350;
  undefined4 local_348;
  undefined8 local_340;
  undefined1 *local_338;
  wchar_t *local_328;
  longlong *local_320;
  wchar_t *local_318;
  undefined8 local_310;
  undefined1 local_308;
  undefined8 local_300;
  undefined1 local_2f8;
  undefined8 local_2f0;
  undefined1 local_2e8;
  undefined8 local_2e0;
  undefined1 local_2d8;
  undefined8 local_2d0;
  undefined1 local_2c8 [16];
  undefined4 local_2b8;
  undefined4 uStack_2b4;
  undefined4 uStack_2b0;
  undefined4 uStack_2ac;
  longlong local_298 [3];
  undefined1 local_280 [24];
  undefined1 local_268 [32];
  undefined4 local_248;
  undefined4 uStack_244;
  undefined4 local_240;
  undefined2 local_23c;
  undefined1 local_23a;
  wchar_t local_239 [254];
  undefined2 local_3d;
  ulonglong local_38;
  
  local_2d0 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_428;
  pwVar13 = (wchar_t *)0x0;
  local_3e0 = (longlong *)0x0;
  local_3d8 = param_1;
  local_3d0 = param_2;
  iVar2 = FUN_140001970(&local_3e0);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_3a8 = (IUnknown *)0x0;
  local_3a0 = (longlong *)0x0;
  Ordinal_8(local_388);
  Ordinal_8(local_370);
  pIVar1 = local_3a8;
  if ((local_3a8 != (IUnknown *)0x0) && (local_3a8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_338 = &DAT_140281f00;
  local_350 = &DAT_140281f00;
  local_348 = 0;
  local_340 = 0;
  if (local_3a8 != (IUnknown *)0x0) {
    (*local_3a8->lpVtbl->Release)(local_3a8);
  }
  HVar3 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_3b0);
  if (HVar3 < 0) {
LAB_1400cc510:
    local_3a8 = (IUnknown *)0x0;
  }
  else {
    HVar3 = OleRun(local_3b0);
    if (-1 < HVar3) {
      HVar3 = (*local_3b0->lpVtbl->QueryInterface)(local_3b0,(IID *)&DAT_140281f68,&local_3a8);
    }
    (*local_3b0->lpVtbl->Release)(local_3b0);
    if (HVar3 < 0) goto LAB_1400cc510;
  }
  local_358 = 2;
  local_398 = 1;
  local_3e8[0] = '\x01';
  local_23a = 0;
  memset(local_239,0,0x1fe);
  local_240 = *(undefined4 *)(param_2 + 1);
  _local_248 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x24100000);
  local_23c = 1;
  _local_248 = CONCAT62(stack0xfffffffffffffdba,0x20d);
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_3c8 = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_3c8 != 0) goto LAB_1400cc719;
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_3a8;
    if (local_3a8 != (IUnknown *)0x0) {
      local_3d0 = (undefined8 *)((ulonglong)local_3d0 & 0xffffffff00000000);
      UVar4 = (*local_3a8->lpVtbl[0x12].AddRef)(local_3a8);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_3a8;
      if ((int)local_3d0 != 0) {
        if (local_3a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*local_3a8->lpVtbl[10].Release)(local_3a8);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_3a8 != (IUnknown *)0x0) {
        (*local_3a8->lpVtbl->Release)(local_3a8);
        local_3a8 = (IUnknown *)0x0;
      }
    }
    local_340 = 0;
    local_338 = &DAT_140281f00;
    local_350 = &DAT_140281f00;
    local_348 = 0;
    local_358 = 0;
    Ordinal_9(local_370);
    Ordinal_9(local_388);
    if (local_3a0 != (longlong *)0x0) {
      (**(code **)(*local_3a0 + 0x10))();
    }
    if (local_3a8 != (IUnknown *)0x0) {
      (*local_3a8->lpVtbl->Release)(local_3a8);
    }
    if (local_3e0 != (longlong *)0x0) {
      (**(code **)(*local_3e0 + 0x10))();
    }
    return (wchar_t *)0x0;
  }
LAB_1400cc719:
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_320);
  FUN_140001710(&local_3e0,*puVar5,"dbo.up_read_Inquiry_character");
  if (local_320 != (longlong *)0x0) {
    (**(code **)(*local_320 + 0x10))();
  }
  local_3b8 = local_298;
  local_2b8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_2b4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_2b0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_2ac = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_298,&local_2b8);
  pwVar6 = operator_new(0x18);
  local_318 = pwVar13;
  local_328 = pwVar6;
  if (pwVar6 != (wchar_t *)0x0) {
    pwVar6[4] = L'\0';
    pwVar6[5] = L'\0';
    pwVar6[6] = L'\0';
    pwVar6[7] = L'\0';
    pwVar6[8] = L'\x01';
    pwVar6[9] = L'\0';
    lVar7 = FUN_140201490("character_id");
    *(longlong *)pwVar6 = lVar7;
    local_318 = pwVar6;
  }
  if (local_318 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_3e0,local_2c8,&local_318,0xca);
  local_3b8 = plVar8;
  if (local_3e0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_3e0,&local_328);
  pIVar1 = (IUnknown *)*puVar5;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_328 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_328 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    puVar5 = (undefined8 *)FUN_1400016d0(&local_3e0,&local_3b8);
    This = local_3a8;
    pIVar1 = (IUnknown *)*puVar5;
    if (local_3a8 != pIVar1) {
      local_3a8 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_3b8 != (longlong *)0x0) {
      (**(code **)(*local_3b8 + 0x10))();
    }
    pIVar1 = local_3a8;
    if (local_3a8 != (IUnknown *)0x0) {
      local_3e4 = 0;
      UVar4 = (*local_3a8->lpVtbl[6].Release)(local_3a8);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pwVar6 = (wchar_t *)0x1;
      if (local_3e4 != -1) {
        uVar9 = FUN_140002290(&local_3a8,local_280,&DAT_14028e384,local_3e8);
        FUN_140182560(uVar9);
        local_23a = FUN_1400624d0(uVar9);
        Ordinal_9(local_280);
        uVar9 = FUN_140002290(&local_3a8,local_268,&DAT_14028e798,local_3e8);
        FUN_140062840(uVar9,&local_3c0);
        FUN_1401568c0();
        pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar12 = pwVar13;
        }
        if (local_3c0 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar9 = FUN_1401568c0();
          local_2e8 = 0;
          local_2f0 = uVar9;
          FUN_140156b50(uVar9);
          local_2e8 = 1;
          if (((pwVar12 != (wchar_t *)0x0) && (pwVar12 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar12 + -4 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_308 = 0;
            local_310 = uVar10;
            FUN_140156b50(uVar10);
            local_308 = 1;
            pwVar11 = pwVar12 + -2;
            *(int *)pwVar11 = *(int *)pwVar11 + -1;
            if (*(int *)pwVar11 == 0) {
              FUN_140156970(pwVar12 + -4);
            }
            FUN_140156be0(uVar10);
          }
          pwVar12 = local_3c0;
          if (((local_3c0 != (wchar_t *)PTR_DAT_1403200a0) && (local_3c0 != (wchar_t *)0x0)) &&
             (local_3c0 != (wchar_t *)0x8)) {
            *(int *)(local_3c0 + -2) = *(int *)(local_3c0 + -2) + 1;
          }
          FUN_140156be0(uVar9);
        }
        pwVar11 = pwVar12;
        if (pwVar12 == (wchar_t *)0x0) {
          pwVar11 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_239,pwVar11,0xfe);
        if (((pwVar12 != (wchar_t *)0x0) && (pwVar12 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar12 + -4 != (wchar_t *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_2f8 = 0;
          local_300 = uVar9;
          FUN_140156b50(uVar9);
          local_2f8 = 1;
          pwVar11 = pwVar12 + -2;
          *(int *)pwVar11 = *(int *)pwVar11 + -1;
          if (*(int *)pwVar11 == 0) {
            FUN_140156970(pwVar12 + -4);
          }
          FUN_140156be0(uVar9);
        }
        if (((local_3c0 != (wchar_t *)0x0) && (local_3c0 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_3c0 + -4 != (wchar_t *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_2d8 = 0;
          local_2e0 = uVar9;
          FUN_140156b50(uVar9);
          local_2d8 = 1;
          pwVar12 = local_3c0 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(local_3c0 + -4);
          }
          FUN_140156be0(uVar9);
        }
        local_3c0 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_268);
        local_3d = 0;
        if (local_3e8[0] == '\0') {
          local_23c = 1;
          pwVar6 = pwVar13;
        }
      }
      iVar2 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_248);
      if (iVar2 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_3a8;
      if (local_3a8 != (IUnknown *)0x0) {
        local_3d8 = (undefined8 *)((ulonglong)local_3d8 & 0xffffffff00000000);
        UVar4 = (*local_3a8->lpVtbl[0x12].AddRef)(local_3a8);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_3a8;
        if ((int)local_3d8 != 0) {
          if (local_3a8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar4 = (*local_3a8->lpVtbl[10].Release)(local_3a8);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_3a8 != (IUnknown *)0x0) {
          (*local_3a8->lpVtbl->Release)(local_3a8);
          local_3a8 = (IUnknown *)0x0;
        }
      }
      local_340 = 0;
      local_338 = &DAT_140281f00;
      local_350 = &DAT_140281f00;
      local_348 = 0;
      local_358 = 0;
      Ordinal_9(local_370);
      Ordinal_9(local_388);
      if (local_3a0 != (longlong *)0x0) {
        (**(code **)(*local_3a0 + 0x10))();
      }
      if (local_3a8 != (IUnknown *)0x0) {
        (*local_3a8->lpVtbl->Release)(local_3a8);
      }
      if (local_3e0 != (longlong *)0x0) {
        (**(code **)(*local_3e0 + 0x10))();
      }
      return pwVar6;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400ccd20(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong local_78;
  undefined1 local_70;
  longlong *local_60;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400ccdb6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400ccdb6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_event_mailattach");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = &local_78;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_58);
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_60 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = &local_78;
  uVar1 = *(undefined1 *)(param_2 + 0x1e);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x11) {
    iVar4 = Ordinal_9(&local_78);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_78._0_2_ = 0x11;
  }
  local_70 = uVar1;
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("mailattach");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,&local_78);
    local_80 = plVar7;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar7 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar7 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400cd0e0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  short local_a0 [4];
  undefined4 local_98;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_58;
  
  local_58 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400cd17d;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400cd17d:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_buff");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)local_a0;
  local_78 = *(longlong **)(param_2 + 0xe);
  uStack_70 = *(undefined4 *)(param_2 + 0x16);
  uStack_6c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_a0,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar6);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x22);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028e384);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_a0);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028c3ac);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x26);
  Ordinal_8(local_a0);
  if (local_a0[0] != 4) {
    iVar4 = Ordinal_9(local_a0);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_a0[0] = 4;
  }
  local_98 = uVar1;
  plVar9 = operator_new(0x18);
  local_88 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028ea4c);
    *plVar9 = lVar8;
    plVar10 = plVar9;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400cd700(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  short local_a0 [4];
  undefined4 local_98;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_58;
  
  local_58 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400cd79d;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400cd79d:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_buff");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)local_a0;
  local_78 = *(longlong **)(param_2 + 0xe);
  uStack_70 = *(undefined4 *)(param_2 + 0x16);
  uStack_6c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_a0,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar6);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x22);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_80 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028e384);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_a0);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_a0);
  FUN_140062080(local_a0,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_88 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028c3ac);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_78 = (longlong *)local_a0;
  uVar1 = *(undefined4 *)(param_2 + 0x26);
  Ordinal_8(local_a0);
  if (local_a0[0] != 4) {
    iVar4 = Ordinal_9(local_a0);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_a0[0] = 4;
  }
  local_98 = uVar1;
  plVar9 = operator_new(0x18);
  local_88 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028ea4c);
    *plVar9 = lVar8;
    plVar10 = plVar9;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,local_a0);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400cdd20(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400cddb6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400cddb6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_delete_buff");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x22);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("buff_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_58 = local_70;
    uVar1 = *(undefined4 *)(param_2 + 0x1e);
    Ordinal_8(local_70);
    FUN_140062080(local_70,uVar1);
    plVar9 = operator_new(0x18);
    local_80 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("buff_id");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_70);
    local_58 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1400ce1f0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  int iVar2;
  HRESULT HVar3;
  ULONG UVar4;
  int iVar5;
  undefined4 uVar6;
  undefined4 uVar7;
  undefined8 *puVar8;
  longlong *plVar9;
  longlong lVar10;
  undefined8 uVar11;
  IID *riid;
  longlong *plVar12;
  char *ppvObject;
  longlong *plVar13;
  undefined4 uVar14;
  undefined1 auStackY_288 [32];
  char local_248 [4];
  short local_244;
  uint local_240;
  short local_23c;
  undefined8 *local_238;
  longlong *local_230;
  int local_228;
  longlong *local_220;
  LPUNKNOWN local_218 [2];
  IUnknown *local_208;
  longlong *local_200;
  undefined4 local_1f8;
  undefined1 local_1e8 [24];
  undefined1 local_1d0 [24];
  undefined4 local_1b8;
  undefined1 *local_1b0;
  undefined4 local_1a8;
  undefined8 local_1a0;
  undefined1 *local_198;
  longlong *local_188;
  undefined8 *local_180;
  longlong *local_178;
  longlong *local_170;
  undefined4 local_168;
  undefined4 uStack_164;
  undefined4 uStack_160;
  undefined4 uStack_15c;
  undefined8 local_150;
  undefined1 local_148 [16];
  undefined1 local_138 [24];
  IID local_120;
  longlong local_108 [3];
  undefined1 local_f0 [24];
  undefined4 local_d8;
  undefined4 uStack_d4;
  undefined4 local_d0;
  undefined2 local_cc;
  undefined8 local_ca;
  undefined4 local_c2;
  undefined8 local_be;
  undefined4 local_b6;
  undefined8 local_b2;
  undefined4 local_aa;
  undefined8 local_a6;
  undefined4 local_9e;
  undefined8 local_9a;
  undefined4 local_92;
  undefined8 local_8e;
  undefined4 local_86;
  undefined8 local_82;
  undefined4 local_7a;
  undefined8 local_76;
  undefined4 local_6e;
  undefined8 local_6a;
  undefined4 local_62;
  undefined8 local_5e;
  undefined4 local_56;
  ulonglong local_48;
  
  local_150 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStackY_288;
  plVar12 = (longlong *)0x0;
  local_ca = 0;
  local_c2 = 0;
  local_be = 0;
  local_b6 = 0;
  local_b2 = 0;
  local_aa = 0;
  local_a6 = 0;
  local_9e = 0;
  local_9a = 0;
  local_92 = 0;
  local_8e = 0;
  local_86 = 0;
  local_82 = 0;
  local_7a = 0;
  local_76 = 0;
  local_6e = 0;
  local_6a = 0;
  local_62 = 0;
  local_5e = 0;
  local_56 = 0;
  local_d0 = *(undefined4 *)(param_2 + 1);
  _local_d8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x24350000);
  local_cc = 1;
  _local_d8 = CONCAT62(stack0xffffffffffffff2a,0x86);
  local_230 = (longlong *)0x0;
  local_238 = param_1;
  local_180 = param_2;
  iVar2 = FUN_140001970(&local_230);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_208 = (IUnknown *)0x0;
  local_200 = (longlong *)0x0;
  Ordinal_8(local_1e8);
  Ordinal_8(local_1d0);
  pIVar1 = local_208;
  if ((local_208 != (IUnknown *)0x0) && (local_208 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_198 = &DAT_140281f00;
  local_1b0 = &DAT_140281f00;
  iVar2 = 0;
  local_1a8 = 0;
  local_1a0 = 0;
  if (local_208 != (IUnknown *)0x0) {
    (*local_208->lpVtbl->Release)(local_208);
  }
  HVar3 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_218
                          );
  if (HVar3 < 0) {
LAB_1400ce42e:
    local_208 = (IUnknown *)0x0;
  }
  else {
    HVar3 = OleRun(local_218[0]);
    if (-1 < HVar3) {
      HVar3 = (*local_218[0]->lpVtbl->QueryInterface)(local_218[0],(IID *)&DAT_140281f68,&local_208)
      ;
    }
    (*local_218[0]->lpVtbl->Release)(local_218[0]);
    if (HVar3 < 0) goto LAB_1400ce42e;
  }
  local_1b8 = 2;
  local_1f8 = 1;
  local_248[0] = '\x01';
  local_240 = 0;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_228 = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_228 != 0) goto LAB_1400ce5d7;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_208;
    if (local_208 != (IUnknown *)0x0) {
      local_240 = 0;
      UVar4 = (*local_208->lpVtbl[0x12].AddRef)(local_208);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_208;
      if (local_240 != 0) {
        if (local_208 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*local_208->lpVtbl[10].Release)(local_208);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_208 != (IUnknown *)0x0) {
        (*local_208->lpVtbl->Release)(local_208);
        local_208 = (IUnknown *)0x0;
      }
    }
    local_1a0 = 0;
    local_198 = &DAT_140281f00;
    local_1b0 = &DAT_140281f00;
    local_1a8 = 0;
    local_1b8 = 0;
    Ordinal_9(local_1d0);
    Ordinal_9(local_1e8);
    if (local_200 != (longlong *)0x0) {
      (**(code **)(*local_200 + 0x10))();
    }
    if (local_208 != (IUnknown *)0x0) {
      (*local_208->lpVtbl->Release)(local_208);
    }
    if (local_230 != (longlong *)0x0) {
      (**(code **)(*local_230 + 0x10))();
    }
    return (longlong *)0x0;
  }
LAB_1400ce5d7:
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_178);
  FUN_140001710(&local_230,*puVar8,"dbo.up_read_buff");
  if (local_178 != (longlong *)0x0) {
    (**(code **)(*local_178 + 0x10))();
  }
  local_220 = local_108;
  local_168 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_164 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_160 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_15c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_108,&local_168);
  plVar9 = operator_new(0x18);
  local_170 = plVar12;
  local_188 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    local_170 = plVar9;
  }
  if (local_170 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_230,local_148,&local_170,0xca);
  local_220 = plVar9;
  if (local_230 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_230,&local_188);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_188 != (longlong *)0x0) {
      (**(code **)(*local_188 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    puVar8 = (undefined8 *)FUN_1400016d0(&local_230,&local_220);
    This = local_208;
    pIVar1 = (IUnknown *)*puVar8;
    if (local_208 != pIVar1) {
      local_208 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_220 != (longlong *)0x0) {
      (**(code **)(*local_220 + 0x10))();
    }
    pIVar1 = local_208;
    if (local_208 != (IUnknown *)0x0) {
      local_23c = 0;
      UVar4 = (*local_208->lpVtbl[6].Release)(local_208);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      plVar9 = (longlong *)0x1;
      plVar13 = plVar12;
      if (local_23c != -1) {
        while( true ) {
          pIVar1 = local_208;
          iVar2 = (int)plVar13;
          if (local_208 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          local_244 = 0;
          UVar4 = (*local_208->lpVtbl[6].Release)(local_208);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
          if (local_244 == -1) break;
          uVar11 = FUN_140002290(&local_208,local_138,"buff_type",local_248);
          FUN_140182560(uVar11);
          uVar6 = FUN_140062550(uVar11);
          Ordinal_9(local_138);
          uVar11 = FUN_140002290(&local_208,local_f0,"buff_id",local_248);
          FUN_140182560(uVar11);
          uVar7 = FUN_140062550(uVar11);
          Ordinal_9(local_f0);
          ppvObject = "buff_time";
          riid = &local_120;
          uVar11 = FUN_140002290(&local_208,riid,"buff_time",local_248);
          FUN_140182560(uVar11);
          uVar14 = FUN_140098cf0(uVar11);
          Ordinal_9(&local_120);
          pIVar1 = local_208;
          *(undefined4 *)((longlong)&local_ca + (longlong)plVar13 * 0xc) = uVar7;
          *(undefined4 *)((longlong)&local_ca + (longlong)plVar13 * 0xc + 4) = uVar6;
          (&local_c2)[(longlong)plVar13 * 3] = uVar14;
          local_240 = iVar2 + 1;
          plVar13 = (longlong *)(ulonglong)local_240;
          if (local_208 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          HVar3 = (*local_208->lpVtbl[0xc].QueryInterface)(local_208,riid,(void **)ppvObject);
          if (HVar3 < 0) {
            _com_issue_errorex(HVar3,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        plVar9 = (longlong *)0x1;
        if (local_248[0] == '\0') {
          local_cc = 1;
          plVar9 = plVar12;
        }
      }
      if ((iVar2 != 0) &&
         (iVar2 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_d8), iVar2 == 0)) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_208;
      if (local_208 != (IUnknown *)0x0) {
        local_238 = (undefined8 *)((ulonglong)local_238 & 0xffffffff00000000);
        UVar4 = (*local_208->lpVtbl[0x12].AddRef)(local_208);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_208;
        if ((int)local_238 != 0) {
          if (local_208 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar4 = (*local_208->lpVtbl[10].Release)(local_208);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_208 != (IUnknown *)0x0) {
          (*local_208->lpVtbl->Release)(local_208);
          local_208 = (IUnknown *)0x0;
        }
      }
      local_1a0 = 0;
      local_198 = &DAT_140281f00;
      local_1b0 = &DAT_140281f00;
      local_1a8 = 0;
      local_1b8 = 0;
      Ordinal_9(local_1d0);
      Ordinal_9(local_1e8);
      if (local_200 != (longlong *)0x0) {
        (**(code **)(*local_200 + 0x10))();
      }
      if (local_208 != (IUnknown *)0x0) {
        (*local_208->lpVtbl->Release)(local_208);
      }
      if (local_230 != (longlong *)0x0) {
        (**(code **)(*local_230 + 0x10))();
      }
      return plVar9;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400ceb50(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400cebe8;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400cebe8:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_cash_mileage");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("mileage");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1400cef00(longlong *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  undefined8 uVar9;
  longlong *plVar10;
  longlong *plVar11;
  undefined1 auStackY_308 [32];
  char local_2c8 [4];
  short local_2c4;
  longlong *local_2c0;
  longlong *local_2b8;
  longlong *local_2b0;
  int local_2a8;
  int local_2a4;
  longlong *local_2a0;
  LPUNKNOWN local_298;
  longlong *local_290;
  longlong *local_288;
  undefined8 *local_280;
  longlong *local_278 [2];
  IUnknown *local_268;
  longlong *local_260;
  undefined4 local_258;
  undefined1 local_248 [24];
  undefined1 local_230 [24];
  undefined4 local_218;
  undefined1 *local_210;
  undefined4 local_208;
  undefined8 local_200;
  undefined1 *local_1f8;
  undefined1 *local_1e8;
  longlong *local_1e0;
  longlong *local_1d8;
  longlong *local_1d0;
  longlong *local_1c8;
  undefined1 *local_1c0;
  longlong *local_1b8;
  undefined1 *local_1b0;
  longlong *local_1a8;
  undefined1 *local_1a0;
  longlong *local_198;
  longlong *local_190;
  undefined1 local_188 [16];
  undefined4 local_178;
  undefined4 uStack_174;
  undefined4 uStack_170;
  undefined4 uStack_16c;
  undefined1 local_160 [8];
  undefined4 local_158;
  undefined4 uStack_154;
  undefined4 uStack_150;
  undefined4 uStack_14c;
  undefined1 local_148 [16];
  undefined4 local_138;
  undefined4 uStack_134;
  undefined4 uStack_130;
  undefined4 uStack_12c;
  undefined1 local_128 [8];
  undefined1 local_120 [16];
  undefined8 local_110;
  longlong local_108 [3];
  undefined1 local_f0 [24];
  undefined1 local_d8 [24];
  undefined1 local_c0 [24];
  undefined1 local_a8 [24];
  longlong local_90 [3];
  undefined1 local_78 [24];
  undefined4 local_60;
  undefined4 uStack_5c;
  undefined4 local_58;
  undefined2 local_54;
  undefined1 local_52;
  wchar_t local_51 [12];
  ulonglong local_39;
  ulonglong local_30;
  
  local_110 = 0xfffffffffffffffe;
  local_30 = DAT_1403223c0 ^ (ulonglong)auStackY_308;
  local_52 = 0;
  local_51[0] = L'\0';
  local_51[1] = L'\0';
  local_51[2] = L'\0';
  local_51[3] = L'\0';
  local_51[4] = L'\0';
  local_51[5] = L'\0';
  local_51[6] = L'\0';
  local_51[7] = L'\0';
  local_51[8] = L'\0';
  local_51[9] = L'\0';
  local_51[10] = L'\0';
  local_51[0xb] = L'\0';
  local_39 = 0;
  local_58 = *(undefined4 *)(param_2 + 1);
  _local_60 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x243f0000);
  local_54 = 1;
  _local_60 = CONCAT62(stack0xffffffffffffffa2,0x2f);
  pIVar1 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  local_2c0 = param_1;
  local_290 = param_1;
  local_280 = param_2;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400cefe0:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (longlong *)0x0;
    }
  }
  else {
    local_2a8 = 0;
    UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_2a8 == 0) goto LAB_1400cefe0;
  }
  local_2b8 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_2b8);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_268 = (IUnknown *)0x0;
  local_260 = (longlong *)0x0;
  Ordinal_8(local_248);
  Ordinal_8(local_230);
  pIVar1 = local_268;
  if ((local_268 != (IUnknown *)0x0) && (local_268 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_1f8 = &DAT_140281f00;
  local_210 = &DAT_140281f00;
  local_208 = 0;
  local_200 = 0;
  if (local_268 != (IUnknown *)0x0) {
    (*local_268->lpVtbl->Release)(local_268);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_298);
  if (-1 < HVar5) {
    HVar5 = OleRun(local_298);
    if (-1 < HVar5) {
      HVar5 = (*local_298->lpVtbl->QueryInterface)(local_298,(IID *)&DAT_140281f68,&local_268);
    }
    (*local_298->lpVtbl->Release)(local_298);
    if (-1 < HVar5) goto LAB_1400cf11e;
  }
  local_268 = (IUnknown *)0x0;
LAB_1400cf11e:
  local_218 = 2;
  local_258 = 1;
  local_2c8[0] = '\x01';
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_1a8);
  FUN_140001710(&local_2b8,*puVar6,"dbo.up_update_character_name");
  if (local_1a8 != (longlong *)0x0) {
    (**(code **)(*local_1a8 + 0x10))();
  }
  local_2a0 = local_108;
  local_158 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_154 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_150 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_14c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_108,&local_158);
  plVar7 = operator_new(0x18);
  local_1b8 = plVar10;
  local_288 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_1b8 = plVar7;
  }
  if (local_1b8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_2b8,local_278,&local_1b8,0xca);
  local_2a0 = plVar7;
  if (local_2b8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_2b8,&local_1e0);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_1e0 != (longlong *)0x0) {
    (**(code **)(*local_1e0 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_278[0] = local_90;
  FUN_1400623f0(local_90,(longlong)param_2 + 0x1e);
  plVar7 = operator_new(0x18);
  local_1d0 = plVar10;
  local_2a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_name");
    *plVar7 = lVar8;
    local_1d0 = plVar7;
  }
  if (local_1d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_2b8,&local_1e8,&local_1d0,0xca);
  local_278[0] = plVar7;
  if (local_2b8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_2b8,&local_1d8);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_1d8 != (longlong *)0x0) {
      (**(code **)(*local_1d8 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_2b8,&local_190);
    pIVar2 = local_268;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_268 != pIVar1) {
      local_268 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->Release)(pIVar2);
      }
    }
    if (local_190 != (longlong *)0x0) {
      (**(code **)(*local_190 + 0x10))();
    }
    pIVar1 = local_268;
    if (local_268 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_2c4 = 0;
    UVar3 = (*local_268->lpVtbl[6].Release)(local_268);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
    }
    if (local_2c4 == -1) {
      local_54 = 0x72;
      plVar7 = local_2c0;
      plVar11 = plVar10;
    }
    else {
      uVar9 = FUN_140002290(&local_268,local_d8,"UPDATE_CHARACTER_NAME",local_2c8);
      FUN_140182560(uVar9);
      iVar4 = FUN_140062550(uVar9);
      Ordinal_9(local_d8);
      plVar7 = local_2c0;
      if (iVar4 != 0) {
        local_52 = 1;
        wcsncpy(local_51,(wchar_t *)((longlong)param_2 + 0x1e),0x10);
        local_39 = local_39 & 0xffffffffffff;
        local_2b0 = (longlong *)0x0;
        iVar4 = FUN_140001970(&local_2b0);
        plVar7 = local_2c0;
        if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar4);
        }
        puVar6 = (undefined8 *)FUN_140001f20(*local_2c0,&local_198);
        FUN_140001710(&local_2b0,*puVar6,"dbo.up_update_friend_name");
        if (local_198 != (longlong *)0x0) {
          (**(code **)(*local_198 + 0x10))();
        }
        local_1e8 = local_78;
        local_138 = *(undefined4 *)((longlong)param_2 + 0xe);
        uStack_134 = *(undefined4 *)((longlong)param_2 + 0x12);
        uStack_130 = *(undefined4 *)((longlong)param_2 + 0x16);
        uStack_12c = *(undefined4 *)((longlong)param_2 + 0x1a);
        FUN_140062280(local_78,&local_138);
        uVar9 = FUN_140001000(local_160,"character_id");
        uVar9 = FUN_140001880(&local_2b0,&local_1c0,uVar9,0xca);
        FUN_1400017e0(&local_2b0,uVar9);
        local_1c0 = local_a8;
        FUN_1400623f0(local_a8,(longlong)param_2 + 0x1e);
        uVar9 = FUN_140001000(local_128,"character_name");
        uVar9 = FUN_140001880(&local_2b0,&local_1b0,uVar9,0xca);
        FUN_1400017e0(&local_2b0,uVar9);
        puVar6 = (undefined8 *)FUN_1400016d0(&local_2b0,&local_1c8);
        pIVar2 = local_268;
        pIVar1 = (IUnknown *)*puVar6;
        if (local_268 != pIVar1) {
          local_268 = pIVar1;
          if (pIVar1 != (IUnknown *)0x0) {
            (*pIVar1->lpVtbl->AddRef)(pIVar1);
          }
          if (pIVar2 != (IUnknown *)0x0) {
            (*pIVar2->lpVtbl->Release)(pIVar2);
          }
        }
        if (local_1c8 != (longlong *)0x0) {
          (**(code **)(*local_1c8 + 0x10))();
        }
        if (local_2b0 != (longlong *)0x0) {
          (**(code **)(*local_2b0 + 0x10))();
        }
        local_2c0 = (longlong *)0x0;
        iVar4 = FUN_140001970(&local_2c0);
        if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar4);
        }
        puVar6 = (undefined8 *)FUN_140001f20(*plVar7,&local_288);
        FUN_140001710(&local_2c0,*puVar6,"dbo.up_update_guild_member_name");
        if (local_288 != (longlong *)0x0) {
          (**(code **)(*local_288 + 0x10))();
        }
        local_1b0 = local_f0;
        local_178 = *(undefined4 *)((longlong)param_2 + 0xe);
        uStack_174 = *(undefined4 *)((longlong)param_2 + 0x12);
        uStack_170 = *(undefined4 *)((longlong)param_2 + 0x16);
        uStack_16c = *(undefined4 *)((longlong)param_2 + 0x1a);
        FUN_140062280(local_f0,&local_178);
        uVar9 = FUN_140001000(local_120,"character_id");
        uVar9 = FUN_140001880(&local_2c0,&local_1a0,uVar9,0xca);
        FUN_1400017e0(&local_2c0,uVar9);
        local_1a0 = local_c0;
        FUN_1400623f0(local_c0,(longlong)param_2 + 0x1e);
        uVar9 = FUN_140001000(local_188,"character_name");
        uVar9 = FUN_140001880(&local_2c0,local_148,uVar9,0xca);
        FUN_1400017e0(&local_2c0,uVar9);
        puVar6 = (undefined8 *)FUN_1400016d0(&local_2c0,&local_2a0);
        pIVar2 = local_268;
        pIVar1 = (IUnknown *)*puVar6;
        if (local_268 != pIVar1) {
          local_268 = pIVar1;
          if (pIVar1 != (IUnknown *)0x0) {
            (*pIVar1->lpVtbl->AddRef)(pIVar1);
          }
          if (pIVar2 != (IUnknown *)0x0) {
            (*pIVar2->lpVtbl->Release)(pIVar2);
          }
        }
        if (local_2a0 != (longlong *)0x0) {
          (**(code **)(*local_2a0 + 0x10))();
        }
        if (local_2c0 != (longlong *)0x0) {
          (**(code **)(*local_2c0 + 0x10))();
        }
      }
      plVar11 = (longlong *)0x1;
      if (local_2c8[0] == '\0') {
        local_54 = 0x70;
        plVar11 = plVar10;
      }
    }
    iVar4 = FUN_1400a1430(*(undefined8 *)(plVar7[0x22] + 0xf0),&local_60);
    if (iVar4 == 0) {
      FUN_1400a0b40(plVar7[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar1 = local_268;
    if (local_268 != (IUnknown *)0x0) {
      local_2a4 = 0;
      UVar3 = (*local_268->lpVtbl[0x12].AddRef)(local_268);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_268;
      if (local_2a4 != 0) {
        if (local_268 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar3 = (*local_268->lpVtbl[10].Release)(local_268);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_268 != (IUnknown *)0x0) {
        (*local_268->lpVtbl->Release)(local_268);
        local_268 = (IUnknown *)0x0;
      }
    }
    local_200 = 0;
    local_1f8 = &DAT_140281f00;
    local_210 = &DAT_140281f00;
    local_208 = 0;
    local_218 = 0;
    Ordinal_9(local_230);
    Ordinal_9(local_248);
    if (local_260 != (longlong *)0x0) {
      (**(code **)(*local_260 + 0x10))();
    }
    if (local_268 != (IUnknown *)0x0) {
      (*local_268->lpVtbl->Release)(local_268);
    }
    if (local_2b8 != (longlong *)0x0) {
      (**(code **)(*local_2b8 + 0x10))();
    }
    return plVar11;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400cfa30(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400cfac6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400cfac6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_dayattach");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("attach_item");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_58 = local_70;
    uVar1 = *(undefined4 *)(param_2 + 0x22);
    Ordinal_8(local_70);
    FUN_140062080(local_70,uVar1);
    plVar9 = operator_new(0x18);
    local_80 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("attach_gold");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_70);
    local_58 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1400cff00(undefined8 *param_1,undefined8 *param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  IUnknown *This;
  undefined2 uVar4;
  ULONG UVar5;
  int iVar6;
  HRESULT HVar7;
  undefined8 *puVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  short *psVar12;
  undefined8 uVar13;
  longlong *plVar14;
  undefined1 auStackY_6c8 [32];
  longlong *local_688;
  short local_680;
  int local_67c;
  undefined8 *local_678;
  longlong *local_670;
  longlong *local_668;
  longlong *local_660;
  longlong *local_658;
  longlong *local_650;
  longlong *local_648;
  longlong *local_640;
  longlong *local_638;
  longlong *local_630;
  LPUNKNOWN local_628;
  longlong *local_620;
  longlong *local_618;
  short local_610 [4];
  undefined4 local_608;
  short local_5f8 [4];
  undefined4 local_5f0;
  short local_5e0 [4];
  undefined4 local_5d8;
  short local_5c8 [4];
  undefined4 local_5c0;
  longlong *local_5b0;
  short local_5a8 [4];
  undefined8 local_5a0;
  undefined8 *local_590;
  undefined8 *local_588;
  longlong *local_580;
  short local_578 [4];
  int local_570;
  short local_560 [4];
  int local_558;
  short local_548 [4];
  undefined4 local_540;
  short local_530 [4];
  undefined2 local_528;
  IUnknown *local_518;
  longlong *local_510;
  undefined4 local_508;
  undefined1 local_4f8 [24];
  undefined1 local_4e0 [24];
  undefined4 local_4c8;
  undefined1 *local_4c0;
  undefined4 local_4b8;
  undefined8 local_4b0;
  undefined1 *local_4a8;
  longlong *local_498;
  longlong *local_490;
  longlong *local_488;
  longlong *local_480;
  longlong *local_478;
  longlong *local_470;
  longlong *local_468;
  longlong *local_460;
  longlong *local_458;
  longlong *local_450;
  longlong *local_448;
  longlong *local_440;
  longlong *local_438;
  longlong *local_430;
  longlong *local_428;
  longlong *local_420;
  longlong *local_418;
  longlong *local_410;
  longlong *local_408;
  longlong *local_400;
  longlong *local_3f8;
  longlong *local_3f0;
  longlong *local_3e8;
  longlong *local_3e0;
  longlong *local_3d8;
  longlong *local_3d0;
  longlong *local_3c8;
  longlong *local_3c0;
  longlong *local_3b8;
  longlong *local_3b0;
  longlong *local_3a8;
  longlong *local_3a0;
  longlong *local_398;
  longlong *local_390;
  longlong *local_388;
  longlong *local_380;
  longlong *local_378;
  longlong *local_370;
  longlong *local_368;
  longlong *local_360;
  longlong local_358 [3];
  undefined1 local_340 [8];
  undefined2 local_338;
  undefined2 local_328 [4];
  undefined8 local_320;
  undefined2 local_310 [4];
  undefined8 local_308;
  undefined1 local_2f8 [8];
  int local_2f0;
  undefined2 local_2e0 [4];
  undefined8 local_2d8;
  undefined2 local_2c8 [4];
  undefined8 local_2c0;
  undefined2 local_2b0 [4];
  undefined8 local_2a8;
  undefined2 local_298 [4];
  undefined8 local_290;
  undefined1 local_280 [8];
  int local_278;
  undefined1 local_268 [8];
  undefined4 local_260;
  undefined2 local_250 [4];
  undefined8 local_248;
  undefined2 local_238 [4];
  undefined8 local_230;
  undefined4 local_218;
  undefined4 uStack_214;
  undefined4 uStack_210;
  undefined4 uStack_20c;
  undefined4 local_1f8;
  undefined4 uStack_1f4;
  undefined4 uStack_1f0;
  undefined4 uStack_1ec;
  undefined8 local_1e8;
  undefined1 local_1e0 [16];
  longlong local_1d0 [3];
  undefined1 local_1b8 [24];
  undefined1 local_1a0 [24];
  longlong local_188 [3];
  undefined1 local_170 [24];
  longlong local_158 [3];
  undefined1 local_140 [24];
  undefined1 local_128 [24];
  undefined1 local_110 [24];
  longlong local_f8 [3];
  undefined1 local_e0 [24];
  longlong local_c8 [3];
  longlong local_b0 [3];
  undefined1 local_98 [24];
  undefined4 local_80;
  undefined4 uStack_7c;
  undefined4 local_78;
  undefined2 local_74;
  undefined8 local_72;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined2 local_4a;
  ulonglong local_48;
  
  local_1e8 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStackY_6c8;
  plVar14 = (longlong *)0x1;
  local_72 = 0;
  local_6a = 0;
  local_62 = 0;
  local_5a = 0;
  plVar11 = (longlong *)0x0;
  local_52 = 0;
  local_4a = 0;
  local_78 = *(undefined4 *)(param_2 + 1);
  _local_80 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x24420000);
  local_74 = 1;
  _local_80 = CONCAT62(stack0xffffffffffffff82,0x38);
  pIVar3 = *(IUnknown **)*param_1;
  local_678 = param_1;
  local_590 = param_2;
  local_588 = param_1;
  if (pIVar3 == (IUnknown *)0x0) {
LAB_1400cfffb:
    iVar6 = FUN_1400a1e90(param_1);
    if (iVar6 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (longlong *)0x0;
    }
  }
  else {
    local_67c = 0;
    UVar5 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if (local_67c == 0) goto LAB_1400cfffb;
  }
  local_688 = (longlong *)0x0;
  iVar6 = FUN_140001970(&local_688);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  local_518 = (IUnknown *)0x0;
  local_510 = (longlong *)0x0;
  Ordinal_8(local_4f8);
  Ordinal_8(local_4e0);
  pIVar3 = local_518;
  if ((local_518 != (IUnknown *)0x0) && (local_518 = (IUnknown *)0x0, pIVar3 != (IUnknown *)0x0)) {
    (*pIVar3->lpVtbl->Release)(pIVar3);
  }
  local_4a8 = &DAT_140281f00;
  local_4c0 = &DAT_140281f00;
  local_4b8 = 0;
  local_4b0 = 0;
  if (local_518 != (IUnknown *)0x0) {
    (*local_518->lpVtbl->Release)(local_518);
  }
  HVar7 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_628);
  if (HVar7 < 0) {
LAB_1400d013e:
    local_518 = (IUnknown *)0x0;
  }
  else {
    HVar7 = OleRun(local_628);
    if (-1 < HVar7) {
      HVar7 = (*local_628->lpVtbl->QueryInterface)(local_628,(IID *)&DAT_140281f68,&local_518);
    }
    (*local_628->lpVtbl->Release)(local_628);
    if (HVar7 < 0) goto LAB_1400d013e;
  }
  local_4c8 = 2;
  local_508 = 1;
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_498);
  FUN_140001710(&local_688,*puVar8,"dbo.up_update_reward_coupon");
  if (local_498 != (longlong *)0x0) {
    (**(code **)(*local_498 + 0x10))();
  }
  local_670 = local_158;
  local_1f8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_1f4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_1f0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_1ec = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140061f30(local_158,&local_1f8);
  plVar9 = operator_new(0x18);
  local_398 = plVar11;
  local_5b0 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("auth_id");
    *plVar9 = lVar10;
    local_398 = plVar9;
  }
  if (local_398 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_688,&local_630,&local_398,0xca);
  local_670 = plVar9;
  if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_688,&local_360);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_360 != (longlong *)0x0) {
    (**(code **)(*local_360 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_630 = local_b0;
  local_218 = *(undefined4 *)((longlong)param_2 + 0x1e);
  uStack_214 = *(undefined4 *)((longlong)param_2 + 0x22);
  uStack_210 = *(undefined4 *)((longlong)param_2 + 0x26);
  uStack_20c = *(undefined4 *)((longlong)param_2 + 0x2a);
  FUN_140061f30(local_b0,&local_218);
  plVar9 = operator_new(0x18);
  local_388 = plVar11;
  local_670 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    local_388 = plVar9;
  }
  if (local_388 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_688,&local_668,&local_388,0xca);
  local_630 = plVar9;
  if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_688,&local_3f8);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_3f8 != (longlong *)0x0) {
    (**(code **)(*local_3f8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_668 = local_c8;
  FUN_1400623f0(local_c8,(longlong)param_2 + 0x6d);
  plVar9 = operator_new(0x18);
  local_3a8 = plVar11;
  local_630 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_name");
    *plVar9 = lVar10;
    local_3a8 = plVar9;
  }
  if (local_3a8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_688,&local_618,&local_3a8,0xca);
  local_668 = plVar9;
  if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_688,&local_3e8);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_3e8 != (longlong *)0x0) {
    (**(code **)(*local_3e8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_618 = local_188;
  FUN_14006a8f0(local_188,(longlong)param_2 + 0x3a);
  plVar9 = operator_new(0x18);
  local_368 = plVar11;
  local_668 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("bcust_id");
    *plVar9 = lVar10;
    local_368 = plVar9;
  }
  if (local_368 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_688,&local_620,&local_368,0xca);
  local_618 = plVar9;
  if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_688,&local_3d8);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_3d8 != (longlong *)0x0) {
    (**(code **)(*local_3d8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_620 = local_f8;
  FUN_1400623f0(local_f8,(longlong)param_2 + 0x8d);
  plVar9 = operator_new(0x18);
  local_3c8 = plVar11;
  local_618 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490(&DAT_14028e750);
    *plVar9 = lVar10;
    local_3c8 = plVar9;
  }
  if (local_3c8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_688,&local_660,&local_3c8,200);
  local_620 = plVar9;
  if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_688,&local_378);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_378 != (longlong *)0x0) {
    (**(code **)(*local_378 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_660 = local_358;
  uVar2 = *(undefined4 *)((longlong)param_2 + 0x2e);
  Ordinal_8(local_358);
  FUN_140062080(local_358,uVar2);
  plVar9 = operator_new(0x18);
  local_3b8 = plVar11;
  local_620 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("coupon_type");
    *plVar9 = lVar10;
    local_3b8 = plVar9;
  }
  if (local_3b8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_688,&local_658,&local_3b8,3);
  local_660 = plVar9;
  if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_688,&local_410);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_410 != (longlong *)0x0) {
    (**(code **)(*local_410 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_658 = local_1d0;
  FUN_1400623f0(local_1d0,(longlong)param_2 + 0xad);
  plVar9 = operator_new(0x18);
  local_400 = plVar11;
  local_660 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("coupon");
    *plVar9 = lVar10;
    local_400 = plVar9;
  }
  if (local_400 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_688,&local_640,&local_400,0xca);
  local_658 = plVar9;
  if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_688,&local_3f0);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_3f0 != (longlong *)0x0) {
    (**(code **)(*local_3f0 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_640 = (longlong *)local_5a8;
  uVar13 = *(undefined8 *)((longlong)param_2 + 0x32);
  Ordinal_8(local_5a8);
  if ((local_5a8[0] != 5) && (local_5a8[0] != 7)) {
    iVar6 = Ordinal_9(local_5a8);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_5a8[0] = 5;
  }
  local_5a0 = uVar13;
  plVar9 = operator_new(0x18);
  local_490 = plVar11;
  local_658 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("use_date");
    *plVar9 = lVar10;
    local_490 = plVar9;
  }
  if (local_490 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_688,&local_638,&local_490,5);
  local_640 = plVar9;
  if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_688,&local_480);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_480 != (longlong *)0x0) {
    (**(code **)(*local_480 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_638 = (longlong *)local_610;
  Ordinal_8(local_610);
  if ((local_610[0] == 3) || (local_610[0] == 10)) {
LAB_1400d0bab:
    local_608 = 0;
  }
  else {
    if (local_610[0] != 0xb) {
      iVar6 = Ordinal_9(local_610);
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar6);
      }
      local_610[0] = 3;
      goto LAB_1400d0bab;
    }
    local_608 = (uint)local_608._2_2_ << 0x10;
  }
  plVar9 = operator_new(0x18);
  local_470 = plVar11;
  local_640 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490(&DAT_14028ed14);
    *plVar9 = lVar10;
    local_470 = plVar9;
  }
  if (local_470 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_688,&local_650,&local_470,3);
  local_638 = plVar9;
  if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_688,&local_460);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_460 != (longlong *)0x0) {
    (**(code **)(*local_460 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_650 = (longlong *)local_5f8;
  Ordinal_8(local_5f8);
  if ((local_5f8[0] == 3) || (local_5f8[0] == 10)) {
LAB_1400d0d1f:
    local_5f0 = 0;
  }
  else {
    if (local_5f8[0] != 0xb) {
      iVar6 = Ordinal_9(local_5f8);
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar6);
      }
      local_5f8[0] = 3;
      goto LAB_1400d0d1f;
    }
    local_5f0 = (uint)local_5f0._2_2_ << 0x10;
  }
  plVar9 = operator_new(0x18);
  local_450 = plVar11;
  local_638 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490(&DAT_14028ed18);
    *plVar9 = lVar10;
    local_450 = plVar9;
  }
  if (local_450 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_688,&local_648,&local_450,0x10);
  local_650 = plVar9;
  if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_688,&local_440);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_440 != (longlong *)0x0) {
    (**(code **)(*local_440 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_648 = (longlong *)local_5c8;
  Ordinal_8(local_5c8);
  if ((local_5c8[0] == 3) || (local_5c8[0] == 10)) {
LAB_1400d0e95:
    local_5c0 = 0;
  }
  else {
    if (local_5c8[0] != 0xb) {
      iVar6 = Ordinal_9(local_5c8);
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar6);
      }
      local_5c8[0] = 3;
      goto LAB_1400d0e95;
    }
    local_5c0 = (uint)local_5c0._2_2_ << 0x10;
  }
  plVar9 = operator_new(0x18);
  local_430 = plVar11;
  local_650 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("item_code");
    *plVar9 = lVar10;
    local_430 = plVar9;
  }
  if (local_430 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_688,&local_580,&local_430,3);
  local_648 = plVar9;
  if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_688,&local_420);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_420 != (longlong *)0x0) {
    (**(code **)(*local_420 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_580 = (longlong *)local_5e0;
  Ordinal_8(local_5e0);
  if ((local_5e0[0] == 3) || (local_5e0[0] == 10)) {
LAB_1400d100c:
    local_5d8 = 0;
  }
  else {
    if (local_5e0[0] != 0xb) {
      iVar6 = Ordinal_9(local_5e0);
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar6);
      }
      local_5e0[0] = 3;
      goto LAB_1400d100c;
    }
    local_5d8 = (uint)local_5d8._2_2_ << 0x10;
  }
  plVar9 = operator_new(0x18);
  local_408 = plVar11;
  local_648 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("item_count");
    *plVar9 = lVar10;
    local_408 = plVar9;
  }
  if (local_408 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_688,local_1e0,&local_408,2);
  local_580 = plVar9;
  if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_688,&local_488);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_488 != (longlong *)0x0) {
    (**(code **)(*local_488 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  puVar8 = (undefined8 *)FUN_1400016d0(&local_688,&local_3e0);
  This = local_518;
  pIVar3 = (IUnknown *)*puVar8;
  if (local_518 != pIVar3) {
    local_518 = pIVar3;
    if (pIVar3 != (IUnknown *)0x0) {
      (*pIVar3->lpVtbl->AddRef)(pIVar3);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_3e0 != (longlong *)0x0) {
    (**(code **)(*local_3e0 + 0x10))();
  }
  pIVar3 = local_518;
  if (local_518 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_680 = 0;
  UVar5 = (*local_518->lpVtbl[6].Release)(local_518);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281f28);
  }
  if (local_680 == -1) {
    local_52 = CONCAT44(local_52._4_4_,0x145);
    local_74 = 0x146;
  }
  else {
    local_250[0] = 8;
    local_248 = FUN_140201490(&DAT_14028ed14);
    if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    plVar11 = (longlong *)FUN_140001660(local_688,&local_3d0);
    if (*plVar11 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    plVar11 = (longlong *)FUN_140001390(*plVar11,&local_478,local_250);
    if (*plVar11 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    psVar12 = (short *)FUN_140001320(*plVar11,local_98);
    sVar1 = *psVar12;
    Ordinal_9(local_98);
    if (local_478 != (longlong *)0x0) {
      (**(code **)(*local_478 + 0x10))();
    }
    if (local_3d0 != (longlong *)0x0) {
      (**(code **)(*local_3d0 + 0x10))();
    }
    Ordinal_9(local_250);
    plVar11 = plVar14;
    if (sVar1 != 1) {
      local_2e0[0] = 8;
      local_2d8 = FUN_140201490(&DAT_14028ed14);
      if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      plVar14 = (longlong *)FUN_140001660(local_688,&local_3c0);
      if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      plVar14 = (longlong *)FUN_140001390(*plVar14,&local_468,local_2e0);
      if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      uVar13 = FUN_140001320(*plVar14,local_128);
      Ordinal_8(local_578);
      iVar6 = Ordinal_10(local_578,uVar13);
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar6);
      }
      Ordinal_9(local_128);
      if (local_468 != (longlong *)0x0) {
        (**(code **)(*local_468 + 0x10))();
      }
      if (local_3c0 != (longlong *)0x0) {
        (**(code **)(*local_3c0 + 0x10))();
      }
      Ordinal_9(local_2e0);
      iVar6 = 0;
      if ((local_578[0] != 1) && (FUN_140182560(local_578), iVar6 = local_570, local_578[0] != 3)) {
        Ordinal_8(local_280);
        iVar6 = Ordinal_12(local_280,local_578,0,3);
        if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar6);
        }
        Ordinal_9(local_280);
        iVar6 = local_278;
      }
      Ordinal_9(local_578);
      if (0 < iVar6) {
        local_2b0[0] = 8;
        local_2a8 = FUN_140201490(&DAT_14028ed18);
        if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        plVar14 = (longlong *)FUN_140001660(local_688,&local_3b0);
        if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        plVar14 = (longlong *)FUN_140001390(*plVar14,&local_458,local_2b0);
        if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        psVar12 = (short *)FUN_140001320(*plVar14,local_1b8);
        sVar1 = *psVar12;
        Ordinal_9(local_1b8);
        if (local_458 != (longlong *)0x0) {
          (**(code **)(*local_458 + 0x10))();
        }
        if (local_3b0 != (longlong *)0x0) {
          (**(code **)(*local_3b0 + 0x10))();
        }
        Ordinal_9(local_2b0);
        if (sVar1 != 1) {
          local_328[0] = 8;
          local_320 = FUN_140201490(&DAT_14028ed18);
          if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          plVar14 = (longlong *)FUN_140001660(local_688,&local_3a0);
          if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          plVar14 = (longlong *)FUN_140001390(*plVar14,&local_448,local_328);
          if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          uVar13 = FUN_140001320(*plVar14,local_1a0);
          Ordinal_8(local_560);
          iVar6 = Ordinal_10(local_560,uVar13);
          if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(iVar6);
          }
          Ordinal_9(local_1a0);
          if (local_448 != (longlong *)0x0) {
            (**(code **)(*local_448 + 0x10))();
          }
          if (local_3a0 != (longlong *)0x0) {
            (**(code **)(*local_3a0 + 0x10))();
          }
          Ordinal_9(local_328);
          iVar6 = 0;
          if ((local_560[0] != 1) &&
             (FUN_140182560(local_560), iVar6 = local_558, local_560[0] != 3)) {
            Ordinal_8(local_2f8);
            iVar6 = Ordinal_12(local_2f8,local_560,0,3);
            if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(iVar6);
            }
            Ordinal_9(local_2f8);
            iVar6 = local_2f0;
          }
          Ordinal_9(local_560);
          if (iVar6 == 2) {
            local_52 = CONCAT44(local_52._4_4_,1);
            local_2c8[0] = 8;
            local_2c0 = FUN_140201490("item_code");
            if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            plVar14 = (longlong *)FUN_140001660(local_688,&local_390);
            if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            plVar14 = (longlong *)FUN_140001390(*plVar14,&local_438,local_2c8);
            if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            psVar12 = (short *)FUN_140001320(*plVar14,local_170);
            sVar1 = *psVar12;
            Ordinal_9(local_170);
            if (local_438 != (longlong *)0x0) {
              (**(code **)(*local_438 + 0x10))();
            }
            if (local_390 != (longlong *)0x0) {
              (**(code **)(*local_390 + 0x10))();
            }
            Ordinal_9(local_2c8);
            if (sVar1 != 1) {
              local_298[0] = 8;
              local_290 = FUN_140201490("item_code");
              if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(0x80004003);
              }
              plVar14 = (longlong *)FUN_140001660(local_688,&local_380);
              if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(0x80004003);
              }
              plVar14 = (longlong *)FUN_140001390(*plVar14,&local_428,local_298);
              if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(0x80004003);
              }
              uVar13 = FUN_140001320(*plVar14,local_140);
              Ordinal_8(local_548);
              iVar6 = Ordinal_10(local_548,uVar13);
              if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(iVar6);
              }
              Ordinal_9(local_140);
              if (local_428 != (longlong *)0x0) {
                (**(code **)(*local_428 + 0x10))();
              }
              if (local_380 != (longlong *)0x0) {
                (**(code **)(*local_380 + 0x10))();
              }
              Ordinal_9(local_298);
              if (local_548[0] != 1) {
                FUN_140182560(local_548);
                if (local_548[0] != 3) {
                  Ordinal_8(local_268);
                  iVar6 = Ordinal_12(local_268,local_548,0,3);
                  if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
                    FUN_1402013e0(iVar6);
                  }
                  Ordinal_9(local_268);
                  local_540 = local_260;
                }
                local_52 = CONCAT44(local_540,(undefined4)local_52);
              }
              Ordinal_9(local_548);
            }
            local_238[0] = 8;
            local_230 = FUN_140201490("item_count");
            if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            plVar14 = (longlong *)FUN_140001660(local_688,&local_370);
            if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            plVar14 = (longlong *)FUN_140001390(*plVar14,&local_418,local_238);
            if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            psVar12 = (short *)FUN_140001320(*plVar14,local_110);
            sVar1 = *psVar12;
            Ordinal_9(local_110);
            if (local_418 != (longlong *)0x0) {
              (**(code **)(*local_418 + 0x10))();
            }
            if (local_370 != (longlong *)0x0) {
              (**(code **)(*local_370 + 0x10))();
            }
            Ordinal_9(local_238);
            if (sVar1 != 1) {
              local_310[0] = 8;
              local_308 = FUN_140201490("item_count");
              if (local_688 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(0x80004003);
              }
              plVar14 = (longlong *)FUN_140001660(local_688,&local_670);
              if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(0x80004003);
              }
              plVar14 = (longlong *)FUN_140001390(*plVar14,&local_5b0,local_310);
              if (*plVar14 == 0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(0x80004003);
              }
              uVar13 = FUN_140001320(*plVar14,local_e0);
              Ordinal_8(local_530);
              iVar6 = Ordinal_10(local_530,uVar13);
              if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(iVar6);
              }
              Ordinal_9(local_e0);
              if (local_5b0 != (longlong *)0x0) {
                (**(code **)(*local_5b0 + 0x10))();
              }
              if (local_670 != (longlong *)0x0) {
                (**(code **)(*local_670 + 0x10))();
              }
              Ordinal_9(local_310);
              uVar4 = local_4a;
              if ((local_530[0] != 1) &&
                 (FUN_140182560(local_530), uVar4 = local_528, local_530[0] != 3)) {
                Ordinal_8(local_340);
                iVar6 = Ordinal_12(local_340,local_530,0,3);
                if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
                  FUN_1402013e0(iVar6);
                }
                Ordinal_9(local_340);
                uVar4 = local_338;
              }
              local_4a = uVar4;
              Ordinal_9(local_530);
            }
            local_72 = *(undefined8 *)((longlong)param_2 + 0xe);
            local_6a = *(undefined8 *)((longlong)param_2 + 0x16);
            local_62 = *(undefined8 *)((longlong)param_2 + 0x1e);
            local_5a = *(undefined8 *)((longlong)param_2 + 0x26);
            goto LAB_1400d1bed;
          }
        }
        local_52 = CONCAT44(local_52._4_4_,0x147);
        goto LAB_1400d1bed;
      }
    }
    local_52 = CONCAT44(local_52._4_4_,0x146);
  }
LAB_1400d1bed:
  puVar8 = local_678;
  iVar6 = FUN_1400a1430(*(undefined8 *)(local_678[0x22] + 0xf0),&local_80);
  if (iVar6 == 0) {
    FUN_1400a0b40(puVar8[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar3 = local_518;
  if (local_518 != (IUnknown *)0x0) {
    local_678 = (undefined8 *)((ulonglong)local_678 & 0xffffffff00000000);
    UVar5 = (*local_518->lpVtbl[0x12].AddRef)(local_518);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281f28);
    }
    pIVar3 = local_518;
    if ((int)local_678 != 0) {
      if (local_518 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar5 = (*local_518->lpVtbl[10].Release)(local_518);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_518 != (IUnknown *)0x0) {
      (*local_518->lpVtbl->Release)(local_518);
      local_518 = (IUnknown *)0x0;
    }
  }
  local_4b0 = 0;
  local_4a8 = &DAT_140281f00;
  local_4c0 = &DAT_140281f00;
  local_4b8 = 0;
  local_4c8 = 0;
  Ordinal_9(local_4e0);
  Ordinal_9(local_4f8);
  if (local_510 != (longlong *)0x0) {
    (**(code **)(*local_510 + 0x10))();
  }
  if (local_518 != (IUnknown *)0x0) {
    (*local_518->lpVtbl->Release)(local_518);
  }
  if (local_688 != (longlong *)0x0) {
    (**(code **)(*local_688 + 0x10))();
  }
  return plVar11;
}



// WARNING: Removing unreachable block (ram,0x0001400d220b)
// WARNING: Removing unreachable block (ram,0x0001400d2215)
// WARNING: Removing unreachable block (ram,0x0001400d2220)
// WARNING: Removing unreachable block (ram,0x0001400d2230)

bool FUN_1400d1d90(undefined8 *param_1,longlong param_2,longlong param_3)

{
  IUnknown *pIVar1;
  IUnknown *This;
  ULONG UVar2;
  int iVar3;
  HRESULT HVar4;
  undefined4 uVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  bool bVar11;
  int local_res20 [2];
  longlong *local_140;
  longlong *local_138;
  LPUNKNOWN local_130;
  longlong *local_128 [2];
  IUnknown *local_118;
  longlong *local_110;
  undefined4 local_108;
  undefined1 local_f8 [24];
  undefined1 local_e0 [24];
  undefined4 local_c8;
  undefined1 *local_c0;
  undefined4 local_b8;
  undefined8 local_b0;
  undefined1 *local_a8;
  longlong *local_98;
  longlong local_90 [5];
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined1 local_50 [8];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400d1e10:
    iVar3 = FUN_1400a1e90(param_1);
    if (iVar3 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return false;
    }
  }
  else {
    local_res20[0] = 0;
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_res20[0] == 0) goto LAB_1400d1e10;
  }
  local_140 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_140);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_118 = (IUnknown *)0x0;
  local_110 = (longlong *)0x0;
  Ordinal_8(local_f8);
  Ordinal_8(local_e0);
  pIVar1 = local_118;
  if ((local_118 != (IUnknown *)0x0) && (local_118 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_a8 = &DAT_140281f00;
  local_c0 = &DAT_140281f00;
  local_b8 = 0;
  local_b0 = 0;
  if (local_118 != (IUnknown *)0x0) {
    (*local_118->lpVtbl->Release)(local_118);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_130);
  if (-1 < HVar4) {
    HVar4 = OleRun(local_130);
    if (-1 < HVar4) {
      HVar4 = (*local_130->lpVtbl->QueryInterface)(local_130,(IID *)&DAT_140281f68,&local_118);
    }
    (*local_130->lpVtbl->Release)(local_130);
    if (-1 < HVar4) goto LAB_1400d1f39;
  }
  local_118 = (IUnknown *)0x0;
LAB_1400d1f39:
  local_c8 = 2;
  local_108 = 1;
  local_res20[0] = CONCAT31(local_res20[0]._1_3_,1);
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,local_128);
  FUN_140001710(&local_140,*puVar6,"dbo.up_read_pc_room_point");
  if (local_128[0] != (longlong *)0x0) {
    (**(code **)(*local_128[0] + 0x10))();
  }
  local_138 = local_90;
  local_68 = *(undefined4 *)(param_2 + 0xe);
  uStack_64 = *(undefined4 *)(param_2 + 0x12);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140061f30(local_90,&local_68);
  plVar8 = operator_new(0x18);
  local_98 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("auth_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_128[0] = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_140,local_50,local_128,0xca,1,0x26,uVar7);
  local_98 = plVar10;
  if (local_140 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_140,&local_138);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_138 != (longlong *)0x0) {
      (**(code **)(*local_138 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_140,&local_138);
    This = local_118;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_118 != pIVar1) {
      local_118 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_138 != (longlong *)0x0) {
      (**(code **)(*local_138 + 0x10))();
    }
    pIVar1 = local_118;
    if (local_118 != (IUnknown *)0x0) {
      UVar2 = (*local_118->lpVtbl[6].Release)(local_118);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
      }
      uVar7 = FUN_140002290(&local_118,local_90,"pc_room_point",local_res20);
      FUN_140182560(uVar7);
      uVar5 = FUN_140062550(uVar7);
      *(undefined4 *)(param_3 + 0xe) = uVar5;
      Ordinal_9(local_90);
      pIVar1 = local_118;
      bVar11 = (char)local_res20[0] == '\0';
      if (bVar11) {
        *(undefined2 *)(param_3 + 0xc) = 1;
      }
      if (local_118 != (IUnknown *)0x0) {
        UVar2 = (*local_118->lpVtbl[0x12].AddRef)(local_118);
        if ((int)UVar2 < 0) {
          _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
        }
        if (local_118 != (IUnknown *)0x0) {
          (*local_118->lpVtbl->Release)(local_118);
          local_118 = (IUnknown *)0x0;
        }
      }
      local_b0 = 0;
      local_a8 = &DAT_140281f00;
      local_c0 = &DAT_140281f00;
      local_b8 = 0;
      local_c8 = 0;
      Ordinal_9(local_e0);
      Ordinal_9(local_f8);
      if (local_110 != (longlong *)0x0) {
        (**(code **)(*local_110 + 0x10))();
      }
      if (local_118 != (IUnknown *)0x0) {
        (*local_118->lpVtbl->Release)(local_118);
      }
      if (local_140 != (longlong *)0x0) {
        (**(code **)(*local_140 + 0x10))();
      }
      return !bVar11;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400d27fe)
// WARNING: Removing unreachable block (ram,0x0001400d2808)
// WARNING: Removing unreachable block (ram,0x0001400d2813)
// WARNING: Removing unreachable block (ram,0x0001400d2823)

undefined8 FUN_1400d22f0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  int local_res18;
  undefined4 uStackX_1c;
  longlong *local_res20;
  longlong *local_128;
  longlong *local_120;
  longlong *local_118;
  longlong *local_110;
  IUnknown *local_108;
  longlong *local_100;
  undefined4 local_f8;
  undefined1 local_e8 [24];
  undefined1 local_d0 [24];
  undefined4 local_b8;
  undefined1 *local_b0;
  undefined4 local_a8;
  undefined8 local_a0;
  undefined1 *local_98;
  longlong local_88 [4];
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_1400d2367:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return 0;
    }
  }
  else {
    local_res18 = 0;
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_res18 == 0) goto LAB_1400d2367;
  }
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_108 = (IUnknown *)0x0;
  local_100 = (longlong *)0x0;
  Ordinal_8(local_e8);
  Ordinal_8(local_d0);
  pIVar2 = local_108;
  if ((local_108 != (IUnknown *)0x0) && (local_108 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_98 = &DAT_140281f00;
  local_b0 = &DAT_140281f00;
  local_a8 = 0;
  local_a0 = 0;
  if (local_108 != (IUnknown *)0x0) {
    (*local_108->lpVtbl->Release)(local_108);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           (LPVOID *)&local_res18);
  if (-1 < HVar5) {
    HVar5 = OleRun((LPUNKNOWN)CONCAT44(uStackX_1c,local_res18));
    if (-1 < HVar5) {
      HVar5 = (*(code *)**(undefined8 **)CONCAT44(uStackX_1c,local_res18))
                        ((undefined8 *)CONCAT44(uStackX_1c,local_res18),&DAT_140281f68,&local_108);
    }
    (**(code **)(*(longlong *)CONCAT44(uStackX_1c,local_res18) + 0x10))();
    if (-1 < HVar5) goto LAB_1400d24a2;
  }
  local_108 = (IUnknown *)0x0;
LAB_1400d24a2:
  local_b8 = 2;
  local_f8 = 1;
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_120);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_save_pc_room_point");
  if (local_120 != (longlong *)0x0) {
    (**(code **)(*local_120 + 0x10))();
  }
  local_128 = local_88;
  local_68 = *(undefined4 *)(param_2 + 0xe);
  uStack_64 = *(undefined4 *)(param_2 + 0x12);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140061f30(local_88,&local_68);
  plVar8 = operator_new(0x18);
  local_120 = plVar10;
  local_110 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("auth_id");
    *plVar8 = lVar9;
    local_120 = plVar8;
  }
  if (local_120 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_118,&local_120,0xca,1,0x26,uVar7);
  local_110 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_128);
  pIVar2 = (IUnknown *)*puVar6;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_128 != (longlong *)0x0) {
      (**(code **)(*local_128 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_118 = local_88;
    uVar1 = *(undefined4 *)(param_2 + 0x1e);
    Ordinal_8(local_88);
    FUN_140062080(local_88,uVar1);
    plVar8 = operator_new(0x18);
    local_110 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("pc_room_point");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_128 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_128,3,1,4,local_88);
    local_118 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_120);
    pIVar2 = (IUnknown *)*puVar6;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_120 != (longlong *)0x0) {
        (**(code **)(*local_120 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      puVar6 = (undefined8 *)FUN_1400016d0(&local_res20,&local_128);
      This = local_108;
      pIVar2 = (IUnknown *)*puVar6;
      if (local_108 != pIVar2) {
        local_108 = pIVar2;
        if (pIVar2 != (IUnknown *)0x0) {
          (*pIVar2->lpVtbl->AddRef)(pIVar2);
        }
        if (This != (IUnknown *)0x0) {
          (*This->lpVtbl->Release)(This);
        }
      }
      if (local_128 != (longlong *)0x0) {
        (**(code **)(*local_128 + 0x10))();
      }
      pIVar2 = local_108;
      if (local_108 != (IUnknown *)0x0) {
        UVar3 = (*local_108->lpVtbl[0x12].AddRef)(local_108);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f28);
        }
        if (local_108 != (IUnknown *)0x0) {
          (*local_108->lpVtbl->Release)(local_108);
          local_108 = (IUnknown *)0x0;
        }
      }
      local_a0 = 0;
      local_98 = &DAT_140281f00;
      local_b0 = &DAT_140281f00;
      local_a8 = 0;
      local_b8 = 0;
      Ordinal_9(local_d0);
      Ordinal_9(local_e8);
      if (local_100 != (longlong *)0x0) {
        (**(code **)(*local_100 + 0x10))();
      }
      if (local_108 != (IUnknown *)0x0) {
        (*local_108->lpVtbl->Release)(local_108);
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400d28e0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong local_78;
  undefined1 local_70;
  longlong *local_60;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400d2976;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400d2976:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_event_pvpladder");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = &local_78;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_58);
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_60 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = &local_78;
  uVar1 = *(undefined1 *)(param_2 + 0x1e);
  Ordinal_8(&local_78);
  if ((short)local_78 != 0x11) {
    iVar4 = Ordinal_9(&local_78);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_78._0_2_ = 0x11;
  }
  local_70 = uVar1;
  plVar7 = operator_new(0x18);
  local_60 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("pvpladder");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 != (longlong *)0x0) {
    plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,&local_78);
    local_80 = plVar7;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar7 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar7 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1400d2ca0(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 *puVar1;
  short sVar2;
  IUnknown *pIVar3;
  undefined6 uVar4;
  IUnknown *This;
  undefined1 uVar5;
  ULONG UVar6;
  int iVar7;
  HRESULT HVar8;
  undefined4 uVar9;
  undefined8 *puVar10;
  wchar_t *pwVar11;
  longlong lVar12;
  longlong *plVar13;
  undefined8 uVar14;
  undefined8 uVar15;
  char *riid;
  wchar_t *pwVar16;
  char *ppvObject;
  short sVar17;
  wchar_t *pwVar18;
  uint uVar19;
  undefined1 auStackY_328 [32];
  undefined1 local_2e8 [4];
  uint local_2e4;
  short local_2e0;
  short local_2dc;
  longlong *local_2d8;
  undefined8 local_2d0;
  undefined4 local_2c8;
  undefined2 uStack_2c4;
  undefined2 uStack_2c2;
  ushort local_2c0;
  int local_2b8;
  undefined8 *local_2b0;
  wchar_t *local_2a8;
  wchar_t *local_2a0;
  LPUNKNOWN local_298;
  wchar_t *local_290;
  longlong *local_288;
  undefined8 *local_280;
  IUnknown *local_278;
  longlong *local_270;
  undefined4 local_268;
  undefined1 local_258 [24];
  undefined1 local_240 [24];
  undefined4 local_228;
  undefined1 *local_220;
  undefined4 local_218;
  undefined8 local_210;
  undefined1 *local_208;
  undefined4 local_1f8;
  undefined4 local_1f4;
  undefined4 local_1f0;
  undefined4 local_1ec;
  longlong *local_1e8;
  undefined8 local_1e0;
  undefined1 local_1d8;
  wchar_t *local_1d0;
  undefined8 local_1c8;
  undefined1 local_1c0;
  undefined8 local_1b8;
  undefined1 local_1b0;
  wchar_t *local_1a8;
  longlong *local_1a0;
  undefined8 local_198;
  undefined1 local_190;
  wchar_t local_188 [12];
  longlong local_170 [3];
  undefined1 local_158 [24];
  undefined8 local_140;
  undefined1 local_138 [24];
  undefined1 local_120 [24];
  undefined1 local_108 [24];
  IID local_f0;
  undefined1 local_d8 [24];
  undefined1 local_c0 [24];
  undefined1 local_a8 [32];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined4 uStack_68;
  undefined8 uStack_64;
  undefined8 uStack_5c;
  undefined8 uStack_54;
  undefined4 local_4c;
  undefined1 uStack_48;
  ulonglong local_38;
  
  local_140 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_328;
  local_2c8 = *(undefined4 *)(param_2 + 1);
  local_2d0._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_2d0._0_4_ = CONCAT22(0x2449,(short)*param_2);
  uStack_2c4 = 1;
  uStack_2c2 = *(undefined2 *)(param_2 + 2);
  pwVar18 = (wchar_t *)0x0;
  sVar17 = 0;
  pwVar16 = (wchar_t *)0x0;
  local_2c0 = 0;
  uVar19 = 0x12;
  local_2e4 = 0x12;
  pIVar3 = *(IUnknown **)*param_1;
  local_2b0 = param_1;
  local_280 = param_2;
  if (pIVar3 == (IUnknown *)0x0) {
LAB_1400d2d7b:
    iVar7 = FUN_1400a1e90(param_1);
    if (iVar7 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return 0;
    }
  }
  else {
    local_2b8 = 0;
    UVar6 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if (local_2b8 == 0) goto LAB_1400d2d7b;
  }
  local_2d8 = (longlong *)0x0;
  iVar7 = FUN_140001970(&local_2d8);
  if ((iVar7 < 0) && (iVar7 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar7);
  }
  local_278 = (IUnknown *)0x0;
  local_270 = (longlong *)0x0;
  Ordinal_8(local_258);
  Ordinal_8(local_240);
  pIVar3 = local_278;
  if ((local_278 != (IUnknown *)0x0) && (local_278 = (IUnknown *)0x0, pIVar3 != (IUnknown *)0x0)) {
    (*pIVar3->lpVtbl->Release)(pIVar3);
  }
  local_208 = &DAT_140281f00;
  local_220 = &DAT_140281f00;
  local_218 = 0;
  local_210 = 0;
  if (local_278 != (IUnknown *)0x0) {
    (*local_278->lpVtbl->Release)(local_278);
  }
  HVar8 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_298);
  if (-1 < HVar8) {
    HVar8 = OleRun(local_298);
    if (-1 < HVar8) {
      HVar8 = (*local_298->lpVtbl->QueryInterface)(local_298,(IID *)&DAT_140281f68,&local_278);
    }
    (*local_298->lpVtbl->Release)(local_298);
    if (-1 < HVar8) goto LAB_1400d2ec6;
  }
  local_278 = (IUnknown *)0x0;
LAB_1400d2ec6:
  local_228 = 2;
  local_268 = 1;
  local_2e8[0] = 1;
  puVar10 = (undefined8 *)FUN_140001f20(*param_1,&local_1a0);
  FUN_140001710(&local_2d8,*puVar10,"dbo.up_read_reward");
  if (local_1a0 != (longlong *)0x0) {
    (**(code **)(*local_1a0 + 0x10))();
  }
  local_2a8 = local_188;
  sVar2 = *(short *)(param_2 + 2);
  Ordinal_8(local_188);
  FUN_140062080(local_188,(int)sVar2);
  pwVar11 = operator_new(0x18);
  local_1d0 = pwVar18;
  local_290 = pwVar11;
  if (pwVar11 != (wchar_t *)0x0) {
    pwVar11[4] = L'\0';
    pwVar11[5] = L'\0';
    pwVar11[6] = L'\0';
    pwVar11[7] = L'\0';
    pwVar11[8] = L'\x01';
    pwVar11[9] = L'\0';
    lVar12 = FUN_140201490(&DAT_14028e384);
    *(longlong *)pwVar11 = lVar12;
    local_1d0 = pwVar11;
  }
  if (local_1d0 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar11 = (wchar_t *)FUN_140001880(&local_2d8,&local_288,&local_1d0,3);
  local_2a8 = pwVar11;
  if (local_2d8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar10 = (undefined8 *)FUN_140001660(local_2d8,&local_1e8);
  pIVar3 = (IUnknown *)*puVar10;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar6 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_1e8 != (longlong *)0x0) {
      (**(code **)(*local_1e8 + 0x10))();
    }
    if (*(longlong **)pwVar11 != (longlong *)0x0) {
      (**(code **)(**(longlong **)pwVar11 + 0x10))();
    }
    local_288 = local_170;
    sVar2 = *(short *)((longlong)param_2 + 0xe);
    Ordinal_8(local_170);
    FUN_140062080(local_170,(int)sVar2);
    pwVar11 = operator_new(0x18);
    local_1a8 = pwVar18;
    local_2a8 = pwVar11;
    if (pwVar11 != (wchar_t *)0x0) {
      pwVar11[4] = L'\0';
      pwVar11[5] = L'\0';
      pwVar11[6] = L'\0';
      pwVar11[7] = L'\0';
      pwVar11[8] = L'\x01';
      pwVar11[9] = L'\0';
      lVar12 = FUN_140201490("grade");
      *(longlong *)pwVar11 = lVar12;
      local_1a8 = pwVar11;
    }
    if (local_1a8 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar13 = (longlong *)FUN_140001880(&local_2d8,local_158,&local_1a8,3);
    local_288 = plVar13;
    if (local_2d8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar10 = (undefined8 *)FUN_140001660(local_2d8,&local_290);
    pIVar3 = (IUnknown *)*puVar10;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar6 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_290 != (wchar_t *)0x0) {
        (**(code **)(*(longlong *)local_290 + 0x10))();
      }
      if ((longlong *)*plVar13 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar13 + 0x10))();
      }
      puVar10 = (undefined8 *)FUN_1400016d0(&local_2d8,&local_2a8);
      This = local_278;
      pIVar3 = (IUnknown *)*puVar10;
      if (local_278 != pIVar3) {
        local_278 = pIVar3;
        if (pIVar3 != (IUnknown *)0x0) {
          (*pIVar3->lpVtbl->AddRef)(pIVar3);
        }
        if (This != (IUnknown *)0x0) {
          (*This->lpVtbl->Release)(This);
        }
      }
      if (local_2a8 != (wchar_t *)0x0) {
        (**(code **)(*(longlong *)local_2a8 + 0x10))();
      }
      pIVar3 = local_278;
      if (local_278 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_2dc = 0;
      UVar6 = (*local_278->lpVtbl[6].Release)(local_278);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
      }
      if (local_2dc != -1) {
        while( true ) {
          pIVar3 = local_278;
          sVar17 = (short)pwVar16;
          if (local_278 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          local_2e0 = 0;
          UVar6 = (*local_278->lpVtbl[6].Release)(local_278);
          if ((int)UVar6 < 0) {
            _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
          }
          if (local_2e0 == -1) break;
          local_88 = 0;
          uStack_84 = 0;
          uStack_80 = 0;
          uStack_7c = 0;
          local_78 = 0;
          uStack_54 = 0;
          local_4c = 0;
          uStack_48 = 0;
          uStack_74 = 0;
          uStack_70 = 0;
          uStack_6c = 0;
          uStack_68 = 0;
          uStack_64 = 0;
          uStack_5c = 0;
          uVar14 = FUN_140002290(&local_278,local_a8,"character_name",local_2e8);
          FUN_140062840(uVar14,&local_2a0);
          FUN_1401568c0();
          pwVar16 = (wchar_t *)PTR_DAT_1403200a0;
          if (PTR_DAT_1403200a0 == (undefined *)0x0) {
            pwVar16 = pwVar18;
          }
          if (local_2a0 != (wchar_t *)PTR_DAT_1403200a0) {
            uVar14 = FUN_1401568c0();
            local_190 = 0;
            local_198 = uVar14;
            FUN_140156b50(uVar14);
            local_190 = 1;
            if (((pwVar16 != (wchar_t *)0x0) && (pwVar16 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar16 + -4 != (wchar_t *)0x0)) {
              uVar15 = FUN_1401568c0();
              local_1b0 = 0;
              local_1b8 = uVar15;
              FUN_140156b50(uVar15);
              local_1b0 = 1;
              pwVar11 = pwVar16 + -2;
              *(int *)pwVar11 = *(int *)pwVar11 + -1;
              if (*(int *)pwVar11 == 0) {
                FUN_140156970(pwVar16 + -4);
              }
              FUN_140156be0(uVar15);
              local_1b0 = 0;
            }
            pwVar16 = local_2a0;
            if (((local_2a0 != (wchar_t *)PTR_DAT_1403200a0) && (local_2a0 != (wchar_t *)0x0)) &&
               (local_2a0 != (wchar_t *)0x8)) {
              *(int *)(local_2a0 + -2) = *(int *)(local_2a0 + -2) + 1;
            }
            FUN_140156be0(uVar14);
            local_190 = 0;
          }
          pwVar11 = pwVar16;
          if (pwVar16 == (wchar_t *)0x0) {
            pwVar11 = (wchar_t *)PTR_DAT_1403200a0;
          }
          wcsncpy((wchar_t *)&uStack_74,pwVar11,0xf);
          if (((pwVar16 != (wchar_t *)0x0) && (pwVar16 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar16 + -4 != (wchar_t *)0x0)) {
            uVar14 = FUN_1401568c0();
            local_1d8 = 0;
            local_1e0 = uVar14;
            FUN_140156b50(uVar14);
            local_1d8 = 1;
            pwVar11 = pwVar16 + -2;
            *(int *)pwVar11 = *(int *)pwVar11 + -1;
            if (*(int *)pwVar11 == 0) {
              FUN_140156970(pwVar16 + -4);
            }
            FUN_140156be0(uVar14);
            local_1d8 = 0;
          }
          pwVar16 = local_2a0;
          if (((local_2a0 != (wchar_t *)0x0) && (local_2a0 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar11 = local_2a0 + -4, pwVar11 != (wchar_t *)0x0)) {
            uVar14 = FUN_1401568c0();
            local_1c0 = 0;
            local_1c8 = uVar14;
            FUN_140156b50(uVar14);
            local_1c0 = 1;
            pwVar16 = pwVar16 + -2;
            *(int *)pwVar16 = *(int *)pwVar16 + -1;
            if (*(int *)pwVar16 == 0) {
              FUN_140156970(pwVar11);
            }
            FUN_140156be0(uVar14);
            local_1c0 = 0;
          }
          local_2a0 = (wchar_t *)PTR_DAT_1403200a0;
          Ordinal_9(local_a8);
          uStack_5c = uStack_5c & 0xffffffffffff;
          uVar14 = FUN_140002290(&local_278,local_c0,"reward_type",local_2e8);
          FUN_140182560(uVar14);
          local_88 = FUN_140062550(uVar14);
          Ordinal_9(local_c0);
          uVar14 = FUN_140002290(&local_278,local_108,"character_id",local_2e8);
          FUN_1400625d0(uVar14,&local_1f8);
          uStack_84 = local_1f8;
          uStack_80 = local_1f4;
          uStack_7c = local_1f0;
          local_78 = local_1ec;
          Ordinal_9(local_108);
          uVar14 = FUN_140002290(&local_278,local_138,"reward_code",local_2e8);
          FUN_140182560(uVar14);
          uVar9 = FUN_140062550(uVar14);
          uStack_54 = CONCAT44(uStack_54._4_4_,uVar9);
          Ordinal_9(local_138);
          uVar14 = FUN_140002290(&local_278,local_d8,"reward_count",local_2e8);
          FUN_140182560(uVar14);
          uVar9 = FUN_140062550(uVar14);
          uStack_54 = CONCAT44(uVar9,(undefined4)uStack_54);
          Ordinal_9(local_d8);
          uVar14 = FUN_140002290(&local_278,local_120,"reward_grade",local_2e8);
          FUN_140182560(uVar14);
          uVar9 = FUN_140062550(uVar14);
          local_4c._1_3_ = (undefined3)uVar9;
          uStack_48 = (undefined1)((uint)uVar9 >> 0x18);
          Ordinal_9(local_120);
          ppvObject = "reward";
          riid = (char *)&local_f0;
          uVar14 = FUN_140002290(&local_278,riid,"reward",local_2e8);
          FUN_140182560(uVar14);
          uVar5 = FUN_1400d6de0(uVar14);
          local_4c = CONCAT31(local_4c._1_3_,uVar5);
          Ordinal_9(&local_f0);
          lVar12 = (longlong)(int)uVar19;
          puVar10 = (undefined8 *)(lVar12 + 0x130 + (longlong)param_1);
          *puVar10 = CONCAT44(uStack_84,local_88);
          puVar10[1] = CONCAT44(uStack_7c,uStack_80);
          puVar10 = (undefined8 *)(lVar12 + 0x140 + (longlong)param_1);
          *puVar10 = CONCAT44(uStack_74,local_78);
          puVar10[1] = CONCAT44(uStack_6c,uStack_70);
          puVar1 = (undefined4 *)(lVar12 + 0x150 + (longlong)param_1);
          *puVar1 = uStack_68;
          puVar1[1] = (undefined4)uStack_64;
          puVar1[2] = uStack_64._4_4_;
          puVar1[3] = (undefined4)uStack_5c;
          puVar1 = (undefined4 *)(lVar12 + 0x160 + (longlong)param_1);
          *puVar1 = uStack_5c._4_4_;
          puVar1[1] = (undefined4)uStack_54;
          puVar1[2] = uStack_54._4_4_;
          puVar1[3] = local_4c;
          *(undefined1 *)(lVar12 + 0x170 + (longlong)param_1) = uStack_48;
          local_2e4 = uVar19 + 0x41;
          local_2c0 = sVar17 + 1;
          pwVar16 = (wchar_t *)(ulonglong)local_2c0;
          if (50000 < local_2e4) {
            uVar4 = local_2d0._2_6_;
            local_2d0 = CONCAT62(local_2d0._2_6_,(short)local_2e4);
            uVar14 = local_2d0;
            riid = (char *)(param_1 + 0x26);
            local_2d0._4_2_ = SUB62(uVar4,2);
            local_2d0._6_2_ = SUB62(uVar4,4);
            ((IID *)riid)->Data1 = (undefined4)local_2d0;
            ((IID *)riid)->Data2 = local_2d0._4_2_;
            ((IID *)riid)->Data3 = local_2d0._6_2_;
            param_1[0x27] = CONCAT26(uStack_2c2,CONCAT24(uStack_2c4,local_2c8));
            *(ushort *)(param_1 + 0x28) = local_2c0;
            local_2d0 = uVar14;
            iVar7 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
            if (iVar7 == 0) {
              ppvObject = "DB Result Queue push error";
              riid = "DBResultQueue_Error.Log";
              FUN_1400a0b40(param_1[0x23]);
            }
            local_2e4 = 0x12;
            local_2c0 = 0;
            pwVar16 = pwVar18;
          }
          pIVar3 = local_278;
          uVar19 = local_2e4;
          if (local_278 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          HVar8 = (*local_278->lpVtbl[0xc].QueryInterface)(local_278,(IID *)riid,(void **)ppvObject)
          ;
          if (HVar8 < 0) {
            _com_issue_errorex(HVar8,pIVar3,(_GUID *)&DAT_140281f28);
          }
        }
      }
      local_2d0 = CONCAT62(local_2d0._2_6_,(short)uVar19);
      param_1[0x26] = local_2d0;
      param_1[0x27] = CONCAT26(uStack_2c2,CONCAT24(uStack_2c4,local_2c8));
      *(short *)(param_1 + 0x28) = sVar17;
      iVar7 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar7 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar3 = local_278;
      if (local_278 != (IUnknown *)0x0) {
        local_2e4 = 0;
        UVar6 = (*local_278->lpVtbl[0x12].AddRef)(local_278);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
        }
        pIVar3 = local_278;
        if (local_2e4 != 0) {
          if (local_278 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar6 = (*local_278->lpVtbl[10].Release)(local_278);
          if ((int)UVar6 < 0) {
            _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_278 != (IUnknown *)0x0) {
          (*local_278->lpVtbl->Release)(local_278);
          local_278 = (IUnknown *)0x0;
        }
      }
      local_210 = 0;
      local_208 = &DAT_140281f00;
      local_220 = &DAT_140281f00;
      local_218 = 0;
      local_228 = 0;
      Ordinal_9(local_240);
      Ordinal_9(local_258);
      if (local_270 != (longlong *)0x0) {
        (**(code **)(*local_270 + 0x10))();
      }
      if (local_278 != (IUnknown *)0x0) {
        (*local_278->lpVtbl->Release)(local_278);
      }
      if (local_2d8 != (longlong *)0x0) {
        (**(code **)(*local_2d8 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1400d3a10(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  HRESULT HVar6;
  undefined8 *puVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  undefined4 *puVar11;
  longlong *plVar12;
  undefined1 auStackY_1a8 [32];
  longlong *local_168;
  longlong *local_160;
  longlong *local_158;
  longlong *local_150;
  int local_148;
  undefined4 uStack_144;
  longlong *local_140;
  longlong *local_138;
  undefined8 *local_130;
  longlong local_128;
  IUnknown *local_118;
  longlong *local_110;
  undefined4 local_108;
  undefined1 local_f8 [24];
  undefined1 local_e0 [24];
  undefined4 local_c8;
  undefined1 *local_c0;
  undefined4 local_b8;
  undefined8 local_b0;
  undefined1 *local_a8;
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_70;
  longlong local_68 [3];
  longlong local_50 [3];
  ulonglong local_38;
  
  local_70 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_1a8;
  pIVar3 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  local_130 = param_1;
  local_128 = param_2;
  if (pIVar3 == (IUnknown *)0x0) {
LAB_1400d3aa1:
    iVar5 = FUN_1400a1e90(param_1);
    if (iVar5 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return 0;
    }
  }
  else {
    local_148 = 0;
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if (local_148 == 0) goto LAB_1400d3aa1;
  }
  local_168 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_168);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_118 = (IUnknown *)0x0;
  local_110 = (longlong *)0x0;
  Ordinal_8(local_f8);
  Ordinal_8(local_e0);
  pIVar3 = local_118;
  if ((local_118 != (IUnknown *)0x0) && (local_118 = (IUnknown *)0x0, pIVar3 != (IUnknown *)0x0)) {
    (*pIVar3->lpVtbl->Release)(pIVar3);
  }
  local_a8 = &DAT_140281f00;
  local_c0 = &DAT_140281f00;
  local_b8 = 0;
  local_b0 = 0;
  if (local_118 != (IUnknown *)0x0) {
    (*local_118->lpVtbl->Release)(local_118);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           (LPVOID *)&local_148);
  if (-1 < HVar6) {
    HVar6 = OleRun((LPUNKNOWN)CONCAT44(uStack_144,local_148));
    if (-1 < HVar6) {
      HVar6 = (*(code *)**(undefined8 **)CONCAT44(uStack_144,local_148))
                        ((undefined8 *)CONCAT44(uStack_144,local_148),&DAT_140281f68,&local_118);
    }
    (**(code **)(*(longlong *)CONCAT44(uStack_144,local_148) + 0x10))();
    if (-1 < HVar6) goto LAB_1400d3bdf;
  }
  local_118 = (IUnknown *)0x0;
LAB_1400d3bdf:
  local_c8 = 2;
  local_108 = 1;
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_158);
  FUN_140001710(&local_168,*puVar7,"dbo.up_insert_reward_item");
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  local_160 = local_50;
  sVar1 = *(short *)(param_2 + 0xe);
  Ordinal_8(local_50);
  FUN_140062080(local_50,(int)sVar1);
  plVar8 = operator_new(0x18);
  local_158 = plVar12;
  local_140 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490(&DAT_14028e384);
    *plVar8 = lVar9;
    local_158 = plVar8;
  }
  if (local_158 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_168,&local_138,&local_158,3);
  local_140 = plVar8;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_168,&local_160);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_160 != (longlong *)0x0) {
    (**(code **)(*local_160 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_138 = local_50;
  sVar1 = *(short *)(param_2 + 0x10);
  Ordinal_8(local_50);
  FUN_140062080(local_50,(int)sVar1);
  plVar10 = operator_new(0x18);
  plVar8 = plVar12;
  local_140 = plVar10;
  if (plVar10 != (longlong *)0x0) {
    plVar10[1] = 0;
    *(undefined4 *)(plVar10 + 2) = 1;
    lVar9 = FUN_140201490("grade");
    *plVar10 = lVar9;
    plVar8 = plVar10;
  }
  local_160 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_168,&local_150,&local_160,3);
  local_138 = plVar8;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_168,&local_158);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_150 = local_50;
  FUN_1400623f0(local_50,param_2 + 0x42);
  plVar10 = operator_new(0x18);
  plVar8 = plVar12;
  local_138 = plVar10;
  if (plVar10 != (longlong *)0x0) {
    plVar10[1] = 0;
    *(undefined4 *)(plVar10 + 2) = 1;
    lVar9 = FUN_140201490("sender_name");
    *plVar10 = lVar9;
    plVar8 = plVar10;
  }
  local_160 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_168,&local_140,&local_160,0xca);
  local_150 = plVar8;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_168,&local_158);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_150 = local_50;
  FUN_1400623f0(local_50,param_2 + 0x22);
  plVar10 = operator_new(0x18);
  plVar8 = plVar12;
  local_138 = plVar10;
  if (plVar10 != (longlong *)0x0) {
    plVar10[1] = 0;
    *(undefined4 *)(plVar10 + 2) = 1;
    lVar9 = FUN_140201490("recver_name");
    *plVar10 = lVar9;
    plVar8 = plVar10;
  }
  local_160 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_168,&local_140,&local_160,0xca);
  local_150 = plVar8;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_168,&local_158);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_150 = local_50;
  FUN_1400623f0(local_50,param_2 + 0x62);
  plVar10 = operator_new(0x18);
  plVar8 = plVar12;
  local_138 = plVar10;
  if (plVar10 != (longlong *)0x0) {
    plVar10[1] = 0;
    *(undefined4 *)(plVar10 + 2) = 1;
    lVar9 = FUN_140201490(&DAT_14028984c);
    *plVar10 = lVar9;
    plVar8 = plVar10;
  }
  local_160 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_168,&local_140,&local_160,0xca);
  local_150 = plVar8;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_168,&local_158);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_150 = local_50;
  uVar2 = *(undefined4 *)(param_2 + 0x1a);
  Ordinal_8(local_50);
  FUN_140062080(local_50,uVar2);
  plVar10 = operator_new(0x18);
  plVar8 = plVar12;
  local_138 = plVar10;
  if (plVar10 != (longlong *)0x0) {
    plVar10[1] = 0;
    *(undefined4 *)(plVar10 + 2) = 1;
    lVar9 = FUN_140201490("money");
    *plVar10 = lVar9;
    plVar8 = plVar10;
  }
  local_160 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_168,&local_140,&local_160,3);
  local_150 = plVar8;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_168,&local_158);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_150 = local_50;
  uVar2 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(local_50);
  FUN_140062080(local_50,uVar2);
  plVar10 = operator_new(0x18);
  plVar8 = plVar12;
  local_138 = plVar10;
  if (plVar10 != (longlong *)0x0) {
    plVar10[1] = 0;
    *(undefined4 *)(plVar10 + 2) = 1;
    lVar9 = FUN_140201490("return_day");
    *plVar10 = lVar9;
    plVar8 = plVar10;
  }
  local_160 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_168,&local_140,&local_160,3);
  local_150 = plVar8;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_168,&local_158);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_158 != (longlong *)0x0) {
      (**(code **)(*local_158 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_150 = local_50;
    uVar2 = *(undefined4 *)(param_2 + 0x1e);
    Ordinal_8(local_50);
    FUN_140062080(local_50,uVar2);
    plVar10 = operator_new(0x18);
    plVar8 = plVar12;
    local_138 = plVar10;
    if (plVar10 != (longlong *)0x0) {
      plVar10[1] = 0;
      *(undefined4 *)(plVar10 + 2) = 1;
      lVar9 = FUN_140201490("req_money");
      *plVar10 = lVar9;
      plVar8 = plVar10;
    }
    local_160 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_168,&local_140,&local_160,3);
    local_150 = plVar8;
    if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_168,&local_158);
    pIVar3 = (IUnknown *)*puVar7;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_158 != (longlong *)0x0) {
      (**(code **)(*local_158 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_150 = local_68;
    puVar11 = (undefined4 *)FUN_140182810(local_50);
    local_88 = *puVar11;
    uStack_84 = puVar11[1];
    uStack_80 = puVar11[2];
    uStack_7c = puVar11[3];
    FUN_140061f30(local_68,&local_88);
    plVar10 = operator_new(0x18);
    plVar8 = plVar12;
    local_138 = plVar10;
    if (plVar10 != (longlong *)0x0) {
      plVar10[1] = 0;
      *(undefined4 *)(plVar10 + 2) = 1;
      lVar9 = FUN_140201490("NewMailID");
      *plVar10 = lVar9;
      plVar8 = plVar10;
    }
    local_160 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_168,&local_140,&local_160,0xca);
    local_150 = plVar8;
    if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_168,&local_158);
    pIVar3 = (IUnknown *)*puVar7;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_158 != (longlong *)0x0) {
      (**(code **)(*local_158 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_150 = local_50;
    sVar1 = *(short *)(param_2 + 0x16);
    Ordinal_8(local_50);
    FUN_140062080(local_50,(int)sVar1);
    plVar10 = operator_new(0x18);
    plVar8 = plVar12;
    local_138 = plVar10;
    if (plVar10 != (longlong *)0x0) {
      plVar10[1] = 0;
      *(undefined4 *)(plVar10 + 2) = 1;
      lVar9 = FUN_140201490("createType");
      *plVar10 = lVar9;
      plVar8 = plVar10;
    }
    local_160 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_168,&local_140,&local_160,3);
    local_150 = plVar8;
    if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_168,&local_158);
    pIVar3 = (IUnknown *)*puVar7;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_158 != (longlong *)0x0) {
        (**(code **)(*local_158 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_150 = local_50;
      uVar2 = *(undefined4 *)(param_2 + 0x336);
      Ordinal_8(local_50);
      FUN_140062080(local_50,uVar2);
      plVar10 = operator_new(0x18);
      plVar8 = plVar12;
      local_138 = plVar10;
      if (plVar10 != (longlong *)0x0) {
        plVar10[1] = 0;
        *(undefined4 *)(plVar10 + 2) = 1;
        lVar9 = FUN_140201490(&DAT_14028931c);
        *plVar10 = lVar9;
        plVar8 = plVar10;
      }
      local_160 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_168,&local_140,&local_160,3);
      local_150 = plVar8;
      if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_168,&local_158);
      pIVar3 = (IUnknown *)*puVar7;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_158 != (longlong *)0x0) {
        (**(code **)(*local_158 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_150 = local_50;
      sVar1 = *(short *)(param_2 + 0x18);
      Ordinal_8(local_50);
      FUN_140062080(local_50,(int)sVar1);
      plVar8 = operator_new(0x18);
      local_138 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar9 = FUN_140201490("gcode");
        *plVar8 = lVar9;
        plVar12 = plVar8;
      }
      local_160 = plVar12;
      if (plVar12 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar12 = (longlong *)FUN_140001880(&local_168,&local_140,&local_160,3);
      local_150 = plVar12;
      if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_168,&local_158);
      pIVar3 = (IUnknown *)*puVar7;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_158 != (longlong *)0x0) {
          (**(code **)(*local_158 + 0x10))();
        }
        if ((longlong *)*plVar12 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar12 + 0x10))();
        }
        FUN_1400a2c10(&local_168,param_2 + 0x31e);
        FUN_1400016d0(&local_168,&local_160);
        if (local_160 != (longlong *)0x0) {
          (**(code **)(*local_160 + 0x10))();
        }
        pIVar3 = local_118;
        if (local_118 != (IUnknown *)0x0) {
          local_148 = 0;
          UVar4 = (*local_118->lpVtbl[0x12].AddRef)(local_118);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f28);
          }
          pIVar3 = local_118;
          if (local_148 != 0) {
            if (local_118 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            UVar4 = (*local_118->lpVtbl[10].Release)(local_118);
            if ((int)UVar4 < 0) {
              _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f28);
            }
          }
          if (local_118 != (IUnknown *)0x0) {
            (*local_118->lpVtbl->Release)(local_118);
            local_118 = (IUnknown *)0x0;
          }
        }
        local_b0 = 0;
        local_a8 = &DAT_140281f00;
        local_c0 = &DAT_140281f00;
        local_b8 = 0;
        local_c8 = 0;
        Ordinal_9(local_e0);
        Ordinal_9(local_f8);
        if (local_110 != (longlong *)0x0) {
          (**(code **)(*local_110 + 0x10))();
        }
        if (local_118 != (IUnknown *)0x0) {
          (*local_118->lpVtbl->Release)(local_118);
        }
        if (local_168 != (longlong *)0x0) {
          (**(code **)(*local_168 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400d505e)
// WARNING: Removing unreachable block (ram,0x0001400d5068)
// WARNING: Removing unreachable block (ram,0x0001400d5073)
// WARNING: Removing unreachable block (ram,0x0001400d5083)

undefined8 FUN_1400d4b50(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  int local_res18;
  undefined4 uStackX_1c;
  longlong *local_res20;
  longlong *local_128;
  longlong *local_120;
  longlong *local_118;
  longlong *local_110;
  IUnknown *local_108;
  longlong *local_100;
  undefined4 local_f8;
  undefined1 local_e8 [24];
  undefined1 local_d0 [24];
  undefined4 local_b8;
  undefined1 *local_b0;
  undefined4 local_a8;
  undefined8 local_a0;
  undefined1 *local_98;
  longlong local_88 [4];
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_1400d4bc7:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return 0;
    }
  }
  else {
    local_res18 = 0;
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_res18 == 0) goto LAB_1400d4bc7;
  }
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_108 = (IUnknown *)0x0;
  local_100 = (longlong *)0x0;
  Ordinal_8(local_e8);
  Ordinal_8(local_d0);
  pIVar2 = local_108;
  if ((local_108 != (IUnknown *)0x0) && (local_108 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_98 = &DAT_140281f00;
  local_b0 = &DAT_140281f00;
  local_a8 = 0;
  local_a0 = 0;
  if (local_108 != (IUnknown *)0x0) {
    (*local_108->lpVtbl->Release)(local_108);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           (LPVOID *)&local_res18);
  if (-1 < HVar5) {
    HVar5 = OleRun((LPUNKNOWN)CONCAT44(uStackX_1c,local_res18));
    if (-1 < HVar5) {
      HVar5 = (*(code *)**(undefined8 **)CONCAT44(uStackX_1c,local_res18))
                        ((undefined8 *)CONCAT44(uStackX_1c,local_res18),&DAT_140281f68,&local_108);
    }
    (**(code **)(*(longlong *)CONCAT44(uStackX_1c,local_res18) + 0x10))();
    if (-1 < HVar5) goto LAB_1400d4d02;
  }
  local_108 = (IUnknown *)0x0;
LAB_1400d4d02:
  local_b8 = 2;
  local_f8 = 1;
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_120);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_update_pcroom_remaintime");
  if (local_120 != (longlong *)0x0) {
    (**(code **)(*local_120 + 0x10))();
  }
  local_128 = local_88;
  local_68 = *(undefined4 *)(param_2 + 0xe);
  uStack_64 = *(undefined4 *)(param_2 + 0x12);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140061f30(local_88,&local_68);
  plVar8 = operator_new(0x18);
  local_120 = plVar10;
  local_110 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("auth_id");
    *plVar8 = lVar9;
    local_120 = plVar8;
  }
  if (local_120 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_118,&local_120,0xca,1,0x26,uVar7);
  local_110 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_128);
  pIVar2 = (IUnknown *)*puVar6;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_128 != (longlong *)0x0) {
      (**(code **)(*local_128 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_118 = local_88;
    uVar1 = *(undefined4 *)(param_2 + 0x1e);
    Ordinal_8(local_88);
    FUN_140062080(local_88,uVar1);
    plVar8 = operator_new(0x18);
    local_110 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490(&DAT_14028ea4c);
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_128 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_128,3,1,4,local_88);
    local_118 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_120);
    pIVar2 = (IUnknown *)*puVar6;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_120 != (longlong *)0x0) {
        (**(code **)(*local_120 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      puVar6 = (undefined8 *)FUN_1400016d0(&local_res20,&local_128);
      This = local_108;
      pIVar2 = (IUnknown *)*puVar6;
      if (local_108 != pIVar2) {
        local_108 = pIVar2;
        if (pIVar2 != (IUnknown *)0x0) {
          (*pIVar2->lpVtbl->AddRef)(pIVar2);
        }
        if (This != (IUnknown *)0x0) {
          (*This->lpVtbl->Release)(This);
        }
      }
      if (local_128 != (longlong *)0x0) {
        (**(code **)(*local_128 + 0x10))();
      }
      pIVar2 = local_108;
      if (local_108 != (IUnknown *)0x0) {
        UVar3 = (*local_108->lpVtbl[0x12].AddRef)(local_108);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f28);
        }
        if (local_108 != (IUnknown *)0x0) {
          (*local_108->lpVtbl->Release)(local_108);
          local_108 = (IUnknown *)0x0;
        }
      }
      local_a0 = 0;
      local_98 = &DAT_140281f00;
      local_b0 = &DAT_140281f00;
      local_a8 = 0;
      local_b8 = 0;
      Ordinal_9(local_d0);
      Ordinal_9(local_e8);
      if (local_100 != (longlong *)0x0) {
        (**(code **)(*local_100 + 0x10))();
      }
      if (local_108 != (IUnknown *)0x0) {
        (*local_108->lpVtbl->Release)(local_108);
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400d5140(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400d51d8;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400d51d8:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_character_tutorial_step");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("tutorial_step");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400d59c0)
// WARNING: Removing unreachable block (ram,0x0001400d59ca)
// WARNING: Removing unreachable block (ram,0x0001400d59d5)
// WARNING: Removing unreachable block (ram,0x0001400d59e5)

undefined4 FUN_1400d54f0(undefined8 *param_1,undefined8 param_2)

{
  IUnknown *pIVar1;
  longlong *plVar2;
  IUnknown *This;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  undefined4 uVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  int local_res18 [2];
  short local_res20;
  undefined2 uStackX_22;
  undefined4 uStackX_24;
  longlong *local_e8;
  LPUNKNOWN local_e0;
  IUnknown *local_d8;
  longlong *local_d0;
  undefined4 local_c8;
  undefined1 local_b8 [24];
  undefined1 local_a0 [24];
  undefined4 local_88;
  undefined1 *local_80;
  undefined4 local_78;
  undefined8 local_70;
  undefined1 *local_68;
  undefined8 local_50;
  undefined1 local_40 [24];
  
  local_50 = 0xfffffffffffffffe;
  local_res18[0] = CONCAT31(local_res18[0]._1_3_,1);
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400d5567:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return 0xffffffff;
    }
  }
  else {
    local_res20 = 0;
    uStackX_22 = 0;
    UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (CONCAT22(uStackX_22,local_res20) == 0) goto LAB_1400d5567;
  }
  local_d8 = (IUnknown *)0x0;
  local_d0 = (longlong *)0x0;
  Ordinal_8(local_b8);
  Ordinal_8(local_a0);
  pIVar1 = local_d8;
  if ((local_d8 != (IUnknown *)0x0) && (local_d8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_68 = &DAT_140281f00;
  local_80 = &DAT_140281f00;
  local_78 = 0;
  local_70 = 0;
  if (local_d8 != (IUnknown *)0x0) {
    (*local_d8->lpVtbl->Release)(local_d8);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,&local_e0
                          );
  if (-1 < HVar5) {
    HVar5 = OleRun(local_e0);
    if (-1 < HVar5) {
      HVar5 = (*local_e0->lpVtbl->QueryInterface)(local_e0,(IID *)&DAT_140281f68,&local_d8);
    }
    (*local_e0->lpVtbl->Release)(local_e0);
    if (-1 < HVar5) goto LAB_1400d566c;
  }
  local_d8 = (IUnknown *)0x0;
LAB_1400d566c:
  local_88 = 2;
  local_c8 = 1;
  local_e8 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_e8);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_res20);
  FUN_140001710(&local_e8,*puVar7,"dbo.up_move_deletetable_character");
  plVar2 = (longlong *)CONCAT44(uStackX_24,CONCAT22(uStackX_22,local_res20));
  if (plVar2 != (longlong *)0x0) {
    (**(code **)(*plVar2 + 0x10))();
  }
  puVar7 = (undefined8 *)FUN_1400016d0(&local_e8,&local_res20);
  This = local_d8;
  pIVar1 = (IUnknown *)*puVar7;
  if (local_d8 != pIVar1) {
    local_d8 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  plVar2 = (longlong *)CONCAT44(uStackX_24,CONCAT22(uStackX_22,local_res20));
  if (plVar2 != (longlong *)0x0) {
    (**(code **)(*plVar2 + 0x10))();
  }
  pIVar1 = local_d8;
  if (local_d8 != (IUnknown *)0x0) {
    local_res20 = 0;
    UVar3 = (*local_d8->lpVtbl[6].Release)(local_d8);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
    }
    pIVar1 = local_d8;
    uVar6 = 0;
    if (local_res20 != -1) {
      if (local_d8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_res20 = 0;
      UVar3 = (*local_d8->lpVtbl[6].Release)(local_d8);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
      }
      uVar6 = 0;
      if (local_res20 != -1) {
        uVar8 = FUN_140002290(&local_d8,local_40,&DAT_14028f034,local_res18);
        FUN_140182560(uVar8);
        uVar6 = FUN_140062550(uVar8);
        Ordinal_9(local_40);
        if ((char)local_res18[0] == '\0') {
          if (local_e8 != (longlong *)0x0) {
            (**(code **)(*local_e8 + 0x10))();
          }
          pIVar1 = local_d8;
          if (local_d8 != (IUnknown *)0x0) {
            local_res18[0] = 0;
            UVar3 = (*local_d8->lpVtbl[0x12].AddRef)(local_d8);
            if ((int)UVar3 < 0) {
              _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
            }
            pIVar1 = local_d8;
            if (local_res18[0] != 0) {
              if (local_d8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(0x80004003);
              }
              UVar3 = (*local_d8->lpVtbl[10].Release)(local_d8);
              if ((int)UVar3 < 0) {
                _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
              }
            }
            if (local_d8 != (IUnknown *)0x0) {
              (*local_d8->lpVtbl->Release)(local_d8);
              local_d8 = (IUnknown *)0x0;
            }
          }
          local_70 = 0;
          local_68 = &DAT_140281f00;
          local_80 = &DAT_140281f00;
          local_78 = 0;
          local_88 = 0;
          Ordinal_9(local_a0);
          Ordinal_9(local_b8);
          if (local_d0 != (longlong *)0x0) {
            (**(code **)(*local_d0 + 0x10))();
          }
          if (local_d8 != (IUnknown *)0x0) {
            (*local_d8->lpVtbl->Release)(local_d8);
          }
          return 0xffffffff;
        }
      }
    }
    if (local_e8 != (longlong *)0x0) {
      (**(code **)(*local_e8 + 0x10))();
    }
    pIVar1 = local_d8;
    if (local_d8 != (IUnknown *)0x0) {
      UVar3 = (*local_d8->lpVtbl[0x12].AddRef)(local_d8);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_d8 != (IUnknown *)0x0) {
        (*local_d8->lpVtbl->Release)(local_d8);
        local_d8 = (IUnknown *)0x0;
      }
    }
    local_70 = 0;
    local_68 = &DAT_140281f00;
    local_80 = &DAT_140281f00;
    local_78 = 0;
    local_88 = 0;
    Ordinal_9(local_a0);
    Ordinal_9(local_b8);
    if (local_d0 != (longlong *)0x0) {
      (**(code **)(*local_d0 + 0x10))();
    }
    if (local_d8 != (IUnknown *)0x0) {
      (*local_d8->lpVtbl->Release)(local_d8);
    }
    return uVar6;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400d5efb)
// WARNING: Removing unreachable block (ram,0x0001400d5f05)
// WARNING: Removing unreachable block (ram,0x0001400d5f10)
// WARNING: Removing unreachable block (ram,0x0001400d5f20)

bool FUN_1400d5a80(undefined8 *param_1,longlong param_2,longlong param_3)

{
  IUnknown *pIVar1;
  IUnknown *This;
  ULONG UVar2;
  int iVar3;
  HRESULT HVar4;
  undefined4 uVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  bool bVar11;
  int local_res20 [2];
  longlong *local_140;
  longlong *local_138;
  LPUNKNOWN local_130;
  longlong *local_128 [2];
  IUnknown *local_118;
  longlong *local_110;
  undefined4 local_108;
  undefined1 local_f8 [24];
  undefined1 local_e0 [24];
  undefined4 local_c8;
  undefined1 *local_c0;
  undefined4 local_b8;
  undefined8 local_b0;
  undefined1 *local_a8;
  longlong *local_98;
  longlong local_90 [5];
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined1 local_50 [8];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400d5b00:
    iVar3 = FUN_1400a1e90(param_1);
    if (iVar3 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return false;
    }
  }
  else {
    local_res20[0] = 0;
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_res20[0] == 0) goto LAB_1400d5b00;
  }
  local_140 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_140);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_118 = (IUnknown *)0x0;
  local_110 = (longlong *)0x0;
  Ordinal_8(local_f8);
  Ordinal_8(local_e0);
  pIVar1 = local_118;
  if ((local_118 != (IUnknown *)0x0) && (local_118 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_a8 = &DAT_140281f00;
  local_c0 = &DAT_140281f00;
  local_b8 = 0;
  local_b0 = 0;
  if (local_118 != (IUnknown *)0x0) {
    (*local_118->lpVtbl->Release)(local_118);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_130);
  if (-1 < HVar4) {
    HVar4 = OleRun(local_130);
    if (-1 < HVar4) {
      HVar4 = (*local_130->lpVtbl->QueryInterface)(local_130,(IID *)&DAT_140281f68,&local_118);
    }
    (*local_130->lpVtbl->Release)(local_130);
    if (-1 < HVar4) goto LAB_1400d5c29;
  }
  local_118 = (IUnknown *)0x0;
LAB_1400d5c29:
  local_c8 = 2;
  local_108 = 1;
  local_res20[0] = CONCAT31(local_res20[0]._1_3_,1);
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,local_128);
  FUN_140001710(&local_140,*puVar6,"dbo.up_read_extern_cash");
  if (local_128[0] != (longlong *)0x0) {
    (**(code **)(*local_128[0] + 0x10))();
  }
  local_138 = local_90;
  local_68 = *(undefined4 *)(param_2 + 0xe);
  uStack_64 = *(undefined4 *)(param_2 + 0x12);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140062280(local_90,&local_68);
  plVar8 = operator_new(0x18);
  local_98 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("auth_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_128[0] = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_140,local_50,local_128,0xca,1,0x26,uVar7);
  local_98 = plVar10;
  if (local_140 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_140,&local_138);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_138 != (longlong *)0x0) {
      (**(code **)(*local_138 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_140,&local_138);
    This = local_118;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_118 != pIVar1) {
      local_118 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_138 != (longlong *)0x0) {
      (**(code **)(*local_138 + 0x10))();
    }
    pIVar1 = local_118;
    if (local_118 != (IUnknown *)0x0) {
      UVar2 = (*local_118->lpVtbl[6].Release)(local_118);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
      }
      uVar7 = FUN_140002290(&local_118,local_90,"externcash",local_res20);
      FUN_140182560(uVar7);
      uVar5 = FUN_140062550(uVar7);
      *(undefined4 *)(param_3 + 0xe) = uVar5;
      Ordinal_9(local_90);
      pIVar1 = local_118;
      bVar11 = (char)local_res20[0] == '\0';
      if (bVar11) {
        *(undefined2 *)(param_3 + 0xc) = 1;
      }
      if (local_118 != (IUnknown *)0x0) {
        UVar2 = (*local_118->lpVtbl[0x12].AddRef)(local_118);
        if ((int)UVar2 < 0) {
          _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
        }
        if (local_118 != (IUnknown *)0x0) {
          (*local_118->lpVtbl->Release)(local_118);
          local_118 = (IUnknown *)0x0;
        }
      }
      local_b0 = 0;
      local_a8 = &DAT_140281f00;
      local_c0 = &DAT_140281f00;
      local_b8 = 0;
      local_c8 = 0;
      Ordinal_9(local_e0);
      Ordinal_9(local_f8);
      if (local_110 != (longlong *)0x0) {
        (**(code **)(*local_110 + 0x10))();
      }
      if (local_118 != (IUnknown *)0x0) {
        (*local_118->lpVtbl->Release)(local_118);
      }
      if (local_140 != (longlong *)0x0) {
        (**(code **)(*local_140 + 0x10))();
      }
      return !bVar11;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400d6589)
// WARNING: Removing unreachable block (ram,0x0001400d6596)
// WARNING: Removing unreachable block (ram,0x0001400d65a1)
// WARNING: Removing unreachable block (ram,0x0001400d65b1)

ulonglong FUN_1400d5fe0(undefined8 *param_1,undefined4 *param_2,undefined4 param_3)

{
  IUnknown *pIVar1;
  IUnknown *This;
  ULONG UVar2;
  int iVar3;
  HRESULT HVar4;
  ulonglong uVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  int local_res20 [2];
  longlong *local_130;
  longlong *local_128;
  uint local_120;
  longlong *local_118;
  LPUNKNOWN local_110;
  longlong *local_108;
  longlong *local_100;
  longlong local_f8 [4];
  IUnknown *local_d8;
  longlong *local_d0;
  undefined4 local_c8;
  undefined1 local_b8 [24];
  undefined1 local_a0 [24];
  undefined4 local_88;
  undefined1 *local_80;
  undefined4 local_78;
  undefined8 local_70;
  undefined1 *local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400d6053:
    uVar5 = FUN_1400a1e90(param_1);
    if ((int)uVar5 == 0) {
      return uVar5;
    }
  }
  else {
    local_res20[0] = 0;
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_res20[0] == 0) goto LAB_1400d6053;
  }
  local_120 = 0xffffffff;
  local_130 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_130);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_d8 = (IUnknown *)0x0;
  local_d0 = (longlong *)0x0;
  Ordinal_8(local_b8);
  Ordinal_8(local_a0);
  pIVar1 = local_d8;
  if ((local_d8 != (IUnknown *)0x0) && (local_d8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_68 = &DAT_140281f00;
  local_80 = &DAT_140281f00;
  local_78 = 0;
  local_70 = 0;
  if (local_d8 != (IUnknown *)0x0) {
    (*local_d8->lpVtbl->Release)(local_d8);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_110);
  if (-1 < HVar4) {
    HVar4 = OleRun(local_110);
    if (-1 < HVar4) {
      HVar4 = (*local_110->lpVtbl->QueryInterface)(local_110,(IID *)&DAT_140281f68,&local_d8);
    }
    (*local_110->lpVtbl->Release)(local_110);
    if (-1 < HVar4) goto LAB_1400d6188;
  }
  local_d8 = (IUnknown *)0x0;
LAB_1400d6188:
  local_88 = 2;
  local_c8 = 1;
  local_res20[0] = CONCAT31(local_res20[0]._1_3_,1);
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_118);
  FUN_140001710(&local_130,*puVar6,"dbo.up_update_extern_cash");
  if (local_118 != (longlong *)0x0) {
    (**(code **)(*local_118 + 0x10))();
  }
  local_128 = local_f8;
  local_58 = *param_2;
  uStack_54 = param_2[1];
  uStack_50 = param_2[2];
  uStack_4c = param_2[3];
  uVar7 = FUN_140062280(local_f8,&local_58);
  plVar8 = operator_new(0x18);
  local_118 = plVar10;
  local_108 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("auth_id");
    *plVar8 = lVar9;
    local_118 = plVar8;
  }
  if (local_118 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_130,&local_100,&local_118,0xca,1,0x26,uVar7);
  local_108 = plVar8;
  if (local_130 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_130,&local_128);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_128 != (longlong *)0x0) {
    (**(code **)(*local_128 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_100 = local_f8;
  Ordinal_8(local_f8);
  FUN_140062080(local_f8,param_3);
  plVar8 = operator_new(0x18);
  local_108 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("spendcost");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_128 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_130,&local_58,&local_128,0xca,1,0x26,local_f8);
  local_100 = plVar10;
  if (local_130 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_130,&local_118);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_118 != (longlong *)0x0) {
      (**(code **)(*local_118 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_130,&local_128);
    This = local_d8;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_d8 != pIVar1) {
      local_d8 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_128 != (longlong *)0x0) {
      (**(code **)(*local_128 + 0x10))();
    }
    pIVar1 = local_d8;
    if (local_d8 != (IUnknown *)0x0) {
      UVar2 = (*local_d8->lpVtbl[6].Release)(local_d8);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
      }
      uVar7 = FUN_140002290(&local_d8,local_f8,"ExternCash",local_res20);
      FUN_140182560(uVar7);
      local_120 = FUN_140062550(uVar7);
      Ordinal_9(local_f8);
      pIVar1 = local_d8;
      if (local_d8 != (IUnknown *)0x0) {
        UVar2 = (*local_d8->lpVtbl[0x12].AddRef)(local_d8);
        if ((int)UVar2 < 0) {
          _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
        }
        if (local_d8 != (IUnknown *)0x0) {
          (*local_d8->lpVtbl->Release)(local_d8);
          local_d8 = (IUnknown *)0x0;
        }
      }
      local_70 = 0;
      local_68 = &DAT_140281f00;
      local_80 = &DAT_140281f00;
      local_78 = 0;
      local_88 = 0;
      Ordinal_9(local_a0);
      Ordinal_9(local_b8);
      if (local_d0 != (longlong *)0x0) {
        (**(code **)(*local_d0 + 0x10))();
      }
      if (local_d8 != (IUnknown *)0x0) {
        (*local_d8->lpVtbl->Release)(local_d8);
      }
      if (local_130 != (longlong *)0x0) {
        (**(code **)(*local_130 + 0x10))();
      }
      return (ulonglong)local_120;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400d6680(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400d6718;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400d6718:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_daypartymission");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("daymissionstate");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400d6a30(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400d6ac8;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400d6ac8:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_set_timeskillreset");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028a354);
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



bool FUN_1400d6de0(short *param_1)

{
  int iVar1;
  bool bVar2;
  undefined8 uVar3;
  short local_20 [4];
  short local_18;
  
  uVar3 = 0xfffffffffffffffe;
  if (*param_1 == 0xb) {
    bVar2 = param_1[4] != 0;
  }
  else {
    Ordinal_8(local_20);
    if ((local_20 != param_1) || (local_20[0] != 0xb)) {
      iVar1 = Ordinal_12(local_20,param_1,0,0xb,uVar3);
      if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar1);
      }
    }
    bVar2 = local_18 == -1;
    Ordinal_9(local_20);
  }
  return bVar2;
}



undefined4 FUN_1400d6e60(short *param_1)

{
  int iVar1;
  undefined8 uVar2;
  short local_20 [4];
  undefined4 local_18;
  
  uVar2 = 0xfffffffffffffffe;
  if (*param_1 == 0x17) {
    local_18 = *(undefined4 *)(param_1 + 4);
  }
  else {
    Ordinal_8(local_20);
    if ((local_20 != param_1) || (local_20[0] != 0x17)) {
      iVar1 = Ordinal_12(local_20,param_1,0,0x17,uVar2);
      if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar1);
      }
    }
    Ordinal_9(local_20);
  }
  return local_18;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1400d6ee0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  undefined2 uVar2;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  undefined4 uVar6;
  undefined8 *puVar7;
  longlong *plVar8;
  longlong lVar9;
  undefined8 uVar10;
  longlong *plVar11;
  undefined1 auStackY_278 [32];
  char local_238 [4];
  short local_234;
  longlong *local_230;
  undefined8 *local_228;
  int local_220;
  longlong *local_218;
  LPUNKNOWN local_210;
  longlong *local_208;
  longlong *local_200;
  undefined8 *local_1f8;
  IUnknown *local_1e8;
  longlong *local_1e0;
  undefined4 local_1d8;
  undefined1 local_1c8 [24];
  undefined1 local_1b0 [24];
  undefined4 local_198;
  undefined1 *local_190;
  undefined4 local_188;
  undefined8 local_180;
  undefined1 *local_178;
  longlong *local_168;
  longlong *local_160;
  longlong *local_158;
  longlong *local_150;
  undefined1 local_148 [16];
  undefined8 local_138;
  undefined1 local_130 [8];
  undefined4 local_128;
  undefined4 uStack_124;
  undefined4 uStack_120;
  undefined4 uStack_11c;
  longlong local_108 [3];
  undefined1 local_f0 [24];
  undefined1 local_d8 [24];
  longlong local_c0 [3];
  undefined1 local_a8 [32];
  undefined8 local_88;
  undefined8 uStack_80;
  undefined2 local_78;
  undefined6 uStack_76;
  undefined2 uStack_70;
  undefined6 uStack_6e;
  undefined2 uStack_68;
  undefined6 uStack_66;
  undefined8 uStack_60;
  undefined8 local_58;
  undefined8 uStack_50;
  undefined2 local_48;
  undefined4 uStack_46;
  undefined2 uStack_42;
  undefined2 uStack_40;
  ulonglong local_38;
  
  local_138 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_278;
  pIVar1 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  local_228 = param_1;
  local_1f8 = param_2;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400d6f74:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (longlong *)0x0;
    }
  }
  else {
    local_220 = 0;
    UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_220 == 0) goto LAB_1400d6f74;
  }
  local_230 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_230);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_1e8 = (IUnknown *)0x0;
  local_1e0 = (longlong *)0x0;
  Ordinal_8(local_1c8);
  Ordinal_8(local_1b0);
  pIVar1 = local_1e8;
  if ((local_1e8 != (IUnknown *)0x0) && (local_1e8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_180 = 0;
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_210);
  if (HVar5 < 0) {
LAB_1400d70aa:
    local_1e8 = (IUnknown *)0x0;
  }
  else {
    HVar5 = OleRun(local_210);
    if (-1 < HVar5) {
      HVar5 = (*local_210->lpVtbl->QueryInterface)(local_210,(IID *)&DAT_140281f68,&local_1e8);
    }
    (*local_210->lpVtbl->Release)(local_210);
    if (HVar5 < 0) goto LAB_1400d70aa;
  }
  local_198 = 2;
  local_1d8 = 1;
  local_238[0] = '\x01';
  local_78 = (undefined2)param_2[2];
  uStack_76 = (undefined6)((ulonglong)param_2[2] >> 0x10);
  uStack_70 = (undefined2)param_2[3];
  uStack_6e = (undefined6)((ulonglong)param_2[3] >> 0x10);
  uStack_60 = param_2[5];
  uStack_68 = (undefined2)param_2[4];
  uStack_66 = (undefined6)((ulonglong)param_2[4] >> 0x10);
  local_58 = param_2[6];
  uStack_50 = param_2[7];
  uVar10 = param_2[8];
  local_48 = (undefined2)uVar10;
  uStack_46 = (undefined4)((ulonglong)uVar10 >> 0x10);
  uStack_42 = (undefined2)((ulonglong)uVar10 >> 0x30);
  uStack_40 = *(undefined2 *)(param_2 + 9);
  local_88._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_88._0_4_ = CONCAT22(0x232a,(short)*param_2);
  uStack_80._6_2_ = (undefined2)((ulonglong)param_2[1] >> 0x30);
  uStack_80._0_4_ = (undefined4)param_2[1];
  uStack_80._0_6_ = CONCAT24(0xa6,(undefined4)uStack_80);
  wcsncpy((wchar_t *)&uStack_66,(wchar_t *)((longlong)param_2 + 0x1e),0xf);
  local_48 = 0;
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_168);
  FUN_140001710(&local_230,*puVar7,"dbo.up_add_friend");
  if (local_168 != (longlong *)0x0) {
    (**(code **)(*local_168 + 0x10))();
  }
  local_218 = local_c0;
  local_128 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_124 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_120 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_11c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_c0,&local_128);
  plVar8 = operator_new(0x18);
  local_158 = plVar11;
  local_208 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("character_id");
    *plVar8 = lVar9;
    local_158 = plVar8;
  }
  if (local_158 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_230,&local_200,&local_158,0xca);
  local_218 = plVar8;
  if (local_230 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_230,&local_150);
  pIVar1 = (IUnknown *)*puVar7;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_150 != (longlong *)0x0) {
    (**(code **)(*local_150 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_200 = local_108;
  FUN_1400623f0(local_108,(wchar_t *)((longlong)param_2 + 0x1e));
  plVar8 = operator_new(0x18);
  local_160 = plVar11;
  local_218 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("friend_name");
    *plVar8 = lVar9;
    local_160 = plVar8;
  }
  if (local_160 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_230,local_130,&local_160,0xca);
  local_200 = plVar8;
  if (local_230 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_230,&local_208);
  pIVar1 = (IUnknown *)*puVar7;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_208 != (longlong *)0x0) {
    (**(code **)(*local_208 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  puVar7 = (undefined8 *)FUN_1400016d0(&local_230,&local_218);
  This = local_1e8;
  pIVar1 = (IUnknown *)*puVar7;
  if (local_1e8 != pIVar1) {
    local_1e8 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_218 != (longlong *)0x0) {
    (**(code **)(*local_218 + 0x10))();
  }
  pIVar1 = local_1e8;
  if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_234 = 0;
  UVar3 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
  }
  if (local_234 == -1) {
    uVar2 = 0xa7;
  }
  else {
    uVar10 = FUN_140002290(&local_1e8,local_d8,"character_id",local_238);
    FUN_1400625d0(uVar10,local_148);
    uStack_76 = (undefined6)local_148._0_8_;
    uStack_70 = SUB82(local_148._0_8_,6);
    uStack_6e = (undefined6)local_148._8_8_;
    uStack_68 = SUB82(local_148._8_8_,6);
    Ordinal_9(local_d8);
    uVar10 = FUN_140002290(&local_1e8,local_a8,"Class",local_238);
    FUN_140182560(uVar10);
    uVar6 = FUN_140062550(uVar10);
    uStack_42 = (undefined2)uVar6;
    uStack_40 = (undefined2)((uint)uVar6 >> 0x10);
    Ordinal_9(local_a8);
    uVar10 = FUN_140002290(&local_1e8,local_f0,"Level",local_238);
    FUN_140182560(uVar10);
    uStack_46 = FUN_140062550(uVar10);
    Ordinal_9(local_f0);
    plVar8 = (longlong *)0x1;
    if (local_238[0] != '\0') goto LAB_1400d7599;
    uVar2 = 0xa8;
  }
  uStack_80._0_6_ = CONCAT24(uVar2,(undefined4)uStack_80);
  plVar8 = plVar11;
LAB_1400d7599:
  local_88 = CONCAT62(local_88._2_6_,0x4a);
  param_1[0x26] = local_88;
  param_1[0x27] = uStack_80;
  param_1[0x28] = CONCAT62(uStack_76,local_78);
  param_1[0x29] = CONCAT62(uStack_6e,uStack_70);
  param_1[0x2a] = CONCAT62(uStack_66,uStack_68);
  param_1[0x2b] = uStack_60;
  *(undefined4 *)(param_1 + 0x2c) = (undefined4)local_58;
  *(undefined4 *)((longlong)param_1 + 0x164) = local_58._4_4_;
  *(undefined4 *)(param_1 + 0x2d) = (undefined4)uStack_50;
  *(undefined4 *)((longlong)param_1 + 0x16c) = uStack_50._4_4_;
  param_1[0x2e] = CONCAT26(uStack_42,CONCAT42(uStack_46,local_48));
  *(undefined2 *)(param_1 + 0x2f) = uStack_40;
  iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
  if (iVar4 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar1 = local_1e8;
  if (local_1e8 != (IUnknown *)0x0) {
    local_228 = (undefined8 *)((ulonglong)local_228 & 0xffffffff00000000);
    UVar3 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
    }
    pIVar1 = local_1e8;
    if ((int)local_228 != 0) {
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
      local_1e8 = (IUnknown *)0x0;
    }
  }
  local_180 = 0;
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_198 = 0;
  Ordinal_9(local_1b0);
  Ordinal_9(local_1c8);
  if (local_1e0 != (longlong *)0x0) {
    (**(code **)(*local_1e0 + 0x10))();
  }
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  if (local_230 != (longlong *)0x0) {
    (**(code **)(*local_230 + 0x10))();
  }
  return plVar8;
}



undefined8 FUN_1400d7790(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_48;
  longlong local_40 [4];
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400d7828;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400d7828:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_del_friend");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = &local_78;
  local_88 = *(undefined4 *)(param_2 + 0xe);
  uStack_84 = *(undefined4 *)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_78,&local_88);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_98[0] = local_40;
  local_78._0_4_ = *(undefined4 *)(param_2 + 0x1e);
  local_78._4_4_ = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_78);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("friend_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400d7b40(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined6 uVar2;
  IUnknown *This;
  undefined2 uVar3;
  ULONG UVar4;
  int iVar5;
  HRESULT HVar6;
  undefined8 *puVar7;
  wchar_t *pwVar8;
  longlong lVar9;
  longlong *plVar10;
  undefined8 uVar11;
  undefined8 uVar12;
  wchar_t *pwVar13;
  char *riid;
  wchar_t *pwVar14;
  char *ppvObject;
  uint uVar15;
  wchar_t *pwVar16;
  undefined1 auStackY_398 [32];
  char local_358 [4];
  short local_354;
  short local_350;
  undefined8 local_348;
  undefined4 local_340;
  undefined2 uStack_33c;
  ushort uStack_33a;
  longlong *local_338;
  int local_330;
  int local_32c;
  wchar_t *local_328;
  wchar_t *local_320;
  LPUNKNOWN local_318;
  longlong *local_310;
  wchar_t *local_308;
  undefined8 *local_300;
  undefined8 *local_2f8;
  IUnknown *local_2e8;
  longlong *local_2e0;
  undefined4 local_2d8;
  undefined1 local_2c8 [24];
  undefined1 local_2b0 [24];
  undefined4 local_298;
  undefined1 *local_290;
  undefined4 local_288;
  undefined8 local_280;
  undefined1 *local_278;
  undefined8 local_268;
  undefined1 local_260;
  undefined8 local_258;
  undefined1 local_250;
  undefined8 local_248;
  undefined1 local_240;
  undefined8 local_238;
  undefined1 local_230;
  wchar_t *local_228;
  undefined8 local_220;
  undefined1 local_218;
  longlong *local_210;
  undefined8 local_208;
  undefined1 local_200;
  undefined8 local_1f8;
  undefined1 local_1f0;
  undefined8 local_1e8;
  undefined1 local_1e0;
  undefined4 local_1d8;
  undefined4 uStack_1d4;
  undefined4 uStack_1d0;
  undefined4 uStack_1cc;
  undefined1 local_1c8 [8];
  undefined1 local_1c0 [24];
  undefined1 local_1a8 [16];
  undefined8 local_198;
  undefined1 local_188 [24];
  undefined1 local_170 [24];
  undefined1 local_158 [24];
  undefined1 local_140 [24];
  undefined1 local_128 [24];
  longlong local_110 [3];
  undefined1 local_f8 [24];
  undefined1 local_e0 [24];
  IID local_c8;
  undefined8 local_b8;
  undefined8 uStack_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined8 local_90;
  uint local_88;
  wchar_t local_84 [31];
  undefined2 local_46;
  undefined4 local_44;
  ulonglong local_38;
  
  local_198 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_398;
  pIVar1 = *(IUnknown **)*param_1;
  pwVar14 = (wchar_t *)0x0;
  local_300 = param_1;
  local_2f8 = param_2;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400d7bd9:
    iVar5 = FUN_1400a1e90(param_1);
    if (iVar5 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (wchar_t *)0x0;
    }
  }
  else {
    local_330 = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_330 == 0) goto LAB_1400d7bd9;
  }
  local_338 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_338);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_2e8 = (IUnknown *)0x0;
  local_2e0 = (longlong *)0x0;
  Ordinal_8(local_2c8);
  Ordinal_8(local_2b0);
  pIVar1 = local_2e8;
  if ((local_2e8 != (IUnknown *)0x0) && (local_2e8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_278 = &DAT_140281f00;
  local_290 = &DAT_140281f00;
  local_288 = 0;
  local_280 = 0;
  if (local_2e8 != (IUnknown *)0x0) {
    (*local_2e8->lpVtbl->Release)(local_2e8);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_318);
  if (-1 < HVar6) {
    HVar6 = OleRun(local_318);
    if (-1 < HVar6) {
      HVar6 = (*local_318->lpVtbl->QueryInterface)(local_318,(IID *)&DAT_140281f68,&local_2e8);
    }
    (*local_318->lpVtbl->Release)(local_318);
    if (-1 < HVar6) goto LAB_1400d7d24;
  }
  local_2e8 = (IUnknown *)0x0;
LAB_1400d7d24:
  local_298 = 2;
  local_2d8 = 1;
  local_358[0] = '\x01';
  local_340 = *(undefined4 *)(param_2 + 1);
  local_348._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_348._0_4_ = CONCAT22(0x2351,(short)*param_2);
  pwVar16 = (wchar_t *)0x0;
  uStack_33c = 0xa6;
  uStack_33a = 0;
  uVar15 = 0x10;
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_210);
  FUN_140001710(&local_338,*puVar7,"dbo.up_read_friend_list");
  if (local_210 != (longlong *)0x0) {
    (**(code **)(*local_210 + 0x10))();
  }
  local_310 = local_110;
  local_1d8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_1d4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_1d0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_1cc = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_110,&local_1d8);
  pwVar8 = operator_new(0x18);
  local_228 = pwVar14;
  local_308 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("character_id");
    *(longlong *)pwVar8 = lVar9;
    local_228 = pwVar8;
  }
  if (local_228 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_338,local_1c8,&local_228,0xca);
  local_310 = plVar10;
  if (local_338 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_338,&local_308);
  pIVar1 = (IUnknown *)*puVar7;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_308 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_308 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    puVar7 = (undefined8 *)FUN_1400016d0(&local_338,&local_310);
    This = local_2e8;
    pIVar1 = (IUnknown *)*puVar7;
    if (local_2e8 != pIVar1) {
      local_2e8 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_310 != (longlong *)0x0) {
      (**(code **)(*local_310 + 0x10))();
    }
    pIVar1 = local_2e8;
    if (local_2e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_350 = 0;
    UVar4 = (*local_2e8->lpVtbl[6].Release)(local_2e8);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
    }
    if (local_350 == -1) {
      uStack_33c = 0xa7;
      pwVar14 = (wchar_t *)0x0;
    }
    else {
      while( true ) {
        pIVar1 = local_2e8;
        if (local_2e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_354 = 0;
        UVar4 = (*local_2e8->lpVtbl[6].Release)(local_2e8);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
        if (local_354 == -1) break;
        local_c8.Data1 = 0;
        local_c8.Data2 = 0;
        local_c8.Data3 = 0;
        local_c8.Data4[0] = '\0';
        local_c8.Data4[1] = '\0';
        local_c8.Data4[2] = '\0';
        local_c8.Data4[3] = '\0';
        local_c8.Data4[4] = '\0';
        local_c8.Data4[5] = '\0';
        local_c8.Data4[6] = '\0';
        local_c8.Data4[7] = '\0';
        local_b8 = 0;
        uStack_b0 = 0;
        local_44 = 0;
        local_a8 = 0;
        local_a0 = 0;
        local_98 = 0;
        local_90 = 0;
        local_88 = 0;
        memset(local_84,0,0x40);
        uVar11 = FUN_140002290(&local_2e8,local_f8,"character_id",local_358);
        FUN_1400625d0(uVar11,local_1c0);
        Ordinal_9(local_f8);
        uVar11 = FUN_140002290(&local_2e8,local_188,"friend_id",local_358);
        FUN_1400625d0(uVar11,local_1a8);
        Ordinal_9(local_188);
        uVar11 = FUN_140002290(&local_2e8,local_140,"Class",local_358);
        FUN_140182560(uVar11);
        uVar3 = FUN_140062550(uVar11);
        local_a8 = CONCAT62(local_a8._2_6_,uVar3);
        Ordinal_9(local_140);
        uVar11 = FUN_140002290(&local_2e8,local_e0,"IsCut",local_358);
        FUN_140182560(uVar11);
        uVar3 = FUN_140062550(uVar11);
        local_a8._0_4_ = CONCAT22(uVar3,(undefined2)local_a8);
        Ordinal_9(local_e0);
        uVar11 = FUN_140002290(&local_2e8,local_170,&DAT_14028a330,local_358);
        FUN_140062840(uVar11,&local_320);
        FUN_1401568c0();
        pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar8 = pwVar14;
        }
        if (local_320 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar11 = FUN_1401568c0();
          local_1f0 = 0;
          local_1f8 = uVar11;
          FUN_140156b50(uVar11);
          local_1f0 = 1;
          if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar8 + -4 != (wchar_t *)0x0)) {
            uVar12 = FUN_1401568c0();
            local_260 = 0;
            local_268 = uVar12;
            FUN_140156b50(uVar12);
            local_260 = 1;
            pwVar13 = pwVar8 + -2;
            *(int *)pwVar13 = *(int *)pwVar13 + -1;
            if (*(int *)pwVar13 == 0) {
              FUN_140156970(pwVar8 + -4);
            }
            FUN_140156be0(uVar12);
            local_260 = 0;
          }
          pwVar8 = local_320;
          if (((local_320 != (wchar_t *)PTR_DAT_1403200a0) && (local_320 != (wchar_t *)0x0)) &&
             (local_320 != (wchar_t *)0x8)) {
            *(int *)(local_320 + -2) = *(int *)(local_320 + -2) + 1;
          }
          FUN_140156be0(uVar11);
          local_1f0 = 0;
        }
        pwVar13 = pwVar8;
        if (pwVar8 == (wchar_t *)0x0) {
          pwVar13 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy((wchar_t *)((longlong)&local_a8 + 4),pwVar13,0xf);
        if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar8 + -4 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_250 = 0;
          local_258 = uVar11;
          FUN_140156b50(uVar11);
          local_250 = 1;
          pwVar13 = pwVar8 + -2;
          *(int *)pwVar13 = *(int *)pwVar13 + -1;
          if (*(int *)pwVar13 == 0) {
            FUN_140156970(pwVar8 + -4);
          }
          FUN_140156be0(uVar11);
          local_250 = 0;
        }
        pwVar8 = local_320;
        if (((local_320 != (wchar_t *)0x0) && (local_320 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar13 = local_320 + -4, pwVar13 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_230 = 0;
          local_238 = uVar11;
          FUN_140156b50(uVar11);
          local_230 = 1;
          pwVar8 = pwVar8 + -2;
          *(int *)pwVar8 = *(int *)pwVar8 + -1;
          if (*(int *)pwVar8 == 0) {
            FUN_140156970(pwVar13);
          }
          FUN_140156be0(uVar11);
          local_230 = 0;
        }
        local_320 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_170);
        uVar11 = FUN_140002290(&local_2e8,local_158,"CutReason",local_358);
        FUN_140062840(uVar11,&local_328);
        FUN_1401568c0();
        pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar8 = pwVar14;
        }
        if (local_328 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar11 = FUN_1401568c0();
          local_200 = 0;
          local_208 = uVar11;
          FUN_140156b50(uVar11);
          local_200 = 1;
          if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar8 + -4 != (wchar_t *)0x0)) {
            uVar12 = FUN_1401568c0();
            local_218 = 0;
            local_220 = uVar12;
            FUN_140156b50(uVar12);
            local_218 = 1;
            pwVar13 = pwVar8 + -2;
            *(int *)pwVar13 = *(int *)pwVar13 + -1;
            if (*(int *)pwVar13 == 0) {
              FUN_140156970(pwVar8 + -4);
            }
            FUN_140156be0(uVar12);
            local_218 = 0;
          }
          pwVar8 = local_328;
          if (((local_328 != (wchar_t *)PTR_DAT_1403200a0) && (local_328 != (wchar_t *)0x0)) &&
             (local_328 != (wchar_t *)0x8)) {
            *(int *)(local_328 + -2) = *(int *)(local_328 + -2) + 1;
          }
          FUN_140156be0(uVar11);
          local_200 = 0;
        }
        pwVar13 = pwVar8;
        if (pwVar8 == (wchar_t *)0x0) {
          pwVar13 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_84,pwVar13,0x1f);
        if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar8 + -4 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_1e0 = 0;
          local_1e8 = uVar11;
          FUN_140156b50(uVar11);
          local_1e0 = 1;
          pwVar13 = pwVar8 + -2;
          *(int *)pwVar13 = *(int *)pwVar13 + -1;
          if (*(int *)pwVar13 == 0) {
            FUN_140156970(pwVar8 + -4);
          }
          FUN_140156be0(uVar11);
          local_1e0 = 0;
        }
        pwVar8 = local_328;
        if (((local_328 != (wchar_t *)0x0) && (local_328 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar13 = local_328 + -4, pwVar13 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_240 = 0;
          local_248 = uVar11;
          FUN_140156b50(uVar11);
          local_240 = 1;
          pwVar8 = pwVar8 + -2;
          *(int *)pwVar8 = *(int *)pwVar8 + -1;
          if (*(int *)pwVar8 == 0) {
            FUN_140156970(pwVar13);
          }
          FUN_140156be0(uVar11);
          local_240 = 0;
        }
        local_328 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_158);
        local_88 = local_88 & 0xffff;
        local_46 = 0;
        uVar11 = FUN_140002290(&local_2e8,local_128,"Level",local_358);
        FUN_140182560(uVar11);
        local_44 = FUN_140062550(uVar11);
        Ordinal_9(local_128);
        riid = (char *)&local_c8;
        ppvObject = (char *)0x88;
        memcpy((void *)((longlong)(int)uVar15 + 0x130 + (longlong)param_1),riid,0x88);
        uVar15 = uVar15 + 0x88;
        uStack_33a = (short)pwVar16 + 1;
        pwVar16 = (wchar_t *)(ulonglong)uStack_33a;
        if (50000 < uVar15) {
          uVar2 = local_348._2_6_;
          local_348 = CONCAT62(local_348._2_6_,(short)uVar15);
          uVar11 = local_348;
          riid = (char *)(param_1 + 0x26);
          local_348._4_2_ = SUB62(uVar2,2);
          local_348._6_2_ = SUB62(uVar2,4);
          ((IID *)riid)->Data1 = (undefined4)local_348;
          ((IID *)riid)->Data2 = local_348._4_2_;
          ((IID *)riid)->Data3 = local_348._6_2_;
          param_1[0x27] = CONCAT26(uStack_33a,CONCAT24(uStack_33c,local_340));
          local_348 = uVar11;
          iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
          if (iVar5 == 0) {
            ppvObject = "DB Result Queue push error";
            riid = "DBResultQueue_Error.Log";
            FUN_1400a0b40(param_1[0x23]);
          }
          uVar15 = 0x10;
          uStack_33a = 0;
          pwVar16 = pwVar14;
        }
        pIVar1 = local_2e8;
        if (local_2e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar6 = (*local_2e8->lpVtbl[0xc].QueryInterface)(local_2e8,(IID *)riid,(void **)ppvObject);
        if (HVar6 < 0) {
          _com_issue_errorex(HVar6,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_358[0] == '\0') {
        uStack_33c = 0xa8;
      }
      else {
        pwVar14 = (wchar_t *)0x1;
      }
    }
    local_348 = CONCAT62(local_348._2_6_,(short)uVar15);
    param_1[0x26] = local_348;
    param_1[0x27] = CONCAT26(uStack_33a,CONCAT24(uStack_33c,local_340));
    iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar5 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar1 = local_2e8;
    if (local_2e8 != (IUnknown *)0x0) {
      local_32c = 0;
      UVar4 = (*local_2e8->lpVtbl[0x12].AddRef)(local_2e8);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_2e8;
      if (local_32c != 0) {
        if (local_2e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*local_2e8->lpVtbl[10].Release)(local_2e8);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_2e8 != (IUnknown *)0x0) {
        (*local_2e8->lpVtbl->Release)(local_2e8);
        local_2e8 = (IUnknown *)0x0;
      }
    }
    local_280 = 0;
    local_278 = &DAT_140281f00;
    local_290 = &DAT_140281f00;
    local_288 = 0;
    local_298 = 0;
    Ordinal_9(local_2b0);
    Ordinal_9(local_2c8);
    if (local_2e0 != (longlong *)0x0) {
      (**(code **)(*local_2e0 + 0x10))();
    }
    if (local_2e8 != (IUnknown *)0x0) {
      (*local_2e8->lpVtbl->Release)(local_2e8);
    }
    if (local_338 != (longlong *)0x0) {
      (**(code **)(*local_338 + 0x10))();
    }
    return pwVar14;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 * FUN_1400d8890(undefined8 *param_1,undefined8 *param_2)

{
  undefined2 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  undefined6 uVar4;
  IUnknown *This;
  undefined8 uVar5;
  ULONG UVar6;
  int iVar7;
  HRESULT HVar8;
  undefined4 uVar9;
  undefined8 *puVar10;
  undefined8 uVar11;
  longlong *plVar12;
  undefined8 uVar13;
  char *riid;
  undefined8 *puVar14;
  char *ppvObject;
  longlong lVar15;
  undefined8 *puVar16;
  uint uVar17;
  char local_res10 [8];
  longlong *local_res18;
  undefined8 *local_res20;
  undefined8 local_188;
  undefined2 uStack_17c;
  ushort uStack_17a;
  longlong *local_178;
  int local_170;
  int local_16c;
  LPUNKNOWN local_168;
  undefined4 local_160;
  undefined4 local_15c;
  undefined4 local_158;
  undefined4 local_154;
  undefined4 local_150;
  undefined8 *local_148;
  IUnknown *local_138;
  longlong *local_130;
  undefined4 local_128;
  undefined1 local_118 [24];
  undefined1 local_100 [24];
  undefined4 local_e8;
  undefined1 *local_e0;
  undefined4 local_d8;
  undefined8 local_d0;
  undefined1 *local_c8;
  undefined8 *local_b8;
  longlong *local_b0;
  longlong *local_a8;
  longlong *local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined1 local_78 [16];
  undefined1 local_68 [24];
  IID local_50;
  
  local_88 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  puVar14 = (undefined8 *)0x0;
  local_148 = param_2;
  if (pIVar3 == (IUnknown *)0x0) {
LAB_1400d8909:
    iVar7 = FUN_1400a1e90(param_1);
    if (iVar7 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (undefined8 *)0x0;
    }
  }
  else {
    local_16c = 0;
    UVar6 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if (local_16c == 0) goto LAB_1400d8909;
  }
  uVar2 = *(undefined4 *)(param_2 + 1);
  local_188 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x234e0000);
  puVar16 = (undefined8 *)0x0;
  uStack_17c = 0x7b;
  uStack_17a = 0;
  uVar17 = 0x10;
  local_178 = (longlong *)0x0;
  iVar7 = FUN_140001970(&local_178);
  if ((iVar7 < 0) && (iVar7 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar7);
  }
  local_138 = (IUnknown *)0x0;
  local_130 = (longlong *)0x0;
  Ordinal_8(local_118);
  Ordinal_8(local_100);
  pIVar3 = local_138;
  if ((local_138 != (IUnknown *)0x0) && (local_138 = (IUnknown *)0x0, pIVar3 != (IUnknown *)0x0)) {
    (*pIVar3->lpVtbl->Release)(pIVar3);
  }
  local_c8 = &DAT_140281f00;
  local_e0 = &DAT_140281f00;
  local_d8 = 0;
  local_d0 = 0;
  if (local_138 != (IUnknown *)0x0) {
    (*local_138->lpVtbl->Release)(local_138);
  }
  HVar8 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_168);
  if (-1 < HVar8) {
    HVar8 = OleRun(local_168);
    if (-1 < HVar8) {
      HVar8 = (*local_168->lpVtbl->QueryInterface)(local_168,(IID *)&DAT_140281f68,&local_138);
    }
    (*local_168->lpVtbl->Release)(local_168);
    if (-1 < HVar8) goto LAB_1400d8a7b;
  }
  local_138 = (IUnknown *)0x0;
LAB_1400d8a7b:
  local_e8 = 2;
  local_128 = 1;
  local_res10[0] = '\x01';
  puVar10 = (undefined8 *)FUN_140001f20(*param_1,&local_a0);
  FUN_140001710(&local_178,*puVar10,"dbo.up_read_all_guild");
  if (local_a0 != (longlong *)0x0) {
    (**(code **)(*local_a0 + 0x10))();
  }
  local_res18 = (longlong *)&local_160;
  uVar1 = *(undefined2 *)((longlong)param_2 + 0xe);
  Ordinal_8(&local_160);
  if ((short)local_160 != 0x12) {
    iVar7 = Ordinal_9(&local_160);
    if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar7);
    }
    local_160 = CONCAT22(local_160._2_2_,0x12);
  }
  local_158 = CONCAT22(local_158._2_2_,uVar1);
  puVar10 = operator_new(0x18);
  local_b8 = puVar14;
  local_res20 = puVar10;
  if (puVar10 != (undefined8 *)0x0) {
    puVar10[1] = 0;
    *(undefined4 *)(puVar10 + 2) = 1;
    uVar11 = FUN_140201490("server");
    *puVar10 = uVar11;
    local_b8 = puVar10;
  }
  if (local_b8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_178,local_78,&local_b8,3,1,4,&local_160);
  local_res18 = plVar12;
  if (local_178 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar10 = (undefined8 *)FUN_140001660(local_178,&local_b0);
  pIVar3 = (IUnknown *)*puVar10;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar6 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    puVar10 = (undefined8 *)FUN_1400016d0(&local_178,&local_a8);
    This = local_138;
    pIVar3 = (IUnknown *)*puVar10;
    if (local_138 != pIVar3) {
      local_138 = pIVar3;
      if (pIVar3 != (IUnknown *)0x0) {
        (*pIVar3->lpVtbl->AddRef)(pIVar3);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    pIVar3 = local_138;
    if (local_138 != (IUnknown *)0x0) {
      local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffffffff0000);
      UVar6 = (*local_138->lpVtbl[6].Release)(local_138);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_res18 == -1) {
        uStack_17c = 0x7e;
        puVar14 = (undefined8 *)0x0;
      }
      else {
        while( true ) {
          pIVar3 = local_138;
          if (local_138 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          local_res20 = (undefined8 *)((ulonglong)local_res20 & 0xffffffffffff0000);
          UVar6 = (*local_138->lpVtbl[6].Release)(local_138);
          if ((int)UVar6 < 0) {
            _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
          }
          if ((short)local_res20 == -1) break;
          local_160 = 0;
          local_15c = 0;
          local_158 = 0;
          local_154 = 0;
          local_150 = 0;
          uVar11 = FUN_140002290(&local_138,local_68,"guild_id",local_res10);
          FUN_1400625d0(uVar11,&local_98);
          uVar5 = local_90;
          uVar11 = local_98;
          Ordinal_9(local_68);
          ppvObject = "room_id";
          riid = (char *)&local_50;
          uVar13 = FUN_140002290(&local_138,riid,"room_id",local_res10);
          FUN_140182560(uVar13);
          uVar9 = FUN_140062550(uVar13);
          Ordinal_9(&local_50);
          lVar15 = (longlong)(int)uVar17;
          *(undefined8 *)(lVar15 + 0x130 + (longlong)param_1) = uVar11;
          *(undefined8 *)(lVar15 + 0x138 + (longlong)param_1) = uVar5;
          *(undefined4 *)(lVar15 + 0x140 + (longlong)param_1) = uVar9;
          uVar17 = uVar17 + 0x14;
          uStack_17a = (short)puVar16 + 1;
          puVar16 = (undefined8 *)(ulonglong)uStack_17a;
          if (50000 < uVar17) {
            uVar4 = local_188._2_6_;
            local_188 = CONCAT62(local_188._2_6_,(short)uVar17);
            uVar11 = local_188;
            riid = (char *)(param_1 + 0x26);
            local_188._4_2_ = SUB62(uVar4,2);
            local_188._6_2_ = SUB62(uVar4,4);
            ((IID *)riid)->Data1 = (undefined4)local_188;
            ((IID *)riid)->Data2 = local_188._4_2_;
            ((IID *)riid)->Data3 = local_188._6_2_;
            param_1[0x27] = CONCAT26(uStack_17a,CONCAT24(0x7b,uVar2));
            iVar7 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
            if (iVar7 == 0) {
              ppvObject = "DB Result Queue push error";
              riid = "DBResultQueue_Error.Log";
              FUN_1400a0b40(param_1[0x23]);
            }
            uVar17 = 0x10;
            uStack_17a = 0;
            puVar16 = puVar14;
            local_188 = uVar11;
          }
          pIVar3 = local_138;
          if (local_138 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          HVar8 = (*local_138->lpVtbl[0xc].QueryInterface)(local_138,(IID *)riid,(void **)ppvObject)
          ;
          if (HVar8 < 0) {
            _com_issue_errorex(HVar8,pIVar3,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_res10[0] == '\0') {
          uStack_17c = 0x7c;
        }
        else {
          puVar14 = (undefined8 *)0x1;
        }
      }
      local_188 = CONCAT62(local_188._2_6_,(short)uVar17);
      param_1[0x26] = local_188;
      param_1[0x27] = CONCAT26(uStack_17a,CONCAT24(uStack_17c,uVar2));
      iVar7 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar7 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar3 = local_138;
      if (local_138 != (IUnknown *)0x0) {
        local_170 = 0;
        UVar6 = (*local_138->lpVtbl[0x12].AddRef)(local_138);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
        }
        pIVar3 = local_138;
        if (local_170 != 0) {
          if (local_138 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar6 = (*local_138->lpVtbl[10].Release)(local_138);
          if ((int)UVar6 < 0) {
            _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_138 != (IUnknown *)0x0) {
          (*local_138->lpVtbl->Release)(local_138);
          local_138 = (IUnknown *)0x0;
        }
      }
      local_d0 = 0;
      local_c8 = &DAT_140281f00;
      local_e0 = &DAT_140281f00;
      local_d8 = 0;
      local_e8 = 0;
      Ordinal_9(local_100);
      Ordinal_9(local_118);
      if (local_130 != (longlong *)0x0) {
        (**(code **)(*local_130 + 0x10))();
      }
      if (local_138 != (IUnknown *)0x0) {
        (*local_138->lpVtbl->Release)(local_138);
      }
      if (local_178 != (longlong *)0x0) {
        (**(code **)(*local_178 + 0x10))();
      }
      return puVar14;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 * FUN_1400d90a0(undefined8 *param_1,undefined8 *param_2)

{
  undefined2 uVar1;
  IUnknown *pIVar2;
  undefined6 uVar3;
  IUnknown *This;
  undefined8 uVar4;
  ULONG UVar5;
  int iVar6;
  HRESULT HVar7;
  undefined4 uVar8;
  undefined8 *puVar9;
  undefined8 uVar10;
  longlong *plVar11;
  undefined8 uVar12;
  longlong lVar13;
  char *riid;
  undefined8 *puVar14;
  char *ppvObject;
  undefined8 *puVar15;
  char local_res10 [8];
  longlong *local_res18;
  undefined8 *local_res20;
  uint local_1b8;
  longlong *local_1b0;
  undefined8 local_1a8;
  undefined4 local_1a0;
  undefined2 uStack_19c;
  ushort uStack_19a;
  int local_198;
  LPUNKNOWN local_190;
  undefined4 local_188;
  undefined4 local_184;
  undefined4 local_180;
  undefined4 local_17c;
  undefined4 local_178;
  undefined8 *local_170;
  IUnknown *local_168;
  longlong *local_160;
  undefined4 local_158;
  undefined1 local_148 [24];
  undefined1 local_130 [24];
  undefined4 local_118;
  undefined1 *local_110;
  undefined4 local_108;
  undefined8 local_100;
  undefined1 *local_f8;
  short local_e8 [4];
  undefined2 local_e0;
  longlong *local_d0;
  longlong *local_c8;
  longlong *local_c0;
  undefined8 *local_b8;
  longlong *local_b0;
  undefined8 *local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined1 local_80 [8];
  undefined1 local_78 [16];
  undefined1 local_68 [24];
  IID local_50;
  
  local_90 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  puVar14 = (undefined8 *)0x0;
  local_170 = param_2;
  if ((pIVar2 != (IUnknown *)0x0) && (UVar5 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2), (int)UVar5 < 0)
     ) {
    _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f08);
  }
  iVar6 = FUN_1400a1e90(param_1);
  if (iVar6 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return (undefined8 *)0x0;
  }
  local_1a0 = *(undefined4 *)(param_2 + 1);
  local_1a8._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_1a8._0_4_ = CONCAT22(0x234e,(short)*param_2);
  puVar15 = (undefined8 *)0x0;
  uStack_19c = 0x7b;
  uStack_19a = 0;
  local_1b8 = 0x10;
  local_1b0 = (longlong *)0x0;
  iVar6 = FUN_140001970(&local_1b0);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  local_168 = (IUnknown *)0x0;
  local_160 = (longlong *)0x0;
  Ordinal_8(local_148);
  Ordinal_8(local_130);
  pIVar2 = local_168;
  if ((local_168 != (IUnknown *)0x0) && (local_168 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_f8 = &DAT_140281f00;
  local_110 = &DAT_140281f00;
  local_108 = 0;
  local_100 = 0;
  if (local_168 != (IUnknown *)0x0) {
    (*local_168->lpVtbl->Release)(local_168);
  }
  HVar7 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_190);
  if (-1 < HVar7) {
    HVar7 = OleRun(local_190);
    if (-1 < HVar7) {
      HVar7 = (*local_190->lpVtbl->QueryInterface)(local_190,(IID *)&DAT_140281f68,&local_168);
    }
    (*local_190->lpVtbl->Release)(local_190);
    if (-1 < HVar7) goto LAB_1400d9291;
  }
  local_168 = (IUnknown *)0x0;
LAB_1400d9291:
  local_118 = 2;
  local_158 = 1;
  local_res10[0] = '\x01';
  puVar9 = (undefined8 *)FUN_140001f20(*param_1,&local_c8);
  FUN_140001710(&local_1b0,*puVar9,"dbo.up_read_guild_server");
  if (local_c8 != (longlong *)0x0) {
    (**(code **)(*local_c8 + 0x10))();
  }
  local_res18 = (longlong *)&local_188;
  uVar1 = *(undefined2 *)((longlong)param_2 + 0xe);
  Ordinal_8(&local_188);
  if ((short)local_188 != 0x12) {
    iVar6 = Ordinal_9(&local_188);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_188 = CONCAT22(local_188._2_2_,0x12);
  }
  local_180 = CONCAT22(local_180._2_2_,uVar1);
  puVar9 = operator_new(0x18);
  local_b8 = puVar14;
  local_res20 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar10 = FUN_140201490("group_id");
    *puVar9 = uVar10;
    local_b8 = puVar9;
  }
  if (local_b8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_1b0,local_78,&local_b8,2,1,2,&local_188);
  local_res18 = plVar11;
  if (local_1b0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_1b0,&local_d0);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_d0 != (longlong *)0x0) {
    (**(code **)(*local_d0 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_res18 = (longlong *)local_e8;
  uVar1 = *(undefined2 *)(param_2 + 2);
  Ordinal_8(local_e8);
  if (local_e8[0] != 0x12) {
    iVar6 = Ordinal_9(local_e8);
    if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar6);
    }
    local_e8[0] = 0x12;
  }
  local_e0 = uVar1;
  puVar9 = operator_new(0x18);
  local_a8 = puVar14;
  local_res20 = puVar9;
  if (puVar9 != (undefined8 *)0x0) {
    puVar9[1] = 0;
    *(undefined4 *)(puVar9 + 2) = 1;
    uVar10 = FUN_140201490("server");
    *puVar9 = uVar10;
    local_a8 = puVar9;
  }
  if (local_a8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_1b0,local_80,&local_a8,2,1,2,local_e8);
  local_res18 = plVar11;
  if (local_1b0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_1b0,&local_b0);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar5 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_b0 != (longlong *)0x0) {
      (**(code **)(*local_b0 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    puVar9 = (undefined8 *)FUN_1400016d0(&local_1b0,&local_c0);
    This = local_168;
    pIVar2 = (IUnknown *)*puVar9;
    if (local_168 != pIVar2) {
      local_168 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_c0 != (longlong *)0x0) {
      (**(code **)(*local_c0 + 0x10))();
    }
    pIVar2 = local_168;
    if (local_168 != (IUnknown *)0x0) {
      local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffffffff0000);
      UVar5 = (*local_168->lpVtbl[6].Release)(local_168);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_res18 == -1) {
        uStack_19c = 0x7e;
        puVar14 = (undefined8 *)0x0;
      }
      else {
        while( true ) {
          pIVar2 = local_168;
          if (local_168 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          local_res20 = (undefined8 *)((ulonglong)local_res20 & 0xffffffffffff0000);
          UVar5 = (*local_168->lpVtbl[6].Release)(local_168);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
          }
          if ((short)local_res20 == -1) break;
          local_188 = 0;
          local_184 = 0;
          local_180 = 0;
          local_17c = 0;
          local_178 = 0;
          uVar10 = FUN_140002290(&local_168,local_68,"guild_id",local_res10);
          FUN_1400625d0(uVar10,&local_a0);
          uVar4 = local_98;
          uVar10 = local_a0;
          Ordinal_9(local_68);
          ppvObject = "room_id";
          riid = (char *)&local_50;
          uVar12 = FUN_140002290(&local_168,riid,"room_id",local_res10);
          FUN_140182560(uVar12);
          uVar8 = FUN_140062550(uVar12);
          Ordinal_9(&local_50);
          lVar13 = (longlong)(int)local_1b8;
          *(undefined8 *)(lVar13 + 0x130 + (longlong)param_1) = uVar10;
          *(undefined8 *)(lVar13 + 0x138 + (longlong)param_1) = uVar4;
          *(undefined4 *)(lVar13 + 0x140 + (longlong)param_1) = uVar8;
          local_1b8 = local_1b8 + 0x14;
          uStack_19a = (short)puVar15 + 1;
          puVar15 = (undefined8 *)(ulonglong)uStack_19a;
          if (50000 < local_1b8) {
            uVar3 = local_1a8._2_6_;
            local_1a8 = CONCAT62(local_1a8._2_6_,(short)local_1b8);
            uVar10 = local_1a8;
            riid = (char *)(param_1 + 0x26);
            local_1a8._4_2_ = SUB62(uVar3,2);
            local_1a8._6_2_ = SUB62(uVar3,4);
            ((IID *)riid)->Data1 = (undefined4)local_1a8;
            ((IID *)riid)->Data2 = local_1a8._4_2_;
            ((IID *)riid)->Data3 = local_1a8._6_2_;
            param_1[0x27] = CONCAT26(uStack_19a,CONCAT24(uStack_19c,local_1a0));
            local_1a8 = uVar10;
            iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
            if (iVar6 == 0) {
              ppvObject = "DB Result Queue push error";
              riid = "DBResultQueue_Error.Log";
              FUN_1400a0b40(param_1[0x23]);
            }
            local_1b8 = 0x10;
            uStack_19a = 0;
            puVar15 = puVar14;
          }
          pIVar2 = local_168;
          if (local_168 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          HVar7 = (*local_168->lpVtbl[0xc].QueryInterface)(local_168,(IID *)riid,(void **)ppvObject)
          ;
          if (HVar7 < 0) {
            _com_issue_errorex(HVar7,pIVar2,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_res10[0] == '\0') {
          uStack_19c = 0x7c;
        }
        else {
          puVar14 = (undefined8 *)0x1;
        }
      }
      local_1a8 = CONCAT62(local_1a8._2_6_,(short)local_1b8);
      param_1[0x26] = local_1a8;
      param_1[0x27] = CONCAT26(uStack_19a,CONCAT24(uStack_19c,local_1a0));
      iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar6 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar2 = local_168;
      if (local_168 != (IUnknown *)0x0) {
        local_198 = 0;
        UVar5 = (*local_168->lpVtbl[0x12].AddRef)(local_168);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
        }
        pIVar2 = local_168;
        if (local_198 != 0) {
          if (local_168 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar5 = (*local_168->lpVtbl[10].Release)(local_168);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_168 != (IUnknown *)0x0) {
          (*local_168->lpVtbl->Release)(local_168);
          local_168 = (IUnknown *)0x0;
        }
      }
      local_100 = 0;
      local_f8 = &DAT_140281f00;
      local_110 = &DAT_140281f00;
      local_108 = 0;
      local_118 = 0;
      Ordinal_9(local_130);
      Ordinal_9(local_148);
      if (local_160 != (longlong *)0x0) {
        (**(code **)(*local_160 + 0x10))();
      }
      if (local_168 != (IUnknown *)0x0) {
        (*local_168->lpVtbl->Release)(local_168);
      }
      if (local_1b0 != (longlong *)0x0) {
        (**(code **)(*local_1b0 + 0x10))();
      }
      return puVar14;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400d9a30(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  undefined2 uVar3;
  ULONG UVar4;
  int iVar5;
  HRESULT HVar6;
  undefined8 *puVar7;
  wchar_t *pwVar8;
  longlong lVar9;
  undefined4 *puVar10;
  longlong *plVar11;
  undefined8 uVar12;
  undefined8 uVar13;
  wchar_t *pwVar14;
  wchar_t *pwVar15;
  undefined1 auStackY_8c8 [32];
  char local_888 [8];
  longlong *local_880;
  short local_878;
  int local_874;
  wchar_t *local_870;
  wchar_t *local_868;
  undefined8 *local_860;
  wchar_t *local_858;
  wchar_t *local_850;
  wchar_t *local_848;
  wchar_t *local_840;
  wchar_t *local_838;
  wchar_t *local_830;
  wchar_t *local_828;
  LPUNKNOWN local_820;
  wchar_t *local_818 [2];
  IUnknown *local_808;
  longlong *local_800;
  undefined4 local_7f8;
  undefined1 local_7e8 [24];
  undefined1 local_7d0 [24];
  undefined4 local_7b8;
  undefined1 *local_7b0;
  undefined4 local_7a8;
  undefined8 local_7a0;
  undefined1 *local_798;
  undefined8 *local_788;
  undefined8 *local_780;
  wchar_t *local_778;
  longlong *local_770;
  longlong local_768;
  undefined2 local_760;
  wchar_t local_750 [4];
  undefined2 local_748;
  longlong *local_738;
  wchar_t *local_730;
  wchar_t *local_728;
  longlong *local_720;
  wchar_t *local_718;
  wchar_t *local_710;
  longlong *local_708;
  longlong *local_700;
  longlong *local_6f8;
  wchar_t *local_6f0;
  wchar_t *local_6e8;
  longlong *local_6e0;
  longlong *local_6d8;
  wchar_t *local_6d0;
  wchar_t *local_6c8;
  longlong *local_6c0;
  undefined8 local_6b8;
  undefined1 local_6b0;
  undefined8 local_6a8;
  undefined1 local_6a0;
  undefined8 local_698;
  undefined1 local_690;
  undefined8 local_688;
  undefined1 local_680;
  undefined8 local_678;
  undefined1 local_670;
  undefined8 local_668;
  undefined1 local_660;
  undefined8 local_658;
  undefined1 local_650;
  undefined8 local_648;
  undefined1 local_640;
  undefined8 local_638;
  undefined1 local_630;
  undefined8 local_628;
  undefined1 local_620;
  undefined8 local_618;
  undefined1 local_610;
  undefined8 local_608;
  undefined1 local_600;
  undefined8 local_5f8;
  undefined8 local_5f0;
  undefined8 local_5e8;
  undefined8 local_5e0;
  wchar_t local_5d8 [12];
  wchar_t local_5c0 [16];
  undefined8 local_5a0;
  undefined1 local_598 [16];
  undefined4 local_588;
  undefined4 uStack_584;
  undefined4 uStack_580;
  undefined4 uStack_57c;
  undefined4 local_568;
  undefined4 uStack_564;
  undefined4 uStack_560;
  undefined4 uStack_55c;
  wchar_t local_558 [12];
  undefined1 local_540 [24];
  wchar_t local_528 [12];
  undefined1 local_510 [24];
  wchar_t local_4f8 [12];
  undefined1 local_4e0 [24];
  undefined1 local_4c8 [24];
  undefined1 local_4b0 [24];
  undefined1 local_498 [24];
  undefined1 local_480 [24];
  undefined1 local_468 [24];
  undefined1 local_450 [24];
  wchar_t local_438 [12];
  undefined1 local_420 [24];
  undefined1 local_408 [24];
  undefined1 local_3f0 [24];
  undefined1 local_3d8 [24];
  undefined1 local_3c0 [24];
  undefined1 local_3a8 [24];
  undefined1 local_390 [24];
  undefined4 local_378;
  undefined4 uStack_374;
  undefined4 local_370;
  undefined2 local_36c;
  undefined8 local_36a;
  undefined8 local_362;
  wchar_t local_35a [19];
  undefined2 local_334;
  undefined8 local_332;
  undefined8 local_32a;
  undefined8 local_322;
  undefined4 local_31a;
  undefined4 local_316;
  undefined2 local_312;
  wchar_t local_310 [99];
  undefined2 local_24a;
  wchar_t local_248 [199];
  undefined2 local_ba;
  undefined2 auStack_b8 [8];
  undefined2 local_a8;
  undefined2 local_a6;
  undefined2 local_a4;
  undefined1 local_a2;
  undefined4 local_a1;
  wchar_t local_9d [12];
  ulonglong local_85;
  undefined4 local_7d;
  char local_78 [64];
  ulonglong local_38;
  
  local_5a0 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_8c8;
  pIVar2 = *(IUnknown **)*param_1;
  pwVar15 = (wchar_t *)0x0;
  local_860 = param_1;
  local_788 = param_2;
  local_780 = param_1;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_1400d9acf:
    iVar5 = FUN_1400a1e90(param_1);
    if (iVar5 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (wchar_t *)0x0;
    }
  }
  else {
    local_874 = 0;
    UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_874 == 0) goto LAB_1400d9acf;
  }
  local_880 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_880);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_808 = (IUnknown *)0x0;
  local_800 = (longlong *)0x0;
  Ordinal_8(local_7e8);
  Ordinal_8(local_7d0);
  pIVar2 = local_808;
  if ((local_808 != (IUnknown *)0x0) && (local_808 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_798 = &DAT_140281f00;
  local_7b0 = &DAT_140281f00;
  local_7a8 = 0;
  local_7a0 = 0;
  if (local_808 != (IUnknown *)0x0) {
    (*local_808->lpVtbl->Release)(local_808);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_820);
  if (-1 < HVar6) {
    HVar6 = OleRun(local_820);
    if (-1 < HVar6) {
      HVar6 = (*local_820->lpVtbl->QueryInterface)(local_820,(IID *)&DAT_140281f68,&local_808);
    }
    (*local_820->lpVtbl->Release)(local_820);
    if (-1 < HVar6) goto LAB_1400d9c1a;
  }
  local_808 = (IUnknown *)0x0;
LAB_1400d9c1a:
  local_7b8 = 2;
  local_7f8 = 1;
  local_888[0] = '\x01';
  FUN_14004f0e0(&local_36a);
  local_7d = 0;
  local_9d[0] = L'\0';
  local_9d[1] = L'\0';
  local_9d[2] = L'\0';
  local_9d[3] = L'\0';
  local_9d[4] = L'\0';
  local_9d[5] = L'\0';
  local_9d[6] = L'\0';
  local_9d[7] = L'\0';
  local_9d[8] = L'\0';
  local_9d[9] = L'\0';
  local_9d[10] = L'\0';
  local_9d[0xb] = L'\0';
  local_85 = 0;
  local_370 = *(undefined4 *)(param_2 + 1);
  _local_378 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23300000);
  local_36c = 0xbb;
  _local_378 = CONCAT62(stack0xfffffffffffffc8a,0x2ff);
  local_a1 = *(undefined4 *)((longlong)param_2 + 0x72);
  wcsncpy(local_9d,(wchar_t *)((longlong)param_2 + 0x3a),0xf);
  local_85 = local_85 & 0xffffffffffff;
  local_7d = *(undefined4 *)((longlong)param_2 + 0x76);
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_700);
  FUN_140001710(&local_880,*puVar7,"dbo.up_create_guild");
  if (local_700 != (longlong *)0x0) {
    (**(code **)(*local_700 + 0x10))();
  }
  local_850 = local_558;
  FUN_1400623f0(local_558,(longlong)param_2 + 0x12);
  pwVar8 = operator_new(0x18);
  local_6e8 = pwVar15;
  local_778 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("guild_name");
    *(longlong *)pwVar8 = lVar9;
    local_6e8 = pwVar8;
  }
  if (local_6e8 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar8 = (wchar_t *)FUN_140001880(&local_880,&local_848,&local_6e8,0xca);
  local_850 = pwVar8;
  if (local_880 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_880,&local_708);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_708 != (longlong *)0x0) {
    (**(code **)(*local_708 + 0x10))();
  }
  if (*(longlong **)pwVar8 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar8 + 0x10))();
  }
  local_848 = local_528;
  local_588 = *(undefined4 *)((longlong)param_2 + 0x5a);
  uStack_584 = *(undefined4 *)((longlong)param_2 + 0x5e);
  uStack_580 = *(undefined4 *)((longlong)param_2 + 0x62);
  uStack_57c = *(undefined4 *)((longlong)param_2 + 0x66);
  FUN_140062280(local_528,&local_588);
  pwVar8 = operator_new(0x18);
  local_6c8 = pwVar15;
  local_850 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("character_id");
    *(longlong *)pwVar8 = lVar9;
    local_6c8 = pwVar8;
  }
  if (local_6c8 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar8 = (wchar_t *)FUN_140001880(&local_880,&local_830,&local_6c8,0xca);
  local_848 = pwVar8;
  if (local_880 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_880,&local_6f8);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_6f8 != (longlong *)0x0) {
    (**(code **)(*local_6f8 + 0x10))();
  }
  if (*(longlong **)pwVar8 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar8 + 0x10))();
  }
  local_830 = local_438;
  puVar10 = (undefined4 *)FUN_140182810(local_390);
  local_568 = *puVar10;
  uStack_564 = puVar10[1];
  uStack_560 = puVar10[2];
  uStack_55c = puVar10[3];
  FUN_140061f30(local_438,&local_568);
  pwVar8 = operator_new(0x18);
  local_730 = pwVar15;
  local_848 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("guild_id");
    *(longlong *)pwVar8 = lVar9;
    local_730 = pwVar8;
  }
  if (local_730 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar8 = (wchar_t *)FUN_140001880(&local_880,&local_840,&local_730,0xca);
  local_830 = pwVar8;
  if (local_880 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_880,&local_720);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_720 != (longlong *)0x0) {
    (**(code **)(*local_720 + 0x10))();
  }
  if (*(longlong **)pwVar8 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar8 + 0x10))();
  }
  local_840 = local_4f8;
  FUN_1400623f0(local_4f8,(longlong)param_2 + 0x3a);
  pwVar8 = operator_new(0x18);
  local_710 = pwVar15;
  local_830 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("master_name");
    *(longlong *)pwVar8 = lVar9;
    local_710 = pwVar8;
  }
  if (local_710 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar8 = (wchar_t *)FUN_140001880(&local_880,&local_838,&local_710,0xca);
  local_840 = pwVar8;
  if (local_880 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_880,&local_738);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_738 != (longlong *)0x0) {
      (**(code **)(*local_738 + 0x10))();
    }
    if (*(longlong **)pwVar8 != (longlong *)0x0) {
      (**(code **)(**(longlong **)pwVar8 + 0x10))();
    }
    local_838 = local_5d8;
    uVar1 = *(undefined4 *)((longlong)param_2 + 0x6a);
    Ordinal_8(local_5d8);
    FUN_140062080(local_5d8,uVar1);
    pwVar8 = operator_new(0x18);
    local_6f0 = pwVar15;
    local_840 = pwVar8;
    if (pwVar8 != (wchar_t *)0x0) {
      pwVar8[4] = L'\0';
      pwVar8[5] = L'\0';
      pwVar8[6] = L'\0';
      pwVar8[7] = L'\0';
      pwVar8[8] = L'\x01';
      pwVar8[9] = L'\0';
      lVar9 = FUN_140201490("cost_money");
      *(longlong *)pwVar8 = lVar9;
      local_6f0 = pwVar8;
    }
    if (local_6f0 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    pwVar8 = (wchar_t *)FUN_140001880(&local_880,&local_828,&local_6f0,3);
    local_838 = pwVar8;
    if (local_880 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_880,&local_6e0);
    pIVar2 = (IUnknown *)*puVar7;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_6e0 != (longlong *)0x0) {
      (**(code **)(*local_6e0 + 0x10))();
    }
    if (*(longlong **)pwVar8 != (longlong *)0x0) {
      (**(code **)(**(longlong **)pwVar8 + 0x10))();
    }
    local_828 = local_750;
    uVar3 = *(undefined2 *)(param_2 + 2);
    Ordinal_8(local_750);
    if (local_750[0] != L'\x12') {
      iVar5 = Ordinal_9(local_750);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_750[0] = L'\x12';
    }
    local_748 = uVar3;
    pwVar8 = operator_new(0x18);
    local_6d0 = pwVar15;
    local_838 = pwVar8;
    if (pwVar8 != (wchar_t *)0x0) {
      pwVar8[4] = L'\0';
      pwVar8[5] = L'\0';
      pwVar8[6] = L'\0';
      pwVar8[7] = L'\0';
      pwVar8[8] = L'\x01';
      pwVar8[9] = L'\0';
      lVar9 = FUN_140201490("server");
      *(longlong *)pwVar8 = lVar9;
      local_6d0 = pwVar8;
    }
    if (local_6d0 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    pwVar8 = (wchar_t *)FUN_140001880(&local_880,local_818,&local_6d0,2);
    local_828 = pwVar8;
    if (local_880 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_880,&local_6c0);
    pIVar2 = (IUnknown *)*puVar7;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_6c0 != (longlong *)0x0) {
        (**(code **)(*local_6c0 + 0x10))();
      }
      if (*(longlong **)pwVar8 != (longlong *)0x0) {
        (**(code **)(**(longlong **)pwVar8 + 0x10))();
      }
      local_818[0] = local_5c0;
      uVar1 = *(undefined4 *)((longlong)param_2 + 0x6e);
      Ordinal_8(local_5c0);
      FUN_140062080(local_5c0,uVar1);
      pwVar8 = operator_new(0x18);
      local_728 = pwVar15;
      local_828 = pwVar8;
      if (pwVar8 != (wchar_t *)0x0) {
        pwVar8[4] = L'\0';
        pwVar8[5] = L'\0';
        pwVar8[6] = L'\0';
        pwVar8[7] = L'\0';
        pwVar8[8] = L'\x01';
        pwVar8[9] = L'\0';
        lVar9 = FUN_140201490("max_member");
        *(longlong *)pwVar8 = lVar9;
        local_728 = pwVar8;
      }
      if (local_728 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      pwVar8 = (wchar_t *)FUN_140001880(&local_880,&local_770,&local_728,3);
      local_818[0] = pwVar8;
      if (local_880 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_880,&local_6d8);
      pIVar2 = (IUnknown *)*puVar7;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_6d8 != (longlong *)0x0) {
        (**(code **)(*local_6d8 + 0x10))();
      }
      if (*(longlong **)pwVar8 != (longlong *)0x0) {
        (**(code **)(**(longlong **)pwVar8 + 0x10))();
      }
      local_770 = &local_768;
      uVar3 = *(undefined2 *)((longlong)param_2 + 0xe);
      Ordinal_8(&local_768);
      if ((short)local_768 != 0x12) {
        iVar5 = Ordinal_9(&local_768);
        if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar5);
        }
        local_768._0_2_ = 0x12;
      }
      local_760 = uVar3;
      pwVar8 = operator_new(0x18);
      local_718 = pwVar15;
      local_818[0] = pwVar8;
      if (pwVar8 != (wchar_t *)0x0) {
        pwVar8[4] = L'\0';
        pwVar8[5] = L'\0';
        pwVar8[6] = L'\0';
        pwVar8[7] = L'\0';
        pwVar8[8] = L'\x01';
        pwVar8[9] = L'\0';
        lVar9 = FUN_140201490("group_id");
        *(longlong *)pwVar8 = lVar9;
        local_718 = pwVar8;
      }
      if (local_718 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar11 = (longlong *)FUN_140001880(&local_880,local_598,&local_718,2);
      local_770 = plVar11;
      if (local_880 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_880,&local_778);
      pIVar2 = (IUnknown *)*puVar7;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_778 != (wchar_t *)0x0) {
          (**(code **)(*(longlong *)local_778 + 0x10))();
        }
        if ((longlong *)*plVar11 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar11 + 0x10))();
        }
        puVar7 = (undefined8 *)FUN_1400016d0(&local_880,&local_850);
        This = local_808;
        pIVar2 = (IUnknown *)*puVar7;
        if (local_808 != pIVar2) {
          local_808 = pIVar2;
          if (pIVar2 != (IUnknown *)0x0) {
            (*pIVar2->lpVtbl->AddRef)(pIVar2);
          }
          if (This != (IUnknown *)0x0) {
            (*This->lpVtbl->Release)(This);
          }
        }
        if (local_850 != (wchar_t *)0x0) {
          (**(code **)(*(longlong *)local_850 + 0x10))();
        }
        pIVar2 = local_808;
        if (local_808 != (IUnknown *)0x0) {
          local_878 = 0;
          UVar4 = (*local_808->lpVtbl[6].Release)(local_808);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
          }
          pwVar8 = pwVar15;
          if (local_878 == -1) {
            local_36c = 0xbd;
          }
          else {
            uVar12 = FUN_140002290(&local_808,local_3c0,"ERROR_CODE",local_888);
            FUN_140182560(uVar12);
            iVar5 = FUN_140062550(uVar12);
            Ordinal_9(local_3c0);
            if (iVar5 == 1) {
              uVar12 = FUN_140002290(&local_808,local_4c8,"guild_id",local_888);
              FUN_1400625d0(uVar12,&local_5f8);
              local_36a = local_5f8;
              local_362 = local_5f0;
              Ordinal_9(local_4c8);
              uVar12 = FUN_140002290(&local_808,local_408,&DAT_140289c8c,local_888);
              FUN_140062840(uVar12,&local_858);
              FUN_1401568c0();
              pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
              if (PTR_DAT_1403200a0 == (undefined *)0x0) {
                pwVar8 = pwVar15;
              }
              if (local_858 != (wchar_t *)PTR_DAT_1403200a0) {
                uVar12 = FUN_1401568c0();
                local_6b0 = 0;
                local_6b8 = uVar12;
                FUN_140156b50(uVar12);
                local_6b0 = 1;
                if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
                   (pwVar8 + -4 != (wchar_t *)0x0)) {
                  uVar13 = FUN_1401568c0();
                  local_670 = 0;
                  local_678 = uVar13;
                  FUN_140156b50(uVar13);
                  local_670 = 1;
                  pwVar14 = pwVar8 + -2;
                  *(int *)pwVar14 = *(int *)pwVar14 + -1;
                  if (*(int *)pwVar14 == 0) {
                    FUN_140156970(pwVar8 + -4);
                  }
                  FUN_140156be0(uVar13);
                }
                pwVar8 = local_858;
                if (((local_858 != (wchar_t *)PTR_DAT_1403200a0) && (local_858 != (wchar_t *)0x0))
                   && (local_858 != (wchar_t *)0x8)) {
                  *(int *)(local_858 + -2) = *(int *)(local_858 + -2) + 1;
                }
                FUN_140156be0(uVar12);
              }
              pwVar14 = pwVar8;
              if (pwVar8 == (wchar_t *)0x0) {
                pwVar14 = (wchar_t *)PTR_DAT_1403200a0;
              }
              wcsncpy(local_35a,pwVar14,0x13);
              if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
                 (pwVar8 + -4 != (wchar_t *)0x0)) {
                uVar12 = FUN_1401568c0();
                local_610 = 0;
                local_618 = uVar12;
                FUN_140156b50(uVar12);
                local_610 = 1;
                pwVar14 = pwVar8 + -2;
                *(int *)pwVar14 = *(int *)pwVar14 + -1;
                if (*(int *)pwVar14 == 0) {
                  FUN_140156970(pwVar8 + -4);
                }
                FUN_140156be0(uVar12);
              }
              if (((local_858 != (wchar_t *)0x0) && (local_858 != (wchar_t *)PTR_DAT_1403200a0)) &&
                 (local_858 + -4 != (wchar_t *)0x0)) {
                uVar12 = FUN_1401568c0();
                local_650 = 0;
                local_658 = uVar12;
                FUN_140156b50(uVar12);
                local_650 = 1;
                pwVar8 = local_858 + -2;
                *(int *)pwVar8 = *(int *)pwVar8 + -1;
                if (*(int *)pwVar8 == 0) {
                  FUN_140156970(local_858 + -4);
                }
                FUN_140156be0(uVar12);
              }
              local_858 = (wchar_t *)PTR_DAT_1403200a0;
              Ordinal_9(local_408);
              local_334 = 0;
              uVar12 = FUN_140002290(&local_808,local_498,"master_id",local_888);
              FUN_1400625d0(uVar12,&local_5e8);
              local_332 = local_5e8;
              local_32a = local_5e0;
              Ordinal_9(local_498);
              uVar12 = FUN_140002290(&local_808,local_3a8,"experience",local_888);
              FUN_140182560(uVar12);
              local_322 = FUN_140182640(uVar12);
              Ordinal_9(local_3a8);
              uVar12 = FUN_140002290(&local_808,local_468,"point",local_888);
              FUN_140182560(uVar12);
              local_31a = FUN_140062550(uVar12);
              Ordinal_9(local_468);
              uVar12 = FUN_140002290(&local_808,local_3d8,"room_id",local_888);
              FUN_140182560(uVar12);
              local_316 = FUN_140062550(uVar12);
              Ordinal_9(local_3d8);
              uVar12 = FUN_140002290(&local_808,local_540,"max_member",local_888);
              FUN_140182560(uVar12);
              local_312 = FUN_140062550(uVar12);
              Ordinal_9(local_540);
              uVar12 = FUN_140002290(&local_808,local_510,"group_id",local_888);
              FUN_140182560(uVar12);
              local_a6 = FUN_140062550(uVar12);
              Ordinal_9(local_510);
              uVar12 = FUN_140002290(&local_808,local_4e0,"server",local_888);
              FUN_140182560(uVar12);
              local_a4 = FUN_140062550(uVar12);
              Ordinal_9(local_4e0);
              uVar12 = FUN_140002290(&local_808,local_4b0,"notice",local_888);
              FUN_140062840(uVar12,&local_868);
              FUN_1401568c0();
              pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
              if (PTR_DAT_1403200a0 == (undefined *)0x0) {
                pwVar8 = pwVar15;
              }
              if (local_868 != (wchar_t *)PTR_DAT_1403200a0) {
                uVar12 = FUN_1401568c0();
                local_630 = 0;
                local_638 = uVar12;
                FUN_140156b50(uVar12);
                local_630 = 1;
                if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
                   (pwVar8 + -4 != (wchar_t *)0x0)) {
                  uVar13 = FUN_1401568c0();
                  local_690 = 0;
                  local_698 = uVar13;
                  FUN_140156b50(uVar13);
                  local_690 = 1;
                  pwVar14 = pwVar8 + -2;
                  *(int *)pwVar14 = *(int *)pwVar14 + -1;
                  if (*(int *)pwVar14 == 0) {
                    FUN_140156970(pwVar8 + -4);
                  }
                  FUN_140156be0(uVar13);
                }
                pwVar8 = local_868;
                if (((local_868 != (wchar_t *)PTR_DAT_1403200a0) && (local_868 != (wchar_t *)0x0))
                   && (local_868 != (wchar_t *)0x8)) {
                  *(int *)(local_868 + -2) = *(int *)(local_868 + -2) + 1;
                }
                FUN_140156be0(uVar12);
              }
              pwVar14 = pwVar8;
              if (pwVar8 == (wchar_t *)0x0) {
                pwVar14 = (wchar_t *)PTR_DAT_1403200a0;
              }
              wcsncpy(local_310,pwVar14,99);
              if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
                 (pwVar8 + -4 != (wchar_t *)0x0)) {
                uVar12 = FUN_1401568c0();
                local_680 = 0;
                local_688 = uVar12;
                FUN_140156b50(uVar12);
                local_680 = 1;
                pwVar14 = pwVar8 + -2;
                *(int *)pwVar14 = *(int *)pwVar14 + -1;
                if (*(int *)pwVar14 == 0) {
                  FUN_140156970(pwVar8 + -4);
                }
                FUN_140156be0(uVar12);
              }
              if (((local_868 != (wchar_t *)0x0) && (local_868 != (wchar_t *)PTR_DAT_1403200a0)) &&
                 (local_868 + -4 != (wchar_t *)0x0)) {
                uVar12 = FUN_1401568c0();
                local_660 = 0;
                local_668 = uVar12;
                FUN_140156b50(uVar12);
                local_660 = 1;
                pwVar8 = local_868 + -2;
                *(int *)pwVar8 = *(int *)pwVar8 + -1;
                if (*(int *)pwVar8 == 0) {
                  FUN_140156970(local_868 + -4);
                }
                FUN_140156be0(uVar12);
              }
              local_868 = (wchar_t *)PTR_DAT_1403200a0;
              Ordinal_9(local_4b0);
              uVar12 = FUN_140002290(&local_808,local_480,&DAT_14028f47c,local_888);
              FUN_140062840(uVar12,&local_870);
              FUN_1401568c0();
              pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
              if (PTR_DAT_1403200a0 == (undefined *)0x0) {
                pwVar8 = pwVar15;
              }
              if (local_870 != (wchar_t *)PTR_DAT_1403200a0) {
                uVar12 = FUN_1401568c0();
                local_6a0 = 0;
                local_6a8 = uVar12;
                FUN_140156b50(uVar12);
                local_6a0 = 1;
                if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
                   (pwVar8 + -4 != (wchar_t *)0x0)) {
                  uVar13 = FUN_1401568c0();
                  local_640 = 0;
                  local_648 = uVar13;
                  FUN_140156b50(uVar13);
                  local_640 = 1;
                  pwVar14 = pwVar8 + -2;
                  *(int *)pwVar14 = *(int *)pwVar14 + -1;
                  if (*(int *)pwVar14 == 0) {
                    FUN_140156970(pwVar8 + -4);
                  }
                  FUN_140156be0(uVar13);
                }
                pwVar8 = local_870;
                if (((local_870 != (wchar_t *)PTR_DAT_1403200a0) && (local_870 != (wchar_t *)0x0))
                   && (local_870 != (wchar_t *)0x8)) {
                  *(int *)(local_870 + -2) = *(int *)(local_870 + -2) + 1;
                }
                FUN_140156be0(uVar12);
              }
              pwVar14 = pwVar8;
              if (pwVar8 == (wchar_t *)0x0) {
                pwVar14 = (wchar_t *)PTR_DAT_1403200a0;
              }
              wcsncpy(local_248,pwVar14,199);
              if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
                 (pwVar8 + -4 != (wchar_t *)0x0)) {
                uVar12 = FUN_1401568c0();
                local_620 = 0;
                local_628 = uVar12;
                FUN_140156b50(uVar12);
                local_620 = 1;
                pwVar14 = pwVar8 + -2;
                *(int *)pwVar14 = *(int *)pwVar14 + -1;
                if (*(int *)pwVar14 == 0) {
                  FUN_140156970(pwVar8 + -4);
                }
                FUN_140156be0(uVar12);
              }
              if (((local_870 != (wchar_t *)0x0) && (local_870 != (wchar_t *)PTR_DAT_1403200a0)) &&
                 (local_870 + -4 != (wchar_t *)0x0)) {
                uVar12 = FUN_1401568c0();
                local_600 = 0;
                local_608 = uVar12;
                FUN_140156b50(uVar12);
                local_600 = 1;
                pwVar8 = local_870 + -2;
                *(int *)pwVar8 = *(int *)pwVar8 + -1;
                if (*(int *)pwVar8 == 0) {
                  FUN_140156970(local_870 + -4);
                }
                FUN_140156be0(uVar12);
              }
              local_870 = (wchar_t *)PTR_DAT_1403200a0;
              Ordinal_9(local_480);
              local_24a = 0;
              local_ba = 0;
              pwVar8 = pwVar15;
              while (iVar5 = (int)pwVar8, iVar5 < 8) {
                sprintf(local_78,"permission%02d",(ulonglong)(iVar5 + 1));
                uVar12 = FUN_140002290(&local_808,local_450,local_78,local_888);
                FUN_140182560(uVar12);
                uVar3 = FUN_140062550(uVar12);
                auStack_b8[iVar5] = uVar3;
                Ordinal_9(local_450);
                pwVar8 = (wchar_t *)(ulonglong)(iVar5 + 1);
              }
              uVar12 = FUN_140002290(&local_808,local_420,"level",local_888);
              FUN_140182560(uVar12);
              local_a8 = FUN_140062550(uVar12);
              Ordinal_9(local_420);
              uVar12 = FUN_140002290(&local_808,local_3f0,"Storage",local_888);
              FUN_140182560(uVar12);
              local_a2 = FUN_1400624d0(uVar12);
              Ordinal_9(local_3f0);
              pwVar8 = (wchar_t *)0x1;
            }
            else {
              local_36c = 0xbc;
            }
            if (local_888[0] == '\0') {
              local_36c = 0xbe;
              pwVar8 = pwVar15;
            }
          }
          puVar7 = local_860;
          iVar5 = FUN_1400a1430(*(undefined8 *)(local_860[0x22] + 0xf0),&local_378);
          if (iVar5 == 0) {
            FUN_1400a0b40(puVar7[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
          }
          pIVar2 = local_808;
          if (local_808 != (IUnknown *)0x0) {
            local_860 = (undefined8 *)((ulonglong)local_860 & 0xffffffff00000000);
            UVar4 = (*local_808->lpVtbl[0x12].AddRef)(local_808);
            if ((int)UVar4 < 0) {
              _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
            }
            pIVar2 = local_808;
            if ((int)local_860 != 0) {
              if (local_808 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(0x80004003);
              }
              UVar4 = (*local_808->lpVtbl[10].Release)(local_808);
              if ((int)UVar4 < 0) {
                _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
              }
            }
            if (local_808 != (IUnknown *)0x0) {
              (*local_808->lpVtbl->Release)(local_808);
              local_808 = (IUnknown *)0x0;
            }
          }
          local_7a0 = 0;
          local_798 = &DAT_140281f00;
          local_7b0 = &DAT_140281f00;
          local_7a8 = 0;
          local_7b8 = 0;
          Ordinal_9(local_7d0);
          Ordinal_9(local_7e8);
          if (local_800 != (longlong *)0x0) {
            (**(code **)(*local_800 + 0x10))();
          }
          if (local_808 != (IUnknown *)0x0) {
            (*local_808->lpVtbl->Release)(local_808);
          }
          if (local_880 != (longlong *)0x0) {
            (**(code **)(*local_880 + 0x10))();
          }
          return pwVar8;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400db380(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_48;
  longlong local_40 [4];
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400db418;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400db418:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_guild_leader_change");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = &local_78;
  local_88 = *(undefined4 *)(param_2 + 0xe);
  uStack_84 = *(undefined4 *)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_78,&local_88);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("guild_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_98[0] = local_40;
  local_78._0_4_ = *(undefined4 *)(param_2 + 0x1e);
  local_78._4_4_ = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_78);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1400db730(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  IUnknown *This;
  ULONG UVar5;
  int iVar6;
  HRESULT HVar7;
  undefined8 *puVar8;
  longlong *plVar9;
  longlong lVar10;
  undefined8 uVar11;
  longlong *plVar12;
  undefined1 auStackY_278 [32];
  undefined1 local_238 [4];
  short local_234;
  longlong *local_230;
  undefined8 *local_228;
  int local_220;
  longlong *local_218;
  LPUNKNOWN local_210;
  longlong *local_208;
  longlong *local_200;
  undefined8 *local_1f8;
  IUnknown *local_1e8;
  longlong *local_1e0;
  undefined4 local_1d8;
  undefined1 local_1c8 [24];
  undefined1 local_1b0 [24];
  undefined4 local_198;
  undefined1 *local_190;
  undefined4 local_188;
  undefined8 local_180;
  undefined1 *local_178;
  longlong *local_168;
  longlong *local_160;
  longlong *local_158;
  longlong *local_150;
  undefined1 local_148 [16];
  undefined8 local_138;
  undefined8 uStack_130;
  undefined8 local_128;
  undefined8 local_118;
  undefined8 uStack_110;
  longlong local_f8 [3];
  longlong local_e0 [3];
  undefined1 local_c8 [32];
  undefined4 local_a8;
  undefined4 uStack_a4;
  undefined4 local_a0;
  undefined2 local_9c;
  undefined4 local_9a;
  undefined4 local_96;
  undefined8 local_92;
  undefined8 local_8a;
  undefined1 local_82;
  undefined4 local_81;
  undefined8 local_7d;
  undefined8 local_75;
  undefined8 local_6d;
  undefined8 local_65;
  ulonglong local_58;
  
  local_128 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStackY_278;
  local_a0 = *(undefined4 *)(param_2 + 1);
  _local_a8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23430000);
  local_9c = 0xec;
  _local_a8 = CONCAT62(stack0xffffffffffffff5a,0x4b);
  local_96 = *(undefined4 *)((longlong)param_2 + 0x12);
  local_9a = *(undefined4 *)((longlong)param_2 + 0xe);
  local_92 = *(undefined8 *)((longlong)param_2 + 0x16);
  local_8a = *(undefined8 *)((longlong)param_2 + 0x1e);
  local_81 = *(undefined4 *)((longlong)param_2 + 0x27);
  local_82 = *(undefined1 *)((longlong)param_2 + 0x26);
  local_7d = *(undefined8 *)((longlong)param_2 + 0x2b);
  local_75 = *(undefined8 *)((longlong)param_2 + 0x33);
  local_6d = *(undefined8 *)((longlong)param_2 + 0x3b);
  local_65 = *(undefined8 *)((longlong)param_2 + 0x43);
  pIVar1 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  local_228 = param_1;
  local_1f8 = param_2;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400db86a:
    iVar6 = FUN_1400a1e90(param_1);
    if (iVar6 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      local_9c = 0xffff;
      iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_a8);
      if (iVar6 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      return (longlong *)0x0;
    }
  }
  else {
    local_220 = 0;
    UVar5 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_220 == 0) goto LAB_1400db86a;
  }
  local_1e8 = (IUnknown *)0x0;
  local_1e0 = (longlong *)0x0;
  Ordinal_8(local_1c8);
  Ordinal_8(local_1b0);
  pIVar1 = local_1e8;
  if ((local_1e8 != (IUnknown *)0x0) && (local_1e8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_180 = 0;
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  HVar7 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_210);
  if (-1 < HVar7) {
    HVar7 = OleRun(local_210);
    if (-1 < HVar7) {
      HVar7 = (*local_210->lpVtbl->QueryInterface)(local_210,(IID *)&DAT_140281f68,&local_1e8);
    }
    (*local_210->lpVtbl->Release)(local_210);
    if (-1 < HVar7) goto LAB_1400db9cc;
  }
  local_1e8 = (IUnknown *)0x0;
LAB_1400db9cc:
  local_198 = 2;
  local_1d8 = 1;
  local_230 = (longlong *)0x0;
  iVar6 = FUN_140001970(&local_230);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  local_238[0] = 1;
  uVar11 = *(undefined8 *)((longlong)param_2 + 0x2b);
  uVar2 = *(undefined8 *)((longlong)param_2 + 0x33);
  uVar3 = *(undefined8 *)((longlong)param_2 + 0x3b);
  uVar4 = *(undefined8 *)((longlong)param_2 + 0x43);
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_160);
  FUN_140001710(&local_230,*puVar8,"dbo.up_guild_member_remove");
  if (local_160 != (longlong *)0x0) {
    (**(code **)(*local_160 + 0x10))();
  }
  local_218 = local_f8;
  local_138 = uVar11;
  uStack_130 = uVar2;
  FUN_140062280(local_f8,&local_138);
  plVar9 = operator_new(0x18);
  local_150 = plVar12;
  local_208 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("guild_id");
    *plVar9 = lVar10;
    local_150 = plVar9;
  }
  if (local_150 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_230,&local_200,&local_150,0xca);
  local_218 = plVar9;
  if (local_230 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_230,&local_158);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_200 = local_e0;
  local_118 = uVar3;
  uStack_110 = uVar4;
  FUN_140062280(local_e0,&local_118);
  plVar9 = operator_new(0x18);
  local_168 = plVar12;
  local_218 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    local_168 = plVar9;
  }
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_230,local_148,&local_168,0xca);
  local_200 = plVar9;
  if (local_230 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_230,&local_208);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar5 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_208 != (longlong *)0x0) {
      (**(code **)(*local_208 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    puVar8 = (undefined8 *)FUN_1400016d0(&local_230,&local_218);
    This = local_1e8;
    pIVar1 = (IUnknown *)*puVar8;
    if (local_1e8 != pIVar1) {
      local_1e8 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_218 != (longlong *)0x0) {
      (**(code **)(*local_218 + 0x10))();
    }
    pIVar1 = local_1e8;
    if (local_1e8 != (IUnknown *)0x0) {
      local_234 = 0;
      UVar5 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_234 == -1) {
        local_9c = 0xfffc;
        plVar9 = plVar12;
      }
      else {
        uVar11 = FUN_140002290(&local_1e8,local_c8,"result_code",local_238);
        FUN_140182560(uVar11);
        iVar6 = FUN_140062550(uVar11);
        Ordinal_9(local_c8);
        plVar9 = (longlong *)0x1;
        if (iVar6 != 1) {
          local_9c = (undefined2)iVar6;
          plVar9 = plVar12;
        }
      }
      iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_a8);
      if (iVar6 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      if (local_230 != (longlong *)0x0) {
        (**(code **)(*local_230 + 0x10))();
      }
      pIVar1 = local_1e8;
      if (local_1e8 != (IUnknown *)0x0) {
        local_228 = (undefined8 *)((ulonglong)local_228 & 0xffffffff00000000);
        UVar5 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_1e8;
        if ((int)local_228 != 0) {
          if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar5 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_1e8 != (IUnknown *)0x0) {
          (*local_1e8->lpVtbl->Release)(local_1e8);
          local_1e8 = (IUnknown *)0x0;
        }
      }
      local_180 = 0;
      local_178 = &DAT_140281f00;
      local_190 = &DAT_140281f00;
      local_188 = 0;
      local_198 = 0;
      Ordinal_9(local_1b0);
      Ordinal_9(local_1c8);
      if (local_1e0 != (longlong *)0x0) {
        (**(code **)(*local_1e0 + 0x10))();
      }
      if (local_1e8 != (IUnknown *)0x0) {
        (*local_1e8->lpVtbl->Release)(local_1e8);
      }
      return plVar9;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400dbf50(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_48;
  longlong local_40 [4];
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400dbfe8;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400dbfe8:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_guild_member_logout_time");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = &local_78;
  local_88 = *(undefined4 *)(param_2 + 0xe);
  uStack_84 = *(undefined4 *)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_78,&local_88);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("guild_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_98[0] = local_40;
  local_78._0_4_ = *(undefined4 *)(param_2 + 0x1e);
  local_78._4_4_ = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_78);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1400dc300(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  IUnknown *This;
  ULONG UVar5;
  int iVar6;
  HRESULT HVar7;
  undefined8 *puVar8;
  longlong *plVar9;
  longlong lVar10;
  undefined8 uVar11;
  longlong *plVar12;
  undefined1 auStackY_258 [32];
  undefined1 local_218 [4];
  short local_214;
  longlong *local_210;
  undefined8 *local_208;
  int local_200;
  longlong *local_1f8;
  LPUNKNOWN local_1f0;
  longlong *local_1e8;
  longlong *local_1e0;
  undefined8 *local_1d8;
  IUnknown *local_1c8;
  longlong *local_1c0;
  undefined4 local_1b8;
  undefined1 local_1a8 [24];
  undefined1 local_190 [24];
  undefined4 local_178;
  undefined1 *local_170;
  undefined4 local_168;
  undefined8 local_160;
  undefined1 *local_158;
  longlong *local_148;
  longlong *local_140;
  longlong *local_138;
  longlong *local_130;
  undefined1 local_128 [16];
  undefined8 local_118;
  undefined8 uStack_110;
  undefined8 local_108;
  undefined8 local_f8;
  undefined8 uStack_f0;
  longlong local_d8 [3];
  longlong local_c0 [3];
  undefined1 local_a8 [24];
  undefined4 local_90;
  undefined4 uStack_8c;
  undefined4 local_88;
  undefined2 local_84;
  undefined4 local_82;
  undefined4 local_7e;
  undefined8 local_7a;
  undefined8 local_72;
  undefined8 local_6a;
  undefined8 local_62;
  ulonglong local_58;
  
  local_108 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStackY_258;
  local_88 = *(undefined4 *)(param_2 + 1);
  _local_90 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x239c0000);
  local_84 = 0xec;
  _local_90 = CONCAT62(stack0xffffffffffffff72,0x36);
  local_7e = *(undefined4 *)((longlong)param_2 + 0x12);
  local_82 = *(undefined4 *)((longlong)param_2 + 0xe);
  local_7a = *(undefined8 *)((longlong)param_2 + 0x16);
  local_72 = *(undefined8 *)((longlong)param_2 + 0x1e);
  local_6a = *(undefined8 *)((longlong)param_2 + 0x26);
  local_62 = *(undefined8 *)((longlong)param_2 + 0x2e);
  pIVar1 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  local_208 = param_1;
  local_1d8 = param_2;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400dc40c:
    iVar6 = FUN_1400a1e90(param_1);
    if (iVar6 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      local_84 = 0xffff;
      iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_90);
      if (iVar6 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      return (longlong *)0x0;
    }
  }
  else {
    local_200 = 0;
    UVar5 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_200 == 0) goto LAB_1400dc40c;
  }
  local_1c8 = (IUnknown *)0x0;
  local_1c0 = (longlong *)0x0;
  Ordinal_8(local_1a8);
  Ordinal_8(local_190);
  pIVar1 = local_1c8;
  if ((local_1c8 != (IUnknown *)0x0) && (local_1c8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_158 = &DAT_140281f00;
  local_170 = &DAT_140281f00;
  local_168 = 0;
  local_160 = 0;
  if (local_1c8 != (IUnknown *)0x0) {
    (*local_1c8->lpVtbl->Release)(local_1c8);
  }
  HVar7 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_1f0);
  if (-1 < HVar7) {
    HVar7 = OleRun(local_1f0);
    if (-1 < HVar7) {
      HVar7 = (*local_1f0->lpVtbl->QueryInterface)(local_1f0,(IID *)&DAT_140281f68,&local_1c8);
    }
    (*local_1f0->lpVtbl->Release)(local_1f0);
    if (-1 < HVar7) goto LAB_1400dc56e;
  }
  local_1c8 = (IUnknown *)0x0;
LAB_1400dc56e:
  local_178 = 2;
  local_1b8 = 1;
  local_210 = (longlong *)0x0;
  iVar6 = FUN_140001970(&local_210);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  local_218[0] = 1;
  uVar11 = *(undefined8 *)((longlong)param_2 + 0x26);
  uVar2 = *(undefined8 *)((longlong)param_2 + 0x2e);
  uVar3 = *(undefined8 *)((longlong)param_2 + 0x16);
  uVar4 = *(undefined8 *)((longlong)param_2 + 0x1e);
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_140);
  FUN_140001710(&local_210,*puVar8,"dbo.up_guild_disband");
  if (local_140 != (longlong *)0x0) {
    (**(code **)(*local_140 + 0x10))();
  }
  local_1f8 = local_d8;
  local_118 = uVar11;
  uStack_110 = uVar2;
  FUN_140062280(local_d8,&local_118);
  plVar9 = operator_new(0x18);
  local_130 = plVar12;
  local_1e8 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("guild_id");
    *plVar9 = lVar10;
    local_130 = plVar9;
  }
  if (local_130 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_210,&local_1e0,&local_130,0xca);
  local_1f8 = plVar9;
  if (local_210 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_210,&local_138);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_138 != (longlong *)0x0) {
    (**(code **)(*local_138 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_1e0 = local_c0;
  local_f8 = uVar3;
  uStack_f0 = uVar4;
  FUN_140062280(local_c0,&local_f8);
  plVar9 = operator_new(0x18);
  local_148 = plVar12;
  local_1f8 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    local_148 = plVar9;
  }
  if (local_148 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_210,local_128,&local_148,0xca);
  local_1e0 = plVar9;
  if (local_210 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_210,&local_1e8);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar5 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_1e8 != (longlong *)0x0) {
      (**(code **)(*local_1e8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    puVar8 = (undefined8 *)FUN_1400016d0(&local_210,&local_1f8);
    This = local_1c8;
    pIVar1 = (IUnknown *)*puVar8;
    if (local_1c8 != pIVar1) {
      local_1c8 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_1f8 != (longlong *)0x0) {
      (**(code **)(*local_1f8 + 0x10))();
    }
    pIVar1 = local_1c8;
    if (local_1c8 != (IUnknown *)0x0) {
      local_214 = 0;
      UVar5 = (*local_1c8->lpVtbl[6].Release)(local_1c8);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_214 == -1) {
        local_84 = 0xfffc;
        plVar9 = plVar12;
      }
      else {
        uVar11 = FUN_140002290(&local_1c8,local_a8,"result_code",local_218);
        FUN_140182560(uVar11);
        iVar6 = FUN_140062550(uVar11);
        Ordinal_9(local_a8);
        plVar9 = (longlong *)0x1;
        if (iVar6 != 1) {
          local_84 = (undefined2)iVar6;
          plVar9 = plVar12;
        }
      }
      iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_90);
      if (iVar6 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      if (local_210 != (longlong *)0x0) {
        (**(code **)(*local_210 + 0x10))();
      }
      pIVar1 = local_1c8;
      if (local_1c8 != (IUnknown *)0x0) {
        local_208 = (undefined8 *)((ulonglong)local_208 & 0xffffffff00000000);
        UVar5 = (*local_1c8->lpVtbl[0x12].AddRef)(local_1c8);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_1c8;
        if ((int)local_208 != 0) {
          if (local_1c8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar5 = (*local_1c8->lpVtbl[10].Release)(local_1c8);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_1c8 != (IUnknown *)0x0) {
          (*local_1c8->lpVtbl->Release)(local_1c8);
          local_1c8 = (IUnknown *)0x0;
        }
      }
      local_160 = 0;
      local_158 = &DAT_140281f00;
      local_170 = &DAT_140281f00;
      local_168 = 0;
      local_178 = 0;
      Ordinal_9(local_190);
      Ordinal_9(local_1a8);
      if (local_1c0 != (longlong *)0x0) {
        (**(code **)(*local_1c0 + 0x10))();
      }
      if (local_1c8 != (IUnknown *)0x0) {
        (*local_1c8->lpVtbl->Release)(local_1c8);
      }
      return plVar9;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1400dcb00(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  ULONG UVar2;
  int iVar3;
  HRESULT HVar4;
  undefined8 *puVar5;
  longlong *plVar6;
  longlong lVar7;
  undefined8 uVar8;
  longlong *plVar9;
  undefined1 auStackY_428 [32];
  longlong *local_3e8;
  undefined1 local_3e0 [4];
  short local_3dc;
  undefined8 *local_3d8;
  int local_3d0;
  longlong *local_3c8;
  longlong *local_3c0;
  longlong *local_3b8;
  longlong *local_3b0;
  LPUNKNOWN local_3a8;
  longlong *local_3a0;
  longlong *local_398;
  undefined8 *local_390;
  longlong *local_388;
  longlong *local_380;
  IUnknown *local_378;
  longlong *local_370;
  undefined4 local_368;
  undefined1 local_358 [24];
  undefined1 local_340 [24];
  undefined4 local_328;
  undefined1 *local_320;
  undefined4 local_318;
  undefined8 local_310;
  undefined1 *local_308;
  longlong *local_2f8;
  longlong *local_2f0;
  longlong *local_2e8;
  longlong *local_2e0;
  longlong *local_2d8;
  longlong *local_2d0;
  longlong *local_2c8;
  longlong *local_2c0;
  longlong *local_2b8;
  longlong *local_2b0;
  longlong *local_2a8;
  longlong *local_2a0;
  longlong *local_298;
  longlong *local_290;
  longlong local_288 [3];
  longlong local_270 [3];
  longlong local_258 [4];
  undefined8 local_238;
  undefined4 local_228;
  undefined4 uStack_224;
  undefined4 uStack_220;
  undefined4 uStack_21c;
  undefined1 local_210 [8];
  undefined4 local_208;
  undefined4 uStack_204;
  undefined4 uStack_200;
  undefined4 uStack_1fc;
  longlong local_1f8 [3];
  undefined1 local_1e0 [24];
  longlong local_1c8 [3];
  longlong local_1b0 [3];
  longlong local_198 [4];
  short local_178;
  short local_176;
  short local_174;
  undefined8 local_172;
  undefined8 local_16a;
  undefined8 uStack_162;
  undefined8 local_15a;
  undefined8 uStack_152;
  wchar_t local_14a [16];
  wchar_t local_12a [17];
  undefined4 local_108;
  undefined4 uStack_104;
  undefined4 local_100;
  undefined2 local_fc;
  undefined8 local_fa;
  undefined8 local_f2;
  undefined8 local_ea;
  undefined8 local_e2;
  undefined8 local_da;
  undefined8 local_d2;
  undefined4 local_ca;
  short local_c6;
  undefined8 local_c4;
  undefined8 local_bc;
  undefined8 local_b4;
  undefined8 local_ac;
  undefined8 local_a4;
  wchar_t local_9c [50];
  ulonglong local_38;
  
  local_238 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_428;
  plVar9 = (longlong *)0x0;
  local_fa = 0;
  local_f2 = 0;
  local_ea = 0;
  local_e2 = 0;
  local_da = 0;
  local_d2 = 0;
  local_ca = 0;
  local_c6 = 0;
  local_c4 = 0;
  local_bc = 0;
  local_b4 = 0;
  local_ac = 0;
  local_a4 = 0;
  local_9c[0] = L'\0';
  local_9c[1] = L'\0';
  local_9c[2] = L'\0';
  local_9c[3] = L'\0';
  local_9c[4] = L'\0';
  local_9c[5] = L'\0';
  local_9c[6] = L'\0';
  local_9c[7] = L'\0';
  local_9c[8] = L'\0';
  local_9c[9] = L'\0';
  local_9c[10] = L'\0';
  local_9c[0xb] = L'\0';
  local_9c[0xc] = L'\0';
  local_9c[0xd] = L'\0';
  local_9c[0xe] = L'\0';
  local_9c[0xf] = L'\0';
  local_9c[0x10] = L'\0';
  local_9c[0x11] = L'\0';
  local_9c[0x12] = L'\0';
  local_9c[0x13] = L'\0';
  local_9c[0x14] = L'\0';
  local_9c[0x15] = L'\0';
  local_9c[0x16] = L'\0';
  local_9c[0x17] = L'\0';
  local_9c[0x18] = L'\0';
  local_9c[0x19] = L'\0';
  local_9c[0x1a] = L'\0';
  local_9c[0x1b] = L'\0';
  local_9c[0x1c] = L'\0';
  local_9c[0x1d] = L'\0';
  local_9c[0x1e] = L'\0';
  local_9c[0x1f] = L'\0';
  local_9c[0x20] = L'\0';
  local_9c[0x21] = L'\0';
  local_9c[0x22] = L'\0';
  local_9c[0x23] = L'\0';
  local_9c[0x24] = L'\0';
  local_9c[0x25] = L'\0';
  local_9c[0x26] = L'\0';
  local_9c[0x27] = L'\0';
  local_9c[0x28] = L'\0';
  local_9c[0x29] = L'\0';
  local_9c[0x2a] = L'\0';
  local_9c[0x2b] = L'\0';
  local_9c[0x2c] = L'\0';
  local_9c[0x2d] = L'\0';
  local_9c[0x2e] = L'\0';
  local_9c[0x2f] = L'\0';
  local_100 = *(undefined4 *)(param_2 + 1);
  _local_108 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23440000);
  local_fc = 0xec;
  _local_108 = CONCAT62(stack0xfffffffffffffefa,0xcc);
  local_178 = *(short *)((longlong)param_2 + 0x3e);
  local_176 = *(short *)(param_2 + 8);
  local_174 = *(short *)((longlong)param_2 + 0x42);
  local_172 = *(undefined8 *)((longlong)param_2 + 0x44);
  local_16a = *(undefined8 *)((longlong)param_2 + 0x4c);
  uStack_162 = *(undefined8 *)((longlong)param_2 + 0x54);
  local_15a = *(undefined8 *)((longlong)param_2 + 0x5c);
  uStack_152 = *(undefined8 *)((longlong)param_2 + 100);
  local_3d8 = param_1;
  local_390 = param_2;
  wcsncpy_s(local_14a,0x10,(wchar_t *)((longlong)param_2 + 0x6c),0xf);
  wcsncpy_s(local_12a,0x10,(wchar_t *)((longlong)param_2 + 0x8c),0xf);
  local_fa = *(undefined8 *)((longlong)param_2 + 0xe);
  local_f2 = *(undefined8 *)((longlong)param_2 + 0x16);
  local_ea = *(undefined8 *)((longlong)param_2 + 0x1e);
  local_e2 = *(undefined8 *)((longlong)param_2 + 0x26);
  local_da = *(undefined8 *)((longlong)param_2 + 0x2e);
  local_d2 = *(undefined8 *)((longlong)param_2 + 0x36);
  local_ca = CONCAT22(local_176,local_178);
  local_c6 = local_174;
  local_c4 = local_172;
  local_bc = local_16a;
  local_b4 = uStack_162;
  local_ac = local_15a;
  local_a4 = uStack_152;
  if (&stack0x00000000 != (undefined1 *)0x14a) {
    wcsncpy_s(local_9c,0x10,local_14a,0xf);
  }
  if (&stack0x00000000 != (undefined1 *)0x12a) {
    wcsncpy_s(local_9c + 0x10,0x10,local_12a,0xf);
  }
  if (*(wchar_t *)((longlong)param_2 + 0xac) != L'\0') {
    wcsncpy_s(local_9c + 0x20,0x10,(wchar_t *)((longlong)param_2 + 0xac),0xf);
  }
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1400dcea2:
    iVar3 = FUN_1400a1e90(param_1);
    if (iVar3 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      local_fc = 0xffff;
      iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_108);
      if (iVar3 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      return (longlong *)0x0;
    }
  }
  else {
    local_3d0 = 0;
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_3d0 == 0) goto LAB_1400dcea2;
  }
  local_3e8 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_3e8);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_378 = (IUnknown *)0x0;
  local_370 = (longlong *)0x0;
  Ordinal_8(local_358);
  Ordinal_8(local_340);
  pIVar1 = local_378;
  if ((local_378 != (IUnknown *)0x0) && (local_378 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_308 = &DAT_140281f00;
  local_320 = &DAT_140281f00;
  local_318 = 0;
  local_310 = 0;
  if (local_378 != (IUnknown *)0x0) {
    (*local_378->lpVtbl->Release)(local_378);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_3a8);
  if (-1 < HVar4) {
    HVar4 = OleRun(local_3a8);
    if (-1 < HVar4) {
      HVar4 = (*local_3a8->lpVtbl->QueryInterface)(local_3a8,(IID *)&DAT_140281f68,&local_378);
    }
    (*local_3a8->lpVtbl->Release)(local_3a8);
    if (-1 < HVar4) goto LAB_1400dd034;
  }
  local_378 = (IUnknown *)0x0;
LAB_1400dd034:
  local_328 = 2;
  local_368 = 1;
  local_3e0[0] = 1;
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_2f8);
  FUN_140001710(&local_3e8,*puVar5,"dbo.up_insert_guild_member");
  if (local_2f8 != (longlong *)0x0) {
    (**(code **)(*local_2f8 + 0x10))();
  }
  local_3c8 = local_1b0;
  local_228 = (undefined4)local_16a;
  uStack_224 = local_16a._4_4_;
  uStack_220 = (undefined4)uStack_162;
  uStack_21c = uStack_162._4_4_;
  FUN_140062280(local_1b0,&local_228);
  plVar6 = operator_new(0x18);
  local_2e8 = plVar9;
  local_388 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("guild_id");
    *plVar6 = lVar7;
    local_2e8 = plVar6;
  }
  if (local_2e8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_3e8,&local_3b0,&local_2e8,0xca);
  local_3c8 = plVar6;
  if (local_3e8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_3e8,&local_2a0);
  pIVar1 = (IUnknown *)*puVar5;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_2a0 != (longlong *)0x0) {
    (**(code **)(*local_2a0 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_3b0 = local_1f8;
  local_208 = (undefined4)local_15a;
  uStack_204 = local_15a._4_4_;
  uStack_200 = (undefined4)uStack_152;
  uStack_1fc = uStack_152._4_4_;
  FUN_140062280(local_1f8,&local_208);
  plVar6 = operator_new(0x18);
  local_2c0 = plVar9;
  local_3c8 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    local_2c0 = plVar6;
  }
  if (local_2c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_3e8,&local_3c0,&local_2c0,0xca);
  local_3b0 = plVar6;
  if (local_3e8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_3e8,&local_290);
  pIVar1 = (IUnknown *)*puVar5;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_290 != (longlong *)0x0) {
    (**(code **)(*local_290 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_3c0 = local_1c8;
  FUN_1400623f0(local_1c8,local_14a);
  plVar6 = operator_new(0x18);
  local_2f0 = plVar9;
  local_3b0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490(&DAT_140289c8c);
    *plVar6 = lVar7;
    local_2f0 = plVar6;
  }
  if (local_2f0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_3e8,&local_3b8,&local_2f0,0xca);
  local_3c0 = plVar6;
  if (local_3e8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_3e8,&local_2d8);
  pIVar1 = (IUnknown *)*puVar5;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_2d8 != (longlong *)0x0) {
    (**(code **)(*local_2d8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_3b8 = local_198;
  FUN_1400623f0(local_198,local_12a);
  plVar6 = operator_new(0x18);
  local_2c8 = plVar9;
  local_3c0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("alias_name");
    *plVar6 = lVar7;
    local_2c8 = plVar6;
  }
  if (local_2c8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_3e8,&local_398,&local_2c8,0xca);
  local_3b8 = plVar6;
  if (local_3e8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_3e8,&local_2b8);
  pIVar1 = (IUnknown *)*puVar5;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_2b8 != (longlong *)0x0) {
    (**(code **)(*local_2b8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_398 = local_288;
  iVar3 = (int)local_176;
  Ordinal_8(local_288);
  FUN_140062080(local_288,iVar3);
  plVar6 = operator_new(0x18);
  local_2b0 = plVar9;
  local_3b8 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("grade");
    *plVar6 = lVar7;
    local_2b0 = plVar6;
  }
  if (local_2b0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_3e8,&local_3a0,&local_2b0,3);
  local_398 = plVar6;
  if (local_3e8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_3e8,&local_2a8);
  pIVar1 = (IUnknown *)*puVar5;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_2a8 != (longlong *)0x0) {
    (**(code **)(*local_2a8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_3a0 = local_270;
  iVar3 = (int)local_178;
  Ordinal_8(local_270);
  FUN_140062080(local_270,iVar3);
  plVar6 = operator_new(0x18);
  local_2e0 = plVar9;
  local_398 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("class");
    *plVar6 = lVar7;
    local_2e0 = plVar6;
  }
  if (local_2e0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_3e8,&local_380,&local_2e0,3);
  local_3a0 = plVar6;
  if (local_3e8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_3e8,&local_298);
  pIVar1 = (IUnknown *)*puVar5;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_298 != (longlong *)0x0) {
      (**(code **)(*local_298 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    local_380 = local_258;
    iVar3 = (int)local_174;
    Ordinal_8(local_258);
    FUN_140062080(local_258,iVar3);
    plVar6 = operator_new(0x18);
    local_2d0 = plVar9;
    local_3a0 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("level");
      *plVar6 = lVar7;
      local_2d0 = plVar6;
    }
    if (local_2d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar6 = (longlong *)FUN_140001880(&local_3e8,local_210,&local_2d0,3);
    local_380 = plVar6;
    if (local_3e8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_3e8,&local_388);
    pIVar1 = (IUnknown *)*puVar5;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_388 != (longlong *)0x0) {
        (**(code **)(*local_388 + 0x10))();
      }
      if ((longlong *)*plVar6 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar6 + 0x10))();
      }
      puVar5 = (undefined8 *)FUN_1400016d0(&local_3e8,&local_3c8);
      This = local_378;
      pIVar1 = (IUnknown *)*puVar5;
      if (local_378 != pIVar1) {
        local_378 = pIVar1;
        if (pIVar1 != (IUnknown *)0x0) {
          (*pIVar1->lpVtbl->AddRef)(pIVar1);
        }
        if (This != (IUnknown *)0x0) {
          (*This->lpVtbl->Release)(This);
        }
      }
      if (local_3c8 != (longlong *)0x0) {
        (**(code **)(*local_3c8 + 0x10))();
      }
      pIVar1 = local_378;
      if (local_378 != (IUnknown *)0x0) {
        local_3dc = 0;
        UVar2 = (*local_378->lpVtbl[6].Release)(local_378);
        if ((int)UVar2 < 0) {
          _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
        }
        if (local_3dc == -1) {
          local_fc = 0xfffc;
          plVar6 = plVar9;
        }
        else {
          uVar8 = FUN_140002290(&local_378,local_1e0,"result_code",local_3e0);
          FUN_140182560(uVar8);
          iVar3 = FUN_140062550(uVar8);
          Ordinal_9(local_1e0);
          plVar6 = (longlong *)0x1;
          if (iVar3 != 1) {
            local_fc = (undefined2)iVar3;
            plVar6 = plVar9;
          }
        }
        iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_108);
        if (iVar3 == 0) {
          FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
        }
        pIVar1 = local_378;
        if (local_378 != (IUnknown *)0x0) {
          local_3d8 = (undefined8 *)((ulonglong)local_3d8 & 0xffffffff00000000);
          UVar2 = (*local_378->lpVtbl[0x12].AddRef)(local_378);
          if ((int)UVar2 < 0) {
            _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
          }
          pIVar1 = local_378;
          if ((int)local_3d8 != 0) {
            if (local_378 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            UVar2 = (*local_378->lpVtbl[10].Release)(local_378);
            if ((int)UVar2 < 0) {
              _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
            }
          }
          if (local_378 != (IUnknown *)0x0) {
            (*local_378->lpVtbl->Release)(local_378);
            local_378 = (IUnknown *)0x0;
          }
        }
        local_310 = 0;
        local_308 = &DAT_140281f00;
        local_320 = &DAT_140281f00;
        local_318 = 0;
        local_328 = 0;
        Ordinal_9(local_340);
        Ordinal_9(local_358);
        if (local_370 != (longlong *)0x0) {
          (**(code **)(*local_370 + 0x10))();
        }
        if (local_378 != (IUnknown *)0x0) {
          (*local_378->lpVtbl->Release)(local_378);
        }
        if (local_3e8 != (longlong *)0x0) {
          (**(code **)(*local_3e8 + 0x10))();
        }
        return plVar6;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1400ddbb0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  undefined2 uVar2;
  int iVar3;
  HRESULT HVar4;
  ULONG UVar5;
  undefined8 *puVar6;
  wchar_t *pwVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  wchar_t *pwVar12;
  wchar_t *pwVar13;
  undefined1 auStackY_688 [32];
  char local_648 [4];
  short local_644;
  longlong *local_640;
  undefined8 *local_638;
  int local_630;
  undefined8 *local_628;
  wchar_t *local_620;
  wchar_t *local_618;
  wchar_t *local_610;
  LPUNKNOWN local_608;
  longlong *local_600;
  IUnknown *local_5f8;
  longlong *local_5f0;
  undefined4 local_5e8;
  undefined1 local_5d8 [24];
  undefined1 local_5c0 [24];
  undefined4 local_5a8;
  undefined1 *local_5a0;
  undefined4 local_598;
  undefined8 local_590;
  undefined1 *local_588;
  wchar_t *local_578;
  longlong *local_570;
  wchar_t *local_568;
  undefined8 local_560;
  undefined1 local_558;
  undefined8 local_550;
  undefined1 local_548;
  undefined8 local_540;
  undefined1 local_538;
  undefined8 local_530;
  undefined1 local_528;
  undefined8 local_520;
  undefined8 local_518;
  undefined8 local_510;
  undefined1 local_508;
  undefined8 local_500;
  undefined1 local_4f8;
  undefined8 local_4f0;
  undefined1 local_4e8;
  undefined8 local_4e0;
  undefined8 local_4d8;
  undefined8 local_4d0;
  undefined1 local_4c8;
  undefined8 local_4c0;
  undefined1 local_4b8;
  undefined8 local_4b0;
  undefined1 local_4a8;
  undefined8 local_4a0;
  undefined1 local_498;
  undefined8 local_490;
  undefined1 local_488;
  undefined8 local_478;
  undefined1 local_470 [16];
  undefined1 local_460 [24];
  undefined1 local_448 [24];
  undefined1 local_430 [24];
  undefined1 local_418 [24];
  undefined1 local_400 [24];
  longlong local_3e8 [3];
  undefined1 local_3d0 [24];
  undefined1 local_3b8 [24];
  undefined1 local_3a0 [24];
  undefined1 local_388 [24];
  undefined1 local_370 [24];
  undefined2 local_358;
  undefined6 uStack_356;
  undefined4 local_350;
  undefined2 local_34c;
  undefined8 local_34a;
  undefined8 local_342;
  wchar_t local_33a [19];
  undefined2 local_314;
  undefined8 local_312;
  undefined8 local_30a;
  undefined8 local_302;
  undefined4 local_2fa;
  undefined4 local_2f6;
  undefined2 local_2f2;
  wchar_t local_2f0 [99];
  undefined2 local_22a;
  wchar_t local_228 [199];
  undefined2 local_9a;
  undefined2 auStack_98 [16];
  char local_78 [64];
  ulonglong local_38;
  
  local_478 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_688;
  pwVar13 = (wchar_t *)0x0;
  local_640 = (longlong *)0x0;
  local_638 = param_1;
  local_628 = param_2;
  iVar3 = FUN_140001970(&local_640);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_5f8 = (IUnknown *)0x0;
  local_5f0 = (longlong *)0x0;
  Ordinal_8(local_5d8);
  Ordinal_8(local_5c0);
  pIVar1 = local_5f8;
  if ((local_5f8 != (IUnknown *)0x0) && (local_5f8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_588 = &DAT_140281f00;
  local_5a0 = &DAT_140281f00;
  local_598 = 0;
  local_590 = 0;
  if (local_5f8 != (IUnknown *)0x0) {
    (*local_5f8->lpVtbl->Release)(local_5f8);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_608);
  if (HVar4 < 0) {
LAB_1400ddd1b:
    local_5f8 = (IUnknown *)0x0;
  }
  else {
    HVar4 = OleRun(local_608);
    if (-1 < HVar4) {
      HVar4 = (*local_608->lpVtbl->QueryInterface)(local_608,(IID *)&DAT_140281f68,&local_5f8);
    }
    (*local_608->lpVtbl->Release)(local_608);
    if (HVar4 < 0) goto LAB_1400ddd1b;
  }
  local_5a8 = 2;
  local_5e8 = 1;
  local_648[0] = '\x01';
  FUN_14004f0e0(&local_34a);
  local_350 = *(undefined4 *)(param_2 + 1);
  local_34c = 0x7f;
  _local_358 = CONCAT62((int6)((ulonglong)*param_2 >> 0x10),0x2d7);
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_630 = 0;
    UVar5 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_630 != 0) goto LAB_1400ddf0c;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_5f8;
    if (local_5f8 != (IUnknown *)0x0) {
      local_628 = (undefined8 *)((ulonglong)local_628 & 0xffffffff00000000);
      UVar5 = (*local_5f8->lpVtbl[0x12].AddRef)(local_5f8);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_5f8;
      if ((int)local_628 != 0) {
        if (local_5f8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar5 = (*local_5f8->lpVtbl[10].Release)(local_5f8);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_5f8 != (IUnknown *)0x0) {
        (*local_5f8->lpVtbl->Release)(local_5f8);
        local_5f8 = (IUnknown *)0x0;
      }
    }
    local_590 = 0;
    local_588 = &DAT_140281f00;
    local_5a0 = &DAT_140281f00;
    local_598 = 0;
    local_5a8 = 0;
    Ordinal_9(local_5c0);
    Ordinal_9(local_5d8);
    if (local_5f0 != (longlong *)0x0) {
      (**(code **)(*local_5f0 + 0x10))();
    }
    if (local_5f8 != (IUnknown *)0x0) {
      (*local_5f8->lpVtbl->Release)(local_5f8);
    }
    if (local_640 != (longlong *)0x0) {
      (**(code **)(*local_640 + 0x10))();
    }
    return 0;
  }
LAB_1400ddf0c:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_570);
  FUN_140001710(&local_640,*puVar6,"dbo.up_is_exist_guild");
  if (local_570 != (longlong *)0x0) {
    (**(code **)(*local_570 + 0x10))();
  }
  local_600 = local_3e8;
  FUN_1400623f0(local_3e8,(longlong)param_2 + 0xe);
  pwVar7 = operator_new(0x18);
  local_568 = pwVar13;
  local_578 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490(&DAT_140289c8c);
    *(longlong *)pwVar7 = lVar8;
    local_568 = pwVar7;
  }
  if (local_568 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_640,local_470,&local_568,0xca);
  local_600 = plVar9;
  if (local_640 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_640,&local_578);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar5 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_578 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_578 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_640,&local_600);
    This = local_5f8;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_5f8 != pIVar1) {
      local_5f8 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_600 != (longlong *)0x0) {
      (**(code **)(*local_600 + 0x10))();
    }
    pIVar1 = local_5f8;
    if (local_5f8 != (IUnknown *)0x0) {
      local_644 = 0;
      UVar5 = (*local_5f8->lpVtbl[6].Release)(local_5f8);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_644 == -1) {
        local_34c = 0x80;
      }
      else {
        uVar10 = FUN_140002290(&local_5f8,local_370,"guild_id",local_648);
        FUN_1400625d0(uVar10,&local_520);
        local_34a = local_520;
        local_342 = local_518;
        Ordinal_9(local_370);
        uVar10 = FUN_140002290(&local_5f8,local_3b8,&DAT_140289c8c,local_648);
        FUN_140062840(uVar10,&local_618);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_618 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_498 = 0;
          local_4a0 = uVar10;
          FUN_140156b50(uVar10);
          local_498 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_4f8 = 0;
            local_500 = uVar11;
            FUN_140156b50(uVar11);
            local_4f8 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_618;
          if (((local_618 != (wchar_t *)PTR_DAT_1403200a0) && (local_618 != (wchar_t *)0x0)) &&
             (local_618 != (wchar_t *)0x8)) {
            *(int *)(local_618 + -2) = *(int *)(local_618 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_33a,pwVar12,0x13);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_4b8 = 0;
          local_4c0 = uVar10;
          FUN_140156b50(uVar10);
          local_4b8 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_618 != (wchar_t *)0x0) && (local_618 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_618 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_558 = 0;
          local_560 = uVar10;
          FUN_140156b50(uVar10);
          local_558 = 1;
          pwVar7 = local_618 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_618 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_618 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_3b8);
        local_314 = 0;
        uVar10 = FUN_140002290(&local_5f8,local_418,"master_id",local_648);
        FUN_1400625d0(uVar10,&local_4e0);
        local_312 = local_4e0;
        local_30a = local_4d8;
        Ordinal_9(local_418);
        uVar10 = FUN_140002290(&local_5f8,local_3a0,"experience",local_648);
        FUN_140182560(uVar10);
        local_302 = FUN_140182640(uVar10);
        Ordinal_9(local_3a0);
        uVar10 = FUN_140002290(&local_5f8,local_460,"point",local_648);
        FUN_140182560(uVar10);
        local_2fa = FUN_140062550(uVar10);
        Ordinal_9(local_460);
        uVar10 = FUN_140002290(&local_5f8,local_388,"room_id",local_648);
        FUN_140182560(uVar10);
        local_2f6 = FUN_140062550(uVar10);
        Ordinal_9(local_388);
        uVar10 = FUN_140002290(&local_5f8,local_448,"max_member",local_648);
        FUN_140182560(uVar10);
        local_2f2 = FUN_140062550(uVar10);
        Ordinal_9(local_448);
        uVar10 = FUN_140002290(&local_5f8,local_430,"notice",local_648);
        FUN_140062840(uVar10,&local_620);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_620 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_528 = 0;
          local_530 = uVar10;
          FUN_140156b50(uVar10);
          local_528 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_508 = 0;
            local_510 = uVar11;
            FUN_140156b50(uVar11);
            local_508 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_620;
          if (((local_620 != (wchar_t *)PTR_DAT_1403200a0) && (local_620 != (wchar_t *)0x0)) &&
             (local_620 != (wchar_t *)0x8)) {
            *(int *)(local_620 + -2) = *(int *)(local_620 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_2f0,pwVar12,99);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_4e8 = 0;
          local_4f0 = uVar10;
          FUN_140156b50(uVar10);
          local_4e8 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_620 != (wchar_t *)0x0) && (local_620 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_620 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_4c8 = 0;
          local_4d0 = uVar10;
          FUN_140156b50(uVar10);
          local_4c8 = 1;
          pwVar7 = local_620 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_620 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_620 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_430);
        uVar10 = FUN_140002290(&local_5f8,local_400,&DAT_14028f47c,local_648);
        FUN_140062840(uVar10,&local_610);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_610 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_4a8 = 0;
          local_4b0 = uVar10;
          FUN_140156b50(uVar10);
          local_4a8 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_488 = 0;
            local_490 = uVar11;
            FUN_140156b50(uVar11);
            local_488 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_610;
          if (((local_610 != (wchar_t *)PTR_DAT_1403200a0) && (local_610 != (wchar_t *)0x0)) &&
             (local_610 != (wchar_t *)0x8)) {
            *(int *)(local_610 + -2) = *(int *)(local_610 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_228,pwVar12,199);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_548 = 0;
          local_550 = uVar10;
          FUN_140156b50(uVar10);
          local_548 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_610 != (wchar_t *)0x0) && (local_610 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_610 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_538 = 0;
          local_540 = uVar10;
          FUN_140156b50(uVar10);
          local_538 = 1;
          pwVar7 = local_610 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_610 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_610 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_400);
        local_22a = 0;
        local_9a = 0;
        while (iVar3 = (int)pwVar13, iVar3 < 8) {
          sprintf(local_78,"permission%02d",(ulonglong)(iVar3 + 1));
          uVar10 = FUN_140002290(&local_5f8,local_3d0,local_78,local_648);
          FUN_140182560(uVar10);
          uVar2 = FUN_140062550(uVar10);
          auStack_98[iVar3] = uVar2;
          Ordinal_9(local_3d0);
          pwVar13 = (wchar_t *)(ulonglong)(iVar3 + 1);
        }
        if (local_648[0] == '\0') {
          local_34c = 0x81;
        }
      }
      iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_358);
      if (iVar3 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_5f8;
      if (local_5f8 != (IUnknown *)0x0) {
        local_638 = (undefined8 *)((ulonglong)local_638 & 0xffffffff00000000);
        UVar5 = (*local_5f8->lpVtbl[0x12].AddRef)(local_5f8);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_5f8;
        if ((int)local_638 != 0) {
          if (local_5f8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar5 = (*local_5f8->lpVtbl[10].Release)(local_5f8);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_5f8 != (IUnknown *)0x0) {
          (*local_5f8->lpVtbl->Release)(local_5f8);
          local_5f8 = (IUnknown *)0x0;
        }
      }
      local_590 = 0;
      local_588 = &DAT_140281f00;
      local_5a0 = &DAT_140281f00;
      local_598 = 0;
      local_5a8 = 0;
      Ordinal_9(local_5c0);
      Ordinal_9(local_5d8);
      if (local_5f0 != (longlong *)0x0) {
        (**(code **)(*local_5f0 + 0x10))();
      }
      if (local_5f8 != (IUnknown *)0x0) {
        (*local_5f8->lpVtbl->Release)(local_5f8);
      }
      if (local_640 != (longlong *)0x0) {
        (**(code **)(*local_640 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400deb10(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  undefined2 uVar2;
  int iVar3;
  HRESULT HVar4;
  ULONG UVar5;
  undefined8 *puVar6;
  wchar_t *pwVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  wchar_t *pwVar12;
  wchar_t *pwVar13;
  undefined1 auStackY_6f8 [32];
  char local_6b8 [4];
  short local_6b4;
  longlong *local_6b0;
  undefined8 *local_6a8;
  int local_6a0;
  undefined8 *local_698;
  wchar_t *local_690;
  wchar_t *local_688;
  wchar_t *local_680;
  LPUNKNOWN local_678;
  longlong *local_670;
  IUnknown *local_668;
  longlong *local_660;
  undefined4 local_658;
  undefined1 local_648 [24];
  undefined1 local_630 [24];
  undefined4 local_618;
  undefined1 *local_610;
  undefined4 local_608;
  undefined8 local_600;
  undefined1 *local_5f8;
  wchar_t *local_5e8;
  longlong *local_5e0;
  wchar_t *local_5d8;
  undefined8 local_5d0;
  undefined1 local_5c8;
  undefined8 local_5c0;
  undefined8 local_5b8;
  undefined8 local_5b0;
  undefined1 local_5a8;
  undefined8 local_5a0;
  undefined1 local_598;
  undefined8 local_590;
  undefined1 local_588;
  undefined8 local_580;
  undefined1 local_578;
  undefined8 local_570;
  undefined1 local_568;
  undefined8 local_560;
  undefined1 local_558;
  undefined8 local_550;
  undefined8 local_548;
  undefined8 local_540;
  undefined1 local_538;
  undefined8 local_530;
  undefined1 local_528;
  undefined8 local_520;
  undefined1 local_518;
  undefined8 local_510;
  undefined1 local_508;
  undefined8 local_500;
  undefined1 local_4f8;
  short local_4f0 [12];
  undefined4 local_4d8;
  undefined4 uStack_4d4;
  undefined4 uStack_4d0;
  undefined4 uStack_4cc;
  undefined1 local_4c8 [16];
  undefined8 local_4b8;
  undefined1 local_4a8 [24];
  undefined1 local_490 [24];
  undefined1 local_478 [24];
  undefined1 local_460 [24];
  undefined1 local_448 [24];
  undefined1 local_430 [24];
  longlong local_418 [3];
  undefined1 local_400 [24];
  undefined1 local_3e8 [24];
  undefined1 local_3d0 [24];
  undefined1 local_3b8 [24];
  undefined1 local_3a0 [24];
  undefined1 local_388 [24];
  undefined1 local_370 [24];
  undefined4 local_358;
  undefined4 uStack_354;
  undefined4 local_350;
  undefined2 local_34c;
  undefined8 local_34a;
  undefined8 local_342;
  wchar_t local_33a [19];
  undefined2 local_314;
  undefined8 local_312;
  undefined8 local_30a;
  undefined8 local_302;
  undefined4 local_2fa;
  undefined4 local_2f6;
  undefined2 local_2f2;
  wchar_t local_2f0 [99];
  undefined2 local_22a;
  wchar_t local_228 [199];
  undefined2 local_9a;
  undefined2 auStack_98 [8];
  undefined2 local_88;
  undefined2 local_86;
  undefined2 local_84;
  undefined1 local_82;
  char local_78 [64];
  ulonglong local_38;
  
  local_4b8 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_6f8;
  pwVar13 = (wchar_t *)0x0;
  local_6b0 = (longlong *)0x0;
  local_6a8 = param_1;
  local_698 = param_2;
  iVar3 = FUN_140001970(&local_6b0);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_668 = (IUnknown *)0x0;
  local_660 = (longlong *)0x0;
  Ordinal_8(local_648);
  Ordinal_8(local_630);
  pIVar1 = local_668;
  if ((local_668 != (IUnknown *)0x0) && (local_668 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_5f8 = &DAT_140281f00;
  local_610 = &DAT_140281f00;
  local_608 = 0;
  local_600 = 0;
  if (local_668 != (IUnknown *)0x0) {
    (*local_668->lpVtbl->Release)(local_668);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_678);
  if (HVar4 < 0) {
LAB_1400dec84:
    local_668 = (IUnknown *)0x0;
  }
  else {
    HVar4 = OleRun(local_678);
    if (-1 < HVar4) {
      HVar4 = (*local_678->lpVtbl->QueryInterface)(local_678,(IID *)&DAT_140281f68,&local_668);
    }
    (*local_678->lpVtbl->Release)(local_678);
    if (HVar4 < 0) goto LAB_1400dec84;
  }
  local_618 = 2;
  local_658 = 1;
  local_6b8[0] = '\x01';
  FUN_14004f0e0(&local_34a);
  local_350 = *(undefined4 *)(param_2 + 1);
  _local_358 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23530000);
  local_34c = 0x82;
  _local_358 = CONCAT62(stack0xfffffffffffffcaa,0x2d7);
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_6a0 = 0;
    UVar5 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_6a0 != 0) goto LAB_1400dee7f;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_668;
    if (local_668 != (IUnknown *)0x0) {
      local_698 = (undefined8 *)((ulonglong)local_698 & 0xffffffff00000000);
      UVar5 = (*local_668->lpVtbl[0x12].AddRef)(local_668);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_668;
      if ((int)local_698 != 0) {
        if (local_668 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar5 = (*local_668->lpVtbl[10].Release)(local_668);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_668 != (IUnknown *)0x0) {
        (*local_668->lpVtbl->Release)(local_668);
        local_668 = (IUnknown *)0x0;
      }
    }
    local_600 = 0;
    local_5f8 = &DAT_140281f00;
    local_610 = &DAT_140281f00;
    local_608 = 0;
    local_618 = 0;
    Ordinal_9(local_630);
    Ordinal_9(local_648);
    if (local_660 != (longlong *)0x0) {
      (**(code **)(*local_660 + 0x10))();
    }
    if (local_668 != (IUnknown *)0x0) {
      (*local_668->lpVtbl->Release)(local_668);
    }
    if (local_6b0 != (longlong *)0x0) {
      (**(code **)(*local_6b0 + 0x10))();
    }
    return (wchar_t *)0x0;
  }
LAB_1400dee7f:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_5e0);
  FUN_140001710(&local_6b0,*puVar6,"dbo.up_read_guild");
  if (local_5e0 != (longlong *)0x0) {
    (**(code **)(*local_5e0 + 0x10))();
  }
  local_670 = local_418;
  local_4d8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_4d4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_4d0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_4cc = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_418,&local_4d8);
  pwVar7 = operator_new(0x18);
  local_5d8 = pwVar13;
  local_5e8 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("guild_id");
    *(longlong *)pwVar7 = lVar8;
    local_5d8 = pwVar7;
  }
  if (local_5d8 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_6b0,local_4c8,&local_5d8,0xca);
  local_670 = plVar9;
  if (local_6b0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_6b0,&local_5e8);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar5 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_5e8 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_5e8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_6b0,&local_670);
    This = local_668;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_668 != pIVar1) {
      local_668 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_670 != (longlong *)0x0) {
      (**(code **)(*local_670 + 0x10))();
    }
    pIVar1 = local_668;
    if (local_668 != (IUnknown *)0x0) {
      local_6b4 = 0;
      UVar5 = (*local_668->lpVtbl[6].Release)(local_668);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_6b4 == -1) {
        local_34c = 0x83;
        pwVar7 = pwVar13;
      }
      else {
        uVar10 = FUN_140002290(&local_668,local_370,"guild_id",local_6b8);
        FUN_1400625d0(uVar10,&local_550);
        local_34a = local_550;
        local_342 = local_548;
        Ordinal_9(local_370);
        uVar10 = FUN_140002290(&local_668,local_478,&DAT_140289c8c,local_6b8);
        FUN_140062840(uVar10,&local_688);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_688 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_588 = 0;
          local_590 = uVar10;
          FUN_140156b50(uVar10);
          local_588 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_508 = 0;
            local_510 = uVar11;
            FUN_140156b50(uVar11);
            local_508 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_688;
          if (((local_688 != (wchar_t *)PTR_DAT_1403200a0) && (local_688 != (wchar_t *)0x0)) &&
             (local_688 != (wchar_t *)0x8)) {
            *(int *)(local_688 + -2) = *(int *)(local_688 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_33a,pwVar12,0x13);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_568 = 0;
          local_570 = uVar10;
          FUN_140156b50(uVar10);
          local_568 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_688 != (wchar_t *)0x0) && (local_688 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_688 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_528 = 0;
          local_530 = uVar10;
          FUN_140156b50(uVar10);
          local_528 = 1;
          pwVar7 = local_688 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_688 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_688 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_478);
        local_314 = 0;
        FUN_140002290(&local_668,local_4f0,"master_id",local_6b8);
        if (local_4f0[0] == 1) {
          local_312 = 0;
          local_5b8 = 0;
        }
        else {
          FUN_1400625d0(local_4f0,&local_5c0);
          local_312 = local_5c0;
        }
        local_30a = local_5b8;
        uVar10 = FUN_140002290(&local_668,local_388,"experience",local_6b8);
        FUN_140182560(uVar10);
        local_302 = FUN_140182640(uVar10);
        Ordinal_9(local_388);
        uVar10 = FUN_140002290(&local_668,local_448,"point",local_6b8);
        FUN_140182560(uVar10);
        local_2fa = FUN_140062550(uVar10);
        Ordinal_9(local_448);
        uVar10 = FUN_140002290(&local_668,local_3b8,"room_id",local_6b8);
        FUN_140182560(uVar10);
        local_2f6 = FUN_140062550(uVar10);
        Ordinal_9(local_3b8);
        uVar10 = FUN_140002290(&local_668,local_4a8,"max_member",local_6b8);
        FUN_140182560(uVar10);
        local_2f2 = FUN_140062550(uVar10);
        Ordinal_9(local_4a8);
        uVar10 = FUN_140002290(&local_668,local_3a0,"notice",local_6b8);
        FUN_140062840(uVar10,&local_690);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_690 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_598 = 0;
          local_5a0 = uVar10;
          FUN_140156b50(uVar10);
          local_598 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_5c8 = 0;
            local_5d0 = uVar11;
            FUN_140156b50(uVar11);
            local_5c8 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_690;
          if (((local_690 != (wchar_t *)PTR_DAT_1403200a0) && (local_690 != (wchar_t *)0x0)) &&
             (local_690 != (wchar_t *)0x8)) {
            *(int *)(local_690 + -2) = *(int *)(local_690 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_2f0,pwVar12,99);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_578 = 0;
          local_580 = uVar10;
          FUN_140156b50(uVar10);
          local_578 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_690 != (wchar_t *)0x0) && (local_690 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_690 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_558 = 0;
          local_560 = uVar10;
          FUN_140156b50(uVar10);
          local_558 = 1;
          pwVar7 = local_690 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_690 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_690 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_3a0);
        uVar10 = FUN_140002290(&local_668,local_3e8,&DAT_14028f47c,local_6b8);
        FUN_140062840(uVar10,&local_680);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_680 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_538 = 0;
          local_540 = uVar10;
          FUN_140156b50(uVar10);
          local_538 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_518 = 0;
            local_520 = uVar11;
            FUN_140156b50(uVar11);
            local_518 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_680;
          if (((local_680 != (wchar_t *)PTR_DAT_1403200a0) && (local_680 != (wchar_t *)0x0)) &&
             (local_680 != (wchar_t *)0x8)) {
            *(int *)(local_680 + -2) = *(int *)(local_680 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_228,pwVar12,199);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_4f8 = 0;
          local_500 = uVar10;
          FUN_140156b50(uVar10);
          local_4f8 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_680 != (wchar_t *)0x0) && (local_680 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_680 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_5a8 = 0;
          local_5b0 = uVar10;
          FUN_140156b50(uVar10);
          local_5a8 = 1;
          pwVar7 = local_680 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_680 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_680 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_3e8);
        local_22a = 0;
        local_9a = 0;
        pwVar7 = pwVar13;
        while (iVar3 = (int)pwVar7, iVar3 < 8) {
          sprintf(local_78,"permission%02d",(ulonglong)(iVar3 + 1));
          uVar10 = FUN_140002290(&local_668,local_490,local_78,local_6b8);
          FUN_140182560(uVar10);
          uVar2 = FUN_140062550(uVar10);
          auStack_98[iVar3] = uVar2;
          Ordinal_9(local_490);
          pwVar7 = (wchar_t *)(ulonglong)(iVar3 + 1);
        }
        uVar10 = FUN_140002290(&local_668,local_460,"level",local_6b8);
        FUN_140182560(uVar10);
        local_88 = FUN_140062550(uVar10);
        Ordinal_9(local_460);
        uVar10 = FUN_140002290(&local_668,local_430,"group_id",local_6b8);
        FUN_140182560(uVar10);
        local_86 = FUN_140062550(uVar10);
        Ordinal_9(local_430);
        uVar10 = FUN_140002290(&local_668,local_400,"server",local_6b8);
        FUN_140182560(uVar10);
        local_84 = FUN_140062550(uVar10);
        Ordinal_9(local_400);
        uVar10 = FUN_140002290(&local_668,local_3d0,"Storage",local_6b8);
        FUN_140182560(uVar10);
        local_82 = FUN_1400624d0(uVar10);
        Ordinal_9(local_3d0);
        Ordinal_9(local_4f0);
        pwVar7 = (wchar_t *)0x1;
        if (local_6b8[0] == '\0') {
          local_34c = 0x84;
          pwVar7 = pwVar13;
        }
      }
      iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_358);
      if (iVar3 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_668;
      if (local_668 != (IUnknown *)0x0) {
        local_6a8 = (undefined8 *)((ulonglong)local_6a8 & 0xffffffff00000000);
        UVar5 = (*local_668->lpVtbl[0x12].AddRef)(local_668);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_668;
        if ((int)local_6a8 != 0) {
          if (local_668 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar5 = (*local_668->lpVtbl[10].Release)(local_668);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_668 != (IUnknown *)0x0) {
          (*local_668->lpVtbl->Release)(local_668);
          local_668 = (IUnknown *)0x0;
        }
      }
      local_600 = 0;
      local_5f8 = &DAT_140281f00;
      local_610 = &DAT_140281f00;
      local_608 = 0;
      local_618 = 0;
      Ordinal_9(local_630);
      Ordinal_9(local_648);
      if (local_660 != (longlong *)0x0) {
        (**(code **)(*local_660 + 0x10))();
      }
      if (local_668 != (IUnknown *)0x0) {
        (*local_668->lpVtbl->Release)(local_668);
      }
      if (local_6b0 != (longlong *)0x0) {
        (**(code **)(*local_6b0 + 0x10))();
      }
      return pwVar7;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400dfbf0(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 *puVar1;
  IUnknown *pIVar2;
  undefined6 uVar3;
  IUnknown *This;
  int iVar4;
  HRESULT HVar5;
  ULONG UVar6;
  undefined8 *puVar7;
  wchar_t *pwVar8;
  longlong lVar9;
  longlong *plVar10;
  undefined8 uVar11;
  undefined8 uVar12;
  wchar_t *pwVar13;
  char *riid;
  short sVar14;
  wchar_t *pwVar15;
  char *ppvObject;
  uint uVar16;
  undefined1 auStackY_398 [32];
  char local_358 [4];
  int local_354;
  uint local_350;
  short local_34c;
  short local_348;
  longlong *local_340;
  int local_338;
  undefined8 local_330;
  undefined4 local_328;
  undefined2 uStack_324;
  undefined1 uStack_322;
  undefined2 uStack_321;
  undefined7 uStack_31f;
  undefined1 uStack_318;
  undefined7 local_317;
  undefined1 uStack_310;
  undefined4 local_30f;
  undefined4 local_30b;
  undefined7 uStack_307;
  undefined1 uStack_300;
  undefined7 uStack_2ff;
  undefined1 uStack_2f8;
  wchar_t *local_2f0;
  undefined8 *local_2e8;
  wchar_t *local_2e0;
  longlong *local_2d8;
  LPUNKNOWN local_2d0;
  IUnknown *local_2c8;
  longlong *local_2c0;
  undefined4 local_2b8;
  undefined1 local_2a8 [24];
  undefined1 local_290 [24];
  undefined4 local_278;
  undefined1 *local_270;
  undefined4 local_268;
  undefined8 local_260;
  undefined1 *local_258;
  wchar_t *local_248;
  undefined8 *local_240;
  undefined8 local_238;
  undefined1 local_230;
  undefined8 local_228;
  undefined1 local_220;
  wchar_t *local_218;
  undefined8 local_210;
  undefined1 local_208;
  undefined8 local_200;
  undefined1 local_1f8;
  undefined8 local_1f0;
  undefined1 local_1e8;
  longlong *local_1e0;
  undefined8 local_1d8;
  undefined1 local_1d0;
  undefined8 local_1c8;
  undefined1 local_1c0;
  undefined8 local_1b8;
  undefined1 local_1b0;
  undefined4 local_1a8;
  undefined4 uStack_1a4;
  undefined4 uStack_1a0;
  undefined4 uStack_19c;
  undefined4 local_198;
  undefined4 uStack_194;
  undefined4 uStack_190;
  undefined4 uStack_18c;
  undefined8 local_188;
  undefined1 local_178 [16];
  undefined1 local_168 [24];
  undefined1 local_150 [24];
  IID local_138;
  undefined1 local_120 [24];
  undefined1 local_108 [24];
  longlong local_f0 [3];
  undefined1 local_d8 [24];
  undefined1 local_c0 [24];
  undefined4 local_a8;
  undefined4 uStack_a4;
  undefined4 uStack_a0;
  undefined4 uStack_9c;
  undefined8 local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  ulonglong uStack_80;
  undefined8 local_78;
  undefined8 uStack_70;
  undefined8 local_68;
  undefined8 uStack_60;
  undefined2 local_58;
  undefined2 uStack_56;
  undefined2 uStack_54;
  undefined2 uStack_52;
  undefined4 uStack_50;
  undefined2 uStack_4c;
  ulonglong local_48;
  
  local_188 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStackY_398;
  pwVar15 = (wchar_t *)0x0;
  local_340 = (longlong *)0x0;
  local_2e8 = param_1;
  local_240 = param_2;
  iVar4 = FUN_140001970(&local_340);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_2c8 = (IUnknown *)0x0;
  local_2c0 = (longlong *)0x0;
  Ordinal_8(local_2a8);
  Ordinal_8(local_290);
  pIVar2 = local_2c8;
  if ((local_2c8 != (IUnknown *)0x0) && (local_2c8 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_258 = &DAT_140281f00;
  local_270 = &DAT_140281f00;
  local_268 = 0;
  local_260 = 0;
  if (local_2c8 != (IUnknown *)0x0) {
    (*local_2c8->lpVtbl->Release)(local_2c8);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_2d0);
  if (HVar5 < 0) {
LAB_1400dfd6d:
    local_2c8 = (IUnknown *)0x0;
  }
  else {
    HVar5 = OleRun(local_2d0);
    if (-1 < HVar5) {
      HVar5 = (*local_2d0->lpVtbl->QueryInterface)(local_2d0,(IID *)&DAT_140281f68,&local_2c8);
    }
    (*local_2d0->lpVtbl->Release)(local_2d0);
    if (HVar5 < 0) goto LAB_1400dfd6d;
  }
  local_278 = 2;
  local_2b8 = 1;
  local_358[0] = '\x01';
  local_328 = *(undefined4 *)(param_2 + 1);
  local_330._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_330._0_4_ = CONCAT22(0x2354,(short)*param_2);
  uStack_324 = 0x85;
  local_30b = *(undefined4 *)((longlong)param_2 + 0x23);
  local_30f = *(undefined4 *)((longlong)param_2 + 0x1f);
  uStack_307 = (undefined7)*(undefined8 *)((longlong)param_2 + 0x27);
  uStack_300 = (undefined1)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x27) >> 0x38);
  uStack_2ff = (undefined7)*(undefined8 *)((longlong)param_2 + 0x2f);
  uStack_2f8 = (undefined1)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x2f) >> 0x38);
  uStack_322 = *(undefined1 *)((longlong)param_2 + 0xe);
  uStack_31f = (undefined7)*(undefined8 *)((longlong)param_2 + 0xf);
  uStack_318 = (undefined1)((ulonglong)*(undefined8 *)((longlong)param_2 + 0xf) >> 0x38);
  local_317 = (undefined7)*(undefined8 *)((longlong)param_2 + 0x17);
  uStack_310 = (undefined1)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x17) >> 0x38);
  local_354 = 0;
  uStack_321._0_1_ = 0;
  uStack_321._1_1_ = 0;
  uVar16 = 0x39;
  local_350 = 0x39;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_338 = 0;
    UVar6 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_338 != 0) goto LAB_1400dffa0;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_2c8;
    if (local_2c8 != (IUnknown *)0x0) {
      local_354 = 0;
      UVar6 = (*local_2c8->lpVtbl[0x12].AddRef)(local_2c8);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_2c8;
      if (local_354 != 0) {
        if (local_2c8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar6 = (*local_2c8->lpVtbl[10].Release)(local_2c8);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_2c8 != (IUnknown *)0x0) {
        (*local_2c8->lpVtbl->Release)(local_2c8);
        local_2c8 = (IUnknown *)0x0;
      }
    }
    local_260 = 0;
    local_258 = &DAT_140281f00;
    local_270 = &DAT_140281f00;
    local_268 = 0;
    local_278 = 0;
    Ordinal_9(local_290);
    Ordinal_9(local_2a8);
    if (local_2c0 != (longlong *)0x0) {
      (**(code **)(*local_2c0 + 0x10))();
    }
    if (local_2c8 != (IUnknown *)0x0) {
      (*local_2c8->lpVtbl->Release)(local_2c8);
    }
    if (local_340 != (longlong *)0x0) {
      (**(code **)(*local_340 + 0x10))();
    }
    return (wchar_t *)0x0;
  }
LAB_1400dffa0:
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_1e0);
  FUN_140001710(&local_340,*puVar7,"dbo.up_read_guild_member");
  if (local_1e0 != (longlong *)0x0) {
    (**(code **)(*local_1e0 + 0x10))();
  }
  local_2d8 = local_f0;
  local_1a8 = *(undefined4 *)((longlong)param_2 + 0xf);
  uStack_1a4 = *(undefined4 *)((longlong)param_2 + 0x13);
  uStack_1a0 = *(undefined4 *)((longlong)param_2 + 0x17);
  uStack_19c = *(undefined4 *)((longlong)param_2 + 0x1b);
  FUN_140062280(local_f0,&local_1a8);
  pwVar8 = operator_new(0x18);
  local_218 = pwVar15;
  local_248 = pwVar8;
  if (pwVar8 != (wchar_t *)0x0) {
    pwVar8[4] = L'\0';
    pwVar8[5] = L'\0';
    pwVar8[6] = L'\0';
    pwVar8[7] = L'\0';
    pwVar8[8] = L'\x01';
    pwVar8[9] = L'\0';
    lVar9 = FUN_140201490("guild_id");
    *(longlong *)pwVar8 = lVar9;
    local_218 = pwVar8;
  }
  if (local_218 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_340,local_178,&local_218,0xca);
  local_2d8 = plVar10;
  if (local_340 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_340,&local_248);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar6 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_248 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_248 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    puVar7 = (undefined8 *)FUN_1400016d0(&local_340,&local_2d8);
    This = local_2c8;
    pIVar2 = (IUnknown *)*puVar7;
    if (local_2c8 != pIVar2) {
      local_2c8 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_2d8 != (longlong *)0x0) {
      (**(code **)(*local_2d8 + 0x10))();
    }
    pIVar2 = local_2c8;
    if (local_2c8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_34c = 0;
    UVar6 = (*local_2c8->lpVtbl[6].Release)(local_2c8);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
    }
    if (local_34c == -1) {
      uStack_324 = 0x86;
      pwVar15 = (wchar_t *)0x0;
      sVar14 = uStack_321;
    }
    else {
      while( true ) {
        pIVar2 = local_2c8;
        if (local_2c8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_348 = 0;
        UVar6 = (*local_2c8->lpVtbl[6].Release)(local_2c8);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
        if (local_348 == -1) break;
        local_a8 = 0;
        uStack_a4 = 0;
        uStack_a0 = 0;
        uStack_9c = 0;
        local_58 = 0;
        uStack_56 = 0;
        uStack_54 = 0;
        uStack_52 = 0;
        uStack_50 = 0;
        uStack_4c = 0;
        local_98 = 0;
        uStack_90 = 0;
        local_88 = 0;
        uStack_80 = 0;
        local_78 = 0;
        uStack_70 = 0;
        local_68 = 0;
        uStack_60 = 0;
        uVar11 = FUN_140002290(&local_2c8,local_108,"character_id",local_358);
        FUN_1400625d0(uVar11,&local_198);
        local_a8 = local_198;
        uStack_a4 = uStack_194;
        uStack_a0 = uStack_190;
        uStack_9c = uStack_18c;
        Ordinal_9(local_108);
        uVar11 = FUN_140002290(&local_2c8,local_d8,"character_name",local_358);
        FUN_140062840(uVar11,&local_2f0);
        FUN_1401568c0();
        pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar8 = pwVar15;
        }
        if (local_2f0 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar11 = FUN_1401568c0();
          local_1f8 = 0;
          local_200 = uVar11;
          FUN_140156b50(uVar11);
          local_1f8 = 1;
          if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar8 + -4 != (wchar_t *)0x0)) {
            uVar12 = FUN_1401568c0();
            local_230 = 0;
            local_238 = uVar12;
            FUN_140156b50(uVar12);
            local_230 = 1;
            pwVar13 = pwVar8 + -2;
            *(int *)pwVar13 = *(int *)pwVar13 + -1;
            if (*(int *)pwVar13 == 0) {
              FUN_140156970(pwVar8 + -4);
            }
            FUN_140156be0(uVar12);
            local_230 = 0;
          }
          pwVar8 = local_2f0;
          if (((local_2f0 != (wchar_t *)PTR_DAT_1403200a0) && (local_2f0 != (wchar_t *)0x0)) &&
             (local_2f0 != (wchar_t *)0x8)) {
            *(int *)(local_2f0 + -2) = *(int *)(local_2f0 + -2) + 1;
          }
          FUN_140156be0(uVar11);
          local_1f8 = 0;
        }
        pwVar13 = pwVar8;
        if (pwVar8 == (wchar_t *)0x0) {
          pwVar13 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy((wchar_t *)&local_98,pwVar13,0xf);
        if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar8 + -4 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_1c0 = 0;
          local_1c8 = uVar11;
          FUN_140156b50(uVar11);
          local_1c0 = 1;
          pwVar13 = pwVar8 + -2;
          *(int *)pwVar13 = *(int *)pwVar13 + -1;
          if (*(int *)pwVar13 == 0) {
            FUN_140156970(pwVar8 + -4);
          }
          FUN_140156be0(uVar11);
          local_1c0 = 0;
        }
        pwVar8 = local_2f0;
        if (((local_2f0 != (wchar_t *)0x0) && (local_2f0 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar13 = local_2f0 + -4, pwVar13 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_220 = 0;
          local_228 = uVar11;
          FUN_140156b50(uVar11);
          local_220 = 1;
          pwVar8 = pwVar8 + -2;
          *(int *)pwVar8 = *(int *)pwVar8 + -1;
          if (*(int *)pwVar8 == 0) {
            FUN_140156970(pwVar13);
          }
          FUN_140156be0(uVar11);
          local_220 = 0;
        }
        local_2f0 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_d8);
        uVar11 = FUN_140002290(&local_2c8,local_168,"alias_name",local_358);
        FUN_140062840(uVar11,&local_2e0);
        FUN_1401568c0();
        pwVar8 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar8 = pwVar15;
        }
        if (local_2e0 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar11 = FUN_1401568c0();
          local_1e8 = 0;
          local_1f0 = uVar11;
          FUN_140156b50(uVar11);
          local_1e8 = 1;
          if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar8 + -4 != (wchar_t *)0x0)) {
            uVar12 = FUN_1401568c0();
            local_208 = 0;
            local_210 = uVar12;
            FUN_140156b50(uVar12);
            local_208 = 1;
            pwVar13 = pwVar8 + -2;
            *(int *)pwVar13 = *(int *)pwVar13 + -1;
            if (*(int *)pwVar13 == 0) {
              FUN_140156970(pwVar8 + -4);
            }
            FUN_140156be0(uVar12);
            local_208 = 0;
          }
          pwVar8 = local_2e0;
          if (((local_2e0 != (wchar_t *)PTR_DAT_1403200a0) && (local_2e0 != (wchar_t *)0x0)) &&
             (local_2e0 != (wchar_t *)0x8)) {
            *(int *)(local_2e0 + -2) = *(int *)(local_2e0 + -2) + 1;
          }
          FUN_140156be0(uVar11);
          local_1e8 = 0;
        }
        pwVar13 = pwVar8;
        if (pwVar8 == (wchar_t *)0x0) {
          pwVar13 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy((wchar_t *)&local_78,pwVar13,0xf);
        if (((pwVar8 != (wchar_t *)0x0) && (pwVar8 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar8 + -4 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_1d0 = 0;
          local_1d8 = uVar11;
          FUN_140156b50(uVar11);
          local_1d0 = 1;
          pwVar13 = pwVar8 + -2;
          *(int *)pwVar13 = *(int *)pwVar13 + -1;
          if (*(int *)pwVar13 == 0) {
            FUN_140156970(pwVar8 + -4);
          }
          FUN_140156be0(uVar11);
          local_1d0 = 0;
        }
        pwVar8 = local_2e0;
        if (((local_2e0 != (wchar_t *)0x0) && (local_2e0 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar13 = local_2e0 + -4, pwVar13 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_1b0 = 0;
          local_1b8 = uVar11;
          FUN_140156b50(uVar11);
          local_1b0 = 1;
          pwVar8 = pwVar8 + -2;
          *(int *)pwVar8 = *(int *)pwVar8 + -1;
          if (*(int *)pwVar8 == 0) {
            FUN_140156970(pwVar13);
          }
          FUN_140156be0(uVar11);
          local_1b0 = 0;
        }
        local_2e0 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_168);
        uStack_80 = uStack_80 & 0xffffffffffff;
        uStack_60 = uStack_60 & 0xffffffffffff;
        uVar11 = FUN_140002290(&local_2c8,local_120,"grade",local_358);
        FUN_140182560(uVar11);
        local_58 = FUN_140062550(uVar11);
        Ordinal_9(local_120);
        uVar11 = FUN_140002290(&local_2c8,local_c0,"class",local_358);
        FUN_140182560(uVar11);
        uStack_56 = FUN_140062550(uVar11);
        Ordinal_9(local_c0);
        uVar11 = FUN_140002290(&local_2c8,local_150,"level",local_358);
        FUN_140182560(uVar11);
        uStack_54 = FUN_140062550(uVar11);
        Ordinal_9(local_150);
        ppvObject = "LTime";
        riid = (char *)&local_138;
        uVar11 = FUN_140002290(&local_2c8,riid,"LTime",local_358);
        FUN_140182560(uVar11);
        uVar11 = FUN_140098d80(uVar11);
        uStack_52 = (undefined2)uVar11;
        uStack_50 = (undefined4)((ulonglong)uVar11 >> 0x10);
        uStack_4c = (undefined2)((ulonglong)uVar11 >> 0x30);
        Ordinal_9(&local_138);
        lVar9 = (longlong)(int)uVar16;
        puVar7 = (undefined8 *)(lVar9 + 0x130 + (longlong)param_1);
        *puVar7 = CONCAT44(uStack_a4,local_a8);
        puVar7[1] = CONCAT44(uStack_9c,uStack_a0);
        puVar7 = (undefined8 *)(lVar9 + 0x140 + (longlong)param_1);
        *puVar7 = local_98;
        puVar7[1] = uStack_90;
        puVar7 = (undefined8 *)(lVar9 + 0x150 + (longlong)param_1);
        *puVar7 = local_88;
        puVar7[1] = uStack_80;
        puVar7 = (undefined8 *)(lVar9 + 0x160 + (longlong)param_1);
        *puVar7 = local_78;
        puVar7[1] = uStack_70;
        puVar1 = (undefined4 *)(lVar9 + 0x170 + (longlong)param_1);
        *puVar1 = (undefined4)local_68;
        puVar1[1] = local_68._4_4_;
        puVar1[2] = (undefined4)uStack_60;
        puVar1[3] = uStack_60._4_4_;
        *(ulonglong *)(lVar9 + 0x180 + (longlong)param_1) =
             CONCAT26(uStack_52,CONCAT24(uStack_54,CONCAT22(uStack_56,local_58)));
        *(undefined4 *)(lVar9 + 0x188 + (longlong)param_1) = uStack_50;
        *(undefined2 *)(lVar9 + 0x18c + (longlong)param_1) = uStack_4c;
        local_350 = uVar16 + 0x5e;
        sVar14 = (short)local_354 + 1;
        local_354 = CONCAT22((short)((uint)local_354 >> 0x10),sVar14);
        uStack_321._0_1_ = (undefined1)sVar14;
        uStack_321._1_1_ = (undefined1)((ushort)sVar14 >> 8);
        if (50000 < local_350) {
          uVar3 = local_330._2_6_;
          local_330 = CONCAT62(local_330._2_6_,(short)local_350);
          uVar11 = local_330;
          riid = (char *)(param_1 + 0x26);
          local_330._4_2_ = SUB62(uVar3,2);
          local_330._6_2_ = SUB62(uVar3,4);
          ((IID *)riid)->Data1 = (undefined4)local_330;
          ((IID *)riid)->Data2 = local_330._4_2_;
          ((IID *)riid)->Data3 = local_330._6_2_;
          param_1[0x27] =
               CONCAT17((undefined1)uStack_321,CONCAT16(uStack_322,CONCAT24(uStack_324,local_328)));
          param_1[0x28] = CONCAT71(uStack_31f,uStack_321._1_1_);
          param_1[0x29] = CONCAT71(local_317,uStack_318);
          param_1[0x2a] = CONCAT35((undefined3)local_30b,CONCAT41(local_30f,uStack_310));
          param_1[0x2b] = CONCAT71(uStack_307,local_30b._3_1_);
          param_1[0x2c] = CONCAT71(uStack_2ff,uStack_300);
          *(undefined1 *)(param_1 + 0x2d) = uStack_2f8;
          local_330 = uVar11;
          uStack_321 = sVar14;
          iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
          if (iVar4 == 0) {
            ppvObject = "DB Result Queue push error";
            riid = "DBResultQueue_Error.Log";
            FUN_1400a0b40(param_1[0x23]);
          }
          local_350 = 0x39;
          local_354 = 0;
          sVar14 = 0;
        }
        pIVar2 = local_2c8;
        uVar16 = local_350;
        uStack_321 = sVar14;
        if (local_2c8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar5 = (*local_2c8->lpVtbl[0xc].QueryInterface)(local_2c8,(IID *)riid,(void **)ppvObject);
        if (HVar5 < 0) {
          _com_issue_errorex(HVar5,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      sVar14 = uStack_321;
      if (local_358[0] == '\0') {
        uStack_324 = 0x87;
      }
      else {
        pwVar15 = (wchar_t *)0x1;
      }
    }
    uStack_321._1_1_ = (undefined1)((ushort)sVar14 >> 8);
    uStack_321._0_1_ = (undefined1)sVar14;
    local_330 = CONCAT62(local_330._2_6_,(short)uVar16);
    param_1[0x26] = local_330;
    param_1[0x27] =
         CONCAT17((undefined1)uStack_321,CONCAT16(uStack_322,CONCAT24(uStack_324,local_328)));
    param_1[0x28] = CONCAT71(uStack_31f,uStack_321._1_1_);
    param_1[0x29] = CONCAT71(local_317,uStack_318);
    param_1[0x2a] = CONCAT35((undefined3)local_30b,CONCAT41(local_30f,uStack_310));
    param_1[0x2b] = CONCAT71(uStack_307,local_30b._3_1_);
    param_1[0x2c] = CONCAT71(uStack_2ff,uStack_300);
    *(undefined1 *)(param_1 + 0x2d) = uStack_2f8;
    uStack_321 = sVar14;
    iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar4 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar2 = local_2c8;
    if (local_2c8 != (IUnknown *)0x0) {
      local_350 = 0;
      UVar6 = (*local_2c8->lpVtbl[0x12].AddRef)(local_2c8);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_2c8;
      if (local_350 != 0) {
        if (local_2c8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar6 = (*local_2c8->lpVtbl[10].Release)(local_2c8);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_2c8 != (IUnknown *)0x0) {
        (*local_2c8->lpVtbl->Release)(local_2c8);
        local_2c8 = (IUnknown *)0x0;
      }
    }
    local_260 = 0;
    local_258 = &DAT_140281f00;
    local_270 = &DAT_140281f00;
    local_268 = 0;
    local_278 = 0;
    Ordinal_9(local_290);
    Ordinal_9(local_2a8);
    if (local_2c0 != (longlong *)0x0) {
      (**(code **)(*local_2c0 + 0x10))();
    }
    if (local_2c8 != (IUnknown *)0x0) {
      (*local_2c8->lpVtbl->Release)(local_2c8);
    }
    if (local_340 != (longlong *)0x0) {
      (**(code **)(*local_340 + 0x10))();
    }
    return pwVar15;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400e0c10(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  int iVar2;
  ULONG UVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res20;
  undefined2 local_f8;
  undefined6 uStack_f6;
  undefined4 local_f0;
  undefined2 local_ec;
  longlong *local_e8;
  longlong *local_e0;
  longlong *local_d8;
  longlong *local_d0;
  longlong *local_c8;
  longlong *local_c0;
  longlong *local_b8 [2];
  undefined4 local_a8;
  undefined4 uStack_a4;
  undefined4 uStack_a0;
  undefined4 uStack_9c;
  undefined8 local_98;
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined1 local_78 [16];
  undefined1 local_68 [24];
  undefined1 local_50 [32];
  
  local_98 = 0xfffffffffffffffe;
  plVar8 = (longlong *)0x0;
  local_res20 = (longlong *)0x0;
  iVar2 = FUN_140001970(&local_res20);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_f0 = *(undefined4 *)(param_2 + 1);
  local_ec = 0x88;
  _local_f8 = CONCAT62((int6)((ulonglong)*param_2 >> 0x10),0xe);
  pIVar1 = *(IUnknown **)*param_1;
  if ((pIVar1 != (IUnknown *)0x0) && (UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1), (int)UVar3 < 0)
     ) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    uVar5 = 0;
  }
  else {
    puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_c8);
    FUN_140001710(&local_res20,*puVar4,"dbo.up_update_guild_id_for_character");
    if (local_c8 != (longlong *)0x0) {
      (**(code **)(*local_c8 + 0x10))();
    }
    local_a8 = *(undefined4 *)((longlong)param_2 + 0xe);
    uStack_a4 = *(undefined4 *)((longlong)param_2 + 0x12);
    uStack_a0 = *(undefined4 *)((longlong)param_2 + 0x16);
    uStack_9c = *(undefined4 *)((longlong)param_2 + 0x1a);
    uVar5 = FUN_140062280(local_68,&local_a8);
    plVar6 = operator_new(0x18);
    local_d8 = plVar8;
    local_e8 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("character_id");
      *plVar6 = lVar7;
      local_d8 = plVar6;
    }
    if (local_d8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar6 = (longlong *)FUN_140001880(&local_res20,&local_e0,&local_d8,0xca,1,0x26,uVar5);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_d0);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_d0 != (longlong *)0x0) {
      (**(code **)(*local_d0 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    local_88 = *(undefined4 *)((longlong)param_2 + 0x1e);
    uStack_84 = *(undefined4 *)((longlong)param_2 + 0x22);
    uStack_80 = *(undefined4 *)((longlong)param_2 + 0x26);
    uStack_7c = *(undefined4 *)((longlong)param_2 + 0x2a);
    uVar5 = FUN_140062280(local_50,&local_88);
    plVar6 = operator_new(0x18);
    local_e0 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("guild_id");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_b8[0] = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,local_b8,0xca,1,0x26,uVar5);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_c0);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_c0 != (longlong *)0x0) {
      (**(code **)(*local_c0 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_e8);
    if (local_e8 != (longlong *)0x0) {
      (**(code **)(*local_e8 + 0x10))();
    }
    iVar2 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_f8);
    if (iVar2 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    uVar5 = 1;
  }
  return uVar5;
}



undefined8 FUN_1400e1040(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  int iVar2;
  ULONG UVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_b8;
  longlong *local_b0;
  longlong *local_a8 [2];
  longlong *local_98;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  longlong local_88 [4];
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  plVar9 = (longlong *)0x0;
  local_res20 = (longlong *)0x0;
  iVar2 = FUN_140001970(&local_res20);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400e1113;
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 0;
  }
LAB_1400e1113:
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_guild_member_aliase");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_b8 = (longlong *)&local_68;
  local_98 = *(longlong **)(param_2 + 0xe);
  uStack_90 = *(undefined4 *)(param_2 + 0x16);
  uStack_8c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_68,&local_98);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_b0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("guild_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,local_a8,&local_res18,0xca,1,0x26,uVar5);
  local_b0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_a8[0] = local_88;
    local_68 = *(undefined4 *)(param_2 + 0x1e);
    uStack_64 = *(undefined4 *)(param_2 + 0x22);
    uStack_60 = *(undefined4 *)(param_2 + 0x26);
    uStack_5c = *(undefined4 *)(param_2 + 0x2a);
    uVar5 = FUN_140062280(local_88,&local_68);
    plVar6 = operator_new(0x18);
    plVar8 = plVar9;
    local_b0 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("character_id");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,0xca,1,0x26,uVar5);
    local_a8[0] = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_b8 != (longlong *)0x0) {
        (**(code **)(*local_b8 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_98 = local_88;
      uVar5 = FUN_1400623f0(local_88,param_2 + 0x2e);
      plVar8 = operator_new(0x18);
      local_a8[0] = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar7 = FUN_140201490("alias_name");
        *plVar8 = lVar7;
        plVar9 = plVar8;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_b0,&local_res18,0xca,1,0x10,uVar5);
      local_98 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_b8);
      pIVar1 = (IUnknown *)*puVar4;
      if (pIVar1 != (IUnknown *)0x0) {
        UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
        }
        if (local_b8 != (longlong *)0x0) {
          (**(code **)(*local_b8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400e1510(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  int iVar3;
  ULONG UVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  plVar10 = (longlong *)0x0;
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400e15e3;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 0;
  }
LAB_1400e15e3:
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_guild_member_permission");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("guild_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_98[0] = local_40;
    local_88 = *(undefined4 *)(param_2 + 0x1e);
    uStack_84 = *(undefined4 *)(param_2 + 0x22);
    uStack_80 = *(undefined4 *)(param_2 + 0x26);
    uStack_7c = *(undefined4 *)(param_2 + 0x2a);
    uVar6 = FUN_140062280(local_40,&local_88);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_a0 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("character_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
    local_98[0] = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      sVar1 = *(short *)(param_2 + 0x2e);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,(int)sVar1);
      plVar9 = operator_new(0x18);
      local_98[0] = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("permission");
        *plVar9 = lVar8;
        plVar10 = plVar9;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400e1a00(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  int iVar2;
  ULONG UVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [5];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  plVar9 = (longlong *)0x0;
  local_res20 = (longlong *)0x0;
  iVar2 = FUN_140001970(&local_res20);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400e1ad3;
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 0;
  }
LAB_1400e1ad3:
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_guild_icon");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_58;
  local_68 = *(undefined4 *)(param_2 + 0xe);
  uStack_64 = *(undefined4 *)(param_2 + 0x12);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_58,&local_68);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_78 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("guild_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar5);
  local_78 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_80 = local_58;
    uVar5 = FUN_1400623f0(local_58,param_2 + 0x1e);
    plVar8 = operator_new(0x18);
    local_78 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar7 = FUN_140201490("guild_icon");
      *plVar8 = lVar7;
      plVar9 = plVar8;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,200,uVar5);
    local_80 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400e1da0(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  int iVar2;
  ULONG UVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [5];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  plVar9 = (longlong *)0x0;
  local_res20 = (longlong *)0x0;
  iVar2 = FUN_140001970(&local_res20);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400e1e73;
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 0;
  }
LAB_1400e1e73:
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_guild_notice");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_58;
  local_68 = *(undefined4 *)(param_2 + 0xe);
  uStack_64 = *(undefined4 *)(param_2 + 0x12);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_58,&local_68);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_78 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("guild_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar5);
  local_78 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_80 = local_58;
    uVar5 = FUN_1400623f0(local_58,param_2 + 0x1e);
    plVar8 = operator_new(0x18);
    local_78 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar7 = FUN_140201490("notice");
      *plVar8 = lVar7;
      plVar9 = plVar8;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x80,uVar5);
    local_80 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400e2140(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  undefined *puVar2;
  int iVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  int iVar11;
  longlong *plVar12;
  longlong *local_res10;
  longlong *local_res18;
  longlong local_res20;
  longlong *local_98;
  short local_90 [4];
  int local_88;
  longlong *local_78;
  longlong *local_70;
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  plVar12 = (longlong *)0x0;
  local_res18 = (longlong *)0x0;
  local_res20 = param_2;
  iVar3 = FUN_140001970(&local_res18);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res10 = (longlong *)((ulonglong)local_res10 & 0xffffffff00000000);
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res10 != 0) goto LAB_1400e221c;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    return 0;
  }
LAB_1400e221c:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res10);
  FUN_140001710(&local_res18,*puVar6,"dbo.up_update_guild_permission");
  if (local_res10 != (longlong *)0x0) {
    (**(code **)(*local_res10 + 0x10))();
  }
  local_98 = (longlong *)local_90;
  local_68 = *(undefined4 *)(param_2 + 0xe);
  uStack_64 = *(undefined4 *)(param_2 + 0x12);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140062280(local_90,&local_68);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_70 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("guild_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res10 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res18,&local_78,&local_res10,0xca,1,0x26,uVar7);
  local_70 = plVar10;
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res18,&local_98);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    plVar8 = plVar12;
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    while( true ) {
      iVar3 = (int)plVar8;
      if (7 < iVar3) {
        FUN_1400016d0(&local_res18,&local_res10);
        if (local_res10 != (longlong *)0x0) {
          (**(code **)(*local_res10 + 0x10))();
        }
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        return 1;
      }
      local_78 = (longlong *)local_90;
      iVar11 = (int)*(short *)(param_2 + 0x1e + (longlong)iVar3 * 2);
      Ordinal_8(local_90);
      if ((local_90[0] != 3) && (local_90[0] != 10)) {
        if (local_90[0] == 0xb) {
          local_88 = CONCAT22(local_88._2_2_,-(ushort)(iVar11 != 0));
          iVar11 = local_88;
        }
        else {
          iVar5 = Ordinal_9(local_90);
          if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(iVar5);
          }
          local_90[0] = 3;
        }
      }
      local_88 = iVar11;
      puVar2 = (&PTR_s_permission00_140326370)[iVar3];
      plVar8 = operator_new(0x18);
      plVar10 = plVar12;
      local_70 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar9 = FUN_140201490(puVar2);
        *plVar8 = lVar9;
        plVar10 = plVar8;
      }
      local_res10 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res18,&local_68,&local_res10,3,1,4,local_90);
      local_78 = plVar10;
      if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res18,&local_98);
      pIVar1 = (IUnknown *)*puVar6;
      if (pIVar1 == (IUnknown *)0x0) break;
      UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      plVar8 = (longlong *)(ulonglong)(iVar3 + 1);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400e2560(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  undefined2 uVar2;
  int iVar3;
  HRESULT HVar4;
  ULONG UVar5;
  undefined8 *puVar6;
  wchar_t *pwVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  wchar_t *pwVar12;
  wchar_t *pwVar13;
  undefined1 auStackY_298 [32];
  char local_258 [4];
  short local_254;
  longlong *local_250;
  undefined8 *local_248;
  undefined8 *local_240;
  int local_238;
  wchar_t *local_230;
  wchar_t *local_228;
  LPUNKNOWN local_220;
  IUnknown *local_218;
  longlong *local_210;
  undefined4 local_208;
  undefined1 local_1f8 [24];
  undefined1 local_1e0 [24];
  undefined4 local_1c8;
  undefined1 *local_1c0;
  undefined4 local_1b8;
  undefined8 local_1b0;
  undefined1 *local_1a8;
  longlong *local_198;
  wchar_t *local_190;
  longlong local_188;
  undefined2 local_180;
  longlong *local_170;
  wchar_t *local_168;
  wchar_t *local_160;
  longlong *local_158;
  undefined8 local_150;
  undefined1 local_148;
  undefined8 local_140;
  undefined1 local_138;
  undefined8 local_130;
  undefined1 local_128;
  undefined8 local_120;
  undefined1 local_118;
  undefined1 local_110 [8];
  undefined4 local_108;
  undefined4 uStack_104;
  undefined4 uStack_100;
  undefined4 uStack_fc;
  undefined8 local_e8;
  undefined1 local_e0 [24];
  undefined1 local_c8 [24];
  undefined1 local_b0 [24];
  wchar_t local_98 [12];
  undefined1 local_80 [24];
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 local_60;
  undefined2 local_5c;
  wchar_t local_5a [12];
  ulonglong local_42;
  undefined4 local_3a;
  undefined2 local_36;
  ulonglong local_30;
  
  local_e8 = 0xfffffffffffffffe;
  local_30 = DAT_1403223c0 ^ (ulonglong)auStackY_298;
  pwVar13 = (wchar_t *)0x0;
  local_250 = (longlong *)0x0;
  local_248 = param_1;
  local_240 = param_2;
  iVar3 = FUN_140001970(&local_250);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_218 = (IUnknown *)0x0;
  local_210 = (longlong *)0x0;
  Ordinal_8(local_1f8);
  Ordinal_8(local_1e0);
  pIVar1 = local_218;
  if ((local_218 != (IUnknown *)0x0) && (local_218 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_1a8 = &DAT_140281f00;
  local_1c0 = &DAT_140281f00;
  local_1b8 = 0;
  local_1b0 = 0;
  if (local_218 != (IUnknown *)0x0) {
    (*local_218->lpVtbl->Release)(local_218);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_220);
  if (HVar4 < 0) {
LAB_1400e26c0:
    local_218 = (IUnknown *)0x0;
  }
  else {
    HVar4 = OleRun(local_220);
    if (-1 < HVar4) {
      HVar4 = (*local_220->lpVtbl->QueryInterface)(local_220,(IID *)&DAT_140281f68,&local_218);
    }
    (*local_220->lpVtbl->Release)(local_220);
    if (HVar4 < 0) goto LAB_1400e26c0;
  }
  local_1c8 = 2;
  local_208 = 1;
  local_258[0] = '\x01';
  local_3a = 0;
  local_36 = 0;
  local_5a[0] = L'\0';
  local_5a[1] = L'\0';
  local_5a[2] = L'\0';
  local_5a[3] = L'\0';
  local_5a[4] = L'\0';
  local_5a[5] = L'\0';
  local_5a[6] = L'\0';
  local_5a[7] = L'\0';
  local_5a[8] = L'\0';
  local_5a[9] = L'\0';
  local_5a[10] = L'\0';
  local_5a[0xb] = L'\0';
  local_42 = 0;
  local_60 = *(undefined4 *)(param_2 + 1);
  _local_68 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x239e0000);
  local_5c = 0xc1;
  _local_68 = CONCAT62(stack0xffffffffffffff9a,0x34);
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_238 = 0;
    UVar5 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_238 != 0) goto LAB_1400e28e6;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_218;
    if (local_218 != (IUnknown *)0x0) {
      local_240 = (undefined8 *)((ulonglong)local_240 & 0xffffffff00000000);
      UVar5 = (*local_218->lpVtbl[0x12].AddRef)(local_218);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_218;
      if ((int)local_240 != 0) {
        if (local_218 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar5 = (*local_218->lpVtbl[10].Release)(local_218);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_218 != (IUnknown *)0x0) {
        (*local_218->lpVtbl->Release)(local_218);
        local_218 = (IUnknown *)0x0;
      }
    }
    local_1b0 = 0;
    local_1a8 = &DAT_140281f00;
    local_1c0 = &DAT_140281f00;
    local_1b8 = 0;
    local_1c8 = 0;
    Ordinal_9(local_1e0);
    Ordinal_9(local_1f8);
    if (local_210 != (longlong *)0x0) {
      (**(code **)(*local_210 + 0x10))();
    }
    if (local_218 != (IUnknown *)0x0) {
      (*local_218->lpVtbl->Release)(local_218);
    }
    if (local_250 != (longlong *)0x0) {
      (**(code **)(*local_250 + 0x10))();
    }
    return (wchar_t *)0x0;
  }
LAB_1400e28e6:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_170);
  FUN_140001710(&local_250,*puVar6,"dbo.up_get_other_character");
  if (local_170 != (longlong *)0x0) {
    (**(code **)(*local_170 + 0x10))();
  }
  local_228 = local_98;
  local_108 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_104 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_100 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_fc = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_98,&local_108);
  pwVar7 = operator_new(0x18);
  local_160 = pwVar13;
  local_190 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("character_id");
    *(longlong *)pwVar7 = lVar8;
    local_160 = pwVar7;
  }
  if (local_160 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar7 = (wchar_t *)FUN_140001880(&local_250,&local_198,&local_160,0xca);
  local_228 = pwVar7;
  if (local_250 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_250,&local_158);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  if (*(longlong **)pwVar7 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar7 + 0x10))();
  }
  local_198 = &local_188;
  uVar2 = *(undefined2 *)((longlong)param_2 + 0x1e);
  Ordinal_8(&local_188);
  if ((short)local_188 != 0x12) {
    iVar3 = Ordinal_9(&local_188);
    if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar3);
    }
    local_188._0_2_ = 0x12;
  }
  local_180 = uVar2;
  pwVar7 = operator_new(0x18);
  local_168 = pwVar13;
  local_228 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("server");
    *(longlong *)pwVar7 = lVar8;
    local_168 = pwVar7;
  }
  if (local_168 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_250,local_110,&local_168,2);
  local_198 = plVar9;
  if (local_250 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_250,&local_190);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar5 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_190 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_190 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_250,&local_228);
    This = local_218;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_218 != pIVar1) {
      local_218 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_228 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_228 + 0x10))();
    }
    pIVar1 = local_218;
    if (local_218 != (IUnknown *)0x0) {
      local_254 = 0;
      UVar5 = (*local_218->lpVtbl[6].Release)(local_218);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_254 == -1) {
        local_5c = 0xc2;
        pwVar7 = pwVar13;
      }
      else {
        uVar10 = FUN_140002290(&local_218,local_e0,&DAT_14028a330,local_258);
        FUN_140062840(uVar10,&local_230);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_230 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_138 = 0;
          local_140 = uVar10;
          FUN_140156b50(uVar10);
          local_138 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_118 = 0;
            local_120 = uVar11;
            FUN_140156b50(uVar11);
            local_118 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
          }
          pwVar7 = local_230;
          if (((local_230 != (wchar_t *)PTR_DAT_1403200a0) && (local_230 != (wchar_t *)0x0)) &&
             (local_230 != (wchar_t *)0x8)) {
            *(int *)(local_230 + -2) = *(int *)(local_230 + -2) + 1;
          }
          FUN_140156be0(uVar10);
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_5a,pwVar12,0xf);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_148 = 0;
          local_150 = uVar10;
          FUN_140156b50(uVar10);
          local_148 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
        }
        if (((local_230 != (wchar_t *)0x0) && (local_230 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (local_230 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_128 = 0;
          local_130 = uVar10;
          FUN_140156b50(uVar10);
          local_128 = 1;
          pwVar7 = local_230 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(local_230 + -4);
          }
          FUN_140156be0(uVar10);
        }
        local_230 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_e0);
        local_42 = local_42 & 0xffffffffffff;
        uVar10 = FUN_140002290(&local_218,local_b0,"Class",local_258);
        FUN_140182560(uVar10);
        uVar2 = FUN_140062550(uVar10);
        local_3a = CONCAT22(local_3a._2_2_,uVar2);
        Ordinal_9(local_b0);
        uVar10 = FUN_140002290(&local_218,local_80,&DAT_14028b3e4,local_258);
        FUN_140182560(uVar10);
        uVar2 = FUN_140062550(uVar10);
        local_3a = CONCAT22(uVar2,(undefined2)local_3a);
        Ordinal_9(local_80);
        uVar10 = FUN_140002290(&local_218,local_c8,"Level",local_258);
        FUN_140182560(uVar10);
        local_36 = FUN_140062550(uVar10);
        Ordinal_9(local_c8);
        pwVar7 = (wchar_t *)0x1;
        if (local_258[0] == '\0') {
          local_5c = 0xc3;
          pwVar7 = pwVar13;
        }
      }
      iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_68);
      if (iVar3 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_218;
      if (local_218 != (IUnknown *)0x0) {
        local_248 = (undefined8 *)((ulonglong)local_248 & 0xffffffff00000000);
        UVar5 = (*local_218->lpVtbl[0x12].AddRef)(local_218);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_218;
        if ((int)local_248 != 0) {
          if (local_218 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar5 = (*local_218->lpVtbl[10].Release)(local_218);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_218 != (IUnknown *)0x0) {
          (*local_218->lpVtbl->Release)(local_218);
          local_218 = (IUnknown *)0x0;
        }
      }
      local_1b0 = 0;
      local_1a8 = &DAT_140281f00;
      local_1c0 = &DAT_140281f00;
      local_1b8 = 0;
      local_1c8 = 0;
      Ordinal_9(local_1e0);
      Ordinal_9(local_1f8);
      if (local_210 != (longlong *)0x0) {
        (**(code **)(*local_210 + 0x10))();
      }
      if (local_218 != (IUnknown *)0x0) {
        (*local_218->lpVtbl->Release)(local_218);
      }
      if (local_250 != (longlong *)0x0) {
        (**(code **)(*local_250 + 0x10))();
      }
      return pwVar7;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400e4103)
// WARNING: Removing unreachable block (ram,0x0001400e410d)
// WARNING: Removing unreachable block (ram,0x0001400e4118)
// WARNING: Removing unreachable block (ram,0x0001400e4128)
// WARNING: Removing unreachable block (ram,0x0001400e3354)
// WARNING: Removing unreachable block (ram,0x0001400e335e)
// WARNING: Removing unreachable block (ram,0x0001400e3369)
// WARNING: Removing unreachable block (ram,0x0001400e3379)

undefined8 * FUN_1400e3100(undefined8 *param_1,undefined8 *param_2)

{
  undefined8 *puVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  IUnknown *pIVar4;
  undefined6 uVar5;
  IUnknown *This;
  undefined2 uVar6;
  int iVar7;
  HRESULT HVar8;
  ULONG UVar9;
  undefined4 uVar10;
  undefined8 *puVar11;
  undefined8 uVar12;
  undefined8 uVar13;
  longlong *plVar14;
  char *riid;
  char *ppvObject;
  longlong lVar15;
  uint uVar16;
  char local_res10 [8];
  longlong *local_res18;
  undefined8 *local_res20;
  undefined8 local_440;
  undefined2 uStack_434;
  short sStack_432;
  longlong *local_430;
  int local_428;
  IUnknown *local_418;
  longlong *local_410;
  undefined4 local_408;
  undefined1 local_3f8 [24];
  undefined1 local_3e0 [24];
  undefined4 local_3c8;
  undefined1 *local_3c0;
  undefined4 local_3b8;
  undefined8 local_3b0;
  undefined1 *local_3a8;
  undefined2 local_398;
  undefined4 uStack_396;
  undefined2 uStack_392;
  undefined8 uStack_390;
  undefined8 local_388;
  undefined8 uStack_380;
  undefined4 local_378;
  undefined2 uStack_374;
  undefined2 uStack_372;
  undefined2 uStack_370;
  undefined4 uStack_36e;
  undefined2 uStack_36a;
  undefined2 uStack_368;
  undefined4 uStack_366;
  undefined2 uStack_362;
  undefined2 uStack_360;
  undefined4 uStack_35e;
  undefined2 uStack_35a;
  undefined1 local_358;
  undefined2 uStack_357;
  undefined2 uStack_355;
  undefined2 uStack_353;
  undefined1 uStack_351;
  undefined7 uStack_350;
  undefined1 uStack_349;
  undefined4 uStack_348;
  undefined4 uStack_344;
  undefined4 uStack_340;
  undefined4 uStack_33c;
  undefined1 uStack_338;
  undefined2 uStack_337;
  undefined4 uStack_335;
  undefined4 local_331;
  undefined1 uStack_32d;
  undefined2 uStack_32c;
  undefined1 uStack_32a;
  LPUNKNOWN local_328;
  undefined8 *local_320;
  longlong *local_318;
  undefined8 *local_310;
  longlong *local_308;
  longlong *local_300 [3];
  undefined4 local_2e8;
  undefined4 uStack_2e4;
  undefined4 uStack_2e0;
  undefined4 uStack_2dc;
  undefined1 local_2d0 [8];
  undefined8 local_2c8;
  undefined1 local_2c0 [24];
  undefined1 local_2a8 [24];
  undefined1 local_290 [24];
  undefined1 local_278 [24];
  undefined1 local_260 [24];
  undefined1 local_248 [24];
  undefined1 local_230 [24];
  undefined1 local_218 [24];
  undefined1 local_200 [24];
  undefined1 local_1e8 [24];
  undefined1 local_1d0 [24];
  undefined1 local_1b8 [24];
  undefined1 local_1a0 [24];
  undefined1 local_188 [24];
  undefined1 local_170 [24];
  undefined1 local_158 [24];
  undefined1 local_140 [24];
  undefined1 local_128 [24];
  undefined1 local_110 [24];
  undefined1 local_f8 [24];
  undefined1 local_e0 [24];
  undefined1 local_c8 [24];
  IID local_b0;
  undefined1 local_98 [24];
  undefined1 local_80 [24];
  undefined1 local_68 [24];
  undefined1 local_50 [24];
  
  local_2c8 = 0xfffffffffffffffe;
  local_430 = (longlong *)0x0;
  local_320 = param_2;
  iVar7 = FUN_140001970(&local_430);
  if ((iVar7 < 0) && (iVar7 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar7);
  }
  local_418 = (IUnknown *)0x0;
  local_410 = (longlong *)0x0;
  Ordinal_8(local_3f8);
  Ordinal_8(local_3e0);
  pIVar4 = local_418;
  if ((local_418 != (IUnknown *)0x0) && (local_418 = (IUnknown *)0x0, pIVar4 != (IUnknown *)0x0)) {
    (*pIVar4->lpVtbl->Release)(pIVar4);
  }
  local_3a8 = &DAT_140281f00;
  local_3c0 = &DAT_140281f00;
  local_3b8 = 0;
  local_3b0 = 0;
  if (local_418 != (IUnknown *)0x0) {
    (*local_418->lpVtbl->Release)(local_418);
  }
  HVar8 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_328);
  if (HVar8 < 0) {
LAB_1400e3242:
    local_418 = (IUnknown *)0x0;
  }
  else {
    HVar8 = OleRun(local_328);
    if (-1 < HVar8) {
      HVar8 = (*local_328->lpVtbl->QueryInterface)(local_328,(IID *)&DAT_140281f68,&local_418);
    }
    (*local_328->lpVtbl->Release)(local_328);
    if (HVar8 < 0) goto LAB_1400e3242;
  }
  local_3c8 = 2;
  local_408 = 1;
  local_res10[0] = '\x01';
  uVar3 = *(undefined4 *)(param_2 + 1);
  local_440 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x239f0000);
  uStack_434 = 0xc4;
  sStack_432 = 0;
  uVar16 = 0x10;
  pIVar4 = *(IUnknown **)*param_1;
  if (pIVar4 != (IUnknown *)0x0) {
    local_428 = 0;
    UVar9 = (*pIVar4->lpVtbl[0xb].AddRef)(pIVar4);
    if ((int)UVar9 < 0) {
      _com_issue_errorex(UVar9,pIVar4,(_GUID *)&DAT_140281f08);
    }
    if (local_428 != 0) goto LAB_1400e341c;
  }
  iVar7 = FUN_1400a1e90(param_1);
  if (iVar7 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar4 = local_418;
    if (local_418 != (IUnknown *)0x0) {
      UVar9 = (*local_418->lpVtbl[0x12].AddRef)(local_418);
      if ((int)UVar9 < 0) {
        _com_issue_errorex(UVar9,pIVar4,(_GUID *)&DAT_140281f28);
      }
      if (local_418 != (IUnknown *)0x0) {
        (*local_418->lpVtbl->Release)(local_418);
        local_418 = (IUnknown *)0x0;
      }
    }
    local_3b0 = 0;
    local_3a8 = &DAT_140281f00;
    local_3c0 = &DAT_140281f00;
    local_3b8 = 0;
    local_3c8 = 0;
    Ordinal_9(local_3e0);
    Ordinal_9(local_3f8);
    if (local_410 != (longlong *)0x0) {
      (**(code **)(*local_410 + 0x10))();
    }
    if (local_418 != (IUnknown *)0x0) {
      (*local_418->lpVtbl->Release)(local_418);
    }
    if (local_430 != (longlong *)0x0) {
      (**(code **)(*local_430 + 0x10))();
    }
    return (undefined8 *)0x0;
  }
LAB_1400e341c:
  puVar11 = (undefined8 *)FUN_140001f20(*param_1,local_300);
  FUN_140001710(&local_430,*puVar11,"dbo.up_read_other_character_item_equip");
  if (local_300[0] != (longlong *)0x0) {
    (**(code **)(*local_300[0] + 0x10))();
  }
  local_res18 = (longlong *)local_248;
  local_2e8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_2e4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_2e0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_2dc = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar12 = FUN_140062280(local_248,&local_2e8);
  puVar11 = operator_new(0x18);
  local_310 = (undefined8 *)0x0;
  local_res20 = puVar11;
  if (puVar11 != (undefined8 *)0x0) {
    puVar11[1] = 0;
    *(undefined4 *)(puVar11 + 2) = 1;
    uVar13 = FUN_140201490("character_id");
    *puVar11 = uVar13;
    local_310 = puVar11;
  }
  if (local_310 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar14 = (longlong *)FUN_140001880(&local_430,local_2d0,&local_310,0xca,1,0x26,uVar12);
  local_res18 = plVar14;
  if (local_430 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar11 = (undefined8 *)FUN_140001660(local_430,&local_318);
  pIVar4 = (IUnknown *)*puVar11;
  if (pIVar4 != (IUnknown *)0x0) {
    UVar9 = (*pIVar4->lpVtbl[3].AddRef)(pIVar4);
    if ((int)UVar9 < 0) {
      _com_issue_errorex(UVar9,pIVar4,(_GUID *)&DAT_140281eb0);
    }
    if (local_318 != (longlong *)0x0) {
      (**(code **)(*local_318 + 0x10))();
    }
    if ((longlong *)*plVar14 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar14 + 0x10))();
    }
    puVar11 = (undefined8 *)FUN_1400016d0(&local_430,&local_308);
    This = local_418;
    pIVar4 = (IUnknown *)*puVar11;
    if (local_418 != pIVar4) {
      local_418 = pIVar4;
      if (pIVar4 != (IUnknown *)0x0) {
        (*pIVar4->lpVtbl->AddRef)(pIVar4);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_308 != (longlong *)0x0) {
      (**(code **)(*local_308 + 0x10))();
    }
    pIVar4 = local_418;
    if (local_418 != (IUnknown *)0x0) {
      local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffffffff0000);
      UVar9 = (*local_418->lpVtbl[6].Release)(local_418);
      if ((int)UVar9 < 0) {
        _com_issue_errorex(UVar9,pIVar4,(_GUID *)&DAT_140281f28);
      }
      puVar11 = (undefined8 *)0x1;
      if ((short)local_res18 != -1) {
        while( true ) {
          pIVar4 = local_418;
          if (local_418 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          local_res20 = (undefined8 *)((ulonglong)local_res20 & 0xffffffffffff0000);
          UVar9 = (*local_418->lpVtbl[6].Release)(local_418);
          if ((int)UVar9 < 0) {
            _com_issue_errorex(UVar9,pIVar4,(_GUID *)&DAT_140281f28);
          }
          if ((short)local_res20 == -1) break;
          local_398 = 0;
          uStack_396 = 0;
          uStack_392 = 0;
          uStack_390 = 0;
          local_388 = 0;
          uStack_380 = 0;
          local_378 = 0;
          uStack_374 = 0;
          uStack_372 = 0;
          uStack_370 = 0;
          uStack_36e = 0;
          uStack_36a = 0;
          uStack_368 = 0;
          uStack_366 = 0;
          uStack_362 = 0;
          uStack_360 = 0;
          uStack_35e = 0;
          uStack_35a = 0;
          uStack_357 = 0;
          uStack_355 = 0;
          uStack_353 = 0;
          uStack_351 = 0;
          uStack_350 = 0;
          uStack_349 = 0;
          uStack_348 = 0;
          uStack_344 = 0;
          uStack_340 = 0;
          uStack_33c = 0;
          uStack_338 = 0;
          uStack_337 = 0;
          uStack_335 = 0;
          local_331 = 0;
          uStack_32d = 0;
          uStack_32c = 0;
          uStack_32a = 0;
          local_358 = (short)local_res20 == -1;
          uVar12 = FUN_140002290(&local_418,local_80,"slot_index",local_res10);
          FUN_140182560(uVar12);
          local_398 = FUN_140062550(uVar12);
          Ordinal_9(local_80);
          uVar12 = FUN_140002290(&local_418,local_50,&DAT_14028931c,local_res10);
          FUN_140182560(uVar12);
          uStack_396 = FUN_140062550(uVar12);
          Ordinal_9(local_50);
          uVar12 = FUN_140002290(&local_418,local_98,"enhance_level",local_res10);
          FUN_140182560(uVar12);
          uStack_392 = FUN_140062550(uVar12);
          Ordinal_9(local_98);
          uVar12 = FUN_140002290(&local_418,local_278,"option_1_code",local_res10);
          FUN_140182560(uVar12);
          uVar10 = FUN_140062550(uVar12);
          uStack_390 = CONCAT44(uStack_390._4_4_,uVar10);
          Ordinal_9(local_278);
          uVar12 = FUN_140002290(&local_418,local_158,"option_1_value",local_res10);
          FUN_140182560(uVar12);
          uVar10 = FUN_140062550(uVar12);
          uStack_390 = CONCAT44(uVar10,(undefined4)uStack_390);
          Ordinal_9(local_158);
          uVar12 = FUN_140002290(&local_418,local_2c0,"option_2_code",local_res10);
          FUN_140182560(uVar12);
          uVar10 = FUN_140062550(uVar12);
          local_388 = CONCAT44(local_388._4_4_,uVar10);
          Ordinal_9(local_2c0);
          uVar12 = FUN_140002290(&local_418,local_c8,"option_2_value",local_res10);
          FUN_140182560(uVar12);
          uVar10 = FUN_140062550(uVar12);
          local_388 = CONCAT44(uVar10,(undefined4)local_388);
          Ordinal_9(local_c8);
          uVar12 = FUN_140002290(&local_418,local_218,"option_3_code",local_res10);
          FUN_140182560(uVar12);
          uVar10 = FUN_140062550(uVar12);
          uStack_380 = CONCAT44(uStack_380._4_4_,uVar10);
          Ordinal_9(local_218);
          uVar12 = FUN_140002290(&local_418,local_128,"option_3_value",local_res10);
          FUN_140182560(uVar12);
          uVar10 = FUN_140062550(uVar12);
          uStack_380 = CONCAT44(uVar10,(undefined4)uStack_380);
          Ordinal_9(local_128);
          uVar12 = FUN_140002290(&local_418,local_1e8,"option_group",local_res10);
          FUN_140182560(uVar12);
          local_378 = FUN_140062550(uVar12);
          Ordinal_9(local_1e8);
          uVar12 = FUN_140002290(&local_418,local_68,"ReconNum",local_res10);
          FUN_140182560(uVar12);
          uStack_357 = FUN_140062550(uVar12);
          Ordinal_9(local_68);
          uVar12 = FUN_140002290(&local_418,local_1b8,"ReconState",local_res10);
          FUN_140182560(uVar12);
          uStack_355 = FUN_140062550(uVar12);
          Ordinal_9(local_1b8);
          uVar12 = FUN_140002290(&local_418,local_f8,"socket_count",local_res10);
          FUN_140182560(uVar12);
          uStack_374 = FUN_140062550(uVar12);
          Ordinal_9(local_f8);
          uVar12 = FUN_140002290(&local_418,local_188,"socket_1_code",local_res10);
          FUN_140182560(uVar12);
          uVar10 = FUN_140062550(uVar12);
          uStack_372 = (undefined2)uVar10;
          uStack_370 = (undefined2)((uint)uVar10 >> 0x10);
          Ordinal_9(local_188);
          uVar12 = FUN_140002290(&local_418,local_2a8,"socket_1_value",local_res10);
          FUN_140182560(uVar12);
          uStack_36e = FUN_140062550(uVar12);
          Ordinal_9(local_2a8);
          uVar12 = FUN_140002290(&local_418,local_290,"socket_2_code",local_res10);
          FUN_140182560(uVar12);
          uVar10 = FUN_140062550(uVar12);
          uStack_36a = (undefined2)uVar10;
          uStack_368 = (undefined2)((uint)uVar10 >> 0x10);
          Ordinal_9(local_290);
          uVar12 = FUN_140002290(&local_418,local_260,"socket_2_value",local_res10);
          FUN_140182560(uVar12);
          uStack_366 = FUN_140062550(uVar12);
          Ordinal_9(local_260);
          uVar12 = FUN_140002290(&local_418,local_230,"socket_3_code",local_res10);
          FUN_140182560(uVar12);
          uVar10 = FUN_140062550(uVar12);
          uStack_362 = (undefined2)uVar10;
          uStack_360 = (undefined2)((uint)uVar10 >> 0x10);
          Ordinal_9(local_230);
          uVar12 = FUN_140002290(&local_418,local_200,"socket_3_value",local_res10);
          FUN_140182560(uVar12);
          uStack_35e = FUN_140062550(uVar12);
          Ordinal_9(local_200);
          uVar12 = FUN_140002290(&local_418,local_1d0,&DAT_140289530,local_res10);
          FUN_140182560(uVar12);
          uVar6 = FUN_140062550(uVar12);
          uStack_33c._3_1_ = (undefined1)uVar6;
          uStack_338 = (undefined1)((ushort)uVar6 >> 8);
          Ordinal_9(local_1d0);
          uVar12 = FUN_140002290(&local_418,local_1a0,"acquireroute",local_res10);
          FUN_140182560(uVar12);
          uStack_337 = FUN_140062550(uVar12);
          Ordinal_9(local_1a0);
          uVar12 = FUN_140002290(&local_418,local_170,"physical",local_res10);
          FUN_140182560(uVar12);
          uStack_335 = FUN_140062550(uVar12);
          Ordinal_9(local_170);
          uVar12 = FUN_140002290(&local_418,local_140,"magical",local_res10);
          FUN_140182560(uVar12);
          local_331 = FUN_140062550(uVar12);
          Ordinal_9(local_140);
          uVar12 = FUN_140002290(&local_418,local_110,"durability",local_res10);
          FUN_140182560(uVar12);
          uVar10 = FUN_140062550(uVar12);
          uStack_344._3_1_ = (undefined1)uVar10;
          uStack_340._0_3_ = (undefined3)((uint)uVar10 >> 8);
          Ordinal_9(local_110);
          uVar12 = FUN_140002290(&local_418,local_e0,"durabilitymax",local_res10);
          FUN_140182560(uVar12);
          uVar10 = FUN_140062550(uVar12);
          uStack_340._3_1_ = (undefined1)uVar10;
          uStack_33c._0_3_ = (undefined3)((uint)uVar10 >> 8);
          Ordinal_9(local_e0);
          ppvObject = "weight";
          riid = (char *)&local_b0;
          uVar12 = FUN_140002290(&local_418,riid,"weight",local_res10);
          FUN_140182560(uVar12);
          uVar10 = FUN_140062550(uVar12);
          uStack_32d = (undefined1)uVar10;
          uStack_32c = (undefined2)((uint)uVar10 >> 8);
          uStack_32a = (undefined1)((uint)uVar10 >> 0x18);
          Ordinal_9(&local_b0);
          lVar15 = (longlong)(int)uVar16;
          puVar1 = (undefined8 *)(lVar15 + 0x130 + (longlong)param_1);
          *puVar1 = CONCAT26(uStack_392,CONCAT42(uStack_396,local_398));
          puVar1[1] = uStack_390;
          puVar1 = (undefined8 *)(lVar15 + 0x140 + (longlong)param_1);
          *puVar1 = local_388;
          puVar1[1] = uStack_380;
          puVar1 = (undefined8 *)(lVar15 + 0x150 + (longlong)param_1);
          *puVar1 = CONCAT26(uStack_372,CONCAT24(uStack_374,local_378));
          puVar1[1] = CONCAT26(uStack_36a,CONCAT42(uStack_36e,uStack_370));
          puVar1 = (undefined8 *)(lVar15 + 0x160 + (longlong)param_1);
          *puVar1 = CONCAT26(uStack_362,CONCAT42(uStack_366,uStack_368));
          puVar1[1] = CONCAT26(uStack_35a,CONCAT42(uStack_35e,uStack_360));
          puVar1 = (undefined8 *)(lVar15 + 0x170 + (longlong)param_1);
          *puVar1 = CONCAT17(uStack_351,
                             CONCAT25(uStack_353,CONCAT23(uStack_355,CONCAT21(uStack_357,local_358))
                                     ));
          puVar1[1] = CONCAT17(uStack_349,uStack_350);
          puVar2 = (undefined4 *)(lVar15 + 0x180 + (longlong)param_1);
          *puVar2 = uStack_348;
          puVar2[1] = uStack_344;
          puVar2[2] = uStack_340;
          puVar2[3] = uStack_33c;
          *(ulonglong *)(lVar15 + 400 + (longlong)param_1) =
               CONCAT17((undefined1)local_331,CONCAT43(uStack_335,CONCAT21(uStack_337,uStack_338)));
          *(uint *)(lVar15 + 0x198 + (longlong)param_1) = CONCAT13(uStack_32d,local_331._1_3_);
          *(undefined2 *)(lVar15 + 0x19c + (longlong)param_1) = uStack_32c;
          *(undefined1 *)(lVar15 + 0x19e + (longlong)param_1) = uStack_32a;
          uVar16 = uVar16 + 0x6f;
          sStack_432 = sStack_432 + 1;
          if (50000 < uVar16) {
            uVar5 = local_440._2_6_;
            local_440 = CONCAT62(local_440._2_6_,(short)uVar16);
            uVar12 = local_440;
            riid = (char *)(param_1 + 0x26);
            local_440._4_2_ = SUB62(uVar5,2);
            local_440._6_2_ = SUB62(uVar5,4);
            ((IID *)riid)->Data1 = (undefined4)local_440;
            ((IID *)riid)->Data2 = local_440._4_2_;
            ((IID *)riid)->Data3 = local_440._6_2_;
            param_1[0x27] = CONCAT26(sStack_432,CONCAT24(0xc4,uVar3));
            iVar7 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
            if (iVar7 == 0) {
              ppvObject = "DB Result Queue push error";
              riid = "DBResultQueue_Error.Log";
              FUN_1400a0b40(param_1[0x23]);
            }
            uVar16 = 0x10;
            sStack_432 = 0;
            local_440 = uVar12;
          }
          pIVar4 = local_418;
          if (local_418 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          HVar8 = (*local_418->lpVtbl[0xc].QueryInterface)(local_418,(IID *)riid,(void **)ppvObject)
          ;
          if (HVar8 < 0) {
            _com_issue_errorex(HVar8,pIVar4,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_res10[0] == '\0') {
          uStack_434 = 0xc5;
          puVar11 = (undefined8 *)0x0;
        }
      }
      local_440 = CONCAT62(local_440._2_6_,(short)uVar16);
      param_1[0x26] = local_440;
      param_1[0x27] = CONCAT26(sStack_432,CONCAT24(uStack_434,uVar3));
      iVar7 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar7 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar4 = local_418;
      if (local_418 != (IUnknown *)0x0) {
        UVar9 = (*local_418->lpVtbl[0x12].AddRef)(local_418);
        if ((int)UVar9 < 0) {
          _com_issue_errorex(UVar9,pIVar4,(_GUID *)&DAT_140281f28);
        }
        if (local_418 != (IUnknown *)0x0) {
          (*local_418->lpVtbl->Release)(local_418);
          local_418 = (IUnknown *)0x0;
        }
      }
      local_3b0 = 0;
      local_3a8 = &DAT_140281f00;
      local_3c0 = &DAT_140281f00;
      local_3b8 = 0;
      local_3c8 = 0;
      Ordinal_9(local_3e0);
      Ordinal_9(local_3f8);
      if (local_410 != (longlong *)0x0) {
        (**(code **)(*local_410 + 0x10))();
      }
      if (local_418 != (IUnknown *)0x0) {
        (*local_418->lpVtbl->Release)(local_418);
      }
      if (local_430 != (longlong *)0x0) {
        (**(code **)(*local_430 + 0x10))();
      }
      return puVar11;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400e41e0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  int iVar3;
  ULONG UVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  longlong *local_88;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [5];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  plVar10 = (longlong *)0x0;
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400e42b3;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 0;
  }
LAB_1400e42b3:
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_guild_increase_exp");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_78;
  local_88 = *(longlong **)(param_2 + 0xe);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("guild_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x1e);
  uStack_74 = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_88 = (longlong *)&local_78;
    uVar1 = *(undefined4 *)(param_2 + 0x2e);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490(&DAT_14028b4c8);
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_78);
    local_88 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_88 = local_58;
    uVar6 = FUN_1400623f0(local_58,param_2 + 0x32);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490(&DAT_14028ea4c);
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x14,uVar6);
    local_88 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_88 = local_58;
      uVar6 = FUN_1400623f0(local_58,param_2 + 0x5a);
      plVar9 = operator_new(0x18);
      local_98[0] = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("character_name");
        *plVar9 = lVar8;
        plVar10 = plVar9;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x10,uVar6);
      local_88 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

IID * FUN_1400e48f0(undefined8 *param_1,undefined8 *param_2)

{
  uchar *puVar1;
  undefined4 *puVar2;
  IUnknown *pIVar3;
  undefined6 uVar4;
  IUnknown *This;
  int iVar5;
  HRESULT HVar6;
  ULONG UVar7;
  undefined8 *puVar8;
  IID *pIVar9;
  longlong lVar10;
  longlong *plVar11;
  undefined8 uVar12;
  undefined8 uVar13;
  IID *pIVar14;
  char *riid;
  IID *pIVar15;
  char *ppvObject;
  uint uVar16;
  undefined1 auStackY_328 [32];
  char local_2e8 [4];
  int local_2e4;
  uint local_2e0;
  short local_2dc;
  short local_2d8;
  longlong *local_2d0;
  int local_2c8;
  undefined8 local_2c0;
  undefined4 local_2b8;
  undefined2 uStack_2b4;
  undefined2 uStack_2b2;
  undefined6 uStack_2b0;
  undefined2 uStack_2aa;
  undefined6 uStack_2a8;
  short local_2a2;
  IID *local_2a0;
  undefined8 *local_298;
  IID *local_290;
  LPUNKNOWN local_288;
  longlong *local_280;
  IUnknown *local_278;
  longlong *local_270;
  undefined4 local_268;
  undefined1 local_258 [24];
  undefined1 local_240 [24];
  undefined4 local_228;
  undefined1 *local_220;
  undefined4 local_218;
  undefined8 local_210;
  undefined1 *local_208;
  undefined8 *local_1f8;
  IID *local_1f0;
  longlong *local_1e8;
  undefined8 local_1e0;
  undefined1 local_1d8;
  undefined8 local_1d0;
  undefined1 local_1c8;
  undefined8 local_1c0;
  undefined1 local_1b8;
  undefined8 local_1b0;
  undefined1 local_1a8;
  undefined8 local_1a0;
  undefined1 local_198;
  undefined8 local_190;
  undefined1 local_188;
  undefined8 local_180;
  undefined1 local_178;
  undefined8 local_170;
  undefined1 local_168;
  IID *local_160 [2];
  undefined4 local_150;
  undefined4 uStack_14c;
  undefined4 uStack_148;
  undefined4 uStack_144;
  undefined1 local_140 [8];
  undefined8 local_138;
  undefined4 local_128;
  undefined4 uStack_124;
  undefined4 uStack_120;
  undefined4 uStack_11c;
  undefined1 local_110 [24];
  undefined1 local_f8 [24];
  undefined1 local_e0 [24];
  longlong local_c8 [3];
  undefined1 local_b0 [24];
  undefined8 local_98;
  undefined8 uStack_90;
  undefined4 local_88;
  undefined4 uStack_84;
  undefined8 uStack_80;
  undefined8 local_78;
  undefined8 uStack_70;
  undefined8 local_68;
  ushort uStack_60;
  undefined2 uStack_5e;
  undefined4 uStack_5c;
  undefined4 uStack_58;
  undefined8 uStack_54;
  undefined4 uStack_4c;
  undefined4 uStack_48;
  undefined4 local_44;
  ushort uStack_40;
  undefined2 uStack_3e;
  ulonglong local_38;
  
  local_138 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_328;
  pIVar15 = (IID *)0x0;
  local_2d0 = (longlong *)0x0;
  local_298 = param_1;
  local_1f8 = param_2;
  iVar5 = FUN_140001970(&local_2d0);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_278 = (IUnknown *)0x0;
  local_270 = (longlong *)0x0;
  Ordinal_8(local_258);
  Ordinal_8(local_240);
  pIVar3 = local_278;
  if ((local_278 != (IUnknown *)0x0) && (local_278 = (IUnknown *)0x0, pIVar3 != (IUnknown *)0x0)) {
    (*pIVar3->lpVtbl->Release)(pIVar3);
  }
  local_208 = &DAT_140281f00;
  local_220 = &DAT_140281f00;
  local_218 = 0;
  local_210 = 0;
  if (local_278 != (IUnknown *)0x0) {
    (*local_278->lpVtbl->Release)(local_278);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_288);
  if (HVar6 < 0) {
LAB_1400e4a69:
    local_278 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_288);
    if (-1 < HVar6) {
      HVar6 = (*local_288->lpVtbl->QueryInterface)(local_288,(IID *)&DAT_140281f68,&local_278);
    }
    (*local_288->lpVtbl->Release)(local_288);
    if (HVar6 < 0) goto LAB_1400e4a69;
  }
  local_228 = 2;
  local_268 = 1;
  local_2e8[0] = '\x01';
  local_2b8 = *(undefined4 *)(param_2 + 1);
  local_2c0._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_2c0._0_4_ = CONCAT22(0x23c8,(short)*param_2);
  uStack_2b4 = 0x85;
  uStack_2b2 = (undefined2)*(undefined8 *)((longlong)param_2 + 0xe);
  uStack_2b0 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0xe) >> 0x10);
  uStack_2aa = (undefined2)*(undefined8 *)((longlong)param_2 + 0x16);
  uStack_2a8 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x16) >> 0x10);
  local_2e4 = 0;
  local_2a2 = 0;
  uVar16 = 0x20;
  local_2e0 = 0x20;
  pIVar3 = *(IUnknown **)*param_1;
  if (pIVar3 != (IUnknown *)0x0) {
    local_2c8 = 0;
    UVar7 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if (local_2c8 != 0) goto LAB_1400e4c68;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar3 = local_278;
    if (local_278 != (IUnknown *)0x0) {
      local_2e4 = 0;
      UVar7 = (*local_278->lpVtbl[0x12].AddRef)(local_278);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f28);
      }
      pIVar3 = local_278;
      if (local_2e4 != 0) {
        if (local_278 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar7 = (*local_278->lpVtbl[10].Release)(local_278);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_278 != (IUnknown *)0x0) {
        (*local_278->lpVtbl->Release)(local_278);
        local_278 = (IUnknown *)0x0;
      }
    }
    local_210 = 0;
    local_208 = &DAT_140281f00;
    local_220 = &DAT_140281f00;
    local_218 = 0;
    local_228 = 0;
    Ordinal_9(local_240);
    Ordinal_9(local_258);
    if (local_270 != (longlong *)0x0) {
      (**(code **)(*local_270 + 0x10))();
    }
    if (local_278 != (IUnknown *)0x0) {
      (*local_278->lpVtbl->Release)(local_278);
    }
    if (local_2d0 != (longlong *)0x0) {
      (**(code **)(*local_2d0 + 0x10))();
    }
    return (IID *)0x0;
  }
LAB_1400e4c68:
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_1e8);
  FUN_140001710(&local_2d0,*puVar8,"dbo.up_get_guild_increase_exp");
  if (local_1e8 != (longlong *)0x0) {
    (**(code **)(*local_1e8 + 0x10))();
  }
  local_280 = local_c8;
  local_128 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_124 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_120 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_11c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_c8,&local_128);
  pIVar9 = operator_new(0x18);
  local_160[0] = pIVar15;
  local_1f0 = pIVar9;
  if (pIVar9 != (IID *)0x0) {
    pIVar9->Data4[0] = '\0';
    pIVar9->Data4[1] = '\0';
    pIVar9->Data4[2] = '\0';
    pIVar9->Data4[3] = '\0';
    pIVar9->Data4[4] = '\0';
    pIVar9->Data4[5] = '\0';
    pIVar9->Data4[6] = '\0';
    pIVar9->Data4[7] = '\0';
    pIVar9[1].Data1 = 1;
    lVar10 = FUN_140201490("guild_id");
    pIVar9->Data1 = (int)lVar10;
    pIVar9->Data2 = (short)((ulonglong)lVar10 >> 0x20);
    pIVar9->Data3 = (short)((ulonglong)lVar10 >> 0x30);
    local_160[0] = pIVar9;
  }
  if (local_160[0] == (IID *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_2d0,local_140,local_160,0xca);
  local_280 = plVar11;
  if (local_2d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_2d0,&local_1f0);
  pIVar3 = (IUnknown *)*puVar8;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar7 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_1f0 != (IID *)0x0) {
      (**(code **)(*(longlong *)local_1f0 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    puVar8 = (undefined8 *)FUN_1400016d0(&local_2d0,&local_280);
    This = local_278;
    pIVar3 = (IUnknown *)*puVar8;
    if (local_278 != pIVar3) {
      local_278 = pIVar3;
      if (pIVar3 != (IUnknown *)0x0) {
        (*pIVar3->lpVtbl->AddRef)(pIVar3);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_280 != (longlong *)0x0) {
      (**(code **)(*local_280 + 0x10))();
    }
    pIVar3 = local_278;
    if (local_278 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_2d8 = 0;
    UVar7 = (*local_278->lpVtbl[6].Release)(local_278);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f28);
    }
    if (local_2d8 == -1) {
      uStack_2b4 = 0x86;
      pIVar15 = (IID *)0x0;
    }
    else {
      while( true ) {
        pIVar3 = local_278;
        if (local_278 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_2dc = 0;
        UVar7 = (*local_278->lpVtbl[6].Release)(local_278);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f28);
        }
        if (local_2dc == -1) break;
        local_98 = 0;
        uStack_90 = 0;
        local_88 = 0;
        memset(&uStack_84,0,0x28);
        uStack_5c = 0;
        uStack_58 = 0;
        uStack_54 = 0;
        uStack_4c = 0;
        uStack_48 = 0;
        local_44 = 0;
        uStack_40 = 0;
        uStack_3e = 0;
        uVar12 = FUN_140002290(&local_278,local_f8,"character_id",local_2e8);
        FUN_1400625d0(uVar12,&local_150);
        local_98 = CONCAT44(uStack_14c,local_150);
        uStack_90 = CONCAT44(uStack_144,uStack_148);
        Ordinal_9(local_f8);
        uVar12 = FUN_140002290(&local_278,local_110,&DAT_14028fa98,local_2e8);
        FUN_140182560(uVar12);
        local_88 = FUN_140062550(uVar12);
        Ordinal_9(local_110);
        uVar12 = FUN_140002290(&local_278,local_e0,&DAT_140289c74,local_2e8);
        FUN_140062840(uVar12,&local_2a0);
        FUN_1401568c0();
        pIVar9 = (IID *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pIVar9 = pIVar15;
        }
        if (local_2a0 != (IID *)PTR_DAT_1403200a0) {
          uVar12 = FUN_1401568c0();
          local_188 = 0;
          local_190 = uVar12;
          FUN_140156b50(uVar12);
          local_188 = 1;
          if (((pIVar9 != (IID *)0x0) && (pIVar9 != (IID *)PTR_DAT_1403200a0)) &&
             (pIVar9[-1].Data4 != (uchar *)0x0)) {
            uVar13 = FUN_1401568c0();
            local_1c8 = 0;
            local_1d0 = uVar13;
            FUN_140156b50(uVar13);
            local_1c8 = 1;
            puVar1 = pIVar9[-1].Data4 + 4;
            *(int *)puVar1 = *(int *)puVar1 + -1;
            if (*(int *)puVar1 == 0) {
              FUN_140156970(pIVar9[-1].Data4);
            }
            FUN_140156be0(uVar13);
            local_1c8 = 0;
          }
          pIVar9 = local_2a0;
          if (((local_2a0 != (IID *)PTR_DAT_1403200a0) && (local_2a0 != (IID *)0x0)) &&
             (local_2a0 != (IID *)0x8)) {
            *(int *)(local_2a0[-1].Data4 + 4) = *(int *)(local_2a0[-1].Data4 + 4) + 1;
          }
          FUN_140156be0(uVar12);
          local_188 = 0;
        }
        pIVar14 = pIVar9;
        if (pIVar9 == (IID *)0x0) {
          pIVar14 = (IID *)PTR_DAT_1403200a0;
        }
        wcsncpy((wchar_t *)&uStack_84,(wchar_t *)pIVar14,0x13);
        if (((pIVar9 != (IID *)0x0) && (pIVar9 != (IID *)PTR_DAT_1403200a0)) &&
           (pIVar9[-1].Data4 != (uchar *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_1a8 = 0;
          local_1b0 = uVar12;
          FUN_140156b50(uVar12);
          local_1a8 = 1;
          puVar1 = pIVar9[-1].Data4 + 4;
          *(int *)puVar1 = *(int *)puVar1 + -1;
          if (*(int *)puVar1 == 0) {
            FUN_140156970(pIVar9[-1].Data4);
          }
          FUN_140156be0(uVar12);
          local_1a8 = 0;
        }
        pIVar9 = local_2a0;
        if (((local_2a0 != (IID *)0x0) && (local_2a0 != (IID *)PTR_DAT_1403200a0)) &&
           (pIVar14 = local_2a0 + -1, pIVar14->Data4 != (uchar *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_168 = 0;
          local_170 = uVar12;
          FUN_140156b50(uVar12);
          local_168 = 1;
          puVar1 = pIVar9[-1].Data4 + 4;
          *(int *)puVar1 = *(int *)puVar1 + -1;
          if (*(int *)puVar1 == 0) {
            FUN_140156970(pIVar14->Data4);
          }
          FUN_140156be0(uVar12);
          local_168 = 0;
        }
        local_2a0 = (IID *)PTR_DAT_1403200a0;
        Ordinal_9(local_e0);
        uVar12 = FUN_140002290(&local_278,local_b0,"character_name",local_2e8);
        FUN_140062840(uVar12,&local_290);
        FUN_1401568c0();
        pIVar9 = (IID *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pIVar9 = pIVar15;
        }
        if (local_290 != (IID *)PTR_DAT_1403200a0) {
          uVar12 = FUN_1401568c0();
          local_1b8 = 0;
          local_1c0 = uVar12;
          FUN_140156b50(uVar12);
          local_1b8 = 1;
          if (((pIVar9 != (IID *)0x0) && (pIVar9 != (IID *)PTR_DAT_1403200a0)) &&
             (pIVar9[-1].Data4 != (uchar *)0x0)) {
            uVar13 = FUN_1401568c0();
            local_1d8 = 0;
            local_1e0 = uVar13;
            FUN_140156b50(uVar13);
            local_1d8 = 1;
            puVar1 = pIVar9[-1].Data4 + 4;
            *(int *)puVar1 = *(int *)puVar1 + -1;
            if (*(int *)puVar1 == 0) {
              FUN_140156970(pIVar9[-1].Data4);
            }
            FUN_140156be0(uVar13);
            local_1d8 = 0;
          }
          pIVar9 = local_290;
          if (((local_290 != (IID *)PTR_DAT_1403200a0) && (local_290 != (IID *)0x0)) &&
             (local_290 != (IID *)0x8)) {
            *(int *)(local_290[-1].Data4 + 4) = *(int *)(local_290[-1].Data4 + 4) + 1;
          }
          FUN_140156be0(uVar12);
          local_1b8 = 0;
        }
        riid = (char *)pIVar9;
        if (pIVar9 == (IID *)0x0) {
          riid = PTR_DAT_1403200a0;
        }
        ppvObject = (char *)0xf;
        wcsncpy((wchar_t *)&uStack_5c,(wchar_t *)riid,0xf);
        if (((pIVar9 != (IID *)0x0) && (pIVar9 != (IID *)PTR_DAT_1403200a0)) &&
           (pIVar9[-1].Data4 != (uchar *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_198 = 0;
          local_1a0 = uVar12;
          FUN_140156b50(uVar12);
          local_198 = 1;
          puVar1 = pIVar9[-1].Data4 + 4;
          *(int *)puVar1 = *(int *)puVar1 + -1;
          if (*(int *)puVar1 == 0) {
            FUN_140156970(pIVar9[-1].Data4);
          }
          FUN_140156be0(uVar12);
          local_198 = 0;
        }
        pIVar9 = local_290;
        if (((local_290 != (IID *)0x0) && (local_290 != (IID *)PTR_DAT_1403200a0)) &&
           (pIVar14 = local_290 + -1, pIVar14->Data4 != (uchar *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_178 = 0;
          local_180 = uVar12;
          FUN_140156b50(uVar12);
          local_178 = 1;
          puVar1 = pIVar9[-1].Data4 + 4;
          *(int *)puVar1 = *(int *)puVar1 + -1;
          if (*(int *)puVar1 == 0) {
            FUN_140156970(pIVar14->Data4);
          }
          FUN_140156be0(uVar12);
          local_178 = 0;
        }
        local_290 = (IID *)PTR_DAT_1403200a0;
        Ordinal_9(local_b0);
        uStack_5e = 0;
        uStack_3e = 0;
        lVar10 = (longlong)(int)uVar16;
        puVar8 = (undefined8 *)(lVar10 + 0x130 + (longlong)param_1);
        *puVar8 = local_98;
        puVar8[1] = uStack_90;
        puVar8 = (undefined8 *)(lVar10 + 0x140 + (longlong)param_1);
        *puVar8 = CONCAT44(uStack_84,local_88);
        puVar8[1] = uStack_80;
        puVar8 = (undefined8 *)(lVar10 + 0x150 + (longlong)param_1);
        *puVar8 = local_78;
        puVar8[1] = uStack_70;
        puVar8 = (undefined8 *)(lVar10 + 0x160 + (longlong)param_1);
        *puVar8 = local_68;
        puVar8[1] = CONCAT44(uStack_5c,(uint)uStack_60);
        puVar2 = (undefined4 *)(lVar10 + 0x170 + (longlong)param_1);
        *puVar2 = uStack_58;
        puVar2[1] = (undefined4)uStack_54;
        puVar2[2] = uStack_54._4_4_;
        puVar2[3] = uStack_4c;
        *(ulonglong *)(lVar10 + 0x180 + (longlong)param_1) = CONCAT44(local_44,uStack_48);
        *(uint *)(lVar10 + 0x188 + (longlong)param_1) = (uint)uStack_40;
        local_2e0 = uVar16 + 0x5c;
        local_2a2 = (short)local_2e4 + 1;
        local_2e4 = CONCAT22((short)((uint)local_2e4 >> 0x10),local_2a2);
        if (50000 < local_2e0) {
          uVar4 = local_2c0._2_6_;
          local_2c0 = CONCAT62(local_2c0._2_6_,(short)local_2e0);
          uVar12 = local_2c0;
          riid = (char *)(param_1 + 0x26);
          local_2c0._4_2_ = SUB62(uVar4,2);
          local_2c0._6_2_ = SUB62(uVar4,4);
          ((IID *)riid)->Data1 = (undefined4)local_2c0;
          ((IID *)riid)->Data2 = local_2c0._4_2_;
          ((IID *)riid)->Data3 = local_2c0._6_2_;
          param_1[0x27] = CONCAT26(uStack_2b2,CONCAT24(uStack_2b4,local_2b8));
          param_1[0x28] = CONCAT26(uStack_2aa,uStack_2b0);
          param_1[0x29] = CONCAT26(local_2a2,uStack_2a8);
          local_2c0 = uVar12;
          iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
          if (iVar5 == 0) {
            ppvObject = "DB Result Queue push error";
            riid = "DBResultQueue_Error.Log";
            FUN_1400a0b40(param_1[0x23]);
          }
          local_2e0 = 0x20;
          local_2e4 = 0;
          local_2a2 = 0;
        }
        pIVar3 = local_278;
        uVar16 = local_2e0;
        if (local_278 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar6 = (*local_278->lpVtbl[0xc].QueryInterface)(local_278,(IID *)riid,(void **)ppvObject);
        if (HVar6 < 0) {
          _com_issue_errorex(HVar6,pIVar3,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_2e8[0] == '\0') {
        uStack_2b4 = 0x87;
      }
      else {
        pIVar15 = (IID *)0x1;
      }
    }
    local_2c0 = CONCAT62(local_2c0._2_6_,(short)uVar16);
    param_1[0x26] = local_2c0;
    param_1[0x27] = CONCAT26(uStack_2b2,CONCAT24(uStack_2b4,local_2b8));
    param_1[0x28] = CONCAT26(uStack_2aa,uStack_2b0);
    param_1[0x29] = CONCAT26(local_2a2,uStack_2a8);
    iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar5 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar3 = local_278;
    if (local_278 != (IUnknown *)0x0) {
      local_2e0 = 0;
      UVar7 = (*local_278->lpVtbl[0x12].AddRef)(local_278);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f28);
      }
      pIVar3 = local_278;
      if (local_2e0 != 0) {
        if (local_278 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar7 = (*local_278->lpVtbl[10].Release)(local_278);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_278 != (IUnknown *)0x0) {
        (*local_278->lpVtbl->Release)(local_278);
        local_278 = (IUnknown *)0x0;
      }
    }
    local_210 = 0;
    local_208 = &DAT_140281f00;
    local_220 = &DAT_140281f00;
    local_218 = 0;
    local_228 = 0;
    Ordinal_9(local_240);
    Ordinal_9(local_258);
    if (local_270 != (longlong *)0x0) {
      (**(code **)(*local_270 + 0x10))();
    }
    if (local_278 != (IUnknown *)0x0) {
      (*local_278->lpVtbl->Release)(local_278);
    }
    if (local_2d0 != (longlong *)0x0) {
      (**(code **)(*local_2d0 + 0x10))();
    }
    return pIVar15;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400e5760(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400e57f6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400e57f6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_guild_level");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("guild_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  uVar6 = *(undefined8 *)(param_2 + 0x2e);
  Ordinal_8(&local_88);
  uVar6 = FUN_1401824f0(local_58,uVar6);
  iVar4 = Ordinal_10(&local_88,uVar6);
  if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  Ordinal_9(local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("need_exp");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0x14,1,8,&local_88);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  uVar1 = *(undefined4 *)(param_2 + 0x36);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("need_gold");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    uVar1 = *(undefined4 *)(param_2 + 0x3a);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar1);
    plVar9 = operator_new(0x18);
    local_98[0] = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("max_member");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1400e5ec0(undefined8 *param_1,longlong *param_2)

{
  char cVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  IUnknown *This;
  int iVar4;
  HRESULT HVar5;
  ULONG UVar6;
  undefined8 *puVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong lVar10;
  longlong *plVar11;
  longlong *plVar12;
  undefined8 uVar13;
  longlong *plVar14;
  undefined1 auStackY_348 [32];
  longlong *local_308;
  short local_300;
  undefined1 local_2fc [4];
  undefined8 *local_2f8;
  int local_2f0;
  longlong *local_2e8;
  longlong *local_2e0;
  longlong *local_2d8;
  longlong *local_2d0;
  longlong *local_2c8;
  LPUNKNOWN local_2c0;
  longlong *local_2b8;
  longlong *local_2b0;
  longlong *local_2a8 [2];
  IUnknown *local_298;
  longlong *local_290;
  undefined4 local_288;
  undefined1 local_278 [24];
  undefined1 local_260 [24];
  undefined4 local_248;
  undefined1 *local_240;
  undefined4 local_238;
  undefined8 local_230;
  undefined1 *local_228;
  longlong *local_218;
  longlong *local_210;
  longlong local_208;
  undefined1 local_200;
  longlong *local_1f0;
  longlong *local_1e8;
  longlong *local_1e0;
  longlong *local_1d8;
  longlong *local_1d0;
  longlong *local_1c8;
  longlong *local_1c0;
  longlong *local_1b8;
  longlong *local_1b0;
  longlong *local_1a8;
  longlong *local_1a0;
  longlong *local_198;
  longlong *local_190;
  undefined1 local_188 [9];
  undefined8 local_17f;
  undefined8 uStack_177;
  longlong local_168 [3];
  longlong local_150 [3];
  longlong local_138 [3];
  longlong local_120 [5];
  undefined4 local_f8;
  undefined4 uStack_f4;
  undefined4 uStack_f0;
  undefined4 uStack_ec;
  undefined8 local_e8;
  undefined4 local_d8;
  undefined4 uStack_d4;
  undefined4 uStack_d0;
  undefined4 uStack_cc;
  undefined1 local_c8 [8];
  longlong local_c0 [3];
  longlong local_a8 [4];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 local_80;
  undefined2 local_7c;
  undefined1 local_7a;
  undefined4 local_79;
  undefined4 local_75;
  undefined4 local_71;
  undefined8 local_6d;
  undefined8 uStack_65;
  undefined1 local_5d;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_50;
  undefined4 local_4c;
  undefined4 local_48;
  ulonglong local_38;
  
  local_e8 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_348;
  plVar14 = (longlong *)0x0;
  local_308 = (longlong *)0x0;
  local_2f8 = param_1;
  local_2e8 = param_2;
  local_2b8 = param_2;
  iVar4 = FUN_140001970(&local_308);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_298 = (IUnknown *)0x0;
  local_290 = (longlong *)0x0;
  Ordinal_8(local_278);
  Ordinal_8(local_260);
  pIVar3 = local_298;
  if ((local_298 != (IUnknown *)0x0) && (local_298 = (IUnknown *)0x0, pIVar3 != (IUnknown *)0x0)) {
    (*pIVar3->lpVtbl->Release)(pIVar3);
  }
  local_228 = &DAT_140281f00;
  local_240 = &DAT_140281f00;
  local_238 = 0;
  local_230 = 0;
  if (local_298 != (IUnknown *)0x0) {
    (*local_298->lpVtbl->Release)(local_298);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_2c0);
  if (HVar5 < 0) {
LAB_1400e6039:
    local_298 = (IUnknown *)0x0;
  }
  else {
    HVar5 = OleRun(local_2c0);
    if (-1 < HVar5) {
      HVar5 = (*local_2c0->lpVtbl->QueryInterface)(local_2c0,(IID *)&DAT_140281f68,&local_298);
    }
    (*local_2c0->lpVtbl->Release)(local_2c0);
    if (HVar5 < 0) goto LAB_1400e6039;
  }
  local_248 = 2;
  local_288 = 1;
  local_2fc[0] = 1;
  local_80 = (undefined4)param_2[1];
  _local_88 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23ca0000);
  local_7c = 0xec;
  _local_88 = CONCAT62(stack0xffffffffffffff7a,0x44);
  local_71 = *(undefined4 *)((longlong)param_2 + 0x17);
  local_75 = *(undefined4 *)((longlong)param_2 + 0x13);
  local_6d = *(undefined8 *)((longlong)param_2 + 0x1b);
  uStack_65 = *(undefined8 *)((longlong)param_2 + 0x23);
  local_58 = (undefined4)param_2[6];
  local_5c = *(undefined4 *)((longlong)param_2 + 0x2c);
  local_5d = *(undefined1 *)((longlong)param_2 + 0x2b);
  local_54 = *(undefined4 *)((longlong)param_2 + 0x34);
  local_50 = (undefined4)param_2[7];
  local_4c = *(undefined4 *)((longlong)param_2 + 0x3c);
  local_48 = (undefined4)param_2[8];
  local_79 = *(undefined4 *)((longlong)param_2 + 0xf);
  local_7a = *(undefined1 *)((longlong)param_2 + 0xe);
  pIVar3 = *(IUnknown **)*param_1;
  if (pIVar3 != (IUnknown *)0x0) {
    local_2f0 = 0;
    UVar6 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if (local_2f0 != 0) goto LAB_1400e62fd;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    local_7c = 0xffff;
    iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_88);
    if (iVar4 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar3 = local_298;
    if (local_298 != (IUnknown *)0x0) {
      local_2e8 = (longlong *)((ulonglong)local_2e8 & 0xffffffff00000000);
      UVar6 = (*local_298->lpVtbl[0x12].AddRef)(local_298);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
      }
      pIVar3 = local_298;
      if ((int)local_2e8 != 0) {
        if (local_298 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar6 = (*local_298->lpVtbl[10].Release)(local_298);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_298 != (IUnknown *)0x0) {
        (*local_298->lpVtbl->Release)(local_298);
        local_298 = (IUnknown *)0x0;
      }
    }
    local_230 = 0;
    local_228 = &DAT_140281f00;
    local_240 = &DAT_140281f00;
    local_238 = 0;
    local_248 = 0;
    Ordinal_9(local_260);
    Ordinal_9(local_278);
    if (local_290 != (longlong *)0x0) {
      (**(code **)(*local_290 + 0x10))();
    }
    if (local_298 != (IUnknown *)0x0) {
      (*local_298->lpVtbl->Release)(local_298);
    }
    if (local_308 != (longlong *)0x0) {
      (**(code **)(*local_308 + 0x10))();
    }
    return (longlong *)0x0;
  }
LAB_1400e62fd:
  local_17f = *(undefined8 *)((longlong)param_2 + 0x34);
  uStack_177 = *(undefined8 *)((longlong)param_2 + 0x3c);
  local_300 = CONCAT11(local_300._1_1_,*(undefined1 *)((longlong)param_2 + 0x2b));
  uVar2 = *(undefined4 *)((longlong)param_2 + 0x2c);
  lVar10 = param_2[6];
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_1a8);
  FUN_140001710(&local_308,*puVar7,"dbo.up_insert_guild_skill");
  if (local_1a8 != (longlong *)0x0) {
    (**(code **)(*local_1a8 + 0x10))();
  }
  local_2e0 = local_c0;
  local_d8 = (undefined4)local_17f;
  uStack_d4 = local_17f._4_4_;
  uStack_d0 = (undefined4)uStack_177;
  uStack_cc = uStack_177._4_4_;
  FUN_140062280(local_c0,&local_d8);
  plVar8 = operator_new(0x18);
  local_1f0 = plVar14;
  local_210 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("guild_id");
    *plVar8 = lVar9;
    local_1f0 = plVar8;
  }
  if (local_1f0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_308,&local_2c8,&local_1f0,0xca);
  local_2e0 = plVar8;
  if (local_308 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_308,&local_1b0);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_1b0 != (longlong *)0x0) {
    (**(code **)(*local_1b0 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_2c8 = local_a8;
  local_f8 = (undefined4)local_6d;
  uStack_f4 = local_6d._4_4_;
  uStack_f0 = (undefined4)uStack_65;
  uStack_ec = uStack_65._4_4_;
  FUN_140062280(local_a8,&local_f8);
  plVar8 = operator_new(0x18);
  local_1e0 = plVar14;
  local_2e0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("learn_user_id");
    *plVar8 = lVar9;
    local_1e0 = plVar8;
  }
  if (local_1e0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_308,&local_2d8,&local_1e0,0xca);
  local_2c8 = plVar8;
  if (local_308 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_308,&local_1d0);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_1d0 != (longlong *)0x0) {
    (**(code **)(*local_1d0 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_2d8 = local_168;
  Ordinal_8(local_168);
  FUN_140062080(local_168,uVar2);
  plVar8 = operator_new(0x18);
  local_1a0 = plVar14;
  local_2c8 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("skill_table_id");
    *plVar8 = lVar9;
    local_1a0 = plVar8;
  }
  if (local_1a0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_308,&local_2d0,&local_1a0,3);
  local_2d8 = plVar8;
  if (local_308 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_308,&local_1c0);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_1c0 != (longlong *)0x0) {
    (**(code **)(*local_1c0 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_2d0 = local_120;
  Ordinal_8(local_120);
  FUN_140062080(local_120,(int)lVar10);
  plVar8 = operator_new(0x18);
  local_190 = plVar14;
  local_2d8 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar10 = FUN_140201490("skill_id");
    *plVar8 = lVar10;
    local_190 = plVar8;
  }
  if (local_190 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_308,local_2a8,&local_190,3);
  local_2d0 = plVar8;
  if (local_308 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_308,&local_1e8);
  pIVar3 = (IUnknown *)*puVar7;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar6 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_1e8 != (longlong *)0x0) {
      (**(code **)(*local_1e8 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_2a8[0] = &local_208;
    Ordinal_8(&local_208);
    if ((short)local_208 != 0x11) {
      iVar4 = Ordinal_9(&local_208);
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar4);
      }
      local_208._0_2_ = 0x11;
    }
    local_200 = (undefined1)local_300;
    plVar8 = operator_new(0x18);
    local_1d8 = plVar14;
    local_2d0 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar10 = FUN_140201490("skill_level");
      *plVar8 = lVar10;
      local_1d8 = plVar8;
    }
    if (local_1d8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_308,&local_2b0,&local_1d8,0x10);
    local_2a8[0] = plVar8;
    if (local_308 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_308,&local_1b8);
    pIVar3 = (IUnknown *)*puVar7;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar6 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_1b8 != (longlong *)0x0) {
        (**(code **)(*local_1b8 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      plVar8 = local_2b8;
      local_2b0 = local_138;
      uVar2 = *(undefined4 *)((longlong)local_2b8 + 0xf);
      Ordinal_8(local_138);
      FUN_140062080(local_138,uVar2);
      plVar11 = operator_new(0x18);
      plVar12 = plVar14;
      local_2a8[0] = plVar11;
      if (plVar11 != (longlong *)0x0) {
        plVar11[1] = 0;
        *(undefined4 *)(plVar11 + 2) = 1;
        lVar10 = FUN_140201490("learn_cost");
        *plVar11 = lVar10;
        plVar12 = plVar11;
      }
      local_2b8 = plVar12;
      if (plVar12 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar12 = (longlong *)FUN_140001880(&local_308,&local_218,&local_2b8,3);
      local_2b0 = plVar12;
      if (local_308 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_308,&local_1c8);
      pIVar3 = (IUnknown *)*puVar7;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar6 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_1c8 != (longlong *)0x0) {
          (**(code **)(*local_1c8 + 0x10))();
        }
        if ((longlong *)*plVar12 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar12 + 0x10))();
        }
        local_218 = local_150;
        cVar1 = *(char *)((longlong)plVar8 + 0xe);
        Ordinal_8(local_150);
        FUN_140062080(local_150,cVar1 == '\x01');
        plVar8 = operator_new(0x18);
        local_198 = plVar14;
        local_2b0 = plVar8;
        if (plVar8 != (longlong *)0x0) {
          plVar8[1] = 0;
          *(undefined4 *)(plVar8 + 2) = 1;
          lVar10 = FUN_140201490("is_update");
          *plVar8 = lVar10;
          local_198 = plVar8;
        }
        if (local_198 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar8 = (longlong *)FUN_140001880(&local_308,local_c8,&local_198,0x10);
        local_218 = plVar8;
        if (local_308 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar7 = (undefined8 *)FUN_140001660(local_308,&local_210);
        pIVar3 = (IUnknown *)*puVar7;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar6 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar6 < 0) {
            _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_210 != (longlong *)0x0) {
            (**(code **)(*local_210 + 0x10))();
          }
          if ((longlong *)*plVar8 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar8 + 0x10))();
          }
          puVar7 = (undefined8 *)FUN_1400016d0(&local_308,&local_2e0);
          This = local_298;
          pIVar3 = (IUnknown *)*puVar7;
          if (local_298 != pIVar3) {
            local_298 = pIVar3;
            if (pIVar3 != (IUnknown *)0x0) {
              (*pIVar3->lpVtbl->AddRef)(pIVar3);
            }
            if (This != (IUnknown *)0x0) {
              (*This->lpVtbl->Release)(This);
            }
          }
          if (local_2e0 != (longlong *)0x0) {
            (**(code **)(*local_2e0 + 0x10))();
          }
          pIVar3 = local_298;
          if (local_298 != (IUnknown *)0x0) {
            local_300 = 0;
            UVar6 = (*local_298->lpVtbl[6].Release)(local_298);
            if ((int)UVar6 < 0) {
              _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
            }
            if (local_300 == -1) {
              local_7c = 0xfffc;
              plVar8 = plVar14;
            }
            else {
              uVar13 = FUN_140002290(&local_298,local_188,"result_code",local_2fc);
              FUN_140182560(uVar13);
              iVar4 = FUN_140062550(uVar13);
              Ordinal_9(local_188);
              plVar8 = (longlong *)0x1;
              if (iVar4 != 1) {
                local_7c = (undefined2)iVar4;
                plVar8 = plVar14;
              }
            }
            iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_88);
            if (iVar4 == 0) {
              FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
            }
            pIVar3 = local_298;
            if (local_298 != (IUnknown *)0x0) {
              local_2f8 = (undefined8 *)((ulonglong)local_2f8 & 0xffffffff00000000);
              UVar6 = (*local_298->lpVtbl[0x12].AddRef)(local_298);
              if ((int)UVar6 < 0) {
                _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
              }
              pIVar3 = local_298;
              if ((int)local_2f8 != 0) {
                if (local_298 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
                  FUN_1402013e0(0x80004003);
                }
                UVar6 = (*local_298->lpVtbl[10].Release)(local_298);
                if ((int)UVar6 < 0) {
                  _com_issue_errorex(UVar6,pIVar3,(_GUID *)&DAT_140281f28);
                }
              }
              if (local_298 != (IUnknown *)0x0) {
                (*local_298->lpVtbl->Release)(local_298);
                local_298 = (IUnknown *)0x0;
              }
            }
            local_230 = 0;
            local_228 = &DAT_140281f00;
            local_240 = &DAT_140281f00;
            local_238 = 0;
            local_248 = 0;
            Ordinal_9(local_260);
            Ordinal_9(local_278);
            if (local_290 != (longlong *)0x0) {
              (**(code **)(*local_290 + 0x10))();
            }
            if (local_298 != (IUnknown *)0x0) {
              (*local_298->lpVtbl->Release)(local_298);
            }
            if (local_308 != (longlong *)0x0) {
              (**(code **)(*local_308 + 0x10))();
            }
            return plVar8;
          }
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400e715c)
// WARNING: Removing unreachable block (ram,0x0001400e7169)
// WARNING: Removing unreachable block (ram,0x0001400e7174)
// WARNING: Removing unreachable block (ram,0x0001400e7184)
// WARNING: Removing unreachable block (ram,0x0001400e77a9)
// WARNING: Removing unreachable block (ram,0x0001400e77b6)
// WARNING: Removing unreachable block (ram,0x0001400e77c1)
// WARNING: Removing unreachable block (ram,0x0001400e77d1)

undefined4 FUN_1400e6ed0(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  undefined6 uVar3;
  IUnknown *This;
  undefined1 uVar4;
  int iVar5;
  HRESULT HVar6;
  ULONG UVar7;
  undefined4 uVar8;
  undefined4 uVar9;
  undefined8 *puVar10;
  undefined8 uVar11;
  undefined8 uVar12;
  longlong *plVar13;
  char *riid;
  char *ppvObject;
  uint uVar14;
  undefined8 *puVar15;
  char local_res10 [8];
  longlong *local_res18;
  undefined8 *local_res20;
  longlong *local_1d0;
  undefined4 uVar16;
  undefined3 uStack_1bb;
  undefined1 uStack_1b8;
  undefined8 local_1b0;
  undefined2 uStack_1a4;
  undefined2 uStack_1a2;
  undefined6 uStack_1a0;
  undefined2 uStack_19a;
  undefined6 uStack_198;
  ushort local_192;
  LPUNKNOWN local_188 [2];
  IUnknown *local_178;
  longlong *local_170;
  undefined4 local_168;
  undefined1 local_158 [24];
  undefined1 local_140 [24];
  undefined4 local_128;
  undefined1 *local_120;
  undefined4 local_118;
  undefined8 local_110;
  undefined1 *local_108;
  undefined8 *local_f8;
  longlong *local_f0;
  undefined8 *local_e8;
  longlong *local_e0;
  longlong *local_d8;
  undefined8 local_d0;
  undefined4 local_c8;
  undefined4 uStack_c4;
  undefined4 uStack_c0;
  undefined4 uStack_bc;
  undefined1 local_b8 [24];
  undefined1 local_a0 [24];
  undefined1 local_88 [24];
  IID local_70;
  undefined1 local_58 [32];
  
  local_d0 = 0xfffffffffffffffe;
  uVar16 = 1;
  local_1d0 = (longlong *)0x0;
  local_f8 = param_2;
  iVar5 = FUN_140001970(&local_1d0);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_178 = (IUnknown *)0x0;
  local_170 = (longlong *)0x0;
  Ordinal_8(local_158);
  Ordinal_8(local_140);
  pIVar2 = local_178;
  if ((local_178 != (IUnknown *)0x0) && (local_178 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_108 = &DAT_140281f00;
  local_120 = &DAT_140281f00;
  local_118 = 0;
  local_110 = 0;
  if (local_178 != (IUnknown *)0x0) {
    (*local_178->lpVtbl->Release)(local_178);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_188
                          );
  if (HVar6 < 0) {
LAB_1400e702f:
    local_178 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_188[0]);
    if (-1 < HVar6) {
      HVar6 = (*local_188[0]->lpVtbl->QueryInterface)(local_188[0],(IID *)&DAT_140281f68,&local_178)
      ;
    }
    (*local_188[0]->lpVtbl->Release)(local_188[0]);
    if (HVar6 < 0) goto LAB_1400e702f;
  }
  local_128 = 2;
  local_168 = 1;
  local_res10[0] = '\x01';
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_1b0 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23cc0000);
  uStack_1a4 = 0x85;
  uStack_1a2 = (undefined2)*(undefined8 *)((longlong)param_2 + 0xe);
  uStack_1a0 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0xe) >> 0x10);
  uStack_19a = (undefined2)*(undefined8 *)((longlong)param_2 + 0x16);
  uStack_198 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x16) >> 0x10);
  puVar15 = (undefined8 *)0x0;
  local_192 = 0;
  uVar14 = 0x20;
  pIVar2 = *(IUnknown **)*param_1;
  if ((pIVar2 != (IUnknown *)0x0) && (UVar7 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2), (int)UVar7 < 0)
     ) {
    _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f08);
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_178;
    if (local_178 != (IUnknown *)0x0) {
      UVar7 = (*local_178->lpVtbl[0x12].AddRef)(local_178);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_178 != (IUnknown *)0x0) {
        (*local_178->lpVtbl->Release)(local_178);
        local_178 = (IUnknown *)0x0;
      }
    }
    local_110 = 0;
    local_108 = &DAT_140281f00;
    local_120 = &DAT_140281f00;
    local_118 = 0;
    local_128 = 0;
    Ordinal_9(local_140);
    Ordinal_9(local_158);
    if (local_170 != (longlong *)0x0) {
      (**(code **)(*local_170 + 0x10))();
    }
    if (local_178 != (IUnknown *)0x0) {
      (*local_178->lpVtbl->Release)(local_178);
    }
    if (local_1d0 != (longlong *)0x0) {
      (**(code **)(*local_1d0 + 0x10))();
    }
    return 0;
  }
  puVar10 = (undefined8 *)FUN_140001f20(*param_1,&local_f0);
  FUN_140001710(&local_1d0,*puVar10,"dbo.up_get_guild_skill");
  if (local_f0 != (longlong *)0x0) {
    (**(code **)(*local_f0 + 0x10))();
  }
  local_res18 = (longlong *)local_88;
  local_c8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_c4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_c0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_bc = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar11 = FUN_140062280(local_88,&local_c8);
  puVar10 = operator_new(0x18);
  local_e8 = (undefined8 *)0x0;
  local_res20 = puVar10;
  if (puVar10 != (undefined8 *)0x0) {
    puVar10[1] = 0;
    *(undefined4 *)(puVar10 + 2) = 1;
    uVar12 = FUN_140201490("guild_id");
    *puVar10 = uVar12;
    local_e8 = puVar10;
  }
  if (local_e8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar13 = (longlong *)FUN_140001880(&local_1d0,local_b8,&local_e8,0xca,1,0x26,uVar11);
  local_res18 = plVar13;
  if (local_1d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar10 = (undefined8 *)FUN_140001660(local_1d0,&local_d8);
  pIVar2 = (IUnknown *)*puVar10;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar7 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar7 < 0) {
    _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
  puVar10 = (undefined8 *)FUN_1400016d0(&local_1d0,&local_e0);
  This = local_178;
  pIVar2 = (IUnknown *)*puVar10;
  if (local_178 != pIVar2) {
    local_178 = pIVar2;
    if (pIVar2 != (IUnknown *)0x0) {
      (*pIVar2->lpVtbl->AddRef)(pIVar2);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_e0 != (longlong *)0x0) {
    (**(code **)(*local_e0 + 0x10))();
  }
  pIVar2 = local_178;
  if (local_178 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffffffff0000);
  UVar7 = (*local_178->lpVtbl[6].Release)(local_178);
  if ((int)UVar7 < 0) {
    _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
  }
  if ((short)local_res18 == -1) {
    uStack_1a4 = 0x86;
  }
  else {
    while( true ) {
      pIVar2 = local_178;
      if (local_178 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_res20 = (undefined8 *)((ulonglong)local_res20 & 0xffffffffffff0000);
      UVar7 = (*local_178->lpVtbl[6].Release)(local_178);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_res20 == -1) break;
      uVar11 = FUN_140002290(&local_178,local_a0,"skill_table_id",local_res10);
      FUN_140182560(uVar11);
      uVar8 = FUN_140062550(uVar11);
      Ordinal_9(local_a0);
      uVar11 = FUN_140002290(&local_178,local_58,"skill_id",local_res10);
      FUN_140182560(uVar11);
      uVar9 = FUN_140062550(uVar11);
      Ordinal_9(local_58);
      ppvObject = "skill_level";
      riid = (char *)&local_70;
      uVar11 = FUN_140002290(&local_178,riid,"skill_level",local_res10);
      FUN_140182560(uVar11);
      uVar4 = FUN_1400624d0(uVar11);
      Ordinal_9(&local_70);
      uStack_1bb = (undefined3)uVar9;
      *(ulonglong *)((longlong)(int)uVar14 + 0x130 + (longlong)param_1) =
           CONCAT35(uStack_1bb,CONCAT41(uVar8,uVar4));
      uStack_1b8 = (undefined1)((uint)uVar9 >> 0x18);
      *(undefined1 *)((longlong)(int)uVar14 + 0x138 + (longlong)param_1) = uStack_1b8;
      uVar14 = uVar14 + 9;
      local_192 = (short)puVar15 + 1;
      puVar15 = (undefined8 *)(ulonglong)local_192;
      if (50000 < uVar14) {
        uVar3 = local_1b0._2_6_;
        local_1b0 = CONCAT62(local_1b0._2_6_,(short)uVar14);
        uVar11 = local_1b0;
        riid = (char *)(param_1 + 0x26);
        local_1b0._4_2_ = SUB62(uVar3,2);
        local_1b0._6_2_ = SUB62(uVar3,4);
        ((IID *)riid)->Data1 = (undefined4)local_1b0;
        ((IID *)riid)->Data2 = local_1b0._4_2_;
        ((IID *)riid)->Data3 = local_1b0._6_2_;
        param_1[0x27] = CONCAT26(uStack_1a2,CONCAT24(0x85,uVar1));
        param_1[0x28] = CONCAT26(uStack_19a,uStack_1a0);
        param_1[0x29] = CONCAT26(local_192,uStack_198);
        iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar5 == 0) {
          ppvObject = "DB Result Queue push error";
          riid = "DBResultQueue_Error.Log";
          FUN_1400a0b40(param_1[0x23]);
        }
        uVar14 = 0x20;
        local_192 = 0;
        puVar15 = (undefined8 *)0x0;
        local_1b0 = uVar11;
      }
      pIVar2 = local_178;
      if (local_178 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar6 = (*local_178->lpVtbl[0xc].QueryInterface)(local_178,(IID *)riid,(void **)ppvObject);
      if (HVar6 < 0) {
        _com_issue_errorex(HVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_res10[0] != '\0') goto LAB_1400e76d6;
    uStack_1a4 = 0x87;
  }
  uVar16 = 0;
LAB_1400e76d6:
  local_1b0 = CONCAT62(local_1b0._2_6_,(short)uVar14);
  param_1[0x26] = local_1b0;
  param_1[0x27] = CONCAT26(uStack_1a2,CONCAT24(uStack_1a4,uVar1));
  param_1[0x28] = CONCAT26(uStack_19a,uStack_1a0);
  param_1[0x29] = CONCAT26(local_192,uStack_198);
  iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
  if (iVar5 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar2 = local_178;
  if (local_178 != (IUnknown *)0x0) {
    UVar7 = (*local_178->lpVtbl[0x12].AddRef)(local_178);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar2,(_GUID *)&DAT_140281f28);
    }
    if (local_178 != (IUnknown *)0x0) {
      (*local_178->lpVtbl->Release)(local_178);
      local_178 = (IUnknown *)0x0;
    }
  }
  local_110 = 0;
  local_108 = &DAT_140281f00;
  local_120 = &DAT_140281f00;
  local_118 = 0;
  local_128 = 0;
  Ordinal_9(local_140);
  Ordinal_9(local_158);
  if (local_170 != (longlong *)0x0) {
    (**(code **)(*local_170 + 0x10))();
  }
  if (local_178 != (IUnknown *)0x0) {
    (*local_178->lpVtbl->Release)(local_178);
  }
  if (local_1d0 != (longlong *)0x0) {
    (**(code **)(*local_1d0 + 0x10))();
  }
  return uVar16;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_1400e7890(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined6 uVar2;
  IUnknown *This;
  int iVar3;
  HRESULT HVar4;
  ULONG UVar5;
  undefined8 *puVar6;
  wchar_t *pwVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  wchar_t *pwVar12;
  char *riid;
  wchar_t *pwVar13;
  char *ppvObject;
  uint uVar14;
  undefined1 auStackY_398 [32];
  char local_358 [4];
  int local_354;
  uint local_350;
  short local_34c;
  short local_348;
  longlong *local_340;
  int local_338;
  undefined8 local_330;
  undefined4 local_328;
  undefined2 uStack_324;
  undefined2 uStack_322;
  undefined6 uStack_320;
  undefined2 uStack_31a;
  undefined6 uStack_318;
  short local_312;
  wchar_t *local_310;
  undefined8 *local_308;
  wchar_t *local_300;
  wchar_t *local_2f8;
  LPUNKNOWN local_2f0;
  longlong *local_2e8 [2];
  IUnknown *local_2d8;
  longlong *local_2d0;
  undefined4 local_2c8;
  undefined1 local_2b8 [24];
  undefined1 local_2a0 [24];
  undefined4 local_288;
  undefined1 *local_280;
  undefined4 local_278;
  undefined8 local_270;
  undefined1 *local_268;
  wchar_t *local_258;
  undefined8 *local_250;
  undefined8 local_248;
  undefined1 local_240;
  undefined8 local_238;
  undefined1 local_230;
  undefined8 local_228;
  undefined1 local_220;
  undefined8 local_218;
  undefined1 local_210;
  undefined8 local_208;
  undefined1 local_200;
  undefined8 local_1f8;
  undefined1 local_1f0;
  undefined8 local_1e8;
  undefined1 local_1e0;
  undefined8 local_1d8;
  undefined1 local_1d0;
  undefined8 local_1c8;
  undefined1 local_1c0;
  undefined8 local_1b8;
  undefined1 local_1b0;
  longlong *local_1a8;
  undefined8 local_1a0;
  undefined1 local_198;
  undefined8 local_190;
  undefined1 local_188;
  wchar_t *local_180 [3];
  undefined4 local_168;
  undefined4 uStack_164;
  undefined4 uStack_160;
  undefined4 uStack_15c;
  undefined8 local_158;
  undefined1 local_148 [8];
  undefined1 local_140 [24];
  undefined1 local_128 [24];
  undefined1 local_110 [24];
  longlong local_f8 [3];
  undefined1 local_e0 [24];
  undefined1 local_c8 [17];
  undefined8 local_b7;
  undefined8 local_af;
  ulonglong local_a7;
  wchar_t local_9f [12];
  ulonglong local_87;
  wchar_t local_7f [28];
  uint local_47;
  ulonglong local_38;
  
  local_158 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_398;
  pwVar13 = (wchar_t *)0x0;
  local_340 = (longlong *)0x0;
  local_308 = param_1;
  local_250 = param_2;
  iVar3 = FUN_140001970(&local_340);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_2d8 = (IUnknown *)0x0;
  local_2d0 = (longlong *)0x0;
  Ordinal_8(local_2b8);
  Ordinal_8(local_2a0);
  pIVar1 = local_2d8;
  if ((local_2d8 != (IUnknown *)0x0) && (local_2d8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_268 = &DAT_140281f00;
  local_280 = &DAT_140281f00;
  local_278 = 0;
  local_270 = 0;
  if (local_2d8 != (IUnknown *)0x0) {
    (*local_2d8->lpVtbl->Release)(local_2d8);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_2f0);
  if (HVar4 < 0) {
LAB_1400e7a09:
    local_2d8 = (IUnknown *)0x0;
  }
  else {
    HVar4 = OleRun(local_2f0);
    if (-1 < HVar4) {
      HVar4 = (*local_2f0->lpVtbl->QueryInterface)(local_2f0,(IID *)&DAT_140281f68,&local_2d8);
    }
    (*local_2f0->lpVtbl->Release)(local_2f0);
    if (HVar4 < 0) goto LAB_1400e7a09;
  }
  local_288 = 2;
  local_2c8 = 1;
  local_358[0] = '\x01';
  local_328 = *(undefined4 *)(param_2 + 1);
  local_330._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_330._0_4_ = CONCAT22(0x23cd,(short)*param_2);
  uStack_324 = 0x85;
  uStack_322 = (undefined2)*(undefined8 *)((longlong)param_2 + 0xe);
  uStack_320 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0xe) >> 0x10);
  uStack_31a = (undefined2)*(undefined8 *)((longlong)param_2 + 0x16);
  uStack_318 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x16) >> 0x10);
  local_354 = 0;
  local_312 = 0;
  uVar14 = 0x20;
  local_350 = 0x20;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_338 = 0;
    UVar5 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_338 != 0) goto LAB_1400e7c08;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_2d8;
    if (local_2d8 != (IUnknown *)0x0) {
      local_354 = 0;
      UVar5 = (*local_2d8->lpVtbl[0x12].AddRef)(local_2d8);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_2d8;
      if (local_354 != 0) {
        if (local_2d8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar5 = (*local_2d8->lpVtbl[10].Release)(local_2d8);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_2d8 != (IUnknown *)0x0) {
        (*local_2d8->lpVtbl->Release)(local_2d8);
        local_2d8 = (IUnknown *)0x0;
      }
    }
    local_270 = 0;
    local_268 = &DAT_140281f00;
    local_280 = &DAT_140281f00;
    local_278 = 0;
    local_288 = 0;
    Ordinal_9(local_2a0);
    Ordinal_9(local_2b8);
    if (local_2d0 != (longlong *)0x0) {
      (**(code **)(*local_2d0 + 0x10))();
    }
    if (local_2d8 != (IUnknown *)0x0) {
      (*local_2d8->lpVtbl->Release)(local_2d8);
    }
    if (local_340 != (longlong *)0x0) {
      (**(code **)(*local_340 + 0x10))();
    }
    return (wchar_t *)0x0;
  }
LAB_1400e7c08:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_1a8);
  FUN_140001710(&local_340,*puVar6,"dbo.up_get_guild_storage_use_list");
  if (local_1a8 != (longlong *)0x0) {
    (**(code **)(*local_1a8 + 0x10))();
  }
  local_2e8[0] = local_f8;
  local_168 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_164 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_160 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_15c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_f8,&local_168);
  pwVar7 = operator_new(0x18);
  local_180[0] = pwVar13;
  local_258 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("guild_id");
    *(longlong *)pwVar7 = lVar8;
    local_180[0] = pwVar7;
  }
  if (local_180[0] == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_340,local_148,local_180,0xca);
  local_2e8[0] = plVar9;
  if (local_340 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_340,&local_258);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar5 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_258 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_258 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_340,local_2e8);
    This = local_2d8;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_2d8 != pIVar1) {
      local_2d8 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_2e8[0] != (longlong *)0x0) {
      (**(code **)(*local_2e8[0] + 0x10))();
    }
    pIVar1 = local_2d8;
    if (local_2d8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_348 = 0;
    UVar5 = (*local_2d8->lpVtbl[6].Release)(local_2d8);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
    }
    if (local_348 == -1) {
      uStack_324 = 0x86;
      pwVar13 = (wchar_t *)0x0;
    }
    else {
      while( true ) {
        pIVar1 = local_2d8;
        if (local_2d8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_34c = 0;
        UVar5 = (*local_2d8->lpVtbl[6].Release)(local_2d8);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
        if (local_34c == -1) break;
        local_c8._1_8_ = 0;
        local_c8._9_8_ = 0;
        local_b7 = 0;
        local_af = 0;
        local_a7 = 0;
        local_9f[0] = L'\0';
        local_9f[1] = L'\0';
        local_9f[2] = L'\0';
        local_9f[3] = L'\0';
        local_9f[4] = L'\0';
        local_9f[5] = L'\0';
        local_9f[6] = L'\0';
        local_9f[7] = L'\0';
        local_9f[8] = L'\0';
        local_9f[9] = L'\0';
        local_9f[10] = L'\0';
        local_9f[0xb] = L'\0';
        local_87 = 0;
        local_7f[0] = L'\0';
        local_7f[1] = L'\0';
        local_7f[2] = L'\0';
        local_7f[3] = L'\0';
        local_7f[4] = L'\0';
        local_7f[5] = L'\0';
        local_7f[6] = L'\0';
        local_7f[7] = L'\0';
        local_7f[8] = L'\0';
        local_7f[9] = L'\0';
        local_7f[10] = L'\0';
        local_7f[0xb] = L'\0';
        local_7f[0xc] = L'\0';
        local_7f[0xd] = L'\0';
        local_7f[0xe] = L'\0';
        local_7f[0xf] = L'\0';
        local_7f[0x10] = L'\0';
        local_7f[0x11] = L'\0';
        local_7f[0x12] = L'\0';
        local_7f[0x13] = L'\0';
        local_7f[0x14] = L'\0';
        local_7f[0x15] = L'\0';
        local_7f[0x16] = L'\0';
        local_7f[0x17] = L'\0';
        local_7f[0x18] = L'\0';
        local_7f[0x19] = L'\0';
        local_7f[0x1a] = L'\0';
        local_7f[0x1b] = L'\0';
        local_47 = 0;
        local_c8[0] = local_34c == -1;
        uVar10 = FUN_140002290(&local_2d8,local_128,"use_type",local_358);
        FUN_140182560(uVar10);
        local_c8[0] = FUN_1400624d0(uVar10);
        Ordinal_9(local_128);
        uVar10 = FUN_140002290(&local_2d8,local_140,"use_time",local_358);
        FUN_140062840(uVar10,&local_310);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_310 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_1c0 = 0;
          local_1c8 = uVar10;
          FUN_140156b50(uVar10);
          local_1c0 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_220 = 0;
            local_228 = uVar11;
            FUN_140156b50(uVar11);
            local_220 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
            local_220 = 0;
          }
          pwVar7 = local_310;
          if (((local_310 != (wchar_t *)PTR_DAT_1403200a0) && (local_310 != (wchar_t *)0x0)) &&
             (local_310 != (wchar_t *)0x8)) {
            *(int *)(local_310 + -2) = *(int *)(local_310 + -2) + 1;
          }
          FUN_140156be0(uVar10);
          local_1c0 = 0;
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy((wchar_t *)(local_c8 + 1),pwVar12,0x13);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_200 = 0;
          local_208 = uVar10;
          FUN_140156b50(uVar10);
          local_200 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
          local_200 = 0;
        }
        pwVar7 = local_310;
        if (((local_310 != (wchar_t *)0x0) && (local_310 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar12 = local_310 + -4, pwVar12 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_188 = 0;
          local_190 = uVar10;
          FUN_140156b50(uVar10);
          local_188 = 1;
          pwVar7 = pwVar7 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(pwVar12);
          }
          FUN_140156be0(uVar10);
          local_188 = 0;
        }
        local_310 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_140);
        uVar10 = FUN_140002290(&local_2d8,local_110,"character_name",local_358);
        FUN_140062840(uVar10,&local_300);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_300 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_240 = 0;
          local_248 = uVar10;
          FUN_140156b50(uVar10);
          local_240 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_1e0 = 0;
            local_1e8 = uVar11;
            FUN_140156b50(uVar11);
            local_1e0 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
            local_1e0 = 0;
          }
          pwVar7 = local_300;
          if (((local_300 != (wchar_t *)PTR_DAT_1403200a0) && (local_300 != (wchar_t *)0x0)) &&
             (local_300 != (wchar_t *)0x8)) {
            *(int *)(local_300 + -2) = *(int *)(local_300 + -2) + 1;
          }
          FUN_140156be0(uVar10);
          local_240 = 0;
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_9f,pwVar12,0xf);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_230 = 0;
          local_238 = uVar10;
          FUN_140156b50(uVar10);
          local_230 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
          local_230 = 0;
        }
        pwVar7 = local_300;
        if (((local_300 != (wchar_t *)0x0) && (local_300 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar12 = local_300 + -4, pwVar12 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_210 = 0;
          local_218 = uVar10;
          FUN_140156b50(uVar10);
          local_210 = 1;
          pwVar7 = pwVar7 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(pwVar12);
          }
          FUN_140156be0(uVar10);
          local_210 = 0;
        }
        local_300 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_110);
        uVar10 = FUN_140002290(&local_2d8,local_e0,"description",local_358);
        FUN_140062840(uVar10,&local_2f8);
        FUN_1401568c0();
        pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar7 = pwVar13;
        }
        if (local_2f8 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar10 = FUN_1401568c0();
          local_1d0 = 0;
          local_1d8 = uVar10;
          FUN_140156b50(uVar10);
          local_1d0 = 1;
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar11 = FUN_1401568c0();
            local_1f0 = 0;
            local_1f8 = uVar11;
            FUN_140156b50(uVar11);
            local_1f0 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar11);
            local_1f0 = 0;
          }
          pwVar7 = local_2f8;
          if (((local_2f8 != (wchar_t *)PTR_DAT_1403200a0) && (local_2f8 != (wchar_t *)0x0)) &&
             (local_2f8 != (wchar_t *)0x8)) {
            *(int *)(local_2f8 + -2) = *(int *)(local_2f8 + -2) + 1;
          }
          FUN_140156be0(uVar10);
          local_1d0 = 0;
        }
        pwVar12 = pwVar7;
        if (pwVar7 == (wchar_t *)0x0) {
          pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy(local_7f,pwVar12,0x1d);
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_1b0 = 0;
          local_1b8 = uVar10;
          FUN_140156b50(uVar10);
          local_1b0 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar10);
          local_1b0 = 0;
        }
        pwVar7 = local_2f8;
        if (((local_2f8 != (wchar_t *)0x0) && (local_2f8 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar12 = local_2f8 + -4, pwVar12 != (wchar_t *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_198 = 0;
          local_1a0 = uVar10;
          FUN_140156b50(uVar10);
          local_198 = 1;
          pwVar7 = pwVar7 + -2;
          *(int *)pwVar7 = *(int *)pwVar7 + -1;
          if (*(int *)pwVar7 == 0) {
            FUN_140156970(pwVar12);
          }
          FUN_140156be0(uVar10);
          local_198 = 0;
        }
        local_2f8 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_e0);
        local_a7 = local_a7 & 0xffffffffffff;
        local_87 = local_87 & 0xffffffffffff;
        local_47 = local_47 & 0xffff;
        riid = local_c8;
        ppvObject = (char *)0x85;
        memcpy((void *)((longlong)(int)uVar14 + 0x130 + (longlong)param_1),riid,0x85);
        local_350 = uVar14 + 0x85;
        local_312 = (short)local_354 + 1;
        local_354 = CONCAT22((short)((uint)local_354 >> 0x10),local_312);
        if (50000 < local_350) {
          uVar2 = local_330._2_6_;
          local_330 = CONCAT62(local_330._2_6_,(short)local_350);
          uVar10 = local_330;
          riid = (char *)(param_1 + 0x26);
          local_330._4_2_ = SUB62(uVar2,2);
          local_330._6_2_ = SUB62(uVar2,4);
          ((IID *)riid)->Data1 = (undefined4)local_330;
          ((IID *)riid)->Data2 = local_330._4_2_;
          ((IID *)riid)->Data3 = local_330._6_2_;
          param_1[0x27] = CONCAT26(uStack_322,CONCAT24(uStack_324,local_328));
          param_1[0x28] = CONCAT26(uStack_31a,uStack_320);
          param_1[0x29] = CONCAT26(local_312,uStack_318);
          local_330 = uVar10;
          iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
          if (iVar3 == 0) {
            ppvObject = "DB Result Queue push error";
            riid = "DBResultQueue_Error.Log";
            FUN_1400a0b40(param_1[0x23]);
          }
          local_350 = 0x20;
          local_354 = 0;
          local_312 = 0;
        }
        pIVar1 = local_2d8;
        uVar14 = local_350;
        if (local_2d8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar4 = (*local_2d8->lpVtbl[0xc].QueryInterface)(local_2d8,(IID *)riid,(void **)ppvObject);
        if (HVar4 < 0) {
          _com_issue_errorex(HVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_358[0] == '\0') {
        uStack_324 = 0x87;
      }
      else {
        pwVar13 = (wchar_t *)0x1;
      }
    }
    local_330 = CONCAT62(local_330._2_6_,(short)uVar14);
    param_1[0x26] = local_330;
    param_1[0x27] = CONCAT26(uStack_322,CONCAT24(uStack_324,local_328));
    param_1[0x28] = CONCAT26(uStack_31a,uStack_320);
    param_1[0x29] = CONCAT26(local_312,uStack_318);
    iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar3 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar1 = local_2d8;
    if (local_2d8 != (IUnknown *)0x0) {
      local_350 = 0;
      UVar5 = (*local_2d8->lpVtbl[0x12].AddRef)(local_2d8);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_2d8;
      if (local_350 != 0) {
        if (local_2d8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar5 = (*local_2d8->lpVtbl[10].Release)(local_2d8);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_2d8 != (IUnknown *)0x0) {
        (*local_2d8->lpVtbl->Release)(local_2d8);
        local_2d8 = (IUnknown *)0x0;
      }
    }
    local_270 = 0;
    local_268 = &DAT_140281f00;
    local_280 = &DAT_140281f00;
    local_278 = 0;
    local_288 = 0;
    Ordinal_9(local_2a0);
    Ordinal_9(local_2b8);
    if (local_2d0 != (longlong *)0x0) {
      (**(code **)(*local_2d0 + 0x10))();
    }
    if (local_2d8 != (IUnknown *)0x0) {
      (*local_2d8->lpVtbl->Release)(local_2d8);
    }
    if (local_340 != (longlong *)0x0) {
      (**(code **)(*local_340 + 0x10))();
    }
    return pwVar13;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x0001400e90d8)
// WARNING: Removing unreachable block (ram,0x0001400e8b4c)
// WARNING: Removing unreachable block (ram,0x0001400e8b59)
// WARNING: Removing unreachable block (ram,0x0001400e8b64)
// WARNING: Removing unreachable block (ram,0x0001400e8b74)

bool FUN_1400e88b0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined8 uVar2;
  undefined6 uVar3;
  IUnknown *This;
  char cVar4;
  int iVar5;
  HRESULT HVar6;
  ULONG UVar7;
  undefined8 *puVar8;
  longlong *plVar9;
  longlong lVar10;
  char *riid;
  char *ppvObject;
  longlong *plVar11;
  bool bVar12;
  undefined1 auStackY_288 [32];
  char local_248 [4];
  uint local_240;
  longlong *local_230;
  int local_228;
  int local_224;
  undefined8 local_220;
  undefined4 local_218;
  undefined2 uStack_214;
  undefined2 uStack_212;
  undefined6 uStack_210;
  undefined2 uStack_20a;
  undefined6 uStack_208;
  ushort local_202;
  undefined8 *local_200;
  LPUNKNOWN local_1f8;
  longlong *local_1f0;
  IUnknown *local_1e8;
  longlong *local_1e0;
  undefined4 local_1d8;
  undefined1 local_1c8 [24];
  undefined1 local_1b0 [24];
  undefined4 local_198;
  undefined1 *local_190;
  undefined4 local_188;
  undefined8 local_180;
  undefined1 *local_178;
  undefined8 *local_168;
  longlong *local_160;
  longlong *local_158;
  longlong *local_150;
  undefined4 local_148;
  undefined4 uStack_144;
  undefined4 uStack_140;
  undefined4 uStack_13c;
  undefined1 local_138 [16];
  undefined8 local_128;
  longlong local_118 [4];
  IID local_f8;
  undefined8 local_e8;
  undefined2 local_e0;
  undefined8 local_de;
  undefined2 local_d6;
  undefined8 local_d4;
  undefined8 local_cc;
  undefined8 local_c4;
  undefined4 local_bc;
  undefined2 local_b8;
  undefined8 local_b6;
  undefined8 local_ae;
  undefined8 local_a6;
  undefined2 local_9e;
  undefined1 local_9c;
  undefined8 local_9b;
  undefined8 local_93;
  undefined2 local_8b;
  undefined8 local_89;
  undefined8 local_81;
  undefined8 local_79;
  undefined8 local_71;
  undefined8 local_69;
  undefined1 local_61 [40];
  undefined1 local_39;
  ulonglong local_38;
  
  local_128 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_288;
  local_230 = (longlong *)0x0;
  local_200 = param_1;
  local_168 = param_2;
  iVar5 = FUN_140001970(&local_230);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_1e8 = (IUnknown *)0x0;
  local_1e0 = (longlong *)0x0;
  Ordinal_8(local_1c8);
  Ordinal_8(local_1b0);
  pIVar1 = local_1e8;
  if ((local_1e8 != (IUnknown *)0x0) && (local_1e8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_180 = 0;
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_1f8);
  if (HVar6 < 0) {
LAB_1400e8a2d:
    local_1e8 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_1f8);
    if (-1 < HVar6) {
      HVar6 = (*local_1f8->lpVtbl->QueryInterface)(local_1f8,(IID *)&DAT_140281f68,&local_1e8);
    }
    (*local_1f8->lpVtbl->Release)(local_1f8);
    if (HVar6 < 0) goto LAB_1400e8a2d;
  }
  local_198 = 2;
  local_1d8 = 1;
  local_248[0] = '\x01';
  local_218 = *(undefined4 *)(param_2 + 1);
  local_220._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_220._0_4_ = CONCAT22(0x23d3,(short)*param_2);
  uStack_214 = 0x85;
  uStack_212 = (undefined2)*(undefined8 *)((longlong)param_2 + 0xe);
  uStack_210 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0xe) >> 0x10);
  uStack_20a = (undefined2)*(undefined8 *)((longlong)param_2 + 0x16);
  uStack_208 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x16) >> 0x10);
  plVar11 = (longlong *)0x0;
  local_202 = 0;
  local_240 = 0x20;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_228 = 0;
    UVar7 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_228 != 0) goto LAB_1400e8c23;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_1e8;
    if (local_1e8 != (IUnknown *)0x0) {
      UVar7 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_1e8 != (IUnknown *)0x0) {
        (*local_1e8->lpVtbl->Release)(local_1e8);
        local_1e8 = (IUnknown *)0x0;
      }
    }
    local_180 = 0;
    local_178 = &DAT_140281f00;
    local_190 = &DAT_140281f00;
    local_188 = 0;
    local_198 = 0;
    Ordinal_9(local_1b0);
    Ordinal_9(local_1c8);
    if (local_1e0 != (longlong *)0x0) {
      (**(code **)(*local_1e0 + 0x10))();
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
    }
    if (local_230 != (longlong *)0x0) {
      (**(code **)(*local_230 + 0x10))();
    }
    return false;
  }
LAB_1400e8c23:
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_158);
  FUN_140001710(&local_230,*puVar8,"dbo.up_get_guild_storage_item_list");
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  local_1f0 = local_118;
  local_148 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_144 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_140 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_13c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_118,&local_148);
  plVar9 = operator_new(0x18);
  local_150 = (longlong *)0x0;
  local_160 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("guild_id");
    *plVar9 = lVar10;
    local_150 = plVar9;
  }
  if (local_150 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_230,local_138,&local_150,0xca);
  local_1f0 = plVar9;
  if (local_230 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_230,&local_160);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar7 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar7 < 0) {
    _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_160 != (longlong *)0x0) {
    (**(code **)(*local_160 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  puVar8 = (undefined8 *)FUN_1400016d0(&local_230,&local_1f0);
  This = local_1e8;
  pIVar1 = (IUnknown *)*puVar8;
  if (local_1e8 != pIVar1) {
    local_1e8 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_1f0 != (longlong *)0x0) {
    (**(code **)(*local_1f0 + 0x10))();
  }
  pIVar1 = local_1e8;
  if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar7 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
  if ((int)UVar7 < 0) {
    _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
  }
  while( true ) {
    pIVar1 = local_1e8;
    if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar7 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
    }
    local_9c = 0;
    local_f8.Data1 = 0;
    local_f8.Data2 = 0;
    local_f8.Data3 = 0;
    local_f8.Data4[0] = '\0';
    local_f8.Data4[1] = '\0';
    local_f8.Data4[2] = '\0';
    local_f8.Data4[3] = '\0';
    local_f8.Data4[4] = '\0';
    local_f8.Data4[5] = '\0';
    local_f8.Data4[6] = '\0';
    local_f8.Data4[7] = '\0';
    local_e8 = 0;
    local_e0 = 0;
    local_de = 0;
    local_d6 = 0;
    local_d4 = 0;
    local_cc = 0;
    local_c4 = 0;
    local_bc = 0;
    local_b8 = 0;
    local_b6 = 0;
    local_ae = 0;
    local_a6 = 0;
    local_9e = 0;
    local_9b = 0;
    local_8b = 0;
    local_89 = 0;
    local_81 = 0;
    local_79 = 0;
    local_71 = 0;
    local_69 = 0;
    local_39 = 0;
    local_93 = 0;
    memset(local_61,0,0x28);
    cVar4 = FUN_1400a1f60(&local_1e8,&local_f8,local_248);
    if (cVar4 == '\0') break;
    riid = (char *)&local_f8;
    ppvObject = (char *)0xc0;
    memcpy((void *)((longlong)(int)local_240 + 0x130 + (longlong)param_1),riid,0xc0);
    local_240 = local_240 + 0xc0;
    local_202 = (short)plVar11 + 1;
    plVar11 = (longlong *)(ulonglong)local_202;
    if (50000 < local_240) {
      uVar3 = local_220._2_6_;
      local_220 = CONCAT62(local_220._2_6_,(short)local_240);
      uVar2 = local_220;
      riid = (char *)(param_1 + 0x26);
      local_220._4_2_ = SUB62(uVar3,2);
      local_220._6_2_ = SUB62(uVar3,4);
      ((IID *)riid)->Data1 = (undefined4)local_220;
      ((IID *)riid)->Data2 = local_220._4_2_;
      ((IID *)riid)->Data3 = local_220._6_2_;
      param_1[0x27] = CONCAT26(uStack_212,CONCAT24(uStack_214,local_218));
      param_1[0x28] = CONCAT26(uStack_20a,uStack_210);
      param_1[0x29] = CONCAT26(local_202,uStack_208);
      local_220 = uVar2;
      iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar5 == 0) {
        ppvObject = "DB Result Queue push error";
        riid = "DBResultQueue_Error.Log";
        FUN_1400a0b40(param_1[0x23]);
      }
      local_240 = 0x20;
      local_202 = 0;
      plVar11 = (longlong *)0x0;
    }
    pIVar1 = local_1e8;
    if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    HVar6 = (*local_1e8->lpVtbl[0xc].QueryInterface)(local_1e8,(IID *)riid,(void **)ppvObject);
    if (HVar6 < 0) {
      _com_issue_errorex(HVar6,pIVar1,(_GUID *)&DAT_140281f28);
    }
  }
  bVar12 = local_248[0] == '\0';
  if (bVar12) {
    uStack_214 = 0x87;
  }
  local_220 = CONCAT62(local_220._2_6_,(short)local_240);
  param_1[0x26] = local_220;
  param_1[0x27] = CONCAT26(uStack_212,CONCAT24(uStack_214,local_218));
  param_1[0x28] = CONCAT26(uStack_20a,uStack_210);
  param_1[0x29] = CONCAT26(local_202,uStack_208);
  iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
  if (iVar5 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar1 = local_1e8;
  if (local_1e8 != (IUnknown *)0x0) {
    local_224 = 0;
    UVar7 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
    }
    pIVar1 = local_1e8;
    if (local_224 != 0) {
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar7 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
      local_1e8 = (IUnknown *)0x0;
    }
  }
  local_180 = 0;
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_198 = 0;
  Ordinal_9(local_1b0);
  Ordinal_9(local_1c8);
  if (local_1e0 != (longlong *)0x0) {
    (**(code **)(*local_1e0 + 0x10))();
  }
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  if (local_230 != (longlong *)0x0) {
    (**(code **)(*local_230 + 0x10))();
  }
  return !bVar12;
}



undefined8 FUN_1400e92b0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  short local_70 [4];
  undefined1 local_68;
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400e9346;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400e9346:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_guild_storage_use_log");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = (longlong *)local_70;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("guild_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_80 = (longlong *)local_70;
  uVar1 = *(undefined1 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  if (local_70[0] != 0x11) {
    iVar4 = Ordinal_9(local_70);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_70[0] = 0x11;
  }
  local_68 = uVar1;
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("use_type");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,local_70);
    local_80 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_58 = (longlong *)local_70;
    uVar6 = FUN_1400623f0(local_70,param_2 + 0x7b);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_80 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("use_time");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,0xca,1,0x14,uVar6);
    local_58 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_58 = (longlong *)local_70;
      uVar6 = FUN_1400623f0(local_70,param_2 + 0x1f);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_80 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("character_name");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,0xca,1,0x10,uVar6);
      local_58 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_88 != (longlong *)0x0) {
          (**(code **)(*local_88 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_58 = (longlong *)local_70;
        uVar6 = FUN_1400623f0(local_70,param_2 + 0x3f);
        plVar9 = operator_new(0x18);
        local_80 = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("description");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,0xca,1,0x1e,uVar6);
        local_58 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_88 != (longlong *)0x0) {
            (**(code **)(*local_88 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400e99b0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400e9a46;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400e9a46:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_guild_storage_deposit");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("guild_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_40;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_40,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    uVar1 = *(undefined4 *)(param_2 + 0x2e);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar1);
    plVar9 = operator_new(0x18);
    local_98[0] = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("deposit_gold");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400e9e90(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400e9f26;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400e9f26:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_guild_storage_payment");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("guild_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_40;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_40,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    uVar1 = *(undefined4 *)(param_2 + 0x2e);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar1);
    plVar9 = operator_new(0x18);
    local_98[0] = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("payment_gold");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400ea370(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400ea406;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400ea406:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_guild_storage");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0x1e);
  uStack_60 = *(undefined4 *)(param_2 + 0x26);
  uStack_5c = *(undefined4 *)(param_2 + 0x2a);
  uVar7 = FUN_140062280(&local_88,&local_68);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_a0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("character_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar7);
  local_a0 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x2e);
  uStack_84 = *(undefined4 *)(param_2 + 0x32);
  uStack_80 = *(undefined4 *)(param_2 + 0x36);
  uStack_7c = *(undefined4 *)(param_2 + 0x3a);
  uVar7 = FUN_140062280(local_58,&local_88);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_a0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("auth_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar7);
  local_98[0] = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  sVar1 = *(short *)(param_2 + 0x56);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_98[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("page_index");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  sVar1 = *(short *)(param_2 + 0x58);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_98[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("slot_index");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x5a);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_98[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490(&DAT_14028931c);
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    uVar2 = *(undefined4 *)(param_2 + 0x3e);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar2);
    plVar8 = operator_new(0x18);
    plVar10 = plVar11;
    local_98[0] = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("gcode");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_68 = local_58;
      local_88 = *(undefined4 *)(param_2 + 0xe);
      uStack_84 = *(undefined4 *)(param_2 + 0x12);
      uStack_80 = *(undefined4 *)(param_2 + 0x16);
      uStack_7c = *(undefined4 *)(param_2 + 0x1a);
      uVar7 = FUN_140062280(local_58,&local_88);
      plVar10 = operator_new(0x18);
      local_98[0] = plVar10;
      if (plVar10 != (longlong *)0x0) {
        plVar10[1] = 0;
        *(undefined4 *)(plVar10 + 2) = 1;
        lVar9 = FUN_140201490("guild_id");
        *plVar10 = lVar9;
        plVar11 = plVar10;
      }
      local_res18 = plVar11;
      if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar11 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar7);
      local_68 = plVar11;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar11 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar11 + 0x10))();
        }
        FUN_1400a2c10(&local_res20,param_2 + 0x42);
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400ead10(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_48;
  longlong local_40 [4];
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400eada8;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400eada8:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_delet_guild_storage");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = &local_78;
  local_88 = *(undefined4 *)(param_2 + 0xe);
  uStack_84 = *(undefined4 *)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_78,&local_88);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("guild_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_98[0] = local_40;
  local_78._0_4_ = *(undefined4 *)(param_2 + 0x1e);
  local_78._4_4_ = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_78);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400eb0c0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  longlong *local_88;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [5];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400eb156;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400eb156:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_guild_storage_item_change_count");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_78;
  local_88 = *(longlong **)(param_2 + 0xe);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_78,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("guild_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x1e);
  uStack_74 = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_88 = local_58;
    local_78 = *(undefined4 *)(param_2 + 0x2e);
    uStack_74 = *(undefined4 *)(param_2 + 0x32);
    uStack_70 = *(undefined4 *)(param_2 + 0x36);
    uStack_6c = *(undefined4 *)(param_2 + 0x3a);
    uVar6 = FUN_140062280(local_58,&local_78);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
    local_88 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_88 = (longlong *)&local_78;
      uVar1 = *(undefined4 *)(param_2 + 0x3e);
      Ordinal_8(&local_78);
      FUN_140062080(&local_78,uVar1);
      plVar9 = operator_new(0x18);
      local_98[0] = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("count");
        *plVar9 = lVar8;
        plVar10 = plVar9;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_78);
      local_88 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400eb935)
// WARNING: Removing unreachable block (ram,0x0001400eb942)
// WARNING: Removing unreachable block (ram,0x0001400eb94d)
// WARNING: Removing unreachable block (ram,0x0001400eb95d)

undefined4 FUN_1400eb6b0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  int iVar2;
  HRESULT HVar3;
  ULONG UVar4;
  undefined4 uVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  char local_res18 [8];
  longlong *local_res20;
  longlong *local_1d8;
  int local_1d0;
  int local_1cc;
  undefined8 local_1c8;
  undefined4 local_1c0;
  undefined2 uStack_1bc;
  undefined2 uStack_1ba;
  undefined6 uStack_1b8;
  undefined2 uStack_1b2;
  undefined6 uStack_1b0;
  undefined2 local_1aa;
  undefined2 uStack_1a8;
  undefined6 uStack_1a6;
  undefined2 uStack_1a0;
  undefined2 uStack_19e;
  undefined2 uStack_19c;
  undefined1 local_19a;
  LPUNKNOWN local_198 [2];
  IUnknown *local_188;
  longlong *local_180;
  undefined4 local_178;
  undefined1 local_168 [24];
  undefined1 local_150 [24];
  undefined4 local_138;
  undefined1 *local_130;
  undefined4 local_128;
  undefined8 local_120;
  undefined1 *local_118;
  longlong *local_108;
  longlong *local_100;
  longlong *local_f8;
  longlong *local_f0;
  undefined1 local_e8 [16];
  undefined4 local_d8;
  undefined4 uStack_d4;
  undefined4 uStack_d0;
  undefined4 uStack_cc;
  undefined8 local_b8;
  undefined1 local_b0 [24];
  undefined1 local_98 [24];
  undefined1 local_80 [24];
  undefined1 local_68 [24];
  undefined1 local_50 [32];
  
  local_b8 = 0xfffffffffffffffe;
  plVar10 = (longlong *)0x0;
  local_1d8 = (longlong *)0x0;
  iVar2 = FUN_140001970(&local_1d8);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_188 = (IUnknown *)0x0;
  local_180 = (longlong *)0x0;
  Ordinal_8(local_168);
  Ordinal_8(local_150);
  pIVar1 = local_188;
  if ((local_188 != (IUnknown *)0x0) && (local_188 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_118 = &DAT_140281f00;
  local_130 = &DAT_140281f00;
  local_128 = 0;
  local_120 = 0;
  if (local_188 != (IUnknown *)0x0) {
    (*local_188->lpVtbl->Release)(local_188);
  }
  HVar3 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_198
                          );
  if (HVar3 < 0) {
LAB_1400eb803:
    local_188 = (IUnknown *)0x0;
  }
  else {
    HVar3 = OleRun(local_198[0]);
    if (-1 < HVar3) {
      HVar3 = (*local_198[0]->lpVtbl->QueryInterface)(local_198[0],(IID *)&DAT_140281f68,&local_188)
      ;
    }
    (*local_198[0]->lpVtbl->Release)(local_198[0]);
    if (HVar3 < 0) goto LAB_1400eb803;
  }
  local_138 = 2;
  local_178 = 1;
  local_res18[0] = '\x01';
  uStack_19e = 0;
  uStack_19c = 0;
  local_19a = 0;
  local_1c0 = *(undefined4 *)(param_2 + 1);
  local_1c8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23d50000);
  uStack_1bc = 0x85;
  local_1c8 = CONCAT62(local_1c8._2_6_,0x2f);
  uStack_1ba = (undefined2)*(undefined8 *)((longlong)param_2 + 0xe);
  uStack_1b8 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0xe) >> 0x10);
  uStack_1b2 = (undefined2)*(undefined8 *)((longlong)param_2 + 0x16);
  uStack_1b0 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x16) >> 0x10);
  local_1aa = 0;
  uStack_1a8 = 0;
  uStack_1a6 = 0;
  uStack_1a0 = 0;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_1cc = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_1cc != 0) goto LAB_1400eba0c;
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_188;
    if (local_188 != (IUnknown *)0x0) {
      UVar4 = (*local_188->lpVtbl[0x12].AddRef)(local_188);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_188 != (IUnknown *)0x0) {
        (*local_188->lpVtbl->Release)(local_188);
        local_188 = (IUnknown *)0x0;
      }
    }
    local_120 = 0;
    local_118 = &DAT_140281f00;
    local_130 = &DAT_140281f00;
    local_128 = 0;
    local_138 = 0;
    Ordinal_9(local_150);
    Ordinal_9(local_168);
    if (local_180 != (longlong *)0x0) {
      (**(code **)(*local_180 + 0x10))();
    }
    if (local_188 != (IUnknown *)0x0) {
      (*local_188->lpVtbl->Release)(local_188);
    }
    if (local_1d8 != (longlong *)0x0) {
      (**(code **)(*local_1d8 + 0x10))();
    }
    return 0;
  }
LAB_1400eba0c:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_100);
  FUN_140001710(&local_1d8,*puVar6,"dbo.up_get_guild_storage_info");
  if (local_100 != (longlong *)0x0) {
    (**(code **)(*local_100 + 0x10))();
  }
  local_res20 = (longlong *)local_50;
  local_d8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_d4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_d0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_cc = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar7 = FUN_140062280(local_50,&local_d8);
  plVar8 = operator_new(0x18);
  local_108 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("guild_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_f0 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_1d8,local_e8,&local_f0,0xca,1,0x26,uVar7);
  local_res20 = plVar10;
  if (local_1d8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_1d8,&local_f8);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_f8 != (longlong *)0x0) {
      (**(code **)(*local_f8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_1d8,&local_108);
    This = local_188;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_188 != pIVar1) {
      local_188 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_108 != (longlong *)0x0) {
      (**(code **)(*local_108 + 0x10))();
    }
    pIVar1 = local_188;
    if (local_188 != (IUnknown *)0x0) {
      local_res20 = (longlong *)((ulonglong)local_res20 & 0xffffffffffff0000);
      UVar4 = (*local_188->lpVtbl[6].Release)(local_188);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_res20 == -1) {
        uStack_1bc = 0x86;
        uVar5 = 0;
      }
      else {
        uVar7 = FUN_140002290(&local_188,local_80,&DAT_14028cd44,local_res18);
        FUN_140182560(uVar7);
        uVar7 = FUN_140182640(uVar7);
        uStack_1a6 = (undefined6)uVar7;
        uStack_1a0 = (undefined2)((ulonglong)uVar7 >> 0x30);
        Ordinal_9(local_80);
        uVar7 = FUN_140002290(&local_188,local_b0,"page_count",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_1aa = (undefined2)uVar5;
        uStack_1a8 = (undefined2)((uint)uVar5 >> 0x10);
        Ordinal_9(local_b0);
        uVar7 = FUN_140002290(&local_188,local_68,"slot_count",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        uStack_19e = (undefined2)uVar5;
        uStack_19c = (undefined2)((uint)uVar5 >> 0x10);
        Ordinal_9(local_68);
        uVar7 = FUN_140002290(&local_188,local_98,"level",local_res18);
        FUN_140182560(uVar7);
        local_19a = FUN_1400624d0(uVar7);
        Ordinal_9(local_98);
        uVar5 = 1;
        if (local_res18[0] == '\0') {
          uStack_1bc = 0x87;
          uVar5 = 0;
        }
      }
      param_1[0x26] = local_1c8;
      param_1[0x27] = CONCAT26(uStack_1ba,CONCAT24(uStack_1bc,local_1c0));
      param_1[0x28] = CONCAT26(uStack_1b2,uStack_1b8);
      param_1[0x29] = CONCAT26(local_1aa,uStack_1b0);
      param_1[0x2a] = CONCAT62(uStack_1a6,uStack_1a8);
      *(uint *)(param_1 + 0x2b) = CONCAT22(uStack_19e,uStack_1a0);
      *(undefined2 *)((longlong)param_1 + 0x15c) = uStack_19c;
      *(undefined1 *)((longlong)param_1 + 0x15e) = local_19a;
      iVar2 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar2 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_188;
      if (local_188 != (IUnknown *)0x0) {
        local_1d0 = 0;
        UVar4 = (*local_188->lpVtbl[0x12].AddRef)(local_188);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_188;
        if (local_1d0 != 0) {
          if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar4 = (*local_188->lpVtbl[10].Release)(local_188);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_188 != (IUnknown *)0x0) {
          (*local_188->lpVtbl->Release)(local_188);
          local_188 = (IUnknown *)0x0;
        }
      }
      local_120 = 0;
      local_118 = &DAT_140281f00;
      local_130 = &DAT_140281f00;
      local_128 = 0;
      local_138 = 0;
      Ordinal_9(local_150);
      Ordinal_9(local_168);
      if (local_180 != (longlong *)0x0) {
        (**(code **)(*local_180 + 0x10))();
      }
      if (local_188 != (IUnknown *)0x0) {
        (*local_188->lpVtbl->Release)(local_188);
      }
      if (local_1d8 != (longlong *)0x0) {
        (**(code **)(*local_1d8 + 0x10))();
      }
      return uVar5;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400ebf50(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  short local_90 [4];
  undefined1 local_88;
  longlong *local_78;
  longlong *local_70;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  undefined1 local_40 [24];
  
  local_50 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400ebfe6;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400ebfe6:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_update_guild_storage_info");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)local_90;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140062280(local_90,&local_68);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_78 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("guild_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar7);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_70 = (longlong *)local_90;
  uVar2 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_90);
  FUN_140062080(local_90,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_78 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("page_count");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0x10,1,1,local_90);
  local_70 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)local_90;
  uVar7 = *(undefined8 *)(param_2 + 0x22);
  Ordinal_8(local_90);
  uVar7 = FUN_140182530(local_40,uVar7);
  iVar5 = Ordinal_10(local_90,uVar7);
  if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  Ordinal_9(local_40);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_70 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490(&DAT_14028cd44);
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,0x14,1,8,local_90);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)local_90;
  uVar2 = *(undefined4 *)(param_2 + 0x2a);
  Ordinal_8(local_90);
  FUN_140062080(local_90,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_70 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("slot_count");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_90);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_68 = (longlong *)local_90;
    uVar1 = *(undefined1 *)(param_2 + 0x2e);
    Ordinal_8(local_90);
    if (local_90[0] != 0x11) {
      iVar5 = Ordinal_9(local_90);
      if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar5);
      }
      local_90[0] = 0x11;
    }
    local_88 = uVar1;
    plVar10 = operator_new(0x18);
    local_70 = plVar10;
    if (plVar10 != (longlong *)0x0) {
      plVar10[1] = 0;
      *(undefined4 *)(plVar10 + 2) = 1;
      lVar9 = FUN_140201490("level");
      *plVar10 = lVar9;
      plVar11 = plVar10;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,0x10,1,1,local_90);
    local_68 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400ec6b0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400ec746;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400ec746:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_create_guild_storage");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("guild_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_40;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_40,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    uVar1 = *(undefined4 *)(param_2 + 0x2e);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("slot_count");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      uVar1 = *(undefined4 *)(param_2 + 0x32);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,uVar1);
      plVar9 = operator_new(0x18);
      local_98[0] = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("cost_money");
        *plVar9 = lVar8;
        plVar10 = plVar9;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400eccc0(undefined8 *param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8 [2];
  undefined4 local_98;
  undefined4 uStack_94;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  longlong *local_78;
  longlong *local_70;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400ecd56;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400ecd56:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_guild_storage_extension");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8[0] = (longlong *)&local_98;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140062280(&local_98,&local_68);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_78 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("guild_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0xca,1,0x26,uVar7);
  local_78 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8[0] != (longlong *)0x0) {
    (**(code **)(*local_a8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_70 = local_40;
  local_98 = *(undefined4 *)(param_2 + 0x1e);
  uStack_94 = *(undefined4 *)(param_2 + 0x22);
  uStack_90 = *(undefined4 *)(param_2 + 0x26);
  uStack_8c = *(undefined4 *)(param_2 + 0x2a);
  uVar7 = FUN_140062280(local_40,&local_98);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_78 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("character_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar7);
  local_70 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8[0] != (longlong *)0x0) {
    (**(code **)(*local_a8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x2f);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_70 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("slot_count");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,&local_98);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8[0] != (longlong *)0x0) {
    (**(code **)(*local_a8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)&local_98;
  uVar2 = *(undefined4 *)(param_2 + 0x33);
  Ordinal_8(&local_98);
  FUN_140062080(&local_98,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_70 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("cost_money");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,&local_98);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8[0] != (longlong *)0x0) {
    (**(code **)(*local_a8[0] + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)&local_98;
  uVar1 = *(undefined1 *)(param_2 + 0x2e);
  Ordinal_8(&local_98);
  if ((short)local_98 != 0x11) {
    iVar5 = Ordinal_9(&local_98);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_98 = CONCAT22(local_98._2_2_,0x11);
  }
  uStack_90 = CONCAT31(uStack_90._1_3_,uVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_70 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("page_count");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,0x10,1,1,&local_98);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8[0] != (longlong *)0x0) {
      (**(code **)(*local_a8[0] + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_68 = (longlong *)&local_98;
    uVar2 = *(undefined4 *)(param_2 + 0x37);
    Ordinal_8(&local_98);
    FUN_140062080(&local_98,uVar2);
    plVar10 = operator_new(0x18);
    local_70 = plVar10;
    if (plVar10 != (longlong *)0x0) {
      plVar10[1] = 0;
      *(undefined4 *)(plVar10 + 2) = 1;
      lVar9 = FUN_140201490("level");
      *plVar10 = lVar9;
      plVar11 = plVar10;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,&local_98);
    local_68 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8[0] != (longlong *)0x0) {
        (**(code **)(*local_a8[0] + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400ed540(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400ed5d6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400ed5d6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_guild_storage_item");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("guild_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_40;
  local_88 = *(undefined4 *)(param_2 + 0x2e);
  uStack_84 = *(undefined4 *)(param_2 + 0x32);
  uStack_80 = *(undefined4 *)(param_2 + 0x36);
  uStack_7c = *(undefined4 *)(param_2 + 0x3a);
  uVar6 = FUN_140062280(local_40,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    uVar1 = *(undefined4 *)(param_2 + 0x3e);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("page_index");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      uVar1 = *(undefined4 *)(param_2 + 0x42);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,uVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("slot_index");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_68 = (longlong *)&local_88;
        uVar1 = *(undefined4 *)(param_2 + 0x46);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,uVar1);
        plVar9 = operator_new(0x18);
        local_98[0] = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("Count");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
        local_68 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400edeb7)
// WARNING: Removing unreachable block (ram,0x0001400edec1)
// WARNING: Removing unreachable block (ram,0x0001400edecc)
// WARNING: Removing unreachable block (ram,0x0001400ededc)

longlong * FUN_1400edc70(undefined8 *param_1,undefined8 *param_2)

{
  undefined2 uVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  int iVar3;
  HRESULT HVar4;
  ULONG UVar5;
  undefined4 uVar6;
  undefined8 *puVar7;
  longlong *plVar8;
  longlong lVar9;
  undefined8 uVar10;
  longlong *plVar11;
  char local_res18 [8];
  longlong *local_res20;
  longlong *local_158;
  undefined8 local_150;
  undefined4 local_148;
  undefined2 uStack_144;
  undefined2 uStack_142;
  undefined2 uStack_140;
  int local_138;
  int local_134;
  LPUNKNOWN local_130;
  IUnknown *local_128;
  longlong *local_120;
  undefined4 local_118;
  undefined1 local_108 [24];
  undefined1 local_f0 [24];
  undefined4 local_d8;
  undefined1 *local_d0;
  undefined4 local_c8;
  undefined8 local_c0;
  undefined1 *local_b8;
  longlong *local_a8;
  short local_a0 [4];
  undefined2 local_98;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78 [3];
  undefined8 local_60;
  undefined1 local_58 [8];
  undefined1 local_50 [24];
  
  local_60 = 0xfffffffffffffffe;
  local_res18[0] = '\x01';
  plVar11 = (longlong *)0x0;
  local_158 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_158);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_128 = (IUnknown *)0x0;
  local_120 = (longlong *)0x0;
  Ordinal_8(local_108);
  Ordinal_8(local_f0);
  pIVar2 = local_128;
  if ((local_128 != (IUnknown *)0x0) && (local_128 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_b8 = &DAT_140281f00;
  local_d0 = &DAT_140281f00;
  local_c8 = 0;
  local_c0 = 0;
  if (local_128 != (IUnknown *)0x0) {
    (*local_128->lpVtbl->Release)(local_128);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_130);
  if (HVar4 < 0) {
LAB_1400eddb1:
    local_128 = (IUnknown *)0x0;
  }
  else {
    HVar4 = OleRun(local_130);
    if (-1 < HVar4) {
      HVar4 = (*local_130->lpVtbl->QueryInterface)(local_130,(IID *)&DAT_140281f68,&local_128);
    }
    (*local_130->lpVtbl->Release)(local_130);
    if (HVar4 < 0) goto LAB_1400eddb1;
  }
  local_d8 = 2;
  local_118 = 1;
  uStack_142 = 0;
  uStack_140 = 0;
  local_148 = *(undefined4 *)(param_2 + 1);
  local_150 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x24500000);
  uStack_144 = 0x15d;
  local_150 = CONCAT62(local_150._2_6_,0x12);
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_134 = 0;
    UVar5 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_134 != 0) goto LAB_1400edf7f;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_128;
    if (local_128 != (IUnknown *)0x0) {
      UVar5 = (*local_128->lpVtbl[0x12].AddRef)(local_128);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_128 != (IUnknown *)0x0) {
        (*local_128->lpVtbl->Release)(local_128);
        local_128 = (IUnknown *)0x0;
      }
    }
    local_c0 = 0;
    local_b8 = &DAT_140281f00;
    local_d0 = &DAT_140281f00;
    local_c8 = 0;
    local_d8 = 0;
    Ordinal_9(local_f0);
    Ordinal_9(local_108);
    if (local_120 != (longlong *)0x0) {
      (**(code **)(*local_120 + 0x10))();
    }
    if (local_128 != (IUnknown *)0x0) {
      (*local_128->lpVtbl->Release)(local_128);
    }
    if (local_158 != (longlong *)0x0) {
      (**(code **)(*local_158 + 0x10))();
    }
    return (longlong *)0x0;
  }
LAB_1400edf7f:
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_88);
  FUN_140001710(&local_158,*puVar7,"dbo.up_get_guild_total_count");
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  local_res20 = (longlong *)local_a0;
  uVar1 = *(undefined2 *)((longlong)param_2 + 0xe);
  Ordinal_8(local_a0);
  if (local_a0[0] != 0x12) {
    iVar3 = Ordinal_9(local_a0);
    if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar3);
    }
    local_a0[0] = 0x12;
  }
  local_98 = uVar1;
  plVar8 = operator_new(0x18);
  local_80 = plVar11;
  local_a8 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("server");
    *plVar8 = lVar9;
    local_80 = plVar8;
  }
  if (local_80 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_158,local_58,&local_80,2,1,2,local_a0);
  local_res20 = plVar8;
  if (local_158 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_158,local_78);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar5 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_78[0] != (longlong *)0x0) {
      (**(code **)(*local_78[0] + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    puVar7 = (undefined8 *)FUN_1400016d0(&local_158,&local_a8);
    This = local_128;
    pIVar2 = (IUnknown *)*puVar7;
    if (local_128 != pIVar2) {
      local_128 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    pIVar2 = local_128;
    if (local_128 != (IUnknown *)0x0) {
      local_res20 = (longlong *)((ulonglong)local_res20 & 0xffffffffffff0000);
      UVar5 = (*local_128->lpVtbl[6].Release)(local_128);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_res20 == -1) {
        uStack_144 = 0x15e;
        plVar8 = plVar11;
      }
      else {
        uVar10 = FUN_140002290(&local_128,local_50,"total_cnt",local_res18);
        FUN_140182560(uVar10);
        uVar6 = FUN_1400d6e60(uVar10);
        uStack_142 = (undefined2)uVar6;
        uStack_140 = (undefined2)((uint)uVar6 >> 0x10);
        Ordinal_9(local_50);
        plVar8 = (longlong *)0x1;
        if (local_res18[0] == '\0') {
          uStack_144 = 0x15f;
          plVar8 = plVar11;
        }
      }
      param_1[0x26] = local_150;
      param_1[0x27] = CONCAT26(uStack_142,CONCAT24(uStack_144,local_148));
      *(undefined2 *)(param_1 + 0x28) = uStack_140;
      iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar3 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar2 = local_128;
      if (local_128 != (IUnknown *)0x0) {
        local_138 = 0;
        UVar5 = (*local_128->lpVtbl[0x12].AddRef)(local_128);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
        }
        pIVar2 = local_128;
        if (local_138 != 0) {
          if (local_128 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar5 = (*local_128->lpVtbl[10].Release)(local_128);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_128 != (IUnknown *)0x0) {
          (*local_128->lpVtbl->Release)(local_128);
          local_128 = (IUnknown *)0x0;
        }
      }
      local_c0 = 0;
      local_b8 = &DAT_140281f00;
      local_d0 = &DAT_140281f00;
      local_c8 = 0;
      local_d8 = 0;
      Ordinal_9(local_f0);
      Ordinal_9(local_108);
      if (local_120 != (longlong *)0x0) {
        (**(code **)(*local_120 + 0x10))();
      }
      if (local_128 != (IUnknown *)0x0) {
        (*local_128->lpVtbl->Release)(local_128);
      }
      if (local_158 != (longlong *)0x0) {
        (**(code **)(*local_158 + 0x10))();
      }
      return plVar8;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400eecc7)
// WARNING: Removing unreachable block (ram,0x0001400eecd4)
// WARNING: Removing unreachable block (ram,0x0001400eecdf)
// WARNING: Removing unreachable block (ram,0x0001400eecef)

undefined8 * FUN_1400ee3c0(undefined8 *param_1,undefined8 *param_2)

{
  undefined2 uVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  undefined6 uVar4;
  IUnknown *This;
  undefined8 uVar5;
  undefined1 uVar6;
  undefined1 uVar7;
  undefined2 uVar8;
  ULONG UVar9;
  int iVar10;
  HRESULT HVar11;
  undefined4 uVar12;
  undefined8 *puVar13;
  undefined8 uVar14;
  longlong *plVar15;
  undefined8 uVar16;
  longlong lVar17;
  char *riid;
  undefined8 *puVar18;
  char *ppvObject;
  char local_res10 [8];
  longlong *local_res18;
  undefined8 *local_res20;
  uint local_208;
  undefined8 local_200;
  undefined2 uStack_1f4;
  short sStack_1f2;
  longlong *local_1f0;
  undefined4 local_1e8;
  undefined4 local_1e4;
  undefined4 local_1e0;
  undefined4 local_1dc;
  undefined8 local_1d8;
  undefined4 local_1d0;
  undefined2 local_1cc;
  undefined1 local_1ca;
  LPUNKNOWN local_1c8;
  undefined8 *local_1c0;
  IUnknown *local_1b8;
  longlong *local_1b0;
  undefined4 local_1a8;
  undefined1 local_198 [24];
  undefined1 local_180 [24];
  undefined4 local_168;
  undefined1 *local_160;
  undefined4 local_158;
  undefined8 local_150;
  undefined1 *local_148;
  undefined8 *local_138;
  longlong *local_130;
  longlong *local_128;
  longlong *local_120;
  undefined8 local_118;
  undefined8 local_110;
  undefined1 local_f8 [8];
  undefined8 local_f0;
  undefined1 local_e8 [24];
  undefined1 local_d0 [24];
  undefined1 local_b8 [24];
  undefined1 local_a0 [24];
  IID local_88;
  undefined1 local_70 [24];
  undefined1 local_58 [32];
  
  local_f0 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  puVar18 = (undefined8 *)0x0;
  local_1c0 = param_2;
  if ((pIVar3 != (IUnknown *)0x0) && (UVar9 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3), (int)UVar9 < 0)
     ) {
    _com_issue_errorex(UVar9,pIVar3,(_GUID *)&DAT_140281f08);
  }
  iVar10 = FUN_1400a1e90(param_1);
  if (iVar10 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return (undefined8 *)0x0;
  }
  uVar2 = *(undefined4 *)(param_2 + 1);
  local_200 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x24510000);
  uStack_1f4 = 0x160;
  sStack_1f2 = 0;
  uVar8 = 0x10;
  local_208 = 0x10;
  local_1f0 = (longlong *)0x0;
  iVar10 = FUN_140001970(&local_1f0);
  if ((iVar10 < 0) && (iVar10 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar10);
  }
  local_1b8 = (IUnknown *)0x0;
  local_1b0 = (longlong *)0x0;
  Ordinal_8(local_198);
  Ordinal_8(local_180);
  pIVar3 = local_1b8;
  if ((local_1b8 != (IUnknown *)0x0) && (local_1b8 = (IUnknown *)0x0, pIVar3 != (IUnknown *)0x0)) {
    (*pIVar3->lpVtbl->Release)(pIVar3);
  }
  local_148 = &DAT_140281f00;
  local_160 = &DAT_140281f00;
  local_158 = 0;
  local_150 = 0;
  if (local_1b8 != (IUnknown *)0x0) {
    (*local_1b8->lpVtbl->Release)(local_1b8);
  }
  HVar11 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                            &local_1c8);
  if (-1 < HVar11) {
    HVar11 = OleRun(local_1c8);
    if (-1 < HVar11) {
      HVar11 = (*local_1c8->lpVtbl->QueryInterface)(local_1c8,(IID *)&DAT_140281f68,&local_1b8);
    }
    (*local_1c8->lpVtbl->Release)(local_1c8);
    if (-1 < HVar11) goto LAB_1400ee5c6;
  }
  local_1b8 = (IUnknown *)0x0;
LAB_1400ee5c6:
  local_168 = 2;
  local_1a8 = 1;
  local_res10[0] = '\x01';
  puVar13 = (undefined8 *)FUN_140001f20(*param_1,&local_120);
  FUN_140001710(&local_1f0,*puVar13,"dbo.up_get_guild_load_info");
  if (local_120 != (longlong *)0x0) {
    (**(code **)(*local_120 + 0x10))();
  }
  local_res18 = (longlong *)&local_1e8;
  uVar1 = *(undefined2 *)((longlong)param_2 + 0xe);
  Ordinal_8(&local_1e8);
  if ((short)local_1e8 != 0x12) {
    iVar10 = Ordinal_9(&local_1e8);
    if (iVar10 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar10);
    }
    local_1e8 = CONCAT22(local_1e8._2_2_,0x12);
  }
  local_1e0 = CONCAT22(local_1e0._2_2_,uVar1);
  puVar13 = operator_new(0x18);
  local_138 = puVar18;
  local_res20 = puVar13;
  if (puVar13 != (undefined8 *)0x0) {
    puVar13[1] = 0;
    *(undefined4 *)(puVar13 + 2) = 1;
    uVar14 = FUN_140201490("server");
    *puVar13 = uVar14;
    local_138 = puVar13;
  }
  if (local_138 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar15 = (longlong *)FUN_140001880(&local_1f0,local_f8,&local_138,2,1,2,&local_1e8);
  local_res18 = plVar15;
  if (local_1f0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar13 = (undefined8 *)FUN_140001660(local_1f0,&local_130);
  pIVar3 = (IUnknown *)*puVar13;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar9 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar9 < 0) {
      _com_issue_errorex(UVar9,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_130 != (longlong *)0x0) {
      (**(code **)(*local_130 + 0x10))();
    }
    if ((longlong *)*plVar15 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar15 + 0x10))();
    }
    puVar13 = (undefined8 *)FUN_1400016d0(&local_1f0,&local_128);
    This = local_1b8;
    pIVar3 = (IUnknown *)*puVar13;
    if (local_1b8 != pIVar3) {
      local_1b8 = pIVar3;
      if (pIVar3 != (IUnknown *)0x0) {
        (*pIVar3->lpVtbl->AddRef)(pIVar3);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_128 != (longlong *)0x0) {
      (**(code **)(*local_128 + 0x10))();
    }
    pIVar3 = local_1b8;
    if (local_1b8 != (IUnknown *)0x0) {
      local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffffffff0000);
      UVar9 = (*local_1b8->lpVtbl[6].Release)(local_1b8);
      if ((int)UVar9 < 0) {
        _com_issue_errorex(UVar9,pIVar3,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_res18 == -1) {
        uStack_1f4 = 0x161;
        puVar13 = puVar18;
      }
      else {
        while( true ) {
          pIVar3 = local_1b8;
          uVar8 = (undefined2)local_208;
          if (local_1b8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          local_res20 = (undefined8 *)((ulonglong)local_res20 & 0xffffffffffff0000);
          UVar9 = (*local_1b8->lpVtbl[6].Release)(local_1b8);
          if ((int)UVar9 < 0) {
            _com_issue_errorex(UVar9,pIVar3,(_GUID *)&DAT_140281f28);
          }
          if ((short)local_res20 == -1) break;
          local_1e8 = 0;
          local_1e4 = 0;
          local_1e0 = 0;
          local_1dc = 0;
          local_1d8 = 0;
          local_1d0 = 0;
          local_1cc = 0;
          local_1ca = 0;
          uVar14 = FUN_140002290(&local_1b8,local_70,"guild_id",local_res10);
          FUN_1400625d0(uVar14,&local_118);
          uVar5 = local_110;
          uVar14 = local_118;
          Ordinal_9(local_70);
          uVar16 = FUN_140002290(&local_1b8,local_58,"member_cnt",local_res10);
          FUN_140182560(uVar16);
          uVar8 = FUN_1400ef870(uVar16);
          local_1d0 = CONCAT22(uVar8,(undefined2)local_1d0);
          Ordinal_9(local_58);
          uVar16 = FUN_140002290(&local_1b8,local_e8,"is_storage_own",local_res10);
          FUN_140182560(uVar16);
          uVar6 = FUN_1400d6de0(uVar16);
          Ordinal_9(local_e8);
          uVar16 = FUN_140002290(&local_1b8,local_a0,"storage_item_cnt",local_res10);
          FUN_140182560(uVar16);
          uVar12 = FUN_1400d6e60(uVar16);
          local_1d8 = CONCAT44(local_1d8._4_4_,uVar12);
          Ordinal_9(local_a0);
          uVar16 = FUN_140002290(&local_1b8,local_d0,"storage_log_cnt",local_res10);
          FUN_140182560(uVar16);
          uVar7 = FUN_1400624d0(uVar16);
          local_1cc = CONCAT11(local_1cc._1_1_,uVar7);
          Ordinal_9(local_d0);
          uVar16 = FUN_140002290(&local_1b8,local_b8,"exp_log_cnt",local_res10);
          FUN_140182560(uVar16);
          uVar7 = FUN_1400624d0(uVar16);
          local_1cc = CONCAT11(uVar7,(undefined1)local_1cc);
          Ordinal_9(local_b8);
          ppvObject = "skill_cnt";
          riid = (char *)&local_88;
          uVar16 = FUN_140002290(&local_1b8,riid,"skill_cnt",local_res10);
          FUN_140182560(uVar16);
          uVar12 = FUN_1400d6e60(uVar16);
          local_1d8 = CONCAT44(uVar12,(undefined4)local_1d8);
          Ordinal_9(&local_88);
          lVar17 = (longlong)(int)local_208;
          *(undefined8 *)(lVar17 + 0x130 + (longlong)param_1) = uVar14;
          *(undefined8 *)(lVar17 + 0x138 + (longlong)param_1) = uVar5;
          *(undefined8 *)(lVar17 + 0x140 + (longlong)param_1) = local_1d8;
          *(undefined4 *)(lVar17 + 0x148 + (longlong)param_1) = local_1d0;
          *(undefined2 *)(lVar17 + 0x14c + (longlong)param_1) = local_1cc;
          *(undefined1 *)(lVar17 + 0x14e + (longlong)param_1) = uVar6;
          local_208 = local_208 + 0x1f;
          sStack_1f2 = sStack_1f2 + 1;
          if (50000 < local_208) {
            uVar4 = local_200._2_6_;
            local_200 = CONCAT62(local_200._2_6_,(short)local_208);
            uVar14 = local_200;
            riid = (char *)(param_1 + 0x26);
            local_200._4_2_ = SUB62(uVar4,2);
            local_200._6_2_ = SUB62(uVar4,4);
            ((IID *)riid)->Data1 = (undefined4)local_200;
            ((IID *)riid)->Data2 = local_200._4_2_;
            ((IID *)riid)->Data3 = local_200._6_2_;
            param_1[0x27] = CONCAT26(sStack_1f2,CONCAT24(0x160,uVar2));
            iVar10 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
            if (iVar10 == 0) {
              ppvObject = "DB Result Queue push error";
              riid = "DBResultQueue_Error.Log";
              FUN_1400a0b40(param_1[0x23]);
            }
            local_208 = 0x10;
            sStack_1f2 = 0;
            local_200 = uVar14;
          }
          pIVar3 = local_1b8;
          if (local_1b8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          HVar11 = (*local_1b8->lpVtbl[0xc].QueryInterface)
                             (local_1b8,(IID *)riid,(void **)ppvObject);
          if (HVar11 < 0) {
            _com_issue_errorex(HVar11,pIVar3,(_GUID *)&DAT_140281f28);
          }
        }
        puVar13 = (undefined8 *)0x1;
        if (local_res10[0] == '\0') {
          uStack_1f4 = 0x162;
          puVar13 = puVar18;
        }
      }
      local_200 = CONCAT62(local_200._2_6_,uVar8);
      param_1[0x26] = local_200;
      param_1[0x27] = CONCAT26(sStack_1f2,CONCAT24(uStack_1f4,uVar2));
      iVar10 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar10 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar3 = local_1b8;
      if (local_1b8 != (IUnknown *)0x0) {
        UVar9 = (*local_1b8->lpVtbl[0x12].AddRef)(local_1b8);
        if ((int)UVar9 < 0) {
          _com_issue_errorex(UVar9,pIVar3,(_GUID *)&DAT_140281f28);
        }
        if (local_1b8 != (IUnknown *)0x0) {
          (*local_1b8->lpVtbl->Release)(local_1b8);
          local_1b8 = (IUnknown *)0x0;
        }
      }
      local_150 = 0;
      local_148 = &DAT_140281f00;
      local_160 = &DAT_140281f00;
      local_158 = 0;
      local_168 = 0;
      Ordinal_9(local_180);
      Ordinal_9(local_198);
      if (local_1b0 != (longlong *)0x0) {
        (**(code **)(*local_1b0 + 0x10))();
      }
      if (local_1b8 != (IUnknown *)0x0) {
        (*local_1b8->lpVtbl->Release)(local_1b8);
      }
      if (local_1f0 != (longlong *)0x0) {
        (**(code **)(*local_1f0 + 0x10))();
      }
      return puVar13;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



longlong * FUN_1400eedb0(undefined8 *param_1,undefined8 *param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  undefined4 uVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  char local_res18 [8];
  int local_res20;
  longlong *local_238;
  short local_230;
  int local_22c;
  longlong *local_228;
  undefined8 local_220;
  undefined4 local_218;
  undefined2 uStack_214;
  undefined2 uStack_212;
  undefined6 local_210;
  undefined2 uStack_20a;
  undefined6 local_208;
  undefined2 uStack_202;
  undefined6 local_200;
  undefined2 uStack_1fa;
  undefined6 local_1f8;
  undefined2 uStack_1f2;
  undefined2 local_1f0;
  undefined2 uStack_1ee;
  undefined2 local_1ec;
  LPUNKNOWN local_1e8;
  longlong *local_1e0;
  longlong *local_1d8;
  longlong *local_1d0;
  longlong *local_1c8 [2];
  IUnknown *local_1b8;
  longlong *local_1b0;
  undefined4 local_1a8;
  undefined1 local_198 [24];
  undefined1 local_180 [24];
  undefined4 local_168;
  undefined1 *local_160;
  undefined4 local_158;
  undefined8 local_150;
  undefined1 *local_148;
  longlong *local_138;
  longlong *local_130;
  longlong *local_128;
  longlong *local_120;
  longlong *local_118;
  longlong *local_110;
  longlong *local_108;
  longlong *local_100;
  longlong local_f8 [3];
  longlong local_e0 [3];
  undefined8 local_c8;
  undefined4 local_b8;
  undefined4 uStack_b4;
  undefined4 uStack_b0;
  undefined4 uStack_ac;
  undefined4 local_a8;
  undefined4 uStack_a4;
  undefined4 uStack_a0;
  undefined4 uStack_9c;
  undefined1 local_98 [16];
  longlong local_88 [3];
  longlong local_70 [3];
  undefined1 local_58 [32];
  
  local_c8 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_1400eee29:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (longlong *)0x0;
    }
  }
  else {
    local_res20 = 0;
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_res20 == 0) goto LAB_1400eee29;
  }
  local_218 = (undefined4)param_2[1];
  uStack_1ee = (undefined2)((uint)*(undefined4 *)(param_2 + 6) >> 0x10);
  local_res20 = CONCAT22(local_res20._2_2_,*(undefined2 *)((longlong)param_2 + 0x34));
  local_220._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_220._0_4_ = CONCAT22(0x2452,(short)*param_2);
  uStack_214 = 0x160;
  uStack_212 = (undefined2)*(undefined8 *)((longlong)param_2 + 0xe);
  local_210 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0xe) >> 0x10);
  uStack_20a = (undefined2)*(undefined8 *)((longlong)param_2 + 0x16);
  local_208 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x16) >> 0x10);
  uStack_202 = (undefined2)*(undefined8 *)((longlong)param_2 + 0x1e);
  local_200 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x1e) >> 0x10);
  uStack_1fa = (undefined2)*(undefined8 *)((longlong)param_2 + 0x26);
  local_1f8 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x26) >> 0x10);
  uStack_1f2 = *(undefined2 *)((longlong)param_2 + 0x2e);
  local_1f0 = *(undefined2 *)(param_2 + 6);
  local_238 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_238);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_1b8 = (IUnknown *)0x0;
  local_1b0 = (longlong *)0x0;
  Ordinal_8(local_198);
  Ordinal_8(local_180);
  pIVar2 = local_1b8;
  if ((local_1b8 != (IUnknown *)0x0) && (local_1b8 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_148 = &DAT_140281f00;
  local_160 = &DAT_140281f00;
  local_158 = 0;
  local_150 = 0;
  if (local_1b8 != (IUnknown *)0x0) {
    (*local_1b8->lpVtbl->Release)(local_1b8);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_1e8);
  if (-1 < HVar5) {
    HVar5 = OleRun(local_1e8);
    if (-1 < HVar5) {
      HVar5 = (*local_1e8->lpVtbl->QueryInterface)(local_1e8,(IID *)&DAT_140281f68,&local_1b8);
    }
    (*local_1e8->lpVtbl->Release)(local_1e8);
    if (-1 < HVar5) goto LAB_1400ef016;
  }
  local_1b8 = (IUnknown *)0x0;
LAB_1400ef016:
  local_168 = 2;
  local_1a8 = 1;
  local_res18[0] = '\x01';
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_120);
  FUN_140001710(&local_238,*puVar7,"dbo.up_read_item_inventory_slot");
  if (local_120 != (longlong *)0x0) {
    (**(code **)(*local_120 + 0x10))();
  }
  local_228 = local_88;
  local_b8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_b4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_b0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_ac = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar8 = FUN_140062280(local_88,&local_b8);
  plVar9 = operator_new(0x18);
  local_128 = plVar11;
  local_1d0 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    local_128 = plVar9;
  }
  if (local_128 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_238,&local_1d8,&local_128,0xca,1,0x10,uVar8);
  local_228 = plVar9;
  if (local_238 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_238,&local_100);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_100 != (longlong *)0x0) {
    (**(code **)(*local_100 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_1d8 = local_70;
  local_a8 = *(undefined4 *)((longlong)param_2 + 0x1e);
  uStack_a4 = *(undefined4 *)((longlong)param_2 + 0x22);
  uStack_a0 = *(undefined4 *)((longlong)param_2 + 0x26);
  uStack_9c = *(undefined4 *)((longlong)param_2 + 0x2a);
  uVar8 = FUN_140062280(local_70,&local_a8);
  plVar9 = operator_new(0x18);
  local_118 = plVar11;
  local_228 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("item_uid");
    *plVar9 = lVar10;
    local_118 = plVar9;
  }
  if (local_118 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_238,&local_1e0,&local_118,0xca,1,0x10,uVar8);
  local_1d8 = plVar9;
  if (local_238 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_238,&local_110);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_110 != (longlong *)0x0) {
    (**(code **)(*local_110 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_1e0 = local_f8;
  sVar1 = *(short *)((longlong)param_2 + 0x2e);
  Ordinal_8(local_f8);
  FUN_140062080(local_f8,(int)sVar1);
  plVar9 = operator_new(0x18);
  local_130 = plVar11;
  local_1d8 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("page_index");
    *plVar9 = lVar10;
    local_130 = plVar9;
  }
  if (local_130 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_238,local_1c8,&local_130,2,1,2,local_f8);
  local_1e0 = plVar9;
  if (local_238 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_238,&local_138);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_138 != (longlong *)0x0) {
      (**(code **)(*local_138 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_1c8[0] = local_e0;
    sVar1 = *(short *)(param_2 + 6);
    Ordinal_8(local_e0);
    FUN_140062080(local_e0,(int)sVar1);
    plVar9 = operator_new(0x18);
    local_108 = plVar11;
    local_1e0 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("slot_index");
      *plVar9 = lVar10;
      local_108 = plVar9;
    }
    if (local_108 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_238,local_98,&local_108,2,1,2,local_e0);
    local_1c8[0] = plVar9;
    if (local_238 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_238,&local_1d0);
    pIVar2 = (IUnknown *)*puVar7;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_1d0 != (longlong *)0x0) {
        (**(code **)(*local_1d0 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      puVar7 = (undefined8 *)FUN_1400016d0(&local_238,&local_228);
      This = local_1b8;
      pIVar2 = (IUnknown *)*puVar7;
      if (local_1b8 != pIVar2) {
        local_1b8 = pIVar2;
        if (pIVar2 != (IUnknown *)0x0) {
          (*pIVar2->lpVtbl->AddRef)(pIVar2);
        }
        if (This != (IUnknown *)0x0) {
          (*This->lpVtbl->Release)(This);
        }
      }
      if (local_228 != (longlong *)0x0) {
        (**(code **)(*local_228 + 0x10))();
      }
      pIVar2 = local_1b8;
      if (local_1b8 != (IUnknown *)0x0) {
        local_230 = 0;
        UVar3 = (*local_1b8->lpVtbl[6].Release)(local_1b8);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f28);
        }
        if (local_230 == -1) {
          uStack_214 = 0x161;
        }
        else {
          uVar8 = FUN_140002290(&local_1b8,local_58,"item_count",local_res18);
          FUN_140182560(uVar8);
          uVar6 = FUN_140062550(uVar8);
          uStack_1ee = (undefined2)uVar6;
          local_1ec = (undefined2)((uint)uVar6 >> 0x10);
          Ordinal_9(local_58);
          if (local_res18[0] == '\0') {
            uStack_214 = 0x162;
            local_res20 = CONCAT22(local_res20._2_2_,local_1ec);
          }
          else {
            local_res20 = CONCAT22(local_res20._2_2_,local_1ec);
            plVar11 = (longlong *)0x1;
          }
        }
        local_220 = CONCAT62(local_220._2_6_,0x36);
        param_1[0x26] = local_220;
        param_1[0x27] = CONCAT26(uStack_212,CONCAT24(uStack_214,local_218));
        param_1[0x28] = CONCAT26(uStack_20a,local_210);
        param_1[0x29] = CONCAT26(uStack_202,local_208);
        param_1[0x2a] = CONCAT26(uStack_1fa,local_200);
        param_1[0x2b] = CONCAT26(uStack_1f2,local_1f8);
        *(uint *)(param_1 + 0x2c) = CONCAT22(uStack_1ee,local_1f0);
        *(undefined2 *)((longlong)param_1 + 0x164) = (undefined2)local_res20;
        iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar4 == 0) {
          FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
        }
        pIVar2 = local_1b8;
        if (local_1b8 != (IUnknown *)0x0) {
          local_22c = 0;
          UVar3 = (*local_1b8->lpVtbl[0x12].AddRef)(local_1b8);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f28);
          }
          pIVar2 = local_1b8;
          if (local_22c != 0) {
            if (local_1b8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(0x80004003);
            }
            UVar3 = (*local_1b8->lpVtbl[10].Release)(local_1b8);
            if ((int)UVar3 < 0) {
              _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f28);
            }
          }
          if (local_1b8 != (IUnknown *)0x0) {
            (*local_1b8->lpVtbl->Release)(local_1b8);
            local_1b8 = (IUnknown *)0x0;
          }
        }
        local_150 = 0;
        local_148 = &DAT_140281f00;
        local_160 = &DAT_140281f00;
        local_158 = 0;
        local_168 = 0;
        Ordinal_9(local_180);
        Ordinal_9(local_198);
        if (local_1b0 != (longlong *)0x0) {
          (**(code **)(*local_1b0 + 0x10))();
        }
        if (local_1b8 != (IUnknown *)0x0) {
          (*local_1b8->lpVtbl->Release)(local_1b8);
        }
        if (local_238 != (longlong *)0x0) {
          (**(code **)(*local_238 + 0x10))();
        }
        return plVar11;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



short FUN_1400ef870(short *param_1)

{
  int iVar1;
  undefined8 uVar2;
  short local_20 [4];
  short local_18;
  
  uVar2 = 0xfffffffffffffffe;
  if (*param_1 == 0x12) {
    local_18 = param_1[4];
  }
  else {
    Ordinal_8(local_20);
    if ((local_20 != param_1) || (local_20[0] != 0x12)) {
      iVar1 = Ordinal_12(local_20,param_1,0,0x12,uVar2);
      if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar1);
      }
    }
    Ordinal_9(local_20);
  }
  return local_18;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_1400ef8f0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined6 uVar2;
  IUnknown *This;
  char cVar3;
  int iVar4;
  HRESULT HVar5;
  ULONG UVar6;
  undefined8 *puVar7;
  longlong *plVar8;
  longlong lVar9;
  undefined8 uVar10;
  char *riid;
  uint uVar11;
  char *ppvObject;
  longlong *plVar12;
  undefined1 auStackY_2a8 [32];
  char local_268 [4];
  uint local_264;
  short local_260;
  short local_25c;
  undefined8 local_258;
  undefined4 local_250;
  undefined2 uStack_24c;
  ushort uStack_24a;
  longlong *local_248;
  int local_240;
  int local_23c;
  undefined4 uVar13;
  LPUNKNOWN local_228;
  longlong *local_220;
  IUnknown *local_218;
  longlong *local_210;
  undefined4 local_208;
  undefined1 local_1f8 [24];
  undefined1 local_1e0 [24];
  undefined4 local_1c8;
  undefined1 *local_1c0;
  undefined4 local_1b8;
  undefined8 local_1b0;
  undefined1 *local_1a8;
  undefined8 *local_198;
  longlong *local_190;
  longlong *local_188;
  longlong *local_180;
  undefined4 local_178;
  undefined4 uStack_174;
  undefined4 uStack_170;
  undefined4 uStack_16c;
  undefined4 local_168;
  undefined4 uStack_164;
  undefined4 uStack_160;
  undefined4 uStack_15c;
  undefined1 local_158 [16];
  undefined8 local_148;
  longlong local_138 [3];
  undefined1 local_120 [24];
  IID local_108;
  undefined8 local_f8;
  undefined2 local_f0;
  undefined8 local_ee;
  undefined2 local_e6;
  undefined8 local_e4;
  undefined8 local_dc;
  undefined8 local_d4;
  undefined4 local_cc;
  undefined2 local_c8;
  undefined8 local_c6;
  undefined8 local_be;
  undefined8 local_b6;
  undefined2 local_ae;
  undefined1 local_ac;
  undefined8 local_ab;
  undefined8 local_a3;
  undefined2 local_9b;
  undefined8 local_99;
  undefined8 local_91;
  undefined8 local_89;
  undefined8 local_81;
  undefined8 local_79;
  undefined1 local_71 [40];
  undefined1 local_49;
  undefined4 local_48;
  undefined4 uStack_44;
  undefined4 uStack_40;
  undefined4 uStack_3c;
  ulonglong local_38;
  
  local_148 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_2a8;
  local_248 = (longlong *)0x0;
  local_198 = param_2;
  iVar4 = FUN_140001970(&local_248);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_218 = (IUnknown *)0x0;
  local_210 = (longlong *)0x0;
  Ordinal_8(local_1f8);
  Ordinal_8(local_1e0);
  pIVar1 = local_218;
  if ((local_218 != (IUnknown *)0x0) && (local_218 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_1a8 = &DAT_140281f00;
  local_1c0 = &DAT_140281f00;
  local_1b8 = 0;
  local_1b0 = 0;
  if (local_218 != (IUnknown *)0x0) {
    (*local_218->lpVtbl->Release)(local_218);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_228);
  if (HVar5 < 0) {
LAB_1400efa5f:
    local_218 = (IUnknown *)0x0;
  }
  else {
    HVar5 = OleRun(local_228);
    if (-1 < HVar5) {
      HVar5 = (*local_228->lpVtbl->QueryInterface)(local_228,(IID *)&DAT_140281f68,&local_218);
    }
    (*local_228->lpVtbl->Release)(local_228);
    if (HVar5 < 0) goto LAB_1400efa5f;
  }
  local_1c8 = 2;
  uVar13 = 1;
  local_208 = 1;
  local_268[0] = '\x01';
  local_250 = *(undefined4 *)(param_2 + 1);
  local_258._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_258._0_4_ = CONCAT22(0x2357,(short)*param_2);
  plVar12 = (longlong *)0x0;
  uStack_24c = 0x93;
  uStack_24a = 0;
  uVar11 = 0x10;
  local_264 = 0x10;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_240 = 0;
    UVar6 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_240 != 0) goto LAB_1400efc40;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_218;
    if (local_218 != (IUnknown *)0x0) {
      local_264 = 0;
      UVar6 = (*local_218->lpVtbl[0x12].AddRef)(local_218);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_218;
      if (local_264 != 0) {
        if (local_218 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar6 = (*local_218->lpVtbl[10].Release)(local_218);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_218 != (IUnknown *)0x0) {
        (*local_218->lpVtbl->Release)(local_218);
        local_218 = (IUnknown *)0x0;
      }
    }
    local_1b0 = 0;
    local_1a8 = &DAT_140281f00;
    local_1c0 = &DAT_140281f00;
    local_1b8 = 0;
    local_1c8 = 0;
    Ordinal_9(local_1e0);
    Ordinal_9(local_1f8);
    if (local_210 != (longlong *)0x0) {
      (**(code **)(*local_210 + 0x10))();
    }
    if (local_218 != (IUnknown *)0x0) {
      (*local_218->lpVtbl->Release)(local_218);
    }
    if (local_248 != (longlong *)0x0) {
      (**(code **)(*local_248 + 0x10))();
    }
    return 0;
  }
LAB_1400efc40:
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_180);
  FUN_140001710(&local_248,*puVar7,"dbo.up_read_item_mail");
  if (local_180 != (longlong *)0x0) {
    (**(code **)(*local_180 + 0x10))();
  }
  local_220 = local_138;
  local_178 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_174 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_170 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_16c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_138,&local_178);
  plVar8 = operator_new(0x18);
  local_188 = (longlong *)0x0;
  local_190 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("character_id");
    *plVar8 = lVar9;
    local_188 = plVar8;
  }
  if (local_188 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_248,local_158,&local_188,0xca);
  local_220 = plVar8;
  if (local_248 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_248,&local_190);
  pIVar1 = (IUnknown *)*puVar7;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar6 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_190 != (longlong *)0x0) {
    (**(code **)(*local_190 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  puVar7 = (undefined8 *)FUN_1400016d0(&local_248,&local_220);
  This = local_218;
  pIVar1 = (IUnknown *)*puVar7;
  if (local_218 != pIVar1) {
    local_218 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_220 != (longlong *)0x0) {
    (**(code **)(*local_220 + 0x10))();
  }
  pIVar1 = local_218;
  if (local_218 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_25c = 0;
  UVar6 = (*local_218->lpVtbl[6].Release)(local_218);
  if ((int)UVar6 < 0) {
    _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f28);
  }
  if (local_25c != -1) {
    while( true ) {
      pIVar1 = local_218;
      if (local_218 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_260 = 0;
      UVar6 = (*local_218->lpVtbl[6].Release)(local_218);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_260 == -1) break;
      local_108.Data1 = 0;
      local_108.Data2 = 0;
      local_108.Data3 = 0;
      local_108.Data4[0] = '\0';
      local_108.Data4[1] = '\0';
      local_108.Data4[2] = '\0';
      local_108.Data4[3] = '\0';
      local_108.Data4[4] = '\0';
      local_108.Data4[5] = '\0';
      local_108.Data4[6] = '\0';
      local_108.Data4[7] = '\0';
      local_f8 = 0;
      local_f0 = 0;
      local_ee = 0;
      local_e6 = 0;
      local_e4 = 0;
      local_dc = 0;
      local_d4 = 0;
      local_cc = 0;
      local_c8 = 0;
      local_c6 = 0;
      local_be = 0;
      local_b6 = 0;
      local_ae = 0;
      local_ab = 0;
      local_9b = 0;
      local_99 = 0;
      local_91 = 0;
      local_89 = 0;
      local_81 = 0;
      local_79 = 0;
      local_49 = 0;
      local_a3 = 0;
      local_ac = local_260 == -1;
      memset(local_71,0,0x28);
      local_48 = 0;
      uStack_44 = 0;
      uStack_40 = 0;
      uStack_3c = 0;
      uVar10 = FUN_140002290(&local_218,local_120,"mail_uid",local_268);
      FUN_1400625d0(uVar10,&local_168);
      local_48 = local_168;
      uStack_44 = uStack_164;
      uStack_40 = uStack_160;
      uStack_3c = uStack_15c;
      Ordinal_9(local_120);
      cVar3 = FUN_1400a1f60(&local_218,&local_108,local_268);
      if (cVar3 == '\0') break;
      riid = (char *)&local_108;
      ppvObject = (char *)0xd0;
      memcpy((void *)((longlong)(int)uVar11 + 0x130 + (longlong)param_1),riid,0xd0);
      local_264 = uVar11 + 0xd0;
      uStack_24a = (short)plVar12 + 1;
      plVar12 = (longlong *)(ulonglong)uStack_24a;
      if (50000 < local_264) {
        uVar2 = local_258._2_6_;
        local_258 = CONCAT62(local_258._2_6_,(short)local_264);
        uVar10 = local_258;
        riid = (char *)(param_1 + 0x26);
        local_258._4_2_ = SUB62(uVar2,2);
        local_258._6_2_ = SUB62(uVar2,4);
        ((IID *)riid)->Data1 = (undefined4)local_258;
        ((IID *)riid)->Data2 = local_258._4_2_;
        ((IID *)riid)->Data3 = local_258._6_2_;
        param_1[0x27] = CONCAT26(uStack_24a,CONCAT24(uStack_24c,local_250));
        local_258 = uVar10;
        iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar4 == 0) {
          ppvObject = "DB Result Queue push error";
          riid = "DBResultQueue_Error.Log";
          FUN_1400a0b40(param_1[0x23]);
        }
        local_264 = 0x10;
        uStack_24a = 0;
        plVar12 = (longlong *)0x0;
      }
      pIVar1 = local_218;
      uVar11 = local_264;
      if (local_218 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar5 = (*local_218->lpVtbl[0xc].QueryInterface)(local_218,(IID *)riid,(void **)ppvObject);
      if (HVar5 < 0) {
        _com_issue_errorex(HVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_268[0] == '\0') {
      uStack_24c = 0x95;
      uVar13 = 0;
    }
  }
  local_258 = CONCAT62(local_258._2_6_,(short)uVar11);
  param_1[0x26] = local_258;
  param_1[0x27] = CONCAT26(uStack_24a,CONCAT24(uStack_24c,local_250));
  iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
  if (iVar4 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar1 = local_218;
  if (local_218 != (IUnknown *)0x0) {
    local_23c = 0;
    UVar6 = (*local_218->lpVtbl[0x12].AddRef)(local_218);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f28);
    }
    pIVar1 = local_218;
    if (local_23c != 0) {
      if (local_218 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar6 = (*local_218->lpVtbl[10].Release)(local_218);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_218 != (IUnknown *)0x0) {
      (*local_218->lpVtbl->Release)(local_218);
      local_218 = (IUnknown *)0x0;
    }
  }
  local_1b0 = 0;
  local_1a8 = &DAT_140281f00;
  local_1c0 = &DAT_140281f00;
  local_1b8 = 0;
  local_1c8 = 0;
  Ordinal_9(local_1e0);
  Ordinal_9(local_1f8);
  if (local_210 != (longlong *)0x0) {
    (**(code **)(*local_210 + 0x10))();
  }
  if (local_218 != (IUnknown *)0x0) {
    (*local_218->lpVtbl->Release)(local_218);
  }
  if (local_248 != (longlong *)0x0) {
    (**(code **)(*local_248 + 0x10))();
  }
  return uVar13;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_1400f02f0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined8 uVar2;
  undefined6 uVar3;
  IUnknown *This;
  char cVar4;
  int iVar5;
  HRESULT HVar6;
  ULONG UVar7;
  undefined8 *puVar8;
  longlong *plVar9;
  longlong lVar10;
  char *riid;
  uint uVar11;
  char *ppvObject;
  longlong *plVar12;
  undefined1 auStackY_278 [32];
  char local_238 [4];
  uint local_234;
  short local_230;
  short local_22c;
  undefined8 local_228;
  undefined4 local_220;
  undefined2 uStack_21c;
  ushort uStack_21a;
  longlong *local_218;
  int local_210;
  int local_20c;
  undefined4 uVar13;
  LPUNKNOWN local_1f8;
  longlong *local_1f0;
  IUnknown *local_1e8;
  longlong *local_1e0;
  undefined4 local_1d8;
  undefined1 local_1c8 [24];
  undefined1 local_1b0 [24];
  undefined4 local_198;
  undefined1 *local_190;
  undefined4 local_188;
  undefined8 local_180;
  undefined1 *local_178;
  undefined8 *local_168;
  longlong *local_160;
  longlong *local_158;
  longlong *local_150;
  undefined4 local_148;
  undefined4 uStack_144;
  undefined4 uStack_140;
  undefined4 uStack_13c;
  undefined8 local_128;
  undefined1 local_120 [8];
  longlong local_118 [4];
  IID local_f8;
  undefined8 local_e8;
  undefined2 local_e0;
  undefined8 local_de;
  undefined2 local_d6;
  undefined8 local_d4;
  undefined8 local_cc;
  undefined8 local_c4;
  undefined4 local_bc;
  undefined2 local_b8;
  undefined8 local_b6;
  undefined8 local_ae;
  undefined8 local_a6;
  undefined2 local_9e;
  undefined1 local_9c;
  undefined8 local_9b;
  undefined8 local_93;
  undefined2 local_8b;
  undefined8 local_89;
  undefined8 local_81;
  undefined8 local_79;
  undefined8 local_71;
  undefined8 local_69;
  undefined1 local_61 [40];
  undefined1 local_39;
  ulonglong local_38;
  
  local_128 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_278;
  local_218 = (longlong *)0x0;
  local_168 = param_2;
  iVar5 = FUN_140001970(&local_218);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_1e8 = (IUnknown *)0x0;
  local_1e0 = (longlong *)0x0;
  Ordinal_8(local_1c8);
  Ordinal_8(local_1b0);
  pIVar1 = local_1e8;
  if ((local_1e8 != (IUnknown *)0x0) && (local_1e8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_180 = 0;
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_1f8);
  if (HVar6 < 0) {
LAB_1400f045f:
    local_1e8 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_1f8);
    if (-1 < HVar6) {
      HVar6 = (*local_1f8->lpVtbl->QueryInterface)(local_1f8,(IID *)&DAT_140281f68,&local_1e8);
    }
    (*local_1f8->lpVtbl->Release)(local_1f8);
    if (HVar6 < 0) goto LAB_1400f045f;
  }
  local_198 = 2;
  uVar13 = 1;
  local_1d8 = 1;
  local_238[0] = '\x01';
  local_220 = *(undefined4 *)(param_2 + 1);
  local_228._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_228._0_4_ = CONCAT22(0x2358,(short)*param_2);
  plVar12 = (longlong *)0x0;
  uStack_21c = 0xb0;
  uStack_21a = 0;
  uVar11 = 0x10;
  local_234 = 0x10;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_210 = 0;
    UVar7 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_210 != 0) goto LAB_1400f0640;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_1e8;
    if (local_1e8 != (IUnknown *)0x0) {
      local_234 = 0;
      UVar7 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_1e8;
      if (local_234 != 0) {
        if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar7 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_1e8 != (IUnknown *)0x0) {
        (*local_1e8->lpVtbl->Release)(local_1e8);
        local_1e8 = (IUnknown *)0x0;
      }
    }
    local_180 = 0;
    local_178 = &DAT_140281f00;
    local_190 = &DAT_140281f00;
    local_188 = 0;
    local_198 = 0;
    Ordinal_9(local_1b0);
    Ordinal_9(local_1c8);
    if (local_1e0 != (longlong *)0x0) {
      (**(code **)(*local_1e0 + 0x10))();
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
    }
    if (local_218 != (longlong *)0x0) {
      (**(code **)(*local_218 + 0x10))();
    }
    return 0;
  }
LAB_1400f0640:
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_158);
  FUN_140001710(&local_218,*puVar8,"dbo.up_read_item_equip");
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  local_1f0 = local_118;
  local_148 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_144 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_140 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_13c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_118,&local_148);
  plVar9 = operator_new(0x18);
  local_150 = (longlong *)0x0;
  local_160 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    local_150 = plVar9;
  }
  if (local_150 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_218,local_120,&local_150,0xca);
  local_1f0 = plVar9;
  if (local_218 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_218,&local_160);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar7 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar7 < 0) {
    _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_160 != (longlong *)0x0) {
    (**(code **)(*local_160 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  puVar8 = (undefined8 *)FUN_1400016d0(&local_218,&local_1f0);
  This = local_1e8;
  pIVar1 = (IUnknown *)*puVar8;
  if (local_1e8 != pIVar1) {
    local_1e8 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_1f0 != (longlong *)0x0) {
    (**(code **)(*local_1f0 + 0x10))();
  }
  pIVar1 = local_1e8;
  if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_22c = 0;
  UVar7 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
  if ((int)UVar7 < 0) {
    _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
  }
  if (local_22c != -1) {
    while( true ) {
      pIVar1 = local_1e8;
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_230 = 0;
      UVar7 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_230 == -1) break;
      local_f8.Data1 = 0;
      local_f8.Data2 = 0;
      local_f8.Data3 = 0;
      local_f8.Data4[0] = '\0';
      local_f8.Data4[1] = '\0';
      local_f8.Data4[2] = '\0';
      local_f8.Data4[3] = '\0';
      local_f8.Data4[4] = '\0';
      local_f8.Data4[5] = '\0';
      local_f8.Data4[6] = '\0';
      local_f8.Data4[7] = '\0';
      local_e8 = 0;
      local_e0 = 0;
      local_de = 0;
      local_d6 = 0;
      local_d4 = 0;
      local_cc = 0;
      local_c4 = 0;
      local_bc = 0;
      local_b8 = 0;
      local_b6 = 0;
      local_ae = 0;
      local_a6 = 0;
      local_9e = 0;
      local_9b = 0;
      local_8b = 0;
      local_89 = 0;
      local_81 = 0;
      local_79 = 0;
      local_71 = 0;
      local_69 = 0;
      local_39 = 0;
      local_93 = 0;
      local_9c = local_230 == -1;
      memset(local_61,0,0x28);
      cVar4 = FUN_1400a1f60(&local_1e8,&local_f8,local_238);
      if (cVar4 == '\0') break;
      riid = (char *)&local_f8;
      ppvObject = (char *)0xc0;
      memcpy((void *)((longlong)(int)uVar11 + 0x130 + (longlong)param_1),riid,0xc0);
      local_234 = uVar11 + 0xc0;
      uStack_21a = (short)plVar12 + 1;
      plVar12 = (longlong *)(ulonglong)uStack_21a;
      if (50000 < local_234) {
        uVar3 = local_228._2_6_;
        local_228 = CONCAT62(local_228._2_6_,(short)local_234);
        uVar2 = local_228;
        riid = (char *)(param_1 + 0x26);
        local_228._4_2_ = SUB62(uVar3,2);
        local_228._6_2_ = SUB62(uVar3,4);
        ((IID *)riid)->Data1 = (undefined4)local_228;
        ((IID *)riid)->Data2 = local_228._4_2_;
        ((IID *)riid)->Data3 = local_228._6_2_;
        param_1[0x27] = CONCAT26(uStack_21a,CONCAT24(uStack_21c,local_220));
        local_228 = uVar2;
        iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar5 == 0) {
          ppvObject = "DB Result Queue push error";
          riid = "DBResultQueue_Error.Log";
          FUN_1400a0b40(param_1[0x23]);
        }
        local_234 = 0x10;
        uStack_21a = 0;
        plVar12 = (longlong *)0x0;
      }
      pIVar1 = local_1e8;
      uVar11 = local_234;
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar6 = (*local_1e8->lpVtbl[0xc].QueryInterface)(local_1e8,(IID *)riid,(void **)ppvObject);
      if (HVar6 < 0) {
        _com_issue_errorex(HVar6,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_238[0] == '\0') {
      uStack_21c = 0xb1;
      uVar13 = 0;
    }
  }
  local_228 = CONCAT62(local_228._2_6_,(short)uVar11);
  param_1[0x26] = local_228;
  param_1[0x27] = CONCAT26(uStack_21a,CONCAT24(uStack_21c,local_220));
  iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
  if (iVar5 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar1 = local_1e8;
  if (local_1e8 != (IUnknown *)0x0) {
    local_20c = 0;
    UVar7 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
    }
    pIVar1 = local_1e8;
    if (local_20c != 0) {
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar7 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
      local_1e8 = (IUnknown *)0x0;
    }
  }
  local_180 = 0;
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_198 = 0;
  Ordinal_9(local_1b0);
  Ordinal_9(local_1c8);
  if (local_1e0 != (longlong *)0x0) {
    (**(code **)(*local_1e0 + 0x10))();
  }
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  if (local_218 != (longlong *)0x0) {
    (**(code **)(*local_218 + 0x10))();
  }
  return uVar13;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_1400f0ca0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined8 uVar2;
  undefined6 uVar3;
  IUnknown *This;
  char cVar4;
  int iVar5;
  HRESULT HVar6;
  ULONG UVar7;
  undefined8 *puVar8;
  longlong *plVar9;
  longlong lVar10;
  char *riid;
  uint uVar11;
  char *ppvObject;
  longlong *plVar12;
  undefined1 auStackY_278 [32];
  char local_238 [4];
  uint local_234;
  short local_230;
  short local_22c;
  undefined8 local_228;
  undefined4 local_220;
  undefined2 uStack_21c;
  ushort uStack_21a;
  longlong *local_218;
  int local_210;
  int local_20c;
  undefined4 uVar13;
  LPUNKNOWN local_1f8;
  longlong *local_1f0;
  IUnknown *local_1e8;
  longlong *local_1e0;
  undefined4 local_1d8;
  undefined1 local_1c8 [24];
  undefined1 local_1b0 [24];
  undefined4 local_198;
  undefined1 *local_190;
  undefined4 local_188;
  undefined8 local_180;
  undefined1 *local_178;
  undefined8 *local_168;
  longlong *local_160;
  longlong *local_158;
  longlong *local_150;
  undefined4 local_148;
  undefined4 uStack_144;
  undefined4 uStack_140;
  undefined4 uStack_13c;
  undefined8 local_128;
  undefined1 local_120 [8];
  longlong local_118 [4];
  IID local_f8;
  undefined8 local_e8;
  undefined2 local_e0;
  undefined8 local_de;
  undefined2 local_d6;
  undefined8 local_d4;
  undefined8 local_cc;
  undefined8 local_c4;
  undefined4 local_bc;
  undefined2 local_b8;
  undefined8 local_b6;
  undefined8 local_ae;
  undefined8 local_a6;
  undefined2 local_9e;
  undefined1 local_9c;
  undefined8 local_9b;
  undefined8 local_93;
  undefined2 local_8b;
  undefined8 local_89;
  undefined8 local_81;
  undefined8 local_79;
  undefined8 local_71;
  undefined8 local_69;
  undefined1 local_61 [40];
  undefined1 local_39;
  ulonglong local_38;
  
  local_128 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_278;
  local_218 = (longlong *)0x0;
  local_168 = param_2;
  iVar5 = FUN_140001970(&local_218);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_1e8 = (IUnknown *)0x0;
  local_1e0 = (longlong *)0x0;
  Ordinal_8(local_1c8);
  Ordinal_8(local_1b0);
  pIVar1 = local_1e8;
  if ((local_1e8 != (IUnknown *)0x0) && (local_1e8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_180 = 0;
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_1f8);
  if (HVar6 < 0) {
LAB_1400f0e0f:
    local_1e8 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_1f8);
    if (-1 < HVar6) {
      HVar6 = (*local_1f8->lpVtbl->QueryInterface)(local_1f8,(IID *)&DAT_140281f68,&local_1e8);
    }
    (*local_1f8->lpVtbl->Release)(local_1f8);
    if (HVar6 < 0) goto LAB_1400f0e0f;
  }
  local_198 = 2;
  uVar13 = 1;
  local_1d8 = 1;
  local_238[0] = '\x01';
  local_220 = *(undefined4 *)(param_2 + 1);
  local_228._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_228._0_4_ = CONCAT22(0x2358,(short)*param_2);
  plVar12 = (longlong *)0x0;
  uStack_21c = 0xb2;
  uStack_21a = 0;
  uVar11 = 0x10;
  local_234 = 0x10;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_210 = 0;
    UVar7 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_210 != 0) goto LAB_1400f0ff0;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_1e8;
    if (local_1e8 != (IUnknown *)0x0) {
      local_234 = 0;
      UVar7 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_1e8;
      if (local_234 != 0) {
        if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar7 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_1e8 != (IUnknown *)0x0) {
        (*local_1e8->lpVtbl->Release)(local_1e8);
        local_1e8 = (IUnknown *)0x0;
      }
    }
    local_180 = 0;
    local_178 = &DAT_140281f00;
    local_190 = &DAT_140281f00;
    local_188 = 0;
    local_198 = 0;
    Ordinal_9(local_1b0);
    Ordinal_9(local_1c8);
    if (local_1e0 != (longlong *)0x0) {
      (**(code **)(*local_1e0 + 0x10))();
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
    }
    if (local_218 != (longlong *)0x0) {
      (**(code **)(*local_218 + 0x10))();
    }
    return 0;
  }
LAB_1400f0ff0:
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_158);
  FUN_140001710(&local_218,*puVar8,"dbo.up_read_item_inventory");
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  local_1f0 = local_118;
  local_148 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_144 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_140 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_13c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_118,&local_148);
  plVar9 = operator_new(0x18);
  local_150 = (longlong *)0x0;
  local_160 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    local_150 = plVar9;
  }
  if (local_150 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_218,local_120,&local_150,0xca);
  local_1f0 = plVar9;
  if (local_218 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_218,&local_160);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar7 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar7 < 0) {
    _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_160 != (longlong *)0x0) {
    (**(code **)(*local_160 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  puVar8 = (undefined8 *)FUN_1400016d0(&local_218,&local_1f0);
  This = local_1e8;
  pIVar1 = (IUnknown *)*puVar8;
  if (local_1e8 != pIVar1) {
    local_1e8 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_1f0 != (longlong *)0x0) {
    (**(code **)(*local_1f0 + 0x10))();
  }
  pIVar1 = local_1e8;
  if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_22c = 0;
  UVar7 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
  if ((int)UVar7 < 0) {
    _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
  }
  if (local_22c != -1) {
    while( true ) {
      pIVar1 = local_1e8;
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_230 = 0;
      UVar7 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_230 == -1) break;
      local_f8.Data1 = 0;
      local_f8.Data2 = 0;
      local_f8.Data3 = 0;
      local_f8.Data4[0] = '\0';
      local_f8.Data4[1] = '\0';
      local_f8.Data4[2] = '\0';
      local_f8.Data4[3] = '\0';
      local_f8.Data4[4] = '\0';
      local_f8.Data4[5] = '\0';
      local_f8.Data4[6] = '\0';
      local_f8.Data4[7] = '\0';
      local_e8 = 0;
      local_e0 = 0;
      local_de = 0;
      local_d6 = 0;
      local_d4 = 0;
      local_cc = 0;
      local_c4 = 0;
      local_bc = 0;
      local_b8 = 0;
      local_b6 = 0;
      local_ae = 0;
      local_a6 = 0;
      local_9e = 0;
      local_9b = 0;
      local_8b = 0;
      local_89 = 0;
      local_81 = 0;
      local_79 = 0;
      local_71 = 0;
      local_69 = 0;
      local_39 = 0;
      local_93 = 0;
      local_9c = local_230 == -1;
      memset(local_61,0,0x28);
      cVar4 = FUN_1400a1f60(&local_1e8,&local_f8,local_238);
      if (cVar4 == '\0') break;
      riid = (char *)&local_f8;
      ppvObject = (char *)0xc0;
      memcpy((void *)((longlong)(int)uVar11 + 0x130 + (longlong)param_1),riid,0xc0);
      local_234 = uVar11 + 0xc0;
      uStack_21a = (short)plVar12 + 1;
      plVar12 = (longlong *)(ulonglong)uStack_21a;
      if (50000 < local_234) {
        uVar3 = local_228._2_6_;
        local_228 = CONCAT62(local_228._2_6_,(short)local_234);
        uVar2 = local_228;
        riid = (char *)(param_1 + 0x26);
        local_228._4_2_ = SUB62(uVar3,2);
        local_228._6_2_ = SUB62(uVar3,4);
        ((IID *)riid)->Data1 = (undefined4)local_228;
        ((IID *)riid)->Data2 = local_228._4_2_;
        ((IID *)riid)->Data3 = local_228._6_2_;
        param_1[0x27] = CONCAT26(uStack_21a,CONCAT24(uStack_21c,local_220));
        local_228 = uVar2;
        iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar5 == 0) {
          ppvObject = "DB Result Queue push error";
          riid = "DBResultQueue_Error.Log";
          FUN_1400a0b40(param_1[0x23]);
        }
        local_234 = 0x10;
        uStack_21a = 0;
        plVar12 = (longlong *)0x0;
      }
      pIVar1 = local_1e8;
      uVar11 = local_234;
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar6 = (*local_1e8->lpVtbl[0xc].QueryInterface)(local_1e8,(IID *)riid,(void **)ppvObject);
      if (HVar6 < 0) {
        _com_issue_errorex(HVar6,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_238[0] == '\0') {
      uStack_21c = 0xb3;
      uVar13 = 0;
    }
  }
  local_228 = CONCAT62(local_228._2_6_,(short)uVar11);
  param_1[0x26] = local_228;
  param_1[0x27] = CONCAT26(uStack_21a,CONCAT24(uStack_21c,local_220));
  iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
  if (iVar5 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar1 = local_1e8;
  if (local_1e8 != (IUnknown *)0x0) {
    local_20c = 0;
    UVar7 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
    }
    pIVar1 = local_1e8;
    if (local_20c != 0) {
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar7 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
      local_1e8 = (IUnknown *)0x0;
    }
  }
  local_180 = 0;
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_198 = 0;
  Ordinal_9(local_1b0);
  Ordinal_9(local_1c8);
  if (local_1e0 != (longlong *)0x0) {
    (**(code **)(*local_1e0 + 0x10))();
  }
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  if (local_218 != (longlong *)0x0) {
    (**(code **)(*local_218 + 0x10))();
  }
  return uVar13;
}



// WARNING: Removing unreachable block (ram,0x0001400f1972)
// WARNING: Removing unreachable block (ram,0x0001400f197b)
// WARNING: Removing unreachable block (ram,0x0001400f1986)
// WARNING: Removing unreachable block (ram,0x0001400f1996)
// WARNING: Removing unreachable block (ram,0x0001400f183a)
// WARNING: Removing unreachable block (ram,0x0001400f1843)
// WARNING: Removing unreachable block (ram,0x0001400f184e)
// WARNING: Removing unreachable block (ram,0x0001400f185e)

undefined8 FUN_1400f1650(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  int iVar3;
  HRESULT HVar4;
  ULONG UVar5;
  undefined8 uVar6;
  longlong *local_e8;
  LPUNKNOWN local_e0;
  undefined8 local_d8;
  undefined2 local_cc;
  IUnknown *local_c8;
  longlong *local_c0;
  undefined4 local_b8;
  undefined1 local_a8 [24];
  undefined1 local_90 [24];
  undefined4 local_78;
  undefined1 *local_70;
  undefined4 local_68;
  undefined8 local_60;
  undefined1 *local_58;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  local_e8 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_e8);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_c8 = (IUnknown *)0x0;
  local_c0 = (longlong *)0x0;
  Ordinal_8(local_a8);
  Ordinal_8(local_90);
  pIVar2 = local_c8;
  if ((local_c8 != (IUnknown *)0x0) && (local_c8 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_58 = &DAT_140281f00;
  local_70 = &DAT_140281f00;
  local_68 = 0;
  local_60 = 0;
  if (local_c8 != (IUnknown *)0x0) {
    (*local_c8->lpVtbl->Release)(local_c8);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,&local_e0
                          );
  if (-1 < HVar4) {
    HVar4 = OleRun(local_e0);
    if (-1 < HVar4) {
      HVar4 = (*local_e0->lpVtbl->QueryInterface)(local_e0,(IID *)&DAT_140281f68,&local_c8);
    }
    (*local_e0->lpVtbl->Release)(local_e0);
    if (-1 < HVar4) goto LAB_1400f176b;
  }
  local_c8 = (IUnknown *)0x0;
LAB_1400f176b:
  local_78 = 2;
  local_b8 = 1;
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_cc = *(undefined2 *)((longlong)param_2 + 0xc);
  local_d8._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_d8._0_4_ = CONCAT22(0x244b,(short)*param_2);
  pIVar2 = *(IUnknown **)*param_1;
  if ((pIVar2 != (IUnknown *)0x0) && (UVar5 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2), (int)UVar5 < 0)
     ) {
    _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f08);
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_c8;
    if (local_c8 != (IUnknown *)0x0) {
      UVar5 = (*local_c8->lpVtbl[0x12].AddRef)(local_c8);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_c8 != (IUnknown *)0x0) {
        (*local_c8->lpVtbl->Release)(local_c8);
        local_c8 = (IUnknown *)0x0;
      }
    }
    local_60 = 0;
    local_58 = &DAT_140281f00;
    local_70 = &DAT_140281f00;
    local_68 = 0;
    local_78 = 0;
    Ordinal_9(local_90);
    Ordinal_9(local_a8);
    if (local_c0 != (longlong *)0x0) {
      (**(code **)(*local_c0 + 0x10))();
    }
    if (local_c8 != (IUnknown *)0x0) {
      (*local_c8->lpVtbl->Release)(local_c8);
    }
    if (local_e8 != (longlong *)0x0) {
      (**(code **)(*local_e8 + 0x10))();
    }
    uVar6 = 0;
  }
  else {
    local_d8 = CONCAT62(local_d8._2_6_,0xe);
    param_1[0x26] = local_d8;
    *(undefined4 *)(param_1 + 0x27) = uVar1;
    *(undefined2 *)((longlong)param_1 + 0x13c) = 0xb9;
    iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar3 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar2 = local_c8;
    if (local_c8 != (IUnknown *)0x0) {
      UVar5 = (*local_c8->lpVtbl[0x12].AddRef)(local_c8);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_c8 != (IUnknown *)0x0) {
        (*local_c8->lpVtbl->Release)(local_c8);
        local_c8 = (IUnknown *)0x0;
      }
    }
    local_60 = 0;
    local_58 = &DAT_140281f00;
    local_70 = &DAT_140281f00;
    local_68 = 0;
    local_78 = 0;
    Ordinal_9(local_90);
    Ordinal_9(local_a8);
    if (local_c0 != (longlong *)0x0) {
      (**(code **)(*local_c0 + 0x10))();
    }
    if (local_c8 != (IUnknown *)0x0) {
      (*local_c8->lpVtbl->Release)(local_c8);
    }
    if (local_e8 != (longlong *)0x0) {
      (**(code **)(*local_e8 + 0x10))();
    }
    uVar6 = 1;
  }
  return uVar6;
}



// WARNING: Removing unreachable block (ram,0x0001400f1ccc)
// WARNING: Removing unreachable block (ram,0x0001400f1cd9)
// WARNING: Removing unreachable block (ram,0x0001400f1ce4)
// WARNING: Removing unreachable block (ram,0x0001400f1cf4)

undefined8 * FUN_1400f1a40(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  int iVar2;
  HRESULT HVar3;
  ULONG UVar4;
  int iVar5;
  undefined4 uVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  undefined8 uVar9;
  longlong *plVar10;
  IID *riid;
  char *ppvObject;
  longlong lVar11;
  char local_res10 [8];
  longlong *local_res18;
  undefined8 *local_res20;
  longlong *local_250;
  undefined2 local_248;
  undefined4 uStack_246;
  undefined2 uStack_242;
  undefined8 local_240;
  undefined8 local_238;
  undefined8 local_230;
  int local_228;
  undefined8 *local_220;
  undefined8 local_218;
  undefined4 local_210;
  undefined2 uStack_20c;
  undefined2 uStack_20a;
  undefined6 uStack_208;
  undefined2 uStack_202;
  undefined6 uStack_200;
  short local_1fa;
  LPUNKNOWN local_1f8 [2];
  IUnknown *local_1e8;
  longlong *local_1e0;
  undefined4 local_1d8;
  undefined1 local_1c8 [24];
  undefined1 local_1b0 [24];
  undefined4 local_198;
  undefined1 *local_190;
  undefined4 local_188;
  undefined8 local_180;
  undefined1 *local_178;
  longlong *local_168;
  longlong *local_160;
  undefined8 *local_158;
  longlong *local_150 [2];
  undefined1 local_140 [8];
  undefined4 local_138;
  undefined4 uStack_134;
  undefined4 uStack_130;
  undefined4 uStack_12c;
  undefined8 local_128;
  undefined1 local_118 [24];
  undefined1 local_100 [24];
  undefined1 local_e8 [24];
  undefined1 local_d0 [24];
  IID local_b8;
  undefined1 local_a0 [24];
  undefined1 local_88 [24];
  undefined1 local_70 [24];
  undefined1 local_58 [32];
  
  local_128 = 0xfffffffffffffffe;
  local_250 = (longlong *)0x0;
  local_220 = param_2;
  iVar2 = FUN_140001970(&local_250);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_1e8 = (IUnknown *)0x0;
  local_1e0 = (longlong *)0x0;
  Ordinal_8(local_1c8);
  Ordinal_8(local_1b0);
  pIVar1 = local_1e8;
  if ((local_1e8 != (IUnknown *)0x0) && (local_1e8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_180 = 0;
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  HVar3 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_1f8
                          );
  if (HVar3 < 0) {
LAB_1400f1b91:
    local_1e8 = (IUnknown *)0x0;
  }
  else {
    HVar3 = OleRun(local_1f8[0]);
    if (-1 < HVar3) {
      HVar3 = (*local_1f8[0]->lpVtbl->QueryInterface)(local_1f8[0],(IID *)&DAT_140281f68,&local_1e8)
      ;
    }
    (*local_1f8[0]->lpVtbl->Release)(local_1f8[0]);
    if (HVar3 < 0) goto LAB_1400f1b91;
  }
  local_198 = 2;
  local_1d8 = 1;
  local_res10[0] = '\x01';
  local_210 = *(undefined4 *)(param_2 + 1);
  local_218._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_218._0_4_ = CONCAT22(0x2398,(short)*param_2);
  uStack_20c = 0xb9;
  local_1fa = 0;
  uStack_20a = (undefined2)*(undefined8 *)((longlong)param_2 + 0xe);
  uStack_208 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0xe) >> 0x10);
  uStack_202 = (undefined2)*(undefined8 *)((longlong)param_2 + 0x16);
  uStack_200 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x16) >> 0x10);
  iVar2 = 0x20;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_228 = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_228 != 0) goto LAB_1400f1da3;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_1e8;
    if (local_1e8 != (IUnknown *)0x0) {
      UVar4 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_1e8 != (IUnknown *)0x0) {
        (*local_1e8->lpVtbl->Release)(local_1e8);
        local_1e8 = (IUnknown *)0x0;
      }
    }
    local_180 = 0;
    local_178 = &DAT_140281f00;
    local_190 = &DAT_140281f00;
    local_188 = 0;
    local_198 = 0;
    Ordinal_9(local_1b0);
    Ordinal_9(local_1c8);
    if (local_1e0 != (longlong *)0x0) {
      (**(code **)(*local_1e0 + 0x10))();
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
    }
    if (local_250 != (longlong *)0x0) {
      (**(code **)(*local_250 + 0x10))();
    }
    return (undefined8 *)0x0;
  }
LAB_1400f1da3:
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_168);
  FUN_140001710(&local_250,*puVar7,"dbo.up_read_item_equip_simple");
  if (local_168 != (longlong *)0x0) {
    (**(code **)(*local_168 + 0x10))();
  }
  local_res18 = (longlong *)&local_248;
  local_138 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_134 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_130 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_12c = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar8 = FUN_140062280(&local_248,&local_138);
  puVar7 = operator_new(0x18);
  local_158 = (undefined8 *)0x0;
  local_res20 = puVar7;
  if (puVar7 != (undefined8 *)0x0) {
    puVar7[1] = 0;
    *(undefined4 *)(puVar7 + 2) = 1;
    uVar9 = FUN_140201490("character_id");
    *puVar7 = uVar9;
    local_158 = puVar7;
  }
  if (local_158 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_250,local_140,&local_158,0xca,1,0x26,uVar8);
  local_res18 = plVar10;
  if (local_250 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_250,&local_160);
  pIVar1 = (IUnknown *)*puVar7;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_160 != (longlong *)0x0) {
      (**(code **)(*local_160 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    puVar7 = (undefined8 *)FUN_1400016d0(&local_250,local_150);
    This = local_1e8;
    pIVar1 = (IUnknown *)*puVar7;
    if (local_1e8 != pIVar1) {
      local_1e8 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_150[0] != (longlong *)0x0) {
      (**(code **)(*local_150[0] + 0x10))();
    }
    pIVar1 = local_1e8;
    if (local_1e8 != (IUnknown *)0x0) {
      local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffffffff0000);
      UVar4 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      puVar7 = (undefined8 *)0x1;
      if ((short)local_res18 != -1) {
        while( true ) {
          pIVar1 = local_1e8;
          if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          local_res20 = (undefined8 *)((ulonglong)local_res20 & 0xffffffffffff0000);
          UVar4 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
          if ((short)local_res20 == -1) break;
          local_248 = 0;
          uStack_246 = 0;
          uStack_242 = 0;
          local_240 = 0;
          local_238 = 0;
          local_230 = 0;
          uVar8 = FUN_140002290(&local_1e8,local_d0,"slot_index",local_res10);
          FUN_140182560(uVar8);
          local_248 = FUN_140062550(uVar8);
          Ordinal_9(local_d0);
          uVar8 = FUN_140002290(&local_1e8,local_88,&DAT_14028931c,local_res10);
          FUN_140182560(uVar8);
          uStack_246 = FUN_140062550(uVar8);
          Ordinal_9(local_88);
          uVar8 = FUN_140002290(&local_1e8,local_58,"option_1_code",local_res10);
          FUN_140182560(uVar8);
          uVar6 = FUN_140062550(uVar8);
          local_240 = CONCAT44(local_240._4_4_,uVar6);
          Ordinal_9(local_58);
          uVar8 = FUN_140002290(&local_1e8,local_a0,"option_1_value",local_res10);
          FUN_140182560(uVar8);
          uVar6 = FUN_140062550(uVar8);
          local_240 = CONCAT44(uVar6,(undefined4)local_240);
          Ordinal_9(local_a0);
          uVar8 = FUN_140002290(&local_1e8,local_118,"option_2_code",local_res10);
          FUN_140182560(uVar8);
          uVar6 = FUN_140062550(uVar8);
          local_238 = CONCAT44(local_238._4_4_,uVar6);
          Ordinal_9(local_118);
          uVar8 = FUN_140002290(&local_1e8,local_70,"option_2_value",local_res10);
          FUN_140182560(uVar8);
          uVar6 = FUN_140062550(uVar8);
          local_238 = CONCAT44(uVar6,(undefined4)local_238);
          Ordinal_9(local_70);
          uVar8 = FUN_140002290(&local_1e8,local_100,"option_3_code",local_res10);
          FUN_140182560(uVar8);
          uVar6 = FUN_140062550(uVar8);
          local_230 = CONCAT44(local_230._4_4_,uVar6);
          Ordinal_9(local_100);
          uVar8 = FUN_140002290(&local_1e8,local_e8,"option_3_value",local_res10);
          FUN_140182560(uVar8);
          uVar6 = FUN_140062550(uVar8);
          local_230 = CONCAT44(uVar6,(undefined4)local_230);
          Ordinal_9(local_e8);
          ppvObject = "enhance_level";
          riid = &local_b8;
          uVar8 = FUN_140002290(&local_1e8,riid,"enhance_level",local_res10);
          FUN_140182560(uVar8);
          uStack_242 = FUN_140062550(uVar8);
          Ordinal_9(&local_b8);
          pIVar1 = local_1e8;
          lVar11 = (longlong)iVar2;
          *(ulonglong *)(lVar11 + 0x130 + (longlong)param_1) =
               CONCAT26(uStack_242,CONCAT42(uStack_246,local_248));
          *(undefined8 *)(lVar11 + 0x138 + (longlong)param_1) = local_240;
          *(undefined8 *)(lVar11 + 0x140 + (longlong)param_1) = local_238;
          *(undefined8 *)(lVar11 + 0x148 + (longlong)param_1) = local_230;
          iVar2 = iVar2 + 0x20;
          local_1fa = local_1fa + 1;
          if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          HVar3 = (*local_1e8->lpVtbl[0xc].QueryInterface)(local_1e8,riid,(void **)ppvObject);
          if (HVar3 < 0) {
            _com_issue_errorex(HVar3,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_res10[0] == '\0') {
          uStack_20c = 0xba;
          puVar7 = (undefined8 *)0x0;
        }
      }
      local_218 = CONCAT62(local_218._2_6_,(short)iVar2);
      param_1[0x26] = local_218;
      param_1[0x27] = CONCAT26(uStack_20a,CONCAT24(uStack_20c,local_210));
      param_1[0x28] = CONCAT26(uStack_202,uStack_208);
      param_1[0x29] = CONCAT26(local_1fa,uStack_200);
      iVar2 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar2 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_1e8;
      if (local_1e8 != (IUnknown *)0x0) {
        local_220 = (undefined8 *)((ulonglong)local_220 & 0xffffffff00000000);
        UVar4 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_1e8;
        if ((int)local_220 != 0) {
          if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar4 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_1e8 != (IUnknown *)0x0) {
          (*local_1e8->lpVtbl->Release)(local_1e8);
          local_1e8 = (IUnknown *)0x0;
        }
      }
      local_180 = 0;
      local_178 = &DAT_140281f00;
      local_190 = &DAT_140281f00;
      local_188 = 0;
      local_198 = 0;
      Ordinal_9(local_1b0);
      Ordinal_9(local_1c8);
      if (local_1e0 != (longlong *)0x0) {
        (**(code **)(*local_1e0 + 0x10))();
      }
      if (local_1e8 != (IUnknown *)0x0) {
        (*local_1e8->lpVtbl->Release)(local_1e8);
      }
      if (local_250 != (longlong *)0x0) {
        (**(code **)(*local_250 + 0x10))();
      }
      return puVar7;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400f2b3c)
// WARNING: Removing unreachable block (ram,0x0001400f2b49)
// WARNING: Removing unreachable block (ram,0x0001400f2b54)
// WARNING: Removing unreachable block (ram,0x0001400f2b64)

undefined4 FUN_1400f2550(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  undefined6 uVar3;
  IUnknown *This;
  ULONG UVar4;
  int iVar5;
  HRESULT HVar6;
  undefined4 uVar7;
  undefined8 *puVar8;
  undefined8 uVar9;
  char *riid;
  char *ppvObject;
  uint uVar10;
  char local_res10 [8];
  short local_res18;
  short local_res20;
  undefined8 local_178;
  undefined2 uStack_16c;
  short sStack_16a;
  undefined4 uVar11;
  longlong *local_158;
  LPUNKNOWN local_150;
  undefined8 local_148;
  undefined4 local_140;
  undefined8 *local_138;
  IUnknown *local_128;
  longlong *local_120;
  undefined4 local_118;
  undefined1 local_108 [24];
  undefined1 local_f0 [24];
  undefined4 local_d8;
  undefined1 *local_d0;
  undefined4 local_c8;
  undefined8 local_c0;
  undefined1 *local_b8;
  longlong *local_a8;
  longlong *local_a0;
  undefined8 local_98;
  undefined1 local_80 [24];
  IID local_68;
  undefined1 local_50 [24];
  
  local_98 = 0xfffffffffffffffe;
  uVar11 = 1;
  pIVar2 = *(IUnknown **)*param_1;
  local_138 = param_2;
  if ((pIVar2 != (IUnknown *)0x0) && (UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2), (int)UVar4 < 0)
     ) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
  local_158 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_158);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_128 = (IUnknown *)0x0;
  local_120 = (longlong *)0x0;
  Ordinal_8(local_108);
  Ordinal_8(local_f0);
  pIVar2 = local_128;
  if ((local_128 != (IUnknown *)0x0) && (local_128 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_b8 = &DAT_140281f00;
  local_d0 = &DAT_140281f00;
  local_c8 = 0;
  local_c0 = 0;
  if (local_128 != (IUnknown *)0x0) {
    (*local_128->lpVtbl->Release)(local_128);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_150);
  if (HVar6 < 0) {
LAB_1400f2701:
    local_128 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_150);
    if (-1 < HVar6) {
      HVar6 = (*local_150->lpVtbl->QueryInterface)(local_150,(IID *)&DAT_140281f68,&local_128);
    }
    (*local_150->lpVtbl->Release)(local_150);
    if (HVar6 < 0) goto LAB_1400f2701;
  }
  local_d8 = 2;
  local_118 = 1;
  local_res10[0] = '\x01';
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_178 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x234f0000);
  uStack_16c = 0x73;
  sStack_16a = 0;
  uVar10 = 0x10;
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_a8);
  FUN_140001710(&local_158,*puVar8,"dbo.up_read_all_item_dropgroup");
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  puVar8 = (undefined8 *)FUN_1400016d0(&local_158,&local_a0);
  This = local_128;
  pIVar2 = (IUnknown *)*puVar8;
  if (local_128 != pIVar2) {
    local_128 = pIVar2;
    if (pIVar2 != (IUnknown *)0x0) {
      (*pIVar2->lpVtbl->AddRef)(pIVar2);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_a0 != (longlong *)0x0) {
    (**(code **)(*local_a0 + 0x10))();
  }
  pIVar2 = local_128;
  if (local_128 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_res18 = 0;
  UVar4 = (*local_128->lpVtbl[6].Release)(local_128);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
  }
  if (local_res18 == -1) {
    uStack_16c = 0x76;
  }
  else {
    while( true ) {
      pIVar2 = local_128;
      if (local_128 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_res20 = 0;
      UVar4 = (*local_128->lpVtbl[6].Release)(local_128);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_res20 == -1) break;
      local_148 = 0;
      local_140 = 0;
      uVar9 = FUN_140002290(&local_128,local_50,"dropgrouptype",local_res10);
      FUN_140182560(uVar9);
      uVar7 = FUN_140062550(uVar9);
      local_148 = CONCAT44(local_148._4_4_,uVar7);
      Ordinal_9(local_50);
      uVar9 = FUN_140002290(&local_128,local_80,"item_dropgroup_id",local_res10);
      FUN_140182560(uVar9);
      uVar7 = FUN_140062550(uVar9);
      local_148 = CONCAT44(uVar7,(undefined4)local_148);
      Ordinal_9(local_80);
      ppvObject = "item_range";
      riid = (char *)&local_68;
      uVar9 = FUN_140002290(&local_128,riid,"item_range",local_res10);
      FUN_140182560(uVar9);
      uVar7 = FUN_140062550(uVar9);
      Ordinal_9(&local_68);
      *(undefined8 *)((longlong)(int)uVar10 + 0x130 + (longlong)param_1) = local_148;
      *(undefined4 *)((longlong)(int)uVar10 + 0x138 + (longlong)param_1) = uVar7;
      uVar10 = uVar10 + 0xc;
      sStack_16a = sStack_16a + 1;
      if (50000 < uVar10) {
        uVar3 = local_178._2_6_;
        local_178 = CONCAT62(local_178._2_6_,(short)uVar10);
        uVar9 = local_178;
        riid = (char *)(param_1 + 0x26);
        local_178._4_2_ = SUB62(uVar3,2);
        local_178._6_2_ = SUB62(uVar3,4);
        ((IID *)riid)->Data1 = (undefined4)local_178;
        ((IID *)riid)->Data2 = local_178._4_2_;
        ((IID *)riid)->Data3 = local_178._6_2_;
        param_1[0x27] = CONCAT26(sStack_16a,CONCAT24(0x73,uVar1));
        iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar5 == 0) {
          ppvObject = "DB Result Queue push error";
          riid = "DBResultQueue_Error.Log";
          FUN_1400a0b40(param_1[0x23]);
        }
        uVar10 = 0x10;
        sStack_16a = 0;
        local_178 = uVar9;
      }
      pIVar2 = local_128;
      if (local_128 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar6 = (*local_128->lpVtbl[0xc].QueryInterface)(local_128,(IID *)riid,(void **)ppvObject);
      if (HVar6 < 0) {
        _com_issue_errorex(HVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_res10[0] != '\0') goto LAB_1400f2a91;
    uStack_16c = 0x74;
  }
  uVar11 = 0;
LAB_1400f2a91:
  local_178 = CONCAT62(local_178._2_6_,(short)uVar10);
  param_1[0x26] = local_178;
  param_1[0x27] = CONCAT26(sStack_16a,CONCAT24(uStack_16c,uVar1));
  iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
  if (iVar5 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar2 = local_128;
  if (local_128 != (IUnknown *)0x0) {
    UVar4 = (*local_128->lpVtbl[0x12].AddRef)(local_128);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
    }
    if (local_128 != (IUnknown *)0x0) {
      (*local_128->lpVtbl->Release)(local_128);
      local_128 = (IUnknown *)0x0;
    }
  }
  local_c0 = 0;
  local_b8 = &DAT_140281f00;
  local_d0 = &DAT_140281f00;
  local_c8 = 0;
  local_d8 = 0;
  Ordinal_9(local_f0);
  Ordinal_9(local_108);
  if (local_120 != (longlong *)0x0) {
    (**(code **)(*local_120 + 0x10))();
  }
  if (local_128 != (IUnknown *)0x0) {
    (*local_128->lpVtbl->Release)(local_128);
  }
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  return uVar11;
}



undefined8 FUN_1400f2c30(undefined8 *param_1,undefined8 *param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *local_res20;
  undefined4 local_1b8;
  undefined4 uStack_1b4;
  undefined4 local_1b0;
  undefined2 local_1ac;
  longlong *local_1a8;
  longlong *local_1a0;
  longlong *local_198;
  longlong *local_190;
  longlong *local_188;
  longlong *local_180;
  longlong *local_178;
  longlong *local_170;
  longlong *local_168;
  longlong *local_160;
  longlong *local_158;
  longlong *local_150;
  longlong *local_148;
  longlong *local_140;
  longlong *local_138;
  longlong *local_130;
  longlong *local_128;
  longlong *local_120;
  longlong *local_118;
  undefined1 local_110 [24];
  undefined1 local_f8 [24];
  undefined1 local_e0 [24];
  undefined1 local_c8 [24];
  undefined1 local_b0 [8];
  undefined8 local_a8;
  undefined4 local_98;
  undefined4 uStack_94;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined1 local_68 [24];
  undefined1 local_50 [32];
  
  local_a8 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if ((pIVar3 != (IUnknown *)0x0) && (UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3), (int)UVar4 < 0)
     ) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    uVar7 = 0;
  }
  else {
    local_res20 = (longlong *)0x0;
    iVar5 = FUN_140001970(&local_res20);
    if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_1b0 = *(undefined4 *)(param_2 + 1);
    _local_1b8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23310000);
    local_1ac = 0x96;
    _local_1b8 = CONCAT62(stack0xfffffffffffffe4a,0xe);
    puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_160);
    FUN_140001710(&local_res20,*puVar6,"dbo.up_create_item");
    if (local_160 != (longlong *)0x0) {
      (**(code **)(*local_160 + 0x10))();
    }
    local_88 = *(undefined4 *)((longlong)param_2 + 0xe);
    uStack_84 = *(undefined4 *)((longlong)param_2 + 0x12);
    uStack_80 = *(undefined4 *)((longlong)param_2 + 0x16);
    uStack_7c = *(undefined4 *)((longlong)param_2 + 0x1a);
    uVar7 = FUN_140062280(local_68,&local_88);
    plVar8 = operator_new(0x18);
    local_140 = plVar10;
    local_1a8 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("character_id");
      *plVar8 = lVar9;
      local_140 = plVar8;
    }
    if (local_140 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_1a0,&local_140,0xca,1,0x26,uVar7);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_120);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_120 != (longlong *)0x0) {
      (**(code **)(*local_120 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_98 = *(undefined4 *)((longlong)param_2 + 0x1e);
    uStack_94 = *(undefined4 *)((longlong)param_2 + 0x22);
    uStack_90 = *(undefined4 *)((longlong)param_2 + 0x26);
    uStack_8c = *(undefined4 *)((longlong)param_2 + 0x2a);
    uVar7 = FUN_140062280(local_50,&local_98);
    plVar8 = operator_new(0x18);
    local_190 = plVar10;
    local_1a0 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("auth_id");
      *plVar8 = lVar9;
      local_190 = plVar8;
    }
    if (local_190 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_158,&local_190,0xca,1,0x26,uVar7);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_168);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_168 != (longlong *)0x0) {
      (**(code **)(*local_168 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    sVar1 = *(short *)((longlong)param_2 + 0x44);
    Ordinal_8(local_e0);
    FUN_140062080(local_e0,(int)sVar1);
    plVar8 = operator_new(0x18);
    local_180 = plVar10;
    local_158 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("page_index");
      *plVar8 = lVar9;
      local_180 = plVar8;
    }
    if (local_180 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_198,&local_180,3,1,4,local_e0);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_138);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_138 != (longlong *)0x0) {
      (**(code **)(*local_138 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    sVar1 = *(short *)((longlong)param_2 + 0x46);
    Ordinal_8(local_f8);
    FUN_140062080(local_f8,(int)sVar1);
    plVar8 = operator_new(0x18);
    local_170 = plVar10;
    local_198 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("slot_index");
      *plVar8 = lVar9;
      local_170 = plVar8;
    }
    if (local_170 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_188,&local_170,3,1,4,local_f8);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_128);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_128 != (longlong *)0x0) {
      (**(code **)(*local_128 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    uVar2 = *(undefined4 *)(param_2 + 9);
    Ordinal_8(local_c8);
    FUN_140062080(local_c8,uVar2);
    plVar8 = operator_new(0x18);
    local_118 = plVar10;
    local_188 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490(&DAT_14028931c);
      *plVar8 = lVar9;
      local_118 = plVar8;
    }
    if (local_118 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_178,&local_118,3,1,4,local_c8);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_148);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_148 != (longlong *)0x0) {
      (**(code **)(*local_148 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    sVar1 = *(short *)((longlong)param_2 + 0x2e);
    Ordinal_8(local_110);
    FUN_140062080(local_110,(int)sVar1);
    plVar8 = operator_new(0x18);
    local_178 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("gcode");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_150 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,local_b0,&local_150,3,1,4,local_110);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_130);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_130 != (longlong *)0x0) {
      (**(code **)(*local_130 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    FUN_1400a2c10(&local_res20,param_2 + 6);
    FUN_1400016d0(&local_res20,&local_1a8);
    if (local_1a8 != (longlong *)0x0) {
      (**(code **)(*local_1a8 + 0x10))();
    }
    iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_1b8);
    if (iVar5 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    uVar7 = 1;
  }
  return uVar7;
}



undefined8 FUN_1400f3590(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f3628;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f3628:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_item_durability_update");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("durability");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400f3940(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  longlong *local_88;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [5];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar9 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f39d6;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f39d6:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_item_owner_update");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_78;
  local_88 = *(longlong **)(param_2 + 0xe);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_78,&local_88);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_a0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_98[0] = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x1e);
  uStack_74 = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar9;
  local_a0 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_88 = local_58;
    local_78 = *(undefined4 *)(param_2 + 0x2e);
    uStack_74 = *(undefined4 *)(param_2 + 0x32);
    uStack_70 = *(undefined4 *)(param_2 + 0x36);
    uStack_6c = *(undefined4 *)(param_2 + 0x3a);
    uVar5 = FUN_140062280(local_58,&local_78);
    plVar8 = operator_new(0x18);
    local_98[0] = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar7 = FUN_140201490("item_id");
      *plVar8 = lVar7;
      plVar9 = plVar8;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar5);
    local_88 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400f3e10(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f3ea6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f3ea6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_item_page_owner_update");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = local_58;
    local_88 = *(undefined4 *)(param_2 + 0x2e);
    uStack_84 = *(undefined4 *)(param_2 + 0x32);
    uStack_80 = *(undefined4 *)(param_2 + 0x36);
    uStack_7c = *(undefined4 *)(param_2 + 0x3a);
    uVar6 = FUN_140062280(local_58,&local_88);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      sVar1 = *(short *)(param_2 + 0x3e);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,(int)sVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("page_index");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_68 = (longlong *)&local_88;
        sVar1 = *(short *)(param_2 + 0x40);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,(int)sVar1);
        plVar9 = operator_new(0x18);
        local_98[0] = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("slot_index");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
        local_68 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400f4550(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f45e6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f45e6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_item_page_slot_update");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = local_58;
    local_88 = *(undefined4 *)(param_2 + 0x2e);
    uStack_84 = *(undefined4 *)(param_2 + 0x32);
    uStack_80 = *(undefined4 *)(param_2 + 0x36);
    uStack_7c = *(undefined4 *)(param_2 + 0x3a);
    uVar6 = FUN_140062280(local_58,&local_88);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      sVar1 = *(short *)(param_2 + 0x3e);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,(int)sVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("page_index");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_68 = (longlong *)&local_88;
        sVar1 = *(short *)(param_2 + 0x40);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,(int)sVar1);
        plVar9 = operator_new(0x18);
        local_98[0] = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("slot_index");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
        local_68 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400f4c90(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong local_80 [3];
  longlong *local_68;
  longlong *local_60;
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f4d26;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f4d26:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_item_update_itemcode_option");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_80;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_80,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_60 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = local_80;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_code");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_80);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_58 = local_80;
  uVar1 = *(undefined4 *)(param_2 + 0x22);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("opt_code01");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
  local_58 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_58 = local_80;
  uVar1 = *(undefined4 *)(param_2 + 0x26);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("opt_code02");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
  local_58 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_58 = local_80;
  uVar1 = *(undefined4 *)(param_2 + 0x2a);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("opt_code03");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
  local_58 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_58 = local_80;
  uVar1 = *(undefined4 *)(param_2 + 0x2e);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("opt_value01");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
  local_58 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_58 = local_80;
  uVar1 = *(undefined4 *)(param_2 + 0x32);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("opt_value02");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
  local_58 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_58 = local_80;
  uVar1 = *(undefined4 *)(param_2 + 0x36);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("opt_value03");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
  local_58 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_58 = local_80;
  uVar1 = *(undefined4 *)(param_2 + 0x3a);
  Ordinal_8(local_80);
  FUN_140062080(local_80,uVar1);
  plVar9 = operator_new(0x18);
  local_68 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar8 = FUN_140201490("opt_group");
    *plVar9 = lVar8;
    plVar10 = plVar9;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,3,1,4,local_80);
  local_58 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400f5850(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_48;
  longlong local_40 [4];
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f58e8;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f58e8:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_item_update");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = &local_78;
  local_88 = *(undefined4 *)(param_2 + 0xe);
  uStack_84 = *(undefined4 *)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_78,&local_88);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_98[0] = local_40;
  local_78._0_4_ = *(undefined4 *)(param_2 + 0x1e);
  local_78._4_4_ = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_78);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    FUN_1400a2c10(&local_res20,param_2 + 0x2e);
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400f5c10(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f5ca3;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f5ca3:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_remaintime_item");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1400f5e90(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f5f26;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f5f26:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_item_move_cash_to_equip_costumepack");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140062280(&local_88,&local_68);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_a0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("character_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar7);
  local_a0 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar7 = FUN_140062280(local_58,&local_88);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_a0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("auth_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar7);
  local_98[0] = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x32);
  uStack_84 = *(undefined4 *)(param_2 + 0x36);
  uStack_80 = *(undefined4 *)(param_2 + 0x3a);
  uStack_7c = *(undefined4 *)(param_2 + 0x3e);
  uVar7 = FUN_140062280(local_58,&local_88);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_98[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("item_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar7);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  sVar1 = *(short *)(param_2 + 0x2e);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_98[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("page_index");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  sVar1 = *(short *)(param_2 + 0x30);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_98[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("slot_index");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    uVar2 = *(undefined4 *)(param_2 + 0x42);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar2);
    plVar10 = operator_new(0x18);
    local_98[0] = plVar10;
    if (plVar10 != (longlong *)0x0) {
      plVar10[1] = 0;
      *(undefined4 *)(plVar10 + 2) = 1;
      lVar9 = FUN_140201490("itemCode");
      *plVar10 = lVar9;
      plVar11 = plVar10;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400f66f0(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f6786;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f6786:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_item_move_cash_to_equip");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = local_58;
    local_88 = *(undefined4 *)(param_2 + 0x32);
    uStack_84 = *(undefined4 *)(param_2 + 0x36);
    uStack_80 = *(undefined4 *)(param_2 + 0x3a);
    uStack_7c = *(undefined4 *)(param_2 + 0x3e);
    uVar6 = FUN_140062280(local_58,&local_88);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      sVar1 = *(short *)(param_2 + 0x2e);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,(int)sVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("page_index");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_68 = (longlong *)&local_88;
        sVar1 = *(short *)(param_2 + 0x30);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,(int)sVar1);
        plVar9 = operator_new(0x18);
        local_98[0] = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("slot_index");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
        local_68 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400f6e30(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f6ec6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f6ec6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_item_move_inventory_to_equip");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = local_58;
    local_88 = *(undefined4 *)(param_2 + 0x32);
    uStack_84 = *(undefined4 *)(param_2 + 0x36);
    uStack_80 = *(undefined4 *)(param_2 + 0x3a);
    uStack_7c = *(undefined4 *)(param_2 + 0x3e);
    uVar6 = FUN_140062280(local_58,&local_88);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      sVar1 = *(short *)(param_2 + 0x2e);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,(int)sVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("page_index");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_68 = (longlong *)&local_88;
        sVar1 = *(short *)(param_2 + 0x30);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,(int)sVar1);
        plVar9 = operator_new(0x18);
        local_98[0] = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("slot_index");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
        local_68 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400f7570(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f7606;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f7606:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_item_move_equip_to_inventory");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = local_58;
    local_88 = *(undefined4 *)(param_2 + 0x32);
    uStack_84 = *(undefined4 *)(param_2 + 0x36);
    uStack_80 = *(undefined4 *)(param_2 + 0x3a);
    uStack_7c = *(undefined4 *)(param_2 + 0x3e);
    uVar6 = FUN_140062280(local_58,&local_88);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      sVar1 = *(short *)(param_2 + 0x2e);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,(int)sVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("page_index");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_68 = (longlong *)&local_88;
        sVar1 = *(short *)(param_2 + 0x30);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,(int)sVar1);
        plVar9 = operator_new(0x18);
        local_98[0] = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("slot_index");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
        local_68 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400f7cb0(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f7d46;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f7d46:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_item_move_equip_to_cash");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = local_58;
    local_88 = *(undefined4 *)(param_2 + 0x32);
    uStack_84 = *(undefined4 *)(param_2 + 0x36);
    uStack_80 = *(undefined4 *)(param_2 + 0x3a);
    uStack_7c = *(undefined4 *)(param_2 + 0x3e);
    uVar6 = FUN_140062280(local_58,&local_88);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      sVar1 = *(short *)(param_2 + 0x2e);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,(int)sVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("page_index");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_68 = (longlong *)&local_88;
        sVar1 = *(short *)(param_2 + 0x30);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,(int)sVar1);
        plVar9 = operator_new(0x18);
        local_98[0] = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("slot_index");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
        local_68 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400f83f0(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400f8486;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f8486:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_upate_item_binds");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_40;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_40,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    sVar1 = *(short *)(param_2 + 0x2e);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,(int)sVar1);
    plVar9 = operator_new(0x18);
    local_98[0] = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("binds");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_1400f88d0(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  undefined6 uVar4;
  IUnknown *This;
  int iVar5;
  HRESULT HVar6;
  ULONG UVar7;
  undefined4 uVar8;
  undefined8 *puVar9;
  wchar_t *pwVar10;
  longlong lVar11;
  longlong *plVar12;
  undefined8 uVar13;
  undefined8 uVar14;
  wchar_t *pwVar15;
  char *riid;
  uint uVar16;
  char *ppvObject;
  wchar_t *pwVar17;
  wchar_t *pwVar18;
  undefined1 auStackY_328 [32];
  char local_2e8 [4];
  uint local_2e4;
  short local_2e0;
  short local_2dc;
  longlong *local_2d8;
  int local_2d0;
  int local_2cc;
  undefined4 uVar19;
  undefined8 local_2c0;
  undefined2 uStack_2b4;
  ushort local_2a2;
  wchar_t *local_2a0;
  LPUNKNOWN local_298;
  longlong *local_290;
  IUnknown *local_288;
  longlong *local_280;
  undefined4 local_278;
  undefined1 local_268 [24];
  undefined1 local_250 [24];
  undefined4 local_238;
  undefined1 *local_230;
  undefined4 local_228;
  undefined8 local_220;
  undefined1 *local_218;
  undefined8 *local_208;
  wchar_t *local_200;
  undefined8 *local_1f8;
  undefined8 local_1f0;
  undefined1 local_1e8;
  undefined8 local_1e0;
  undefined1 local_1d8;
  longlong *local_1d0;
  undefined8 local_1c8;
  undefined1 local_1c0;
  undefined8 local_1b8;
  undefined1 local_1b0;
  wchar_t *local_1a8 [2];
  undefined4 local_198;
  undefined4 uStack_194;
  undefined4 uStack_190;
  undefined4 uStack_18c;
  undefined4 local_188;
  undefined4 uStack_184;
  undefined4 uStack_180;
  undefined4 uStack_17c;
  undefined4 local_178;
  undefined4 uStack_174;
  undefined4 uStack_170;
  undefined4 uStack_16c;
  undefined1 local_168 [16];
  undefined8 local_158;
  undefined1 local_150 [24];
  undefined1 local_138 [24];
  IID local_120;
  undefined1 local_108 [24];
  undefined1 local_f0 [24];
  longlong local_d8 [3];
  undefined1 local_c0 [24];
  undefined1 local_a8 [32];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_68;
  undefined8 uStack_60;
  undefined8 local_58;
  undefined8 uStack_50;
  undefined8 local_48;
  undefined8 uStack_40;
  ulonglong local_38;
  
  local_158 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_328;
  pwVar17 = (wchar_t *)0x0;
  local_2d8 = (longlong *)0x0;
  local_208 = param_1;
  local_1f8 = param_2;
  iVar5 = FUN_140001970(&local_2d8);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_288 = (IUnknown *)0x0;
  local_280 = (longlong *)0x0;
  Ordinal_8(local_268);
  Ordinal_8(local_250);
  pIVar3 = local_288;
  if ((local_288 != (IUnknown *)0x0) && (local_288 = (IUnknown *)0x0, pIVar3 != (IUnknown *)0x0)) {
    (*pIVar3->lpVtbl->Release)(pIVar3);
  }
  local_218 = &DAT_140281f00;
  local_230 = &DAT_140281f00;
  local_228 = 0;
  local_220 = 0;
  if (local_288 != (IUnknown *)0x0) {
    (*local_288->lpVtbl->Release)(local_288);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_298);
  if (HVar6 < 0) {
LAB_1400f8a44:
    local_288 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_298);
    if (-1 < HVar6) {
      HVar6 = (*local_298->lpVtbl->QueryInterface)(local_298,(IID *)&DAT_140281f68,&local_288);
    }
    (*local_298->lpVtbl->Release)(local_298);
    if (HVar6 < 0) goto LAB_1400f8a44;
  }
  local_238 = 2;
  uVar19 = 1;
  local_278 = 1;
  local_2e8[0] = '\x01';
  pwVar18 = (wchar_t *)0x0;
  local_2a2 = 0;
  uVar2 = *(undefined4 *)(param_2 + 1);
  local_2c0 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23f20000);
  uStack_2b4 = 0x115;
  uVar16 = 0x20;
  local_2e4 = 0x20;
  pIVar3 = *(IUnknown **)*param_1;
  if (pIVar3 != (IUnknown *)0x0) {
    local_2cc = 0;
    UVar7 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if (local_2cc != 0) goto LAB_1400f8c4c;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar3 = local_288;
    if (local_288 != (IUnknown *)0x0) {
      local_2e4 = 0;
      UVar7 = (*local_288->lpVtbl[0x12].AddRef)(local_288);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f28);
      }
      pIVar3 = local_288;
      if (local_2e4 != 0) {
        if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar7 = (*local_288->lpVtbl[10].Release)(local_288);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_288 != (IUnknown *)0x0) {
        (*local_288->lpVtbl->Release)(local_288);
        local_288 = (IUnknown *)0x0;
      }
    }
    local_220 = 0;
    local_218 = &DAT_140281f00;
    local_230 = &DAT_140281f00;
    local_228 = 0;
    local_238 = 0;
    Ordinal_9(local_250);
    Ordinal_9(local_268);
    if (local_280 != (longlong *)0x0) {
      (**(code **)(*local_280 + 0x10))();
    }
    if (local_288 != (IUnknown *)0x0) {
      (*local_288->lpVtbl->Release)(local_288);
    }
    if (local_2d8 != (longlong *)0x0) {
      (**(code **)(*local_2d8 + 0x10))();
    }
    return 0;
  }
LAB_1400f8c4c:
  puVar9 = (undefined8 *)FUN_140001f20(*param_1,&local_1d0);
  FUN_140001710(&local_2d8,*puVar9,"dbo.up_read_cash_product_list");
  if (local_1d0 != (longlong *)0x0) {
    (**(code **)(*local_1d0 + 0x10))();
  }
  local_290 = local_d8;
  local_178 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_174 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_170 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_16c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_d8,&local_178);
  pwVar10 = operator_new(0x18);
  local_1a8[0] = pwVar17;
  local_200 = pwVar10;
  if (pwVar10 != (wchar_t *)0x0) {
    pwVar10[4] = L'\0';
    pwVar10[5] = L'\0';
    pwVar10[6] = L'\0';
    pwVar10[7] = L'\0';
    pwVar10[8] = L'\x01';
    pwVar10[9] = L'\0';
    lVar11 = FUN_140201490("auth_id");
    *(longlong *)pwVar10 = lVar11;
    local_1a8[0] = pwVar10;
  }
  if (local_1a8[0] == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_2d8,local_168,local_1a8,0xca);
  local_290 = plVar12;
  if (local_2d8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_2d8,&local_200);
  pIVar3 = (IUnknown *)*puVar9;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar7 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_200 != (wchar_t *)0x0) {
      (**(code **)(*(longlong *)local_200 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    puVar9 = (undefined8 *)FUN_1400016d0(&local_2d8,&local_290);
    This = local_288;
    pIVar3 = (IUnknown *)*puVar9;
    if (local_288 != pIVar3) {
      local_288 = pIVar3;
      if (pIVar3 != (IUnknown *)0x0) {
        (*pIVar3->lpVtbl->AddRef)(pIVar3);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_290 != (longlong *)0x0) {
      (**(code **)(*local_290 + 0x10))();
    }
    pIVar3 = local_288;
    if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_2dc = 0;
    UVar7 = (*local_288->lpVtbl[6].Release)(local_288);
    if ((int)UVar7 < 0) {
      _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f28);
    }
    if (local_2dc != -1) {
      while( true ) {
        pIVar3 = local_288;
        if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_2e0 = 0;
        UVar7 = (*local_288->lpVtbl[6].Release)(local_288);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f28);
        }
        if (local_2e0 == -1) break;
        local_88 = 0;
        uStack_84 = 0;
        uStack_80 = 0;
        uStack_7c = 0;
        local_78 = 0;
        uStack_74 = 0;
        uStack_70 = 0;
        uStack_6c = 0;
        local_68 = 0;
        uStack_60 = 0;
        local_58 = 0;
        uStack_50 = 0;
        local_48 = 0;
        uStack_40 = 0;
        uVar13 = FUN_140002290(&local_288,local_f0,"ProductID",local_2e8);
        FUN_1400625d0(uVar13,&local_198);
        local_88 = local_198;
        uStack_84 = uStack_194;
        uStack_80 = uStack_190;
        uStack_7c = uStack_18c;
        Ordinal_9(local_f0);
        uVar13 = FUN_140002290(&local_288,local_c0,"AuthID",local_2e8);
        FUN_1400625d0(uVar13,&local_188);
        local_78 = local_188;
        uStack_74 = uStack_184;
        uStack_70 = uStack_180;
        uStack_6c = uStack_17c;
        Ordinal_9(local_c0);
        uVar13 = FUN_140002290(&local_288,local_150,"CashCode",local_2e8);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_68 = CONCAT44(local_68._4_4_,uVar8);
        Ordinal_9(local_150);
        uVar13 = FUN_140002290(&local_288,local_108,"GiveCharName",local_2e8);
        FUN_140062840(uVar13,&local_2a0);
        FUN_1401568c0();
        pwVar10 = (wchar_t *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          pwVar10 = pwVar17;
        }
        if (local_2a0 != (wchar_t *)PTR_DAT_1403200a0) {
          uVar13 = FUN_1401568c0();
          local_1b0 = 0;
          local_1b8 = uVar13;
          FUN_140156b50(uVar13);
          local_1b0 = 1;
          if (((pwVar10 != (wchar_t *)0x0) && (pwVar10 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar10 + -4 != (wchar_t *)0x0)) {
            uVar14 = FUN_1401568c0();
            local_1e8 = 0;
            local_1f0 = uVar14;
            FUN_140156b50(uVar14);
            local_1e8 = 1;
            pwVar15 = pwVar10 + -2;
            *(int *)pwVar15 = *(int *)pwVar15 + -1;
            if (*(int *)pwVar15 == 0) {
              FUN_140156970(pwVar10 + -4);
            }
            FUN_140156be0(uVar14);
            local_1e8 = 0;
          }
          pwVar10 = local_2a0;
          if (((local_2a0 != (wchar_t *)PTR_DAT_1403200a0) && (local_2a0 != (wchar_t *)0x0)) &&
             (local_2a0 != (wchar_t *)0x8)) {
            *(int *)(local_2a0 + -2) = *(int *)(local_2a0 + -2) + 1;
          }
          FUN_140156be0(uVar13);
          local_1b0 = 0;
          uVar16 = local_2e4;
        }
        pwVar15 = pwVar10;
        if (pwVar10 == (wchar_t *)0x0) {
          pwVar15 = (wchar_t *)PTR_DAT_1403200a0;
        }
        wcsncpy((wchar_t *)&local_58,pwVar15,0xf);
        if (((pwVar10 != (wchar_t *)0x0) && (pwVar10 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar10 + -4 != (wchar_t *)0x0)) {
          uVar13 = FUN_1401568c0();
          local_1d8 = 0;
          local_1e0 = uVar13;
          FUN_140156b50(uVar13);
          local_1d8 = 1;
          pwVar15 = pwVar10 + -2;
          *(int *)pwVar15 = *(int *)pwVar15 + -1;
          if (*(int *)pwVar15 == 0) {
            FUN_140156970(pwVar10 + -4);
          }
          FUN_140156be0(uVar13);
          local_1d8 = 0;
        }
        pwVar10 = local_2a0;
        if (((local_2a0 != (wchar_t *)0x0) && (local_2a0 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar15 = local_2a0 + -4, pwVar15 != (wchar_t *)0x0)) {
          uVar13 = FUN_1401568c0();
          local_1c0 = 0;
          local_1c8 = uVar13;
          FUN_140156b50(uVar13);
          local_1c0 = 1;
          pwVar10 = pwVar10 + -2;
          *(int *)pwVar10 = *(int *)pwVar10 + -1;
          if (*(int *)pwVar10 == 0) {
            FUN_140156970(pwVar15);
          }
          FUN_140156be0(uVar13);
          local_1c0 = 0;
        }
        local_2a0 = (wchar_t *)PTR_DAT_1403200a0;
        Ordinal_9(local_108);
        uStack_40 = uStack_40 & 0xffffffffffff;
        uVar13 = FUN_140002290(&local_288,local_a8,"AddOpt1",local_2e8);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        local_68 = CONCAT44(uVar8,(undefined4)local_68);
        Ordinal_9(local_a8);
        uVar13 = FUN_140002290(&local_288,local_138,"AddOpt2",local_2e8);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        uStack_60 = CONCAT44(uStack_60._4_4_,uVar8);
        Ordinal_9(local_138);
        ppvObject = "AddOpt3";
        riid = (char *)&local_120;
        uVar13 = FUN_140002290(&local_288,riid,"AddOpt3",local_2e8);
        FUN_140182560(uVar13);
        uVar8 = FUN_140062550(uVar13);
        uStack_60 = CONCAT44(uVar8,(undefined4)uStack_60);
        Ordinal_9(&local_120);
        lVar11 = (longlong)(int)uVar16;
        puVar9 = (undefined8 *)(lVar11 + 0x130 + (longlong)param_1);
        *puVar9 = CONCAT44(uStack_84,local_88);
        puVar9[1] = CONCAT44(uStack_7c,uStack_80);
        puVar9 = (undefined8 *)(lVar11 + 0x140 + (longlong)param_1);
        *puVar9 = CONCAT44(uStack_74,local_78);
        puVar9[1] = CONCAT44(uStack_6c,uStack_70);
        puVar9 = (undefined8 *)(lVar11 + 0x150 + (longlong)param_1);
        *puVar9 = local_68;
        puVar9[1] = uStack_60;
        puVar1 = (undefined4 *)(lVar11 + 0x160 + (longlong)param_1);
        *puVar1 = (undefined4)local_58;
        puVar1[1] = local_58._4_4_;
        puVar1[2] = (undefined4)uStack_50;
        puVar1[3] = uStack_50._4_4_;
        puVar1 = (undefined4 *)(lVar11 + 0x170 + (longlong)param_1);
        *puVar1 = (undefined4)local_48;
        puVar1[1] = local_48._4_4_;
        puVar1[2] = (undefined4)uStack_40;
        puVar1[3] = uStack_40._4_4_;
        local_2e4 = uVar16 + 0x50;
        local_2a2 = (short)pwVar18 + 1;
        pwVar18 = (wchar_t *)(ulonglong)local_2a2;
        if (50000 < local_2e4) {
          uVar4 = local_2c0._2_6_;
          local_2c0 = CONCAT62(local_2c0._2_6_,(short)local_2e4);
          uVar13 = local_2c0;
          riid = (char *)(param_1 + 0x26);
          local_2c0._4_2_ = SUB62(uVar4,2);
          local_2c0._6_2_ = SUB62(uVar4,4);
          ((IID *)riid)->Data1 = (undefined4)local_2c0;
          ((IID *)riid)->Data2 = local_2c0._4_2_;
          ((IID *)riid)->Data3 = local_2c0._6_2_;
          param_1[0x27] = (ulonglong)CONCAT24(0x115,uVar2);
          param_1[0x28] = 0;
          param_1[0x29] = (ulonglong)local_2a2 << 0x30;
          iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
          if (iVar5 == 0) {
            ppvObject = "DB Result Queue push error";
            riid = "DBResultQueue_Error.Log";
            FUN_1400a0b40(param_1[0x23]);
          }
          local_2e4 = 0x20;
          local_2a2 = 0;
          pwVar18 = pwVar17;
          local_2c0 = uVar13;
        }
        pIVar3 = local_288;
        uVar16 = local_2e4;
        if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar6 = (*local_288->lpVtbl[0xc].QueryInterface)(local_288,(IID *)riid,(void **)ppvObject);
        if (HVar6 < 0) {
          _com_issue_errorex(HVar6,pIVar3,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_2e8[0] == '\0') {
        uStack_2b4 = 0x117;
        uVar19 = 0;
      }
    }
    local_2c0 = CONCAT62(local_2c0._2_6_,(short)uVar16);
    param_1[0x26] = local_2c0;
    param_1[0x27] = (ulonglong)CONCAT24(uStack_2b4,uVar2);
    param_1[0x28] = 0;
    param_1[0x29] = (ulonglong)local_2a2 << 0x30;
    iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar5 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar3 = local_288;
    if (local_288 != (IUnknown *)0x0) {
      local_2d0 = 0;
      UVar7 = (*local_288->lpVtbl[0x12].AddRef)(local_288);
      if ((int)UVar7 < 0) {
        _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f28);
      }
      pIVar3 = local_288;
      if (local_2d0 != 0) {
        if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar7 = (*local_288->lpVtbl[10].Release)(local_288);
        if ((int)UVar7 < 0) {
          _com_issue_errorex(UVar7,pIVar3,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_288 != (IUnknown *)0x0) {
        (*local_288->lpVtbl->Release)(local_288);
        local_288 = (IUnknown *)0x0;
      }
    }
    local_220 = 0;
    local_218 = &DAT_140281f00;
    local_230 = &DAT_140281f00;
    local_228 = 0;
    local_238 = 0;
    Ordinal_9(local_250);
    Ordinal_9(local_268);
    if (local_280 != (longlong *)0x0) {
      (**(code **)(*local_280 + 0x10))();
    }
    if (local_288 != (IUnknown *)0x0) {
      (*local_288->lpVtbl->Release)(local_288);
    }
    if (local_2d8 != (longlong *)0x0) {
      (**(code **)(*local_2d8 + 0x10))();
    }
    return uVar19;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_1400f9610(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 *puVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  int iVar5;
  HRESULT HVar6;
  int iVar7;
  undefined8 *puVar8;
  undefined8 *puVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  longlong *plVar12;
  longlong lVar13;
  undefined8 **ppvObject;
  undefined8 *puVar14;
  undefined1 auStack_2c8 [32];
  undefined4 local_2a8;
  undefined8 local_2a0;
  short *local_298;
  IUnknown *local_288;
  longlong *local_280;
  uint local_278;
  undefined8 **local_270;
  undefined4 local_268;
  undefined8 *local_260;
  undefined8 *local_258;
  undefined8 *local_250;
  short local_248 [4];
  int local_240;
  short local_230 [4];
  int local_228;
  short local_218 [4];
  int local_210;
  short local_200 [4];
  int local_1f8;
  undefined8 *local_1e8;
  longlong *local_1e0;
  undefined8 *local_1d8;
  longlong *local_1d0;
  longlong *local_1c8;
  undefined8 *local_1c0;
  longlong *local_1b8;
  undefined8 *local_1b0;
  undefined8 *local_1a8;
  undefined8 *local_1a0;
  longlong *local_198;
  longlong *local_190;
  undefined8 *local_188;
  longlong *local_180;
  undefined8 *local_178;
  longlong *local_170;
  longlong *local_168;
  longlong *local_160;
  undefined8 *local_158;
  undefined1 local_150 [8];
  undefined1 local_148 [8];
  undefined1 local_140 [8];
  undefined1 local_138 [8];
  undefined1 local_130 [8];
  undefined1 local_128 [16];
  undefined8 local_118;
  undefined4 local_108;
  undefined4 uStack_104;
  undefined4 uStack_100;
  undefined4 uStack_fc;
  undefined1 local_f8 [16];
  undefined1 local_e8 [16];
  undefined4 local_d8;
  undefined4 uStack_d4;
  undefined4 uStack_d0;
  undefined4 uStack_cc;
  undefined1 local_c8 [24];
  undefined1 local_b0 [24];
  undefined1 local_98 [24];
  undefined1 local_80 [24];
  undefined8 local_68;
  undefined4 local_60;
  undefined2 uStack_5c;
  wchar_t wStack_5a;
  undefined6 uStack_58;
  undefined2 uStack_52;
  undefined6 uStack_50;
  undefined2 local_4a;
  undefined6 uStack_48;
  undefined2 local_42;
  undefined4 uStack_40;
  undefined2 uStack_3c;
  undefined1 local_3a;
  ulonglong local_38;
  
  local_118 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_2c8;
  local_268 = 1;
  wStack_5a = L'\0';
  uStack_58 = 0;
  uStack_52 = 0;
  uStack_50 = 0;
  local_4a = 0;
  uStack_48 = 0;
  local_42 = 0;
  uStack_40 = 0;
  uStack_3c = 0;
  local_60 = *(undefined4 *)(param_2 + 1);
  local_68 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23f30000);
  uStack_5c = 0x115;
  local_3a = 0;
  local_68 = CONCAT62(local_68._2_6_,0x2f);
  ppvObject = (undefined8 **)0xf;
  local_260 = param_2;
  local_258 = param_1;
  local_250 = param_1;
  if (*(wchar_t *)(param_2[8] + 0x24) == L'\0') {
    wcsncpy(&wStack_5a,(wchar_t *)((longlong)param_2 + 0x1e),0xf);
  }
  else {
    wcsncpy(&wStack_5a,(wchar_t *)(param_2[8] + 0x24),0xf);
    local_3a = 1;
  }
  puVar14 = (undefined8 *)0x0;
  uStack_3c = 0;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_278 = 0;
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      ppvObject = (undefined8 **)&DAT_140281f08;
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_278 != 0) goto LAB_1400f9764;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    if ((void *)param_2[8] != (void *)0x0) {
      operator_delete__((void *)param_2[8]);
      param_2[8] = 0;
    }
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400f9764:
  local_278 = 0;
  puVar8 = puVar14;
  while( true ) {
    iVar4 = (int)puVar8;
    if (*(short *)((longlong)param_2 + 0x3e) <= iVar4) {
      if ((void *)param_2[8] != (void *)0x0) {
        operator_delete__((void *)param_2[8]);
        param_2[8] = 0;
      }
      param_1[0x26] = local_68;
      param_1[0x27] = CONCAT26(wStack_5a,CONCAT24(uStack_5c,local_60));
      param_1[0x28] = CONCAT26(uStack_52,uStack_58);
      param_1[0x29] = CONCAT26(local_4a,uStack_50);
      param_1[0x2a] = CONCAT26(local_42,uStack_48);
      *(undefined4 *)(param_1 + 0x2b) = uStack_40;
      *(undefined2 *)((longlong)param_1 + 0x15c) = uStack_3c;
      *(undefined1 *)((longlong)param_1 + 0x15e) = local_3a;
      iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar4 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      return local_268;
    }
    local_288 = (IUnknown *)0x0;
    iVar5 = FUN_140001970(&local_288);
    if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_1b8);
    pIVar2 = local_288;
    if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    HVar6 = (*local_288->lpVtbl[3].QueryInterface)(local_288,(IID *)*puVar8,ppvObject);
    if (HVar6 < 0) {
      _com_issue_errorex(HVar6,pIVar2,(_GUID *)&DAT_140281ee0);
    }
    local_270 = &local_1e8;
    puVar9 = operator_new(0x18);
    puVar8 = puVar14;
    local_280 = puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar10 = FUN_140201490("dbo.up_insert_cash_product_list");
      *puVar9 = uVar10;
      puVar8 = puVar9;
    }
    local_1e8 = puVar8;
    if (puVar8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    FUN_140001420(local_288,&local_1e8);
    pIVar2 = local_288;
    if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*local_288->lpVtbl[6].Release)(local_288);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281ee0);
    }
    if (local_1b8 != (longlong *)0x0) {
      (**(code **)(*local_1b8 + 0x10))();
    }
    local_280 = (longlong *)local_c8;
    uVar10 = FUN_1400623f0(local_c8,(longlong)param_2 + 0x1e);
    puVar9 = operator_new(0x18);
    puVar8 = puVar14;
    local_270 = (undefined8 **)puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar11 = FUN_140201490("GiveCharName");
      *puVar9 = uVar11;
      puVar8 = puVar9;
    }
    local_1a8 = puVar8;
    if (puVar8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_2a0 = 0x10;
    local_2a8 = 1;
    local_298 = (short *)uVar10;
    plVar12 = (longlong *)FUN_140001880(&local_288,local_148,&local_1a8,0xca);
    local_280 = plVar12;
    if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_288,&local_198);
    pIVar2 = (IUnknown *)*puVar8;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_198 != (longlong *)0x0) {
      (**(code **)(*local_198 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    local_280 = (longlong *)local_80;
    lVar13 = (longlong)iVar4 * 0x44;
    puVar1 = (undefined4 *)(lVar13 + param_2[8]);
    local_108 = *puVar1;
    uStack_104 = puVar1[1];
    uStack_100 = puVar1[2];
    uStack_fc = puVar1[3];
    uVar10 = FUN_140062280(local_80,&local_108);
    puVar9 = operator_new(0x18);
    puVar8 = puVar14;
    local_270 = (undefined8 **)puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar11 = FUN_140201490("ProductID");
      *puVar9 = uVar11;
      puVar8 = puVar9;
    }
    local_178 = puVar8;
    if (puVar8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_2a0 = 0x26;
    local_2a8 = 1;
    local_298 = (short *)uVar10;
    plVar12 = (longlong *)FUN_140001880(&local_288,local_138,&local_178,0xca);
    local_280 = plVar12;
    if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_288,&local_168);
    pIVar2 = (IUnknown *)*puVar8;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_168 != (longlong *)0x0) {
      (**(code **)(*local_168 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    local_280 = (longlong *)local_b0;
    local_d8 = *(undefined4 *)((longlong)param_2 + 0xe);
    uStack_d4 = *(undefined4 *)((longlong)param_2 + 0x12);
    uStack_d0 = *(undefined4 *)((longlong)param_2 + 0x16);
    uStack_cc = *(undefined4 *)((longlong)param_2 + 0x1a);
    uVar10 = FUN_140062280(local_b0,&local_d8);
    puVar9 = operator_new(0x18);
    puVar8 = puVar14;
    local_270 = (undefined8 **)puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar11 = FUN_140201490("AuthID");
      *puVar9 = uVar11;
      puVar8 = puVar9;
    }
    local_158 = puVar8;
    if (puVar8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_2a0 = 0x26;
    local_2a8 = 1;
    local_298 = (short *)uVar10;
    plVar12 = (longlong *)FUN_140001880(&local_288,local_128,&local_158,0xca);
    local_280 = plVar12;
    if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_288,&local_1d0);
    pIVar2 = (IUnknown *)*puVar8;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_1d0 != (longlong *)0x0) {
      (**(code **)(*local_1d0 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    local_280 = (longlong *)local_230;
    iVar5 = *(int *)(lVar13 + 0x10 + param_2[8]);
    Ordinal_8(local_230);
    if ((local_230[0] != 3) && (local_230[0] != 10)) {
      if (local_230[0] == 0xb) {
        local_228 = CONCAT22(local_228._2_2_,-(ushort)(iVar5 != 0));
        iVar5 = local_228;
      }
      else {
        iVar7 = Ordinal_9(local_230);
        if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar7);
        }
        local_230[0] = 3;
      }
    }
    local_228 = iVar5;
    puVar9 = operator_new(0x18);
    puVar8 = puVar14;
    local_270 = (undefined8 **)puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar10 = FUN_140201490("CashCode");
      *puVar9 = uVar10;
      puVar8 = puVar9;
    }
    local_188 = puVar8;
    if (puVar8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_298 = local_230;
    local_2a0 = 4;
    local_2a8 = 1;
    plVar12 = (longlong *)FUN_140001880(&local_288,local_150,&local_188,3);
    local_280 = plVar12;
    if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_288,&local_190);
    pIVar2 = (IUnknown *)*puVar8;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_190 != (longlong *)0x0) {
      (**(code **)(*local_190 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    local_280 = (longlong *)local_98;
    uVar10 = FUN_1400623f0(local_98,lVar13 + 0x24 + param_2[8]);
    puVar9 = operator_new(0x18);
    puVar8 = puVar14;
    local_270 = (undefined8 **)puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar11 = FUN_140201490("GiftRecvName");
      *puVar9 = uVar11;
      puVar8 = puVar9;
    }
    local_1c0 = puVar8;
    if (puVar8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_2a0 = 0x10;
    local_2a8 = 1;
    local_298 = (short *)uVar10;
    plVar12 = (longlong *)FUN_140001880(&local_288,local_140,&local_1c0,0xca);
    local_280 = plVar12;
    if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_288,&local_170);
    pIVar2 = (IUnknown *)*puVar8;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_170 != (longlong *)0x0) {
      (**(code **)(*local_170 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    local_280 = (longlong *)local_200;
    iVar5 = *(int *)(lVar13 + 0x18 + param_2[8]);
    Ordinal_8(local_200);
    if ((local_200[0] != 3) && (local_200[0] != 10)) {
      if (local_200[0] == 0xb) {
        local_1f8 = CONCAT22(local_1f8._2_2_,-(ushort)(iVar5 != 0));
        iVar5 = local_1f8;
      }
      else {
        iVar7 = Ordinal_9(local_200);
        if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar7);
        }
        local_200[0] = 3;
      }
    }
    local_1f8 = iVar5;
    puVar9 = operator_new(0x18);
    puVar8 = puVar14;
    local_270 = (undefined8 **)puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar10 = FUN_140201490("AddOpt1");
      *puVar9 = uVar10;
      puVar8 = puVar9;
    }
    local_1b0 = puVar8;
    if (puVar8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_298 = local_200;
    local_2a0 = 4;
    local_2a8 = 1;
    plVar12 = (longlong *)FUN_140001880(&local_288,local_e8,&local_1b0,3);
    local_280 = plVar12;
    if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_288,&local_180);
    pIVar2 = (IUnknown *)*puVar8;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_180 != (longlong *)0x0) {
      (**(code **)(*local_180 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    local_280 = (longlong *)local_248;
    iVar5 = *(int *)(lVar13 + 0x1c + param_2[8]);
    Ordinal_8(local_248);
    if ((local_248[0] != 3) && (local_248[0] != 10)) {
      if (local_248[0] == 0xb) {
        local_240 = CONCAT22(local_240._2_2_,-(ushort)(iVar5 != 0));
        iVar5 = local_240;
      }
      else {
        iVar7 = Ordinal_9(local_248);
        if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar7);
        }
        local_248[0] = 3;
      }
    }
    local_240 = iVar5;
    puVar9 = operator_new(0x18);
    puVar8 = puVar14;
    local_270 = (undefined8 **)puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar10 = FUN_140201490("AddOpt2");
      *puVar9 = uVar10;
      puVar8 = puVar9;
    }
    local_1a0 = puVar8;
    if (puVar8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_298 = local_248;
    local_2a0 = 4;
    local_2a8 = 1;
    plVar12 = (longlong *)FUN_140001880(&local_288,local_130,&local_1a0,3);
    local_280 = plVar12;
    if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_288,&local_160);
    pIVar2 = (IUnknown *)*puVar8;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_160 != (longlong *)0x0) {
      (**(code **)(*local_160 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    local_280 = (longlong *)local_218;
    iVar5 = *(int *)(lVar13 + 0x20 + param_2[8]);
    Ordinal_8(local_218);
    if ((local_218[0] != 3) && (local_218[0] != 10)) {
      if (local_218[0] == 0xb) {
        local_210 = CONCAT22(local_210._2_2_,-(ushort)(iVar5 != 0));
        iVar5 = local_210;
      }
      else {
        iVar7 = Ordinal_9(local_218);
        if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar7);
        }
        local_218[0] = 3;
      }
    }
    local_210 = iVar5;
    puVar9 = operator_new(0x18);
    puVar8 = puVar14;
    local_270 = (undefined8 **)puVar9;
    if (puVar9 != (undefined8 *)0x0) {
      puVar9[1] = 0;
      *(undefined4 *)(puVar9 + 2) = 1;
      uVar10 = FUN_140201490("AddOpt3");
      *puVar9 = uVar10;
      puVar8 = puVar9;
    }
    local_1d8 = puVar8;
    if (puVar8 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_298 = local_218;
    local_2a0 = 4;
    local_2a8 = 1;
    ppvObject = &local_1d8;
    plVar12 = (longlong *)FUN_140001880(&local_288,local_f8,ppvObject,3);
    local_280 = plVar12;
    if (local_288 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar8 = (undefined8 *)FUN_140001660(local_288,&local_1c8);
    pIVar2 = (IUnknown *)*puVar8;
    if (pIVar2 == (IUnknown *)0x0) break;
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      ppvObject = (undefined8 **)&DAT_140281eb0;
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_1c8 != (longlong *)0x0) {
      (**(code **)(*local_1c8 + 0x10))();
    }
    if ((longlong *)*plVar12 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar12 + 0x10))();
    }
    FUN_1400016d0(&local_288,&local_1e0);
    if (local_1e0 != (longlong *)0x0) {
      (**(code **)(*local_1e0 + 0x10))();
    }
    if (local_288 != (IUnknown *)0x0) {
      (*local_288->lpVtbl->Release)(local_288);
    }
    local_278 = iVar4 + 1;
    puVar8 = (undefined8 *)(ulonglong)local_278;
    param_1 = local_250;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400fa4c0(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400fa553;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400fa553:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_cash_product_list");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0x1e);
  uStack_54 = *(undefined4 *)(param_2 + 0x22);
  uStack_50 = *(undefined4 *)(param_2 + 0x26);
  uStack_4c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("ProductID");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_1400fa740(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  undefined8 uVar3;
  undefined6 uVar4;
  IUnknown *This;
  char cVar5;
  int iVar6;
  HRESULT HVar7;
  ULONG UVar8;
  undefined8 *puVar9;
  longlong *plVar10;
  longlong lVar11;
  char *riid;
  uint uVar12;
  char *ppvObject;
  longlong *plVar13;
  undefined1 auStackY_288 [32];
  char local_248 [4];
  uint local_244;
  short local_240;
  short local_23c;
  longlong *local_238;
  int local_230;
  undefined4 uVar14;
  undefined8 local_220;
  undefined2 uStack_214;
  undefined2 uStack_212;
  undefined6 uStack_210;
  undefined2 uStack_20a;
  undefined6 uStack_208;
  ushort local_202;
  LPUNKNOWN local_1f8;
  longlong *local_1f0;
  IUnknown *local_1e8;
  longlong *local_1e0;
  undefined4 local_1d8;
  undefined1 local_1c8 [24];
  undefined1 local_1b0 [24];
  undefined4 local_198;
  undefined1 *local_190;
  undefined4 local_188;
  undefined8 local_180;
  undefined1 *local_178;
  longlong *local_168;
  undefined8 *local_160;
  longlong *local_158;
  longlong *local_150;
  undefined4 local_148;
  undefined4 uStack_144;
  undefined4 uStack_140;
  undefined4 uStack_13c;
  undefined1 local_138 [16];
  undefined8 local_128;
  longlong local_118 [4];
  IID local_f8;
  undefined8 local_e8;
  undefined2 local_e0;
  undefined8 local_de;
  undefined2 local_d6;
  undefined8 local_d4;
  undefined8 local_cc;
  undefined8 local_c4;
  undefined4 local_bc;
  undefined2 local_b8;
  undefined8 local_b6;
  undefined8 local_ae;
  undefined8 local_a6;
  undefined2 local_9e;
  undefined1 local_9c;
  undefined8 local_9b;
  undefined8 local_93;
  undefined2 local_8b;
  undefined8 local_89;
  undefined8 local_81;
  undefined8 local_79;
  undefined8 local_71;
  undefined8 local_69;
  undefined1 local_61 [40];
  undefined1 local_39;
  ulonglong local_38;
  
  local_128 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_288;
  local_238 = (longlong *)0x0;
  local_160 = param_2;
  iVar6 = FUN_140001970(&local_238);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  local_1e8 = (IUnknown *)0x0;
  local_1e0 = (longlong *)0x0;
  Ordinal_8(local_1c8);
  Ordinal_8(local_1b0);
  pIVar2 = local_1e8;
  if ((local_1e8 != (IUnknown *)0x0) && (local_1e8 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_180 = 0;
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  HVar7 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_1f8);
  if (-1 < HVar7) {
    HVar7 = OleRun(local_1f8);
    if (-1 < HVar7) {
      HVar7 = (*local_1f8->lpVtbl->QueryInterface)(local_1f8,(IID *)&DAT_140281f68,&local_1e8);
    }
    (*local_1f8->lpVtbl->Release)(local_1f8);
    if (-1 < HVar7) goto LAB_1400fa8ba;
  }
  local_1e8 = (IUnknown *)0x0;
LAB_1400fa8ba:
  local_198 = 2;
  uVar14 = 1;
  local_1d8 = 1;
  local_248[0] = '\x01';
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_220 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x24580000);
  uStack_214 = 0xe9;
  plVar13 = (longlong *)0x0;
  local_202 = 0;
  uStack_212 = (undefined2)*(undefined8 *)((longlong)param_2 + 0xe);
  uStack_210 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0xe) >> 0x10);
  uStack_20a = (undefined2)*(undefined8 *)((longlong)param_2 + 0x16);
  uStack_208 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x16) >> 0x10);
  uVar12 = 0x20;
  local_244 = 0x20;
  pIVar2 = *(IUnknown **)*param_1;
  if ((pIVar2 != (IUnknown *)0x0) && (UVar8 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2), (int)UVar8 < 0)
     ) {
    _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f08);
  }
  iVar6 = FUN_1400a1e90(param_1);
  if (iVar6 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar2 = local_1e8;
    if (local_1e8 != (IUnknown *)0x0) {
      local_244 = 0;
      UVar8 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
      if ((int)UVar8 < 0) {
        _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_1e8;
      if (local_244 != 0) {
        if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar8 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
        if ((int)UVar8 < 0) {
          _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_1e8 != (IUnknown *)0x0) {
        (*local_1e8->lpVtbl->Release)(local_1e8);
        local_1e8 = (IUnknown *)0x0;
      }
    }
    local_180 = 0;
    local_178 = &DAT_140281f00;
    local_190 = &DAT_140281f00;
    local_188 = 0;
    local_198 = 0;
    Ordinal_9(local_1b0);
    Ordinal_9(local_1c8);
    if (local_1e0 != (longlong *)0x0) {
      (**(code **)(*local_1e0 + 0x10))();
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
    }
    if (local_238 != (longlong *)0x0) {
      (**(code **)(*local_238 + 0x10))();
    }
    return 0;
  }
  puVar9 = (undefined8 *)FUN_140001f20(*param_1,&local_158);
  FUN_140001710(&local_238,*puVar9,"dbo.up_read_account_storage");
  if (local_158 != (longlong *)0x0) {
    (**(code **)(*local_158 + 0x10))();
  }
  local_1f0 = local_118;
  local_148 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_144 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_140 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_13c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_118,&local_148);
  plVar10 = operator_new(0x18);
  local_150 = (longlong *)0x0;
  local_168 = plVar10;
  if (plVar10 != (longlong *)0x0) {
    plVar10[1] = 0;
    *(undefined4 *)(plVar10 + 2) = 1;
    lVar11 = FUN_140201490("auth_id");
    *plVar10 = lVar11;
    local_150 = plVar10;
  }
  if (local_150 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_238,local_138,&local_150,0xca);
  local_1f0 = plVar10;
  if (local_238 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_238,&local_168);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar8 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar8 < 0) {
    _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_168 != (longlong *)0x0) {
    (**(code **)(*local_168 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  puVar9 = (undefined8 *)FUN_1400016d0(&local_238,&local_1f0);
  This = local_1e8;
  pIVar2 = (IUnknown *)*puVar9;
  if (local_1e8 != pIVar2) {
    local_1e8 = pIVar2;
    if (pIVar2 != (IUnknown *)0x0) {
      (*pIVar2->lpVtbl->AddRef)(pIVar2);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_1f0 != (longlong *)0x0) {
    (**(code **)(*local_1f0 + 0x10))();
  }
  pIVar2 = local_1e8;
  if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_23c = 0;
  UVar8 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
  if ((int)UVar8 < 0) {
    _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
  }
  if (local_23c != -1) {
    while( true ) {
      pIVar2 = local_1e8;
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_240 = 0;
      UVar8 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
      if ((int)UVar8 < 0) {
        _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_240 == -1) break;
      local_f8.Data1 = 0;
      local_f8.Data2 = 0;
      local_f8.Data3 = 0;
      local_f8.Data4[0] = '\0';
      local_f8.Data4[1] = '\0';
      local_f8.Data4[2] = '\0';
      local_f8.Data4[3] = '\0';
      local_f8.Data4[4] = '\0';
      local_f8.Data4[5] = '\0';
      local_f8.Data4[6] = '\0';
      local_f8.Data4[7] = '\0';
      local_e8 = 0;
      local_e0 = 0;
      local_de = 0;
      local_d6 = 0;
      local_d4 = 0;
      local_cc = 0;
      local_c4 = 0;
      local_bc = 0;
      local_b8 = 0;
      local_b6 = 0;
      local_ae = 0;
      local_a6 = 0;
      local_9e = 0;
      local_9b = 0;
      local_8b = 0;
      local_89 = 0;
      local_81 = 0;
      local_79 = 0;
      local_71 = 0;
      local_69 = 0;
      local_39 = 0;
      local_93 = 0;
      local_9c = local_240 == -1;
      memset(local_61,0,0x28);
      cVar5 = FUN_1400a1f60(&local_1e8,&local_f8,local_248);
      if (cVar5 == '\0') break;
      riid = (char *)&local_f8;
      ppvObject = (char *)0xc0;
      memcpy((void *)((longlong)(int)uVar12 + 0x130 + (longlong)param_1),riid,0xc0);
      local_244 = uVar12 + 0xc0;
      local_202 = (short)plVar13 + 1;
      plVar13 = (longlong *)(ulonglong)local_202;
      if (50000 < local_244) {
        uVar4 = local_220._2_6_;
        local_220 = CONCAT62(local_220._2_6_,(short)local_244);
        uVar3 = local_220;
        riid = (char *)(param_1 + 0x26);
        local_220._4_2_ = SUB62(uVar4,2);
        local_220._6_2_ = SUB62(uVar4,4);
        ((IID *)riid)->Data1 = (undefined4)local_220;
        ((IID *)riid)->Data2 = local_220._4_2_;
        ((IID *)riid)->Data3 = local_220._6_2_;
        param_1[0x27] = CONCAT26(uStack_212,CONCAT24(0xe9,uVar1));
        param_1[0x28] = CONCAT26(uStack_20a,uStack_210);
        param_1[0x29] = CONCAT26(local_202,uStack_208);
        iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar6 == 0) {
          ppvObject = "DB Result Queue push error";
          riid = "DBResultQueue_Error.Log";
          FUN_1400a0b40(param_1[0x23]);
        }
        local_244 = 0x20;
        local_202 = 0;
        plVar13 = (longlong *)0x0;
        local_220 = uVar3;
      }
      pIVar2 = local_1e8;
      uVar12 = local_244;
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar7 = (*local_1e8->lpVtbl[0xc].QueryInterface)(local_1e8,(IID *)riid,(void **)ppvObject);
      if (HVar7 < 0) {
        _com_issue_errorex(HVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_248[0] == '\0') {
      uStack_214 = 0x95;
      uVar14 = 0;
    }
  }
  local_220 = CONCAT62(local_220._2_6_,(short)uVar12);
  param_1[0x26] = local_220;
  param_1[0x27] = CONCAT26(uStack_212,CONCAT24(uStack_214,uVar1));
  param_1[0x28] = CONCAT26(uStack_20a,uStack_210);
  param_1[0x29] = CONCAT26(local_202,uStack_208);
  iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
  if (iVar6 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar2 = local_1e8;
  if (local_1e8 != (IUnknown *)0x0) {
    local_230 = 0;
    UVar8 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
    if ((int)UVar8 < 0) {
      _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
    }
    pIVar2 = local_1e8;
    if (local_230 != 0) {
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar8 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
      if ((int)UVar8 < 0) {
        _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
      local_1e8 = (IUnknown *)0x0;
    }
  }
  local_180 = 0;
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_198 = 0;
  Ordinal_9(local_1b0);
  Ordinal_9(local_1c8);
  if (local_1e0 != (longlong *)0x0) {
    (**(code **)(*local_1e0 + 0x10))();
  }
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  if (local_238 != (longlong *)0x0) {
    (**(code **)(*local_238 + 0x10))();
  }
  return uVar14;
}



undefined8 FUN_1400fb140(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400fb1d6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400fb1d6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_account_storage_item");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_80 = local_70;
  sVar1 = *(short *)(param_2 + 0x32);
  Ordinal_8(local_70);
  FUN_140062080(local_70,(int)sVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("page_index");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_58 = local_70;
    sVar1 = *(short *)(param_2 + 0x34);
    Ordinal_8(local_70);
    FUN_140062080(local_70,(int)sVar1);
    plVar9 = operator_new(0x18);
    local_80 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("slot_index");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_70);
    local_58 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400a2c10(&local_res20,param_2 + 0x1e);
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400fb620(undefined8 *param_1,undefined8 *param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *local_res20;
  undefined4 local_178;
  undefined4 uStack_174;
  undefined4 local_170;
  undefined2 local_16c;
  longlong *local_168;
  longlong *local_160;
  longlong *local_158;
  longlong *local_150;
  longlong *local_148;
  longlong *local_140;
  longlong *local_138;
  longlong *local_130;
  longlong *local_128;
  longlong *local_120;
  longlong *local_118;
  longlong *local_110;
  longlong *local_108;
  longlong *local_100;
  longlong *local_f8;
  longlong *local_f0;
  undefined1 local_e8 [24];
  undefined1 local_d0 [24];
  undefined1 local_b8 [24];
  undefined1 local_a0 [24];
  undefined1 local_88 [8];
  undefined8 local_80;
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined1 local_50 [32];
  
  local_80 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if ((pIVar3 != (IUnknown *)0x0) && (UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3), (int)UVar4 < 0)
     ) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    uVar7 = 0;
  }
  else {
    local_res20 = (longlong *)0x0;
    iVar5 = FUN_140001970(&local_res20);
    if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_170 = *(undefined4 *)(param_2 + 1);
    _local_178 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x245a0000);
    local_16c = 0x96;
    _local_178 = CONCAT62(stack0xfffffffffffffe8a,0xe);
    puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_128);
    FUN_140001710(&local_res20,*puVar6,"dbo.up_create_account_storage_item");
    if (local_128 != (longlong *)0x0) {
      (**(code **)(*local_128 + 0x10))();
    }
    local_68 = *(undefined4 *)((longlong)param_2 + 0xe);
    uStack_64 = *(undefined4 *)((longlong)param_2 + 0x12);
    uStack_60 = *(undefined4 *)((longlong)param_2 + 0x16);
    uStack_5c = *(undefined4 *)((longlong)param_2 + 0x1a);
    uVar7 = FUN_140062280(local_50,&local_68);
    plVar8 = operator_new(0x18);
    local_f8 = plVar10;
    local_168 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("auth_id");
      *plVar8 = lVar9;
      local_f8 = plVar8;
    }
    if (local_f8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_160,&local_f8,0xca,1,0x26,uVar7);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_108);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_108 != (longlong *)0x0) {
      (**(code **)(*local_108 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    sVar1 = *(short *)((longlong)param_2 + 0x34);
    Ordinal_8(local_b8);
    FUN_140062080(local_b8,(int)sVar1);
    plVar8 = operator_new(0x18);
    local_120 = plVar10;
    local_160 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("page_index");
      *plVar8 = lVar9;
      local_120 = plVar8;
    }
    if (local_120 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_158,&local_120,3,1,4,local_b8);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_148);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_148 != (longlong *)0x0) {
      (**(code **)(*local_148 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    sVar1 = *(short *)((longlong)param_2 + 0x36);
    Ordinal_8(local_d0);
    FUN_140062080(local_d0,(int)sVar1);
    plVar8 = operator_new(0x18);
    local_130 = plVar10;
    local_158 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("slot_index");
      *plVar8 = lVar9;
      local_130 = plVar8;
    }
    if (local_130 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_150,&local_130,3,1,4,local_d0);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_138);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_138 != (longlong *)0x0) {
      (**(code **)(*local_138 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    uVar2 = *(undefined4 *)(param_2 + 7);
    Ordinal_8(local_a0);
    FUN_140062080(local_a0,uVar2);
    plVar8 = operator_new(0x18);
    local_100 = plVar10;
    local_150 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490(&DAT_14028931c);
      *plVar8 = lVar9;
      local_100 = plVar8;
    }
    if (local_100 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_140,&local_100,3,1,4,local_a0);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_f0);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_f0 != (longlong *)0x0) {
      (**(code **)(*local_f0 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    sVar1 = *(short *)((longlong)param_2 + 0x1e);
    Ordinal_8(local_e8);
    FUN_140062080(local_e8,(int)sVar1);
    plVar8 = operator_new(0x18);
    local_140 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("gcode");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_110 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,local_88,&local_110,3,1,4,local_e8);
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_118);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_118 != (longlong *)0x0) {
      (**(code **)(*local_118 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    FUN_1400a2c10(&local_res20,param_2 + 4);
    FUN_1400016d0(&local_res20,&local_168);
    if (local_168 != (longlong *)0x0) {
      (**(code **)(*local_168 + 0x10))();
    }
    iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_178);
    if (iVar5 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    uVar7 = 1;
  }
  return uVar7;
}



undefined8 FUN_1400fbe40(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_48;
  longlong local_40 [4];
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400fbed8;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400fbed8:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_delete_account_storage_item");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = &local_78;
  local_88 = *(undefined4 *)(param_2 + 0xe);
  uStack_84 = *(undefined4 *)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_78,&local_88);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_98[0] = local_40;
  local_78._0_4_ = *(undefined4 *)(param_2 + 0x1e);
  local_78._4_4_ = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_78);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("item_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001400fc465)
// WARNING: Removing unreachable block (ram,0x0001400fc472)
// WARNING: Removing unreachable block (ram,0x0001400fc47d)
// WARNING: Removing unreachable block (ram,0x0001400fc48d)

longlong * FUN_1400fc1f0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  int iVar2;
  HRESULT HVar3;
  ULONG UVar4;
  undefined4 uVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  char local_res18 [8];
  longlong *local_res20;
  longlong *local_1d8;
  int local_1d0;
  int local_1cc;
  undefined8 local_1c8;
  undefined4 local_1c0;
  undefined2 uStack_1bc;
  undefined2 uStack_1ba;
  undefined6 uStack_1b8;
  undefined2 uStack_1b2;
  undefined6 uStack_1b0;
  undefined2 local_1aa;
  undefined2 uStack_1a8;
  undefined4 uStack_1a6;
  undefined2 local_1a2;
  undefined2 uStack_1a0;
  undefined2 uStack_19e;
  undefined2 uStack_19c;
  LPUNKNOWN local_198 [2];
  IUnknown *local_188;
  longlong *local_180;
  undefined4 local_178;
  undefined1 local_168 [24];
  undefined1 local_150 [24];
  undefined4 local_138;
  undefined1 *local_130;
  undefined4 local_128;
  undefined8 local_120;
  undefined1 *local_118;
  longlong *local_108;
  longlong *local_100;
  longlong *local_f8;
  longlong *local_f0;
  undefined1 local_e8 [16];
  undefined4 local_d8;
  undefined4 uStack_d4;
  undefined4 uStack_d0;
  undefined4 uStack_cc;
  undefined8 local_b8;
  undefined1 local_b0 [24];
  undefined1 local_98 [24];
  undefined1 local_80 [24];
  undefined1 local_68 [24];
  undefined1 local_50 [32];
  
  local_b8 = 0xfffffffffffffffe;
  local_1d8 = (longlong *)0x0;
  iVar2 = FUN_140001970(&local_1d8);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_188 = (IUnknown *)0x0;
  local_180 = (longlong *)0x0;
  Ordinal_8(local_168);
  Ordinal_8(local_150);
  pIVar1 = local_188;
  if ((local_188 != (IUnknown *)0x0) && (local_188 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_118 = &DAT_140281f00;
  local_130 = &DAT_140281f00;
  local_128 = 0;
  local_120 = 0;
  if (local_188 != (IUnknown *)0x0) {
    (*local_188->lpVtbl->Release)(local_188);
  }
  HVar3 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_198
                          );
  if (HVar3 < 0) {
LAB_1400fc33f:
    local_188 = (IUnknown *)0x0;
  }
  else {
    HVar3 = OleRun(local_198[0]);
    if (-1 < HVar3) {
      HVar3 = (*local_198[0]->lpVtbl->QueryInterface)(local_198[0],(IID *)&DAT_140281f68,&local_188)
      ;
    }
    (*local_198[0]->lpVtbl->Release)(local_198[0]);
    if (HVar3 < 0) goto LAB_1400fc33f;
  }
  local_138 = 2;
  local_178 = 1;
  local_res18[0] = '\x01';
  local_1aa = 0;
  uStack_1a8 = 0;
  uStack_1a6 = 0;
  local_1a2 = 0;
  uStack_1a0 = 0;
  uStack_19e = 0;
  uStack_19c = 0;
  local_1c0 = *(undefined4 *)(param_2 + 1);
  local_1c8._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_1c8._0_4_ = CONCAT22(0x245c,(short)*param_2);
  uStack_1bc = 0xe9;
  uStack_1ba = (undefined2)*(undefined8 *)((longlong)param_2 + 0xe);
  uStack_1b8 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0xe) >> 0x10);
  uStack_1b2 = (undefined2)*(undefined8 *)((longlong)param_2 + 0x16);
  uStack_1b0 = (undefined6)((ulonglong)*(undefined8 *)((longlong)param_2 + 0x16) >> 0x10);
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_1cc = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_1cc != 0) goto LAB_1400fc53c;
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_188;
    if (local_188 != (IUnknown *)0x0) {
      UVar4 = (*local_188->lpVtbl[0x12].AddRef)(local_188);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_188 != (IUnknown *)0x0) {
        (*local_188->lpVtbl->Release)(local_188);
        local_188 = (IUnknown *)0x0;
      }
    }
    local_120 = 0;
    local_118 = &DAT_140281f00;
    local_130 = &DAT_140281f00;
    local_128 = 0;
    local_138 = 0;
    Ordinal_9(local_150);
    Ordinal_9(local_168);
    if (local_180 != (longlong *)0x0) {
      (**(code **)(*local_180 + 0x10))();
    }
    if (local_188 != (IUnknown *)0x0) {
      (*local_188->lpVtbl->Release)(local_188);
    }
    if (local_1d8 != (longlong *)0x0) {
      (**(code **)(*local_1d8 + 0x10))();
    }
    return (longlong *)0x0;
  }
LAB_1400fc53c:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_100);
  FUN_140001710(&local_1d8,*puVar6,"dbo.up_read_uni_account_info");
  if (local_100 != (longlong *)0x0) {
    (**(code **)(*local_100 + 0x10))();
  }
  local_res20 = (longlong *)local_50;
  local_d8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_d4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_d0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_cc = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar7 = FUN_140062280(local_50,&local_d8);
  plVar8 = operator_new(0x18);
  local_f0 = (longlong *)0x0;
  local_108 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("auth_id");
    *plVar8 = lVar9;
    local_f0 = plVar8;
  }
  if (local_f0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_1d8,local_e8,&local_f0,0xca,1,0x26,uVar7);
  local_res20 = plVar8;
  if (local_1d8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_1d8,&local_f8);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_f8 != (longlong *)0x0) {
      (**(code **)(*local_f8 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_1d8,&local_108);
    This = local_188;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_188 != pIVar1) {
      local_188 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_108 != (longlong *)0x0) {
      (**(code **)(*local_108 + 0x10))();
    }
    pIVar1 = local_188;
    if (local_188 != (IUnknown *)0x0) {
      local_res20 = (longlong *)((ulonglong)local_res20 & 0xffffffffffff0000);
      UVar4 = (*local_188->lpVtbl[6].Release)(local_188);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      plVar8 = (longlong *)0x1;
      if ((short)local_res20 != -1) {
        uVar7 = FUN_140002290(&local_188,local_80,"AccountStorage_Count",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_1aa = (undefined2)uVar5;
        uStack_1a8 = (undefined2)((uint)uVar5 >> 0x10);
        Ordinal_9(local_80);
        uVar7 = FUN_140002290(&local_188,local_b0,"AccountStorage_Gold",local_res18);
        FUN_140182560(uVar7);
        uStack_1a6 = FUN_140062550(uVar7);
        Ordinal_9(local_b0);
        uVar7 = FUN_140002290(&local_188,local_68,"Use_CharacterSlot",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        local_1a2 = (undefined2)uVar5;
        uStack_1a0 = (undefined2)((uint)uVar5 >> 0x10);
        Ordinal_9(local_68);
        uVar7 = FUN_140002290(&local_188,local_98,"Accruable_PlayTime",local_res18);
        FUN_140182560(uVar7);
        uVar5 = FUN_140062550(uVar7);
        uStack_19e = (undefined2)uVar5;
        uStack_19c = (undefined2)((uint)uVar5 >> 0x10);
        Ordinal_9(local_98);
        if (local_res18[0] == '\0') {
          uStack_1bc = 0x95;
          plVar8 = (longlong *)0x0;
        }
      }
      local_1c8 = CONCAT62(local_1c8._2_6_,0x2e);
      param_1[0x26] = local_1c8;
      param_1[0x27] = CONCAT26(uStack_1ba,CONCAT24(uStack_1bc,local_1c0));
      param_1[0x28] = CONCAT26(uStack_1b2,uStack_1b8);
      param_1[0x29] = CONCAT26(local_1aa,uStack_1b0);
      param_1[0x2a] = CONCAT26(local_1a2,CONCAT42(uStack_1a6,uStack_1a8));
      *(uint *)(param_1 + 0x2b) = CONCAT22(uStack_19e,uStack_1a0);
      *(undefined2 *)((longlong)param_1 + 0x15c) = uStack_19c;
      iVar2 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar2 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_188;
      if (local_188 != (IUnknown *)0x0) {
        local_1d0 = 0;
        UVar4 = (*local_188->lpVtbl[0x12].AddRef)(local_188);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_188;
        if (local_1d0 != 0) {
          if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar4 = (*local_188->lpVtbl[10].Release)(local_188);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_188 != (IUnknown *)0x0) {
          (*local_188->lpVtbl->Release)(local_188);
          local_188 = (IUnknown *)0x0;
        }
      }
      local_120 = 0;
      local_118 = &DAT_140281f00;
      local_130 = &DAT_140281f00;
      local_128 = 0;
      local_138 = 0;
      Ordinal_9(local_150);
      Ordinal_9(local_168);
      if (local_180 != (longlong *)0x0) {
        (**(code **)(*local_180 + 0x10))();
      }
      if (local_188 != (IUnknown *)0x0) {
        (*local_188->lpVtbl->Release)(local_188);
      }
      if (local_1d8 != (longlong *)0x0) {
        (**(code **)(*local_1d8 + 0x10))();
      }
      return plVar8;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400fca80(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400fcb16;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400fcb16:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_uni_account_info");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("AuthID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("AccountStorage_Count");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_58 = local_70;
    uVar1 = *(undefined4 *)(param_2 + 0x22);
    Ordinal_8(local_70);
    FUN_140062080(local_70,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_80 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("AccountStorage_Gold");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_70);
    local_58 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_58 = local_70;
      uVar1 = *(undefined4 *)(param_2 + 0x26);
      Ordinal_8(local_70);
      FUN_140062080(local_70,uVar1);
      plVar9 = operator_new(0x18);
      local_80 = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar8 = FUN_140201490("Use_CharacterSlot");
        *plVar9 = lVar8;
        plVar10 = plVar9;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_70);
      local_58 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_88 != (longlong *)0x0) {
          (**(code **)(*local_88 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400fd070(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400fd108;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400fd108:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"up_update_uni_account_playtime");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("AuthID");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  uVar1 = *(undefined4 *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,uVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("Accruable_PlayTime");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400fd420(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98;
  longlong *local_90;
  undefined4 local_88;
  undefined4 uStack_84;
  undefined8 uStack_80;
  longlong local_68 [4];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400fd4bb;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400fd4bb:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_gold");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  sVar1 = *(short *)(param_2 + 0xe);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,(int)sVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("server");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_98,&local_res18,2,1,2,&local_88);
  local_90 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98 = (longlong *)&local_88;
  uVar10 = *(undefined8 *)(param_2 + 0x10);
  Ordinal_8(&local_88);
  if (((short)local_88 != 5) && ((short)local_88 != 7)) {
    iVar5 = Ordinal_9(&local_88);
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    local_88 = CONCAT22(local_88._2_2_,5);
  }
  uStack_80 = uVar10;
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_90 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028a328);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,5,1,8,&local_88);
  local_98 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_88 = *(undefined4 *)(param_2 + 0x18);
  uStack_84 = *(undefined4 *)(param_2 + 0x1c);
  uStack_80 = *(undefined8 *)(param_2 + 0x20);
  uVar10 = FUN_140062280(local_68,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_98 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("AuthID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_88 = *(undefined4 *)(param_2 + 0x28);
  uStack_84 = *(undefined4 *)(param_2 + 0x2c);
  uStack_80 = *(undefined8 *)(param_2 + 0x30);
  uVar10 = FUN_140062280(local_68,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_98 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("CharID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  uVar10 = FUN_1400623f0(local_68,param_2 + 0x38);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_98 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028a330);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x10,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_a0 = local_68;
  local_88 = *(undefined4 *)(param_2 + 0x58);
  uStack_84 = *(undefined4 *)(param_2 + 0x5c);
  uStack_80 = *(undefined8 *)(param_2 + 0x60);
  uVar10 = FUN_140062280(local_68,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar11;
  local_98 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("OtherAuthID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar10);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = local_68;
    local_88 = *(undefined4 *)(param_2 + 0x68);
    uStack_84 = *(undefined4 *)(param_2 + 0x6c);
    uStack_80 = *(undefined8 *)(param_2 + 0x70);
    uVar10 = FUN_140062280(local_68,&local_88);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_98 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("OtherCharID");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar10);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_a0 = local_68;
    uVar10 = FUN_1400623f0(local_68,param_2 + 0x78);
    plVar7 = operator_new(0x18);
    plVar9 = plVar11;
    local_98 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("OtherName");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x10,uVar10);
    local_a0 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_88;
      uVar2 = *(undefined4 *)(param_2 + 0x98);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_98 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490(&DAT_14028a338);
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,2,1,2,&local_88);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_88;
      uVar2 = *(undefined4 *)(param_2 + 0x9c);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_98 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("Gold_Prev");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,3,1,4,&local_88);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_a0 = (longlong *)&local_88;
      uVar2 = *(undefined4 *)(param_2 + 0xa0);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,uVar2);
      plVar7 = operator_new(0x18);
      plVar9 = plVar11;
      local_98 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("Gold_Change");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,3,1,4,&local_88);
      local_a0 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_a0 = (longlong *)&local_88;
        uVar2 = *(undefined4 *)(param_2 + 0xa4);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,uVar2);
        plVar7 = operator_new(0x18);
        plVar9 = plVar11;
        local_98 = plVar7;
        if (plVar7 != (longlong *)0x0) {
          plVar7[1] = 0;
          *(undefined4 *)(plVar7 + 2) = 1;
          lVar8 = FUN_140201490("Gold_After");
          *plVar7 = lVar8;
          plVar9 = plVar7;
        }
        local_res18 = plVar9;
        if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,3,1,4,&local_88);
        local_a0 = plVar9;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_a0 = local_68;
        uVar10 = FUN_14006a8f0(local_68,param_2 + 0xa8);
        plVar7 = operator_new(0x18);
        plVar9 = plVar11;
        local_98 = plVar7;
        if (plVar7 != (longlong *)0x0) {
          plVar7[1] = 0;
          *(undefined4 *)(plVar7 + 2) = 1;
          lVar8 = FUN_140201490("bcust_id");
          *plVar7 = lVar8;
          plVar9 = plVar7;
        }
        local_res18 = plVar9;
        if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar9 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x32,uVar10);
        local_a0 = plVar9;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar3 = (IUnknown *)*puVar6;
        if (pIVar3 != (IUnknown *)0x0) {
          UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar9 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar9 + 0x10))();
          }
          local_a0 = local_68;
          uVar10 = FUN_14006a8f0(local_68,param_2 + 0xda);
          plVar9 = operator_new(0x18);
          local_98 = plVar9;
          if (plVar9 != (longlong *)0x0) {
            plVar9[1] = 0;
            *(undefined4 *)(plVar9 + 2) = 1;
            lVar8 = FUN_140201490("bcust_id_Other");
            *plVar9 = lVar8;
            plVar11 = plVar9;
          }
          local_res18 = plVar11;
          if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          plVar11 = (longlong *)
                    FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x32,uVar10);
          local_a0 = plVar11;
          if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
          pIVar3 = (IUnknown *)*puVar6;
          if (pIVar3 != (IUnknown *)0x0) {
            UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
            if ((int)UVar4 < 0) {
              _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
            }
            if (local_a8 != (longlong *)0x0) {
              (**(code **)(*local_a8 + 0x10))();
            }
            if ((longlong *)*plVar11 != (longlong *)0x0) {
              (**(code **)(*(longlong *)*plVar11 + 0x10))();
            }
            FUN_1400016d0(&local_res20,&local_res18);
            if (local_res18 != (longlong *)0x0) {
              (**(code **)(*local_res18 + 0x10))();
            }
            if (local_res20 != (longlong *)0x0) {
              (**(code **)(*local_res20 + 0x10))();
            }
            return 1;
          }
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400fe5d0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_78;
  longlong *local_70;
  longlong *local_68;
  longlong local_60 [3];
  undefined1 local_48 [24];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400fe668;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400fe668:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_packet_overload");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_78 = local_60;
  uVar6 = FUN_14006a8f0(local_60,param_2 + 0xe);
  plVar7 = operator_new(0x18);
  local_68 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("func_name");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,0x81,1,100,uVar6);
  local_68 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_70 = local_60;
  uVar1 = *(undefined4 *)(param_2 + 0x72);
  Ordinal_8(local_60);
  FUN_140062080(local_60,uVar1);
  plVar7 = operator_new(0x18);
  local_68 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028ea4c);
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,local_48,&local_res18,3,1,4,local_60);
  local_70 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_78 != (longlong *)0x0) {
      (**(code **)(*local_78 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400fe970(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_78;
  longlong *local_70;
  longlong *local_68;
  longlong local_60 [3];
  undefined1 local_48 [24];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400fea08;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400fea08:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_log_mcu");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_78 = local_60;
  sVar1 = *(short *)(param_2 + 0xe);
  Ordinal_8(local_60);
  FUN_140062080(local_60,(int)sVar1);
  plVar7 = operator_new(0x18);
  local_68 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("world_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,2,1,2,local_60);
  local_68 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_70 = local_60;
  uVar2 = *(undefined4 *)(param_2 + 0x10);
  Ordinal_8(local_60);
  FUN_140062080(local_60,uVar2);
  plVar7 = operator_new(0x18);
  local_68 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_140290e28);
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,local_48,&local_res18,3,1,4,local_60);
  local_70 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_78 != (longlong *)0x0) {
      (**(code **)(*local_78 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400fed20(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  undefined8 uVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400fedb6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400fedb6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_connection");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("log_type");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,3,1,4,&local_78);
  local_80 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_88 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x16);
  uStack_74 = *(undefined4 *)(param_2 + 0x1a);
  uStack_70 = *(undefined4 *)(param_2 + 0x1e);
  uStack_6c = *(undefined4 *)(param_2 + 0x22);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("AuthID");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,0xca,1,0x26,uVar9);
  local_88 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x26);
  uStack_74 = *(undefined4 *)(param_2 + 0x2a);
  uStack_70 = *(undefined4 *)(param_2 + 0x2e);
  uStack_6c = *(undefined4 *)(param_2 + 0x32);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("CharID");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("world");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x42);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("channelID");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  uVar9 = FUN_1400623f0(local_58,param_2 + 0x6e);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_name");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  uVar9 = FUN_1400623f0(local_58,param_2 + 0x4e);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("real_ip");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x46);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("inven_gold");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x4a);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("storage_gold");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar1 = *(undefined4 *)(param_2 + 0x36);
    Ordinal_8(&local_78);
    FUN_140062080(&local_78,uVar1);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("character_level");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = (longlong *)&local_78;
    uVar9 = *(undefined8 *)(param_2 + 0x3a);
    Ordinal_8(&local_78);
    uVar9 = FUN_140182530(local_58,uVar9);
    iVar4 = Ordinal_10(&local_78,uVar9);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    Ordinal_9(local_58);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("character_exp");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0x14,1,8,&local_78);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_58;
    uVar9 = FUN_1400623f0(local_58,param_2 + 0x8e);
    plVar8 = operator_new(0x18);
    local_88 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar7 = FUN_140201490("bcust_id");
      *plVar8 = lVar7;
      plVar10 = plVar8;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x32,uVar9);
    local_90 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1400ffc70(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  undefined8 uVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1400ffd06;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1400ffd06:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_chat");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_98 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("log_type");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,3,1,4,&local_78);
  local_80 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_88 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x12);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("world_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_90,&local_res18,3,1,4,&local_78);
  local_88 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x16);
  uStack_74 = *(undefined4 *)(param_2 + 0x1a);
  uStack_70 = *(undefined4 *)(param_2 + 0x1e);
  uStack_6c = *(undefined4 *)(param_2 + 0x22);
  uVar9 = FUN_140062280(local_58,&local_78);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x26);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("channel_group");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_98 != (longlong *)0x0) {
    (**(code **)(*local_98 + 0x10))();
  }
  if ((longlong *)*plVar8 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar8 + 0x10))();
  }
  local_90 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x2a);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar6 = operator_new(0x18);
  plVar8 = plVar10;
  local_88 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("channel_num");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,3,1,4,&local_78);
  local_90 = plVar8;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_58;
    local_78 = *(undefined4 *)(param_2 + 0x2e);
    uStack_74 = *(undefined4 *)(param_2 + 0x32);
    uStack_70 = *(undefined4 *)(param_2 + 0x36);
    uStack_6c = *(undefined4 *)(param_2 + 0x3a);
    uVar9 = FUN_140062280(local_58,&local_78);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("character_id");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar9);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_58;
    uVar9 = FUN_14006a8f0(local_58,param_2 + 0x3e);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("bcust_id");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x32,uVar9);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    local_90 = local_58;
    uVar9 = FUN_1400623f0(local_58,param_2 + 0x70);
    plVar6 = operator_new(0x18);
    plVar8 = plVar10;
    local_88 = plVar6;
    if (plVar6 != (longlong *)0x0) {
      plVar6[1] = 0;
      *(undefined4 *)(plVar6 + 2) = 1;
      lVar7 = FUN_140201490("character_name");
      *plVar6 = lVar7;
      plVar8 = plVar6;
    }
    local_res18 = plVar8;
    if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
    local_90 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = local_58;
      uVar9 = FUN_1400623f0(local_58,param_2 + 0x90);
      plVar6 = operator_new(0x18);
      plVar8 = plVar10;
      local_88 = plVar6;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = 0;
        *(undefined4 *)(plVar6 + 2) = 1;
        lVar7 = FUN_140201490("chat_target");
        *plVar6 = lVar7;
        plVar8 = plVar6;
      }
      local_res18 = plVar8;
      if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar8 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x10,uVar9);
      local_90 = plVar8;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      local_90 = local_58;
      uVar9 = FUN_1400623f0(local_58,param_2 + 0xb0);
      plVar8 = operator_new(0x18);
      local_88 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar7 = FUN_140201490("chats");
        *plVar8 = lVar7;
        plVar10 = plVar8;
      }
      local_res18 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,100,uVar9);
      local_90 = plVar10;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_98);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_98 != (longlong *)0x0) {
          (**(code **)(*local_98 + 0x10))();
        }
        if ((longlong *)*plVar10 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar10 + 0x10))();
        }
        FUN_1400016d0(&local_res20,&local_res18);
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        if (local_res20 != (longlong *)0x0) {
          (**(code **)(*local_res20 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140100930(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_78;
  longlong *local_70;
  longlong *local_68;
  longlong *local_60;
  longlong local_58 [5];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1401009c6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1401009c6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_log_auth_login");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_78 = local_58;
  uVar6 = FUN_14006a8f0(local_58,param_2 + 0xe);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("bcust_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x32,uVar6);
  local_60 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = local_58;
  uVar1 = *(undefined4 *)(param_2 + 0x97);
  Ordinal_8(local_58);
  FUN_140062080(local_58,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_60 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("channelling");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,local_58);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_70 = local_58;
  uVar6 = FUN_1400623f0(local_58,param_2 + 0x77);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_14028e750);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,200,1,0x10,uVar6);
  local_70 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_70 = local_58;
  uVar6 = FUN_14006a8f0(local_58,param_2 + 0x41);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("mac_addr");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0x81,1,0x11,uVar6);
  local_70 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_70 = local_58;
  uVar6 = FUN_14006a8f0(local_58,param_2 + 0x53);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_68 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("mac_addr02");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0x81,1,0x11,uVar6);
  local_70 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_78 != (longlong *)0x0) {
      (**(code **)(*local_78 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_70 = local_58;
    uVar6 = FUN_14006a8f0(local_58,param_2 + 0x65);
    plVar9 = operator_new(0x18);
    local_68 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("mac_addr03");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_60,&local_res18,0x81,1,0x11,uVar6);
    local_70 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_78);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_78 != (longlong *)0x0) {
        (**(code **)(*local_78 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140101120(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1401011b3;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1401011b3:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_delete_mail");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("mail_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

undefined8 FUN_1401013a0(undefined8 *param_1,longlong param_2,void **param_3)

{
  short sVar1;
  IUnknown *pIVar2;
  bool bVar3;
  ULONG UVar4;
  int iVar5;
  HRESULT HVar6;
  int iVar7;
  int iVar8;
  undefined8 *puVar9;
  longlong ****pppplVar10;
  longlong ***ppplVar11;
  undefined8 uVar12;
  longlong *plVar13;
  longlong ****pppplVar14;
  undefined4 *puVar15;
  char *pcVar16;
  longlong ****pppplVar17;
  undefined1 auStack_118 [32];
  undefined4 local_f8;
  undefined8 local_f0;
  longlong *local_e8;
  longlong ****local_d8;
  IUnknown *local_d0;
  longlong ****local_c8;
  longlong *local_c0;
  longlong ****local_b8;
  longlong ****local_b0;
  char *local_a8;
  undefined4 local_98;
  undefined4 uStack_94;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  longlong local_88 [3];
  longlong local_70;
  undefined8 *local_68;
  undefined8 local_50;
  short local_48 [4];
  int local_40;
  ulonglong local_30;
  
  local_50 = 0xfffffffffffffffe;
  local_30 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  pIVar2 = *(IUnknown **)*param_1;
  pppplVar17 = (longlong ****)0x0;
  local_70 = param_2;
  local_68 = param_1;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_14010143a:
    iVar5 = FUN_1400a1e90(param_1);
    if (iVar5 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return 0;
    }
  }
  else {
    local_a8 = (char *)((ulonglong)local_a8 & 0xffffffff00000000);
    UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      param_3 = (void **)&DAT_140281f08;
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_a8 == 0) goto LAB_14010143a;
  }
  local_d0 = (IUnknown *)0x0;
  iVar5 = FUN_140001970(&local_d0);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_a8 = "dbo.up_insert_mail_none";
  pppplVar10 = pppplVar17;
  pppplVar14 = pppplVar17;
  while( true ) {
    iVar5 = (int)pppplVar10;
    iVar8 = (int)pppplVar14;
    if (2 < iVar5) break;
    puVar9 = (undefined8 *)(param_2 + 0x338 + (longlong)iVar5 * 0x12);
    param_3 = (void **)*puVar9;
    if ((param_3 != (void **)0x0) ||
       (param_3 = (void **)puVar9[1], bVar3 = false, param_3 != (void **)0x0)) {
      bVar3 = true;
    }
    if (bVar3) {
      pppplVar14 = (longlong ****)(ulonglong)(iVar8 + 1);
    }
    pppplVar10 = (longlong ****)(ulonglong)(iVar5 + 1);
  }
  if (iVar8 == 0) {
    puVar9 = (undefined8 *)FUN_140001f20(*param_1,&local_d8);
    pIVar2 = local_d0;
    if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    HVar6 = (*local_d0->lpVtbl[3].QueryInterface)(local_d0,(IID *)*puVar9,param_3);
    if (HVar6 < 0) {
      _com_issue_errorex(HVar6,pIVar2,(_GUID *)&DAT_140281ee0);
    }
    local_b0 = (longlong ****)&local_c8;
    pppplVar10 = operator_new(0x18);
    local_c8 = pppplVar17;
    local_b8 = pppplVar10;
    if (pppplVar10 != (longlong ****)0x0) {
      pppplVar10[1] = (longlong ***)0x0;
      *(undefined4 *)(pppplVar10 + 2) = 1;
      ppplVar11 = (longlong ***)FUN_140201490("dbo.up_insert_mail");
      *pppplVar10 = ppplVar11;
      local_c8 = pppplVar10;
    }
    if (local_c8 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    FUN_140001420(local_d0,&local_c8);
    pIVar2 = local_d0;
    if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*local_d0->lpVtbl[6].Release)(local_d0);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281ee0);
    }
    if (local_d8 != (longlong ****)0x0) {
      (*(code *)(*local_d8)[2])();
    }
    local_a8 = "dbo.up_insert_mail";
    pcVar16 = local_a8;
  }
  else {
    if (iVar8 == 1) {
      puVar9 = (undefined8 *)FUN_140001f20(*param_1,&local_d8);
      pcVar16 = "dbo.up_insert_mail_item01";
      FUN_140001710(&local_d0,*puVar9,"dbo.up_insert_mail_item01");
    }
    else if (iVar8 == 2) {
      puVar9 = (undefined8 *)FUN_140001f20(*param_1,&local_d8);
      pcVar16 = "dbo.up_insert_mail_item02";
      FUN_140001710(&local_d0,*puVar9,"dbo.up_insert_mail_item02");
    }
    else {
      pcVar16 = local_a8;
      if (iVar8 != 3) goto LAB_14010167f;
      puVar9 = (undefined8 *)FUN_140001f20(*param_1,&local_d8);
      pcVar16 = "dbo.up_insert_mail_item03";
      FUN_140001710(&local_d0,*puVar9,"dbo.up_insert_mail_item03");
    }
    if (local_d8 != (longlong ****)0x0) {
      (*(code *)(*local_d8)[2])();
    }
  }
LAB_14010167f:
  local_a8 = pcVar16;
  local_b8 = (longlong ****)local_48;
  local_98 = *(undefined4 *)(param_2 + 0xe);
  uStack_94 = *(undefined4 *)(param_2 + 0x12);
  uStack_90 = *(undefined4 *)(param_2 + 0x16);
  uStack_8c = *(undefined4 *)(param_2 + 0x1a);
  uVar12 = FUN_140062280(local_48,&local_98);
  pppplVar10 = operator_new(0x18);
  local_d8 = pppplVar17;
  local_b0 = pppplVar10;
  if (pppplVar10 != (longlong ****)0x0) {
    pppplVar10[1] = (longlong ***)0x0;
    *(undefined4 *)(pppplVar10 + 2) = 1;
    ppplVar11 = (longlong ***)FUN_140201490("sender_auth_id");
    *pppplVar10 = ppplVar11;
    local_d8 = pppplVar10;
  }
  if (local_d8 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x26;
  local_f8 = 1;
  local_e8 = (longlong *)uVar12;
  plVar13 = (longlong *)FUN_140001880(&local_d0,&local_c0,&local_d8,0xca);
  local_b8 = (longlong ****)plVar13;
  if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong ****)0x0) {
    (*(code *)(*local_c8)[2])();
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
  local_c0 = (longlong *)local_48;
  local_98 = *(undefined4 *)(param_2 + 0x1e);
  uStack_94 = *(undefined4 *)(param_2 + 0x22);
  uStack_90 = *(undefined4 *)(param_2 + 0x26);
  uStack_8c = *(undefined4 *)(param_2 + 0x2a);
  uVar12 = FUN_140062280(local_48,&local_98);
  pppplVar14 = operator_new(0x18);
  pppplVar10 = pppplVar17;
  local_b8 = pppplVar14;
  if (pppplVar14 != (longlong ****)0x0) {
    pppplVar14[1] = (longlong ***)0x0;
    *(undefined4 *)(pppplVar14 + 2) = 1;
    ppplVar11 = (longlong ***)FUN_140201490("sender_character_id");
    *pppplVar14 = ppplVar11;
    pppplVar10 = pppplVar14;
  }
  local_d8 = pppplVar10;
  if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x26;
  local_f8 = 1;
  local_e8 = (longlong *)uVar12;
  plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,0xca);
  local_c0 = plVar13;
  if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong ****)0x0) {
    (*(code *)(*local_c8)[2])();
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
  local_c0 = (longlong *)local_48;
  uVar12 = FUN_1400623f0(local_48,param_2 + 0x2e);
  pppplVar14 = operator_new(0x18);
  pppplVar10 = pppplVar17;
  local_b8 = pppplVar14;
  if (pppplVar14 != (longlong ****)0x0) {
    pppplVar14[1] = (longlong ***)0x0;
    *(undefined4 *)(pppplVar14 + 2) = 1;
    ppplVar11 = (longlong ***)FUN_140201490("sender_name");
    *pppplVar14 = ppplVar11;
    pppplVar10 = pppplVar14;
  }
  local_d8 = pppplVar10;
  if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x10;
  local_f8 = 1;
  local_e8 = (longlong *)uVar12;
  plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,0xca);
  local_c0 = plVar13;
  if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong ****)0x0) {
    (*(code *)(*local_c8)[2])();
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
  local_c0 = (longlong *)local_48;
  uVar12 = FUN_1400623f0(local_48,param_2 + 0x4e);
  pppplVar14 = operator_new(0x18);
  pppplVar10 = pppplVar17;
  local_b8 = pppplVar14;
  if (pppplVar14 != (longlong ****)0x0) {
    pppplVar14[1] = (longlong ***)0x0;
    *(undefined4 *)(pppplVar14 + 2) = 1;
    ppplVar11 = (longlong ***)FUN_140201490("recver_name");
    *pppplVar14 = ppplVar11;
    pppplVar10 = pppplVar14;
  }
  local_d8 = pppplVar10;
  if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x10;
  local_f8 = 1;
  local_e8 = (longlong *)uVar12;
  plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,0xca);
  local_c0 = plVar13;
  if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong ****)0x0) {
    (*(code *)(*local_c8)[2])();
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
  local_c0 = (longlong *)local_48;
  uVar12 = FUN_1400623f0(local_48,param_2 + 0x6e);
  pppplVar14 = operator_new(0x18);
  pppplVar10 = pppplVar17;
  local_b8 = pppplVar14;
  if (pppplVar14 != (longlong ****)0x0) {
    pppplVar14[1] = (longlong ***)0x0;
    *(undefined4 *)(pppplVar14 + 2) = 1;
    ppplVar11 = (longlong ***)FUN_140201490(&DAT_14028984c);
    *pppplVar14 = ppplVar11;
    pppplVar10 = pppplVar14;
  }
  local_d8 = pppplVar10;
  if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x15e;
  local_f8 = 1;
  local_e8 = (longlong *)uVar12;
  plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,0xca);
  local_c0 = plVar13;
  if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong ****)0x0) {
    (*(code *)(*local_c8)[2])();
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
  local_c0 = (longlong *)local_48;
  iVar5 = *(int *)(param_2 + 0x32a);
  Ordinal_8(local_48);
  if ((local_48[0] != 3) && (local_48[0] != 10)) {
    if (local_48[0] == 0xb) {
      local_40 = CONCAT22(local_40._2_2_,-(ushort)(iVar5 != 0));
      iVar5 = local_40;
    }
    else {
      iVar7 = Ordinal_9(local_48);
      if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar7);
      }
      local_48[0] = 3;
    }
  }
  local_40 = iVar5;
  pppplVar14 = operator_new(0x18);
  pppplVar10 = pppplVar17;
  local_b8 = pppplVar14;
  if (pppplVar14 != (longlong ****)0x0) {
    pppplVar14[1] = (longlong ***)0x0;
    *(undefined4 *)(pppplVar14 + 2) = 1;
    ppplVar11 = (longlong ***)FUN_140201490("money");
    *pppplVar14 = ppplVar11;
    pppplVar10 = pppplVar14;
  }
  local_d8 = pppplVar10;
  if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = (longlong *)local_48;
  local_f0 = 4;
  local_f8 = 1;
  plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,3);
  local_c0 = plVar13;
  if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong ****)0x0) {
    (*(code *)(*local_c8)[2])();
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
  local_c0 = (longlong *)local_48;
  iVar5 = *(int *)(param_2 + 0x32e);
  Ordinal_8(local_48);
  if ((local_48[0] != 3) && (local_48[0] != 10)) {
    if (local_48[0] == 0xb) {
      local_40 = CONCAT22(local_40._2_2_,-(ushort)(iVar5 != 0));
      iVar5 = local_40;
    }
    else {
      iVar7 = Ordinal_9(local_48);
      if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar7);
      }
      local_48[0] = 3;
    }
  }
  local_40 = iVar5;
  pppplVar14 = operator_new(0x18);
  pppplVar10 = pppplVar17;
  local_b8 = pppplVar14;
  if (pppplVar14 != (longlong ****)0x0) {
    pppplVar14[1] = (longlong ***)0x0;
    *(undefined4 *)(pppplVar14 + 2) = 1;
    ppplVar11 = (longlong ***)FUN_140201490("return_day");
    *pppplVar14 = ppplVar11;
    pppplVar10 = pppplVar14;
  }
  local_d8 = pppplVar10;
  if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = (longlong *)local_48;
  local_f0 = 4;
  local_f8 = 1;
  plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,3);
  local_c0 = plVar13;
  if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong ****)0x0) {
    (*(code *)(*local_c8)[2])();
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
  local_c0 = (longlong *)local_48;
  iVar5 = *(int *)(param_2 + 0x332);
  Ordinal_8(local_48);
  if ((local_48[0] != 3) && (local_48[0] != 10)) {
    if (local_48[0] == 0xb) {
      local_40 = CONCAT22(local_40._2_2_,-(ushort)(iVar5 != 0));
      iVar5 = local_40;
    }
    else {
      iVar7 = Ordinal_9(local_48);
      if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar7);
      }
      local_48[0] = 3;
    }
  }
  local_40 = iVar5;
  pppplVar14 = operator_new(0x18);
  pppplVar10 = pppplVar17;
  local_b8 = pppplVar14;
  if (pppplVar14 != (longlong ****)0x0) {
    pppplVar14[1] = (longlong ***)0x0;
    *(undefined4 *)(pppplVar14 + 2) = 1;
    ppplVar11 = (longlong ***)FUN_140201490("req_money");
    *pppplVar14 = ppplVar11;
    pppplVar10 = pppplVar14;
  }
  local_d8 = pppplVar10;
  if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = (longlong *)local_48;
  local_f0 = 4;
  local_f8 = 1;
  plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,3);
  local_c0 = plVar13;
  if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong ****)0x0) {
    (*(code *)(*local_c8)[2])();
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
  local_c0 = local_88;
  puVar15 = (undefined4 *)FUN_140182810(local_48);
  local_98 = *puVar15;
  uStack_94 = puVar15[1];
  uStack_90 = puVar15[2];
  uStack_8c = puVar15[3];
  uVar12 = FUN_140061f30(local_88,&local_98);
  pppplVar14 = operator_new(0x18);
  pppplVar10 = pppplVar17;
  local_b8 = pppplVar14;
  if (pppplVar14 != (longlong ****)0x0) {
    pppplVar14[1] = (longlong ***)0x0;
    *(undefined4 *)(pppplVar14 + 2) = 1;
    ppplVar11 = (longlong ***)FUN_140201490("NewMailID");
    *pppplVar14 = ppplVar11;
    pppplVar10 = pppplVar14;
  }
  local_d8 = pppplVar10;
  if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x26;
  local_f8 = 1;
  local_e8 = (longlong *)uVar12;
  plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,0xca);
  local_c0 = plVar13;
  if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong ****)0x0) {
    (*(code *)(*local_c8)[2])();
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
  local_c0 = (longlong *)local_48;
  iVar5 = (int)*(short *)(param_2 + 0x336);
  Ordinal_8(local_48);
  if ((local_48[0] != 3) && (local_48[0] != 10)) {
    if (local_48[0] == 0xb) {
      local_40 = CONCAT22(local_40._2_2_,-(ushort)(iVar5 != 0));
      iVar5 = local_40;
    }
    else {
      iVar7 = Ordinal_9(local_48);
      if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar7);
      }
      local_48[0] = 3;
    }
  }
  local_40 = iVar5;
  pppplVar14 = operator_new(0x18);
  pppplVar10 = pppplVar17;
  local_b8 = pppplVar14;
  if (pppplVar14 != (longlong ****)0x0) {
    pppplVar14[1] = (longlong ***)0x0;
    *(undefined4 *)(pppplVar14 + 2) = 1;
    ppplVar11 = (longlong ***)FUN_140201490("createType");
    *pppplVar14 = ppplVar11;
    pppplVar10 = pppplVar14;
  }
  local_d8 = pppplVar10;
  if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = (longlong *)local_48;
  local_f0 = 4;
  local_f8 = 1;
  plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,3);
  local_c0 = plVar13;
  if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong ****)0x0) {
    (*(code *)(*local_c8)[2])();
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
  if (iVar8 == 1) {
    local_c0 = local_88;
    local_98 = *(undefined4 *)(param_2 + 0x338);
    uStack_94 = *(undefined4 *)(param_2 + 0x33c);
    uStack_90 = *(undefined4 *)(param_2 + 0x340);
    uStack_8c = *(undefined4 *)(param_2 + 0x344);
    uVar12 = FUN_140062280(local_88,&local_98);
    pppplVar14 = operator_new(0x18);
    pppplVar10 = pppplVar17;
    local_b8 = pppplVar14;
    if (pppplVar14 != (longlong ****)0x0) {
      pppplVar14[1] = (longlong ***)0x0;
      *(undefined4 *)(pppplVar14 + 2) = 1;
      ppplVar11 = (longlong ***)FUN_140201490("item_id");
      *pppplVar14 = ppplVar11;
      pppplVar10 = pppplVar14;
    }
    local_d8 = pppplVar10;
    if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_f0 = 0x26;
    local_f8 = 1;
    local_e8 = (longlong *)uVar12;
    plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,0xca);
    local_c0 = plVar13;
    if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
    pIVar2 = (IUnknown *)*puVar9;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8 != (longlong ****)0x0) {
      (*(code *)(*local_c8)[2])();
    }
    if ((longlong *)*plVar13 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar13 + 0x10))();
    }
    local_c0 = (longlong *)local_48;
    iVar5 = (int)*(short *)(param_2 + 0x348);
    Ordinal_8(local_48);
    if ((local_48[0] != 3) && (local_48[0] != 10)) {
      if (local_48[0] == 0xb) {
        local_40 = CONCAT22(local_40._2_2_,-(ushort)(iVar5 != 0));
        iVar5 = local_40;
      }
      else {
        iVar8 = Ordinal_9(local_48);
        if (iVar8 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar8);
        }
        local_48[0] = 3;
      }
    }
    local_40 = iVar5;
    pppplVar10 = operator_new(0x18);
    local_b8 = pppplVar10;
    if (pppplVar10 != (longlong ****)0x0) {
      pppplVar10[1] = (longlong ***)0x0;
      *(undefined4 *)(pppplVar10 + 2) = 1;
      ppplVar11 = (longlong ***)FUN_140201490("use_cnt");
      *pppplVar10 = ppplVar11;
      pppplVar17 = pppplVar10;
    }
    local_d8 = pppplVar17;
    if (pppplVar17 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_e8 = (longlong *)local_48;
    local_f0 = 4;
    local_f8 = 1;
    plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,3);
    local_c0 = plVar13;
    if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
    pIVar2 = (IUnknown *)*puVar9;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8 != (longlong ****)0x0) {
      (*(code *)(*local_c8)[2])();
    }
  }
  else {
    if (iVar8 != 2) {
      if (iVar8 == 3) {
        local_c0 = local_88;
        local_98 = *(undefined4 *)(param_2 + 0x338);
        uStack_94 = *(undefined4 *)(param_2 + 0x33c);
        uStack_90 = *(undefined4 *)(param_2 + 0x340);
        uStack_8c = *(undefined4 *)(param_2 + 0x344);
        uVar12 = FUN_140062280(local_88,&local_98);
        pppplVar14 = operator_new(0x18);
        pppplVar10 = pppplVar17;
        local_b8 = pppplVar14;
        if (pppplVar14 != (longlong ****)0x0) {
          pppplVar14[1] = (longlong ***)0x0;
          *(undefined4 *)(pppplVar14 + 2) = 1;
          ppplVar11 = (longlong ***)FUN_140201490("item_id01");
          *pppplVar14 = ppplVar11;
          pppplVar10 = pppplVar14;
        }
        local_d8 = pppplVar10;
        if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        local_f0 = 0x26;
        local_f8 = 1;
        local_e8 = (longlong *)uVar12;
        plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,0xca);
        local_c0 = plVar13;
        if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
        pIVar2 = (IUnknown *)*puVar9;
        if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_c8 != (longlong ****)0x0) {
          (*(code *)(*local_c8)[2])();
        }
        if ((longlong *)*plVar13 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar13 + 0x10))();
        }
        local_c0 = (longlong *)local_48;
        sVar1 = *(short *)(param_2 + 0x348);
        Ordinal_8(local_48);
        FUN_140062080(local_48,(int)sVar1);
        pppplVar14 = operator_new(0x18);
        pppplVar10 = pppplVar17;
        local_b8 = pppplVar14;
        if (pppplVar14 != (longlong ****)0x0) {
          pppplVar14[1] = (longlong ***)0x0;
          *(undefined4 *)(pppplVar14 + 2) = 1;
          ppplVar11 = (longlong ***)FUN_140201490("use_cnt01");
          *pppplVar14 = ppplVar11;
          pppplVar10 = pppplVar14;
        }
        local_d8 = pppplVar10;
        if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        local_e8 = (longlong *)local_48;
        local_f0 = 4;
        local_f8 = 1;
        plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,3);
        local_c0 = plVar13;
        if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
        pIVar2 = (IUnknown *)*puVar9;
        if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_c8 != (longlong ****)0x0) {
          (*(code *)(*local_c8)[2])();
        }
        if ((longlong *)*plVar13 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar13 + 0x10))();
        }
        local_c0 = local_88;
        local_98 = *(undefined4 *)(param_2 + 0x34a);
        uStack_94 = *(undefined4 *)(param_2 + 0x34e);
        uStack_90 = *(undefined4 *)(param_2 + 0x352);
        uStack_8c = *(undefined4 *)(param_2 + 0x356);
        uVar12 = FUN_140062280(local_88,&local_98);
        pppplVar14 = operator_new(0x18);
        pppplVar10 = pppplVar17;
        local_b8 = pppplVar14;
        if (pppplVar14 != (longlong ****)0x0) {
          pppplVar14[1] = (longlong ***)0x0;
          *(undefined4 *)(pppplVar14 + 2) = 1;
          ppplVar11 = (longlong ***)FUN_140201490("item_id02");
          *pppplVar14 = ppplVar11;
          pppplVar10 = pppplVar14;
        }
        local_d8 = pppplVar10;
        if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        local_f0 = 0x26;
        local_f8 = 1;
        local_e8 = (longlong *)uVar12;
        plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,0xca);
        local_c0 = plVar13;
        if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
        pIVar2 = (IUnknown *)*puVar9;
        if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_c8 != (longlong ****)0x0) {
          (*(code *)(*local_c8)[2])();
        }
        if ((longlong *)*plVar13 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar13 + 0x10))();
        }
        local_c0 = (longlong *)local_48;
        sVar1 = *(short *)(param_2 + 0x35a);
        Ordinal_8(local_48);
        FUN_140062080(local_48,(int)sVar1);
        pppplVar14 = operator_new(0x18);
        pppplVar10 = pppplVar17;
        local_b8 = pppplVar14;
        if (pppplVar14 != (longlong ****)0x0) {
          pppplVar14[1] = (longlong ***)0x0;
          *(undefined4 *)(pppplVar14 + 2) = 1;
          ppplVar11 = (longlong ***)FUN_140201490("use_cnt02");
          *pppplVar14 = ppplVar11;
          pppplVar10 = pppplVar14;
        }
        local_d8 = pppplVar10;
        if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        local_e8 = (longlong *)local_48;
        local_f0 = 4;
        local_f8 = 1;
        plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,3);
        local_c0 = plVar13;
        if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
        pIVar2 = (IUnknown *)*puVar9;
        if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_c8 != (longlong ****)0x0) {
          (*(code *)(*local_c8)[2])();
        }
        if ((longlong *)*plVar13 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar13 + 0x10))();
        }
        local_c0 = local_88;
        local_98 = *(undefined4 *)(param_2 + 0x35c);
        uStack_94 = *(undefined4 *)(param_2 + 0x360);
        uStack_90 = *(undefined4 *)(param_2 + 0x364);
        uStack_8c = *(undefined4 *)(param_2 + 0x368);
        uVar12 = FUN_140062280(local_88,&local_98);
        pppplVar14 = operator_new(0x18);
        pppplVar10 = pppplVar17;
        local_b8 = pppplVar14;
        if (pppplVar14 != (longlong ****)0x0) {
          pppplVar14[1] = (longlong ***)0x0;
          *(undefined4 *)(pppplVar14 + 2) = 1;
          ppplVar11 = (longlong ***)FUN_140201490("item_id03");
          *pppplVar14 = ppplVar11;
          pppplVar10 = pppplVar14;
        }
        local_d8 = pppplVar10;
        if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        local_f0 = 0x26;
        local_f8 = 1;
        local_e8 = (longlong *)uVar12;
        plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,0xca);
        local_c0 = plVar13;
        if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
        pIVar2 = (IUnknown *)*puVar9;
        if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_c8 != (longlong ****)0x0) {
          (*(code *)(*local_c8)[2])();
        }
        if ((longlong *)*plVar13 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar13 + 0x10))();
        }
        local_c0 = (longlong *)local_48;
        sVar1 = *(short *)(param_2 + 0x36c);
        Ordinal_8(local_48);
        FUN_140062080(local_48,(int)sVar1);
        pppplVar10 = operator_new(0x18);
        local_b8 = pppplVar10;
        if (pppplVar10 != (longlong ****)0x0) {
          pppplVar10[1] = (longlong ***)0x0;
          *(undefined4 *)(pppplVar10 + 2) = 1;
          ppplVar11 = (longlong ***)FUN_140201490("use_cnt03");
          *pppplVar10 = ppplVar11;
          pppplVar17 = pppplVar10;
        }
        local_d8 = pppplVar17;
        if (pppplVar17 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        local_e8 = (longlong *)local_48;
        local_f0 = 4;
        local_f8 = 1;
        plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,3);
        local_c0 = plVar13;
        if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
        pIVar2 = (IUnknown *)*puVar9;
        if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_c8 != (longlong ****)0x0) {
          (*(code *)(*local_c8)[2])();
        }
        if ((longlong *)*plVar13 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar13 + 0x10))();
        }
      }
      goto LAB_140103113;
    }
    local_c0 = local_88;
    local_98 = *(undefined4 *)(param_2 + 0x338);
    uStack_94 = *(undefined4 *)(param_2 + 0x33c);
    uStack_90 = *(undefined4 *)(param_2 + 0x340);
    uStack_8c = *(undefined4 *)(param_2 + 0x344);
    uVar12 = FUN_140062280(local_88,&local_98);
    pppplVar14 = operator_new(0x18);
    pppplVar10 = pppplVar17;
    local_b8 = pppplVar14;
    if (pppplVar14 != (longlong ****)0x0) {
      pppplVar14[1] = (longlong ***)0x0;
      *(undefined4 *)(pppplVar14 + 2) = 1;
      ppplVar11 = (longlong ***)FUN_140201490("item_id01");
      *pppplVar14 = ppplVar11;
      pppplVar10 = pppplVar14;
    }
    local_d8 = pppplVar10;
    if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_f0 = 0x26;
    local_f8 = 1;
    local_e8 = (longlong *)uVar12;
    plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,0xca);
    local_c0 = plVar13;
    if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
    pIVar2 = (IUnknown *)*puVar9;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8 != (longlong ****)0x0) {
      (*(code *)(*local_c8)[2])();
    }
    if ((longlong *)*plVar13 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar13 + 0x10))();
    }
    local_c0 = (longlong *)local_48;
    sVar1 = *(short *)(param_2 + 0x348);
    Ordinal_8(local_48);
    FUN_140062080(local_48,(int)sVar1);
    pppplVar14 = operator_new(0x18);
    pppplVar10 = pppplVar17;
    local_b8 = pppplVar14;
    if (pppplVar14 != (longlong ****)0x0) {
      pppplVar14[1] = (longlong ***)0x0;
      *(undefined4 *)(pppplVar14 + 2) = 1;
      ppplVar11 = (longlong ***)FUN_140201490("use_cnt01");
      *pppplVar14 = ppplVar11;
      pppplVar10 = pppplVar14;
    }
    local_d8 = pppplVar10;
    if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_e8 = (longlong *)local_48;
    local_f0 = 4;
    local_f8 = 1;
    plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,3);
    local_c0 = plVar13;
    if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
    pIVar2 = (IUnknown *)*puVar9;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8 != (longlong ****)0x0) {
      (*(code *)(*local_c8)[2])();
    }
    if ((longlong *)*plVar13 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar13 + 0x10))();
    }
    local_c0 = local_88;
    local_98 = *(undefined4 *)(param_2 + 0x34a);
    uStack_94 = *(undefined4 *)(param_2 + 0x34e);
    uStack_90 = *(undefined4 *)(param_2 + 0x352);
    uStack_8c = *(undefined4 *)(param_2 + 0x356);
    uVar12 = FUN_140062280(local_88,&local_98);
    pppplVar14 = operator_new(0x18);
    pppplVar10 = pppplVar17;
    local_b8 = pppplVar14;
    if (pppplVar14 != (longlong ****)0x0) {
      pppplVar14[1] = (longlong ***)0x0;
      *(undefined4 *)(pppplVar14 + 2) = 1;
      ppplVar11 = (longlong ***)FUN_140201490("item_id02");
      *pppplVar14 = ppplVar11;
      pppplVar10 = pppplVar14;
    }
    local_d8 = pppplVar10;
    if (pppplVar10 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_f0 = 0x26;
    local_f8 = 1;
    local_e8 = (longlong *)uVar12;
    plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,0xca);
    local_c0 = plVar13;
    if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
    pIVar2 = (IUnknown *)*puVar9;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8 != (longlong ****)0x0) {
      (*(code *)(*local_c8)[2])();
    }
    if ((longlong *)*plVar13 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar13 + 0x10))();
    }
    local_c0 = (longlong *)local_48;
    sVar1 = *(short *)(param_2 + 0x35a);
    Ordinal_8(local_48);
    FUN_140062080(local_48,(int)sVar1);
    pppplVar10 = operator_new(0x18);
    local_b8 = pppplVar10;
    if (pppplVar10 != (longlong ****)0x0) {
      pppplVar10[1] = (longlong ***)0x0;
      *(undefined4 *)(pppplVar10 + 2) = 1;
      ppplVar11 = (longlong ***)FUN_140201490("use_cnt02");
      *pppplVar10 = ppplVar11;
      pppplVar17 = pppplVar10;
    }
    local_d8 = pppplVar17;
    if (pppplVar17 == (longlong ****)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_e8 = (longlong *)local_48;
    local_f0 = 4;
    local_f8 = 1;
    plVar13 = (longlong *)FUN_140001880(&local_d0,&local_b0,&local_d8,3);
    local_c0 = plVar13;
    if (local_d0 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar9 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
    pIVar2 = (IUnknown *)*puVar9;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8 != (longlong ****)0x0) {
      (*(code *)(*local_c8)[2])();
    }
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
LAB_140103113:
  FUN_1400016d0(&local_d0,&local_d8);
  if (local_d8 != (longlong ****)0x0) {
    (*(code *)(*local_d8)[2])();
  }
  if (local_d0 != (IUnknown *)0x0) {
    (*local_d0->lpVtbl->Release)(local_d0);
  }
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_140103180(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined6 uVar2;
  IUnknown *This;
  HRESULT HVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  wchar_t *pwVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  wchar_t *pwVar12;
  char *riid;
  char *ppvObject;
  wchar_t *pwVar13;
  uint uVar14;
  wchar_t *pwVar15;
  undefined1 auStackY_728 [32];
  char local_6e8 [4];
  short local_6e4;
  short local_6e0;
  longlong *local_6d8;
  undefined8 local_6d0;
  undefined4 local_6c8;
  undefined2 uStack_6c4;
  ushort uStack_6c2;
  int local_6b8;
  int local_6b4;
  int local_6b0;
  undefined4 uVar16;
  wchar_t *local_6a8;
  wchar_t *local_6a0;
  wchar_t *local_698;
  longlong *local_690;
  LPUNKNOWN local_688 [2];
  IUnknown *local_678;
  longlong *local_670;
  undefined4 local_668;
  undefined1 local_658 [24];
  undefined1 local_640 [24];
  undefined4 local_628;
  undefined1 *local_620;
  undefined4 local_618;
  undefined8 local_610;
  undefined1 *local_608;
  undefined8 *local_5f8;
  wchar_t *local_5f0;
  undefined8 *local_5e8;
  undefined8 local_5e0;
  undefined1 local_5d8;
  undefined8 local_5d0;
  undefined1 local_5c8;
  wchar_t *local_5c0;
  undefined8 local_5b8;
  undefined1 local_5b0;
  undefined8 local_5a8;
  undefined1 local_5a0;
  undefined8 local_598;
  undefined1 local_590;
  undefined8 local_588;
  undefined1 local_580;
  undefined8 local_578;
  undefined1 local_570;
  undefined8 local_568;
  undefined1 local_560;
  undefined8 local_558;
  undefined1 local_550;
  longlong *local_548;
  undefined8 local_540;
  undefined1 local_538;
  undefined8 local_530;
  undefined1 local_528;
  undefined8 local_520;
  undefined1 local_518;
  undefined1 local_510 [16];
  undefined1 local_500 [8];
  undefined1 local_4f8 [16];
  undefined4 local_4e8;
  undefined4 uStack_4e4;
  undefined4 uStack_4e0;
  undefined4 uStack_4dc;
  undefined8 local_4d0;
  undefined1 local_4c0 [24];
  undefined1 local_4a8 [24];
  undefined1 local_490 [24];
  undefined1 local_478 [24];
  longlong local_460 [3];
  undefined1 local_448 [24];
  undefined1 local_430 [24];
  undefined1 local_418 [24];
  undefined1 local_400 [24];
  undefined1 local_3e8 [24];
  undefined1 local_3d0 [24];
  undefined1 local_3b8 [24];
  undefined1 local_3a0 [24];
  IID local_388;
  undefined8 local_378;
  undefined8 uStack_370;
  wchar_t local_368 [12];
  ulonglong local_350;
  wchar_t local_348 [12];
  ulonglong local_330;
  wchar_t local_328 [349];
  undefined2 local_6e;
  undefined4 local_6c;
  undefined2 local_68;
  undefined4 local_66;
  undefined2 local_62;
  undefined8 local_60;
  undefined2 local_58;
  undefined4 local_56;
  ulonglong local_48;
  
  local_4d0 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStackY_728;
  pwVar13 = (wchar_t *)0x0;
  local_678 = (IUnknown *)0x0;
  local_670 = (longlong *)0x0;
  local_5f8 = param_2;
  local_5e8 = param_1;
  Ordinal_8(local_658);
  Ordinal_8(local_640);
  pIVar1 = local_678;
  if ((local_678 != (IUnknown *)0x0) && (local_678 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_608 = &DAT_140281f00;
  local_620 = &DAT_140281f00;
  local_618 = 0;
  local_610 = 0;
  if (local_678 != (IUnknown *)0x0) {
    (*local_678->lpVtbl->Release)(local_678);
  }
  HVar3 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_688
                          );
  if (HVar3 < 0) {
LAB_1401032d4:
    local_678 = (IUnknown *)0x0;
  }
  else {
    HVar3 = OleRun(local_688[0]);
    if (-1 < HVar3) {
      HVar3 = (*local_688[0]->lpVtbl->QueryInterface)(local_688[0],(IID *)&DAT_140281f68,&local_678)
      ;
    }
    (*local_688[0]->lpVtbl->Release)(local_688[0]);
    if (HVar3 < 0) goto LAB_1401032d4;
  }
  local_628 = 2;
  uVar16 = 1;
  local_668 = 1;
  local_6e8[0] = '\x01';
  local_6c8 = *(undefined4 *)(param_2 + 1);
  local_6d0._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_6d0._0_4_ = CONCAT22(0x2359,(short)*param_2);
  pwVar15 = (wchar_t *)0x0;
  uStack_6c4 = 0xac;
  uStack_6c2 = 0;
  uVar14 = 0x12;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_6b4 = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_6b4 != 0) goto LAB_1401034a5;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_678;
    if (local_678 != (IUnknown *)0x0) {
      local_6b8 = 0;
      UVar4 = (*local_678->lpVtbl[0x12].AddRef)(local_678);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_678;
      if (local_6b8 != 0) {
        if (local_678 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*local_678->lpVtbl[10].Release)(local_678);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_678 != (IUnknown *)0x0) {
        (*local_678->lpVtbl->Release)(local_678);
        local_678 = (IUnknown *)0x0;
      }
    }
    local_610 = 0;
    local_608 = &DAT_140281f00;
    local_620 = &DAT_140281f00;
    local_618 = 0;
    local_628 = 0;
    Ordinal_9(local_640);
    Ordinal_9(local_658);
    if (local_670 != (longlong *)0x0) {
      (**(code **)(*local_670 + 0x10))();
    }
    if (local_678 != (IUnknown *)0x0) {
      (*local_678->lpVtbl->Release)(local_678);
    }
    return 0;
  }
LAB_1401034a5:
  local_6d8 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_6d8);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_548);
  FUN_140001710(&local_6d8,*puVar6,"dbo.up_read_mail");
  if (local_548 != (longlong *)0x0) {
    (**(code **)(*local_548 + 0x10))();
  }
  local_690 = local_460;
  local_4e8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_4e4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_4e0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_4dc = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_460,&local_4e8);
  pwVar7 = operator_new(0x18);
  local_5c0 = pwVar13;
  local_5f0 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("character_id");
    *(longlong *)pwVar7 = lVar8;
    local_5c0 = pwVar7;
  }
  if (local_5c0 != (wchar_t *)0x0) {
    plVar9 = (longlong *)FUN_140001880(&local_6d8,local_500,&local_5c0,0xca);
    local_690 = plVar9;
    if (local_6d8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_6d8,&local_5f0);
    pIVar1 = (IUnknown *)*puVar6;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_5f0 != (wchar_t *)0x0) {
        (**(code **)(*(longlong *)local_5f0 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      puVar6 = (undefined8 *)FUN_1400016d0(&local_6d8,&local_690);
      This = local_678;
      pIVar1 = (IUnknown *)*puVar6;
      if (local_678 != pIVar1) {
        local_678 = pIVar1;
        if (pIVar1 != (IUnknown *)0x0) {
          (*pIVar1->lpVtbl->AddRef)(pIVar1);
        }
        if (This != (IUnknown *)0x0) {
          (*This->lpVtbl->Release)(This);
        }
      }
      if (local_690 != (longlong *)0x0) {
        (**(code **)(*local_690 + 0x10))();
      }
      pIVar1 = local_678;
      if (local_678 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_6e0 = 0;
      UVar4 = (*local_678->lpVtbl[6].Release)(local_678);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_6e0 != -1) {
        while( true ) {
          pIVar1 = local_678;
          if (local_678 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          local_6e4 = 0;
          UVar4 = (*local_678->lpVtbl[6].Release)(local_678);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
          if (local_6e4 == -1) break;
          local_388.Data1 = 0;
          local_388.Data2 = 0;
          local_388.Data3 = 0;
          local_388.Data4[0] = '\0';
          local_388.Data4[1] = '\0';
          local_388.Data4[2] = '\0';
          local_388.Data4[3] = '\0';
          local_388.Data4[4] = '\0';
          local_388.Data4[5] = '\0';
          local_388.Data4[6] = '\0';
          local_388.Data4[7] = '\0';
          local_378 = 0;
          uStack_370 = 0;
          local_6c = 0;
          local_68 = 0;
          local_66 = 0;
          local_62 = 0;
          local_60 = 0;
          local_58 = 0;
          local_56 = 0;
          local_368[0] = L'\0';
          local_368[1] = L'\0';
          local_368[2] = L'\0';
          local_368[3] = L'\0';
          local_368[4] = L'\0';
          local_368[5] = L'\0';
          local_368[6] = L'\0';
          local_368[7] = L'\0';
          local_368[8] = L'\0';
          local_368[9] = L'\0';
          local_368[10] = L'\0';
          local_368[0xb] = L'\0';
          local_350 = 0;
          local_348[0] = L'\0';
          local_348[1] = L'\0';
          local_348[2] = L'\0';
          local_348[3] = L'\0';
          local_348[4] = L'\0';
          local_348[5] = L'\0';
          local_348[6] = L'\0';
          local_348[7] = L'\0';
          local_348[8] = L'\0';
          local_348[9] = L'\0';
          local_348[10] = L'\0';
          local_348[0xb] = L'\0';
          local_330 = 0;
          memset(local_328,0,700);
          uVar10 = FUN_140002290(&local_678,local_3b8,&DAT_14029114c,local_6e8);
          FUN_1400625d0(uVar10,local_510);
          Ordinal_9(local_3b8);
          uVar10 = FUN_140002290(&local_678,local_490,"send_character_id",local_6e8);
          FUN_1400625d0(uVar10,local_4f8);
          Ordinal_9(local_490);
          uVar10 = FUN_140002290(&local_678,local_400,"receiver",local_6e8);
          FUN_140062840(uVar10,&local_6a8);
          FUN_1401568c0();
          pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
          if (PTR_DAT_1403200a0 == (undefined *)0x0) {
            pwVar7 = pwVar13;
          }
          if (local_6a8 != (wchar_t *)PTR_DAT_1403200a0) {
            uVar10 = FUN_1401568c0();
            local_5a0 = 0;
            local_5a8 = uVar10;
            FUN_140156b50(uVar10);
            local_5a0 = 1;
            if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar7 + -4 != (wchar_t *)0x0)) {
              uVar11 = FUN_1401568c0();
              local_560 = 0;
              local_568 = uVar11;
              FUN_140156b50(uVar11);
              local_560 = 1;
              pwVar12 = pwVar7 + -2;
              *(int *)pwVar12 = *(int *)pwVar12 + -1;
              if (*(int *)pwVar12 == 0) {
                FUN_140156970(pwVar7 + -4);
              }
              FUN_140156be0(uVar11);
              local_560 = 0;
            }
            pwVar7 = local_6a8;
            if (((local_6a8 != (wchar_t *)PTR_DAT_1403200a0) && (local_6a8 != (wchar_t *)0x0)) &&
               (local_6a8 != (wchar_t *)0x8)) {
              *(int *)(local_6a8 + -2) = *(int *)(local_6a8 + -2) + 1;
            }
            FUN_140156be0(uVar10);
            local_5a0 = 0;
          }
          pwVar12 = pwVar7;
          if (pwVar7 == (wchar_t *)0x0) {
            pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
          }
          wcsncpy(local_348,pwVar12,0xf);
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_528 = 0;
            local_530 = uVar10;
            FUN_140156b50(uVar10);
            local_528 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar10);
            local_528 = 0;
          }
          pwVar7 = local_6a8;
          if (((local_6a8 != (wchar_t *)0x0) && (local_6a8 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar12 = local_6a8 + -4, pwVar12 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_580 = 0;
            local_588 = uVar10;
            FUN_140156b50(uVar10);
            local_580 = 1;
            pwVar7 = pwVar7 + -2;
            *(int *)pwVar7 = *(int *)pwVar7 + -1;
            if (*(int *)pwVar7 == 0) {
              FUN_140156970(pwVar12);
            }
            FUN_140156be0(uVar10);
            local_580 = 0;
          }
          local_6a8 = (wchar_t *)PTR_DAT_1403200a0;
          Ordinal_9(local_400);
          uVar10 = FUN_140002290(&local_678,local_4c0,"sender",local_6e8);
          FUN_140062840(uVar10,&local_698);
          FUN_1401568c0();
          pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
          if (PTR_DAT_1403200a0 == (undefined *)0x0) {
            pwVar7 = pwVar13;
          }
          if (local_698 != (wchar_t *)PTR_DAT_1403200a0) {
            uVar10 = FUN_1401568c0();
            local_5c8 = 0;
            local_5d0 = uVar10;
            FUN_140156b50(uVar10);
            local_5c8 = 1;
            if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar7 + -4 != (wchar_t *)0x0)) {
              uVar11 = FUN_1401568c0();
              local_5d8 = 0;
              local_5e0 = uVar11;
              FUN_140156b50(uVar11);
              local_5d8 = 1;
              pwVar12 = pwVar7 + -2;
              *(int *)pwVar12 = *(int *)pwVar12 + -1;
              if (*(int *)pwVar12 == 0) {
                FUN_140156970(pwVar7 + -4);
              }
              FUN_140156be0(uVar11);
              local_5d8 = 0;
            }
            pwVar7 = local_698;
            if (((local_698 != (wchar_t *)PTR_DAT_1403200a0) && (local_698 != (wchar_t *)0x0)) &&
               (local_698 != (wchar_t *)0x8)) {
              *(int *)(local_698 + -2) = *(int *)(local_698 + -2) + 1;
            }
            FUN_140156be0(uVar10);
            local_5c8 = 0;
          }
          pwVar12 = pwVar7;
          if (pwVar7 == (wchar_t *)0x0) {
            pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
          }
          wcsncpy(local_368,pwVar12,0xf);
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_5b0 = 0;
            local_5b8 = uVar10;
            FUN_140156b50(uVar10);
            local_5b0 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar10);
            local_5b0 = 0;
          }
          pwVar7 = local_698;
          if (((local_698 != (wchar_t *)0x0) && (local_698 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar12 = local_698 + -4, pwVar12 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_590 = 0;
            local_598 = uVar10;
            FUN_140156b50(uVar10);
            local_590 = 1;
            pwVar7 = pwVar7 + -2;
            *(int *)pwVar7 = *(int *)pwVar7 + -1;
            if (*(int *)pwVar7 == 0) {
              FUN_140156970(pwVar12);
            }
            FUN_140156be0(uVar10);
            local_590 = 0;
          }
          local_698 = (wchar_t *)PTR_DAT_1403200a0;
          Ordinal_9(local_4c0);
          uVar10 = FUN_140002290(&local_678,local_3a0,&DAT_14028984c,local_6e8);
          FUN_140062840(uVar10,&local_6a0);
          FUN_1401568c0();
          pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
          if (PTR_DAT_1403200a0 == (undefined *)0x0) {
            pwVar7 = pwVar13;
          }
          if (local_6a0 != (wchar_t *)PTR_DAT_1403200a0) {
            uVar10 = FUN_1401568c0();
            local_550 = 0;
            local_558 = uVar10;
            FUN_140156b50(uVar10);
            local_550 = 1;
            if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar7 + -4 != (wchar_t *)0x0)) {
              uVar11 = FUN_1401568c0();
              local_570 = 0;
              local_578 = uVar11;
              FUN_140156b50(uVar11);
              local_570 = 1;
              pwVar12 = pwVar7 + -2;
              *(int *)pwVar12 = *(int *)pwVar12 + -1;
              if (*(int *)pwVar12 == 0) {
                FUN_140156970(pwVar7 + -4);
              }
              FUN_140156be0(uVar11);
              local_570 = 0;
            }
            pwVar7 = local_6a0;
            if (((local_6a0 != (wchar_t *)PTR_DAT_1403200a0) && (local_6a0 != (wchar_t *)0x0)) &&
               (local_6a0 != (wchar_t *)0x8)) {
              *(int *)(local_6a0 + -2) = *(int *)(local_6a0 + -2) + 1;
            }
            FUN_140156be0(uVar10);
            local_550 = 0;
          }
          pwVar12 = pwVar7;
          if (pwVar7 == (wchar_t *)0x0) {
            pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
          }
          wcsncpy(local_328,pwVar12,0x15d);
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_538 = 0;
            local_540 = uVar10;
            FUN_140156b50(uVar10);
            local_538 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar10);
            local_538 = 0;
          }
          pwVar7 = local_6a0;
          if (((local_6a0 != (wchar_t *)0x0) && (local_6a0 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar12 = local_6a0 + -4, pwVar12 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_518 = 0;
            local_520 = uVar10;
            FUN_140156b50(uVar10);
            local_518 = 1;
            pwVar7 = pwVar7 + -2;
            *(int *)pwVar7 = *(int *)pwVar7 + -1;
            if (*(int *)pwVar7 == 0) {
              FUN_140156970(pwVar12);
            }
            FUN_140156be0(uVar10);
            local_518 = 0;
          }
          local_6a0 = (wchar_t *)PTR_DAT_1403200a0;
          Ordinal_9(local_3a0);
          local_330 = local_330 & 0xffffffffffff;
          local_350 = local_350 & 0xffffffffffff;
          local_6e = 0;
          uVar10 = FUN_140002290(&local_678,local_430,&DAT_14028cd44,local_6e8);
          FUN_140182560(uVar10);
          local_6c = FUN_140062550(uVar10);
          Ordinal_9(local_430);
          uVar10 = FUN_140002290(&local_678,local_3d0,"return_day",local_6e8);
          FUN_140182560(uVar10);
          local_68 = FUN_140062550(uVar10);
          Ordinal_9(local_3d0);
          uVar10 = FUN_140002290(&local_678,local_4a8,"req_gold",local_6e8);
          FUN_140182560(uVar10);
          local_66 = FUN_140062550(uVar10);
          Ordinal_9(local_4a8);
          uVar10 = FUN_140002290(&local_678,local_478,"is_open",local_6e8);
          FUN_140182560(uVar10);
          local_62 = FUN_140062550(uVar10);
          Ordinal_9(local_478);
          uVar10 = FUN_140002290(&local_678,local_448,"create_time",local_6e8);
          FUN_140182560(uVar10);
          local_60 = FUN_140098d80(uVar10);
          Ordinal_9(local_448);
          uVar10 = FUN_140002290(&local_678,local_418,"create_type",local_6e8);
          FUN_140182560(uVar10);
          local_58 = FUN_140062550(uVar10);
          Ordinal_9(local_418);
          uVar10 = FUN_140002290(&local_678,local_3e8,"diff_day",local_6e8);
          FUN_140182560(uVar10);
          local_56 = FUN_140062550(uVar10);
          Ordinal_9(local_3e8);
          riid = (char *)&local_388;
          ppvObject = (char *)0x336;
          memcpy((void *)((longlong)(int)uVar14 + 0x130 + (longlong)param_1),riid,0x336);
          uVar14 = uVar14 + 0x336;
          uStack_6c2 = (short)pwVar15 + 1;
          pwVar15 = (wchar_t *)(ulonglong)uStack_6c2;
          if (50000 < uVar14) {
            uVar2 = local_6d0._2_6_;
            local_6d0 = CONCAT62(local_6d0._2_6_,(short)uVar14);
            uVar10 = local_6d0;
            riid = (char *)(param_1 + 0x26);
            local_6d0._4_2_ = SUB62(uVar2,2);
            local_6d0._6_2_ = SUB62(uVar2,4);
            ((IID *)riid)->Data1 = (undefined4)local_6d0;
            ((IID *)riid)->Data2 = local_6d0._4_2_;
            ((IID *)riid)->Data3 = local_6d0._6_2_;
            param_1[0x27] = CONCAT26(uStack_6c2,CONCAT24(uStack_6c4,local_6c8));
            *(undefined2 *)(param_1 + 0x28) = 0;
            local_6d0 = uVar10;
            iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
            if (iVar5 == 0) {
              ppvObject = "DB Result Queue push error";
              riid = "DBResultQueue_Error.Log";
              FUN_1400a0b40(param_1[0x23]);
            }
            uVar14 = 0x12;
            uStack_6c2 = 0;
            pwVar15 = pwVar13;
          }
          pIVar1 = local_678;
          if (local_678 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          HVar3 = (*local_678->lpVtbl[0xc].QueryInterface)(local_678,(IID *)riid,(void **)ppvObject)
          ;
          if (HVar3 < 0) {
            _com_issue_errorex(HVar3,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_6e8[0] == '\0') {
          uStack_6c4 = 0xad;
          uVar16 = 0;
        }
      }
      local_6d0 = CONCAT62(local_6d0._2_6_,(short)uVar14);
      param_1[0x26] = local_6d0;
      param_1[0x27] = CONCAT26(uStack_6c2,CONCAT24(uStack_6c4,local_6c8));
      *(undefined2 *)(param_1 + 0x28) = 0;
      iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar5 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      if (local_6d8 != (longlong *)0x0) {
        (**(code **)(*local_6d8 + 0x10))();
      }
      pIVar1 = local_678;
      if (local_678 != (IUnknown *)0x0) {
        local_6b0 = 0;
        UVar4 = (*local_678->lpVtbl[0x12].AddRef)(local_678);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_678;
        if (local_6b0 != 0) {
          if (local_678 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar4 = (*local_678->lpVtbl[10].Release)(local_678);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_678 != (IUnknown *)0x0) {
          (*local_678->lpVtbl->Release)(local_678);
          local_678 = (IUnknown *)0x0;
        }
      }
      local_610 = 0;
      local_608 = &DAT_140281f00;
      local_620 = &DAT_140281f00;
      local_618 = 0;
      local_628 = 0;
      Ordinal_9(local_640);
      Ordinal_9(local_658);
      if (local_670 != (longlong *)0x0) {
        (**(code **)(*local_670 + 0x10))();
      }
      if (local_678 != (IUnknown *)0x0) {
        (*local_678->lpVtbl->Release)(local_678);
      }
      return uVar16;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_1401043a0(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140104433;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140104433:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_update_clear_mail");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("mail_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_140104620(undefined8 *param_1,longlong param_2)

{
  char cVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1401046b6;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1401046b6:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_mail_open");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("mail_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  cVar1 = *(char *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,(int)cVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("is_open");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,0x10,1,1,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_1401049c0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined6 uVar2;
  IUnknown *This;
  HRESULT HVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  wchar_t *pwVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  wchar_t *pwVar12;
  char *riid;
  char *ppvObject;
  wchar_t *pwVar13;
  uint uVar14;
  wchar_t *pwVar15;
  undefined1 auStackY_718 [32];
  char local_6d8 [4];
  undefined2 local_6d4;
  short local_6d0;
  short local_6cc;
  longlong *local_6c8;
  undefined8 local_6c0;
  undefined4 local_6b8;
  undefined2 uStack_6b4;
  ushort uStack_6b2;
  int local_6a8;
  int local_6a4;
  int local_6a0;
  undefined4 uVar16;
  wchar_t *local_698;
  wchar_t *local_690;
  wchar_t *local_688;
  longlong *local_680;
  LPUNKNOWN local_678 [2];
  IUnknown *local_668;
  longlong *local_660;
  undefined4 local_658;
  undefined1 local_648 [24];
  undefined1 local_630 [24];
  undefined4 local_618;
  undefined1 *local_610;
  undefined4 local_608;
  undefined8 local_600;
  undefined1 *local_5f8;
  undefined8 *local_5e8;
  wchar_t *local_5e0;
  undefined8 *local_5d8;
  undefined8 local_5d0;
  undefined1 local_5c8;
  undefined8 local_5c0;
  undefined1 local_5b8;
  wchar_t *local_5b0;
  undefined8 local_5a8;
  undefined1 local_5a0;
  undefined8 local_598;
  undefined1 local_590;
  undefined8 local_588;
  undefined1 local_580;
  longlong *local_578;
  undefined8 local_570;
  undefined1 local_568;
  undefined8 local_560;
  undefined1 local_558;
  undefined8 local_550;
  undefined1 local_548;
  undefined8 local_540;
  undefined1 local_538;
  undefined8 local_530;
  undefined1 local_528;
  undefined8 local_520;
  undefined1 local_518;
  undefined8 local_510;
  undefined1 local_508;
  undefined1 local_500 [16];
  undefined1 local_4f0 [8];
  undefined1 local_4e8 [16];
  undefined4 local_4d8;
  undefined4 uStack_4d4;
  undefined4 uStack_4d0;
  undefined4 uStack_4cc;
  undefined8 local_4c0;
  undefined1 local_4b0 [24];
  undefined1 local_498 [24];
  undefined1 local_480 [24];
  undefined1 local_468 [24];
  undefined1 local_450 [24];
  undefined1 local_438 [24];
  undefined1 local_420 [24];
  undefined1 local_408 [24];
  undefined1 local_3f0 [24];
  undefined1 local_3d8 [24];
  undefined1 local_3c0 [24];
  longlong local_3a8 [4];
  IID local_388;
  undefined8 local_378;
  undefined8 uStack_370;
  wchar_t local_368 [12];
  ulonglong local_350;
  wchar_t local_348 [12];
  ulonglong local_330;
  wchar_t local_328 [349];
  undefined2 local_6e;
  undefined4 local_6c;
  undefined2 local_68;
  undefined4 local_66;
  undefined2 local_62;
  undefined8 local_60;
  undefined2 local_58;
  undefined4 local_56;
  ulonglong local_48;
  
  local_4c0 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStackY_718;
  pwVar13 = (wchar_t *)0x0;
  local_668 = (IUnknown *)0x0;
  local_660 = (longlong *)0x0;
  local_5e8 = param_2;
  local_5d8 = param_1;
  Ordinal_8(local_648);
  Ordinal_8(local_630);
  pIVar1 = local_668;
  if ((local_668 != (IUnknown *)0x0) && (local_668 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_5f8 = &DAT_140281f00;
  local_610 = &DAT_140281f00;
  local_608 = 0;
  local_600 = 0;
  if (local_668 != (IUnknown *)0x0) {
    (*local_668->lpVtbl->Release)(local_668);
  }
  HVar3 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_678
                          );
  if (HVar3 < 0) {
LAB_140104b14:
    local_668 = (IUnknown *)0x0;
  }
  else {
    HVar3 = OleRun(local_678[0]);
    if (-1 < HVar3) {
      HVar3 = (*local_678[0]->lpVtbl->QueryInterface)(local_678[0],(IID *)&DAT_140281f68,&local_668)
      ;
    }
    (*local_678[0]->lpVtbl->Release)(local_678[0]);
    if (HVar3 < 0) goto LAB_140104b14;
  }
  local_618 = 2;
  uVar16 = 1;
  local_658 = 1;
  local_6d8[0] = '\x01';
  local_6b8 = *(undefined4 *)(param_2 + 1);
  local_6c0._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_6c0._0_4_ = CONCAT22(0x2390,(short)*param_2);
  pwVar15 = (wchar_t *)0x0;
  uStack_6b4 = 0xac;
  uStack_6b2 = 0;
  local_6d4 = 1;
  uVar14 = 0x12;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_6a8 = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_6a8 != 0) goto LAB_140104ce8;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_668;
    if (local_668 != (IUnknown *)0x0) {
      local_6a4 = 0;
      UVar4 = (*local_668->lpVtbl[0x12].AddRef)(local_668);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_668;
      if (local_6a4 != 0) {
        if (local_668 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*local_668->lpVtbl[10].Release)(local_668);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_668 != (IUnknown *)0x0) {
        (*local_668->lpVtbl->Release)(local_668);
        local_668 = (IUnknown *)0x0;
      }
    }
    local_600 = 0;
    local_5f8 = &DAT_140281f00;
    local_610 = &DAT_140281f00;
    local_608 = 0;
    local_618 = 0;
    Ordinal_9(local_630);
    Ordinal_9(local_648);
    if (local_660 != (longlong *)0x0) {
      (**(code **)(*local_660 + 0x10))();
    }
    if (local_668 != (IUnknown *)0x0) {
      (*local_668->lpVtbl->Release)(local_668);
    }
    return 0;
  }
LAB_140104ce8:
  local_6c8 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_6c8);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_578);
  FUN_140001710(&local_6c8,*puVar6,"dbo.up_read_new_mail");
  if (local_578 != (longlong *)0x0) {
    (**(code **)(*local_578 + 0x10))();
  }
  local_680 = local_3a8;
  local_4d8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_4d4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_4d0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_4cc = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_3a8,&local_4d8);
  pwVar7 = operator_new(0x18);
  local_5b0 = pwVar13;
  local_5e0 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("character_id");
    *(longlong *)pwVar7 = lVar8;
    local_5b0 = pwVar7;
  }
  if (local_5b0 != (wchar_t *)0x0) {
    plVar9 = (longlong *)FUN_140001880(&local_6c8,local_4f0,&local_5b0,0xca);
    local_680 = plVar9;
    if (local_6c8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_6c8,&local_5e0);
    pIVar1 = (IUnknown *)*puVar6;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_5e0 != (wchar_t *)0x0) {
        (**(code **)(*(longlong *)local_5e0 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      puVar6 = (undefined8 *)FUN_1400016d0(&local_6c8,&local_680);
      This = local_668;
      pIVar1 = (IUnknown *)*puVar6;
      if (local_668 != pIVar1) {
        local_668 = pIVar1;
        if (pIVar1 != (IUnknown *)0x0) {
          (*pIVar1->lpVtbl->AddRef)(pIVar1);
        }
        if (This != (IUnknown *)0x0) {
          (*This->lpVtbl->Release)(This);
        }
      }
      if (local_680 != (longlong *)0x0) {
        (**(code **)(*local_680 + 0x10))();
      }
      pIVar1 = local_668;
      if (local_668 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_6cc = 0;
      UVar4 = (*local_668->lpVtbl[6].Release)(local_668);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_6cc != -1) {
        while( true ) {
          pIVar1 = local_668;
          if (local_668 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          local_6d0 = 0;
          UVar4 = (*local_668->lpVtbl[6].Release)(local_668);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
          if (local_6d0 == -1) break;
          local_388.Data1 = 0;
          local_388.Data2 = 0;
          local_388.Data3 = 0;
          local_388.Data4[0] = '\0';
          local_388.Data4[1] = '\0';
          local_388.Data4[2] = '\0';
          local_388.Data4[3] = '\0';
          local_388.Data4[4] = '\0';
          local_388.Data4[5] = '\0';
          local_388.Data4[6] = '\0';
          local_388.Data4[7] = '\0';
          local_378 = 0;
          uStack_370 = 0;
          local_6c = 0;
          local_68 = 0;
          local_66 = 0;
          local_62 = 0;
          local_60 = 0;
          local_58 = 0;
          local_56 = 0;
          local_368[0] = L'\0';
          local_368[1] = L'\0';
          local_368[2] = L'\0';
          local_368[3] = L'\0';
          local_368[4] = L'\0';
          local_368[5] = L'\0';
          local_368[6] = L'\0';
          local_368[7] = L'\0';
          local_368[8] = L'\0';
          local_368[9] = L'\0';
          local_368[10] = L'\0';
          local_368[0xb] = L'\0';
          local_350 = 0;
          local_348[0] = L'\0';
          local_348[1] = L'\0';
          local_348[2] = L'\0';
          local_348[3] = L'\0';
          local_348[4] = L'\0';
          local_348[5] = L'\0';
          local_348[6] = L'\0';
          local_348[7] = L'\0';
          local_348[8] = L'\0';
          local_348[9] = L'\0';
          local_348[10] = L'\0';
          local_348[0xb] = L'\0';
          local_330 = 0;
          memset(local_328,0,700);
          uVar10 = FUN_140002290(&local_668,local_3c0,&DAT_14029114c,local_6d8);
          FUN_1400625d0(uVar10,local_500);
          Ordinal_9(local_3c0);
          uVar10 = FUN_140002290(&local_668,local_408,"send_character_id",local_6d8);
          FUN_1400625d0(uVar10,local_4e8);
          Ordinal_9(local_408);
          uVar10 = FUN_140002290(&local_668,local_468,"receiver",local_6d8);
          FUN_140062840(uVar10,&local_698);
          FUN_1401568c0();
          pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
          if (PTR_DAT_1403200a0 == (undefined *)0x0) {
            pwVar7 = pwVar13;
          }
          if (local_698 != (wchar_t *)PTR_DAT_1403200a0) {
            uVar10 = FUN_1401568c0();
            local_590 = 0;
            local_598 = uVar10;
            FUN_140156b50(uVar10);
            local_590 = 1;
            if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar7 + -4 != (wchar_t *)0x0)) {
              uVar11 = FUN_1401568c0();
              local_558 = 0;
              local_560 = uVar11;
              FUN_140156b50(uVar11);
              local_558 = 1;
              pwVar12 = pwVar7 + -2;
              *(int *)pwVar12 = *(int *)pwVar12 + -1;
              if (*(int *)pwVar12 == 0) {
                FUN_140156970(pwVar7 + -4);
              }
              FUN_140156be0(uVar11);
              local_558 = 0;
            }
            pwVar7 = local_698;
            if (((local_698 != (wchar_t *)PTR_DAT_1403200a0) && (local_698 != (wchar_t *)0x0)) &&
               (local_698 != (wchar_t *)0x8)) {
              *(int *)(local_698 + -2) = *(int *)(local_698 + -2) + 1;
            }
            FUN_140156be0(uVar10);
            local_590 = 0;
          }
          pwVar12 = pwVar7;
          if (pwVar7 == (wchar_t *)0x0) {
            pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
          }
          wcsncpy(local_348,pwVar12,0xf);
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_518 = 0;
            local_520 = uVar10;
            FUN_140156b50(uVar10);
            local_518 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar10);
            local_518 = 0;
          }
          pwVar7 = local_698;
          if (((local_698 != (wchar_t *)0x0) && (local_698 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar12 = local_698 + -4, pwVar12 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_5c8 = 0;
            local_5d0 = uVar10;
            FUN_140156b50(uVar10);
            local_5c8 = 1;
            pwVar7 = pwVar7 + -2;
            *(int *)pwVar7 = *(int *)pwVar7 + -1;
            if (*(int *)pwVar7 == 0) {
              FUN_140156970(pwVar12);
            }
            FUN_140156be0(uVar10);
            local_5c8 = 0;
          }
          local_698 = (wchar_t *)PTR_DAT_1403200a0;
          Ordinal_9(local_468);
          uVar10 = FUN_140002290(&local_668,local_4b0,"sender",local_6d8);
          FUN_140062840(uVar10,&local_688);
          FUN_1401568c0();
          pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
          if (PTR_DAT_1403200a0 == (undefined *)0x0) {
            pwVar7 = pwVar13;
          }
          if (local_688 != (wchar_t *)PTR_DAT_1403200a0) {
            uVar10 = FUN_1401568c0();
            local_5b8 = 0;
            local_5c0 = uVar10;
            FUN_140156b50(uVar10);
            local_5b8 = 1;
            if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar7 + -4 != (wchar_t *)0x0)) {
              uVar11 = FUN_1401568c0();
              local_538 = 0;
              local_540 = uVar11;
              FUN_140156b50(uVar11);
              local_538 = 1;
              pwVar12 = pwVar7 + -2;
              *(int *)pwVar12 = *(int *)pwVar12 + -1;
              if (*(int *)pwVar12 == 0) {
                FUN_140156970(pwVar7 + -4);
              }
              FUN_140156be0(uVar11);
              local_538 = 0;
            }
            pwVar7 = local_688;
            if (((local_688 != (wchar_t *)PTR_DAT_1403200a0) && (local_688 != (wchar_t *)0x0)) &&
               (local_688 != (wchar_t *)0x8)) {
              *(int *)(local_688 + -2) = *(int *)(local_688 + -2) + 1;
            }
            FUN_140156be0(uVar10);
            local_5b8 = 0;
          }
          pwVar12 = pwVar7;
          if (pwVar7 == (wchar_t *)0x0) {
            pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
          }
          wcsncpy(local_368,pwVar12,0xf);
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_5a0 = 0;
            local_5a8 = uVar10;
            FUN_140156b50(uVar10);
            local_5a0 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar10);
            local_5a0 = 0;
          }
          pwVar7 = local_688;
          if (((local_688 != (wchar_t *)0x0) && (local_688 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar12 = local_688 + -4, pwVar12 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_580 = 0;
            local_588 = uVar10;
            FUN_140156b50(uVar10);
            local_580 = 1;
            pwVar7 = pwVar7 + -2;
            *(int *)pwVar7 = *(int *)pwVar7 + -1;
            if (*(int *)pwVar7 == 0) {
              FUN_140156970(pwVar12);
            }
            FUN_140156be0(uVar10);
            local_580 = 0;
          }
          local_688 = (wchar_t *)PTR_DAT_1403200a0;
          Ordinal_9(local_4b0);
          uVar10 = FUN_140002290(&local_668,local_438,&DAT_14028984c,local_6d8);
          FUN_140062840(uVar10,&local_690);
          FUN_1401568c0();
          pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
          if (PTR_DAT_1403200a0 == (undefined *)0x0) {
            pwVar7 = pwVar13;
          }
          if (local_690 != (wchar_t *)PTR_DAT_1403200a0) {
            uVar10 = FUN_1401568c0();
            local_548 = 0;
            local_550 = uVar10;
            FUN_140156b50(uVar10);
            local_548 = 1;
            if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
               (pwVar7 + -4 != (wchar_t *)0x0)) {
              uVar11 = FUN_1401568c0();
              local_568 = 0;
              local_570 = uVar11;
              FUN_140156b50(uVar11);
              local_568 = 1;
              pwVar12 = pwVar7 + -2;
              *(int *)pwVar12 = *(int *)pwVar12 + -1;
              if (*(int *)pwVar12 == 0) {
                FUN_140156970(pwVar7 + -4);
              }
              FUN_140156be0(uVar11);
              local_568 = 0;
            }
            pwVar7 = local_690;
            if (((local_690 != (wchar_t *)PTR_DAT_1403200a0) && (local_690 != (wchar_t *)0x0)) &&
               (local_690 != (wchar_t *)0x8)) {
              *(int *)(local_690 + -2) = *(int *)(local_690 + -2) + 1;
            }
            FUN_140156be0(uVar10);
            local_548 = 0;
          }
          pwVar12 = pwVar7;
          if (pwVar7 == (wchar_t *)0x0) {
            pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
          }
          wcsncpy(local_328,pwVar12,0x15d);
          if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar7 + -4 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_528 = 0;
            local_530 = uVar10;
            FUN_140156b50(uVar10);
            local_528 = 1;
            pwVar12 = pwVar7 + -2;
            *(int *)pwVar12 = *(int *)pwVar12 + -1;
            if (*(int *)pwVar12 == 0) {
              FUN_140156970(pwVar7 + -4);
            }
            FUN_140156be0(uVar10);
            local_528 = 0;
          }
          pwVar7 = local_690;
          if (((local_690 != (wchar_t *)0x0) && (local_690 != (wchar_t *)PTR_DAT_1403200a0)) &&
             (pwVar12 = local_690 + -4, pwVar12 != (wchar_t *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_508 = 0;
            local_510 = uVar10;
            FUN_140156b50(uVar10);
            local_508 = 1;
            pwVar7 = pwVar7 + -2;
            *(int *)pwVar7 = *(int *)pwVar7 + -1;
            if (*(int *)pwVar7 == 0) {
              FUN_140156970(pwVar12);
            }
            FUN_140156be0(uVar10);
            local_508 = 0;
          }
          local_690 = (wchar_t *)PTR_DAT_1403200a0;
          Ordinal_9(local_438);
          local_330 = local_330 & 0xffffffffffff;
          local_350 = local_350 & 0xffffffffffff;
          local_6e = 0;
          uVar10 = FUN_140002290(&local_668,local_3d8,&DAT_14028cd44,local_6d8);
          FUN_140182560(uVar10);
          local_6c = FUN_140062550(uVar10);
          Ordinal_9(local_3d8);
          uVar10 = FUN_140002290(&local_668,local_498,"return_day",local_6d8);
          FUN_140182560(uVar10);
          local_68 = FUN_140062550(uVar10);
          Ordinal_9(local_498);
          uVar10 = FUN_140002290(&local_668,local_480,"req_gold",local_6d8);
          FUN_140182560(uVar10);
          local_66 = FUN_140062550(uVar10);
          Ordinal_9(local_480);
          uVar10 = FUN_140002290(&local_668,local_450,"is_open",local_6d8);
          FUN_140182560(uVar10);
          local_62 = FUN_140062550(uVar10);
          Ordinal_9(local_450);
          uVar10 = FUN_140002290(&local_668,local_420,"create_time",local_6d8);
          FUN_140182560(uVar10);
          local_60 = FUN_140098d80(uVar10);
          Ordinal_9(local_420);
          uVar10 = FUN_140002290(&local_668,local_3f0,"create_type",local_6d8);
          FUN_140182560(uVar10);
          local_58 = FUN_140062550(uVar10);
          Ordinal_9(local_3f0);
          riid = (char *)&local_388;
          ppvObject = (char *)0x336;
          memcpy((void *)((longlong)(int)uVar14 + 0x130 + (longlong)param_1),riid,0x336);
          uVar14 = uVar14 + 0x336;
          uStack_6b2 = (short)pwVar15 + 1;
          pwVar15 = (wchar_t *)(ulonglong)uStack_6b2;
          if (50000 < uVar14) {
            uVar2 = local_6c0._2_6_;
            local_6c0 = CONCAT62(local_6c0._2_6_,(short)uVar14);
            uVar10 = local_6c0;
            riid = (char *)(param_1 + 0x26);
            local_6c0._4_2_ = SUB62(uVar2,2);
            local_6c0._6_2_ = SUB62(uVar2,4);
            ((IID *)riid)->Data1 = (undefined4)local_6c0;
            ((IID *)riid)->Data2 = local_6c0._4_2_;
            ((IID *)riid)->Data3 = local_6c0._6_2_;
            param_1[0x27] = CONCAT26(uStack_6b2,CONCAT24(uStack_6b4,local_6b8));
            *(undefined2 *)(param_1 + 0x28) = local_6d4;
            local_6c0 = uVar10;
            iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
            if (iVar5 == 0) {
              ppvObject = "DB Result Queue push error";
              riid = "DBResultQueue_Error.Log";
              FUN_1400a0b40(param_1[0x23]);
            }
            uVar14 = 0x12;
            uStack_6b2 = 0;
            pwVar15 = pwVar13;
          }
          pIVar1 = local_668;
          if (local_668 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          HVar3 = (*local_668->lpVtbl[0xc].QueryInterface)(local_668,(IID *)riid,(void **)ppvObject)
          ;
          if (HVar3 < 0) {
            _com_issue_errorex(HVar3,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_6d8[0] == '\0') {
          uStack_6b4 = 0xad;
          uVar16 = 0;
        }
      }
      local_6c0 = CONCAT62(local_6c0._2_6_,(short)uVar14);
      param_1[0x26] = local_6c0;
      param_1[0x27] = CONCAT26(uStack_6b2,CONCAT24(uStack_6b4,local_6b8));
      *(undefined2 *)(param_1 + 0x28) = local_6d4;
      iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
      if (iVar5 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      if (local_6c8 != (longlong *)0x0) {
        (**(code **)(*local_6c8 + 0x10))();
      }
      pIVar1 = local_668;
      if (local_668 != (IUnknown *)0x0) {
        local_6a0 = 0;
        UVar4 = (*local_668->lpVtbl[0x12].AddRef)(local_668);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_668;
        if (local_6a0 != 0) {
          if (local_668 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar4 = (*local_668->lpVtbl[10].Release)(local_668);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_668 != (IUnknown *)0x0) {
          (*local_668->lpVtbl->Release)(local_668);
          local_668 = (IUnknown *)0x0;
        }
      }
      local_600 = 0;
      local_5f8 = &DAT_140281f00;
      local_610 = &DAT_140281f00;
      local_608 = 0;
      local_618 = 0;
      Ordinal_9(local_630);
      Ordinal_9(local_648);
      if (local_660 != (longlong *)0x0) {
        (**(code **)(*local_660 + 0x10))();
      }
      if (local_668 != (IUnknown *)0x0) {
        (*local_668->lpVtbl->Release)(local_668);
      }
      return uVar16;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_140105ba0(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [4];
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140105c36;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140105c36:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_mail_item_move");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("mail_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("item_id01");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  sVar1 = *(short *)(param_2 + 0x4e);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,(int)sVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("page_01");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  sVar1 = *(short *)(param_2 + 0x54);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,(int)sVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("slot_01");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_68 = local_58;
  local_88 = *(undefined4 *)(param_2 + 0x5a);
  uStack_84 = *(undefined4 *)(param_2 + 0x5e);
  uStack_80 = *(undefined4 *)(param_2 + 0x62);
  uStack_7c = *(undefined4 *)(param_2 + 0x66);
  uVar6 = FUN_140062280(local_58,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("over_item_id01");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
  local_68 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = local_58;
    local_88 = *(undefined4 *)(param_2 + 0x2e);
    uStack_84 = *(undefined4 *)(param_2 + 0x32);
    uStack_80 = *(undefined4 *)(param_2 + 0x36);
    uStack_7c = *(undefined4 *)(param_2 + 0x3a);
    uVar6 = FUN_140062280(local_58,&local_88);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("item_id02");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    sVar1 = *(short *)(param_2 + 0x50);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,(int)sVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("page_02");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      sVar1 = *(short *)(param_2 + 0x56);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,(int)sVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("slot_02");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = local_58;
      local_88 = *(undefined4 *)(param_2 + 0x6a);
      uStack_84 = *(undefined4 *)(param_2 + 0x6e);
      uStack_80 = *(undefined4 *)(param_2 + 0x72);
      uStack_7c = *(undefined4 *)(param_2 + 0x76);
      uVar6 = FUN_140062280(local_58,&local_88);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("over_item_id02");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = local_58;
      local_88 = *(undefined4 *)(param_2 + 0x3e);
      uStack_84 = *(undefined4 *)(param_2 + 0x42);
      uStack_80 = *(undefined4 *)(param_2 + 0x46);
      uStack_7c = *(undefined4 *)(param_2 + 0x4a);
      uVar6 = FUN_140062280(local_58,&local_88);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("item_id03");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_68 = (longlong *)&local_88;
        sVar1 = *(short *)(param_2 + 0x52);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,(int)sVar1);
        plVar7 = operator_new(0x18);
        plVar9 = plVar10;
        local_98[0] = plVar7;
        if (plVar7 != (longlong *)0x0) {
          plVar7[1] = 0;
          *(undefined4 *)(plVar7 + 2) = 1;
          lVar8 = FUN_140201490("page_03");
          *plVar7 = lVar8;
          plVar9 = plVar7;
        }
        local_res18 = plVar9;
        if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
        local_68 = plVar9;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_68 = (longlong *)&local_88;
        sVar1 = *(short *)(param_2 + 0x58);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,(int)sVar1);
        plVar7 = operator_new(0x18);
        plVar9 = plVar10;
        local_98[0] = plVar7;
        if (plVar7 != (longlong *)0x0) {
          plVar7[1] = 0;
          *(undefined4 *)(plVar7 + 2) = 1;
          lVar8 = FUN_140201490("slot_03");
          *plVar7 = lVar8;
          plVar9 = plVar7;
        }
        local_res18 = plVar9;
        if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
        local_68 = plVar9;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar9 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar9 + 0x10))();
          }
          local_68 = local_58;
          local_88 = *(undefined4 *)(param_2 + 0x7a);
          uStack_84 = *(undefined4 *)(param_2 + 0x7e);
          uStack_80 = *(undefined4 *)(param_2 + 0x82);
          uStack_7c = *(undefined4 *)(param_2 + 0x86);
          uVar6 = FUN_140062280(local_58,&local_88);
          plVar9 = operator_new(0x18);
          local_98[0] = plVar9;
          if (plVar9 != (longlong *)0x0) {
            plVar9[1] = 0;
            *(undefined4 *)(plVar9 + 2) = 1;
            lVar8 = FUN_140201490("over_item_id03");
            *plVar9 = lVar8;
            plVar10 = plVar9;
          }
          local_res18 = plVar10;
          if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x8007000e);
          }
          plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x26,uVar6)
          ;
          local_68 = plVar10;
          if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
          pIVar2 = (IUnknown *)*puVar5;
          if (pIVar2 != (IUnknown *)0x0) {
            UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
            if ((int)UVar3 < 0) {
              _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
            }
            if (local_a8 != (longlong *)0x0) {
              (**(code **)(*local_a8 + 0x10))();
            }
            if ((longlong *)*plVar10 != (longlong *)0x0) {
              (**(code **)(*(longlong *)*plVar10 + 0x10))();
            }
            FUN_1400016d0(&local_res20,&local_res18);
            if (local_res18 != (longlong *)0x0) {
              (**(code **)(*local_res18 + 0x10))();
            }
            if (local_res20 != (longlong *)0x0) {
              (**(code **)(*local_res20 + 0x10))();
            }
            return 1;
          }
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x000140107d42)
// WARNING: Removing unreachable block (ram,0x000140107d4f)
// WARNING: Removing unreachable block (ram,0x000140107d5a)
// WARNING: Removing unreachable block (ram,0x000140107d6a)

undefined4 FUN_140106c50(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined6 uVar2;
  IUnknown *This;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  undefined8 *puVar6;
  wchar_t *pwVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  wchar_t *pwVar12;
  char *riid;
  char *ppvObject;
  wchar_t *pwVar13;
  uint uVar14;
  wchar_t *pwVar15;
  undefined1 auStackY_748 [32];
  char local_708 [4];
  undefined2 local_704;
  short local_700;
  short local_6fc;
  longlong *local_6f8;
  undefined8 local_6f0;
  undefined4 local_6e8;
  undefined2 uStack_6e4;
  ushort uStack_6e2;
  int local_6d8;
  undefined4 uVar16;
  wchar_t *local_6c8;
  wchar_t *local_6c0;
  wchar_t *local_6b8;
  wchar_t *local_6b0;
  LPUNKNOWN local_6a8 [2];
  IUnknown *local_698;
  longlong *local_690;
  undefined4 local_688;
  undefined1 local_678 [24];
  undefined1 local_660 [24];
  undefined4 local_648;
  undefined1 *local_640;
  undefined4 local_638;
  undefined8 local_630;
  undefined1 *local_628;
  wchar_t *local_618;
  undefined8 *local_610;
  longlong *local_608;
  undefined8 *local_600;
  undefined8 local_5f8;
  undefined1 local_5f0;
  undefined8 local_5e8;
  undefined1 local_5e0;
  wchar_t *local_5d8;
  undefined8 local_5d0;
  undefined1 local_5c8;
  undefined8 local_5c0;
  undefined1 local_5b8;
  undefined8 local_5b0;
  undefined1 local_5a8;
  wchar_t *local_5a0;
  undefined8 local_598;
  undefined1 local_590;
  undefined8 local_588;
  undefined1 local_580;
  undefined8 local_578;
  undefined1 local_570;
  undefined8 local_568;
  undefined1 local_560;
  undefined8 local_558;
  undefined1 local_550;
  longlong *local_548;
  undefined8 local_540;
  undefined1 local_538;
  undefined8 local_530;
  undefined1 local_528;
  longlong *local_520;
  undefined4 local_518;
  undefined4 uStack_514;
  undefined4 uStack_510;
  undefined4 uStack_50c;
  undefined1 local_508 [16];
  undefined1 local_4f8 [16];
  undefined8 local_4e8;
  undefined1 local_4e0 [24];
  undefined1 local_4c8 [24];
  undefined1 local_4b0 [24];
  undefined1 local_498 [24];
  undefined1 local_480 [24];
  wchar_t local_468 [12];
  undefined1 local_450 [24];
  undefined1 local_438 [24];
  undefined1 local_420 [24];
  undefined1 local_408 [24];
  undefined1 local_3f0 [24];
  undefined1 local_3d8 [24];
  longlong local_3c0 [3];
  undefined1 local_3a8 [32];
  IID local_388;
  undefined8 local_378;
  undefined8 uStack_370;
  wchar_t local_368 [12];
  ulonglong local_350;
  wchar_t local_348 [12];
  ulonglong local_330;
  wchar_t local_328 [349];
  undefined2 local_6e;
  undefined4 local_6c;
  undefined2 local_68;
  undefined4 local_66;
  undefined2 local_62;
  undefined8 local_60;
  undefined2 local_58;
  undefined4 local_56;
  ulonglong local_48;
  
  local_4e8 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStackY_748;
  uVar16 = 1;
  pIVar1 = *(IUnknown **)*param_1;
  pwVar13 = (wchar_t *)0x0;
  local_610 = param_1;
  local_600 = param_2;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_140106cf1:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return 0;
    }
  }
  else {
    local_6d8 = 0;
    UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_6d8 == 0) goto LAB_140106cf1;
  }
  local_6f8 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_6f8);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_698 = (IUnknown *)0x0;
  local_690 = (longlong *)0x0;
  Ordinal_8(local_678);
  Ordinal_8(local_660);
  pIVar1 = local_698;
  if ((local_698 != (IUnknown *)0x0) && (local_698 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_628 = &DAT_140281f00;
  local_640 = &DAT_140281f00;
  local_638 = 0;
  local_630 = 0;
  if (local_698 != (IUnknown *)0x0) {
    (*local_698->lpVtbl->Release)(local_698);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_6a8
                          );
  if (-1 < HVar5) {
    HVar5 = OleRun(local_6a8[0]);
    if (-1 < HVar5) {
      HVar5 = (*local_6a8[0]->lpVtbl->QueryInterface)(local_6a8[0],(IID *)&DAT_140281f68,&local_698)
      ;
    }
    (*local_6a8[0]->lpVtbl->Release)(local_6a8[0]);
    if (-1 < HVar5) goto LAB_140106e3c;
  }
  local_698 = (IUnknown *)0x0;
LAB_140106e3c:
  local_648 = 2;
  local_688 = 1;
  local_708[0] = '\x01';
  local_6e8 = *(undefined4 *)(param_2 + 1);
  local_6f0._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_6f0._0_4_ = CONCAT22(0x2390,(short)*param_2);
  pwVar15 = (wchar_t *)0x0;
  uStack_6e4 = 0xac;
  uStack_6e2 = 0;
  local_704 = 1;
  uVar14 = 0x12;
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_520);
  FUN_140001710(&local_6f8,*puVar6,"dbo.up_mail_gold_payment");
  if (local_520 != (longlong *)0x0) {
    (**(code **)(*local_520 + 0x10))();
  }
  local_6b8 = local_468;
  local_518 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_514 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_510 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_50c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_468,&local_518);
  pwVar7 = operator_new(0x18);
  local_5d8 = pwVar13;
  local_618 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490("mail_id");
    *(longlong *)pwVar7 = lVar8;
    local_5d8 = pwVar7;
  }
  if (local_5d8 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  pwVar7 = (wchar_t *)FUN_140001880(&local_6f8,&local_608,&local_5d8,0xca);
  local_6b8 = pwVar7;
  if (local_6f8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_6f8,&local_548);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_548 != (longlong *)0x0) {
    (**(code **)(*local_548 + 0x10))();
  }
  if (*(longlong **)pwVar7 != (longlong *)0x0) {
    (**(code **)(**(longlong **)pwVar7 + 0x10))();
  }
  local_608 = local_3c0;
  FUN_1400623f0(local_3c0,(longlong)param_2 + 0x1e);
  pwVar7 = operator_new(0x18);
  local_5a0 = pwVar13;
  local_6b8 = pwVar7;
  if (pwVar7 != (wchar_t *)0x0) {
    pwVar7[4] = L'\0';
    pwVar7[5] = L'\0';
    pwVar7[6] = L'\0';
    pwVar7[7] = L'\0';
    pwVar7[8] = L'\x01';
    pwVar7[9] = L'\0';
    lVar8 = FUN_140201490(&DAT_14028984c);
    *(longlong *)pwVar7 = lVar8;
    local_5a0 = pwVar7;
  }
  if (local_5a0 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_6f8,local_4e0,&local_5a0,0xca);
  local_608 = plVar9;
  if (local_6f8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_6f8,&local_618);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_618 != (wchar_t *)0x0) {
    (**(code **)(*(longlong *)local_618 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  puVar6 = (undefined8 *)FUN_1400016d0(&local_6f8,&local_6b8);
  This = local_698;
  pIVar1 = (IUnknown *)*puVar6;
  if (local_698 != pIVar1) {
    local_698 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_6b8 != (wchar_t *)0x0) {
    (**(code **)(*(longlong *)local_6b8 + 0x10))();
  }
  pIVar1 = local_698;
  if (local_698 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_6fc = 0;
  UVar3 = (*local_698->lpVtbl[6].Release)(local_698);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
  }
  if (local_6fc != -1) {
    while( true ) {
      pIVar1 = local_698;
      if (local_698 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_700 = 0;
      UVar3 = (*local_698->lpVtbl[6].Release)(local_698);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_700 == -1) break;
      local_388.Data1 = 0;
      local_388.Data2 = 0;
      local_388.Data3 = 0;
      local_388.Data4[0] = '\0';
      local_388.Data4[1] = '\0';
      local_388.Data4[2] = '\0';
      local_388.Data4[3] = '\0';
      local_388.Data4[4] = '\0';
      local_388.Data4[5] = '\0';
      local_388.Data4[6] = '\0';
      local_388.Data4[7] = '\0';
      local_378 = 0;
      uStack_370 = 0;
      local_6c = 0;
      local_68 = 0;
      local_66 = 0;
      local_62 = 0;
      local_60 = 0;
      local_58 = 0;
      local_56 = 0;
      local_368[0] = L'\0';
      local_368[1] = L'\0';
      local_368[2] = L'\0';
      local_368[3] = L'\0';
      local_368[4] = L'\0';
      local_368[5] = L'\0';
      local_368[6] = L'\0';
      local_368[7] = L'\0';
      local_368[8] = L'\0';
      local_368[9] = L'\0';
      local_368[10] = L'\0';
      local_368[0xb] = L'\0';
      local_350 = 0;
      local_348[0] = L'\0';
      local_348[1] = L'\0';
      local_348[2] = L'\0';
      local_348[3] = L'\0';
      local_348[4] = L'\0';
      local_348[5] = L'\0';
      local_348[6] = L'\0';
      local_348[7] = L'\0';
      local_348[8] = L'\0';
      local_348[9] = L'\0';
      local_348[10] = L'\0';
      local_348[0xb] = L'\0';
      local_330 = 0;
      memset(local_328,0,700);
      uVar10 = FUN_140002290(&local_698,local_498,&DAT_14029114c,local_708);
      FUN_1400625d0(uVar10,local_508);
      Ordinal_9(local_498);
      uVar10 = FUN_140002290(&local_698,local_408,"send_character_id",local_708);
      FUN_1400625d0(uVar10,local_4f8);
      Ordinal_9(local_408);
      uVar10 = FUN_140002290(&local_698,local_4c8,"receiver",local_708);
      FUN_140062840(uVar10,&local_6b0);
      FUN_1401568c0();
      pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pwVar7 = pwVar13;
      }
      if (local_6b0 != (wchar_t *)PTR_DAT_1403200a0) {
        uVar10 = FUN_1401568c0();
        local_560 = 0;
        local_568 = uVar10;
        FUN_140156b50(uVar10);
        local_560 = 1;
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_5b8 = 0;
          local_5c0 = uVar11;
          FUN_140156b50(uVar11);
          local_5b8 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar11);
          local_5b8 = 0;
        }
        pwVar7 = local_6b0;
        if (((local_6b0 != (wchar_t *)PTR_DAT_1403200a0) && (local_6b0 != (wchar_t *)0x0)) &&
           (local_6b0 != (wchar_t *)0x8)) {
          *(int *)(local_6b0 + -2) = *(int *)(local_6b0 + -2) + 1;
        }
        FUN_140156be0(uVar10);
        local_560 = 0;
      }
      pwVar12 = pwVar7;
      if (pwVar7 == (wchar_t *)0x0) {
        pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
      }
      wcsncpy(local_348,pwVar12,0xf);
      if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar7 + -4 != (wchar_t *)0x0)) {
        uVar10 = FUN_1401568c0();
        local_5f0 = 0;
        local_5f8 = uVar10;
        FUN_140156b50(uVar10);
        local_5f0 = 1;
        pwVar12 = pwVar7 + -2;
        *(int *)pwVar12 = *(int *)pwVar12 + -1;
        if (*(int *)pwVar12 == 0) {
          FUN_140156970(pwVar7 + -4);
        }
        FUN_140156be0(uVar10);
        local_5f0 = 0;
      }
      pwVar7 = local_6b0;
      if (((local_6b0 != (wchar_t *)0x0) && (local_6b0 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar12 = local_6b0 + -4, pwVar12 != (wchar_t *)0x0)) {
        uVar10 = FUN_1401568c0();
        local_528 = 0;
        local_530 = uVar10;
        FUN_140156b50(uVar10);
        local_528 = 1;
        pwVar7 = pwVar7 + -2;
        *(int *)pwVar7 = *(int *)pwVar7 + -1;
        if (*(int *)pwVar7 == 0) {
          FUN_140156970(pwVar12);
        }
        FUN_140156be0(uVar10);
        local_528 = 0;
      }
      local_6b0 = (wchar_t *)PTR_DAT_1403200a0;
      Ordinal_9(local_4c8);
      uVar10 = FUN_140002290(&local_698,local_3a8,"sender",local_708);
      FUN_140062840(uVar10,&local_6c8);
      FUN_1401568c0();
      pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pwVar7 = pwVar13;
      }
      if (local_6c8 != (wchar_t *)PTR_DAT_1403200a0) {
        uVar10 = FUN_1401568c0();
        local_5e0 = 0;
        local_5e8 = uVar10;
        FUN_140156b50(uVar10);
        local_5e0 = 1;
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_580 = 0;
          local_588 = uVar11;
          FUN_140156b50(uVar11);
          local_580 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar11);
          local_580 = 0;
        }
        pwVar7 = local_6c8;
        if (((local_6c8 != (wchar_t *)PTR_DAT_1403200a0) && (local_6c8 != (wchar_t *)0x0)) &&
           (local_6c8 != (wchar_t *)0x8)) {
          *(int *)(local_6c8 + -2) = *(int *)(local_6c8 + -2) + 1;
        }
        FUN_140156be0(uVar10);
        local_5e0 = 0;
      }
      pwVar12 = pwVar7;
      if (pwVar7 == (wchar_t *)0x0) {
        pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
      }
      wcsncpy(local_368,pwVar12,0xf);
      if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar7 + -4 != (wchar_t *)0x0)) {
        uVar10 = FUN_1401568c0();
        local_5c8 = 0;
        local_5d0 = uVar10;
        FUN_140156b50(uVar10);
        local_5c8 = 1;
        pwVar12 = pwVar7 + -2;
        *(int *)pwVar12 = *(int *)pwVar12 + -1;
        if (*(int *)pwVar12 == 0) {
          FUN_140156970(pwVar7 + -4);
        }
        FUN_140156be0(uVar10);
        local_5c8 = 0;
      }
      pwVar7 = local_6c8;
      if (((local_6c8 != (wchar_t *)0x0) && (local_6c8 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar12 = local_6c8 + -4, pwVar12 != (wchar_t *)0x0)) {
        uVar10 = FUN_1401568c0();
        local_5a8 = 0;
        local_5b0 = uVar10;
        FUN_140156b50(uVar10);
        local_5a8 = 1;
        pwVar7 = pwVar7 + -2;
        *(int *)pwVar7 = *(int *)pwVar7 + -1;
        if (*(int *)pwVar7 == 0) {
          FUN_140156970(pwVar12);
        }
        FUN_140156be0(uVar10);
        local_5a8 = 0;
      }
      local_6c8 = (wchar_t *)PTR_DAT_1403200a0;
      Ordinal_9(local_3a8);
      uVar10 = FUN_140002290(&local_698,local_438,&DAT_14028984c,local_708);
      FUN_140062840(uVar10,&local_6c0);
      FUN_1401568c0();
      pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pwVar7 = pwVar13;
      }
      if (local_6c0 != (wchar_t *)PTR_DAT_1403200a0) {
        uVar10 = FUN_1401568c0();
        local_570 = 0;
        local_578 = uVar10;
        FUN_140156b50(uVar10);
        local_570 = 1;
        if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar7 + -4 != (wchar_t *)0x0)) {
          uVar11 = FUN_1401568c0();
          local_590 = 0;
          local_598 = uVar11;
          FUN_140156b50(uVar11);
          local_590 = 1;
          pwVar12 = pwVar7 + -2;
          *(int *)pwVar12 = *(int *)pwVar12 + -1;
          if (*(int *)pwVar12 == 0) {
            FUN_140156970(pwVar7 + -4);
          }
          FUN_140156be0(uVar11);
          local_590 = 0;
        }
        pwVar7 = local_6c0;
        if (((local_6c0 != (wchar_t *)PTR_DAT_1403200a0) && (local_6c0 != (wchar_t *)0x0)) &&
           (local_6c0 != (wchar_t *)0x8)) {
          *(int *)(local_6c0 + -2) = *(int *)(local_6c0 + -2) + 1;
        }
        FUN_140156be0(uVar10);
        local_570 = 0;
      }
      pwVar12 = pwVar7;
      if (pwVar7 == (wchar_t *)0x0) {
        pwVar12 = (wchar_t *)PTR_DAT_1403200a0;
      }
      wcsncpy(local_328,pwVar12,0x15d);
      if (((pwVar7 != (wchar_t *)0x0) && (pwVar7 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar7 + -4 != (wchar_t *)0x0)) {
        uVar10 = FUN_1401568c0();
        local_550 = 0;
        local_558 = uVar10;
        FUN_140156b50(uVar10);
        local_550 = 1;
        pwVar12 = pwVar7 + -2;
        *(int *)pwVar12 = *(int *)pwVar12 + -1;
        if (*(int *)pwVar12 == 0) {
          FUN_140156970(pwVar7 + -4);
        }
        FUN_140156be0(uVar10);
        local_550 = 0;
      }
      pwVar7 = local_6c0;
      if (((local_6c0 != (wchar_t *)0x0) && (local_6c0 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar12 = local_6c0 + -4, pwVar12 != (wchar_t *)0x0)) {
        uVar10 = FUN_1401568c0();
        local_538 = 0;
        local_540 = uVar10;
        FUN_140156b50(uVar10);
        local_538 = 1;
        pwVar7 = pwVar7 + -2;
        *(int *)pwVar7 = *(int *)pwVar7 + -1;
        if (*(int *)pwVar7 == 0) {
          FUN_140156970(pwVar12);
        }
        FUN_140156be0(uVar10);
        local_538 = 0;
      }
      local_6c0 = (wchar_t *)PTR_DAT_1403200a0;
      Ordinal_9(local_438);
      local_330 = local_330 & 0xffffffffffff;
      local_350 = local_350 & 0xffffffffffff;
      local_6e = 0;
      uVar10 = FUN_140002290(&local_698,local_3d8,&DAT_14028cd44,local_708);
      FUN_140182560(uVar10);
      local_6c = FUN_140062550(uVar10);
      Ordinal_9(local_3d8);
      uVar10 = FUN_140002290(&local_698,local_4b0,"return_day",local_708);
      FUN_140182560(uVar10);
      local_68 = FUN_140062550(uVar10);
      Ordinal_9(local_4b0);
      uVar10 = FUN_140002290(&local_698,local_480,"req_gold",local_708);
      FUN_140182560(uVar10);
      local_66 = FUN_140062550(uVar10);
      Ordinal_9(local_480);
      uVar10 = FUN_140002290(&local_698,local_450,"is_open",local_708);
      FUN_140182560(uVar10);
      local_62 = FUN_140062550(uVar10);
      Ordinal_9(local_450);
      uVar10 = FUN_140002290(&local_698,local_420,"create_time",local_708);
      FUN_140182560(uVar10);
      local_60 = FUN_140098d80(uVar10);
      Ordinal_9(local_420);
      uVar10 = FUN_140002290(&local_698,local_3f0,"create_type",local_708);
      FUN_140182560(uVar10);
      local_58 = FUN_140062550(uVar10);
      Ordinal_9(local_3f0);
      riid = (char *)&local_388;
      ppvObject = (char *)0x336;
      memcpy((void *)((longlong)(int)uVar14 + 0x130 + (longlong)param_1),riid,0x336);
      uVar14 = uVar14 + 0x336;
      uStack_6e2 = (short)pwVar15 + 1;
      pwVar15 = (wchar_t *)(ulonglong)uStack_6e2;
      if (50000 < uVar14) {
        uVar2 = local_6f0._2_6_;
        local_6f0 = CONCAT62(local_6f0._2_6_,(short)uVar14);
        uVar10 = local_6f0;
        riid = (char *)(param_1 + 0x26);
        local_6f0._4_2_ = SUB62(uVar2,2);
        local_6f0._6_2_ = SUB62(uVar2,4);
        ((IID *)riid)->Data1 = (undefined4)local_6f0;
        ((IID *)riid)->Data2 = local_6f0._4_2_;
        ((IID *)riid)->Data3 = local_6f0._6_2_;
        param_1[0x27] = CONCAT26(uStack_6e2,CONCAT24(uStack_6e4,local_6e8));
        *(undefined2 *)(param_1 + 0x28) = local_704;
        local_6f0 = uVar10;
        iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar4 == 0) {
          ppvObject = "DB Result Queue push error";
          riid = "DBResultQueue_Error.Log";
          FUN_1400a0b40(param_1[0x23]);
        }
        uVar14 = 0x12;
        uStack_6e2 = 0;
        pwVar15 = pwVar13;
      }
      pIVar1 = local_698;
      if (local_698 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar5 = (*local_698->lpVtbl[0xc].QueryInterface)(local_698,(IID *)riid,(void **)ppvObject);
      if (HVar5 < 0) {
        _com_issue_errorex(HVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_708[0] == '\0') {
      uStack_6e4 = 0xad;
      uVar16 = 0;
    }
  }
  local_6f0 = CONCAT62(local_6f0._2_6_,(short)uVar14);
  param_1[0x26] = local_6f0;
  param_1[0x27] = CONCAT26(uStack_6e2,CONCAT24(uStack_6e4,local_6e8));
  *(undefined2 *)(param_1 + 0x28) = local_704;
  iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
  if (iVar4 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar1 = local_698;
  if (local_698 != (IUnknown *)0x0) {
    UVar3 = (*local_698->lpVtbl[0x12].AddRef)(local_698);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
    }
    if (local_698 != (IUnknown *)0x0) {
      (*local_698->lpVtbl->Release)(local_698);
      local_698 = (IUnknown *)0x0;
    }
  }
  local_630 = 0;
  local_628 = &DAT_140281f00;
  local_640 = &DAT_140281f00;
  local_638 = 0;
  local_648 = 0;
  Ordinal_9(local_660);
  Ordinal_9(local_678);
  if (local_690 != (longlong *)0x0) {
    (**(code **)(*local_690 + 0x10))();
  }
  if (local_698 != (IUnknown *)0x0) {
    (*local_698->lpVtbl->Release)(local_698);
  }
  if (local_6f8 != (longlong *)0x0) {
    (**(code **)(*local_6f8 + 0x10))();
  }
  return uVar16;
}



undefined8 FUN_140107e50(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140107ee3;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140107ee3:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_mail_return");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("mail_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401080d0(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  undefined4 *puVar11;
  longlong *plVar12;
  undefined1 auStack_118 [32];
  undefined4 local_f8;
  undefined8 local_f0;
  longlong *local_e8;
  longlong *local_d8;
  longlong *local_d0;
  longlong *local_c8;
  longlong *local_c0;
  longlong *local_b8 [2];
  longlong *local_a8;
  undefined4 uStack_a0;
  undefined4 uStack_9c;
  longlong local_98;
  undefined8 *local_90;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_68;
  longlong local_58 [3];
  longlong local_40 [3];
  ulonglong local_28;
  
  local_68 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  pIVar3 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  local_98 = param_2;
  local_90 = param_1;
  if (pIVar3 != (IUnknown *)0x0) {
    local_d8 = (longlong *)((ulonglong)local_d8 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_d8 != 0) goto LAB_14010817e;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14010817e:
  local_d0 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_d0);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_d8);
  FUN_140001710(&local_d0,*puVar6,"dbo.up_insert_item_Mail");
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  local_c8 = local_40;
  local_a8 = *(longlong **)(param_2 + 0xe);
  uStack_a0 = *(undefined4 *)(param_2 + 0x16);
  uStack_9c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140062280(local_40,&local_a8);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_c0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("sender_character_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_d8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x26;
  local_f8 = 1;
  local_e8 = (longlong *)uVar7;
  plVar10 = (longlong *)FUN_140001880(&local_d0,local_b8,&local_d8,0xca);
  local_c0 = plVar10;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong *)0x0) {
    (**(code **)(*local_c8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_b8[0] = local_40;
  uVar7 = FUN_1400623f0(local_40,param_2 + 0x1e);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_c0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("sender_name");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_c8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x10;
  local_f8 = 1;
  local_e8 = (longlong *)uVar7;
  plVar10 = (longlong *)FUN_140001880(&local_d0,&local_a8,&local_c8,0xca);
  local_b8[0] = plVar10;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_a8 = local_40;
  uVar7 = FUN_1400623f0(local_40,param_2 + 0x3e);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_b8[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("recver_name");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_c8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x10;
  local_f8 = 1;
  local_e8 = (longlong *)uVar7;
  plVar10 = (longlong *)FUN_140001880(&local_d0,&local_c0,&local_c8,0xca);
  local_a8 = plVar10;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_a8 = local_40;
  uVar7 = FUN_1400623f0(local_40,param_2 + 0x5e);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_b8[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490(&DAT_14028984c);
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_c8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 100;
  local_f8 = 1;
  local_e8 = (longlong *)uVar7;
  plVar10 = (longlong *)FUN_140001880(&local_d0,&local_c0,&local_c8,0xca);
  local_a8 = plVar10;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_a8 = local_40;
  uVar2 = *(undefined4 *)(param_2 + 0x31a);
  Ordinal_8(local_40);
  FUN_140062080(local_40,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_b8[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("money");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_c8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = local_40;
  local_f0 = 4;
  local_f8 = 1;
  plVar10 = (longlong *)FUN_140001880(&local_d0,&local_c0,&local_c8,3);
  local_a8 = plVar10;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_a8 = local_40;
  uVar2 = *(undefined4 *)(param_2 + 0x31e);
  Ordinal_8(local_40);
  FUN_140062080(local_40,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_b8[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("return_day");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_c8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = local_40;
  local_f0 = 4;
  local_f8 = 1;
  plVar10 = (longlong *)FUN_140001880(&local_d0,&local_c0,&local_c8,3);
  local_a8 = plVar10;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_a8 = local_40;
  uVar2 = *(undefined4 *)(param_2 + 0x322);
  Ordinal_8(local_40);
  FUN_140062080(local_40,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_b8[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("req_money");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_c8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = local_40;
  local_f0 = 4;
  local_f8 = 1;
  plVar10 = (longlong *)FUN_140001880(&local_d0,&local_c0,&local_c8,3);
  local_a8 = plVar10;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_a8 = local_58;
  puVar11 = (undefined4 *)FUN_140182810(local_40);
  local_78 = *puVar11;
  uStack_74 = puVar11[1];
  uStack_70 = puVar11[2];
  uStack_6c = puVar11[3];
  uVar7 = FUN_140061f30(local_58,&local_78);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_b8[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("NewMailID");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_c8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_f0 = 0x26;
  local_f8 = 1;
  local_e8 = (longlong *)uVar7;
  plVar10 = (longlong *)FUN_140001880(&local_d0,&local_c0,&local_c8,0xca);
  local_a8 = plVar10;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_d8 != (longlong *)0x0) {
    (**(code **)(*local_d8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_a8 = local_40;
  sVar1 = *(short *)(param_2 + 0x326);
  Ordinal_8(local_40);
  FUN_140062080(local_40,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_b8[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("createType");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_c8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e8 = local_40;
  local_f0 = 4;
  local_f8 = 1;
  plVar10 = (longlong *)FUN_140001880(&local_d0,&local_c0,&local_c8,3);
  local_a8 = plVar10;
  if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_d8 != (longlong *)0x0) {
      (**(code **)(*local_d8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_a8 = local_40;
    uVar2 = *(undefined4 *)(param_2 + 0x342);
    Ordinal_8(local_40);
    FUN_140062080(local_40,uVar2);
    plVar8 = operator_new(0x18);
    plVar10 = plVar12;
    local_b8[0] = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490(&DAT_14028931c);
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_c8 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_e8 = local_40;
    local_f0 = 4;
    local_f8 = 1;
    plVar10 = (longlong *)FUN_140001880(&local_d0,&local_c0,&local_c8,3);
    local_a8 = plVar10;
    if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_d8 != (longlong *)0x0) {
        (**(code **)(*local_d8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_a8 = local_40;
      sVar1 = *(short *)(param_2 + 0x328);
      Ordinal_8(local_40);
      FUN_140062080(local_40,(int)sVar1);
      plVar10 = operator_new(0x18);
      local_b8[0] = plVar10;
      if (plVar10 != (longlong *)0x0) {
        plVar10[1] = 0;
        *(undefined4 *)(plVar10 + 2) = 1;
        lVar9 = FUN_140201490("gcode");
        *plVar10 = lVar9;
        plVar12 = plVar10;
      }
      local_c8 = plVar12;
      if (plVar12 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      local_e8 = local_40;
      local_f0 = 4;
      local_f8 = 1;
      plVar12 = (longlong *)FUN_140001880(&local_d0,&local_c0,&local_c8,3);
      local_a8 = plVar12;
      if (local_d0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_d0,&local_d8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_d8 != (longlong *)0x0) {
          (**(code **)(*local_d8 + 0x10))();
        }
        if ((longlong *)*plVar12 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar12 + 0x10))();
        }
        FUN_1400a2c10(&local_d0,param_2 + 0x32a);
        FUN_1400016d0(&local_d0,&local_c8);
        if (local_c8 != (longlong *)0x0) {
          (**(code **)(*local_c8 + 0x10))();
        }
        if (local_d0 != (longlong *)0x0) {
          (**(code **)(*local_d0 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x000140109598)
// WARNING: Removing unreachable block (ram,0x0001401095a2)
// WARNING: Removing unreachable block (ram,0x0001401095ad)
// WARNING: Removing unreachable block (ram,0x0001401095bd)
// WARNING: Removing unreachable block (ram,0x000140109114)
// WARNING: Removing unreachable block (ram,0x00014010911e)
// WARNING: Removing unreachable block (ram,0x000140109129)
// WARNING: Removing unreachable block (ram,0x000140109139)

undefined4 FUN_140108ed0(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  short sVar3;
  HRESULT HVar4;
  int iVar5;
  ULONG UVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  undefined4 uVar12;
  undefined2 uVar13;
  char local_res18 [8];
  longlong *local_res20;
  undefined2 local_184;
  longlong *local_178;
  int local_170;
  LPUNKNOWN local_168 [2];
  IUnknown *local_158;
  longlong *local_150;
  undefined4 local_148;
  undefined1 local_138 [24];
  undefined1 local_120 [24];
  undefined4 local_108;
  undefined1 *local_100;
  undefined4 local_f8;
  undefined8 local_f0;
  undefined1 *local_e8;
  longlong *local_d8;
  undefined8 local_d0;
  undefined2 local_c4;
  longlong *local_c0;
  longlong *local_b8;
  longlong *local_b0 [3];
  undefined4 local_98;
  undefined4 uStack_94;
  undefined4 uStack_90;
  undefined4 uStack_8c;
  undefined8 local_88;
  undefined1 local_78 [8];
  undefined1 local_70 [24];
  undefined1 local_58 [32];
  
  local_88 = 0xfffffffffffffffe;
  local_res18[0] = '\x01';
  plVar11 = (longlong *)0x0;
  uVar12 = 1;
  local_158 = (IUnknown *)0x0;
  local_150 = (longlong *)0x0;
  Ordinal_8(local_138);
  Ordinal_8(local_120);
  pIVar2 = local_158;
  if ((local_158 != (IUnknown *)0x0) && (local_158 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_e8 = &DAT_140281f00;
  local_100 = &DAT_140281f00;
  local_f8 = 0;
  local_f0 = 0;
  if (local_158 != (IUnknown *)0x0) {
    (*local_158->lpVtbl->Release)(local_158);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_168
                          );
  if (HVar4 < 0) {
LAB_140108fe8:
    local_158 = (IUnknown *)0x0;
  }
  else {
    HVar4 = OleRun(local_168[0]);
    if (-1 < HVar4) {
      HVar4 = (*local_168[0]->lpVtbl->QueryInterface)(local_168[0],(IID *)&DAT_140281f68,&local_158)
      ;
    }
    (*local_168[0]->lpVtbl->Release)(local_168[0]);
    if (HVar4 < 0) goto LAB_140108fe8;
  }
  local_108 = 2;
  local_148 = 1;
  local_178 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_178);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_c4 = *(undefined2 *)((longlong)param_2 + 0xc);
  local_d0._4_4_ = (undefined4)((ulonglong)*param_2 >> 0x20);
  local_d0._0_4_ = CONCAT22(0x23e1,(short)*param_2);
  local_184 = 0xac;
  uVar13 = 0xe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_170 = 0;
    UVar6 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_170 != 0) goto LAB_1401091cb;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    if (local_178 != (longlong *)0x0) {
      (**(code **)(*local_178 + 0x10))();
    }
    pIVar2 = local_158;
    if (local_158 != (IUnknown *)0x0) {
      UVar6 = (*local_158->lpVtbl[0x12].AddRef)(local_158);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_158 != (IUnknown *)0x0) {
        (*local_158->lpVtbl->Release)(local_158);
        local_158 = (IUnknown *)0x0;
      }
    }
    local_f0 = 0;
    local_e8 = &DAT_140281f00;
    local_100 = &DAT_140281f00;
    local_f8 = 0;
    local_108 = 0;
    Ordinal_9(local_120);
    Ordinal_9(local_138);
    if (local_150 != (longlong *)0x0) {
      (**(code **)(*local_150 + 0x10))();
    }
    if (local_158 != (IUnknown *)0x0) {
      (*local_158->lpVtbl->Release)(local_158);
    }
    return 0;
  }
LAB_1401091cb:
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_c0);
  FUN_140001710(&local_178,*puVar7,"dbo.up_read_new_mail_exist");
  if (local_c0 != (longlong *)0x0) {
    (**(code **)(*local_c0 + 0x10))();
  }
  local_res20 = (longlong *)local_70;
  local_98 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_94 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_90 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_8c = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar8 = FUN_140062280(local_70,&local_98);
  plVar9 = operator_new(0x18);
  local_d8 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_b0[0] = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_178,local_78,local_b0,0xca,1,0x26,uVar8);
  local_res20 = plVar11;
  if (local_178 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_178,&local_b8);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar6 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_b8 != (longlong *)0x0) {
      (**(code **)(*local_b8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    puVar7 = (undefined8 *)FUN_1400016d0(&local_178,&local_d8);
    This = local_158;
    pIVar2 = (IUnknown *)*puVar7;
    if (local_158 != pIVar2) {
      local_158 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_d8 != (longlong *)0x0) {
      (**(code **)(*local_d8 + 0x10))();
    }
    pIVar2 = local_158;
    if (local_158 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_res20 = (longlong *)((ulonglong)local_res20 & 0xffffffffffff0000);
    UVar6 = (*local_158->lpVtbl[6].Release)(local_158);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
    }
    pIVar2 = local_158;
    if ((short)local_res20 != -1) {
      if (local_158 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar6 = (*local_158->lpVtbl[6].Release)(local_158);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      uVar8 = FUN_140002290(&local_158,local_58,&DAT_14028f034,local_res18);
      FUN_140182560(uVar8);
      sVar3 = FUN_1400ef870(uVar8);
      Ordinal_9(local_58);
      if (sVar3 == 0) {
        if (local_178 != (longlong *)0x0) {
          (**(code **)(*local_178 + 0x10))();
        }
        FUN_140002200(&local_158);
        return 0;
      }
      *(undefined1 *)((longlong)param_1 + 0x13e) = 1;
      uVar13 = 0xf;
      if (local_res18[0] == '\0') {
        local_184 = 0xad;
        uVar12 = 0;
      }
    }
    local_d0 = CONCAT62(local_d0._2_6_,uVar13);
    param_1[0x26] = local_d0;
    *(undefined4 *)(param_1 + 0x27) = uVar1;
    *(undefined2 *)((longlong)param_1 + 0x13c) = local_184;
    iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar5 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    if (local_178 != (longlong *)0x0) {
      (**(code **)(*local_178 + 0x10))();
    }
    pIVar2 = local_158;
    if (local_158 != (IUnknown *)0x0) {
      UVar6 = (*local_158->lpVtbl[0x12].AddRef)(local_158);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_158 != (IUnknown *)0x0) {
        (*local_158->lpVtbl->Release)(local_158);
        local_158 = (IUnknown *)0x0;
      }
    }
    local_f0 = 0;
    local_e8 = &DAT_140281f00;
    local_100 = &DAT_140281f00;
    local_f8 = 0;
    local_108 = 0;
    Ordinal_9(local_120);
    Ordinal_9(local_138);
    if (local_150 != (longlong *)0x0) {
      (**(code **)(*local_150 + 0x10))();
    }
    if (local_158 != (IUnknown *)0x0) {
      (*local_158->lpVtbl->Release)(local_158);
    }
    return uVar12;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140109660(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  undefined4 *puVar11;
  longlong *plVar12;
  undefined1 auStack_108 [32];
  undefined4 local_e8;
  undefined8 local_e0;
  longlong *local_d8;
  longlong *local_c8;
  longlong *local_c0;
  longlong *local_b8;
  longlong *local_b0;
  longlong *local_a8;
  longlong *local_a0;
  longlong local_98;
  undefined8 *local_90;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_68;
  longlong local_58 [3];
  longlong local_40 [3];
  ulonglong local_28;
  
  local_68 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_108;
  pIVar3 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  local_98 = param_2;
  local_90 = param_1;
  if (pIVar3 != (IUnknown *)0x0) {
    local_c8 = (longlong *)((ulonglong)local_c8 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_c8 != 0) goto LAB_140109708;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140109708:
  local_c0 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_c0);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_c8);
  FUN_140001710(&local_c0,*puVar6,"dbo.up_insert_item_mail_by_gm");
  if (local_c8 != (longlong *)0x0) {
    (**(code **)(*local_c8 + 0x10))();
  }
  local_b8 = local_40;
  uVar7 = FUN_1400623f0(local_40,param_2 + 0xe);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_a8 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("sender_name");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_c8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e0 = 0x10;
  local_e8 = 1;
  local_d8 = (longlong *)uVar7;
  plVar10 = (longlong *)FUN_140001880(&local_c0,&local_a0,&local_c8,0xca);
  local_a8 = plVar10;
  if (local_c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_c0,&local_b8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_b8 != (longlong *)0x0) {
    (**(code **)(*local_b8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_a0 = local_40;
  uVar7 = FUN_1400623f0(local_40,param_2 + 0x2e);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_a8 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("recver_name");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_b8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e0 = 0x10;
  local_e8 = 1;
  local_d8 = (longlong *)uVar7;
  plVar10 = (longlong *)FUN_140001880(&local_c0,&local_b0,&local_b8,0xca);
  local_a0 = plVar10;
  if (local_c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_c0,&local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong *)0x0) {
    (**(code **)(*local_c8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_b0 = local_40;
  uVar7 = FUN_1400623f0(local_40,param_2 + 0x4e);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_a0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490(&DAT_14028984c);
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_b8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_e0 = 100;
  local_e8 = 1;
  local_d8 = (longlong *)uVar7;
  plVar10 = (longlong *)FUN_140001880(&local_c0,&local_a8,&local_b8,0xca);
  local_b0 = plVar10;
  if (local_c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_c0,&local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong *)0x0) {
    (**(code **)(*local_c8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_b0 = local_40;
  uVar2 = *(undefined4 *)(param_2 + 0x30a);
  Ordinal_8(local_40);
  FUN_140062080(local_40,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_a0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("money");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_b8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_d8 = local_40;
  local_e0 = 4;
  local_e8 = 1;
  plVar10 = (longlong *)FUN_140001880(&local_c0,&local_a8,&local_b8,3);
  local_b0 = plVar10;
  if (local_c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_c0,&local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_c8 != (longlong *)0x0) {
    (**(code **)(*local_c8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_b0 = local_40;
  uVar2 = *(undefined4 *)(param_2 + 0x30e);
  Ordinal_8(local_40);
  FUN_140062080(local_40,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar12;
  local_a0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("return_day");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_b8 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_d8 = local_40;
  local_e0 = 4;
  local_e8 = 1;
  plVar10 = (longlong *)FUN_140001880(&local_c0,&local_a8,&local_b8,3);
  local_b0 = plVar10;
  if (local_c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_c0,&local_c8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8 != (longlong *)0x0) {
      (**(code **)(*local_c8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_b0 = local_40;
    uVar2 = *(undefined4 *)(param_2 + 0x312);
    Ordinal_8(local_40);
    FUN_140062080(local_40,uVar2);
    plVar8 = operator_new(0x18);
    plVar10 = plVar12;
    local_a0 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("req_money");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_b8 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_d8 = local_40;
    local_e0 = 4;
    local_e8 = 1;
    plVar10 = (longlong *)FUN_140001880(&local_c0,&local_a8,&local_b8,3);
    local_b0 = plVar10;
    if (local_c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_c0,&local_c8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8 != (longlong *)0x0) {
      (**(code **)(*local_c8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_b0 = local_58;
    puVar11 = (undefined4 *)FUN_140182810(local_40);
    local_78 = *puVar11;
    uStack_74 = puVar11[1];
    uStack_70 = puVar11[2];
    uStack_6c = puVar11[3];
    uVar7 = FUN_140061f30(local_58,&local_78);
    plVar8 = operator_new(0x18);
    plVar10 = plVar12;
    local_a0 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("NewMailID");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_b8 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_e0 = 0x26;
    local_e8 = 1;
    local_d8 = (longlong *)uVar7;
    plVar10 = (longlong *)FUN_140001880(&local_c0,&local_a8,&local_b8,0xca);
    local_b0 = plVar10;
    if (local_c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_c0,&local_c8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8 != (longlong *)0x0) {
      (**(code **)(*local_c8 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_b0 = local_40;
    sVar1 = *(short *)(param_2 + 0x316);
    Ordinal_8(local_40);
    FUN_140062080(local_40,(int)sVar1);
    plVar8 = operator_new(0x18);
    plVar10 = plVar12;
    local_a0 = plVar8;
    if (plVar8 != (longlong *)0x0) {
      plVar8[1] = 0;
      *(undefined4 *)(plVar8 + 2) = 1;
      lVar9 = FUN_140201490("createType");
      *plVar8 = lVar9;
      plVar10 = plVar8;
    }
    local_b8 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    local_d8 = local_40;
    local_e0 = 4;
    local_e8 = 1;
    plVar10 = (longlong *)FUN_140001880(&local_c0,&local_a8,&local_b8,3);
    local_b0 = plVar10;
    if (local_c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_c0,&local_c8);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_c8 != (longlong *)0x0) {
        (**(code **)(*local_c8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_b0 = local_40;
      uVar2 = *(undefined4 *)(param_2 + 0x332);
      Ordinal_8(local_40);
      FUN_140062080(local_40,uVar2);
      plVar8 = operator_new(0x18);
      plVar10 = plVar12;
      local_a0 = plVar8;
      if (plVar8 != (longlong *)0x0) {
        plVar8[1] = 0;
        *(undefined4 *)(plVar8 + 2) = 1;
        lVar9 = FUN_140201490(&DAT_14028931c);
        *plVar8 = lVar9;
        plVar10 = plVar8;
      }
      local_b8 = plVar10;
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      local_d8 = local_40;
      local_e0 = 4;
      local_e8 = 1;
      plVar10 = (longlong *)FUN_140001880(&local_c0,&local_a8,&local_b8,3);
      local_b0 = plVar10;
      if (local_c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_c0,&local_c8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_c8 != (longlong *)0x0) {
        (**(code **)(*local_c8 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      local_b0 = local_40;
      sVar1 = *(short *)(param_2 + 0x318);
      Ordinal_8(local_40);
      FUN_140062080(local_40,(int)sVar1);
      plVar10 = operator_new(0x18);
      local_a0 = plVar10;
      if (plVar10 != (longlong *)0x0) {
        plVar10[1] = 0;
        *(undefined4 *)(plVar10 + 2) = 1;
        lVar9 = FUN_140201490("gcode");
        *plVar10 = lVar9;
        plVar12 = plVar10;
      }
      local_b8 = plVar12;
      if (plVar12 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      local_d8 = local_40;
      local_e0 = 4;
      local_e8 = 1;
      plVar12 = (longlong *)FUN_140001880(&local_c0,&local_a8,&local_b8,3);
      local_b0 = plVar12;
      if (local_c0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar6 = (undefined8 *)FUN_140001660(local_c0,&local_c8);
      pIVar3 = (IUnknown *)*puVar6;
      if (pIVar3 != (IUnknown *)0x0) {
        UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
        }
        if (local_c8 != (longlong *)0x0) {
          (**(code **)(*local_c8 + 0x10))();
        }
        if ((longlong *)*plVar12 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar12 + 0x10))();
        }
        FUN_1400a2c10(&local_c0,param_2 + 0x31a);
        FUN_1400016d0(&local_c0,&local_b8);
        if (local_b8 != (longlong *)0x0) {
          (**(code **)(*local_b8 + 0x10))();
        }
        if (local_c0 != (longlong *)0x0) {
          (**(code **)(*local_c0 + 0x10))();
        }
        return 1;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14010a340(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14010a3d3;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14010a3d3:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_all_delete_quest");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_14010a5c0(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_48;
  longlong local_40 [4];
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14010a658;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14010a658:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_delete_quest");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = &local_78;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(&local_78,&local_88);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("quest_uid");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_98[0] = local_40;
  local_78._0_4_ = *(undefined4 *)(param_2 + 0xe);
  local_78._4_4_ = *(undefined4 *)(param_2 + 0x12);
  uStack_70 = *(undefined4 *)(param_2 + 0x16);
  uStack_6c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_78);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14010a970(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14010aa06;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14010aa06:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_insert_quest");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("quest_uid");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_40;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_40,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    uVar1 = *(undefined4 *)(param_2 + 0x2e);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("instance_npc_id");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      uVar1 = *(undefined4 *)(param_2 + 0x32);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,uVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("quest_code");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_68 = (longlong *)&local_88;
        uVar1 = *(undefined4 *)(param_2 + 0x36);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,uVar1);
        plVar9 = operator_new(0x18);
        local_98[0] = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("quest_state");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
        local_68 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x00014010bcc5)
// WARNING: Removing unreachable block (ram,0x00014010bcd2)
// WARNING: Removing unreachable block (ram,0x00014010bcdd)
// WARNING: Removing unreachable block (ram,0x00014010bced)
// WARNING: Removing unreachable block (ram,0x00014010b323)
// WARNING: Removing unreachable block (ram,0x00014010b330)
// WARNING: Removing unreachable block (ram,0x00014010b33b)
// WARNING: Removing unreachable block (ram,0x00014010b34b)

undefined4 FUN_14010b0a0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  undefined6 uVar2;
  ulonglong uVar3;
  IUnknown *This;
  undefined2 uVar4;
  short sVar5;
  int iVar6;
  HRESULT HVar7;
  ULONG UVar8;
  undefined4 uVar9;
  undefined4 uVar10;
  undefined4 uVar11;
  undefined8 *puVar12;
  undefined8 uVar13;
  undefined8 uVar14;
  longlong *plVar15;
  undefined8 *puVar16;
  undefined8 uVar17;
  longlong lVar18;
  char *riid;
  char *ppvObject;
  uint uVar19;
  char local_res10 [8];
  longlong *local_res18;
  undefined8 *local_res20;
  undefined8 local_2e0;
  undefined8 local_2d8;
  longlong *local_2c8;
  undefined4 uVar20;
  undefined8 local_2a8;
  undefined2 uStack_29a;
  undefined2 uStack_298;
  undefined2 uStack_292;
  undefined2 uStack_290;
  undefined2 local_28a;
  undefined6 uStack_288;
  undefined2 local_282;
  LPUNKNOWN local_280;
  IUnknown *local_278;
  longlong *local_270;
  undefined4 local_268;
  undefined1 local_258 [24];
  undefined1 local_240 [24];
  undefined4 local_228;
  undefined1 *local_220;
  undefined4 local_218;
  undefined8 local_210;
  undefined1 *local_208;
  undefined8 *local_1f8;
  IID local_1f0;
  undefined8 *local_1d8;
  longlong *local_1d0;
  longlong *local_1c8;
  longlong *local_1c0;
  undefined8 local_1b8;
  undefined8 local_1b0;
  undefined1 local_1a8 [32];
  undefined4 local_188;
  undefined4 uStack_184;
  undefined4 uStack_180;
  undefined4 uStack_17c;
  undefined8 local_178;
  undefined1 local_160 [8];
  undefined1 local_158 [24];
  undefined1 local_140 [24];
  undefined1 local_128 [24];
  undefined1 local_110 [24];
  undefined1 local_f8 [24];
  undefined1 local_e0 [24];
  undefined1 local_c8 [24];
  undefined1 local_b0 [24];
  undefined1 local_98 [24];
  undefined1 local_80 [24];
  undefined1 local_68 [48];
  
  local_178 = 0xfffffffffffffffe;
  puVar16 = (undefined8 *)0x0;
  local_2c8 = (longlong *)0x0;
  local_1f8 = param_2;
  iVar6 = FUN_140001970(&local_2c8);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  local_278 = (IUnknown *)0x0;
  local_270 = (longlong *)0x0;
  Ordinal_8(local_258);
  Ordinal_8(local_240);
  pIVar1 = local_278;
  if ((local_278 != (IUnknown *)0x0) && (local_278 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_208 = &DAT_140281f00;
  local_220 = &DAT_140281f00;
  local_218 = 0;
  local_210 = 0;
  if (local_278 != (IUnknown *)0x0) {
    (*local_278->lpVtbl->Release)(local_278);
  }
  HVar7 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_280);
  if (-1 < HVar7) {
    HVar7 = OleRun(local_280);
    if (-1 < HVar7) {
      HVar7 = (*local_280->lpVtbl->QueryInterface)(local_280,(IID *)&DAT_140281f68,&local_278);
    }
    (*local_280->lpVtbl->Release)(local_280);
    if (-1 < HVar7) goto LAB_14010b20e;
  }
  local_278 = (IUnknown *)0x0;
LAB_14010b20e:
  local_228 = 2;
  uVar20 = 1;
  local_268 = 1;
  local_res10[0] = '\x01';
  local_2e0 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x235b0000);
  local_2d8._0_6_ = CONCAT24(0xa1,*(undefined4 *)(param_2 + 1));
  sVar5 = 0;
  local_2d8 = (ulonglong)(uint6)local_2d8;
  uVar19 = 0x11;
  pIVar1 = *(IUnknown **)*param_1;
  if ((pIVar1 != (IUnknown *)0x0) && (UVar8 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1), (int)UVar8 < 0)
     ) {
    _com_issue_errorex(UVar8,pIVar1,(_GUID *)&DAT_140281f08);
  }
  iVar6 = FUN_1400a1e90(param_1);
  if (iVar6 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_278;
    if (local_278 != (IUnknown *)0x0) {
      UVar8 = (*local_278->lpVtbl[0x12].AddRef)(local_278);
      if ((int)UVar8 < 0) {
        _com_issue_errorex(UVar8,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_278 != (IUnknown *)0x0) {
        (*local_278->lpVtbl->Release)(local_278);
        local_278 = (IUnknown *)0x0;
      }
    }
    local_210 = 0;
    local_208 = &DAT_140281f00;
    local_220 = &DAT_140281f00;
    local_218 = 0;
    local_228 = 0;
    Ordinal_9(local_240);
    Ordinal_9(local_258);
    if (local_270 != (longlong *)0x0) {
      (**(code **)(*local_270 + 0x10))();
    }
    if (local_278 != (IUnknown *)0x0) {
      (*local_278->lpVtbl->Release)(local_278);
    }
    if (local_2c8 != (longlong *)0x0) {
      (**(code **)(*local_2c8 + 0x10))();
    }
    return 0;
  }
  puVar12 = (undefined8 *)FUN_140001f20(*param_1,&local_1c8);
  FUN_140001710(&local_2c8,*puVar12,"dbo.up_read_quest_list");
  if (local_1c8 != (longlong *)0x0) {
    (**(code **)(*local_1c8 + 0x10))();
  }
  local_res18 = (longlong *)local_b0;
  local_188 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_184 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_180 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_17c = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar13 = FUN_140062280(local_b0,&local_188);
  puVar12 = operator_new(0x18);
  local_res20 = puVar12;
  if (puVar12 != (undefined8 *)0x0) {
    puVar12[1] = 0;
    *(undefined4 *)(puVar12 + 2) = 1;
    uVar14 = FUN_140201490("character_id");
    *puVar12 = uVar14;
    puVar16 = puVar12;
  }
  local_1d8 = puVar16;
  if (puVar16 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar15 = (longlong *)FUN_140001880(&local_2c8,local_160,&local_1d8,0xca,1,0x26,uVar13);
  local_res18 = plVar15;
  if (local_2c8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar16 = (undefined8 *)FUN_140001660(local_2c8,&local_1c0);
  pIVar1 = (IUnknown *)*puVar16;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar8 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar8 < 0) {
      _com_issue_errorex(UVar8,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_1c0 != (longlong *)0x0) {
      (**(code **)(*local_1c0 + 0x10))();
    }
    if ((longlong *)*plVar15 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar15 + 0x10))();
    }
    puVar16 = (undefined8 *)FUN_1400016d0(&local_2c8,&local_1d0);
    This = local_278;
    pIVar1 = (IUnknown *)*puVar16;
    if (local_278 != pIVar1) {
      local_278 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_1d0 != (longlong *)0x0) {
      (**(code **)(*local_1d0 + 0x10))();
    }
    pIVar1 = local_278;
    if (local_278 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffffffff0000);
    UVar8 = (*local_278->lpVtbl[6].Release)(local_278);
    if ((int)UVar8 < 0) {
      _com_issue_errorex(UVar8,pIVar1,(_GUID *)&DAT_140281f28);
    }
    if ((short)local_res18 != -1) {
      while( true ) {
        pIVar1 = local_278;
        uVar3 = local_2d8;
        if (local_278 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_res20 = (undefined8 *)((ulonglong)local_res20 & 0xffffffffffff0000);
        UVar8 = (*local_278->lpVtbl[6].Release)(local_278);
        if ((int)UVar8 < 0) {
          _com_issue_errorex(UVar8,pIVar1,(_GUID *)&DAT_140281f28);
        }
        if ((short)local_res20 == -1) break;
        uVar13 = FUN_140002290(&local_278,local_98,"quest_uid",local_res10);
        FUN_1400625d0(uVar13,&local_1b8);
        uVar14 = local_1b0;
        uVar13 = local_1b8;
        Ordinal_9(local_98);
        uVar17 = FUN_140002290(&local_278,local_68,"instance_npc_id",local_res10);
        FUN_140182560(uVar17);
        uVar9 = FUN_140062550(uVar17);
        Ordinal_9(local_68);
        uVar17 = FUN_140002290(&local_278,local_80,"quest_code",local_res10);
        FUN_140182560(uVar17);
        uVar10 = FUN_140062550(uVar17);
        local_2a8 = CONCAT44(uVar10,uVar9);
        Ordinal_9(local_80);
        uVar17 = FUN_140002290(&local_278,local_110,"quest_state",local_res10);
        FUN_140182560(uVar17);
        uVar4 = FUN_140062550(uVar17);
        Ordinal_9(local_110);
        uVar17 = FUN_140002290(&local_278,local_158,"quest_status1",local_res10);
        FUN_140182560(uVar17);
        uVar9 = FUN_140062550(uVar17);
        Ordinal_9(local_158);
        uVar17 = FUN_140002290(&local_278,local_e0,"quest_status2",local_res10);
        FUN_140182560(uVar17);
        uVar10 = FUN_140062550(uVar17);
        uStack_29a = (undefined2)uVar10;
        uStack_298 = (undefined2)((uint)uVar10 >> 0x10);
        Ordinal_9(local_e0);
        uVar17 = FUN_140002290(&local_278,local_140,"quest_status3",local_res10);
        FUN_140182560(uVar17);
        uVar10 = FUN_140062550(uVar17);
        Ordinal_9(local_140);
        uVar17 = FUN_140002290(&local_278,local_128,"quest_status4",local_res10);
        FUN_140182560(uVar17);
        uVar11 = FUN_140062550(uVar17);
        uStack_292 = (undefined2)uVar11;
        uStack_290 = (undefined2)((uint)uVar11 >> 0x10);
        Ordinal_9(local_128);
        uVar17 = FUN_140002290(&local_278,local_f8,"quest_status5",local_res10);
        FUN_140182560(uVar17);
        uVar11 = FUN_140062550(uVar17);
        Ordinal_9(local_f8);
        uVar17 = FUN_140002290(&local_278,local_c8,"finish_time",local_res10);
        FUN_140182560(uVar17);
        uVar17 = FUN_140098d80(uVar17);
        local_28a = (undefined2)uVar17;
        uStack_288 = (undefined6)((ulonglong)uVar17 >> 0x10);
        Ordinal_9(local_c8);
        ppvObject = "quest_show";
        riid = (char *)&local_1f0;
        FUN_140002290(&local_278,riid,"quest_show",local_res10);
        if ((short)local_1f0.Data1 == 1) {
          local_282 = 1;
        }
        else {
          FUN_140182560(&local_1f0);
          if ((short)local_1f0.Data1 == 3) {
            local_282 = local_1f0.Data4._0_2_;
          }
          else {
            Ordinal_8(local_1a8);
            ppvObject = (char *)0x0;
            riid = (char *)&local_1f0;
            iVar6 = Ordinal_12(local_1a8,riid,0,3);
            if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
              FUN_1402013e0(iVar6);
            }
            local_282 = (undefined2)local_1a8._8_4_;
            Ordinal_9(local_1a8);
          }
        }
        lVar18 = (longlong)(int)uVar19;
        *(undefined8 *)(lVar18 + 0x130 + (longlong)param_1) = uVar13;
        *(undefined8 *)(lVar18 + 0x138 + (longlong)param_1) = uVar14;
        *(undefined8 *)(lVar18 + 0x140 + (longlong)param_1) = local_2a8;
        *(ulonglong *)(lVar18 + 0x148 + (longlong)param_1) =
             CONCAT26(uStack_29a,CONCAT42(uVar9,uVar4));
        *(ulonglong *)(lVar18 + 0x150 + (longlong)param_1) =
             CONCAT26(uStack_292,CONCAT42(uVar10,uStack_298));
        *(ulonglong *)(lVar18 + 0x158 + (longlong)param_1) =
             CONCAT26(local_28a,CONCAT42(uVar11,uStack_290));
        *(ulonglong *)(lVar18 + 0x160 + (longlong)param_1) = CONCAT26(local_282,uStack_288);
        uVar19 = uVar19 + 0x38;
        sVar5 = sVar5 + 1;
        local_2d8 = CONCAT26(sVar5,(uint6)local_2d8);
        if (50000 < uVar19) {
          uVar2 = local_2e0._2_6_;
          local_2e0 = CONCAT62(local_2e0._2_6_,(short)uVar19);
          uVar13 = local_2e0;
          riid = (char *)(param_1 + 0x26);
          local_2e0._4_2_ = SUB62(uVar2,2);
          local_2e0._6_2_ = SUB62(uVar2,4);
          ((IID *)riid)->Data1 = (undefined4)local_2e0;
          ((IID *)riid)->Data2 = local_2e0._4_2_;
          ((IID *)riid)->Data3 = local_2e0._6_2_;
          param_1[0x27] = local_2d8;
          *(undefined1 *)(param_1 + 0x28) = 0;
          iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
          if (iVar6 == 0) {
            ppvObject = "DB Result Queue push error";
            riid = "DBResultQueue_Error.Log";
            FUN_1400a0b40(param_1[0x23]);
          }
          uVar19 = 0x11;
          sVar5 = 0;
          local_2d8 = uVar3 & 0xffffffffffff;
          local_2e0 = uVar13;
        }
        pIVar1 = local_278;
        if (local_278 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar7 = (*local_278->lpVtbl[0xc].QueryInterface)(local_278,(IID *)riid,(void **)ppvObject);
        if (HVar7 < 0) {
          _com_issue_errorex(HVar7,pIVar1,(_GUID *)&DAT_140281f28);
        }
        Ordinal_9(&local_1f0);
      }
      if (local_res10[0] == '\0') {
        local_2d8._0_6_ = CONCAT24(0xa3,(undefined4)local_2d8);
        uVar20 = 0;
      }
    }
    local_2e0 = CONCAT62(local_2e0._2_6_,(short)uVar19);
    param_1[0x26] = local_2e0;
    param_1[0x27] = local_2d8;
    *(undefined1 *)(param_1 + 0x28) = 1;
    iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar6 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar1 = local_278;
    if (local_278 != (IUnknown *)0x0) {
      UVar8 = (*local_278->lpVtbl[0x12].AddRef)(local_278);
      if ((int)UVar8 < 0) {
        _com_issue_errorex(UVar8,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_278 != (IUnknown *)0x0) {
        (*local_278->lpVtbl->Release)(local_278);
        local_278 = (IUnknown *)0x0;
      }
    }
    local_210 = 0;
    local_208 = &DAT_140281f00;
    local_220 = &DAT_140281f00;
    local_218 = 0;
    local_228 = 0;
    Ordinal_9(local_240);
    Ordinal_9(local_258);
    if (local_270 != (longlong *)0x0) {
      (**(code **)(*local_270 + 0x10))();
    }
    if (local_278 != (IUnknown *)0x0) {
      (*local_278->lpVtbl->Release)(local_278);
    }
    if (local_2c8 != (longlong *)0x0) {
      (**(code **)(*local_2c8 + 0x10))();
    }
    return uVar20;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_14010bdc0(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  undefined4 uVar7;
  undefined4 uVar8;
  undefined4 uVar9;
  undefined4 uVar10;
  undefined8 *puVar11;
  undefined8 uVar12;
  longlong *plVar13;
  longlong lVar14;
  longlong *plVar15;
  longlong *plVar16;
  undefined1 auStack_148 [32];
  undefined4 local_128;
  undefined8 local_120;
  undefined8 *local_118;
  undefined4 local_110;
  longlong *local_108;
  longlong *local_100;
  longlong *local_f8;
  longlong *local_f0;
  longlong *local_e8 [2];
  undefined4 local_d8;
  undefined4 uStack_d4;
  undefined4 uStack_d0;
  undefined4 uStack_cc;
  longlong *local_b8;
  undefined4 uStack_b0;
  undefined4 uStack_ac;
  undefined1 local_a8 [16];
  undefined8 *local_98;
  longlong local_90;
  longlong local_88 [4];
  undefined8 local_68;
  undefined1 local_58 [38];
  undefined2 local_32;
  ulonglong local_30;
  
  local_68 = 0xfffffffffffffffe;
  local_30 = DAT_1403223c0 ^ (ulonglong)auStack_148;
  pIVar2 = *(IUnknown **)*param_1;
  plVar16 = (longlong *)0x0;
  local_98 = param_1;
  local_90 = param_2;
  if (pIVar2 != (IUnknown *)0x0) {
    local_108 = (longlong *)((ulonglong)local_108 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_108 != 0) goto LAB_14010be7b;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14010be7b:
  local_100 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_100);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar11 = (undefined8 *)FUN_140001f20(*param_1,&local_108);
  FUN_140001710(&local_100,*puVar11,"dbo.up_update_quest");
  if (local_108 != (longlong *)0x0) {
    (**(code **)(*local_108 + 0x10))();
  }
  local_f8 = (longlong *)&local_d8;
  local_b8 = *(longlong **)(param_2 + 0xe);
  uStack_b0 = *(undefined4 *)(param_2 + 0x16);
  uStack_ac = *(undefined4 *)(param_2 + 0x1a);
  uVar12 = FUN_140062280(&local_d8,&local_b8);
  plVar13 = operator_new(0x18);
  plVar15 = plVar16;
  local_e8[0] = plVar13;
  if (plVar13 != (longlong *)0x0) {
    plVar13[1] = 0;
    *(undefined4 *)(plVar13 + 2) = 1;
    lVar14 = FUN_140201490("quest_uid");
    *plVar13 = lVar14;
    plVar15 = plVar13;
  }
  local_108 = plVar15;
  if (plVar15 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_120 = 0x26;
  local_128 = 1;
  local_118 = (undefined8 *)uVar12;
  plVar15 = (longlong *)FUN_140001880(&local_100,&local_f0,&local_108,0xca);
  local_e8[0] = plVar15;
  if (local_100 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar11 = (undefined8 *)FUN_140001660(local_100,&local_f8);
  pIVar2 = (IUnknown *)*puVar11;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_f8 != (longlong *)0x0) {
    (**(code **)(*local_f8 + 0x10))();
  }
  if ((longlong *)*plVar15 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar15 + 0x10))();
  }
  local_f0 = local_88;
  local_d8 = *(undefined4 *)(param_2 + 0x1e);
  uStack_d4 = *(undefined4 *)(param_2 + 0x22);
  uStack_d0 = *(undefined4 *)(param_2 + 0x26);
  uStack_cc = *(undefined4 *)(param_2 + 0x2a);
  uVar12 = FUN_140062280(local_88,&local_d8);
  plVar13 = operator_new(0x18);
  plVar15 = plVar16;
  local_e8[0] = plVar13;
  if (plVar13 != (longlong *)0x0) {
    plVar13[1] = 0;
    *(undefined4 *)(plVar13 + 2) = 1;
    lVar14 = FUN_140201490("character_id");
    *plVar13 = lVar14;
    plVar15 = plVar13;
  }
  local_f8 = plVar15;
  if (plVar15 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_120 = 0x26;
  local_128 = 1;
  local_118 = (undefined8 *)uVar12;
  plVar15 = (longlong *)FUN_140001880(&local_100,&local_b8,&local_f8,0xca);
  local_f0 = plVar15;
  if (local_100 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar11 = (undefined8 *)FUN_140001660(local_100,&local_108);
  pIVar2 = (IUnknown *)*puVar11;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_108 != (longlong *)0x0) {
    (**(code **)(*local_108 + 0x10))();
  }
  if ((longlong *)*plVar15 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar15 + 0x10))();
  }
  local_b8 = (longlong *)&local_d8;
  sVar1 = *(short *)(param_2 + 0x2e);
  Ordinal_8(&local_d8);
  FUN_140062080(&local_d8,(int)sVar1);
  plVar13 = operator_new(0x18);
  plVar15 = plVar16;
  local_f0 = plVar13;
  if (plVar13 != (longlong *)0x0) {
    plVar13[1] = 0;
    *(undefined4 *)(plVar13 + 2) = 1;
    lVar14 = FUN_140201490("quest_state");
    *plVar13 = lVar14;
    plVar15 = plVar13;
  }
  local_f8 = plVar15;
  if (plVar15 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_118 = (undefined8 *)&local_d8;
  local_120 = 1;
  local_128 = 1;
  plVar15 = (longlong *)FUN_140001880(&local_100,local_e8,&local_f8,0x10);
  local_b8 = plVar15;
  if (local_100 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar11 = (undefined8 *)FUN_140001660(local_100,&local_108);
  pIVar2 = (IUnknown *)*puVar11;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_108 != (longlong *)0x0) {
    (**(code **)(*local_108 + 0x10))();
  }
  if ((longlong *)*plVar15 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar15 + 0x10))();
  }
  local_b8 = (longlong *)&local_d8;
  sVar1 = *(short *)(param_2 + 0x30);
  Ordinal_8(&local_d8);
  FUN_140062080(&local_d8,(int)sVar1);
  plVar13 = operator_new(0x18);
  plVar15 = plVar16;
  local_f0 = plVar13;
  if (plVar13 != (longlong *)0x0) {
    plVar13[1] = 0;
    *(undefined4 *)(plVar13 + 2) = 1;
    lVar14 = FUN_140201490("quest_status1");
    *plVar13 = lVar14;
    plVar15 = plVar13;
  }
  local_f8 = plVar15;
  if (plVar15 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_118 = (undefined8 *)&local_d8;
  local_120 = 2;
  local_128 = 1;
  plVar15 = (longlong *)FUN_140001880(&local_100,local_e8,&local_f8,2);
  local_b8 = plVar15;
  if (local_100 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar11 = (undefined8 *)FUN_140001660(local_100,&local_108);
  pIVar2 = (IUnknown *)*puVar11;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_108 != (longlong *)0x0) {
    (**(code **)(*local_108 + 0x10))();
  }
  if ((longlong *)*plVar15 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar15 + 0x10))();
  }
  local_b8 = (longlong *)&local_d8;
  sVar1 = *(short *)(param_2 + 0x32);
  Ordinal_8(&local_d8);
  FUN_140062080(&local_d8,(int)sVar1);
  plVar13 = operator_new(0x18);
  plVar15 = plVar16;
  local_f0 = plVar13;
  if (plVar13 != (longlong *)0x0) {
    plVar13[1] = 0;
    *(undefined4 *)(plVar13 + 2) = 1;
    lVar14 = FUN_140201490("quest_status2");
    *plVar13 = lVar14;
    plVar15 = plVar13;
  }
  local_f8 = plVar15;
  if (plVar15 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_118 = (undefined8 *)&local_d8;
  local_120 = 2;
  local_128 = 1;
  plVar15 = (longlong *)FUN_140001880(&local_100,local_e8,&local_f8,2);
  local_b8 = plVar15;
  if (local_100 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar11 = (undefined8 *)FUN_140001660(local_100,&local_108);
  pIVar2 = (IUnknown *)*puVar11;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_108 != (longlong *)0x0) {
    (**(code **)(*local_108 + 0x10))();
  }
  if ((longlong *)*plVar15 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar15 + 0x10))();
  }
  local_b8 = (longlong *)&local_d8;
  sVar1 = *(short *)(param_2 + 0x34);
  Ordinal_8(&local_d8);
  FUN_140062080(&local_d8,(int)sVar1);
  plVar13 = operator_new(0x18);
  plVar15 = plVar16;
  local_f0 = plVar13;
  if (plVar13 != (longlong *)0x0) {
    plVar13[1] = 0;
    *(undefined4 *)(plVar13 + 2) = 1;
    lVar14 = FUN_140201490("quest_status3");
    *plVar13 = lVar14;
    plVar15 = plVar13;
  }
  local_f8 = plVar15;
  if (plVar15 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_118 = (undefined8 *)&local_d8;
  local_120 = 2;
  local_128 = 1;
  plVar15 = (longlong *)FUN_140001880(&local_100,local_e8,&local_f8,2);
  local_b8 = plVar15;
  if (local_100 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar11 = (undefined8 *)FUN_140001660(local_100,&local_108);
  pIVar2 = (IUnknown *)*puVar11;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_108 != (longlong *)0x0) {
    (**(code **)(*local_108 + 0x10))();
  }
  if ((longlong *)*plVar15 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar15 + 0x10))();
  }
  local_b8 = (longlong *)&local_d8;
  sVar1 = *(short *)(param_2 + 0x36);
  Ordinal_8(&local_d8);
  FUN_140062080(&local_d8,(int)sVar1);
  plVar13 = operator_new(0x18);
  plVar15 = plVar16;
  local_f0 = plVar13;
  if (plVar13 != (longlong *)0x0) {
    plVar13[1] = 0;
    *(undefined4 *)(plVar13 + 2) = 1;
    lVar14 = FUN_140201490("quest_status4");
    *plVar13 = lVar14;
    plVar15 = plVar13;
  }
  local_f8 = plVar15;
  if (plVar15 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_118 = (undefined8 *)&local_d8;
  local_120 = 2;
  local_128 = 1;
  plVar15 = (longlong *)FUN_140001880(&local_100,local_e8,&local_f8,2);
  local_b8 = plVar15;
  if (local_100 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar11 = (undefined8 *)FUN_140001660(local_100,&local_108);
  pIVar2 = (IUnknown *)*puVar11;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_108 != (longlong *)0x0) {
    (**(code **)(*local_108 + 0x10))();
  }
  if ((longlong *)*plVar15 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar15 + 0x10))();
  }
  local_b8 = (longlong *)&local_d8;
  sVar1 = *(short *)(param_2 + 0x38);
  Ordinal_8(&local_d8);
  FUN_140062080(&local_d8,(int)sVar1);
  plVar13 = operator_new(0x18);
  plVar15 = plVar16;
  local_f0 = plVar13;
  if (plVar13 != (longlong *)0x0) {
    plVar13[1] = 0;
    *(undefined4 *)(plVar13 + 2) = 1;
    lVar14 = FUN_140201490("quest_status5");
    *plVar13 = lVar14;
    plVar15 = plVar13;
  }
  local_f8 = plVar15;
  if (plVar15 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_118 = (undefined8 *)&local_d8;
  local_120 = 2;
  local_128 = 1;
  plVar15 = (longlong *)FUN_140001880(&local_100,local_e8,&local_f8,2);
  local_b8 = plVar15;
  if (local_100 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar11 = (undefined8 *)FUN_140001660(local_100,&local_108);
  pIVar2 = (IUnknown *)*puVar11;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_108 != (longlong *)0x0) {
    (**(code **)(*local_108 + 0x10))();
  }
  if ((longlong *)*plVar15 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar15 + 0x10))();
  }
  FUN_140183500(local_a8,*(undefined8 *)(param_2 + 0x3a));
  uVar5 = FUN_1401836f0(local_a8);
  uVar6 = FUN_140183690(local_a8);
  uVar7 = FUN_140183630(local_a8);
  uVar8 = FUN_1401835d0(local_a8);
  uVar9 = FUN_140183570(local_a8);
  uVar10 = FUN_140183510(local_a8);
  local_118 = (undefined8 *)CONCAT44(local_118._4_4_,uVar6);
  local_120 = CONCAT44(local_120._4_4_,uVar7);
  local_128 = uVar8;
  local_110 = uVar5;
  FUN_14010cdb0(local_58,L"%d/%d/%d %d:%d:%d",uVar10,uVar9);
  local_32 = 0;
  local_b8 = local_88;
  uVar12 = FUN_1400623f0(local_88,local_58);
  plVar15 = operator_new(0x18);
  local_f0 = plVar15;
  if (plVar15 != (longlong *)0x0) {
    plVar15[1] = 0;
    *(undefined4 *)(plVar15 + 2) = 1;
    lVar14 = FUN_140201490("finsh_date");
    *plVar15 = lVar14;
    plVar16 = plVar15;
  }
  local_f8 = plVar16;
  if (plVar16 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  local_120 = 0x14;
  local_128 = 1;
  local_118 = (undefined8 *)uVar12;
  plVar16 = (longlong *)FUN_140001880(&local_100,local_e8,&local_f8,0xca);
  local_b8 = plVar16;
  if (local_100 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar11 = (undefined8 *)FUN_140001660(local_100,&local_108);
  pIVar2 = (IUnknown *)*puVar11;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_108 != (longlong *)0x0) {
      (**(code **)(*local_108 + 0x10))();
    }
    if ((longlong *)*plVar16 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar16 + 0x10))();
    }
    FUN_1400016d0(&local_100,&local_f8);
    if (local_f8 != (longlong *)0x0) {
      (**(code **)(*local_f8 + 0x10))();
    }
    if (local_100 != (longlong *)0x0) {
      (**(code **)(*local_100 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_14010ca00(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14010ca98;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14010ca98:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_quest_show");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("quest_uid");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  sVar1 = *(short *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,(int)sVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("quest_show");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



void FUN_14010cdb0(wchar_t *param_1,size_t param_2,undefined8 param_3,va_list param_4)

{
  undefined8 local_res18;
  va_list local_res20;
  
  local_res18 = param_3;
  local_res20 = param_4;
  _vswprintf(param_1,param_2,(wchar_t *)&local_res18,param_4);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_14010cde0(undefined8 *param_1,undefined8 *param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  undefined8 *puVar3;
  int iVar4;
  HRESULT HVar5;
  ULONG UVar6;
  int iVar7;
  undefined8 *puVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 *puVar11;
  undefined8 *puVar12;
  char *pcVar13;
  undefined2 uVar14;
  longlong *plVar15;
  longlong lVar16;
  uint uVar17;
  undefined1 auStackY_4d8 [32];
  char local_498 [4];
  short local_494;
  longlong *local_490;
  char *local_488;
  undefined8 *local_480;
  int local_478;
  longlong *local_470;
  LPUNKNOWN local_468 [2];
  IUnknown *local_458;
  longlong *local_450;
  undefined4 local_448;
  undefined1 local_438 [24];
  undefined1 local_420 [24];
  undefined4 local_408;
  undefined1 *local_400;
  undefined4 local_3f8;
  undefined8 local_3f0;
  undefined1 *local_3e8;
  longlong *local_3d8;
  undefined8 *local_3d0;
  short local_3c8 [12];
  longlong *local_3b0;
  longlong *local_3a8;
  longlong *local_3a0;
  longlong *local_398;
  undefined8 local_390;
  undefined8 local_388;
  undefined1 local_380 [24];
  short local_368 [16];
  undefined8 local_348;
  undefined1 local_340 [8];
  undefined4 local_338;
  undefined4 uStack_334;
  undefined4 uStack_330;
  undefined4 uStack_32c;
  longlong local_320 [3];
  undefined4 local_308;
  undefined4 uStack_304;
  undefined4 local_300;
  undefined2 local_2fc;
  undefined2 local_2fa;
  undefined8 local_2f8;
  undefined8 local_2f0;
  undefined8 local_2e8;
  undefined8 local_2e0;
  undefined8 local_2d8;
  undefined8 local_2d0;
  undefined8 local_2c8;
  undefined8 local_2c0;
  undefined8 local_2b8 [64];
  char local_b8 [128];
  ulonglong local_38;
  
  local_348 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_4d8;
  plVar15 = (longlong *)0x0;
  local_490 = (longlong *)0x0;
  local_480 = param_1;
  local_3d0 = param_2;
  iVar4 = FUN_140001970(&local_490);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_458 = (IUnknown *)0x0;
  local_450 = (longlong *)0x0;
  Ordinal_8(local_438);
  Ordinal_8(local_420);
  pIVar2 = local_458;
  if ((local_458 != (IUnknown *)0x0) && (local_458 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_3e8 = &DAT_140281f00;
  local_400 = &DAT_140281f00;
  local_3f8 = 0;
  local_3f0 = 0;
  if (local_458 != (IUnknown *)0x0) {
    (*local_458->lpVtbl->Release)(local_458);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_468
                          );
  if (HVar5 < 0) {
LAB_14010cf43:
    local_458 = (IUnknown *)0x0;
  }
  else {
    HVar5 = OleRun(local_468[0]);
    if (-1 < HVar5) {
      HVar5 = (*local_468[0]->lpVtbl->QueryInterface)(local_468[0],(IID *)&DAT_140281f68,&local_458)
      ;
    }
    (*local_468[0]->lpVtbl->Release)(local_468[0]);
    if (HVar5 < 0) goto LAB_14010cf43;
  }
  local_408 = 2;
  local_448 = 1;
  local_498[0] = '\x01';
  local_2f8 = 0;
  local_2f0 = 0;
  local_2e8 = 0;
  local_2e0 = 0;
  local_2d8 = 0;
  local_2d0 = 0;
  local_2c8 = 0;
  local_2c0 = 0;
  local_2b8[0] = 0;
  local_2b8[1] = 0;
  lVar16 = 0xf;
  puVar8 = local_2b8 + 2;
  puVar3 = local_2b8;
  do {
    puVar12 = puVar3;
    puVar11 = puVar8;
    *puVar11 = *puVar12;
    puVar11[1] = puVar12[1];
    puVar11[2] = puVar12[2];
    puVar11[3] = puVar12[3];
    lVar16 = lVar16 + -1;
    puVar8 = puVar11 + 4;
    puVar3 = puVar12 + 4;
  } while (lVar16 != 0);
  puVar11[4] = puVar12[4];
  puVar11[5] = puVar12[5];
  local_300 = *(undefined4 *)(param_2 + 1);
  _local_308 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23600000);
  local_2fc = 0x9d;
  _local_308 = CONCAT62(stack0xfffffffffffffcfa,0x250);
  local_2fa = *(undefined2 *)((longlong)param_2 + 0xe);
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_14010d0b4:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      pIVar2 = local_458;
      if (local_458 != (IUnknown *)0x0) {
        local_480 = (undefined8 *)((ulonglong)local_480 & 0xffffffff00000000);
        UVar6 = (*local_458->lpVtbl[0x12].AddRef)(local_458);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
        pIVar2 = local_458;
        if ((int)local_480 != 0) {
          if (local_458 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar6 = (*local_458->lpVtbl[10].Release)(local_458);
          if ((int)UVar6 < 0) {
            _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_458 != (IUnknown *)0x0) {
          (*local_458->lpVtbl->Release)(local_458);
          local_458 = (IUnknown *)0x0;
        }
      }
      local_3f0 = 0;
      local_3e8 = &DAT_140281f00;
      local_400 = &DAT_140281f00;
      local_3f8 = 0;
      local_408 = 0;
      Ordinal_9(local_420);
      Ordinal_9(local_438);
      if (local_450 != (longlong *)0x0) {
        (**(code **)(*local_450 + 0x10))();
      }
      if (local_458 != (IUnknown *)0x0) {
        (*local_458->lpVtbl->Release)(local_458);
      }
      if (local_490 != (longlong *)0x0) {
        (**(code **)(*local_490 + 0x10))();
      }
      return (longlong *)0x0;
    }
  }
  else {
    local_478 = 0;
    UVar6 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_478 == 0) goto LAB_14010d0b4;
  }
  local_488 = "dbo.up_read_item_quickslot_list_none";
  sVar1 = *(short *)((longlong)param_2 + 0xe);
  if (sVar1 == 0) {
    puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_3a0);
    pcVar13 = "dbo.up_read_item_quickslot_list";
    FUN_140001710(&local_490,*puVar8,"dbo.up_read_item_quickslot_list");
  }
  else if (sVar1 == 1) {
    puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_398);
    pcVar13 = "dbo.up_read_item_quickslot_list_02";
    FUN_140001710(&local_490,*puVar8,"dbo.up_read_item_quickslot_list_02");
    local_3a0 = local_398;
  }
  else {
    pcVar13 = local_488;
    if (sVar1 != 2) goto LAB_14010d2bc;
    puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_3b0);
    pcVar13 = "dbo.up_read_item_quickslot_list_03";
    FUN_140001710(&local_490,*puVar8,"dbo.up_read_item_quickslot_list_03");
    local_3a0 = local_3b0;
  }
  if (local_3a0 != (longlong *)0x0) {
    (**(code **)(*local_3a0 + 0x10))();
  }
LAB_14010d2bc:
  local_488 = pcVar13;
  local_470 = local_320;
  local_338 = *(undefined4 *)(param_2 + 2);
  uStack_334 = *(undefined4 *)((longlong)param_2 + 0x14);
  uStack_330 = *(undefined4 *)(param_2 + 3);
  uStack_32c = *(undefined4 *)((longlong)param_2 + 0x1c);
  FUN_140062280(local_320,&local_338);
  plVar9 = operator_new(0x18);
  local_3a8 = plVar15;
  local_3d8 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar16 = FUN_140201490("character_id");
    *plVar9 = lVar16;
    local_3a8 = plVar9;
  }
  if (local_3a8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_490,local_340,&local_3a8,0xca);
  local_470 = plVar9;
  if (local_490 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_490,&local_3d8);
  pIVar2 = (IUnknown *)*puVar8;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar6 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar6 < 0) {
      _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_3d8 != (longlong *)0x0) {
      (**(code **)(*local_3d8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    puVar8 = (undefined8 *)FUN_1400016d0(&local_490,&local_470);
    This = local_458;
    pIVar2 = (IUnknown *)*puVar8;
    if (local_458 != pIVar2) {
      local_458 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_470 != (longlong *)0x0) {
      (**(code **)(*local_470 + 0x10))();
    }
    pIVar2 = local_458;
    if (local_458 != (IUnknown *)0x0) {
      local_494 = 0;
      UVar6 = (*local_458->lpVtbl[6].Release)(local_458);
      if ((int)UVar6 < 0) {
        _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if (local_494 == -1) {
        local_2fc = 0x9f;
        plVar9 = plVar15;
      }
      else {
        local_b8[1] = '\0';
        local_b8[2] = '\0';
        local_b8[3] = '\0';
        local_b8[4] = '\0';
        local_b8[5] = '\0';
        local_b8[6] = '\0';
        local_b8[7] = '\0';
        local_b8[8] = '\0';
        local_b8[9] = '\0';
        local_b8[10] = '\0';
        local_b8[0xb] = '\0';
        local_b8[0xc] = '\0';
        local_b8[0xd] = '\0';
        local_b8[0xe] = '\0';
        local_b8[0xf] = '\0';
        local_b8[0x10] = '\0';
        local_b8[0x11] = '\0';
        local_b8[0x12] = '\0';
        local_b8[0x13] = '\0';
        local_b8[0x14] = '\0';
        local_b8[0x15] = '\0';
        local_b8[0x16] = '\0';
        local_b8[0x17] = '\0';
        local_b8[0x18] = '\0';
        local_b8[0x19] = '\0';
        local_b8[0x1a] = '\0';
        local_b8[0x1b] = '\0';
        local_b8[0x1c] = '\0';
        local_b8[0x1d] = '\0';
        local_b8[0x1e] = '\0';
        local_b8[0x1f] = '\0';
        local_b8[0x20] = '\0';
        local_b8[0x21] = '\0';
        local_b8[0x22] = '\0';
        local_b8[0x23] = '\0';
        local_b8[0x24] = '\0';
        local_b8[0x25] = '\0';
        local_b8[0x26] = '\0';
        local_b8[0x27] = '\0';
        local_b8[0x28] = '\0';
        local_b8[0x29] = '\0';
        local_b8[0x2a] = '\0';
        local_b8[0x2b] = '\0';
        local_b8[0x2c] = '\0';
        local_b8[0x2d] = '\0';
        local_b8[0x2e] = '\0';
        local_b8[0x2f] = '\0';
        local_b8[0x30] = '\0';
        local_b8[0x31] = '\0';
        local_b8[0x32] = '\0';
        local_b8[0x33] = '\0';
        local_b8[0x34] = '\0';
        local_b8[0x35] = '\0';
        local_b8[0x36] = '\0';
        local_b8[0x37] = '\0';
        local_b8[0x38] = '\0';
        local_b8[0x39] = '\0';
        local_b8[0x3a] = '\0';
        local_b8[0x3b] = '\0';
        local_b8[0x3c] = '\0';
        local_b8[0x3d] = '\0';
        local_b8[0x3e] = '\0';
        local_b8[0x3f] = 0;
        local_b8[0x40] = 0;
        local_b8[0x41] = '\0';
        local_b8[0x42] = '\0';
        local_b8[0x43] = '\0';
        local_b8[0x44] = '\0';
        local_b8[0x45] = '\0';
        local_b8[0x46] = '\0';
        local_b8[0x47] = '\0';
        local_b8[0x48] = '\0';
        local_b8[0x49] = '\0';
        local_b8[0x4a] = '\0';
        local_b8[0x4b] = '\0';
        local_b8[0x4c] = '\0';
        local_b8[0x4d] = '\0';
        local_b8[0x4e] = '\0';
        local_b8[0x4f] = '\0';
        local_b8[0x50] = '\0';
        local_b8[0x51] = '\0';
        local_b8[0x52] = '\0';
        local_b8[0x53] = '\0';
        local_b8[0x54] = '\0';
        local_b8[0x55] = '\0';
        local_b8[0x56] = '\0';
        local_b8[0x57] = '\0';
        local_b8[0x58] = '\0';
        local_b8[0x59] = '\0';
        local_b8[0x5a] = '\0';
        local_b8[0x5b] = '\0';
        local_b8[0x5c] = '\0';
        local_b8[0x5d] = '\0';
        local_b8[0x5e] = '\0';
        local_b8[0x5f] = '\0';
        local_b8[0x60] = '\0';
        local_b8[0x61] = '\0';
        local_b8[0x62] = '\0';
        local_b8[99] = '\0';
        local_b8[100] = '\0';
        local_b8[0x65] = '\0';
        local_b8[0x66] = '\0';
        local_b8[0x67] = '\0';
        local_b8[0x68] = '\0';
        local_b8[0x69] = '\0';
        local_b8[0x6a] = '\0';
        local_b8[0x6b] = '\0';
        local_b8[0x6c] = '\0';
        local_b8[0x6d] = '\0';
        local_b8[0x6e] = '\0';
        local_b8[0x6f] = '\0';
        local_b8[0x70] = '\0';
        local_b8[0x71] = '\0';
        local_b8[0x72] = '\0';
        local_b8[0x73] = '\0';
        local_b8[0x74] = '\0';
        local_b8[0x75] = '\0';
        local_b8[0x76] = '\0';
        local_b8[0x77] = '\0';
        local_b8[0x78] = '\0';
        local_b8[0x79] = '\0';
        local_b8[0x7a] = '\0';
        local_b8[0x7b] = '\0';
        local_b8[0x7c] = '\0';
        local_b8[0x7d] = '\0';
        local_b8[0x7e] = '\0';
        local_b8[0x7f] = 0;
        local_b8[0] = '\0';
        plVar9 = plVar15;
        while (iVar4 = (int)plVar9, iVar4 < 0x20) {
          uVar17 = iVar4 + 1;
          sprintf(local_b8,"type_%02d",(ulonglong)uVar17);
          sprintf(local_b8 + 0x40,"item_id_%02d",(ulonglong)uVar17);
          FUN_140002290(&local_458,local_3c8,local_b8,local_498);
          if (local_3c8[0] == 1) {
            *(undefined2 *)((longlong)&local_2f8 + (longlong)iVar4 * 2) = 0;
          }
          else {
            FUN_140182560(local_3c8);
            if (local_3c8[0] == 3) {
              uVar14 = (undefined2)local_3c8._8_4_;
            }
            else {
              Ordinal_8(local_380);
              iVar7 = Ordinal_12(local_380,local_3c8,0,3);
              if (iVar7 < 0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(iVar7);
              }
              uVar14 = (undefined2)local_380._8_4_;
              Ordinal_9(local_380);
            }
            *(undefined2 *)((longlong)&local_2f8 + (longlong)iVar4 * 2) = uVar14;
          }
          lVar16 = (longlong)iVar4;
          FUN_140002290(&local_458,local_368,local_b8 + 0x40,local_498);
          if (local_368[0] == 1) {
            local_2b8[lVar16 * 2] = 0;
            uVar10 = 0;
          }
          else {
            FUN_1400625d0(local_368,&local_390);
            local_2b8[lVar16 * 2] = local_390;
            uVar10 = local_388;
          }
          local_2b8[lVar16 * 2 + 1] = uVar10;
          Ordinal_9(local_368);
          Ordinal_9(local_3c8);
          plVar9 = (longlong *)(ulonglong)uVar17;
        }
        plVar9 = (longlong *)0x1;
        if (local_498[0] == '\0') {
          local_2fc = 0xa0;
          plVar9 = plVar15;
        }
      }
      iVar4 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_308);
      if (iVar4 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar2 = local_458;
      if (local_458 != (IUnknown *)0x0) {
        local_488 = (char *)((ulonglong)local_488 & 0xffffffff00000000);
        UVar6 = (*local_458->lpVtbl[0x12].AddRef)(local_458);
        if ((int)UVar6 < 0) {
          _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
        pIVar2 = local_458;
        if ((int)local_488 != 0) {
          if (local_458 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar6 = (*local_458->lpVtbl[10].Release)(local_458);
          if ((int)UVar6 < 0) {
            _com_issue_errorex(UVar6,pIVar2,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_458 != (IUnknown *)0x0) {
          (*local_458->lpVtbl->Release)(local_458);
          local_458 = (IUnknown *)0x0;
        }
      }
      local_3f0 = 0;
      local_3e8 = &DAT_140281f00;
      local_400 = &DAT_140281f00;
      local_3f8 = 0;
      local_408 = 0;
      Ordinal_9(local_420);
      Ordinal_9(local_438);
      if (local_450 != (longlong *)0x0) {
        (**(code **)(*local_450 + 0x10))();
      }
      if (local_458 != (IUnknown *)0x0) {
        (*local_458->lpVtbl->Release)(local_458);
      }
      if (local_490 != (longlong *)0x0) {
        (**(code **)(*local_490 + 0x10))();
      }
      return plVar9;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Type propagation algorithm not settling

undefined8 FUN_14010d8a0(undefined8 *param_1,longlong *param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  undefined *puVar3;
  ULONG UVar4;
  int iVar5;
  int iVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  longlong lVar12;
  int iVar13;
  longlong *plVar14;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_c8;
  short local_c0 [4];
  int local_b8;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_48;
  undefined1 local_40 [8];
  
  local_48 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar14 = (longlong *)0x0;
  local_res20 = param_2;
  local_98 = param_2;
  if ((pIVar2 != (IUnknown *)0x0) && (UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2), (int)UVar4 < 0)
     ) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
  local_res18 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res18);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  sVar1 = *(short *)((longlong)param_2 + 0xe);
  if (sVar1 == 0) {
    puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_c8);
    FUN_140001710(&local_res18,*puVar7,"dbo.up_save_item_quickslot");
  }
  else if (sVar1 == 1) {
    puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_c8);
    FUN_140001710(&local_res18,*puVar7,"dbo.up_save_item_quickslot_02");
  }
  else {
    if (sVar1 != 2) goto LAB_14010da28;
    puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_c8);
    FUN_140001710(&local_res18,*puVar7,"dbo.up_save_item_quickslot_03");
  }
  if (local_c8 != (longlong *)0x0) {
    (**(code **)(*local_c8 + 0x10))();
  }
LAB_14010da28:
  local_a8 = (longlong *)local_c0;
  local_78 = (undefined4)param_2[2];
  uStack_74 = *(undefined4 *)((longlong)param_2 + 0x14);
  uStack_70 = (undefined4)param_2[3];
  uStack_6c = *(undefined4 *)((longlong)param_2 + 0x1c);
  uVar8 = FUN_140062280(local_c0,&local_78);
  plVar9 = operator_new(0x18);
  local_c8 = plVar14;
  local_80 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("character_id");
    *plVar9 = lVar10;
    local_c8 = plVar9;
  }
  if (local_c8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res18,&local_88,&local_c8,0xca,1,0x26,uVar8);
  local_a8 = plVar9;
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_res18,&local_a0);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a0 != (longlong *)0x0) {
    (**(code **)(*local_a0 + 0x10))();
  }
  plVar11 = plVar14;
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  while( true ) {
    iVar5 = (int)plVar11;
    if (0x1f < iVar5) {
      FUN_1400016d0(&local_res18,&local_98);
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      return 1;
    }
    local_88 = (longlong *)local_c0;
    lVar10 = (longlong)iVar5;
    iVar13 = (int)*(short *)((longlong)param_2 + lVar10 * 2 + 0x20);
    Ordinal_8(local_c0);
    if ((local_c0[0] != 3) && (local_c0[0] != 10)) {
      if (local_c0[0] == 0xb) {
        local_b8 = CONCAT22(local_b8._2_2_,-(ushort)(iVar13 != 0));
        iVar13 = local_b8;
      }
      else {
        iVar6 = Ordinal_9(local_c0);
        if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(iVar6);
        }
        local_c0[0] = 3;
      }
    }
    local_b8 = iVar13;
    puVar3 = (&PTR_s_type_01_140326170)[lVar10];
    plVar11 = operator_new(0x18);
    plVar9 = plVar14;
    local_90 = plVar11;
    if (plVar11 != (longlong *)0x0) {
      plVar11[1] = 0;
      *(undefined4 *)(plVar11 + 2) = 1;
      lVar12 = FUN_140201490(puVar3);
      *plVar11 = lVar12;
      plVar9 = plVar11;
    }
    local_a0 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res18,local_40,&local_a0,3,1,4,local_c0);
    local_90 = plVar9;
    if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res18,&local_c8);
    pIVar2 = (IUnknown *)*puVar7;
    if (pIVar2 == (IUnknown *)0x0) break;
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_c8 != (longlong *)0x0) {
      (**(code **)(*local_c8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_90 = (longlong *)local_c0;
    param_2 = param_2 + (lVar10 + 6) * 2;
    local_58 = (undefined4)*param_2;
    uStack_54 = *(undefined4 *)((longlong)param_2 + 4);
    uStack_50 = (undefined4)param_2[1];
    uStack_4c = *(undefined4 *)((longlong)param_2 + 0xc);
    uVar8 = FUN_140062280(local_c0,&local_58);
    puVar3 = (&PTR_s_item_id_01_140326270)[lVar10];
    plVar11 = operator_new(0x18);
    plVar9 = plVar14;
    local_88 = plVar11;
    if (plVar11 != (longlong *)0x0) {
      plVar11[1] = 0;
      *(undefined4 *)(plVar11 + 2) = 1;
      lVar10 = FUN_140201490(puVar3);
      *plVar11 = lVar10;
      plVar9 = plVar11;
    }
    local_80 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res18,&local_78,&local_80,0xca,1,0x26,uVar8);
    local_90 = plVar9;
    if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res18,&local_a8);
    pIVar2 = (IUnknown *)*puVar7;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    param_2 = local_98;
    plVar11 = (longlong *)(ulonglong)(iVar5 + 1);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_14010de70(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  undefined8 *puVar2;
  int iVar3;
  HRESULT HVar4;
  ULONG UVar5;
  int iVar6;
  undefined8 *puVar7;
  longlong *plVar8;
  undefined8 uVar9;
  undefined8 *puVar10;
  undefined8 *puVar11;
  undefined2 uVar12;
  longlong *plVar13;
  longlong lVar14;
  uint uVar15;
  undefined1 auStackY_4c8 [32];
  char local_488 [4];
  short local_484;
  longlong *local_480;
  undefined8 *local_478;
  char *local_470;
  int local_468;
  LPUNKNOWN local_460;
  longlong *local_458 [2];
  IUnknown *local_448;
  longlong *local_440;
  undefined4 local_438;
  undefined1 local_428 [24];
  undefined1 local_410 [24];
  undefined4 local_3f8;
  undefined1 *local_3f0;
  undefined4 local_3e8;
  undefined8 local_3e0;
  undefined1 *local_3d8;
  undefined8 *local_3c8;
  longlong *local_3c0;
  short local_3b8 [12];
  longlong *local_3a0;
  longlong *local_398;
  undefined8 local_390;
  undefined8 local_388;
  undefined1 local_380 [24];
  short local_368 [12];
  undefined8 local_350;
  undefined1 local_340 [8];
  undefined4 local_338;
  undefined4 uStack_334;
  undefined4 uStack_330;
  undefined4 uStack_32c;
  longlong local_320 [3];
  undefined4 local_308;
  undefined4 uStack_304;
  undefined4 local_300;
  undefined2 local_2fc;
  undefined8 local_2fa;
  undefined8 local_2f2;
  undefined8 local_2ea;
  undefined8 local_2e2;
  undefined8 local_2da;
  undefined8 local_2d2;
  undefined8 local_2ca;
  undefined8 local_2c2;
  undefined8 local_2ba [64];
  char local_b8 [128];
  ulonglong local_38;
  
  local_350 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_4c8;
  plVar13 = (longlong *)0x0;
  local_480 = (longlong *)0x0;
  local_478 = param_1;
  local_3c8 = param_2;
  iVar3 = FUN_140001970(&local_480);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_448 = (IUnknown *)0x0;
  local_440 = (longlong *)0x0;
  Ordinal_8(local_428);
  Ordinal_8(local_410);
  pIVar1 = local_448;
  if ((local_448 != (IUnknown *)0x0) && (local_448 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_3d8 = &DAT_140281f00;
  local_3f0 = &DAT_140281f00;
  local_3e8 = 0;
  local_3e0 = 0;
  if (local_448 != (IUnknown *)0x0) {
    (*local_448->lpVtbl->Release)(local_448);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_460);
  if (HVar4 < 0) {
LAB_14010dfd3:
    local_448 = (IUnknown *)0x0;
  }
  else {
    HVar4 = OleRun(local_460);
    if (-1 < HVar4) {
      HVar4 = (*local_460->lpVtbl->QueryInterface)(local_460,(IID *)&DAT_140281f68,&local_448);
    }
    (*local_460->lpVtbl->Release)(local_460);
    if (HVar4 < 0) goto LAB_14010dfd3;
  }
  local_3f8 = 2;
  local_438 = 1;
  local_488[0] = '\x01';
  local_2fa = 0;
  local_2f2 = 0;
  local_2ea = 0;
  local_2e2 = 0;
  local_2da = 0;
  local_2d2 = 0;
  local_2ca = 0;
  local_2c2 = 0;
  local_2ba[0] = 0;
  local_2ba[1] = 0;
  lVar14 = 0xf;
  puVar7 = local_2ba + 2;
  puVar2 = local_2ba;
  do {
    puVar11 = puVar2;
    puVar10 = puVar7;
    *puVar10 = *puVar11;
    puVar10[1] = puVar11[1];
    puVar10[2] = puVar11[2];
    puVar10[3] = puVar11[3];
    lVar14 = lVar14 + -1;
    puVar7 = puVar10 + 4;
    puVar2 = puVar11 + 4;
  } while (lVar14 != 0);
  puVar10[4] = puVar11[4];
  puVar10[5] = puVar11[5];
  local_300 = *(undefined4 *)(param_2 + 1);
  _local_308 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x24660000);
  local_2fc = 0x9d;
  _local_308 = CONCAT62(stack0xfffffffffffffcfa,0x24e);
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_468 = 0;
    UVar5 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_468 != 0) goto LAB_14010e273;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_448;
    if (local_448 != (IUnknown *)0x0) {
      local_470 = (char *)((ulonglong)local_470 & 0xffffffff00000000);
      UVar5 = (*local_448->lpVtbl[0x12].AddRef)(local_448);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_448;
      if ((int)local_470 != 0) {
        if (local_448 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar5 = (*local_448->lpVtbl[10].Release)(local_448);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_448 != (IUnknown *)0x0) {
        (*local_448->lpVtbl->Release)(local_448);
        local_448 = (IUnknown *)0x0;
      }
    }
    local_3e0 = 0;
    local_3d8 = &DAT_140281f00;
    local_3f0 = &DAT_140281f00;
    local_3e8 = 0;
    local_3f8 = 0;
    Ordinal_9(local_410);
    Ordinal_9(local_428);
    if (local_440 != (longlong *)0x0) {
      (**(code **)(*local_440 + 0x10))();
    }
    if (local_448 != (IUnknown *)0x0) {
      (*local_448->lpVtbl->Release)(local_448);
    }
    if (local_480 != (longlong *)0x0) {
      (**(code **)(*local_480 + 0x10))();
    }
    return (longlong *)0x0;
  }
LAB_14010e273:
  local_470 = "dbo.up_read_item_quickslot_list_option";
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_3a0);
  FUN_140001710(&local_480,*puVar7,"dbo.up_read_item_quickslot_list_option");
  if (local_3a0 != (longlong *)0x0) {
    (**(code **)(*local_3a0 + 0x10))();
  }
  local_458[0] = local_320;
  local_338 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_334 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_330 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_32c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_320,&local_338);
  plVar8 = operator_new(0x18);
  local_398 = plVar13;
  local_3c0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar14 = FUN_140201490("character_id");
    *plVar8 = lVar14;
    local_398 = plVar8;
  }
  if (local_398 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar8 = (longlong *)FUN_140001880(&local_480,local_340,&local_398,0xca);
  local_458[0] = plVar8;
  if (local_480 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_480,&local_3c0);
  pIVar1 = (IUnknown *)*puVar7;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar5 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_3c0 != (longlong *)0x0) {
      (**(code **)(*local_3c0 + 0x10))();
    }
    if ((longlong *)*plVar8 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar8 + 0x10))();
    }
    puVar7 = (undefined8 *)FUN_1400016d0(&local_480,local_458);
    This = local_448;
    pIVar1 = (IUnknown *)*puVar7;
    if (local_448 != pIVar1) {
      local_448 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_458[0] != (longlong *)0x0) {
      (**(code **)(*local_458[0] + 0x10))();
    }
    pIVar1 = local_448;
    if (local_448 != (IUnknown *)0x0) {
      local_484 = 0;
      UVar5 = (*local_448->lpVtbl[6].Release)(local_448);
      if ((int)UVar5 < 0) {
        _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_484 == -1) {
        local_2fc = 0x9f;
        plVar8 = plVar13;
      }
      else {
        local_b8[1] = '\0';
        local_b8[2] = '\0';
        local_b8[3] = '\0';
        local_b8[4] = '\0';
        local_b8[5] = '\0';
        local_b8[6] = '\0';
        local_b8[7] = '\0';
        local_b8[8] = '\0';
        local_b8[9] = '\0';
        local_b8[10] = '\0';
        local_b8[0xb] = '\0';
        local_b8[0xc] = '\0';
        local_b8[0xd] = '\0';
        local_b8[0xe] = '\0';
        local_b8[0xf] = '\0';
        local_b8[0x10] = '\0';
        local_b8[0x11] = '\0';
        local_b8[0x12] = '\0';
        local_b8[0x13] = '\0';
        local_b8[0x14] = '\0';
        local_b8[0x15] = '\0';
        local_b8[0x16] = '\0';
        local_b8[0x17] = '\0';
        local_b8[0x18] = '\0';
        local_b8[0x19] = '\0';
        local_b8[0x1a] = '\0';
        local_b8[0x1b] = '\0';
        local_b8[0x1c] = '\0';
        local_b8[0x1d] = '\0';
        local_b8[0x1e] = '\0';
        local_b8[0x1f] = '\0';
        local_b8[0x20] = '\0';
        local_b8[0x21] = '\0';
        local_b8[0x22] = '\0';
        local_b8[0x23] = '\0';
        local_b8[0x24] = '\0';
        local_b8[0x25] = '\0';
        local_b8[0x26] = '\0';
        local_b8[0x27] = '\0';
        local_b8[0x28] = '\0';
        local_b8[0x29] = '\0';
        local_b8[0x2a] = '\0';
        local_b8[0x2b] = '\0';
        local_b8[0x2c] = '\0';
        local_b8[0x2d] = '\0';
        local_b8[0x2e] = '\0';
        local_b8[0x2f] = '\0';
        local_b8[0x30] = '\0';
        local_b8[0x31] = '\0';
        local_b8[0x32] = '\0';
        local_b8[0x33] = '\0';
        local_b8[0x34] = '\0';
        local_b8[0x35] = '\0';
        local_b8[0x36] = '\0';
        local_b8[0x37] = '\0';
        local_b8[0x38] = '\0';
        local_b8[0x39] = '\0';
        local_b8[0x3a] = '\0';
        local_b8[0x3b] = '\0';
        local_b8[0x3c] = '\0';
        local_b8[0x3d] = '\0';
        local_b8[0x3e] = '\0';
        local_b8[0x3f] = 0;
        local_b8[0x40] = 0;
        local_b8[0x41] = '\0';
        local_b8[0x42] = '\0';
        local_b8[0x43] = '\0';
        local_b8[0x44] = '\0';
        local_b8[0x45] = '\0';
        local_b8[0x46] = '\0';
        local_b8[0x47] = '\0';
        local_b8[0x48] = '\0';
        local_b8[0x49] = '\0';
        local_b8[0x4a] = '\0';
        local_b8[0x4b] = '\0';
        local_b8[0x4c] = '\0';
        local_b8[0x4d] = '\0';
        local_b8[0x4e] = '\0';
        local_b8[0x4f] = '\0';
        local_b8[0x50] = '\0';
        local_b8[0x51] = '\0';
        local_b8[0x52] = '\0';
        local_b8[0x53] = '\0';
        local_b8[0x54] = '\0';
        local_b8[0x55] = '\0';
        local_b8[0x56] = '\0';
        local_b8[0x57] = '\0';
        local_b8[0x58] = '\0';
        local_b8[0x59] = '\0';
        local_b8[0x5a] = '\0';
        local_b8[0x5b] = '\0';
        local_b8[0x5c] = '\0';
        local_b8[0x5d] = '\0';
        local_b8[0x5e] = '\0';
        local_b8[0x5f] = '\0';
        local_b8[0x60] = '\0';
        local_b8[0x61] = '\0';
        local_b8[0x62] = '\0';
        local_b8[99] = '\0';
        local_b8[100] = '\0';
        local_b8[0x65] = '\0';
        local_b8[0x66] = '\0';
        local_b8[0x67] = '\0';
        local_b8[0x68] = '\0';
        local_b8[0x69] = '\0';
        local_b8[0x6a] = '\0';
        local_b8[0x6b] = '\0';
        local_b8[0x6c] = '\0';
        local_b8[0x6d] = '\0';
        local_b8[0x6e] = '\0';
        local_b8[0x6f] = '\0';
        local_b8[0x70] = '\0';
        local_b8[0x71] = '\0';
        local_b8[0x72] = '\0';
        local_b8[0x73] = '\0';
        local_b8[0x74] = '\0';
        local_b8[0x75] = '\0';
        local_b8[0x76] = '\0';
        local_b8[0x77] = '\0';
        local_b8[0x78] = '\0';
        local_b8[0x79] = '\0';
        local_b8[0x7a] = '\0';
        local_b8[0x7b] = '\0';
        local_b8[0x7c] = '\0';
        local_b8[0x7d] = '\0';
        local_b8[0x7e] = '\0';
        local_b8[0x7f] = 0;
        local_b8[0] = '\0';
        plVar8 = plVar13;
        while (iVar3 = (int)plVar8, iVar3 < 0x20) {
          uVar15 = iVar3 + 1;
          sprintf(local_b8,"type_%02d",(ulonglong)uVar15);
          sprintf(local_b8 + 0x40,"item_id_%02d",(ulonglong)uVar15);
          FUN_140002290(&local_448,local_3b8,local_b8,local_488);
          if (local_3b8[0] == 1) {
            *(undefined2 *)((longlong)&local_2fa + (longlong)iVar3 * 2) = 0;
          }
          else {
            FUN_140182560(local_3b8);
            if (local_3b8[0] == 3) {
              uVar12 = (undefined2)local_3b8._8_4_;
            }
            else {
              Ordinal_8(local_380);
              iVar6 = Ordinal_12(local_380,local_3b8,0,3);
              if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
                FUN_1402013e0(iVar6);
              }
              uVar12 = (undefined2)local_380._8_4_;
              Ordinal_9(local_380);
            }
            *(undefined2 *)((longlong)&local_2fa + (longlong)iVar3 * 2) = uVar12;
          }
          lVar14 = (longlong)iVar3;
          FUN_140002290(&local_448,local_368,local_b8 + 0x40,local_488);
          if (local_368[0] == 1) {
            local_2ba[lVar14 * 2] = 0;
            uVar9 = 0;
          }
          else {
            FUN_1400625d0(local_368,&local_390);
            local_2ba[lVar14 * 2] = local_390;
            uVar9 = local_388;
          }
          local_2ba[lVar14 * 2 + 1] = uVar9;
          Ordinal_9(local_368);
          Ordinal_9(local_3b8);
          plVar8 = (longlong *)(ulonglong)uVar15;
        }
        plVar8 = (longlong *)0x1;
        if (local_488[0] == '\0') {
          local_2fc = 0xa0;
          plVar8 = plVar13;
        }
      }
      iVar3 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_308);
      if (iVar3 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_448;
      if (local_448 != (IUnknown *)0x0) {
        local_478 = (undefined8 *)((ulonglong)local_478 & 0xffffffff00000000);
        UVar5 = (*local_448->lpVtbl[0x12].AddRef)(local_448);
        if ((int)UVar5 < 0) {
          _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_448;
        if ((int)local_478 != 0) {
          if (local_448 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar5 = (*local_448->lpVtbl[10].Release)(local_448);
          if ((int)UVar5 < 0) {
            _com_issue_errorex(UVar5,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_448 != (IUnknown *)0x0) {
          (*local_448->lpVtbl->Release)(local_448);
          local_448 = (IUnknown *)0x0;
        }
      }
      local_3e0 = 0;
      local_3d8 = &DAT_140281f00;
      local_3f0 = &DAT_140281f00;
      local_3e8 = 0;
      local_3f8 = 0;
      Ordinal_9(local_410);
      Ordinal_9(local_428);
      if (local_440 != (longlong *)0x0) {
        (**(code **)(*local_440 + 0x10))();
      }
      if (local_448 != (IUnknown *)0x0) {
        (*local_448->lpVtbl->Release)(local_448);
      }
      if (local_480 != (longlong *)0x0) {
        (**(code **)(*local_480 + 0x10))();
      }
      return plVar8;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Type propagation algorithm not settling

undefined8 FUN_14010e8a0(undefined8 *param_1,longlong *param_2)

{
  undefined4 *puVar1;
  IUnknown *pIVar2;
  undefined *puVar3;
  ULONG UVar4;
  int iVar5;
  int iVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  longlong lVar12;
  int iVar13;
  longlong *plVar14;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_c8;
  short local_c0 [4];
  int local_b8;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined1 local_60 [8];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_40;
  
  local_40 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar14 = (longlong *)0x0;
  local_res20 = param_2;
  local_88 = param_2;
  if ((pIVar2 != (IUnknown *)0x0) && (UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2), (int)UVar4 < 0)
     ) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    uVar8 = 0;
  }
  else {
    local_res18 = (longlong *)0x0;
    iVar5 = FUN_140001970(&local_res18);
    if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar5);
    }
    puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_c8);
    FUN_140001710(&local_res18,*puVar7,"dbo.up_save_item_quickslot_option");
    if (local_c8 != (longlong *)0x0) {
      (**(code **)(*local_c8 + 0x10))();
    }
    local_a0 = (longlong *)local_c0;
    local_78 = *(undefined4 *)((longlong)param_2 + 0xe);
    uStack_74 = *(undefined4 *)((longlong)param_2 + 0x12);
    uStack_70 = *(undefined4 *)((longlong)param_2 + 0x16);
    uStack_6c = *(undefined4 *)((longlong)param_2 + 0x1a);
    uVar8 = FUN_140062280(local_c0,&local_78);
    plVar9 = operator_new(0x18);
    local_c8 = plVar14;
    local_80 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar10 = FUN_140201490("character_id");
      *plVar9 = lVar10;
      local_c8 = plVar9;
    }
    if (local_c8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res18,&local_90,&local_c8,0xca,1,0x26,uVar8);
    local_a0 = plVar9;
    if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res18,&local_a8);
    pIVar2 = (IUnknown *)*puVar7;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    plVar11 = plVar14;
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    while (iVar5 = (int)plVar11, iVar5 < 0x20) {
      local_90 = (longlong *)local_c0;
      lVar10 = (longlong)iVar5;
      iVar13 = (int)*(short *)((longlong)param_2 + lVar10 * 2 + 0x1e);
      Ordinal_8(local_c0);
      if ((local_c0[0] != 3) && (local_c0[0] != 10)) {
        if (local_c0[0] == 0xb) {
          local_b8 = CONCAT22(local_b8._2_2_,-(ushort)(iVar13 != 0));
          iVar13 = local_b8;
        }
        else {
          iVar6 = Ordinal_9(local_c0);
          if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(iVar6);
          }
          local_c0[0] = 3;
        }
      }
      local_b8 = iVar13;
      puVar3 = (&PTR_s_type_01_140326170)[lVar10];
      plVar11 = operator_new(0x18);
      plVar9 = plVar14;
      local_98 = plVar11;
      if (plVar11 != (longlong *)0x0) {
        plVar11[1] = 0;
        *(undefined4 *)(plVar11 + 2) = 1;
        lVar12 = FUN_140201490(puVar3);
        *plVar11 = lVar12;
        plVar9 = plVar11;
      }
      local_a8 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res18,local_60,&local_a8,3,1,4,local_c0);
      local_98 = plVar9;
      if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_res18,&local_c8);
      pIVar2 = (IUnknown *)*puVar7;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_c8 != (longlong *)0x0) {
        (**(code **)(*local_c8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_98 = (longlong *)local_c0;
      puVar1 = (undefined4 *)((longlong)local_res20 + lVar10 * 0x10 + 0x5e);
      local_58 = *puVar1;
      uStack_54 = puVar1[1];
      uStack_50 = puVar1[2];
      uStack_4c = puVar1[3];
      uVar8 = FUN_140062280(local_c0,&local_58);
      puVar3 = (&PTR_s_item_id_01_140326270)[lVar10];
      plVar11 = operator_new(0x18);
      plVar9 = plVar14;
      local_90 = plVar11;
      if (plVar11 != (longlong *)0x0) {
        plVar11[1] = 0;
        *(undefined4 *)(plVar11 + 2) = 1;
        lVar10 = FUN_140201490(puVar3);
        *plVar11 = lVar10;
        plVar9 = plVar11;
      }
      local_80 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res18,&local_78,&local_80,0xca,1,0x26,uVar8);
      local_98 = plVar9;
      if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_res18,&local_a0);
      pIVar2 = (IUnknown *)*puVar7;
      if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a0 != (longlong *)0x0) {
        (**(code **)(*local_a0 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      param_2 = local_res20;
      plVar11 = (longlong *)(ulonglong)(iVar5 + 1);
    }
    FUN_1400016d0(&local_res18,&local_res20);
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    uVar8 = 1;
  }
  return uVar8;
}



undefined8 FUN_14010ee10(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14010eea3;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_14010eea3:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_delete_skill");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("skill_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_14010f090(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  int iVar4;
  ULONG UVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  plVar11 = (longlong *)0x0;
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  pIVar3 = *(IUnknown **)*param_1;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar5 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_14010f163;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 0;
  }
LAB_14010f163:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_insert_skill");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140062280(&local_88,&local_68);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_a0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("NewSkillID");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar7);
  local_a0 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_98[0] = local_40;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar7 = FUN_140062280(local_40,&local_88);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_a0 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("character_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar7);
  local_98[0] = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  sVar1 = *(short *)(param_2 + 0x2e);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_98[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("group");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  sVar1 = *(short *)(param_2 + 0x30);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,(int)sVar1);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_98[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("slot_index");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  uVar2 = *(undefined4 *)(param_2 + 0x32);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_98[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("skill_table_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar5 < 0) {
    _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = (longlong *)&local_88;
  sVar1 = *(short *)(param_2 + 0x36);
  Ordinal_8(&local_88);
  FUN_140062080(&local_88,(int)sVar1);
  plVar10 = operator_new(0x18);
  local_98[0] = plVar10;
  if (plVar10 != (longlong *)0x0) {
    plVar10[1] = 0;
    *(undefined4 *)(plVar10 + 2) = 1;
    lVar9 = FUN_140201490("skill_level");
    *plVar10 = lVar9;
    plVar11 = plVar10;
  }
  local_res18 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
  local_68 = plVar11;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar5 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar5 < 0) {
      _com_issue_errorex(UVar5,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x0001401102a0)
// WARNING: Removing unreachable block (ram,0x0001401102ad)
// WARNING: Removing unreachable block (ram,0x0001401102b8)
// WARNING: Removing unreachable block (ram,0x0001401102c8)
// WARNING: Removing unreachable block (ram,0x00014010fb64)
// WARNING: Removing unreachable block (ram,0x00014010fb71)
// WARNING: Removing unreachable block (ram,0x00014010fb7c)
// WARNING: Removing unreachable block (ram,0x00014010fb8c)

undefined8 * FUN_14010f900(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  undefined6 uVar3;
  IUnknown *This;
  undefined1 uVar4;
  undefined2 uVar5;
  int iVar6;
  HRESULT HVar7;
  ULONG UVar8;
  undefined4 uVar9;
  undefined8 *puVar10;
  undefined8 uVar11;
  undefined8 uVar12;
  longlong *plVar13;
  undefined8 uVar14;
  char *riid;
  undefined8 *puVar15;
  char *ppvObject;
  longlong lVar16;
  uint uVar17;
  char local_res10 [8];
  longlong *local_res18;
  undefined8 *local_res20;
  undefined8 local_200;
  undefined2 uStack_1f4;
  short sStack_1f2;
  longlong *local_1f0;
  int local_1e8;
  undefined4 local_1e0;
  undefined4 local_1dc;
  undefined4 local_1d8;
  undefined4 local_1d4;
  undefined8 local_1d0;
  undefined2 local_1c8;
  undefined1 local_1c6;
  LPUNKNOWN local_1c0;
  IUnknown *local_1b8;
  longlong *local_1b0;
  undefined4 local_1a8;
  undefined1 local_198 [24];
  undefined1 local_180 [24];
  undefined4 local_168;
  undefined1 *local_160;
  undefined4 local_158;
  undefined8 local_150;
  undefined1 *local_148;
  undefined8 *local_138;
  longlong *local_130;
  longlong *local_128;
  longlong *local_120;
  undefined8 local_118;
  undefined8 local_110;
  undefined4 local_f8;
  undefined4 uStack_f4;
  undefined4 uStack_f0;
  undefined4 uStack_ec;
  undefined1 local_e0 [8];
  undefined8 local_d8;
  undefined1 local_d0 [24];
  undefined1 local_b8 [24];
  undefined1 local_a0 [24];
  IID local_88;
  undefined1 local_70 [24];
  undefined1 local_58 [32];
  
  local_d8 = 0xfffffffffffffffe;
  puVar15 = (undefined8 *)0x0;
  local_1f0 = (longlong *)0x0;
  iVar6 = FUN_140001970(&local_1f0);
  if ((iVar6 < 0) && (iVar6 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar6);
  }
  local_1b8 = (IUnknown *)0x0;
  local_1b0 = (longlong *)0x0;
  Ordinal_8(local_198);
  Ordinal_8(local_180);
  pIVar2 = local_1b8;
  if ((local_1b8 != (IUnknown *)0x0) && (local_1b8 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_148 = &DAT_140281f00;
  local_160 = &DAT_140281f00;
  local_158 = 0;
  local_150 = 0;
  if (local_1b8 != (IUnknown *)0x0) {
    (*local_1b8->lpVtbl->Release)(local_1b8);
  }
  HVar7 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_1c0);
  if (HVar7 < 0) {
LAB_14010fa4c:
    local_1b8 = (IUnknown *)0x0;
  }
  else {
    HVar7 = OleRun(local_1c0);
    if (-1 < HVar7) {
      HVar7 = (*local_1c0->lpVtbl->QueryInterface)(local_1c0,(IID *)&DAT_140281f68,&local_1b8);
    }
    (*local_1c0->lpVtbl->Release)(local_1c0);
    if (HVar7 < 0) goto LAB_14010fa4c;
  }
  local_168 = 2;
  local_1a8 = 1;
  local_res10[0] = '\x01';
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_200 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x235c0000);
  uStack_1f4 = 0x9a;
  sStack_1f2 = 0;
  uVar17 = 0x10;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_14010fafe:
    iVar6 = FUN_1400a1e90(param_1);
    if (iVar6 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      pIVar2 = local_1b8;
      if (local_1b8 != (IUnknown *)0x0) {
        UVar8 = (*local_1b8->lpVtbl[0x12].AddRef)(local_1b8);
        if ((int)UVar8 < 0) {
          _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
        }
        if (local_1b8 != (IUnknown *)0x0) {
          (*local_1b8->lpVtbl->Release)(local_1b8);
          local_1b8 = (IUnknown *)0x0;
        }
      }
      local_150 = 0;
      local_148 = &DAT_140281f00;
      local_160 = &DAT_140281f00;
      local_158 = 0;
      local_168 = 0;
      Ordinal_9(local_180);
      Ordinal_9(local_198);
      if (local_1b0 != (longlong *)0x0) {
        (**(code **)(*local_1b0 + 0x10))();
      }
      if (local_1b8 != (IUnknown *)0x0) {
        (*local_1b8->lpVtbl->Release)(local_1b8);
      }
      if (local_1f0 != (longlong *)0x0) {
        (**(code **)(*local_1f0 + 0x10))();
      }
      return (undefined8 *)0x0;
    }
  }
  else {
    local_1e8 = 0;
    UVar8 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar8 < 0) {
      _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_1e8 == 0) goto LAB_14010fafe;
  }
  puVar10 = (undefined8 *)FUN_140001f20(*param_1,&local_120);
  FUN_140001710(&local_1f0,*puVar10,"dbo.up_read_skill");
  if (local_120 != (longlong *)0x0) {
    (**(code **)(*local_120 + 0x10))();
  }
  local_res18 = (longlong *)&local_1e0;
  local_f8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_f4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_f0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_ec = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar11 = FUN_140062280(&local_1e0,&local_f8);
  puVar10 = operator_new(0x18);
  local_138 = puVar15;
  local_res20 = puVar10;
  if (puVar10 != (undefined8 *)0x0) {
    puVar10[1] = 0;
    *(undefined4 *)(puVar10 + 2) = 1;
    uVar12 = FUN_140201490("character_id");
    *puVar10 = uVar12;
    local_138 = puVar10;
  }
  if (local_138 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar13 = (longlong *)FUN_140001880(&local_1f0,local_e0,&local_138,0xca,1,0x26,uVar11);
  local_res18 = plVar13;
  if (local_1f0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar10 = (undefined8 *)FUN_140001660(local_1f0,&local_130);
  pIVar2 = (IUnknown *)*puVar10;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar8 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar8 < 0) {
    _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_130 != (longlong *)0x0) {
    (**(code **)(*local_130 + 0x10))();
  }
  if ((longlong *)*plVar13 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar13 + 0x10))();
  }
  puVar10 = (undefined8 *)FUN_1400016d0(&local_1f0,&local_128);
  This = local_1b8;
  pIVar2 = (IUnknown *)*puVar10;
  if (local_1b8 != pIVar2) {
    local_1b8 = pIVar2;
    if (pIVar2 != (IUnknown *)0x0) {
      (*pIVar2->lpVtbl->AddRef)(pIVar2);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_128 != (longlong *)0x0) {
    (**(code **)(*local_128 + 0x10))();
  }
  pIVar2 = local_1b8;
  if (local_1b8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffffffff0000);
  UVar8 = (*local_1b8->lpVtbl[6].Release)(local_1b8);
  if ((int)UVar8 < 0) {
    _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
  }
  if ((short)local_res18 != -1) {
    while( true ) {
      pIVar2 = local_1b8;
      if (local_1b8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_res20 = (undefined8 *)((ulonglong)local_res20 & 0xffffffffffff0000);
      UVar8 = (*local_1b8->lpVtbl[6].Release)(local_1b8);
      if ((int)UVar8 < 0) {
        _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_res20 == -1) break;
      local_1e0 = 0;
      local_1dc = 0;
      local_1d8 = 0;
      local_1d4 = 0;
      local_1d0 = 0;
      local_1c8 = 0;
      local_1c6 = 1;
      uVar11 = FUN_140002290(&local_1b8,local_58,"skill_id",local_res10);
      FUN_1400625d0(uVar11,&local_118);
      uVar12 = local_110;
      uVar11 = local_118;
      Ordinal_9(local_58);
      uVar14 = FUN_140002290(&local_1b8,local_d0,"group",local_res10);
      FUN_140182560(uVar14);
      uVar5 = FUN_140062550(uVar14);
      local_1d0 = CONCAT62(local_1d0._2_6_,uVar5);
      Ordinal_9(local_d0);
      uVar14 = FUN_140002290(&local_1b8,local_a0,"slot_index",local_res10);
      FUN_140182560(uVar14);
      uVar5 = FUN_140062550(uVar14);
      local_1d0._0_4_ = CONCAT22(uVar5,(undefined2)local_1d0);
      Ordinal_9(local_a0);
      uVar14 = FUN_140002290(&local_1b8,local_70,"skill_table_id",local_res10);
      FUN_140182560(uVar14);
      uVar9 = FUN_140062550(uVar14);
      local_1d0 = CONCAT44(uVar9,(undefined4)local_1d0);
      Ordinal_9(local_70);
      uVar14 = FUN_140002290(&local_1b8,local_b8,"skill_level",local_res10);
      FUN_140182560(uVar14);
      uVar5 = FUN_140062550(uVar14);
      Ordinal_9(local_b8);
      ppvObject = &DAT_14028ed18;
      riid = (char *)&local_88;
      uVar14 = FUN_140002290(&local_1b8,riid,&DAT_14028ed18,local_res10);
      FUN_140182560(uVar14);
      uVar4 = FUN_1400d6de0(uVar14);
      Ordinal_9(&local_88);
      lVar16 = (longlong)(int)uVar17;
      *(undefined8 *)(lVar16 + 0x130 + (longlong)param_1) = uVar11;
      *(undefined8 *)(lVar16 + 0x138 + (longlong)param_1) = uVar12;
      *(undefined8 *)(lVar16 + 0x140 + (longlong)param_1) = local_1d0;
      *(undefined2 *)(lVar16 + 0x148 + (longlong)param_1) = uVar5;
      *(undefined1 *)(lVar16 + 0x14a + (longlong)param_1) = uVar4;
      uVar17 = uVar17 + 0x1b;
      sStack_1f2 = sStack_1f2 + 1;
      if (50000 < uVar17) {
        uVar3 = local_200._2_6_;
        local_200 = CONCAT62(local_200._2_6_,(short)uVar17);
        uVar11 = local_200;
        riid = (char *)(param_1 + 0x26);
        local_200._4_2_ = SUB62(uVar3,2);
        local_200._6_2_ = SUB62(uVar3,4);
        ((IID *)riid)->Data1 = (undefined4)local_200;
        ((IID *)riid)->Data2 = local_200._4_2_;
        ((IID *)riid)->Data3 = local_200._6_2_;
        param_1[0x27] = CONCAT26(sStack_1f2,CONCAT24(0x9a,uVar1));
        iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
        if (iVar6 == 0) {
          ppvObject = "DB Result Queue push error";
          riid = "DBResultQueue_Error.Log";
          FUN_1400a0b40(param_1[0x23]);
        }
        uVar17 = 0x10;
        sStack_1f2 = 0;
        local_200 = uVar11;
      }
      pIVar2 = local_1b8;
      if (local_1b8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar7 = (*local_1b8->lpVtbl[0xc].QueryInterface)(local_1b8,(IID *)riid,(void **)ppvObject);
      if (HVar7 < 0) {
        _com_issue_errorex(HVar7,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_res10[0] == '\0') {
      uStack_1f4 = 0x9c;
      goto LAB_1401101ec;
    }
  }
  puVar15 = (undefined8 *)0x1;
LAB_1401101ec:
  local_200 = CONCAT62(local_200._2_6_,(short)uVar17);
  param_1[0x26] = local_200;
  param_1[0x27] = CONCAT26(sStack_1f2,CONCAT24(uStack_1f4,uVar1));
  iVar6 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
  if (iVar6 == 0) {
    FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
  }
  pIVar2 = local_1b8;
  if (local_1b8 != (IUnknown *)0x0) {
    UVar8 = (*local_1b8->lpVtbl[0x12].AddRef)(local_1b8);
    if ((int)UVar8 < 0) {
      _com_issue_errorex(UVar8,pIVar2,(_GUID *)&DAT_140281f28);
    }
    if (local_1b8 != (IUnknown *)0x0) {
      (*local_1b8->lpVtbl->Release)(local_1b8);
      local_1b8 = (IUnknown *)0x0;
    }
  }
  local_150 = 0;
  local_148 = &DAT_140281f00;
  local_160 = &DAT_140281f00;
  local_158 = 0;
  local_168 = 0;
  Ordinal_9(local_180);
  Ordinal_9(local_198);
  if (local_1b0 != (longlong *)0x0) {
    (**(code **)(*local_1b0 + 0x10))();
  }
  if (local_1b8 != (IUnknown *)0x0) {
    (*local_1b8->lpVtbl->Release)(local_1b8);
  }
  if (local_1f0 != (longlong *)0x0) {
    (**(code **)(*local_1f0 + 0x10))();
  }
  return puVar15;
}



undefined8 FUN_140110390(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  int iVar2;
  ULONG UVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong lVar6;
  longlong *plVar7;
  longlong *local_res20;
  undefined4 local_a8;
  undefined4 uStack_a4;
  undefined4 local_a0;
  undefined2 local_9c;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [8];
  undefined8 local_70;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined1 local_40 [32];
  
  local_70 = 0xfffffffffffffffe;
  local_res20 = (longlong *)0x0;
  iVar2 = FUN_140001970(&local_res20);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_a0 = *(undefined4 *)(param_2 + 1);
  _local_a8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x24650000);
  local_9c = 0xa4;
  _local_a8 = CONCAT62(stack0xffffffffffffff5a,0xe);
  pIVar1 = *(IUnknown **)*param_1;
  if ((pIVar1 != (IUnknown *)0x0) && (UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1), (int)UVar3 < 0)
     ) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 0;
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_80);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_skill_delete_all");
  if (local_80 != (longlong *)0x0) {
    (**(code **)(*local_80 + 0x10))();
  }
  local_58 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_54 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_50 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_4c = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  local_88 = operator_new(0x18);
  local_98 = local_88;
  if (local_88 == (longlong *)0x0) {
    local_88 = (longlong *)0x0;
  }
  else {
    local_88[1] = 0;
    *(undefined4 *)(local_88 + 2) = 1;
    lVar6 = FUN_140201490("character_id");
    *local_88 = lVar6;
  }
  if (local_88 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,local_78,&local_88,0xca,1,0x26,uVar5);
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_90);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_90 != (longlong *)0x0) {
      (**(code **)(*local_90 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_98);
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    iVar2 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_a8);
    if (iVar2 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140110690(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  int iVar2;
  ULONG UVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong lVar6;
  longlong *plVar7;
  longlong *local_res20;
  undefined4 local_a8;
  undefined4 uStack_a4;
  undefined4 local_a0;
  undefined2 local_9c;
  longlong *local_98;
  longlong *local_90;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [8];
  undefined8 local_70;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined1 local_40 [32];
  
  local_70 = 0xfffffffffffffffe;
  local_res20 = (longlong *)0x0;
  iVar2 = FUN_140001970(&local_res20);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_a0 = *(undefined4 *)(param_2 + 1);
  _local_a8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x238a0000);
  local_9c = 0xa4;
  _local_a8 = CONCAT62(stack0xffffffffffffff5a,0xe);
  pIVar1 = *(IUnknown **)*param_1;
  if ((pIVar1 != (IUnknown *)0x0) && (UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1), (int)UVar3 < 0)
     ) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 0;
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_80);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_skill_reset");
  if (local_80 != (longlong *)0x0) {
    (**(code **)(*local_80 + 0x10))();
  }
  local_58 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_54 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_50 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_4c = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  local_88 = operator_new(0x18);
  local_98 = local_88;
  if (local_88 == (longlong *)0x0) {
    local_88 = (longlong *)0x0;
  }
  else {
    local_88[1] = 0;
    *(undefined4 *)(local_88 + 2) = 1;
    lVar6 = FUN_140201490("character_id");
    *local_88 = lVar6;
  }
  if (local_88 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,local_78,&local_88,0xca,1,0x26,uVar5);
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_90);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar3 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_90 != (longlong *)0x0) {
      (**(code **)(*local_90 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_98);
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    iVar2 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_a8);
    if (iVar2 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140110990(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  int iVar3;
  ULONG UVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  plVar10 = (longlong *)0x0;
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140110a63;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 0;
  }
LAB_140110a63:
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_skill_level");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("skill_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_80 = local_70;
    sVar1 = *(short *)(param_2 + 0x1e);
    Ordinal_8(local_70);
    FUN_140062080(local_70,(int)sVar1);
    plVar9 = operator_new(0x18);
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      plVar9[1] = 0;
      *(undefined4 *)(plVar9 + 2) = 1;
      lVar8 = FUN_140201490("skill_level");
      *plVar9 = lVar8;
      plVar10 = plVar9;
    }
    local_res18 = plVar10;
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar10 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
    local_80 = plVar10;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar10 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar10 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140110d40(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140110dd8;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140110dd8:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_update_storage_useable_count");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_80 = local_70;
  sVar1 = *(short *)(param_2 + 0x1e);
  Ordinal_8(local_70);
  FUN_140062080(local_70,(int)sVar1);
  plVar7 = operator_new(0x18);
  local_78 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("useable_count");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,3,1,4,local_70);
  local_80 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1401110f0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_50;
  longlong local_40 [3];
  
  local_50 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140111186;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140111186:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_add_character_title");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_88;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(&local_88,&local_68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_40;
  local_88 = *(undefined4 *)(param_2 + 0x1e);
  uStack_84 = *(undefined4 *)(param_2 + 0x22);
  uStack_80 = *(undefined4 *)(param_2 + 0x26);
  uStack_7c = *(undefined4 *)(param_2 + 0x2a);
  uVar6 = FUN_140062280(local_40,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("new_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_68 = (longlong *)&local_88;
    uVar1 = *(undefined4 *)(param_2 + 0x2e);
    Ordinal_8(&local_88);
    FUN_140062080(&local_88,uVar1);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("title_code");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
    local_68 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_68 = (longlong *)&local_88;
      uVar1 = *(undefined4 *)(param_2 + 0x32);
      Ordinal_8(&local_88);
      FUN_140062080(&local_88,uVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("remain_time");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
      local_68 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_68 = (longlong *)&local_88;
        uVar1 = *(undefined4 *)(param_2 + 0x36);
        Ordinal_8(&local_88);
        FUN_140062080(&local_88,uVar1);
        plVar9 = operator_new(0x18);
        local_98[0] = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("expire_time");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_88);
        local_68 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140111820(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_48;
  longlong local_40 [4];
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1401118b8;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1401118b8:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_delete_character_title");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = &local_78;
  local_88 = *(undefined4 *)(param_2 + 0xe);
  uStack_84 = *(undefined4 *)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_78,&local_88);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_98[0] = local_40;
  local_78._0_4_ = *(undefined4 *)(param_2 + 0x1e);
  local_78._4_4_ = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_78);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("del_title_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 * FUN_140111bd0(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  undefined6 uVar3;
  IUnknown *This;
  ULONG UVar4;
  int iVar5;
  HRESULT HVar6;
  undefined4 uVar7;
  undefined8 *puVar8;
  undefined8 uVar9;
  undefined8 uVar10;
  longlong *plVar11;
  undefined8 uVar12;
  char *riid;
  undefined8 *puVar13;
  char *ppvObject;
  longlong lVar14;
  undefined8 *puVar15;
  uint uVar16;
  char local_res10 [8];
  longlong *local_res18;
  undefined8 *local_res20;
  undefined8 local_1d8;
  undefined2 uStack_1cc;
  ushort uStack_1ca;
  longlong *local_1c8;
  int local_1c0;
  int local_1bc;
  LPUNKNOWN local_1b8;
  undefined4 local_1b0;
  undefined4 local_1ac;
  undefined4 local_1a8;
  undefined4 local_1a4;
  undefined8 local_1a0;
  undefined4 local_198;
  undefined8 *local_190;
  IUnknown *local_188;
  longlong *local_180;
  undefined4 local_178;
  undefined1 local_168 [24];
  undefined1 local_150 [24];
  undefined4 local_138;
  undefined1 *local_130;
  undefined4 local_128;
  undefined8 local_120;
  undefined1 *local_118;
  undefined8 *local_108;
  longlong *local_100;
  longlong *local_f8;
  longlong *local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined1 local_d8 [16];
  undefined4 local_c8;
  undefined4 uStack_c4;
  undefined4 uStack_c0;
  undefined4 uStack_bc;
  undefined8 local_b0;
  undefined1 local_a0 [24];
  IID local_88;
  undefined1 local_70 [24];
  undefined1 local_58 [32];
  
  local_b0 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  puVar13 = (undefined8 *)0x0;
  local_190 = param_2;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_140111c49:
    iVar5 = FUN_1400a1e90(param_1);
    if (iVar5 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (undefined8 *)0x0;
    }
  }
  else {
    local_1bc = 0;
    UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_1bc == 0) goto LAB_140111c49;
  }
  local_1c8 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_1c8);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_188 = (IUnknown *)0x0;
  local_180 = (longlong *)0x0;
  Ordinal_8(local_168);
  Ordinal_8(local_150);
  pIVar2 = local_188;
  if ((local_188 != (IUnknown *)0x0) && (local_188 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_118 = &DAT_140281f00;
  local_130 = &DAT_140281f00;
  local_128 = 0;
  local_120 = 0;
  if (local_188 != (IUnknown *)0x0) {
    (*local_188->lpVtbl->Release)(local_188);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_1b8);
  if (-1 < HVar6) {
    HVar6 = OleRun(local_1b8);
    if (-1 < HVar6) {
      HVar6 = (*local_1b8->lpVtbl->QueryInterface)(local_1b8,(IID *)&DAT_140281f68,&local_188);
    }
    (*local_1b8->lpVtbl->Release)(local_1b8);
    if (-1 < HVar6) goto LAB_140111d87;
  }
  local_188 = (IUnknown *)0x0;
LAB_140111d87:
  local_138 = 2;
  local_178 = 1;
  local_res10[0] = '\x01';
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_1d8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23950000);
  puVar15 = (undefined8 *)0x0;
  uStack_1cc = 0xb6;
  uStack_1ca = 0;
  uVar16 = 0x10;
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_f0);
  FUN_140001710(&local_1c8,*puVar8,"dbo.up_read_equip_title");
  if (local_f0 != (longlong *)0x0) {
    (**(code **)(*local_f0 + 0x10))();
  }
  local_res18 = (longlong *)&local_1b0;
  local_c8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_c4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_c0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_bc = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar9 = FUN_140062280(&local_1b0,&local_c8);
  puVar8 = operator_new(0x18);
  local_108 = puVar13;
  local_res20 = puVar8;
  if (puVar8 != (undefined8 *)0x0) {
    puVar8[1] = 0;
    *(undefined4 *)(puVar8 + 2) = 1;
    uVar10 = FUN_140201490("character_id");
    *puVar8 = uVar10;
    local_108 = puVar8;
  }
  if (local_108 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_1c8,local_d8,&local_108,0xca,1,0x26,uVar9);
  local_res18 = plVar11;
  if (local_1c8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_1c8,&local_100);
  pIVar2 = (IUnknown *)*puVar8;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_100 != (longlong *)0x0) {
      (**(code **)(*local_100 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    puVar8 = (undefined8 *)FUN_1400016d0(&local_1c8,&local_f8);
    This = local_188;
    pIVar2 = (IUnknown *)*puVar8;
    if (local_188 != pIVar2) {
      local_188 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_f8 != (longlong *)0x0) {
      (**(code **)(*local_f8 + 0x10))();
    }
    pIVar2 = local_188;
    if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffffffff0000);
    UVar4 = (*local_188->lpVtbl[6].Release)(local_188);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
    }
    if ((short)local_res18 == -1) {
      uStack_1cc = 0xb7;
      puVar13 = (undefined8 *)0x0;
    }
    else {
      while( true ) {
        pIVar2 = local_188;
        if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_res20 = (undefined8 *)((ulonglong)local_res20 & 0xffffffffffff0000);
        UVar4 = (*local_188->lpVtbl[6].Release)(local_188);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
        }
        if ((short)local_res20 == -1) break;
        local_1b0 = 0;
        local_1ac = 0;
        local_1a8 = 0;
        local_1a4 = 0;
        local_1a0 = 0;
        local_198 = 0;
        uVar9 = FUN_140002290(&local_188,local_a0,&DAT_14028c3ac,local_res10);
        FUN_1400625d0(uVar9,&local_e8);
        uVar10 = local_e0;
        uVar9 = local_e8;
        Ordinal_9(local_a0);
        uVar12 = FUN_140002290(&local_188,local_58,"title_code",local_res10);
        FUN_140182560(uVar12);
        uVar7 = FUN_140062550(uVar12);
        local_1a0 = CONCAT44(local_1a0._4_4_,uVar7);
        Ordinal_9(local_58);
        uVar12 = FUN_140002290(&local_188,local_70,"remain_time",local_res10);
        FUN_140182560(uVar12);
        uVar7 = FUN_140062550(uVar12);
        local_1a0 = CONCAT44(uVar7,(undefined4)local_1a0);
        Ordinal_9(local_70);
        ppvObject = "expire_time";
        riid = (char *)&local_88;
        uVar12 = FUN_140002290(&local_188,riid,"expire_time",local_res10);
        FUN_140182560(uVar12);
        uVar7 = FUN_140062550(uVar12);
        Ordinal_9(&local_88);
        lVar14 = (longlong)(int)uVar16;
        *(undefined8 *)(lVar14 + 0x130 + (longlong)param_1) = uVar9;
        *(undefined8 *)(lVar14 + 0x138 + (longlong)param_1) = uVar10;
        *(undefined8 *)(lVar14 + 0x140 + (longlong)param_1) = local_1a0;
        *(undefined4 *)(lVar14 + 0x148 + (longlong)param_1) = uVar7;
        uVar16 = uVar16 + 0x1c;
        uStack_1ca = (short)puVar15 + 1;
        puVar15 = (undefined8 *)(ulonglong)uStack_1ca;
        if (50000 < uVar16) {
          uVar3 = local_1d8._2_6_;
          local_1d8 = CONCAT62(local_1d8._2_6_,(short)uVar16);
          uVar9 = local_1d8;
          riid = (char *)(param_1 + 0x26);
          local_1d8._4_2_ = SUB62(uVar3,2);
          local_1d8._6_2_ = SUB62(uVar3,4);
          ((IID *)riid)->Data1 = (undefined4)local_1d8;
          ((IID *)riid)->Data2 = local_1d8._4_2_;
          ((IID *)riid)->Data3 = local_1d8._6_2_;
          param_1[0x27] = CONCAT26(uStack_1ca,CONCAT24(0xb6,uVar1));
          iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
          if (iVar5 == 0) {
            ppvObject = "DB Result Queue push error";
            riid = "DBResultQueue_Error.Log";
            FUN_1400a0b40(param_1[0x23]);
          }
          uVar16 = 0x10;
          uStack_1ca = 0;
          puVar15 = puVar13;
          local_1d8 = uVar9;
        }
        pIVar2 = local_188;
        if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar6 = (*local_188->lpVtbl[0xc].QueryInterface)(local_188,(IID *)riid,(void **)ppvObject);
        if (HVar6 < 0) {
          _com_issue_errorex(HVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_res10[0] == '\0') {
        uStack_1cc = 0xb8;
      }
      else {
        puVar13 = (undefined8 *)0x1;
      }
    }
    local_1d8 = CONCAT62(local_1d8._2_6_,(short)uVar16);
    param_1[0x26] = local_1d8;
    param_1[0x27] = CONCAT26(uStack_1ca,CONCAT24(uStack_1cc,uVar1));
    iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar5 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar2 = local_188;
    if (local_188 != (IUnknown *)0x0) {
      local_1c0 = 0;
      UVar4 = (*local_188->lpVtbl[0x12].AddRef)(local_188);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_188;
      if (local_1c0 != 0) {
        if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*local_188->lpVtbl[10].Release)(local_188);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_188 != (IUnknown *)0x0) {
        (*local_188->lpVtbl->Release)(local_188);
        local_188 = (IUnknown *)0x0;
      }
    }
    local_120 = 0;
    local_118 = &DAT_140281f00;
    local_130 = &DAT_140281f00;
    local_128 = 0;
    local_138 = 0;
    Ordinal_9(local_150);
    Ordinal_9(local_168);
    if (local_180 != (longlong *)0x0) {
      (**(code **)(*local_180 + 0x10))();
    }
    if (local_188 != (IUnknown *)0x0) {
      (*local_188->lpVtbl->Release)(local_188);
    }
    if (local_1c8 != (longlong *)0x0) {
      (**(code **)(*local_1c8 + 0x10))();
    }
    return puVar13;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 * FUN_140112470(undefined8 *param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  undefined6 uVar3;
  IUnknown *This;
  ULONG UVar4;
  int iVar5;
  HRESULT HVar6;
  undefined4 uVar7;
  undefined8 *puVar8;
  undefined8 uVar9;
  undefined8 uVar10;
  longlong *plVar11;
  undefined8 uVar12;
  char *riid;
  undefined8 *puVar13;
  char *ppvObject;
  longlong lVar14;
  undefined8 *puVar15;
  uint uVar16;
  char local_res10 [8];
  longlong *local_res18;
  undefined8 *local_res20;
  undefined8 local_1d8;
  undefined2 uStack_1cc;
  ushort uStack_1ca;
  longlong *local_1c8;
  int local_1c0;
  int local_1bc;
  LPUNKNOWN local_1b8;
  undefined4 local_1b0;
  undefined4 local_1ac;
  undefined4 local_1a8;
  undefined4 local_1a4;
  undefined8 local_1a0;
  undefined4 local_198;
  undefined8 *local_190;
  IUnknown *local_188;
  longlong *local_180;
  undefined4 local_178;
  undefined1 local_168 [24];
  undefined1 local_150 [24];
  undefined4 local_138;
  undefined1 *local_130;
  undefined4 local_128;
  undefined8 local_120;
  undefined1 *local_118;
  undefined8 *local_108;
  longlong *local_100;
  longlong *local_f8;
  longlong *local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined1 local_d8 [16];
  undefined4 local_c8;
  undefined4 uStack_c4;
  undefined4 uStack_c0;
  undefined4 uStack_bc;
  undefined8 local_b0;
  undefined1 local_a0 [24];
  IID local_88;
  undefined1 local_70 [24];
  undefined1 local_58 [32];
  
  local_b0 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  puVar13 = (undefined8 *)0x0;
  local_190 = param_2;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_1401124e9:
    iVar5 = FUN_1400a1e90(param_1);
    if (iVar5 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (undefined8 *)0x0;
    }
  }
  else {
    local_1bc = 0;
    UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_1bc == 0) goto LAB_1401124e9;
  }
  local_1c8 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_1c8);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_188 = (IUnknown *)0x0;
  local_180 = (longlong *)0x0;
  Ordinal_8(local_168);
  Ordinal_8(local_150);
  pIVar2 = local_188;
  if ((local_188 != (IUnknown *)0x0) && (local_188 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_118 = &DAT_140281f00;
  local_130 = &DAT_140281f00;
  local_128 = 0;
  local_120 = 0;
  if (local_188 != (IUnknown *)0x0) {
    (*local_188->lpVtbl->Release)(local_188);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_1b8);
  if (-1 < HVar6) {
    HVar6 = OleRun(local_1b8);
    if (-1 < HVar6) {
      HVar6 = (*local_1b8->lpVtbl->QueryInterface)(local_1b8,(IID *)&DAT_140281f68,&local_188);
    }
    (*local_1b8->lpVtbl->Release)(local_1b8);
    if (-1 < HVar6) goto LAB_140112627;
  }
  local_188 = (IUnknown *)0x0;
LAB_140112627:
  local_138 = 2;
  local_178 = 1;
  local_res10[0] = '\x01';
  uVar1 = *(undefined4 *)(param_2 + 1);
  local_1d8 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23950000);
  puVar15 = (undefined8 *)0x0;
  uStack_1cc = 0xb6;
  uStack_1ca = 0;
  uVar16 = 0x10;
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_f0);
  FUN_140001710(&local_1c8,*puVar8,"dbo.up_read_title_list");
  if (local_f0 != (longlong *)0x0) {
    (**(code **)(*local_f0 + 0x10))();
  }
  local_res18 = (longlong *)&local_1b0;
  local_c8 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_c4 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_c0 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_bc = *(undefined4 *)((longlong)param_2 + 0x1a);
  uVar9 = FUN_140062280(&local_1b0,&local_c8);
  puVar8 = operator_new(0x18);
  local_108 = puVar13;
  local_res20 = puVar8;
  if (puVar8 != (undefined8 *)0x0) {
    puVar8[1] = 0;
    *(undefined4 *)(puVar8 + 2) = 1;
    uVar10 = FUN_140201490("character_id");
    *puVar8 = uVar10;
    local_108 = puVar8;
  }
  if (local_108 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_1c8,local_d8,&local_108,0xca,1,0x26,uVar9);
  local_res18 = plVar11;
  if (local_1c8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_1c8,&local_100);
  pIVar2 = (IUnknown *)*puVar8;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_100 != (longlong *)0x0) {
      (**(code **)(*local_100 + 0x10))();
    }
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    puVar8 = (undefined8 *)FUN_1400016d0(&local_1c8,&local_f8);
    This = local_188;
    pIVar2 = (IUnknown *)*puVar8;
    if (local_188 != pIVar2) {
      local_188 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_f8 != (longlong *)0x0) {
      (**(code **)(*local_f8 + 0x10))();
    }
    pIVar2 = local_188;
    if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffffffff0000);
    UVar4 = (*local_188->lpVtbl[6].Release)(local_188);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
    }
    if ((short)local_res18 == -1) {
      uStack_1cc = 0xb7;
      puVar13 = (undefined8 *)0x0;
    }
    else {
      while( true ) {
        pIVar2 = local_188;
        if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        local_res20 = (undefined8 *)((ulonglong)local_res20 & 0xffffffffffff0000);
        UVar4 = (*local_188->lpVtbl[6].Release)(local_188);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
        }
        if ((short)local_res20 == -1) break;
        local_1b0 = 0;
        local_1ac = 0;
        local_1a8 = 0;
        local_1a4 = 0;
        local_1a0 = 0;
        local_198 = 0;
        uVar9 = FUN_140002290(&local_188,local_a0,&DAT_14028c3ac,local_res10);
        FUN_1400625d0(uVar9,&local_e8);
        uVar10 = local_e0;
        uVar9 = local_e8;
        Ordinal_9(local_a0);
        uVar12 = FUN_140002290(&local_188,local_58,"title_code",local_res10);
        FUN_140182560(uVar12);
        uVar7 = FUN_140062550(uVar12);
        local_1a0 = CONCAT44(local_1a0._4_4_,uVar7);
        Ordinal_9(local_58);
        uVar12 = FUN_140002290(&local_188,local_70,"remain_time",local_res10);
        FUN_140182560(uVar12);
        uVar7 = FUN_140062550(uVar12);
        local_1a0 = CONCAT44(uVar7,(undefined4)local_1a0);
        Ordinal_9(local_70);
        ppvObject = "expire_time";
        riid = (char *)&local_88;
        uVar12 = FUN_140002290(&local_188,riid,"expire_time",local_res10);
        FUN_140182560(uVar12);
        uVar7 = FUN_140062550(uVar12);
        Ordinal_9(&local_88);
        lVar14 = (longlong)(int)uVar16;
        *(undefined8 *)(lVar14 + 0x130 + (longlong)param_1) = uVar9;
        *(undefined8 *)(lVar14 + 0x138 + (longlong)param_1) = uVar10;
        *(undefined8 *)(lVar14 + 0x140 + (longlong)param_1) = local_1a0;
        *(undefined4 *)(lVar14 + 0x148 + (longlong)param_1) = uVar7;
        uVar16 = uVar16 + 0x1c;
        uStack_1ca = (short)puVar15 + 1;
        puVar15 = (undefined8 *)(ulonglong)uStack_1ca;
        if (50000 < uVar16) {
          uVar3 = local_1d8._2_6_;
          local_1d8 = CONCAT62(local_1d8._2_6_,(short)uVar16);
          uVar9 = local_1d8;
          riid = (char *)(param_1 + 0x26);
          local_1d8._4_2_ = SUB62(uVar3,2);
          local_1d8._6_2_ = SUB62(uVar3,4);
          ((IID *)riid)->Data1 = (undefined4)local_1d8;
          ((IID *)riid)->Data2 = local_1d8._4_2_;
          ((IID *)riid)->Data3 = local_1d8._6_2_;
          param_1[0x27] = CONCAT26(uStack_1ca,CONCAT24(0xb6,uVar1));
          iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
          if (iVar5 == 0) {
            ppvObject = "DB Result Queue push error";
            riid = "DBResultQueue_Error.Log";
            FUN_1400a0b40(param_1[0x23]);
          }
          uVar16 = 0x10;
          uStack_1ca = 0;
          puVar15 = puVar13;
          local_1d8 = uVar9;
        }
        pIVar2 = local_188;
        if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        HVar6 = (*local_188->lpVtbl[0xc].QueryInterface)(local_188,(IID *)riid,(void **)ppvObject);
        if (HVar6 < 0) {
          _com_issue_errorex(HVar6,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_res10[0] == '\0') {
        uStack_1cc = 0xb8;
      }
      else {
        puVar13 = (undefined8 *)0x1;
      }
    }
    local_1d8 = CONCAT62(local_1d8._2_6_,(short)uVar16);
    param_1[0x26] = local_1d8;
    param_1[0x27] = CONCAT26(uStack_1ca,CONCAT24(uStack_1cc,uVar1));
    iVar5 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0));
    if (iVar5 == 0) {
      FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
    }
    pIVar2 = local_188;
    if (local_188 != (IUnknown *)0x0) {
      local_1c0 = 0;
      UVar4 = (*local_188->lpVtbl[0x12].AddRef)(local_188);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_188;
      if (local_1c0 != 0) {
        if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*local_188->lpVtbl[10].Release)(local_188);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_188 != (IUnknown *)0x0) {
        (*local_188->lpVtbl->Release)(local_188);
        local_188 = (IUnknown *)0x0;
      }
    }
    local_120 = 0;
    local_118 = &DAT_140281f00;
    local_130 = &DAT_140281f00;
    local_128 = 0;
    local_138 = 0;
    Ordinal_9(local_150);
    Ordinal_9(local_168);
    if (local_180 != (longlong *)0x0) {
      (**(code **)(*local_180 + 0x10))();
    }
    if (local_188 != (IUnknown *)0x0) {
      (*local_188->lpVtbl->Release)(local_188);
    }
    if (local_1c8 != (longlong *)0x0) {
      (**(code **)(*local_1c8 + 0x10))();
    }
    return puVar13;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140112d10(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  undefined4 local_88;
  undefined4 uStack_84;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined8 local_78;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_48;
  longlong local_40 [4];
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140112da8;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140112da8:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_equip_character_title");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = &local_78;
  local_88 = *(undefined4 *)(param_2 + 0xe);
  uStack_84 = *(undefined4 *)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x16);
  uStack_7c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(&local_78,&local_88);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("title_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar5);
  local_a0 = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar6 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar6 + 0x10))();
  }
  local_98[0] = local_40;
  local_78._0_4_ = *(undefined4 *)(param_2 + 0x1e);
  local_78._4_4_ = *(undefined4 *)(param_2 + 0x22);
  uStack_70 = *(undefined4 *)(param_2 + 0x26);
  uStack_6c = *(undefined4 *)(param_2 + 0x2a);
  uVar5 = FUN_140062280(local_40,&local_78);
  plVar6 = operator_new(0x18);
  local_a0 = plVar6;
  if (plVar6 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("character_id");
    *plVar6 = lVar7;
    local_res18 = plVar6;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar5);
  local_98[0] = plVar6;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar1 = (IUnknown *)*puVar4;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_1401130c0(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140113153;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140113153:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_unequip_character_title");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("title_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140113340(undefined8 *param_1)

{
  short sVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  errno_t eVar6;
  undefined4 uVar7;
  undefined8 uVar8;
  undefined8 *puVar9;
  longlong *plVar10;
  longlong lVar11;
  longlong *plVar12;
  undefined4 *puVar13;
  longlong *plVar14;
  short *psVar15;
  short *psVar16;
  undefined1 auStackY_4d8 [32];
  longlong *local_498;
  int local_490;
  int local_48c;
  longlong *local_488;
  longlong *local_480;
  longlong *local_478;
  longlong *local_470;
  longlong *local_468;
  longlong *local_460;
  longlong *local_458;
  LPUNKNOWN local_450;
  longlong *local_448;
  longlong *local_440;
  longlong *local_438;
  longlong *local_430;
  longlong *local_428;
  undefined8 local_420;
  undefined4 local_418;
  longlong local_410;
  undefined4 local_408;
  longlong local_3f8;
  undefined4 local_3f0;
  longlong local_3e0;
  undefined4 local_3d8;
  longlong local_3c8;
  undefined4 local_3c0;
  longlong local_3b0;
  undefined4 local_3a8;
  longlong *local_398;
  longlong local_390;
  undefined8 local_388;
  undefined8 *local_378;
  longlong *local_370;
  longlong local_368;
  undefined1 local_360;
  undefined2 local_350 [4];
  longlong local_348;
  longlong local_338;
  undefined4 local_330;
  IUnknown *local_318;
  longlong *local_310;
  undefined4 local_308;
  undefined1 local_2f8 [24];
  undefined1 local_2e0 [24];
  undefined4 local_2c8;
  undefined1 *local_2c0;
  undefined4 local_2b8;
  undefined8 local_2b0;
  undefined1 *local_2a8;
  longlong *local_298;
  longlong *local_290;
  longlong *local_288;
  longlong *local_280;
  longlong *local_278;
  longlong *local_270;
  longlong *local_268;
  longlong *local_260;
  longlong *local_258;
  __time64_t local_250;
  longlong *local_248;
  longlong *local_240;
  longlong *local_238;
  longlong *local_230;
  longlong *local_228;
  longlong *local_220;
  longlong *local_218;
  longlong *local_210;
  longlong *local_208;
  longlong *local_200;
  longlong *local_1f8;
  longlong *local_1f0;
  longlong *local_1e8;
  longlong *local_1e0;
  longlong *local_1d8;
  longlong *local_1d0;
  longlong *local_1c8;
  longlong *local_1c0;
  longlong local_1b8 [4];
  undefined8 local_198;
  undefined1 local_190 [8];
  undefined2 *local_188;
  undefined4 local_178;
  undefined4 uStack_174;
  undefined4 uStack_170;
  undefined4 uStack_16c;
  longlong local_168 [3];
  longlong local_150 [3];
  longlong local_138 [3];
  undefined1 local_120 [24];
  short local_108;
  short local_106;
  undefined2 local_104;
  undefined2 local_102;
  undefined2 local_100;
  undefined2 local_fe;
  undefined2 local_fc;
  undefined2 local_fa;
  tm local_f8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined1 local_c0 [16];
  short local_b0 [16];
  short local_90 [16];
  undefined8 local_70 [6];
  undefined1 local_3e;
  ulonglong local_38;
  
  local_198 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_4d8;
  pIVar2 = *(IUnknown **)*param_1;
  plVar14 = (longlong *)0x0;
  local_378 = param_1;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_1401133cc:
    uVar8 = FUN_1400a1e90(param_1);
    if ((int)uVar8 == 0) {
      return uVar8;
    }
  }
  else {
    local_490 = 0;
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if (local_490 == 0) goto LAB_1401133cc;
  }
  local_498 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_498);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_318 = (IUnknown *)0x0;
  local_310 = (longlong *)0x0;
  Ordinal_8(local_2f8);
  Ordinal_8(local_2e0);
  pIVar2 = local_318;
  if ((local_318 != (IUnknown *)0x0) && (local_318 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_2a8 = &DAT_140281f00;
  local_2c0 = &DAT_140281f00;
  local_2b8 = 0;
  local_2b0 = 0;
  if (local_318 != (IUnknown *)0x0) {
    (*local_318->lpVtbl->Release)(local_318);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_450);
  if (HVar5 < 0) {
LAB_1401134fd:
    local_318 = (IUnknown *)0x0;
  }
  else {
    HVar5 = OleRun(local_450);
    if (-1 < HVar5) {
      HVar5 = (*local_450->lpVtbl->QueryInterface)(local_450,(IID *)&DAT_140281f68,&local_318);
    }
    (*local_450->lpVtbl->Release)(local_450);
    if (HVar5 < 0) goto LAB_1401134fd;
  }
  local_2c8 = 2;
  local_308 = 1;
  puVar9 = (undefined8 *)FUN_140001f20(*param_1,&local_298);
  FUN_140001710(&local_498,*puVar9,"dbo.up_ado_data_mapping");
  if (local_298 != (longlong *)0x0) {
    (**(code **)(*local_298 + 0x10))();
  }
  local_70[0] = 0x6b726573726562;
  local_3e = 0;
  psVar15 = &DAT_140292440;
  psVar16 = local_b0;
  do {
    sVar1 = *psVar15;
    *psVar16 = sVar1;
    psVar15 = psVar15 + 1;
    psVar16 = psVar16 + 1;
  } while (sVar1 != 0);
  psVar15 = &DAT_140292450;
  psVar16 = local_90;
  do {
    sVar1 = *psVar15;
    *psVar16 = sVar1;
    psVar15 = psVar15 + 1;
    psVar16 = psVar16 + 1;
  } while (sVar1 != 0);
  local_250 = _time64((__time64_t *)0x0);
  local_420 = 0;
  local_418 = 0;
  eVar6 = _localtime64_s(&local_f8,&local_250);
  if (eVar6 == 0) {
    local_108 = (short)local_f8.tm_year + 0x76c;
    local_106 = (short)local_f8.tm_mon + 1;
    local_104 = (undefined2)local_f8.tm_wday;
    local_102 = (undefined2)local_f8.tm_mday;
    local_100 = (undefined2)local_f8.tm_hour;
    local_fe = (undefined2)local_f8.tm_min;
    local_fc = (undefined2)local_f8.tm_sec;
    local_fa = 0;
    iVar4 = Ordinal_184(&local_108,&local_420);
    local_d0 = 0;
    local_c8 = 0;
    if (iVar4 != 0) {
      Ordinal_185((int)local_420,&local_d0);
    }
  }
  local_188 = local_350;
  Ordinal_8(local_350);
  plVar10 = operator_new(0x18);
  plVar12 = plVar14;
  local_398 = plVar10;
  if (plVar10 != (longlong *)0x0) {
    plVar10[1] = 0;
    *(undefined4 *)(plVar10 + 2) = 1;
    lVar11 = FUN_140201490(local_70);
    *plVar10 = lVar11;
    plVar12 = plVar10;
  }
  local_448 = plVar12;
  if (plVar12 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  iVar4 = Ordinal_9(local_350);
  if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_350[0] = 8;
  if (*plVar12 == 0) {
    local_348 = 0;
  }
  else {
    lVar11 = *plVar12;
    uVar7 = Ordinal_149(lVar11);
    local_348 = Ordinal_150(lVar11,uVar7);
    if (local_348 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
  }
  LOCK();
  plVar10 = plVar12 + 2;
  lVar11 = *plVar10;
  *(int *)plVar10 = (int)*plVar10 + -1;
  UNLOCK();
  if ((int)lVar11 == 1) {
    if (*plVar12 != 0) {
      Ordinal_6();
    }
    if ((void *)plVar12[1] != (void *)0x0) {
      operator_delete__((void *)plVar12[1]);
    }
    operator_delete(plVar12);
  }
  plVar12 = operator_new(0x18);
  local_248 = plVar14;
  local_448 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490("bcust_id");
    *plVar12 = lVar11;
    local_248 = plVar12;
  }
  if (local_248 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_498,&local_488,&local_248,0xca);
  local_448 = plVar12;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_270);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_270 != (longlong *)0x0) {
    (**(code **)(*local_270 + 0x10))();
  }
  if ((longlong *)*plVar12 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar12 + 0x10))();
  }
  local_488 = local_168;
  puVar13 = (undefined4 *)FUN_140182810(local_c0);
  local_178 = *puVar13;
  uStack_174 = puVar13[1];
  uStack_170 = puVar13[2];
  uStack_16c = puVar13[3];
  FUN_140061f30(local_168,&local_178);
  plVar12 = operator_new(0x18);
  local_210 = plVar14;
  local_448 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490(&DAT_140292470);
    *plVar12 = lVar11;
    local_210 = plVar12;
  }
  if (local_210 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_498,&local_438,&local_210,0xca);
  local_488 = plVar12;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_260);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_260 != (longlong *)0x0) {
    (**(code **)(*local_260 + 0x10))();
  }
  if ((longlong *)*plVar12 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar12 + 0x10))();
  }
  local_438 = &local_3c8;
  Ordinal_8(&local_3c8);
  if (((short)local_3c8 == 3) || ((short)local_3c8 == 10)) {
LAB_140113aa7:
    local_3c0 = 1;
  }
  else {
    if ((short)local_3c8 != 0xb) {
      iVar4 = Ordinal_9(&local_3c8);
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar4);
      }
      local_3c8._0_2_ = 3;
      goto LAB_140113aa7;
    }
    local_3c0 = CONCAT22(local_3c0._2_2_,0xffff);
  }
  plVar12 = operator_new(0x18);
  local_1e0 = plVar14;
  local_488 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490("OnLine");
    *plVar12 = lVar11;
    local_1e0 = plVar12;
  }
  if (local_1e0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_498,&local_480,&local_1e0,0x10);
  local_438 = plVar12;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_200);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_200 != (longlong *)0x0) {
    (**(code **)(*local_200 + 0x10))();
  }
  if ((longlong *)*plVar12 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar12 + 0x10))();
  }
  local_480 = &local_410;
  Ordinal_8(&local_410);
  if (((short)local_410 == 3) || ((short)local_410 == 10)) {
LAB_140113c20:
    local_408 = 0x3e9;
  }
  else {
    if ((short)local_410 != 0xb) {
      iVar4 = Ordinal_9(&local_410);
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar4);
      }
      local_410._0_2_ = 3;
      goto LAB_140113c20;
    }
    local_408 = CONCAT22(local_408._2_2_,0xffff);
  }
  plVar12 = operator_new(0x18);
  local_240 = plVar14;
  local_438 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490("ServerID");
    *plVar12 = lVar11;
    local_240 = plVar12;
  }
  if (local_240 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_498,&local_478,&local_240,2);
  local_480 = plVar12;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_1d0);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_1d0 != (longlong *)0x0) {
    (**(code **)(*local_1d0 + 0x10))();
  }
  if ((longlong *)*plVar12 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar12 + 0x10))();
  }
  local_478 = &local_3e0;
  Ordinal_8(&local_3e0);
  if (((short)local_3e0 == 3) || ((short)local_3e0 == 10)) {
LAB_140113d96:
    local_3d8 = 0x309;
  }
  else {
    if ((short)local_3e0 != 0xb) {
      iVar4 = Ordinal_9(&local_3e0);
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar4);
      }
      local_3e0._0_2_ = 3;
      goto LAB_140113d96;
    }
    local_3d8 = CONCAT22(local_3d8._2_2_,0xffff);
  }
  plVar12 = operator_new(0x18);
  local_230 = plVar14;
  local_480 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490("ChannelID");
    *plVar12 = lVar11;
    local_230 = plVar12;
  }
  if (local_230 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_498,&local_440,&local_230,3);
  local_478 = plVar12;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_1f0);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_1f0 != (longlong *)0x0) {
    (**(code **)(*local_1f0 + 0x10))();
  }
  if ((longlong *)*plVar12 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar12 + 0x10))();
  }
  local_440 = local_1b8;
  Ordinal_8(local_1b8);
  uVar8 = FUN_140182530(local_120,0x1cbe991a14);
  iVar4 = Ordinal_10(local_1b8,uVar8);
  if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  Ordinal_9(local_120);
  plVar12 = operator_new(0x18);
  local_220 = plVar14;
  local_478 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490("CharExp");
    *plVar12 = lVar11;
    local_220 = plVar12;
  }
  if (local_220 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_498,&local_428,&local_220,0x14);
  local_440 = plVar12;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_280);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_280 != (longlong *)0x0) {
    (**(code **)(*local_280 + 0x10))();
  }
  if ((longlong *)*plVar12 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar12 + 0x10))();
  }
  local_428 = local_150;
  FUN_1400623f0(local_150,local_b0);
  plVar12 = operator_new(0x18);
  local_278 = plVar14;
  local_440 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490("CharName");
    *plVar12 = lVar11;
    local_278 = plVar12;
  }
  if (local_278 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_498,&local_430,&local_278,0xca);
  local_428 = plVar12;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_290);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_290 != (longlong *)0x0) {
    (**(code **)(*local_290 + 0x10))();
  }
  if ((longlong *)*plVar12 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar12 + 0x10))();
  }
  local_430 = local_138;
  FUN_1400623f0(local_138,local_90);
  plVar12 = operator_new(0x18);
  local_238 = plVar14;
  local_428 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490(&DAT_14028e750);
    *plVar12 = lVar11;
    local_238 = plVar12;
  }
  if (local_238 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_498,&local_460,&local_238,200);
  local_430 = plVar12;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_228);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_228 != (longlong *)0x0) {
    (**(code **)(*local_228 + 0x10))();
  }
  if ((longlong *)*plVar12 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar12 + 0x10))();
  }
  local_460 = &local_338;
  Ordinal_8(&local_338);
  if ((short)local_338 != 4) {
    iVar4 = Ordinal_9(&local_338);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_338._0_2_ = 4;
  }
  local_330 = 0x3f46e979;
  plVar12 = operator_new(0x18);
  local_218 = plVar14;
  local_430 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490("fValue");
    *plVar12 = lVar11;
    local_218 = plVar12;
  }
  if (local_218 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_498,&local_458,&local_218,4);
  local_460 = plVar12;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_208);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_208 != (longlong *)0x0) {
    (**(code **)(*local_208 + 0x10))();
  }
  if ((longlong *)*plVar12 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar12 + 0x10))();
  }
  local_458 = &local_368;
  Ordinal_8(&local_368);
  if ((short)local_368 != 0x11) {
    iVar4 = Ordinal_9(&local_368);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_368._0_2_ = 0x11;
  }
  local_360 = 0xff;
  plVar12 = operator_new(0x18);
  local_1f8 = plVar14;
  local_460 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490("btValue");
    *plVar12 = lVar11;
    local_1f8 = plVar12;
  }
  if (local_1f8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_498,&local_470,&local_1f8,0x10);
  local_458 = plVar12;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_1e8);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_1e8 != (longlong *)0x0) {
    (**(code **)(*local_1e8 + 0x10))();
  }
  if ((longlong *)*plVar12 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar12 + 0x10))();
  }
  local_470 = &local_3b0;
  Ordinal_8(&local_3b0);
  if (((short)local_3b0 == 3) || ((short)local_3b0 == 10)) {
LAB_140114585:
    local_3a8 = 1;
  }
  else {
    if ((short)local_3b0 != 0xb) {
      iVar4 = Ordinal_9(&local_3b0);
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(iVar4);
      }
      local_3b0._0_2_ = 3;
      goto LAB_140114585;
    }
    local_3a8 = CONCAT22(local_3a8._2_2_,0xffff);
  }
  plVar12 = operator_new(0x18);
  local_1d8 = plVar14;
  local_458 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490("bGift");
    *plVar12 = lVar11;
    local_1d8 = plVar12;
  }
  if (local_1d8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_498,&local_468,&local_1d8,0xb);
  local_470 = plVar12;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_1c0);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_1c0 != (longlong *)0x0) {
    (**(code **)(*local_1c0 + 0x10))();
  }
  if ((longlong *)*plVar12 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar12 + 0x10))();
  }
  local_468 = &local_390;
  Ordinal_8(&local_390);
  if (((short)local_390 != 5) && ((short)local_390 != 7)) {
    iVar4 = Ordinal_9(&local_390);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_390._0_2_ = 5;
  }
  local_388 = local_420;
  plVar12 = operator_new(0x18);
  local_1c8 = plVar14;
  local_470 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490("dDouble");
    *plVar12 = lVar11;
    local_1c8 = plVar12;
  }
  if (local_1c8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar12 = (longlong *)FUN_140001880(&local_498,&local_370,&local_1c8,5);
  local_468 = plVar12;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_268);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_268 != (longlong *)0x0) {
    (**(code **)(*local_268 + 0x10))();
  }
  if ((longlong *)*plVar12 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar12 + 0x10))();
  }
  local_370 = &local_3f8;
  Ordinal_8(&local_3f8);
  if (((short)local_3f8 != 3) && ((short)local_3f8 != 10)) {
    if ((short)local_3f8 == 0xb) {
      local_3f0 = CONCAT22(local_3f0._2_2_,0xffff);
      goto LAB_14011487a;
    }
    iVar4 = Ordinal_9(&local_3f8);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    local_3f8._0_2_ = 3;
  }
  local_3f0 = 4;
LAB_14011487a:
  plVar12 = operator_new(0x18);
  local_468 = plVar12;
  if (plVar12 != (longlong *)0x0) {
    plVar12[1] = 0;
    *(undefined4 *)(plVar12 + 2) = 1;
    lVar11 = FUN_140201490("CharClass");
    *plVar12 = lVar11;
    plVar14 = plVar12;
  }
  local_288 = plVar14;
  if (plVar14 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar14 = (longlong *)FUN_140001880(&local_498,local_190,&local_288,3);
  local_370 = plVar14;
  if (local_498 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar9 = (undefined8 *)FUN_140001660(local_498,&local_258);
  pIVar2 = (IUnknown *)*puVar9;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_258 != (longlong *)0x0) {
      (**(code **)(*local_258 + 0x10))();
    }
    if ((longlong *)*plVar14 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar14 + 0x10))();
    }
    puVar9 = (undefined8 *)FUN_1400016d0(&local_498,&local_398);
    This = local_318;
    pIVar2 = (IUnknown *)*puVar9;
    if (local_318 != pIVar2) {
      local_318 = pIVar2;
      if (pIVar2 != (IUnknown *)0x0) {
        (*pIVar2->lpVtbl->AddRef)(pIVar2);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_398 != (longlong *)0x0) {
      (**(code **)(*local_398 + 0x10))();
    }
    pIVar2 = local_318;
    if (local_318 != (IUnknown *)0x0) {
      local_48c = 0;
      UVar3 = (*local_318->lpVtbl[0x12].AddRef)(local_318);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f28);
      }
      pIVar2 = local_318;
      if (local_48c != 0) {
        if (local_318 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar3 = (*local_318->lpVtbl[10].Release)(local_318);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_318 != (IUnknown *)0x0) {
        (*local_318->lpVtbl->Release)(local_318);
        local_318 = (IUnknown *)0x0;
      }
    }
    local_2b0 = 0;
    local_2a8 = &DAT_140281f00;
    local_2c0 = &DAT_140281f00;
    local_2b8 = 0;
    local_2c8 = 0;
    Ordinal_9(local_2e0);
    Ordinal_9(local_2f8);
    if (local_310 != (longlong *)0x0) {
      (**(code **)(*local_310 + 0x10))();
    }
    if (local_318 != (IUnknown *)0x0) {
      (*local_318->lpVtbl->Release)(local_318);
    }
    if (local_498 != (longlong *)0x0) {
      (**(code **)(*local_498 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Removing unreachable block (ram,0x000140115008)
// WARNING: Removing unreachable block (ram,0x000140115012)
// WARNING: Removing unreachable block (ram,0x00014011501d)
// WARNING: Removing unreachable block (ram,0x00014011502d)

undefined8 FUN_140114b50(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  HRESULT HVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  int local_res18;
  undefined4 uStackX_1c;
  longlong *local_res20;
  longlong *local_118;
  longlong *local_110;
  longlong *local_108;
  longlong *local_100;
  IUnknown *local_f8;
  longlong *local_f0;
  undefined4 local_e8;
  undefined1 local_d8 [24];
  undefined1 local_c0 [24];
  undefined4 local_a8;
  undefined1 *local_a0;
  undefined4 local_98;
  undefined8 local_90;
  undefined1 *local_88;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_68 [4];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar9 = (longlong *)0x0;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_140114bc7:
    iVar3 = FUN_1400a1e90(param_1);
    if (iVar3 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return 0;
    }
  }
  else {
    local_res18 = 0;
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_res18 == 0) goto LAB_140114bc7;
  }
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_f8 = (IUnknown *)0x0;
  local_f0 = (longlong *)0x0;
  Ordinal_8(local_d8);
  Ordinal_8(local_c0);
  pIVar1 = local_f8;
  if ((local_f8 != (IUnknown *)0x0) && (local_f8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_88 = &DAT_140281f00;
  local_a0 = &DAT_140281f00;
  local_98 = 0;
  local_90 = 0;
  if (local_f8 != (IUnknown *)0x0) {
    (*local_f8->lpVtbl->Release)(local_f8);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           (LPVOID *)&local_res18);
  if (-1 < HVar4) {
    HVar4 = OleRun((LPUNKNOWN)CONCAT44(uStackX_1c,local_res18));
    if (-1 < HVar4) {
      HVar4 = (*(code *)**(undefined8 **)CONCAT44(uStackX_1c,local_res18))
                        ((undefined8 *)CONCAT44(uStackX_1c,local_res18),&DAT_140281f68,&local_f8);
    }
    (**(code **)(*(longlong *)CONCAT44(uStackX_1c,local_res18) + 0x10))();
    if (-1 < HVar4) goto LAB_140114d02;
  }
  local_f8 = (IUnknown *)0x0;
LAB_140114d02:
  local_a8 = 2;
  local_e8 = 1;
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_110);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_set_second_pass");
  if (local_110 != (longlong *)0x0) {
    (**(code **)(*local_110 + 0x10))();
  }
  local_118 = local_68;
  local_78 = *(undefined4 *)(param_2 + 0xe);
  uStack_74 = *(undefined4 *)(param_2 + 0x12);
  uStack_70 = *(undefined4 *)(param_2 + 0x16);
  uStack_6c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_68,&local_78);
  plVar7 = operator_new(0x18);
  local_110 = plVar9;
  local_100 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    local_110 = plVar7;
  }
  if (local_110 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_108,&local_110,0xca,1,0x26,uVar6);
  local_100 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_118);
  pIVar1 = (IUnknown *)*puVar5;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar2 < 0) {
    _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_118 != (longlong *)0x0) {
    (**(code **)(*local_118 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_108 = local_68;
  uVar6 = FUN_14006a8f0(local_68,param_2 + 0x1e);
  plVar7 = operator_new(0x18);
  local_100 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("second_pass");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_118 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_118,200,1,0x20,uVar6);
  local_108 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_110);
  pIVar1 = (IUnknown *)*puVar5;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_110 != (longlong *)0x0) {
      (**(code **)(*local_110 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_118);
    if (local_118 != (longlong *)0x0) {
      (**(code **)(*local_118 + 0x10))();
    }
    pIVar1 = local_f8;
    if (local_f8 != (IUnknown *)0x0) {
      UVar2 = (*local_f8->lpVtbl[0x12].AddRef)(local_f8);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if (local_f8 != (IUnknown *)0x0) {
        (*local_f8->lpVtbl->Release)(local_f8);
        local_f8 = (IUnknown *)0x0;
      }
    }
    local_90 = 0;
    local_88 = &DAT_140281f00;
    local_a0 = &DAT_140281f00;
    local_98 = 0;
    local_a8 = 0;
    Ordinal_9(local_c0);
    Ordinal_9(local_d8);
    if (local_f0 != (longlong *)0x0) {
      (**(code **)(*local_f0 + 0x10))();
    }
    if (local_f8 != (IUnknown *)0x0) {
      (*local_f8->lpVtbl->Release)(local_f8);
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1401150e0(undefined8 *param_1,longlong param_2,longlong param_3)

{
  int *piVar1;
  IUnknown *pIVar2;
  IUnknown *This;
  undefined2 uVar3;
  ULONG UVar4;
  int iVar5;
  HRESULT HVar6;
  undefined8 *puVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  undefined8 uVar11;
  char *_Source;
  ulonglong uVar12;
  longlong *plVar13;
  longlong *plVar14;
  undefined1 auStackY_1f8 [32];
  char local_1b8 [8];
  longlong *local_1b0;
  longlong *local_1a8;
  longlong *local_1a0;
  undefined8 local_198;
  undefined1 local_190;
  LPUNKNOWN local_188;
  undefined8 *local_180;
  longlong local_178;
  longlong *local_170;
  undefined1 local_168;
  IUnknown *local_158;
  longlong *local_150;
  undefined4 local_148;
  undefined1 local_138 [24];
  undefined1 local_120 [24];
  undefined4 local_108;
  undefined1 *local_100;
  undefined4 local_f8;
  undefined8 local_f0;
  undefined1 *local_e8;
  short local_d8 [12];
  undefined8 local_c0;
  undefined1 local_a8 [24];
  undefined2 local_90;
  undefined6 uStack_8e;
  undefined8 local_80;
  ulonglong local_78;
  void *local_68 [3];
  ulonglong local_50;
  ulonglong local_40;
  
  local_c0 = 0xfffffffffffffffe;
  local_40 = DAT_1403223c0 ^ (ulonglong)auStackY_1f8;
  pIVar2 = *(IUnknown **)*param_1;
  plVar13 = (longlong *)0x0;
  local_180 = param_1;
  local_178 = param_2;
  if (pIVar2 == (IUnknown *)0x0) {
LAB_14011516f:
    iVar5 = FUN_1400a1e90(param_1);
    if (iVar5 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (longlong *)0x0;
    }
  }
  else {
    local_1b0 = (longlong *)((ulonglong)local_1b0 & 0xffffffff00000000);
    UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_1b0 == 0) goto LAB_14011516f;
  }
  local_1a8 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_1a8);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_158 = (IUnknown *)0x0;
  local_150 = (longlong *)0x0;
  Ordinal_8(local_138);
  Ordinal_8(local_120);
  pIVar2 = local_158;
  if ((local_158 != (IUnknown *)0x0) && (local_158 = (IUnknown *)0x0, pIVar2 != (IUnknown *)0x0)) {
    (*pIVar2->lpVtbl->Release)(pIVar2);
  }
  local_e8 = &DAT_140281f00;
  local_100 = &DAT_140281f00;
  local_f8 = 0;
  local_f0 = 0;
  if (local_158 != (IUnknown *)0x0) {
    (*local_158->lpVtbl->Release)(local_158);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_188);
  if (HVar6 < 0) {
LAB_1401152a5:
    local_158 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_188);
    if (-1 < HVar6) {
      HVar6 = (*local_188->lpVtbl->QueryInterface)(local_188,(IID *)&DAT_140281f68,&local_158);
    }
    (*local_188->lpVtbl->Release)(local_188);
    if (HVar6 < 0) goto LAB_1401152a5;
  }
  local_108 = 2;
  local_148 = 1;
  local_1b8[0] = '\x01';
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_1b0);
  FUN_140001710(&local_1a8,*puVar7,"dbo.up_get_second_pass");
  if (local_1b0 != (longlong *)0x0) {
    (**(code **)(*local_1b0 + 0x10))();
  }
  local_1a0 = (longlong *)local_d8;
  FUN_14006a8f0(local_d8,param_2 + 0xe);
  plVar8 = operator_new(0x18);
  plVar10 = plVar13;
  local_170 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("bcust_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_1b0 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_1a8,&local_198,&local_1b0,0xca);
  local_170 = plVar10;
  if (local_1a8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_1a8,&local_1a0);
  pIVar2 = (IUnknown *)*puVar7;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_1a0 != (longlong *)0x0) {
    (**(code **)(*local_1a0 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  puVar7 = (undefined8 *)FUN_1400016d0(&local_1a8,&local_1a0);
  This = local_158;
  pIVar2 = (IUnknown *)*puVar7;
  if (local_158 != pIVar2) {
    local_158 = pIVar2;
    if (pIVar2 != (IUnknown *)0x0) {
      (*pIVar2->lpVtbl->AddRef)(pIVar2);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_1a0 != (longlong *)0x0) {
    (**(code **)(*local_1a0 + 0x10))();
  }
  pIVar2 = local_158;
  if (local_158 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_1b0 = (longlong *)((ulonglong)local_1b0 & 0xffffffffffff0000);
  UVar4 = (*local_158->lpVtbl[6].Release)(local_158);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
  }
  if ((short)local_1b0 == -1) {
    uVar3 = 0x180;
  }
  else {
    FUN_140002290(&local_158,local_d8,"second_pass",local_1b8);
    if (local_d8[0] != 1) {
      uVar11 = FUN_140002290(&local_158,local_a8,"second_pass",local_1b8);
      FUN_140062840(uVar11,&local_1b0);
      FUN_1401568c0();
      plVar10 = (longlong *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        plVar10 = plVar13;
      }
      local_1a0 = plVar10;
      if (local_1b0 != (longlong *)PTR_DAT_1403200a0) {
        local_198 = FUN_1401568c0();
        local_190 = 0;
        FUN_140156b50(local_198);
        local_190 = 1;
        if (((plVar10 != (longlong *)0x0) && (plVar10 != (longlong *)PTR_DAT_1403200a0)) &&
           (plVar10 + -1 != (longlong *)0x0)) {
          plVar8 = (longlong *)FUN_1401568c0();
          local_168 = 0;
          local_170 = plVar8;
          FUN_140156b50(plVar8);
          local_168 = 1;
          piVar1 = (int *)((longlong)plVar10 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(plVar10 + -1);
          }
          FUN_140156be0(plVar8);
        }
        plVar10 = local_1b0;
        local_1a0 = local_1b0;
        if (((local_1b0 != (longlong *)PTR_DAT_1403200a0) && (local_1b0 != (longlong *)0x0)) &&
           (local_1b0 != (longlong *)0x8)) {
          *(int *)((longlong)local_1b0 + -4) = *(int *)((longlong)local_1b0 + -4) + 1;
        }
        FUN_140156be0();
      }
      plVar8 = plVar10;
      if (plVar10 == (longlong *)0x0) {
        plVar8 = (longlong *)PTR_DAT_1403200a0;
      }
      local_78 = 7;
      local_80 = 0;
      local_90 = 0;
      uVar12 = 0xffffffffffffffff;
      plVar14 = plVar8;
      do {
        if (uVar12 == 0) break;
        uVar12 = uVar12 - 1;
        lVar9 = *plVar14;
        plVar14 = (longlong *)((longlong)plVar14 + 2);
      } while ((short)lVar9 != 0);
      FUN_140056dd0(&local_90,plVar8,~uVar12 - 1);
      if (((plVar10 != (longlong *)0x0) && (plVar10 != (longlong *)PTR_DAT_1403200a0)) &&
         (plVar10 + -1 != (longlong *)0x0)) {
        uVar11 = FUN_1401568c0();
        local_190 = 0;
        local_198 = uVar11;
        FUN_140156b50(uVar11);
        local_190 = 1;
        piVar1 = (int *)((longlong)plVar10 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(plVar10 + -1);
        }
        FUN_140156be0(uVar11);
      }
      plVar10 = local_1b0;
      if (((local_1b0 != (longlong *)0x0) && (local_1b0 != (longlong *)PTR_DAT_1403200a0)) &&
         (plVar8 = local_1b0 + -1, plVar8 != (longlong *)0x0)) {
        uVar11 = FUN_1401568c0();
        local_190 = 0;
        local_198 = uVar11;
        FUN_140156b50(uVar11);
        local_190 = 1;
        piVar1 = (int *)((longlong)plVar10 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(plVar8);
        }
        FUN_140156be0(uVar11);
      }
      local_1b0 = (longlong *)PTR_DAT_1403200a0;
      Ordinal_9(local_a8);
      _Source = (char *)FUN_1402025b0(local_68,&local_90);
      if (0xf < *(ulonglong *)(_Source + 0x18)) {
        _Source = *(char **)_Source;
      }
      strncpy((char *)(param_3 + 0xe),_Source,0x1f);
      if (0xf < local_50) {
        operator_delete(local_68[0]);
      }
      *(undefined1 *)(param_3 + 0x2d) = 0;
      if (7 < local_78) {
        operator_delete((void *)CONCAT62(uStack_8e,local_90));
      }
    }
    Ordinal_9(local_d8);
    plVar10 = (longlong *)0x1;
    if (local_1b8[0] != '\0') goto LAB_14011578e;
    uVar3 = 0x17e;
  }
  *(undefined2 *)(param_3 + 0xc) = uVar3;
  plVar10 = plVar13;
LAB_14011578e:
  pIVar2 = local_158;
  if (local_158 != (IUnknown *)0x0) {
    local_1b0 = (longlong *)((ulonglong)local_1b0 & 0xffffffff00000000);
    UVar4 = (*local_158->lpVtbl[0x12].AddRef)(local_158);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
    }
    pIVar2 = local_158;
    if ((int)local_1b0 != 0) {
      if (local_158 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*local_158->lpVtbl[10].Release)(local_158);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_158 != (IUnknown *)0x0) {
      (*local_158->lpVtbl->Release)(local_158);
      local_158 = (IUnknown *)0x0;
    }
  }
  local_f0 = 0;
  local_e8 = &DAT_140281f00;
  local_100 = &DAT_140281f00;
  local_f8 = 0;
  local_108 = 0;
  Ordinal_9(local_120);
  Ordinal_9(local_138);
  if (local_150 != (longlong *)0x0) {
    (**(code **)(*local_150 + 0x10))();
  }
  if (local_158 != (IUnknown *)0x0) {
    (*local_158->lpVtbl->Release)(local_158);
  }
  if (local_1a8 != (longlong *)0x0) {
    (**(code **)(*local_1a8 + 0x10))();
  }
  return plVar10;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1401158e0(undefined8 *param_1,longlong param_2,longlong param_3)

{
  IUnknown *pIVar1;
  IUnknown *This;
  undefined1 uVar2;
  undefined2 uVar3;
  ULONG UVar4;
  int iVar5;
  HRESULT HVar6;
  undefined4 uVar7;
  undefined8 *puVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  undefined4 *puVar12;
  undefined8 uVar13;
  longlong *plVar14;
  undefined1 auStackY_1b8 [32];
  char local_178 [8];
  longlong *local_170;
  longlong *local_168;
  longlong *local_160;
  longlong *local_158;
  longlong *local_150;
  longlong local_148 [3];
  longlong *local_130;
  undefined8 local_128;
  LPUNKNOWN local_120;
  longlong local_118;
  undefined8 *local_110;
  IUnknown *local_108;
  longlong *local_100;
  undefined4 local_f8;
  undefined1 local_e8 [24];
  undefined1 local_d0 [24];
  undefined4 local_b8;
  undefined1 *local_b0;
  undefined4 local_a8;
  undefined8 local_a0;
  undefined1 *local_98;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  undefined8 local_60;
  longlong local_58 [3];
  ulonglong local_40;
  
  local_60 = 0xfffffffffffffffe;
  local_40 = DAT_1403223c0 ^ (ulonglong)auStackY_1b8;
  pIVar1 = *(IUnknown **)*param_1;
  plVar14 = (longlong *)0x0;
  local_118 = param_2;
  local_110 = param_1;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_140115972:
    iVar5 = FUN_1400a1e90(param_1);
    if (iVar5 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (longlong *)0x0;
    }
  }
  else {
    local_170 = (longlong *)((ulonglong)local_170 & 0xffffffff00000000);
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_170 == 0) goto LAB_140115972;
  }
  local_168 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_168);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_108 = (IUnknown *)0x0;
  local_100 = (longlong *)0x0;
  Ordinal_8(local_e8);
  Ordinal_8(local_d0);
  pIVar1 = local_108;
  if ((local_108 != (IUnknown *)0x0) && (local_108 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_98 = &DAT_140281f00;
  local_b0 = &DAT_140281f00;
  local_a8 = 0;
  local_a0 = 0;
  if (local_108 != (IUnknown *)0x0) {
    (*local_108->lpVtbl->Release)(local_108);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_120);
  if (HVar6 < 0) {
LAB_140115ab4:
    local_108 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_120);
    if (-1 < HVar6) {
      HVar6 = (*local_120->lpVtbl->QueryInterface)(local_120,(IID *)&DAT_140281f68,&local_108);
    }
    (*local_120->lpVtbl->Release)(local_120);
    if (HVar6 < 0) goto LAB_140115ab4;
  }
  local_b8 = 2;
  local_f8 = 1;
  local_178[0] = '\x01';
  puVar8 = (undefined8 *)FUN_140001f20(*param_1,&local_170);
  FUN_140001710(&local_168,*puVar8,"dbo.up_get_auth_id");
  if (local_170 != (longlong *)0x0) {
    (**(code **)(*local_170 + 0x10))();
  }
  local_160 = local_58;
  FUN_14006a8f0(local_58,param_2 + 0xe);
  plVar9 = operator_new(0x18);
  plVar11 = plVar14;
  local_158 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("bcust_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_170 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_168,&local_150,&local_170,0xca);
  local_158 = plVar11;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_168,&local_160);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_160 != (longlong *)0x0) {
    (**(code **)(*local_160 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_150 = local_148;
  puVar12 = (undefined4 *)FUN_140182810(local_58);
  local_78 = *puVar12;
  uStack_74 = puVar12[1];
  uStack_70 = puVar12[2];
  uStack_6c = puVar12[3];
  FUN_140061f30(local_148,&local_78);
  plVar9 = operator_new(0x18);
  plVar11 = plVar14;
  local_158 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490(&DAT_140292470);
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_160 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_168,&local_130,&local_160,0xca);
  local_150 = plVar11;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_168,&local_170);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_170 != (longlong *)0x0) {
    (**(code **)(*local_170 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_130 = local_58;
  uVar7 = *(undefined4 *)(param_2 + 0x77);
  Ordinal_8(local_58);
  FUN_140062080(local_58,uVar7);
  plVar9 = operator_new(0x18);
  plVar11 = plVar14;
  local_150 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("channelling");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_160 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_168,&local_158,&local_160,3);
  local_130 = plVar11;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_168,&local_170);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_170 != (longlong *)0x0) {
    (**(code **)(*local_170 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_130 = local_148;
  FUN_14006a8f0(local_148,param_2 + 0x41);
  plVar9 = operator_new(0x18);
  plVar11 = plVar14;
  local_150 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("mac_addr");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_160 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_168,&local_158,&local_160,0x81);
  local_130 = plVar11;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_168,&local_170);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_170 != (longlong *)0x0) {
    (**(code **)(*local_170 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_130 = local_148;
  FUN_14006a8f0(local_148,param_2 + 0x53);
  plVar9 = operator_new(0x18);
  plVar11 = plVar14;
  local_150 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("mac_addr02");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_160 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_168,&local_158,&local_160,0x81);
  local_130 = plVar11;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_168,&local_170);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_170 != (longlong *)0x0) {
    (**(code **)(*local_170 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  local_130 = local_148;
  FUN_14006a8f0(local_148,param_2 + 0x65);
  plVar9 = operator_new(0x18);
  plVar11 = plVar14;
  local_150 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("mac_addr03");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_160 = plVar11;
  if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar11 = (longlong *)FUN_140001880(&local_168,&local_158,&local_160,0x81);
  local_130 = plVar11;
  if (local_168 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar8 = (undefined8 *)FUN_140001660(local_168,&local_170);
  pIVar1 = (IUnknown *)*puVar8;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_170 != (longlong *)0x0) {
    (**(code **)(*local_170 + 0x10))();
  }
  if ((longlong *)*plVar11 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar11 + 0x10))();
  }
  puVar8 = (undefined8 *)FUN_1400016d0(&local_168,&local_160);
  This = local_108;
  pIVar1 = (IUnknown *)*puVar8;
  if (local_108 != pIVar1) {
    local_108 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_160 != (longlong *)0x0) {
    (**(code **)(*local_160 + 0x10))();
  }
  pIVar1 = local_108;
  if (local_108 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_170 = (longlong *)((ulonglong)local_170 & 0xffffffffffff0000);
  UVar4 = (*local_108->lpVtbl[6].Release)(local_108);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
  }
  if ((short)local_170 == -1) {
    uVar3 = 0x72;
  }
  else {
    uVar13 = FUN_140002290(&local_108,local_148,"AuthID",local_178);
    FUN_1400625d0(uVar13,&local_130);
    *(longlong **)(param_3 + 0xe) = local_130;
    *(undefined8 *)(param_3 + 0x16) = local_128;
    Ordinal_9(local_148);
    uVar13 = FUN_140002290(&local_108,local_148,"online",local_178);
    FUN_140182560(uVar13);
    uVar2 = FUN_140062550(uVar13);
    *(undefined1 *)(param_3 + 0x1e) = uVar2;
    Ordinal_9(local_148);
    uVar13 = FUN_140002290(&local_108,local_148,"dbcindex",local_178);
    FUN_140182560(uVar13);
    uVar3 = FUN_140062550(uVar13);
    *(undefined2 *)(param_3 + 0x1f) = uVar3;
    Ordinal_9(local_148);
    uVar13 = FUN_140002290(&local_108,local_148,"InquiryCount",local_178);
    FUN_140182560(uVar13);
    uVar2 = FUN_140062550(uVar13);
    *(undefined1 *)(param_3 + 0x21) = uVar2;
    Ordinal_9(local_148);
    uVar13 = FUN_140002290(&local_108,local_148,"CashMileage",local_178);
    FUN_140182560(uVar13);
    uVar7 = FUN_140062550(uVar13);
    *(undefined4 *)(param_3 + 0x26) = uVar7;
    Ordinal_9(local_148);
    uVar13 = FUN_140002290(&local_108,local_148,"pc_room_point",local_178);
    FUN_140182560(uVar13);
    uVar7 = FUN_140062550(uVar13);
    *(undefined4 *)(param_3 + 0x2a) = uVar7;
    Ordinal_9(local_148);
    plVar11 = (longlong *)0x1;
    if (local_178[0] != '\0') goto LAB_14011640a;
    uVar3 = 0x70;
  }
  *(undefined2 *)(param_3 + 0xc) = uVar3;
  plVar11 = plVar14;
LAB_14011640a:
  pIVar1 = local_108;
  if (local_108 != (IUnknown *)0x0) {
    local_170 = (longlong *)((ulonglong)local_170 & 0xffffffff00000000);
    UVar4 = (*local_108->lpVtbl[0x12].AddRef)(local_108);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
    }
    pIVar1 = local_108;
    if ((int)local_170 != 0) {
      if (local_108 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar4 = (*local_108->lpVtbl[10].Release)(local_108);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_108 != (IUnknown *)0x0) {
      (*local_108->lpVtbl->Release)(local_108);
      local_108 = (IUnknown *)0x0;
    }
  }
  local_a0 = 0;
  local_98 = &DAT_140281f00;
  local_b0 = &DAT_140281f00;
  local_a8 = 0;
  local_b8 = 0;
  Ordinal_9(local_d0);
  Ordinal_9(local_e8);
  if (local_100 != (longlong *)0x0) {
    (**(code **)(*local_100 + 0x10))();
  }
  if (local_108 != (IUnknown *)0x0) {
    (*local_108->lpVtbl->Release)(local_108);
  }
  if (local_168 != (longlong *)0x0) {
    (**(code **)(*local_168 + 0x10))();
  }
  return plVar11;
}



// WARNING: Removing unreachable block (ram,0x000140116afe)
// WARNING: Removing unreachable block (ram,0x000140116b08)
// WARNING: Removing unreachable block (ram,0x000140116b13)
// WARNING: Removing unreachable block (ram,0x000140116b23)

longlong * FUN_140116560(undefined8 *param_1,longlong param_2,longlong param_3)

{
  IUnknown *pIVar1;
  IUnknown *This;
  undefined1 uVar2;
  undefined2 uVar3;
  ULONG UVar4;
  int iVar5;
  HRESULT HVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  longlong *plVar12;
  int local_res18 [2];
  longlong *local_res20;
  longlong *local_128;
  longlong *local_120;
  LPUNKNOWN local_118;
  longlong *local_110;
  longlong *local_108;
  IUnknown *local_f8;
  longlong *local_f0;
  undefined4 local_e8;
  undefined1 local_d8 [24];
  undefined1 local_c0 [24];
  undefined4 local_a8;
  undefined1 *local_a0;
  undefined4 local_98;
  undefined8 local_90;
  undefined1 *local_88;
  longlong local_78 [4];
  undefined1 local_58 [16];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_1401165dc:
    iVar5 = FUN_1400a1e90(param_1);
    if (iVar5 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (longlong *)0x0;
    }
  }
  else {
    local_res18[0] = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_res18[0] == 0) goto LAB_1401165dc;
  }
  local_128 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_128);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  local_f8 = (IUnknown *)0x0;
  local_f0 = (longlong *)0x0;
  Ordinal_8(local_d8);
  Ordinal_8(local_c0);
  pIVar1 = local_f8;
  if ((local_f8 != (IUnknown *)0x0) && (local_f8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_88 = &DAT_140281f00;
  local_a0 = &DAT_140281f00;
  local_98 = 0;
  local_90 = 0;
  if (local_f8 != (IUnknown *)0x0) {
    (*local_f8->lpVtbl->Release)(local_f8);
  }
  HVar6 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_118);
  if (HVar6 < 0) {
LAB_140116700:
    local_f8 = (IUnknown *)0x0;
  }
  else {
    HVar6 = OleRun(local_118);
    if (-1 < HVar6) {
      HVar6 = (*local_118->lpVtbl->QueryInterface)(local_118,(IID *)&DAT_140281f68,&local_f8);
    }
    (*local_118->lpVtbl->Release)(local_118);
    if (HVar6 < 0) goto LAB_140116700;
  }
  local_a8 = 2;
  local_e8 = 1;
  local_res18[0] = CONCAT31(local_res18[0]._1_3_,1);
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_res20);
  FUN_140001710(&local_128,*puVar7,"dbo.up_auth_agentaccount");
  if (local_res20 != (longlong *)0x0) {
    (**(code **)(*local_res20 + 0x10))();
  }
  local_120 = local_78;
  uVar8 = FUN_1400623f0(local_78,param_2 + 0xe);
  plVar9 = operator_new(0x18);
  local_res20 = plVar12;
  local_108 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("Account");
    *plVar9 = lVar10;
    local_res20 = plVar9;
  }
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_128,&local_110,&local_res20,0xca,1,0x10,uVar8);
  local_108 = plVar9;
  if (local_128 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_128,&local_120);
  pIVar1 = (IUnknown *)*puVar7;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_120 != (longlong *)0x0) {
    (**(code **)(*local_120 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_110 = local_78;
  uVar8 = FUN_1400623f0(local_78,param_2 + 0x30);
  plVar11 = operator_new(0x18);
  plVar9 = plVar12;
  local_108 = plVar11;
  if (plVar11 != (longlong *)0x0) {
    plVar11[1] = 0;
    *(undefined4 *)(plVar11 + 2) = 1;
    lVar10 = FUN_140201490("Password");
    *plVar11 = lVar10;
    plVar9 = plVar11;
  }
  local_res20 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_128,local_58,&local_res20,0xca,1,0x20,uVar8);
  local_110 = plVar9;
  if (local_128 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_128,&local_120);
  pIVar1 = (IUnknown *)*puVar7;
  if (pIVar1 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
  }
  if (local_120 != (longlong *)0x0) {
    (**(code **)(*local_120 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  puVar7 = (undefined8 *)FUN_1400016d0(&local_128,&local_res20);
  This = local_f8;
  pIVar1 = (IUnknown *)*puVar7;
  if (local_f8 != pIVar1) {
    local_f8 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_res20 != (longlong *)0x0) {
    (**(code **)(*local_res20 + 0x10))();
  }
  pIVar1 = local_f8;
  if (local_f8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_res20 = (longlong *)((ulonglong)local_res20 & 0xffffffffffff0000);
  UVar4 = (*local_f8->lpVtbl[6].Release)(local_f8);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
  }
  if ((short)local_res20 == -1) {
    uVar3 = 0x72;
  }
  else {
    uVar8 = FUN_140002290(&local_f8,local_78,"permission",local_res18);
    FUN_140182560(uVar8);
    uVar2 = FUN_1400624d0(uVar8);
    *(undefined1 *)(param_3 + 0xe) = uVar2;
    Ordinal_9(local_78);
    plVar9 = (longlong *)0x1;
    if ((char)local_res18[0] != '\0') goto LAB_140116aa3;
    uVar3 = 0x70;
  }
  *(undefined2 *)(param_3 + 0xc) = uVar3;
  plVar9 = plVar12;
LAB_140116aa3:
  pIVar1 = local_f8;
  if (local_f8 != (IUnknown *)0x0) {
    UVar4 = (*local_f8->lpVtbl[0x12].AddRef)(local_f8);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
    }
    if (local_f8 != (IUnknown *)0x0) {
      (*local_f8->lpVtbl->Release)(local_f8);
      local_f8 = (IUnknown *)0x0;
    }
  }
  local_90 = 0;
  local_88 = &DAT_140281f00;
  local_a0 = &DAT_140281f00;
  local_98 = 0;
  local_a8 = 0;
  Ordinal_9(local_c0);
  Ordinal_9(local_d8);
  if (local_f0 != (longlong *)0x0) {
    (**(code **)(*local_f0 + 0x10))();
  }
  if (local_f8 != (IUnknown *)0x0) {
    (*local_f8->lpVtbl->Release)(local_f8);
  }
  if (local_128 != (longlong *)0x0) {
    (**(code **)(*local_128 + 0x10))();
  }
  return plVar9;
}



undefined8 FUN_140116be0(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_a8;
  longlong *local_a0;
  longlong *local_98 [2];
  longlong *local_88;
  undefined4 uStack_80;
  undefined4 uStack_7c;
  undefined4 local_78;
  undefined4 uStack_74;
  undefined4 uStack_70;
  undefined4 uStack_6c;
  longlong local_58 [5];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140116c76;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140116c76:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_save_logout_log");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_a8 = (longlong *)&local_78;
  local_88 = *(longlong **)(param_2 + 0x12);
  uStack_80 = *(undefined4 *)(param_2 + 0x1a);
  uStack_7c = *(undefined4 *)(param_2 + 0x1e);
  uVar6 = FUN_140062280(&local_78,&local_88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,local_98,&local_res18,0xca,1,0x26,uVar6);
  local_a0 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_98[0] = local_58;
  local_78 = *(undefined4 *)(param_2 + 0x22);
  uStack_74 = *(undefined4 *)(param_2 + 0x26);
  uStack_70 = *(undefined4 *)(param_2 + 0x2a);
  uStack_6c = *(undefined4 *)(param_2 + 0x2e);
  uVar6 = FUN_140062280(local_58,&local_78);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_a0 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("CharID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_88,&local_res18,0xca,1,0x26,uVar6);
  local_98[0] = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0x32);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("server");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,2,1,2,&local_78);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xb4);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("channelID");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_78);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = local_58;
  uVar6 = FUN_1400623f0(local_58,param_2 + 0x68);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490(&DAT_140289c8c);
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x10,uVar6);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = local_58;
  uVar6 = FUN_1400623f0(local_58,param_2 + 0x88);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("real_ip");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,200,1,0x10,uVar6);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xb8);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("inven_gold");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_78);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xbc);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("storage_gold");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_78);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_a8 != (longlong *)0x0) {
    (**(code **)(*local_a8 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_88 = (longlong *)&local_78;
  uVar1 = *(undefined4 *)(param_2 + 0xa8);
  Ordinal_8(&local_78);
  FUN_140062080(&local_78,uVar1);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_98[0] = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("character_level");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,3,1,4,&local_78);
  local_88 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_a8 != (longlong *)0x0) {
      (**(code **)(*local_a8 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_88 = (longlong *)&local_78;
    uVar6 = *(undefined8 *)(param_2 + 0xac);
    Ordinal_8(&local_78);
    uVar6 = FUN_140182530(local_58,uVar6);
    iVar4 = Ordinal_10(&local_78,uVar6);
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar4);
    }
    Ordinal_9(local_58);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_98[0] = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("character_exp");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0x14,1,8,&local_78);
    local_88 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_a8 != (longlong *)0x0) {
        (**(code **)(*local_a8 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_88 = (longlong *)&local_78;
      uVar1 = *(undefined4 *)(param_2 + 0xe);
      Ordinal_8(&local_78);
      FUN_140062080(&local_78,uVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_98[0] = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("log_type");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,2,1,2,&local_78);
      local_88 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_a8 != (longlong *)0x0) {
          (**(code **)(*local_a8 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_88 = local_58;
        uVar6 = FUN_14006a8f0(local_58,param_2 + 0x36);
        plVar9 = operator_new(0x18);
        local_98[0] = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("bcust_id");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_a0,&local_res18,0xca,1,0x32,uVar6);
        local_88 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_a8);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_a8 != (longlong *)0x0) {
            (**(code **)(*local_a8 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140117b30(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140117bc3;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140117bc3:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_save_logout");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_140117db0(undefined8 *param_1,longlong param_2)

{
  IUnknown *pIVar1;
  ULONG UVar2;
  int iVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  undefined1 local_78 [16];
  undefined8 local_68;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  longlong local_40 [3];
  
  local_68 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  plVar8 = (longlong *)0x0;
  if (pIVar1 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140117e43;
  }
  iVar3 = FUN_1400a1e90(param_1);
  if (iVar3 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140117e43:
  local_res20 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_res20);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  puVar4 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar4,"dbo.up_save_first_character");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_40;
  local_58 = *(undefined4 *)(param_2 + 0xe);
  uStack_54 = *(undefined4 *)(param_2 + 0x12);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar5 = FUN_140062280(local_40,&local_58);
  plVar6 = operator_new(0x18);
  local_80 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar7 = FUN_140201490("auth_id");
    *plVar6 = lVar7;
    plVar8 = plVar6;
  }
  local_res18 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0xca,1,0x26,uVar5);
    local_80 = plVar8;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar4 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar1 = (IUnknown *)*puVar4;
    if (pIVar1 != (IUnknown *)0x0) {
      UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



undefined8 FUN_140118030(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78 [2];
  longlong *local_68;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  longlong local_58 [5];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  plVar11 = (longlong *)0x0;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1401180c6;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1401180c6:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_save_server_info");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_58;
  local_68 = *(longlong **)(param_2 + 0xe);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar7 = FUN_140062280(local_58,&local_68);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_78[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("auth_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar7);
  local_78[0] = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_80 = local_58;
  uVar7 = FUN_1400623f0(local_58,param_2 + 0x1e);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_78[0] = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("real_ip");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,&local_68,&local_res18,200,1,0x10,uVar7);
  local_80 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = local_58;
  uVar7 = FUN_1400623f0(local_58,param_2 + 0x3e);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_80 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("server_ip");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,200,1,0x10,uVar7);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = local_58;
  uVar2 = *(undefined4 *)(param_2 + 0x60);
  Ordinal_8(local_58);
  FUN_140062080(local_58,uVar2);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_80 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("host_id");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,3,1,4,local_58);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar10 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar10 + 0x10))();
  }
  local_68 = local_58;
  uVar7 = FUN_14006a8f0(local_58,param_2 + 0x5e);
  plVar8 = operator_new(0x18);
  plVar10 = plVar11;
  local_80 = plVar8;
  if (plVar8 != (longlong *)0x0) {
    plVar8[1] = 0;
    *(undefined4 *)(plVar8 + 2) = 1;
    lVar9 = FUN_140201490("ServerType");
    *plVar8 = lVar9;
    plVar10 = plVar8;
  }
  local_res18 = plVar10;
  if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar10 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,0x81,1,2,uVar7);
  local_68 = plVar10;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar10 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar10 + 0x10))();
    }
    local_68 = local_58;
    sVar1 = *(short *)(param_2 + 100);
    Ordinal_8(local_58);
    FUN_140062080(local_58,(int)sVar1);
    plVar10 = operator_new(0x18);
    local_80 = plVar10;
    if (plVar10 != (longlong *)0x0) {
      plVar10[1] = 0;
      *(undefined4 *)(plVar10 + 2) = 1;
      lVar9 = FUN_140201490("ServerID");
      *plVar10 = lVar9;
      plVar11 = plVar10;
    }
    local_res18 = plVar11;
    if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar11 = (longlong *)FUN_140001880(&local_res20,local_78,&local_res18,3,1,4,local_58);
    local_68 = plVar11;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar3 = (IUnknown *)*puVar6;
    if (pIVar3 != (IUnknown *)0x0) {
      UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      FUN_1400016d0(&local_res20,&local_res18);
      if (local_res18 != (longlong *)0x0) {
        (**(code **)(*local_res18 + 0x10))();
      }
      if (local_res20 != (longlong *)0x0) {
        (**(code **)(*local_res20 + 0x10))();
      }
      return 1;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140118840(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  undefined4 uVar2;
  IUnknown *pIVar3;
  ULONG UVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_78;
  longlong *local_70;
  longlong *local_68;
  longlong local_60 [3];
  undefined1 local_48 [24];
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  pIVar3 = *(IUnknown **)*param_1;
  if (pIVar3 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar4 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_1401188d8;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_1401188d8:
  local_res20 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res20);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar6,"dbo.up_server_down_log_out");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_78 = local_60;
  uVar2 = *(undefined4 *)(param_2 + 0xe);
  Ordinal_8(local_60);
  FUN_140062080(local_60,uVar2);
  plVar7 = operator_new(0x18);
  local_68 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("host_id");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,&local_70,&local_res18,3,1,4,local_60);
  local_68 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
  if ((int)UVar4 < 0) {
    _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
  }
  if (local_78 != (longlong *)0x0) {
    (**(code **)(*local_78 + 0x10))();
  }
  if ((longlong *)*plVar7 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar7 + 0x10))();
  }
  local_70 = local_60;
  sVar1 = *(short *)(param_2 + 0x12);
  Ordinal_8(local_60);
  FUN_140062080(local_60,(int)sVar1);
  plVar7 = operator_new(0x18);
  local_68 = plVar7;
  if (plVar7 == (longlong *)0x0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("ServerID");
    *plVar7 = lVar8;
    local_res18 = plVar7;
  }
  if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_res20,local_48,&local_res18,3,1,4,local_60);
  local_70 = plVar7;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_res20,&local_78);
  pIVar3 = (IUnknown *)*puVar6;
  if (pIVar3 != (IUnknown *)0x0) {
    UVar4 = (*pIVar3->lpVtbl[3].AddRef)(pIVar3);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar3,(_GUID *)&DAT_140281eb0);
    }
    if (local_78 != (longlong *)0x0) {
      (**(code **)(*local_78 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    FUN_1400016d0(&local_res20,&local_res18);
    if (local_res18 != (longlong *)0x0) {
      (**(code **)(*local_res18 + 0x10))();
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140118bf0(undefined8 *param_1,longlong param_2)

{
  short sVar1;
  IUnknown *pIVar2;
  ULONG UVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *local_res18;
  longlong *local_res20;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong local_70 [3];
  longlong *local_58;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar10 = (longlong *)0x0;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res18 = (longlong *)((ulonglong)local_res18 & 0xffffffff00000000);
    UVar3 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res18 != 0) goto LAB_140118c86;
  }
  iVar4 = FUN_1400a1e90(param_1);
  if (iVar4 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140118c86:
  local_res20 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_res20);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  puVar5 = (undefined8 *)FUN_140001f20(*param_1,&local_res18);
  FUN_140001710(&local_res20,*puVar5,"dbo.up_save_ip");
  if (local_res18 != (longlong *)0x0) {
    (**(code **)(*local_res18 + 0x10))();
  }
  local_88 = local_70;
  local_58 = *(longlong **)(param_2 + 0xe);
  uStack_50 = *(undefined4 *)(param_2 + 0x16);
  uStack_4c = *(undefined4 *)(param_2 + 0x1a);
  uVar6 = FUN_140062280(local_70,&local_58);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_80,&local_res18,0xca,1,0x26,uVar6);
  local_78 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
  }
  if (local_88 != (longlong *)0x0) {
    (**(code **)(*local_88 + 0x10))();
  }
  if ((longlong *)*plVar9 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*plVar9 + 0x10))();
  }
  local_80 = local_70;
  uVar6 = FUN_1400623f0(local_70,param_2 + 0x1e);
  plVar7 = operator_new(0x18);
  plVar9 = plVar10;
  local_78 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("real_ip");
    *plVar7 = lVar8;
    plVar9 = plVar7;
  }
  local_res18 = plVar9;
  if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar9 = (longlong *)FUN_140001880(&local_res20,&local_58,&local_res18,200,1,0x10,uVar6);
  local_80 = plVar9;
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
  pIVar2 = (IUnknown *)*puVar5;
  if (pIVar2 != (IUnknown *)0x0) {
    UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_88 != (longlong *)0x0) {
      (**(code **)(*local_88 + 0x10))();
    }
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar9 + 0x10))();
    }
    local_58 = local_70;
    uVar6 = FUN_1400623f0(local_70,param_2 + 0x3e);
    plVar7 = operator_new(0x18);
    plVar9 = plVar10;
    local_80 = plVar7;
    if (plVar7 != (longlong *)0x0) {
      plVar7[1] = 0;
      *(undefined4 *)(plVar7 + 2) = 1;
      lVar8 = FUN_140201490("server_ip");
      *plVar7 = lVar8;
      plVar9 = plVar7;
    }
    local_res18 = plVar9;
    if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,200,1,0x10,uVar6);
    local_58 = plVar9;
    if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
    pIVar2 = (IUnknown *)*puVar5;
    if (pIVar2 != (IUnknown *)0x0) {
      UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_88 != (longlong *)0x0) {
        (**(code **)(*local_88 + 0x10))();
      }
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar9 + 0x10))();
      }
      local_58 = local_70;
      sVar1 = *(short *)(param_2 + 0x5e);
      Ordinal_8(local_70);
      FUN_140062080(local_70,(int)sVar1);
      plVar7 = operator_new(0x18);
      plVar9 = plVar10;
      local_80 = plVar7;
      if (plVar7 != (longlong *)0x0) {
        plVar7[1] = 0;
        *(undefined4 *)(plVar7 + 2) = 1;
        lVar8 = FUN_140201490("host_id");
        *plVar7 = lVar8;
        plVar9 = plVar7;
      }
      local_res18 = plVar9;
      if (plVar9 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar9 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,3,1,4,local_70);
      local_58 = plVar9;
      if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
      pIVar2 = (IUnknown *)*puVar5;
      if (pIVar2 != (IUnknown *)0x0) {
        UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
        if ((int)UVar3 < 0) {
          _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
        }
        if (local_88 != (longlong *)0x0) {
          (**(code **)(*local_88 + 0x10))();
        }
        if ((longlong *)*plVar9 != (longlong *)0x0) {
          (**(code **)(*(longlong *)*plVar9 + 0x10))();
        }
        local_58 = local_70;
        sVar1 = *(short *)(param_2 + 0x60);
        Ordinal_8(local_70);
        FUN_140062080(local_70,(int)sVar1);
        plVar9 = operator_new(0x18);
        local_80 = plVar9;
        if (plVar9 != (longlong *)0x0) {
          plVar9[1] = 0;
          *(undefined4 *)(plVar9 + 2) = 1;
          lVar8 = FUN_140201490("DBCIndex");
          *plVar9 = lVar8;
          plVar10 = plVar9;
        }
        local_res18 = plVar10;
        if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x8007000e);
        }
        plVar10 = (longlong *)FUN_140001880(&local_res20,&local_78,&local_res18,2,1,2,local_70);
        local_58 = plVar10;
        if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        puVar5 = (undefined8 *)FUN_140001660(local_res20,&local_88);
        pIVar2 = (IUnknown *)*puVar5;
        if (pIVar2 != (IUnknown *)0x0) {
          UVar3 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
          if ((int)UVar3 < 0) {
            _com_issue_errorex(UVar3,pIVar2,(_GUID *)&DAT_140281eb0);
          }
          if (local_88 != (longlong *)0x0) {
            (**(code **)(*local_88 + 0x10))();
          }
          if ((longlong *)*plVar10 != (longlong *)0x0) {
            (**(code **)(*(longlong *)*plVar10 + 0x10))();
          }
          FUN_1400016d0(&local_res20,&local_res18);
          if (local_res18 != (longlong *)0x0) {
            (**(code **)(*local_res18 + 0x10))();
          }
          if (local_res20 != (longlong *)0x0) {
            (**(code **)(*local_res20 + 0x10))();
          }
          return 1;
        }
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_1401192f0(undefined8 *param_1,undefined8 *param_2)

{
  IUnknown *pIVar1;
  IUnknown *This;
  int iVar2;
  HRESULT HVar3;
  ULONG UVar4;
  undefined4 uVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong lVar8;
  undefined8 uVar9;
  longlong *plVar10;
  undefined1 auStackY_398 [32];
  char local_358 [4];
  short local_354;
  longlong *local_350;
  undefined8 *local_348;
  int local_340;
  undefined8 *local_338;
  longlong *local_330;
  LPUNKNOWN local_328 [2];
  IUnknown *local_318;
  longlong *local_310;
  undefined4 local_308;
  undefined1 local_2f8 [24];
  undefined1 local_2e0 [24];
  undefined4 local_2c8;
  undefined1 *local_2c0;
  undefined4 local_2b8;
  undefined8 local_2b0;
  undefined1 *local_2a8;
  longlong *local_298;
  longlong *local_290;
  longlong *local_288 [4];
  undefined4 local_268;
  undefined4 uStack_264;
  undefined4 uStack_260;
  undefined4 uStack_25c;
  undefined1 local_258 [8];
  undefined8 local_250;
  longlong local_248 [3];
  undefined1 local_230 [24];
  undefined4 local_218;
  undefined4 uStack_214;
  undefined4 local_210;
  undefined2 local_20c;
  undefined4 local_20a [100];
  char local_78 [64];
  ulonglong local_38;
  
  local_250 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_398;
  plVar10 = (longlong *)0x0;
  local_350 = (longlong *)0x0;
  local_348 = param_1;
  local_338 = param_2;
  iVar2 = FUN_140001970(&local_350);
  if ((iVar2 < 0) && (iVar2 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  local_318 = (IUnknown *)0x0;
  local_310 = (longlong *)0x0;
  Ordinal_8(local_2f8);
  Ordinal_8(local_2e0);
  pIVar1 = local_318;
  if ((local_318 != (IUnknown *)0x0) && (local_318 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_2a8 = &DAT_140281f00;
  local_2c0 = &DAT_140281f00;
  local_2b8 = 0;
  local_2b0 = 0;
  if (local_318 != (IUnknown *)0x0) {
    (*local_318->lpVtbl->Release)(local_318);
  }
  HVar3 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,local_328
                          );
  if (HVar3 < 0) {
LAB_140119450:
    local_318 = (IUnknown *)0x0;
  }
  else {
    HVar3 = OleRun(local_328[0]);
    if (-1 < HVar3) {
      HVar3 = (*local_328[0]->lpVtbl->QueryInterface)(local_328[0],(IID *)&DAT_140281f68,&local_318)
      ;
    }
    (*local_328[0]->lpVtbl->Release)(local_328[0]);
    if (HVar3 < 0) goto LAB_140119450;
  }
  local_2c8 = 2;
  local_308 = 1;
  local_358[0] = '\x01';
  memset(local_20a,0,0x18c);
  local_210 = *(undefined4 *)(param_2 + 1);
  _local_218 = CONCAT44((int)((ulonglong)*param_2 >> 0x20),0x23410000);
  local_20c = 0x6b;
  _local_218 = CONCAT62(stack0xfffffffffffffdea,0x19a);
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 != (IUnknown *)0x0) {
    local_340 = 0;
    UVar4 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_340 != 0) goto LAB_140119655;
  }
  iVar2 = FUN_1400a1e90(param_1);
  if (iVar2 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    pIVar1 = local_318;
    if (local_318 != (IUnknown *)0x0) {
      local_338 = (undefined8 *)((ulonglong)local_338 & 0xffffffff00000000);
      UVar4 = (*local_318->lpVtbl[0x12].AddRef)(local_318);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      pIVar1 = local_318;
      if ((int)local_338 != 0) {
        if (local_318 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1402013e0(0x80004003);
        }
        UVar4 = (*local_318->lpVtbl[10].Release)(local_318);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
      }
      if (local_318 != (IUnknown *)0x0) {
        (*local_318->lpVtbl->Release)(local_318);
        local_318 = (IUnknown *)0x0;
      }
    }
    local_2b0 = 0;
    local_2a8 = &DAT_140281f00;
    local_2c0 = &DAT_140281f00;
    local_2b8 = 0;
    local_2c8 = 0;
    Ordinal_9(local_2e0);
    Ordinal_9(local_2f8);
    if (local_310 != (longlong *)0x0) {
      (**(code **)(*local_310 + 0x10))();
    }
    if (local_318 != (IUnknown *)0x0) {
      (*local_318->lpVtbl->Release)(local_318);
    }
    if (local_350 != (longlong *)0x0) {
      (**(code **)(*local_350 + 0x10))();
    }
    return (longlong *)0x0;
  }
LAB_140119655:
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,local_288);
  FUN_140001710(&local_350,*puVar6,"dbo.up_get_keymap");
  if (local_288[0] != (longlong *)0x0) {
    (**(code **)(*local_288[0] + 0x10))();
  }
  local_330 = local_248;
  local_268 = *(undefined4 *)((longlong)param_2 + 0xe);
  uStack_264 = *(undefined4 *)((longlong)param_2 + 0x12);
  uStack_260 = *(undefined4 *)((longlong)param_2 + 0x16);
  uStack_25c = *(undefined4 *)((longlong)param_2 + 0x1a);
  FUN_140062280(local_248,&local_268);
  plVar7 = operator_new(0x18);
  local_290 = plVar10;
  local_298 = plVar7;
  if (plVar7 != (longlong *)0x0) {
    plVar7[1] = 0;
    *(undefined4 *)(plVar7 + 2) = 1;
    lVar8 = FUN_140201490("auth_id");
    *plVar7 = lVar8;
    local_290 = plVar7;
  }
  if (local_290 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar7 = (longlong *)FUN_140001880(&local_350,local_258,&local_290,0xca);
  local_330 = plVar7;
  if (local_350 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar6 = (undefined8 *)FUN_140001660(local_350,&local_298);
  pIVar1 = (IUnknown *)*puVar6;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar4 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_298 != (longlong *)0x0) {
      (**(code **)(*local_298 + 0x10))();
    }
    if ((longlong *)*plVar7 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar7 + 0x10))();
    }
    puVar6 = (undefined8 *)FUN_1400016d0(&local_350,&local_330);
    This = local_318;
    pIVar1 = (IUnknown *)*puVar6;
    if (local_318 != pIVar1) {
      local_318 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_330 != (longlong *)0x0) {
      (**(code **)(*local_330 + 0x10))();
    }
    pIVar1 = local_318;
    if (local_318 != (IUnknown *)0x0) {
      local_354 = 0;
      UVar4 = (*local_318->lpVtbl[6].Release)(local_318);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
      }
      plVar7 = plVar10;
      if (local_354 == -1) {
        local_20c = 0x6e;
      }
      else {
        while (iVar2 = (int)plVar7, iVar2 < 99) {
          sprintf(local_78,"key%02d",(ulonglong)(iVar2 + 1));
          uVar9 = FUN_140002290(&local_318,local_230,local_78,local_358);
          FUN_140182560(uVar9);
          uVar5 = FUN_140062550(uVar9);
          local_20a[iVar2] = uVar5;
          Ordinal_9(local_230);
          plVar7 = (longlong *)(ulonglong)(iVar2 + 1);
        }
        plVar7 = (longlong *)0x1;
        if (local_358[0] == '\0') {
          local_20c = 0x6c;
          plVar7 = plVar10;
        }
      }
      iVar2 = FUN_1400a1430(*(undefined8 *)(param_1[0x22] + 0xf0),&local_218);
      if (iVar2 == 0) {
        FUN_1400a0b40(param_1[0x23],"DBResultQueue_Error.Log","DB Result Queue push error");
      }
      pIVar1 = local_318;
      if (local_318 != (IUnknown *)0x0) {
        local_348 = (undefined8 *)((ulonglong)local_348 & 0xffffffff00000000);
        UVar4 = (*local_318->lpVtbl[0x12].AddRef)(local_318);
        if ((int)UVar4 < 0) {
          _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
        }
        pIVar1 = local_318;
        if ((int)local_348 != 0) {
          if (local_318 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(0x80004003);
          }
          UVar4 = (*local_318->lpVtbl[10].Release)(local_318);
          if ((int)UVar4 < 0) {
            _com_issue_errorex(UVar4,pIVar1,(_GUID *)&DAT_140281f28);
          }
        }
        if (local_318 != (IUnknown *)0x0) {
          (*local_318->lpVtbl->Release)(local_318);
          local_318 = (IUnknown *)0x0;
        }
      }
      local_2b0 = 0;
      local_2a8 = &DAT_140281f00;
      local_2c0 = &DAT_140281f00;
      local_2b8 = 0;
      local_2c8 = 0;
      Ordinal_9(local_2e0);
      Ordinal_9(local_2f8);
      if (local_310 != (longlong *)0x0) {
        (**(code **)(*local_310 + 0x10))();
      }
      if (local_318 != (IUnknown *)0x0) {
        (*local_318->lpVtbl->Release)(local_318);
      }
      if (local_350 != (longlong *)0x0) {
        (**(code **)(*local_350 + 0x10))();
      }
      return plVar7;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



undefined8 FUN_140119ab0(undefined8 *param_1,longlong param_2)

{
  int iVar1;
  IUnknown *pIVar2;
  undefined *puVar3;
  ULONG UVar4;
  int iVar5;
  int iVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong lVar10;
  longlong *plVar11;
  longlong *plVar12;
  longlong *local_res10;
  longlong *local_res18;
  longlong local_res20;
  longlong *local_98;
  short local_90 [4];
  int local_88;
  longlong *local_78;
  longlong *local_70;
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  pIVar2 = *(IUnknown **)*param_1;
  plVar12 = (longlong *)0x0;
  local_res20 = param_2;
  if (pIVar2 != (IUnknown *)0x0) {
    local_res10 = (longlong *)((ulonglong)local_res10 & 0xffffffff00000000);
    UVar4 = (*pIVar2->lpVtbl[0xb].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281f08);
    }
    if ((int)local_res10 != 0) goto LAB_140119b50;
  }
  iVar5 = FUN_1400a1e90(param_1);
  if (iVar5 == 0) {
    FUN_1400a1e10(param_1,param_2,0);
    return 0;
  }
LAB_140119b50:
  local_res18 = (longlong *)0x0;
  iVar5 = FUN_140001970(&local_res18);
  if ((iVar5 < 0) && (iVar5 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar5);
  }
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_res10);
  FUN_140001710(&local_res18,*puVar7,"dbo.up_save_keymap");
  if (local_res10 != (longlong *)0x0) {
    (**(code **)(*local_res10 + 0x10))();
  }
  local_98 = (longlong *)local_90;
  local_68 = *(undefined4 *)(param_2 + 0xe);
  uStack_64 = *(undefined4 *)(param_2 + 0x12);
  uStack_60 = *(undefined4 *)(param_2 + 0x16);
  uStack_5c = *(undefined4 *)(param_2 + 0x1a);
  uVar8 = FUN_140062280(local_90,&local_68);
  plVar9 = operator_new(0x18);
  plVar11 = plVar12;
  local_70 = plVar9;
  if (plVar9 != (longlong *)0x0) {
    plVar9[1] = 0;
    *(undefined4 *)(plVar9 + 2) = 1;
    lVar10 = FUN_140201490("auth_id");
    *plVar9 = lVar10;
    plVar11 = plVar9;
  }
  local_res10 = plVar11;
  if (plVar11 != (longlong *)0x0) {
    plVar11 = (longlong *)FUN_140001880(&local_res18,&local_78,&local_res10,0xca,1,0x26,uVar8);
    local_70 = plVar11;
    if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    puVar7 = (undefined8 *)FUN_140001660(local_res18,&local_98);
    pIVar2 = (IUnknown *)*puVar7;
    if (pIVar2 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x80004003);
    }
    UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
    if ((int)UVar4 < 0) {
      _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
    }
    if (local_98 != (longlong *)0x0) {
      (**(code **)(*local_98 + 0x10))();
    }
    plVar9 = plVar12;
    if ((longlong *)*plVar11 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar11 + 0x10))();
    }
    while( true ) {
      iVar5 = (int)plVar9;
      if (0x62 < iVar5) {
        FUN_1400016d0(&local_res18,&local_res10);
        if (local_res10 != (longlong *)0x0) {
          (**(code **)(*local_res10 + 0x10))();
        }
        if (local_res18 != (longlong *)0x0) {
          (**(code **)(*local_res18 + 0x10))();
        }
        return 1;
      }
      local_78 = (longlong *)local_90;
      iVar1 = *(int *)(param_2 + 0x1e + (longlong)iVar5 * 4);
      Ordinal_8(local_90);
      if ((local_90[0] != 3) && (local_90[0] != 10)) {
        if (local_90[0] == 0xb) {
          local_88 = CONCAT22(local_88._2_2_,-(ushort)(iVar1 != 0));
          iVar1 = local_88;
        }
        else {
          iVar6 = Ordinal_9(local_90);
          if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1402013e0(iVar6);
          }
          local_90[0] = 3;
        }
      }
      local_88 = iVar1;
      puVar3 = (&PTR_s_key01_140325e50)[iVar5];
      plVar9 = operator_new(0x18);
      plVar11 = plVar12;
      local_70 = plVar9;
      if (plVar9 != (longlong *)0x0) {
        plVar9[1] = 0;
        *(undefined4 *)(plVar9 + 2) = 1;
        lVar10 = FUN_140201490(puVar3);
        *plVar9 = lVar10;
        plVar11 = plVar9;
      }
      local_res10 = plVar11;
      if (plVar11 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x8007000e);
      }
      plVar11 = (longlong *)FUN_140001880(&local_res18,&local_68,&local_res10,3,1,4,local_90);
      local_78 = plVar11;
      if (local_res18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      puVar7 = (undefined8 *)FUN_140001660(local_res18,&local_98);
      pIVar2 = (IUnknown *)*puVar7;
      if (pIVar2 == (IUnknown *)0x0) break;
      UVar4 = (*pIVar2->lpVtbl[3].AddRef)(pIVar2);
      if ((int)UVar4 < 0) {
        _com_issue_errorex(UVar4,pIVar2,(_GUID *)&DAT_140281eb0);
      }
      if (local_98 != (longlong *)0x0) {
        (**(code **)(*local_98 + 0x10))();
      }
      if ((longlong *)*plVar11 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar11 + 0x10))();
      }
      plVar9 = (longlong *)(ulonglong)(iVar5 + 1);
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x8007000e);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

uchar  [8] FUN_140119ec0(undefined8 *param_1,undefined8 param_2,longlong param_3)

{
  wchar_t *pwVar1;
  wchar_t *pwVar2;
  IUnknown *pIVar3;
  IID *pIVar4;
  undefined *puVar5;
  IUnknown *This;
  uint *puVar6;
  undefined2 uVar7;
  ULONG UVar8;
  int iVar9;
  HRESULT HVar10;
  ulong uVar11;
  uint uVar12;
  uint uVar13;
  undefined8 *puVar14;
  undefined8 uVar15;
  undefined8 uVar16;
  uint *puVar17;
  uint *puVar18;
  uint uVar19;
  uchar auVar20 [8];
  uchar auVar21 [8];
  IID *pIVar22;
  uint *puVar23;
  uint uVar24;
  uchar auVar25 [8];
  void **ppvObject;
  uchar auVar26 [8];
  uchar auVar27 [8];
  undefined1 auStackY_1f8 [32];
  char local_1c8 [8];
  IID local_1c0;
  longlong *local_1b0;
  LPUNKNOWN local_1a8;
  undefined8 local_1a0;
  undefined8 *local_198;
  IUnknown *local_188;
  longlong *local_180;
  undefined4 local_178;
  undefined1 local_168 [24];
  undefined1 local_150 [24];
  undefined4 local_138;
  undefined1 *local_130;
  undefined4 local_128;
  undefined8 local_120;
  undefined1 *local_118;
  undefined8 local_108;
  undefined1 local_100;
  undefined8 local_f8;
  undefined1 local_f0;
  undefined8 local_e8;
  undefined1 local_e0;
  undefined8 local_d8;
  undefined1 local_d0;
  undefined8 local_c8;
  undefined1 local_c0;
  undefined8 local_b8;
  undefined1 local_b0;
  undefined8 local_a8;
  undefined1 local_a0;
  undefined1 local_98 [40];
  undefined8 local_70;
  wchar_t local_68 [16];
  ulonglong local_48;
  
  local_70 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStackY_1f8;
  auVar27[0] = '\x01';
  auVar27[1] = '\0';
  auVar27[2] = '\0';
  auVar27[3] = '\0';
  auVar27[4] = '\0';
  auVar27[5] = '\0';
  auVar27[6] = '\0';
  auVar27[7] = '\0';
  pIVar3 = *(IUnknown **)*param_1;
  auVar26[0] = '\0';
  auVar26[1] = '\0';
  auVar26[2] = '\0';
  auVar26[3] = '\0';
  auVar26[4] = '\0';
  auVar26[5] = '\0';
  auVar26[6] = '\0';
  auVar26[7] = '\0';
  local_1a0 = param_2;
  local_198 = param_1;
  if (pIVar3 == (IUnknown *)0x0) {
LAB_140119f4f:
    iVar9 = FUN_1400a1e90(param_1);
    if (iVar9 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (uchar  [8])(wchar_t *)0x0;
    }
  }
  else {
    local_1c0._0_8_ = local_1c0._0_8_ & 0xffffffff00000000;
    UVar8 = (*pIVar3->lpVtbl[0xb].AddRef)(pIVar3);
    if ((int)UVar8 < 0) {
      _com_issue_errorex(UVar8,pIVar3,(_GUID *)&DAT_140281f08);
    }
    if (local_1c0.Data1 == 0) goto LAB_140119f4f;
  }
  local_1b0 = (longlong *)0x0;
  iVar9 = FUN_140001970(&local_1b0);
  if ((iVar9 < 0) && (iVar9 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar9);
  }
  local_188 = (IUnknown *)0x0;
  local_180 = (longlong *)0x0;
  Ordinal_8(local_168);
  Ordinal_8(local_150);
  pIVar3 = local_188;
  if ((local_188 != (IUnknown *)0x0) && (local_188 = (IUnknown *)0x0, pIVar3 != (IUnknown *)0x0)) {
    (*pIVar3->lpVtbl->Release)(pIVar3);
  }
  local_118 = &DAT_140281f00;
  local_130 = &DAT_140281f00;
  local_128 = 0;
  local_120 = 0;
  if (local_188 != (IUnknown *)0x0) {
    (*local_188->lpVtbl->Release)(local_188);
  }
  HVar10 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                            &local_1a8);
  if (HVar10 < 0) {
LAB_14011a074:
    local_188 = (IUnknown *)0x0;
  }
  else {
    HVar10 = OleRun(local_1a8);
    if (-1 < HVar10) {
      HVar10 = (*local_1a8->lpVtbl->QueryInterface)(local_1a8,(IID *)&DAT_140281f68,&local_188);
    }
    (*local_1a8->lpVtbl->Release)(local_1a8);
    if (HVar10 < 0) goto LAB_14011a074;
  }
  local_138 = 2;
  local_178 = 1;
  local_1c8[0] = '\x01';
  puVar14 = (undefined8 *)FUN_140001f20(*param_1,local_1c0.Data4);
  FUN_140001710(&local_1b0,*puVar14,"dbo.up_read_auth_blacklist");
  if (local_1c0.Data4 != (uchar  [8])0x0) {
    (**(code **)(*(longlong *)local_1c0.Data4 + 0x10))();
  }
  puVar14 = (undefined8 *)FUN_1400016d0(&local_1b0,local_1c0.Data4);
  This = local_188;
  pIVar3 = (IUnknown *)*puVar14;
  if (local_188 != pIVar3) {
    local_188 = pIVar3;
    if (pIVar3 != (IUnknown *)0x0) {
      (*pIVar3->lpVtbl->AddRef)(pIVar3);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_1c0.Data4 != (uchar  [8])0x0) {
    (**(code **)(*(longlong *)local_1c0.Data4 + 0x10))();
  }
  pIVar3 = local_188;
  if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_1c0._0_8_ = local_1c0._0_8_ & 0xffffffffffff0000;
  UVar8 = (*local_188->lpVtbl[6].Release)(local_188);
  if ((int)UVar8 < 0) {
    _com_issue_errorex(UVar8,pIVar3,(_GUID *)&DAT_140281f28);
  }
  if ((short)local_1c0.Data1 == -1) {
    uVar7 = 0xfe;
  }
  else {
    while( true ) {
      pIVar3 = local_188;
      if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_1c0._0_8_ = local_1c0._0_8_ & 0xffffffffffff0000;
      UVar8 = (*local_188->lpVtbl[6].Release)(local_188);
      if ((int)UVar8 < 0) {
        _com_issue_errorex(UVar8,pIVar3,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_1c0.Data1 == -1) break;
      local_68[0] = L'\0';
      local_68[1] = L'\0';
      local_68[2] = L'\0';
      local_68[3] = L'\0';
      local_68[4] = L'\0';
      local_68[5] = L'\0';
      local_68[6] = L'\0';
      local_68[7] = L'\0';
      local_68[8] = L'\0';
      local_68[9] = L'\0';
      local_68[10] = L'\0';
      local_68[0xb] = L'\0';
      local_68[0xc] = L'\0';
      local_68[0xd] = L'\0';
      local_68[0xe] = L'\0';
      local_68[0xf] = 0;
      uVar15 = FUN_140002290(&local_188,local_98,&DAT_14028e750,local_1c8);
      FUN_140062840(uVar15,local_1c0.Data4);
      FUN_1401568c0();
      auVar20 = (uchar  [8])PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        auVar20 = auVar26;
      }
      if (local_1c0.Data4 != (uchar  [8])PTR_DAT_1403200a0) {
        uVar15 = FUN_1401568c0();
        local_e0 = 0;
        local_e8 = uVar15;
        FUN_140156b50(uVar15);
        local_e0 = 1;
        if (((auVar20 != (uchar  [8])0x0) && (auVar20 != (uchar  [8])PTR_DAT_1403200a0)) &&
           ((wchar_t *)((longlong)auVar20 + -8) != (wchar_t *)0x0)) {
          uVar16 = FUN_1401568c0();
          local_100 = 0;
          local_108 = uVar16;
          FUN_140156b50(uVar16);
          local_100 = 1;
          pwVar1 = (wchar_t *)((longlong)auVar20 + -4);
          *(int *)pwVar1 = *(int *)pwVar1 + -1;
          if (*(int *)pwVar1 == 0) {
            FUN_140156970((wchar_t *)((longlong)auVar20 + -8));
          }
          FUN_140156be0(uVar16);
          local_100 = 0;
        }
        auVar20 = local_1c0.Data4;
        if (((local_1c0.Data4 != (uchar  [8])PTR_DAT_1403200a0) &&
            (local_1c0.Data4 != (uchar  [8])0x0)) && (local_1c0.Data4 != (uchar  [8])0x8)) {
          *(int *)((longlong)local_1c0.Data4 + -4) = *(int *)((longlong)local_1c0.Data4 + -4) + 1;
        }
        FUN_140156be0(uVar15);
        local_e0 = 0;
      }
      auVar21 = auVar20;
      if (auVar20 == (uchar  [8])0x0) {
        auVar21 = (uchar  [8])PTR_DAT_1403200a0;
      }
      wcsncpy(local_68,(wchar_t *)auVar21,0xf);
      if (((auVar20 != (uchar  [8])0x0) && (auVar20 != (uchar  [8])PTR_DAT_1403200a0)) &&
         ((wchar_t *)((longlong)auVar20 + -8) != (wchar_t *)0x0)) {
        uVar15 = FUN_1401568c0();
        local_a0 = 0;
        local_a8 = uVar15;
        FUN_140156b50(uVar15);
        local_a0 = 1;
        pwVar1 = (wchar_t *)((longlong)auVar20 + -4);
        *(int *)pwVar1 = *(int *)pwVar1 + -1;
        if (*(int *)pwVar1 == 0) {
          FUN_140156970((wchar_t *)((longlong)auVar20 + -8));
        }
        FUN_140156be0(uVar15);
        local_a0 = 0;
      }
      auVar20 = local_1c0.Data4;
      if (((local_1c0.Data4 != (uchar  [8])0x0) &&
          (local_1c0.Data4 != (uchar  [8])PTR_DAT_1403200a0)) &&
         (pwVar1 = (wchar_t *)((longlong)local_1c0.Data4 + -8), pwVar1 != (wchar_t *)0x0)) {
        uVar15 = FUN_1401568c0();
        local_c0 = 0;
        local_c8 = uVar15;
        FUN_140156b50(uVar15);
        local_c0 = 1;
        pwVar2 = (wchar_t *)((longlong)auVar20 + -4);
        *(int *)pwVar2 = *(int *)pwVar2 + -1;
        if (*(int *)pwVar2 == 0) {
          FUN_140156970(pwVar1);
        }
        FUN_140156be0(uVar15);
        local_c0 = 0;
      }
      local_1c0.Data4 = (uchar  [8])PTR_DAT_1403200a0;
      Ordinal_9(local_98);
      local_68[0xf] = 0;
      uVar15 = FUN_140002290(&local_188,local_98,&DAT_14028a338,local_1c8);
      FUN_140182560(uVar15);
      uVar11 = FUN_140062550(uVar15);
      local_1c0.Data1 = uVar11;
      pIVar22 = *(IID **)(param_3 + 0x16);
      if ((&local_1c0 < pIVar22) && (pIVar4 = *(IID **)(param_3 + 0xe), pIVar4 <= &local_1c0)) {
        if (pIVar22 == *(IID **)(param_3 + 0x1e)) {
          FUN_14004a5d0(param_3 + 0xe,1);
        }
        if (*(undefined4 **)(param_3 + 0x16) != (undefined4 *)0x0) {
          **(undefined4 **)(param_3 + 0x16) =
               *(undefined4 *)
                (*(longlong *)(param_3 + 0xe) + ((longlong)&local_1c0 - (longlong)pIVar4 >> 2) * 4);
        }
      }
      else {
        if (pIVar22 == *(IID **)(param_3 + 0x1e)) {
          FUN_14004a5d0(param_3 + 0xe,1);
        }
        if (*(ulong **)(param_3 + 0x16) != (ulong *)0x0) {
          **(ulong **)(param_3 + 0x16) = uVar11;
        }
      }
      *(longlong *)(param_3 + 0x16) = *(longlong *)(param_3 + 0x16) + 4;
      Ordinal_9(local_98);
      FUN_1401568c0();
      puVar17 = (uint *)PTR_DAT_1403200a0;
      local_1c0._0_8_ = PTR_DAT_1403200a0;
      uVar12 = FUN_140156740(local_68);
      iVar9 = 0;
      if ((puVar17 != (uint *)0x0) && (puVar17 != (uint *)PTR_DAT_1403200a0)) {
        iVar9 = *(int *)((longlong)puVar17 + -8);
      }
      uVar19 = 0;
      uVar13 = uVar12;
      if ((((int)uVar12 <= iVar9) && (uVar13 = uVar19, puVar17 != (uint *)0x0)) &&
         (puVar17 != (uint *)PTR_DAT_1403200a0)) {
        uVar13 = *(uint *)((longlong)puVar17 + -8);
      }
      uVar24 = 1;
      if (1 < (int)uVar13) {
        uVar24 = uVar13;
      }
      auVar21[0] = '\0';
      auVar21[1] = '\0';
      auVar21[2] = '\0';
      auVar21[3] = '\0';
      auVar21[4] = '\0';
      auVar21[5] = '\0';
      auVar21[6] = '\0';
      auVar21[7] = '\0';
      auVar20 = auVar26;
      if ((puVar17 != (uint *)0x0) && (auVar20 = auVar21, puVar17 != (uint *)PTR_DAT_1403200a0)) {
        auVar20[4] = '\0';
        auVar20[5] = '\0';
        auVar20[6] = '\0';
        auVar20[7] = '\0';
        auVar20._0_4_ = *(uint *)((longlong)puVar17 + -8);
      }
      if (auVar20._0_4_ < (int)uVar24) {
        puVar23 = puVar17;
        if (puVar17 == (uint *)0x0) {
          puVar23 = (uint *)PTR_DAT_1403200a0;
        }
        local_1c0._0_8_ = puVar23;
        if ((int)uVar24 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        if (uVar24 == 0) {
          puVar17 = (uint *)PTR_DAT_1403200a0;
          local_1c0._0_8_ = PTR_DAT_1403200a0;
          if (((puVar23 != (uint *)0x0) && (puVar23 != (uint *)PTR_DAT_1403200a0)) &&
             (puVar23 + -2 != (uint *)0x0)) {
            local_1c0._0_8_ = puVar23;
            uVar15 = FUN_1401568c0();
            local_f0 = 0;
            local_f8 = uVar15;
            FUN_140156b50(uVar15);
            local_f0 = 1;
            puVar17 = puVar23 + -1;
            *puVar17 = *puVar17 - 1;
            if (*puVar17 == 0) {
              FUN_140156970(puVar23 + -2);
            }
            FUN_140156be0(uVar15);
            local_f0 = 0;
            puVar17 = (uint *)PTR_DAT_1403200a0;
            local_1c0._0_8_ = PTR_DAT_1403200a0;
          }
        }
        else {
          uVar13 = uVar19;
          if ((puVar23 != (uint *)0x0) && (puVar23 != (uint *)PTR_DAT_1403200a0)) {
            uVar13 = puVar23[-2];
          }
          puVar17 = puVar23;
          if (uVar24 != uVar13) {
            puVar17 = (uint *)FUN_140156940((longlong)(int)uVar24 * 2 + 10);
            if (puVar17 != (uint *)0x0) {
              *puVar17 = 0;
              puVar17[1] = 1;
            }
            *puVar17 = uVar24;
            uVar13 = uVar19;
            if ((puVar23 != (uint *)0x0) && (puVar23 != (uint *)PTR_DAT_1403200a0)) {
              uVar13 = puVar23[-2];
            }
            puVar18 = (uint *)PTR_DAT_1403200a0;
            if ((int)uVar24 < (int)uVar13) {
LAB_14011a5fc:
              if (puVar23 != (uint *)0x0) {
                puVar18 = puVar23;
              }
            }
            else {
              uVar24 = uVar19;
              if (puVar23 != (uint *)0x0) {
                uVar24 = 0;
                if (puVar23 != (uint *)PTR_DAT_1403200a0) {
                  uVar24 = puVar23[-2];
                }
                goto LAB_14011a5fc;
              }
            }
            puVar17 = puVar17 + 2;
            FUN_140156770(puVar17,puVar18,uVar24);
            FUN_14004f990(&local_1c0);
            local_1c0._0_8_ = puVar17;
          }
        }
      }
      if (((puVar17 == (uint *)0x0) || (puVar17 == (uint *)PTR_DAT_1403200a0)) ||
         (puVar23 = puVar17 + -2, puVar23 == (uint *)0x0)) {
        puVar14 = (undefined8 *)FUN_140156940();
        *puVar14 = 0;
        *(undefined2 *)(puVar14 + 1) = 0;
        if (puVar14 != (undefined8 *)0x0) {
          *(undefined4 *)puVar14 = 0;
          *(undefined4 *)((longlong)puVar14 + 4) = 1;
        }
        puVar18 = (uint *)(puVar14 + 1);
        *(undefined2 *)puVar18 = 0;
        puVar6 = puVar18;
      }
      else {
        puVar18 = puVar17;
        puVar6 = (uint *)local_1c0._0_8_;
        if (1 < (int)puVar17[-1]) {
          if ((int)*puVar23 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          puVar18 = (uint *)FUN_140156940((longlong)(int)*puVar23 * 2 + 10);
          if (puVar18 != (uint *)0x0) {
            *puVar18 = 0;
            puVar18[1] = 1;
          }
          puVar5 = PTR_DAT_1403200a0;
          uVar13 = uVar19;
          if (puVar17 != (uint *)PTR_DAT_1403200a0) {
            uVar13 = *puVar23;
          }
          *puVar18 = uVar13;
          auVar25 = auVar26;
          if (puVar17 != (uint *)puVar5) {
            auVar25[4] = '\0';
            auVar25[5] = '\0';
            auVar25[6] = '\0';
            auVar25[7] = '\0';
            auVar25._0_4_ = *puVar23;
          }
          puVar18 = puVar18 + 2;
          FUN_140156770(puVar18,puVar17,auVar25);
          puVar6 = puVar18;
          if ((puVar17 != (uint *)PTR_DAT_1403200a0) && (puVar23 != (uint *)0x0)) {
            uVar15 = FUN_1401568c0();
            local_d0 = 0;
            local_d8 = uVar15;
            FUN_140156b50(uVar15);
            local_d0 = 1;
            puVar17 = puVar17 + -1;
            *puVar17 = *puVar17 - 1;
            if (*puVar17 == 0) {
              FUN_140156970(puVar23);
            }
            FUN_140156be0(uVar15);
            local_d0 = 0;
          }
        }
      }
      local_1c0._0_8_ = puVar6;
      puVar17 = puVar18;
      if (puVar18 == (uint *)0x0) {
        puVar17 = (uint *)PTR_DAT_1403200a0;
      }
      ppvObject = (void **)(ulonglong)uVar12;
      FUN_140156770(puVar17,local_68);
      puVar17 = puVar18;
      if (puVar18 == (uint *)0x0) {
        puVar17 = (uint *)PTR_DAT_1403200a0;
      }
      uVar13 = FUN_140156740(puVar17);
      uVar12 = 0;
      if (0 < (int)uVar13) {
        uVar12 = uVar13;
      }
      uVar13 = uVar19;
      if ((puVar18 != (uint *)0x0) && (puVar18 != (uint *)PTR_DAT_1403200a0)) {
        uVar13 = puVar18[-2];
      }
      if (((int)uVar12 < (int)uVar13) || (uVar12 = uVar19, puVar18 == (uint *)0x0)) {
LAB_14011a79c:
        if (((puVar18 != (uint *)PTR_DAT_1403200a0) && (puVar18 != (uint *)0x0)) &&
           (puVar18 + -2 != (uint *)0x0)) {
          puVar18[-2] = uVar12;
          *(undefined2 *)((longlong)puVar18 + (longlong)(int)uVar12 * 2) = 0;
        }
      }
      else if (puVar18 != (uint *)PTR_DAT_1403200a0) {
        uVar12 = puVar18[-2];
        goto LAB_14011a79c;
      }
      pIVar22 = &local_1c0;
      FUN_1400476d0(param_3 + 0x2e);
      uVar15 = local_1c0._0_8_;
      if ((((uint *)local_1c0._0_8_ != (uint *)0x0) &&
          ((undefined *)local_1c0._0_8_ != PTR_DAT_1403200a0)) &&
         (puVar17 = (uint *)(local_1c0._0_8_ + -8), puVar17 != (uint *)0x0)) {
        uVar16 = FUN_1401568c0();
        local_b0 = 0;
        local_b8 = uVar16;
        FUN_140156b50(uVar16);
        local_b0 = 1;
        puVar23 = (uint *)(uVar15 + -4);
        *puVar23 = *puVar23 - 1;
        if (*puVar23 == 0) {
          FUN_140156970(puVar17);
        }
        FUN_140156be0(uVar16);
        local_b0 = 0;
      }
      pIVar3 = local_188;
      if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar10 = (*local_188->lpVtbl[0xc].QueryInterface)(local_188,pIVar22,ppvObject);
      if (HVar10 < 0) {
        _com_issue_errorex(HVar10,pIVar3,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_1c8[0] != '\0') goto LAB_14011a887;
    uVar7 = 0xff;
  }
  *(undefined2 *)(param_3 + 0xc) = uVar7;
  auVar27 = auVar26;
LAB_14011a887:
  pIVar3 = local_188;
  if (local_188 != (IUnknown *)0x0) {
    local_1c0._0_8_ = local_1c0._0_8_ & 0xffffffff00000000;
    UVar8 = (*local_188->lpVtbl[0x12].AddRef)(local_188);
    if ((int)UVar8 < 0) {
      _com_issue_errorex(UVar8,pIVar3,(_GUID *)&DAT_140281f28);
    }
    pIVar3 = local_188;
    if (local_1c0.Data1 != 0) {
      if (local_188 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar8 = (*local_188->lpVtbl[10].Release)(local_188);
      if ((int)UVar8 < 0) {
        _com_issue_errorex(UVar8,pIVar3,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_188 != (IUnknown *)0x0) {
      (*local_188->lpVtbl->Release)(local_188);
      local_188 = (IUnknown *)0x0;
    }
  }
  local_120 = 0;
  local_118 = &DAT_140281f00;
  local_130 = &DAT_140281f00;
  local_128 = 0;
  local_138 = 0;
  Ordinal_9(local_150);
  Ordinal_9(local_168);
  if (local_180 != (longlong *)0x0) {
    (**(code **)(*local_180 + 0x10))();
  }
  if (local_188 != (IUnknown *)0x0) {
    (*local_188->lpVtbl->Release)(local_188);
  }
  if (local_1b0 != (longlong *)0x0) {
    (**(code **)(*local_1b0 + 0x10))();
  }
  return auVar27;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

wchar_t * FUN_14011a9d0(undefined8 *param_1,undefined8 param_2,longlong param_3)

{
  IUnknown *pIVar1;
  IUnknown *This;
  undefined2 uVar2;
  ULONG UVar3;
  int iVar4;
  HRESULT HVar5;
  undefined8 *puVar6;
  undefined8 uVar7;
  undefined8 uVar8;
  longlong lVar9;
  wchar_t *pwVar10;
  IID *riid;
  wchar_t *pwVar11;
  IID *_Src;
  void **ppvObject;
  wchar_t *pwVar12;
  undefined1 auStackY_258 [32];
  char local_228 [4];
  uint local_224;
  wchar_t *local_220;
  longlong *local_218;
  wchar_t *local_210;
  LPUNKNOWN local_208;
  undefined8 *local_200;
  undefined8 local_1f8;
  IUnknown *local_1e8;
  longlong *local_1e0;
  undefined4 local_1d8;
  undefined1 local_1c8 [24];
  undefined1 local_1b0 [24];
  undefined4 local_198;
  undefined1 *local_190;
  undefined4 local_188;
  undefined8 local_180;
  undefined1 *local_178;
  undefined8 local_168;
  undefined1 local_160;
  undefined8 local_158;
  undefined1 local_150;
  undefined8 local_148;
  undefined1 local_140;
  undefined8 local_138;
  undefined1 local_130;
  undefined8 local_128;
  undefined1 local_120;
  undefined8 local_118;
  undefined1 local_110;
  undefined8 local_108;
  undefined1 local_100;
  undefined8 local_f8;
  undefined1 local_f0;
  IID local_e8 [2];
  undefined8 local_c8;
  void *local_b8;
  undefined8 uStack_b0;
  undefined8 local_a8;
  undefined8 uStack_a0;
  undefined8 local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  ulonglong uStack_80;
  undefined2 local_78;
  undefined6 uStack_76;
  undefined2 uStack_70;
  undefined6 uStack_6e;
  undefined2 uStack_68;
  undefined6 uStack_66;
  undefined2 uStack_60;
  undefined6 uStack_5e;
  undefined2 uStack_58;
  ulonglong local_48;
  
  local_c8 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStackY_258;
  pIVar1 = *(IUnknown **)*param_1;
  pwVar12 = (wchar_t *)0x0;
  local_200 = param_1;
  local_1f8 = param_2;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_14011aa5f:
    iVar4 = FUN_1400a1e90(param_1);
    if (iVar4 == 0) {
      FUN_1400a1e10(param_1,param_2,0);
      return (wchar_t *)0x0;
    }
  }
  else {
    local_224 = 0;
    UVar3 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_224 == 0) goto LAB_14011aa5f;
  }
  local_218 = (longlong *)0x0;
  iVar4 = FUN_140001970(&local_218);
  if ((iVar4 < 0) && (iVar4 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar4);
  }
  local_1e8 = (IUnknown *)0x0;
  local_1e0 = (longlong *)0x0;
  Ordinal_8(local_1c8);
  Ordinal_8(local_1b0);
  pIVar1 = local_1e8;
  if ((local_1e8 != (IUnknown *)0x0) && (local_1e8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_180 = 0;
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  HVar5 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_208);
  if (HVar5 < 0) {
LAB_14011ab84:
    local_1e8 = (IUnknown *)0x0;
  }
  else {
    HVar5 = OleRun(local_208);
    if (-1 < HVar5) {
      HVar5 = (*local_208->lpVtbl->QueryInterface)(local_208,(IID *)&DAT_140281f68,&local_1e8);
    }
    (*local_208->lpVtbl->Release)(local_208);
    if (HVar5 < 0) goto LAB_14011ab84;
  }
  local_198 = 2;
  local_1d8 = 1;
  local_228[0] = '\x01';
  puVar6 = (undefined8 *)FUN_140001f20(*param_1,&local_220);
  FUN_140001710(&local_218,*puVar6,"dbo.up_read_auth_pcroom");
  if (local_220 != (wchar_t *)0x0) {
    (**(code **)(*(longlong *)local_220 + 0x10))();
  }
  puVar6 = (undefined8 *)FUN_1400016d0(&local_218,&local_220);
  This = local_1e8;
  pIVar1 = (IUnknown *)*puVar6;
  if (local_1e8 != pIVar1) {
    local_1e8 = pIVar1;
    if (pIVar1 != (IUnknown *)0x0) {
      (*pIVar1->lpVtbl->AddRef)(pIVar1);
    }
    if (This != (IUnknown *)0x0) {
      (*This->lpVtbl->Release)(This);
    }
  }
  if (local_220 != (wchar_t *)0x0) {
    (**(code **)(*(longlong *)local_220 + 0x10))();
  }
  pIVar1 = local_1e8;
  if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  local_224 = local_224 & 0xffff0000;
  UVar3 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
  if ((int)UVar3 < 0) {
    _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
  }
  if ((short)local_224 == -1) {
    uVar2 = 0xfe;
  }
  else {
    while( true ) {
      pIVar1 = local_1e8;
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      local_224 = local_224 & 0xffff0000;
      UVar3 = (*local_1e8->lpVtbl[6].Release)(local_1e8);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
      }
      if ((short)local_224 == -1) break;
      local_78 = 0;
      local_b8 = (void *)0x0;
      uStack_b0 = 0;
      local_a8 = 0;
      uStack_a0 = 0;
      local_98 = 0;
      uStack_90 = 0;
      local_88 = 0;
      uStack_80 = 0;
      uStack_76 = 0;
      uStack_70 = 0;
      uStack_6e = 0;
      uStack_68 = 0;
      uStack_66 = 0;
      uStack_60 = 0;
      uStack_5e = 0;
      uStack_58 = 0;
      uVar7 = FUN_140002290(&local_1e8,local_e8,&DAT_140292940,local_228);
      FUN_140062840(uVar7,&local_210);
      FUN_1401568c0();
      pwVar11 = (wchar_t *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pwVar11 = pwVar12;
      }
      if (local_210 != (wchar_t *)PTR_DAT_1403200a0) {
        uVar7 = FUN_1401568c0();
        local_110 = 0;
        local_118 = uVar7;
        FUN_140156b50(uVar7);
        local_110 = 1;
        if (((pwVar11 != (wchar_t *)0x0) && (pwVar11 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar11 + -4 != (wchar_t *)0x0)) {
          uVar8 = FUN_1401568c0();
          local_160 = 0;
          local_168 = uVar8;
          FUN_140156b50(uVar8);
          local_160 = 1;
          pwVar10 = pwVar11 + -2;
          *(int *)pwVar10 = *(int *)pwVar10 + -1;
          if (*(int *)pwVar10 == 0) {
            FUN_140156970(pwVar11 + -4);
          }
          FUN_140156be0(uVar8);
          local_160 = 0;
        }
        pwVar11 = local_210;
        if (((local_210 != (wchar_t *)PTR_DAT_1403200a0) && (local_210 != (wchar_t *)0x0)) &&
           (local_210 != (wchar_t *)0x8)) {
          *(int *)(local_210 + -2) = *(int *)(local_210 + -2) + 1;
        }
        FUN_140156be0(uVar7);
        local_110 = 0;
      }
      pwVar10 = pwVar11;
      if (pwVar11 == (wchar_t *)0x0) {
        pwVar10 = (wchar_t *)PTR_DAT_1403200a0;
      }
      wcsncpy((wchar_t *)&uStack_76,pwVar10,0xf);
      if (((pwVar11 != (wchar_t *)0x0) && (pwVar11 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar11 + -4 != (wchar_t *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_130 = 0;
        local_138 = uVar7;
        FUN_140156b50(uVar7);
        local_130 = 1;
        pwVar10 = pwVar11 + -2;
        *(int *)pwVar10 = *(int *)pwVar10 + -1;
        if (*(int *)pwVar10 == 0) {
          FUN_140156970(pwVar11 + -4);
        }
        FUN_140156be0(uVar7);
        local_130 = 0;
      }
      pwVar11 = local_210;
      if (((local_210 != (wchar_t *)0x0) && (local_210 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar10 = local_210 + -4, pwVar10 != (wchar_t *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_f0 = 0;
        local_f8 = uVar7;
        FUN_140156b50(uVar7);
        local_f0 = 1;
        pwVar11 = pwVar11 + -2;
        *(int *)pwVar11 = *(int *)pwVar11 + -1;
        if (*(int *)pwVar11 == 0) {
          FUN_140156970(pwVar10);
        }
        FUN_140156be0(uVar7);
        local_f0 = 0;
      }
      local_210 = (wchar_t *)PTR_DAT_1403200a0;
      Ordinal_9(local_e8);
      uVar7 = FUN_140002290(&local_1e8,local_e8,"szName",local_228);
      FUN_140062840(uVar7,&local_220);
      FUN_1401568c0();
      pwVar11 = (wchar_t *)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        pwVar11 = pwVar12;
      }
      if (local_220 != (wchar_t *)PTR_DAT_1403200a0) {
        uVar7 = FUN_1401568c0();
        local_140 = 0;
        local_148 = uVar7;
        FUN_140156b50(uVar7);
        local_140 = 1;
        if (((pwVar11 != (wchar_t *)0x0) && (pwVar11 != (wchar_t *)PTR_DAT_1403200a0)) &&
           (pwVar11 + -4 != (wchar_t *)0x0)) {
          uVar8 = FUN_1401568c0();
          local_150 = 0;
          local_158 = uVar8;
          FUN_140156b50(uVar8);
          local_150 = 1;
          pwVar10 = pwVar11 + -2;
          *(int *)pwVar10 = *(int *)pwVar10 + -1;
          if (*(int *)pwVar10 == 0) {
            FUN_140156970(pwVar11 + -4);
          }
          FUN_140156be0(uVar8);
          local_150 = 0;
        }
        pwVar11 = local_220;
        if (((local_220 != (wchar_t *)PTR_DAT_1403200a0) && (local_220 != (wchar_t *)0x0)) &&
           (local_220 != (wchar_t *)0x8)) {
          *(int *)(local_220 + -2) = *(int *)(local_220 + -2) + 1;
        }
        FUN_140156be0(uVar7);
        local_140 = 0;
      }
      pwVar10 = pwVar11;
      if (pwVar11 == (wchar_t *)0x0) {
        pwVar10 = (wchar_t *)PTR_DAT_1403200a0;
      }
      wcsncpy((wchar_t *)&local_b8,pwVar10,0x1f);
      if (((pwVar11 != (wchar_t *)0x0) && (pwVar11 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar11 + -4 != (wchar_t *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_120 = 0;
        local_128 = uVar7;
        FUN_140156b50(uVar7);
        local_120 = 1;
        pwVar10 = pwVar11 + -2;
        *(int *)pwVar10 = *(int *)pwVar10 + -1;
        if (*(int *)pwVar10 == 0) {
          FUN_140156970(pwVar11 + -4);
        }
        FUN_140156be0(uVar7);
        local_120 = 0;
      }
      pwVar11 = local_220;
      if (((local_220 != (wchar_t *)0x0) && (local_220 != (wchar_t *)PTR_DAT_1403200a0)) &&
         (pwVar10 = local_220 + -4, pwVar10 != (wchar_t *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_100 = 0;
        local_108 = uVar7;
        FUN_140156b50(uVar7);
        local_100 = 1;
        pwVar11 = pwVar11 + -2;
        *(int *)pwVar11 = *(int *)pwVar11 + -1;
        if (*(int *)pwVar11 == 0) {
          FUN_140156970(pwVar10);
        }
        FUN_140156be0(uVar7);
        local_100 = 0;
      }
      local_220 = (wchar_t *)PTR_DAT_1403200a0;
      Ordinal_9(local_e8);
      uStack_58 = 0;
      uStack_80 = uStack_80 & 0xffffffffffff;
      riid = local_e8;
      uVar7 = FUN_140002290(&local_1e8,riid,"Premium",local_228);
      FUN_140182560(uVar7);
      local_78 = FUN_1400ef870(uVar7);
      Ordinal_9(local_e8);
      ppvObject = *(void ***)(param_3 + 0x16);
      if ((&local_b8 < ppvObject) && (*(void ***)(param_3 + 0xe) <= &local_b8)) {
        lVar9 = (longlong)&local_b8 - (longlong)*(void ***)(param_3 + 0xe);
        riid = SUB168(SEXT816(0x5397829cbc14e5e1) * SEXT816(lVar9),8);
        if (ppvObject == *(void ***)(param_3 + 0x1e)) {
          FUN_14004a6e0(param_3 + 0xe);
        }
        _Src = (IID *)((lVar9 / 0x62) * 0x62 + *(longlong *)(param_3 + 0xe));
        if (*(void **)(param_3 + 0x16) != (void *)0x0) {
          ppvObject = (void **)0x62;
          memcpy(*(void **)(param_3 + 0x16),_Src,0x62);
          riid = _Src;
        }
      }
      else {
        if (ppvObject == *(void ***)(param_3 + 0x1e)) {
          FUN_14004a6e0(param_3 + 0xe);
        }
        puVar6 = *(undefined8 **)(param_3 + 0x16);
        if (puVar6 != (undefined8 *)0x0) {
          *puVar6 = local_b8;
          puVar6[1] = uStack_b0;
          puVar6[2] = local_a8;
          puVar6[3] = uStack_a0;
          puVar6[4] = local_98;
          puVar6[5] = uStack_90;
          puVar6[6] = local_88;
          puVar6[7] = uStack_80;
          puVar6[8] = CONCAT62(uStack_76,local_78);
          puVar6[9] = CONCAT62(uStack_6e,uStack_70);
          puVar6[10] = CONCAT62(uStack_66,uStack_68);
          puVar6[0xb] = CONCAT62(uStack_5e,uStack_60);
          *(undefined2 *)(puVar6 + 0xc) = uStack_58;
        }
      }
      pIVar1 = local_1e8;
      *(longlong *)(param_3 + 0x16) = *(longlong *)(param_3 + 0x16) + 0x62;
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      HVar5 = (*local_1e8->lpVtbl[0xc].QueryInterface)(local_1e8,riid,ppvObject);
      if (HVar5 < 0) {
        _com_issue_errorex(HVar5,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    pwVar11 = (wchar_t *)0x1;
    if (local_228[0] != '\0') goto LAB_14011b2cd;
    uVar2 = 0xff;
  }
  *(undefined2 *)(param_3 + 0xc) = uVar2;
  pwVar11 = pwVar12;
LAB_14011b2cd:
  pIVar1 = local_1e8;
  if (local_1e8 != (IUnknown *)0x0) {
    local_224 = 0;
    UVar3 = (*local_1e8->lpVtbl[0x12].AddRef)(local_1e8);
    if ((int)UVar3 < 0) {
      _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
    }
    pIVar1 = local_1e8;
    if (local_224 != 0) {
      if (local_1e8 == (IUnknown *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1402013e0(0x80004003);
      }
      UVar3 = (*local_1e8->lpVtbl[10].Release)(local_1e8);
      if ((int)UVar3 < 0) {
        _com_issue_errorex(UVar3,pIVar1,(_GUID *)&DAT_140281f28);
      }
    }
    if (local_1e8 != (IUnknown *)0x0) {
      (*local_1e8->lpVtbl->Release)(local_1e8);
      local_1e8 = (IUnknown *)0x0;
    }
  }
  local_180 = 0;
  local_178 = &DAT_140281f00;
  local_190 = &DAT_140281f00;
  local_188 = 0;
  local_198 = 0;
  Ordinal_9(local_1b0);
  Ordinal_9(local_1c8);
  if (local_1e0 != (longlong *)0x0) {
    (**(code **)(*local_1e0 + 0x10))();
  }
  if (local_1e8 != (IUnknown *)0x0) {
    (*local_1e8->lpVtbl->Release)(local_1e8);
  }
  if (local_218 != (longlong *)0x0) {
    (**(code **)(*local_218 + 0x10))();
  }
  return pwVar11;
}



// WARNING: Removing unreachable block (ram,0x00014011b87d)
// WARNING: Removing unreachable block (ram,0x00014011b887)
// WARNING: Removing unreachable block (ram,0x00014011b892)
// WARNING: Removing unreachable block (ram,0x00014011b8a2)

longlong * FUN_14011b410(undefined8 *param_1,undefined8 param_2,longlong param_3)

{
  IUnknown *pIVar1;
  IUnknown *This;
  ULONG UVar2;
  int iVar3;
  HRESULT HVar4;
  undefined4 uVar5;
  longlong *plVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  longlong lVar9;
  int local_res18 [2];
  longlong *local_res20;
  longlong *local_118;
  LPUNKNOWN local_110;
  longlong *local_108 [2];
  IUnknown *local_f8;
  longlong *local_f0;
  undefined4 local_e8;
  undefined1 local_d8 [24];
  undefined1 local_c0 [24];
  undefined4 local_a8;
  undefined1 *local_a0;
  undefined4 local_98;
  undefined8 local_90;
  undefined1 *local_88;
  longlong *local_78;
  longlong local_70 [5];
  undefined1 local_48 [8];
  undefined8 local_40;
  
  local_40 = 0xfffffffffffffffe;
  pIVar1 = *(IUnknown **)*param_1;
  if (pIVar1 == (IUnknown *)0x0) {
LAB_14011b488:
    plVar6 = (longlong *)FUN_1400a1e90(param_1);
    if ((int)plVar6 == 0) {
      return plVar6;
    }
  }
  else {
    local_res18[0] = 0;
    UVar2 = (*pIVar1->lpVtbl[0xb].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f08);
    }
    if (local_res18[0] == 0) goto LAB_14011b488;
  }
  local_118 = (longlong *)0x0;
  iVar3 = FUN_140001970(&local_118);
  if ((iVar3 < 0) && (iVar3 != -0x7fffbffe)) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar3);
  }
  local_f8 = (IUnknown *)0x0;
  local_f0 = (longlong *)0x0;
  Ordinal_8(local_d8);
  Ordinal_8(local_c0);
  pIVar1 = local_f8;
  if ((local_f8 != (IUnknown *)0x0) && (local_f8 = (IUnknown *)0x0, pIVar1 != (IUnknown *)0x0)) {
    (*pIVar1->lpVtbl->Release)(pIVar1);
  }
  local_88 = &DAT_140281f00;
  local_a0 = &DAT_140281f00;
  local_98 = 0;
  local_90 = 0;
  if (local_f8 != (IUnknown *)0x0) {
    (*local_f8->lpVtbl->Release)(local_f8);
  }
  HVar4 = CoCreateInstance((IID *)&DAT_140281f78,(LPUNKNOWN)0x0,0x17,(IID *)&DAT_140281ea0,
                           &local_110);
  if (-1 < HVar4) {
    HVar4 = OleRun(local_110);
    if (-1 < HVar4) {
      HVar4 = (*local_110->lpVtbl->QueryInterface)(local_110,(IID *)&DAT_140281f68,&local_f8);
    }
    (*local_110->lpVtbl->Release)(local_110);
    if (-1 < HVar4) goto LAB_14011b5a0;
  }
  local_f8 = (IUnknown *)0x0;
LAB_14011b5a0:
  local_a8 = 2;
  local_e8 = 1;
  local_res18[0] = CONCAT31(local_res18[0]._1_3_,1);
  puVar7 = (undefined8 *)FUN_140001f20(*param_1,&local_res20);
  FUN_140001710(&local_118,*puVar7,"dbo.up_get_pcroominfo");
  if (local_res20 != (longlong *)0x0) {
    (**(code **)(*local_res20 + 0x10))();
  }
  local_108[0] = local_70;
  uVar8 = FUN_1400623f0(local_70,param_2);
  plVar6 = operator_new(0x18);
  local_res20 = (longlong *)0x0;
  local_78 = plVar6;
  if (plVar6 != (longlong *)0x0) {
    plVar6[1] = 0;
    *(undefined4 *)(plVar6 + 2) = 1;
    lVar9 = FUN_140201490(&DAT_140292940);
    *plVar6 = lVar9;
    local_res20 = plVar6;
  }
  if (local_res20 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8007000e);
  }
  plVar6 = (longlong *)FUN_140001880(&local_118,local_48,&local_res20,0xca,1,0x18,uVar8);
  local_78 = plVar6;
  if (local_118 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
  puVar7 = (undefined8 *)FUN_140001660(local_118,local_108);
  pIVar1 = (IUnknown *)*puVar7;
  if (pIVar1 != (IUnknown *)0x0) {
    UVar2 = (*pIVar1->lpVtbl[3].AddRef)(pIVar1);
    if ((int)UVar2 < 0) {
      _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281eb0);
    }
    if (local_108[0] != (longlong *)0x0) {
      (**(code **)(*local_108[0] + 0x10))();
    }
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      (**(code **)(*(longlong *)*plVar6 + 0x10))();
    }
    puVar7 = (undefined8 *)FUN_1400016d0(&local_118,&local_res20);
    This = local_f8;
    pIVar1 = (IUnknown *)*puVar7;
    if (local_f8 != pIVar1) {
      local_f8 = pIVar1;
      if (pIVar1 != (IUnknown *)0x0) {
        (*pIVar1->lpVtbl->AddRef)(pIVar1);
      }
      if (This != (IUnknown *)0x0) {
        (*This->lpVtbl->Release)(This);
      }
    }
    if (local_res20 != (longlong *)0x0) {
      (**(code **)(*local_res20 + 0x10))();
    }
    pIVar1 = local_f8;
    if (local_f8 != (IUnknown *)0x0) {
      local_res20 = (longlong *)((ulonglong)local_res20 & 0xffffffffffff0000);
      UVar2 = (*local_f8->lpVtbl[6].Release)(local_f8);
      if ((int)UVar2 < 0) {
        _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
      }
      plVar6 = (longlong *)0x1;
      if ((short)local_res20 != -1) {
        uVar8 = FUN_140002290(&local_f8,local_70,"Level",local_res18);
        FUN_140182560(uVar8);
        uVar5 = FUN_140062550(uVar8);
        *(undefined4 *)(param_3 + 0x22) = uVar5;
        Ordinal_9(local_70);
        if ((char)local_res18[0] == '\0') {
          *(undefined2 *)(param_3 + 0xc) = 0x70;
          plVar6 = (longlong *)0x0;
        }
      }
      pIVar1 = local_f8;
      if (local_f8 != (IUnknown *)0x0) {
        UVar2 = (*local_f8->lpVtbl[0x12].AddRef)(local_f8);
        if ((int)UVar2 < 0) {
          _com_issue_errorex(UVar2,pIVar1,(_GUID *)&DAT_140281f28);
        }
        if (local_f8 != (IUnknown *)0x0) {
          (*local_f8->lpVtbl->Release)(local_f8);
          local_f8 = (IUnknown *)0x0;
        }
      }
      local_90 = 0;
      local_88 = &DAT_140281f00;
      local_a0 = &DAT_140281f00;
      local_98 = 0;
      local_a8 = 0;
      Ordinal_9(local_c0);
      Ordinal_9(local_d8);
      if (local_f0 != (longlong *)0x0) {
        (**(code **)(*local_f0 + 0x10))();
      }
      if (local_f8 != (IUnknown *)0x0) {
        (*local_f8->lpVtbl->Release)(local_f8);
      }
      if (local_118 != (longlong *)0x0) {
        (**(code **)(*local_118 + 0x10))();
      }
      return plVar6;
    }
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x80004003);
  }
                    // WARNING: Subroutine does not return
  FUN_1402013e0(0x80004003);
}



void FUN_14011b960(longlong param_1,longlong param_2)

{
  longlong *plVar1;
  ushort uVar2;
  int local_res10 [2];
  undefined4 local_res18 [2];
  
  timeGetTime();
  uVar2 = *(ushort *)(param_2 + 2);
  if (uVar2 < 0x2436) {
    if (uVar2 == 0x2435) {
      FUN_14011ec70(param_1,param_2);
      return;
    }
    switch(uVar2) {
    case 0x2329:
      FUN_14011d570(param_1,param_2);
      return;
    case 0x232a:
      FUN_14011f290(param_1,param_2);
      return;
    case 0x232e:
      plVar1 = (longlong *)(param_1 + 0xa8);
      if (0x7fff < *(ushort *)(param_2 + 0xe)) {
        *(int *)(param_1 + 0x5ac) = *(int *)(param_1 + 0x5ac) + 1;
        local_res10[0] = (int)*(short *)(param_2 + 0xe);
        local_res18[0] = *(undefined4 *)(param_2 + 4);
        (**(code **)(*plVar1 + 0x70))
                  (plVar1,*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res18,local_res10,
                   param_2 + 0x10,param_2 + 0x132);
        return;
      }
      *(int *)(param_1 + 0x5bc) = *(int *)(param_1 + 0x5bc) + 1;
      local_res10[0] = (int)*(short *)(param_2 + 0xe);
      local_res18[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*plVar1 + 0x70))
                (plVar1,*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res18,local_res10,
                 param_2 + 0x10,param_2 + 0x132);
      return;
    case 0x2330:
      FUN_14011f550(param_1,param_2);
      return;
    case 0x2331:
      if (*(short *)(param_2 + 0xc) != 0x96) {
        local_res10[0] = (int)*(short *)(param_2 + 0xc);
        local_res18[0] = *(undefined4 *)(param_2 + 4);
        (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x30))
                  ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                   local_res18,local_res10);
        return;
      }
      break;
    case 0x2335:
      FUN_14011e550(param_1,param_2);
      return;
    case 0x2336:
      *(int *)(param_1 + 0x5e8) = *(int *)(param_1 + 0x5e8) + 1;
      local_res10[0] = *(int *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x120))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe);
      return;
    case 0x2339:
      *(int *)(param_1 + 0x5c0) = *(int *)(param_1 + 0x5c0) + 1;
      local_res10[0] = (int)*(short *)(param_2 + 0xc);
      local_res18[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x80))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res18,param_2 + 0xe,local_res10);
      return;
    case 0x233e:
      FUN_14011d8b0(param_1,param_2);
      return;
    case 0x233f:
      FUN_14011d8b0(param_1,param_2);
      return;
    case 0x2340:
      FUN_14011db70(param_1,param_2);
      return;
    case 0x2341:
      FUN_14011dda0(param_1,param_2);
      return;
    case 0x2343:
      *(int *)(param_1 + 0x6d4) = *(int *)(param_1 + 0x6d4) + 1;
      local_res10[0] = (int)*(short *)(param_2 + 0xc);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x4d0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 param_2 + 0xe,param_2 + 0x26,local_res10);
      return;
    case 0x2344:
      FUN_14011f790(param_1,param_2);
      return;
    case 0x234e:
    case 0x23f5:
      FUN_14011f4a0(param_1,param_2);
      return;
    case 0x234f:
      FUN_140120980(param_1,param_2);
      return;
    case 0x2350:
      FUN_14011e720(param_1,param_2);
      return;
    case 0x2351:
      FUN_14011f070(param_1,param_2);
      return;
    case 0x2353:
      *(int *)(param_1 + 0x614) = *(int *)(param_1 + 0x614) + 1;
      local_res10[0] = *(int *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x1d0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe);
      return;
    case 0x2354:
      FUN_14011f9a0(param_1,param_2);
      return;
    case 0x2357:
      FUN_140121310(param_1,param_2);
      return;
    case 0x2358:
      FUN_1401202a0(param_1,param_2);
      return;
    case 0x2359:
    case 0x2390:
      FUN_140121160(param_1,param_2);
      return;
    case 0x235a:
      *(int *)(param_1 + 0x5c8) = *(int *)(param_1 + 0x5c8) + 1;
      local_res10[0] = *(int *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0xa0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe);
      return;
    case 0x235b:
      FUN_140121530(param_1,param_2);
      return;
    case 0x235c:
      FUN_140121c40(param_1,param_2);
      return;
    case 0x2360:
      FUN_1401219e0(param_1,param_2);
      return;
    case 0x238a:
      *(int *)(param_1 + 0x5e0) = *(int *)(param_1 + 0x5e0) + 1;
      local_res10[0] = (int)*(short *)(param_2 + 0xc);
      local_res18[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x100))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res18,local_res10);
      return;
    case 0x2395:
      FUN_140121e50(param_1,param_2);
      return;
    case 0x2398:
      FUN_140120720(param_1,param_2);
      return;
    case 0x239c:
      *(int *)(param_1 + 0x6d8) = *(int *)(param_1 + 0x6d8) + 1;
      local_res10[0] = (int)*(short *)(param_2 + 0xc);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x4e0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 param_2 + 0xe,param_2 + 0x26,local_res10);
      return;
    case 0x239e:
      *(int *)(param_1 + 0x61c) = *(int *)(param_1 + 0x61c) + 1;
      local_res10[0] = *(int *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x1f0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe);
      return;
    case 0x239f:
      FUN_14011fb10(param_1,param_2);
      return;
    case 0x23a0:
      *(int *)(param_1 + 0x604) = *(int *)(param_1 + 0x604) + 1;
      local_res10[0] = (int)*(short *)(param_2 + 0xe);
      local_res18[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 400))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res18,local_res10);
      return;
    case 0x23a1:
      *(int *)(param_1 + 0x62c) = *(int *)(param_1 + 0x62c) + 1;
      local_res10[0] = *(int *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x230))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe,param_2 + 0x1e);
      return;
    case 0x23b1:
      FUN_14005b460(param_1,param_2);
      return;
    case 0x23bb:
      FUN_14005b5d0(param_1,param_2);
      return;
    case 0x23bc:
      FUN_14011e890(param_1,param_2);
      return;
    case 0x23c8:
      FUN_14011fc70(param_1,param_2);
      return;
    case 0x23ca:
      *(int *)(param_1 + 0x6cc) = *(int *)(param_1 + 0x6cc) + 1;
      local_res10[0] = (int)*(short *)(param_2 + 0xc);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x4b0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 param_2 + 0x13,param_2 + 0x2b,param_2 + 0xf,param_2 + 0xe,local_res10);
      return;
    case 0x23cc:
      FUN_14011fdd0(param_1,param_2);
      return;
    case 0x23cd:
      FUN_14011ff30(param_1,param_2);
      return;
    case 0x23d3:
      FUN_140120090(param_1,param_2);
      return;
    case 0x23d5:
      *(int *)(param_1 + 0x640) = *(int *)(param_1 + 0x640) + 1;
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x280))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 param_2 + 0xe,param_2 + 0x1e,param_2 + 0x22,param_2 + 0x2a,param_2 + 0x2e);
      return;
    case 0x23e1:
      *(int *)(param_1 + 0x5f4) = *(int *)(param_1 + 0x5f4) + 1;
      local_res10[0] = *(int *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x2e0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10);
      return;
    case 0x23e6:
      FUN_14011ea80(param_1,param_2);
      return;
    case 0x23f2:
      FUN_140120ad0(param_1,param_2);
      return;
    case 0x23f3:
      FUN_140120cb0(param_1,param_2);
      return;
    case 0x23f6:
      FUN_14011d940(param_1,param_2);
      return;
    case 0x2401:
      FUN_14011e1b0(param_1,param_2);
      return;
    case 0x2406:
      FUN_14005b7a0(param_1,param_2);
      return;
    case 0x240c:
      FUN_14011dfa0(param_1,param_2);
      return;
    case 0x2410:
      FUN_14011e380(param_1,param_2);
      return;
    case 0x2411:
      *(int *)(param_1 + 0x688) = *(int *)(param_1 + 0x688) + 1;
                    // WARNING: Could not recover jumptable at 0x00014011c29d. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x3a0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 param_2 + 0xe);
      return;
    }
  }
  else {
    switch(uVar2) {
    case 0x243f:
      FUN_14011ede0(param_1,param_2);
      return;
    case 0x2440:
      *(int *)(param_1 + 0x69c) = *(int *)(param_1 + 0x69c) + 1;
      local_res10[0] = *(int *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x3f0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10);
      return;
    case 0x2442:
      *(int *)(param_1 + 0x6a4) = *(int *)(param_1 + 0x6a4) + 1;
      local_res10[0] = (int)*(short *)(param_2 + 0x36);
      local_res18[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x410))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res18,param_2 + 0xe,param_2 + 0x1e,param_2 + 0x2e,param_2 + 0x32,local_res10)
      ;
      return;
    case 0x2449:
      FUN_14011efb0(param_1,param_2);
      return;
    case 0x244b:
      *(int *)(param_1 + 0x60c) = *(int *)(param_1 + 0x60c) + 1;
      local_res10[0] = *(int *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x1b0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10);
      return;
    case 0x2450:
      *(int *)(param_1 + 0x6b0) = *(int *)(param_1 + 0x6b0) + 1;
      local_res10[0] = *(int *)(param_2 + 0xe);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x440))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10);
      return;
    case 0x2451:
      FUN_1401201f0(param_1,param_2);
      return;
    case 0x2452:
      *(int *)(param_1 + 0x6b8) = *(int *)(param_1 + 0x6b8) + 1;
      local_res10[0] = *(int *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x460))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe,param_2 + 0x1e,param_2 + 0x2e,param_2 + 0x30,
                 param_2 + 0x32);
      return;
    case 0x2458:
      FUN_140120ef0(param_1,param_2);
      return;
    case 0x245c:
      FUN_1401210d0(param_1,param_2);
      break;
    case 0x2466:
      FUN_140121b10(param_1,param_2);
      return;
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14011c730(undefined8 param_1)

{
  undefined1 auStack_538 [32];
  ulonglong local_518;
  undefined2 local_510;
  undefined2 uStack_50e;
  undefined4 uStack_50c;
  undefined2 uStack_508;
  undefined2 uStack_506;
  undefined4 uStack_504;
  undefined2 uStack_500;
  undefined2 uStack_4fe;
  undefined2 local_4fc;
  undefined1 uStack_4fa;
  undefined1 uStack_4f9;
  undefined2 uStack_4f8;
  undefined2 uStack_4f6;
  undefined4 uStack_4f4;
  undefined2 uStack_4f0;
  undefined2 uStack_4ee;
  undefined4 local_4ec;
  undefined2 uStack_4e8;
  undefined2 uStack_4e6;
  undefined4 local_4e4;
  undefined1 uStack_4e0;
  undefined1 uStack_4df;
  undefined2 uStack_4de;
  undefined4 uStack_4dc;
  undefined1 uStack_4d8;
  undefined1 uStack_4d7;
  undefined2 uStack_4d6;
  undefined1 uStack_4d4;
  undefined1 uStack_4d3;
  undefined1 uStack_4d2;
  undefined1 uStack_4d1;
  undefined1 local_4d0;
  undefined1 uStack_4cf;
  undefined2 uStack_4ce;
  undefined1 uStack_4cc;
  undefined1 uStack_4cb;
  undefined1 uStack_4ca;
  undefined1 uStack_4c9;
  undefined1 uStack_4c8;
  undefined1 uStack_4c7;
  undefined2 uStack_4c6;
  undefined1 uStack_4c4;
  undefined1 uStack_4c3;
  undefined2 uStack_4c2;
  undefined1 local_4c0;
  undefined1 uStack_4bf;
  undefined2 uStack_4be;
  undefined1 uStack_4bc;
  undefined1 uStack_4bb;
  undefined2 uStack_4ba;
  undefined1 uStack_4b8;
  undefined1 uStack_4b7;
  undefined2 uStack_4b6;
  undefined1 uStack_4b4;
  undefined1 uStack_4b3;
  undefined2 uStack_4b2;
  undefined1 local_4b0;
  undefined4 uStack_4af;
  undefined1 uStack_4ab;
  undefined2 uStack_4aa;
  undefined1 uStack_4a8;
  undefined1 uStack_4a7;
  undefined2 uStack_4a6;
  undefined1 uStack_4a4;
  undefined1 uStack_4a3;
  undefined2 uStack_4a2;
  undefined1 uStack_4a0;
  undefined1 uStack_49f;
  undefined2 local_49e;
  undefined1 uStack_49c;
  undefined1 uStack_49b;
  undefined1 uStack_49a;
  undefined1 uStack_499;
  undefined1 uStack_498;
  undefined1 uStack_497;
  undefined2 local_496;
  undefined1 uStack_494;
  undefined2 uStack_493;
  undefined1 uStack_491;
  undefined1 uStack_490;
  undefined1 uStack_48f;
  undefined2 uStack_48e;
  undefined4 uStack_48c;
  undefined1 uStack_488;
  undefined1 uStack_487;
  undefined2 uStack_486;
  undefined4 uStack_484;
  undefined1 local_480;
  undefined1 uStack_47f;
  undefined5 uStack_47e;
  undefined1 uStack_479;
  undefined1 uStack_478;
  undefined1 uStack_477;
  undefined1 uStack_476;
  undefined1 uStack_475;
  undefined2 uStack_474;
  undefined1 uStack_472;
  undefined1 uStack_471;
  undefined2 local_470;
  undefined5 uStack_46e;
  int iStack_469;
  undefined5 uStack_465;
  undefined8 local_460;
  undefined8 local_458;
  undefined4 local_448;
  undefined1 uStack_444;
  undefined1 uStack_443;
  undefined1 uStack_442;
  undefined1 uStack_441;
  undefined5 uStack_440;
  undefined1 uStack_43b;
  undefined1 uStack_43a;
  undefined4 uStack_439;
  undefined2 uStack_435;
  undefined1 uStack_433;
  undefined2 uStack_432;
  undefined1 uStack_430;
  undefined2 uStack_42f;
  undefined3 local_42d;
  undefined5 uStack_42a;
  undefined3 uStack_425;
  undefined8 local_422;
  undefined2 local_418;
  undefined2 uStack_416;
  undefined2 uStack_414;
  undefined2 uStack_412;
  undefined2 uStack_410;
  undefined1 uStack_40e;
  undefined1 uStack_40d;
  undefined2 uStack_40c;
  undefined2 uStack_40a;
  undefined4 local_408;
  undefined2 local_404;
  undefined2 uStack_402;
  undefined4 uStack_400;
  undefined2 uStack_3fc;
  undefined2 uStack_3fa;
  undefined4 uStack_3f8;
  undefined2 uStack_3f4;
  undefined2 uStack_3f2;
  undefined4 local_3f0;
  undefined2 uStack_3ec;
  undefined2 uStack_3ea;
  undefined4 local_3e8;
  undefined4 uStack_3e4;
  undefined4 local_3e0;
  undefined4 uStack_3dc;
  undefined1 local_3d8;
  undefined4 uStack_3d7;
  undefined3 uStack_3d3;
  undefined5 local_3d0;
  undefined3 uStack_3cb;
  undefined5 local_3c8;
  undefined3 uStack_3c3;
  undefined5 local_3c0;
  undefined3 uStack_3bb;
  undefined2 local_3b8;
  undefined3 uStack_3b6;
  undefined3 uStack_3b3;
  undefined2 uStack_3b0;
  undefined3 uStack_3ae;
  undefined3 uStack_3ab;
  undefined2 uStack_3a8;
  undefined2 local_3a6;
  undefined1 uStack_3a4;
  undefined2 uStack_3a3;
  undefined1 uStack_3a1;
  undefined2 uStack_3a0;
  undefined2 uStack_39e;
  undefined4 uStack_39c;
  undefined2 uStack_398;
  undefined2 local_396;
  undefined4 uStack_394;
  undefined2 uStack_390;
  undefined2 uStack_38e;
  undefined2 uStack_38c;
  undefined1 uStack_38a;
  undefined1 uStack_389;
  undefined2 uStack_388;
  undefined2 uStack_386;
  undefined2 uStack_384;
  undefined1 local_382;
  undefined1 uStack_381;
  undefined2 uStack_380;
  undefined2 uStack_37e;
  undefined2 uStack_37c;
  undefined1 local_37a;
  undefined1 uStack_379;
  undefined2 uStack_378;
  undefined2 uStack_376;
  undefined2 uStack_374;
  undefined1 local_372;
  undefined1 uStack_371;
  undefined1 uStack_370;
  undefined1 uStack_36f;
  undefined2 uStack_36e;
  undefined2 uStack_36c;
  undefined1 uStack_36a;
  undefined1 uStack_369;
  undefined1 uStack_368;
  undefined1 uStack_367;
  undefined2 uStack_366;
  undefined2 uStack_364;
  undefined1 local_362;
  undefined1 uStack_361;
  undefined1 uStack_360;
  undefined1 uStack_35f;
  undefined2 uStack_35e;
  undefined2 uStack_35c;
  undefined4 local_35a;
  undefined2 uStack_356;
  undefined1 uStack_354;
  undefined4 uStack_353;
  undefined1 uStack_34f;
  undefined1 uStack_34e;
  undefined1 uStack_34d;
  undefined5 uStack_34c;
  undefined1 uStack_347;
  undefined1 local_346;
  undefined1 uStack_345;
  undefined1 uStack_344;
  undefined2 uStack_343;
  undefined2 uStack_341;
  undefined1 uStack_33f;
  undefined7 local_33e;
  undefined1 uStack_337;
  undefined1 local_336;
  undefined6 uStack_335;
  undefined1 uStack_32f;
  undefined1 uStack_32e;
  undefined6 local_32d;
  undefined2 uStack_327;
  undefined6 local_325;
  undefined2 uStack_31f;
  undefined8 local_20f;
  undefined8 local_207;
  undefined8 local_1ff;
  undefined8 local_1f7;
  undefined1 local_1ef;
  undefined4 local_28;
  undefined1 local_24;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_538;
  local_28 = 0x74736554;
  local_24 = 0;
  uStack_50c = 0;
  uStack_500 = 0;
  uStack_4fe = 0;
  uStack_504 = 0;
  uStack_4f0 = 0;
  uStack_4ee = 0;
  local_4fc = 0;
  uStack_4fa = 0;
  uStack_4f9 = 0;
  uStack_508 = 0;
  uStack_506 = 0;
  uStack_4f8 = 0;
  uStack_4f6 = 0;
  uStack_4f4 = 0;
  local_518 = local_518 & 0xffffffff00000000;
  local_510 = 0;
  uStack_50e = 0;
  iStack_469._1_3_ = 0;
  uStack_465 = 0;
  local_460 = 0;
  local_458 = 0;
  memset(&local_4ec,0,100);
  uStack_488 = 0;
  uStack_487 = 0;
  uStack_486 = 0;
  uStack_484 = 0;
  local_480 = 0;
  uStack_47f = 0;
  uStack_47e = 0;
  uStack_479 = 0;
  uStack_478 = 0;
  uStack_477 = 0;
  uStack_476 = 0;
  uStack_475 = 0;
  uStack_474 = 0;
  uStack_472 = 0;
  uStack_471 = 0;
  local_470 = 0;
  uStack_46e = 0;
  iStack_469 = (uint)iStack_469._1_3_ << 8;
  FUN_1400596a0(param_1,0,&local_518);
  FUN_14004db70(&local_418);
  FUN_140059280(param_1,0,&local_418);
  uStack_50c = 0;
  local_510 = 0;
  uStack_50e = 0;
  uStack_504 = 0;
  uStack_508 = 0;
  uStack_506 = 0;
  local_4fc = 0;
  uStack_4fa = 0;
  uStack_4f9 = 0;
  uStack_500 = 0;
  uStack_4fe = 0;
  uStack_4f8 = 0;
  uStack_4f6 = 0;
  local_518 = 0;
  uStack_4f4 = 0;
  uStack_4f0 = 0;
  uStack_4ee = 0;
  local_4ec = 0;
  uStack_4e8 = 0;
  uStack_4e6 = 0;
  local_4e4 = 0;
  uStack_4e0 = 0;
  uStack_4df = 0;
  uStack_4de = 0;
  uStack_4dc = 0;
  uStack_4d8 = 0;
  uStack_4d7 = 0;
  uStack_4d6 = 0;
  uStack_4d4 = 0;
  uStack_4d3 = 0;
  uStack_4d2 = 0;
  uStack_4d1 = 0;
  local_4d0 = 0;
  uStack_4cf = 0;
  uStack_4ce = 0;
  uStack_4cc = 0;
  uStack_4cb = 0;
  uStack_4ca = 0;
  uStack_4c9 = 0;
  uStack_4c8 = 0;
  uStack_4c7 = 0;
  uStack_4c6 = 0;
  uStack_4c4 = 0;
  uStack_4c3 = 0;
  uStack_4c2 = 0;
  local_4c0 = 0;
  uStack_4bf = 0;
  uStack_4be = 0;
  uStack_4bc = 0;
  uStack_4bb = 0;
  uStack_4ba = 0;
  uStack_4b8 = 0;
  uStack_4b7 = 0;
  uStack_4b6 = 0;
  uStack_4b4 = 0;
  uStack_4b3 = 0;
  uStack_4b2 = 0;
  local_4b0 = 0;
  uStack_4af = 0;
  uStack_4ab = 0;
  uStack_4aa = 0;
  uStack_4a8 = 0;
  uStack_4a7 = 0;
  uStack_4a6 = 0;
  uStack_4a4 = 0;
  uStack_4a3 = 0;
  uStack_4a2 = 0;
  uStack_4a0 = 0;
  uStack_49f = 0;
  local_49e = 0;
  uStack_49c = 0;
  uStack_49b = 0;
  uStack_49a = 0;
  uStack_499 = 0;
  uStack_498 = 0;
  uStack_497 = 0;
  local_496 = 0;
  uStack_494 = 0;
  uStack_493 = 0;
  uStack_491 = 0;
  uStack_490 = 0;
  uStack_48f = 0;
  uStack_48e = 0;
  uStack_48c = 0;
  uStack_488 = 0;
  uStack_487 = 0;
  uStack_486 = 0;
  uStack_484 = 0;
  local_480 = 0;
  uStack_47f = 0;
  uStack_47e = 0;
  uStack_479 = 0;
  uStack_478 = 0;
  uStack_477 = 0;
  uStack_476 = 0;
  uStack_475 = 0;
  uStack_474 = 0;
  uStack_472 = 0;
  uStack_471 = 0;
  local_470 = 0;
  FUN_140058b40(param_1,0,&local_518);
  uStack_410 = 0;
  uStack_40e = 0;
  uStack_40d = 0;
  local_408 = 0;
  local_404 = 0;
  uStack_402 = 0;
  uStack_400 = 0;
  uStack_3f4 = 0;
  uStack_3f2 = 0;
  uStack_40c = 0;
  uStack_40a = 0;
  uStack_3fc = 0;
  uStack_3fa = 0;
  uStack_3f8 = 0;
  local_418 = 0;
  uStack_416 = 0;
  uStack_414 = 0;
  uStack_412 = 0;
  uStack_38c = 0;
  uStack_36a = 0;
  uStack_369 = 0;
  uStack_368 = 0;
  uStack_367 = 0;
  uStack_366 = 0;
  uStack_364 = 0;
  local_362 = 0;
  uStack_361 = 0;
  uStack_360 = 0;
  uStack_35f = 0;
  uStack_35e = 0;
  uStack_35c = 0;
  local_35a = 0;
  local_336 = 0;
  uStack_335 = 0;
  uStack_32f = 0;
  memset(&local_3f0,0,100);
  uStack_38a = 0;
  uStack_389 = 0;
  uStack_388 = 0;
  uStack_386 = 0;
  uStack_384 = 0;
  local_382 = 0;
  uStack_381 = 0;
  uStack_380 = 0;
  uStack_37e = 0;
  uStack_37c = 0;
  local_37a = 0;
  uStack_379 = 0;
  uStack_378 = 0;
  uStack_376 = 0;
  uStack_374 = 0;
  local_372 = 0;
  uStack_371 = 0;
  uStack_370 = 0;
  uStack_36f = 0;
  uStack_36e = 0;
  uStack_36c = 0;
  uStack_356 = 0;
  uStack_354 = 0;
  uStack_353 = 0;
  uStack_34f = 0;
  uStack_34e = 0;
  uStack_34d = 0;
  uStack_34c = 0;
  uStack_347 = 0;
  local_346 = 0;
  uStack_345 = 0;
  uStack_344 = 0;
  uStack_343 = 0;
  uStack_341 = 0;
  uStack_33f = 0;
  local_33e = 0;
  uStack_337 = 0;
  FUN_1400584b0(param_1,0,&local_418);
  uStack_3f8 = 0;
  uStack_3f4 = 0;
  uStack_3f2 = 0;
  local_3f0 = 0;
  uStack_3ec = 0;
  uStack_3ea = 0;
  uStack_410 = 0;
  uStack_40e = 0;
  uStack_40d = 0;
  uStack_40c = 0;
  uStack_40a = 0;
  local_418 = 0;
  uStack_416 = 0;
  uStack_414 = 0;
  uStack_412 = 0;
  local_408 = 0;
  uStack_400 = 0;
  uStack_3fc = 0;
  uStack_3fa = 0;
  local_404 = 0;
  uStack_402 = 0;
  local_3e8 = 0;
  uStack_3e4 = 0;
  local_3e0 = 0;
  uStack_3dc = 0;
  local_3d8 = 0;
  uStack_3d7 = 0;
  uStack_3d3 = 0;
  local_3d0 = 0;
  uStack_3cb = 0;
  local_3c8 = 0;
  uStack_3c3 = 0;
  local_3c0 = 0;
  uStack_3bb = 0;
  local_3b8 = 0;
  uStack_3b6 = 0;
  uStack_3b3 = 0;
  uStack_3b0 = 0;
  uStack_3ae = 0;
  uStack_3ab = 0;
  uStack_3a8 = 0;
  local_3a6 = 0;
  uStack_3a4 = 0;
  uStack_3a3 = 0;
  uStack_3a1 = 0;
  uStack_3a0 = 0;
  uStack_39e = 0;
  uStack_39c = 0;
  uStack_398 = 0;
  local_396 = 0;
  uStack_394 = 0;
  uStack_390 = 0;
  uStack_38e = 0;
  uStack_38c = 0;
  uStack_38a = 0;
  uStack_389 = 0;
  uStack_388 = 0;
  uStack_386 = 0;
  uStack_384 = 0;
  local_382 = 0;
  uStack_381 = 0;
  uStack_380 = 0;
  uStack_37e = 0;
  uStack_37c = 0;
  local_37a = 0;
  uStack_379 = 0;
  uStack_378 = 0;
  memset(&uStack_376,0,700);
  FUN_140059170(param_1,0,&local_418);
  local_448 = 0;
  uStack_444 = 0;
  uStack_443 = 0;
  uStack_442 = 0;
  uStack_441 = 0;
  uStack_440 = 0;
  uStack_43b = 0;
  uStack_43a = 0;
  uStack_435 = 0;
  uStack_433 = 0;
  uStack_432 = 0;
  uStack_430 = 0;
  uStack_42f = 0;
  local_42d = 0;
  uStack_42a = 0;
  uStack_439 = 0;
  FUN_140057820(param_1,0,&local_448);
  local_510 = 0;
  uStack_50e = 0;
  local_518 = 0;
  uStack_50c = 0;
  uStack_4a2 = 0;
  uStack_4a0 = 0;
  uStack_49f = 0;
  local_49e = 0;
  uStack_49c = 0;
  uStack_49b = 0;
  uStack_508 = 0;
  uStack_506 = 0;
  uStack_49a = 0;
  uStack_4d2 = 0;
  uStack_4d1 = 0;
  local_4d0 = 0;
  uStack_4cf = 0;
  uStack_4ce = 0;
  uStack_4cc = 0;
  uStack_4cb = 0;
  uStack_491 = 0;
  uStack_490 = 0;
  uStack_48f = 0;
  uStack_48e = 0;
  uStack_48c = 0;
  uStack_488 = 0;
  uStack_487 = 0;
  uStack_486 = 0;
  uStack_484 = 0;
  local_480 = 0;
  uStack_47f = 0;
  uStack_47e = 0;
  uStack_479 = 0;
  uStack_478 = 0;
  uStack_477 = 0;
  uStack_476 = 0;
  uStack_4ca = 0;
  uStack_4c9 = 0;
  uStack_4c8 = 0;
  uStack_4c7 = 0;
  uStack_4c6 = 0;
  uStack_4c4 = 0;
  uStack_4c3 = 0;
  uStack_475 = 0;
  uStack_474 = 0;
  uStack_472 = 0;
  uStack_471 = 0;
  local_470 = 0;
  uStack_46e = 0;
  iStack_469 = 0;
  memset(&uStack_504,0,0x32);
  uStack_4c2 = 0;
  local_4c0 = 0;
  uStack_4bf = 0;
  uStack_4be = 0;
  uStack_4bc = 0;
  uStack_4bb = 0;
  uStack_4ba = 0;
  uStack_4b8 = 0;
  uStack_4b7 = 0;
  uStack_4b6 = 0;
  uStack_4b4 = 0;
  uStack_4b3 = 0;
  uStack_4b2 = 0;
  local_4b0 = 0;
  uStack_4af = 0;
  uStack_4ab = 0;
  uStack_4aa = 0;
  uStack_4a8 = 0;
  uStack_4a7 = 0;
  uStack_4a6 = 0;
  uStack_4a4 = 0;
  uStack_4a3 = 0;
  uStack_499 = 0;
  uStack_498 = 0;
  uStack_497 = 0;
  local_496 = 0;
  uStack_494 = 0;
  uStack_493 = 0;
  FUN_140057710(param_1,0,&local_518);
  FUN_140133330(&local_418);
  FUN_140057a50(param_1,0,0,&local_418);
  local_418 = 0;
  uStack_416 = 0;
  uStack_414 = 0;
  uStack_412 = 0;
  uStack_410 = 0;
  uStack_40e = 0;
  uStack_40d = 0;
  local_3b8 = 0;
  uStack_3b6 = 0;
  uStack_3b3 = 0;
  uStack_40c = 0;
  uStack_40a = 0;
  uStack_3b0 = 0;
  uStack_3ae = 0;
  uStack_3ab = 0;
  local_408 = 0;
  uStack_3a8 = 0;
  local_404 = 0;
  uStack_402 = 0;
  uStack_400 = 0;
  uStack_3fc = 0;
  uStack_3fa = 0;
  uStack_3f8 = 0;
  uStack_3f4 = 0;
  uStack_3f2 = 0;
  local_3f0 = 0;
  uStack_3ec = 0;
  uStack_3ea = 0;
  local_3e8 = 0;
  uStack_3e4 = 0;
  local_3e0 = 0;
  uStack_3dc = 0;
  local_3d8 = 0;
  uStack_3d7 = 0;
  uStack_3d3 = 0;
  local_3d0 = 0;
  uStack_3cb = 0;
  local_3c8 = 0;
  uStack_3c3 = 0;
  local_3c0 = 0;
  uStack_3bb = 0;
  local_3a6 = 0;
  uStack_3a4 = 0;
  uStack_3a3 = 0;
  uStack_3a1 = 0;
  uStack_3a0 = 0;
  uStack_39e = 0;
  uStack_39c = 0;
  uStack_398 = 0;
  local_396 = 0;
  uStack_394 = 0;
  uStack_390 = 0;
  uStack_38e = 0;
  uStack_38c = 0;
  uStack_38a = 0;
  uStack_389 = 0;
  uStack_388 = 0;
  uStack_386 = 0;
  uStack_384 = 0;
  local_382 = 0;
  uStack_381 = 0;
  uStack_380 = 0;
  uStack_37e = 0;
  uStack_37c = 0;
  local_37a = 0;
  uStack_379 = 0;
  uStack_378 = 0;
  uStack_376 = 0;
  uStack_374 = 0;
  local_372 = 0;
  uStack_371 = 0;
  uStack_370 = 0;
  uStack_36f = 0;
  uStack_36e = 0;
  uStack_36c = 0;
  uStack_36a = 0;
  uStack_369 = 0;
  uStack_368 = 0;
  uStack_367 = 0;
  uStack_366 = 0;
  uStack_364 = 0;
  local_362 = 0;
  uStack_361 = 0;
  uStack_360 = 0;
  uStack_35f = 0;
  uStack_35e = 0;
  uStack_35c = 0;
  local_35a = 0;
  uStack_356 = 0;
  uStack_354 = 0;
  uStack_353 = 0;
  uStack_34f = 0;
  uStack_34e = 0;
  uStack_34d = 0;
  uStack_34c = 0;
  uStack_347 = 0;
  FUN_14012ad70(param_1,0,&local_418);
  uStack_33f = 0;
  local_33e = 0;
  uStack_337 = 0;
  local_336 = 0;
  uStack_335 = 0;
  local_418 = 0;
  uStack_416 = 0;
  uStack_414 = 0;
  uStack_412 = 0;
  uStack_410 = 0;
  uStack_40e = 0;
  uStack_40d = 0;
  uStack_40c = 0;
  uStack_40a = 0;
  uStack_344 = 0;
  memset(&local_408,0,100);
  uStack_3a4 = 0;
  uStack_3a3 = 0;
  uStack_3a1 = 0;
  uStack_3a0 = 0;
  uStack_39e = 0;
  uStack_39c = 0;
  uStack_398 = 0;
  local_396 = 0;
  uStack_394 = 0;
  uStack_390 = 0;
  uStack_38e = 0;
  uStack_38c = 0;
  uStack_38a = 0;
  uStack_389 = 0;
  uStack_388 = 0;
  uStack_386 = 0;
  uStack_384 = 0;
  local_382 = 0;
  uStack_381 = 0;
  uStack_380 = 0;
  uStack_37e = 0;
  uStack_37c = 0;
  local_37a = 0;
  uStack_379 = 0;
  uStack_378 = 0;
  uStack_376 = 0;
  uStack_374 = 0;
  local_372 = 0;
  uStack_371 = 0;
  uStack_370 = 0;
  uStack_36f = 0;
  uStack_36e = 0;
  uStack_36c = 0;
  uStack_36a = 0;
  uStack_369 = 0;
  uStack_368 = 0;
  uStack_367 = 0;
  uStack_366 = 0;
  uStack_364 = 0;
  local_362 = 0;
  uStack_361 = 0;
  uStack_360 = 0;
  uStack_35f = 0;
  uStack_35e = 0;
  uStack_35c = 0;
  local_35a = 0;
  uStack_356 = 0;
  uStack_354 = 0;
  uStack_353 = 0;
  uStack_34f = 0;
  uStack_34e = 0;
  uStack_34d = 0;
  uStack_34c = 0;
  uStack_347 = 0;
  local_346 = 0;
  uStack_345 = 0;
  uStack_343 = 0;
  uStack_341 = 0;
  FUN_1400585c0(param_1);
  local_418 = 0;
  uStack_416 = 0;
  uStack_414 = 0;
  uStack_412 = 0;
  uStack_410 = 0;
  uStack_40e = 0;
  uStack_40d = 0;
  uStack_40c = 0;
  uStack_40a = 0;
  local_408 = 0;
  local_404 = 0;
  uStack_402 = 0;
  uStack_400 = 0;
  uStack_3fc = 0;
  uStack_3fa = 0;
  uStack_3f8 = 0;
  uStack_3f4 = 0;
  uStack_3f2 = 0;
  local_3f0 = 0;
  uStack_3ec = 0;
  memset(&uStack_3ea,0,0x1fe);
  FUN_140058730(param_1,&local_418);
  uStack_410 = 0;
  uStack_40e = 0;
  uStack_40d = 0;
  local_408 = 0;
  local_418 = 0;
  uStack_416 = 0;
  uStack_414 = 0;
  uStack_412 = 0;
  uStack_39c = 0;
  uStack_40c = 0;
  uStack_40a = 0;
  uStack_394 = 0;
  local_404 = 0;
  uStack_402 = 0;
  uStack_36c = 0;
  uStack_36a = 0;
  uStack_369 = 0;
  uStack_398 = 0;
  local_396 = 0;
  uStack_390 = 0;
  uStack_38e = 0;
  uStack_368 = 0;
  uStack_367 = 0;
  uStack_366 = 0;
  uStack_360 = 0;
  uStack_35f = 0;
  uStack_35e = 0;
  uStack_364 = 0;
  local_362 = 0;
  uStack_361 = 0;
  uStack_35c = 0;
  local_35a = 0;
  uStack_356 = 0;
  uStack_354 = 0;
  uStack_353 = 0;
  uStack_34f = 0;
  uStack_34e = 0;
  uStack_335 = 0;
  uStack_32f = 0;
  uStack_32e = 0;
  local_32d = 0;
  uStack_327 = 0;
  local_325 = 0;
  uStack_31f = 0;
  uStack_34d = 0;
  uStack_34c = 0;
  uStack_347 = 0;
  local_346 = 0;
  uStack_345 = 0;
  uStack_344 = 0;
  uStack_343 = 0;
  memset(&uStack_400,0,100);
  uStack_38c = 0;
  uStack_38a = 0;
  uStack_389 = 0;
  uStack_388 = 0;
  uStack_386 = 0;
  uStack_384 = 0;
  local_382 = 0;
  uStack_381 = 0;
  uStack_380 = 0;
  uStack_37e = 0;
  uStack_37c = 0;
  local_37a = 0;
  uStack_379 = 0;
  uStack_378 = 0;
  uStack_376 = 0;
  uStack_374 = 0;
  local_372 = 0;
  uStack_371 = 0;
  uStack_370 = 0;
  uStack_36f = 0;
  uStack_36e = 0;
  FUN_140057b60(param_1,0,0,&local_418);
  FUN_1401330e0(&local_518);
  FUN_140057c70(param_1,0,0,&local_518);
  FUN_14004daa0(&local_418);
  FUN_140059390(param_1,0,&local_418);
  FUN_14004d9e0(&local_418);
  FUN_1400594a0(param_1,0,&local_418);
  FUN_14004e120(&local_418);
  FUN_1400583a0(param_1,0,&local_418);
  local_510 = 0;
  uStack_50e = 0;
  uStack_50c = 0;
  local_518 = 0;
  uStack_508 = 0;
  uStack_506 = 0;
  uStack_504 = 0;
  uStack_500 = 0;
  uStack_4fe = 0;
  local_4fc = 0;
  uStack_4fa = 0;
  uStack_4f9 = 0;
  uStack_4f8 = 0;
  uStack_4f6 = 0;
  uStack_4f4 = 0;
  uStack_4f0 = 0;
  uStack_4ee = 0;
  local_4ec = 0;
  uStack_4e8 = 0;
  uStack_4e6 = 0;
  local_4e4 = 0;
  uStack_4e0 = 0;
  uStack_4df = 0;
  uStack_4de = 0;
  uStack_4dc = 0;
  uStack_4d8 = 0;
  uStack_4d7 = 0;
  uStack_4d6 = 0;
  uStack_4d4 = 0;
  uStack_4d3 = 0;
  uStack_4d2 = 0;
  uStack_4d1 = 0;
  local_4d0 = 0;
  uStack_4cf = 0;
  uStack_4ce = 0;
  uStack_4cc = 0;
  uStack_4cb = 0;
  uStack_4ca = 0;
  uStack_4c9 = 0;
  uStack_4c8 = 0;
  uStack_4c7 = 0;
  uStack_4c6 = 0;
  uStack_4c4 = 0;
  uStack_4c3 = 0;
  uStack_4c2 = 0;
  local_4c0 = 0;
  uStack_4bf = 0;
  uStack_4be = 0;
  uStack_4bc = 0;
  uStack_4bb = 0;
  uStack_4ba = 0;
  uStack_4b8 = 0;
  uStack_4b7 = 0;
  uStack_4b6 = 0;
  uStack_4b4 = 0;
  uStack_4b3 = 0;
  uStack_4b2 = 0;
  local_4b0 = 0;
  uStack_4af = 0;
  uStack_4ab = 0;
  uStack_4aa = 0;
  uStack_4a8 = 0;
  FUN_140058f30(param_1,0,&local_518);
  local_510 = 0;
  uStack_50e = 0;
  local_518 = 0;
  uStack_50c = 0;
  uStack_508 = 0;
  uStack_506 = 0;
  uStack_504 = 0;
  uStack_500 = 0;
  uStack_4fe = 0;
  local_4fc = 0;
  uStack_4fa = 0;
  uStack_4f9 = 0;
  uStack_4e8 = 0;
  uStack_4e6 = 0;
  local_4e4 = 0;
  uStack_4e0 = 0;
  uStack_4f8 = 0;
  uStack_4f6 = 0;
  uStack_4f4 = 0;
  uStack_4f0 = 0;
  uStack_4ee = 0;
  local_4ec = 0;
  uStack_4df = 0;
  uStack_4de = 0;
  uStack_4dc = 0;
  uStack_4d8 = 0;
  uStack_4d7 = 0;
  uStack_4d6 = 0;
  uStack_4d4 = 0;
  uStack_4d3 = 0;
  uStack_4d2 = 0;
  uStack_4d1 = 0;
  local_4d0 = 0;
  uStack_4cf = 0;
  uStack_4ce = 0;
  uStack_4cc = 0;
  uStack_4cb = 0;
  uStack_4ca = 0;
  uStack_4c9 = 0;
  uStack_4c8 = 0;
  uStack_4c7 = 0;
  uStack_4c6 = 0;
  uStack_4c4 = 0;
  uStack_4c3 = 0;
  uStack_4c2 = 0;
  local_4c0 = 0;
  uStack_4bf = 0;
  uStack_4be = 0;
  uStack_4bc = 0;
  uStack_4bb = 0;
  uStack_4ba = 0;
  uStack_4b8 = 0;
  uStack_4b7 = 0;
  uStack_4b6 = 0;
  uStack_4b4 = 0;
  uStack_4b3 = 0;
  uStack_4b2 = 0;
  local_4b0 = 0;
  uStack_4af = 0;
  uStack_4ab = 0;
  uStack_4aa = 0;
  uStack_4a8 = 0;
  uStack_4a7 = 0;
  uStack_4a6 = 0;
  uStack_4a4 = 0;
  uStack_4a3 = 0;
  uStack_4a2 = 0;
  uStack_4a0 = 0;
  uStack_49f = 0;
  local_49e = 0;
  uStack_49c = 0;
  uStack_49b = 0;
  uStack_49a = 0;
  uStack_499 = 0;
  uStack_498 = 0;
  uStack_497 = 0;
  local_496 = 0;
  uStack_494 = 0;
  uStack_493 = 0;
  uStack_491 = 0;
  uStack_490 = 0;
  uStack_48f = 0;
  uStack_48e = 0;
  uStack_48c = 0;
  uStack_488 = 0;
  uStack_487 = 0;
  uStack_486 = 0;
  uStack_484 = 0;
  local_480 = 0;
  uStack_47f = 0;
  uStack_47e = 0;
  uStack_479 = 0;
  uStack_478 = 0;
  uStack_477 = 0;
  uStack_476 = 0;
  uStack_475 = 0;
  uStack_474 = 0;
  uStack_472 = 0;
  FUN_140058c80(param_1,0,&local_518);
  uStack_3f8 = 0;
  uStack_3f4 = 0;
  uStack_3f2 = 0;
  local_3f0 = 0;
  uStack_3ec = 0;
  uStack_3ea = 0;
  local_3e8 = 0;
  uStack_3e4 = 0;
  uStack_410 = 0;
  uStack_40e = 0;
  uStack_40d = 0;
  local_3e0 = 0;
  uStack_3dc = 0;
  uStack_40c = 0;
  uStack_40a = 0;
  local_408 = 0;
  local_418 = 0;
  uStack_416 = 0;
  uStack_414 = 0;
  uStack_412 = 0;
  local_404 = 0;
  uStack_402 = 0;
  uStack_400 = 0;
  uStack_3fc = 0;
  uStack_3fa = 0;
  local_3d8 = 0;
  uStack_3d7 = 0;
  uStack_3d3 = 0;
  local_3d0 = 0;
  uStack_3cb = 0;
  local_3c8 = 0;
  uStack_3c3 = 0;
  local_3c0 = 0;
  uStack_3bb = 0;
  local_3b8 = 0;
  uStack_3b6 = 0;
  uStack_3b3 = 0;
  uStack_3b0 = 0;
  uStack_3ae = 0;
  uStack_3ab = 0;
  uStack_3a8 = 0;
  local_3a6 = 0;
  uStack_3a4 = 0;
  uStack_3a3 = 0;
  uStack_3a1 = 0;
  uStack_3a0 = 0;
  uStack_39e = 0;
  uStack_39c = 0;
  uStack_398 = 0;
  local_396 = 0;
  uStack_394 = 0;
  uStack_390 = 0;
  uStack_38e = 0;
  uStack_38c = 0;
  uStack_38a = 0;
  uStack_389 = 0;
  uStack_388 = 0;
  uStack_386 = 0;
  uStack_384 = 0;
  local_382 = 0;
  uStack_381 = 0;
  uStack_380 = 0;
  uStack_37e = 0;
  uStack_37c = 0;
  local_37a = 0;
  uStack_379 = 0;
  uStack_378 = 0;
  uStack_376 = 0;
  uStack_374 = 0;
  local_372 = 0;
  uStack_371 = 0;
  uStack_370 = 0;
  uStack_36f = 0;
  uStack_36e = 0;
  uStack_36c = 0;
  uStack_36a = 0;
  uStack_369 = 0;
  uStack_368 = 0;
  uStack_367 = 0;
  uStack_366 = 0;
  uStack_364 = 0;
  local_362 = 0;
  memset(&uStack_361,0,700);
  FUN_140059060(param_1,0,&local_418);
  local_418 = 0;
  uStack_416 = 0;
  uStack_414 = 0;
  uStack_412 = 0;
  uStack_410 = 0;
  uStack_40e = 0;
  local_1ef = 0;
  memset(&uStack_40d,0,0x1fe);
  local_20f = 0;
  local_207 = 0;
  local_1ff = 0;
  local_1f7 = 0;
  FUN_140058840(param_1,&local_418);
  local_448 = 0;
  uStack_444 = 0;
  uStack_443 = 0;
  uStack_442 = 0;
  uStack_441 = 0;
  uStack_440 = 0;
  uStack_43b = 0;
  uStack_43a = 0;
  uStack_439 = 0;
  uStack_435 = 0;
  uStack_433 = 0;
  uStack_432 = 0;
  uStack_430 = 0;
  FUN_140058960(param_1,&local_448);
  local_448 = 0;
  uStack_444 = 0;
  local_422 = 0;
  uStack_442 = 0;
  uStack_441 = 0;
  uStack_440 = 0;
  uStack_43b = 0;
  uStack_43a = 0;
  uStack_439 = 0;
  uStack_435 = 0;
  uStack_433 = 0;
  uStack_432 = 0;
  uStack_430 = 0;
  uStack_42f = 0;
  local_42d = 0;
  uStack_42a = 0;
  uStack_425 = 0;
  FUN_140058a30(param_1);
  FUN_14004d850(&local_418);
  FUN_1400597e0(param_1,0,&local_418);
  FUN_14004e5b0(&local_418);
  FUN_140058060(param_1,0,&local_418);
  uStack_4c8 = 0;
  uStack_4c7 = 0;
  uStack_4c6 = 0;
  uStack_4c4 = 0;
  uStack_4c3 = 0;
  uStack_4c2 = 0;
  local_4c0 = 0;
  uStack_4bf = 0;
  uStack_4be = 0;
  uStack_4bc = 0;
  uStack_4bb = 0;
  uStack_4ba = 0;
  uStack_50c = 0;
  local_510 = 0;
  uStack_50e = 0;
  uStack_504 = 0;
  uStack_508 = 0;
  uStack_506 = 0;
  local_4fc = 0;
  uStack_4fa = 0;
  uStack_4f9 = 0;
  uStack_500 = 0;
  uStack_4fe = 0;
  uStack_4f8 = 0;
  uStack_4f6 = 0;
  uStack_4f4 = 0;
  uStack_4f0 = 0;
  uStack_4ee = 0;
  local_4ec = 0;
  uStack_4e8 = 0;
  uStack_4e6 = 0;
  local_4e4 = 0;
  uStack_4e0 = 0;
  uStack_4df = 0;
  uStack_4de = 0;
  uStack_4dc = 0;
  uStack_4d8 = 0;
  uStack_4d7 = 0;
  uStack_4d6 = 0;
  uStack_4b8 = 0;
  uStack_4b7 = 0;
  uStack_4b6 = 0;
  uStack_4b4 = 0;
  uStack_4b3 = 0;
  uStack_4b2 = 0;
  local_4b0 = 0;
  uStack_4af = 0;
  uStack_4ab = 0;
  uStack_4aa = 0;
  uStack_4a8 = 0;
  uStack_4a7 = 0;
  uStack_4a6 = 0;
  uStack_4a4 = 0;
  uStack_4a3 = 0;
  uStack_4a2 = 0;
  uStack_4a0 = 0;
  uStack_49f = 0;
  local_49e = 0;
  uStack_49c = 0;
  uStack_49b = 0;
  uStack_49a = 0;
  uStack_499 = 0;
  local_518 = 0;
  uStack_4d4 = 0;
  uStack_4d3 = 0;
  uStack_4d2 = 0;
  uStack_4d1 = 0;
  local_4d0 = 0;
  uStack_4cf = 0;
  uStack_4ce = 0;
  uStack_4cc = 0;
  uStack_4cb = 0;
  uStack_4ca = 0;
  uStack_4c9 = 0;
  uStack_498 = 0;
  uStack_497 = 0;
  local_496 = 0;
  uStack_494 = 0;
  uStack_493 = 0;
  uStack_491 = 0;
  uStack_490 = 0;
  uStack_48f = 0;
  uStack_48e = 0;
  FUN_140058280(param_1,0,&local_518);
  local_448 = 0;
  uStack_444 = 0;
  uStack_443 = 0;
  uStack_442 = 0;
  uStack_441 = 0;
  uStack_440 = 0;
  uStack_43b = 0;
  uStack_43a = 0;
  uStack_439 = 0;
  uStack_435 = 0;
  uStack_433 = 0;
  uStack_432 = 0;
  FUN_1400595b0(param_1,0,&local_448);
  local_418 = 0;
  uStack_416 = 0;
  uStack_414 = 0;
  uStack_412 = 0;
  local_408 = 0;
  uStack_394 = 0;
  uStack_40c = 0;
  uStack_40a = 0;
  uStack_410 = 0;
  uStack_40e = 0;
  uStack_40d = 0;
  uStack_3a0 = 0;
  uStack_39e = 0;
  uStack_39c = 0;
  uStack_398 = 0;
  local_396 = 0;
  uStack_367 = 0;
  uStack_366 = 0;
  uStack_364 = 0;
  local_362 = 0;
  uStack_361 = 0;
  uStack_360 = 0;
  uStack_35f = 0;
  uStack_35e = 0;
  uStack_35c = 0;
  uStack_370 = 0;
  uStack_36f = 0;
  uStack_36e = 0;
  uStack_36c = 0;
  uStack_36a = 0;
  uStack_369 = 0;
  uStack_368 = 0;
  local_35a = 0;
  uStack_356 = 0;
  uStack_354 = 0;
  uStack_353 = 0;
  uStack_390 = 0;
  uStack_38e = 0;
  uStack_38c = 0;
  uStack_38a = 0;
  uStack_389 = 0;
  uStack_388 = 0;
  uStack_386 = 0;
  uStack_384 = 0;
  local_382 = 0;
  uStack_381 = 0;
  uStack_380 = 0;
  uStack_37e = 0;
  uStack_37c = 0;
  local_37a = 0;
  uStack_379 = 0;
  uStack_378 = 0;
  uStack_376 = 0;
  uStack_374 = 0;
  local_372 = 0;
  uStack_371 = 0;
  uStack_34f = 0;
  uStack_34e = 0;
  uStack_34d = 0;
  uStack_34c = 0;
  uStack_347 = 0;
  local_346 = 0;
  uStack_345 = 0;
  uStack_344 = 0;
  uStack_343 = 0;
  uStack_341 = 0;
  uStack_33f = 0;
  local_33e = 0;
  uStack_337 = 0;
  local_336 = 0;
  uStack_335 = 0;
  uStack_32f = 0;
  uStack_32e = 0;
  local_32d = 0;
  uStack_327 = 0;
  local_325 = 0;
  memset(&local_404,0,100);
  FUN_140058170(param_1,0,&local_418);
  uStack_50c = 0;
  local_510 = 0;
  uStack_50e = 0;
  uStack_504 = 0;
  uStack_508 = 0;
  uStack_506 = 0;
  local_4fc = 0;
  uStack_4fa = 0;
  uStack_4f9 = 0;
  uStack_500 = 0;
  uStack_4fe = 0;
  uStack_4d3 = 0;
  uStack_4d2 = 0;
  uStack_4d1 = 0;
  local_4d0 = 0;
  uStack_4cf = 0;
  uStack_4ce = 0;
  uStack_4cc = 0;
  uStack_4f8 = 0;
  uStack_4f6 = 0;
  uStack_4cb = 0;
  uStack_4ca = 0;
  uStack_4c9 = 0;
  uStack_4c8 = 0;
  uStack_4c7 = 0;
  uStack_4c6 = 0;
  uStack_4c4 = 0;
  local_518 = 0;
  uStack_4f4 = 0;
  uStack_4f0 = 0;
  uStack_4ee = 0;
  local_4ec = 0;
  uStack_4e8 = 0;
  uStack_4e6 = 0;
  local_4e4 = 0;
  uStack_4e0 = 0;
  uStack_4df = 0;
  uStack_4de = 0;
  uStack_4dc = 0;
  uStack_4d8 = 0;
  uStack_4d7 = 0;
  uStack_4d6 = 0;
  uStack_4b7 = 0;
  uStack_4b6 = 0;
  uStack_4b4 = 0;
  uStack_4b3 = 0;
  uStack_4b2 = 0;
  local_4b0 = 0;
  uStack_4af = 0;
  uStack_4ab = 0;
  uStack_4aa = 0;
  uStack_4a8 = 0;
  uStack_4a7 = 0;
  uStack_4a6 = 0;
  uStack_4a4 = 0;
  uStack_4a3 = 0;
  uStack_4a2 = 0;
  uStack_4a0 = 0;
  uStack_49f = 0;
  local_49e = 0;
  uStack_49c = 0;
  uStack_49b = 0;
  uStack_49a = 0;
  uStack_499 = 0;
  uStack_498 = 0;
  uStack_497 = 0;
  local_496 = 0;
  uStack_494 = 0;
  uStack_493 = 0;
  uStack_491 = 0;
  uStack_490 = 0;
  uStack_48f = 0;
  uStack_48e = 0;
  uStack_48c = 0;
  uStack_488 = 0;
  uStack_487 = 0;
  uStack_486 = 0;
  uStack_484 = 0;
  local_480 = 0;
  uStack_47f = 0;
  uStack_47e = 0;
  uStack_479 = 0;
  uStack_478 = 0;
  uStack_4d4 = 0;
  uStack_4c3 = 0;
  uStack_4c2 = 0;
  local_4c0 = 0;
  uStack_4bf = 0;
  uStack_4be = 0;
  uStack_4bc = 0;
  uStack_4bb = 0;
  uStack_4ba = 0;
  uStack_4b8 = 0;
  FUN_140057f30(param_1,0,&local_518);
  local_518 = 0;
  local_510 = 0;
  uStack_50e = 0;
  uStack_50c = 0;
  uStack_508 = 0;
  uStack_4fe = 0;
  local_4fc = 0;
  uStack_4fa = 0;
  uStack_4f9 = 0;
  uStack_4f8 = 0;
  uStack_506 = 0;
  uStack_504 = 0;
  uStack_500 = 0;
  uStack_4f6 = 0;
  uStack_4f4 = 0;
  uStack_4f0 = 0;
  uStack_4d6 = 0;
  uStack_4d4 = 0;
  uStack_4d3 = 0;
  uStack_4d2 = 0;
  uStack_4d1 = 0;
  local_4d0 = 0;
  uStack_4cf = 0;
  uStack_4ce = 0;
  uStack_4cc = 0;
  uStack_4cb = 0;
  uStack_4ca = 0;
  uStack_4c9 = 0;
  uStack_4c8 = 0;
  uStack_4c7 = 0;
  uStack_4c6 = 0;
  uStack_4c4 = 0;
  uStack_4c3 = 0;
  uStack_4c2 = 0;
  local_4c0 = 0;
  uStack_4bf = 0;
  uStack_4be = 0;
  uStack_4bc = 0;
  uStack_4bb = 0;
  uStack_4ba = 0;
  uStack_4b8 = 0;
  uStack_4b7 = 0;
  uStack_4b6 = 0;
  uStack_4b4 = 0;
  uStack_4b3 = 0;
  uStack_4b2 = 0;
  local_4b0 = 0;
  uStack_4af = 0;
  uStack_4ab = 0;
  uStack_4aa = 0;
  uStack_4a8 = 0;
  uStack_4a7 = 0;
  uStack_4a6 = 0;
  uStack_4a4 = 0;
  uStack_4a3 = 0;
  uStack_4a2 = 0;
  uStack_4a0 = 0;
  uStack_49f = 0;
  local_49e = 0;
  uStack_49c = 0;
  uStack_49b = 0;
  uStack_49a = 0;
  uStack_499 = 0;
  uStack_498 = 0;
  uStack_497 = 0;
  local_496 = 0;
  uStack_494 = 0;
  uStack_493 = 0;
  uStack_491 = 0;
  uStack_490 = 0;
  uStack_48f = 0;
  uStack_48e = 0;
  uStack_48c = 0;
  uStack_488 = 0;
  uStack_487 = 0;
  uStack_486 = 0;
  uStack_4ee = 0;
  local_4ec = 0;
  uStack_4e8 = 0;
  uStack_4e6 = 0;
  local_4e4 = 0;
  uStack_4e0 = 0;
  uStack_4df = 0;
  uStack_4de = 0;
  uStack_4dc = 0;
  uStack_4d8 = 0;
  uStack_4d7 = 0;
  FUN_14012afe0(param_1,0,&local_518);
  FUN_14004eaa0(&local_518);
  FUN_140057930(param_1,0,&local_518);
  uStack_410 = 0;
  uStack_40e = 0;
  uStack_40d = 0;
  local_408 = 0;
  local_404 = 0;
  uStack_402 = 0;
  uStack_400 = 0;
  uStack_3f4 = 0;
  uStack_3f2 = 0;
  uStack_3f8 = 0;
  uStack_40c = 0;
  uStack_40a = 0;
  uStack_3fc = 0;
  uStack_3fa = 0;
  local_3d8 = 0;
  uStack_3d7 = 0;
  uStack_3d3 = 0;
  local_3d0 = 0;
  uStack_3cb = 0;
  local_3c8 = 0;
  uStack_3c3 = 0;
  local_3c0 = 0;
  uStack_3bb = 0;
  local_3b8 = 0;
  uStack_3b6 = 0;
  uStack_3b3 = 0;
  uStack_3b0 = 0;
  uStack_3ae = 0;
  uStack_3ab = 0;
  uStack_3a8 = 0;
  local_3a6 = 0;
  uStack_3a4 = 0;
  uStack_3a3 = 0;
  uStack_3a1 = 0;
  uStack_3a0 = 0;
  uStack_39e = 0;
  uStack_39c = 0;
  uStack_414 = 0;
  uStack_412 = 0;
  local_3f0 = 0;
  uStack_3ec = 0;
  uStack_3ea = 0;
  local_3e8 = 0;
  uStack_3e4 = 0;
  local_3e0 = 0;
  uStack_3dc = 0;
  memset(&uStack_398,0,100);
  FUN_140058df0(param_1,0,&local_418);
  FUN_140057d80(param_1,0,0);
  FUN_140057e30(param_1,&local_28,0);
  uStack_50c = 0;
  local_518 = 0;
  local_510 = 0;
  uStack_50e = 0;
  uStack_508 = 0;
  uStack_506 = 0;
  uStack_504 = 0;
  local_4e4 = 0;
  uStack_4e0 = 0;
  uStack_4df = 0;
  uStack_4de = 0;
  uStack_4dc = 0;
  uStack_4d8 = 0;
  uStack_4d7 = 0;
  uStack_4d6 = 0;
  local_4fc = 0;
  uStack_4fa = 0;
  uStack_4f9 = 0;
  uStack_500 = 0;
  uStack_4fe = 0;
  uStack_4f0 = 0;
  uStack_4ee = 0;
  uStack_4f8 = 0;
  uStack_4f6 = 0;
  uStack_4f4 = 0;
  local_4ec = 0;
  uStack_4e8 = 0;
  uStack_4e6 = 0;
  memset(&uStack_4b4,0,100);
  uStack_4d4 = 0;
  uStack_4d3 = 0;
  uStack_4d2 = 0;
  uStack_4d1 = 0;
  local_4d0 = 0;
  uStack_4cf = 0;
  uStack_4ce = 0;
  uStack_4cc = 0;
  uStack_4cb = 0;
  uStack_4ca = 0;
  uStack_4c9 = 0;
  uStack_4c8 = 0;
  uStack_4c7 = 0;
  uStack_4c6 = 0;
  uStack_4c4 = 0;
  uStack_4c3 = 0;
  uStack_4c2 = 0;
  local_4c0 = 0;
  uStack_4bf = 0;
  uStack_4be = 0;
  uStack_4bc = 0;
  uStack_4bb = 0;
  uStack_4ba = 0;
  uStack_4b8 = 0;
  uStack_4b7 = 0;
  uStack_4b6 = 0;
  memcpy(&local_418,&local_518,200);
  FUN_1400575d0(param_1,0,&local_418);
  return;
}



void FUN_14011d570(longlong param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  int iVar6;
  undefined *puVar7;
  int local_res8 [2];
  undefined4 local_res10 [2];
  undefined *local_res18;
  undefined *local_res20;
  
  *(int *)(param_1 + 0x5f0) = *(int *)(param_1 + 0x5f0) + 1;
  FUN_1401568c0();
  local_res20 = PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(param_2 + 0x4a);
  iVar6 = 0;
  if ((local_res20 != (undefined *)0x0) && (local_res20 != PTR_DAT_1403200a0)) {
    iVar6 = *(int *)(local_res20 + -8);
  }
  iVar4 = iVar3;
  if (((iVar3 <= iVar6) && (iVar4 = 0, local_res20 != (undefined *)0x0)) &&
     (local_res20 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res20 + -8);
  }
  iVar6 = 1;
  if (1 < iVar4) {
    iVar6 = iVar4;
  }
  iVar4 = 0;
  if ((local_res20 != (undefined *)0x0) && (iVar4 = 0, local_res20 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res20 + -8);
  }
  if (iVar4 < iVar6) {
    FUN_14004f590(&local_res20,iVar6);
  }
  FUN_14004f670(&local_res20);
  puVar7 = local_res20;
  if (local_res20 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar7,param_2 + 0x4a,iVar3);
  puVar7 = local_res20;
  if (local_res20 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar7);
  iVar6 = 0;
  if (0 < iVar3) {
    iVar6 = iVar3;
  }
  iVar3 = 0;
  if ((local_res20 != (undefined *)0x0) && (local_res20 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_res20 + -8);
  }
  if ((iVar6 < iVar3) || (iVar6 = 0, local_res20 == (undefined *)0x0)) {
LAB_14011d67d:
    if (((local_res20 != PTR_DAT_1403200a0) && (local_res20 != (undefined *)0x0)) &&
       ((int *)(local_res20 + -8) != (int *)0x0)) {
      *(int *)(local_res20 + -8) = iVar6;
      *(undefined2 *)(local_res20 + (longlong)iVar6 * 2) = 0;
    }
  }
  else if (local_res20 != PTR_DAT_1403200a0) {
    iVar6 = *(int *)(local_res20 + -8);
    goto LAB_14011d67d;
  }
  FUN_1401568c0();
  local_res18 = PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(param_2 + 0x2a);
  iVar6 = 0;
  if ((local_res18 != (undefined *)0x0) && (iVar6 = 0, local_res18 != PTR_DAT_1403200a0)) {
    iVar6 = *(int *)(local_res18 + -8);
  }
  iVar4 = iVar3;
  if (((iVar3 <= iVar6) && (iVar4 = 0, local_res18 != (undefined *)0x0)) &&
     (local_res18 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res18 + -8);
  }
  iVar6 = 1;
  if (1 < iVar4) {
    iVar6 = iVar4;
  }
  iVar4 = 0;
  if ((local_res18 != (undefined *)0x0) && (iVar4 = 0, local_res18 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res18 + -8);
  }
  if (iVar4 < iVar6) {
    FUN_14004f590(&local_res18,iVar6);
  }
  FUN_14004f670(&local_res18);
  puVar7 = local_res18;
  if (local_res18 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar7,param_2 + 0x2a,iVar3);
  puVar7 = local_res18;
  if (local_res18 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar7);
  iVar6 = 0;
  if (0 < iVar3) {
    iVar6 = iVar3;
  }
  iVar3 = 0;
  if ((local_res18 != (undefined *)0x0) && (iVar3 = 0, local_res18 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_res18 + -8);
  }
  if ((iVar3 <= iVar6) && (iVar6 = 0, local_res18 != (undefined *)0x0)) {
    if (local_res18 == PTR_DAT_1403200a0) goto LAB_14011d797;
    iVar6 = *(int *)(local_res18 + -8);
  }
  if (((local_res18 != PTR_DAT_1403200a0) && (local_res18 != (undefined *)0x0)) &&
     ((int *)(local_res18 + -8) != (int *)0x0)) {
    *(int *)(local_res18 + -8) = iVar6;
    *(undefined2 *)(local_res18 + (longlong)iVar6 * 2) = 0;
  }
LAB_14011d797:
  local_res8[0] = (int)*(short *)(param_2 + 0xc);
  local_res10[0] = *(undefined4 *)(param_2 + 4);
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x300))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res10,
             local_res8,param_2 + 0x12,&local_res18,param_2 + 0x26,param_2 + 0x22,&local_res20);
  puVar7 = local_res18;
  if (((local_res18 != (undefined *)0x0) && (local_res18 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res18 + -8, puVar1 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar2 = (int *)(puVar7 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar5);
  }
  puVar7 = local_res20;
  if (((local_res20 != (undefined *)0x0) && (local_res20 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res20 + -8, puVar1 != (undefined *)0x0)) {
    local_res18 = PTR_DAT_1403200a0;
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar2 = (int *)(puVar7 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar5);
  }
  return;
}



void FUN_14011d8b0(longlong param_1,longlong param_2)

{
  int local_res10 [2];
  undefined4 local_res18 [4];
  
  if (*(short *)(param_2 + 0xc) != 99) {
    *(int *)(param_1 + 0x5ac) = *(int *)(param_1 + 0x5ac) + 1;
    local_res10[0] = (int)*(short *)(param_2 + 0xc);
    local_res18[0] = *(undefined4 *)(param_2 + 4);
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x30))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res18,
               local_res10);
    return;
  }
  *(int *)(param_1 + 0x5c4) = *(int *)(param_1 + 0x5c4) + 1;
  local_res10[0] = *(int *)(param_2 + 4);
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x90))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res10,
             param_2 + 0xe);
  return;
}



void FUN_14011d940(longlong param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  undefined *puVar6;
  int iVar7;
  int local_res10 [2];
  int local_res18 [2];
  undefined4 local_res20 [2];
  undefined *local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined1 local_30;
  
  local_40 = 0xfffffffffffffffe;
  if (*(short *)(param_2 + 0xc) != 99) {
    *(int *)(param_1 + 0x5ac) = *(int *)(param_1 + 0x5ac) + 1;
    local_res10[0] = (int)*(short *)(param_2 + 0xc);
    local_res18[0] = *(int *)(param_2 + 4);
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x30))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res18,
               local_res10);
    return;
  }
  *(int *)(param_1 + 0x5c4) = *(int *)(param_1 + 0x5c4) + 1;
  local_res10[0] = (int)*(short *)(param_2 + 0x30);
  local_res18[0] = (int)*(short *)(param_2 + 0x2e);
  FUN_1401568c0();
  local_48 = PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(param_2 + 0xe);
  iVar7 = 0;
  if ((local_48 != (undefined *)0x0) && (local_48 != PTR_DAT_1403200a0)) {
    iVar7 = *(int *)(local_48 + -8);
  }
  iVar4 = iVar3;
  if (((iVar3 <= iVar7) && (iVar4 = 0, local_48 != (undefined *)0x0)) &&
     (local_48 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_48 + -8);
  }
  iVar7 = 1;
  if (1 < iVar4) {
    iVar7 = iVar4;
  }
  iVar4 = 0;
  if ((local_48 != (undefined *)0x0) && (iVar4 = 0, local_48 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_48 + -8);
  }
  if (iVar4 < iVar7) {
    FUN_14004f590(&local_48);
  }
  FUN_14004f670(&local_48);
  puVar6 = local_48;
  if (local_48 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar6,param_2 + 0xe,iVar3);
  puVar6 = local_48;
  if (local_48 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar6);
  iVar7 = 0;
  if (0 < iVar3) {
    iVar7 = iVar3;
  }
  iVar3 = 0;
  if ((local_48 != (undefined *)0x0) && (iVar3 = 0, local_48 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_48 + -8);
  }
  if ((iVar3 <= iVar7) && (iVar7 = 0, local_48 != (undefined *)0x0)) {
    if (local_48 == PTR_DAT_1403200a0) goto LAB_14011dac4;
    iVar7 = *(int *)(local_48 + -8);
  }
  if (((local_48 != PTR_DAT_1403200a0) && (local_48 != (undefined *)0x0)) &&
     ((int *)(local_48 + -8) != (int *)0x0)) {
    *(int *)(local_48 + -8) = iVar7;
    *(undefined2 *)(local_48 + (longlong)iVar7 * 2) = 0;
  }
LAB_14011dac4:
  local_res20[0] = *(undefined4 *)(param_2 + 4);
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x340))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res20,
             &local_48,local_res18,local_res10);
  puVar6 = local_48;
  if (((local_48 != (undefined *)0x0) && (local_48 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_48 + -8, puVar1 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    piVar2 = (int *)(puVar6 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar5);
  }
  return;
}



void FUN_14011db70(longlong param_1,longlong param_2)

{
  void *_Src;
  void *pvVar1;
  void *pvVar2;
  void *pvVar3;
  uint uVar4;
  undefined4 local_res10 [2];
  void *local_50;
  void *local_48;
  void *local_40;
  void *pvVar5;
  
  if ((*(short *)(param_2 + 0xc) == 0x67) || (*(short *)(param_2 + 0xc) == 0x6a)) {
    pvVar2 = (void *)0x0;
    local_50 = (void *)0x0;
    local_48 = (void *)0x0;
    local_40 = (void *)0x0;
    if (*(short *)(param_2 + 0xe) < 1) {
      *(int *)(param_1 + 0x5e4) = *(int *)(param_1 + 0x5e4) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x110))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,&local_50);
      pvVar2 = local_50;
    }
    else {
      pvVar1 = (void *)(param_2 + 0x10);
      pvVar5 = pvVar2;
      do {
        if ((pvVar1 < local_48) && (pvVar2 <= pvVar1)) {
          pvVar3 = pvVar2;
          if (local_48 == local_40) {
            FUN_14004acd0(&local_50);
            pvVar3 = local_50;
          }
          _Src = (void *)((((longlong)pvVar1 - (longlong)pvVar2) / 0x122) * 0x122 + (longlong)pvVar3
                         );
          pvVar2 = pvVar3;
        }
        else {
          _Src = pvVar1;
          if (local_48 == local_40) {
            FUN_14004acd0(&local_50);
            pvVar2 = local_50;
          }
        }
        if (local_48 != (void *)0x0) {
          memcpy(local_48,_Src,0x122);
          pvVar2 = local_50;
        }
        local_48 = (void *)((longlong)local_48 + 0x122);
        if (((longlong)local_48 - (longlong)pvVar2) / 0x122 == 0x20) {
          *(int *)(param_1 + 0x5e4) = *(int *)(param_1 + 0x5e4) + 1;
          local_res10[0] = *(undefined4 *)(param_2 + 4);
          (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x110))
                    ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                     local_res10,&local_50);
          pvVar2 = local_50;
          if (local_50 != local_48) {
            local_48 = local_50;
          }
        }
        pvVar1 = (void *)((longlong)pvVar1 + 0x122);
        uVar4 = (int)pvVar5 + 1;
        pvVar5 = (void *)(ulonglong)uVar4;
      } while ((int)uVar4 < (int)*(short *)(param_2 + 0xe));
      if (pvVar2 != local_48) {
        *(int *)(param_1 + 0x5e4) = *(int *)(param_1 + 0x5e4) + 1;
        local_res10[0] = *(undefined4 *)(param_2 + 4);
        (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x110))
                  ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                   local_res10,&local_50);
        pvVar2 = local_50;
        if (local_50 != local_48) {
          local_48 = local_50;
        }
      }
    }
    if (pvVar2 != (void *)0x0) {
      operator_delete(pvVar2);
    }
  }
  return;
}



void FUN_14011dda0(longlong param_1,longlong param_2)

{
  code *pcVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  longlong lVar6;
  longlong lVar7;
  undefined4 *puVar8;
  undefined4 *puVar9;
  undefined4 local_res10 [2];
  undefined4 *local_50;
  undefined4 *local_48;
  undefined4 *local_40;
  
  puVar3 = (undefined4 *)0x0;
  local_50 = (undefined4 *)0x0;
  local_48 = (undefined4 *)0x0;
  puVar9 = (undefined4 *)0x0;
  local_40 = (undefined4 *)0x0;
  lVar7 = 0;
  puVar8 = (undefined4 *)(param_2 + 0xe);
  do {
    if ((puVar8 < local_48) && (puVar3 <= puVar8)) {
      lVar6 = (longlong)puVar8 - (longlong)puVar3;
      if (local_48 == puVar9) {
        uVar4 = (longlong)local_48 - (longlong)puVar3 >> 2;
        if (0x3ffffffffffffffe < uVar4) {
          std::_Xlength_error("vector<T> too long");
          pcVar1 = (code *)swi(3);
          (*pcVar1)();
          return;
        }
        uVar4 = uVar4 + 1;
        uVar5 = (longlong)puVar9 - (longlong)puVar3 >> 2;
        if (uVar5 < uVar4) {
          if (0x3fffffffffffffff - (uVar5 >> 1) < uVar5) {
            uVar5 = 0;
          }
          else {
            uVar5 = uVar5 + (uVar5 >> 1);
          }
          if (uVar5 < uVar4) {
            uVar5 = uVar4;
          }
          FUN_140047450(&local_50,uVar5);
          puVar3 = local_50;
          puVar9 = local_40;
        }
      }
      if (local_48 != (undefined4 *)0x0) {
        uVar2 = puVar3[lVar6 >> 2];
LAB_14011dee1:
        *local_48 = uVar2;
        puVar3 = local_50;
        puVar9 = local_40;
      }
    }
    else {
      if (local_48 == puVar9) {
        uVar4 = (longlong)local_48 - (longlong)puVar3 >> 2;
        if (0x3ffffffffffffffe < uVar4) {
          std::_Xlength_error("vector<T> too long");
          pcVar1 = (code *)swi(3);
          (*pcVar1)();
          return;
        }
        uVar4 = uVar4 + 1;
        uVar5 = (longlong)puVar9 - (longlong)puVar3 >> 2;
        if (uVar5 < uVar4) {
          if (0x3fffffffffffffff - (uVar5 >> 1) < uVar5) {
            uVar5 = 0;
          }
          else {
            uVar5 = uVar5 + (uVar5 >> 1);
          }
          if (uVar5 < uVar4) {
            uVar5 = uVar4;
          }
          FUN_140047450(&local_50,uVar5);
          puVar3 = local_50;
          puVar9 = local_40;
        }
      }
      if (local_48 != (undefined4 *)0x0) {
        uVar2 = *puVar8;
        goto LAB_14011dee1;
      }
    }
    local_48 = local_48 + 1;
    lVar7 = lVar7 + 1;
    puVar8 = puVar8 + 1;
    if (0x62 < lVar7) {
      *(int *)(param_1 + 0x5d8) = *(int *)(param_1 + 0x5d8) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0xe0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,&local_50);
      if (local_50 != (undefined4 *)0x0) {
        operator_delete(local_50);
      }
      return;
    }
  } while( true );
}



void FUN_14011dfa0(longlong param_1,longlong param_2)

{
  code *pcVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  longlong lVar6;
  uint uVar7;
  undefined4 *puVar8;
  undefined4 *puVar9;
  undefined4 local_res10 [2];
  undefined8 uVar10;
  undefined4 *local_50;
  undefined4 *local_48;
  undefined4 *local_40;
  
  if (param_2 != 0) {
    uVar10 = 0xfffffffffffffffe;
    *(int *)(param_1 + 0x67c) = *(int *)(param_1 + 0x67c) + 1;
    puVar3 = (undefined4 *)0x0;
    local_50 = (undefined4 *)0x0;
    local_48 = (undefined4 *)0x0;
    puVar9 = (undefined4 *)0x0;
    local_40 = (undefined4 *)0x0;
    uVar7 = 0;
    puVar8 = (undefined4 *)(param_2 + 0x1e);
    do {
      if ((puVar8 < local_48) && (puVar3 <= puVar8)) {
        lVar6 = (longlong)puVar8 - (longlong)puVar3;
        if (local_48 == puVar9) {
          uVar4 = (longlong)local_48 - (longlong)puVar3 >> 2;
          if (0x3ffffffffffffffe < uVar4) {
            std::_Xlength_error("vector<T> too long");
            pcVar1 = (code *)swi(3);
            (*pcVar1)();
            return;
          }
          uVar4 = uVar4 + 1;
          uVar5 = (longlong)puVar9 - (longlong)puVar3 >> 2;
          if (uVar5 < uVar4) {
            if (0x3fffffffffffffff - (uVar5 >> 1) < uVar5) {
              uVar5 = 0;
            }
            else {
              uVar5 = uVar5 + (uVar5 >> 1);
            }
            if (uVar5 < uVar4) {
              uVar5 = uVar4;
            }
            FUN_140047450(&local_50,uVar5);
            puVar3 = local_50;
            puVar9 = local_40;
          }
        }
        if (local_48 != (undefined4 *)0x0) {
          uVar2 = puVar3[lVar6 >> 2];
LAB_14011e0f0:
          *local_48 = uVar2;
          puVar3 = local_50;
          puVar9 = local_40;
        }
      }
      else {
        if (local_48 == puVar9) {
          uVar4 = (longlong)local_48 - (longlong)puVar3 >> 2;
          if (0x3ffffffffffffffe < uVar4) {
            std::_Xlength_error("vector<T> too long");
            pcVar1 = (code *)swi(3);
            (*pcVar1)();
            return;
          }
          uVar4 = uVar4 + 1;
          uVar5 = (longlong)puVar9 - (longlong)puVar3 >> 2;
          if (uVar5 < uVar4) {
            if (0x3fffffffffffffff - (uVar5 >> 1) < uVar5) {
              uVar5 = 0;
            }
            else {
              uVar5 = uVar5 + (uVar5 >> 1);
            }
            if (uVar5 < uVar4) {
              uVar5 = uVar4;
            }
            FUN_140047450(&local_50,uVar5);
            puVar3 = local_50;
            puVar9 = local_40;
          }
        }
        if (local_48 != (undefined4 *)0x0) {
          uVar2 = *puVar8;
          goto LAB_14011e0f0;
        }
      }
      local_48 = local_48 + 1;
      uVar7 = uVar7 + 1;
      puVar8 = puVar8 + 1;
    } while (uVar7 < 3);
    local_res10[0] = *(undefined4 *)(param_2 + 4);
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x370))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res10,
               &local_50,param_2 + 0x2a,uVar10);
    if (local_50 != (undefined4 *)0x0) {
      operator_delete(local_50);
    }
  }
  return;
}



void FUN_14011e1b0(longlong param_1,longlong param_2)

{
  void *_Src;
  void *pvVar1;
  uint uVar2;
  void *pvVar4;
  void *pvVar5;
  void *local_40;
  void *local_38;
  void *local_30;
  void *pvVar3;
  
  if ((*(short *)(param_2 + 0xc) == 0x11e) || (*(short *)(param_2 + 0xc) == 0x11f)) {
    pvVar3 = (void *)0x0;
    local_40 = (void *)0x0;
    local_38 = (void *)0x0;
    local_30 = (void *)0x0;
    if (*(short *)(param_2 + 0xe) < 1) {
      *(int *)(param_1 + 0x680) = *(int *)(param_1 + 0x680) + 1;
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x380))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,&local_40,
                 0xfffffffffffffffe);
      pvVar5 = local_40;
    }
    else {
      pvVar1 = (void *)(param_2 + 0x10);
      pvVar5 = pvVar3;
      do {
        if ((pvVar1 < local_38) && (pvVar5 <= pvVar1)) {
          pvVar4 = pvVar5;
          if (local_38 == local_30) {
            FUN_14004b7e0(&local_40);
            pvVar4 = local_40;
          }
          _Src = (void *)((((longlong)pvVar1 - (longlong)pvVar5) / 0x2b1) * 0x2b1 + (longlong)pvVar4
                         );
          pvVar5 = pvVar4;
        }
        else {
          _Src = pvVar1;
          if (local_38 == local_30) {
            FUN_14004b7e0(&local_40);
            pvVar5 = local_40;
          }
        }
        if (local_38 != (void *)0x0) {
          memcpy(local_38,_Src,0x2b1);
          pvVar5 = local_40;
        }
        local_38 = (void *)((longlong)local_38 + 0x2b1);
        pvVar1 = (void *)((longlong)pvVar1 + 0x2b1);
        uVar2 = (int)pvVar3 + 1;
        pvVar3 = (void *)(ulonglong)uVar2;
      } while ((int)uVar2 < (int)*(short *)(param_2 + 0xe));
      if (pvVar5 != local_38) {
        *(int *)(param_1 + 0x680) = *(int *)(param_1 + 0x680) + 1;
        (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x380))
                  ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                   &local_40);
        pvVar5 = local_40;
        if (local_40 != local_38) {
          local_38 = local_40;
        }
      }
    }
    if (pvVar5 != (void *)0x0) {
      operator_delete(pvVar5);
    }
  }
  return;
}



void FUN_14011e380(longlong param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  int iVar6;
  undefined *puVar7;
  undefined4 local_res8 [2];
  undefined *local_res10;
  
  *(int *)(param_1 + 0x684) = *(int *)(param_1 + 0x684) + 1;
  FUN_1401568c0();
  local_res10 = PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(param_2 + 0xf);
  iVar6 = 0;
  if ((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) {
    iVar6 = *(int *)(local_res10 + -8);
  }
  iVar4 = iVar3;
  if (((iVar3 <= iVar6) && (iVar4 = 0, local_res10 != (undefined *)0x0)) &&
     (local_res10 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res10 + -8);
  }
  iVar6 = 1;
  if (1 < iVar4) {
    iVar6 = iVar4;
  }
  iVar4 = 0;
  if ((local_res10 != (undefined *)0x0) && (iVar4 = 0, local_res10 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res10 + -8);
  }
  if (iVar4 < iVar6) {
    FUN_14004f590(&local_res10);
  }
  FUN_14004f670(&local_res10);
  puVar7 = local_res10;
  if (local_res10 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar7,param_2 + 0xf,iVar3);
  puVar7 = local_res10;
  if (local_res10 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar7);
  iVar6 = 0;
  if (0 < iVar3) {
    iVar6 = iVar3;
  }
  iVar3 = 0;
  if ((local_res10 != (undefined *)0x0) && (iVar3 = 0, local_res10 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_res10 + -8);
  }
  if ((iVar3 <= iVar6) && (iVar6 = 0, local_res10 != (undefined *)0x0)) {
    if (local_res10 == PTR_DAT_1403200a0) goto LAB_14011e4b3;
    iVar6 = *(int *)(local_res10 + -8);
  }
  if (((local_res10 != PTR_DAT_1403200a0) && (local_res10 != (undefined *)0x0)) &&
     ((int *)(local_res10 + -8) != (int *)0x0)) {
    *(int *)(local_res10 + -8) = iVar6;
    *(undefined2 *)(local_res10 + (longlong)iVar6 * 2) = 0;
  }
LAB_14011e4b3:
  local_res8[0] = *(undefined4 *)(param_2 + 4);
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x390))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res8,
             param_2 + 0xe,&local_res10);
  puVar7 = local_res10;
  if (((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10 + -8, puVar1 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar2 = (int *)(puVar7 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar5);
  }
  return;
}



void FUN_14011e550(longlong param_1,longlong param_2)

{
  undefined4 uVar1;
  longlong lVar2;
  undefined8 *puVar3;
  int iVar4;
  undefined8 *puVar5;
  int local_res10 [2];
  undefined4 local_res18 [4];
  undefined8 uVar6;
  undefined8 *local_50;
  undefined8 *local_48;
  undefined8 *local_40;
  
  uVar6 = 0xfffffffffffffffe;
  if (0 < *(short *)(param_2 + 0x10)) {
    puVar3 = (undefined8 *)(param_2 + 0x12);
    iVar4 = 0;
    local_50 = (undefined8 *)0x0;
    local_48 = (undefined8 *)0x0;
    local_40 = (undefined8 *)0x0;
    if (0 < *(short *)(param_2 + 0x10)) {
      do {
        if ((puVar3 < local_48) && (local_50 <= puVar3)) {
          lVar2 = (longlong)puVar3 - (longlong)local_50;
          if (local_48 == local_40) {
            FUN_14004ad90(&local_50);
          }
          puVar5 = (undefined8 *)((lVar2 / 0x34) * 0x34 + (longlong)local_50);
          if (local_48 != (undefined8 *)0x0) {
            *local_48 = *puVar5;
            local_48[1] = puVar5[1];
            local_48[2] = puVar5[2];
            local_48[3] = puVar5[3];
            local_48[4] = puVar5[4];
            local_48[5] = puVar5[5];
            uVar1 = *(undefined4 *)(puVar5 + 6);
LAB_14011e67e:
            *(undefined4 *)(local_48 + 6) = uVar1;
          }
        }
        else {
          if (local_48 == local_40) {
            FUN_14004ad90(&local_50);
          }
          if (local_48 != (undefined8 *)0x0) {
            *local_48 = *puVar3;
            local_48[1] = puVar3[1];
            local_48[2] = puVar3[2];
            local_48[3] = puVar3[3];
            local_48[4] = puVar3[4];
            local_48[5] = puVar3[5];
            uVar1 = *(undefined4 *)(puVar3 + 6);
            goto LAB_14011e67e;
          }
        }
        local_48 = (undefined8 *)((longlong)local_48 + 0x34);
        puVar3 = (undefined8 *)((longlong)puVar3 + 0x34);
        iVar4 = iVar4 + 1;
      } while (iVar4 < *(short *)(param_2 + 0x10));
    }
    *(int *)(param_1 + 0x5ec) = *(int *)(param_1 + 0x5ec) + 1;
    local_res10[0] = (int)*(short *)(param_2 + 0xe);
    local_res18[0] = *(undefined4 *)(param_2 + 4);
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x130))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res18,
               local_res10,&local_50,uVar6);
    if (local_50 != (undefined8 *)0x0) {
      operator_delete(local_50);
    }
  }
  return;
}



void FUN_14011e720(longlong param_1,longlong param_2)

{
  undefined4 uVar1;
  longlong lVar2;
  undefined8 *puVar3;
  int iVar4;
  undefined4 local_res10 [2];
  undefined8 *local_40;
  undefined8 *local_38;
  undefined8 *local_30;
  
  if (0 < *(short *)(param_2 + 0xe)) {
    puVar3 = (undefined8 *)(param_2 + 0x10);
    iVar4 = 0;
    local_40 = (undefined8 *)0x0;
    local_38 = (undefined8 *)0x0;
    local_30 = (undefined8 *)0x0;
    if (0 < *(short *)(param_2 + 0xe)) {
      do {
        if ((puVar3 < local_38) && (local_40 <= puVar3)) {
          lVar2 = ((longlong)puVar3 - (longlong)local_40) / 6 +
                  ((longlong)puVar3 - (longlong)local_40 >> 0x3f);
          lVar2 = (lVar2 >> 1) - (lVar2 >> 0x3f);
          if (local_38 == local_30) {
            FUN_14004a920(&local_40);
          }
          if (local_38 != (undefined8 *)0x0) {
            *local_38 = *(undefined8 *)((longlong)local_40 + lVar2 * 0xc);
            uVar1 = *(undefined4 *)((longlong)local_40 + lVar2 * 0xc + 8);
LAB_14011e800:
            *(undefined4 *)(local_38 + 1) = uVar1;
          }
        }
        else {
          if (local_38 == local_30) {
            FUN_14004a920(&local_40);
          }
          if (local_38 != (undefined8 *)0x0) {
            *local_38 = *puVar3;
            uVar1 = *(undefined4 *)(puVar3 + 1);
            goto LAB_14011e800;
          }
        }
        local_38 = (undefined8 *)((longlong)local_38 + 0xc);
        puVar3 = (undefined8 *)((longlong)puVar3 + 0xc);
        iVar4 = iVar4 + 1;
      } while (iVar4 < *(short *)(param_2 + 0xe));
    }
    *(int *)(param_1 + 0x5fc) = *(int *)(param_1 + 0x5fc) + 1;
    local_res10[0] = *(undefined4 *)(param_2 + 4);
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x170))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res10,
               &local_40);
    if (local_40 != (undefined8 *)0x0) {
      operator_delete(local_40);
    }
  }
  return;
}



void FUN_14011e890(longlong param_1,longlong param_2)

{
  undefined8 uVar1;
  longlong lVar2;
  undefined8 *puVar3;
  int iVar4;
  undefined4 local_res10 [2];
  undefined8 *local_50;
  undefined8 *local_48;
  undefined8 *local_40;
  
  if ((*(short *)(param_2 + 0xc) == 0xfa) || (*(short *)(param_2 + 0xc) == 0xfb)) {
    iVar4 = 0;
    local_50 = (undefined8 *)0x0;
    local_48 = (undefined8 *)0x0;
    local_40 = (undefined8 *)0x0;
    if (*(short *)(param_2 + 0x1e) < 1) {
      *(int *)(param_1 + 0x64c) = *(int *)(param_1 + 0x64c) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x2b0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe,&local_50,0xfffffffffffffffe);
    }
    else {
      puVar3 = (undefined8 *)(param_2 + 0x20);
      if (0 < *(short *)(param_2 + 0x1e)) {
        do {
          if ((puVar3 < local_48) && (local_50 <= puVar3)) {
            lVar2 = ((longlong)puVar3 - (longlong)local_50) / 6 +
                    ((longlong)puVar3 - (longlong)local_50 >> 0x3f);
            lVar2 = (lVar2 >> 2) - (lVar2 >> 0x3f);
            if (local_48 == local_40) {
              FUN_14004b5a0(&local_50);
            }
            if (local_48 != (undefined8 *)0x0) {
              *local_48 = local_50[lVar2 * 3];
              local_48[1] = local_50[lVar2 * 3 + 1];
              uVar1 = local_50[lVar2 * 3 + 2];
LAB_14011e99c:
              local_48[2] = uVar1;
            }
          }
          else {
            if (local_48 == local_40) {
              FUN_14004b5a0(&local_50);
            }
            if (local_48 != (undefined8 *)0x0) {
              *local_48 = *puVar3;
              local_48[1] = puVar3[1];
              uVar1 = puVar3[2];
              goto LAB_14011e99c;
            }
          }
          local_48 = local_48 + 3;
          puVar3 = puVar3 + 3;
          iVar4 = iVar4 + 1;
        } while (iVar4 < *(short *)(param_2 + 0x1e));
      }
      *(int *)(param_1 + 0x64c) = *(int *)(param_1 + 0x64c) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x2b0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe,&local_50);
      if (local_50 != local_48) {
        local_48 = local_50;
      }
    }
    if (local_50 != (undefined8 *)0x0) {
      operator_delete(local_50);
    }
  }
  return;
}



void FUN_14011ea80(longlong param_1,longlong param_2)

{
  void *_Src;
  longlong lVar1;
  void *pvVar2;
  int iVar3;
  undefined4 local_res10 [2];
  void *local_50;
  void *local_48;
  void *local_40;
  
  if ((*(short *)(param_2 + 0xc) == 0x106) || (*(short *)(param_2 + 0xc) == 0x107)) {
    iVar3 = 0;
    local_50 = (void *)0x0;
    local_48 = (void *)0x0;
    local_40 = (void *)0x0;
    if (*(short *)(param_2 + 0x1e) < 1) {
      *(int *)(param_1 + 0x664) = *(int *)(param_1 + 0x664) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x310))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe,&local_50,0xfffffffffffffffe);
    }
    else {
      pvVar2 = (void *)(param_2 + 0x20);
      if (0 < *(short *)(param_2 + 0x1e)) {
        do {
          if ((pvVar2 < local_48) && (local_50 <= pvVar2)) {
            lVar1 = (longlong)pvVar2 - (longlong)local_50;
            if (local_48 == local_40) {
              FUN_14004b660(&local_50);
            }
            _Src = (void *)((lVar1 / 0xa4) * 0xa4 + (longlong)local_50);
          }
          else {
            _Src = pvVar2;
            if (local_48 == local_40) {
              FUN_14004b660(&local_50);
            }
          }
          if (local_48 != (void *)0x0) {
            memcpy(local_48,_Src,0xa4);
          }
          local_48 = (void *)((longlong)local_48 + 0xa4);
          pvVar2 = (void *)((longlong)pvVar2 + 0xa4);
          iVar3 = iVar3 + 1;
        } while (iVar3 < *(short *)(param_2 + 0x1e));
      }
      *(int *)(param_1 + 0x664) = *(int *)(param_1 + 0x664) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x310))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe,&local_50);
      if (local_50 != local_48) {
        local_48 = (void *)FUN_14004bda0(local_48,local_48,local_50);
      }
    }
    if (local_50 != (void *)0x0) {
      operator_delete(local_50);
    }
  }
  return;
}



void FUN_14011ec70(longlong param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  int *piVar3;
  longlong lVar4;
  int *piVar5;
  int *piVar6;
  undefined4 local_res8 [2];
  int *local_40;
  int *local_38;
  int *local_30;
  
  piVar5 = (int *)0x0;
  local_40 = (int *)0x0;
  local_38 = (int *)0x0;
  local_30 = (int *)0x0;
  piVar3 = (int *)(param_2 + 0xe);
  lVar4 = 10;
  do {
    if (*piVar3 != 0) {
      if ((piVar3 < piVar5) && (local_40 <= piVar3)) {
        lVar2 = ((longlong)piVar3 - (longlong)local_40) / 6 +
                ((longlong)piVar3 - (longlong)local_40 >> 0x3f);
        lVar2 = (lVar2 >> 1) - (lVar2 >> 0x3f);
        if (piVar5 == local_30) {
          FUN_14004b8a0(&local_40);
          piVar5 = local_38;
        }
        piVar6 = (int *)0x0;
        if (piVar5 != (int *)0x0) {
          *piVar5 = local_40[lVar2 * 3];
          piVar5[1] = local_40[lVar2 * 3 + 1];
          iVar1 = local_40[lVar2 * 3 + 2];
LAB_14011ed56:
          piVar5[2] = iVar1;
          piVar6 = local_38;
        }
      }
      else {
        if (piVar5 == local_30) {
          FUN_14004b8a0(&local_40);
          piVar5 = local_38;
        }
        piVar6 = (int *)0x0;
        if (piVar5 != (int *)0x0) {
          *piVar5 = *piVar3;
          piVar5[1] = piVar3[1];
          iVar1 = piVar3[2];
          goto LAB_14011ed56;
        }
      }
      piVar5 = piVar6 + 3;
      local_38 = piVar5;
    }
    piVar3 = piVar3 + 3;
    lVar4 = lVar4 + -1;
    if (lVar4 == 0) {
      *(int *)(param_1 + 0x694) = *(int *)(param_1 + 0x694) + 1;
      local_res8[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x3d0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res8
                 ,&local_40);
      if (local_40 != (int *)0x0) {
        operator_delete(local_40);
      }
      return;
    }
  } while( true );
}



void FUN_14011ede0(longlong param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  int iVar6;
  undefined *puVar7;
  undefined4 local_res8 [2];
  undefined *local_res10;
  
  *(int *)(param_1 + 0x694) = *(int *)(param_1 + 0x694) + 1;
  FUN_1401568c0();
  local_res10 = PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(param_2 + 0xf);
  iVar6 = 0;
  if ((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) {
    iVar6 = *(int *)(local_res10 + -8);
  }
  iVar4 = iVar3;
  if (((iVar3 <= iVar6) && (iVar4 = 0, local_res10 != (undefined *)0x0)) &&
     (local_res10 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res10 + -8);
  }
  iVar6 = 1;
  if (1 < iVar4) {
    iVar6 = iVar4;
  }
  iVar4 = 0;
  if ((local_res10 != (undefined *)0x0) && (iVar4 = 0, local_res10 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res10 + -8);
  }
  if (iVar4 < iVar6) {
    FUN_14004f590(&local_res10);
  }
  FUN_14004f670(&local_res10);
  puVar7 = local_res10;
  if (local_res10 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar7,param_2 + 0xf,iVar3);
  puVar7 = local_res10;
  if (local_res10 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar7);
  iVar6 = 0;
  if (0 < iVar3) {
    iVar6 = iVar3;
  }
  iVar3 = 0;
  if ((local_res10 != (undefined *)0x0) && (iVar3 = 0, local_res10 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_res10 + -8);
  }
  if ((iVar3 <= iVar6) && (iVar6 = 0, local_res10 != (undefined *)0x0)) {
    if (local_res10 == PTR_DAT_1403200a0) goto LAB_14011ef13;
    iVar6 = *(int *)(local_res10 + -8);
  }
  if (((local_res10 != PTR_DAT_1403200a0) && (local_res10 != (undefined *)0x0)) &&
     ((int *)(local_res10 + -8) != (int *)0x0)) {
    *(int *)(local_res10 + -8) = iVar6;
    *(undefined2 *)(local_res10 + (longlong)iVar6 * 2) = 0;
  }
LAB_14011ef13:
  local_res8[0] = *(undefined4 *)(param_2 + 4);
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x3e0))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res8,
             &local_res10,param_2 + 0xe);
  puVar7 = local_res10;
  if (((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10 + -8, puVar1 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar2 = (int *)(puVar7 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar5);
  }
  return;
}



void FUN_14011efb0(longlong param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  int local_res10 [2];
  void *local_30;
  undefined8 local_28;
  undefined8 local_20;
  
  if (0 < *(short *)(param_2 + 0x10)) {
    lVar2 = param_2 + 0x12;
    iVar1 = 0;
    local_30 = (void *)0x0;
    local_28 = 0;
    local_20 = 0;
    if (0 < *(short *)(param_2 + 0x10)) {
      do {
        FUN_140049c20(&local_30,lVar2);
        lVar2 = lVar2 + 0x41;
        iVar1 = iVar1 + 1;
      } while (iVar1 < *(short *)(param_2 + 0x10));
    }
    *(int *)(param_1 + 0x6ac) = *(int *)(param_1 + 0x6ac) + 1;
    local_res10[0] = (int)*(short *)(param_2 + 0xe);
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x430))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res10,
               &local_30);
    if (local_30 != (void *)0x0) {
      operator_delete(local_30);
    }
  }
  return;
}



void FUN_14011f070(longlong param_1,longlong param_2)

{
  void *_Src;
  uint uVar1;
  void *pvVar3;
  void *pvVar4;
  void *pvVar5;
  undefined4 local_res8 [2];
  void *local_50;
  void *local_48;
  void *local_40;
  void *pvVar2;
  
  pvVar2 = (void *)0x0;
  local_50 = (void *)0x0;
  local_48 = (void *)0x0;
  local_40 = (void *)0x0;
  if (0 < *(short *)(param_2 + 0xe)) {
    pvVar3 = (void *)(param_2 + 0x10);
    pvVar5 = pvVar2;
    do {
      if ((pvVar3 < local_48) && (pvVar5 <= pvVar3)) {
        pvVar4 = pvVar5;
        if (local_48 == local_40) {
          FUN_14004ae50(&local_50);
          pvVar4 = local_50;
        }
        _Src = (void *)((((longlong)pvVar3 - (longlong)pvVar5) / 0x88) * 0x88 + (longlong)pvVar4);
        pvVar5 = pvVar4;
      }
      else {
        _Src = pvVar3;
        if (local_48 == local_40) {
          FUN_14004ae50(&local_50);
          pvVar5 = local_50;
        }
      }
      if (local_48 != (void *)0x0) {
        memcpy(local_48,_Src,0x88);
        pvVar5 = local_50;
      }
      local_48 = (void *)((longlong)local_48 + 0x88);
      if (((longlong)local_48 - (longlong)pvVar5) / 0x88 == 0x19) {
        *(int *)(param_1 + 0x5f0) = *(int *)(param_1 + 0x5f0) + 1;
        local_res8[0] = *(undefined4 *)(param_2 + 4);
        (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x140))
                  ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                   local_res8,&local_50);
        pvVar5 = local_50;
        if (local_50 != local_48) {
          local_48 = local_50;
        }
      }
      pvVar3 = (void *)((longlong)pvVar3 + 0x88);
      uVar1 = (int)pvVar2 + 1;
      pvVar2 = (void *)(ulonglong)uVar1;
    } while ((int)uVar1 < (int)*(short *)(param_2 + 0xe));
    if (pvVar5 != local_48) {
      *(int *)(param_1 + 0x5f0) = *(int *)(param_1 + 0x5f0) + 1;
      local_res8[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x140))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res8
                 ,&local_50);
      if (local_50 != local_48) {
        local_48 = local_50;
      }
    }
  }
  *(int *)(param_1 + 0x5f0) = *(int *)(param_1 + 0x5f0) + 1;
  local_res8[0] = *(undefined4 *)(param_2 + 4);
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x140))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res8,
             &local_50);
  if (local_50 != (void *)0x0) {
    operator_delete(local_50);
  }
  return;
}



void FUN_14011f290(longlong param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  int iVar6;
  undefined *puVar7;
  int local_res8 [2];
  undefined4 local_res10 [2];
  undefined *local_res18 [2];
  
  *(int *)(param_1 + 0x5f0) = *(int *)(param_1 + 0x5f0) + 1;
  FUN_1401568c0();
  local_res18[0] = PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(param_2 + 0x22);
  iVar6 = 0;
  if ((local_res18[0] != (undefined *)0x0) && (local_res18[0] != PTR_DAT_1403200a0)) {
    iVar6 = *(int *)(local_res18[0] + -8);
  }
  iVar4 = iVar3;
  if (((iVar3 <= iVar6) && (iVar4 = 0, local_res18[0] != (undefined *)0x0)) &&
     (local_res18[0] != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res18[0] + -8);
  }
  iVar6 = 1;
  if (1 < iVar4) {
    iVar6 = iVar4;
  }
  iVar4 = 0;
  if ((local_res18[0] != (undefined *)0x0) && (iVar4 = 0, local_res18[0] != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res18[0] + -8);
  }
  if (iVar4 < iVar6) {
    FUN_14004f590(local_res18);
  }
  FUN_14004f670(local_res18);
  puVar7 = local_res18[0];
  if (local_res18[0] == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar7,param_2 + 0x22,iVar3);
  puVar7 = local_res18[0];
  if (local_res18[0] == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar7);
  iVar6 = 0;
  if (0 < iVar3) {
    iVar6 = iVar3;
  }
  iVar3 = 0;
  if ((local_res18[0] != (undefined *)0x0) && (iVar3 = 0, local_res18[0] != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_res18[0] + -8);
  }
  if ((iVar3 <= iVar6) && (iVar6 = 0, local_res18[0] != (undefined *)0x0)) {
    if (local_res18[0] == PTR_DAT_1403200a0) goto LAB_14011f3d0;
    iVar6 = *(int *)(local_res18[0] + -8);
  }
  if (((local_res18[0] != PTR_DAT_1403200a0) && (local_res18[0] != (undefined *)0x0)) &&
     ((int *)(local_res18[0] + -8) != (int *)0x0)) {
    *(int *)(local_res18[0] + -8) = iVar6;
    *(undefined2 *)(local_res18[0] + (longlong)iVar6 * 2) = 0;
  }
LAB_14011f3d0:
  local_res8[0] = (int)*(short *)(param_2 + 0xc);
  local_res10[0] = *(undefined4 *)(param_2 + 4);
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x2f0))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res10,
             local_res8,param_2 + 0x12,local_res18,param_2 + 0x46,param_2 + 0x42);
  puVar7 = local_res18[0];
  if (((local_res18[0] != (undefined *)0x0) && (local_res18[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res18[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar2 = (int *)(puVar7 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar5);
  }
  return;
}



void FUN_14011f4a0(longlong param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  undefined8 uVar3;
  void *local_30;
  undefined8 local_28;
  undefined8 local_20;
  
  uVar3 = 0xfffffffffffffffe;
  iVar1 = 0;
  local_30 = (void *)0x0;
  local_28 = 0;
  local_20 = 0;
  if (0 < *(short *)(param_2 + 0xe)) {
    lVar2 = param_2 + 0x10;
    do {
      FUN_140047de0(&local_30,lVar2);
      lVar2 = lVar2 + 0x14;
      iVar1 = iVar1 + 1;
    } while (iVar1 < *(short *)(param_2 + 0xe));
  }
  *(int *)(param_1 + 0x5b8) = *(int *)(param_1 + 0x5b8) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x60))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,&local_30,
             uVar3);
  if (local_30 != (void *)0x0) {
    operator_delete(local_30);
  }
  return;
}



void FUN_14011f550(longlong param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  int iVar6;
  undefined *puVar7;
  int local_res8 [2];
  undefined4 local_res10 [2];
  undefined4 local_res18 [2];
  int local_res20 [2];
  int local_58 [2];
  undefined *local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38;
  
  local_48 = 0xfffffffffffffffe;
  *(int *)(param_1 + 0x610) = *(int *)(param_1 + 0x610) + 1;
  FUN_1401568c0();
  local_50 = PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(param_2 + 0x2db);
  iVar6 = 0;
  if ((local_50 != (undefined *)0x0) && (local_50 != PTR_DAT_1403200a0)) {
    iVar6 = *(int *)(local_50 + -8);
  }
  iVar4 = iVar3;
  if (((iVar3 <= iVar6) && (iVar4 = 0, local_50 != (undefined *)0x0)) &&
     (local_50 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_50 + -8);
  }
  iVar6 = 1;
  if (1 < iVar4) {
    iVar6 = iVar4;
  }
  iVar4 = 0;
  if ((local_50 != (undefined *)0x0) && (iVar4 = 0, local_50 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_50 + -8);
  }
  if (iVar4 < iVar6) {
    FUN_14004f590(&local_50);
  }
  FUN_14004f670(&local_50);
  puVar7 = local_50;
  if (local_50 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar7,param_2 + 0x2db,iVar3);
  puVar7 = local_50;
  if (local_50 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar7);
  iVar6 = 0;
  if (0 < iVar3) {
    iVar6 = iVar3;
  }
  iVar3 = 0;
  if ((local_50 != (undefined *)0x0) && (iVar3 = 0, local_50 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_50 + -8);
  }
  if ((iVar3 <= iVar6) && (iVar6 = 0, local_50 != (undefined *)0x0)) {
    if (local_50 == PTR_DAT_1403200a0) goto LAB_14011f684;
    iVar6 = *(int *)(local_50 + -8);
  }
  if (((local_50 != PTR_DAT_1403200a0) && (local_50 != (undefined *)0x0)) &&
     ((int *)(local_50 + -8) != (int *)0x0)) {
    *(int *)(local_50 + -8) = iVar6;
    *(undefined2 *)(local_50 + (longlong)iVar6 * 2) = 0;
  }
LAB_14011f684:
  local_res8[0] = (int)*(short *)(param_2 + 0xc);
  local_res10[0] = *(undefined4 *)(param_2 + 4);
  local_res18[0] = *(undefined4 *)(param_2 + 0x2d7);
  local_res20[0] = (int)*(short *)(param_2 + 0x2fd);
  local_58[0] = (int)*(short *)(param_2 + 0x2fb);
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x1c0))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_58,
             local_res20,local_res18,local_res10,local_res8,&local_50,param_2 + 0xe);
  puVar7 = local_50;
  if (((local_50 != (undefined *)0x0) && (local_50 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_50 + -8, puVar1 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_40 = uVar5;
    FUN_140156b50(uVar5);
    local_38 = 1;
    piVar2 = (int *)(puVar7 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar5);
  }
  return;
}



void FUN_14011f790(longlong param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  undefined *puVar6;
  int iVar7;
  int local_res8 [2];
  undefined *local_res10;
  
  *(int *)(param_1 + 0x6d0) = *(int *)(param_1 + 0x6d0) + 1;
  local_res8[0] = (int)*(short *)(param_2 + 0xc);
  FUN_1401568c0();
  local_res10 = PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(param_2 + 0xac);
  iVar7 = 0;
  if ((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) {
    iVar7 = *(int *)(local_res10 + -8);
  }
  iVar4 = iVar3;
  if (((iVar3 <= iVar7) && (iVar4 = 0, local_res10 != (undefined *)0x0)) &&
     (local_res10 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res10 + -8);
  }
  iVar7 = 1;
  if (1 < iVar4) {
    iVar7 = iVar4;
  }
  iVar4 = 0;
  if ((local_res10 != (undefined *)0x0) && (iVar4 = 0, local_res10 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res10 + -8);
  }
  if (iVar4 < iVar7) {
    FUN_14004f590(&local_res10);
  }
  FUN_14004f670(&local_res10);
  puVar6 = local_res10;
  if (local_res10 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar6,param_2 + 0xac,iVar3);
  puVar6 = local_res10;
  if (local_res10 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar6);
  iVar7 = 0;
  if (0 < iVar3) {
    iVar7 = iVar3;
  }
  iVar3 = 0;
  if ((local_res10 != (undefined *)0x0) && (iVar3 = 0, local_res10 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_res10 + -8);
  }
  if ((iVar3 <= iVar7) && (iVar7 = 0, local_res10 != (undefined *)0x0)) {
    if (local_res10 == PTR_DAT_1403200a0) goto LAB_14011f8e3;
    iVar7 = *(int *)(local_res10 + -8);
  }
  if (((local_res10 != PTR_DAT_1403200a0) && (local_res10 != (undefined *)0x0)) &&
     ((int *)(local_res10 + -8) != (int *)0x0)) {
    *(int *)(local_res10 + -8) = iVar7;
    *(undefined2 *)(local_res10 + (longlong)iVar7 * 2) = 0;
  }
LAB_14011f8e3:
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x4c0))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,param_2 + 0xe,
             &local_res10,param_2 + 0x26,param_2 + 0x3e,local_res8);
  puVar6 = local_res10;
  if (((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10 + -8, puVar1 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar2 = (int *)(puVar6 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar5);
  }
  return;
}



void FUN_14011f9a0(longlong param_1,longlong param_2)

{
  void *_Src;
  longlong lVar1;
  void *pvVar2;
  int iVar3;
  void *local_40;
  void *local_38;
  void *local_30;
  
  iVar3 = 0;
  local_40 = (void *)0x0;
  local_38 = (void *)0x0;
  local_30 = (void *)0x0;
  if (0 < *(short *)(param_2 + 0xf)) {
    pvVar2 = (void *)(param_2 + 0x39);
    do {
      if ((pvVar2 < local_38) && (local_40 <= pvVar2)) {
        lVar1 = (longlong)pvVar2 - (longlong)local_40;
        if (local_38 == local_30) {
          FUN_14004b140(&local_40);
        }
        _Src = (void *)((lVar1 / 0x5e) * 0x5e + (longlong)local_40);
      }
      else {
        _Src = pvVar2;
        if (local_38 == local_30) {
          FUN_14004b140(&local_40);
        }
      }
      if (local_38 != (void *)0x0) {
        memcpy(local_38,_Src,0x5e);
      }
      local_38 = (void *)((longlong)local_38 + 0x5e);
      pvVar2 = (void *)((longlong)pvVar2 + 0x5e);
      iVar3 = iVar3 + 1;
    } while (iVar3 < *(short *)(param_2 + 0xf));
  }
  *(int *)(param_1 + 0x618) = *(int *)(param_1 + 0x618) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x1e0))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,param_2 + 0x21
             ,param_2 + 0xe,param_2 + 0x11,&local_40);
  if (local_40 != (void *)0x0) {
    operator_delete(local_40);
  }
  return;
}



void FUN_14011fb10(longlong param_1,longlong param_2)

{
  longlong lVar1;
  void *_Src;
  void *pvVar2;
  int iVar3;
  undefined4 local_res8 [2];
  void *local_40;
  void *local_38;
  void *local_30;
  
  iVar3 = 0;
  local_40 = (void *)0x0;
  local_38 = (void *)0x0;
  local_30 = (void *)0x0;
  if (0 < *(short *)(param_2 + 0xe)) {
    pvVar2 = (void *)(param_2 + 0x10);
    do {
      if ((pvVar2 < local_38) && (local_40 <= pvVar2)) {
        lVar1 = ((longlong)pvVar2 - (longlong)local_40) +
                SUB168(SEXT816(-0x6c657a3bf6c657a3) * SEXT816((longlong)pvVar2 - (longlong)local_40)
                       ,8);
        if (local_38 == local_30) {
          FUN_14004b200(&local_40);
        }
        _Src = (void *)(((lVar1 >> 6) - (lVar1 >> 0x3f)) * 0x6f + (longlong)local_40);
      }
      else {
        _Src = pvVar2;
        if (local_38 == local_30) {
          FUN_14004b200(&local_40);
        }
      }
      if (local_38 != (void *)0x0) {
        memcpy(local_38,_Src,0x6f);
      }
      local_38 = (void *)((longlong)local_38 + 0x6f);
      pvVar2 = (void *)((longlong)pvVar2 + 0x6f);
      iVar3 = iVar3 + 1;
    } while (iVar3 < *(short *)(param_2 + 0xe));
  }
  *(int *)(param_1 + 0x620) = *(int *)(param_1 + 0x620) + 1;
  local_res8[0] = *(undefined4 *)(param_2 + 4);
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x200))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res8,
             &local_40);
  if (local_40 != (void *)0x0) {
    operator_delete(local_40);
  }
  return;
}



void FUN_14011fc70(longlong param_1,longlong param_2)

{
  longlong lVar1;
  void *_Src;
  void *pvVar2;
  int iVar3;
  void *local_40;
  void *local_38;
  void *local_30;
  
  iVar3 = 0;
  local_40 = (void *)0x0;
  local_38 = (void *)0x0;
  local_30 = (void *)0x0;
  if (0 < *(short *)(param_2 + 0x1e)) {
    pvVar2 = (void *)(param_2 + 0x20);
    do {
      if ((pvVar2 < local_38) && (local_40 <= pvVar2)) {
        lVar1 = ((longlong)pvVar2 - (longlong)local_40) +
                SUB168(SEXT816(-0x4de9bd37a6f4de9b) * SEXT816((longlong)pvVar2 - (longlong)local_40)
                       ,8);
        if (local_38 == local_30) {
          FUN_14004b430(&local_40);
        }
        _Src = (void *)(((lVar1 >> 6) - (lVar1 >> 0x3f)) * 0x5c + (longlong)local_40);
      }
      else {
        _Src = pvVar2;
        if (local_38 == local_30) {
          FUN_14004b430(&local_40);
        }
      }
      if (local_38 != (void *)0x0) {
        memcpy(local_38,_Src,0x5c);
      }
      local_38 = (void *)((longlong)local_38 + 0x5c);
      pvVar2 = (void *)((longlong)pvVar2 + 0x5c);
      iVar3 = iVar3 + 1;
    } while (iVar3 < *(short *)(param_2 + 0x1e));
  }
  *(int *)(param_1 + 0x63c) = *(int *)(param_1 + 0x63c) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x270))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,param_2 + 0xe,
             &local_40);
  if (local_40 != (void *)0x0) {
    operator_delete(local_40);
  }
  return;
}



void FUN_14011fdd0(longlong param_1,longlong param_2)

{
  longlong lVar1;
  undefined4 uVar2;
  undefined1 *puVar3;
  int iVar4;
  undefined1 *local_40;
  undefined1 *local_38;
  undefined1 *local_30;
  
  iVar4 = 0;
  local_40 = (undefined1 *)0x0;
  local_38 = (undefined1 *)0x0;
  local_30 = (undefined1 *)0x0;
  if (0 < *(short *)(param_2 + 0x1e)) {
    puVar3 = (undefined1 *)(param_2 + 0x20);
    do {
      if ((puVar3 < local_38) && (local_40 <= puVar3)) {
        lVar1 = ((longlong)puVar3 - (longlong)local_40) / 9;
        if (local_38 == local_30) {
          FUN_14004bad0(&local_40);
        }
        if (local_38 != (undefined1 *)0x0) {
          *local_38 = local_40[lVar1 * 9];
          *(undefined4 *)(local_38 + 1) = *(undefined4 *)(local_40 + lVar1 * 9 + 1);
          uVar2 = *(undefined4 *)(local_40 + lVar1 * 9 + 5);
LAB_14011fead:
          *(undefined4 *)(local_38 + 5) = uVar2;
        }
      }
      else {
        if (local_38 == local_30) {
          FUN_14004bad0(&local_40);
        }
        if (local_38 != (undefined1 *)0x0) {
          *local_38 = *puVar3;
          *(undefined4 *)(local_38 + 1) = *(undefined4 *)(puVar3 + 1);
          uVar2 = *(undefined4 *)(puVar3 + 5);
          goto LAB_14011fead;
        }
      }
      local_38 = local_38 + 9;
      puVar3 = puVar3 + 9;
      iVar4 = iVar4 + 1;
    } while (iVar4 < *(short *)(param_2 + 0x1e));
  }
  *(int *)(param_1 + 0x6c8) = *(int *)(param_1 + 0x6c8) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x4a0))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,param_2 + 0xe,
             &local_40);
  if (local_40 != (undefined1 *)0x0) {
    operator_delete(local_40);
  }
  return;
}



void FUN_14011ff30(longlong param_1,longlong param_2)

{
  void *_Src;
  longlong lVar1;
  void *pvVar2;
  int iVar3;
  void *local_40;
  void *local_38;
  void *local_30;
  
  iVar3 = 0;
  local_40 = (void *)0x0;
  local_38 = (void *)0x0;
  local_30 = (void *)0x0;
  if (0 < *(short *)(param_2 + 0x1e)) {
    pvVar2 = (void *)(param_2 + 0x20);
    do {
      if ((pvVar2 < local_38) && (local_40 <= pvVar2)) {
        lVar1 = (longlong)pvVar2 - (longlong)local_40;
        if (local_38 == local_30) {
          FUN_14004b4e0(&local_40);
        }
        _Src = (void *)((lVar1 / 0x85) * 0x85 + (longlong)local_40);
      }
      else {
        _Src = pvVar2;
        if (local_38 == local_30) {
          FUN_14004b4e0(&local_40);
        }
      }
      if (local_38 != (void *)0x0) {
        memcpy(local_38,_Src,0x85);
      }
      local_38 = (void *)((longlong)local_38 + 0x85);
      pvVar2 = (void *)((longlong)pvVar2 + 0x85);
      iVar3 = iVar3 + 1;
    } while (iVar3 < *(short *)(param_2 + 0x1e));
  }
  *(int *)(param_1 + 0x644) = *(int *)(param_1 + 0x644) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x290))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,param_2 + 0xe,
             &local_40);
  if (local_40 != (void *)0x0) {
    operator_delete(local_40);
  }
  return;
}



void FUN_140120090(longlong param_1,longlong param_2)

{
  void *_Src;
  longlong lVar1;
  void *pvVar2;
  int iVar3;
  void *local_40;
  void *local_38;
  void *local_30;
  
  iVar3 = 0;
  local_40 = (void *)0x0;
  local_38 = (void *)0x0;
  local_30 = (void *)0x0;
  if (0 < *(short *)(param_2 + 0x1e)) {
    pvVar2 = (void *)(param_2 + 0x20);
    do {
      if ((pvVar2 < local_38) && (local_40 <= pvVar2)) {
        lVar1 = ((longlong)pvVar2 - (longlong)local_40) / 6 +
                ((longlong)pvVar2 - (longlong)local_40 >> 0x3f);
        if (local_38 == local_30) {
          FUN_14004aaa0(&local_40);
        }
        _Src = (void *)(((lVar1 >> 5) - (lVar1 >> 0x3f)) * 0xc0 + (longlong)local_40);
      }
      else {
        _Src = pvVar2;
        if (local_38 == local_30) {
          FUN_14004aaa0(&local_40);
        }
      }
      if (local_38 != (void *)0x0) {
        memcpy(local_38,_Src,0xc0);
      }
      local_38 = (void *)((longlong)local_38 + 0xc0);
      pvVar2 = (void *)((longlong)pvVar2 + 0xc0);
      iVar3 = iVar3 + 1;
    } while (iVar3 < *(short *)(param_2 + 0x1e));
  }
  *(int *)(param_1 + 0x648) = *(int *)(param_1 + 0x648) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x2a0))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,param_2 + 0xe,
             &local_40);
  if (local_40 != (void *)0x0) {
    operator_delete(local_40);
  }
  return;
}



void FUN_1401201f0(longlong param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  undefined8 uVar3;
  void *local_30;
  undefined8 local_28;
  undefined8 local_20;
  
  uVar3 = 0xfffffffffffffffe;
  iVar1 = 0;
  local_30 = (void *)0x0;
  local_28 = 0;
  local_20 = 0;
  if (0 < *(short *)(param_2 + 0xe)) {
    lVar2 = param_2 + 0x10;
    do {
      FUN_140049e30(&local_30,lVar2);
      lVar2 = lVar2 + 0x1f;
      iVar1 = iVar1 + 1;
    } while (iVar1 < *(short *)(param_2 + 0xe));
  }
  *(int *)(param_1 + 0x6b4) = *(int *)(param_1 + 0x6b4) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x450))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,&local_30,
             uVar3);
  if (local_30 != (void *)0x0) {
    operator_delete(local_30);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401202a0(longlong param_1,longlong param_2)

{
  short sVar1;
  undefined8 uVar2;
  code *pcVar3;
  undefined8 uVar4;
  undefined8 *puVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  undefined8 *puVar8;
  undefined8 *puVar9;
  ulonglong uVar10;
  undefined8 *puVar11;
  uint uVar12;
  undefined1 auStack_e8 [32];
  undefined8 **local_c8;
  undefined4 local_b8 [2];
  undefined8 *local_b0;
  undefined8 *local_a8;
  undefined8 *local_a0;
  undefined8 *local_90;
  undefined8 *local_88;
  undefined8 local_80;
  undefined8 local_70;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined2 local_50;
  undefined4 uStack_4e;
  undefined2 uStack_4a;
  ulonglong local_48;
  undefined8 *puVar13;
  
  local_70 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_e8;
  if (0 < *(short *)(param_2 + 0xe)) {
    puVar8 = (undefined8 *)(param_2 + 0x10);
    puVar9 = (undefined8 *)0x0;
    local_90 = (undefined8 *)0x0;
    local_88 = (undefined8 *)0x0;
    local_80 = 0;
    local_b0 = (undefined8 *)0x0;
    local_a8 = (undefined8 *)0x0;
    local_a0 = (undefined8 *)0x0;
    local_68 = 0;
    local_60 = 0;
    local_58 = 0;
    local_50 = 0;
    uStack_4e = 0;
    uStack_4a = 0;
    puVar7 = puVar9;
    puVar13 = puVar9;
    if (0 < *(short *)(param_2 + 0xe)) {
      do {
        sVar1 = *(short *)(puVar8 + 2);
        if ((((sVar1 == 3) || (sVar1 == 4)) || (sVar1 == 6)) || (sVar1 == 0xb)) {
          uVar4 = *puVar8;
          uVar2 = puVar8[1];
          local_58 = CONCAT44(*(undefined4 *)((longlong)puVar8 + 0x14),
                              CONCAT22(*(undefined2 *)((longlong)puVar8 + 0x12),sVar1));
          local_50 = *(undefined2 *)(puVar8 + 3);
          uStack_4e = *(undefined4 *)((longlong)puVar8 + 0x1a);
          uStack_4a = *(undefined2 *)((longlong)puVar8 + 0x22);
          local_68 = uVar4;
          local_60 = uVar2;
          if ((&local_68 < local_a8) && (puVar7 <= &local_68)) {
            puVar6 = puVar7;
            if (local_a8 == local_a0) {
              uVar10 = (longlong)local_a8 - (longlong)puVar7 >> 5;
              if (0x7fffffffffffffe < uVar10) {
                std::_Xlength_error("vector<T> too long");
                pcVar3 = (code *)swi(3);
                (*pcVar3)();
                return;
              }
              puVar11 = (undefined8 *)(uVar10 + 1);
              puVar5 = (undefined8 *)((longlong)local_a0 - (longlong)puVar7 >> 5);
              if (puVar5 < puVar11) {
                puVar6 = puVar9;
                if (puVar5 <= (undefined8 *)(0x7ffffffffffffff - ((ulonglong)puVar5 >> 1))) {
                  puVar6 = (undefined8 *)((longlong)puVar5 + ((ulonglong)puVar5 >> 1));
                }
                if (puVar6 < puVar11) {
                  puVar6 = puVar11;
                }
                FUN_140048c10(&local_b0,puVar6);
                puVar6 = local_b0;
              }
            }
            puVar5 = (undefined8 *)
                     (((longlong)&local_68 - (longlong)puVar7 & 0xffffffffffffffe0U) +
                     (longlong)puVar6);
            puVar7 = puVar6;
            if (local_a8 != (undefined8 *)0x0) {
              *local_a8 = *puVar5;
              local_a8[1] = puVar5[1];
              local_a8[2] = puVar5[2];
              uVar4 = puVar5[3];
LAB_140120570:
              local_a8[3] = uVar4;
              puVar7 = local_b0;
            }
          }
          else {
            if (local_a8 == local_a0) {
              uVar10 = (longlong)local_a8 - (longlong)puVar7 >> 5;
              if (0x7fffffffffffffe < uVar10) {
                std::_Xlength_error("vector<T> too long");
                pcVar3 = (code *)swi(3);
                (*pcVar3)();
                return;
              }
              puVar5 = (undefined8 *)(uVar10 + 1);
              puVar6 = (undefined8 *)((longlong)local_a0 - (longlong)puVar7 >> 5);
              if (puVar6 < puVar5) {
                puVar7 = puVar9;
                if (puVar6 <= (undefined8 *)(0x7ffffffffffffff - ((ulonglong)puVar6 >> 1))) {
                  puVar7 = (undefined8 *)((longlong)puVar6 + ((ulonglong)puVar6 >> 1));
                }
                if (puVar7 < puVar5) {
                  puVar7 = puVar5;
                }
                FUN_140048c10(&local_b0,puVar7);
                puVar7 = local_b0;
              }
            }
            if (local_a8 != (undefined8 *)0x0) {
              *local_a8 = uVar4;
              local_a8[1] = uVar2;
              local_a8[2] = local_58;
              uVar4 = CONCAT26(uStack_4a,CONCAT42(uStack_4e,local_50));
              goto LAB_140120570;
            }
          }
          local_a8 = local_a8 + 4;
          if (((longlong)local_a8 - (longlong)puVar7 & 0xffffffffffffffe0U) == 0x600) {
            *(int *)(param_1 + 0x624) = *(int *)(param_1 + 0x624) + 1;
            local_b8[0] = *(undefined4 *)(param_2 + 4);
            local_c8 = &local_b0;
            (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x210))
                      ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                       local_b8);
            puVar7 = local_b0;
            if (local_b0 != local_a8) {
              local_a8 = local_b0;
            }
          }
        }
        else {
          FUN_140047ff0(&local_90,puVar8);
          puVar7 = local_b0;
          if (((longlong)local_88 - (longlong)local_90) / 0xc0 == 0x30) {
            *(int *)(param_1 + 0x5cc) = *(int *)(param_1 + 0x5cc) + 1;
            local_b8[0] = *(undefined4 *)(param_2 + 4);
            local_c8 = &local_90;
            (**(code **)(*(longlong *)(param_1 + 0xa8) + 0xb0))
                      ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                       local_b8);
            puVar7 = local_b0;
            if (local_90 != local_88) {
              local_88 = local_90;
            }
          }
        }
        puVar8 = puVar8 + 0x18;
        uVar12 = (int)puVar13 + 1;
        puVar13 = (undefined8 *)(ulonglong)uVar12;
      } while ((int)uVar12 < (int)*(short *)(param_2 + 0xe));
      if (local_90 != local_88) {
        *(int *)(param_1 + 0x5cc) = *(int *)(param_1 + 0x5cc) + 1;
        local_b8[0] = *(undefined4 *)(param_2 + 4);
        local_c8 = &local_90;
        (**(code **)(*(longlong *)(param_1 + 0xa8) + 0xb0))
                  ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_b8
                  );
        puVar7 = local_b0;
        if (local_90 != local_88) {
          local_88 = local_90;
        }
      }
      puVar9 = puVar7;
      if (puVar7 != local_a8) {
        *(int *)(param_1 + 0x624) = *(int *)(param_1 + 0x624) + 1;
        local_b8[0] = *(undefined4 *)(param_2 + 4);
        local_c8 = &local_b0;
        (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x210))
                  ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_b8
                  );
        puVar9 = local_b0;
        if (local_b0 != local_a8) {
          local_a8 = local_b0;
        }
      }
    }
    if (puVar9 != (undefined8 *)0x0) {
      operator_delete(puVar9);
    }
    local_b0 = (undefined8 *)0x0;
    local_a8 = (undefined8 *)0x0;
    local_a0 = (undefined8 *)0x0;
    if (local_90 != (undefined8 *)0x0) {
      operator_delete(local_90);
    }
  }
  return;
}



void FUN_140120720(longlong param_1,undefined8 *param_2)

{
  code *pcVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  undefined8 *puVar5;
  int iVar6;
  undefined8 *puVar7;
  undefined8 *puVar8;
  undefined8 *puVar9;
  undefined8 *puVar10;
  undefined4 local_res10 [2];
  undefined8 uVar11;
  undefined8 *local_50;
  undefined8 *local_48;
  undefined8 *local_40;
  
  uVar11 = 0xfffffffffffffffe;
  if (0 < *(short *)((longlong)param_2 + 0x1e)) {
    puVar8 = (undefined8 *)0x0;
    local_50 = (undefined8 *)0x0;
    local_48 = (undefined8 *)0x0;
    puVar10 = (undefined8 *)0x0;
    local_40 = (undefined8 *)0x0;
    iVar6 = 0;
    puVar9 = param_2;
    if (0 < *(short *)((longlong)param_2 + 0x1e)) {
      do {
        puVar7 = puVar9 + 4;
        if ((puVar7 < local_48) && (puVar8 <= puVar7)) {
          puVar9 = puVar8;
          if (local_48 == puVar10) {
            uVar3 = (longlong)local_48 - (longlong)puVar8 >> 5;
            if (0x7fffffffffffffe < uVar3) {
              std::_Xlength_error("vector<T> too long");
              pcVar1 = (code *)swi(3);
              (*pcVar1)();
              return;
            }
            uVar3 = uVar3 + 1;
            uVar4 = (longlong)puVar10 - (longlong)puVar8 >> 5;
            if (uVar4 < uVar3) {
              if (0x7ffffffffffffff - (uVar4 >> 1) < uVar4) {
                uVar4 = 0;
              }
              else {
                uVar4 = uVar4 + (uVar4 >> 1);
              }
              if (uVar4 < uVar3) {
                uVar4 = uVar3;
              }
              FUN_140048c10(&local_50,uVar4);
              puVar9 = local_50;
              puVar10 = local_40;
            }
          }
          puVar5 = (undefined8 *)
                   (((longlong)puVar7 - (longlong)puVar8 & 0xffffffffffffffe0U) + (longlong)puVar9);
          puVar8 = puVar9;
          if (local_48 != (undefined8 *)0x0) {
            *local_48 = *puVar5;
            local_48[1] = puVar5[1];
            local_48[2] = puVar5[2];
            uVar2 = puVar5[3];
LAB_1401208ba:
            local_48[3] = uVar2;
            puVar8 = local_50;
            puVar10 = local_40;
          }
        }
        else {
          if (local_48 == puVar10) {
            uVar3 = (longlong)local_48 - (longlong)puVar8 >> 5;
            if (0x7fffffffffffffe < uVar3) {
              std::_Xlength_error("vector<T> too long");
              pcVar1 = (code *)swi(3);
              (*pcVar1)();
              return;
            }
            uVar3 = uVar3 + 1;
            uVar4 = (longlong)puVar10 - (longlong)puVar8 >> 5;
            if (uVar4 < uVar3) {
              if (0x7ffffffffffffff - (uVar4 >> 1) < uVar4) {
                uVar4 = 0;
              }
              else {
                uVar4 = uVar4 + (uVar4 >> 1);
              }
              if (uVar4 < uVar3) {
                uVar4 = uVar3;
              }
              FUN_140048c10(&local_50,uVar4);
              puVar8 = local_50;
              puVar10 = local_40;
            }
          }
          if (local_48 != (undefined8 *)0x0) {
            *local_48 = *puVar7;
            local_48[1] = puVar9[5];
            local_48[2] = puVar9[6];
            uVar2 = puVar9[7];
            goto LAB_1401208ba;
          }
        }
        local_48 = local_48 + 4;
        iVar6 = iVar6 + 1;
        puVar9 = puVar7;
      } while (iVar6 < *(short *)((longlong)param_2 + 0x1e));
    }
    *(int *)(param_1 + 0x608) = *(int *)(param_1 + 0x608) + 1;
    local_res10[0] = *(undefined4 *)((longlong)param_2 + 4);
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x1a0))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 1),&DAT_1403200f0,local_res10,
               (longlong)param_2 + 0xe,&local_50,uVar11);
    if (local_50 != (undefined8 *)0x0) {
      operator_delete(local_50);
    }
  }
  return;
}



void FUN_140120980(longlong param_1,longlong param_2)

{
  undefined4 uVar1;
  longlong lVar2;
  undefined8 *puVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 *local_40;
  undefined8 *local_38;
  undefined8 *local_30;
  
  uVar5 = 0xfffffffffffffffe;
  iVar4 = 0;
  local_40 = (undefined8 *)0x0;
  local_38 = (undefined8 *)0x0;
  local_30 = (undefined8 *)0x0;
  if (0 < *(short *)(param_2 + 0xe)) {
    puVar3 = (undefined8 *)(param_2 + 0x10);
    do {
      if ((puVar3 < local_38) && (local_40 <= puVar3)) {
        lVar2 = ((longlong)puVar3 - (longlong)local_40) / 6 +
                ((longlong)puVar3 - (longlong)local_40 >> 0x3f);
        lVar2 = (lVar2 >> 1) - (lVar2 >> 0x3f);
        if (local_38 == local_30) {
          FUN_14004a920(&local_40);
        }
        if (local_38 != (undefined8 *)0x0) {
          *local_38 = *(undefined8 *)((longlong)local_40 + lVar2 * 0xc);
          uVar1 = *(undefined4 *)((longlong)local_40 + lVar2 * 0xc + 8);
LAB_140120a54:
          *(undefined4 *)(local_38 + 1) = uVar1;
        }
      }
      else {
        if (local_38 == local_30) {
          FUN_14004a920(&local_40);
        }
        if (local_38 != (undefined8 *)0x0) {
          *local_38 = *puVar3;
          uVar1 = *(undefined4 *)(puVar3 + 1);
          goto LAB_140120a54;
        }
      }
      local_38 = (undefined8 *)((longlong)local_38 + 0xc);
      puVar3 = (undefined8 *)((longlong)puVar3 + 0xc);
      iVar4 = iVar4 + 1;
    } while (iVar4 < *(short *)(param_2 + 0xe));
  }
  *(int *)(param_1 + 0x5b4) = *(int *)(param_1 + 0x5b4) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x50))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,&local_40,
             uVar5);
  if (local_40 != (undefined8 *)0x0) {
    operator_delete(local_40);
  }
  return;
}



void FUN_140120ad0(longlong param_1,longlong param_2)

{
  void *_Src;
  longlong lVar1;
  void *pvVar2;
  int iVar3;
  undefined4 local_res10 [2];
  void *local_50;
  void *local_48;
  void *local_40;
  
  if ((*(short *)(param_2 + 0xc) == 0x115) || (*(short *)(param_2 + 0xc) == 0x116)) {
    iVar3 = 0;
    local_50 = (void *)0x0;
    local_48 = (void *)0x0;
    local_40 = (void *)0x0;
    if (*(short *)(param_2 + 0x1e) < 1) {
      *(int *)(param_1 + 0x668) = *(int *)(param_1 + 0x668) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 800))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe,&local_50,0xfffffffffffffffe);
    }
    else {
      pvVar2 = (void *)(param_2 + 0x20);
      if (0 < *(short *)(param_2 + 0x1e)) {
        do {
          if ((pvVar2 < local_48) && (local_50 <= pvVar2)) {
            lVar1 = (longlong)pvVar2 - (longlong)local_50;
            if (local_48 == local_40) {
              FUN_14004b720(&local_50);
            }
            _Src = (void *)((lVar1 / 0x50) * 0x50 + (longlong)local_50);
          }
          else {
            _Src = pvVar2;
            if (local_48 == local_40) {
              FUN_14004b720(&local_50);
            }
          }
          if (local_48 != (void *)0x0) {
            memcpy(local_48,_Src,0x50);
          }
          local_48 = (void *)((longlong)local_48 + 0x50);
          pvVar2 = (void *)((longlong)pvVar2 + 0x50);
          iVar3 = iVar3 + 1;
        } while (iVar3 < *(short *)(param_2 + 0x1e));
      }
      *(int *)(param_1 + 0x668) = *(int *)(param_1 + 0x668) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 800))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe,&local_50);
      if (local_50 != local_48) {
        local_48 = local_50;
      }
    }
    if (local_50 != (void *)0x0) {
      operator_delete(local_50);
    }
  }
  return;
}



void FUN_140120cb0(longlong param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  undefined *puVar6;
  int iVar7;
  int local_res10 [2];
  undefined4 local_res18 [2];
  undefined *local_res20;
  
  if (*(short *)(param_2 + 0xc) != 0x115) {
    *(int *)(param_1 + 0x5ac) = *(int *)(param_1 + 0x5ac) + 1;
    local_res10[0] = (int)*(short *)(param_2 + 0xc);
    local_res18[0] = *(undefined4 *)(param_2 + 4);
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x30))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res18,
               local_res10);
    return;
  }
  *(int *)(param_1 + 0x66c) = *(int *)(param_1 + 0x66c) + 1;
  local_res10[0] = (int)*(short *)(param_2 + 0xc);
  FUN_1401568c0();
  local_res20 = PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(param_2 + 0xe);
  iVar7 = 0;
  if ((local_res20 != (undefined *)0x0) && (local_res20 != PTR_DAT_1403200a0)) {
    iVar7 = *(int *)(local_res20 + -8);
  }
  iVar4 = iVar3;
  if (((iVar3 <= iVar7) && (iVar4 = 0, local_res20 != (undefined *)0x0)) &&
     (local_res20 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res20 + -8);
  }
  iVar7 = 1;
  if (1 < iVar4) {
    iVar7 = iVar4;
  }
  iVar4 = 0;
  if ((local_res20 != (undefined *)0x0) && (iVar4 = 0, local_res20 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res20 + -8);
  }
  if (iVar4 < iVar7) {
    FUN_14004f590(&local_res20);
  }
  FUN_14004f670(&local_res20);
  puVar6 = local_res20;
  if (local_res20 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar6,param_2 + 0xe,iVar3);
  puVar6 = local_res20;
  if (local_res20 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar6);
  iVar7 = 0;
  if (0 < iVar3) {
    iVar7 = iVar3;
  }
  iVar3 = 0;
  if ((local_res20 != (undefined *)0x0) && (iVar3 = 0, local_res20 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_res20 + -8);
  }
  if ((iVar3 <= iVar7) && (iVar7 = 0, local_res20 != (undefined *)0x0)) {
    if (local_res20 == PTR_DAT_1403200a0) goto LAB_140120e42;
    iVar7 = *(int *)(local_res20 + -8);
  }
  if (((local_res20 != PTR_DAT_1403200a0) && (local_res20 != (undefined *)0x0)) &&
     ((int *)(local_res20 + -8) != (int *)0x0)) {
    *(int *)(local_res20 + -8) = iVar7;
    *(undefined2 *)(local_res20 + (longlong)iVar7 * 2) = 0;
  }
LAB_140120e42:
  local_res18[0] = *(undefined4 *)(param_2 + 4);
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x330))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res18,
             &local_res20,param_2 + 0x2e,local_res10);
  puVar6 = local_res20;
  if (((local_res20 != (undefined *)0x0) && (local_res20 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res20 + -8, puVar1 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar2 = (int *)(puVar6 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar5);
  }
  return;
}



void FUN_140120ef0(longlong param_1,longlong param_2)

{
  void *_Src;
  longlong lVar1;
  void *pvVar2;
  int iVar3;
  undefined4 local_res10 [2];
  void *local_50;
  void *local_48;
  void *local_40;
  
  if ((*(short *)(param_2 + 0xc) == 0xe9) || (*(short *)(param_2 + 0xc) == 0xea)) {
    iVar3 = 0;
    local_50 = (void *)0x0;
    local_48 = (void *)0x0;
    local_40 = (void *)0x0;
    if (*(short *)(param_2 + 0x1e) < 1) {
      *(int *)(param_1 + 0x6c0) = *(int *)(param_1 + 0x6c0) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x480))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe,&local_50,0xfffffffffffffffe);
    }
    else {
      pvVar2 = (void *)(param_2 + 0x20);
      if (0 < *(short *)(param_2 + 0x1e)) {
        do {
          if ((pvVar2 < local_48) && (local_50 <= pvVar2)) {
            lVar1 = ((longlong)pvVar2 - (longlong)local_50) / 6 +
                    ((longlong)pvVar2 - (longlong)local_50 >> 0x3f);
            if (local_48 == local_40) {
              FUN_14004aaa0(&local_50);
            }
            _Src = (void *)(((lVar1 >> 5) - (lVar1 >> 0x3f)) * 0xc0 + (longlong)local_50);
          }
          else {
            _Src = pvVar2;
            if (local_48 == local_40) {
              FUN_14004aaa0(&local_50);
            }
          }
          if (local_48 != (void *)0x0) {
            memcpy(local_48,_Src,0xc0);
          }
          local_48 = (void *)((longlong)local_48 + 0xc0);
          pvVar2 = (void *)((longlong)pvVar2 + 0xc0);
          iVar3 = iVar3 + 1;
        } while (iVar3 < *(short *)(param_2 + 0x1e));
      }
      *(int *)(param_1 + 0x6c0) = *(int *)(param_1 + 0x6c0) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x480))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,param_2 + 0xe,&local_50);
      if (local_50 != local_48) {
        local_48 = local_50;
      }
    }
    if (local_50 != (void *)0x0) {
      operator_delete(local_50);
    }
  }
  return;
}



void FUN_1401210d0(longlong param_1,longlong param_2)

{
  undefined4 local_res10 [6];
  
  if ((*(short *)(param_2 + 0xc) == 0xe9) || (*(short *)(param_2 + 0xc) == 0xea)) {
    *(int *)(param_1 + 0x6c4) = *(int *)(param_1 + 0x6c4) + 1;
    local_res10[0] = *(undefined4 *)(param_2 + 4);
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x490))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res10,
               param_2 + 0xe,param_2 + 0x1e,param_2 + 0x22,param_2 + 0x26,param_2 + 0x2a);
  }
  return;
}



void FUN_140121160(longlong param_1,longlong param_2)

{
  longlong lVar1;
  int iVar2;
  longlong lVar3;
  undefined4 local_res10 [2];
  void *local_40;
  void *local_38;
  undefined8 local_30;
  
  iVar2 = 0;
  local_40 = (void *)0x0;
  local_38 = (void *)0x0;
  local_30 = 0;
  if (*(short *)(param_2 + 0xe) < 1) {
    local_res10[0] = *(undefined4 *)(param_2 + 4);
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x150))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res10,
               &local_40);
  }
  else {
    lVar3 = param_2 + 0x12;
    do {
      FUN_1400488c0(&local_40,lVar3);
      lVar1 = SUB168(SEXT816(-0x608b85ead287c92f) * SEXT816((longlong)local_38 - (longlong)local_40)
                     ,8) + ((longlong)local_38 - (longlong)local_40);
      if ((lVar1 >> 9) - (lVar1 >> 0x3f) == 0x19) {
        *(int *)(param_1 + 0x5f4) = *(int *)(param_1 + 0x5f4) + 1;
        local_res10[0] = *(undefined4 *)(param_2 + 4);
        (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x150))
                  ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                   local_res10,&local_40);
        if (local_40 != local_38) {
          local_38 = local_40;
        }
      }
      lVar3 = lVar3 + 0x336;
      iVar2 = iVar2 + 1;
    } while (iVar2 < *(short *)(param_2 + 0xe));
    if (local_40 != local_38) {
      *(int *)(param_1 + 0x5f4) = *(int *)(param_1 + 0x5f4) + 1;
      local_res10[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x150))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                 local_res10,&local_40);
      if (local_40 != local_38) {
        local_38 = local_40;
      }
    }
  }
  if (local_40 != (void *)0x0) {
    operator_delete(local_40);
  }
  return;
}



void FUN_140121310(longlong param_1,longlong param_2)

{
  void *_Src;
  uint uVar1;
  void *pvVar3;
  void *pvVar4;
  void *pvVar5;
  undefined4 local_res8 [2];
  void *local_50;
  void *local_48;
  void *local_40;
  void *pvVar2;
  
  pvVar2 = (void *)0x0;
  local_50 = (void *)0x0;
  local_48 = (void *)0x0;
  local_40 = (void *)0x0;
  if (0 < *(short *)(param_2 + 0xe)) {
    pvVar3 = (void *)(param_2 + 0x10);
    pvVar5 = pvVar2;
    do {
      if ((pvVar3 < local_48) && (pvVar5 <= pvVar3)) {
        pvVar4 = pvVar5;
        if (local_48 == local_40) {
          FUN_14004afc0(&local_50);
          pvVar4 = local_50;
        }
        _Src = (void *)((((longlong)pvVar3 - (longlong)pvVar5) / 0xd0) * 0xd0 + (longlong)pvVar4);
        pvVar5 = pvVar4;
      }
      else {
        _Src = pvVar3;
        if (local_48 == local_40) {
          FUN_14004afc0(&local_50);
          pvVar5 = local_50;
        }
      }
      if (local_48 != (void *)0x0) {
        memcpy(local_48,_Src,0xd0);
        pvVar5 = local_50;
      }
      local_48 = (void *)((longlong)local_48 + 0xd0);
      if (((longlong)local_48 - (longlong)pvVar5) / 0xd0 == 0x19) {
        *(int *)(param_1 + 0x5f8) = *(int *)(param_1 + 0x5f8) + 1;
        local_res8[0] = *(undefined4 *)(param_2 + 4);
        (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x160))
                  ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                   local_res8,&local_50);
        pvVar5 = local_50;
        if (local_50 != local_48) {
          local_48 = local_50;
        }
      }
      pvVar3 = (void *)((longlong)pvVar3 + 0xd0);
      uVar1 = (int)pvVar2 + 1;
      pvVar2 = (void *)(ulonglong)uVar1;
    } while ((int)uVar1 < (int)*(short *)(param_2 + 0xe));
    if (pvVar5 != local_48) {
      *(int *)(param_1 + 0x5f8) = *(int *)(param_1 + 0x5f8) + 1;
      local_res8[0] = *(undefined4 *)(param_2 + 4);
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x160))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res8
                 ,&local_50);
      if (local_50 != local_48) {
        local_48 = local_50;
      }
    }
  }
  *(int *)(param_1 + 0x5f8) = *(int *)(param_1 + 0x5f8) + 1;
  local_res8[0] = *(undefined4 *)(param_2 + 4);
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x160))
            ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_res8,
             &local_50);
  if (local_50 != (void *)0x0) {
    operator_delete(local_50);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140121530(longlong param_1,longlong param_2)

{
  undefined8 uVar1;
  code *pcVar2;
  undefined8 uVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  ulonglong uVar8;
  undefined8 *puVar9;
  uint uVar10;
  undefined8 *puVar12;
  undefined1 auStack_e8 [32];
  undefined8 **local_c8;
  char *local_c0;
  char local_b8 [4];
  undefined4 local_b4;
  undefined8 *local_b0;
  undefined8 *local_a8;
  undefined8 *local_a0;
  undefined8 *local_90;
  undefined8 *local_88;
  undefined8 local_80;
  undefined8 local_70;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  ulonglong local_48;
  undefined8 *puVar11;
  
  local_70 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_e8;
  puVar12 = (undefined8 *)0x0;
  local_90 = (undefined8 *)0x0;
  local_88 = (undefined8 *)0x0;
  local_80 = 0;
  if (0 < *(short *)(param_2 + 0xe)) {
    puVar7 = (undefined8 *)(param_2 + 0x11);
    local_b0 = (undefined8 *)0x0;
    local_a8 = (undefined8 *)0x0;
    local_a0 = (undefined8 *)0x0;
    local_68 = 0;
    local_60 = 0;
    local_58 = 0;
    local_50 = 0;
    puVar6 = puVar12;
    puVar11 = puVar12;
    do {
      if (*(short *)(puVar7 + 3) == 0xff) {
        uVar3 = *puVar7;
        uVar1 = puVar7[1];
        local_58 = puVar7[2];
        local_50 = *(undefined8 *)((longlong)puVar7 + 0x2e);
        local_68 = uVar3;
        local_60 = uVar1;
        if ((&local_68 < local_a8) && (puVar6 <= &local_68)) {
          puVar5 = puVar6;
          if (local_a8 == local_a0) {
            uVar8 = (longlong)local_a8 - (longlong)puVar6 >> 5;
            if (0x7fffffffffffffe < uVar8) {
              std::_Xlength_error("vector<T> too long");
              pcVar2 = (code *)swi(3);
              (*pcVar2)();
              return;
            }
            puVar9 = (undefined8 *)(uVar8 + 1);
            puVar4 = (undefined8 *)((longlong)local_a0 - (longlong)puVar6 >> 5);
            if (puVar4 < puVar9) {
              puVar5 = puVar12;
              if (puVar4 <= (undefined8 *)(0x7ffffffffffffff - ((ulonglong)puVar4 >> 1))) {
                puVar5 = (undefined8 *)((longlong)puVar4 + ((ulonglong)puVar4 >> 1));
              }
              if (puVar5 < puVar9) {
                puVar5 = puVar9;
              }
              FUN_140048c10(&local_b0,puVar5);
              puVar5 = local_b0;
            }
          }
          puVar4 = (undefined8 *)
                   (((longlong)&local_68 - (longlong)puVar6 & 0xffffffffffffffe0U) +
                   (longlong)puVar5);
          puVar6 = puVar5;
          if (local_a8 != (undefined8 *)0x0) {
            *local_a8 = *puVar4;
            local_a8[1] = puVar4[1];
            local_a8[2] = puVar4[2];
            uVar3 = puVar4[3];
LAB_140121741:
            local_a8[3] = uVar3;
            puVar6 = local_b0;
          }
        }
        else {
          if (local_a8 == local_a0) {
            uVar8 = (longlong)local_a8 - (longlong)puVar6 >> 5;
            if (0x7fffffffffffffe < uVar8) {
              std::_Xlength_error("vector<T> too long");
              pcVar2 = (code *)swi(3);
              (*pcVar2)();
              return;
            }
            puVar4 = (undefined8 *)(uVar8 + 1);
            puVar5 = (undefined8 *)((longlong)local_a0 - (longlong)puVar6 >> 5);
            if (puVar5 < puVar4) {
              puVar6 = puVar12;
              if (puVar5 <= (undefined8 *)(0x7ffffffffffffff - ((ulonglong)puVar5 >> 1))) {
                puVar6 = (undefined8 *)((longlong)puVar5 + ((ulonglong)puVar5 >> 1));
              }
              if (puVar6 < puVar4) {
                puVar6 = puVar4;
              }
              FUN_140048c10(&local_b0,puVar6);
              puVar6 = local_b0;
            }
          }
          if (local_a8 != (undefined8 *)0x0) {
            *local_a8 = uVar3;
            local_a8[1] = uVar1;
            local_a8[2] = local_58;
            uVar3 = local_50;
            goto LAB_140121741;
          }
        }
        local_a8 = local_a8 + 4;
        if (((longlong)local_a8 - (longlong)puVar6 & 0xffffffffffffffe0U) == 0x640) {
          *(int *)(param_1 + 0x628) = *(int *)(param_1 + 0x628) + 1;
          local_b4 = *(undefined4 *)(param_2 + 4);
          local_c8 = &local_b0;
          (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x220))
                    ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                     &local_b4);
          puVar6 = local_b0;
          if (local_b0 != local_a8) {
            local_a8 = local_b0;
          }
        }
      }
      else {
        FUN_140048300(&local_90,puVar7);
        puVar6 = local_b0;
        if (((longlong)local_88 - (longlong)local_90) / 0x38 == 0x32) {
          *(int *)(param_1 + 0x5dc) = *(int *)(param_1 + 0x5dc) + 1;
          local_b8[0] = '\0';
          local_b4 = *(undefined4 *)(param_2 + 4);
          local_c0 = local_b8;
          local_c8 = &local_90;
          (**(code **)(*(longlong *)(param_1 + 0xa8) + 0xf0))
                    ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                     &local_b4);
          puVar6 = local_b0;
          if (local_90 != local_88) {
            local_88 = local_90;
          }
        }
      }
      puVar7 = puVar7 + 7;
      uVar10 = (int)puVar11 + 1;
      puVar11 = (undefined8 *)(ulonglong)uVar10;
    } while ((int)uVar10 < (int)*(short *)(param_2 + 0xe));
    if (puVar6 != local_a8) {
      *(int *)(param_1 + 0x628) = *(int *)(param_1 + 0x628) + 1;
      local_b4 = *(undefined4 *)(param_2 + 4);
      local_c8 = &local_b0;
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x220))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,&local_b4)
      ;
      puVar6 = local_b0;
      if (local_b0 != local_a8) {
        local_a8 = local_b0;
      }
    }
    if ((*(char *)(param_2 + 0x10) == '\0') && (local_90 != local_88)) {
      *(int *)(param_1 + 0x5dc) = *(int *)(param_1 + 0x5dc) + 1;
      local_b8[0] = '\0';
      local_b4 = *(undefined4 *)(param_2 + 4);
      local_c0 = local_b8;
      local_c8 = &local_90;
      (**(code **)(*(longlong *)(param_1 + 0xa8) + 0xf0))
                ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,&local_b4)
      ;
      puVar6 = local_b0;
      if (local_90 != local_88) {
        local_88 = local_90;
      }
    }
    if (puVar6 != (undefined8 *)0x0) {
      operator_delete(puVar6);
    }
  }
  if (*(char *)(param_2 + 0x10) != '\0') {
    *(int *)(param_1 + 0x5dc) = *(int *)(param_1 + 0x5dc) + 1;
    local_b4 = *(undefined4 *)(param_2 + 4);
    local_c8 = &local_90;
    local_c0 = (char *)(param_2 + 0x10);
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0xf0))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,&local_b4);
    if (local_90 != local_88) {
      local_88 = local_90;
    }
  }
  if (local_90 != (undefined8 *)0x0) {
    operator_delete(local_90);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

void FUN_1401219e0(longlong param_1,longlong param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  longlong lVar3;
  longlong lVar4;
  short *psVar5;
  undefined1 auStack_2d8 [32];
  int *local_2b8;
  int *local_2b0;
  undefined4 local_2a8;
  int local_2a4 [2];
  int aiStack_29c [33];
  undefined8 local_218;
  undefined8 local_210;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_2d8;
  if (*(short *)(param_2 + 0xc) == 0x9d) {
    lVar3 = 0;
    puVar1 = &local_218;
    lVar4 = lVar3;
    do {
      aiStack_29c[lVar4 + 1] = 0;
      *(undefined4 *)puVar1 = 0;
      *(undefined4 *)((longlong)puVar1 + 4) = 0;
      *(undefined4 *)(puVar1 + 1) = 0;
      lVar4 = lVar4 + 1;
      *(undefined4 *)((longlong)puVar1 + 0xc) = 0;
      puVar1 = puVar1 + 2;
    } while (lVar4 < 0x20);
    psVar5 = (short *)(param_2 + 0x10);
    puVar1 = &local_218;
    do {
      lVar3 = lVar3 + 1;
      puVar2 = puVar1 + 2;
      aiStack_29c[lVar3] = (int)*psVar5;
      psVar5 = psVar5 + 1;
      *puVar1 = *(undefined8 *)((param_2 - (longlong)&local_218) + 0x40 + (longlong)puVar2);
      puVar1[1] = *(undefined8 *)((param_2 - (longlong)&local_218) + 0x48 + (longlong)puVar2);
      puVar1 = puVar2;
    } while (lVar3 < 0x20);
    *(int *)(param_1 + 0x5d4) = *(int *)(param_1 + 0x5d4) + 1;
    local_2a4[0] = (int)*(short *)(param_2 + 0xe);
    local_2b0 = local_2a4;
    local_2a8 = *(undefined4 *)(param_2 + 4);
    local_2b8 = aiStack_29c + 1;
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0xd0))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,&local_2a8);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

void FUN_140121b10(longlong param_1,longlong param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  longlong lVar3;
  longlong lVar4;
  short *psVar5;
  undefined1 auStack_2d8 [32];
  int *local_2b8;
  undefined4 local_2a8 [3];
  int aiStack_29c [33];
  undefined8 local_218;
  undefined8 local_210;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_2d8;
  if (*(short *)(param_2 + 0xc) == 0x9d) {
    lVar4 = 0;
    puVar1 = &local_218;
    lVar3 = lVar4;
    do {
      aiStack_29c[lVar3 + 1] = 0;
      *(undefined4 *)puVar1 = 0;
      *(undefined4 *)((longlong)puVar1 + 4) = 0;
      *(undefined4 *)(puVar1 + 1) = 0;
      lVar3 = lVar3 + 1;
      *(undefined4 *)((longlong)puVar1 + 0xc) = 0;
      puVar1 = puVar1 + 2;
    } while (lVar3 < 0x20);
    psVar5 = (short *)(param_2 + 0xe);
    puVar1 = &local_218;
    do {
      lVar4 = lVar4 + 1;
      puVar2 = puVar1 + 2;
      aiStack_29c[lVar4] = (int)*psVar5;
      psVar5 = psVar5 + 1;
      *puVar1 = *(undefined8 *)((param_2 - (longlong)&local_218) + 0x3e + (longlong)puVar2);
      puVar1[1] = *(undefined8 *)((param_2 - (longlong)&local_218) + 0x46 + (longlong)puVar2);
      puVar1 = puVar2;
    } while (lVar4 < 0x20);
    *(int *)(param_1 + 0x5d4) = *(int *)(param_1 + 0x5d4) + 1;
    local_2a8[0] = *(undefined4 *)(param_2 + 4);
    local_2b8 = aiStack_29c + 1;
    (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x510))
              ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,local_2a8);
  }
  return;
}



void FUN_140121c40(longlong param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined8 *puVar2;
  uint uVar3;
  undefined8 *puVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  undefined4 local_res10 [2];
  undefined8 *local_50;
  undefined8 *local_48;
  undefined8 *local_40;
  undefined8 *puVar4;
  
  if (0 < *(short *)(param_2 + 0xe)) {
    puVar5 = (undefined8 *)(param_2 + 0x10);
    puVar4 = (undefined8 *)0x0;
    local_50 = (undefined8 *)0x0;
    local_48 = (undefined8 *)0x0;
    local_40 = (undefined8 *)0x0;
    puVar7 = puVar4;
    if (0 < *(short *)(param_2 + 0xe)) {
      do {
        if ((puVar5 < local_48) && (puVar7 <= puVar5)) {
          puVar6 = puVar7;
          if (local_48 == local_40) {
            FUN_14004ab60(&local_50);
            puVar6 = local_50;
          }
          puVar2 = (undefined8 *)
                   ((((longlong)puVar5 - (longlong)puVar7) / 0x1b) * 0x1b + (longlong)puVar6);
          puVar7 = puVar6;
          if (local_48 != (undefined8 *)0x0) {
            *local_48 = *puVar2;
            local_48[1] = puVar2[1];
            local_48[2] = puVar2[2];
            *(undefined2 *)(local_48 + 3) = *(undefined2 *)(puVar2 + 3);
            uVar1 = *(undefined1 *)((longlong)puVar2 + 0x1a);
LAB_140121d48:
            *(undefined1 *)((longlong)local_48 + 0x1a) = uVar1;
            puVar7 = local_50;
          }
        }
        else {
          if (local_48 == local_40) {
            FUN_14004ab60(&local_50);
            puVar7 = local_50;
          }
          if (local_48 != (undefined8 *)0x0) {
            *local_48 = *puVar5;
            local_48[1] = puVar5[1];
            local_48[2] = puVar5[2];
            *(undefined2 *)(local_48 + 3) = *(undefined2 *)(puVar5 + 3);
            uVar1 = *(undefined1 *)((longlong)puVar5 + 0x1a);
            goto LAB_140121d48;
          }
        }
        local_48 = (undefined8 *)((longlong)local_48 + 0x1b);
        if (((longlong)local_48 - (longlong)puVar7) / 0x1b == 0x1e) {
          *(int *)(param_1 + 0x5d0) = *(int *)(param_1 + 0x5d0) + 1;
          local_res10[0] = *(undefined4 *)(param_2 + 4);
          (**(code **)(*(longlong *)(param_1 + 0xa8) + 0xc0))
                    ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                     local_res10,&local_50);
          puVar7 = local_50;
          if (local_50 != local_48) {
            local_48 = local_50;
          }
        }
        puVar5 = (undefined8 *)((longlong)puVar5 + 0x1b);
        uVar3 = (int)puVar4 + 1;
        puVar4 = (undefined8 *)(ulonglong)uVar3;
      } while ((int)uVar3 < (int)*(short *)(param_2 + 0xe));
      puVar4 = puVar7;
      if (puVar7 != local_48) {
        *(int *)(param_1 + 0x5d0) = *(int *)(param_1 + 0x5d0) + 1;
        local_res10[0] = *(undefined4 *)(param_2 + 4);
        (**(code **)(*(longlong *)(param_1 + 0xa8) + 0xc0))
                  ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                   local_res10,&local_50);
        puVar4 = local_50;
        if (local_50 != local_48) {
          local_48 = local_50;
        }
      }
    }
    if (puVar4 != (undefined8 *)0x0) {
      operator_delete(puVar4);
    }
  }
  return;
}



void FUN_140121e50(longlong param_1,longlong param_2)

{
  undefined4 uVar1;
  undefined8 *puVar2;
  uint uVar3;
  undefined8 *puVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  undefined4 local_res10 [2];
  undefined8 *local_50;
  undefined8 *local_48;
  undefined8 *local_40;
  undefined8 *puVar4;
  
  if (0 < *(short *)(param_2 + 0xe)) {
    puVar5 = (undefined8 *)(param_2 + 0x10);
    puVar4 = (undefined8 *)0x0;
    local_50 = (undefined8 *)0x0;
    local_48 = (undefined8 *)0x0;
    local_40 = (undefined8 *)0x0;
    puVar7 = puVar4;
    if (0 < *(short *)(param_2 + 0xe)) {
      do {
        if ((puVar5 < local_48) && (puVar7 <= puVar5)) {
          puVar6 = puVar7;
          if (local_48 == local_40) {
            FUN_14004b080(&local_50);
            puVar6 = local_50;
          }
          puVar2 = (undefined8 *)
                   ((((longlong)puVar5 - (longlong)puVar7) / 0x1c) * 0x1c + (longlong)puVar6);
          puVar7 = puVar6;
          if (local_48 != (undefined8 *)0x0) {
            *local_48 = *puVar2;
            local_48[1] = puVar2[1];
            local_48[2] = puVar2[2];
            uVar1 = *(undefined4 *)(puVar2 + 3);
LAB_140121f4b:
            *(undefined4 *)(local_48 + 3) = uVar1;
            puVar7 = local_50;
          }
        }
        else {
          if (local_48 == local_40) {
            FUN_14004b080(&local_50);
            puVar7 = local_50;
          }
          if (local_48 != (undefined8 *)0x0) {
            *local_48 = *puVar5;
            local_48[1] = puVar5[1];
            local_48[2] = puVar5[2];
            uVar1 = *(undefined4 *)(puVar5 + 3);
            goto LAB_140121f4b;
          }
        }
        local_48 = (undefined8 *)((longlong)local_48 + 0x1c);
        if (((longlong)local_48 - (longlong)puVar7) / 0x1c == 0x32) {
          *(int *)(param_1 + 0x600) = *(int *)(param_1 + 0x600) + 1;
          local_res10[0] = *(undefined4 *)(param_2 + 4);
          (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x180))
                    ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                     local_res10,&local_50);
          puVar7 = local_50;
          if (local_50 != local_48) {
            local_48 = local_50;
          }
        }
        puVar5 = (undefined8 *)((longlong)puVar5 + 0x1c);
        uVar3 = (int)puVar4 + 1;
        puVar4 = (undefined8 *)(ulonglong)uVar3;
      } while ((int)uVar3 < (int)*(short *)(param_2 + 0xe));
      puVar4 = puVar7;
      if (puVar7 != local_48) {
        *(int *)(param_1 + 0x600) = *(int *)(param_1 + 0x600) + 1;
        local_res10[0] = *(undefined4 *)(param_2 + 4);
        (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x180))
                  ((longlong *)(param_1 + 0xa8),*(undefined4 *)(param_2 + 8),&DAT_1403200f0,
                   local_res10,&local_50);
        puVar4 = local_50;
        if (local_50 != local_48) {
          local_48 = local_50;
        }
      }
    }
    if (puVar4 != (undefined8 *)0x0) {
      operator_delete(puVar4);
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140122060(longlong param_1,undefined4 param_2,undefined4 param_3,undefined8 *param_4,
                  char *param_5)

{
  undefined1 auStack_88 [32];
  undefined4 local_68 [2];
  undefined2 local_60;
  undefined2 local_5e;
  undefined4 local_5c;
  undefined4 local_58;
  undefined2 local_54;
  undefined8 local_52;
  undefined8 local_4a;
  char local_42 [34];
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  local_54 = 0;
  local_42[0] = '\0';
  local_42[1] = '\0';
  local_42[2] = '\0';
  local_42[3] = '\0';
  local_42[4] = '\0';
  local_42[5] = '\0';
  local_42[6] = '\0';
  local_42[7] = '\0';
  local_42[8] = '\0';
  local_42[9] = '\0';
  local_42[10] = '\0';
  local_42[0xb] = '\0';
  local_42[0xc] = '\0';
  local_42[0xd] = '\0';
  local_42[0xe] = '\0';
  local_42[0xf] = '\0';
  local_42[0x10] = '\0';
  local_42[0x11] = '\0';
  local_42[0x12] = '\0';
  local_42[0x13] = '\0';
  local_42[0x14] = '\0';
  local_42[0x15] = '\0';
  local_42[0x16] = '\0';
  local_42[0x17] = '\0';
  local_42[0x18] = '\0';
  local_42[0x19] = '\0';
  local_42[0x1a] = '\0';
  local_42[0x1b] = '\0';
  local_42[0x1c] = '\0';
  local_42[0x1d] = '\0';
  local_42[0x1e] = '\0';
  local_42[0x1f] = '\0';
  local_42[0x20] = 0;
  local_5e = 0x521;
  local_60 = 0x3f;
  local_52 = *param_4;
  local_4a = param_4[1];
  local_5c = param_3;
  local_58 = param_2;
  strncpy(local_42,param_5,0x20);
  FUN_140114b50(*(undefined8 *)(param_1 + 0xe0),&local_60);
  *(int *)(param_1 + 0x6e0) = *(int *)(param_1 + 0x6e0) + 1;
  local_68[0] = param_3;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x500))
            ((longlong *)(param_1 + 0xa8),param_2,&DAT_1403200f0,local_68);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140122130(longlong param_1,undefined4 param_2,undefined4 param_3,char *param_4)

{
  int *piVar1;
  undefined *puVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  undefined *puVar6;
  int iVar7;
  int iVar8;
  undefined1 auStack_128 [32];
  undefined **local_108;
  undefined *local_f8;
  undefined4 local_f0 [2];
  undefined8 local_e8;
  undefined8 local_e0;
  undefined1 local_d8;
  undefined8 local_d0;
  undefined4 local_c8;
  undefined2 local_c4;
  undefined8 local_c2;
  undefined8 local_ba;
  undefined8 local_b2;
  undefined8 local_aa;
  undefined1 local_a2;
  undefined2 local_98;
  undefined2 uStack_96;
  undefined4 uStack_94;
  undefined4 local_90;
  undefined2 local_8c;
  char local_8a [66];
  ulonglong local_48;
  
  local_e8 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_128;
  local_8c = 0;
  local_8a[0] = '\0';
  local_8a[1] = '\0';
  local_8a[2] = '\0';
  local_8a[3] = '\0';
  local_8a[4] = '\0';
  local_8a[5] = '\0';
  local_8a[6] = '\0';
  local_8a[7] = '\0';
  local_8a[8] = '\0';
  local_8a[9] = '\0';
  local_8a[10] = '\0';
  local_8a[0xb] = '\0';
  local_8a[0xc] = '\0';
  local_8a[0xd] = '\0';
  local_8a[0xe] = '\0';
  local_8a[0xf] = '\0';
  local_8a[0x10] = '\0';
  local_8a[0x11] = '\0';
  local_8a[0x12] = '\0';
  local_8a[0x13] = '\0';
  local_8a[0x14] = '\0';
  local_8a[0x15] = '\0';
  local_8a[0x16] = '\0';
  local_8a[0x17] = '\0';
  local_8a[0x18] = '\0';
  local_8a[0x19] = '\0';
  local_8a[0x1a] = '\0';
  local_8a[0x1b] = '\0';
  local_8a[0x1c] = '\0';
  local_8a[0x1d] = '\0';
  local_8a[0x1e] = '\0';
  local_8a[0x1f] = '\0';
  local_8a[0x20] = '\0';
  local_8a[0x21] = '\0';
  local_8a[0x22] = '\0';
  local_8a[0x23] = '\0';
  local_8a[0x24] = '\0';
  local_8a[0x25] = '\0';
  local_8a[0x26] = '\0';
  local_8a[0x27] = '\0';
  local_8a[0x28] = '\0';
  local_8a[0x29] = '\0';
  local_8a[0x2a] = '\0';
  local_8a[0x2b] = '\0';
  local_8a[0x2c] = '\0';
  local_8a[0x2d] = '\0';
  local_8a[0x2e] = '\0';
  local_8a[0x2f] = '\0';
  local_8a[0x30] = '\0';
  local_8a[0x31] = '\0';
  local_8a[0x32] = 0;
  local_d0 = 0;
  local_c8 = 0;
  local_c4 = 0;
  local_c2 = 0;
  local_ba = 0;
  local_b2 = 0;
  local_aa = 0;
  local_a2 = 0;
  uStack_96 = 0x520;
  local_98 = 0x41;
  uStack_94 = param_3;
  local_90 = param_2;
  strncpy(local_8a,param_4,0x32);
  local_c8 = local_90;
  local_c4 = 0x17d;
  local_d0 = CONCAT62((int6)(CONCAT44(uStack_94,CONCAT22(uStack_96,local_98)) >> 0x10),0x2f);
  FUN_1401150e0(*(undefined8 *)(param_1 + 0xe0),&local_98,&local_d0);
  *(int *)(param_1 + 0x6dc) = *(int *)(param_1 + 0x6dc) + 1;
  FUN_1401568c0();
  local_f8 = PTR_DAT_140320098;
  iVar3 = FUN_1401567e0(&local_c2);
  iVar7 = 0;
  iVar8 = iVar7;
  if ((local_f8 != (undefined *)0x0) && (local_f8 != PTR_DAT_140320098)) {
    iVar8 = *(int *)(local_f8 + -8);
  }
  iVar4 = iVar3;
  if (((iVar3 <= iVar8) && (iVar4 = iVar7, local_f8 != (undefined *)0x0)) &&
     (local_f8 != PTR_DAT_140320098)) {
    iVar4 = *(int *)(local_f8 + -8);
  }
  iVar8 = 1;
  if (1 < iVar4) {
    iVar8 = iVar4;
  }
  iVar4 = iVar7;
  if ((local_f8 != (undefined *)0x0) && (local_f8 != PTR_DAT_140320098)) {
    iVar4 = *(int *)(local_f8 + -8);
  }
  if (iVar4 < iVar8) {
    FUN_140124200(&local_f8);
  }
  FUN_1401242e0(&local_f8);
  puVar6 = local_f8;
  if (local_f8 == (undefined *)0x0) {
    puVar6 = PTR_DAT_140320098;
  }
  FUN_140156810(puVar6,&local_c2,iVar3);
  puVar6 = local_f8;
  if (local_f8 == (undefined *)0x0) {
    puVar6 = PTR_DAT_140320098;
  }
  iVar3 = FUN_1401567e0(puVar6);
  iVar8 = 0;
  if (0 < iVar3) {
    iVar8 = iVar3;
  }
  iVar3 = iVar7;
  if ((local_f8 != (undefined *)0x0) && (local_f8 != PTR_DAT_140320098)) {
    iVar3 = *(int *)(local_f8 + -8);
  }
  if ((iVar3 <= iVar8) && (iVar8 = iVar7, local_f8 != (undefined *)0x0)) {
    if (local_f8 == PTR_DAT_140320098) goto LAB_14012231e;
    iVar8 = *(int *)(local_f8 + -8);
  }
  if (((local_f8 != PTR_DAT_140320098) && (local_f8 != (undefined *)0x0)) &&
     (piVar1 = (int *)(local_f8 + -8), piVar1 != (int *)0x0)) {
    *piVar1 = iVar8;
    *(undefined1 *)((longlong)iVar8 + 8 + (longlong)piVar1) = 0;
  }
LAB_14012231e:
  local_108 = &local_f8;
  local_f0[0] = param_3;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x4f0))
            ((longlong *)(param_1 + 0xa8),param_2,&DAT_1403200f0,local_f0);
  puVar6 = local_f8;
  if (((local_f8 != (undefined *)0x0) && (local_f8 != PTR_DAT_140320098)) &&
     (puVar2 = local_f8 + -8, puVar2 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_e0 = uVar5;
    FUN_140156b50(uVar5);
    local_d8 = 1;
    piVar1 = (int *)(puVar6 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2);
    }
    FUN_140156be0(uVar5);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401223c0(longlong param_1,short param_2,char *param_3,wchar_t *param_4,undefined4 param_5,
                 char *param_6,char *param_7,char *param_8)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_118 [32];
  undefined2 local_f8;
  undefined2 local_f6;
  undefined8 local_f4;
  undefined2 local_ec;
  char local_ea [105];
  wchar_t local_81 [16];
  undefined4 local_61;
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  iVar1 = 0;
  local_ea[0] = '\0';
  local_ea[1] = '\0';
  local_ea[2] = '\0';
  local_ea[3] = '\0';
  local_ea[4] = '\0';
  local_ea[5] = '\0';
  local_ea[6] = '\0';
  local_ea[7] = '\0';
  local_ea[8] = '\0';
  local_ea[9] = '\0';
  local_ea[10] = '\0';
  local_ea[0xb] = '\0';
  local_ea[0xc] = '\0';
  local_ea[0xd] = '\0';
  local_ea[0xe] = '\0';
  local_ea[0xf] = '\0';
  local_ea[0x10] = '\0';
  local_ea[0x11] = '\0';
  local_ea[0x12] = '\0';
  local_ea[0x13] = '\0';
  local_ea[0x14] = '\0';
  local_ea[0x15] = '\0';
  local_ea[0x16] = '\0';
  local_ea[0x17] = '\0';
  local_ea[0x18] = '\0';
  local_ea[0x19] = '\0';
  local_ea[0x1a] = '\0';
  local_ea[0x1b] = '\0';
  local_ea[0x1c] = '\0';
  local_ea[0x1d] = '\0';
  local_ea[0x1e] = '\0';
  local_ea[0x1f] = '\0';
  local_ea[0x20] = '\0';
  local_ea[0x21] = '\0';
  local_ea[0x22] = '\0';
  local_ea[0x23] = '\0';
  local_ea[0x24] = '\0';
  local_ea[0x25] = '\0';
  local_ea[0x26] = '\0';
  local_ea[0x27] = '\0';
  local_ea[0x28] = '\0';
  local_ea[0x29] = '\0';
  local_ea[0x2a] = '\0';
  local_ea[0x2b] = '\0';
  local_ea[0x2c] = '\0';
  local_ea[0x2d] = '\0';
  local_ea[0x2e] = '\0';
  local_ea[0x2f] = '\0';
  local_ea[0x30] = '\0';
  local_ea[0x31] = '\0';
  local_ea[0x32] = 0;
  local_ea[0x33] = '\0';
  local_ea[0x34] = '\0';
  local_ea[0x35] = '\0';
  local_ea[0x36] = '\0';
  local_ea[0x37] = '\0';
  local_ea[0x38] = '\0';
  local_ea[0x39] = '\0';
  local_ea[0x3a] = '\0';
  local_ea[0x3b] = '\0';
  local_ea[0x3c] = '\0';
  local_ea[0x3d] = '\0';
  local_ea[0x3e] = '\0';
  local_ea[0x3f] = '\0';
  local_ea[0x40] = '\0';
  local_ea[0x41] = '\0';
  local_ea[0x42] = '\0';
  local_ea[0x43] = '\0';
  local_ea[0x44] = '\0';
  local_ea[0x45] = '\0';
  local_ea[0x46] = '\0';
  local_ea[0x47] = '\0';
  local_ea[0x48] = '\0';
  local_ea[0x49] = '\0';
  local_ea[0x4a] = '\0';
  local_ea[0x4b] = '\0';
  local_ea[0x4c] = '\0';
  local_ea[0x4d] = '\0';
  local_ea[0x4e] = '\0';
  local_ea[0x4f] = '\0';
  local_ea[0x50] = '\0';
  local_ea[0x51] = '\0';
  local_ea[0x52] = '\0';
  local_ea[0x53] = '\0';
  local_ea[0x54] = '\0';
  local_ea[0x55] = '\0';
  local_ea[0x56] = '\0';
  local_ea[0x57] = '\0';
  local_ea[0x58] = '\0';
  local_ea[0x59] = '\0';
  local_ea[0x5a] = '\0';
  local_ea[0x5b] = '\0';
  local_ea[0x5c] = '\0';
  local_ea[0x5d] = '\0';
  local_ea[0x5e] = '\0';
  local_ea[0x5f] = '\0';
  local_ea[0x60] = '\0';
  local_ea[0x61] = '\0';
  local_ea[0x62] = '\0';
  local_ea[99] = '\0';
  local_ea[100] = '\0';
  local_ea[0x65] = '\0';
  local_ea[0x66] = '\0';
  local_ea[0x67] = '\0';
  local_ea[0x68] = '\0';
  local_81[0] = L'\0';
  local_81[1] = L'\0';
  local_81[2] = L'\0';
  local_81[3] = L'\0';
  local_81[4] = L'\0';
  local_81[5] = L'\0';
  local_81[6] = L'\0';
  local_81[7] = L'\0';
  local_81[8] = L'\0';
  local_81[9] = L'\0';
  local_81[10] = L'\0';
  local_81[0xb] = L'\0';
  local_81[0xc] = L'\0';
  local_81[0xd] = L'\0';
  local_81[0xe] = L'\0';
  local_81[0xf] = L'\0';
  local_f6 = 0x523;
  local_f8 = 0x9b;
  local_ec = 0;
  local_61 = 0;
  local_f4 = 0;
  strncpy(local_ea,param_3,0x32);
  strncpy(local_ea + 0x33,param_6,0x12);
  strncpy(local_ea + 0x45,param_7,0x12);
  strncpy(local_ea + 0x57,param_8,0x12);
  wcsncpy(local_81,param_4,0x10);
  local_61 = param_5;
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_f8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140122590(longlong param_1,undefined4 param_2,undefined4 param_3,char *param_4,
                  undefined8 param_5,undefined4 param_6,char *param_7,char *param_8,char *param_9)

{
  int *piVar1;
  undefined *puVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  undefined8 uVar6;
  undefined *puVar7;
  undefined1 auStack_1b8 [32];
  undefined8 *local_198;
  undefined1 *local_190;
  int *local_188;
  undefined1 *local_180;
  undefined8 *local_178;
  int *local_170;
  longlong local_168;
  undefined4 *local_160;
  undefined **local_158;
  undefined1 local_148 [8];
  undefined *local_140;
  undefined4 local_138;
  undefined4 local_134;
  int local_130;
  int local_12c [3];
  undefined8 local_120;
  undefined1 local_118;
  undefined8 local_110;
  undefined4 local_108;
  short local_104;
  undefined8 local_102;
  undefined8 local_fa;
  undefined1 local_f2;
  short local_f1;
  undefined1 local_ef;
  undefined8 local_ee;
  undefined4 local_e6 [3];
  undefined2 local_d8;
  undefined2 uStack_d6;
  undefined4 uStack_d4;
  undefined4 local_d0;
  undefined2 local_cc;
  char local_ca [105];
  undefined4 local_61;
  ulonglong local_58;
  
  local_12c[1] = -2;
  local_12c[2] = -1;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_1b8;
  local_cc = 0;
  local_61 = 0;
  local_ca[0] = '\0';
  local_ca[1] = '\0';
  local_ca[2] = '\0';
  local_ca[3] = '\0';
  local_ca[4] = '\0';
  local_ca[5] = '\0';
  local_ca[6] = '\0';
  local_ca[7] = '\0';
  local_ca[8] = '\0';
  local_ca[9] = '\0';
  local_ca[10] = '\0';
  local_ca[0xb] = '\0';
  local_ca[0xc] = '\0';
  local_ca[0xd] = '\0';
  local_ca[0xe] = '\0';
  local_ca[0xf] = '\0';
  local_ca[0x10] = '\0';
  local_ca[0x11] = '\0';
  local_ca[0x12] = '\0';
  local_ca[0x13] = '\0';
  local_ca[0x14] = '\0';
  local_ca[0x15] = '\0';
  local_ca[0x16] = '\0';
  local_ca[0x17] = '\0';
  local_ca[0x18] = '\0';
  local_ca[0x19] = '\0';
  local_ca[0x1a] = '\0';
  local_ca[0x1b] = '\0';
  local_ca[0x1c] = '\0';
  local_ca[0x1d] = '\0';
  local_ca[0x1e] = '\0';
  local_ca[0x1f] = '\0';
  local_ca[0x20] = '\0';
  local_ca[0x21] = '\0';
  local_ca[0x22] = '\0';
  local_ca[0x23] = '\0';
  local_ca[0x24] = '\0';
  local_ca[0x25] = '\0';
  local_ca[0x26] = '\0';
  local_ca[0x27] = '\0';
  local_ca[0x28] = '\0';
  local_ca[0x29] = '\0';
  local_ca[0x2a] = '\0';
  local_ca[0x2b] = '\0';
  local_ca[0x2c] = '\0';
  local_ca[0x2d] = '\0';
  local_ca[0x2e] = '\0';
  local_ca[0x2f] = '\0';
  local_ca[0x30] = '\0';
  local_ca[0x31] = '\0';
  local_ca[0x32] = 0;
  local_ca[0x33] = '\0';
  local_ca[0x34] = '\0';
  local_ca[0x35] = '\0';
  local_ca[0x36] = '\0';
  local_ca[0x37] = '\0';
  local_ca[0x38] = '\0';
  local_ca[0x39] = '\0';
  local_ca[0x3a] = '\0';
  local_ca[0x3b] = '\0';
  local_ca[0x3c] = '\0';
  local_ca[0x3d] = '\0';
  local_ca[0x3e] = '\0';
  local_ca[0x3f] = '\0';
  local_ca[0x40] = '\0';
  local_ca[0x41] = '\0';
  local_ca[0x42] = '\0';
  local_ca[0x43] = '\0';
  local_ca[0x44] = '\0';
  local_ca[0x45] = '\0';
  local_ca[0x46] = '\0';
  local_ca[0x47] = '\0';
  local_ca[0x48] = '\0';
  local_ca[0x49] = '\0';
  local_ca[0x4a] = '\0';
  local_ca[0x4b] = '\0';
  local_ca[0x4c] = '\0';
  local_ca[0x4d] = '\0';
  local_ca[0x4e] = '\0';
  local_ca[0x4f] = '\0';
  local_ca[0x50] = '\0';
  local_ca[0x51] = '\0';
  local_ca[0x52] = '\0';
  local_ca[0x53] = '\0';
  local_ca[0x54] = '\0';
  local_ca[0x55] = '\0';
  local_ca[0x56] = '\0';
  local_ca[0x57] = '\0';
  local_ca[0x58] = '\0';
  local_ca[0x59] = '\0';
  local_ca[0x5a] = '\0';
  local_ca[0x5b] = '\0';
  local_ca[0x5c] = '\0';
  local_ca[0x5d] = '\0';
  local_ca[0x5e] = '\0';
  local_ca[0x5f] = '\0';
  local_ca[0x60] = '\0';
  local_ca[0x61] = '\0';
  local_ca[0x62] = '\0';
  local_ca[99] = '\0';
  local_ca[100] = '\0';
  local_ca[0x65] = '\0';
  local_ca[0x66] = '\0';
  local_ca[0x67] = '\0';
  local_ca[0x68] = '\0';
  local_110 = 0;
  local_108 = 0;
  local_104 = 0;
  local_102 = 0;
  local_fa = 0;
  local_f2 = 0;
  local_f1 = 0;
  local_ef = 0;
  local_ee = 0;
  local_e6[0] = 0;
  uStack_d6 = 0x446;
  local_d8 = 0x7b;
  local_134 = param_3;
  uStack_d4 = param_3;
  local_d0 = param_2;
  strncpy(local_ca,param_4,0x32);
  strncpy(local_ca + 0x33,param_7,0x12);
  strncpy(local_ca + 0x45,param_8,0x12);
  strncpy(local_ca + 0x57,param_9,0x12);
  local_61 = param_6;
  local_108 = local_d0;
  local_104 = 0x6f;
  local_110 = CONCAT62((int6)(CONCAT44(uStack_d4,CONCAT22(uStack_d6,local_d8)) >> 0x10),0x2e);
  FUN_1401158e0(*(undefined8 *)(param_1 + 0xe0),&local_d8,&local_110);
  FUN_14011b410(*(undefined8 *)(param_1 + 0xe0),param_5,&local_110);
  *(int *)(param_1 + 0x5b0) = *(int *)(param_1 + 0x5b0) + 1;
  FUN_1401568c0();
  local_140 = PTR_DAT_140320098;
  iVar3 = FUN_1401567e0(param_4);
  if (local_140 == (undefined *)0x0) {
    iVar5 = 0;
  }
  else if (local_140 == PTR_DAT_140320098) {
    iVar5 = 0;
  }
  else {
    iVar5 = *(int *)(local_140 + -8);
  }
  iVar4 = iVar3;
  if (iVar3 <= iVar5) {
    if (local_140 == (undefined *)0x0) {
      iVar4 = 0;
    }
    else if (local_140 == PTR_DAT_140320098) {
      iVar4 = 0;
    }
    else {
      iVar4 = *(int *)(local_140 + -8);
    }
  }
  iVar5 = 1;
  if (1 < iVar4) {
    iVar5 = iVar4;
  }
  if (local_140 == (undefined *)0x0) {
    iVar4 = 0;
  }
  else if (local_140 == PTR_DAT_140320098) {
    iVar4 = 0;
  }
  else {
    iVar4 = *(int *)(local_140 + -8);
  }
  if (iVar4 < iVar5) {
    FUN_140124200(&local_140);
  }
  FUN_1401242e0(&local_140);
  puVar7 = local_140;
  if (local_140 == (undefined *)0x0) {
    puVar7 = PTR_DAT_140320098;
  }
  FUN_140156810(puVar7,param_4,iVar3);
  iVar5 = FUN_1401567e0();
  iVar3 = 0;
  if (0 < iVar5) {
    iVar3 = iVar5;
  }
  if (local_140 == (undefined *)0x0) {
    iVar5 = 0;
  }
  else if (local_140 == PTR_DAT_140320098) {
    iVar5 = 0;
  }
  else {
    iVar5 = *(int *)(local_140 + -8);
  }
  if (iVar5 <= iVar3) {
    if (local_140 == (undefined *)0x0) {
      iVar3 = 0;
    }
    else if (local_140 == PTR_DAT_140320098) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(local_140 + -8);
    }
  }
  if (((local_140 != PTR_DAT_140320098) && (local_140 != (undefined *)0x0)) &&
     (piVar1 = (int *)(local_140 + -8), piVar1 != (int *)0x0)) {
    *piVar1 = iVar3;
    *(undefined1 *)((longlong)iVar3 + 8 + (longlong)piVar1) = 0;
  }
  local_12c[0] = (int)local_104;
  local_148[0] = local_ef;
  local_130 = (int)local_f1;
  local_138 = local_134;
  local_158 = &local_140;
  local_160 = local_e6;
  local_168 = (longlong)&local_ee + 4;
  local_170 = local_12c;
  local_178 = &local_ee;
  local_180 = local_148;
  local_188 = &local_130;
  local_190 = &local_f2;
  local_198 = &local_102;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x40))
            ((longlong *)(param_1 + 0xa8),param_2,&DAT_1403200f0,&local_138);
  puVar7 = local_140;
  if (((local_140 != (undefined *)0x0) && (local_140 != PTR_DAT_140320098)) &&
     (puVar2 = local_140 + -8, puVar2 != (undefined *)0x0)) {
    uVar6 = FUN_1401568c0();
    local_120 = uVar6;
    FUN_140156b50(uVar6);
    local_118 = 1;
    piVar1 = (int *)(puVar7 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2);
    }
    FUN_140156be0(uVar6);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140122940(longlong param_1,undefined4 param_2,undefined4 param_3,wchar_t *param_4,
                  wchar_t *param_5)

{
  undefined1 auStack_118 [32];
  undefined1 *local_f8;
  undefined8 local_e8;
  undefined4 local_e0;
  undefined2 local_dc;
  undefined1 local_da [2];
  undefined4 local_d8 [4];
  undefined2 local_c8;
  undefined2 uStack_c6;
  undefined4 uStack_c4;
  undefined4 local_c0;
  undefined2 local_bc;
  wchar_t local_ba [57];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  local_ba[0] = L'\0';
  local_ba[1] = L'\0';
  local_ba[2] = L'\0';
  local_ba[3] = L'\0';
  local_ba[4] = L'\0';
  local_ba[5] = L'\0';
  local_ba[6] = L'\0';
  local_ba[7] = L'\0';
  local_ba[8] = L'\0';
  local_ba[9] = L'\0';
  local_ba[10] = L'\0';
  local_ba[0xb] = L'\0';
  local_ba[0xc] = L'\0';
  local_ba[0xd] = L'\0';
  local_ba[0xe] = L'\0';
  local_ba[0xf] = L'\0';
  local_ba[0x10] = 0;
  local_ba[0x11] = L'\0';
  local_ba[0x12] = L'\0';
  local_ba[0x13] = L'\0';
  local_ba[0x14] = L'\0';
  local_ba[0x15] = L'\0';
  local_ba[0x16] = L'\0';
  local_ba[0x17] = L'\0';
  local_ba[0x18] = L'\0';
  local_ba[0x19] = L'\0';
  local_ba[0x1a] = L'\0';
  local_ba[0x1b] = L'\0';
  local_ba[0x1c] = L'\0';
  local_ba[0x1d] = L'\0';
  local_ba[0x1e] = L'\0';
  local_ba[0x1f] = L'\0';
  local_ba[0x20] = L'\0';
  local_ba[0x21] = L'\0';
  local_ba[0x22] = L'\0';
  local_ba[0x23] = L'\0';
  local_ba[0x24] = L'\0';
  local_ba[0x25] = L'\0';
  local_ba[0x26] = L'\0';
  local_ba[0x27] = L'\0';
  local_ba[0x28] = L'\0';
  local_ba[0x29] = L'\0';
  local_ba[0x2a] = L'\0';
  local_ba[0x2b] = L'\0';
  local_ba[0x2c] = L'\0';
  local_ba[0x2d] = L'\0';
  local_ba[0x2e] = L'\0';
  local_ba[0x2f] = L'\0';
  local_ba[0x30] = L'\0';
  local_ba[0x31] = 0;
  local_da[0] = 0;
  uStack_c6 = 0x4c2;
  local_bc = 0;
  local_c8 = 0x72;
  local_e8 = 0;
  local_e0 = 0;
  local_dc = 0;
  uStack_c4 = param_3;
  local_c0 = param_2;
  wcsncpy(local_ba,param_4,0x10);
  wcsncpy(local_ba + 0x11,param_5,0x20);
  local_e0 = local_c0;
  local_ba[0x10] = 0;
  local_dc = 0x6f;
  local_ba[0x31] = 0;
  local_e8 = CONCAT62((int6)(CONCAT44(uStack_c4,CONCAT22(uStack_c6,local_c8)) >> 0x10),0xf);
  FUN_140116560(*(undefined8 *)(param_1 + 0xe0),&local_c8,&local_e8);
  *(int *)(param_1 + 0x674) = *(int *)(param_1 + 0x674) + 1;
  local_f8 = local_da;
  local_d8[0] = param_3;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x350))
            ((longlong *)(param_1 + 0xa8),param_2,&DAT_1403200f0,local_d8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140122aa0(longlong param_1,undefined8 *param_2,wchar_t *param_3,wchar_t *param_4,
                  byte *param_5,undefined4 param_6,undefined2 param_7)

{
  byte bVar1;
  wchar_t wVar2;
  longlong lVar3;
  byte *pbVar4;
  wchar_t *pwVar5;
  undefined1 auStack_d8 [32];
  undefined2 local_b8;
  undefined2 uStack_b6;
  undefined4 uStack_b4;
  undefined4 local_b0;
  undefined2 local_ac;
  undefined8 local_aa;
  undefined8 local_a2;
  wchar_t local_9a [12];
  ulonglong local_82;
  wchar_t local_7a [12];
  ulonglong local_62;
  ushort local_5a;
  undefined4 local_58;
  undefined2 local_54;
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_d8;
  lVar3 = -1;
  pwVar5 = param_3;
  do {
    if (lVar3 == 0) break;
    lVar3 = lVar3 + -1;
    wVar2 = *pwVar5;
    pwVar5 = pwVar5 + 1;
  } while (wVar2 != L'\0');
  local_ac = 0;
  local_9a[0] = L'\0';
  local_9a[1] = L'\0';
  local_9a[2] = L'\0';
  local_9a[3] = L'\0';
  local_9a[4] = L'\0';
  local_9a[5] = L'\0';
  local_9a[6] = L'\0';
  local_9a[7] = L'\0';
  local_9a[8] = L'\0';
  local_9a[9] = L'\0';
  local_9a[10] = L'\0';
  local_9a[0xb] = L'\0';
  local_82 = 0;
  local_7a[0] = L'\0';
  local_7a[1] = L'\0';
  local_7a[2] = L'\0';
  local_7a[3] = L'\0';
  local_7a[4] = L'\0';
  local_7a[5] = L'\0';
  local_7a[6] = L'\0';
  local_7a[7] = L'\0';
  local_7a[8] = L'\0';
  local_7a[9] = L'\0';
  local_7a[10] = L'\0';
  local_7a[0xb] = L'\0';
  local_62 = 0;
  local_5a = 0;
  if (lVar3 != -2) {
    lVar3 = -1;
    pbVar4 = param_5;
    do {
      if (lVar3 == 0) break;
      lVar3 = lVar3 + -1;
      bVar1 = *pbVar4;
      pbVar4 = pbVar4 + 1;
    } while (bVar1 != 0);
    if (lVar3 != -2) {
      lVar3 = -1;
      pwVar5 = param_4;
      do {
        if (lVar3 == 0) break;
        lVar3 = lVar3 + -1;
        wVar2 = *pwVar5;
        pwVar5 = pwVar5 + 1;
      } while (wVar2 != L'\0');
      if (lVar3 != -2) {
        uStack_b6 = 0x465;
        uStack_b4 = 0;
        local_b0 = 0;
        local_b8 = 0x66;
        local_aa = *param_2;
        local_a2 = param_2[1];
        local_58 = param_6;
        local_54 = param_7;
        wcsncpy(local_9a,param_3,0xf);
        wcsncpy(local_7a,param_4,0xf);
        local_82 = local_82 & 0xffffffffffff;
        local_62 = local_62 & 0xffffffffffff;
        local_5a = (ushort)*param_5;
        FUN_140118030(*(undefined8 *)(param_1 + 0xe0),&local_b8);
      }
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140122c00(longlong param_1,undefined8 *param_2,wchar_t *param_3,wchar_t *param_4,
                  undefined2 param_5,undefined2 param_6)

{
  undefined1 auStack_c8 [32];
  undefined2 local_a8;
  undefined2 local_a6;
  undefined8 local_a4;
  undefined2 local_9c;
  undefined8 local_9a;
  undefined8 local_92;
  wchar_t local_8a [12];
  ulonglong local_72;
  wchar_t local_6a [12];
  ulonglong local_52;
  undefined2 local_4a;
  undefined2 local_48;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_c8;
  local_8a[0] = L'\0';
  local_8a[1] = L'\0';
  local_8a[2] = L'\0';
  local_8a[3] = L'\0';
  local_8a[4] = L'\0';
  local_8a[5] = L'\0';
  local_8a[6] = L'\0';
  local_8a[7] = L'\0';
  local_8a[8] = L'\0';
  local_8a[9] = L'\0';
  local_8a[10] = L'\0';
  local_8a[0xb] = L'\0';
  local_72 = 0;
  local_6a[0] = L'\0';
  local_6a[1] = L'\0';
  local_6a[2] = L'\0';
  local_6a[3] = L'\0';
  local_6a[4] = L'\0';
  local_6a[5] = L'\0';
  local_6a[6] = L'\0';
  local_6a[7] = L'\0';
  local_6a[8] = L'\0';
  local_6a[9] = L'\0';
  local_6a[10] = L'\0';
  local_6a[0xb] = L'\0';
  local_52 = 0;
  local_a6 = 0x449;
  local_a8 = 0x62;
  local_9a = *param_2;
  local_92 = param_2[1];
  local_4a = param_5;
  local_9c = 0;
  local_a4 = 0;
  local_48 = param_6;
  wcsncpy(local_8a,param_3,0xf);
  wcsncpy(local_6a,param_4,0xf);
  local_72 = local_72 & 0xffffffffffff;
  local_52 = local_52 & 0xffffffffffff;
  FUN_140118bf0(*(undefined8 *)(param_1 + 0xe0),&local_a8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140122ce0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x401;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140122dc0(longlong param_1,ushort param_2,undefined8 *param_3,undefined8 *param_4)

{
  longlong lVar1;
  int iVar2;
  ulonglong uVar3;
  undefined1 auStack_208 [32];
  undefined4 local_1e8;
  undefined8 local_1e4;
  undefined2 local_1dc;
  undefined8 local_1da;
  undefined8 local_1d2;
  undefined1 local_1ca [402];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_208;
  local_1dc = 0;
  memset(local_1ca,0,0x18c);
  local_1da = *param_3;
  local_1d2 = param_3[1];
  local_1e8 = 0x42501aa;
  local_1e4 = 0;
  uVar3 = param_4[1] - (longlong)*param_4 >> 2;
  if ((int)uVar3 != 0) {
    memcpy(local_1ca,(void *)*param_4,(uVar3 & 0xffffffff) << 2);
  }
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_1e8);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140122ed0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x410;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140122fb0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined4 param_6,undefined2 param_7,undefined2 param_8,
                 undefined2 param_9,undefined2 param_10)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined2 local_36;
  undefined2 local_34;
  undefined2 local_32;
  undefined2 local_30;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x3f3;
  local_58 = 0x2a;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_4c = 0;
  local_3a = param_6;
  local_36 = param_7;
  local_34 = param_8;
  local_32 = param_9;
  local_30 = param_10;
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



int FUN_1401230d0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined2 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined4 local_14;
  undefined4 local_10;
  undefined2 local_c;
  undefined2 local_a;
  
  local_16 = 0x460;
  local_18 = 0x10;
  local_c = 0;
  local_a = param_5;
  local_14 = param_4;
  local_10 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



void FUN_140123190(longlong param_1,undefined4 param_2)

{
  void *pvVar1;
  void *pvVar2;
  undefined2 local_70;
  undefined2 uStack_6e;
  undefined4 uStack_6c;
  undefined4 local_68;
  undefined2 local_64;
  undefined8 local_58;
  undefined4 local_50;
  undefined2 local_4c;
  void *local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  void *local_2a;
  void *local_22;
  undefined8 local_1a;
  
  local_64 = 0;
  local_4a = (void *)0x0;
  local_42 = 0;
  local_3a = 0;
  local_2a = (void *)0x0;
  local_22 = (void *)0x0;
  local_1a = 0;
  uStack_6e = 0x481;
  local_70 = 0xe;
  uStack_6c = 0;
  local_58 = 0x23c1000e;
  local_4c = 0xfd;
  local_68 = param_2;
  local_50 = param_2;
  FUN_140119ec0(*(undefined8 *)(param_1 + 0xe0),&local_70,&local_58);
  *(int *)(param_1 + 0x650) = *(int *)(param_1 + 0x650) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x2c0))
            ((longlong *)(param_1 + 0xa8),param_2,&DAT_1403200f0,&local_2a,&local_4a);
  pvVar2 = local_22;
  pvVar1 = local_2a;
  if (local_2a != (void *)0x0) {
    for (; pvVar1 != pvVar2; pvVar1 = (void *)((longlong)pvVar1 + 8)) {
      FUN_14004f990(pvVar1);
    }
    operator_delete(local_2a);
  }
  local_2a = (void *)0x0;
  local_22 = (void *)0x0;
  local_1a = 0;
  if (local_4a != (void *)0x0) {
    operator_delete(local_4a);
  }
  return;
}



void FUN_1401232c0(longlong param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar2 = *(longlong *)(param_1 + 0x2e);
  if (lVar2 != 0) {
    lVar1 = *(longlong *)(param_1 + 0x36);
    for (; lVar2 != lVar1; lVar2 = lVar2 + 8) {
      FUN_14004f990(lVar2);
    }
    operator_delete(*(void **)(param_1 + 0x2e));
  }
  *(undefined8 *)(param_1 + 0x2e) = 0;
  *(undefined8 *)(param_1 + 0x36) = 0;
  *(undefined8 *)(param_1 + 0x3e) = 0;
  if (*(void **)(param_1 + 0xe) != (void *)0x0) {
    operator_delete(*(void **)(param_1 + 0xe));
  }
  *(undefined8 *)(param_1 + 0xe) = 0;
  *(undefined8 *)(param_1 + 0x16) = 0;
  *(undefined8 *)(param_1 + 0x1e) = 0;
  return;
}



void FUN_140123350(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined2 local_50;
  undefined2 uStack_4e;
  undefined4 uStack_4c;
  undefined4 local_48;
  undefined2 local_44;
  undefined8 local_40;
  undefined4 local_38;
  undefined2 local_34;
  void *local_32;
  undefined8 local_2a;
  undefined8 local_22;
  
  local_44 = 0;
  local_32 = (void *)0x0;
  local_2a = 0;
  local_22 = 0;
  uStack_4e = 0x482;
  local_50 = 0xe;
  uStack_4c = 0;
  local_40 = 0x23c2000e;
  local_34 = 0x100;
  local_48 = param_2;
  local_38 = param_2;
  FUN_14011a9d0(*(undefined8 *)(param_1 + 0xe0),&local_50,&local_40,param_4,0xfffffffffffffffe);
  *(int *)(param_1 + 0x654) = *(int *)(param_1 + 0x654) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x2d0))
            ((longlong *)(param_1 + 0xa8),param_2,&DAT_1403200f0,&local_32);
  if (local_32 != (void *)0x0) {
    operator_delete(local_32);
  }
  return;
}



void FUN_140123420(longlong param_1)

{
  if (*(void **)(param_1 + 0xe) != (void *)0x0) {
    operator_delete(*(void **)(param_1 + 0xe));
  }
  *(undefined8 *)(param_1 + 0xe) = 0;
  *(undefined8 *)(param_1 + 0x16) = 0;
  *(undefined8 *)(param_1 + 0x1e) = 0;
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140123450(longlong param_1,ushort param_2,undefined8 *param_3,undefined4 param_4,
                 longlong *param_5,undefined1 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined8 *puVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined8 local_36;
  undefined4 local_2e;
  undefined1 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  uVar4 = 0;
  local_4c = 0;
  local_36 = 0;
  local_2e = 0;
  local_56 = 0x4bd;
  local_58 = 0x2f;
  local_4a = *param_3;
  local_42 = param_3[1];
  local_54 = 0;
  local_2a = param_6;
  lVar1 = *param_5;
  uVar5 = param_5[1] - lVar1 >> 2;
  if (uVar5 != 0) {
    puVar3 = &local_36;
    do {
      uVar4 = (ulonglong)((int)uVar4 + 1);
      *(undefined4 *)puVar3 = *(undefined4 *)((lVar1 - (longlong)&local_36) + (longlong)puVar3);
      puVar3 = (undefined8 *)((longlong)puVar3 + 4);
    } while (uVar4 < uVar5);
  }
  local_3a = param_4;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140123580(longlong param_1,void *param_2)

{
  undefined1 auStack_2f8 [32];
  undefined4 local_2d8;
  undefined8 local_2d4;
  undefined2 local_2cc;
  undefined1 local_2ca [39];
  undefined8 local_2a3;
  undefined8 local_29b;
  undefined8 local_293;
  undefined8 local_28b;
  undefined1 local_283 [100];
  undefined1 local_21f [519];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_2f8;
  local_2cc = 0;
  local_2a3 = 0;
  local_29b = 0;
  local_293 = 0;
  local_28b = 0;
  memset(local_283,0,100);
  memset(local_21f,0,0x1fe);
  memset(local_2ca,0,0x2b1);
  local_2d8 = 0x4bf02bf;
  local_2d4 = 0;
  memcpy(local_2ca,param_2,0x2b1);
  FUN_1400c82c0(*(undefined8 *)(param_1 + 0xe0),&local_2d8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140123660(longlong param_1,undefined4 param_2,wchar_t *param_3,undefined1 param_4,
                  wchar_t *param_5,char *param_6,undefined8 *param_7,undefined4 *param_8)

{
  undefined1 auStack_308 [32];
  longlong local_2e8;
  undefined2 local_2d8;
  undefined2 local_2d6;
  undefined4 local_2d4;
  undefined4 local_2d0;
  undefined2 local_2cc;
  undefined1 local_2ca;
  undefined1 local_2c9;
  undefined8 local_2c8;
  undefined8 uStack_2c0;
  undefined4 local_2b8;
  undefined4 uStack_2b4;
  undefined4 uStack_2b0;
  undefined4 uStack_2ac;
  wchar_t local_2a8 [12];
  ulonglong local_290;
  wchar_t local_288 [254];
  undefined2 local_8c;
  char local_8a [48];
  ushort local_5a;
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_308;
  local_2cc = 0;
  local_2c9 = 0;
  local_2a8[0] = L'\0';
  local_2a8[1] = L'\0';
  local_2a8[2] = L'\0';
  local_2a8[3] = L'\0';
  local_2a8[4] = L'\0';
  local_2a8[5] = L'\0';
  local_2a8[6] = L'\0';
  local_2a8[7] = L'\0';
  local_2a8[8] = L'\0';
  local_2a8[9] = L'\0';
  local_2a8[10] = L'\0';
  local_2a8[0xb] = L'\0';
  local_290 = 0;
  local_2e8 = param_1;
  memset(local_288,0,0x1fe);
  local_2c8 = *param_7;
  uStack_2c0 = param_7[1];
  local_2d6 = 0x4d1;
  local_2b8 = *param_8;
  uStack_2b4 = param_8[1];
  uStack_2b0 = param_8[2];
  uStack_2ac = param_8[3];
  local_8a[0] = '\0';
  local_8a[1] = '\0';
  local_8a[2] = '\0';
  local_8a[3] = '\0';
  local_8a[4] = '\0';
  local_8a[5] = '\0';
  local_8a[6] = '\0';
  local_8a[7] = '\0';
  local_8a[8] = '\0';
  local_8a[9] = '\0';
  local_8a[10] = '\0';
  local_8a[0xb] = '\0';
  local_8a[0xc] = '\0';
  local_8a[0xd] = '\0';
  local_8a[0xe] = '\0';
  local_8a[0xf] = '\0';
  local_8a[0x10] = '\0';
  local_8a[0x11] = '\0';
  local_8a[0x12] = '\0';
  local_8a[0x13] = '\0';
  local_8a[0x14] = '\0';
  local_8a[0x15] = '\0';
  local_8a[0x16] = '\0';
  local_8a[0x17] = '\0';
  local_8a[0x18] = '\0';
  local_8a[0x19] = '\0';
  local_8a[0x1a] = '\0';
  local_8a[0x1b] = '\0';
  local_8a[0x1c] = '\0';
  local_8a[0x1d] = '\0';
  local_8a[0x1e] = '\0';
  local_8a[0x1f] = '\0';
  local_8a[0x20] = '\0';
  local_8a[0x21] = '\0';
  local_8a[0x22] = '\0';
  local_8a[0x23] = '\0';
  local_8a[0x24] = '\0';
  local_8a[0x25] = '\0';
  local_8a[0x26] = '\0';
  local_8a[0x27] = '\0';
  local_8a[0x28] = '\0';
  local_8a[0x29] = '\0';
  local_8a[0x2a] = '\0';
  local_8a[0x2b] = '\0';
  local_8a[0x2c] = '\0';
  local_8a[0x2d] = '\0';
  local_8a[0x2e] = '\0';
  local_8a[0x2f] = '\0';
  local_5a = 0;
  local_2d8 = 0x280;
  local_2d4 = 0;
  local_2d0 = param_2;
  local_2ca = param_4;
  wcsncpy(local_2a8,param_3,0xf);
  wcsncpy(local_288,param_5,0xfe);
  strncpy(local_8a,param_6,0x31);
  local_290 = local_290 & 0xffffffffffff;
  local_8c = 0;
  local_5a = local_5a & 0xff;
  FUN_1400c8f30(*(undefined8 *)(local_2e8 + 0xe0),&local_2d8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401237e0(longlong param_1,undefined8 *param_2,undefined1 param_3,wchar_t *param_4)

{
  undefined1 auStack_278 [32];
  undefined4 local_258;
  undefined8 local_254;
  undefined2 local_24c;
  undefined8 local_24a;
  undefined8 local_242;
  undefined1 local_23a;
  wchar_t local_239 [254];
  undefined2 local_3d;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_278;
  local_24c = 0;
  memset(local_239,0,0x1fe);
  local_24a = *param_2;
  local_242 = param_2[1];
  local_258 = 0x4c0021d;
  local_254 = 0;
  local_23a = param_3;
  wcsncpy(local_239,param_4,0xfe);
  local_3d = 0;
  FUN_1400ca800(*(undefined8 *)(param_1 + 0xe0),&local_258);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401238a0(longlong param_1,undefined4 param_2)

{
  undefined1 auStack_308 [32];
  undefined8 local_2e8;
  undefined4 local_2e0;
  undefined2 local_2dc;
  undefined4 local_2da;
  undefined8 local_2d6;
  undefined8 local_2ce;
  undefined8 local_2c6;
  undefined8 local_2be;
  undefined2 local_2b6;
  undefined1 local_2b4;
  undefined8 local_2b3;
  undefined8 local_2ab;
  undefined8 local_2a3;
  undefined8 local_29b;
  undefined1 local_293 [100];
  undefined1 local_22f [510];
  undefined8 local_31;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_308;
  local_2ce = 0;
  local_31 = 0;
  local_2d6 = 0;
  local_2c6 = 0;
  local_2be = 0;
  local_2dc = 0;
  local_2da = 0;
  local_2b6 = 0;
  local_2b4 = 0;
  local_2b3 = 0;
  local_2ab = 0;
  local_2a3 = 0;
  local_29b = 0;
  memset(local_293,0,100);
  memset(local_22f,0,0x1fe);
  memset(&local_2da,0,0x2b1);
  local_2e8 = 0x4c102bf;
  local_2e0 = param_2;
  FUN_1400cb310(*(undefined8 *)(param_1 + 0xe0),&local_2e8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401239a0(longlong param_1,wchar_t *param_2,undefined1 param_3)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined2 local_4c;
  wchar_t local_4a [12];
  ulonglong local_32;
  undefined1 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_4c = 0;
  local_4a[0] = L'\0';
  local_4a[1] = L'\0';
  local_4a[2] = L'\0';
  local_4a[3] = L'\0';
  local_4a[4] = L'\0';
  local_4a[5] = L'\0';
  local_4a[6] = L'\0';
  local_4a[7] = L'\0';
  local_4a[8] = L'\0';
  local_4a[9] = L'\0';
  local_4a[10] = L'\0';
  local_4a[0xb] = L'\0';
  local_32 = 0;
  local_56 = 0x4c3;
  local_58 = 0x2f;
  local_54 = 0;
  local_2a = param_3;
  wcsncpy(local_4a,param_2,0xf);
  local_32 = local_32 & 0xffffffffffff;
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 == 0) {
    iVar2 = 0;
  }
  else {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140123a70(longlong param_1,ushort param_2,undefined8 *param_3,undefined4 param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined8 local_44;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  undefined4 local_26;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4ca;
  local_3c = 0;
  local_48 = 0x26;
  local_3a = *param_3;
  local_44 = 0;
  local_32 = param_3[1];
  local_26 = param_5;
  local_2a = param_4;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



void FUN_140123b50(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined2 local_50;
  undefined2 uStack_4e;
  undefined4 uStack_4c;
  undefined4 local_48;
  undefined2 local_44;
  undefined8 local_40;
  undefined4 local_38;
  undefined2 local_34;
  void *local_32;
  undefined8 local_2a;
  undefined8 local_22;
  
  local_44 = 0;
  local_32 = (void *)0x0;
  local_2a = 0;
  local_22 = 0;
  uStack_4e = 0x4f0;
  local_50 = 0xe;
  uStack_4c = 0;
  local_40 = 0x2430000e;
  local_34 = 0x132;
  local_48 = param_2;
  local_38 = param_2;
  FUN_14009f9b0(*(undefined8 *)(param_1 + 0xe0),&local_50,&local_40,param_4,0xfffffffffffffffe);
  *(int *)(param_1 + 0x690) = *(int *)(param_1 + 0x690) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x3c0))
            ((longlong *)(param_1 + 0xa8),param_2,&DAT_1403200f0,&local_32);
  if (local_32 != (void *)0x0) {
    operator_delete(local_32);
  }
  return;
}



void FUN_140123c20(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined2 local_50;
  undefined2 uStack_4e;
  undefined4 uStack_4c;
  undefined4 local_48;
  undefined2 local_44;
  undefined8 local_40;
  undefined4 local_38;
  undefined2 local_34;
  void *local_32;
  undefined8 local_2a;
  undefined8 local_22;
  
  local_44 = 0;
  local_32 = (void *)0x0;
  local_2a = 0;
  local_22 = 0;
  uStack_4e = 0x501;
  local_50 = 0xe;
  uStack_4c = 0;
  local_40 = 0x2441000e;
  local_34 = 1;
  local_48 = param_2;
  local_38 = param_2;
  FUN_1400a01b0(*(undefined8 *)(param_1 + 0xe0),&local_50,&local_40,param_4,0xfffffffffffffffe);
  *(int *)(param_1 + 0x6a0) = *(int *)(param_1 + 0x6a0) + 1;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x400))
            ((longlong *)(param_1 + 0xa8),param_2,&DAT_1403200f0,&local_32);
  if (local_32 != (void *)0x0) {
    operator_delete(local_32);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140123cf0(longlong param_1,undefined4 param_2,ushort param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,char *param_7,wchar_t *param_8,
                 wchar_t *param_9,undefined4 param_10,short *param_11,undefined8 param_12)

{
  short sVar1;
  longlong lVar2;
  int iVar3;
  short *psVar4;
  undefined1 auStack_1a8 [32];
  ushort local_188;
  longlong local_180;
  undefined4 local_178;
  undefined4 local_174;
  undefined4 local_170;
  undefined2 local_16c;
  undefined8 local_16a;
  undefined8 local_162;
  undefined8 local_15a;
  undefined8 local_152;
  undefined4 local_14a;
  undefined8 local_146;
  char local_13e [51];
  wchar_t local_10b [32];
  short local_cb [50];
  undefined2 local_67;
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_1a8;
  local_16c = 0;
  local_10b[0] = L'\0';
  local_10b[1] = L'\0';
  local_10b[2] = L'\0';
  local_10b[3] = L'\0';
  local_10b[4] = L'\0';
  local_10b[5] = L'\0';
  local_10b[6] = L'\0';
  local_10b[7] = L'\0';
  local_10b[8] = L'\0';
  local_10b[9] = L'\0';
  local_10b[10] = L'\0';
  local_10b[0xb] = L'\0';
  local_10b[0xc] = L'\0';
  local_10b[0xd] = L'\0';
  local_10b[0xe] = L'\0';
  local_10b[0xf] = L'\0';
  local_10b[0x10] = L'\0';
  local_10b[0x11] = L'\0';
  local_10b[0x12] = L'\0';
  local_10b[0x13] = L'\0';
  local_10b[0x14] = L'\0';
  local_10b[0x15] = L'\0';
  local_10b[0x16] = L'\0';
  local_10b[0x17] = L'\0';
  local_10b[0x18] = L'\0';
  local_10b[0x19] = L'\0';
  local_10b[0x1a] = L'\0';
  local_10b[0x1b] = L'\0';
  local_10b[0x1c] = L'\0';
  local_10b[0x1d] = L'\0';
  local_10b[0x1e] = L'\0';
  local_10b[0x1f] = L'\0';
  local_13e[0] = '\0';
  local_13e[1] = '\0';
  local_13e[2] = '\0';
  local_13e[3] = '\0';
  local_13e[4] = '\0';
  local_13e[5] = '\0';
  local_13e[6] = '\0';
  local_13e[7] = '\0';
  local_13e[8] = '\0';
  local_13e[9] = '\0';
  local_13e[10] = '\0';
  local_13e[0xb] = '\0';
  local_13e[0xc] = '\0';
  local_13e[0xd] = '\0';
  local_13e[0xe] = '\0';
  local_13e[0xf] = '\0';
  local_13e[0x10] = '\0';
  local_13e[0x11] = '\0';
  local_13e[0x12] = '\0';
  local_13e[0x13] = '\0';
  local_13e[0x14] = '\0';
  local_13e[0x15] = '\0';
  local_13e[0x16] = '\0';
  local_13e[0x17] = '\0';
  local_13e[0x18] = '\0';
  local_13e[0x19] = '\0';
  local_13e[0x1a] = '\0';
  local_13e[0x1b] = '\0';
  local_13e[0x1c] = '\0';
  local_13e[0x1d] = '\0';
  local_13e[0x1e] = '\0';
  local_13e[0x1f] = '\0';
  local_13e[0x20] = '\0';
  local_13e[0x21] = '\0';
  local_13e[0x22] = '\0';
  local_13e[0x23] = '\0';
  local_13e[0x24] = '\0';
  local_13e[0x25] = '\0';
  local_13e[0x26] = '\0';
  local_13e[0x27] = '\0';
  local_13e[0x28] = '\0';
  local_13e[0x29] = '\0';
  local_13e[0x2a] = '\0';
  local_13e[0x2b] = '\0';
  local_13e[0x2c] = '\0';
  local_13e[0x2d] = '\0';
  local_13e[0x2e] = '\0';
  local_13e[0x2f] = '\0';
  local_13e[0x30] = '\0';
  local_13e[0x31] = '\0';
  local_13e[0x32] = 0;
  local_188 = param_3;
  local_180 = param_1;
  memset(local_cb,0,0x66);
  local_16a = *param_5;
  local_146 = param_12;
  local_162 = param_5[1];
  local_15a = *param_6;
  local_152 = param_6[1];
  local_178 = 0x5020113;
  local_14a = param_10;
  local_174 = param_4;
  local_170 = param_2;
  strncpy(local_13e,param_7,0x32);
  wcsncpy(local_10b,param_9,0xf);
  wcsncpy(local_10b + 0x10,param_8,0xf);
  psVar4 = param_11;
  do {
    sVar1 = *psVar4;
    psVar4 = psVar4 + 1;
    *(short *)((longlong)local_cb + (-2 - (longlong)param_11) + (longlong)psVar4) = sVar1;
  } while (sVar1 != 0);
  local_67 = 0;
  if (local_188 < 1000) {
    lVar2 = *(longlong *)(*(longlong *)(local_180 + 200) + (longlong)(short)local_188 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar3 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_178);
      if (iVar3 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      return iVar3;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140123ef0(longlong param_1,undefined4 param_2,undefined8 *param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  undefined *puVar6;
  int iVar7;
  undefined1 auStack_c8 [32];
  undefined **local_a8;
  undefined4 *local_a0;
  undefined *local_98;
  undefined8 local_90;
  undefined4 local_88;
  undefined2 local_84;
  undefined4 local_82 [2];
  undefined8 local_78;
  undefined1 local_70;
  undefined8 local_68;
  undefined2 local_60;
  undefined2 uStack_5e;
  undefined4 uStack_5c;
  undefined4 local_58;
  undefined2 local_54;
  undefined8 local_52;
  undefined8 local_4a;
  ulonglong local_40;
  
  local_68 = 0xfffffffffffffffe;
  local_40 = DAT_1403223c0 ^ (ulonglong)auStack_c8;
  local_54 = 0;
  local_82[0] = 0;
  uStack_5e = 0x504;
  local_60 = 0x1e;
  uStack_5c = 0;
  local_52 = *param_3;
  local_4a = param_3[1];
  local_84 = 1;
  local_90 = 0x5040012;
  local_88 = param_2;
  local_58 = param_2;
  FUN_1400d1d90(*(undefined8 *)(param_1 + 0xe0),&local_60,&local_90);
  *(int *)(param_1 + 0x6a8) = *(int *)(param_1 + 0x6a8) + 1;
  FUN_1401568c0();
  local_98 = PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(param_4);
  iVar7 = 0;
  if ((local_98 != (undefined *)0x0) && (iVar7 = 0, local_98 != PTR_DAT_1403200a0)) {
    iVar7 = *(int *)(local_98 + -8);
  }
  iVar4 = iVar3;
  if (((iVar3 <= iVar7) && (iVar4 = 0, local_98 != (undefined *)0x0)) &&
     (local_98 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_98 + -8);
  }
  iVar7 = 1;
  if (1 < iVar4) {
    iVar7 = iVar4;
  }
  iVar4 = 0;
  if ((local_98 != (undefined *)0x0) && (iVar4 = 0, local_98 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_98 + -8);
  }
  if (iVar4 < iVar7) {
    FUN_14004f590(&local_98,iVar7);
  }
  FUN_14004f670(&local_98);
  puVar6 = local_98;
  if (local_98 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar6,param_4,iVar3);
  puVar6 = local_98;
  if (local_98 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar6);
  iVar7 = 0;
  if (0 < iVar3) {
    iVar7 = iVar3;
  }
  iVar3 = 0;
  if ((local_98 != (undefined *)0x0) && (local_98 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_98 + -8);
  }
  if ((iVar3 <= iVar7) && (iVar7 = 0, local_98 != (undefined *)0x0)) {
    if (local_98 == PTR_DAT_1403200a0) goto LAB_140124090;
    iVar7 = *(int *)(local_98 + -8);
  }
  if (((local_98 != PTR_DAT_1403200a0) && (local_98 != (undefined *)0x0)) &&
     ((int *)(local_98 + -8) != (int *)0x0)) {
    *(int *)(local_98 + -8) = iVar7;
    *(undefined2 *)(local_98 + (longlong)iVar7 * 2) = 0;
  }
LAB_140124090:
  local_a0 = local_82;
  local_a8 = &local_98;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x420))
            ((longlong *)(param_1 + 0xa8),param_2,&DAT_1403200f0,&local_52);
  puVar6 = local_98;
  if (((local_98 != (undefined *)0x0) && (local_98 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_98 + -8, puVar1 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_78 = uVar5;
    FUN_140156b50(uVar5);
    local_70 = 1;
    piVar2 = (int *)(puVar6 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar5);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140124130(longlong param_1,ushort param_2,undefined8 *param_3,undefined4 param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined8 local_44;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x50e;
  local_44 = 0;
  local_48 = 0x22;
  local_3a = *param_3;
  local_3c = 0;
  local_32 = param_3[1];
  local_2a = param_4;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



void FUN_140124200(longlong *param_1,int param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  undefined *puVar4;
  
  puVar4 = PTR_DAT_140320098;
  puVar1 = (undefined *)*param_1;
  if ((undefined *)*param_1 == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  *param_1 = (longlong)puVar1;
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 == 0) {
    FUN_140050520(param_1);
    return;
  }
  iVar3 = 0;
  if (puVar1 != (undefined *)0x0) {
    if (puVar1 == puVar4) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(puVar1 + -8);
    }
  }
  if (param_2 != iVar3) {
    piVar2 = (int *)FUN_140156940();
    if (piVar2 != (int *)0x0) {
      *piVar2 = 0;
      piVar2[1] = 1;
    }
    puVar1 = PTR_DAT_140320098;
    *piVar2 = param_2;
    puVar4 = (undefined *)*param_1;
    if (puVar4 == (undefined *)0x0) {
      iVar3 = 0;
    }
    else if (puVar4 == puVar1) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(puVar4 + -8);
    }
    if (iVar3 <= param_2) {
      if ((puVar4 == (undefined *)0x0) || (puVar4 == puVar1)) {
        param_2 = 0;
      }
      else {
        param_2 = *(int *)(puVar4 + -8);
      }
    }
    if (puVar4 == (undefined *)0x0) {
      puVar4 = puVar1;
    }
    FUN_140156810(piVar2 + 2,puVar4,param_2);
    FUN_140050520(param_1);
    *param_1 = (longlong)(piVar2 + 2);
  }
  return;
}



void FUN_1401242e0(longlong *param_1)

{
  undefined *puVar1;
  undefined8 *puVar2;
  undefined4 *puVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  undefined *puVar6;
  
  puVar6 = (undefined *)*param_1;
  if (puVar6 == (undefined *)0x0) {
    *param_1 = (longlong)PTR_DAT_140320098;
  }
  else if ((puVar6 != PTR_DAT_140320098) && ((int *)(puVar6 + -8) != (int *)0x0)) {
    if (*(int *)(puVar6 + -4) < 2) {
      return;
    }
    if (*(int *)(puVar6 + -8) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    puVar3 = (undefined4 *)FUN_140156940();
    uVar4 = 0;
    if (puVar3 != (undefined4 *)0x0) {
      *puVar3 = 0;
      puVar3[1] = 1;
    }
    puVar1 = PTR_DAT_140320098;
    puVar6 = (undefined *)*param_1;
    if (puVar6 == (undefined *)0x0) {
      uVar5 = 0;
    }
    else {
      uVar5 = uVar4;
      if (puVar6 != PTR_DAT_140320098) {
        uVar5 = *(undefined4 *)(puVar6 + -8);
      }
    }
    *puVar3 = uVar5;
    puVar6 = (undefined *)*param_1;
    if ((puVar6 != (undefined *)0x0) && (puVar6 != puVar1)) {
      uVar4 = *(undefined4 *)(puVar6 + -8);
    }
    if (puVar6 == (undefined *)0x0) {
      puVar6 = puVar1;
    }
    FUN_140156810(puVar3 + 2,puVar6,uVar4);
    FUN_140050520(param_1);
    *param_1 = (longlong)(puVar3 + 2);
    return;
  }
  puVar2 = (undefined8 *)FUN_140156940();
  *puVar2 = 0;
  *(undefined1 *)(puVar2 + 1) = 0;
  if (puVar2 != (undefined8 *)0x0) {
    *(undefined4 *)puVar2 = 0;
    *(undefined4 *)((longlong)puVar2 + 4) = 1;
  }
  *(undefined1 *)(puVar2 + 1) = 0;
  *param_1 = (longlong)(puVar2 + 1);
  return;
}



undefined * FUN_1401243d0(longlong *param_1,int param_2)

{
  int iVar1;
  undefined *puVar2;
  int iVar3;
  
  puVar2 = (undefined *)*param_1;
  iVar3 = 0;
  if ((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_140320098)) {
    iVar3 = *(int *)(puVar2 + -8);
  }
  if (((param_2 <= iVar3) && (param_2 = 0, puVar2 != (undefined *)0x0)) &&
     (puVar2 != PTR_DAT_140320098)) {
    param_2 = *(int *)(puVar2 + -8);
  }
  iVar3 = 1;
  if (1 < param_2) {
    iVar3 = param_2;
  }
  iVar1 = 0;
  if ((puVar2 != (undefined *)0x0) && (iVar1 = 0, puVar2 != PTR_DAT_140320098)) {
    iVar1 = *(int *)(puVar2 + -8);
  }
  if (iVar1 < iVar3) {
    FUN_140124200(param_1,iVar3);
  }
  FUN_1401242e0(param_1);
  puVar2 = (undefined *)*param_1;
  if ((undefined *)*param_1 == (undefined *)0x0) {
    puVar2 = PTR_DAT_140320098;
  }
  return puVar2;
}



void FUN_140124450(longlong *param_1,int param_2)

{
  int *piVar1;
  undefined *puVar2;
  int iVar3;
  int iVar4;
  
  puVar2 = (undefined *)*param_1;
  iVar4 = 0;
  if (0 < param_2) {
    iVar4 = param_2;
  }
  if (puVar2 == (undefined *)0x0) {
    iVar3 = 0;
  }
  else if (puVar2 == PTR_DAT_140320098) {
    iVar3 = 0;
  }
  else {
    iVar3 = *(int *)(puVar2 + -8);
  }
  if (iVar3 <= iVar4) {
    if (puVar2 == (undefined *)0x0) {
      iVar4 = 0;
    }
    else if (puVar2 == PTR_DAT_140320098) {
      iVar4 = 0;
    }
    else {
      iVar4 = *(int *)(puVar2 + -8);
    }
  }
  if (((puVar2 != PTR_DAT_140320098) && (puVar2 != (undefined *)0x0)) &&
     (piVar1 = (int *)(puVar2 + -8), piVar1 != (int *)0x0)) {
    *piVar1 = iVar4;
    *(undefined1 *)((longlong)iVar4 + 8 + (longlong)piVar1) = 0;
  }
  return;
}



void FUN_1401244c0(longlong *param_1)

{
  int *piVar1;
  undefined *puVar2;
  int iVar3;
  int iVar4;
  
  iVar3 = FUN_1401567e0();
  iVar4 = 0;
  if (0 < iVar3) {
    iVar4 = iVar3;
  }
  puVar2 = (undefined *)*param_1;
  if (puVar2 == (undefined *)0x0) {
    iVar3 = 0;
  }
  else if (puVar2 == PTR_DAT_140320098) {
    iVar3 = 0;
  }
  else {
    iVar3 = *(int *)(puVar2 + -8);
  }
  if (iVar3 <= iVar4) {
    if (puVar2 == (undefined *)0x0) {
      iVar4 = 0;
    }
    else if (puVar2 == PTR_DAT_140320098) {
      iVar4 = 0;
    }
    else {
      iVar4 = *(int *)(puVar2 + -8);
    }
  }
  if (((puVar2 != PTR_DAT_140320098) && (puVar2 != (undefined *)0x0)) &&
     (piVar1 = (int *)(puVar2 + -8), piVar1 != (int *)0x0)) {
    *piVar1 = iVar4;
    *(undefined1 *)((longlong)iVar4 + 8 + (longlong)piVar1) = 0;
  }
  return;
}



undefined8 * FUN_140124540(undefined8 *param_1,undefined8 param_2,int param_3)

{
  int iVar1;
  int iVar2;
  undefined8 uVar3;
  
  FUN_1401568c0();
  *param_1 = PTR_DAT_140320098;
  iVar2 = FUN_1401567e0(param_2);
  iVar1 = iVar2;
  if ((0 < param_3) && (iVar1 = param_3, iVar2 < param_3)) {
    iVar1 = iVar2;
  }
  uVar3 = FUN_1401243d0(param_1,iVar1);
  FUN_140156810(uVar3,param_2,iVar1);
  FUN_1401244c0(param_1);
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401245c0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,wchar_t *param_6,wchar_t *param_7)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_d8 [32];
  undefined2 local_b8;
  undefined2 local_b6;
  undefined4 local_b4;
  undefined4 local_b0;
  undefined2 local_ac;
  undefined8 local_aa;
  undefined8 local_a2;
  wchar_t local_9a [12];
  ulonglong local_82;
  wchar_t local_7a [28];
  ulonglong local_42;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_d8;
  local_9a[0] = L'\0';
  local_9a[1] = L'\0';
  local_9a[2] = L'\0';
  local_9a[3] = L'\0';
  local_9a[4] = L'\0';
  local_9a[5] = L'\0';
  local_9a[6] = L'\0';
  local_9a[7] = L'\0';
  local_9a[8] = L'\0';
  local_9a[9] = L'\0';
  local_9a[10] = L'\0';
  local_9a[0xb] = L'\0';
  local_82 = 0;
  local_7a[0] = L'\0';
  local_7a[1] = L'\0';
  local_7a[2] = L'\0';
  local_7a[3] = L'\0';
  local_7a[4] = L'\0';
  local_7a[5] = L'\0';
  local_7a[6] = L'\0';
  local_7a[7] = L'\0';
  local_7a[8] = L'\0';
  local_7a[9] = L'\0';
  local_7a[10] = L'\0';
  local_7a[0xb] = L'\0';
  local_7a[0xc] = L'\0';
  local_7a[0xd] = L'\0';
  local_7a[0xe] = L'\0';
  local_7a[0xf] = L'\0';
  local_7a[0x10] = L'\0';
  local_7a[0x11] = L'\0';
  local_7a[0x12] = L'\0';
  local_7a[0x13] = L'\0';
  local_7a[0x14] = L'\0';
  local_7a[0x15] = L'\0';
  local_7a[0x16] = L'\0';
  local_7a[0x17] = L'\0';
  local_7a[0x18] = L'\0';
  local_7a[0x19] = L'\0';
  local_7a[0x1a] = L'\0';
  local_7a[0x1b] = L'\0';
  local_42 = 0;
  local_b6 = 0x3e9;
  local_b8 = 0x7e;
  local_aa = *param_5;
  local_a2 = param_5[1];
  local_ac = 0;
  local_b4 = param_4;
  local_b0 = param_3;
  wcsncpy(local_9a,param_6,0xf);
  wcsncpy(local_7a,param_7,0x1f);
  local_82 = local_82 & 0xffffffffffff;
  local_42 = local_42 & 0xffffffffffff;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_b8);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140124710(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x3f7;
  local_4c = 0;
  local_58 = 0x2e;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140124810(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,wchar_t *param_7)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_b8 [32];
  undefined2 local_98;
  undefined2 local_96;
  undefined4 local_94;
  undefined4 local_90;
  undefined2 local_8c;
  undefined8 local_8a;
  undefined8 local_82;
  undefined8 local_7a;
  undefined8 local_72;
  wchar_t local_6a [28];
  ulonglong local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_b8;
  local_6a[0] = L'\0';
  local_6a[1] = L'\0';
  local_6a[2] = L'\0';
  local_6a[3] = L'\0';
  local_6a[4] = L'\0';
  local_6a[5] = L'\0';
  local_6a[6] = L'\0';
  local_6a[7] = L'\0';
  local_6a[8] = L'\0';
  local_6a[9] = L'\0';
  local_6a[10] = L'\0';
  local_6a[0xb] = L'\0';
  local_6a[0xc] = L'\0';
  local_6a[0xd] = L'\0';
  local_6a[0xe] = L'\0';
  local_6a[0xf] = L'\0';
  local_6a[0x10] = L'\0';
  local_6a[0x11] = L'\0';
  local_6a[0x12] = L'\0';
  local_6a[0x13] = L'\0';
  local_6a[0x14] = L'\0';
  local_6a[0x15] = L'\0';
  local_6a[0x16] = L'\0';
  local_6a[0x17] = L'\0';
  local_6a[0x18] = L'\0';
  local_6a[0x19] = L'\0';
  local_6a[0x1a] = L'\0';
  local_6a[0x1b] = L'\0';
  local_32 = 0;
  local_96 = 0x429;
  iVar2 = 0;
  local_98 = 0x6e;
  local_8a = *param_5;
  local_82 = param_5[1];
  local_7a = *param_6;
  local_72 = param_6[1];
  local_8c = 0;
  local_94 = param_4;
  local_90 = param_3;
  wcsncpy(local_6a,param_7,0x1f);
  local_32 = local_32 & 0xffffffffffff;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    iVar2 = 0;
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_98);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140124960(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,wchar_t *param_6,undefined2 param_7,undefined2 param_8,
                 undefined4 *param_9,undefined4 param_10,char *param_11)

{
  wchar_t wVar1;
  int iVar2;
  longlong lVar3;
  wchar_t *pwVar4;
  undefined1 auStack_f8 [32];
  undefined2 local_d8;
  undefined2 local_d6;
  undefined4 local_d4;
  undefined4 local_d0;
  undefined2 local_cc;
  undefined8 local_ca;
  undefined8 local_c2;
  char local_ba [48];
  ushort local_8a;
  wchar_t local_88 [12];
  ulonglong local_70;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_f8;
  if (param_6 == (wchar_t *)0x0) {
    iVar2 = 0;
  }
  else {
    lVar3 = -1;
    pwVar4 = param_6;
    do {
      if (lVar3 == 0) break;
      lVar3 = lVar3 + -1;
      wVar1 = *pwVar4;
      pwVar4 = pwVar4 + 1;
    } while (wVar1 != L'\0');
    iVar2 = 0;
    if (lVar3 != -2) {
      iVar2 = 0;
      local_64 = 0;
      local_60 = 0;
      local_5c = 0;
      local_cc = 0;
      local_58 = 0;
      local_68 = 0;
      local_ba[0] = '\0';
      local_ba[1] = '\0';
      local_ba[2] = '\0';
      local_ba[3] = '\0';
      local_ba[4] = '\0';
      local_ba[5] = '\0';
      local_ba[6] = '\0';
      local_ba[7] = '\0';
      local_ba[8] = '\0';
      local_ba[9] = '\0';
      local_ba[10] = '\0';
      local_ba[0xb] = '\0';
      local_ba[0xc] = '\0';
      local_ba[0xd] = '\0';
      local_ba[0xe] = '\0';
      local_ba[0xf] = '\0';
      local_ba[0x10] = '\0';
      local_ba[0x11] = '\0';
      local_ba[0x12] = '\0';
      local_ba[0x13] = '\0';
      local_ba[0x14] = '\0';
      local_ba[0x15] = '\0';
      local_ba[0x16] = '\0';
      local_ba[0x17] = '\0';
      local_ba[0x18] = '\0';
      local_ba[0x19] = '\0';
      local_ba[0x1a] = '\0';
      local_ba[0x1b] = '\0';
      local_ba[0x1c] = '\0';
      local_ba[0x1d] = '\0';
      local_ba[0x1e] = '\0';
      local_ba[0x1f] = '\0';
      local_ba[0x20] = '\0';
      local_ba[0x21] = '\0';
      local_ba[0x22] = '\0';
      local_ba[0x23] = '\0';
      local_ba[0x24] = '\0';
      local_ba[0x25] = '\0';
      local_ba[0x26] = '\0';
      local_ba[0x27] = '\0';
      local_ba[0x28] = '\0';
      local_ba[0x29] = '\0';
      local_ba[0x2a] = '\0';
      local_ba[0x2b] = '\0';
      local_ba[0x2c] = '\0';
      local_ba[0x2d] = '\0';
      local_ba[0x2e] = '\0';
      local_ba[0x2f] = '\0';
      local_8a = 0;
      local_88[0] = L'\0';
      local_88[1] = L'\0';
      local_88[2] = L'\0';
      local_88[3] = L'\0';
      local_88[4] = L'\0';
      local_88[5] = L'\0';
      local_88[6] = L'\0';
      local_88[7] = L'\0';
      local_88[8] = L'\0';
      local_88[9] = L'\0';
      local_88[10] = L'\0';
      local_88[0xb] = L'\0';
      local_70 = 0;
      local_d6 = 0x3ee;
      local_54 = 0;
      local_d8 = 0x88;
      local_ca = *param_5;
      local_c2 = param_5[1];
      local_d4 = param_4;
      local_d0 = param_3;
      wcsncpy(local_88,param_6,0xf);
      local_70 = local_70 & 0xffffffffffff;
      strncpy(local_ba,param_11,0x31);
      local_8a = local_8a & 0xff;
      local_68 = CONCAT22(param_8,param_7);
      local_64 = *param_9;
      local_60 = param_9[1];
      local_5c = param_9[2];
      local_58 = param_9[3];
      local_54 = param_10;
      if (param_2 < 1000) {
        lVar3 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
        iVar2 = 0;
        if (lVar3 != 0) {
          EnterCriticalSection((LPCRITICAL_SECTION)(lVar3 + 0x38));
          iVar2 = FUN_1400a1430(*(undefined8 *)(lVar3 + 0x18),&local_d8);
          if (iVar2 != 0) {
            ReleaseSemaphore(*(HANDLE *)(lVar3 + 0x10),1,(LPLONG)0x0);
          }
          LeaveCriticalSection((LPCRITICAL_SECTION)(lVar3 + 0x38));
        }
      }
      else {
        wprintf(L"Invalid Queue Index\n");
      }
    }
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140124b40(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined2 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x461;
  local_48 = 0x20;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_2a = param_6;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140124c30(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x3f9;
  local_4c = 0;
  local_58 = 0x2e;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140124d30(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x3f6;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140124e10(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined8 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x42c;
  local_3c = 0;
  local_48 = 0x26;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140124ef0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5,undefined8 param_6,undefined4 param_7,undefined4 param_8,
                 undefined4 param_9,undefined4 param_10)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_88 [32];
  undefined2 local_68;
  undefined2 local_66;
  undefined4 local_64;
  undefined4 local_60;
  undefined2 local_5c;
  undefined8 local_5a;
  undefined8 local_52;
  undefined4 local_4a;
  undefined4 local_46;
  undefined8 local_42;
  undefined4 local_3a;
  undefined4 local_36;
  undefined4 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  local_66 = 0x42d;
  local_5c = 0;
  local_68 = 0x3a;
  local_5a = *param_4;
  local_52 = param_4[1];
  local_64 = 0;
  local_4a = param_7;
  local_46 = param_5;
  local_42 = param_6;
  local_3a = param_8;
  local_36 = param_9;
  local_32 = param_10;
  local_60 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_68);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140125010(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x42f;
  local_3c = 0;
  local_48 = 0x22;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401250f0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5,undefined4 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  undefined4 local_26;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4b8;
  local_3c = 0;
  local_48 = 0x26;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_26 = param_6;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



int FUN_1401251e0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined2 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined4 local_14;
  undefined4 local_10;
  undefined2 local_c;
  undefined2 local_a;
  
  local_16 = 0x3f5;
  local_18 = 0x10;
  local_c = 0;
  local_a = param_5;
  local_14 = param_4;
  local_10 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401252a0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined8 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x431;
  local_3c = 0;
  local_48 = 0x26;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140125380(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x497;
  local_3c = 0;
  local_48 = 0x22;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140125460(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5,undefined1 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  undefined1 local_26;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x432;
  local_3c = 0;
  local_48 = 0x23;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_26 = param_6;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140125550(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x462;
  local_3c = 0;
  local_48 = 0x1e;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140125620(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5,undefined4 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  undefined4 local_26;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x433;
  local_3c = 0;
  local_48 = 0x26;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_26 = param_6;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140125710(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x434;
  local_3c = 0;
  local_48 = 0x22;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401257f0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined2 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x435;
  local_3c = 0;
  local_48 = 0x20;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401258d0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined2 param_5,undefined8 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  undefined8 local_28;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x436;
  local_3c = 0;
  local_48 = 0x28;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_28 = param_6;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401259c0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined2 param_5,undefined2 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  undefined2 local_28;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x438;
  local_3c = 0;
  local_48 = 0x22;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_28 = param_6;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140125ab0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined2 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x437;
  local_3c = 0;
  local_48 = 0x20;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140125b90(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined2 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x3fe;
  local_48 = 0x20;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_2a = param_6;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140125c80(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 wchar_t *param_5,undefined2 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  wchar_t local_4a [12];
  ulonglong local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  iVar2 = 0;
  local_4c = 0;
  local_2a = 0;
  local_4a[0] = L'\0';
  local_4a[1] = L'\0';
  local_4a[2] = L'\0';
  local_4a[3] = L'\0';
  local_4a[4] = L'\0';
  local_4a[5] = L'\0';
  local_4a[6] = L'\0';
  local_4a[7] = L'\0';
  local_4a[8] = L'\0';
  local_4a[9] = L'\0';
  local_4a[10] = L'\0';
  local_4a[0xb] = L'\0';
  local_32 = 0;
  local_56 = 0x3ff;
  local_58 = 0x30;
  local_54 = param_4;
  local_50 = param_3;
  wcsncpy(local_4a,param_5,0xf);
  local_2a = param_6;
  local_32 = local_32 & 0xffffffffffff;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    iVar2 = 0;
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140125d80(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 wchar_t *param_5,undefined2 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  wchar_t local_4a [12];
  ulonglong local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  iVar2 = 0;
  local_4c = 0;
  local_2a = 0;
  local_4a[0] = L'\0';
  local_4a[1] = L'\0';
  local_4a[2] = L'\0';
  local_4a[3] = L'\0';
  local_4a[4] = L'\0';
  local_4a[5] = L'\0';
  local_4a[6] = L'\0';
  local_4a[7] = L'\0';
  local_4a[8] = L'\0';
  local_4a[9] = L'\0';
  local_4a[10] = L'\0';
  local_4a[0xb] = L'\0';
  local_32 = 0;
  local_56 = 0x4b6;
  local_58 = 0x30;
  local_54 = param_4;
  local_50 = param_3;
  wcsncpy(local_4a,param_5,0xf);
  local_2a = param_6;
  local_32 = local_32 & 0xffffffffffff;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    iVar2 = 0;
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140125e80(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined2 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x400;
  local_48 = 0x20;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_2a = param_6;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140125f70(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4ef;
  local_3c = 0;
  local_48 = 0x1e;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126040(longlong param_1,undefined4 param_2,wchar_t *param_3)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  wchar_t local_4a [12];
  ulonglong local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_4a[0] = L'\0';
  local_4a[1] = L'\0';
  local_4a[2] = L'\0';
  local_4a[3] = L'\0';
  local_4a[4] = L'\0';
  local_4a[5] = L'\0';
  local_4a[6] = L'\0';
  local_4a[7] = L'\0';
  local_4a[8] = L'\0';
  local_4a[9] = L'\0';
  local_4a[10] = L'\0';
  local_4a[0xb] = L'\0';
  local_32 = 0;
  local_56 = 0x4f6;
  local_58 = 0x2e;
  local_4c = 0;
  local_54 = 0;
  local_50 = param_2;
  wcsncpy(local_4a,param_3,0xf);
  local_32 = local_32 & 0xffffffffffff;
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 == 0) {
    iVar2 = 0;
  }
  else {
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126120(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x45b;
  local_3c = 0;
  local_48 = 0x22;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126200(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x426;
  local_3c = 0;
  local_48 = 0x22;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401262e0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5,undefined4 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  undefined4 local_26;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x459;
  local_3c = 0;
  local_48 = 0x26;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_26 = param_6;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401263d0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined1 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined1 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x476;
  local_3c = 0;
  local_48 = 0x1f;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401264b0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined1 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined1 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x477;
  local_3c = 0;
  local_48 = 0x1f;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126590(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined1 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined1 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4c4;
  local_3c = 0;
  local_48 = 0x1f;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126670(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined1 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined1 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x508;
  local_3c = 0;
  local_48 = 0x1f;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126750(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x47c;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126830(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined8 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x47d;
  local_4c = 0;
  local_58 = 0x36;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_2a = param_6[2];
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126930(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined4 param_7)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x47e;
  local_4c = 0;
  local_58 = 0x32;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_2a = param_7;
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126a30(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x47f;
  local_4c = 0;
  local_58 = 0x2e;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126b30(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,short param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  int local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x498;
  local_48 = 0x22;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_2a = (int)param_6;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126c20(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,short param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  int local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x499;
  local_48 = 0x22;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_2a = (int)param_6;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126d10(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,short param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  int local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x49a;
  local_48 = 0x22;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_2a = (int)param_6;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126e00(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,short param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  int local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x49b;
  local_48 = 0x22;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_2a = (int)param_6;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126ef0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,short param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  int local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x49c;
  local_48 = 0x22;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_2a = (int)param_6;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140126fe0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,short param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  int local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x49d;
  local_48 = 0x22;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_2a = (int)param_6;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401270d0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x49f;
  local_3c = 0;
  local_48 = 0x22;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401271b0(longlong param_1,ushort param_2,undefined8 *param_3,undefined4 param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined8 local_44;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4a4;
  local_44 = 0;
  local_48 = 0x22;
  local_3a = *param_3;
  local_3c = 0;
  local_32 = param_3[1];
  local_2a = param_4;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127280(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4a6;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127360(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 void *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_118 [32];
  undefined2 local_f8;
  undefined2 local_f6;
  undefined4 local_f4;
  undefined4 local_f0;
  undefined2 local_ec;
  undefined8 local_ea;
  undefined8 local_e2;
  undefined1 local_da [40];
  undefined8 local_b2;
  undefined8 local_aa;
  undefined8 local_a2;
  undefined8 local_9a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  lVar1 = *(longlong *)(param_1 + 200);
  local_b2 = 0;
  local_aa = 0;
  local_a2 = 0;
  local_9a = 0;
  local_f6 = 0x4a7;
  iVar2 = 0;
  local_f8 = 0xc2;
  local_ea = *param_4;
  local_e2 = param_4[1];
  local_f4 = 0;
  local_ec = 0;
  local_f0 = param_3;
  memcpy(local_da,param_5,0xa4);
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(lVar1 + (longlong)(short)param_2 * 8);
    iVar2 = 0;
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_f8);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127470(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 void *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_118 [32];
  undefined2 local_f8;
  undefined2 local_f6;
  undefined4 local_f4;
  undefined4 local_f0;
  undefined2 local_ec;
  undefined8 local_ea;
  undefined8 local_e2;
  undefined1 local_da [40];
  undefined8 local_b2;
  undefined8 local_aa;
  undefined8 local_a2;
  undefined8 local_9a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  lVar1 = *(longlong *)(param_1 + 200);
  local_b2 = 0;
  local_aa = 0;
  local_a2 = 0;
  local_9a = 0;
  local_f6 = 0x4a8;
  iVar2 = 0;
  local_f8 = 0xc2;
  local_ea = *param_4;
  local_e2 = param_4[1];
  local_f4 = 0;
  local_ec = 0;
  local_f0 = param_3;
  memcpy(local_da,param_5,0xa4);
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(lVar1 + (longlong)(short)param_2 * 8);
    iVar2 = 0;
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_f8);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127580(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x4a9;
  local_58 = 0x2e;
  local_4a = *param_4;
  local_54 = 0;
  local_42 = param_4[1];
  local_4c = 0;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127670(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4aa;
  local_48 = 0x22;
  local_3a = *param_4;
  local_44 = 0;
  local_32 = param_4[1];
  local_3c = 0;
  local_2a = *param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127750(longlong param_1,ushort param_2,undefined8 *param_3,wchar_t *param_4,char *param_5
                 )

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_c8 [32];
  undefined2 local_a8;
  undefined2 local_a6;
  undefined8 local_a4;
  undefined2 local_9c;
  undefined8 local_9a;
  undefined8 local_92;
  wchar_t local_8a [12];
  ulonglong local_72;
  char local_6a [48];
  ushort local_3a;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_c8;
  local_8a[0] = L'\0';
  local_8a[1] = L'\0';
  local_8a[2] = L'\0';
  local_8a[3] = L'\0';
  local_8a[4] = L'\0';
  local_8a[5] = L'\0';
  local_8a[6] = L'\0';
  local_8a[7] = L'\0';
  local_8a[8] = L'\0';
  local_8a[9] = L'\0';
  local_8a[10] = L'\0';
  local_8a[0xb] = L'\0';
  local_72 = 0;
  local_6a[0] = '\0';
  local_6a[1] = '\0';
  local_6a[2] = '\0';
  local_6a[3] = '\0';
  local_6a[4] = '\0';
  local_6a[5] = '\0';
  local_6a[6] = '\0';
  local_6a[7] = '\0';
  local_6a[8] = '\0';
  local_6a[9] = '\0';
  local_6a[10] = '\0';
  local_6a[0xb] = '\0';
  local_6a[0xc] = '\0';
  local_6a[0xd] = '\0';
  local_6a[0xe] = '\0';
  local_6a[0xf] = '\0';
  local_6a[0x10] = '\0';
  local_6a[0x11] = '\0';
  local_6a[0x12] = '\0';
  local_6a[0x13] = '\0';
  local_6a[0x14] = '\0';
  local_6a[0x15] = '\0';
  local_6a[0x16] = '\0';
  local_6a[0x17] = '\0';
  local_6a[0x18] = '\0';
  local_6a[0x19] = '\0';
  local_6a[0x1a] = '\0';
  local_6a[0x1b] = '\0';
  local_6a[0x1c] = '\0';
  local_6a[0x1d] = '\0';
  local_6a[0x1e] = '\0';
  local_6a[0x1f] = '\0';
  local_6a[0x20] = '\0';
  local_6a[0x21] = '\0';
  local_6a[0x22] = '\0';
  local_6a[0x23] = '\0';
  local_6a[0x24] = '\0';
  local_6a[0x25] = '\0';
  local_6a[0x26] = '\0';
  local_6a[0x27] = '\0';
  local_6a[0x28] = '\0';
  local_6a[0x29] = '\0';
  local_6a[0x2a] = '\0';
  local_6a[0x2b] = '\0';
  local_6a[0x2c] = '\0';
  local_6a[0x2d] = '\0';
  local_6a[0x2e] = '\0';
  local_6a[0x2f] = '\0';
  local_3a = 0;
  local_a6 = 0x4b7;
  local_a8 = 0x70;
  local_9a = *param_3;
  local_92 = param_3[1];
  local_9c = 0;
  local_a4 = 0;
  wcsncpy(local_8a,param_4,0xf);
  local_72 = local_72 & 0xffffffffffff;
  strncpy(local_6a,param_5,0x31);
  local_3a = local_3a & 0xff;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_a8);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127890(longlong param_1,ushort param_2,undefined8 *param_3)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined8 local_44;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4c9;
  local_3c = 0;
  local_48 = 0x1e;
  local_3a = *param_3;
  local_44 = 0;
  local_32 = param_3[1];
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127960(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4cc;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127a40(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined1 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined1 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4e3;
  local_3c = 0;
  local_48 = 0x1f;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127b20(longlong param_1,ushort param_2,undefined8 *param_3,undefined4 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined4 local_36;
  undefined4 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_32 = param_4[2];
  local_56 = 0x4f2;
  local_58 = 0x2a;
  local_4a = *param_3;
  local_54 = 0;
  local_42 = param_3[1];
  local_4c = 0;
  local_3a = *param_4;
  local_36 = param_4[1];
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127c10(longlong param_1,ushort param_2,undefined8 *param_3,undefined4 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined4 local_36;
  undefined4 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_32 = param_4[2];
  local_56 = 0x4f3;
  local_58 = 0x2a;
  local_4a = *param_3;
  local_54 = 0;
  local_42 = param_3[1];
  local_4c = 0;
  local_3a = *param_4;
  local_36 = param_4[1];
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127d00(longlong param_1,ushort param_2,undefined8 *param_3,undefined4 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined4 local_36;
  undefined4 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_32 = param_4[2];
  local_56 = 0x4f4;
  local_58 = 0x2a;
  local_4a = *param_3;
  local_54 = 0;
  local_42 = param_3[1];
  local_4c = 0;
  local_3a = *param_4;
  local_36 = param_4[1];
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127df0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4f5;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140127ed0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,wchar_t *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_88 [32];
  undefined2 local_68;
  undefined2 local_66;
  undefined4 local_64;
  undefined4 local_60;
  undefined2 local_5c;
  undefined8 local_5a;
  undefined8 local_52;
  wchar_t local_4a [12];
  ulonglong local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  iVar2 = 0;
  local_5c = 0;
  local_4a[0] = L'\0';
  local_4a[1] = L'\0';
  local_4a[2] = L'\0';
  local_4a[3] = L'\0';
  local_4a[4] = L'\0';
  local_4a[5] = L'\0';
  local_4a[6] = L'\0';
  local_4a[7] = L'\0';
  local_4a[8] = L'\0';
  local_4a[9] = L'\0';
  local_4a[10] = L'\0';
  local_4a[0xb] = L'\0';
  local_32 = 0;
  local_66 = 0x4ff;
  local_68 = 0x3e;
  local_5a = *param_5;
  local_52 = param_5[1];
  local_64 = param_4;
  local_60 = param_3;
  wcsncpy(local_4a,param_6,0x10);
  local_32 = local_32 & 0xffffffffffff;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    iVar2 = 0;
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_68);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return iVar2;
}



int FUN_140127fd0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined4 local_14;
  undefined4 local_10;
  undefined2 local_c;
  
  local_16 = 0x500;
  local_18 = 0x3e;
  local_c = 0;
  local_14 = param_4;
  local_10 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



int FUN_140128090(longlong param_1,ushort param_2,undefined4 param_3,undefined2 param_4,
                 undefined2 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_28;
  undefined2 local_26;
  undefined4 local_24;
  undefined4 local_20;
  undefined2 local_1c;
  undefined2 local_1a;
  undefined2 local_18;
  
  local_26 = 0x509;
  local_28 = 0x12;
  local_24 = 0;
  local_1a = param_5;
  local_1c = 0;
  local_20 = param_3;
  local_18 = param_4;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_28);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140128160(longlong param_1,ushort param_2,undefined4 param_3,undefined2 param_4,
                 undefined2 param_5,wchar_t *param_6,wchar_t *param_7,wchar_t *param_8,short param_9
                 ,undefined8 param_10,short param_11,short param_12,undefined2 param_13,
                 undefined2 param_14)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_488 [32];
  ushort local_468;
  undefined4 local_458;
  undefined4 local_454;
  undefined4 local_450;
  undefined2 local_44c;
  undefined2 local_44a;
  undefined2 local_448;
  int local_446;
  undefined2 local_442;
  undefined2 local_440;
  int local_43e;
  int local_43a;
  wchar_t local_436 [12];
  ulonglong local_41e;
  wchar_t local_416 [12];
  ulonglong local_3fe;
  wchar_t local_3f6 [349];
  undefined2 local_13c;
  undefined1 local_13a [226];
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_488;
  local_454 = 0;
  local_44c = 0;
  local_468 = param_2;
  FUN_14004edf0(local_13a);
  local_436[0] = L'\0';
  local_436[1] = L'\0';
  local_436[2] = L'\0';
  local_436[3] = L'\0';
  local_436[4] = L'\0';
  local_436[5] = L'\0';
  local_436[6] = L'\0';
  local_436[7] = L'\0';
  local_436[8] = L'\0';
  local_436[9] = L'\0';
  local_436[10] = L'\0';
  local_436[0xb] = L'\0';
  local_41e = 0;
  local_416[0] = L'\0';
  local_416[1] = L'\0';
  local_416[2] = L'\0';
  local_416[3] = L'\0';
  local_416[4] = L'\0';
  local_416[5] = L'\0';
  local_416[6] = L'\0';
  local_416[7] = L'\0';
  local_416[8] = L'\0';
  local_416[9] = L'\0';
  local_416[10] = L'\0';
  local_416[0xb] = L'\0';
  local_3fe = 0;
  memset(local_3f6,0,700);
  local_448 = param_5;
  local_43e = (int)param_9;
  local_458 = 0x50a03f2;
  local_43a = (int)param_11;
  local_450 = param_3;
  local_44a = param_4;
  FUN_1400573e0(local_13a,param_10);
  local_446 = (int)param_12;
  local_442 = param_13;
  local_440 = param_14;
  wcsncpy(local_436,param_6,0xf);
  wcsncpy(local_416,param_7,0xf);
  wcsncpy(local_3f6,param_8,0x15d);
  local_41e = local_41e & 0xffffffffffff;
  local_3fe = local_3fe & 0xffffffffffff;
  local_13c = 0;
  if (local_468 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)local_468 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_458);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140128350(longlong param_1,undefined4 param_2,undefined4 param_3,undefined8 *param_4)

{
  undefined1 auStack_98 [32];
  undefined8 *local_78;
  undefined4 *local_70;
  undefined4 local_68 [2];
  undefined2 local_60;
  undefined6 uStack_5e;
  undefined4 local_58;
  undefined2 local_54;
  undefined4 local_52 [2];
  undefined2 local_48;
  undefined2 uStack_46;
  undefined4 uStack_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  uStack_46 = 0x515;
  local_3c = 0;
  local_52[0] = 0;
  local_48 = 0x1e;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_54 = 1;
  _local_60 = CONCAT62((int6)(CONCAT44(param_3,0x515001e) >> 0x10),0x12);
  local_58 = param_2;
  uStack_44 = param_3;
  local_40 = param_2;
  FUN_1400d5a80(*(undefined8 *)(param_1 + 0xe0),&local_48,&local_60);
  *(int *)(param_1 + 0x6bc) = *(int *)(param_1 + 0x6bc) + 1;
  local_70 = local_52;
  local_78 = &local_3a;
  local_68[0] = param_3;
  (**(code **)(*(longlong *)(param_1 + 0xa8) + 0x470))
            ((longlong *)(param_1 + 0xa8),param_2,&DAT_1403200f0,local_68);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140128440(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x516;
  local_44 = 0;
  local_48 = 0x22;
  local_3a = *param_4;
  local_3c = 0;
  local_32 = param_4[1];
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140128520(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x524;
  local_44 = 0;
  local_48 = 0x22;
  local_3a = *param_4;
  local_3c = 0;
  local_32 = param_4[1];
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140128600(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,wchar_t *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_88 [32];
  undefined2 local_68;
  undefined2 local_66;
  undefined4 local_64;
  undefined4 local_60;
  undefined2 local_5c;
  undefined8 local_5a;
  undefined8 local_52;
  wchar_t local_4a [12];
  ulonglong local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  iVar2 = 0;
  local_5c = 0;
  local_4a[0] = L'\0';
  local_4a[1] = L'\0';
  local_4a[2] = L'\0';
  local_4a[3] = L'\0';
  local_4a[4] = L'\0';
  local_4a[5] = L'\0';
  local_4a[6] = L'\0';
  local_4a[7] = L'\0';
  local_4a[8] = L'\0';
  local_4a[9] = L'\0';
  local_4a[10] = L'\0';
  local_4a[0xb] = L'\0';
  local_32 = 0;
  local_66 = 0x3ea;
  local_68 = 0x3e;
  local_5a = *param_5;
  local_52 = param_5[1];
  local_64 = param_4;
  local_60 = param_3;
  wcsncpy(local_4a,param_6,0xf);
  local_32 = local_32 & 0xffffffffffff;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    iVar2 = 0;
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_68);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140128700(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x3f8;
  local_4c = 0;
  local_58 = 0x2e;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140128800(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x411;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



int FUN_1401288e0(longlong param_1,ushort param_2,undefined4 param_3,undefined2 param_4)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined4 local_14;
  undefined4 local_10;
  undefined2 local_c;
  undefined2 local_a;
  
  local_16 = 0x40e;
  local_18 = 0x10;
  local_c = 0;
  local_14 = 0;
  local_10 = param_3;
  local_a = param_4;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



int FUN_1401289a0(longlong param_1,ushort param_2,undefined4 param_3,undefined2 param_4,
                 undefined2 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_28;
  undefined2 local_26;
  undefined4 local_24;
  undefined4 local_20;
  undefined2 local_1c;
  undefined2 local_1a;
  undefined2 local_18;
  
  local_26 = 0x4b5;
  local_28 = 0x12;
  local_1c = 0;
  local_18 = param_5;
  local_24 = 0;
  local_20 = param_3;
  local_1a = param_4;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_28);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140128a70(longlong param_1,undefined2 param_2,ushort param_3,undefined4 param_4,
                 undefined4 param_5,int param_6,undefined2 param_7,undefined2 param_8,
                 wchar_t *param_9,undefined8 *param_10,wchar_t *param_11,undefined4 param_12,
                 int param_13)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_f8 [32];
  undefined2 local_d8;
  undefined2 local_d6;
  int local_d4;
  undefined4 local_d0;
  undefined2 local_cc;
  undefined2 local_ca;
  undefined2 local_c8;
  wchar_t local_c6 [16];
  ulonglong local_a6;
  wchar_t local_9e [12];
  ulonglong local_86;
  undefined8 local_7e;
  undefined8 local_76;
  undefined8 local_6e;
  undefined8 local_66;
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_f8;
  if ((0 < param_6) && (-1 < param_13)) {
    local_d4 = param_6;
    local_7e = 0;
    local_76 = 0;
    local_c6[0] = L'\0';
    local_c6[1] = L'\0';
    local_c6[2] = L'\0';
    local_c6[3] = L'\0';
    local_c6[4] = L'\0';
    local_c6[5] = L'\0';
    local_c6[6] = L'\0';
    local_c6[7] = L'\0';
    local_c6[8] = L'\0';
    local_c6[9] = L'\0';
    local_c6[10] = L'\0';
    local_c6[0xb] = L'\0';
    local_c6[0xc] = L'\0';
    local_c6[0xd] = L'\0';
    local_c6[0xe] = L'\0';
    local_c6[0xf] = L'\0';
    local_a6 = 0;
    local_9e[0] = L'\0';
    local_9e[1] = L'\0';
    local_9e[2] = L'\0';
    local_9e[3] = L'\0';
    local_9e[4] = L'\0';
    local_9e[5] = L'\0';
    local_9e[6] = L'\0';
    local_9e[7] = L'\0';
    local_9e[8] = L'\0';
    local_9e[9] = L'\0';
    local_9e[10] = L'\0';
    local_9e[0xb] = L'\0';
    local_86 = 0;
    local_cc = 0;
    local_d6 = 0x3f0;
    local_6e = 0;
    local_d8 = 0x7a;
    local_66 = 0;
    local_ca = param_7;
    local_c8 = param_8;
    local_d0 = param_4;
    wcsncpy(local_c6,param_9,0x13);
    wcsncpy(local_9e,param_11,0xf);
    local_7e = *param_10;
    local_76 = param_10[1];
    local_a6 = local_a6 & 0xffffffffffff;
    local_6e = CONCAT44(param_13,param_12);
    local_86 = local_86 & 0xffffffffffff;
    local_66 = CONCAT26(param_3,CONCAT24(param_2,param_5));
    if (param_3 < 1000) {
      lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_3 * 8);
      if (lVar1 != 0) {
        EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
        iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_d8);
        if (iVar2 != 0) {
          ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
        }
        LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
        return iVar2;
      }
    }
    else {
      wprintf(L"Invalid Queue Index\n");
    }
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140128c50(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x402;
  local_4c = 0;
  local_58 = 0x2e;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140128d50(longlong param_1,ushort param_2,undefined4 param_3,undefined4 *param_4,
                 undefined1 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined4 local_6a;
  undefined4 local_66;
  undefined8 local_62;
  undefined8 local_5a;
  undefined1 local_52;
  undefined4 local_51;
  undefined8 local_4d;
  undefined8 local_45;
  undefined8 local_3d;
  undefined8 local_35;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_74 = param_4[1];
  local_76 = 0x403;
  local_6c = 0;
  local_78 = 0x4b;
  local_6a = *param_4;
  local_62 = *(undefined8 *)(param_4 + 2);
  local_5a = *(undefined8 *)(param_4 + 4);
  local_52 = *param_5;
  local_51 = *(undefined4 *)(param_5 + 1);
  local_4d = *(undefined8 *)(param_5 + 5);
  local_45 = *(undefined8 *)(param_5 + 0xd);
  local_3d = *(undefined8 *)(param_5 + 0x15);
  local_35 = *(undefined8 *)(param_5 + 0x1d);
  local_70 = param_3;
  local_66 = local_74;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140128e70(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x45f;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140128f50(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined2 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x45e;
  local_48 = 0x20;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_2a = param_6;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129040(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x45d;
  local_4c = 0;
  local_58 = 0x2e;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129140(longlong param_1,ushort param_2,undefined4 param_3,undefined4 *param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined4 local_4a;
  undefined4 local_46;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined8 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_54 = param_4[1];
  local_56 = 0x45c;
  local_58 = 0x36;
  local_4a = *param_4;
  local_4c = 0;
  local_42 = *(undefined8 *)(param_4 + 2);
  local_3a = *(undefined8 *)(param_4 + 4);
  local_32 = *param_5;
  local_2a = param_5[1];
  local_50 = param_3;
  local_46 = local_54;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129240(longlong param_1,ushort param_2,undefined4 param_3,undefined4 *param_4,
                 wchar_t *param_5,undefined4 *param_6,undefined2 *param_7)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_138 [32];
  undefined2 local_118;
  undefined2 local_116;
  undefined4 local_114;
  undefined4 local_110;
  undefined2 local_10c;
  undefined4 local_10a;
  undefined4 local_106;
  undefined8 local_102;
  undefined8 local_fa;
  undefined4 local_f2;
  undefined4 local_ee;
  undefined8 local_ea;
  undefined8 local_e2;
  undefined2 local_da;
  undefined2 local_d8;
  undefined2 local_d6;
  undefined8 local_d4;
  undefined4 local_cc;
  undefined4 local_c8;
  undefined4 local_c4;
  undefined4 local_c0;
  undefined4 local_bc;
  undefined4 local_b8;
  undefined4 local_b4;
  undefined4 local_b0;
  wchar_t local_ac [50];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_138;
  local_ac[0] = L'\0';
  local_ac[1] = L'\0';
  local_ac[2] = L'\0';
  local_ac[3] = L'\0';
  local_ac[4] = L'\0';
  local_ac[5] = L'\0';
  local_ac[6] = L'\0';
  local_ac[7] = L'\0';
  local_d4 = *(undefined8 *)(param_7 + 3);
  local_ac[8] = L'\0';
  local_ac[9] = L'\0';
  local_ac[10] = L'\0';
  local_ac[0xb] = L'\0';
  local_ac[0xc] = L'\0';
  local_ac[0xd] = L'\0';
  local_ac[0xe] = L'\0';
  local_ac[0xf] = L'\0';
  local_ac[0x10] = L'\0';
  local_ac[0x11] = L'\0';
  local_ac[0x12] = L'\0';
  local_ac[0x13] = L'\0';
  local_ac[0x14] = L'\0';
  local_ac[0x15] = L'\0';
  local_ac[0x16] = L'\0';
  local_ac[0x17] = L'\0';
  local_ac[0x18] = L'\0';
  local_ac[0x19] = L'\0';
  local_ac[0x1a] = L'\0';
  local_ac[0x1b] = L'\0';
  local_ac[0x1c] = L'\0';
  local_ac[0x1d] = L'\0';
  local_ac[0x1e] = L'\0';
  local_ac[0x1f] = L'\0';
  local_ac[0x20] = L'\0';
  local_ac[0x21] = L'\0';
  local_ac[0x22] = L'\0';
  local_ac[0x23] = L'\0';
  local_ac[0x24] = L'\0';
  local_ac[0x25] = L'\0';
  local_ac[0x26] = L'\0';
  local_ac[0x27] = L'\0';
  local_ac[0x28] = L'\0';
  local_ac[0x29] = L'\0';
  local_ac[0x2a] = L'\0';
  local_ac[0x2b] = L'\0';
  local_ac[0x2c] = L'\0';
  local_ac[0x2d] = L'\0';
  local_ac[0x2e] = L'\0';
  local_ac[0x2f] = L'\0';
  local_116 = 0x404;
  local_114 = param_6[1];
  local_118 = 0xcc;
  local_10a = *param_4;
  local_106 = param_4[1];
  local_102 = *(undefined8 *)(param_4 + 2);
  local_fa = *(undefined8 *)(param_4 + 4);
  local_f2 = *param_6;
  local_10c = 0;
  local_ea = *(undefined8 *)(param_6 + 2);
  local_e2 = *(undefined8 *)(param_6 + 4);
  local_da = *param_7;
  local_d8 = param_7[1];
  local_d6 = param_7[2];
  local_cc = *(undefined4 *)(param_7 + 7);
  local_c8 = *(undefined4 *)(param_7 + 9);
  local_c4 = *(undefined4 *)(param_7 + 0xb);
  local_c0 = *(undefined4 *)(param_7 + 0xd);
  local_bc = *(undefined4 *)(param_7 + 0xf);
  local_b8 = *(undefined4 *)(param_7 + 0x11);
  local_b4 = *(undefined4 *)(param_7 + 0x13);
  local_b0 = *(undefined4 *)(param_7 + 0x15);
  local_110 = param_3;
  local_ee = local_114;
  if (param_7 + 0x17 != (wchar_t *)0x0) {
    wcsncpy_s(local_ac,0x10,param_7 + 0x17,0xf);
  }
  if (param_7 + 0x27 != (wchar_t *)0x0) {
    wcsncpy_s(local_ac + 0x10,0x10,param_7 + 0x27,0xf);
  }
  if (param_5 != (wchar_t *)0x0) {
    wcsncpy_s(local_ac + 0x20,0x10,param_5,0xf);
  }
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_118);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129460(longlong param_1,undefined4 param_2,undefined8 *param_3)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x413;
  local_3c = 0;
  local_48 = 0x1e;
  local_3a = *param_3;
  local_44 = 0;
  local_32 = param_3[1];
  lVar1 = **(longlong **)(param_1 + 200);
  if (lVar1 != 0) {
    local_40 = param_2;
    EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
    if (iVar2 != 0) {
      ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    return iVar2;
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129540(longlong param_1,ushort param_2,undefined4 param_3,undefined4 *param_4,
                 undefined1 param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined1 local_4a;
  undefined8 local_49;
  undefined8 local_41;
  undefined4 local_39;
  undefined4 local_35;
  undefined8 local_31;
  undefined8 local_29;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_54 = param_4[1];
  local_56 = 0x414;
  local_58 = 0x37;
  local_39 = *param_4;
  local_4c = 0;
  local_31 = *(undefined8 *)(param_4 + 2);
  local_29 = *(undefined8 *)(param_4 + 4);
  local_4a = param_5;
  local_49 = *param_6;
  local_41 = param_6[1];
  local_50 = param_3;
  local_35 = local_54;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129650(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,wchar_t *param_7)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  wchar_t local_4a [12];
  ulonglong local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_4a[0] = L'\0';
  local_4a[1] = L'\0';
  local_4a[2] = L'\0';
  local_4a[3] = L'\0';
  local_4a[4] = L'\0';
  local_4a[5] = L'\0';
  local_4a[6] = L'\0';
  local_4a[7] = L'\0';
  local_4a[8] = L'\0';
  local_4a[9] = L'\0';
  local_4a[10] = L'\0';
  local_4a[0xb] = L'\0';
  local_32 = 0;
  iVar2 = 0;
  local_76 = 0x43c;
  local_78 = 0x4e;
  local_5a = *param_6;
  local_52 = param_6[1];
  local_6a = *param_5;
  local_62 = param_5[1];
  local_6c = 0;
  local_74 = param_4;
  local_70 = param_3;
  wcsncpy(local_4a,param_7,0xf);
  local_32 = local_32 & 0xffffffffffff;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    iVar2 = 0;
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129780(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined2 param_7)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x43d;
  local_4c = 0;
  local_58 = 0x30;
  local_3a = *param_6;
  local_32 = param_6[1];
  local_4a = *param_5;
  local_42 = param_5[1];
  local_2a = param_7;
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129880(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,wchar_t *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_218 [32];
  undefined4 local_1f8;
  undefined4 local_1f4;
  undefined4 local_1f0;
  undefined2 local_1ec;
  undefined8 local_1ea;
  undefined8 local_1e2;
  wchar_t local_1da [199];
  undefined2 local_4c;
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_218;
  local_1ec = 0;
  memset(local_1da,0,400);
  local_1ea = *param_5;
  local_1e2 = param_5[1];
  local_1f8 = 0x45a01ae;
  local_1f4 = param_4;
  local_1f0 = param_3;
  wcsncpy(local_1da,param_6,199);
  local_4c = 0;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_1f8);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401299b0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,wchar_t *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_158 [32];
  undefined4 local_138;
  undefined4 local_134;
  undefined4 local_130;
  undefined2 local_12c;
  undefined8 local_12a;
  undefined8 local_122;
  wchar_t local_11a [99];
  undefined2 local_54;
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_158;
  local_12c = 0;
  memset(local_11a,0,200);
  local_12a = *param_5;
  local_122 = param_5[1];
  local_138 = 0x43e00e6;
  local_134 = param_4;
  local_130 = param_3;
  wcsncpy(local_11a,param_6,99);
  local_54 = 0;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_138);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129ae0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_4c = 0;
  local_56 = 0x43f;
  local_58 = 0x2e;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129c10(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,wchar_t *param_7,undefined4 param_8,
                 wchar_t *param_9)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_d8 [32];
  undefined2 local_b8;
  undefined2 local_b6;
  undefined4 local_b4;
  undefined4 local_b0;
  undefined2 local_ac;
  undefined8 local_aa;
  undefined8 local_a2;
  undefined8 local_9a;
  undefined8 local_92;
  undefined4 local_8a;
  wchar_t local_86 [16];
  ulonglong local_66;
  wchar_t local_5e [12];
  ulonglong local_46;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_d8;
  local_86[0] = L'\0';
  local_86[1] = L'\0';
  local_86[2] = L'\0';
  local_86[3] = L'\0';
  local_86[4] = L'\0';
  local_86[5] = L'\0';
  local_86[6] = L'\0';
  local_86[7] = L'\0';
  local_86[8] = L'\0';
  local_86[9] = L'\0';
  local_86[10] = L'\0';
  local_86[0xb] = L'\0';
  local_86[0xc] = L'\0';
  local_86[0xd] = L'\0';
  local_86[0xe] = L'\0';
  local_86[0xf] = L'\0';
  local_66 = 0;
  local_5e[0] = L'\0';
  local_5e[1] = L'\0';
  local_5e[2] = L'\0';
  local_5e[3] = L'\0';
  local_5e[4] = L'\0';
  local_5e[5] = L'\0';
  local_5e[6] = L'\0';
  local_5e[7] = L'\0';
  local_5e[8] = L'\0';
  local_5e[9] = L'\0';
  local_5e[10] = L'\0';
  local_5e[0xb] = L'\0';
  local_46 = 0;
  local_b6 = 0x487;
  local_b8 = 0x7a;
  local_aa = *param_5;
  local_a2 = param_5[1];
  local_9a = *param_6;
  local_ac = 0;
  local_92 = param_6[1];
  local_8a = param_8;
  local_b4 = param_4;
  local_b0 = param_3;
  wcsncpy(local_86,param_9,0x13);
  wcsncpy(local_5e,param_7,0xf);
  local_66 = local_66 & 0xffffffffffff;
  local_46 = local_46 & 0xffffffffffff;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_b8);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129d60(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x488;
  local_44 = 0;
  local_48 = 0x1e;
  local_3a = *param_4;
  local_3c = 0;
  local_32 = param_4[1];
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129e30(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined8 param_7,undefined4 param_8,
                 undefined4 param_9)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_88 [32];
  undefined2 local_68;
  undefined2 local_66;
  undefined4 local_64;
  undefined4 local_60;
  undefined2 local_5c;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined4 local_32;
  undefined4 local_2e;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  local_66 = 0x489;
  local_5c = 0;
  local_68 = 0x3e;
  local_5a = *param_5;
  local_52 = param_5[1];
  local_4a = *param_6;
  local_42 = param_6[1];
  local_3a = param_7;
  local_32 = param_8;
  local_2e = param_9;
  local_64 = param_4;
  local_60 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_68);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140129f50(longlong param_1,ushort param_2,undefined4 param_3,undefined4 *param_4,
                 undefined1 *param_5,undefined4 param_6,undefined1 param_7)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined1 local_6a;
  undefined4 local_69;
  undefined4 local_65;
  undefined4 local_61;
  undefined8 local_5d;
  undefined8 local_55;
  undefined1 local_4d;
  undefined4 local_4c;
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_74 = param_4[1];
  local_76 = 0x48a;
  local_6c = 0;
  local_78 = 0x44;
  local_65 = *param_4;
  local_5d = *(undefined8 *)(param_4 + 2);
  local_55 = *(undefined8 *)(param_4 + 4);
  local_4d = *param_5;
  local_4c = *(undefined4 *)(param_5 + 1);
  local_48 = *(undefined4 *)(param_5 + 5);
  local_44 = *(undefined4 *)(param_5 + 9);
  local_40 = *(undefined4 *)(param_5 + 0xd);
  local_3c = *(undefined4 *)(param_5 + 0x11);
  local_38 = *(undefined4 *)(param_5 + 0x15);
  local_6a = param_7;
  local_69 = param_6;
  local_70 = param_3;
  local_61 = local_74;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012a090(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x48c;
  local_44 = 0;
  local_48 = 0x1e;
  local_3a = *param_4;
  local_3c = 0;
  local_32 = param_4[1];
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012a160(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x48d;
  local_44 = 0;
  local_48 = 0x1e;
  local_3a = *param_4;
  local_3c = 0;
  local_32 = param_4[1];
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012a230(longlong param_1,ushort param_2,undefined8 *param_3,undefined1 param_4,
                 wchar_t *param_5,wchar_t *param_6,wchar_t *param_7)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_118 [32];
  undefined2 local_f8;
  undefined2 local_f6;
  undefined8 local_f4;
  undefined2 local_ec;
  undefined8 local_ea;
  undefined8 local_e2;
  undefined1 local_da;
  wchar_t local_d9 [12];
  ulonglong local_c1;
  wchar_t local_b9 [28];
  uint local_81;
  wchar_t local_7d [16];
  ulonglong local_5d;
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  local_d9[0] = L'\0';
  local_d9[1] = L'\0';
  local_d9[2] = L'\0';
  local_d9[3] = L'\0';
  local_d9[4] = L'\0';
  local_d9[5] = L'\0';
  local_d9[6] = L'\0';
  local_d9[7] = L'\0';
  local_d9[8] = L'\0';
  local_d9[9] = L'\0';
  local_d9[10] = L'\0';
  local_d9[0xb] = L'\0';
  local_c1 = 0;
  local_b9[0] = L'\0';
  local_b9[1] = L'\0';
  local_b9[2] = L'\0';
  local_b9[3] = L'\0';
  local_b9[4] = L'\0';
  local_b9[5] = L'\0';
  local_b9[6] = L'\0';
  local_b9[7] = L'\0';
  local_b9[8] = L'\0';
  local_b9[9] = L'\0';
  local_b9[10] = L'\0';
  local_b9[0xb] = L'\0';
  local_b9[0xc] = L'\0';
  local_b9[0xd] = L'\0';
  local_b9[0xe] = L'\0';
  local_b9[0xf] = L'\0';
  local_b9[0x10] = L'\0';
  local_b9[0x11] = L'\0';
  local_b9[0x12] = L'\0';
  local_b9[0x13] = L'\0';
  local_b9[0x14] = L'\0';
  local_b9[0x15] = L'\0';
  local_b9[0x16] = L'\0';
  local_b9[0x17] = L'\0';
  local_b9[0x18] = L'\0';
  local_b9[0x19] = L'\0';
  local_b9[0x1a] = L'\0';
  local_b9[0x1b] = L'\0';
  local_81 = 0;
  local_7d[0] = L'\0';
  local_7d[1] = L'\0';
  local_7d[2] = L'\0';
  local_7d[3] = L'\0';
  local_7d[4] = L'\0';
  local_7d[5] = L'\0';
  local_7d[6] = L'\0';
  local_7d[7] = L'\0';
  local_7d[8] = L'\0';
  local_7d[9] = L'\0';
  local_7d[10] = L'\0';
  local_7d[0xb] = L'\0';
  local_7d[0xc] = L'\0';
  local_7d[0xd] = L'\0';
  local_7d[0xe] = L'\0';
  local_7d[0xf] = L'\0';
  local_5d = 0;
  local_f6 = 0x48e;
  local_f8 = 0xa3;
  local_ea = *param_3;
  local_e2 = param_3[1];
  local_f4 = 0;
  local_ec = 0;
  local_da = param_4;
  wcsncpy(local_7d,param_5,0x13);
  wcsncpy(local_d9,param_6,0xf);
  wcsncpy(local_b9,param_7,0x1d);
  local_5d = local_5d & 0xffffffffffff;
  local_c1 = local_c1 & 0xffffffffffff;
  local_81 = local_81 & 0xffff;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_f8);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012a3b0(longlong param_1,ushort param_2,undefined8 *param_3,undefined8 *param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x48f;
  local_54 = 0;
  local_58 = 0x32;
  local_4a = *param_3;
  local_4c = 0;
  local_42 = param_3[1];
  local_3a = *param_4;
  local_32 = param_4[1];
  local_2a = param_5;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012a4a0(longlong param_1,ushort param_2,undefined8 *param_3,undefined8 *param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x490;
  local_54 = 0;
  local_58 = 0x32;
  local_4a = *param_3;
  local_4c = 0;
  local_42 = param_3[1];
  local_3a = *param_4;
  local_32 = param_4[1];
  local_2a = param_5;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012a590(longlong param_1,ushort param_2,undefined8 *param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined4 param_6,undefined8 param_7)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_188 [32];
  undefined4 local_168;
  undefined8 local_164;
  undefined2 local_15c;
  undefined8 local_15a;
  undefined8 local_152;
  undefined8 local_14a;
  undefined8 local_142;
  undefined8 local_13a;
  undefined8 local_132;
  undefined4 local_12a;
  undefined1 local_126 [222];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_188;
  local_164 = 0;
  local_15c = 0;
  FUN_14004edf0(local_126);
  local_15a = *param_3;
  local_152 = param_3[1];
  local_14a = *param_4;
  local_142 = param_4[1];
  local_168 = 0x4910116;
  local_13a = *param_5;
  local_132 = param_5[1];
  local_12a = param_6;
  FUN_1400573e0(local_126,param_7);
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_168);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012a6d0(longlong param_1,ushort param_2,undefined8 *param_3,undefined8 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x492;
  local_54 = 0;
  local_58 = 0x2e;
  local_4a = *param_3;
  local_4c = 0;
  local_42 = param_3[1];
  local_3a = *param_4;
  local_32 = param_4[1];
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012a7b0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x493;
  local_44 = 0;
  local_48 = 0x1e;
  local_3a = *param_4;
  local_3c = 0;
  local_32 = param_4[1];
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012a880(longlong param_1,ushort param_2,undefined8 *param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined4 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined8 local_74;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_74 = 0;
  local_6c = 0;
  local_76 = 0x494;
  local_78 = 0x42;
  local_6a = *param_3;
  local_62 = param_3[1];
  local_5a = *param_4;
  local_52 = param_4[1];
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = param_6;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012a990(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x495;
  local_44 = 0;
  local_48 = 0x1e;
  local_3a = *param_4;
  local_3c = 0;
  local_32 = param_4[1];
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012aa60(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5,undefined8 param_6,undefined4 param_7,undefined1 param_8)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined8 local_36;
  undefined4 local_2e;
  undefined1 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x496;
  local_54 = 0;
  local_58 = 0x2f;
  local_4a = *param_4;
  local_4c = 0;
  local_42 = param_4[1];
  local_3a = param_5;
  local_36 = param_6;
  local_2e = param_7;
  local_2a = param_8;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012ab60(longlong param_1,ushort param_2,undefined8 *param_3,undefined8 *param_4,
                 undefined4 param_5,undefined4 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  undefined4 local_26;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x4ab;
  local_54 = 0;
  local_58 = 0x36;
  local_4a = *param_3;
  local_4c = 0;
  local_42 = param_3[1];
  local_3a = *param_4;
  local_32 = param_4[1];
  local_2a = param_5;
  local_26 = param_6;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012ac60(longlong param_1,ushort param_2,undefined8 *param_3,undefined8 *param_4,
                 undefined1 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_88 [32];
  undefined2 local_68;
  undefined2 local_66;
  undefined8 local_64;
  undefined2 local_5c;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined1 local_3a;
  undefined4 local_39;
  undefined4 local_35;
  undefined4 local_31;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  local_66 = 0x4ac;
  local_64 = 0;
  local_68 = 0x3b;
  local_5a = *param_3;
  local_5c = 0;
  local_52 = param_3[1];
  local_4a = *param_4;
  local_42 = param_4[1];
  local_3a = param_5;
  local_39 = param_6;
  local_35 = param_7;
  local_31 = param_8;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_68);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012ad70(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_128 [32];
  undefined4 local_108;
  undefined8 local_104;
  undefined2 local_fc;
  undefined1 local_fa [210];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_128;
  iVar1 = 0;
  local_fc = 0;
  FUN_14004e3b0(local_fa);
  local_108 = 0x4cf00e0;
  local_104 = 0;
  memcpy(local_fa,param_3,0xd2);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_108);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012ae80(longlong param_1,short param_2,undefined1 *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_b8 [32];
  undefined2 local_98;
  undefined2 local_96;
  undefined8 local_94;
  undefined2 local_8c;
  undefined1 local_8a;
  undefined4 local_89;
  undefined4 local_85;
  undefined4 local_81;
  undefined4 local_7d;
  undefined4 local_79;
  undefined8 local_75;
  undefined8 local_6d;
  undefined8 local_65;
  undefined8 local_5d;
  wchar_t local_55 [22];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_b8;
  iVar1 = 0;
  local_55[0] = L'\0';
  local_55[1] = L'\0';
  local_55[2] = L'\0';
  local_55[3] = L'\0';
  local_55[4] = L'\0';
  local_55[5] = L'\0';
  local_55[6] = L'\0';
  local_55[7] = L'\0';
  local_55[8] = L'\0';
  local_55[9] = L'\0';
  local_55[10] = L'\0';
  local_55[0xb] = L'\0';
  local_55[0xc] = L'\0';
  local_55[0xd] = L'\0';
  local_55[0xe] = L'\0';
  local_55[0xf] = L'\0';
  local_96 = 0x51f;
  local_98 = 99;
  local_8a = *param_3;
  local_89 = *(undefined4 *)(param_3 + 1);
  local_85 = *(undefined4 *)(param_3 + 5);
  local_81 = *(undefined4 *)(param_3 + 9);
  local_8c = 0;
  local_7d = *(undefined4 *)(param_3 + 0xd);
  local_94 = 0;
  local_79 = *(undefined4 *)(param_3 + 0x11);
  local_75 = *(undefined8 *)(param_3 + 0x15);
  local_6d = *(undefined8 *)(param_3 + 0x1d);
  local_65 = *(undefined8 *)(param_3 + 0x25);
  local_5d = *(undefined8 *)(param_3 + 0x2d);
  wcsncpy_s(local_55,0x10,(wchar_t *)(param_3 + 0x35),0xf);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_98);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012afe0(longlong param_1,short param_2,void *param_3)

{
  int iVar1;
  longlong lVar2;
  undefined1 auStack_f8 [32];
  undefined2 local_d8;
  undefined2 local_d6;
  undefined8 local_d4;
  undefined2 local_cc;
  undefined1 local_ca [66];
  undefined8 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 local_70;
  undefined8 local_68;
  undefined8 local_60;
  undefined2 local_58;
  undefined8 local_56;
  undefined8 local_4e;
  undefined8 local_46;
  undefined8 local_3e;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_f8;
  iVar1 = 0;
  local_88 = 0;
  local_cc = 0;
  local_80 = 0;
  local_78 = 0;
  local_70 = 0;
  local_68 = 0;
  local_60 = 0;
  local_58 = 0;
  local_56 = 0;
  local_4e = 0;
  local_46 = 0;
  local_3e = 0;
  local_d6 = 0x4db;
  local_d8 = 0xa2;
  local_d4 = 0;
  memcpy(local_ca,param_3,0x94);
  if (*(longlong *)(DAT_14032f260 + 0x118) == 0) {
    lVar2 = *(longlong *)(param_1 + 200);
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xd8);
  }
  if ((param_2 < 0) || (999 < param_2)) {
    wprintf(L"Invalid Queue Index\n");
  }
  else {
    lVar2 = *(longlong *)(lVar2 + (longlong)param_2 * 8);
    if (lVar2 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar2 + 0x18),&local_d8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar2 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar2 + 0x38));
    }
  }
  return iVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012b110(longlong param_1,ushort param_2,undefined8 *param_3,undefined8 *param_4,
                 undefined4 param_5,undefined4 param_6,undefined4 param_7)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined8 local_74;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined4 local_36;
  undefined4 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_74 = 0;
  local_6c = 0;
  local_5a = 0;
  local_52 = 0;
  local_76 = 0x4d6;
  local_78 = 0x4a;
  local_6a = *param_3;
  local_62 = param_3[1];
  local_4a = *param_4;
  local_42 = param_4[1];
  local_3a = param_5;
  local_36 = param_6;
  local_32 = param_7;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



int FUN_14012b230(longlong param_1,ushort param_2,undefined4 param_3,undefined2 param_4)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined4 local_14;
  undefined4 local_10;
  undefined2 local_c;
  undefined2 local_a;
  
  local_16 = 0x510;
  local_18 = 0x10;
  local_c = 0;
  local_14 = 0;
  local_10 = param_3;
  local_a = param_4;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



int FUN_14012b2f0(longlong param_1,ushort param_2,undefined4 param_3,undefined2 param_4)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined4 local_14;
  undefined4 local_10;
  undefined2 local_c;
  undefined2 local_a;
  
  local_16 = 0x511;
  local_18 = 0x10;
  local_c = 0;
  local_14 = 0;
  local_10 = param_3;
  local_a = param_4;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012b3b0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 longlong param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  undefined2 local_28;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x512;
  local_58 = 0x32;
  local_4a = *(undefined8 *)(param_5 + 0xe);
  local_4c = 0;
  local_42 = *(undefined8 *)(param_5 + 0x16);
  local_3a = *(undefined8 *)(param_5 + 0x1e);
  local_32 = *(undefined8 *)(param_5 + 0x26);
  local_2a = *(undefined2 *)(param_5 + 0x2e);
  local_28 = *(undefined2 *)(param_5 + 0x30);
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012b4b0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x418;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



int FUN_14012b590(longlong param_1,ushort param_2,undefined4 param_3)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined4 local_14;
  undefined4 local_10;
  undefined2 local_c;
  
  local_16 = 0x40f;
  local_c = 0;
  local_18 = 0xe;
  local_14 = 0;
  local_10 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012b650(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined2 param_7,undefined8 param_8)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_188 [32];
  undefined4 local_168;
  undefined4 local_164;
  undefined4 local_160;
  undefined2 local_15c;
  undefined8 local_15a;
  undefined8 local_152;
  undefined8 local_14a;
  undefined8 local_142;
  undefined2 local_13a;
  undefined1 local_138 [224];
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_188;
  local_15c = 0;
  FUN_14004edf0(local_138);
  local_15a = *param_5;
  local_152 = param_5[1];
  local_14a = *param_6;
  local_142 = param_6[1];
  local_168 = 0x3f10104;
  local_13a = param_7;
  local_164 = param_4;
  local_160 = param_3;
  FUN_1400573e0(local_138,param_8);
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_168);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012b790(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x409;
  local_3c = 0;
  local_48 = 0x22;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012b870(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined2 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x3f4;
  local_58 = 0x30;
  local_4a = *param_4;
  local_4c = 0;
  local_42 = param_4[1];
  local_3a = *param_5;
  local_54 = 0;
  local_32 = param_5[1];
  local_2a = param_6;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012b970(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_88 [32];
  undefined2 local_68;
  undefined2 local_66;
  undefined4 local_64;
  undefined4 local_60;
  undefined2 local_5c;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  local_66 = 0x40a;
  local_5c = 0;
  local_68 = 0x3e;
  local_4a = *param_4;
  local_64 = 0;
  local_42 = param_4[1];
  local_5a = *param_5;
  local_52 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_60 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_68);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012ba80(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined2 param_7,undefined2 param_8)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined2 local_3a;
  undefined2 local_38;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_76 = 0x40b;
  local_6c = 0;
  local_78 = 0x42;
  local_5a = *param_4;
  local_74 = 0;
  local_52 = param_4[1];
  local_6a = *param_5;
  local_62 = param_5[1];
  local_4a = *param_6;
  local_42 = param_6[1];
  local_3a = param_7;
  local_38 = param_8;
  local_70 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012bbb0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined2 param_7,undefined2 param_8)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined2 local_3a;
  undefined2 local_38;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_76 = 0x40c;
  local_6c = 0;
  local_78 = 0x42;
  local_5a = *param_4;
  local_74 = 0;
  local_52 = param_4[1];
  local_6a = *param_5;
  local_62 = param_5[1];
  local_4a = *param_6;
  local_42 = param_6[1];
  local_3a = param_7;
  local_38 = param_8;
  local_70 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012bce0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5,undefined8 *param_6,undefined8 *param_7,undefined4 param_8)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined4 local_5a;
  undefined8 local_56;
  undefined4 local_4e;
  undefined8 local_4a;
  undefined4 local_42;
  undefined4 local_3e;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_6c = 0;
  local_76 = 0x4be;
  local_74 = 0;
  local_78 = 0x3e;
  local_6a = *param_4;
  local_62 = param_4[1];
  local_5a = param_5;
  local_56 = *param_6;
  local_4e = *(undefined4 *)(param_6 + 1);
  local_4a = *param_7;
  local_42 = *(undefined4 *)(param_7 + 1);
  local_3e = param_8;
  local_70 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012be00(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined8 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_178 [32];
  undefined8 local_158;
  undefined4 local_150;
  undefined2 local_14c;
  undefined8 local_14a;
  undefined8 local_142;
  undefined8 local_13a;
  undefined8 local_132;
  undefined1 local_12a [226];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_178;
  local_14c = 0;
  FUN_14004edf0(local_12a);
  local_13a = *param_4;
  local_132 = param_4[1];
  local_14a = *param_5;
  local_142 = param_5[1];
  local_158 = 0x40d0102;
  local_150 = param_3;
  FUN_1400573e0(local_12a,param_6);
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_158);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012bf20(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x443;
  local_3c = 0;
  local_48 = 0x1e;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012bff0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined8 *param_7,undefined2 param_8,
                 undefined2 param_9,undefined4 param_10)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined2 local_4a;
  undefined2 local_48;
  undefined8 local_46;
  undefined8 local_3e;
  undefined4 local_36;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_76 = 0x464;
  local_78 = 0x46;
  local_6a = *param_5;
  local_62 = param_5[1];
  local_5a = *param_6;
  local_52 = param_6[1];
  local_6c = 0;
  local_46 = *param_7;
  local_3e = param_7[1];
  local_4a = param_8;
  local_48 = param_9;
  local_36 = param_10;
  local_74 = param_4;
  local_70 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012c140(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined8 *param_7,undefined2 param_8,
                 undefined2 param_9)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined2 local_4a;
  undefined2 local_48;
  undefined8 local_46;
  undefined8 local_3e;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_76 = 1099;
  local_78 = 0x42;
  local_6a = *param_5;
  local_62 = param_5[1];
  local_5a = *param_6;
  local_52 = param_6[1];
  local_6c = 0;
  local_46 = *param_7;
  local_3e = param_7[1];
  local_4a = param_8;
  local_48 = param_9;
  local_74 = param_4;
  local_70 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012c280(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined8 *param_7,undefined2 param_8,
                 undefined2 param_9)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined2 local_4a;
  undefined2 local_48;
  undefined8 local_46;
  undefined8 local_3e;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_76 = 0x44c;
  local_78 = 0x42;
  local_6a = *param_5;
  local_62 = param_5[1];
  local_5a = *param_6;
  local_52 = param_6[1];
  local_6c = 0;
  local_46 = *param_7;
  local_3e = param_7[1];
  local_4a = param_8;
  local_48 = param_9;
  local_74 = param_4;
  local_70 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012c3c0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined8 *param_7,undefined2 param_8,
                 undefined2 param_9)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined2 local_4a;
  undefined2 local_48;
  undefined8 local_46;
  undefined8 local_3e;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_76 = 0x44d;
  local_78 = 0x42;
  local_6a = *param_5;
  local_62 = param_5[1];
  local_5a = *param_6;
  local_52 = param_6[1];
  local_6c = 0;
  local_46 = *param_7;
  local_3e = param_7[1];
  local_4a = param_8;
  local_48 = param_9;
  local_74 = param_4;
  local_70 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012c500(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined8 *param_7,undefined2 param_8,
                 undefined2 param_9)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined2 local_4a;
  undefined2 local_48;
  undefined8 local_46;
  undefined8 local_3e;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_76 = 0x44e;
  local_78 = 0x42;
  local_6a = *param_5;
  local_62 = param_5[1];
  local_5a = *param_6;
  local_52 = param_6[1];
  local_6c = 0;
  local_46 = *param_7;
  local_3e = param_7[1];
  local_4a = param_8;
  local_48 = param_9;
  local_74 = param_4;
  local_70 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



int FUN_14012c640(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4)

{
  longlong lVar1;
  int iVar2;
  undefined2 local_18;
  undefined2 local_16;
  undefined4 local_14;
  undefined4 local_10;
  undefined2 local_c;
  
  local_16 = 0x50b;
  local_18 = 0xe;
  local_c = 0;
  local_14 = param_4;
  local_10 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_18);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012c700(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x458;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012c7e0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 wchar_t *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  iVar2 = 0;
  local_2a = 0;
  local_46 = 0x4a3;
  local_48 = 0x26;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_3c = 0;
  local_44 = 0;
  local_40 = param_3;
  wcsncpy((wchar_t *)&local_2a,param_5,3);
  local_2a = local_2a & 0xffffffffffff;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    iVar2 = 0;
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return iVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012c8d0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4b2;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012c9b0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,wchar_t *param_6,longlong *param_7,int param_8)

{
  undefined1 auVar1 [16];
  longlong lVar2;
  short sVar3;
  int iVar4;
  __uint64 _Var5;
  longlong lVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  undefined1 auStack_b8 [32];
  undefined2 local_98;
  undefined2 local_96;
  undefined4 local_94;
  undefined4 local_90;
  undefined2 local_8c;
  undefined8 local_8a;
  undefined8 local_82;
  wchar_t local_7a [12];
  ulonglong local_62;
  short local_5a;
  void *local_58;
  int local_50;
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_b8;
  uVar7 = 0;
  local_7a[0] = L'\0';
  local_7a[1] = L'\0';
  local_7a[2] = L'\0';
  local_7a[3] = L'\0';
  local_7a[4] = L'\0';
  local_7a[5] = L'\0';
  local_7a[6] = L'\0';
  local_7a[7] = L'\0';
  local_7a[8] = L'\0';
  local_7a[9] = L'\0';
  local_7a[10] = L'\0';
  local_7a[0xb] = L'\0';
  local_62 = 0;
  local_96 = 0x4b3;
  local_98 = 0x4c;
  local_8a = *param_5;
  local_82 = param_5[1];
  local_8c = 0;
  local_5a = 0;
  local_58 = (void *)0x0;
  local_50 = param_8;
  local_94 = param_4;
  local_90 = param_3;
  wcsncpy(local_7a,param_6,0xf);
  local_62 = local_62 & 0xffffffffffff;
  if (((param_8 < 1) ||
      (iVar4 = FUN_1400d5fe0(*(undefined8 *)(param_1 + 0xe0),&local_8a,param_8), iVar4 != -1)) &&
     (sVar3 = (short)((param_7[1] - *param_7) / 0x44), 0 < sVar3)) {
    auVar1._8_8_ = 0;
    auVar1._0_8_ = (longlong)sVar3;
    _Var5 = SUB168(ZEXT816(0x44) * auVar1,0);
    if (SUB168(ZEXT816(0x44) * auVar1,8) != 0) {
      _Var5 = 0xffffffffffffffff;
    }
    local_5a = sVar3;
    local_58 = operator_new(_Var5);
    if (local_58 == (void *)0x0) {
      local_58 = (void *)0x0;
    }
    else {
      iVar4 = sVar3 + -1;
      if (-1 < iVar4) {
        lVar6 = (longlong)local_58 + 0x14;
        do {
          *(undefined8 *)(lVar6 + -0x14) = 0;
          *(undefined8 *)(lVar6 + -4) = 0;
          *(undefined8 *)(lVar6 + -0xc) = 0;
          iVar4 = iVar4 + -1;
          *(undefined8 *)(lVar6 + 4) = 0;
          *(undefined4 *)(lVar6 + 0xc) = 0;
          *(undefined8 *)(lVar6 + 0x10) = 0;
          *(undefined8 *)(lVar6 + 0x18) = 0;
          *(undefined8 *)(lVar6 + 0x20) = 0;
          *(undefined8 *)(lVar6 + 0x28) = 0;
          lVar6 = lVar6 + 0x44;
        } while (-1 < iVar4);
      }
    }
    if (local_58 != (void *)0x0) {
      lVar6 = *param_7;
      lVar2 = param_7[1] - lVar6 >> 0x3f;
      uVar8 = uVar7;
      if ((param_7[1] - lVar6) / 0x44 + lVar2 != lVar2) {
        do {
          uVar7 = (ulonglong)((int)uVar7 + 1);
          *(undefined8 *)(uVar8 + (longlong)local_58) = *(undefined8 *)(uVar8 + lVar6);
          *(undefined8 *)(uVar8 + 8 + (longlong)local_58) = *(undefined8 *)(uVar8 + 8 + lVar6);
          *(undefined8 *)(uVar8 + 0x10 + (longlong)local_58) = *(undefined8 *)(uVar8 + 0x10 + lVar6)
          ;
          *(undefined8 *)(uVar8 + 0x18 + (longlong)local_58) = *(undefined8 *)(uVar8 + 0x18 + lVar6)
          ;
          *(undefined8 *)(uVar8 + 0x20 + (longlong)local_58) = *(undefined8 *)(uVar8 + 0x20 + lVar6)
          ;
          *(undefined8 *)(uVar8 + 0x28 + (longlong)local_58) = *(undefined8 *)(uVar8 + 0x28 + lVar6)
          ;
          *(undefined8 *)(uVar8 + 0x30 + (longlong)local_58) = *(undefined8 *)(uVar8 + 0x30 + lVar6)
          ;
          *(undefined8 *)(uVar8 + 0x38 + (longlong)local_58) = *(undefined8 *)(uVar8 + 0x38 + lVar6)
          ;
          *(undefined4 *)(uVar8 + 0x40 + (longlong)local_58) = *(undefined4 *)(uVar8 + 0x40 + lVar6)
          ;
          lVar6 = *param_7;
          uVar8 = uVar8 + 0x44;
        } while (uVar7 < (ulonglong)((param_7[1] - lVar6) / 0x44));
      }
      if (param_2 < 1000) {
        lVar6 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
        if (lVar6 != 0) {
          EnterCriticalSection((LPCRITICAL_SECTION)(lVar6 + 0x38));
          iVar4 = FUN_1400a1430(*(undefined8 *)(lVar6 + 0x18),&local_98);
          if (iVar4 != 0) {
            ReleaseSemaphore(*(HANDLE *)(lVar6 + 0x10),1,(LPLONG)0x0);
          }
          LeaveCriticalSection((LPCRITICAL_SECTION)(lVar6 + 0x38));
          return iVar4;
        }
      }
      else {
        wprintf(L"Invalid Queue Index\n");
      }
      return 0;
    }
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012cca0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x4b4;
  local_4c = 0;
  local_58 = 0x2e;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012cda0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x518;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012ce80(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_168 [32];
  undefined8 local_148;
  undefined4 local_140;
  undefined2 local_13c;
  undefined8 local_13a;
  undefined8 local_132;
  undefined1 local_12a [226];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_168;
  local_13c = 0;
  FUN_14004edf0(local_12a);
  local_13a = *param_4;
  local_132 = param_4[1];
  local_148 = 0x51900f2;
  local_140 = param_3;
  FUN_1400573e0(local_12a,param_5);
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_148);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012cf80(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined2 param_5,undefined8 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_168 [32];
  undefined4 local_148;
  undefined4 local_144;
  undefined4 local_140;
  undefined2 local_13c;
  undefined8 local_13a;
  undefined8 local_132;
  undefined2 local_12a;
  undefined1 local_128 [224];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_168;
  local_144 = 0;
  local_13c = 0;
  FUN_14004edf0(local_128);
  local_13a = *param_4;
  local_132 = param_4[1];
  local_148 = 0x51a00f4;
  local_12a = param_5;
  local_140 = param_3;
  FUN_1400573e0(local_128,param_6);
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_148);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012d090(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x51b;
  local_58 = 0x2e;
  local_4a = *param_4;
  local_54 = 0;
  local_42 = param_4[1];
  local_4c = 0;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012d180(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x51c;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012d260(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined4 local_36;
  undefined4 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x51d;
  local_58 = 0x2a;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_4c = 0;
  local_3a = param_6;
  local_36 = param_7;
  local_32 = param_8;
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012d360(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined4 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined4 local_2a;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x51e;
  local_44 = 0;
  local_48 = 0x22;
  local_3a = *param_4;
  local_3c = 0;
  local_32 = param_4[1];
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012d440(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x3fa;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012d520(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,wchar_t *param_7,wchar_t *param_8,
                 wchar_t *param_9,undefined4 param_10,undefined4 param_11,undefined4 param_12,
                 undefined2 param_13,longlong *param_14)

{
  int iVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  ulonglong uVar4;
  longlong lVar5;
  undefined1 auStack_3f8 [32];
  ushort local_3d8;
  longlong local_3d0;
  undefined4 local_3c8;
  undefined4 local_3c4;
  undefined4 local_3c0;
  undefined8 local_3ba;
  undefined8 local_3b2;
  undefined8 local_3aa;
  undefined8 local_3a2;
  wchar_t local_39a [15];
  undefined2 local_37c;
  wchar_t local_37a [15];
  undefined2 local_35c;
  wchar_t local_35a [349];
  undefined2 local_a0;
  undefined4 local_9e;
  undefined4 local_9a;
  undefined4 local_96;
  undefined2 local_92;
  undefined8 local_90 [7];
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_3f8;
  local_3d8 = param_2;
  local_3d0 = param_1;
  FUN_14012e3d0(&local_3c8);
  local_3ba = *param_5;
  local_3b2 = param_5[1];
  local_3aa = *param_6;
  local_3a2 = param_6[1];
  local_3c8 = 0x405036e;
  local_3c4 = param_4;
  local_3c0 = param_3;
  wcsncpy(local_39a,param_7,0xf);
  wcsncpy(local_37a,param_8,0xf);
  wcsncpy(local_35a,param_9,0x15d);
  local_9e = param_10;
  local_37c = 0;
  local_9a = param_11;
  local_35c = 0;
  local_96 = param_12;
  local_a0 = 0;
  local_92 = param_13;
  uVar4 = (param_14[1] - *param_14) / 0x12;
  if ((int)uVar4 != 0) {
    uVar4 = uVar4 & 0xffffffff;
    lVar5 = *param_14 - (longlong)local_90;
    puVar2 = local_90;
    do {
      puVar3 = (undefined8 *)((longlong)puVar2 + 0x12);
      uVar4 = uVar4 - 1;
      *puVar2 = *(undefined8 *)(lVar5 + (longlong)puVar2);
      puVar2[1] = *(undefined8 *)(lVar5 + -10 + (longlong)puVar3);
      *(undefined2 *)(puVar2 + 2) = *(undefined2 *)(lVar5 + -2 + (longlong)puVar3);
      puVar2 = puVar3;
    } while (uVar4 != 0);
  }
  if (local_3d8 < 1000) {
    lVar5 = *(longlong *)(*(longlong *)(local_3d0 + 200) + (longlong)(short)local_3d8 * 8);
    if (lVar5 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar5 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar5 + 0x18),&local_3c8);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar5 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar5 + 0x38));
      return iVar1;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012d740(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x419;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012d820(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x417;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012d900(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined1 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined1 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x441;
  local_48 = 0x1f;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_2a = param_6;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012d9f0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x450;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012dad0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,longlong *param_6,longlong *param_7,longlong *param_8,
                 longlong *param_9)

{
  longlong lVar1;
  longlong lVar2;
  int iVar3;
  undefined8 *puVar4;
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lVar8;
  undefined1 auStack_108 [32];
  undefined2 local_e8;
  undefined2 local_e6;
  undefined4 local_e4;
  undefined4 local_e0;
  undefined2 local_dc;
  undefined8 local_da;
  undefined8 local_d2;
  undefined8 local_ca [6];
  undefined2 auStack_9a [6];
  undefined8 local_8e [6];
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_108;
  lVar7 = 0;
  local_dc = 0;
  puVar4 = local_8e;
  lVar5 = lVar7;
  do {
    *(undefined8 *)((longlong)puVar4 + -0x3c) = 0;
    *puVar4 = 0;
    *(undefined8 *)((longlong)puVar4 + -0x34) = 0;
    puVar4[1] = 0;
    auStack_9a[lVar5] = 0;
    auStack_9a[lVar5 + 3] = 0;
    lVar5 = lVar5 + 1;
    puVar4 = puVar4 + 2;
  } while (lVar5 < 3);
  local_e6 = 0x451;
  local_e8 = 0x8a;
  local_da = *param_5;
  local_d2 = param_5[1];
  lVar5 = *param_6;
  lVar1 = param_6[1];
  lVar6 = lVar5 - (longlong)local_ca;
  lVar8 = lVar7;
  do {
    if (lVar7 < (int)(lVar1 - lVar5 >> 4)) {
      puVar4 = (undefined8 *)((longlong)local_ca + lVar8);
      *puVar4 = *(undefined8 *)(lVar6 + (longlong)puVar4);
      *(undefined8 *)((longlong)local_ca + lVar8 + 8) =
           *(undefined8 *)(lVar6 + 8 + (longlong)puVar4);
      lVar2 = *param_8;
      auStack_9a[lVar7] = *(undefined2 *)(*param_7 + lVar7 * 4);
      auStack_9a[lVar7 + 3] = *(undefined2 *)(lVar2 + lVar7 * 4);
      lVar2 = *param_9;
      *(undefined8 *)((longlong)local_8e + lVar8) = *(undefined8 *)(lVar8 + lVar2);
      *(undefined8 *)((longlong)local_8e + lVar8 + 8) = *(undefined8 *)(lVar8 + 8 + lVar2);
    }
    else {
      *(undefined8 *)((longlong)local_ca + lVar8) = 0;
      *(undefined8 *)((longlong)local_ca + lVar8 + 8) = 0;
      auStack_9a[lVar7] = 0xffff;
      auStack_9a[lVar7 + 3] = 0xffff;
      *(undefined8 *)((longlong)local_8e + lVar8) = 0;
      *(undefined8 *)((longlong)local_8e + lVar8 + 8) = 0;
    }
    lVar7 = lVar7 + 1;
    lVar8 = lVar8 + 0x10;
  } while (lVar7 < 3);
  local_e4 = param_4;
  local_e0 = param_3;
  if (param_2 < 1000) {
    lVar5 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar5 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar5 + 0x38));
      iVar3 = FUN_1400a1430(*(undefined8 *)(lVar5 + 0x18),&local_e8);
      if (iVar3 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar5 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar5 + 0x38));
      return iVar3;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012dcf0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,wchar_t *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_348 [32];
  undefined4 local_328;
  undefined4 local_324;
  undefined4 local_320;
  undefined2 local_31c;
  undefined8 local_31a;
  undefined8 local_312;
  wchar_t local_30a [349];
  undefined2 local_50;
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_348;
  local_31c = 0;
  memset(local_30a,0,700);
  local_31a = *param_5;
  local_312 = param_5[1];
  local_328 = 0x45202da;
  local_324 = param_4;
  local_320 = param_3;
  wcsncpy(local_30a,param_6,0x15d);
  local_50 = 0;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_328);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012de20(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x453;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012df00(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,wchar_t *param_6,wchar_t *param_7,wchar_t *param_8,
                 undefined4 param_9,undefined4 param_10,undefined4 param_11,undefined2 param_12,
                 undefined2 param_13,undefined8 param_14)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_488 [32];
  ushort local_468;
  longlong local_460;
  undefined4 local_458;
  undefined4 local_454;
  undefined4 local_450;
  undefined2 local_44c;
  undefined8 local_44a;
  undefined8 local_442;
  wchar_t local_43a [12];
  ulonglong local_422;
  wchar_t local_41a [12];
  ulonglong local_402;
  wchar_t local_3fa [349];
  undefined2 local_140;
  undefined8 local_13e;
  undefined8 local_136;
  undefined1 local_12e [214];
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_488;
  local_44c = 0;
  local_13e = 0;
  local_136 = 0;
  local_468 = param_2;
  local_460 = param_1;
  FUN_14004edf0(local_12e);
  local_43a[0] = L'\0';
  local_43a[1] = L'\0';
  local_43a[2] = L'\0';
  local_43a[3] = L'\0';
  local_43a[4] = L'\0';
  local_43a[5] = L'\0';
  local_43a[6] = L'\0';
  local_43a[7] = L'\0';
  local_43a[8] = L'\0';
  local_43a[9] = L'\0';
  local_43a[10] = L'\0';
  local_43a[0xb] = L'\0';
  local_422 = 0;
  local_41a[0] = L'\0';
  local_41a[1] = L'\0';
  local_41a[2] = L'\0';
  local_41a[3] = L'\0';
  local_41a[4] = L'\0';
  local_41a[5] = L'\0';
  local_41a[6] = L'\0';
  local_41a[7] = L'\0';
  local_41a[8] = L'\0';
  local_41a[9] = L'\0';
  local_41a[10] = L'\0';
  local_41a[0xb] = L'\0';
  local_402 = 0;
  memset(local_3fa,0,700);
  local_44a = *param_5;
  local_442 = param_5[1];
  local_458 = 0x4a003fe;
  local_454 = param_4;
  local_450 = param_3;
  wcsncpy(local_43a,param_6,0xf);
  wcsncpy(local_41a,param_7,0xf);
  wcsncpy(local_3fa,param_8,0x15d);
  local_13e = CONCAT44(param_10,param_9);
  local_422 = local_422 & 0xffffffffffff;
  local_402 = local_402 & 0xffffffffffff;
  local_136 = CONCAT26(param_13,CONCAT24(param_12,param_11));
  local_140 = 0;
  FUN_1400573e0(local_12e,param_14);
  if (local_468 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(local_460 + 200) + (longlong)(short)local_468 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_458);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012e110(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x4a1;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012e1f0(longlong param_1,ushort param_2,undefined4 param_3,wchar_t *param_4,
                 wchar_t *param_5,wchar_t *param_6,undefined4 param_7,undefined2 param_8,
                 undefined2 param_9,undefined8 param_10,undefined4 param_11)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_468 [32];
  undefined4 local_448;
  undefined4 local_444;
  undefined4 local_440;
  undefined2 local_43c;
  wchar_t local_43a [12];
  ulonglong local_422;
  wchar_t local_41a [12];
  ulonglong local_402;
  wchar_t local_3fa [349];
  undefined2 local_140;
  undefined8 local_13e;
  longlong local_136;
  undefined1 local_12e [214];
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_468;
  local_444 = 0;
  local_43c = 0;
  local_13e = 0;
  local_136 = 0;
  FUN_14004edf0(local_12e);
  local_43a[0] = L'\0';
  local_43a[1] = L'\0';
  local_43a[2] = L'\0';
  local_43a[3] = L'\0';
  local_43a[4] = L'\0';
  local_43a[5] = L'\0';
  local_43a[6] = L'\0';
  local_43a[7] = L'\0';
  local_43a[8] = L'\0';
  local_43a[9] = L'\0';
  local_43a[10] = L'\0';
  local_43a[0xb] = L'\0';
  local_422 = 0;
  local_41a[0] = L'\0';
  local_41a[1] = L'\0';
  local_41a[2] = L'\0';
  local_41a[3] = L'\0';
  local_41a[4] = L'\0';
  local_41a[5] = L'\0';
  local_41a[6] = L'\0';
  local_41a[7] = L'\0';
  local_41a[8] = L'\0';
  local_41a[9] = L'\0';
  local_41a[10] = L'\0';
  local_41a[0xb] = L'\0';
  local_402 = 0;
  memset(local_3fa,0,700);
  local_448 = 0x4f803ee;
  local_440 = param_3;
  wcsncpy(local_43a,param_4,0xf);
  wcsncpy(local_41a,param_5,0xf);
  wcsncpy(local_3fa,param_6,0x15d);
  local_13e = CONCAT44(param_7,param_11);
  local_422 = local_422 & 0xffffffffffff;
  local_402 = local_402 & 0xffffffffffff;
  local_140 = 0;
  local_136 = (ulonglong)CONCAT22(param_9,param_8) << 0x20;
  FUN_1400573e0(local_12e,param_10);
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_448);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



undefined8 * FUN_14012e3d0(undefined8 *param_1)

{
  *param_1 = 0;
  *(undefined4 *)(param_1 + 1) = 0;
  *(undefined2 *)((longlong)param_1 + 0xc) = 0;
  *(undefined8 *)((longlong)param_1 + 0xe) = 0;
  *(undefined8 *)((longlong)param_1 + 0x16) = 0;
  *(undefined8 *)((longlong)param_1 + 0x1e) = 0;
  *(undefined4 *)((longlong)param_1 + 0x32a) = 0;
  *(undefined4 *)((longlong)param_1 + 0x332) = 0;
  *(undefined2 *)((longlong)param_1 + 0x336) = 0;
  *(undefined8 *)((longlong)param_1 + 0x26) = 0;
  param_1[0x67] = 0;
  *(undefined2 *)(param_1 + 0x69) = 0;
  param_1[0x68] = 0;
  *(undefined8 *)((longlong)param_1 + 0x34a) = 0;
  *(undefined2 *)((longlong)param_1 + 0x35a) = 0;
  *(undefined8 *)((longlong)param_1 + 0x352) = 0;
  *(undefined8 *)((longlong)param_1 + 0x35c) = 0;
  *(undefined2 *)((longlong)param_1 + 0x36c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x364) = 0;
  *(undefined8 *)((longlong)param_1 + 0x2e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x36) = 0;
  *(undefined8 *)((longlong)param_1 + 0x3e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x46) = 0;
  *(undefined8 *)((longlong)param_1 + 0x4e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x56) = 0;
  *(undefined8 *)((longlong)param_1 + 0x5e) = 0;
  *(undefined8 *)((longlong)param_1 + 0x66) = 0;
  memset((void *)((longlong)param_1 + 0x6e),0,700);
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012e4d0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x463;
  local_3c = 0;
  local_48 = 0x1e;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012e5a0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x3fb;
  local_58 = 0x2e;
  local_4a = *param_4;
  local_4c = 0;
  local_42 = param_4[1];
  local_3a = *param_5;
  local_54 = 0;
  local_32 = param_5[1];
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012e690(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_88 [32];
  undefined2 local_68;
  undefined2 local_66;
  undefined4 local_64;
  undefined4 local_60;
  undefined2 local_5c;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined4 local_36;
  undefined4 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  local_66 = 0x406;
  local_68 = 0x3a;
  local_5a = *param_4;
  local_5c = 0;
  local_52 = param_4[1];
  local_4a = *param_5;
  local_64 = 0;
  local_42 = param_5[1];
  local_3a = param_6;
  local_36 = param_7;
  local_32 = param_8;
  local_60 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_68);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012e7a0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x41b;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012e880(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined8 *param_5,undefined2 param_6,undefined2 param_7,undefined2 param_8,
                 undefined2 param_9,undefined2 param_10,undefined2 param_11,undefined8 param_12)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined2 local_78;
  undefined2 local_76;
  undefined4 local_74;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_6a;
  undefined8 local_62;
  undefined8 local_5a;
  undefined8 local_52;
  undefined2 local_4a;
  undefined2 local_48;
  undefined2 local_46;
  undefined2 local_44;
  undefined2 local_42;
  undefined2 local_40;
  undefined8 local_3e;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_76 = 0x442;
  local_6c = 0;
  local_78 = 0x42;
  local_5a = *param_4;
  local_74 = 0;
  local_52 = param_4[1];
  local_6a = *param_5;
  local_62 = param_5[1];
  local_4a = param_6;
  local_3e = param_12;
  local_48 = param_7;
  local_46 = param_8;
  local_44 = param_9;
  local_42 = param_10;
  local_40 = param_11;
  local_70 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_78);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012e9d0(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined2 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x44f;
  local_3c = 0;
  local_48 = 0x20;
  local_3a = *param_4;
  local_32 = param_4[1];
  local_44 = 0;
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012eab0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x526;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012eb90(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 longlong param_5,longlong param_6)

{
  int iVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  longlong lVar6;
  longlong lVar7;
  undefined1 auStack_2b8 [32];
  undefined2 local_298;
  undefined2 local_296;
  undefined4 local_294;
  undefined4 local_290;
  undefined2 local_28c;
  undefined8 local_28a;
  undefined8 local_282;
  undefined8 local_27a;
  undefined8 local_272;
  undefined8 local_26a;
  undefined8 local_262;
  undefined8 local_25a;
  undefined8 local_252;
  undefined8 local_24a;
  undefined8 local_242;
  undefined8 local_23a [64];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_2b8;
  lVar6 = 0;
  local_27a = 0;
  local_272 = 0;
  local_26a = 0;
  local_262 = 0;
  local_25a = 0;
  local_252 = 0;
  local_24a = 0;
  local_242 = 0;
  local_23a[0] = 0;
  local_28c = 0;
  local_23a[1] = 0;
  lVar7 = 0xf;
  puVar3 = local_23a + 2;
  puVar4 = local_23a;
  do {
    puVar5 = puVar4;
    puVar2 = puVar3;
    lVar7 = lVar7 + -1;
    *puVar2 = *puVar5;
    puVar2[1] = puVar5[1];
    puVar2[2] = puVar5[2];
    puVar2[3] = puVar5[3];
    puVar3 = puVar2 + 4;
    puVar4 = puVar5 + 4;
  } while (lVar7 != 0);
  puVar2[4] = puVar5[4];
  puVar2[5] = puVar5[5];
  local_296 = 0x527;
  local_294 = 0;
  local_298 = 0x25e;
  local_28a = *param_4;
  local_282 = param_4[1];
  puVar3 = local_23a;
  do {
    lVar7 = lVar6 * 4;
    lVar6 = lVar6 + 1;
    puVar4 = puVar3 + 2;
    *(undefined2 *)((longlong)&local_282 + lVar6 * 2 + 6) = *(undefined2 *)(param_5 + lVar7);
    *puVar3 = *(undefined8 *)((param_6 - (longlong)local_23a) + -0x10 + (longlong)puVar4);
    puVar3[1] = *(undefined8 *)((param_6 - (longlong)local_23a) + -8 + (longlong)puVar4);
    puVar3 = puVar4;
  } while (lVar6 < 0x20);
  local_290 = param_3;
  if (param_2 < 1000) {
    lVar6 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar6 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar6 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar6 + 0x18),&local_298);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar6 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar6 + 0x38));
      return iVar1;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012ed70(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined4 *param_5,undefined2 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined2 local_3a;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x420;
  local_48 = 0x20;
  local_3a = param_6;
  local_38 = *param_5;
  local_3c = 0;
  local_34 = param_5[1];
  local_30 = param_5[2];
  local_2c = param_5[3];
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012ee70(longlong param_1,ushort param_2,undefined4 param_3,undefined4 *param_4,
                 longlong param_5,longlong param_6,undefined2 param_7)

{
  int iVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  longlong lVar6;
  longlong lVar7;
  undefined1 auStack_2b8 [32];
  undefined2 local_298;
  undefined2 local_296;
  undefined4 local_294;
  undefined4 local_290;
  undefined2 local_28c;
  undefined2 local_28a;
  undefined4 local_288;
  undefined4 uStack_284;
  undefined4 uStack_280;
  undefined4 uStack_27c;
  undefined8 local_278;
  undefined8 local_270;
  undefined8 local_268;
  undefined8 local_260;
  undefined8 local_258;
  undefined8 local_250;
  undefined8 local_248;
  undefined8 local_240;
  undefined8 local_238 [64];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_2b8;
  lVar6 = 0;
  local_28c = 0;
  local_278 = 0;
  local_270 = 0;
  local_238[0] = 0;
  local_238[1] = 0;
  local_268 = 0;
  local_260 = 0;
  local_258 = 0;
  local_250 = 0;
  local_248 = 0;
  local_240 = 0;
  lVar7 = 0xf;
  puVar3 = local_238 + 2;
  puVar4 = local_238;
  do {
    puVar5 = puVar4;
    puVar2 = puVar3;
    lVar7 = lVar7 + -1;
    *puVar2 = *puVar5;
    puVar2[1] = puVar5[1];
    puVar2[2] = puVar5[2];
    puVar2[3] = puVar5[3];
    puVar3 = puVar2 + 4;
    puVar4 = puVar5 + 4;
  } while (lVar7 != 0);
  local_288 = *param_4;
  uStack_284 = param_4[1];
  uStack_280 = param_4[2];
  uStack_27c = param_4[3];
  puVar2[4] = puVar5[4];
  puVar2[5] = puVar5[5];
  local_296 = 0x422;
  local_298 = 0x260;
  local_294 = 0;
  local_28a = param_7;
  puVar3 = local_238;
  do {
    lVar7 = lVar6 * 4;
    lVar6 = lVar6 + 1;
    puVar4 = puVar3 + 2;
    *(undefined2 *)((longlong)&uStack_27c + lVar6 * 2 + 2) = *(undefined2 *)(param_5 + lVar7);
    *puVar3 = *(undefined8 *)((param_6 - (longlong)local_238) + -0x10 + (longlong)puVar4);
    puVar3[1] = *(undefined8 *)((param_6 - (longlong)local_238) + -8 + (longlong)puVar4);
    puVar3 = puVar4;
  } while (lVar6 < 0x20);
  local_290 = param_3;
  if (param_2 < 1000) {
    lVar6 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar6 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar6 + 0x38));
      iVar1 = FUN_1400a1430(*(undefined8 *)(lVar6 + 0x18),&local_298);
      if (iVar1 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar6 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar6 + 0x38));
      return iVar1;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012f040(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined2 param_6,undefined2 param_7,undefined8 *param_8,
                 undefined4 param_9,undefined2 param_10)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  undefined2 local_28;
  undefined4 local_26;
  undefined2 local_22;
  ulonglong local_20;
  
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x407;
  local_4c = 0;
  local_58 = 0x38;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_4a = *param_8;
  local_42 = param_8[1];
  local_2a = param_6;
  local_28 = param_7;
  local_26 = param_9;
  local_22 = param_10;
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012f170(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x41c;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012f250(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined2 param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x444;
  local_48 = 0x20;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_2a = param_6;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012f340(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x44a;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012f420(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x525;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012f500(longlong param_1,ushort param_2,undefined4 param_3,undefined8 *param_4,
                 undefined2 param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  undefined2 local_2a;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x445;
  local_44 = 0;
  local_48 = 0x20;
  local_3a = *param_4;
  local_3c = 0;
  local_32 = param_4[1];
  local_2a = param_5;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012f5e0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6,undefined4 param_7,undefined4 param_8,
                 undefined4 param_9)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_88 [32];
  undefined2 local_68;
  undefined2 local_66;
  undefined4 local_64;
  undefined4 local_60;
  undefined2 local_5c;
  undefined8 local_5a;
  undefined8 local_52;
  undefined8 local_4a;
  undefined8 local_42;
  undefined4 local_3a;
  undefined4 local_36;
  undefined4 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  local_66 = 0x454;
  local_5c = 0;
  local_68 = 0x3a;
  local_5a = *param_5;
  local_52 = param_5[1];
  local_4a = *param_6;
  local_42 = param_6[1];
  local_3a = param_7;
  local_36 = param_8;
  local_32 = param_9;
  local_64 = param_4;
  local_60 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_68);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012f700(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x4f1;
  local_4c = 0;
  local_58 = 0x2e;
  local_4a = *param_5;
  local_42 = param_5[1];
  local_3a = *param_6;
  local_32 = param_6[1];
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012f800(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x455;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012f8e0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5,undefined8 *param_6)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_78 [32];
  undefined2 local_58;
  undefined2 local_56;
  undefined4 local_54;
  undefined4 local_50;
  undefined2 local_4c;
  undefined8 local_4a;
  undefined8 local_42;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_56 = 0x456;
  local_4c = 0;
  local_58 = 0x2e;
  local_4a = *param_6;
  local_42 = param_6[1];
  local_3a = *param_5;
  local_32 = param_5[1];
  local_54 = param_4;
  local_50 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_58);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_14012f9e0(longlong param_1,ushort param_2,undefined4 param_3,undefined4 param_4,
                 undefined8 *param_5)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_68 [32];
  undefined2 local_48;
  undefined2 local_46;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined8 local_3a;
  undefined8 local_32;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_46 = 0x457;
  local_48 = 0x1e;
  local_3a = *param_5;
  local_32 = param_5[1];
  local_3c = 0;
  local_44 = param_4;
  local_40 = param_3;
  if (param_2 < 1000) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 200) + (longlong)(short)param_2 * 8);
    if (lVar1 != 0) {
      EnterCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      iVar2 = FUN_1400a1430(*(undefined8 *)(lVar1 + 0x18),&local_48);
      if (iVar2 != 0) {
        ReleaseSemaphore(*(HANDLE *)(lVar1 + 0x10),1,(LPLONG)0x0);
      }
      LeaveCriticalSection((LPCRITICAL_SECTION)(lVar1 + 0x38));
      return iVar2;
    }
  }
  else {
    wprintf(L"Invalid Queue Index\n");
  }
  return 0;
}



void FUN_14012fac0(undefined8 *param_1)

{
  *param_1 = ISubject::vftable;
  return;
}



undefined8 * FUN_14012fad0(undefined8 *param_1,byte param_2)

{
  *param_1 = ISubject::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 FUN_14012fb00(longlong param_1)

{
  return *(undefined8 *)(param_1 + 0x20);
}



void * FUN_14012fb10(void *param_1,uint param_2)

{
  FUN_140205ad0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14012fb40(undefined8 *param_1)

{
  DAT_14032f250 = 0;
  *param_1 = MBISingleton<>::vftable;
  return;
}



void FUN_14012fb60(ulonglong *param_1,undefined8 *param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  puVar1 = (undefined8 *)param_1[1];
  if ((param_2 < puVar1) && (puVar2 = (undefined8 *)*param_1, puVar2 <= param_2)) {
    if (puVar1 == (undefined8 *)param_1[2]) {
      FUN_14013b810(param_1);
    }
    if ((undefined8 *)param_1[1] != (undefined8 *)0x0) {
      *(undefined8 *)param_1[1] =
           *(undefined8 *)(*param_1 + ((longlong)param_2 - (longlong)puVar2 >> 3) * 8);
      param_1[1] = param_1[1] + 8;
      return;
    }
  }
  else {
    if (puVar1 == (undefined8 *)param_1[2]) {
      FUN_14013b810(param_1);
    }
    if ((undefined8 *)param_1[1] != (undefined8 *)0x0) {
      *(undefined8 *)param_1[1] = *param_2;
    }
  }
  param_1[1] = param_1[1] + 8;
  return;
}



undefined8 * FUN_14012fbf0(undefined8 *param_1,byte param_2)

{
  DAT_14032f250 = 0;
  *param_1 = MBISingleton<>::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14012fc30(longlong param_1)

{
  FUN_14012fb10(param_1 + -8);
  return;
}



undefined8 * FUN_14012fc40(undefined8 *param_1,byte param_2)

{
  *param_1 = TimeSource::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14012fc70(undefined8 *param_1)

{
  *param_1 = IObserver::vftable;
  return;
}



undefined8 * FUN_14012fc80(undefined8 *param_1,byte param_2)

{
  *param_1 = IObserver::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14012fcb0(undefined8 *param_1,uint param_2,undefined8 param_3,undefined8 param_4)

{
  *param_1 = Magi::Timer::vftable;
  (**(code **)(*(longlong *)param_1[1] + 0x18))
            ((longlong *)param_1[1],param_1,param_3,param_4,0xfffffffffffffffe);
  *param_1 = IObserver::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 FUN_14012fd10(undefined8 param_1,longlong param_2)

{
  FUN_140157600();
  FUN_140157600(param_1,param_2 + 0x10);
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x20));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x42));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x44));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x46));
  FUN_14004fcb0(param_1,*(undefined8 *)(param_2 + 0x48));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x50));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x54));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x58));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x5c));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x5e));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x62));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 100));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x68));
  FUN_140157600(param_1,param_2 + 0x6c);
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x7c));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x7e));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x80));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x82));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x84));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x88));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x8a));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x8e));
  FUN_14004fbc0(param_1,*(undefined8 *)(param_2 + 0x93));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x9b));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x90));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x91));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x92));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x9f));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0xa0));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0xa1));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0xa2));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0xa3));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0xa4));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0xa5));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xa6));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xa8));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xaa));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xac));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xae));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xb0));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xb2));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xb4));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xb6));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xba));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xbe));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xc0));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xc4));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xc6));
  FUN_14004fbc0(param_1,*(undefined8 *)(param_2 + 0xca));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xd2));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xd6));
  FUN_140155f60(param_1,param_2 + 0x22);
  FUN_140155f60(param_1,param_2 + 0xda);
  FUN_140155f60(param_1,param_2 + 0x102);
  return param_1;
}



undefined8 FUN_140130030(undefined8 param_1,undefined8 *param_2)

{
  FUN_14004fcb0(param_1,*param_2);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 1));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0x14));
  FUN_14004fbc0(param_1,param_2[3]);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 4));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0x24));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 5));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0x2c));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 6));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0x34));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 7));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0x3c));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 8));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0x44));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 9));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0x4c));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 10));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0x54));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 2));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0xc));
  return param_1;
}



undefined8 FUN_140130130(undefined8 param_1,longlong param_2)

{
  undefined2 *puVar1;
  longlong lVar2;
  
  FUN_140157600();
  FUN_140157600(param_1,param_2 + 0x38);
  FUN_14004fcb0(param_1,*(undefined8 *)(param_2 + 0x48));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x50));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x54));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x58));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x2c2));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x2c6));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x2c4));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x2c8));
  puVar1 = (undefined2 *)(param_2 + 0x2b2);
  lVar2 = 8;
  do {
    FUN_140050340(param_1,*puVar1);
    puVar1 = puVar1 + 1;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  FUN_140155f60(param_1,param_2 + 0x10);
  FUN_140155f60(param_1,param_2 + 0x5a);
  FUN_140155f60(param_1,param_2 + 0x122);
  return param_1;
}



void FUN_140130230(undefined8 param_1,undefined4 *param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %d %d }",*param_2,param_2[1],uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_1401302e0(undefined8 param_1,longlong param_2)

{
  FUN_140154e60();
  FUN_140154e60(param_1,param_2 + 4);
  FUN_140157550(param_1,param_2 + 8);
  return param_1;
}



void FUN_140130320(undefined8 param_1,short *param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined8 uVar4;
  undefined *local_res10 [3];
  
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s %d %d }",param_2 + 0x17,(int)*param_2,(int)param_2[2]);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_1401303e0(undefined8 param_1,undefined2 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  undefined8 uVar3;
  wchar_t *pwVar4;
  undefined2 local_res8;
  undefined6 uStackX_a;
  wchar_t *local_res10;
  wchar_t *local_res18 [2];
  
  cVar2 = FUN_1401543d0(param_1,&local_res8,2,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    param_2[1] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    param_2[2] = local_res8;
  }
  FUN_140157550(param_1,param_2 + 7);
  FUN_140157550(param_1,param_2 + 0xf);
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)(param_2 + 3) = CONCAT62(uStackX_a,local_res8);
  }
  FUN_1401568c0();
  local_res18[0] = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,local_res18);
  pwVar4 = local_res18[0];
  if (local_res18[0] == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcsncpy_s(param_2 + 0x17,0x10,pwVar4,0xf);
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar4 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcsncpy_s(param_2 + 0x27,0x10,pwVar4,0xf);
  pwVar4 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar4 = local_res18[0];
  if (((local_res18[0] != (wchar_t *)0x0) && (local_res18[0] != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18[0] + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res10 = (wchar_t *)PTR_DAT_1403200a0;
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  return param_1;
}



void FUN_1401305c0(undefined8 param_1,undefined1 *param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %d %d }",*(undefined4 *)(param_2 + 1),*param_2,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140130670(undefined8 param_1,undefined1 *param_2)

{
  char cVar1;
  undefined4 local_res8 [2];
  
  cVar1 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar1 != '\0') {
    *param_2 = (undefined1)local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)(param_2 + 1) = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 5);
  FUN_140157550(param_1,param_2 + 0x15);
  return param_1;
}



undefined8 FUN_1401306e0(undefined8 param_1,undefined1 *param_2)

{
  char cVar1;
  undefined4 local_res8 [2];
  
  cVar1 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar1 != '\0') {
    *param_2 = (undefined1)local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)(param_2 + 1) = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)(param_2 + 5) = local_res8[0];
  }
  return param_1;
}



void FUN_140130760(undefined8 param_1,undefined1 *param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %d %d }",*(undefined4 *)(param_2 + 5),*param_2,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140130810(undefined8 param_1,longlong param_2)

{
  FUN_1401306e0();
  FUN_140157550(param_1,param_2 + 9);
  return param_1;
}



undefined8 FUN_140130840(undefined8 param_1,longlong param_2)

{
  char cVar1;
  undefined4 local_res8 [2];
  
  FUN_140157550();
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)(param_2 + 0x10) = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)(param_2 + 0x14) = local_res8[0];
  }
  return param_1;
}



void FUN_1401308a0(undefined8 param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %d %d }",*(undefined4 *)(param_2 + 0x10),
                *(undefined4 *)(param_2 + 0x14),uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140130950(undefined8 param_1,undefined2 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined2 local_res8;
  undefined2 uStackX_a;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  cVar2 = FUN_1401543d0(param_1,&local_res8,2,param_4,uVar4);
  if (cVar2 != '\0') {
    *param_2 = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8;
  }
  FUN_140157550(param_1,param_2 + 2);
  FUN_140157550(param_1,param_2 + 10);
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x12) = CONCAT22(uStackX_a,local_res8);
  }
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s(param_2 + 0x14,0x10,pwVar3);
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    param_2[0x24] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x25) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x27) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)(param_2 + 0x29) = CONCAT44(uStackX_c,CONCAT22(uStackX_a,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x2d) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x2f) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x31) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    param_2[0x33] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x34) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x36) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x38) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x3a) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x3c) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x3e) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x40) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x42) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x44) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x46) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x48) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x4a) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x4c) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x4e) = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  pwVar3 = local_res10;
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x50) = CONCAT22(uStackX_a,local_res8);
  }
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



undefined8 FUN_140130d20(undefined8 param_1,undefined2 *param_2)

{
  FUN_140050340(param_1,*param_2);
  FUN_140050340(param_1,param_2[1]);
  FUN_140157600(param_1,param_2 + 2);
  FUN_140157600(param_1,param_2 + 10);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x12));
  FUN_140155f60(param_1,param_2 + 0x14);
  FUN_140050340(param_1,param_2[0x24]);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x25));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x27));
  FUN_14004fbc0(param_1,*(undefined8 *)(param_2 + 0x29));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x2d));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x2f));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x31));
  FUN_140050340(param_1,param_2[0x33]);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x34));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x36));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x38));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x3a));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x3c));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x3e));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x40));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x42));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x44));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x46));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x48));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x4a));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x4c));
  FUN_14004fae0(param_1,*(undefined4 *)(param_2 + 0x4e));
  FUN_14004fae0(param_1,*(undefined4 *)(param_2 + 0x50));
  return param_1;
}



undefined8 FUN_140130eb0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_140157550(param_1,param_2);
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x10) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x14) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x18) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x1c) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x20) = local_res8[0];
  }
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x24),0x10,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_140131010(undefined8 param_1,undefined4 *param_2)

{
  int *piVar1;
  undefined *puVar2;
  longlong *plVar3;
  undefined *puVar4;
  undefined *local_res10;
  undefined *local_res18;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10 = PTR_DAT_1403200a0;
  plVar3 = (longlong *)FUN_1401318c0(&local_res18,param_2 + 1);
  puVar4 = (undefined *)*plVar3;
  if ((undefined *)*plVar3 == (undefined *)0x0) {
    puVar4 = PTR_DAT_1403200a0;
  }
  FUN_14004ce50(&local_res10,L"{ %d %s }",*param_2,puVar4,uVar5);
  if (((local_res18 != (undefined *)0x0) && (local_res18 != PTR_DAT_1403200a0)) &&
     (local_res18 + -8 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar1 = (int *)(local_res18 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res18 + -8);
    }
    FUN_140156be0(uVar5);
  }
  FUN_14004cc50(param_1,&local_res10);
  puVar4 = local_res10;
  if (((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) &&
     (puVar2 = local_res10 + -8, puVar2 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar1 = (int *)(puVar4 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2);
    }
    FUN_140156be0(uVar5);
  }
  return;
}



undefined8
FUN_140131130(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  wchar_t *local_res18;
  wchar_t *local_res20;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8;
  }
  FUN_140157550(param_1,param_2 + 1);
  FUN_140157550(param_1,param_2 + 5);
  cVar2 = FUN_1401543d0(param_1,&local_res8,1,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 9) = (undefined1)local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,1,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0x25) = (undefined1)local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0x26) = (undefined1)local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)((longlong)param_2 + 0x2a9) = CONCAT44(uStackX_c,local_res8);
  }
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x27),0x10,pwVar3);
  pwVar3 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x47),0x32,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0xab),0xff,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res20;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res20 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res18 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_1401313a0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 8,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140131450(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8[0];
  }
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 2),0x80,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



undefined8 FUN_140131550(undefined8 param_1,undefined4 *param_2)

{
  char cVar1;
  undefined4 local_res8 [2];
  
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    param_2[1] = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    param_2[2] = local_res8[0];
  }
  return param_1;
}



undefined8
FUN_1401315d0(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  short sVar2;
  char cVar3;
  ulonglong uVar4;
  short *psVar5;
  short *psVar6;
  undefined4 local_res8 [2];
  short *local_res10;
  short *local_res18;
  short *local_res20;
  undefined8 uVar7;
  
  uVar7 = 0xfffffffffffffffe;
  cVar3 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar3 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar3 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar7);
  if (cVar3 != '\0') {
    param_2[1] = local_res8[0];
  }
  cVar3 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar7);
  if (cVar3 != '\0') {
    param_2[2] = local_res8[0];
  }
  cVar3 = FUN_1401543d0(param_1,local_res8,1,param_4,uVar7);
  if (cVar3 != '\0') {
    *(undefined1 *)(param_2 + 3) = (undefined1)local_res8[0];
  }
  cVar3 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar7);
  if (cVar3 != '\0') {
    param_2[4] = local_res8[0];
  }
  cVar3 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar3 != '\0') {
    param_2[5] = local_res8[0];
  }
  cVar3 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar3 != '\0') {
    param_2[6] = local_res8[0];
  }
  cVar3 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar3 != '\0') {
    param_2[7] = local_res8[0];
  }
  cVar3 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar3 != '\0') {
    *(undefined1 *)(param_2 + 8) = (undefined1)local_res8[0];
  }
  FUN_1401568c0();
  local_res20 = (short *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (short *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (short *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  psVar5 = local_res20;
  if (local_res20 == (short *)0x0) {
    psVar5 = (short *)PTR_DAT_1403200a0;
  }
  uVar4 = 0xffffffffffffffff;
  psVar6 = psVar5;
  do {
    if (uVar4 == 0) break;
    uVar4 = uVar4 - 1;
    sVar2 = *psVar6;
    psVar6 = psVar6 + 1;
  } while (sVar2 != 0);
  FUN_140056dd0(param_2 + 10,psVar5,~uVar4 - 1);
  psVar5 = local_res18;
  if (local_res18 == (short *)0x0) {
    psVar5 = (short *)PTR_DAT_1403200a0;
  }
  uVar4 = 0xffffffffffffffff;
  psVar6 = psVar5;
  do {
    if (uVar4 == 0) break;
    uVar4 = uVar4 - 1;
    sVar2 = *psVar6;
    psVar6 = psVar6 + 1;
  } while (sVar2 != 0);
  FUN_140056dd0(param_2 + 0x14,psVar5,~uVar4 - 1);
  psVar5 = local_res10;
  if (local_res10 == (short *)0x0) {
    psVar5 = (short *)PTR_DAT_1403200a0;
  }
  uVar4 = 0xffffffffffffffff;
  psVar6 = psVar5;
  do {
    if (uVar4 == 0) break;
    uVar4 = uVar4 - 1;
    sVar2 = *psVar6;
    psVar6 = psVar6 + 1;
  } while (sVar2 != 0);
  FUN_140056dd0(param_2 + 0x1e,psVar5,~uVar4 - 1);
  psVar5 = local_res10;
  if (((local_res10 != (short *)0x0) && (local_res10 != (short *)PTR_DAT_1403200a0)) &&
     (psVar6 = local_res10 + -4, psVar6 != (short *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    piVar1 = (int *)(psVar5 + -2);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(psVar6);
    }
    FUN_140156be0(uVar7);
  }
  psVar5 = local_res18;
  local_res10 = (short *)PTR_DAT_1403200a0;
  if (((local_res18 != (short *)0x0) && (local_res18 != (short *)PTR_DAT_1403200a0)) &&
     (psVar6 = local_res18 + -4, psVar6 != (short *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    piVar1 = (int *)(psVar5 + -2);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(psVar6);
    }
    FUN_140156be0(uVar7);
  }
  psVar5 = local_res20;
  if (((local_res20 != (short *)0x0) && (local_res20 != (short *)PTR_DAT_1403200a0)) &&
     (psVar6 = local_res20 + -4, psVar6 != (short *)0x0)) {
    local_res18 = (short *)PTR_DAT_1403200a0;
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    piVar1 = (int *)(psVar5 + -2);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(psVar6);
    }
    FUN_140156be0(uVar7);
  }
  return param_1;
}



longlong * FUN_1401318c0(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  undefined *puVar2;
  char cVar3;
  undefined *puVar4;
  undefined *local_res20;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res20 = PTR_DAT_1403200a0;
  cVar3 = FUN_140182b00(param_2,&local_res20,param_3,param_4,uVar5);
  if (cVar3 == '\0') {
    FUN_1401568c0();
    puVar2 = local_res20;
    puVar4 = PTR_DAT_1403200a0;
    *param_1 = (longlong)PTR_DAT_1403200a0;
    if (local_res20 == (undefined *)0x0) {
      return param_1;
    }
    if (local_res20 == puVar4) {
      return param_1;
    }
    puVar4 = local_res20 + -8;
    if (puVar4 == (undefined *)0x0) {
      return param_1;
    }
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar4);
    }
  }
  else {
    FUN_1401568c0();
    puVar4 = PTR_DAT_1403200a0;
    *param_1 = (longlong)PTR_DAT_1403200a0;
    if (puVar4 == (undefined *)0x0) {
      *param_1 = 0;
    }
    if (local_res20 != (undefined *)*param_1) {
      uVar5 = FUN_1401568c0();
      FUN_140156b50(uVar5);
      FUN_14004f990(param_1);
      *param_1 = (longlong)local_res20;
      if (((local_res20 != PTR_DAT_1403200a0) && (local_res20 != (undefined *)0x0)) &&
         (local_res20 != (undefined *)0x8)) {
        *(int *)(local_res20 + -4) = *(int *)(local_res20 + -4) + 1;
      }
      FUN_140156be0(uVar5);
      puVar4 = PTR_DAT_1403200a0;
    }
    puVar2 = local_res20;
    if (local_res20 == (undefined *)0x0) {
      return param_1;
    }
    if (local_res20 == puVar4) {
      return param_1;
    }
    puVar4 = local_res20 + -8;
    if (puVar4 == (undefined *)0x0) {
      return param_1;
    }
    uVar5 = FUN_1401568c0();
    FUN_140156b50(uVar5);
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar4);
    }
  }
  FUN_140156be0(uVar5);
  return param_1;
}



undefined8 FUN_140131a40(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  undefined4 *puVar3;
  wchar_t *pwVar4;
  longlong lVar5;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  undefined8 uVar6;
  
  uVar6 = 0xfffffffffffffffe;
  FUN_140157550();
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar6);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x10) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,2,param_4,uVar6);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 0x14) = (undefined2)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,2,param_4,uVar6);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 0x16) = (undefined2)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar6);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x18) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 0x1c) = (undefined2)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x20) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x24) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 0x28) = (undefined2)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x30) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x34) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x38) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x3c) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x40) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x44) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x2c) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 0x48) = (undefined2)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 100) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 0x65) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 0x66) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x4c) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x50) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x54) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x58) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x5c) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x60) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 0x6c) = (undefined2)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 0x6e) = (undefined2)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x70) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 0x7c) = (undefined2)local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 0x80);
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x90) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 0x94) = (undefined2)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 0x96) = (undefined2)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x98) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x9c) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0xa0) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x68) = local_res8[0];
  }
  puVar3 = (undefined4 *)(param_2 + 0xa8);
  lVar5 = 10;
  do {
    cVar2 = FUN_1401543d0(param_1,local_res8,4);
    if (cVar2 != '\0') {
      *puVar3 = local_res8[0];
    }
    puVar3 = puVar3 + 1;
    lVar5 = lVar5 + -1;
  } while (lVar5 != 0);
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 0xd0) = (undefined1)local_res8[0];
  }
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar4 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x74),4,pwVar4);
  pwVar4 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar6);
  }
  return param_1;
}



void FUN_140131f80(undefined8 param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{%d,%d,%d,%d }",(int)*(short *)(param_2 + 0x14),
                (int)*(short *)(param_2 + 0x16),*(undefined4 *)(param_2 + 0x18),
                (int)*(short *)(param_2 + 0x1c),uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140132040(undefined8 param_1,longlong param_2)

{
  undefined4 *puVar1;
  longlong lVar2;
  
  FUN_140157600();
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x10));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x12));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x14));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x18));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x1a));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x1e));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x22));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x24));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x28));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x2c));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x30));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x34));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x38));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x3c));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x40));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x42));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x46));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x4a));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x4e));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x52));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x56));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x5a));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x5b));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x5c));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x5d));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x5f));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x61));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x6d));
  FUN_140157600(param_1,param_2 + 0x6f);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x7f));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x83));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x85));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x87));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x8b));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x8f));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x93));
  puVar1 = (undefined4 *)(param_2 + 0x97);
  lVar2 = 10;
  do {
    FUN_14004fe70(param_1,*puVar1);
    puVar1 = puVar1 + 1;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0xbf));
  FUN_140155f60(param_1,param_2 + 0x65);
  return param_1;
}



undefined8 FUN_140132270(undefined8 param_1,undefined2 *param_2)

{
  FUN_140050340(param_1,*param_2);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 1));
  FUN_140050340(param_1,param_2[3]);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 4));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 6));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 8));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 10));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xc));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xe));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x10));
  FUN_140050340(param_1,param_2[0x12]);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x13));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x15));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x17));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x19));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x1b));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x1d));
  FUN_140050340(param_1,*(undefined2 *)((longlong)param_2 + 0x41));
  FUN_140050340(param_1,*(undefined2 *)((longlong)param_2 + 0x43));
  FUN_140050340(param_1,*(undefined2 *)((longlong)param_2 + 0x45));
  FUN_140157600(param_1,(longlong)param_2 + 0x47);
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0x57));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0x5b));
  FUN_140050340(param_1,*(undefined2 *)((longlong)param_2 + 0x5f));
  FUN_140050340(param_1,*(undefined2 *)((longlong)param_2 + 0x61));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 99));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0x67));
  FUN_14004fe70(param_1,*(undefined4 *)((longlong)param_2 + 0x6b));
  return param_1;
}



undefined8 FUN_1401323d0(undefined8 param_1,longlong param_2)

{
  undefined4 *puVar1;
  longlong lVar2;
  
  FUN_140157600(param_1,param_2 + 0xc0);
  FUN_140157600(param_1,param_2);
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x10));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x12));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x14));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x18));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x1a));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x1e));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x22));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x24));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x28));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x2c));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x30));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x34));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x38));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x3c));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x40));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x42));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x46));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x4a));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x4e));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x52));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x56));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x5a));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x5b));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x5c));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x5d));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x5f));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x6d));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x83));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x85));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x87));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x8b));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x8f));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x93));
  FUN_140157600(param_1,param_2 + 0x6f);
  puVar1 = (undefined4 *)(param_2 + 0x97);
  lVar2 = 10;
  do {
    FUN_14004fe70(param_1,*puVar1);
    puVar1 = puVar1 + 1;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0xbf));
  return param_1;
}



undefined8 FUN_1401325e0(undefined8 param_1,wchar_t *param_2)

{
  wchar_t *pwVar1;
  char cVar2;
  undefined8 uVar3;
  undefined4 *puVar4;
  wchar_t *pwVar5;
  longlong lVar6;
  undefined1 local_res8;
  undefined1 uStackX_9;
  undefined2 uStackX_a;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  wchar_t *local_res18;
  wchar_t *local_res20;
  
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res20);
  pwVar5 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s(param_2,0x10,pwVar5);
  FUN_140157550(param_1,param_2 + 0x10);
  FUN_140157550(param_1,param_2 + 0x18);
  FUN_140157550(param_1,param_2 + 0x20);
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    param_2[0x28] = CONCAT11(uStackX_9,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    param_2[0x29] = CONCAT11(uStackX_9,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x2a) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    param_2[0x2c] = CONCAT11(uStackX_9,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x2d) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x2f) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    param_2[0x31] = CONCAT11(uStackX_9,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x32) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x34) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x36) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x38) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x3a) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x3c) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x3e) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    param_2[0x40] = CONCAT11(uStackX_9,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x41) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x43) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x45) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x47) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x49) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 0x4b) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 0x4d) = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0x9b) = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 0x4e) = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    *(ushort *)((longlong)param_2 + 0x9d) = CONCAT11(uStackX_9,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    *(ushort *)((longlong)param_2 + 0x9f) = CONCAT11(uStackX_9,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)((longlong)param_2 + 0xa1) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)((longlong)param_2 + 0xa5) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)((longlong)param_2 + 0xa9) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)((longlong)param_2 + 0xad) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)((longlong)param_2 + 0x10f) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    *(ushort *)((longlong)param_2 + 0xb1) = CONCAT11(uStackX_9,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    *(ushort *)((longlong)param_2 + 0xb3) = CONCAT11(uStackX_9,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)((longlong)param_2 + 0xb5) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)((longlong)param_2 + 0xb9) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  thunk_FUN_1401557c0(param_1,&local_res18);
  pwVar5 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0xbd),0x10,pwVar5);
  FUN_140157550(param_1,(longlong)param_2 + 0xdd);
  FUN_140157550(param_1,(longlong)param_2 + 0xed);
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)((longlong)param_2 + 0xfd) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)((longlong)param_2 + 0x101) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)((longlong)param_2 + 0x105) =
         CONCAT44(uStackX_c,CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8)));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    *(ushort *)((longlong)param_2 + 0x10d) = CONCAT11(uStackX_9,local_res8);
  }
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar5 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x117),0x1e,pwVar5);
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    *(ushort *)((longlong)param_2 + 0x153) = CONCAT11(uStackX_9,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)((longlong)param_2 + 0x155) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  puVar4 = (undefined4 *)((longlong)param_2 + 0x159);
  lVar6 = 10;
  do {
    cVar2 = FUN_1401543d0(param_1,&local_res8,4);
    if (cVar2 != '\0') {
      *puVar4 = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
    }
    puVar4 = puVar4 + 1;
    lVar6 = lVar6 + -1;
  } while (lVar6 != 0);
  cVar2 = FUN_1401543d0(param_1,&local_res8,1);
  pwVar5 = local_res10;
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0x181) = local_res8;
  }
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar5 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar5 = local_res20;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res20 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res18 = (wchar_t *)PTR_DAT_1403200a0;
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  return param_1;
}



undefined8 FUN_140132d30(undefined8 param_1,longlong param_2)

{
  undefined4 *puVar1;
  longlong lVar2;
  
  FUN_140155f60();
  FUN_140157600(param_1,param_2 + 0x20);
  FUN_140157600(param_1,param_2 + 0x30);
  FUN_140157600(param_1,param_2 + 0x40);
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x50));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x52));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x54));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x58));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x5a));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x5e));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x62));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 100));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x68));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x6c));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x70));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x74));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x78));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x7c));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x80));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x82));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x86));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x8a));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x8e));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x92));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x96));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x9a));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x9b));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x9c));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x9d));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x9f));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xa1));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xa5));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xa9));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xad));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x10f));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xb1));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xb3));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xb5));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xb9));
  FUN_140155f60(param_1,param_2 + 0xbd);
  FUN_140157600(param_1,param_2 + 0xdd);
  FUN_140157600(param_1,param_2 + 0xed);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0xfd));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x101));
  FUN_14004fcb0(param_1,*(undefined8 *)(param_2 + 0x105));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x10d));
  FUN_140155f60(param_1,param_2 + 0x117);
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x153));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x155));
  puVar1 = (undefined4 *)(param_2 + 0x159);
  lVar2 = 10;
  do {
    FUN_14004fe70(param_1,*puVar1);
    puVar1 = puVar1 + 1;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x181));
  return param_1;
}



void FUN_140133020(undefined8 param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %d,%d,%d,%d }",(int)*(short *)(param_2 + 0x50),
                (int)*(short *)(param_2 + 0x52),*(undefined4 *)(param_2 + 0x54),
                (int)*(short *)(param_2 + 0x58),uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_1401330e0(undefined8 *param_1)

{
  errno_t eVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined8 local_78;
  undefined4 local_70;
  __time64_t local_68;
  short local_60;
  short local_5e;
  undefined2 local_5c;
  undefined2 local_5a;
  undefined2 local_58;
  undefined2 local_56;
  undefined2 local_54;
  undefined2 local_52;
  undefined8 local_50;
  undefined8 local_48;
  tm local_40;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_68 = _time64((__time64_t *)0x0);
  local_78 = 0;
  local_70 = 0;
  eVar1 = _localtime64_s(&local_40,&local_68);
  if (eVar1 == 0) {
    local_60 = (short)local_40.tm_year + 0x76c;
    local_52 = 0;
    local_5e = (short)local_40.tm_mon + 1;
    local_5c = (undefined2)local_40.tm_wday;
    local_5a = (undefined2)local_40.tm_mday;
    local_58 = (undefined2)local_40.tm_hour;
    local_56 = (undefined2)local_40.tm_min;
    local_54 = (undefined2)local_40.tm_sec;
    iVar2 = Ordinal_184();
    local_50 = 0;
    local_48 = 0;
    if (iVar2 != 0) {
      Ordinal_185(local_78);
    }
  }
  *(undefined4 *)(param_1 + 1) = 0;
  *param_1 = local_78;
  *(undefined8 *)((longlong)param_1 + 0xc) = 0;
  *(undefined8 *)((longlong)param_1 + 0x14) = 0;
  *(undefined8 *)((longlong)param_1 + 0x1c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x24) = 0;
  param_1[0x16] = 0;
  *(undefined2 *)(param_1 + 0x18) = 0;
  param_1[0x17] = 0;
  *(undefined1 *)((longlong)param_1 + 0xc2) = 0;
  *(undefined4 *)((longlong)param_1 + 0xc3) = 0;
  *(undefined8 *)((longlong)param_1 + 0x2c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x34) = 0;
  *(undefined8 *)((longlong)param_1 + 0x3c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x44) = 0;
  memset((void *)((longlong)param_1 + 0x4c),0,100);
  return param_1;
}



undefined8 * FUN_140133260(undefined8 *param_1)

{
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  *(undefined8 *)((longlong)param_1 + 0x7c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x84) = 0;
  *(undefined8 *)((longlong)param_1 + 0xac) = 0;
  *(undefined8 *)((longlong)param_1 + 0xbc) = 0;
  *(undefined1 *)((longlong)param_1 + 0xc4) = 0;
  *(undefined4 *)((longlong)param_1 + 0xc5) = 0;
  *(undefined2 *)((longlong)param_1 + 0xc9) = 0;
  *(undefined8 *)((longlong)param_1 + 0xe3) = 0;
  *(undefined8 *)((longlong)param_1 + 0xeb) = 0;
  *(undefined8 *)((longlong)param_1 + 0xf3) = 0;
  *(undefined8 *)((longlong)param_1 + 0xb4) = 0;
  *(undefined8 *)((longlong)param_1 + 0xcb) = 0;
  *(undefined4 *)((longlong)param_1 + 0xd3) = 0;
  memset(param_1 + 3,0,100);
  *(undefined8 *)((longlong)param_1 + 0x8c) = 0;
  *(undefined8 *)((longlong)param_1 + 0x94) = 0;
  *(undefined8 *)((longlong)param_1 + 0x9c) = 0;
  *(undefined8 *)((longlong)param_1 + 0xa4) = 0;
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_140133330(undefined8 *param_1)

{
  errno_t eVar1;
  int iVar2;
  undefined1 auStack_98 [32];
  undefined8 local_78;
  undefined4 local_70;
  __time64_t local_68;
  short local_60;
  short local_5e;
  undefined2 local_5c;
  undefined2 local_5a;
  undefined2 local_58;
  undefined2 local_56;
  undefined2 local_54;
  undefined2 local_52;
  undefined8 local_50;
  undefined8 local_48;
  tm local_40;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_98;
  local_68 = _time64((__time64_t *)0x0);
  local_78 = 0;
  local_70 = 0;
  eVar1 = _localtime64_s(&local_40,&local_68);
  if (eVar1 == 0) {
    local_60 = (short)local_40.tm_year + 0x76c;
    local_52 = 0;
    local_5e = (short)local_40.tm_mon + 1;
    local_5c = (undefined2)local_40.tm_wday;
    local_5a = (undefined2)local_40.tm_mday;
    local_58 = (undefined2)local_40.tm_hour;
    local_56 = (undefined2)local_40.tm_min;
    local_54 = (undefined2)local_40.tm_sec;
    iVar2 = Ordinal_184();
    local_50 = 0;
    local_48 = 0;
    if (iVar2 != 0) {
      Ordinal_185(local_78);
    }
  }
  *param_1 = local_78;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  param_1[9] = 0;
  param_1[10] = 0;
  param_1[0xb] = 0;
  param_1[0x11] = 0;
  param_1[0xc] = 0;
  param_1[0x12] = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[7] = 0;
  param_1[8] = 0;
  param_1[0xd] = 0;
  param_1[0xe] = 0;
  param_1[0xf] = 0;
  param_1[0x10] = 0;
  memset(param_1 + 0x13,0,0x32);
  *(undefined8 *)((longlong)param_1 + 0xca) = 0;
  *(undefined8 *)((longlong)param_1 + 0xd2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xda) = 0;
  *(undefined8 *)((longlong)param_1 + 0xe2) = 0;
  *(undefined8 *)((longlong)param_1 + 0xea) = 0;
  *(undefined8 *)((longlong)param_1 + 0xf2) = 0;
  *(undefined2 *)((longlong)param_1 + 0xfa) = 0;
  return param_1;
}



undefined8
FUN_140133500(undefined8 param_1,undefined8 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined1 local_res8;
  undefined1 uStackX_9;
  undefined2 uStackX_a;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  wchar_t *local_res18 [2];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,&local_res8,8,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = CONCAT44(uStackX_c,CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8)));
  }
  FUN_140157550(param_1,(longlong)param_2 + 0xc);
  FUN_140157550(param_1,(longlong)param_2 + 0x1c);
  FUN_140157550(param_1,param_2 + 0x16);
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 1) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  FUN_140157550(param_1,param_2 + 0x16);
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    *(ushort *)(param_2 + 0x18) = CONCAT11(uStackX_9,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0xc2) = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)((longlong)param_2 + 0xc3) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  FUN_1401568c0();
  local_res18[0] = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res18[0];
  if (local_res18[0] == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x2c),0x10,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x4c),0x32,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18[0];
  if (((local_res18[0] != (wchar_t *)0x0) && (local_res18[0] != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18[0] + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res10 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_140133720(undefined8 param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %d %d %d %d }",*(undefined4 *)(param_2 + 8),
                *(undefined2 *)(param_2 + 0xc0),*(undefined1 *)(param_2 + 0xc2),
                *(undefined4 *)(param_2 + 0xc3),uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_1401337f0(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  undefined4 *puVar3;
  wchar_t *pwVar4;
  longlong lVar5;
  undefined4 local_res8 [2];
  undefined4 local_res10 [2];
  wchar_t *local_res18;
  wchar_t *local_res20;
  undefined8 uVar6;
  
  uVar6 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar6);
  if (cVar2 != '\0') {
    param_2[1] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 2);
  FUN_140157550(param_1,param_2 + 0x1f);
  FUN_140157550(param_1,param_2 + 0x2b);
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x2f] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x30] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 0x31) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xc5) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0xc9) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0xca) = (undefined1)local_res8[0];
  }
  puVar3 = (undefined4 *)((longlong)param_2 + 0xd7);
  lVar5 = 3;
  do {
    cVar2 = FUN_1401543d0(param_1,local_res8,4);
    if (cVar2 != '\0') {
      puVar3[-3] = local_res8[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_res10,4);
    if (cVar2 != '\0') {
      *puVar3 = local_res10[0];
    }
    puVar3 = puVar3 + 1;
    lVar5 = lVar5 + -1;
  } while (lVar5 != 0);
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xe3) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xe7) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xeb) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xef) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xf3) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xf7) = local_res8[0];
  }
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_res18);
  pwVar4 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 6),0x32,pwVar4);
  pwVar4 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x23),0x10,pwVar4);
  pwVar4 = local_res18;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar6);
  }
  pwVar4 = local_res20;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res20 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res18 = (wchar_t *)PTR_DAT_1403200a0;
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar6);
  }
  return param_1;
}



void FUN_140133b50(undefined8 param_1,undefined4 *param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %d %d %d %d }",*param_2,*(undefined4 *)((longlong)param_2 + 0xef),
                *(undefined4 *)((longlong)param_2 + 0xf3),*(undefined4 *)((longlong)param_2 + 0xf3),
                uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140133c10(undefined8 param_1,undefined8 *param_2)

{
  char *pcVar1;
  int *piVar2;
  wchar_t *pwVar3;
  char cVar4;
  undefined8 uVar5;
  wchar_t *pwVar6;
  char *pcVar7;
  undefined4 local_res8;
  undefined4 uStackX_c;
  char *local_res10;
  char *local_res18;
  wchar_t *local_res20;
  wchar_t *local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined1 local_30;
  
  local_40 = 0xfffffffffffffffe;
  cVar4 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar4 != '\0') {
    *param_2 = CONCAT44(uStackX_c,local_res8);
  }
  FUN_140157550(param_1,param_2 + 1);
  FUN_140157550(param_1,param_2 + 3);
  FUN_140157550(param_1,param_2 + 9);
  FUN_140157550(param_1,param_2 + 0xb);
  cVar4 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)(param_2 + 0x11) = local_res8;
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x8c) = local_res8;
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)(param_2 + 0x12) = local_res8;
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x94) = local_res8;
  }
  FUN_1401568c0();
  local_48 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_48);
  thunk_FUN_1401557c0(param_1,&local_res20);
  pwVar6 = local_48;
  if (local_48 == (wchar_t *)0x0) {
    pwVar6 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 5),0x10,pwVar6);
  pwVar6 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar6 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0xd),0x10,pwVar6);
  FUN_1401568c0();
  local_res18 = PTR_DAT_140320098;
  FUN_1401568c0();
  local_res10 = PTR_DAT_140320098;
  thunk_FUN_140155460(param_1,&local_res18);
  thunk_FUN_140155460(param_1,&local_res10);
  pcVar7 = local_res18;
  if (local_res18 == (char *)0x0) {
    pcVar7 = PTR_DAT_140320098;
  }
  strcpy_s((char *)(param_2 + 0x13),0x32,pcVar7);
  pcVar7 = local_res10;
  if (local_res10 == (char *)0x0) {
    pcVar7 = PTR_DAT_140320098;
  }
  strcpy_s((char *)((longlong)param_2 + 0xca),0x32,pcVar7);
  pcVar7 = local_res10;
  if (((local_res10 != (char *)0x0) && (local_res10 != PTR_DAT_140320098)) &&
     (pcVar1 = local_res10 + -8, pcVar1 != (char *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    piVar2 = (int *)(pcVar7 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(pcVar1);
    }
    FUN_140156be0(uVar5);
  }
  pcVar7 = local_res18;
  local_res10 = PTR_DAT_140320098;
  if (((local_res18 != (char *)0x0) && (local_res18 != PTR_DAT_140320098)) &&
     (pcVar1 = local_res18 + -8, pcVar1 != (char *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    piVar2 = (int *)(pcVar7 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(pcVar1);
    }
    FUN_140156be0(uVar5);
  }
  pwVar6 = local_res20;
  local_res18 = PTR_DAT_140320098;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar3 = local_res20 + -4, pwVar3 != (wchar_t *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    pwVar6 = pwVar6 + -2;
    *(int *)pwVar6 = *(int *)pwVar6 + -1;
    if (*(int *)pwVar6 == 0) {
      FUN_140156970(pwVar3);
    }
    FUN_140156be0(uVar5);
  }
  pwVar6 = local_48;
  if (((local_48 != (wchar_t *)0x0) && (local_48 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar3 = local_48 + -4, pwVar3 != (wchar_t *)0x0)) {
    local_res20 = (wchar_t *)PTR_DAT_1403200a0;
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    pwVar6 = pwVar6 + -2;
    *(int *)pwVar6 = *(int *)pwVar6 + -1;
    if (*(int *)pwVar6 == 0) {
      FUN_140156970(pwVar3);
    }
    FUN_140156be0(uVar5);
  }
  return param_1;
}



void FUN_140133f30(undefined8 param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %d %d %d %d }",*(undefined4 *)(param_2 + 0x88),
                *(undefined4 *)(param_2 + 0x8c),*(undefined4 *)(param_2 + 0x90),
                *(undefined4 *)(param_2 + 0x94),uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140134000(undefined8 param_1,undefined1 *param_2)

{
  char cVar1;
  undefined4 local_res8 [2];
  
  cVar1 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar1 != '\0') {
    *(undefined2 *)(param_2 + 1) = (undefined2)local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 0x13);
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)(param_2 + 0xb) = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)(param_2 + 0xf) = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar1 != '\0') {
    *(undefined2 *)(param_2 + 3) = (undefined2)local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar1 != '\0') {
    *param_2 = (undefined1)local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)(param_2 + 7) = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar1 != '\0') {
    *(undefined2 *)(param_2 + 5) = (undefined2)local_res8[0];
  }
  return param_1;
}



void FUN_140134100(undefined8 param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %d %d }",(int)*(short *)(param_2 + 1),*(undefined4 *)(param_2 + 0xb)
                ,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_1401341b0(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  char *pcVar1;
  int *piVar2;
  wchar_t *pwVar3;
  char cVar4;
  char *pcVar5;
  wchar_t *pwVar6;
  undefined4 local_res8 [2];
  char *local_res10;
  wchar_t *local_res18;
  wchar_t *local_res20;
  undefined8 uVar7;
  
  uVar7 = 0xfffffffffffffffe;
  cVar4 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar4 != '\0') {
    *param_2 = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 1);
  FUN_140157550(param_1,(longlong)param_2 + 0x46);
  cVar4 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar7);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x76) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar7);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x7a) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar4 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0x7e) = (undefined1)local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar4 != '\0') {
    *(undefined2 *)((longlong)param_2 + 0x87) = (undefined2)local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar4 != '\0') {
    *(undefined2 *)((longlong)param_2 + 0x89) = (undefined2)local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar4 != '\0') {
    *(undefined2 *)((longlong)param_2 + 0x8b) = (undefined2)local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar4 != '\0') {
    *(undefined2 *)((longlong)param_2 + 0x8d) = (undefined2)local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x8f) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x93) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x97) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x9b) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x9f) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar4 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0xa3) = (undefined1)local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar4 != '\0') {
    *(undefined2 *)(param_2 + 0x29) = (undefined2)local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar4 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0xa6) = (undefined1)local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xa7) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xab) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xaf) = local_res8[0];
  }
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = PTR_DAT_140320098;
  thunk_FUN_140155460(param_1,&local_res10);
  thunk_FUN_1401557c0(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_res18);
  pcVar5 = local_res10;
  if (local_res10 == (char *)0x0) {
    pcVar5 = PTR_DAT_140320098;
  }
  strcpy_s((char *)(param_2 + 5),0x32,pcVar5);
  pwVar6 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar6 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x56),0x10,pwVar6);
  pwVar6 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar6 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x7f),4,pwVar6);
  pcVar5 = local_res10;
  if (((local_res10 != (char *)0x0) && (local_res10 != PTR_DAT_140320098)) &&
     (pcVar1 = local_res10 + -8, pcVar1 != (char *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    piVar2 = (int *)(pcVar5 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(pcVar1);
    }
    FUN_140156be0(uVar7);
  }
  pwVar6 = local_res18;
  local_res10 = PTR_DAT_140320098;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar3 = local_res18 + -4, pwVar3 != (wchar_t *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    pwVar6 = pwVar6 + -2;
    *(int *)pwVar6 = *(int *)pwVar6 + -1;
    if (*(int *)pwVar6 == 0) {
      FUN_140156970(pwVar3);
    }
    FUN_140156be0(uVar7);
  }
  pwVar6 = local_res20;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar3 = local_res20 + -4, pwVar3 != (wchar_t *)0x0)) {
    local_res18 = (wchar_t *)PTR_DAT_1403200a0;
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    pwVar6 = pwVar6 + -2;
    *(int *)pwVar6 = *(int *)pwVar6 + -1;
    if (*(int *)pwVar6 == 0) {
      FUN_140156970(pwVar3);
    }
    FUN_140156be0(uVar7);
  }
  return param_1;
}



void FUN_1401345e0(undefined8 param_1,undefined4 *param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %d %s }",*param_2,(longlong)param_2 + 0x56,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



void FUN_140134690(undefined8 param_1,longlong param_2)

{
  int *piVar1;
  longlong *plVar2;
  longlong *plVar3;
  undefined *puVar4;
  undefined *puVar5;
  undefined *local_res10;
  undefined *local_res18;
  undefined *local_res20;
  undefined8 uVar6;
  
  uVar6 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10 = PTR_DAT_1403200a0;
  plVar2 = (longlong *)FUN_1401318c0(&local_res20,param_2 + 0x14);
  plVar3 = (longlong *)FUN_1401318c0(&local_res18,param_2 + 0x45);
  puVar5 = (undefined *)*plVar2;
  if ((undefined *)*plVar2 == (undefined *)0x0) {
    puVar5 = PTR_DAT_1403200a0;
  }
  puVar4 = (undefined *)*plVar3;
  if ((undefined *)*plVar3 == (undefined *)0x0) {
    puVar4 = PTR_DAT_1403200a0;
  }
  FUN_14004ce50(&local_res10,L"{ %s %s }",puVar4,puVar5,uVar6);
  if (((local_res18 != (undefined *)0x0) && (local_res18 != PTR_DAT_1403200a0)) &&
     (local_res18 + -8 != (undefined *)0x0)) {
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(local_res18 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res18 + -8);
    }
    FUN_140156be0(uVar6);
  }
  local_res18 = PTR_DAT_1403200a0;
  if (((local_res20 != (undefined *)0x0) && (local_res20 != PTR_DAT_1403200a0)) &&
     (local_res20 + -8 != (undefined *)0x0)) {
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(local_res20 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res20 + -8);
    }
    FUN_140156be0(uVar6);
  }
  FUN_14004cc50(param_1,&local_res10);
  puVar5 = local_res10;
  if (((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) &&
     (puVar4 = local_res10 + -8, puVar4 != (undefined *)0x0)) {
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(puVar5 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar4);
    }
    FUN_140156be0(uVar6);
  }
  return;
}



undefined8
FUN_140134810(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  wchar_t *local_res18 [2];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8;
  }
  FUN_140157550(param_1,param_2 + 1);
  FUN_140157550(param_1,param_2 + 5);
  cVar2 = FUN_1401543d0(param_1,&local_res8,1,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 0x11) = (undefined1)local_res8;
  }
  FUN_140157550(param_1,(longlong)param_2 + 0x45);
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x5d) = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)((longlong)param_2 + 0x55) = CONCAT44(uStackX_c,local_res8);
  }
  FUN_1401568c0();
  local_res18[0] = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res18[0];
  if (local_res18[0] == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 9),0x10,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x61),0x20,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18[0];
  if (((local_res18[0] != (wchar_t *)0x0) && (local_res18[0] != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18[0] + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res10 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_1401349f0(undefined8 param_1,longlong param_2)

{
  int *piVar1;
  longlong *plVar2;
  longlong *plVar3;
  undefined *puVar4;
  undefined *puVar5;
  undefined *local_res10;
  undefined *local_res18;
  undefined *local_res20;
  undefined8 uVar6;
  
  uVar6 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10 = PTR_DAT_1403200a0;
  plVar2 = (longlong *)FUN_1401318c0(&local_res20,param_2 + 0x78);
  plVar3 = (longlong *)FUN_1401318c0(&local_res18,param_2 + 0xb1);
  puVar5 = (undefined *)*plVar2;
  if ((undefined *)*plVar2 == (undefined *)0x0) {
    puVar5 = PTR_DAT_1403200a0;
  }
  puVar4 = (undefined *)*plVar3;
  if ((undefined *)*plVar3 == (undefined *)0x0) {
    puVar4 = PTR_DAT_1403200a0;
  }
  FUN_14004ce50(&local_res10,L"{ %s %s }",puVar4,puVar5,uVar6);
  if (((local_res18 != (undefined *)0x0) && (local_res18 != PTR_DAT_1403200a0)) &&
     (local_res18 + -8 != (undefined *)0x0)) {
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(local_res18 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res18 + -8);
    }
    FUN_140156be0(uVar6);
  }
  local_res18 = PTR_DAT_1403200a0;
  if (((local_res20 != (undefined *)0x0) && (local_res20 != PTR_DAT_1403200a0)) &&
     (local_res20 + -8 != (undefined *)0x0)) {
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(local_res20 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res20 + -8);
    }
    FUN_140156be0(uVar6);
  }
  FUN_14004cc50(param_1,&local_res10);
  puVar5 = local_res10;
  if (((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) &&
     (puVar4 = local_res10 + -8, puVar4 != (undefined *)0x0)) {
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(puVar5 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar4);
    }
    FUN_140156be0(uVar6);
  }
  return;
}



undefined8
FUN_140134b70(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  wchar_t *local_res18;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 1);
  FUN_140157550(param_1,param_2 + 0x1e);
  cVar2 = FUN_1401543d0(param_1,local_res8,1,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 0x2a) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xa9) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xad) = local_res8[0];
  }
  FUN_140157550(param_1,(longlong)param_2 + 0xb1);
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xc1) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xc5) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xc9) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xcd) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xd1) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xd5) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xd9) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xdd) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xe1) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xe5) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xe9) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xed) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xf1) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xf5) = local_res8[0];
  }
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x22),0x10,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 5),0x32,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res10 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_140134f10(undefined8 param_1,longlong param_2)

{
  int *piVar1;
  longlong *plVar2;
  longlong *plVar3;
  undefined *puVar4;
  undefined *puVar5;
  undefined *local_res10;
  undefined *local_res18;
  undefined *local_res20;
  undefined8 uVar6;
  
  uVar6 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10 = PTR_DAT_1403200a0;
  plVar2 = (longlong *)FUN_1401318c0(&local_res20,param_2 + 0x78);
  plVar3 = (longlong *)FUN_1401318c0(&local_res18,param_2 + 0xb4);
  puVar5 = (undefined *)*plVar2;
  if ((undefined *)*plVar2 == (undefined *)0x0) {
    puVar5 = PTR_DAT_1403200a0;
  }
  puVar4 = (undefined *)*plVar3;
  if ((undefined *)*plVar3 == (undefined *)0x0) {
    puVar4 = PTR_DAT_1403200a0;
  }
  FUN_14004ce50(&local_res10,L"{ %s %s }",puVar4,puVar5,uVar6);
  if (((local_res18 != (undefined *)0x0) && (local_res18 != PTR_DAT_1403200a0)) &&
     (local_res18 + -8 != (undefined *)0x0)) {
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(local_res18 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res18 + -8);
    }
    FUN_140156be0(uVar6);
  }
  local_res18 = PTR_DAT_1403200a0;
  if (((local_res20 != (undefined *)0x0) && (local_res20 != PTR_DAT_1403200a0)) &&
     (local_res20 + -8 != (undefined *)0x0)) {
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(local_res20 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res20 + -8);
    }
    FUN_140156be0(uVar6);
  }
  FUN_14004cc50(param_1,&local_res10);
  puVar5 = local_res10;
  if (((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) &&
     (puVar4 = local_res10 + -8, puVar4 != (undefined *)0x0)) {
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(puVar5 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar4);
    }
    FUN_140156be0(uVar6);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140135090(undefined8 param_1,undefined4 *param_2)

{
  char cVar1;
  undefined8 uVar2;
  wchar_t *pwVar3;
  longlong lVar4;
  wchar_t *pwVar5;
  longlong lVar6;
  longlong lVar7;
  undefined1 auStackY_158 [32];
  undefined4 local_128 [2];
  wchar_t *local_120;
  wchar_t *local_118;
  wchar_t *local_110;
  undefined8 local_108;
  undefined1 local_100;
  wchar_t *local_f8;
  wchar_t *local_f0;
  undefined8 local_e8;
  longlong local_d8 [10];
  longlong local_88 [10];
  ulonglong local_38;
  
  local_e8 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_158;
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    *param_2 = local_128[0];
  }
  FUN_140157550(param_1,param_2 + 1);
  FUN_140157550(param_1,param_2 + 0x1e);
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0x2a] = local_128[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0x2b] = local_128[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0x2c] = local_128[0];
  }
  FUN_140157550(param_1,param_2 + 0x2d);
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0x31] = local_128[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0x32] = local_128[0];
  }
  FUN_140157550(param_1,param_2 + 0x33);
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0x8f] = local_128[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0x90] = local_128[0];
  }
  FUN_140157550(param_1,param_2 + 0x91);
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0xed] = local_128[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0xee] = local_128[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0xef] = local_128[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0xf0] = local_128[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0xf9] = local_128[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_128,4);
  if (cVar1 != '\0') {
    param_2[0xfa] = local_128[0];
  }
  FUN_1401568c0();
  local_f0 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_120 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_118 = (wchar_t *)PTR_DAT_1403200a0;
  _eh_vector_constructor_iterator_(local_88,8,10,FUN_14004fa30,thunk_FUN_14004f990);
  FUN_1401568c0();
  local_f8 = (wchar_t *)PTR_DAT_1403200a0;
  _eh_vector_constructor_iterator_(local_d8,8,10,FUN_14004fa30,thunk_FUN_14004f990);
  FUN_1401568c0();
  local_110 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_f0);
  thunk_FUN_1401557c0(param_1,&local_120);
  thunk_FUN_1401557c0(param_1,&local_118);
  thunk_FUN_1401557c0(param_1,&local_f8);
  thunk_FUN_1401557c0(param_1,&local_110);
  pwVar3 = local_f0;
  if (local_f0 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 5),0x32,pwVar3);
  pwVar3 = local_120;
  if (local_120 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x22),0x10,pwVar3);
  pwVar3 = local_118;
  if (local_118 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x37),0x10,pwVar3);
  pwVar3 = local_f8;
  if (local_f8 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x95),0x10,pwVar3);
  pwVar3 = local_110;
  if (local_110 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0xf1),0x10,pwVar3);
  pwVar3 = (wchar_t *)(param_2 + 0x9d);
  lVar4 = 0;
  lVar7 = 10;
  lVar6 = lVar4;
  do {
    thunk_FUN_1401557c0(param_1,(longlong)local_88 + lVar4);
    thunk_FUN_1401557c0(param_1,(longlong)local_d8 + lVar4);
    pwVar5 = *(wchar_t **)((longlong)local_88 + lVar6);
    if (*(wchar_t **)((longlong)local_88 + lVar6) == (wchar_t *)0x0) {
      pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
    }
    wcscpy_s(pwVar3 + -0xbc,0x10,pwVar5);
    pwVar5 = *(wchar_t **)((longlong)local_d8 + lVar6);
    if (*(wchar_t **)((longlong)local_d8 + lVar6) == (wchar_t *)0x0) {
      pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
    }
    wcscpy_s(pwVar3,0x10,pwVar5);
    pwVar5 = local_110;
    lVar4 = lVar4 + 8;
    pwVar3 = pwVar3 + 0x10;
    lVar6 = lVar6 + 8;
    lVar7 = lVar7 + -1;
  } while (lVar7 != 0);
  if (((local_110 != (wchar_t *)0x0) && (local_110 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar3 = local_110 + -4, pwVar3 != (wchar_t *)0x0)) {
    uVar2 = FUN_1401568c0();
    local_108 = uVar2;
    FUN_140156b50(uVar2);
    local_100 = 1;
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar3);
    }
    FUN_140156be0(uVar2);
  }
  local_110 = (wchar_t *)PTR_DAT_1403200a0;
  _eh_vector_destructor_iterator_(local_d8,8,10,thunk_FUN_14004f990);
  pwVar3 = local_f8;
  if (((local_f8 != (wchar_t *)0x0) && (local_f8 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar5 = local_f8 + -4, pwVar5 != (wchar_t *)0x0)) {
    uVar2 = FUN_1401568c0();
    local_108 = uVar2;
    FUN_140156b50(uVar2);
    local_100 = 1;
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar5);
    }
    FUN_140156be0(uVar2);
  }
  local_f8 = (wchar_t *)PTR_DAT_1403200a0;
  _eh_vector_destructor_iterator_(local_88,8,10,thunk_FUN_14004f990);
  pwVar3 = local_118;
  if (((local_118 != (wchar_t *)0x0) && (local_118 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar5 = local_118 + -4, pwVar5 != (wchar_t *)0x0)) {
    uVar2 = FUN_1401568c0();
    local_108 = uVar2;
    FUN_140156b50(uVar2);
    local_100 = 1;
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar5);
    }
    FUN_140156be0(uVar2);
  }
  pwVar3 = local_120;
  local_118 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_120 != (wchar_t *)0x0) && (local_120 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar5 = local_120 + -4, pwVar5 != (wchar_t *)0x0)) {
    uVar2 = FUN_1401568c0();
    local_108 = uVar2;
    FUN_140156b50(uVar2);
    local_100 = 1;
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar5);
    }
    FUN_140156be0(uVar2);
  }
  pwVar3 = local_f0;
  if (((local_f0 != (wchar_t *)0x0) && (local_f0 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar5 = local_f0 + -4, pwVar5 != (wchar_t *)0x0)) {
    local_120 = (wchar_t *)PTR_DAT_1403200a0;
    uVar2 = FUN_1401568c0();
    local_108 = uVar2;
    FUN_140156b50(uVar2);
    local_100 = 1;
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar5);
    }
    FUN_140156be0(uVar2);
  }
  return param_1;
}



void FUN_1401356e0(undefined8 param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s %s }",param_2 + 0x24,param_2 + 0x60,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140135790(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  wchar_t *local_res18;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 1);
  FUN_140157550(param_1,param_2 + 5);
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[0x11] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[0x12] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x13] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 0x14);
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x20] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x21] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x22] = local_res8[0];
  }
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 9),0x10,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x18),0x10,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res10 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_1401359c0(undefined8 param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s %s }",param_2 + 0x18,param_2 + 0x72,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140135a70(undefined8 param_1,undefined4 *param_2)

{
  wchar_t *pwVar1;
  char cVar2;
  undefined8 uVar3;
  wchar_t *pwVar4;
  undefined2 local_res8;
  undefined2 uStackX_a;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  wchar_t *local_res18;
  wchar_t *local_res20;
  wchar_t *local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined1 local_30;
  
  local_40 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *param_2 = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[1] = CONCAT22(uStackX_a,local_res8);
  }
  FUN_140157550(param_1,param_2 + 2);
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x18] = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x19] = CONCAT22(uStackX_a,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)(param_2 + 0x1a) = CONCAT44(uStackX_c,CONCAT22(uStackX_a,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 0x1c) = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)((longlong)param_2 + 0xce) = CONCAT22(uStackX_a,local_res8);
  }
  FUN_1401568c0();
  local_48 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_48);
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar4 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 6),0x14,pwVar4);
  pwVar4 = local_48;
  if (local_48 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x72),0x10,pwVar4);
  pwVar4 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x10),0x10,pwVar4);
  pwVar4 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x92),0x14,pwVar4);
  pwVar4 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar4 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar4 = local_res20;
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res20 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar4 = local_48;
  if (((local_48 != (wchar_t *)0x0) && (local_48 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_48 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res20 = (wchar_t *)PTR_DAT_1403200a0;
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  return param_1;
}



void FUN_140135da0(undefined8 param_1,undefined1 *param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined8 uVar4;
  undefined *local_res10 [3];
  
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s %d %d }",param_2 + 0x35,*(undefined4 *)(param_2 + 5),*param_2);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140135e50(undefined8 param_1,undefined1 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,1,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 1) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 5) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 9) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0xd) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_2 + 0x11) = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 0x15);
  FUN_140157550(param_1,param_2 + 0x25);
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x35),0x10,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_140135fe0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x74,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140136090(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char *pcVar2;
  int *piVar3;
  char cVar4;
  char *pcVar5;
  wchar_t *pwVar6;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  char *local_res18;
  undefined8 uVar7;
  
  uVar7 = 0xfffffffffffffffe;
  cVar4 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar4 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar7);
  if (cVar4 != '\0') {
    param_2[1] = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,2,param_4,uVar7);
  if (cVar4 != '\0') {
    *(undefined2 *)(param_2 + 2) = (undefined2)local_res8[0];
  }
  FUN_140157550(param_1,(longlong)param_2 + 10);
  FUN_140157550(param_1,(longlong)param_2 + 0x1a);
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x2a) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x2e) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x32) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x36) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x3a) = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x3e) = local_res8[0];
  }
  FUN_1401568c0();
  local_res18 = PTR_DAT_140320098;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_140155460(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pcVar5 = local_res18;
  if (local_res18 == (char *)0x0) {
    pcVar5 = PTR_DAT_140320098;
  }
  strcpy_s((char *)((longlong)param_2 + 0x42),0x32,pcVar5);
  pwVar6 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar6 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x1d),0x10,pwVar6);
  pwVar6 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    pwVar6 = pwVar6 + -2;
    *(int *)pwVar6 = *(int *)pwVar6 + -1;
    if (*(int *)pwVar6 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar7);
  }
  pcVar5 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (char *)0x0) && (local_res18 != PTR_DAT_140320098)) &&
     (pcVar2 = local_res18 + -8, pcVar2 != (char *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    piVar3 = (int *)(pcVar5 + -4);
    *piVar3 = *piVar3 + -1;
    if (*piVar3 == 0) {
      FUN_140156970(pcVar2);
    }
    FUN_140156be0(uVar7);
  }
  return param_1;
}



void FUN_1401362f0(undefined8 param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s %s }",param_2 + 0x8c,param_2 + 0x130,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_1401363a0(undefined8 param_1,undefined4 *param_2)

{
  wchar_t *pwVar1;
  char cVar2;
  undefined8 uVar3;
  undefined4 *puVar4;
  wchar_t *pwVar5;
  longlong lVar6;
  undefined4 local_res8;
  undefined4 uStackX_c;
  undefined4 local_res10 [2];
  undefined4 local_res18 [2];
  undefined4 local_res20 [2];
  undefined4 local_68 [2];
  wchar_t *local_60;
  wchar_t *local_58;
  wchar_t *local_50;
  wchar_t *local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined1 local_30;
  
  local_40 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *param_2 = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8;
  }
  FUN_140157550(param_1,param_2 + 2);
  FUN_140157550(param_1,param_2 + 6);
  FUN_140157550(param_1,param_2 + 0x2b);
  FUN_140157550(param_1,param_2 + 0x2f);
  FUN_140157550(param_1,param_2 + 0x54);
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x58] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x59] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x5a] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x5b] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x5c] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x5d] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x5e] = local_res8;
  }
  lVar6 = 0;
  puVar4 = param_2 + 0x62;
  do {
    cVar2 = FUN_1401543d0(param_1,local_res10,4);
    if (cVar2 != '\0') {
      puVar4[-3] = local_res10[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_res18,4);
    if (cVar2 != '\0') {
      *puVar4 = local_res18[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_res20,4);
    if (cVar2 != '\0') {
      puVar4[3] = local_res20[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_68,4);
    if (cVar2 != '\0') {
      puVar4[6] = local_68[0];
    }
    cVar2 = FUN_1401543d0(param_1,&local_res8,1);
    if (cVar2 != '\0') {
      *(undefined1 *)(lVar6 + 0x1ac + (longlong)param_2) = (undefined1)local_res8;
    }
    lVar6 = lVar6 + 1;
    puVar4 = puVar4 + 1;
  } while (lVar6 < 3);
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x1af) = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)((longlong)param_2 + 0x1b3) = CONCAT44(uStackX_c,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)((longlong)param_2 + 0x1bb) = CONCAT44(uStackX_c,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)((longlong)param_2 + 0x1c3) = CONCAT44(uStackX_c,local_res8);
  }
  FUN_1401568c0();
  local_48 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_50 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_58 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_60 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_48);
  thunk_FUN_1401557c0(param_1,&local_50);
  thunk_FUN_1401557c0(param_1,&local_58);
  thunk_FUN_1401557c0(param_1,&local_60);
  pwVar5 = local_48;
  if (local_48 == (wchar_t *)0x0) {
    pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 10),0x32,pwVar5);
  pwVar5 = local_50;
  if (local_50 == (wchar_t *)0x0) {
    pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x23),0x10,pwVar5);
  pwVar5 = local_58;
  if (local_58 == (wchar_t *)0x0) {
    pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x33),0x32,pwVar5);
  pwVar5 = local_60;
  if (local_60 == (wchar_t *)0x0) {
    pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x4c),0x10,pwVar5);
  pwVar5 = local_60;
  if (((local_60 != (wchar_t *)0x0) && (local_60 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_60 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar5 = local_58;
  local_60 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_58 != (wchar_t *)0x0) && (local_58 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_58 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar5 = local_50;
  local_58 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_50 != (wchar_t *)0x0) && (local_50 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_50 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar5 = local_48;
  if (((local_48 != (wchar_t *)0x0) && (local_48 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_48 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_50 = (wchar_t *)PTR_DAT_1403200a0;
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  return param_1;
}



void FUN_140136880(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x8e,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140136930(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  wchar_t *local_res18;
  wchar_t *local_res20;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 2);
  FUN_140157550(param_1,param_2 + 6);
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xae) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xb2) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xb6) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xba) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xbe) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xe2) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xe6) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 0x23) = (undefined2)local_res8[0];
  }
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x8e),0x10,pwVar3);
  pwVar3 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0xc2),0x10,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 10),0x32,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res20;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res20 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res18 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_140136c40(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x94,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140136cf0(undefined8 param_1,undefined8 *param_2)

{
  wchar_t *pwVar1;
  char cVar2;
  undefined8 uVar3;
  wchar_t *pwVar4;
  undefined1 local_res8;
  undefined1 uStackX_9;
  undefined2 uStackX_a;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  wchar_t *local_res18;
  wchar_t *local_res20;
  wchar_t *local_58;
  wchar_t *local_50;
  wchar_t *local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined1 local_30;
  
  local_40 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *param_2 = CONCAT44(uStackX_c,CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8)));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 1) = CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,2);
  if (cVar2 != '\0') {
    *(ushort *)((longlong)param_2 + 0xc) = CONCAT11(uStackX_9,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0xe) = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0xf) = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0xd4) = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)((longlong)param_2 + 0xd9) =
         CONCAT44(uStackX_c,CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8)));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)((longlong)param_2 + 0xe1) =
         CONCAT44(uStackX_c,CONCAT22(uStackX_a,CONCAT11(uStackX_9,local_res8)));
  }
  FUN_1401568c0();
  local_48 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_50 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_58 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_48);
  thunk_FUN_1401557c0(param_1,&local_50);
  thunk_FUN_1401557c0(param_1,&local_58);
  thunk_FUN_1401557c0(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar4 = local_48;
  if (local_48 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 2),0x32,pwVar4);
  pwVar4 = local_50;
  if (local_50 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x74),0x10,pwVar4);
  pwVar4 = local_58;
  if (local_58 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x94),0x10,pwVar4);
  pwVar4 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0xb4),0x10,pwVar4);
  pwVar4 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0xd5),1,pwVar4);
  pwVar4 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar4 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0xd7),1,pwVar4);
  pwVar4 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar4 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar4 = local_res20;
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res20 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar4 = local_58;
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_58 != (wchar_t *)0x0) && (local_58 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_58 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar4 = local_50;
  local_58 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_50 != (wchar_t *)0x0) && (local_50 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_50 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar4 = local_48;
  if (((local_48 != (wchar_t *)0x0) && (local_48 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_48 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_50 = (wchar_t *)PTR_DAT_1403200a0;
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar4 = pwVar4 + -2;
    *(int *)pwVar4 = *(int *)pwVar4 + -1;
    if (*(int *)pwVar4 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  return param_1;
}



void FUN_140137150(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0xe,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140137200(undefined8 param_1,undefined2 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined2 local_res8;
  undefined2 uStackX_a;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  wchar_t *local_res18 [2];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,&local_res8,2,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8,param_4,uVar4);
  if (cVar2 != '\0') {
    *(ulonglong *)(param_2 + 1) = CONCAT44(uStackX_c,CONCAT22(uStackX_a,local_res8));
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(uint *)(param_2 + 5) = CONCAT22(uStackX_a,local_res8);
  }
  FUN_1401568c0();
  local_res18[0] = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res18[0];
  if (local_res18[0] == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s(param_2 + 7,0x10,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s(param_2 + 0x17,0xff,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18[0];
  if (((local_res18[0] != (wchar_t *)0x0) && (local_res18[0] != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18[0] + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res10 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_1401373a0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x209,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140137450(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  wchar_t *local_res18 [2];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,2,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined2 *)(param_2 + 1) = (undefined2)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 6) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 10) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0x229) = (undefined1)local_res8[0];
  }
  FUN_1401568c0();
  local_res18[0] = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res18[0];
  if (local_res18[0] == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0xb),0xff,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x209),0x10,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18[0];
  if (((local_res18[0] != (wchar_t *)0x0) && (local_res18[0] != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18[0] + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res10 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_140137630(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %d }",*(undefined1 *)(param_2 + 4),param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_1401376e0(undefined8 param_1,undefined4 *param_2)

{
  char cVar1;
  undefined4 local_res8 [2];
  
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar1 != '\0') {
    *(undefined1 *)(param_2 + 1) = (undefined1)local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)((longlong)param_2 + 5) = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)((longlong)param_2 + 9) = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xd) = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x11) = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x15) = local_res8[0];
  }
  return param_1;
}



void FUN_1401377d0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 6,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140137880(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 1) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 5) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x26) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x2a) = local_res8[0];
  }
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 6),0x10,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_1401379d0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x6a,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140137a80(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char *pcVar2;
  int *piVar3;
  char cVar4;
  char *pcVar5;
  wchar_t *pwVar6;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  wchar_t *local_res18;
  char *local_res20;
  undefined8 uVar7;
  
  uVar7 = 0xfffffffffffffffe;
  cVar4 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar4 != '\0') {
    *param_2 = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 1);
  FUN_140157550(param_1,param_2 + 5);
  cVar4 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar7);
  if (cVar4 != '\0') {
    param_2[9] = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar7);
  if (cVar4 != '\0') {
    param_2[10] = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    param_2[0xb] = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    param_2[0xc] = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    param_2[0xd] = local_res8[0];
  }
  FUN_1401568c0();
  local_res20 = PTR_DAT_140320098;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_140155460(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pcVar5 = local_res20;
  if (local_res20 == (char *)0x0) {
    pcVar5 = PTR_DAT_140320098;
  }
  strcpy_s((char *)(param_2 + 0xe),0x32,pcVar5);
  pwVar6 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar6 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x6a),0x10,pwVar6);
  pwVar6 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar6 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x8a),0x10,pwVar6);
  pwVar6 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    pwVar6 = pwVar6 + -2;
    *(int *)pwVar6 = *(int *)pwVar6 + -1;
    if (*(int *)pwVar6 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar7);
  }
  pwVar6 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    pwVar6 = pwVar6 + -2;
    *(int *)pwVar6 = *(int *)pwVar6 + -1;
    if (*(int *)pwVar6 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar7);
  }
  pcVar5 = local_res20;
  if (((local_res20 != (char *)0x0) && (local_res20 != PTR_DAT_140320098)) &&
     (pcVar2 = local_res20 + -8, pcVar2 != (char *)0x0)) {
    local_res18 = (wchar_t *)PTR_DAT_1403200a0;
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    piVar3 = (int *)(pcVar5 + -4);
    *piVar3 = *piVar3 + -1;
    if (*piVar3 == 0) {
      FUN_140156970(pcVar2);
    }
    FUN_140156be0(uVar7);
  }
  return param_1;
}



undefined8
FUN_140137d10(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  wchar_t *local_res18;
  wchar_t *local_res20;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8;
  }
  FUN_140157550(param_1,param_2 + 2);
  FUN_140157550(param_1,param_2 + 6);
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[10] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)(param_2 + 0xb) = CONCAT44(uStackX_c,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0xd] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0xe] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0xf] = local_res8;
  }
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x20),0x32,pwVar3);
  pwVar3 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x18),0x10,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x10),0x10,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res20;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res20 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res18 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_140137fb0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x87,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140138060(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char *pcVar2;
  int *piVar3;
  char cVar4;
  char *pcVar5;
  wchar_t *pwVar6;
  undefined4 local_res8;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  char *local_res18;
  undefined8 uVar7;
  
  uVar7 = 0xfffffffffffffffe;
  cVar4 = FUN_1401543d0(param_1,&local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar4 != '\0') {
    *param_2 = local_res8;
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,4,param_4,uVar7);
  if (cVar4 != '\0') {
    param_2[1] = local_res8;
  }
  FUN_140157550(param_1,param_2 + 2);
  cVar4 = FUN_1401543d0(param_1,&local_res8,4,param_4,uVar7);
  if (cVar4 != '\0') {
    param_2[6] = local_res8;
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,4,param_4,uVar7);
  if (cVar4 != '\0') {
    param_2[7] = local_res8;
  }
  FUN_140157550(param_1,param_2 + 8);
  cVar4 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar4 != '\0') {
    param_2[0xc] = local_res8;
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar4 != '\0') {
    param_2[0xd] = local_res8;
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,1);
  if (cVar4 != '\0') {
    *(undefined1 *)(param_2 + 0xe) = (undefined1)local_res8;
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar4 != '\0') {
    *(ulonglong *)((longlong)param_2 + 0x39) = CONCAT44(uStackX_c,local_res8);
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x41) = local_res8;
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x45) = local_res8;
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x49) = local_res8;
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x4d) = local_res8;
  }
  cVar4 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x51) = local_res8;
  }
  FUN_1401568c0();
  local_res18 = PTR_DAT_140320098;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_140155460(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pcVar5 = local_res18;
  if (local_res18 == (char *)0x0) {
    pcVar5 = PTR_DAT_140320098;
  }
  strcpy_s((char *)((longlong)param_2 + 0x55),0x32,pcVar5);
  pwVar6 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar6 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x87),0x10,pwVar6);
  pwVar6 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    pwVar6 = pwVar6 + -2;
    *(int *)pwVar6 = *(int *)pwVar6 + -1;
    if (*(int *)pwVar6 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar7);
  }
  pcVar5 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (char *)0x0) && (local_res18 != PTR_DAT_140320098)) &&
     (pcVar2 = local_res18 + -8, pcVar2 != (char *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    piVar3 = (int *)(pcVar5 + -4);
    *piVar3 = *piVar3 + -1;
    if (*piVar3 == 0) {
      FUN_140156970(pcVar2);
    }
    FUN_140156be0(uVar7);
  }
  return param_1;
}



void FUN_140138330(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x51,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_1401383e0(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char *pcVar2;
  int *piVar3;
  char cVar4;
  char *pcVar5;
  wchar_t *pwVar6;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  char *local_res18;
  undefined8 uVar7;
  
  uVar7 = 0xfffffffffffffffe;
  cVar4 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar4 != '\0') {
    *param_2 = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 1);
  cVar4 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar7);
  if (cVar4 != '\0') {
    param_2[5] = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar7);
  if (cVar4 != '\0') {
    param_2[6] = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,1,param_4,uVar7);
  if (cVar4 != '\0') {
    *(undefined1 *)(param_2 + 7) = (undefined1)local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar4 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0x1d) = (undefined1)local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar4 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0x1e) = (undefined1)local_res8[0];
  }
  FUN_1401568c0();
  local_res18 = PTR_DAT_140320098;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_140155460(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pcVar5 = local_res18;
  if (local_res18 == (char *)0x0) {
    pcVar5 = PTR_DAT_140320098;
  }
  strcpy_s((char *)((longlong)param_2 + 0x1f),0x32,pcVar5);
  pwVar6 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar6 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x51),0x10,pwVar6);
  pwVar6 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    pwVar6 = pwVar6 + -2;
    *(int *)pwVar6 = *(int *)pwVar6 + -1;
    if (*(int *)pwVar6 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar7);
  }
  pcVar5 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (char *)0x0) && (local_res18 != PTR_DAT_140320098)) &&
     (pcVar2 = local_res18 + -8, pcVar2 != (char *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    piVar3 = (int *)(pcVar5 + -4);
    *piVar3 = *piVar3 + -1;
    if (*piVar3 == 0) {
      FUN_140156970(pcVar2);
    }
    FUN_140156be0(uVar7);
  }
  return param_1;
}



void FUN_1401385e0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x77,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140138690(undefined8 param_1,undefined4 *param_2)

{
  wchar_t *pwVar1;
  char *pcVar2;
  int *piVar3;
  char cVar4;
  undefined8 uVar5;
  char *pcVar6;
  wchar_t *pwVar7;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  wchar_t *local_res18;
  wchar_t *local_res20;
  char *local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined1 local_30;
  
  local_40 = 0xfffffffffffffffe;
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    param_2[1] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 2);
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    param_2[6] = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    param_2[7] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 8);
  FUN_140157550(param_1,param_2 + 0xc);
  cVar4 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar4 != '\0') {
    *(undefined1 *)(param_2 + 0x10) = (undefined1)local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x41) = local_res8[0];
  }
  FUN_1401568c0();
  local_48 = PTR_DAT_140320098;
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_140155460(param_1,&local_48);
  thunk_FUN_1401557c0(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pcVar6 = local_48;
  if (local_48 == (char *)0x0) {
    pcVar6 = PTR_DAT_140320098;
  }
  strcpy_s((char *)((longlong)param_2 + 0x45),0x32,pcVar6);
  pwVar7 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x77),0x10,pwVar7);
  pwVar7 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x97),0x10,pwVar7);
  pwVar7 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0xb7),0x15e,pwVar7);
  pwVar7 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    pwVar7 = pwVar7 + -2;
    *(int *)pwVar7 = *(int *)pwVar7 + -1;
    if (*(int *)pwVar7 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar5);
  }
  pwVar7 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    pwVar7 = pwVar7 + -2;
    *(int *)pwVar7 = *(int *)pwVar7 + -1;
    if (*(int *)pwVar7 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar5);
  }
  pwVar7 = local_res20;
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res20 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    pwVar7 = pwVar7 + -2;
    *(int *)pwVar7 = *(int *)pwVar7 + -1;
    if (*(int *)pwVar7 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar5);
  }
  pcVar6 = local_48;
  if (((local_48 != (char *)0x0) && (local_48 != PTR_DAT_140320098)) &&
     (pcVar2 = local_48 + -8, pcVar2 != (char *)0x0)) {
    local_res20 = (wchar_t *)PTR_DAT_1403200a0;
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    piVar3 = (int *)(pcVar6 + -4);
    *piVar3 = *piVar3 + -1;
    if (*piVar3 == 0) {
      FUN_140156970(pcVar2);
    }
    FUN_140156be0(uVar5);
  }
  return param_1;
}



void FUN_1401389b0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x62,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140138a60(undefined8 param_1,undefined4 *param_2)

{
  wchar_t *pwVar1;
  char *pcVar2;
  int *piVar3;
  char cVar4;
  undefined8 uVar5;
  char *pcVar6;
  wchar_t *pwVar7;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  wchar_t *local_res18;
  wchar_t *local_res20;
  char *local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined1 local_30;
  
  local_40 = 0xfffffffffffffffe;
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    param_2[1] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 2);
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    param_2[6] = local_res8[0];
  }
  cVar4 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar4 != '\0') {
    param_2[7] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 8);
  FUN_1401568c0();
  local_48 = PTR_DAT_140320098;
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_140155460(param_1,&local_48);
  thunk_FUN_1401557c0(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pcVar6 = local_48;
  if (local_48 == (char *)0x0) {
    pcVar6 = PTR_DAT_140320098;
  }
  strcpy_s((char *)(param_2 + 0xc),0x32,pcVar6);
  pwVar7 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x62),0x10,pwVar7);
  pwVar7 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0x82),0x10,pwVar7);
  pwVar7 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar7 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0xa2),0x15e,pwVar7);
  pwVar7 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    pwVar7 = pwVar7 + -2;
    *(int *)pwVar7 = *(int *)pwVar7 + -1;
    if (*(int *)pwVar7 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar5);
  }
  pwVar7 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    pwVar7 = pwVar7 + -2;
    *(int *)pwVar7 = *(int *)pwVar7 + -1;
    if (*(int *)pwVar7 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar5);
  }
  pwVar7 = local_res20;
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res20 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    pwVar7 = pwVar7 + -2;
    *(int *)pwVar7 = *(int *)pwVar7 + -1;
    if (*(int *)pwVar7 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar5);
  }
  pcVar6 = local_48;
  if (((local_48 != (char *)0x0) && (local_48 != PTR_DAT_140320098)) &&
     (pcVar2 = local_48 + -8, pcVar2 != (char *)0x0)) {
    local_res20 = (wchar_t *)PTR_DAT_1403200a0;
    uVar5 = FUN_1401568c0();
    local_38 = uVar5;
    FUN_140156b50(uVar5);
    local_30 = 1;
    piVar3 = (int *)(pcVar6 + -4);
    *piVar3 = *piVar3 + -1;
    if (*piVar3 == 0) {
      FUN_140156970(pcVar2);
    }
    FUN_140156be0(uVar5);
  }
  return param_1;
}



void FUN_140138d40(undefined8 param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s %s }",param_2 + 0x28,param_2 + 0xd2,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140138df0(undefined8 param_1,undefined4 *param_2)

{
  wchar_t *pwVar1;
  char cVar2;
  undefined8 uVar3;
  undefined4 *puVar4;
  wchar_t *pwVar5;
  longlong lVar6;
  undefined4 local_res8 [2];
  undefined4 local_res10 [2];
  undefined4 local_res18 [2];
  undefined4 local_res20 [2];
  undefined4 local_58 [2];
  wchar_t *local_50;
  wchar_t *local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined1 local_30;
  
  local_40 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 2);
  FUN_140157550(param_1,param_2 + 6);
  FUN_140157550(param_1,param_2 + 0x12);
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x16] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x17] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x18] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x19] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 0x1a) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0x69) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x6a) = local_res8[0];
  }
  puVar4 = (undefined4 *)((longlong)param_2 + 0x7a);
  lVar6 = 3;
  do {
    cVar2 = FUN_1401543d0(param_1,local_res8,4);
    if (cVar2 != '\0') {
      puVar4[-3] = local_res8[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_res10,4);
    if (cVar2 != '\0') {
      *puVar4 = local_res10[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_res18,4);
    if (cVar2 != '\0') {
      puVar4[3] = local_res18[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_res20,4);
    if (cVar2 != '\0') {
      puVar4[6] = local_res20[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_58,4);
    if (cVar2 != '\0') {
      puVar4[9] = local_58[0];
    }
    puVar4 = puVar4 + 1;
    lVar6 = lVar6 + -1;
  } while (lVar6 != 0);
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xaa) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xae) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xb2) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xb6) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xba) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xbe) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xc2) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xc6) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xca) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xce) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xf2) = local_res8[0];
  }
  FUN_1401568c0();
  local_48 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_50 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_48);
  thunk_FUN_1401557c0(param_1,&local_50);
  pwVar5 = local_48;
  if (local_48 == (wchar_t *)0x0) {
    pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 10),0x10,pwVar5);
  pwVar5 = local_50;
  if (local_50 == (wchar_t *)0x0) {
    pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0xd2),0x10,pwVar5);
  pwVar5 = local_50;
  if (((local_50 != (wchar_t *)0x0) && (local_50 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_50 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar5 = local_48;
  if (((local_48 != (wchar_t *)0x0) && (local_48 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_48 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_50 = (wchar_t *)PTR_DAT_1403200a0;
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  return param_1;
}



void FUN_140139250(undefined8 param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s %s }",param_2 + 0x28,param_2 + 0xba,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140139300(undefined8 param_1,undefined4 *param_2)

{
  wchar_t *pwVar1;
  char cVar2;
  undefined8 uVar3;
  undefined4 *puVar4;
  wchar_t *pwVar5;
  longlong lVar6;
  undefined4 local_res8 [2];
  undefined4 local_res10 [2];
  undefined4 local_res18 [2];
  undefined4 local_res20 [2];
  undefined4 local_58 [2];
  wchar_t *local_50;
  wchar_t *local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined1 local_30;
  
  local_40 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 2);
  FUN_140157550(param_1,param_2 + 6);
  FUN_140157550(param_1,param_2 + 0x12);
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x16] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x17] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x18] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x19] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 0x1a) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0x69) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x6a) = local_res8[0];
  }
  puVar4 = (undefined4 *)((longlong)param_2 + 0x7a);
  lVar6 = 3;
  do {
    cVar2 = FUN_1401543d0(param_1,local_res8,4);
    if (cVar2 != '\0') {
      puVar4[-3] = local_res8[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_res10,4);
    if (cVar2 != '\0') {
      *puVar4 = local_res10[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_res18,4);
    if (cVar2 != '\0') {
      puVar4[3] = local_res18[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_res20,4);
    if (cVar2 != '\0') {
      puVar4[6] = local_res20[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_58,4);
    if (cVar2 != '\0') {
      puVar4[9] = local_58[0];
    }
    puVar4 = puVar4 + 1;
    lVar6 = lVar6 + -1;
  } while (lVar6 != 0);
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xaa) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xae) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xb2) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xb6) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xda) = local_res8[0];
  }
  FUN_1401568c0();
  local_48 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_50 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_48);
  thunk_FUN_1401557c0(param_1,&local_50);
  pwVar5 = local_48;
  if (local_48 == (wchar_t *)0x0) {
    pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 10),0x10,pwVar5);
  pwVar5 = local_50;
  if (local_50 == (wchar_t *)0x0) {
    pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)((longlong)param_2 + 0xba),0x10,pwVar5);
  pwVar5 = local_50;
  if (((local_50 != (wchar_t *)0x0) && (local_50 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_50 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  pwVar5 = local_48;
  if (((local_48 != (wchar_t *)0x0) && (local_48 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_48 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_50 = (wchar_t *)PTR_DAT_1403200a0;
    uVar3 = FUN_1401568c0();
    local_38 = uVar3;
    FUN_140156b50(uVar3);
    local_30 = 1;
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  return param_1;
}



void FUN_1401396b0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x28,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_140139760(undefined8 param_1,undefined4 *param_2)

{
  wchar_t *pwVar1;
  char cVar2;
  undefined8 uVar3;
  undefined4 *puVar4;
  wchar_t *pwVar5;
  longlong lVar6;
  undefined4 local_res8 [2];
  undefined4 local_res10 [2];
  undefined4 local_res18 [2];
  undefined4 local_res20 [2];
  undefined4 local_58 [2];
  wchar_t *local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38;
  
  local_48 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 2);
  FUN_140157550(param_1,param_2 + 6);
  FUN_140157550(param_1,param_2 + 0x12);
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x16] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x17] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x18] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x19] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 0x1a) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)((longlong)param_2 + 0x69) = (undefined1)local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x6a) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x6e) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xae) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xb2) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xb6) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xba) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xbe) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xc2) = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0xc6) = local_res8[0];
  }
  puVar4 = (undefined4 *)((longlong)param_2 + 0x7e);
  lVar6 = 3;
  do {
    cVar2 = FUN_1401543d0(param_1,local_res8,4);
    if (cVar2 != '\0') {
      puVar4[-3] = local_res8[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_res10,4);
    if (cVar2 != '\0') {
      *puVar4 = local_res10[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_res18,4);
    if (cVar2 != '\0') {
      puVar4[3] = local_res18[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_res20,4);
    if (cVar2 != '\0') {
      puVar4[6] = local_res20[0];
    }
    cVar2 = FUN_1401543d0(param_1,local_58,4);
    if (cVar2 != '\0') {
      puVar4[9] = local_58[0];
    }
    puVar4 = puVar4 + 1;
    lVar6 = lVar6 + -1;
  } while (lVar6 != 0);
  FUN_1401568c0();
  local_50 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_50);
  pwVar5 = local_50;
  if (local_50 == (wchar_t *)0x0) {
    pwVar5 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 10),0x10,pwVar5);
  pwVar5 = local_50;
  if (((local_50 != (wchar_t *)0x0) && (local_50 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_50 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar3 = FUN_1401568c0();
    local_40 = uVar3;
    FUN_140156b50(uVar3);
    local_38 = 1;
    pwVar5 = pwVar5 + -2;
    *(int *)pwVar5 = *(int *)pwVar5 + -1;
    if (*(int *)pwVar5 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar3);
  }
  return param_1;
}



void FUN_140139ad0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x90,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140139b80(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  wchar_t *local_res18;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[2] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 3);
  FUN_140157550(param_1,param_2 + 7);
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x2c] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x2d] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x2e] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x2f] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x30] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x31] = local_res8[0];
  }
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x24),0x10,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0xb),0x32,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res10 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_140139df0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x8c,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_140139ea0(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  wchar_t *local_res18;
  wchar_t *local_res20;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8;
  }
  FUN_140157550(param_1,param_2 + 2);
  FUN_140157550(param_1,param_2 + 6);
  FUN_140157550(param_1,param_2 + 0x2b);
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x37] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x38] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)(param_2 + 0x39) = CONCAT44(uStackX_c,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x3b] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x3c] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x3d] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x3e] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x3f] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x40] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x41] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x42] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x43] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x44] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x45] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x46] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x47] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x48] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x49] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x4a] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x4b] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x4c] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x4d] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x4e] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x4f] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x50] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x51] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x52] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x53] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x54] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x55] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x56] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x57] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x58] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x59] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x5a] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x5b] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x5c] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x5d] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0x5e] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,1);
  if (cVar2 != '\0') {
    *(undefined1 *)(param_2 + 0x5f) = (undefined1)local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    *(undefined4 *)((longlong)param_2 + 0x17d) = local_res8;
  }
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x23),0x10,pwVar3);
  pwVar3 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 10),0x32,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x2f),0x10,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res20;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res20 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res18 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_14013a5d0(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res18 [2];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res18[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res18,L"{ %d }",*param_2,param_4,uVar4);
  FUN_14004cc50(param_1,local_res18);
  puVar3 = local_res18[0];
  if (((local_res18[0] != (undefined *)0x0) && (local_res18[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res18[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_14013a680(undefined8 param_1,undefined4 *param_2)

{
  char cVar1;
  undefined4 local_res8 [2];
  
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    param_2[1] = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    param_2[2] = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    param_2[3] = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    param_2[4] = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    param_2[5] = local_res8[0];
  }
  return param_1;
}



void FUN_14013a750(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x44,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_14013a800(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  wchar_t *local_res18;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[2] = local_res8;
  }
  FUN_140157550(param_1,param_2 + 3);
  FUN_140157550(param_1,param_2 + 7);
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0xb] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0xc] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)(param_2 + 0xd) = CONCAT44(uStackX_c,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,8);
  if (cVar2 != '\0') {
    *(ulonglong *)(param_2 + 0xf) = CONCAT44(uStackX_c,local_res8);
  }
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res10);
  thunk_FUN_1401557c0(param_1,&local_res18);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x19),0x32,pwVar3);
  pwVar3 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x11),0x10,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res10 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_14013aa20(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x34,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_14013aad0(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  wchar_t *local_res18;
  wchar_t *local_res20;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 2);
  FUN_140157550(param_1,param_2 + 6);
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[10] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0xb] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar2 != '\0') {
    param_2[0xc] = local_res8[0];
  }
  FUN_1401568c0();
  local_res20 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res18 = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res20);
  thunk_FUN_1401557c0(param_1,&local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res20;
  if (local_res20 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0xd),0x10,pwVar3);
  pwVar3 = local_res18;
  if (local_res18 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x15),0x32,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x2e),0xff,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18;
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  if (((local_res18 != (wchar_t *)0x0) && (local_res18 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res20;
  if (((local_res20 != (wchar_t *)0x0) && (local_res20 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res20 + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res18 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



undefined8
FUN_14013ad40(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8;
  undefined4 uStackX_c;
  wchar_t *local_res10;
  wchar_t *local_res18 [2];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8;
  }
  FUN_140157550(param_1,param_2 + 1);
  FUN_140157550(param_1,param_2 + 5);
  cVar2 = FUN_1401543d0(param_1,&local_res8,8,param_4,uVar4);
  if (cVar2 != '\0') {
    *(ulonglong *)(param_2 + 9) = CONCAT44(uStackX_c,local_res8);
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[0xb] = local_res8;
  }
  cVar2 = FUN_1401543d0(param_1,&local_res8,4);
  if (cVar2 != '\0') {
    param_2[0xc] = local_res8;
  }
  FUN_1401568c0();
  local_res18[0] = (wchar_t *)PTR_DAT_1403200a0;
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,local_res18);
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res18[0];
  if (local_res18[0] == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0x15),0x32,pwVar3);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0xd),0x10,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  pwVar3 = local_res18[0];
  if (((local_res18[0] != (wchar_t *)0x0) && (local_res18[0] != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res18[0] + -4, pwVar1 != (wchar_t *)0x0)) {
    local_res10 = (wchar_t *)PTR_DAT_1403200a0;
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



void FUN_14013af10(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined *local_res10 [3];
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10[0] = PTR_DAT_1403200a0;
  FUN_14004ce50(local_res10,L"{ %s }",param_2 + 0x3c,param_4,uVar4);
  FUN_14004cc50(param_1,local_res10);
  puVar3 = local_res10[0];
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res10[0] + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8
FUN_14013afc0(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  wchar_t *pwVar1;
  char cVar2;
  wchar_t *pwVar3;
  undefined4 local_res8 [2];
  wchar_t *local_res10;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    *param_2 = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[1] = local_res8[0];
  }
  cVar2 = FUN_1401543d0(param_1,local_res8,4,param_4,uVar4);
  if (cVar2 != '\0') {
    param_2[2] = local_res8[0];
  }
  FUN_140157550(param_1,param_2 + 3);
  FUN_140157550(param_1,param_2 + 7);
  FUN_140157550(param_1,param_2 + 0xb);
  FUN_140131a40(param_1,param_2 + 0x17);
  FUN_1401568c0();
  local_res10 = (wchar_t *)PTR_DAT_1403200a0;
  thunk_FUN_1401557c0(param_1,&local_res10);
  pwVar3 = local_res10;
  if (local_res10 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)PTR_DAT_1403200a0;
  }
  wcscpy_s((wchar_t *)(param_2 + 0xf),0x10,pwVar3);
  pwVar3 = local_res10;
  if (((local_res10 != (wchar_t *)0x0) && (local_res10 != (wchar_t *)PTR_DAT_1403200a0)) &&
     (pwVar1 = local_res10 + -4, pwVar1 != (wchar_t *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    pwVar3 = pwVar3 + -2;
    *(int *)pwVar3 = *(int *)pwVar3 + -1;
    if (*(int *)pwVar3 == 0) {
      FUN_140156970(pwVar1);
    }
    FUN_140156be0(uVar4);
  }
  return param_1;
}



undefined8 FUN_14013b110(undefined8 param_1,longlong param_2)

{
  FUN_140157600();
  FUN_140157600(param_1,param_2 + 0x10);
  FUN_140157600(param_1,param_2 + 0x20);
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x30));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x52));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x54));
  FUN_14004fcb0(param_1,*(undefined8 *)(param_2 + 0x58));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0x60));
  FUN_14004fbc0(param_1,*(undefined8 *)(param_2 + 0x62));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x6a));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x6e));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x72));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x76));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x7a));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x7e));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x82));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x86));
  FUN_14004fae0(param_1,*(undefined4 *)(param_2 + 0x8a));
  FUN_14004fae0(param_1,*(undefined4 *)(param_2 + 0x8e));
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 0x92));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x93));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x97));
  FUN_14004fae0(param_1,*(undefined4 *)(param_2 + 0x9b));
  FUN_14004fae0(param_1,*(undefined4 *)(param_2 + 0x9f));
  FUN_14004fae0(param_1,*(undefined4 *)(param_2 + 0xa3));
  FUN_14004fae0(param_1,*(undefined4 *)(param_2 + 0xa7));
  FUN_14004fae0(param_1,*(undefined4 *)(param_2 + 0xab));
  FUN_140155f60(param_1,param_2 + 0x32);
  return param_1;
}



void FUN_14013b2a0(longlong param_1,undefined8 param_2)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  undefined1 local_68 [80];
  
  lVar4 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (*(longlong *)(param_1 + 0x10) == 0) {
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(lVar2 + 0x18);
    FUN_140050060(lVar2,iVar1 + 0x10);
    if (*(int *)(lVar2 + 0x18) != 0) {
      lVar4 = *(longlong *)(lVar2 + 0x10);
    }
    FUN_140050120(lVar4 + iVar1,param_2,0x10);
    goto LAB_14013b36a;
  }
  if (*(longlong *)(param_1 + 0x10) == 0) {
    FUN_140156300(local_68,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_68,(ThrowInfo *)&DAT_14031d928);
  }
  iVar1 = *(int *)(param_1 + 0x18);
  iVar3 = iVar1 + 0x10;
  if ((iVar3 < 0) || (*(int *)(param_1 + 0x1c) < iVar3)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(int *)(param_1 + 0x18) = iVar3;
  FUN_140050120((longlong)iVar1 + *(longlong *)(param_1 + 0x10),param_2,0x10);
LAB_14013b36a:
  FUN_1400501f0(param_1);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_14013b390(undefined8 param_1,undefined4 *param_2)

{
  undefined8 uVar1;
  undefined1 auStack_48 [32];
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_1c;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_48;
  local_28 = 0;
  local_24 = 0;
  local_20 = 0;
  local_1c = 0;
  uVar1 = FUN_1401543d0(param_1,&local_28,0x10);
  if ((char)uVar1 == '\0') {
    return uVar1;
  }
  *param_2 = local_28;
  param_2[1] = local_24;
  param_2[2] = local_20;
  param_2[3] = local_1c;
  return CONCAT71((uint7)(uint3)((uint)local_1c >> 8),1);
}



void FUN_14013b430(undefined8 *param_1)

{
  *param_1 = MagiAgentReceive::vftable;
  return;
}



void FUN_14013b440(longlong param_1,undefined4 param_2)

{
  bool bVar1;
  
  switch(param_2) {
  case 1:
    *(undefined1 *)(param_1 + 8) = 1;
    return;
  case 2:
    *(undefined1 *)(param_1 + 9) = 1;
    return;
  default:
    return;
  case 5:
    *(undefined1 *)(param_1 + 10) = 1;
    return;
  case 6:
    *(undefined1 *)(param_1 + 0xb) = 1;
    return;
  case 7:
    break;
  case 8:
    *(undefined1 *)(param_1 + 0xc) = 1;
    return;
  case 0xd:
    if (*(char *)(param_1 + 0xd) == '\0') {
      *(undefined2 *)(param_1 + 0xd) = 1;
      return;
    }
    *(undefined2 *)(param_1 + 0xd) = 0x100;
    return;
  }
  bVar1 = *(char *)(DAT_14032f260 + 0x171) == '\0';
  *(bool *)(DAT_14032f260 + 0x171) = bVar1;
  if (!bVar1) {
                    // WARNING: Could not recover jumptable at 0x00014013b4a2. Too many branches
                    // WARNING: Treating indirect jump as call
    printf("Auto Revive Off !!!\n");
    return;
  }
                    // WARNING: Could not recover jumptable at 0x00014013b494. Too many branches
                    // WARNING: Treating indirect jump as call
  printf("Auto Revive On !!!\n");
  return;
}



undefined8 * FUN_14013b500(undefined8 *param_1,uint param_2)

{
  *param_1 = MagiServerBase::vftable;
  if ((void *)param_1[2] != (void *)0x0) {
    operator_delete((void *)param_1[2]);
  }
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14013b560(undefined8 *param_1)

{
  *param_1 = MagiServerBase::vftable;
  if ((void *)param_1[2] != (void *)0x0) {
    operator_delete((void *)param_1[2]);
  }
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  return;
}



void FUN_14013b5a0(longlong param_1,undefined8 param_2)

{
  ulonglong *puVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  undefined8 local_res10 [3];
  
  puVar2 = *(undefined8 **)(param_1 + 0x18);
  puVar1 = (ulonglong *)(param_1 + 0x10);
  local_res10[0] = param_2;
  if (local_res10 < puVar2) {
    puVar3 = (undefined8 *)*puVar1;
    if (puVar3 <= local_res10) {
      if (puVar2 == *(undefined8 **)(param_1 + 0x20)) {
        FUN_14013b810(puVar1);
      }
      if (*(undefined8 **)(param_1 + 0x18) != (undefined8 *)0x0) {
        **(undefined8 **)(param_1 + 0x18) =
             *(undefined8 *)(*puVar1 + ((longlong)local_res10 - (longlong)puVar3 >> 3) * 8);
        *(longlong *)(param_1 + 0x18) = *(longlong *)(param_1 + 0x18) + 8;
        return;
      }
      goto LAB_14013b628;
    }
  }
  if (puVar2 == *(undefined8 **)(param_1 + 0x20)) {
    FUN_14013b810(puVar1);
  }
  if (*(undefined8 **)(param_1 + 0x18) != (undefined8 *)0x0) {
    **(undefined8 **)(param_1 + 0x18) = param_2;
  }
LAB_14013b628:
  *(longlong *)(param_1 + 0x18) = *(longlong *)(param_1 + 0x18) + 8;
  return;
}



void FUN_14013b640(undefined8 param_1)

{
  FUN_14013b730(param_1,0x15);
  FUN_14013b730(param_1,0xd);
  FUN_14013b730(param_1,0xc);
  FUN_14013b730(param_1,0x11);
  FUN_14013b730(param_1,0x12);
  FUN_14013b730(param_1,0x13);
  FUN_14013b730(param_1,10);
  FUN_14013b730(param_1,6);
  FUN_14013b730(param_1,0xb);
  FUN_14013b730(param_1,9);
  FUN_14013b730(param_1,7);
  FUN_14013b730(param_1,8);
  FUN_14013b730(param_1,5);
  FUN_14013b730(param_1,1);
  FUN_14013b730(param_1,2);
  FUN_14013b730(param_1,3);
                    // WARNING: Could not recover jumptable at 0x00014013b722. Too many branches
                    // WARNING: Treating indirect jump as call
  wprintf(L"\n------------------------------------------------------------------------------\n");
  return;
}



void FUN_14013b730(longlong param_1,uint param_2)

{
  int iVar1;
  longlong *plVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  longlong lVar6;
  ulonglong uVar7;
  
  uVar3 = 0;
  iVar1 = (int)(*(longlong *)(param_1 + 0x18) - *(longlong *)(param_1 + 0x10) >> 3);
  if (0 < iVar1) {
    plVar2 = *(longlong **)(param_1 + 0x10);
    uVar4 = uVar3;
    uVar5 = uVar3;
    lVar6 = (longlong)iVar1;
    uVar7 = uVar3;
    do {
      if ((*plVar2 != 0) && (*(byte *)(*plVar2 + 0x40) == param_2)) {
        uVar5 = (ulonglong)((int)uVar5 + 1);
        uVar7 = uVar4;
      }
      uVar4 = (ulonglong)((int)uVar4 + 1);
      plVar2 = plVar2 + 1;
      lVar6 = lVar6 + -1;
    } while (lVar6 != 0);
    if ((int)uVar5 != 0) {
      uVar4 = uVar3;
      if ((int)uVar5 < 2) {
        FUN_1401440a0((*(longlong **)(param_1 + 0x10))[(int)uVar7],0xffffffff);
      }
      else {
        do {
          if ((*(longlong *)(*(longlong *)(param_1 + 0x10) + uVar3 * 8) != 0) &&
             (lVar6 = *(longlong *)(*(longlong *)(param_1 + 0x10) + uVar3 * 8),
             *(byte *)(lVar6 + 0x40) == param_2)) {
            FUN_1401440a0(lVar6,uVar4);
            uVar4 = (ulonglong)((int)uVar4 + 1);
          }
          uVar3 = uVar3 + 1;
        } while ((longlong)uVar3 < (longlong)iVar1);
      }
    }
  }
  return;
}



void FUN_14013b810(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = param_1[1] - *param_1 >> 3;
  if (0x1ffffffffffffffe < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = param_1[2] - *param_1 >> 3;
  if (uVar2 < uVar3) {
    if (0x1fffffffffffffff - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_14013b8a0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_14013b8a0(param_1,uVar2);
  }
  return;
}



void FUN_14013b8a0(longlong *param_1,ulonglong param_2)

{
  void *pvVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined **local_20 [3];
  
  if (0x1fffffffffffffff < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)(param_1[2] - *param_1 >> 3) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 8);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    memmove(local_res10,(void *)*param_1,param_1[1] - *param_1 & 0xfffffffffffffff8);
    pvVar1 = (void *)*param_1;
    lVar2 = param_1[1];
    if (pvVar1 != (void *)0x0) {
      operator_delete(pvVar1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 8);
    param_1[1] = (longlong)(pcVar4 + (lVar2 - (longlong)pvVar1 >> 3) * 8);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



undefined8 * FUN_14013b9b0(undefined8 *param_1,uint param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  
  *param_1 = MagiBaseServerNetwork::vftable;
  puVar1 = (undefined8 *)param_1[1];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1,param_3,param_4,0xfffffffffffffffe);
  }
  param_1[1] = 0;
  FUN_14004f990(param_1 + 2);
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14013ba20(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  
  *param_1 = MagiBaseServerNetwork::vftable;
  puVar1 = (undefined8 *)param_1[1];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1,param_3,param_4,0xfffffffffffffffe);
  }
  param_1[1] = 0;
  FUN_14004f990(param_1 + 2);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x00014013bdf0)
// WARNING: Removing unreachable block (ram,0x00014013bdf7)
// WARNING: Removing unreachable block (ram,0x00014013be10)
// WARNING: Removing unreachable block (ram,0x00014013be1c)
// WARNING: Removing unreachable block (ram,0x00014013be14)
// WARNING: Removing unreachable block (ram,0x00014013be22)
// WARNING: Removing unreachable block (ram,0x00014013be34)
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_14013ba70(longlong param_1)

{
  int *piVar1;
  longlong *plVar2;
  longlong lVar3;
  undefined8 uVar4;
  undefined8 *puVar5;
  undefined *puVar6;
  undefined4 *puVar7;
  int iVar8;
  undefined4 *puVar9;
  undefined *puVar10;
  undefined4 *puVar11;
  longlong lVar12;
  int iVar13;
  undefined4 *puVar14;
  undefined1 auStack_178 [32];
  longlong local_158;
  undefined8 local_150;
  undefined1 local_148;
  longlong local_140;
  undefined1 local_138;
  undefined8 local_128;
  undefined **local_120;
  longlong *local_118;
  undefined4 *local_110;
  uint local_108;
  undefined4 uStack_104;
  undefined4 uStack_100;
  undefined4 local_fc;
  undefined *local_f8;
  undefined *local_f0;
  undefined4 local_e8;
  undefined **local_e0;
  longlong *local_d8;
  undefined4 *local_d0;
  int local_c8;
  undefined4 local_b8;
  undefined4 local_b4;
  undefined4 local_b0;
  undefined4 local_ac;
  undefined4 local_a8;
  undefined8 local_a4;
  undefined4 local_9c;
  undefined1 local_91;
  undefined1 local_80;
  undefined **local_70;
  longlong *local_68;
  longlong local_60;
  ulonglong local_38;
  
  local_128 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_178;
  (**(code **)(**(longlong **)(param_1 + 8) + 0x178))
            (*(longlong **)(param_1 + 8),0x406e000000000000);
  FUN_1401a4960(&local_f8);
  if (*(char *)(DAT_14032f260 + 0x151) == '\0') {
    if (local_f0 == (undefined *)0x0) {
      local_f0 = PTR_DAT_1403200a0;
    }
    if (*(undefined **)(param_1 + 0x10) == local_f0) goto LAB_14013bd08;
    uVar4 = FUN_1401568c0();
    local_150 = uVar4;
    FUN_140156b50(uVar4);
    puVar6 = local_f0;
    local_148 = 1;
    if (((local_f0 != (undefined *)0x0) && (local_f0 != PTR_DAT_1403200a0)) &&
       (puVar10 = local_f0 + -8, puVar10 != (undefined *)0x0)) {
      lVar3 = FUN_1401568c0();
      local_140 = lVar3;
      FUN_140156b50(lVar3);
      local_138 = 1;
      piVar1 = (int *)(puVar6 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar10);
      }
      FUN_140156be0(lVar3);
    }
    local_f0 = *(undefined **)(param_1 + 0x10);
    if (((local_f0 != PTR_DAT_1403200a0) && (local_f0 != (undefined *)0x0)) &&
       (local_f0 != (undefined *)0x8)) {
      *(int *)(local_f0 + -4) = *(int *)(local_f0 + -4) + 1;
    }
  }
  else {
    if (local_f8 == (undefined *)0x0) {
      local_f8 = PTR_DAT_1403200a0;
    }
    if (*(undefined **)(param_1 + 0x10) != local_f8) {
      lVar3 = FUN_1401568c0();
      local_140 = lVar3;
      FUN_140156b50(lVar3);
      puVar6 = local_f8;
      local_138 = 1;
      if (((local_f8 != (undefined *)0x0) && (local_f8 != PTR_DAT_1403200a0)) &&
         (puVar10 = local_f8 + -8, puVar10 != (undefined *)0x0)) {
        uVar4 = FUN_1401568c0();
        local_150 = uVar4;
        FUN_140156b50(uVar4);
        local_148 = 1;
        piVar1 = (int *)(puVar6 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar10);
        }
        FUN_140156be0(uVar4);
      }
      local_f8 = *(undefined **)(param_1 + 0x10);
      if (((local_f8 != PTR_DAT_1403200a0) && (local_f8 != (undefined *)0x0)) &&
         (local_f8 != (undefined *)0x8)) {
        *(int *)(local_f8 + -4) = *(int *)(local_f8 + -4) + 1;
      }
      FUN_140156be0(lVar3);
    }
    puVar6 = *(undefined **)(param_1 + 0x10);
    if (*(undefined **)(param_1 + 0x10) == (undefined *)0x0) {
      puVar6 = PTR_DAT_1403200a0;
    }
    puVar5 = (undefined8 *)FUN_1401407f0(&local_120,puVar6);
    if (7 < (ulonglong)puVar5[3]) {
      puVar5 = (undefined8 *)*puVar5;
    }
    FUN_14004ce80(&local_f0,puVar5);
    if (7 < CONCAT44(uStack_104,local_108)) {
      operator_delete(local_120);
    }
    puVar6 = *(undefined **)(param_1 + 0x10);
    if (*(undefined **)(param_1 + 0x10) == (undefined *)0x0) {
      puVar6 = PTR_DAT_1403200a0;
    }
    *(undefined **)(param_1 + 0x10) = puVar6;
    if (local_f8 == puVar6) goto LAB_14013bd08;
    uVar4 = FUN_1401568c0();
    local_150 = uVar4;
    FUN_140156b50(uVar4);
    local_148 = 1;
    FUN_14004f990(param_1 + 0x10);
    *(undefined **)(param_1 + 0x10) = local_f8;
    if (((local_f8 != PTR_DAT_1403200a0) && (local_f8 != (undefined *)0x0)) &&
       (local_f8 != (undefined *)0x8)) {
      *(int *)(local_f8 + -4) = *(int *)(local_f8 + -4) + 1;
    }
  }
  FUN_140156be0(uVar4);
LAB_14013bd08:
  local_e8 = *(undefined4 *)(param_1 + 0x18);
  local_b4 = DAT_14032f190;
  local_b0 = _DAT_14032f194;
  local_ac = _DAT_14032f198;
  local_a8 = _DAT_14032f19c;
  local_80 = 0;
  local_9c = 0x80;
  puVar14 = (undefined4 *)0x0;
  local_a4 = 0;
  local_91 = 1;
  iVar13 = *(int *)(param_1 + 0x1c);
  if ((iVar13 < 1) || (*(int *)(param_1 + 0x20) < 1)) {
    (**(code **)(**(longlong **)(param_1 + 8) + 0x180))(*(longlong **)(param_1 + 8),2);
  }
  else {
    local_120 = Proud::CFastArray<int,0>::vftable;
    local_118 = (longlong *)0x0;
    local_fc = 0;
    local_110 = (undefined4 *)0x0;
    local_108 = 0;
    uStack_104 = 0;
    uStack_100 = 0;
    local_b8 = 1;
    puVar9 = puVar14;
    if (iVar13 < *(int *)(param_1 + 0x20) + iVar13) {
      do {
        iVar8 = (int)puVar9;
        if (iVar8 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        FUN_14013c2c0(&local_120,iVar8 + 1);
        puVar9 = (undefined4 *)(ulonglong)local_108;
        puVar7 = local_110;
        if (local_108 == 0) {
          puVar7 = puVar14;
        }
        puVar7[iVar8] = iVar13;
        iVar13 = iVar13 + 1;
      } while (iVar13 < *(int *)(param_1 + 0x20) + *(int *)(param_1 + 0x1c));
      if ((int)local_108 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
    }
    puVar7 = local_110;
    plVar2 = local_118;
    iVar13 = (int)puVar9;
    FUN_14013c2c0(&local_e0,puVar9);
    puVar9 = local_d0;
    if (local_c8 == 0) {
      puVar9 = puVar14;
    }
    puVar11 = puVar7;
    if (iVar13 == 0) {
      puVar11 = puVar14;
    }
    lVar3 = (longlong)iVar13;
    if (0 < iVar13) {
      lVar12 = (longlong)puVar11 - (longlong)puVar9;
      do {
        *puVar9 = *(undefined4 *)(lVar12 + (longlong)puVar9);
        puVar9 = puVar9 + 1;
        lVar3 = lVar3 + -1;
      } while (lVar3 != 0);
    }
    if (puVar7 != (undefined4 *)0x0) {
      if (plVar2 == (longlong *)0x0) {
        FUN_140156970(puVar7);
      }
      else {
        (**(code **)(*plVar2 + 0x18))(plVar2,puVar7);
      }
    }
  }
  local_158 = 0;
  (**(code **)(**(longlong **)(param_1 + 8) + 0x138))
            (*(longlong **)(param_1 + 8),&local_f8,&local_158);
  puVar6 = local_f0;
  if (local_f0 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  FUN_140148900(L"Server Start : ADDRESS[%s] PORT[%d]",puVar6,local_e8);
  lVar3 = local_158;
  if (local_158 != 0) {
    local_140 = local_158;
    FUN_140156b50(local_158);
    local_138 = 1;
    *(longlong *)(local_158 + 0x40) = *(longlong *)(local_158 + 0x40) + -1;
    if (*(longlong *)(local_158 + 0x40) == 0) {
      FUN_140156be0(lVar3);
      local_138 = 0;
      FUN_14013c4c0(local_158);
    }
    else {
      FUN_140156be0(lVar3);
    }
  }
  local_70 = Proud::CFastArray<int,0>::vftable;
  if (local_60 != 0) {
    if (local_68 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*local_68 + 0x18))(local_68,local_60);
    }
  }
  local_e0 = Proud::CFastArray<int,0>::vftable;
  if (local_d0 != (undefined4 *)0x0) {
    if (local_d8 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*local_d8 + 0x18))(local_d8,local_d0);
    }
  }
  FUN_14004f990(&local_f0);
  puVar6 = local_f8;
  if (((local_f8 != (undefined *)0x0) && (local_f8 != PTR_DAT_1403200a0)) &&
     (puVar10 = local_f8 + -8, puVar10 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    local_150 = uVar4;
    FUN_140156b50(uVar4);
    local_148 = 1;
    piVar1 = (int *)(puVar6 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar10);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



void FUN_14013c0b0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  
  *(undefined ***)(param_1 + 0x88) = Proud::CFastArray<int,0>::vftable;
  if (*(longlong *)(param_1 + 0x98) != 0) {
    plVar1 = *(longlong **)(param_1 + 0x90);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))
                (plVar1,*(longlong *)(param_1 + 0x98),plVar1,param_4,0xfffffffffffffffe);
    }
  }
  *(undefined ***)(param_1 + 0x18) = Proud::CFastArray<int,0>::vftable;
  if (*(longlong *)(param_1 + 0x28) != 0) {
    plVar1 = *(longlong **)(param_1 + 0x20);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,*(longlong *)(param_1 + 0x28));
    }
  }
  FUN_14004f990(param_1 + 8);
  FUN_14004f990(param_1);
  return;
}



void FUN_14013c150(longlong param_1,longlong param_2)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  longlong lVar4;
  undefined4 *puVar5;
  
  iVar1 = *(int *)(param_1 + 0x18);
  lVar4 = (longlong)iVar1;
  if (-1 < iVar1) {
    FUN_14013c2c0(param_2,iVar1);
    puVar5 = (undefined4 *)0x0;
    puVar2 = puVar5;
    if (*(int *)(param_2 + 0x18) != 0) {
      puVar2 = *(undefined4 **)(param_2 + 0x10);
    }
    if (*(int *)(param_1 + 0x18) != 0) {
      puVar5 = *(undefined4 **)(param_1 + 0x10);
    }
    if (0 < iVar1) {
      puVar3 = puVar2;
      do {
        lVar4 = lVar4 + -1;
        *puVar3 = *(undefined4 *)(((longlong)puVar5 - (longlong)puVar2) + (longlong)puVar3);
        puVar3 = puVar3 + 1;
      } while (lVar4 != 0);
    }
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_14013c1d0(longlong param_1,int param_2,longlong param_3,int param_4)

{
  undefined4 *puVar1;
  longlong lVar2;
  longlong lVar3;
  int iVar4;
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lVar8;
  
  lVar8 = (longlong)param_4;
  lVar6 = (longlong)param_2;
  if (((-1 < param_4) && (-1 < param_2)) && (param_2 <= *(int *)(param_1 + 0x18))) {
    iVar4 = *(int *)(param_1 + 0x18);
    FUN_14013c2c0(param_1,iVar4 + param_4);
    iVar4 = iVar4 - param_2;
    if ((0 < iVar4) && (iVar4 = iVar4 + -1, lVar5 = (longlong)iVar4, -1 < iVar4)) {
      lVar7 = (lVar8 + lVar6 + lVar5) * 4;
      do {
        lVar2 = FUN_140146330(param_1);
        lVar3 = FUN_140146330(param_1);
        *(undefined4 *)(lVar3 + lVar7) = *(undefined4 *)(lVar2 + lVar8 * -4 + lVar7);
        lVar7 = lVar7 + -4;
        lVar5 = lVar5 + -1;
      } while (-1 < lVar5);
    }
    if (0 < param_4) {
      lVar5 = lVar6 * 4;
      do {
        lVar7 = FUN_140146330(param_1);
        puVar1 = (undefined4 *)(lVar5 + param_3 + lVar6 * -4);
        lVar5 = lVar5 + 4;
        lVar8 = lVar8 + -1;
        *(undefined4 *)(lVar7 + -4 + lVar5) = *puVar1;
      } while (lVar8 != 0);
    }
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_14013c2c0(longlong param_1,int param_2)

{
  int iVar1;
  longlong *plVar2;
  longlong lVar3;
  int iVar4;
  undefined8 uVar5;
  undefined4 *puVar6;
  undefined4 *puVar7;
  int iVar8;
  longlong lVar9;
  undefined1 local_58 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 != *(int *)(param_1 + 0x18)) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar4 = FUN_14013c410();
      plVar2 = *(longlong **)(param_1 + 8);
      lVar9 = (longlong)iVar4;
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar2 == (longlong *)0x0) {
          uVar5 = FUN_140156940(lVar9 << 2);
          *(undefined8 *)(param_1 + 0x10) = uVar5;
        }
        else {
          uVar5 = (**(code **)(*plVar2 + 8))(plVar2,lVar9 << 2);
          *(undefined8 *)(param_1 + 0x10) = uVar5;
        }
      }
      else {
        lVar3 = *(longlong *)(param_1 + 0x10);
        if (plVar2 == (longlong *)0x0) {
          puVar6 = (undefined4 *)FUN_140156940(lVar9 << 2);
        }
        else {
          puVar6 = (undefined4 *)(**(code **)(*plVar2 + 8))();
        }
        iVar1 = *(int *)(param_1 + 0x18);
        iVar8 = 0;
        if (0 < iVar1) {
          puVar7 = puVar6;
          do {
            if (puVar7 != (undefined4 *)0x0) {
              *puVar7 = *(undefined4 *)((lVar3 - (longlong)puVar6) + (longlong)puVar7);
            }
            iVar8 = iVar8 + 1;
            puVar7 = puVar7 + 1;
          } while (iVar8 < iVar1);
        }
        if (puVar6 == (undefined4 *)0x0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
        plVar2 = *(longlong **)(param_1 + 8);
        if (plVar2 == (longlong *)0x0) {
          FUN_140156970(lVar3);
        }
        else {
          (**(code **)(*plVar2 + 0x18))(plVar2,lVar3);
        }
        *(undefined4 **)(param_1 + 0x10) = puVar6;
      }
      *(int *)(param_1 + 0x1c) = iVar4;
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



int FUN_14013c410(longlong param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  int iVar4;
  
  iVar4 = *(int *)(param_1 + 0x24);
  if (iVar4 == 0) {
    iVar2 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
    iVar4 = 0x400;
    if (iVar2 < 0x400) {
      iVar4 = iVar2;
    }
    iVar2 = 4;
    if (4 < iVar4) {
      iVar2 = iVar4;
    }
    iVar4 = iVar2 + param_2;
    if (iVar2 + param_2 < *(int *)(param_1 + 0x20)) {
      iVar4 = *(int *)(param_1 + 0x20);
    }
    return iVar4;
  }
  if (iVar4 != 1) {
    if (iVar4 != 2) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (param_2 < *(int *)(param_1 + 0x20)) {
      param_2 = *(int *)(param_1 + 0x20);
    }
    return param_2;
  }
  uVar1 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
  uVar3 = 0x10;
  if (0x10 < (int)uVar1) {
    uVar3 = uVar1;
  }
  if (uVar3 < 0x11) {
    uVar3 = 0x10;
  }
  iVar4 = uVar3 + param_2;
  if ((int)(uVar3 + param_2) < *(int *)(param_1 + 0x20)) {
    iVar4 = *(int *)(param_1 + 0x20);
  }
  return iVar4;
}



void thunk_FUN_140156970(LPVOID param_1)

{
  HANDLE hHeap;
  
  hHeap = GetProcessHeap();
                    // WARNING: Could not recover jumptable at 0x00014015698c. Too many branches
                    // WARNING: Treating indirect jump as call
  HeapFree(hHeap,0,param_1);
  return;
}



void FUN_14013c4c0(longlong param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(param_1 + 0x38);
  if (lVar1 != 0) {
    FUN_14004f990(lVar1 + 0x58);
    FUN_1401858d0(lVar1 + 0x28);
    FUN_14004f990(lVar1 + 0x10);
    FUN_140156970(lVar1);
  }
  FUN_140156c00(param_1);
  FUN_140156970(param_1);
  return;
}



void FUN_14013c530(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  if (lVar1 != 0) {
    FUN_140156b50(lVar1);
    *(longlong *)(*param_1 + 0x40) = *(longlong *)(*param_1 + 0x40) + -1;
    if (*(longlong *)(*param_1 + 0x40) == 0) {
      FUN_140156be0(lVar1);
      FUN_14013c4c0(*param_1);
    }
    else {
      FUN_140156be0(lVar1);
    }
  }
  return;
}



longlong * FUN_14013c5b0(longlong *param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  longlong lVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  if (param_2 == 0) {
    *param_1 = 0;
  }
  else {
    lVar2 = FUN_140156940(0x48);
    if (lVar2 != 0) {
      uVar1 = FUN_14015a430();
      FUN_140156a70(lVar2,uVar1,1,param_4,uVar3);
    }
    *param_1 = lVar2;
    FUN_140156b50(lVar2);
    *(undefined8 *)(*param_1 + 0x40) = 1;
    *(longlong *)(*param_1 + 0x38) = param_2;
    FUN_140156be0(lVar2);
  }
  return param_1;
}



undefined8 * FUN_14013c650(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<int,0>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14013c6b0(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<int,0>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014013c6d7. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



void FUN_14013c6f0(longlong param_1)

{
  longlong *plVar1;
  char *_Str;
  uint uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  if (param_1 != 0) {
    plVar1 = *(longlong **)(param_1 + 0x18);
    uVar3 = 0;
    uVar4 = uVar3;
    if (*plVar1 != 0) {
      do {
        _Str = (char *)Ordinal_12(*(undefined4 *)*plVar1);
        puts(_Str);
        uVar4 = uVar4 + 1;
        plVar1 = (longlong *)(*(longlong *)(param_1 + 0x18) + uVar4 * 8);
        uVar2 = (int)uVar3 + 1;
        uVar3 = (ulonglong)uVar2;
      } while (*plVar1 != 0);
      if (1 < (int)uVar2) {
        puts("!!! DNS to Multi !!!");
      }
    }
  }
  return;
}



byte * FUN_14013c760(wchar_t *param_1,undefined4 *param_2)

{
  __uint64 _ElementSize;
  char cVar1;
  byte *_DstBuf;
  byte *pbVar2;
  ulonglong uVar3;
  undefined **local_40;
  __uint64 local_38;
  undefined4 local_30;
  FILE *local_28 [2];
  
  uVar3 = 0;
  *param_2 = 0;
  local_38 = 0;
  local_30 = 0;
  local_40 = MagiFileStream::vftable;
  local_28[0] = (FILE *)0x0;
  _wfopen_s(local_28,param_1,L"rb");
  if (local_28[0] != (FILE *)0x0) {
    _fseeki64(local_28[0],0,2);
    local_38 = _ftelli64(local_28[0]);
    _fseeki64(local_28[0],0,0);
  }
  (*(code *)local_40[7])(&local_40);
  if (local_28[0] == (FILE *)0x0) {
    local_40 = MagiFileStream::vftable;
    cVar1 = FUN_140148100(&local_40);
    if (cVar1 != '\0') {
      fclose(local_28[0]);
    }
    _DstBuf = (byte *)0x0;
  }
  else {
    if (local_38 == 0) {
      _fseeki64(local_28[0],0,2);
      local_38 = _ftelli64(local_28[0]);
      _fseeki64(local_28[0],0,0);
    }
    _ElementSize = local_38;
    _DstBuf = operator_new(local_38);
    fread(_DstBuf,_ElementSize,1,local_28[0]);
    pbVar2 = _DstBuf;
    if (_ElementSize != 0) {
      do {
        *pbVar2 = *pbVar2 ^ (&DAT_140286700)[uVar3 & 0xff];
        uVar3 = (ulonglong)((int)uVar3 + 1);
        pbVar2 = pbVar2 + 1;
      } while (uVar3 < _ElementSize);
    }
    *param_2 = (int)_ElementSize;
    local_40 = MagiFileStream::vftable;
    cVar1 = FUN_140148100(&local_40);
    if (cVar1 != '\0') {
      fclose(local_28[0]);
    }
  }
  return _DstBuf;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_14013c8f0(undefined8 *param_1)

{
  short sVar1;
  uint uVar2;
  ulonglong uVar3;
  undefined *puVar4;
  short *psVar5;
  longlong *plVar6;
  undefined1 auStack_1e8 [32];
  undefined **local_1c8;
  longlong *local_1c0;
  longlong *local_1b8;
  undefined8 local_1b0;
  undefined8 local_1a8;
  undefined8 *local_1a0;
  undefined8 local_198;
  undefined2 local_190;
  undefined6 uStack_18e;
  undefined8 local_180;
  ulonglong local_178;
  undefined1 local_168;
  undefined8 local_158;
  undefined8 local_150;
  short *local_138;
  short local_130 [132];
  ulonglong local_28;
  
  local_198 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_1e8;
  *param_1 = MagiServerOption::vftable;
  param_1[4] = 7;
  param_1[3] = 0;
  *(undefined2 *)(param_1 + 1) = 0;
  param_1[9] = 7;
  param_1[8] = 0;
  *(undefined2 *)(param_1 + 6) = 0;
  param_1[0xe] = 7;
  param_1[0xd] = 0;
  *(undefined2 *)(param_1 + 0xb) = 0;
  param_1[0x10] = 0;
  *(undefined4 *)(param_1 + 0x11) = 0;
  *(undefined4 *)((longlong)param_1 + 0x8c) = 0x32;
  param_1[0x15] = 0xf;
  param_1[0x14] = 0;
  *(undefined1 *)(param_1 + 0x12) = 0;
  param_1[0x1a] = 0xf;
  param_1[0x19] = 0;
  *(undefined1 *)(param_1 + 0x17) = 0;
  param_1[0x1f] = 0xf;
  param_1[0x1e] = 0;
  *(undefined1 *)(param_1 + 0x1c) = 0;
  param_1[0x24] = 0xf;
  param_1[0x23] = 0;
  *(undefined1 *)(param_1 + 0x21) = 0;
  param_1[0x26] = 0;
  param_1[0x27] = 0;
  *(undefined4 *)(param_1 + 0x28) = 1;
  *(undefined4 *)((longlong)param_1 + 0x144) = 1;
  param_1[0x29] = 1;
  *(undefined2 *)(param_1 + 0x2a) = 0;
  *(undefined1 *)((longlong)param_1 + 0x152) = 0;
  *(undefined8 *)((longlong)param_1 + 0x154) = 0;
  *(undefined8 *)((longlong)param_1 + 0x15c) = 1;
  *(undefined2 *)((longlong)param_1 + 0x164) = 1;
  *(undefined1 *)((longlong)param_1 + 0x166) = 1;
  param_1[0x2d] = 0;
  *(undefined2 *)(param_1 + 0x2e) = 0;
  param_1[0x2f] = 0;
  *(undefined1 *)(param_1 + 0x30) = 1;
  param_1[0x31] = 0;
  param_1[0x32] = 0;
  param_1[0x33] = 0;
  local_1a0 = param_1;
  FUN_140141e80(param_1 + 0x35);
  *(undefined1 *)(param_1 + 0x3d) = 0;
  *(undefined4 *)((longlong)param_1 + 0x1ec) = 0;
  param_1[0x3e] = 0;
  local_1c8 = Proud::CFastArray<>::vftable;
  local_1c0 = (longlong *)0x0;
  local_1b8 = (longlong *)0x0;
  local_1b0 = 0;
  local_1a8 = 0;
  FUN_14015a130(&local_1c8);
  local_178 = 7;
  local_180 = 0;
  local_190 = 0;
  local_150 = 0xf;
  local_158 = 0;
  local_168 = 0;
  if (0 < (int)(uint)local_1b0) {
    puVar4 = (undefined *)*local_1b8;
    if ((undefined *)*local_1b8 == (undefined *)0x0) {
      puVar4 = PTR_DAT_140320098;
    }
    local_138 = local_130;
    FUN_140142dc0(&local_138,puVar4,3);
    uVar3 = 0xffffffffffffffff;
    psVar5 = local_138;
    do {
      if (uVar3 == 0) break;
      uVar3 = uVar3 - 1;
      sVar1 = *psVar5;
      psVar5 = psVar5 + 1;
    } while (sVar1 != 0);
    FUN_140056dd0(&local_190,local_138,~uVar3 - 1);
    if (local_138 != local_130) {
      free(local_138);
    }
  }
  uVar2 = (uint)local_1b0;
  if (7 < local_178) {
    operator_delete((void *)CONCAT62(uStack_18e,local_190));
    uVar2 = (uint)local_1b0;
  }
  local_178 = 7;
  local_180 = 0;
  local_190 = 0;
  local_1c8 = Proud::CFastArray<>::vftable;
  if (0 < (int)uVar2) {
    uVar3 = (ulonglong)uVar2;
    plVar6 = local_1b8;
    do {
      FUN_140050520(plVar6);
      plVar6 = plVar6 + 1;
      uVar3 = uVar3 - 1;
    } while (uVar3 != 0);
  }
  if (local_1b8 != (longlong *)0x0) {
    if (local_1c0 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*local_1c0 + 0x18))(local_1c0,local_1b8);
    }
  }
  return param_1;
}



void * FUN_14013cbf0(void *param_1,uint param_2)

{
  FUN_14013cc20();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14013cc20(undefined8 *param_1)

{
  *param_1 = MagiServerOption::vftable;
  if (param_1[0x35] != 0) {
    FUN_140141f20();
  }
  FUN_140141700(param_1 + 0x31);
  if (0xf < (ulonglong)param_1[0x24]) {
    operator_delete((void *)param_1[0x21]);
  }
  param_1[0x24] = 0xf;
  param_1[0x23] = 0;
  *(undefined1 *)(param_1 + 0x21) = 0;
  if (0xf < (ulonglong)param_1[0x1f]) {
    operator_delete((void *)param_1[0x1c]);
  }
  param_1[0x1f] = 0xf;
  param_1[0x1e] = 0;
  *(undefined1 *)(param_1 + 0x1c) = 0;
  if (0xf < (ulonglong)param_1[0x1a]) {
    operator_delete((void *)param_1[0x17]);
  }
  param_1[0x1a] = 0xf;
  param_1[0x19] = 0;
  *(undefined1 *)(param_1 + 0x17) = 0;
  if (0xf < (ulonglong)param_1[0x15]) {
    operator_delete((void *)param_1[0x12]);
  }
  param_1[0x15] = 0xf;
  param_1[0x14] = 0;
  *(undefined1 *)(param_1 + 0x12) = 0;
  if (7 < (ulonglong)param_1[0xe]) {
    operator_delete((void *)param_1[0xb]);
  }
  param_1[0xe] = 7;
  param_1[0xd] = 0;
  *(undefined2 *)(param_1 + 0xb) = 0;
  if (7 < (ulonglong)param_1[9]) {
    operator_delete((void *)param_1[6]);
  }
  param_1[9] = 7;
  param_1[8] = 0;
  *(undefined2 *)(param_1 + 6) = 0;
  if (7 < (ulonglong)param_1[4]) {
    operator_delete((void *)param_1[1]);
  }
  param_1[4] = 7;
  param_1[3] = 0;
  *(undefined2 *)(param_1 + 1) = 0;
  DAT_14032f260 = 0;
  *param_1 = MBISingleton<>::vftable;
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_14013cda0(longlong param_1,ushort *param_2)

{
  char cVar1;
  ushort uVar2;
  byte bVar3;
  DWORD DVar4;
  errno_t eVar5;
  int iVar6;
  char *pcVar7;
  ulonglong uVar8;
  ushort *puVar9;
  char *pcVar10;
  undefined1 auStack_f8 [32];
  undefined8 local_d8;
  undefined4 local_d0;
  __time64_t local_c8 [2];
  short local_b8;
  short local_b6;
  undefined2 local_b4;
  undefined2 local_b2;
  undefined2 local_b0;
  undefined2 local_ae;
  undefined2 local_ac;
  undefined2 local_aa;
  tm local_a8;
  char local_80;
  undefined7 uStack_7f;
  undefined8 local_70;
  ulonglong local_68;
  undefined8 local_58;
  undefined8 local_50;
  undefined1 local_48;
  undefined7 uStack_47;
  undefined8 local_38;
  ulonglong local_30;
  ulonglong local_20;
  
  local_c8[1] = 0xfffffffffffffffe;
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_f8;
  DVar4 = GetCurrentProcessId();
  *(DWORD *)(param_1 + 0x1ec) = DVar4;
  local_c8[0] = _time64((__time64_t *)0x0);
  local_d8 = 0;
  local_d0 = 0;
  eVar5 = _localtime64_s(&local_a8,local_c8);
  if (eVar5 == 0) {
    local_b8 = (short)local_a8.tm_year + 0x76c;
    local_b6 = (short)local_a8.tm_mon + 1;
    local_b4 = (undefined2)local_a8.tm_wday;
    local_b2 = (undefined2)local_a8.tm_mday;
    local_b0 = (undefined2)local_a8.tm_hour;
    local_ae = (undefined2)local_a8.tm_min;
    local_ac = (undefined2)local_a8.tm_sec;
    local_aa = 0;
    iVar6 = Ordinal_184(&local_b8,&local_d8);
    local_58 = 0;
    local_50 = 0;
    if (iVar6 != 0) {
      Ordinal_185(local_d8,&local_58);
    }
  }
  *(undefined8 *)(param_1 + 0x1f0) = local_d8;
  if ((*param_2 < 0x30) || (0x39 < *param_2)) {
    uVar8 = FUN_14013e360(param_1,param_2);
  }
  else {
    wprintf(L"\t-AGNET MODE-\t \n");
    local_a8.tm_wday = 7;
    local_a8.tm_yday = 0;
    local_a8.tm_mon = 0;
    local_a8.tm_year = 0;
    local_a8.tm_sec._0_2_ = 0;
    uVar8 = 0xffffffffffffffff;
    puVar9 = param_2;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      uVar2 = *puVar9;
      puVar9 = puVar9 + 1;
    } while (uVar2 != 0);
    FUN_140056dd0(&local_a8,param_2,~uVar8 - 1);
    pcVar7 = (char *)FUN_1402025b0(&local_48,&local_a8);
    if (0xf < *(ulonglong *)(pcVar7 + 0x18)) {
      pcVar7 = *(char **)pcVar7;
    }
    local_68 = 0xf;
    local_70 = 0;
    local_80 = '\0';
    uVar8 = 0xffffffffffffffff;
    pcVar10 = pcVar7;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar1 = *pcVar10;
      pcVar10 = pcVar10 + 1;
    } while (cVar1 != '\0');
    FUN_14004d4d0(&local_80,pcVar7,~uVar8 - 1);
    if (0xf < local_30) {
      operator_delete((void *)CONCAT71(uStack_47,local_48));
    }
    local_30 = 0xf;
    local_38 = 0;
    local_48 = 0;
    if (7 < (ulonglong)local_a8._24_8_) {
      operator_delete((void *)CONCAT26(local_a8.tm_min._2_2_,
                                       CONCAT24((undefined2)local_a8.tm_min,
                                                CONCAT22(local_a8.tm_sec._2_2_,
                                                         (undefined2)local_a8.tm_sec))));
    }
    local_a8.tm_wday = 7;
    local_a8.tm_yday = 0;
    local_a8.tm_mon = 0;
    local_a8.tm_year = 0;
    local_a8.tm_sec._0_2_ = 0;
    pcVar7 = &local_80;
    if (0xf < local_68) {
      pcVar7 = (char *)CONCAT71(uStack_7f,local_80);
    }
    iVar6 = atoi(pcVar7);
    bVar3 = FUN_14013d560(param_1,iVar6);
    if (0xf < local_68) {
      operator_delete((void *)CONCAT71(uStack_7f,local_80));
    }
    uVar8 = (ulonglong)bVar3;
  }
  return uVar8;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

undefined8 FUN_14013cfe0(longlong param_1,undefined4 *param_2)

{
  longlong *plVar1;
  char cVar2;
  int iVar3;
  void *pvVar4;
  longlong lVar5;
  ulonglong uVar6;
  undefined8 *puVar7;
  longlong lVar8;
  longlong lVar9;
  undefined1 *puVar10;
  char *pcVar11;
  longlong *plVar12;
  char *pcVar13;
  bool bVar14;
  undefined1 auStack_128 [32];
  undefined4 local_108 [4];
  undefined **local_f8;
  undefined8 local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined4 local_d8;
  longlong *local_d0;
  undefined8 local_c8;
  undefined8 *local_c0;
  void *local_b8;
  undefined8 local_b0;
  undefined8 local_a8;
  undefined1 local_a0;
  undefined4 local_9c;
  undefined8 *local_98;
  void *local_90;
  undefined4 local_88;
  undefined8 local_84;
  undefined1 local_7c;
  undefined8 local_78;
  undefined1 local_70;
  undefined7 uStack_6f;
  undefined8 local_60;
  ulonglong local_58;
  ulonglong local_48;
  
  local_78 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_128;
  *(undefined4 *)(param_1 + 0x140) = *param_2;
  *(undefined1 *)(param_1 + 0x1e8) = *(undefined1 *)(param_2 + 3);
  FUN_140056b10(param_1 + 8,param_2 + 0x1e,0,0xffffffffffffffff);
  FUN_140056b10(param_1 + 0x30,param_2 + 10,0,0xffffffffffffffff);
  FUN_140056b10(param_1 + 0x58,param_2 + 0x14,0,0xffffffffffffffff);
  *(undefined4 *)(param_1 + 0x80) = param_2[4];
  *(undefined4 *)(param_1 + 0x84) = param_2[5];
  *(undefined4 *)(param_1 + 0x88) = param_2[6];
  *(undefined4 *)(param_1 + 0x8c) = param_2[7];
  pcVar11 = &DAT_140327900;
  if (0xf < DAT_140327918) {
    pcVar11 = _DAT_140327900;
  }
  local_58 = 0xf;
  lVar5 = 0;
  local_60 = 0;
  local_70 = 0;
  uVar6 = 0xffffffffffffffff;
  pcVar13 = pcVar11;
  do {
    if (uVar6 == 0) break;
    uVar6 = uVar6 - 1;
    cVar2 = *pcVar13;
    pcVar13 = pcVar13 + 1;
  } while (cVar2 != '\0');
  FUN_14004d4d0(&local_70,pcVar11,~uVar6 - 1);
  local_f0 = 0xffffffffffffffff;
  local_e8 = 0;
  local_c0 = &DAT_14032f048;
  local_e0 = 0;
  local_d8 = 0;
  local_d0 = (longlong *)0x0;
  local_c8 = 0;
  local_b0 = 0;
  local_a8 = 0;
  local_f8 = TiXmlDocument::vftable;
  local_98 = &DAT_14032f048;
  local_84 = 0xffffffffffffffff;
  local_88 = 4;
  local_7c = 0;
  local_a0 = 0;
  local_9c = 0;
  FUN_14014c3f0(&local_98,&DAT_140281f00,0);
  local_84 = 0;
  DAT_140325ab8 = 0;
  if ((DAT_14037923c & 1) == 0) {
    DAT_14037923c = DAT_14037923c | 1;
    FUN_1402053b0();
    atexit((_func_5014 *)&LAB_140257ca0);
  }
  if (DAT_140378fcc == '\0') {
    puVar10 = &local_70;
    if (0xf < local_58) {
      puVar10 = (undefined1 *)CONCAT71(uStack_6f,local_70);
    }
    cVar2 = FUN_14014a9e0(&local_f8,puVar10);
  }
  else {
    puVar7 = &DAT_1403278d8;
    if (7 < DAT_1403278f0) {
      puVar7 = DAT_1403278d8;
    }
    pvVar4 = (void *)FUN_14013c760(puVar7,local_108);
    if (pvVar4 == (void *)0x0) goto LAB_14013d1f4;
    cVar2 = FUN_14014b070(&local_f8,pvVar4,local_108[0]);
    operator_delete__(pvVar4);
  }
  plVar12 = local_d0;
  if (cVar2 == '\0') {
LAB_14013d1f4:
    puVar10 = &local_70;
    if (0xf < local_58) {
      puVar10 = (undefined1 *)CONCAT71(uStack_6f,local_70);
    }
    FUN_140148a40("Error File Name %s : %d - %s",puVar10,local_9c,local_98 + 2);
    local_f8 = TiXmlDocument::vftable;
    if (local_98 != &DAT_14032f048) {
      operator_delete__(local_90);
    }
    local_f8 = TiXmlNode::vftable;
    plVar12 = local_d0;
    while (plVar12 != (longlong *)0x0) {
      plVar1 = (longlong *)plVar12[10];
      (**(code **)*plVar12)(plVar12,1);
      plVar12 = plVar1;
    }
    if (local_c0 != &DAT_14032f048) {
      operator_delete__(local_b8);
    }
    local_f8 = TiXmlBase::vftable;
    if (0xf < local_58) {
      operator_delete((void *)CONCAT71(uStack_6f,local_70));
    }
    return 0;
  }
  for (; plVar12 != (longlong *)0x0; plVar12 = (longlong *)plVar12[10]) {
    bVar14 = (char *)(plVar12[7] + 0x10) == (char *)0x0;
    lVar8 = 3;
    pcVar11 = (char *)(plVar12[7] + 0x10);
    pcVar13 = "db";
    do {
      if (lVar8 == 0) break;
      lVar8 = lVar8 + -1;
      bVar14 = *pcVar11 == *pcVar13;
      pcVar11 = pcVar11 + 1;
      pcVar13 = pcVar13 + 1;
    } while (bVar14);
    if (bVar14) goto LAB_14013d2d3;
  }
LAB_14013d310:
  cVar2 = *(char *)(param_1 + 0x1e8);
  if (cVar2 == '\x05') {
    *(undefined4 *)(param_1 + 0x158) = 1;
  }
  else {
    if (cVar2 == '\f') {
      if (lVar5 == 0) goto LAB_14013d4b9;
      pcVar11 = "game";
    }
    else if (cVar2 == '\x11') {
      if (lVar5 == 0) goto LAB_14013d4b9;
      pcVar11 = "log";
    }
    else if (cVar2 == '\x12') {
      if (lVar5 == 0) goto LAB_14013d4b9;
      pcVar11 = "chat";
    }
    else {
      if ((cVar2 != '\x13') || (lVar5 == 0)) goto LAB_14013d4b9;
      pcVar11 = "emergency";
    }
    lVar5 = FUN_14014a040(lVar5,pcVar11);
    if (lVar5 != 0) {
      lVar8 = FUN_14014a040(lVar5,"db_account");
      if (lVar8 != 0) {
        FUN_1401401c0(param_1 + 0x90,param_1 + 0x130,lVar8);
      }
      lVar8 = FUN_14014a040(lVar5,&DAT_140292ff4);
      if (lVar8 != 0) {
        FUN_1401401c0(param_1 + 0xb8,param_1 + 0x134,lVar8);
      }
      lVar8 = FUN_14014a040(lVar5,"db_game");
      if (lVar8 != 0) {
        FUN_1401401c0(param_1 + 0xe0,param_1 + 0x138,lVar8);
      }
      lVar8 = FUN_14014a040(lVar5,"db_log");
      if (lVar8 != 0) {
        FUN_1401401c0(param_1 + 0x108,param_1 + 0x13c,lVar8);
      }
      lVar5 = FUN_14014a040(lVar5,"write_thread");
      if (lVar5 != 0) {
        for (lVar8 = *(longlong *)(lVar5 + 0xa0); lVar8 != lVar5 + 0x58;
            lVar8 = *(longlong *)(lVar8 + 0x48)) {
          pcVar11 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
          bVar14 = pcVar11 == (char *)0x0;
          lVar9 = 6;
          pcVar13 = "count";
          do {
            if (lVar9 == 0) break;
            lVar9 = lVar9 + -1;
            bVar14 = *pcVar11 == *pcVar13;
            pcVar11 = pcVar11 + 1;
            pcVar13 = pcVar13 + 1;
          } while (bVar14);
          if (bVar14) {
            pcVar11 = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
            if (pcVar11 != (char *)0x0) {
              iVar3 = atoi(pcVar11);
              *(int *)(param_1 + 0x14c) = iVar3;
            }
            break;
          }
        }
      }
    }
  }
LAB_14013d4b9:
  local_f8 = TiXmlDocument::vftable;
  if (local_98 != &DAT_14032f048) {
    operator_delete__(local_90);
  }
  local_f8 = TiXmlNode::vftable;
  plVar12 = local_d0;
  while (plVar12 != (longlong *)0x0) {
    plVar1 = (longlong *)plVar12[10];
    (**(code **)*plVar12)(plVar12,1);
    plVar12 = plVar1;
  }
  if (local_c0 != &DAT_14032f048) {
    operator_delete__(local_b8);
  }
  local_f8 = TiXmlBase::vftable;
  if (0xf < local_58) {
    operator_delete((void *)CONCAT71(uStack_6f,local_70));
  }
  return 1;
LAB_14013d2d3:
  while (lVar8 = (**(code **)(*plVar12 + 0x30))(plVar12), lVar8 == 0) {
    do {
      plVar12 = (longlong *)plVar12[10];
      if (plVar12 == (longlong *)0x0) goto LAB_14013d310;
      bVar14 = (char *)(plVar12[7] + 0x10) == (char *)0x0;
      lVar8 = 3;
      pcVar11 = (char *)(plVar12[7] + 0x10);
      pcVar13 = "db";
      do {
        if (lVar8 == 0) break;
        lVar8 = lVar8 + -1;
        bVar14 = *pcVar11 == *pcVar13;
        pcVar11 = pcVar11 + 1;
        pcVar13 = pcVar13 + 1;
      } while (bVar14);
    } while (!bVar14);
  }
  lVar5 = (**(code **)(*plVar12 + 0x30))(plVar12);
  goto LAB_14013d310;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

undefined8 FUN_14013d560(longlong param_1,int param_2)

{
  char cVar1;
  int iVar2;
  void *pvVar3;
  longlong lVar4;
  longlong lVar5;
  undefined8 **ppuVar6;
  longlong lVar7;
  longlong lVar8;
  undefined1 *puVar9;
  longlong *plVar10;
  longlong *plVar11;
  char *pcVar12;
  char *pcVar13;
  char *pcVar14;
  char *pcVar15;
  char *pcVar16;
  char *pcVar17;
  char *pcVar18;
  char *_Str;
  bool bVar19;
  undefined1 auStack_248 [32];
  basic_ios<> *local_228 [2];
  undefined **local_218;
  undefined8 local_210;
  undefined8 local_208;
  undefined8 local_200;
  undefined4 local_1f8;
  longlong *local_1f0;
  undefined8 local_1e8;
  undefined8 *local_1e0;
  void *local_1d8;
  undefined8 local_1d0;
  undefined8 local_1c8;
  undefined1 local_1c0;
  undefined4 local_1bc;
  undefined8 *local_1b8;
  void *local_1b0;
  undefined4 local_1a8;
  undefined8 local_1a4;
  undefined1 local_19c;
  undefined ***local_198;
  undefined8 local_190;
  longlong local_188;
  undefined **local_180 [4];
  undefined8 *local_160;
  undefined8 *local_158;
  undefined8 *local_138;
  undefined4 *local_120;
  undefined8 local_110;
  uint local_108;
  basic_ios<> local_100 [104];
  undefined1 local_98;
  undefined7 uStack_97;
  undefined8 local_88;
  ulonglong local_80;
  char local_70;
  undefined7 uStack_6f;
  undefined8 local_60;
  ulonglong local_58;
  ulonglong local_48;
  
  local_190 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_248;
  pcVar12 = &DAT_140327900;
  if (0xf < DAT_140327918) {
    pcVar12 = _DAT_140327900;
  }
  local_80 = 0xf;
  _Str = (char *)0x0;
  local_88 = 0;
  local_98 = 0;
  lVar5 = -1;
  do {
    if (lVar5 == 0) break;
    lVar5 = lVar5 + -1;
    cVar1 = *pcVar12;
    pcVar12 = pcVar12 + 1;
  } while (cVar1 != '\0');
  FUN_14004d4d0(&local_98);
  local_210 = 0xffffffffffffffff;
  local_208 = 0;
  local_1e0 = &DAT_14032f048;
  local_200 = 0;
  local_1f8 = 0;
  local_1f0 = (longlong *)0x0;
  local_1e8 = 0;
  local_1d0 = 0;
  local_1c8 = 0;
  local_218 = TiXmlDocument::vftable;
  local_1b8 = &DAT_14032f048;
  local_1a4 = 0xffffffffffffffff;
  local_1a8 = 4;
  local_19c = 0;
  local_1c0 = 0;
  local_1bc = 0;
  FUN_14014c3f0(&local_1b8,&DAT_140281f00);
  local_1a4 = 0;
  DAT_140325ab8 = 0;
  if ((DAT_14037923c & 1) == 0) {
    DAT_14037923c = DAT_14037923c | 1;
    FUN_1402053b0();
    atexit((_func_5014 *)&LAB_140257ca0);
  }
  if (DAT_140378fcc == '\0') {
    puVar9 = &local_98;
    if (0xf < local_80) {
      puVar9 = (undefined1 *)CONCAT71(uStack_97,local_98);
    }
    cVar1 = FUN_14014a9e0(&local_218,puVar9);
  }
  else {
    ppuVar6 = &DAT_1403278d8;
    if (7 < DAT_1403278f0) {
      ppuVar6 = (undefined8 **)DAT_1403278d8;
    }
    pvVar3 = (void *)FUN_14013c760(ppuVar6,local_228);
    if (pvVar3 == (void *)0x0) goto LAB_14013d718;
    cVar1 = FUN_14014b070(&local_218,pvVar3);
    operator_delete__(pvVar3);
  }
  if (cVar1 == '\0') {
LAB_14013d718:
    FUN_140148a40("Error : %d - %s",local_1bc,local_1b8 + 2);
    local_218 = TiXmlDocument::vftable;
    if (local_1b8 != &DAT_14032f048) {
      operator_delete__(local_1b0);
    }
    local_218 = TiXmlNode::vftable;
    plVar11 = local_1f0;
    while (plVar11 != (longlong *)0x0) {
      plVar10 = (longlong *)plVar11[10];
      (**(code **)*plVar11)(plVar11,1);
      plVar11 = plVar10;
    }
    if (local_1e0 != &DAT_14032f048) {
      operator_delete__(local_1d8);
    }
    local_218 = TiXmlBase::vftable;
    if (0xf < local_80) {
      operator_delete((void *)CONCAT71(uStack_97,local_98));
    }
    return 0;
  }
  if ((*(byte *)(param_1 + 0x1e8) < 0xd) ||
     (plVar11 = local_1f0, (byte)(*(byte *)(param_1 + 0x1e8) - 0x11) < 3)) {
    FUN_140140ae0(param_1);
    plVar11 = local_1f0;
  }
  for (; plVar11 != (longlong *)0x0; plVar11 = (longlong *)plVar11[10]) {
    bVar19 = (char *)(plVar11[7] + 0x10) == (char *)0x0;
    lVar5 = 0xd;
    pcVar12 = (char *)(plVar11[7] + 0x10);
    pcVar13 = "agentmanager";
    do {
      if (lVar5 == 0) break;
      lVar5 = lVar5 + -1;
      bVar19 = *pcVar12 == *pcVar13;
      pcVar12 = pcVar12 + 1;
      pcVar13 = pcVar13 + 1;
    } while (bVar19);
    if (bVar19) goto LAB_14013d803;
  }
LAB_14013d864:
  *(int *)(param_1 + 0x154) = param_2;
  *(undefined1 *)(param_1 + 0x150) = 1;
  FUN_140140e20(&local_188);
  std::basic_ostream<>::operator<<((basic_ostream<> *)&local_188,param_2);
  FUN_140140ec0(&local_188);
  for (plVar11 = local_1f0; plVar10 = local_1f0, plVar11 != (longlong *)0x0;
      plVar11 = (longlong *)plVar11[10]) {
    bVar19 = (char *)(plVar11[7] + 0x10) == (char *)0x0;
    lVar5 = 0xc;
    pcVar12 = (char *)(plVar11[7] + 0x10);
    pcVar13 = "each_option";
    do {
      if (lVar5 == 0) break;
      lVar5 = lVar5 + -1;
      bVar19 = *pcVar12 == *pcVar13;
      pcVar12 = pcVar12 + 1;
      pcVar13 = pcVar13 + 1;
    } while (bVar19);
    if (bVar19) goto LAB_14013d8d6;
  }
joined_r0x00014013da5b:
  do {
    plVar11 = local_1f0;
    if (plVar10 == (longlong *)0x0) goto joined_r0x00014013db27;
    bVar19 = (char *)(plVar10[7] + 0x10) == (char *)0x0;
    lVar5 = 4;
    pcVar12 = (char *)(plVar10[7] + 0x10);
    pcVar13 = "dns";
    do {
      if (lVar5 == 0) break;
      lVar5 = lVar5 + -1;
      bVar19 = *pcVar12 == *pcVar13;
      pcVar12 = pcVar12 + 1;
      pcVar13 = pcVar13 + 1;
    } while (bVar19);
    if (bVar19) goto LAB_14013da87;
    plVar10 = (longlong *)plVar10[10];
  } while( true );
LAB_14013d803:
  while (lVar5 = (**(code **)(*plVar11 + 0x30))(plVar11), lVar5 == 0) {
    do {
      plVar11 = (longlong *)plVar11[10];
      if (plVar11 == (longlong *)0x0) goto LAB_14013d864;
      bVar19 = (char *)(plVar11[7] + 0x10) == (char *)0x0;
      lVar5 = 0xd;
      pcVar12 = (char *)(plVar11[7] + 0x10);
      pcVar13 = "agentmanager";
      do {
        if (lVar5 == 0) break;
        lVar5 = lVar5 + -1;
        bVar19 = *pcVar12 == *pcVar13;
        pcVar12 = pcVar12 + 1;
        pcVar13 = pcVar13 + 1;
      } while (bVar19);
    } while (!bVar19);
  }
  lVar5 = (**(code **)(*plVar11 + 0x30))(plVar11);
  if ((lVar5 != 0) && (lVar5 = FUN_14014a040(lVar5,"server"), lVar5 != 0)) {
    FUN_1401402a0(param_1,lVar5);
  }
  goto LAB_14013d864;
LAB_14013d8d6:
  while (lVar5 = (**(code **)(*plVar11 + 0x30))(plVar11), lVar5 == 0) {
    do {
      plVar11 = (longlong *)plVar11[10];
      plVar10 = local_1f0;
      if (plVar11 == (longlong *)0x0) goto joined_r0x00014013da5b;
      bVar19 = (char *)(plVar11[7] + 0x10) == (char *)0x0;
      lVar5 = 0xc;
      pcVar12 = (char *)(plVar11[7] + 0x10);
      pcVar13 = "each_option";
      do {
        if (lVar5 == 0) break;
        lVar5 = lVar5 + -1;
        bVar19 = *pcVar12 == *pcVar13;
        pcVar12 = pcVar12 + 1;
        pcVar13 = pcVar13 + 1;
      } while (bVar19);
    } while (!bVar19);
  }
  lVar5 = (**(code **)(*plVar11 + 0x30))(plVar11);
  plVar10 = local_1f0;
  if (lVar5 != 0) {
    for (plVar11 = *(longlong **)(lVar5 + 0x28); pcVar12 = _Str, plVar11 != (longlong *)0x0;
        plVar11 = (longlong *)plVar11[10]) {
      lVar5 = (**(code **)(*plVar11 + 0x30))(plVar11);
      if (lVar5 != 0) {
        pcVar12 = (char *)(**(code **)(*plVar11 + 0x30))(plVar11);
        break;
      }
    }
joined_r0x00014013d953:
    plVar10 = local_1f0;
    if (pcVar12 != (char *)0x0) {
      pcVar13 = (char *)(*(longlong *)(pcVar12 + 0x38) + 0x10);
      if (pcVar13 != (char *)0x0) {
        for (pcVar14 = *(char **)(pcVar12 + 0xa0); pcVar14 != pcVar12 + 0x58;
            pcVar14 = *(char **)(pcVar14 + 0x48)) {
          bVar19 = (char *)(*(longlong *)(pcVar14 + 0x20) + 0x10) == (char *)0x0;
          lVar5 = 5;
          pcVar15 = (char *)(*(longlong *)(pcVar14 + 0x20) + 0x10);
          pcVar16 = "code";
          do {
            if (lVar5 == 0) break;
            lVar5 = lVar5 + -1;
            bVar19 = *pcVar15 == *pcVar16;
            pcVar15 = pcVar15 + 1;
            pcVar16 = pcVar16 + 1;
          } while (bVar19);
          if (bVar19) {
            if ((char *)(*(longlong *)(pcVar14 + 0x30) + 0x10) != (char *)0x0) {
              pcVar15 = &local_70;
              if (0xf < local_58) {
                pcVar15 = (char *)CONCAT71(uStack_6f,local_70);
              }
              iVar2 = _stricmp(pcVar15,(char *)(*(longlong *)(pcVar14 + 0x30) + 0x10));
              if (iVar2 == 0) {
                iVar2 = _stricmp(pcVar13,"guild");
                if (iVar2 == 0) {
                  *(undefined4 *)(param_1 + 0x158) = 1;
                }
                else {
                  iVar2 = _stricmp(pcVar13,"api");
                  if (iVar2 == 0) {
                    FUN_1401402a0(param_1);
                  }
                }
              }
            }
            break;
          }
        }
      }
      for (plVar11 = *(longlong **)(pcVar12 + 0x50); pcVar12 = _Str, plVar11 != (longlong *)0x0;
          plVar11 = (longlong *)plVar11[10]) {
        lVar5 = (**(code **)(*plVar11 + 0x30))(plVar11);
        if (lVar5 != 0) {
          pcVar12 = (char *)(**(code **)(*plVar11 + 0x30))(plVar11);
          break;
        }
      }
      goto joined_r0x00014013d953;
    }
  }
  goto joined_r0x00014013da5b;
LAB_14013da87:
  while (lVar5 = (**(code **)(*plVar10 + 0x30))(plVar10), lVar5 == 0) {
    do {
      plVar10 = (longlong *)plVar10[10];
      plVar11 = local_1f0;
      if (plVar10 == (longlong *)0x0) goto joined_r0x00014013db27;
      bVar19 = (char *)(plVar10[7] + 0x10) == (char *)0x0;
      lVar5 = 4;
      pcVar12 = (char *)(plVar10[7] + 0x10);
      pcVar13 = "dns";
      do {
        if (lVar5 == 0) break;
        lVar5 = lVar5 + -1;
        bVar19 = *pcVar12 == *pcVar13;
        pcVar12 = pcVar12 + 1;
        pcVar13 = pcVar13 + 1;
      } while (bVar19);
    } while (!bVar19);
  }
  lVar5 = (**(code **)(*plVar10 + 0x30))(plVar10);
  plVar11 = local_1f0;
  if (lVar5 != 0) {
    for (lVar8 = *(longlong *)(lVar5 + 0xa0); lVar8 != lVar5 + 0x58;
        lVar8 = *(longlong *)(lVar8 + 0x48)) {
      pcVar12 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
      bVar19 = pcVar12 == (char *)0x0;
      lVar4 = 4;
      pcVar13 = "dns";
      do {
        if (lVar4 == 0) break;
        lVar4 = lVar4 + -1;
        bVar19 = *pcVar12 == *pcVar13;
        pcVar12 = pcVar12 + 1;
        pcVar13 = pcVar13 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar12 = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
        if (pcVar12 != (char *)0x0) {
          iVar2 = atoi(pcVar12);
          *(bool *)(param_1 + 0x151) = 0 < iVar2;
          plVar11 = local_1f0;
        }
        break;
      }
    }
  }
joined_r0x00014013db27:
  do {
    plVar10 = local_1f0;
    if (plVar11 == (longlong *)0x0) goto joined_r0x00014013dbf7;
    bVar19 = (char *)(plVar11[7] + 0x10) == (char *)0x0;
    lVar5 = 0xb;
    pcVar12 = (char *)(plVar11[7] + 0x10);
    pcVar13 = "code_start";
    do {
      if (lVar5 == 0) break;
      lVar5 = lVar5 + -1;
      bVar19 = *pcVar12 == *pcVar13;
      pcVar12 = pcVar12 + 1;
      pcVar13 = pcVar13 + 1;
    } while (bVar19);
    if (bVar19) break;
    plVar11 = (longlong *)plVar11[10];
  } while( true );
  while (lVar5 = (**(code **)(*plVar11 + 0x30))(plVar11), lVar5 == 0) {
    do {
      plVar11 = (longlong *)plVar11[10];
      plVar10 = local_1f0;
      if (plVar11 == (longlong *)0x0) goto joined_r0x00014013dbf7;
      bVar19 = (char *)(plVar11[7] + 0x10) == (char *)0x0;
      lVar5 = 0xb;
      pcVar12 = (char *)(plVar11[7] + 0x10);
      pcVar13 = "code_start";
      do {
        if (lVar5 == 0) break;
        lVar5 = lVar5 + -1;
        bVar19 = *pcVar12 == *pcVar13;
        pcVar12 = pcVar12 + 1;
        pcVar13 = pcVar13 + 1;
      } while (bVar19);
    } while (!bVar19);
  }
  lVar5 = (**(code **)(*plVar11 + 0x30))(plVar11);
  plVar10 = local_1f0;
  if (lVar5 != 0) {
    for (lVar8 = *(longlong *)(lVar5 + 0xa0); lVar8 != lVar5 + 0x58;
        lVar8 = *(longlong *)(lVar8 + 0x48)) {
      pcVar12 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
      bVar19 = pcVar12 == (char *)0x0;
      lVar4 = 0xb;
      pcVar13 = "code_start";
      do {
        if (lVar4 == 0) break;
        lVar4 = lVar4 + -1;
        bVar19 = *pcVar12 == *pcVar13;
        pcVar12 = pcVar12 + 1;
        pcVar13 = pcVar13 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar12 = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
        if (pcVar12 != (char *)0x0) {
          iVar2 = atoi(pcVar12);
          *(bool *)(param_1 + 0x152) = 0 < iVar2;
          plVar10 = local_1f0;
        }
        break;
      }
    }
  }
joined_r0x00014013dbf7:
  do {
    if (plVar10 == (longlong *)0x0) goto LAB_14013de3c;
    bVar19 = (char *)(plVar10[7] + 0x10) == (char *)0x0;
    lVar5 = 8;
    pcVar12 = (char *)(plVar10[7] + 0x10);
    pcVar13 = "setting";
    do {
      if (lVar5 == 0) break;
      lVar5 = lVar5 + -1;
      bVar19 = *pcVar12 == *pcVar13;
      pcVar12 = pcVar12 + 1;
      pcVar13 = pcVar13 + 1;
    } while (bVar19);
    if (bVar19) break;
    plVar10 = (longlong *)plVar10[10];
  } while( true );
  while (lVar5 = (**(code **)(*plVar10 + 0x30))(plVar10), lVar5 == 0) {
    do {
      plVar10 = (longlong *)plVar10[10];
      if (plVar10 == (longlong *)0x0) goto LAB_14013de3c;
      bVar19 = (char *)(plVar10[7] + 0x10) == (char *)0x0;
      lVar5 = 8;
      pcVar12 = (char *)(plVar10[7] + 0x10);
      pcVar13 = "setting";
      do {
        if (lVar5 == 0) break;
        lVar5 = lVar5 + -1;
        bVar19 = *pcVar12 == *pcVar13;
        pcVar12 = pcVar12 + 1;
        pcVar13 = pcVar13 + 1;
      } while (bVar19);
    } while (!bVar19);
  }
  lVar5 = (**(code **)(*plVar10 + 0x30))(plVar10);
  if (lVar5 != 0) {
    lVar4 = lVar5 + 0x58;
    for (lVar8 = *(longlong *)(lVar5 + 0xa0); pcVar12 = _Str, lVar8 != lVar4;
        lVar8 = *(longlong *)(lVar8 + 0x48)) {
      pcVar12 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
      bVar19 = pcVar12 == (char *)0x0;
      lVar7 = 6;
      pcVar13 = "multi";
      do {
        if (lVar7 == 0) break;
        lVar7 = lVar7 + -1;
        bVar19 = *pcVar12 == *pcVar13;
        pcVar12 = pcVar12 + 1;
        pcVar13 = pcVar13 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar12 = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar8 = *(longlong *)(lVar5 + 0xa0); pcVar13 = _Str, lVar8 != lVar4;
        lVar8 = *(longlong *)(lVar8 + 0x48)) {
      pcVar13 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
      bVar19 = pcVar13 == (char *)0x0;
      lVar7 = 5;
      pcVar14 = "lock";
      do {
        if (lVar7 == 0) break;
        lVar7 = lVar7 + -1;
        bVar19 = *pcVar13 == *pcVar14;
        pcVar13 = pcVar13 + 1;
        pcVar14 = pcVar14 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar13 = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar8 = *(longlong *)(lVar5 + 0xa0); pcVar14 = _Str, lVar8 != lVar4;
        lVar8 = *(longlong *)(lVar8 + 0x48)) {
      pcVar14 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
      bVar19 = pcVar14 == (char *)0x0;
      lVar7 = 0xd;
      pcVar15 = "start_server";
      do {
        if (lVar7 == 0) break;
        lVar7 = lVar7 + -1;
        bVar19 = *pcVar14 == *pcVar15;
        pcVar14 = pcVar14 + 1;
        pcVar15 = pcVar15 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar14 = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar8 = *(longlong *)(lVar5 + 0xa0); pcVar15 = _Str, lVar8 != lVar4;
        lVar8 = *(longlong *)(lVar8 + 0x48)) {
      pcVar15 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
      bVar19 = pcVar15 == (char *)0x0;
      lVar7 = 0xe;
      pcVar16 = "revive_server";
      do {
        if (lVar7 == 0) break;
        lVar7 = lVar7 + -1;
        bVar19 = *pcVar15 == *pcVar16;
        pcVar15 = pcVar15 + 1;
        pcVar16 = pcVar16 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar15 = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar5 = *(longlong *)(lVar5 + 0xa0); pcVar16 = _Str, lVar5 != lVar4;
        lVar5 = *(longlong *)(lVar5 + 0x48)) {
      pcVar16 = (char *)(*(longlong *)(lVar5 + 0x20) + 0x10);
      bVar19 = pcVar16 == (char *)0x0;
      lVar8 = 0xd;
      pcVar17 = "open_channel";
      do {
        if (lVar8 == 0) break;
        lVar8 = lVar8 + -1;
        bVar19 = *pcVar16 == *pcVar17;
        pcVar16 = pcVar16 + 1;
        pcVar17 = pcVar17 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar16 = (char *)(*(longlong *)(lVar5 + 0x30) + 0x10);
        break;
      }
    }
    if (pcVar12 != (char *)0x0) {
      iVar2 = atoi(pcVar12);
      *(bool *)(param_1 + 0x166) = 0 < iVar2;
    }
    if (pcVar15 != (char *)0x0) {
      iVar2 = atoi(pcVar15);
      *(bool *)(param_1 + 0x171) = 0 < iVar2;
    }
    if (pcVar16 != (char *)0x0) {
      iVar2 = atoi(pcVar16);
      *(bool *)(param_1 + 0x170) = 0 < iVar2;
    }
    if (pcVar13 != (char *)0x0) {
      iVar2 = atoi(pcVar13);
      *(double *)(param_1 + 0x168) = (double)iVar2;
    }
    if (pcVar14 != (char *)0x0) {
      iVar2 = atoi(pcVar14);
      *(double *)(param_1 + 0x178) = (double)iVar2;
    }
  }
LAB_14013de3c:
  DAT_14032efe0 = 0;
  DAT_14032efe1 = 0;
  DAT_14032efe2 = 0;
  DAT_14032efe3 = 0;
  DAT_14032efe4 = 0;
  DAT_14032efe5 = 1;
  DAT_14032efe6 = 1;
  for (plVar11 = local_1f0; plVar11 != (longlong *)0x0; plVar11 = (longlong *)plVar11[10]) {
    bVar19 = (char *)(plVar11[7] + 0x10) == (char *)0x0;
    lVar5 = 8;
    pcVar12 = (char *)(plVar11[7] + 0x10);
    pcVar13 = "develop";
    do {
      if (lVar5 == 0) break;
      lVar5 = lVar5 + -1;
      bVar19 = *pcVar12 == *pcVar13;
      pcVar12 = pcVar12 + 1;
      pcVar13 = pcVar13 + 1;
    } while (bVar19);
    if (bVar19) goto LAB_14013dea6;
  }
  goto LAB_14013e153;
LAB_14013dea6:
  while (lVar5 = (**(code **)(*plVar11 + 0x30))(plVar11), lVar5 == 0) {
    do {
      plVar11 = (longlong *)plVar11[10];
      if (plVar11 == (longlong *)0x0) goto LAB_14013e153;
      bVar19 = (char *)(plVar11[7] + 0x10) == (char *)0x0;
      lVar5 = 8;
      pcVar12 = (char *)(plVar11[7] + 0x10);
      pcVar13 = "develop";
      do {
        if (lVar5 == 0) break;
        lVar5 = lVar5 + -1;
        bVar19 = *pcVar12 == *pcVar13;
        pcVar12 = pcVar12 + 1;
        pcVar13 = pcVar13 + 1;
      } while (bVar19);
    } while (!bVar19);
  }
  lVar5 = (**(code **)(*plVar11 + 0x30))(plVar11);
  if (lVar5 != 0) {
    lVar4 = lVar5 + 0x58;
    for (lVar8 = *(longlong *)(lVar5 + 0xa0); pcVar12 = _Str, lVar8 != lVar4;
        lVar8 = *(longlong *)(lVar8 + 0x48)) {
      pcVar12 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
      bVar19 = pcVar12 == (char *)0x0;
      lVar7 = 8;
      pcVar13 = "preload";
      do {
        if (lVar7 == 0) break;
        lVar7 = lVar7 + -1;
        bVar19 = *pcVar12 == *pcVar13;
        pcVar12 = pcVar12 + 1;
        pcVar13 = pcVar13 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar12 = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar8 = *(longlong *)(lVar5 + 0xa0); lVar8 != lVar4; lVar8 = *(longlong *)(lVar8 + 0x48)) {
      pcVar13 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
      bVar19 = pcVar13 == (char *)0x0;
      lVar7 = 0xd;
      pcVar14 = "preload_char";
      do {
        if (lVar7 == 0) break;
        lVar7 = lVar7 + -1;
        bVar19 = *pcVar13 == *pcVar14;
        pcVar13 = pcVar13 + 1;
        pcVar14 = pcVar14 + 1;
      } while (bVar19);
      if (bVar19) {
        _Str = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar8 = *(longlong *)(lVar5 + 0xa0); lVar8 != lVar4; lVar8 = *(longlong *)(lVar8 + 0x48)) {
      pcVar13 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
      bVar19 = pcVar13 == (char *)0x0;
      lVar7 = 0xc;
      pcVar14 = "enemy_debug";
      do {
        if (lVar7 == 0) break;
        lVar7 = lVar7 + -1;
        bVar19 = *pcVar13 == *pcVar14;
        pcVar13 = pcVar13 + 1;
        pcVar14 = pcVar14 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar13 = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
        goto LAB_14013dfb0;
      }
    }
    pcVar13 = (char *)0x0;
LAB_14013dfb0:
    for (lVar8 = *(longlong *)(lVar5 + 0xa0); lVar8 != lVar4; lVar8 = *(longlong *)(lVar8 + 0x48)) {
      pcVar14 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
      bVar19 = pcVar14 == (char *)0x0;
      lVar7 = 10;
      pcVar15 = "enemy_one";
      do {
        if (lVar7 == 0) break;
        lVar7 = lVar7 + -1;
        bVar19 = *pcVar14 == *pcVar15;
        pcVar14 = pcVar14 + 1;
        pcVar15 = pcVar15 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar14 = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
        goto LAB_14013dff0;
      }
    }
    pcVar14 = (char *)0x0;
LAB_14013dff0:
    for (lVar8 = *(longlong *)(lVar5 + 0xa0); lVar8 != lVar4; lVar8 = *(longlong *)(lVar8 + 0x48)) {
      pcVar15 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
      bVar19 = pcVar15 == (char *)0x0;
      lVar7 = 0xd;
      pcVar16 = "player_debug";
      do {
        if (lVar7 == 0) break;
        lVar7 = lVar7 + -1;
        bVar19 = *pcVar15 == *pcVar16;
        pcVar15 = pcVar15 + 1;
        pcVar16 = pcVar16 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar15 = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
        goto LAB_14013e030;
      }
    }
    pcVar15 = (char *)0x0;
LAB_14013e030:
    for (lVar8 = *(longlong *)(lVar5 + 0xa0); lVar8 != lVar4; lVar8 = *(longlong *)(lVar8 + 0x48)) {
      pcVar16 = (char *)(*(longlong *)(lVar8 + 0x20) + 0x10);
      bVar19 = pcVar16 == (char *)0x0;
      lVar7 = 9;
      pcVar17 = "lua_text";
      do {
        if (lVar7 == 0) break;
        lVar7 = lVar7 + -1;
        bVar19 = *pcVar16 == *pcVar17;
        pcVar16 = pcVar16 + 1;
        pcVar17 = pcVar17 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar16 = (char *)(*(longlong *)(lVar8 + 0x30) + 0x10);
        goto LAB_14013e06f;
      }
    }
    pcVar16 = (char *)0x0;
LAB_14013e06f:
    for (lVar5 = *(longlong *)(lVar5 + 0xa0); lVar5 != lVar4; lVar5 = *(longlong *)(lVar5 + 0x48)) {
      pcVar17 = (char *)(*(longlong *)(lVar5 + 0x20) + 0x10);
      bVar19 = pcVar17 == (char *)0x0;
      lVar8 = 9;
      pcVar18 = "lua_send";
      do {
        if (lVar8 == 0) break;
        lVar8 = lVar8 + -1;
        bVar19 = *pcVar17 == *pcVar18;
        pcVar17 = pcVar17 + 1;
        pcVar18 = pcVar18 + 1;
      } while (bVar19);
      if (bVar19) {
        pcVar17 = (char *)(*(longlong *)(lVar5 + 0x30) + 0x10);
        goto LAB_14013e0af;
      }
    }
    pcVar17 = (char *)0x0;
LAB_14013e0af:
    if (pcVar12 != (char *)0x0) {
      iVar2 = atoi(pcVar12);
      DAT_14032efe5 = 0 < iVar2;
    }
    if (_Str != (char *)0x0) {
      iVar2 = atoi(_Str);
      DAT_14032efe6 = 0 < iVar2;
    }
    if (pcVar14 != (char *)0x0) {
      iVar2 = atoi(pcVar14);
      DAT_14032efe1 = 0 < iVar2;
    }
    if (pcVar13 != (char *)0x0) {
      iVar2 = atoi(pcVar13);
      DAT_14032efe0 = 0 < iVar2;
    }
    if (pcVar15 != (char *)0x0) {
      iVar2 = atoi(pcVar15);
      DAT_14032efe2 = 0 < iVar2;
    }
    if (pcVar16 != (char *)0x0) {
      iVar2 = atoi(pcVar16);
      DAT_14032efe3 = 0 < iVar2;
    }
    if (pcVar17 != (char *)0x0) {
      iVar2 = atoi(pcVar17);
      DAT_14032efe4 = 0 < iVar2;
    }
  }
LAB_14013e153:
  if (0xf < local_58) {
    operator_delete((void *)CONCAT71(uStack_6f,local_70));
  }
  local_58 = 0xf;
  local_60 = 0;
  local_70 = '\0';
  local_228[0] = local_100;
  *(undefined ***)((longlong)local_180 + (longlong)*(int *)(local_188 + 4) + -8) =
       std::basic_ostringstream<>::vftable;
  local_198 = local_180;
  local_180[0] = std::basic_stringbuf<>::vftable;
  if ((local_108 & 1) != 0) {
    operator_delete((void *)*local_160);
  }
  std::basic_streambuf<>::setg((basic_streambuf<> *)local_180,(char *)0x0,(char *)0x0,(char *)0x0);
  *local_158 = 0;
  *local_138 = 0;
  *local_120 = 0;
  local_110 = 0;
  local_108 = local_108 & 0xfffffffe;
  std::basic_streambuf<>::~basic_streambuf<>((basic_streambuf<> *)local_180);
  *(code **)((longlong)local_180 + (longlong)*(int *)(local_188 + 4) + -8) = _vftable__exref;
  std::basic_ios<>::~basic_ios<>(local_100);
  local_218 = TiXmlDocument::vftable;
  if (local_1b8 != &DAT_14032f048) {
    operator_delete__(local_1b0);
  }
  local_218 = TiXmlNode::vftable;
  plVar11 = local_1f0;
  while (plVar11 != (longlong *)0x0) {
    plVar10 = (longlong *)plVar11[10];
    (**(code **)*plVar11)(plVar11,1);
    plVar11 = plVar10;
  }
  if (local_1e0 != &DAT_14032f048) {
    operator_delete__(local_1d8);
  }
  local_218 = TiXmlBase::vftable;
  if (0xf < local_80) {
    operator_delete((void *)CONCAT71(uStack_97,local_98));
  }
  return 1;
}



void FUN_14013e2e0(longlong *param_1)

{
  basic_ios<> *this;
  
  this = (basic_ios<> *)(param_1 + 0x11);
  *(undefined ***)(this + (longlong)*(int *)(*param_1 + 4) + -0x88) =
       std::basic_ostringstream<>::vftable;
  FUN_140140ef0(param_1 + 1);
  *(code **)(this + (longlong)*(int *)(*param_1 + 4) + -0x88) = _vftable__exref;
                    // WARNING: Could not recover jumptable at 0x00014013e34b. Too many branches
                    // WARNING: Treating indirect jump as call
  std::basic_ios<>::~basic_ios<>(this);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

undefined8 FUN_14013e360(longlong param_1,LPCWSTR param_2)

{
  char **ppcVar1;
  WCHAR WVar2;
  char cVar3;
  int iVar4;
  char **ppcVar5;
  undefined8 uVar6;
  char *pcVar7;
  char *pcVar8;
  char *pcVar9;
  char *pcVar10;
  char *pcVar11;
  longlong lVar12;
  ulonglong uVar13;
  longlong lVar14;
  longlong lVar15;
  longlong lVar16;
  wchar_t *_Format;
  longlong *plVar17;
  longlong *plVar18;
  char *pcVar19;
  char *pcVar20;
  char *pcVar21;
  char *pcVar22;
  LPCWSTR pWVar23;
  char *pcVar24;
  LPCSTR pCVar25;
  WCHAR *pWVar26;
  LPCSTR pCVar27;
  bool bVar28;
  undefined1 auStackY_4e8 [32];
  char *local_4a8;
  longlong local_4a0;
  undefined **local_498;
  undefined8 local_490;
  undefined8 local_488;
  undefined8 local_480;
  undefined4 local_478;
  longlong *local_470;
  undefined8 local_468;
  undefined8 *local_460;
  void *local_458;
  undefined8 local_450;
  undefined8 local_448;
  undefined1 local_440;
  undefined4 local_43c;
  undefined8 *local_438;
  void *local_430;
  undefined4 local_428;
  undefined8 local_424;
  undefined1 local_41c;
  char *local_418;
  char *local_410;
  char *local_408;
  char *local_400;
  char *local_3f8;
  char *local_3f0;
  undefined8 local_3e8;
  undefined2 local_3d8;
  undefined6 uStack_3d6;
  undefined8 local_3c8;
  ulonglong local_3c0;
  undefined8 local_3b0;
  undefined8 local_3a8;
  undefined8 local_3a0;
  undefined1 local_398;
  undefined7 uStack_397;
  undefined8 local_388;
  ulonglong local_380;
  CHAR local_368 [272];
  WCHAR local_258 [264];
  ulonglong local_48;
  
  local_3e8 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStackY_4e8;
  local_368[0] = '\0';
  local_4a0 = param_1;
  memset(local_368 + 1,0,0x103);
  lVar12 = -1;
  pWVar23 = param_2;
  do {
    if (lVar12 == 0) break;
    lVar12 = lVar12 + -1;
    WVar2 = *pWVar23;
    pWVar23 = pWVar23 + 1;
  } while (WVar2 != L'\0');
  pcVar19 = (char *)0x0;
  WideCharToMultiByte(0,0,param_2,~(uint)lVar12,local_368,0x104,(LPCSTR)0x0,(LPBOOL)0x0);
  local_490 = 0xffffffffffffffff;
  local_488 = 0;
  local_460 = &DAT_14032f048;
  local_480 = 0;
  local_478 = 0;
  local_470 = (longlong *)0x0;
  local_468 = 0;
  local_450 = 0;
  local_448 = 0;
  local_498 = TiXmlDocument::vftable;
  local_438 = &DAT_14032f048;
  local_424 = 0xffffffffffffffff;
  local_428 = 4;
  local_41c = 0;
  uVar13 = 0xffffffffffffffff;
  pcVar7 = local_368;
  do {
    if (uVar13 == 0) break;
    uVar13 = uVar13 - 1;
    cVar3 = *pcVar7;
    pcVar7 = pcVar7 + 1;
  } while (cVar3 != '\0');
  FUN_14014c3f0(&local_460,local_368,~uVar13 - 1);
  local_440 = 0;
  local_43c = 0;
  FUN_14014c3f0(&local_438,&DAT_140281f00,0);
  local_424 = 0;
  DAT_140325ab8 = 0;
  cVar3 = FUN_14014a9e0(&local_498);
  if (cVar3 == '\0') {
    FUN_140148a40("Error : %d - %s",local_43c,local_438 + 2);
    local_498 = TiXmlDocument::vftable;
    if (local_438 != &DAT_14032f048) {
      operator_delete__(local_430);
    }
    local_498 = TiXmlNode::vftable;
    plVar18 = local_470;
    while (plVar18 != (longlong *)0x0) {
      plVar17 = (longlong *)plVar18[10];
      (**(code **)*plVar18)(plVar18,1);
      plVar18 = plVar17;
    }
    if (local_460 != &DAT_14032f048) {
      operator_delete__(local_458);
    }
    return 0;
  }
  memset(local_258,0,0x208);
  for (plVar18 = local_470; plVar18 != (longlong *)0x0; plVar18 = (longlong *)plVar18[10]) {
    bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
    lVar12 = 7;
    pcVar7 = (char *)(plVar18[7] + 0x10);
    pcVar8 = "server";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar7 == *pcVar8;
      pcVar7 = pcVar7 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) goto LAB_14013e576;
  }
  goto LAB_14013ed46;
LAB_14013e576:
  while (lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18), lVar12 == 0) {
    do {
      plVar18 = (longlong *)plVar18[10];
      if (plVar18 == (longlong *)0x0) goto LAB_14013ed46;
      bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
      lVar12 = 7;
      pcVar7 = (char *)(plVar18[7] + 0x10);
      pcVar8 = "server";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar7 == *pcVar8;
        pcVar7 = pcVar7 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar18 + 0x30))();
  if (lVar12 != 0) {
    lVar16 = lVar12 + 0x58;
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar7 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar7 == (char *)0x0;
      lVar15 = 5;
      pcVar8 = "name";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar7 == *pcVar8;
        pcVar7 = pcVar7 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        local_418 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        goto LAB_14013e605;
      }
    }
    local_418 = (char *)0x0;
LAB_14013e605:
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar7 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar7 == (char *)0x0;
      lVar15 = 5;
      pcVar8 = "code";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar7 == *pcVar8;
        pcVar7 = pcVar7 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        local_400 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        goto LAB_14013e645;
      }
    }
    local_400 = (char *)0x0;
LAB_14013e645:
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar7 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar7 == (char *)0x0;
      lVar15 = 0xb;
      pcVar8 = "private_ip";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar7 == *pcVar8;
        pcVar7 = pcVar7 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        local_4a8 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        goto LAB_14013e687;
      }
    }
    local_4a8 = (char *)0x0;
LAB_14013e687:
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar7 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar7 == (char *)0x0;
      lVar15 = 0xd;
      pcVar8 = "private_port";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar7 == *pcVar8;
        pcVar7 = pcVar7 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        local_408 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        goto LAB_14013e6c5;
      }
    }
    local_408 = (char *)0x0;
LAB_14013e6c5:
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar7 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar7 == (char *)0x0;
      lVar15 = 10;
      pcVar8 = "public_ip";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar7 == *pcVar8;
        pcVar7 = pcVar7 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        local_410 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        goto LAB_14013e705;
      }
    }
    local_410 = (char *)0x0;
LAB_14013e705:
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar7 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar7 == (char *)0x0;
      lVar15 = 0xc;
      pcVar8 = "public_port";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar7 == *pcVar8;
        pcVar7 = pcVar7 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        local_3f0 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        goto LAB_14013e745;
      }
    }
    local_3f0 = (char *)0x0;
LAB_14013e745:
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar7 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar7 == (char *)0x0;
      lVar15 = 0xf;
      pcVar8 = "public_udpport";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar7 == *pcVar8;
        pcVar7 = pcVar7 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        local_3f8 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        goto LAB_14013e785;
      }
    }
    local_3f8 = (char *)0x0;
LAB_14013e785:
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); pCVar27 = pcVar19, lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar7 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar7 == (char *)0x0;
      lVar15 = 0xb;
      pcVar8 = "thread_num";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar7 == *pcVar8;
        pcVar7 = pcVar7 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        pCVar27 = (LPCSTR)(*(longlong *)(lVar14 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); pcVar7 = pcVar19, lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar7 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar7 == (char *)0x0;
      lVar15 = 6;
      pcVar8 = "agent";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar7 == *pcVar8;
        pcVar7 = pcVar7 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar7 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); pcVar8 = pcVar19, lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar8 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar8 == (char *)0x0;
      lVar15 = 6;
      pcVar9 = "debug";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar8 == *pcVar9;
        pcVar8 = pcVar8 + 1;
        pcVar9 = pcVar9 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar8 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar9 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar9 == (char *)0x0;
      lVar15 = 6;
      pcVar10 = "world";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar9 == *pcVar10;
        pcVar9 = pcVar9 + 1;
        pcVar10 = pcVar10 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar19 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar9 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar9 == (char *)0x0;
      lVar15 = 10;
      pcVar10 = "udp_count";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar9 == *pcVar10;
        pcVar9 = pcVar9 + 1;
        pcVar10 = pcVar10 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar9 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        goto LAB_14013e8c6;
      }
    }
    pcVar9 = (char *)0x0;
LAB_14013e8c6:
    pcVar10 = (char *)0x0;
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar16;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar11 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar11 == (char *)0x0;
      lVar15 = 0xc;
      pcVar21 = "private_dns";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar11 == *pcVar21;
        pcVar11 = pcVar11 + 1;
        pcVar21 = pcVar21 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar10 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar12 = *(longlong *)(lVar12 + 0xa0); lVar12 != lVar16;
        lVar12 = *(longlong *)(lVar12 + 0x48)) {
      pcVar11 = (char *)(*(longlong *)(lVar12 + 0x20) + 0x10);
      bVar28 = pcVar11 == (char *)0x0;
      lVar14 = 0xb;
      pcVar21 = "public_dns";
      do {
        if (lVar14 == 0) break;
        lVar14 = lVar14 + -1;
        bVar28 = *pcVar11 == *pcVar21;
        pcVar11 = pcVar11 + 1;
        pcVar21 = pcVar21 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar11 = (char *)(*(longlong *)(lVar12 + 0x30) + 0x10);
        goto LAB_14013e943;
      }
    }
    pcVar11 = (char *)0x0;
LAB_14013e943:
    if (pcVar10 != (char *)0x0) {
      local_380 = 0xf;
      local_388 = 0;
      local_398 = 0;
      lVar12 = -1;
      pcVar21 = pcVar10;
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        cVar3 = *pcVar21;
        pcVar21 = pcVar21 + 1;
      } while (cVar3 != '\0');
      FUN_14004d4d0(&local_398,pcVar10);
      uVar6 = FUN_1402026a0(&local_3d8,&local_398);
      FUN_140142a80(local_4a0 + 0x30,uVar6);
      if (7 < local_3c0) {
        operator_delete((void *)CONCAT62(uStack_3d6,local_3d8));
      }
      local_3c0 = 7;
      local_3c8 = 0;
      local_3d8 = 0;
      if (0xf < local_380) {
        operator_delete((void *)CONCAT71(uStack_397,local_398));
      }
    }
    if (local_4a8 != (char *)0x0) {
      local_380 = 0xf;
      local_388 = 0;
      local_398 = 0;
      lVar12 = -1;
      pcVar10 = local_4a8;
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        cVar3 = *pcVar10;
        pcVar10 = pcVar10 + 1;
      } while (cVar3 != '\0');
      FUN_14004d4d0(&local_398);
      uVar6 = FUN_1402026a0(&local_3d8,&local_398);
      FUN_140142a80(local_4a0 + 0x30,uVar6);
      if (7 < local_3c0) {
        operator_delete((void *)CONCAT62(uStack_3d6,local_3d8));
      }
      local_3c0 = 7;
      local_3c8 = 0;
      local_3d8 = 0;
      if (0xf < local_380) {
        operator_delete((void *)CONCAT71(uStack_397,local_398));
      }
    }
    lVar12 = local_4a0;
    if (pcVar11 != (char *)0x0) {
      local_380 = 0xf;
      local_388 = 0;
      local_398 = 0;
      lVar12 = -1;
      pcVar10 = pcVar11;
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        cVar3 = *pcVar10;
        pcVar10 = pcVar10 + 1;
      } while (cVar3 != '\0');
      FUN_14004d4d0(&local_398,pcVar11);
      uVar6 = FUN_1402026a0(&local_3d8,&local_398);
      lVar12 = local_4a0;
      FUN_140142a80(local_4a0 + 0x58,uVar6);
      if (7 < local_3c0) {
        operator_delete((void *)CONCAT62(uStack_3d6,local_3d8));
      }
      local_3c0 = 7;
      local_3c8 = 0;
      local_3d8 = 0;
      if (0xf < local_380) {
        operator_delete((void *)CONCAT71(uStack_397,local_398));
      }
    }
    if (local_410 != (char *)0x0) {
      local_380 = 0xf;
      local_388 = 0;
      local_398 = 0;
      lVar14 = -1;
      pcVar10 = local_410;
      do {
        if (lVar14 == 0) break;
        lVar14 = lVar14 + -1;
        cVar3 = *pcVar10;
        pcVar10 = pcVar10 + 1;
      } while (cVar3 != '\0');
      FUN_14004d4d0(&local_398);
      uVar6 = FUN_1402026a0(&local_3d8,&local_398);
      FUN_140142a80(lVar12 + 0x58,uVar6);
      if (7 < local_3c0) {
        operator_delete((void *)CONCAT62(uStack_3d6,local_3d8));
      }
      local_3c0 = 7;
      local_3c8 = 0;
      local_3d8 = 0;
      if (0xf < local_380) {
        operator_delete((void *)CONCAT71(uStack_397,local_398));
      }
    }
    if (local_408 != (char *)0x0) {
      iVar4 = atoi(local_408);
      *(int *)(lVar12 + 0x80) = iVar4;
    }
    if (local_3f0 != (char *)0x0) {
      iVar4 = atoi(local_3f0);
      *(int *)(lVar12 + 0x84) = iVar4;
    }
    if (local_3f8 != (char *)0x0) {
      iVar4 = atoi(local_3f8);
      *(int *)(lVar12 + 0x88) = iVar4;
    }
    if (local_418 != (char *)0x0) {
      local_380 = 0xf;
      local_388 = 0;
      local_398 = 0;
      lVar14 = -1;
      pcVar10 = local_418;
      do {
        if (lVar14 == 0) break;
        lVar14 = lVar14 + -1;
        cVar3 = *pcVar10;
        pcVar10 = pcVar10 + 1;
      } while (cVar3 != '\0');
      FUN_14004d4d0(&local_398);
      FUN_1402026a0(&local_3d8,&local_398);
      FUN_140142a80(lVar12 + 8);
      if (7 < local_3c0) {
        operator_delete((void *)CONCAT62(uStack_3d6,local_3d8));
      }
      local_3c0 = 7;
      local_3c8 = 0;
      local_3d8 = 0;
      if (0xf < local_380) {
        operator_delete((void *)CONCAT71(uStack_397,local_398));
      }
    }
    if (pCVar27 == (LPCSTR)0x0) {
      *(undefined4 *)(local_4a0 + 0x15c) = 1;
      param_1 = local_4a0;
    }
    else {
      memset(local_258,0,0x208);
      MultiByteToWideChar(0,1,pCVar27,0x104,local_258,0x104);
      param_1 = local_4a0;
      ppcVar1 = (char **)(local_4a0 + 0x15c);
      iVar4 = _wtoi(local_258);
      *(int *)ppcVar1 = iVar4;
      local_4a8 = (char *)CONCAT44(local_4a8._4_4_,1);
      ppcVar5 = &local_4a8;
      if (1 < *(int *)ppcVar1) {
        ppcVar5 = ppcVar1;
      }
      *(int *)ppcVar1 = *(int *)ppcVar5;
    }
    if (local_400 != (char *)0x0) {
      iVar4 = atoi(local_400);
      *(int *)(param_1 + 0x154) = iVar4;
    }
    if (pcVar7 != (char *)0x0) {
      iVar4 = atoi(pcVar7);
      *(bool *)(param_1 + 0x150) = iVar4 == 1;
    }
    if (pcVar8 != (char *)0x0) {
      iVar4 = atoi(pcVar8);
      *(bool *)(param_1 + 0x165) = iVar4 == 1;
    }
    if (pcVar19 != (char *)0x0) {
      iVar4 = atoi(pcVar19);
      *(int *)(param_1 + 0x140) = iVar4;
    }
    if (pcVar9 != (char *)0x0) {
      iVar4 = atoi(pcVar9);
      *(int *)(param_1 + 0x8c) = iVar4;
    }
  }
LAB_14013ed46:
  pcVar7 = (char *)0x0;
  for (plVar18 = local_470; plVar17 = local_470, plVar18 != (longlong *)0x0;
      plVar18 = (longlong *)plVar18[10]) {
    bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
    lVar12 = 0xb;
    pcVar19 = (char *)(plVar18[7] + 0x10);
    pcVar8 = "db_account";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) goto LAB_14013ed83;
  }
joined_r0x00014013ede0:
  do {
    plVar18 = local_470;
    if (plVar17 == (longlong *)0x0) goto joined_r0x00014013ee70;
    bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
    lVar12 = 7;
    pcVar19 = (char *)(plVar17[7] + 0x10);
    pcVar8 = "db_web";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) goto LAB_14013ee13;
    plVar17 = (longlong *)plVar17[10];
  } while( true );
LAB_14013ed83:
  while (lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18), lVar12 == 0) {
    do {
      plVar18 = (longlong *)plVar18[10];
      plVar17 = local_470;
      if (plVar18 == (longlong *)0x0) goto joined_r0x00014013ede0;
      bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
      lVar12 = 0xb;
      pcVar19 = (char *)(plVar18[7] + 0x10);
      pcVar8 = "db_account";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18);
  plVar17 = local_470;
  if (lVar12 != 0) {
    FUN_1401401c0(param_1 + 0x90,param_1 + 0x130);
    plVar17 = local_470;
  }
  goto joined_r0x00014013ede0;
LAB_14013ee13:
  while (lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17), lVar12 == 0) {
    do {
      plVar17 = (longlong *)plVar17[10];
      plVar18 = local_470;
      if (plVar17 == (longlong *)0x0) goto joined_r0x00014013ee70;
      bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
      lVar12 = 7;
      pcVar19 = (char *)(plVar17[7] + 0x10);
      pcVar8 = "db_web";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17);
  plVar18 = local_470;
  if (lVar12 != 0) {
    FUN_1401401c0(param_1 + 0xb8,param_1 + 0x134);
    plVar18 = local_470;
  }
joined_r0x00014013ee70:
  do {
    plVar17 = local_470;
    if (plVar18 == (longlong *)0x0) goto joined_r0x00014013ef00;
    bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
    lVar12 = 8;
    pcVar19 = (char *)(plVar18[7] + 0x10);
    pcVar8 = "db_game";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar18 = (longlong *)plVar18[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18), lVar12 == 0) {
    do {
      plVar18 = (longlong *)plVar18[10];
      plVar17 = local_470;
      if (plVar18 == (longlong *)0x0) goto joined_r0x00014013ef00;
      bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
      lVar12 = 8;
      pcVar19 = (char *)(plVar18[7] + 0x10);
      pcVar8 = "db_game";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18);
  plVar17 = local_470;
  if (lVar12 != 0) {
    FUN_1401401c0(param_1 + 0xe0,param_1 + 0x138);
    plVar17 = local_470;
  }
joined_r0x00014013ef00:
  do {
    plVar18 = local_470;
    if (plVar17 == (longlong *)0x0) goto joined_r0x00014013ef90;
    bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
    lVar12 = 0xc;
    pcVar19 = (char *)(plVar17[7] + 0x10);
    pcVar8 = "db_game_log";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar17 = (longlong *)plVar17[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17), lVar12 == 0) {
    do {
      plVar17 = (longlong *)plVar17[10];
      plVar18 = local_470;
      if (plVar17 == (longlong *)0x0) goto joined_r0x00014013ef90;
      bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
      lVar12 = 0xc;
      pcVar19 = (char *)(plVar17[7] + 0x10);
      pcVar8 = "db_game_log";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17);
  plVar18 = local_470;
  if (lVar12 != 0) {
    FUN_1401401c0(param_1 + 0x108,param_1 + 0x13c);
    plVar18 = local_470;
  }
joined_r0x00014013ef90:
  do {
    plVar17 = local_470;
    if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f062;
    bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
    lVar12 = 4;
    pcVar19 = (char *)(plVar18[7] + 0x10);
    pcVar8 = "dbc";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar18 = (longlong *)plVar18[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18), lVar12 == 0) {
    do {
      plVar18 = (longlong *)plVar18[10];
      plVar17 = local_470;
      if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f062;
      bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
      lVar12 = 4;
      pcVar19 = (char *)(plVar18[7] + 0x10);
      pcVar8 = "dbc";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18);
  plVar17 = local_470;
  if (lVar12 != 0) {
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar12 + 0x58;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar19 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar19 == (char *)0x0;
      lVar16 = 0x13;
      pcVar8 = "write_thread_count";
      do {
        if (lVar16 == 0) break;
        lVar16 = lVar16 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar19 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        if (pcVar19 != (char *)0x0) {
          iVar4 = atoi(pcVar19);
          *(int *)(param_1 + 0x14c) = iVar4;
          plVar17 = local_470;
        }
        break;
      }
    }
  }
joined_r0x00014013f062:
  do {
    plVar18 = local_470;
    if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f132;
    bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
    lVar12 = 9;
    pcVar19 = (char *)(plVar17[7] + 0x10);
    pcVar8 = "db_cache";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar17 = (longlong *)plVar17[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17), lVar12 == 0) {
    do {
      plVar17 = (longlong *)plVar17[10];
      plVar18 = local_470;
      if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f132;
      bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
      lVar12 = 9;
      pcVar19 = (char *)(plVar17[7] + 0x10);
      pcVar8 = "db_cache";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17);
  plVar18 = local_470;
  if (lVar12 != 0) {
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar12 + 0x58;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar19 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar19 == (char *)0x0;
      lVar16 = 0xe;
      pcVar8 = "session_count";
      do {
        if (lVar16 == 0) break;
        lVar16 = lVar16 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar19 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        if (pcVar19 != (char *)0x0) {
          iVar4 = atoi(pcVar19);
          *(int *)(param_1 + 0x144) = iVar4;
          plVar18 = local_470;
        }
        break;
      }
    }
  }
joined_r0x00014013f132:
  do {
    if (plVar18 == (longlong *)0x0) goto LAB_14013f1f5;
    bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
    lVar12 = 0xd;
    pcVar19 = (char *)(plVar18[7] + 0x10);
    pcVar8 = "db_log_cache";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar18 = (longlong *)plVar18[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18), lVar12 == 0) {
    do {
      plVar18 = (longlong *)plVar18[10];
      if (plVar18 == (longlong *)0x0) goto LAB_14013f1f5;
      bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
      lVar12 = 0xd;
      pcVar19 = (char *)(plVar18[7] + 0x10);
      pcVar8 = "db_log_cache";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18);
  if (lVar12 == 0) {
LAB_14013f1f5:
    iVar4 = *(int *)(param_1 + 0x144);
LAB_14013f1fc:
    *(int *)(param_1 + 0x148) = iVar4;
    plVar18 = local_470;
  }
  else {
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); plVar18 = local_470, lVar14 != lVar12 + 0x58;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar19 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar19 == (char *)0x0;
      lVar16 = 0xe;
      pcVar8 = "session_count";
      do {
        if (lVar16 == 0) break;
        lVar16 = lVar16 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar19 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        if (pcVar19 != (char *)0x0) {
          iVar4 = atoi(pcVar19);
          goto LAB_14013f1fc;
        }
        break;
      }
    }
  }
  do {
    plVar17 = local_470;
    if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f288;
    bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
    lVar12 = 0xd;
    pcVar19 = (char *)(plVar18[7] + 0x10);
    pcVar8 = "agentmanager";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar18 = (longlong *)plVar18[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18), lVar12 == 0) {
    do {
      plVar18 = (longlong *)plVar18[10];
      plVar17 = local_470;
      if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f288;
      bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
      lVar12 = 0xd;
      pcVar19 = (char *)(plVar18[7] + 0x10);
      pcVar8 = "agentmanager";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18);
  plVar17 = local_470;
  if (lVar12 != 0) {
    FUN_1401402a0(param_1,lVar12);
    plVar17 = local_470;
  }
joined_r0x00014013f288:
  do {
    plVar18 = local_470;
    if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f308;
    bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
    lVar12 = 9;
    pcVar19 = (char *)(plVar17[7] + 0x10);
    pcVar8 = "db_cache";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar17 = (longlong *)plVar17[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17), lVar12 == 0) {
    do {
      plVar17 = (longlong *)plVar17[10];
      plVar18 = local_470;
      if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f308;
      bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
      lVar12 = 9;
      pcVar19 = (char *)(plVar17[7] + 0x10);
      pcVar8 = "db_cache";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17);
  plVar18 = local_470;
  if (lVar12 != 0) {
    FUN_1401402a0(param_1,lVar12);
    plVar18 = local_470;
  }
joined_r0x00014013f308:
  do {
    plVar17 = local_470;
    if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f388;
    bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
    lVar12 = 0xd;
    pcVar19 = (char *)(plVar18[7] + 0x10);
    pcVar8 = "db_log_cache";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar18 = (longlong *)plVar18[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18), lVar12 == 0) {
    do {
      plVar18 = (longlong *)plVar18[10];
      plVar17 = local_470;
      if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f388;
      bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
      lVar12 = 0xd;
      pcVar19 = (char *)(plVar18[7] + 0x10);
      pcVar8 = "db_log_cache";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18);
  plVar17 = local_470;
  if (lVar12 != 0) {
    FUN_1401402a0(param_1,lVar12);
    plVar17 = local_470;
  }
joined_r0x00014013f388:
  do {
    plVar18 = local_470;
    if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f408;
    bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
    lVar12 = 0xb;
    pcVar19 = (char *)(plVar17[7] + 0x10);
    pcVar8 = "msg_server";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar17 = (longlong *)plVar17[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17), lVar12 == 0) {
    do {
      plVar17 = (longlong *)plVar17[10];
      plVar18 = local_470;
      if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f408;
      bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
      lVar12 = 0xb;
      pcVar19 = (char *)(plVar17[7] + 0x10);
      pcVar8 = "msg_server";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17);
  plVar18 = local_470;
  if (lVar12 != 0) {
    FUN_1401402a0(param_1,lVar12);
    plVar18 = local_470;
  }
joined_r0x00014013f408:
  do {
    plVar17 = local_470;
    if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f488;
    bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
    lVar12 = 10;
    pcVar19 = (char *)(plVar18[7] + 0x10);
    pcVar8 = "gm_server";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar18 = (longlong *)plVar18[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18), lVar12 == 0) {
    do {
      plVar18 = (longlong *)plVar18[10];
      plVar17 = local_470;
      if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f488;
      bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
      lVar12 = 10;
      pcVar19 = (char *)(plVar18[7] + 0x10);
      pcVar8 = "gm_server";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18);
  plVar17 = local_470;
  if (lVar12 != 0) {
    FUN_1401402a0(param_1,lVar12);
    plVar17 = local_470;
  }
joined_r0x00014013f488:
  do {
    plVar18 = local_470;
    if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f508;
    bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
    lVar12 = 0xf;
    pcVar19 = (char *)(plVar17[7] + 0x10);
    pcVar8 = "auction_server";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar17 = (longlong *)plVar17[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17), lVar12 == 0) {
    do {
      plVar17 = (longlong *)plVar17[10];
      plVar18 = local_470;
      if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f508;
      bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
      lVar12 = 0xf;
      pcVar19 = (char *)(plVar17[7] + 0x10);
      pcVar8 = "auction_server";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17);
  plVar18 = local_470;
  if (lVar12 != 0) {
    FUN_1401402a0(param_1,lVar12);
    plVar18 = local_470;
  }
joined_r0x00014013f508:
  do {
    plVar17 = local_470;
    if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f588;
    bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
    lVar12 = 0xf;
    pcVar19 = (char *)(plVar18[7] + 0x10);
    pcVar8 = "manager_server";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar18 = (longlong *)plVar18[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18), lVar12 == 0) {
    do {
      plVar18 = (longlong *)plVar18[10];
      plVar17 = local_470;
      if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f588;
      bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
      lVar12 = 0xf;
      pcVar19 = (char *)(plVar18[7] + 0x10);
      pcVar8 = "manager_server";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18);
  plVar17 = local_470;
  if (lVar12 != 0) {
    FUN_1401402a0(param_1,lVar12);
    plVar17 = local_470;
  }
joined_r0x00014013f588:
  do {
    plVar18 = local_470;
    if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f608;
    bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
    lVar12 = 0xd;
    pcVar19 = (char *)(plVar17[7] + 0x10);
    pcVar8 = "match_server";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar17 = (longlong *)plVar17[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17), lVar12 == 0) {
    do {
      plVar17 = (longlong *)plVar17[10];
      plVar18 = local_470;
      if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f608;
      bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
      lVar12 = 0xd;
      pcVar19 = (char *)(plVar17[7] + 0x10);
      pcVar8 = "match_server";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17);
  plVar18 = local_470;
  if (lVar12 != 0) {
    FUN_1401402a0(param_1,lVar12);
    plVar18 = local_470;
  }
joined_r0x00014013f608:
  do {
    plVar17 = local_470;
    if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f688;
    bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
    lVar12 = 0xd;
    pcVar19 = (char *)(plVar18[7] + 0x10);
    pcVar8 = "agent_server";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar18 = (longlong *)plVar18[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18), lVar12 == 0) {
    do {
      plVar18 = (longlong *)plVar18[10];
      plVar17 = local_470;
      if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f688;
      bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
      lVar12 = 0xd;
      pcVar19 = (char *)(plVar18[7] + 0x10);
      pcVar8 = "agent_server";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18);
  plVar17 = local_470;
  if (lVar12 != 0) {
    FUN_1401402a0(param_1,lVar12);
    plVar17 = local_470;
  }
joined_r0x00014013f688:
  do {
    plVar18 = local_470;
    if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f708;
    bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
    lVar12 = 4;
    pcVar19 = (char *)(plVar17[7] + 0x10);
    pcVar8 = "api";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar17 = (longlong *)plVar17[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17), lVar12 == 0) {
    do {
      plVar17 = (longlong *)plVar17[10];
      plVar18 = local_470;
      if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f708;
      bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
      lVar12 = 4;
      pcVar19 = (char *)(plVar17[7] + 0x10);
      pcVar8 = "api";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17);
  plVar18 = local_470;
  if (lVar12 != 0) {
    FUN_1401402a0(param_1,lVar12);
    plVar18 = local_470;
  }
joined_r0x00014013f708:
  do {
    plVar17 = local_470;
    if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f7d7;
    bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
    lVar12 = 4;
    pcVar19 = (char *)(plVar18[7] + 0x10);
    pcVar8 = "dns";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar18 = (longlong *)plVar18[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18), lVar12 == 0) {
    do {
      plVar18 = (longlong *)plVar18[10];
      plVar17 = local_470;
      if (plVar18 == (longlong *)0x0) goto joined_r0x00014013f7d7;
      bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
      lVar12 = 4;
      pcVar19 = (char *)(plVar18[7] + 0x10);
      pcVar8 = "dns";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18);
  plVar17 = local_470;
  if (lVar12 != 0) {
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar12 + 0x58;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar19 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar19 == (char *)0x0;
      lVar16 = 4;
      pcVar8 = "dns";
      do {
        if (lVar16 == 0) break;
        lVar16 = lVar16 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar19 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        if (pcVar19 != (char *)0x0) {
          iVar4 = atoi(pcVar19);
          *(bool *)(param_1 + 0x151) = 0 < iVar4;
          plVar17 = local_470;
        }
        break;
      }
    }
  }
joined_r0x00014013f7d7:
  do {
    plVar18 = local_470;
    if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f911;
    bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
    lVar12 = 8;
    pcVar19 = (char *)(plVar17[7] + 0x10);
    pcVar8 = "setting";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) break;
    plVar17 = (longlong *)plVar17[10];
  } while( true );
  while (lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17), lVar12 == 0) {
    do {
      plVar17 = (longlong *)plVar17[10];
      plVar18 = local_470;
      if (plVar17 == (longlong *)0x0) goto joined_r0x00014013f911;
      bVar28 = (char *)(plVar17[7] + 0x10) == (char *)0x0;
      lVar12 = 8;
      pcVar19 = (char *)(plVar17[7] + 0x10);
      pcVar8 = "setting";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar17 + 0x30))(plVar17);
  plVar18 = local_470;
  if (lVar12 != 0) {
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); pcVar19 = pcVar7, lVar14 != lVar12 + 0x58;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar19 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar19 == (char *)0x0;
      lVar16 = 6;
      pcVar8 = "multi";
      do {
        if (lVar16 == 0) break;
        lVar16 = lVar16 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar19 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); pcVar8 = pcVar7, lVar14 != lVar12 + 0x58;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar8 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar8 == (char *)0x0;
      lVar16 = 5;
      pcVar9 = "lock";
      do {
        if (lVar16 == 0) break;
        lVar16 = lVar16 + -1;
        bVar28 = *pcVar8 == *pcVar9;
        pcVar8 = pcVar8 + 1;
        pcVar9 = pcVar9 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar8 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        break;
      }
    }
    if (pcVar19 != (char *)0x0) {
      iVar4 = atoi(pcVar19);
      *(bool *)(param_1 + 0x166) = 0 < iVar4;
    }
    plVar18 = local_470;
    if (pcVar8 != (char *)0x0) {
      iVar4 = atoi(pcVar8);
      *(double *)(param_1 + 0x168) = (double)iVar4;
      plVar18 = local_470;
    }
  }
joined_r0x00014013f911:
  do {
    if (plVar18 == (longlong *)0x0) goto LAB_14013faa3;
    bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
    lVar12 = 5;
    pcVar19 = (char *)(plVar18[7] + 0x10);
    pcVar8 = "auto";
    do {
      if (lVar12 == 0) break;
      lVar12 = lVar12 + -1;
      bVar28 = *pcVar19 == *pcVar8;
      pcVar19 = pcVar19 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar28);
    if (bVar28) goto LAB_14013f946;
    plVar18 = (longlong *)plVar18[10];
  } while( true );
joined_r0x00014013fd64:
  if (pcVar7 == pcVar19) goto LAB_14013fda9;
  bVar28 = (char *)(*(longlong *)(pcVar7 + 0x20) + 0x10) == (char *)0x0;
  lVar12 = 3;
  pcVar21 = (char *)(*(longlong *)(pcVar7 + 0x20) + 0x10);
  pcVar20 = "id";
  do {
    if (lVar12 == 0) break;
    lVar12 = lVar12 + -1;
    bVar28 = *pcVar21 == *pcVar20;
    pcVar21 = pcVar21 + 1;
    pcVar20 = pcVar20 + 1;
  } while (bVar28);
  if (bVar28) {
    pcVar22 = (char *)(*(longlong *)(pcVar7 + 0x30) + 0x10);
    goto LAB_14013fda9;
  }
  pcVar7 = *(char **)(pcVar7 + 0x48);
  goto joined_r0x00014013fd64;
LAB_14013f946:
  while (lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18), lVar12 == 0) {
    do {
      plVar18 = (longlong *)plVar18[10];
      if (plVar18 == (longlong *)0x0) goto LAB_14013faa3;
      bVar28 = (char *)(plVar18[7] + 0x10) == (char *)0x0;
      lVar12 = 5;
      pcVar19 = (char *)(plVar18[7] + 0x10);
      pcVar8 = "auto";
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
    } while (!bVar28);
  }
  lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18);
  if (lVar12 != 0) {
    lVar14 = lVar12 + 0x58;
    for (lVar16 = *(longlong *)(lVar12 + 0xa0); pcVar19 = pcVar7, lVar16 != lVar14;
        lVar16 = *(longlong *)(lVar16 + 0x48)) {
      pcVar19 = (char *)(*(longlong *)(lVar16 + 0x20) + 0x10);
      bVar28 = pcVar19 == (char *)0x0;
      lVar15 = 0xd;
      pcVar8 = "start_server";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar19 = (char *)(*(longlong *)(lVar16 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar16 = *(longlong *)(lVar12 + 0xa0); pcVar8 = pcVar7, lVar16 != lVar14;
        lVar16 = *(longlong *)(lVar16 + 0x48)) {
      pcVar8 = (char *)(*(longlong *)(lVar16 + 0x20) + 0x10);
      bVar28 = pcVar8 == (char *)0x0;
      lVar15 = 0xe;
      pcVar9 = "revive_server";
      do {
        if (lVar15 == 0) break;
        lVar15 = lVar15 + -1;
        bVar28 = *pcVar8 == *pcVar9;
        pcVar8 = pcVar8 + 1;
        pcVar9 = pcVar9 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar8 = (char *)(*(longlong *)(lVar16 + 0x30) + 0x10);
        break;
      }
    }
    for (lVar12 = *(longlong *)(lVar12 + 0xa0); pcVar9 = pcVar7, lVar12 != lVar14;
        lVar12 = *(longlong *)(lVar12 + 0x48)) {
      pcVar9 = (char *)(*(longlong *)(lVar12 + 0x20) + 0x10);
      bVar28 = pcVar9 == (char *)0x0;
      lVar16 = 0xd;
      pcVar10 = "open_channel";
      do {
        if (lVar16 == 0) break;
        lVar16 = lVar16 + -1;
        bVar28 = *pcVar9 == *pcVar10;
        pcVar9 = pcVar9 + 1;
        pcVar10 = pcVar10 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar9 = (char *)(*(longlong *)(lVar12 + 0x30) + 0x10);
        break;
      }
    }
    if (pcVar19 != (char *)0x0) {
      iVar4 = atoi(pcVar19);
      *(double *)(param_1 + 0x178) = (double)iVar4;
    }
    if (pcVar8 != (char *)0x0) {
      iVar4 = atoi(pcVar8);
      *(bool *)(param_1 + 0x171) = 0 < iVar4;
    }
    if (pcVar9 != (char *)0x0) {
      iVar4 = atoi(pcVar9);
      *(bool *)(param_1 + 0x170) = 0 < iVar4;
    }
  }
LAB_14013faa3:
  lVar12 = FUN_14014a040(&local_498,"guildlobby");
  if (lVar12 != 0) {
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar12 + 0x58;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar19 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar19 == (char *)0x0;
      lVar16 = 6;
      pcVar8 = "value";
      do {
        if (lVar16 == 0) break;
        lVar16 = lVar16 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar19 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        if (pcVar19 != (char *)0x0) {
          iVar4 = atoi(pcVar19);
          *(uint *)(param_1 + 0x158) = (uint)(0 < iVar4);
        }
        break;
      }
    }
  }
  DAT_14032efe4 = 0;
  lVar12 = FUN_14014a040(&local_498,"lua_send");
  if (lVar12 != 0) {
    for (lVar14 = *(longlong *)(lVar12 + 0xa0); lVar14 != lVar12 + 0x58;
        lVar14 = *(longlong *)(lVar14 + 0x48)) {
      pcVar19 = (char *)(*(longlong *)(lVar14 + 0x20) + 0x10);
      bVar28 = pcVar19 == (char *)0x0;
      lVar16 = 5;
      pcVar8 = "send";
      do {
        if (lVar16 == 0) break;
        lVar16 = lVar16 + -1;
        bVar28 = *pcVar19 == *pcVar8;
        pcVar19 = pcVar19 + 1;
        pcVar8 = pcVar8 + 1;
      } while (bVar28);
      if (bVar28) {
        pcVar7 = (char *)(*(longlong *)(lVar14 + 0x30) + 0x10);
        break;
      }
    }
    iVar4 = atoi(pcVar7);
    DAT_14032efe4 = 0 < iVar4;
  }
  if ((*(int *)(param_1 + 0x154) == 0) && (lVar12 = FUN_14014a040(&local_498,"Option"), lVar12 != 0)
     ) {
    uVar6 = FUN_14014a040(&local_498,"Option");
    pcVar7 = (char *)FUN_14014a040(uVar6,"channel");
    local_4a8 = pcVar7;
    while (pcVar7 != (char *)0x0) {
      pcVar9 = (char *)0x0;
      pcVar19 = pcVar7 + 0x58;
      for (pcVar8 = *(char **)(pcVar7 + 0xa0); pCVar27 = pcVar9, pcVar8 != pcVar19;
          pcVar8 = *(char **)(pcVar8 + 0x48)) {
        bVar28 = (char *)(*(longlong *)(pcVar8 + 0x20) + 0x10) == (char *)0x0;
        lVar12 = 5;
        pcVar10 = (char *)(*(longlong *)(pcVar8 + 0x20) + 0x10);
        pcVar11 = "name";
        do {
          if (lVar12 == 0) break;
          lVar12 = lVar12 + -1;
          bVar28 = *pcVar10 == *pcVar11;
          pcVar10 = pcVar10 + 1;
          pcVar11 = pcVar11 + 1;
        } while (bVar28);
        if (bVar28) {
          pCVar27 = (LPCSTR)(*(longlong *)(pcVar8 + 0x30) + 0x10);
          break;
        }
      }
      for (pcVar8 = *(char **)(pcVar7 + 0xa0); pcVar10 = pcVar9, pcVar8 != pcVar19;
          pcVar8 = *(char **)(pcVar8 + 0x48)) {
        bVar28 = (char *)(*(longlong *)(pcVar8 + 0x20) + 0x10) == (char *)0x0;
        lVar12 = 7;
        pcVar10 = (char *)(*(longlong *)(pcVar8 + 0x20) + 0x10);
        pcVar11 = "minlev";
        do {
          if (lVar12 == 0) break;
          lVar12 = lVar12 + -1;
          bVar28 = *pcVar10 == *pcVar11;
          pcVar10 = pcVar10 + 1;
          pcVar11 = pcVar11 + 1;
        } while (bVar28);
        if (bVar28) {
          pcVar10 = (char *)(*(longlong *)(pcVar8 + 0x30) + 0x10);
          break;
        }
      }
      for (pcVar8 = *(char **)(pcVar7 + 0xa0); pcVar11 = pcVar9, pcVar8 != pcVar19;
          pcVar8 = *(char **)(pcVar8 + 0x48)) {
        bVar28 = (char *)(*(longlong *)(pcVar8 + 0x20) + 0x10) == (char *)0x0;
        lVar12 = 7;
        pcVar11 = (char *)(*(longlong *)(pcVar8 + 0x20) + 0x10);
        pcVar21 = "maxlev";
        do {
          if (lVar12 == 0) break;
          lVar12 = lVar12 + -1;
          bVar28 = *pcVar11 == *pcVar21;
          pcVar11 = pcVar11 + 1;
          pcVar21 = pcVar21 + 1;
        } while (bVar28);
        if (bVar28) {
          pcVar11 = (char *)(*(longlong *)(pcVar8 + 0x30) + 0x10);
          break;
        }
      }
      for (pcVar8 = *(char **)(pcVar7 + 0xa0); pcVar8 != pcVar19; pcVar8 = *(char **)(pcVar8 + 0x48)
          ) {
        bVar28 = (char *)(*(longlong *)(pcVar8 + 0x20) + 0x10) == (char *)0x0;
        lVar12 = 6;
        pcVar21 = (char *)(*(longlong *)(pcVar8 + 0x20) + 0x10);
        pcVar22 = "group";
        do {
          if (lVar12 == 0) break;
          lVar12 = lVar12 + -1;
          bVar28 = *pcVar21 == *pcVar22;
          pcVar21 = pcVar21 + 1;
          pcVar22 = pcVar22 + 1;
        } while (bVar28);
        if (bVar28) {
          pcVar9 = (char *)(*(longlong *)(pcVar8 + 0x30) + 0x10);
          break;
        }
      }
      for (pcVar8 = *(char **)(pcVar7 + 0xa0); pcVar8 != pcVar19; pcVar8 = *(char **)(pcVar8 + 0x48)
          ) {
        bVar28 = (char *)(*(longlong *)(pcVar8 + 0x20) + 0x10) == (char *)0x0;
        lVar12 = 5;
        pcVar21 = (char *)(*(longlong *)(pcVar8 + 0x20) + 0x10);
        pcVar22 = "type";
        do {
          if (lVar12 == 0) break;
          lVar12 = lVar12 + -1;
          bVar28 = *pcVar21 == *pcVar22;
          pcVar21 = pcVar21 + 1;
          pcVar22 = pcVar22 + 1;
        } while (bVar28);
        if (bVar28) {
          pcVar8 = (char *)(*(longlong *)(pcVar8 + 0x30) + 0x10);
          goto LAB_14013fd26;
        }
      }
      pcVar8 = (char *)0x0;
LAB_14013fd26:
      pcVar22 = (char *)0x0;
      for (pcVar21 = *(char **)(pcVar7 + 0xa0); pcVar21 != pcVar19;
          pcVar21 = *(char **)(pcVar21 + 0x48)) {
        bVar28 = (char *)(*(longlong *)(pcVar21 + 0x20) + 0x10) == (char *)0x0;
        lVar12 = 3;
        pcVar20 = (char *)(*(longlong *)(pcVar21 + 0x20) + 0x10);
        pcVar24 = "id";
        do {
          if (lVar12 == 0) break;
          lVar12 = lVar12 + -1;
          bVar28 = *pcVar20 == *pcVar24;
          pcVar20 = pcVar20 + 1;
          pcVar24 = pcVar24 + 1;
        } while (bVar28);
        if (bVar28) {
          if (*(longlong *)(pcVar21 + 0x30) != -0x10) {
            pcVar7 = *(char **)(pcVar7 + 0xa0);
            goto joined_r0x00014013fd64;
          }
          break;
        }
      }
      pcVar22 = "1";
LAB_14013fda9:
      memset(local_258,0,0x208);
      lVar12 = -1;
      pCVar25 = pCVar27;
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        cVar3 = *pCVar25;
        pCVar25 = pCVar25 + 1;
      } while (cVar3 != '\0');
      MultiByteToWideChar(0,1,pCVar27,~(uint)lVar12,local_258,0x104);
      local_3c0 = 7;
      local_3c8 = 0;
      local_3d8 = 0;
      local_3b0 = 0;
      local_3a8 = 0;
      local_3a0 = 0;
      lVar12 = -1;
      pWVar26 = local_258;
      do {
        if (lVar12 == 0) break;
        lVar12 = lVar12 + -1;
        WVar2 = *pWVar26;
        pWVar26 = pWVar26 + 1;
      } while (WVar2 != L'\0');
      FUN_140056dd0(&local_3d8,local_258);
      if (pcVar10 != (char *)0x0) {
        iVar4 = atoi(pcVar10);
        local_3b0 = CONCAT44(local_3b0._4_4_,iVar4);
      }
      if (pcVar11 != (char *)0x0) {
        iVar4 = atoi(pcVar11);
        local_3b0 = CONCAT44(iVar4,(undefined4)local_3b0);
      }
      if (pcVar9 != (char *)0x0) {
        iVar4 = atoi(pcVar9);
        local_3a8 = CONCAT44(local_3a8._4_4_,iVar4);
      }
      if (pcVar8 != (char *)0x0) {
        iVar4 = atoi(pcVar8);
        local_3a0 = CONCAT44(local_3a0._4_4_,iVar4);
      }
      if (pcVar22 != (char *)0x0) {
        iVar4 = atoi(pcVar22);
        local_3a8 = CONCAT44(iVar4,(undefined4)local_3a8);
      }
      param_1 = local_4a0;
      FUN_140140d20(local_4a0 + 0x188,&local_3d8);
      for (plVar18 = *(longlong **)(local_4a8 + 0x50); plVar18 != (longlong *)0x0;
          plVar18 = (longlong *)plVar18[10]) {
        lVar12 = (**(code **)(*plVar18 + 0x30))(plVar18);
        if (lVar12 != 0) {
          pcVar7 = (char *)(**(code **)(*plVar18 + 0x30))(plVar18);
          goto LAB_14013fee0;
        }
      }
      pcVar7 = (char *)0x0;
LAB_14013fee0:
      local_4a8 = pcVar7;
      if (7 < local_3c0) {
        operator_delete((void *)CONCAT62(uStack_3d6,local_3d8));
      }
    }
    if ((*(longlong *)(param_1 + 400) - *(longlong *)(param_1 + 0x188) & 0xffffffffffffffc0U) == 0)
    {
      local_3c0 = 7;
      local_3c8 = 0;
      local_3d8 = 0;
      local_3b0 = 0;
      local_3a8 = 0;
      local_3a0 = 0;
      FUN_140056dd0(&local_3d8,&DAT_1402932c0,3);
      local_3b0 = 0x6400000001;
      local_3a8 = 0x100000001;
      local_3a0 = CONCAT44(local_3a0._4_4_,1);
      FUN_140140d20(param_1 + 0x188,&local_3d8);
      if (7 < local_3c0) {
        operator_delete((void *)CONCAT62(uStack_3d6,local_3d8));
      }
    }
  }
  DAT_14032efe0 = 0;
  DAT_14032efe1 = 0;
  DAT_14032efe2 = 0;
  DAT_14032efe3 = 0;
  DAT_14032efe5 = 1;
  DAT_14032efe6 = 1;
  lVar12 = FUN_14014a040(&local_498,"develop");
  if (lVar12 != 0) {
    pcVar7 = (char *)FUN_14014a320(lVar12,"preload");
    pcVar19 = (char *)FUN_14014a320(lVar12,"preload_char");
    pcVar8 = (char *)FUN_14014a320(lVar12,"enemy_debug");
    pcVar9 = (char *)FUN_14014a320(lVar12,"enemy_one");
    pcVar10 = (char *)FUN_14014a320(lVar12,"player_debug");
    pcVar11 = (char *)FUN_14014a320(lVar12,"lua_text");
    if (pcVar7 != (char *)0x0) {
      iVar4 = atoi(pcVar7);
      DAT_14032efe5 = 0 < iVar4;
    }
    if (pcVar19 != (char *)0x0) {
      iVar4 = atoi(pcVar19);
      DAT_14032efe6 = 0 < iVar4;
    }
    if (pcVar9 != (char *)0x0) {
      iVar4 = atoi(pcVar9);
      DAT_14032efe1 = 0 < iVar4;
    }
    if (pcVar8 != (char *)0x0) {
      iVar4 = atoi(pcVar8);
      DAT_14032efe0 = 0 < iVar4;
    }
    if (pcVar10 != (char *)0x0) {
      iVar4 = atoi(pcVar10);
      DAT_14032efe2 = 0 < iVar4;
    }
    if (pcVar11 != (char *)0x0) {
      iVar4 = atoi(pcVar11);
      DAT_14032efe3 = 0 < iVar4;
    }
  }
  _Format = L"=================DNS. ServerParseOption============== \n";
  if (*(char *)(param_1 + 0x151) == '\0') {
    _Format = L"=================IP. ServerParseOption============== \n";
  }
  wprintf(_Format);
  wprintf(L"(PRIVATE)\t[ADDRESS:%s] [PORT:%d] \n");
  wprintf(L"(PUBLIC)\t[ADDRESS:%s] [PORT:%d] [UDP:%d] [UDPCOUNT:%d] \n");
  wprintf(L"==================================================== \n");
  local_498 = TiXmlDocument::vftable;
  if (local_438 != &DAT_14032f048) {
    operator_delete__(local_430);
  }
  FUN_140149e40(&local_498);
  return 1;
}



void FUN_1401401c0(undefined8 param_1,int *param_2,longlong param_3)

{
  char cVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  longlong lVar5;
  ulonglong uVar6;
  char *_Str;
  char *pcVar7;
  char *pcVar8;
  char *pcVar9;
  bool bVar10;
  
  _Str = (char *)0x0;
  lVar2 = *(longlong *)(param_3 + 0xa0);
  for (lVar5 = lVar2; pcVar7 = _Str, lVar5 != param_3 + 0x58; lVar5 = *(longlong *)(lVar5 + 0x48)) {
    lVar4 = 7;
    pcVar7 = (char *)(*(longlong *)(lVar5 + 0x20) + 0x10);
    bVar10 = pcVar7 == (char *)0x0;
    pcVar8 = "string";
    do {
      if (lVar4 == 0) break;
      lVar4 = lVar4 + -1;
      bVar10 = *pcVar7 == *pcVar8;
      pcVar7 = pcVar7 + 1;
      pcVar8 = pcVar8 + 1;
    } while (bVar10);
    if (bVar10) {
      pcVar7 = (char *)(*(longlong *)(lVar5 + 0x30) + 0x10);
      break;
    }
  }
  do {
    if (lVar2 == param_3 + 0x58) break;
    lVar5 = 8;
    pcVar8 = (char *)(*(longlong *)(lVar2 + 0x20) + 0x10);
    bVar10 = pcVar8 == (char *)0x0;
    pcVar9 = "timeout";
    do {
      if (lVar5 == 0) break;
      lVar5 = lVar5 + -1;
      bVar10 = *pcVar8 == *pcVar9;
      pcVar8 = pcVar8 + 1;
      pcVar9 = pcVar9 + 1;
    } while (bVar10);
    if (bVar10) {
      _Str = (char *)(*(longlong *)(lVar2 + 0x30) + 0x10);
      break;
    }
    lVar2 = *(longlong *)(lVar2 + 0x48);
  } while( true );
  if (pcVar7 != (char *)0x0) {
    uVar6 = 0xffffffffffffffff;
    pcVar8 = pcVar7;
    do {
      if (uVar6 == 0) break;
      uVar6 = uVar6 - 1;
      cVar1 = *pcVar8;
      pcVar8 = pcVar8 + 1;
    } while (cVar1 != '\0');
    FUN_14004d4d0(param_1,pcVar7,~uVar6 - 1);
  }
  if (_Str != (char *)0x0) {
    iVar3 = atoi(_Str);
    *param_2 = iVar3;
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401402a0(longlong param_1,longlong param_2,byte param_3)

{
  char cVar1;
  longlong lVar2;
  undefined8 *puVar3;
  void *pvVar4;
  undefined4 *puVar5;
  undefined8 uVar6;
  void **_Src;
  longlong lVar7;
  ulonglong uVar8;
  char *pcVar9;
  char *pcVar10;
  char *pcVar11;
  bool bVar12;
  undefined1 auStack_178 [32];
  void *local_158;
  undefined4 *local_150;
  undefined8 local_148;
  undefined4 *local_138;
  undefined4 *local_130;
  undefined8 local_128;
  undefined1 local_120 [24];
  undefined1 local_108 [24];
  byte local_f0;
  undefined7 uStack_ef;
  void *local_e8;
  undefined8 local_e0;
  ulonglong local_d8;
  undefined8 local_c8;
  undefined2 local_c0;
  undefined6 uStack_be;
  undefined8 local_b0;
  ulonglong local_a8;
  void *local_98 [2];
  void *local_88;
  void *local_80;
  byte local_68;
  undefined1 uStack_67;
  undefined6 uStack_66;
  void *local_60;
  undefined8 local_58;
  ulonglong local_50;
  ulonglong local_40;
  
  local_128 = 0xfffffffffffffffe;
  local_40 = DAT_1403223c0 ^ (ulonglong)auStack_178;
  pcVar10 = (char *)0x0;
  local_c8 = 0;
  local_a8 = 7;
  local_b0 = 0;
  local_c0 = 0;
  local_80 = (void *)0x7;
  local_88 = (void *)0x0;
  local_98[0] = (void *)((ulonglong)local_98[0] & 0xffffffffffff0000);
  for (lVar2 = *(longlong *)(param_2 + 0xa0); lVar2 != param_2 + 0x58;
      lVar2 = *(longlong *)(lVar2 + 0x48)) {
    pcVar9 = (char *)(*(longlong *)(lVar2 + 0x20) + 0x10);
    bVar12 = pcVar9 == (char *)0x0;
    lVar7 = 3;
    pcVar11 = "ip";
    do {
      if (lVar7 == 0) break;
      lVar7 = lVar7 + -1;
      bVar12 = *pcVar9 == *pcVar11;
      pcVar9 = pcVar9 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar12);
    if (bVar12) {
      pcVar10 = (char *)(*(longlong *)(lVar2 + 0x30) + 0x10);
      break;
    }
  }
  local_d8 = 0xf;
  local_e0 = 0;
  local_f0 = 0;
  uVar8 = 0xffffffffffffffff;
  pcVar9 = pcVar10;
  do {
    if (uVar8 == 0) break;
    uVar8 = uVar8 - 1;
    cVar1 = *pcVar9;
    pcVar9 = pcVar9 + 1;
  } while (cVar1 != '\0');
  FUN_14004d4d0(&local_f0,pcVar10,~uVar8 - 1);
  _Src = (void **)FUN_1402026a0(&local_68);
  if (local_98 != _Src) {
    if ((void *)0x7 < local_80) {
      operator_delete(local_98[0]);
    }
    local_80 = (void *)0x7;
    local_88 = (void *)0x0;
    local_98[0] = (void *)((ulonglong)local_98[0] & 0xffffffffffff0000);
    if (_Src[3] < (void *)0x8) {
      memmove(local_98,_Src,((longlong)_Src[2] + 1) * 2);
    }
    else {
      local_98[0] = *_Src;
      *_Src = (void *)0x0;
    }
    local_88 = _Src[2];
    local_80 = _Src[3];
    _Src[2] = (void *)0x0;
    _Src[3] = (void *)0x0;
  }
  if (7 < local_50) {
    operator_delete((void *)CONCAT62(uStack_66,CONCAT11(uStack_67,local_68)));
  }
  local_50 = 7;
  local_58 = 0;
  local_68 = 0;
  uStack_67 = 0;
  if (0xf < local_d8) {
    operator_delete((void *)CONCAT71(uStack_ef,local_f0));
  }
  for (lVar2 = *(longlong *)(param_2 + 0xa0); lVar2 != param_2 + 0x58;
      lVar2 = *(longlong *)(lVar2 + 0x48)) {
    pcVar10 = (char *)(*(longlong *)(lVar2 + 0x20) + 0x10);
    bVar12 = pcVar10 == (char *)0x0;
    lVar7 = 5;
    pcVar9 = "port";
    do {
      if (lVar7 == 0) break;
      lVar7 = lVar7 + -1;
      bVar12 = *pcVar10 == *pcVar9;
      pcVar10 = pcVar10 + 1;
      pcVar9 = pcVar9 + 1;
    } while (bVar12);
    if (bVar12) {
      sscanf_s((char *)(*(longlong *)(lVar2 + 0x30) + 0x10),"%d");
      break;
    }
  }
  if (*(longlong *)(param_1 + 0x1c8) != 0) {
    for (puVar3 = *(undefined8 **)
                   (*(longlong *)(param_1 + 0x1a8) +
                   ((ulonglong)param_3 % *(ulonglong *)(param_1 + 0x1b0)) * 8);
        puVar3 != (undefined8 *)0x0; puVar3 = (undefined8 *)*puVar3) {
      if (param_3 == *(byte *)(puVar3 + 1)) {
        if (puVar3 != (undefined8 *)0x0) {
          FUN_140141510(puVar3 + 2,&local_c8);
          goto LAB_1401405f9;
        }
        break;
      }
    }
  }
  local_158 = (void *)0x0;
  local_150 = (undefined4 *)0x0;
  local_148 = 0;
  FUN_140141a20(&local_158);
  puVar5 = local_150;
  local_138 = local_150;
  local_130 = local_150;
  if (local_150 != (undefined4 *)0x0) {
    *local_150 = (undefined4)local_c8;
    local_150[1] = local_c8._4_4_;
    *(undefined8 *)(local_150 + 8) = 7;
    *(undefined8 *)(local_150 + 6) = 0;
    *(undefined2 *)(local_150 + 2) = 0;
    FUN_140056b10(local_150 + 2,&local_c0,0,0xffffffffffffffff);
    *(undefined8 *)(puVar5 + 0x12) = 7;
    *(undefined8 *)(puVar5 + 0x10) = 0;
    *(undefined2 *)(puVar5 + 0xc) = 0;
    FUN_140056b10(puVar5 + 0xc,local_98,0,0xffffffffffffffff);
  }
  local_150 = puVar5 + 0x16;
  local_f0 = param_3;
  FUN_140142470(&local_e8,&local_158);
  uVar6 = local_e0;
  pvVar4 = local_e8;
  local_68 = local_f0;
  local_60 = local_e8;
  local_58 = local_e0;
  local_50 = local_d8;
  local_e8 = (void *)0x0;
  local_e0 = 0;
  local_d8 = 0;
  if (*(longlong *)(param_1 + 0x1c8) == 0) {
    FUN_140142190(param_1 + 0x1a8,local_120,&local_68);
  }
  else {
    FUN_140142070(param_1 + 0x1a8,local_108,&local_68,&local_68);
  }
  if (pvVar4 != (void *)0x0) {
    FUN_1401422e0(pvVar4,uVar6);
    operator_delete(pvVar4);
  }
  pvVar4 = local_158;
  if (local_158 != (void *)0x0) {
    FUN_1401422e0(local_158,puVar5 + 0x16);
    operator_delete(pvVar4);
  }
LAB_1401405f9:
  if ((void *)0x7 < local_80) {
    operator_delete(local_98[0]);
  }
  local_80 = (void *)0x7;
  local_88 = (void *)0x0;
  local_98[0] = (void *)((ulonglong)local_98[0] & 0xffffffffffff0000);
  if (7 < local_a8) {
    operator_delete((void *)CONCAT62(uStack_be,local_c0));
  }
  return;
}



void FUN_140140650(longlong param_1)

{
  if (*(longlong *)(param_1 + 8) != 0) {
    FUN_1401422e0(*(longlong *)(param_1 + 8),*(undefined8 *)(param_1 + 0x10));
    operator_delete(*(void **)(param_1 + 8));
  }
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  return;
}



void FUN_140140690(longlong param_1,undefined8 param_2,byte param_3)

{
  longlong *plVar1;
  undefined8 *puVar2;
  void *pvVar3;
  undefined8 uVar4;
  void *local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  void *local_90;
  undefined8 local_88;
  undefined8 local_80;
  byte local_70 [8];
  void *local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_48;
  undefined1 local_40 [24];
  undefined1 local_28 [32];
  
  local_48 = 0xfffffffffffffffe;
  plVar1 = (longlong *)(param_1 + 0x1a8);
  if (*(longlong *)(param_1 + 0x1c8) != 0) {
    for (puVar2 = *(undefined8 **)
                   (*plVar1 + ((ulonglong)param_3 % *(ulonglong *)(param_1 + 0x1b0)) * 8);
        puVar2 != (undefined8 *)0x0; puVar2 = (undefined8 *)*puVar2) {
      if (param_3 == *(byte *)(puVar2 + 1)) {
        if (puVar2 != (undefined8 *)0x0) {
          FUN_140141510(puVar2 + 2,param_2);
          return;
        }
        break;
      }
    }
  }
  local_90 = (void *)0x0;
  local_88 = 0;
  local_80 = 0;
  FUN_140141510(&local_90,param_2);
  FUN_140142470(&local_b0,&local_90);
  uVar4 = local_a8;
  pvVar3 = local_b0;
  local_68 = local_b0;
  local_60 = local_a8;
  local_58 = local_a0;
  local_b0 = (void *)0x0;
  local_a8 = 0;
  local_a0 = 0;
  local_70[0] = param_3;
  if (*(longlong *)(param_1 + 0x1c8) == 0) {
    FUN_140142190(plVar1,local_40,local_70);
  }
  else {
    FUN_140142070(plVar1,local_28,local_70,local_70);
  }
  if (pvVar3 != (void *)0x0) {
    FUN_1401422e0(pvVar3,uVar4);
    operator_delete(pvVar3);
  }
  pvVar3 = local_90;
  if (local_90 != (void *)0x0) {
    FUN_1401422e0(local_90,local_88);
    operator_delete(pvVar3);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined2 * FUN_1401407f0(undefined2 *param_1,LPCWSTR param_2)

{
  char cVar1;
  WCHAR WVar2;
  short sVar3;
  char *pcVar4;
  short *psVar5;
  longlong lVar6;
  ulonglong uVar7;
  wchar_t *pwVar8;
  LPCWSTR pWVar9;
  char *pcVar10;
  short *psVar11;
  undefined4 uVar12;
  undefined1 auStackY_1d8 [32];
  undefined1 local_188;
  undefined7 uStack_187;
  undefined8 local_178;
  ulonglong local_170;
  undefined2 local_160;
  undefined6 uStack_15e;
  undefined8 local_150;
  ulonglong local_148;
  CHAR local_138;
  undefined1 local_137 [271];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStackY_1d8;
  if (param_2 == (LPCWSTR)0x0) {
    *(undefined8 *)(param_1 + 0xc) = 7;
    *(undefined8 *)(param_1 + 8) = 0;
    *param_1 = 0;
    uVar12 = 10;
    pwVar8 = L"Invalid-IP";
  }
  else {
    local_138 = '\0';
    memset(local_137,0,0x103);
    lVar6 = -1;
    pWVar9 = param_2;
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      WVar2 = *pWVar9;
      pWVar9 = pWVar9 + 1;
    } while (WVar2 != L'\0');
    WideCharToMultiByte(0,0,param_2,~(uint)lVar6,&local_138,0x104,(LPCSTR)0x0,(LPBOOL)0x0);
    lVar6 = Ordinal_52(&local_138);
    if (lVar6 != 0) {
      FUN_14013c6f0(lVar6);
      pcVar4 = (char *)Ordinal_12();
      local_170 = 0xf;
      local_178 = 0;
      local_188 = 0;
      uVar7 = 0xffffffffffffffff;
      pcVar10 = pcVar4;
      do {
        if (uVar7 == 0) break;
        uVar7 = uVar7 - 1;
        cVar1 = *pcVar10;
        pcVar10 = pcVar10 + 1;
      } while (cVar1 != '\0');
      FUN_14004d4d0(&local_188,pcVar4,~uVar7 - 1);
      psVar5 = (short *)FUN_1402026a0(&local_160,&local_188);
      if (7 < *(ulonglong *)(psVar5 + 0xc)) {
        psVar5 = *(short **)psVar5;
      }
      *(undefined8 *)(param_1 + 0xc) = 7;
      *(undefined8 *)(param_1 + 8) = 0;
      *param_1 = 0;
      uVar7 = 0xffffffffffffffff;
      psVar11 = psVar5;
      do {
        if (uVar7 == 0) break;
        uVar7 = uVar7 - 1;
        sVar3 = *psVar11;
        psVar11 = psVar11 + 1;
      } while (sVar3 != 0);
      FUN_140056dd0(param_1,psVar5,~uVar7 - 1);
      if (7 < local_148) {
        operator_delete((void *)CONCAT62(uStack_15e,local_160));
      }
      local_148 = 7;
      local_150 = 0;
      local_160 = 0;
      if (local_170 < 0x10) {
        return param_1;
      }
      operator_delete((void *)CONCAT71(uStack_187,local_188));
      return param_1;
    }
    *(undefined8 *)(param_1 + 0xc) = 7;
    *(undefined8 *)(param_1 + 8) = 0;
    *param_1 = 0;
    uVar12 = 7;
    pwVar8 = L"None-IP";
  }
  FUN_140056dd0(param_1,pwVar8,uVar12);
  return param_1;
}



void FUN_1401409f0(longlong param_1)

{
  char *pcVar1;
  
  printf("//////////////////////////////////////////////////////////////////////////\n");
  pcVar1 = "Auto Revive  : On  \n";
  if (*(char *)(param_1 + 0x171) == '\0') {
    pcVar1 = "Auto Revive  : Off \n";
  }
  printf(pcVar1);
  pcVar1 = "Auto Channel : On  \n";
  if (*(char *)(param_1 + 0x170) == '\0') {
    pcVar1 = "Auto Channel : Off \n";
  }
  printf(pcVar1);
  pcVar1 = "Auto Start   : Off \n";
  if (*(double *)(param_1 + 0x178) != 0.0) {
    pcVar1 = "Auto Start   : On  \n";
  }
  printf(pcVar1);
  pcVar1 = "Lock Check   : Off \n";
  if (*(double *)(param_1 + 0x168) != 0.0) {
    pcVar1 = "Lock Check   : On  \n";
  }
  printf(pcVar1);
  pcVar1 = "Multi Server : On  \n";
  if (*(char *)(param_1 + 0x166) == '\0') {
    pcVar1 = "Multi Server : Off \n";
  }
  printf(pcVar1);
  pcVar1 = "Active       : On  \n";
  if (*(char *)(param_1 + 0x180) == '\0') {
    pcVar1 = "Active       : Off \n";
  }
  printf(pcVar1);
                    // WARNING: Could not recover jumptable at 0x000140140ad6. Too many branches
                    // WARNING: Treating indirect jump as call
  printf("//////////////////////////////////////////////////////////////////////////\n");
  return;
}



undefined8 FUN_140140ae0(undefined8 param_1)

{
  char cVar1;
  longlong lVar2;
  undefined8 *puVar3;
  longlong *plVar4;
  char *pcVar5;
  char *pcVar6;
  bool bVar7;
  undefined **local_98 [5];
  longlong *local_70;
  undefined8 *local_60;
  void *local_58;
  undefined8 *local_38;
  void *local_30;
  undefined8 local_18;
  
  local_18 = 0xfffffffffffffffe;
  puVar3 = &DAT_140327928;
  if (0xf < DAT_140327940) {
    puVar3 = DAT_140327928;
  }
  FUN_14014a910(local_98,puVar3);
  DAT_140325ab8 = 0;
  cVar1 = FUN_14014a9e0(local_98,local_60 + 2);
  plVar4 = local_70;
  if (cVar1 == '\0') {
    printf("%s Error Agent Parse !!! \n");
    local_98[0] = TiXmlDocument::vftable;
    if (local_38 != &DAT_14032f048) {
      operator_delete__(local_30);
    }
    local_98[0] = TiXmlNode::vftable;
    while (local_70 != (longlong *)0x0) {
      plVar4 = (longlong *)local_70[10];
      (**(code **)*local_70)(local_70,1);
      local_70 = plVar4;
    }
    if (local_60 != &DAT_14032f048) {
      operator_delete__(local_58);
    }
    return 0;
  }
  for (; plVar4 != (longlong *)0x0; plVar4 = (longlong *)plVar4[10]) {
    bVar7 = (char *)(plVar4[7] + 0x10) == (char *)0x0;
    lVar2 = 7;
    pcVar5 = (char *)(plVar4[7] + 0x10);
    pcVar6 = "server";
    do {
      if (lVar2 == 0) break;
      lVar2 = lVar2 + -1;
      bVar7 = *pcVar5 == *pcVar6;
      pcVar5 = pcVar5 + 1;
      pcVar6 = pcVar6 + 1;
    } while (bVar7);
    if (bVar7) goto LAB_140140c23;
  }
LAB_140140c75:
  local_98[0] = TiXmlDocument::vftable;
  if (local_38 != &DAT_14032f048) {
    operator_delete__(local_30);
  }
  local_98[0] = TiXmlNode::vftable;
  while (local_70 != (longlong *)0x0) {
    plVar4 = (longlong *)local_70[10];
    (**(code **)*local_70)(local_70,1);
    local_70 = plVar4;
  }
  if (local_60 != &DAT_14032f048) {
    operator_delete__(local_58);
  }
  return 1;
LAB_140140c23:
  while (lVar2 = (**(code **)(*plVar4 + 0x30))(plVar4), lVar2 == 0) {
    do {
      plVar4 = (longlong *)plVar4[10];
      if (plVar4 == (longlong *)0x0) goto LAB_140140c75;
      bVar7 = (char *)(plVar4[7] + 0x10) == (char *)0x0;
      lVar2 = 7;
      pcVar5 = (char *)(plVar4[7] + 0x10);
      pcVar6 = "server";
      do {
        if (lVar2 == 0) break;
        lVar2 = lVar2 + -1;
        bVar7 = *pcVar5 == *pcVar6;
        pcVar5 = pcVar5 + 1;
        pcVar6 = pcVar6 + 1;
      } while (bVar7);
    } while (!bVar7);
  }
  lVar2 = (**(code **)(*plVar4 + 0x30))(plVar4);
  if (lVar2 != 0) {
    FUN_1401402a0(param_1,lVar2,0xd);
  }
  goto LAB_140140c75;
}



void thunk_FUN_140141700(void)

{
  FUN_140141700();
  return;
}



void FUN_140140d20(ulonglong *param_1,ulonglong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = param_1[1];
  if ((param_2 < uVar1) && (uVar2 = *param_1, uVar2 <= param_2)) {
    if (uVar1 == param_1[2]) {
      FUN_140141670(param_1);
    }
    FUN_140141e00(param_1[1],(param_2 - uVar2 & 0xffffffffffffffc0) + *param_1);
    param_1[1] = param_1[1] + 0x40;
    return;
  }
  if (uVar1 == param_1[2]) {
    FUN_140141670(param_1);
  }
  FUN_140142360(param_1[1],param_2);
  param_1[1] = param_1[1] + 0x40;
  return;
}



void FUN_140140da0(undefined8 *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ulonglong uVar3;
  
  *param_1 = Proud::CFastArray<>::vftable;
  if (0 < (int)*(uint *)(param_1 + 3)) {
    lVar2 = param_1[2];
    uVar3 = (ulonglong)*(uint *)(param_1 + 3);
    do {
      FUN_140050520(lVar2);
      lVar2 = lVar2 + 8;
      uVar3 = uVar3 - 1;
    } while (uVar3 != 0);
  }
  if (param_1[2] != 0) {
    plVar1 = (longlong *)param_1[1];
    if (plVar1 != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x000140140e0b. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*plVar1 + 0x18))(plVar1,param_1[2]);
      return;
    }
    FUN_140156970();
  }
  return;
}



basic_ostream<> * FUN_140140e20(basic_ostream<> *param_1)

{
  *(undefined **)param_1 = &DAT_1402937e0;
  std::basic_ios<>::basic_ios<>((basic_ios<> *)(param_1 + 0x88));
  std::basic_ostream<>::basic_ostream<>(param_1,(basic_streambuf<> *)(param_1 + 8),false);
  *(undefined ***)(param_1 + *(int *)(*(longlong *)param_1 + 4)) =
       std::basic_ostringstream<>::vftable;
  std::basic_streambuf<>::basic_streambuf<>((basic_streambuf<> *)(param_1 + 8));
  *(undefined ***)(param_1 + 8) = std::basic_stringbuf<>::vftable;
  *(undefined8 *)(param_1 + 0x78) = 0;
  *(undefined4 *)(param_1 + 0x80) = 4;
  return param_1;
}



undefined8 FUN_140140ec0(longlong param_1,undefined8 param_2)

{
  FUN_140141790(param_1 + 8);
  return param_2;
}



void FUN_140140ef0(basic_streambuf<> *param_1)

{
  *(undefined ***)param_1 = std::basic_stringbuf<>::vftable;
  if (((byte)param_1[0x78] & 1) != 0) {
    operator_delete((void *)**(undefined8 **)(param_1 + 0x20));
  }
  **(undefined8 **)(param_1 + 0x20) = 0;
  **(undefined8 **)(param_1 + 0x40) = 0;
  **(undefined4 **)(param_1 + 0x58) = 0;
  **(undefined8 **)(param_1 + 0x28) = 0;
  **(undefined8 **)(param_1 + 0x48) = 0;
  **(undefined4 **)(param_1 + 0x60) = 0;
  *(uint *)(param_1 + 0x78) = *(uint *)(param_1 + 0x78) & 0xfffffffe;
  *(undefined8 *)(param_1 + 0x70) = 0;
                    // WARNING: Could not recover jumptable at 0x000140140f50. Too many branches
                    // WARNING: Treating indirect jump as call
  std::basic_streambuf<>::~basic_streambuf<>(param_1);
  return;
}



int FUN_140140f60(basic_streambuf<> *param_1,int param_2)

{
  basic_streambuf<> bVar1;
  void *_Src;
  undefined8 uVar2;
  char *pcVar3;
  void *_Dst;
  ulonglong uVar4;
  longlong lVar5;
  int iVar6;
  ulonglong uVar7;
  int iVar8;
  
  if (((byte)param_1[0x78] & 8) != 0) {
    uVar7 = **(ulonglong **)(param_1 + 0x48);
    if ((uVar7 != 0) && (uVar4 = *(ulonglong *)(param_1 + 0x70), uVar7 < uVar4)) {
      iVar6 = **(int **)(param_1 + 0x60);
      **(ulonglong **)(param_1 + 0x48) = uVar4;
      **(int **)(param_1 + 0x60) = (iVar6 + (int)uVar7) - (int)uVar4;
    }
  }
  if (param_2 == -1) {
    return 0;
  }
  uVar7 = **(ulonglong **)(param_1 + 0x48);
  if ((uVar7 != 0) && (uVar7 < (longlong)**(int **)(param_1 + 0x60) + uVar7)) {
    pcVar3 = std::basic_streambuf<>::_Pninc(param_1);
    *pcVar3 = (char)param_2;
    return param_2;
  }
  if (((byte)param_1[0x78] & 2) != 0) {
    return -1;
  }
  if (uVar7 == 0) {
    uVar7 = 0;
  }
  else {
    uVar7 = ((longlong)**(int **)(param_1 + 0x60) - **(longlong **)(param_1 + 0x20)) + uVar7;
  }
  uVar4 = uVar7 >> 1;
  if (uVar4 < 0x20) {
    uVar4 = 0x20;
  }
  else if (uVar4 == 0) {
    return -1;
  }
  do {
    if (uVar7 <= 0x7fffffff - uVar4) break;
    uVar4 = uVar4 >> 1;
  } while (uVar4 != 0);
  if (uVar4 != 0) {
    _Dst = (void *)FUN_14004d2c0(uVar4 + uVar7);
    _Src = (void *)**(undefined8 **)(param_1 + 0x20);
    iVar8 = (int)(uVar4 + uVar7);
    iVar6 = (int)_Dst;
    if ((uVar7 == 0) || (memcpy(_Dst,_Src,uVar7), uVar7 == 0)) {
      *(void **)(param_1 + 0x70) = _Dst;
      **(undefined8 **)(param_1 + 0x28) = _Dst;
      **(undefined8 **)(param_1 + 0x48) = _Dst;
      **(int **)(param_1 + 0x60) = iVar8;
      bVar1 = param_1[0x78];
      **(undefined8 **)(param_1 + 0x20) = _Dst;
      if (((byte)bVar1 & 4) == 0) {
        **(undefined8 **)(param_1 + 0x40) = _Dst;
        **(undefined4 **)(param_1 + 0x58) = 1;
      }
      else {
        **(undefined8 **)(param_1 + 0x40) = 0;
        **(int **)(param_1 + 0x58) = iVar6;
      }
    }
    else {
      *(longlong *)(param_1 + 0x70) =
           (longlong)_Dst + (*(longlong *)(param_1 + 0x70) - (longlong)_Src);
      lVar5 = **(longlong **)(param_1 + 0x48);
      **(longlong **)(param_1 + 0x28) =
           (longlong)_Dst + (**(longlong **)(param_1 + 0x28) - (longlong)_Src);
      lVar5 = (lVar5 - (longlong)_Src) + (longlong)_Dst;
      **(longlong **)(param_1 + 0x48) = lVar5;
      **(int **)(param_1 + 0x60) = (iVar6 - (int)lVar5) + iVar8;
      if (((byte)param_1[0x78] & 4) == 0) {
        uVar2 = **(undefined8 **)(param_1 + 0x48);
        lVar5 = **(longlong **)(param_1 + 0x40);
        **(undefined8 **)(param_1 + 0x20) = _Dst;
        lVar5 = (lVar5 - (longlong)_Src) + (longlong)_Dst;
        **(longlong **)(param_1 + 0x40) = lVar5;
        **(int **)(param_1 + 0x58) = ((int)uVar2 - (int)lVar5) + 1;
      }
      else {
        **(undefined8 **)(param_1 + 0x20) = _Dst;
        **(undefined8 **)(param_1 + 0x40) = 0;
        **(int **)(param_1 + 0x58) = iVar6;
      }
    }
    if (((byte)param_1[0x78] & 1) != 0) {
      operator_delete(_Src);
    }
    *(uint *)(param_1 + 0x78) = *(uint *)(param_1 + 0x78) | 1;
    pcVar3 = std::basic_streambuf<>::_Pninc(param_1);
    *pcVar3 = (char)param_2;
    return param_2;
  }
  return -1;
}



int FUN_1401411a0(longlong param_1,int param_2)

{
  ulonglong uVar1;
  
  uVar1 = **(ulonglong **)(param_1 + 0x40);
  if (((uVar1 != 0) && (**(ulonglong **)(param_1 + 0x20) < uVar1)) &&
     ((param_2 == -1 ||
      (((char)param_2 == *(char *)(uVar1 - 1) || ((*(byte *)(param_1 + 0x78) & 2) == 0)))))) {
    **(int **)(param_1 + 0x58) = **(int **)(param_1 + 0x58) + 1;
    **(longlong **)(param_1 + 0x40) = **(longlong **)(param_1 + 0x40) + -1;
    if (param_2 != -1) {
      *(char *)**(undefined8 **)(param_1 + 0x40) = (char)param_2;
      return param_2;
    }
    return 0;
  }
  return -1;
}



ulonglong FUN_1401411f0(longlong param_1)

{
  byte *pbVar1;
  byte *pbVar2;
  
  pbVar1 = *(byte **)*(int **)(param_1 + 0x40);
  if (pbVar1 != (byte *)0x0) {
    if (pbVar1 < pbVar1 + **(int **)(param_1 + 0x58)) {
      return (ulonglong)*pbVar1;
    }
    if ((((*(byte *)(param_1 + 0x78) & 4) == 0) &&
        (pbVar2 = (byte *)**(undefined8 **)(param_1 + 0x48), pbVar2 != (byte *)0x0)) &&
       ((pbVar1 < pbVar2 || (pbVar1 < *(byte **)(param_1 + 0x70))))) {
      if (*(byte **)(param_1 + 0x70) < pbVar2) {
        *(byte **)(param_1 + 0x70) = pbVar2;
      }
      **(int **)(param_1 + 0x58) = (int)*(undefined8 *)(param_1 + 0x70) - **(int **)(param_1 + 0x40)
      ;
      return (ulonglong)*(byte *)**(undefined8 **)(param_1 + 0x40);
    }
  }
  return 0xffffffff;
}



longlong *
FUN_140141260(longlong param_1,longlong *param_2,longlong param_3,int param_4,uint param_5)

{
  ulonglong uVar1;
  longlong lVar2;
  longlong lVar3;
  int iVar4;
  
  uVar1 = **(ulonglong **)(param_1 + 0x48);
  if ((uVar1 != 0) && (*(ulonglong *)(param_1 + 0x70) < uVar1)) {
    *(ulonglong *)(param_1 + 0x70) = uVar1;
  }
  if (((param_5 & 1) == 0) || (lVar2 = **(longlong **)(param_1 + 0x40), lVar2 == 0)) {
    if (((param_5 & 2) == 0) || (uVar1 = **(ulonglong **)(param_1 + 0x48), uVar1 == 0)) {
      if (param_3 != 0) {
        param_3 = *(longlong *)_BADOFF_exref;
      }
      goto LAB_1401413de;
    }
    if (param_4 == 2) {
      param_3 = param_3 + (*(longlong *)(param_1 + 0x70) - **(longlong **)(param_1 + 0x20));
    }
    else if (param_4 == 1) {
      param_3 = param_3 + (uVar1 - **(longlong **)(param_1 + 0x20));
    }
    else if (param_4 != 0) {
      param_3 = *(longlong *)_BADOFF_exref;
    }
    if ((-1 < param_3) &&
       (param_3 <= *(longlong *)(param_1 + 0x70) - **(longlong **)(param_1 + 0x20))) {
      iVar4 = ((int)**(longlong **)(param_1 + 0x20) - (int)uVar1) + (int)param_3;
      **(int **)(param_1 + 0x60) = **(int **)(param_1 + 0x60) - iVar4;
      **(longlong **)(param_1 + 0x48) = **(longlong **)(param_1 + 0x48) + (longlong)iVar4;
      goto LAB_1401413de;
    }
  }
  else {
    if (param_4 == 2) {
      param_3 = param_3 + (*(longlong *)(param_1 + 0x70) - **(longlong **)(param_1 + 0x20));
    }
    else if (param_4 == 1) {
      if ((param_5 & 2) == 0) {
        param_3 = param_3 + (lVar2 - **(longlong **)(param_1 + 0x20));
      }
      else {
LAB_1401412e0:
        param_3 = *(longlong *)_BADOFF_exref;
      }
    }
    else if (param_4 != 0) goto LAB_1401412e0;
    if ((-1 < param_3) &&
       (param_3 <= *(longlong *)(param_1 + 0x70) - **(longlong **)(param_1 + 0x20))) {
      iVar4 = ((int)**(longlong **)(param_1 + 0x20) - (int)lVar2) + (int)param_3;
      **(int **)(param_1 + 0x58) = **(int **)(param_1 + 0x58) - iVar4;
      **(longlong **)(param_1 + 0x40) = **(longlong **)(param_1 + 0x40) + (longlong)iVar4;
      if ((param_5 & 2) != 0) {
        lVar2 = **(longlong **)(param_1 + 0x48);
        if (lVar2 != 0) {
          iVar4 = **(int **)(param_1 + 0x60);
          lVar3 = **(longlong **)(param_1 + 0x40);
          **(longlong **)(param_1 + 0x48) = lVar3;
          **(int **)(param_1 + 0x60) = (iVar4 + (int)lVar2) - (int)lVar3;
        }
      }
      goto LAB_1401413de;
    }
  }
  param_3 = *(longlong *)_BADOFF_exref;
LAB_1401413de:
  *param_2 = param_3;
  param_2[1] = 0;
  *(undefined4 *)(param_2 + 2) = 0;
  return param_2;
}



longlong * FUN_140141400(longlong param_1,longlong *param_2,longlong *param_3,uint param_4)

{
  ulonglong uVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  longlong lVar5;
  
  lVar4 = (longlong)(int)param_3[1] + *param_3;
  uVar1 = **(ulonglong **)(param_1 + 0x48);
  if ((uVar1 != 0) && (*(ulonglong *)(param_1 + 0x70) < uVar1)) {
    *(ulonglong *)(param_1 + 0x70) = uVar1;
  }
  lVar2 = *(longlong *)_BADOFF_exref;
  lVar5 = lVar4;
  if (lVar4 != lVar2) {
    lVar5 = lVar2;
    if (((param_4 & 1) == 0) || (**(longlong **)(param_1 + 0x40) == 0)) {
      if (((param_4 & 2) != 0) &&
         (((uVar1 = **(ulonglong **)(param_1 + 0x48), uVar1 != 0 && (-1 < lVar4)) &&
          (lVar4 <= *(longlong *)(param_1 + 0x70) - **(longlong **)(param_1 + 0x20))))) {
        iVar3 = ((int)**(longlong **)(param_1 + 0x20) - (int)uVar1) + (int)lVar4;
        **(int **)(param_1 + 0x60) = **(int **)(param_1 + 0x60) - iVar3;
        **(longlong **)(param_1 + 0x48) = **(longlong **)(param_1 + 0x48) + (longlong)iVar3;
        lVar5 = lVar4;
      }
    }
    else if ((-1 < lVar4) &&
            (lVar4 <= *(longlong *)(param_1 + 0x70) - **(longlong **)(param_1 + 0x20))) {
      iVar3 = ((int)**(longlong **)(param_1 + 0x20) - (int)**(longlong **)(param_1 + 0x40)) +
              (int)lVar4;
      **(int **)(param_1 + 0x58) = **(int **)(param_1 + 0x58) - iVar3;
      **(longlong **)(param_1 + 0x40) = **(longlong **)(param_1 + 0x40) + (longlong)iVar3;
      lVar5 = lVar4;
      if ((param_4 & 2) != 0) {
        lVar2 = **(longlong **)(param_1 + 0x48);
        if (lVar2 != 0) {
          iVar3 = **(int **)(param_1 + 0x60);
          lVar5 = **(longlong **)(param_1 + 0x40);
          **(longlong **)(param_1 + 0x48) = lVar5;
          **(int **)(param_1 + 0x60) = (iVar3 + (int)lVar2) - (int)lVar5;
          lVar5 = lVar4;
        }
      }
    }
  }
  *param_2 = lVar5;
  param_2[1] = 0;
  *(undefined4 *)(param_2 + 2) = 0;
  return param_2;
}



void FUN_140141510(ulonglong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  uVar1 = param_1[1];
  if ((param_2 < uVar1) && (uVar2 = *param_1, uVar2 <= param_2)) {
    if (uVar1 == param_1[2]) {
      FUN_140141a20(param_1);
    }
    if (param_1[1] != 0) {
      FUN_1401423e0(param_1[1],((longlong)(param_2 - uVar2) / 0x58) * 0x58 + *param_1,param_3,
                    param_4,uVar3);
    }
  }
  else {
    if (uVar1 == param_1[2]) {
      FUN_140141a20(param_1);
    }
    if (param_1[1] != 0) {
      FUN_1401423e0(param_1[1],param_2,param_3,param_4,uVar3);
    }
  }
  param_1[1] = param_1[1] + 0x58;
  return;
}



void * FUN_1401415d0(void *param_1,uint param_2)

{
  FUN_140140da0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void * FUN_140141600(longlong param_1,uint param_2)

{
  void *pvVar1;
  
  pvVar1 = (void *)(param_1 + -0x88);
  FUN_14013e2e0(pvVar1);
  if ((param_2 & 1) != 0) {
    operator_delete(pvVar1);
  }
  return pvVar1;
}



void * FUN_140141640(void *param_1,uint param_2)

{
  FUN_140140ef0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140141670(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = param_1[1] - *param_1 >> 6;
  if (0x3fffffffffffffe < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = param_1[2] - *param_1 >> 6;
  if (uVar2 < uVar3) {
    if (0x3ffffffffffffff - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140141b20(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140141b20(param_1,uVar2);
  }
  return;
}



void FUN_140141700(undefined8 *param_1)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  puVar2 = (undefined8 *)*param_1;
  if (puVar2 != (undefined8 *)0x0) {
    puVar1 = (undefined8 *)param_1[1];
    for (; puVar2 != puVar1; puVar2 = puVar2 + 8) {
      if (7 < (ulonglong)puVar2[3]) {
        operator_delete((void *)*puVar2);
      }
      puVar2[3] = 7;
      puVar2[2] = 0;
      *(undefined2 *)puVar2 = 0;
    }
    operator_delete((void *)*param_1);
  }
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void ** FUN_140141790(longlong param_1,void **param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  undefined1 auStack_68 [32];
  undefined4 local_48;
  undefined8 local_40;
  void *local_38 [2];
  void *local_28;
  void *local_20;
  ulonglong local_10;
  
  local_40 = 0xfffffffffffffffe;
  local_10 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_48 = 0;
  if (((*(uint *)(param_1 + 0x78) & 2) == 0) && (**(ulonglong **)(param_1 + 0x48) != 0)) {
    uVar1 = **(ulonglong **)(param_1 + 0x48);
    uVar2 = *(ulonglong *)(param_1 + 0x70);
    if (*(ulonglong *)(param_1 + 0x70) < uVar1) {
      uVar2 = uVar1;
    }
    local_20 = (void *)0xf;
    local_28 = (void *)0x0;
    local_38[0] = (void *)((ulonglong)local_38[0]._1_7_ << 8);
    FUN_14004d4d0(local_38,**(longlong **)(param_1 + 0x28),uVar2 - **(longlong **)(param_1 + 0x28));
    param_2[3] = (void *)0xf;
    param_2[2] = (void *)0x0;
    *(undefined1 *)param_2 = 0;
    if (param_2 != local_38) {
      if ((void *)0xf < param_2[3]) {
        operator_delete(*param_2);
      }
      param_2[3] = (void *)0xf;
      param_2[2] = (void *)0x0;
      *(undefined1 *)param_2 = 0;
      if (local_20 < (void *)0x10) {
        memmove(param_2,local_38,(longlong)local_28 + 1);
      }
      else {
        *param_2 = local_38[0];
        local_38[0] = (void *)0x0;
      }
      param_2[2] = local_28;
      param_2[3] = local_20;
      local_28 = (void *)0x0;
      local_20 = (void *)0x0;
    }
  }
  else if (((*(uint *)(param_1 + 0x78) & 4) == 0) && (**(longlong **)(param_1 + 0x40) != 0)) {
    local_20 = (void *)0xf;
    local_28 = (void *)0x0;
    local_38[0] = (void *)((ulonglong)local_38[0]._1_7_ << 8);
    FUN_14004d4d0(local_38,**(longlong **)(param_1 + 0x20),
                  ((longlong)**(int **)(param_1 + 0x58) + **(longlong **)(param_1 + 0x40)) -
                  **(longlong **)(param_1 + 0x20));
    param_2[3] = (void *)0xf;
    param_2[2] = (void *)0x0;
    *(undefined1 *)param_2 = 0;
    if (param_2 != local_38) {
      if ((void *)0xf < param_2[3]) {
        operator_delete(*param_2);
      }
      param_2[3] = (void *)0xf;
      param_2[2] = (void *)0x0;
      *(undefined1 *)param_2 = 0;
      if (local_20 < (void *)0x10) {
        memmove(param_2,local_38,(longlong)local_28 + 1);
      }
      else {
        *param_2 = local_38[0];
        local_38[0] = (void *)0x0;
      }
      param_2[2] = local_28;
      param_2[3] = local_20;
      local_28 = (void *)0x0;
      local_20 = (void *)0x0;
    }
  }
  else {
    local_20 = (void *)0xf;
    local_28 = (void *)0x0;
    local_38[0] = (void *)((ulonglong)local_38[0]._1_7_ << 8);
    param_2[3] = (void *)0xf;
    param_2[2] = (void *)0x0;
    *(undefined1 *)param_2 = 0;
    if (param_2 != local_38) {
      if ((void *)0xf < param_2[3]) {
        operator_delete(*param_2);
      }
      param_2[3] = (void *)0xf;
      param_2[2] = (void *)0x0;
      *(undefined1 *)param_2 = 0;
      if (local_20 < (void *)0x10) {
        memmove(param_2,local_38,(longlong)local_28 + 1);
      }
      else {
        *param_2 = local_38[0];
        local_38[0] = (void *)0x0;
      }
      param_2[2] = local_28;
      param_2[3] = local_20;
      local_28 = (void *)0x0;
      local_20 = (void *)0x0;
    }
  }
  if ((void *)0xf < local_20) {
    operator_delete(local_38[0]);
  }
  return param_2;
}



void FUN_140141a20(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x58;
  if (0x2e8ba2e8ba2e8b9 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x58;
  if (uVar2 < uVar3) {
    if (0x2e8ba2e8ba2e8ba - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140141c90(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140141c90(param_1,uVar2);
  }
  return;
}



void FUN_140141ae0(longlong *param_1)

{
  if (*param_1 != 0) {
    FUN_1401422e0(*param_1,param_1[1]);
    operator_delete((void *)*param_1);
  }
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  return;
}



void FUN_140141b20(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x3ffffffffffffff < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)(param_1[2] - *param_1 >> 6) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 << 6);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_140142660(*param_1,param_1[1],local_res10,param_4,uVar5);
    lVar1 = param_1[1];
    lVar2 = *param_1;
    if (lVar2 != 0) {
      FUN_140141c30();
      operator_delete((void *)*param_1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x40);
    param_1[1] = (longlong)(pcVar4 + (lVar1 - lVar2 & 0xffffffffffffffc0));
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140141c30(undefined8 *param_1,undefined8 *param_2)

{
  for (; param_1 != param_2; param_1 = param_1 + 8) {
    if (7 < (ulonglong)param_1[3]) {
      operator_delete((void *)*param_1);
    }
    param_1[3] = 7;
    param_1[2] = 0;
    *(undefined2 *)param_1 = 0;
  }
  return;
}



void FUN_140141c90(longlong *param_1,ulonglong param_2)

{
  longlong lVar1;
  longlong lVar2;
  code *pcVar3;
  longlong lVar4;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  if (0x2e8ba2e8ba2e8ba < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x58) < param_2) {
    lVar4 = FUN_140141d90(param_2);
    FUN_140142710(*param_1,param_1[1],lVar4);
    lVar1 = param_1[1];
    lVar2 = *param_1;
    if (lVar2 != 0) {
      FUN_1401422e0(lVar2,lVar1,lVar1 - lVar2,lVar1,uVar5);
      operator_delete((void *)*param_1);
    }
    param_1[2] = param_2 * 0x58 + lVar4;
    param_1[1] = ((lVar1 - lVar2) / 0x58) * 0x58 + lVar4;
    *param_1 = lVar4;
  }
  return;
}



void * FUN_140141d90(ulonglong param_1)

{
  void *pvVar1;
  char *local_res8 [4];
  undefined **local_28 [5];
  
  if (param_1 == 0) {
    return (void *)0x0;
  }
  if ((param_1 < 0x2e8ba2e8ba2e8bb) &&
     (pvVar1 = operator_new(param_1 * 0x58), pvVar1 != (void *)0x0)) {
    return pvVar1;
  }
  local_res8[0] = (char *)0x0;
  std::exception::exception((exception *)local_28,local_res8);
  local_28[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_28,(ThrowInfo *)&DAT_14031d988);
}



void FUN_140141e00(undefined2 *param_1,longlong param_2)

{
  if (param_1 != (undefined2 *)0x0) {
    *(undefined8 *)(param_1 + 0xc) = 7;
    *(undefined8 *)(param_1 + 8) = 0;
    *param_1 = 0;
    FUN_140056b10(param_1,param_2,0,0xffffffffffffffff,0xfffffffffffffffe);
    *(undefined4 *)(param_1 + 0x14) = *(undefined4 *)(param_2 + 0x28);
    *(undefined4 *)(param_1 + 0x16) = *(undefined4 *)(param_2 + 0x2c);
    *(undefined4 *)(param_1 + 0x18) = *(undefined4 *)(param_2 + 0x30);
    *(undefined4 *)(param_1 + 0x1a) = *(undefined4 *)(param_2 + 0x34);
    *(undefined4 *)(param_1 + 0x1c) = *(undefined4 *)(param_2 + 0x38);
    *(undefined4 *)(param_1 + 0x1e) = *(undefined4 *)(param_2 + 0x3c);
  }
  return;
}



undefined8 * FUN_140141e80(undefined8 *param_1)

{
  longlong lVar1;
  longlong lVar2;
  char *pcVar3;
  
  pcVar3 = "\x05";
  lVar2 = 0x28;
  do {
    lVar1 = lVar2 / 2;
    if (*(ulonglong *)(pcVar3 + lVar1 * 8) < 0xb) {
      pcVar3 = pcVar3 + (lVar1 + 1) * 8;
      lVar1 = lVar2 + (-1 - lVar1);
    }
    lVar2 = lVar1;
  } while (0 < lVar1);
  if (pcVar3 == "dbo.up_read_realtimeevent") {
    pcVar3 = &UNK_14028c388;
  }
  param_1[1] = *(undefined8 *)pcVar3;
  *param_1 = 0;
  *(undefined1 *)(param_1 + 3) = 0;
  param_1[4] = 0;
  *(undefined4 *)(param_1 + 5) = 0x3f800000;
  param_1[6] = 0;
  param_1[7] = 0;
  return param_1;
}



void FUN_140141f00(longlong *param_1)

{
  if (*param_1 != 0) {
    FUN_140141f20();
  }
  return;
}



void FUN_140141f20(undefined8 *param_1)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  longlong lVar4;
  ulonglong *puVar5;
  longlong lVar6;
  undefined8 *puVar7;
  
  puVar7 = (undefined8 *)*param_1;
  puVar1 = puVar7 + param_1[1];
  for (; puVar7 != puVar1; puVar7 = puVar7 + 1) {
    puVar2 = (undefined8 *)*puVar7;
    *puVar7 = 0;
    while (puVar2 != (undefined8 *)0x0) {
      puVar3 = (undefined8 *)*puVar2;
      lVar6 = puVar2[2];
      if (lVar6 != 0) {
        lVar4 = puVar2[3];
        if (lVar6 != lVar4) {
          puVar5 = (ulonglong *)(lVar6 + 0x48);
          do {
            if (7 < *puVar5) {
              operator_delete((void *)puVar5[-3]);
            }
            *puVar5 = 7;
            puVar5[-1] = 0;
            *(undefined2 *)(puVar5 + -3) = 0;
            if (7 < puVar5[-5]) {
              operator_delete((void *)puVar5[-8]);
            }
            puVar5[-5] = 7;
            puVar5[-6] = 0;
            lVar6 = lVar6 + 0x58;
            *(undefined2 *)(puVar5 + -8) = 0;
            puVar5 = puVar5 + 0xb;
          } while (lVar6 != lVar4);
        }
        operator_delete((void *)puVar2[2]);
      }
      puVar2[2] = 0;
      puVar2[3] = 0;
      puVar2[4] = 0;
      operator_delete(puVar2);
      puVar2 = puVar3;
    }
  }
  operator_delete((void *)*param_1);
  *param_1 = 0;
  return;
}



longlong * FUN_140142070(longlong *param_1,longlong *param_2,byte *param_3,undefined1 *param_4)

{
  byte bVar1;
  undefined8 *puVar2;
  char cVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  longlong *local_40;
  undefined8 *local_38;
  undefined2 local_30;
  
  bVar1 = *param_3;
  puVar5 = (undefined8 *)(*param_1 + ((ulonglong)bVar1 % (ulonglong)param_1[1]) * 8);
  puVar2 = (undefined8 *)*puVar5;
  do {
    if (puVar2 == (undefined8 *)0x0) {
LAB_1401420d5:
      local_38 = (undefined8 *)0x0;
      local_30 = 0;
      local_40 = param_1;
      FUN_140142930(&local_40);
      puVar2 = local_38;
      if (local_38 + 1 != (undefined8 *)0x0) {
        *(undefined1 *)(local_38 + 1) = *param_4;
        FUN_140142470(local_38 + 2,param_4 + 8);
      }
      local_30 = CONCAT11(1,(undefined1)local_30);
      cVar3 = FUN_140142530(param_1);
      if (cVar3 != '\0') {
        puVar5 = (undefined8 *)(*param_1 + ((ulonglong)bVar1 % (ulonglong)param_1[1]) * 8);
      }
      *puVar2 = *puVar5;
      *puVar5 = puVar2;
      param_1[4] = param_1[4] + 1;
      puVar4 = (undefined8 *)param_1[6];
      if (puVar5 < (undefined8 *)param_1[6]) {
        puVar4 = puVar5;
      }
      param_1[6] = (longlong)puVar4;
      *param_2 = (longlong)puVar5;
      param_2[1] = (longlong)puVar2;
      *(undefined1 *)(param_2 + 2) = 1;
      return param_2;
    }
    if (bVar1 == *(byte *)(puVar2 + 1)) {
      if (puVar2 != (undefined8 *)0x0) {
        *param_2 = (longlong)puVar5;
        param_2[1] = (longlong)puVar2;
        *(undefined1 *)(param_2 + 2) = 0;
        return param_2;
      }
      goto LAB_1401420d5;
    }
    puVar2 = (undefined8 *)*puVar2;
  } while( true );
}



longlong * FUN_140142190(longlong *param_1,longlong *param_2,byte *param_3)

{
  byte *pbVar1;
  byte **ppbVar2;
  undefined8 *puVar3;
  byte bVar4;
  undefined8 *puVar5;
  longlong lVar6;
  byte **ppbVar7;
  byte *local_res8;
  byte *local_res10;
  longlong *local_30;
  undefined8 *local_28;
  undefined2 local_20;
  
  local_28 = (undefined8 *)0x0;
  local_20 = 0;
  local_30 = param_1;
  FUN_140142930(&local_30);
  puVar5 = local_28;
  pbVar1 = (byte *)(local_28 + 1);
  local_res8 = pbVar1;
  local_res10 = pbVar1;
  if (pbVar1 != (byte *)0x0) {
    *pbVar1 = *param_3;
    FUN_140142470(local_28 + 2);
  }
  local_20 = CONCAT11(1,(undefined1)local_20);
  bVar4 = *pbVar1;
  if (*param_1 == 0) {
    local_res8 = (byte *)FUN_14009f3a0(param_1,1);
    ppbVar2 = (byte **)(param_1 + 1);
    ppbVar7 = &local_res8;
    if (local_res8 <= *ppbVar2) {
      ppbVar7 = ppbVar2;
    }
    *ppbVar2 = *ppbVar7;
    FUN_14009f7b0(param_1);
    FUN_14009f8a0(param_1);
  }
  else {
    local_res10 = (byte *)0x1;
    if ((ulonglong)param_1[7] < 2) {
      local_res8 = (byte *)(((ulonglong)param_1[4] >> 1) + param_1[4]);
      lVar6 = FUN_14009f3a0(param_1);
      if (lVar6 != param_1[1]) {
        FUN_140142770(param_1);
      }
    }
  }
  puVar3 = (undefined8 *)(*param_1 + ((ulonglong)bVar4 % (ulonglong)param_1[1]) * 8);
  *puVar5 = *puVar3;
  *puVar3 = puVar5;
  param_1[4] = param_1[4] + 1;
  param_1[6] = (longlong)puVar3;
  *param_2 = (longlong)puVar3;
  param_2[1] = (longlong)puVar5;
  *(undefined1 *)(param_2 + 2) = 1;
  return param_2;
}



void FUN_1401422e0(ulonglong *param_1,ulonglong *param_2)

{
  ulonglong *puVar1;
  ulonglong *puVar2;
  
  if (param_1 != param_2) {
    puVar2 = param_1 + 9;
    do {
      if (7 < *puVar2) {
        operator_delete((void *)puVar2[-3]);
      }
      *puVar2 = 7;
      puVar2[-1] = 0;
      *(undefined2 *)(puVar2 + -3) = 0;
      if (7 < puVar2[-5]) {
        operator_delete((void *)puVar2[-8]);
      }
      puVar2[-5] = 7;
      puVar2[-6] = 0;
      *(undefined2 *)(puVar2 + -8) = 0;
      puVar1 = puVar2 + 2;
      puVar2 = puVar2 + 0xb;
    } while (puVar1 != param_2);
  }
  return;
}



void FUN_140142360(undefined2 *param_1,longlong param_2)

{
  if (param_1 != (undefined2 *)0x0) {
    *(undefined8 *)(param_1 + 0xc) = 7;
    *(undefined8 *)(param_1 + 8) = 0;
    *param_1 = 0;
    FUN_140056b10(param_1,param_2,0,0xffffffffffffffff,0xfffffffffffffffe);
    *(undefined4 *)(param_1 + 0x14) = *(undefined4 *)(param_2 + 0x28);
    *(undefined4 *)(param_1 + 0x16) = *(undefined4 *)(param_2 + 0x2c);
    *(undefined4 *)(param_1 + 0x18) = *(undefined4 *)(param_2 + 0x30);
    *(undefined4 *)(param_1 + 0x1a) = *(undefined4 *)(param_2 + 0x34);
    *(undefined4 *)(param_1 + 0x1c) = *(undefined4 *)(param_2 + 0x38);
    *(undefined4 *)(param_1 + 0x1e) = *(undefined4 *)(param_2 + 0x3c);
  }
  return;
}



undefined4 * FUN_1401423e0(undefined4 *param_1,undefined4 *param_2)

{
  *param_1 = *param_2;
  param_1[1] = param_2[1];
  *(undefined8 *)(param_1 + 8) = 7;
  *(undefined8 *)(param_1 + 6) = 0;
  *(undefined2 *)(param_1 + 2) = 0;
  FUN_140056b10(param_1 + 2,param_2 + 2,0,0xffffffffffffffff,0xfffffffffffffffe);
  *(undefined8 *)(param_1 + 0x12) = 7;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined2 *)(param_1 + 0xc) = 0;
  FUN_140056b10(param_1 + 0xc,param_2 + 0xc,0,0xffffffffffffffff);
  return param_1;
}



longlong * FUN_140142470(longlong *param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  code *pcVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  uVar2 = (param_2[1] - *param_2) / 0x58;
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  if (uVar2 != 0) {
    if (0x2e8ba2e8ba2e8ba < uVar2) {
      std::_Xlength_error("vector<T> too long");
      pcVar1 = (code *)swi(3);
      plVar3 = (longlong *)(*pcVar1)();
      return plVar3;
    }
    lVar4 = FUN_140141d90(uVar2);
    *param_1 = lVar4;
    param_1[1] = lVar4;
    param_1[2] = uVar2 * 0x58 + lVar4;
    lVar4 = FUN_140142a10(*param_2,param_2[1],lVar4,param_4,uVar5);
    param_1[1] = lVar4;
  }
  return param_1;
}



undefined8 FUN_140142530(longlong param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong *puVar2;
  ulonglong local_res8;
  ulonglong local_res10 [3];
  
  local_res10[0] = param_2;
  if (*(ulonglong *)(param_1 + 0x38) <= param_2) {
    local_res8 = (*(ulonglong *)(param_1 + 0x20) >> 1) + *(ulonglong *)(param_1 + 0x20);
    puVar2 = &local_res8;
    if (local_res8 <= param_2) {
      puVar2 = local_res10;
    }
    lVar1 = FUN_14009f3a0(param_1,*puVar2);
    if (lVar1 != *(longlong *)(param_1 + 8)) {
      FUN_140142770(param_1,lVar1);
      return 1;
    }
  }
  return 0;
}



void FUN_1401425a0(longlong param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(param_1 + 8);
  if (lVar1 != 0) {
    if (*(char *)(param_1 + 0x11) != '\0') {
      if (*(longlong *)(lVar1 + 0x10) != 0) {
        FUN_1401422e0(*(longlong *)(lVar1 + 0x10),*(undefined8 *)(lVar1 + 0x18));
        operator_delete(*(void **)(lVar1 + 0x10));
      }
      *(undefined8 *)(lVar1 + 0x10) = 0;
      *(undefined8 *)(lVar1 + 0x18) = 0;
      *(undefined8 *)(lVar1 + 0x20) = 0;
    }
    operator_delete(*(void **)(param_1 + 8));
  }
  return;
}



void FUN_140142600(longlong param_1)

{
  if (7 < *(ulonglong *)(param_1 + 0x48)) {
    operator_delete(*(void **)(param_1 + 0x30));
  }
  *(undefined8 *)(param_1 + 0x48) = 7;
  *(undefined8 *)(param_1 + 0x40) = 0;
  *(undefined2 *)(param_1 + 0x30) = 0;
  if (7 < *(ulonglong *)(param_1 + 0x20)) {
    operator_delete(*(void **)(param_1 + 8));
  }
  *(undefined8 *)(param_1 + 0x20) = 7;
  *(undefined8 *)(param_1 + 0x18) = 0;
  *(undefined2 *)(param_1 + 8) = 0;
  return;
}



undefined2 * FUN_140142660(longlong param_1,longlong param_2,undefined2 *param_3)

{
  undefined8 uVar1;
  
  uVar1 = 0xfffffffffffffffe;
  for (; param_1 != param_2; param_1 = param_1 + 0x40) {
    if (param_3 != (undefined2 *)0x0) {
      *(undefined8 *)(param_3 + 0xc) = 7;
      *(undefined8 *)(param_3 + 8) = 0;
      *param_3 = 0;
      FUN_140056b10(param_3,param_1,0,0xffffffffffffffff,uVar1);
      *(undefined4 *)(param_3 + 0x14) = *(undefined4 *)(param_1 + 0x28);
      *(undefined4 *)(param_3 + 0x16) = *(undefined4 *)(param_1 + 0x2c);
      *(undefined4 *)(param_3 + 0x18) = *(undefined4 *)(param_1 + 0x30);
      *(undefined4 *)(param_3 + 0x1a) = *(undefined4 *)(param_1 + 0x34);
      *(undefined4 *)(param_3 + 0x1c) = *(undefined4 *)(param_1 + 0x38);
      *(undefined4 *)(param_3 + 0x1e) = *(undefined4 *)(param_1 + 0x3c);
    }
    param_3 = param_3 + 0x20;
  }
  return param_3;
}



longlong FUN_140142710(longlong param_1,longlong param_2,longlong param_3)

{
  for (; param_1 != param_2; param_1 = param_1 + 0x58) {
    if (param_3 != 0) {
      FUN_1401423e0(param_3,param_1);
    }
    param_3 = param_3 + 0x58;
  }
  return param_3;
}



void FUN_140142770(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  byte bVar1;
  longlong lVar2;
  longlong lVar3;
  undefined8 *puVar4;
  longlong *plVar5;
  longlong lVar6;
  longlong lVar7;
  undefined8 *puVar8;
  double dVar9;
  longlong local_40;
  ulonglong local_38;
  longlong local_28;
  longlong local_20;
  
  lVar7 = param_1[4];
  lVar6 = param_1[1];
  lVar2 = *param_1;
  local_40 = 0;
  local_38 = param_2;
  FUN_14009f7b0(&local_40,param_2,lVar6,param_4,0xfffffffffffffffe);
  local_20 = param_1[1];
  lVar3 = *param_1;
  *param_1 = 0;
  param_1[1] = local_20;
  param_1[4] = 0;
  for (puVar8 = (undefined8 *)param_1[6]; puVar8 != (undefined8 *)(lVar2 + lVar6 * 8);
      puVar8 = puVar8 + 1) {
    puVar4 = (undefined8 *)*puVar8;
    while (puVar4 != (undefined8 *)0x0) {
      bVar1 = *(byte *)(puVar4 + 1);
      *puVar8 = *puVar4;
      *puVar4 = *(undefined8 *)(local_40 + ((ulonglong)bVar1 % local_38) * 8);
      *(undefined8 **)(local_40 + ((ulonglong)bVar1 % local_38) * 8) = puVar4;
      puVar4 = (undefined8 *)*puVar8;
    }
  }
  param_1[4] = lVar7;
  lVar7 = *param_1;
  *param_1 = local_40;
  lVar6 = param_1[1];
  param_1[1] = local_38;
  plVar5 = (longlong *)*param_1;
  if (param_1[4] == 0) {
    param_1[6] = (longlong)(plVar5 + local_38);
  }
  else {
    param_1[6] = (longlong)plVar5;
    lVar2 = *plVar5;
    while (lVar2 == 0) {
      plVar5 = plVar5 + 1;
      param_1[6] = (longlong)plVar5;
      lVar2 = *plVar5;
    }
  }
  dVar9 = (double)param_1[1];
  if (param_1[1] < 0) {
    dVar9 = dVar9 + 1.8446744073709552e+19;
  }
  local_40 = lVar7;
  local_38 = lVar6;
  local_28 = lVar3;
  dVar9 = ceil((double)*(float *)(param_1 + 5) * dVar9);
  lVar6 = -1;
  if (dVar9 < 1.8446744073709552e+19) {
    lVar6 = 0;
    if ((9.223372036854776e+18 < dVar9) &&
       (dVar9 = dVar9 - 9.223372036854776e+18, dVar9 < 9.223372036854776e+18)) {
      lVar6 = -0x8000000000000000;
    }
    lVar6 = (longlong)dVar9 + lVar6;
  }
  param_1[7] = lVar6;
  if (lVar3 != 0) {
    FUN_140141f20(&local_28);
    lVar7 = local_40;
  }
  if (lVar7 != 0) {
    FUN_140141f20(&local_40);
  }
  return;
}



void FUN_140142930(longlong param_1)

{
  longlong lVar1;
  undefined8 *puVar2;
  char *local_res8;
  undefined **local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 local_20;
  undefined8 local_18;
  undefined8 local_10;
  
  lVar1 = *(longlong *)(param_1 + 8);
  if (lVar1 != 0) {
    if (*(longlong *)(lVar1 + 0x10) != 0) {
      FUN_1401422e0(*(longlong *)(lVar1 + 0x10),*(undefined8 *)(lVar1 + 0x18));
      operator_delete(*(void **)(lVar1 + 0x10));
    }
    *(undefined8 *)(lVar1 + 0x10) = 0;
    *(undefined8 *)(lVar1 + 0x18) = 0;
    *(undefined8 *)(lVar1 + 0x20) = 0;
    *(undefined1 *)(param_1 + 0x11) = 0;
    return;
  }
  *(undefined2 *)(param_1 + 0x10) = 0;
  puVar2 = operator_new(0x30);
  if (puVar2 != (undefined8 *)0x0) {
    *(undefined8 **)(param_1 + 8) = puVar2;
    *puVar2 = 0;
    puVar2[1] = local_30;
    puVar2[2] = local_28;
    puVar2[3] = local_20;
    puVar2[4] = local_18;
    puVar2[5] = local_10;
    *(undefined1 *)(param_1 + 0x10) = 1;
    return;
  }
  local_res8 = (char *)0x0;
  std::exception::exception((exception *)&local_38,&local_res8);
  local_38 = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
  _CxxThrowException(&local_38,(ThrowInfo *)&DAT_14031d988);
}



longlong FUN_140142a10(longlong param_1,longlong param_2,longlong param_3)

{
  for (; param_1 != param_2; param_1 = param_1 + 0x58) {
    if (param_3 != 0) {
      FUN_1401423e0(param_3,param_1);
    }
    param_3 = param_3 + 0x58;
  }
  return param_3;
}



undefined8 * FUN_140142a80(undefined8 *param_1,undefined8 *param_2)

{
  if (param_1 != param_2) {
    if (7 < (ulonglong)param_1[3]) {
      operator_delete((void *)*param_1);
    }
    param_1[3] = 7;
    param_1[2] = 0;
    *(undefined2 *)param_1 = 0;
    if ((ulonglong)param_2[3] < 8) {
      memmove(param_1,param_2,param_2[2] * 2 + 2);
    }
    else {
      *param_1 = *param_2;
      *param_2 = 0;
    }
    param_1[2] = param_2[2];
    param_1[3] = param_2[3];
    param_2[2] = 0;
    param_2[3] = 0;
  }
  return param_1;
}



undefined8 *
FUN_140142b10(undefined8 *param_1,undefined8 *param_2,ulonglong param_3,ulonglong param_4)

{
  longlong lVar1;
  code *pcVar2;
  char cVar3;
  undefined8 *puVar4;
  ulonglong uVar5;
  
  if ((ulonglong)param_2[2] < param_3) {
    std::_Xout_of_range("invalid string position");
    pcVar2 = (code *)swi(3);
    puVar4 = (undefined8 *)(*pcVar2)();
    return puVar4;
  }
  uVar5 = param_2[2] - param_3;
  if (uVar5 < param_4) {
    param_4 = uVar5;
  }
  if (param_4 < -param_1[2] - 1) {
    if (param_4 != 0) {
      lVar1 = param_1[2] + param_4;
      cVar3 = FUN_140056d50(param_1,lVar1);
      if (cVar3 != '\0') {
        if (7 < (ulonglong)param_2[3]) {
          param_2 = (undefined8 *)*param_2;
        }
        puVar4 = param_1;
        if (7 < (ulonglong)param_1[3]) {
          puVar4 = (undefined8 *)*param_1;
        }
        memcpy((void *)((longlong)puVar4 + param_1[2] * 2),(void *)((longlong)param_2 + param_3 * 2)
               ,param_4 * 2);
        param_1[2] = lVar1;
        puVar4 = param_1;
        if (7 < (ulonglong)param_1[3]) {
          puVar4 = (undefined8 *)*param_1;
        }
        *(undefined2 *)((longlong)puVar4 + lVar1 * 2) = 0;
      }
    }
    return param_1;
  }
  std::_Xlength_error("string too long");
  pcVar2 = (code *)swi(3);
  puVar4 = (undefined8 *)(*pcVar2)();
  return puVar4;
}



undefined8 * FUN_140142c00(undefined8 *param_1,uint param_2)

{
  *param_1 = TiXmlDocument::vftable;
  if ((undefined8 *)param_1[0xc] != &DAT_14032f048) {
    operator_delete__((void *)param_1[0xd]);
  }
  FUN_140149e40(param_1);
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 FUN_140142c60(void)

{
  return 0;
}



void FUN_140142c70(undefined8 *param_1)

{
  if ((undefined8 *)*param_1 != &DAT_14032f048) {
    operator_delete__((void *)param_1[1]);
  }
  return;
}



void FUN_140142c90(undefined8 *param_1)

{
  *param_1 = TiXmlDocument::vftable;
  if ((undefined8 *)param_1[0xc] != &DAT_14032f048) {
    operator_delete__((void *)param_1[0xd]);
  }
  FUN_140149e40(param_1);
  return;
}



void FUN_140142cd0(undefined8 *param_1)

{
  if ((undefined8 *)*param_1 != param_1 + 1) {
    free((undefined8 *)*param_1);
  }
  return;
}



void FUN_140142cf0(longlong *param_1,int param_2,void *param_3,int param_4)

{
  void *pvVar1;
  
  if (param_1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  if (param_3 == (void *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  pvVar1 = (void *)*param_1;
  if (pvVar1 == param_3) {
    if (param_2 <= param_4) {
      *param_1 = (longlong)param_3;
      goto LAB_140142d81;
    }
    pvVar1 = calloc((longlong)param_2,2);
  }
  else {
    if (param_2 <= param_4) {
      free(pvVar1);
      *param_1 = (longlong)param_3;
      goto LAB_140142d81;
    }
    pvVar1 = _recalloc(pvVar1,(longlong)param_2,2);
    if (pvVar1 == (void *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  *param_1 = (longlong)pvVar1;
LAB_140142d81:
  if (*param_1 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x8007000e);
  }
  return;
}



void FUN_140142da0(void)

{
  DWORD DVar1;
  
  DVar1 = GetLastError();
  if (0 < (int)DVar1) {
    DVar1 = DVar1 & 0xffff | 0x80070000;
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(DVar1);
}



void FUN_140142dc0(undefined8 *param_1,LPCSTR param_2,UINT param_3)

{
  code *pcVar1;
  int iVar2;
  int iVar3;
  DWORD DVar4;
  bool bVar5;
  
  if (param_2 == (LPCSTR)0x0) {
    *param_1 = 0;
    return;
  }
  iVar2 = lstrlenA(param_2);
  iVar2 = iVar2 + 1;
  FUN_140142cf0(param_1,iVar2,param_1 + 1,0x80);
  iVar3 = MultiByteToWideChar(param_3,0,param_2,iVar2,(LPWSTR)*param_1,iVar2);
  if (iVar3 == 0) {
    DVar4 = GetLastError();
    bVar5 = true;
    if (DVar4 == 0x7a) {
      iVar3 = MultiByteToWideChar(param_3,0,param_2,iVar2,(LPWSTR)0x0,0);
      FUN_140142cf0(param_1,iVar3,param_1 + 1,0x80);
      iVar2 = MultiByteToWideChar(param_3,0,param_2,iVar2,(LPWSTR)*param_1,iVar3);
      bVar5 = iVar2 == 0;
    }
    if (bVar5) {
      FUN_140142da0();
      pcVar1 = (code *)swi(3);
      (*pcVar1)();
      return;
    }
  }
  return;
}



undefined8 * FUN_140142ed0(undefined8 *param_1,byte param_2)

{
  DAT_14032f260 = 0;
  *param_1 = MBISingleton<>::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140142f10(undefined8 *param_1)

{
  DAT_14032f260 = 0;
  *param_1 = MBISingleton<>::vftable;
  return;
}



undefined8 * FUN_140142f30(undefined8 *param_1,undefined8 param_2)

{
  undefined8 *puVar1;
  undefined4 uVar2;
  
  FUN_140143a70();
  FUN_140157ba0(param_1 + 9);
  *param_1 = MGSAgentSession::vftable;
  param_1[9] = MGSAgentSession::vftable;
  puVar1 = param_1 + 0xd;
  FUN_140156ca0(puVar1);
  *puVar1 = SERVER2AGENT_PROTOCOL::Proxy::vftable;
  if (*(int *)((longlong)param_1 + 0x7c) != 1) {
    FUN_1401580e0(PTR_u_PIDL_compiler_is_incompatible_to_1403200e0);
  }
  *puVar1 = RNP::Server2AgentProxy::vftable;
  *(undefined1 *)(param_1 + 0x10) = 0;
  *(undefined1 *)(param_1 + 0x11) = 0;
  param_1[0x12] = param_2;
  param_1[0x13] = 0;
  param_1[0x14] = 0;
  param_1[0x15] = 0;
  uVar2 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x17,uVar2,1);
  return param_1;
}



void * FUN_140143010(void *param_1,uint param_2)

{
  FUN_140143040();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140143040(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  *param_1 = MGSAgentSession::vftable;
  param_1[9] = MGSAgentSession::vftable;
  if ((longlong *)param_1[2] != (longlong *)0x0) {
    (**(code **)(*(longlong *)param_1[2] + 0x88))();
  }
  puVar1 = (undefined8 *)param_1[2];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1,param_3,param_4,uVar2);
  }
  param_1[2] = 0;
  *(undefined2 *)((longlong)param_1 + 0x19) = 0;
  *(undefined1 *)((longlong)param_1 + 0x1b) = 1;
  FUN_140156c00(param_1 + 0x17);
  if ((void *)param_1[0x13] != (void *)0x0) {
    operator_delete((void *)param_1[0x13]);
  }
  param_1[0x13] = 0;
  param_1[0x14] = 0;
  param_1[0x15] = 0;
  param_1[0xd] = RNP::Server2AgentProxy::vftable;
  FUN_140156cd0();
  param_1[9] = RNP::Agent2ServerStub::vftable;
  FUN_140157bd0(param_1 + 9);
  *param_1 = MagiCommonSession::vftable;
  FUN_14004f990(param_1 + 6);
  *param_1 = Proud::INetClientEvent::vftable;
  FUN_140157ce0(param_1);
  return;
}



void FUN_140143140(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined *puVar4;
  undefined *local_res18 [2];
  
  plVar2 = (longlong *)FUN_140182070(param_2,local_res18,param_3,param_4,0xfffffffffffffffe);
  puVar4 = (undefined *)*plVar2;
  if ((undefined *)*plVar2 == (undefined *)0x0) {
    puVar4 = PTR_DAT_1403200a0;
  }
  FUN_140148b90(L"OnError MGSAgentSession : %s",puVar4);
  if (((local_res18[0] != (undefined *)0x0) && (local_res18[0] != PTR_DAT_1403200a0)) &&
     (local_res18[0] + -8 != (undefined *)0x0)) {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    piVar1 = (int *)(local_res18[0] + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res18[0] + -8);
    }
    FUN_140156be0(uVar3);
  }
  return;
}



void FUN_1401431e0(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined *puVar4;
  undefined *local_res18 [2];
  
  plVar2 = (longlong *)FUN_140182070(param_2,local_res18,param_3,param_4,0xfffffffffffffffe);
  puVar4 = (undefined *)*plVar2;
  if ((undefined *)*plVar2 == (undefined *)0x0) {
    puVar4 = PTR_DAT_1403200a0;
  }
  FUN_140148b90(L"OnWarning MGSAgentSession : %s",puVar4);
  if (((local_res18[0] != (undefined *)0x0) && (local_res18[0] != PTR_DAT_1403200a0)) &&
     (local_res18[0] + -8 != (undefined *)0x0)) {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    piVar1 = (int *)(local_res18[0] + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res18[0] + -8);
    }
    FUN_140156be0(uVar3);
  }
  return;
}



void FUN_140143280(undefined8 param_1,longlong *param_2)

{
  undefined8 uVar1;
  
  uVar1 = (**(code **)(*param_2 + 8))(param_2);
  FUN_140148a40("OnException MGSAgentSession : %s",uVar1);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401432a0(longlong param_1)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  undefined1 auVar3 [16];
  undefined4 uVar4;
  undefined8 uVar5;
  undefined2 *puVar6;
  undefined1 auStack_c8 [32];
  undefined *local_a8;
  undefined8 local_a0;
  undefined **local_98;
  undefined8 local_88;
  undefined2 local_80;
  undefined6 uStack_7e;
  undefined8 local_70;
  ulonglong local_68;
  undefined2 local_58;
  undefined6 uStack_56;
  undefined8 local_48;
  ulonglong local_40;
  ulonglong local_28;
  
  local_a0 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_c8;
  local_68 = 7;
  local_70 = 0;
  local_80 = 0;
  local_40 = 7;
  local_48 = 0;
  local_58 = 0;
  if (*(longlong *)(DAT_14032f260 + 0x1c8) != 0) {
    auVar3._8_8_ = 0;
    auVar3._0_8_ = *(ulonglong *)(DAT_14032f260 + 0x1b0);
    for (puVar1 = *(undefined8 **)
                   (*(longlong *)(DAT_14032f260 + 0x1a8) +
                   SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xd)) % auVar3,0) * 8);
        puVar1 != (undefined8 *)0x0; puVar1 = (undefined8 *)*puVar1) {
      if (*(char *)(puVar1 + 1) == '\r') {
        if (puVar1 == (undefined8 *)0x0) {
          return;
        }
        puVar2 = (undefined8 *)puVar1[2];
        if (puVar2 == (undefined8 *)puVar1[3]) {
          return;
        }
        local_88 = *puVar2;
        FUN_140056b10(&local_80,puVar2 + 1,0,0xffffffffffffffff);
        FUN_140056b10(&local_58,puVar2 + 6,0,0xffffffffffffffff);
        puVar6 = &local_58;
        if (7 < local_40) {
          puVar6 = (undefined2 *)CONCAT62(uStack_56,local_58);
        }
        FUN_1401568c0();
        local_a8 = PTR_DAT_1403200a0;
        uVar4 = FUN_140156740(puVar6);
        uVar5 = FUN_14004f760(&local_a8,uVar4);
        FUN_140156770(uVar5,puVar6,uVar4);
        FUN_14004f380(&local_a8);
        local_98 = &local_a8;
        FUN_14004f4f0(param_1 + 0x30,&local_a8);
        FUN_14004f990(&local_a8);
        *(undefined2 *)(param_1 + 0x38) = local_88._4_2_;
        *(undefined4 *)(param_1 + 0x3c) = (undefined4)local_88;
        FUN_140143be0(param_1);
        if (7 < local_40) {
          operator_delete((void *)CONCAT62(uStack_56,local_58));
        }
        local_40 = 7;
        local_48 = 0;
        local_58 = 0;
        if (local_68 < 8) {
          return;
        }
        operator_delete((void *)CONCAT62(uStack_7e,local_80));
        return;
      }
    }
  }
  return;
}



undefined8 FUN_140143470(longlong param_1)

{
  char cVar1;
  longlong lVar2;
  DWORD DVar3;
  DWORD DVar4;
  longlong *plVar5;
  
  DVar3 = GetTickCount();
  lVar2 = DAT_14032f268;
  *(undefined4 *)(param_1 + 0x40) = 0xd;
  *(undefined1 *)(param_1 + 0x18) = *(undefined1 *)(lVar2 + 0x16);
  plVar5 = (longlong *)FUN_1401cac60();
  *(longlong **)(param_1 + 0x10) = plVar5;
  if (plVar5 != (longlong *)0x0) {
    (**(code **)(*plVar5 + 0x118))(plVar5,param_1);
    (**(code **)(**(longlong **)(param_1 + 0x10) + 0x10))
              (*(longlong **)(param_1 + 0x10),param_1 + 0x48);
    (**(code **)(**(longlong **)(param_1 + 0x10) + 8))
              (*(longlong **)(param_1 + 0x10),param_1 + 0x68);
  }
  if (*(char *)(DAT_14032f260 + 0x150) != '\0') {
    FUN_1401432a0(param_1);
    cVar1 = *(char *)(param_1 + 0x88);
    while (cVar1 == '\0') {
      FUN_140143e40(param_1);
      DVar4 = GetTickCount();
      if (30000 < DVar4 - DVar3) {
        printf("\n AGENT MODE ERROR - NOT RECEIVE DATA \n");
        Sleep(3000);
        return 0;
      }
      Sleep(10);
      cVar1 = *(char *)(param_1 + 0x88);
    }
  }
  return 1;
}



void FUN_140143570(longlong param_1,int *param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  undefined8 uVar2;
  undefined *local_res8;
  
  *(undefined1 *)(param_1 + 0x19) = 0;
  if (*param_2 == 0) {
    *(undefined2 *)(param_1 + 0x1a) = 1;
    *(undefined1 *)(param_1 + 0x1c) = 0;
    FUN_140143810();
    if (*(longlong **)(param_1 + 0x10) != (longlong *)0x0) {
      (**(code **)(**(longlong **)(param_1 + 0x10) + 0x30))();
      wprintf(L"Agent Connect Succeed: HostID[%d] \n");
    }
  }
  else {
    *(undefined1 *)(param_1 + 0x1b) = 1;
    FUN_140182070(param_2,&local_res8,param_3,param_4,0xfffffffffffffffe);
    wprintf(L"Agent Connect Failed [%s] \n");
    if (((local_res8 != (undefined *)0x0) && (local_res8 != PTR_DAT_1403200a0)) &&
       (local_res8 + -8 != (undefined *)0x0)) {
      uVar2 = FUN_1401568c0();
      FUN_140156b50(uVar2);
      piVar1 = (int *)(local_res8 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_res8 + -8);
      }
      FUN_140156be0(uVar2);
    }
  }
  return;
}



void FUN_140143650(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  undefined *local_res8;
  
  if (DAT_14032f258 != 0) {
    puVar2 = (undefined8 *)FUN_140182070(param_2,&local_res8,param_3,param_4,0xfffffffffffffffe);
    FUN_1402032d0(DAT_14032f258,L"Agent Disconnected %s \n",*puVar2);
    if (((local_res8 != (undefined *)0x0) && (local_res8 != PTR_DAT_1403200a0)) &&
       (local_res8 + -8 != (undefined *)0x0)) {
      uVar3 = FUN_1401568c0();
      FUN_140156b50(uVar3);
      piVar1 = (int *)(local_res8 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_res8 + -8);
      }
      FUN_140156be0(uVar3);
    }
  }
  *(undefined2 *)(param_1 + 0x19) = 0;
  *(undefined1 *)(param_1 + 0x1b) = 1;
  *(undefined1 *)(param_1 + 0x88) = 0;
  return;
}



void FUN_140143720(longlong param_1,undefined4 param_2,undefined4 param_3)

{
  undefined4 local_res8 [8];
  undefined8 uVar1;
  undefined4 local_50;
  undefined4 local_4c;
  undefined4 local_48;
  undefined4 local_44;
  undefined8 local_40;
  undefined4 local_38;
  undefined1 local_34;
  undefined1 local_33;
  void *local_30;
  undefined8 local_28;
  undefined8 local_20;
  
  uVar1 = 0xfffffffffffffffe;
  if (*(char *)(param_1 + 0x88) != '\0') {
    local_44 = 0;
    local_40 = 0;
    local_50 = 0;
    local_48 = DAT_14032eff0;
    local_34 = 1;
    local_33 = *(undefined1 *)(DAT_14032f260 + 0x171);
    local_30 = (void *)0x0;
    local_28 = 0;
    local_20 = 0;
    local_4c = param_2;
    local_38 = param_3;
    FUN_140145760(DAT_14032f288,&local_30);
    local_res8[0] = *(undefined4 *)(DAT_14032f260 + 0x154);
    (**(code **)(*(longlong *)(param_1 + 0x68) + 0x40))
              ((longlong *)(param_1 + 0x68),1,&DAT_1403200f0,local_res8,&local_50,&local_30,uVar1);
    if (local_30 != (void *)0x0) {
      operator_delete(local_30);
    }
  }
  return;
}



void FUN_140143810(longlong param_1)

{
  undefined4 local_res8 [8];
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  undefined8 local_18;
  
  local_24 = *(undefined4 *)(DAT_14032f260 + 0x1ec);
  local_28 = 0;
  local_18 = *(undefined8 *)(DAT_14032f260 + 0x1f0);
  local_res8[0] = *(undefined4 *)(DAT_14032f260 + 0x154);
  local_20 = 0x8619;
  (**(code **)(*(longlong *)(param_1 + 0x68) + 0x30))
            ((longlong *)(param_1 + 0x68),1,&DAT_1403200f0,local_res8,&local_28);
  return;
}



void FUN_140143880(longlong param_1,undefined8 param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  int iVar6;
  undefined *puVar7;
  undefined *local_res8;
  undefined4 local_28 [2];
  undefined8 local_20;
  undefined8 local_18;
  undefined1 local_10;
  
  local_20 = 0xfffffffffffffffe;
  local_28[0] = 0;
  FUN_1401568c0();
  local_res8 = PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(param_2);
  iVar6 = 0;
  if ((local_res8 != (undefined *)0x0) && (iVar6 = 0, local_res8 != PTR_DAT_1403200a0)) {
    iVar6 = *(int *)(local_res8 + -8);
  }
  iVar4 = iVar3;
  if (iVar3 <= iVar6) {
    iVar4 = 0;
    if ((local_res8 != (undefined *)0x0) && (iVar4 = 0, local_res8 != PTR_DAT_1403200a0)) {
      iVar4 = *(int *)(local_res8 + -8);
    }
  }
  iVar6 = 1;
  if (1 < iVar4) {
    iVar6 = iVar4;
  }
  iVar4 = 0;
  if ((local_res8 != (undefined *)0x0) && (local_res8 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(local_res8 + -8);
  }
  if (iVar4 < iVar6) {
    FUN_14004f590(&local_res8);
  }
  FUN_14004f670(&local_res8);
  puVar7 = local_res8;
  if (local_res8 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar7,param_2,iVar3);
  puVar7 = local_res8;
  if (local_res8 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar7);
  iVar6 = 0;
  if (0 < iVar3) {
    iVar6 = iVar3;
  }
  iVar3 = 0;
  if ((local_res8 != (undefined *)0x0) && (local_res8 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_res8 + -8);
  }
  if ((iVar3 <= iVar6) && (iVar6 = 0, local_res8 != (undefined *)0x0)) {
    if (local_res8 == PTR_DAT_1403200a0) goto LAB_1401439ab;
    iVar6 = *(int *)(local_res8 + -8);
  }
  if (((local_res8 != PTR_DAT_1403200a0) && (local_res8 != (undefined *)0x0)) &&
     ((int *)(local_res8 + -8) != (int *)0x0)) {
    *(int *)(local_res8 + -8) = iVar6;
    *(undefined2 *)(local_res8 + (longlong)iVar6 * 2) = 0;
  }
LAB_1401439ab:
  (**(code **)(*(longlong *)(param_1 + 0x68) + 0xc0))
            ((longlong *)(param_1 + 0x68),1,&DAT_1403200f0,local_28,&local_res8);
  puVar7 = local_res8;
  if (((local_res8 != (undefined *)0x0) && (local_res8 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_res8 + -8, puVar1 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_18 = uVar5;
    FUN_140156b50(uVar5);
    local_10 = 1;
    piVar2 = (int *)(puVar7 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar5);
  }
  return;
}



void FUN_140143a40(longlong param_1)

{
  FUN_140143010(param_1 + -0x48);
  return;
}



undefined8 FUN_140143a50(void)

{
  return 0x84e1;
}



undefined8 FUN_140143a60(void)

{
  return 34000;
}



undefined8 * FUN_140143a70(undefined8 *param_1)

{
  *(undefined2 *)(param_1 + 1) = 0;
  *param_1 = MagiCommonSession::vftable;
  param_1[2] = 0;
  *(undefined4 *)(param_1 + 3) = 0x1000001;
  *(undefined1 *)((longlong)param_1 + 0x1c) = 1;
  param_1[4] = 0;
  param_1[5] = 0x4008000000000000;
  FUN_1401568c0();
  param_1[6] = PTR_DAT_1403200a0;
  *(undefined8 *)((longlong)param_1 + 0x3c) = 0;
  if ((DAT_14037923c & 1) == 0) {
    DAT_14037923c = DAT_14037923c | 1;
    FUN_1402053b0();
    atexit((_func_5014 *)&LAB_140257ca0);
  }
  if (DAT_140378ff8 == 1000) {
    *(undefined1 *)((longlong)param_1 + 0x1c) = 0;
    param_1[5] = 0x4024000000000000;
  }
  return param_1;
}



undefined8 * FUN_140143b30(undefined8 *param_1,uint param_2)

{
  *param_1 = MagiCommonSession::vftable;
  FUN_14004f990(param_1 + 6);
  *param_1 = Proud::INetClientEvent::vftable;
  FUN_140157ce0(param_1);
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140143b90(undefined8 *param_1)

{
  *param_1 = MagiCommonSession::vftable;
  FUN_14004f990(param_1 + 6);
  *param_1 = Proud::INetClientEvent::vftable;
  FUN_140157ce0(param_1);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140143be0(longlong param_1)

{
  int *piVar1;
  char cVar2;
  undefined *puVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  undefined *puVar6;
  undefined1 auStack_b8 [32];
  undefined8 local_98;
  undefined1 local_90;
  undefined8 local_88;
  undefined1 local_80;
  undefined8 local_78;
  undefined *local_68;
  undefined2 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_50;
  undefined1 local_48 [48];
  ulonglong local_18;
  
  local_78 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_b8;
  puVar3 = *(undefined **)(param_1 + 0x30);
  if ((((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_1403200a0)) &&
      (0 < *(int *)(puVar3 + -8))) &&
     (((*(char *)(param_1 + 0x18) != '\0' && (*(char *)(param_1 + 0x19) == '\0')) &&
      ((*(char *)(param_1 + 0x1a) == '\0' && (*(longlong *)(param_1 + 0x10) != 0)))))) {
    *(undefined2 *)(param_1 + 0x19) = 1;
    FUN_1401a48f0(&local_68);
    local_5c = DAT_14032f190;
    local_58 = _DAT_14032f194;
    local_54 = _DAT_14032f198;
    local_50 = _DAT_14032f19c;
    if (local_68 == (undefined *)0x0) {
      local_68 = PTR_DAT_1403200a0;
    }
    if (*(undefined **)(param_1 + 0x30) != local_68) {
      uVar4 = FUN_1401568c0();
      local_88 = uVar4;
      FUN_140156b50(uVar4);
      puVar3 = local_68;
      local_80 = 1;
      if (((local_68 != (undefined *)0x0) && (local_68 != PTR_DAT_1403200a0)) &&
         (puVar6 = local_68 + -8, puVar6 != (undefined *)0x0)) {
        uVar5 = FUN_1401568c0();
        local_98 = uVar5;
        FUN_140156b50(uVar5);
        local_90 = 1;
        piVar1 = (int *)(puVar3 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar6);
        }
        FUN_140156be0(uVar5);
      }
      local_68 = *(undefined **)(param_1 + 0x30);
      if (((local_68 != PTR_DAT_1403200a0) && (local_68 != (undefined *)0x0)) &&
         (local_68 != (undefined *)0x8)) {
        *(int *)(local_68 + -4) = *(int *)(local_68 + -4) + 1;
      }
      FUN_140156be0(uVar4);
    }
    local_60 = *(undefined2 *)(param_1 + 0x38);
    (**(code **)(**(longlong **)(param_1 + 0x10) + 0x88))();
    (**(code **)(**(longlong **)(param_1 + 0x10) + 0x78))(*(longlong **)(param_1 + 0x10),&local_68);
    cVar2 = *(char *)(param_1 + 0x19);
    while (cVar2 != '\0') {
      Sleep(10);
      (**(code **)(**(longlong **)(param_1 + 0x10) + 0x98))(*(longlong **)(param_1 + 0x10),0);
      cVar2 = *(char *)(param_1 + 0x19);
    }
    FUN_1401858d0(local_48);
    puVar3 = local_68;
    if (((local_68 != (undefined *)0x0) && (local_68 != PTR_DAT_1403200a0)) &&
       (puVar6 = local_68 + -8, puVar6 != (undefined *)0x0)) {
      uVar4 = FUN_1401568c0();
      local_98 = uVar4;
      FUN_140156b50(uVar4);
      local_90 = 1;
      piVar1 = (int *)(puVar3 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar6);
      }
      FUN_140156be0(uVar4);
    }
  }
  return;
}



void FUN_140143e10(longlong param_1)

{
  FUN_1401858d0(param_1 + 0x20);
  FUN_14004f990(param_1);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140143e40(longlong param_1)

{
  undefined *puVar1;
  undefined1 auStack_68 [32];
  undefined8 local_48;
  undefined2 local_40;
  undefined6 uStack_3e;
  undefined8 local_30;
  ulonglong local_28;
  ulonglong local_18;
  
  local_48 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  puVar1 = *(undefined **)(param_1 + 0x30);
  if ((((puVar1 != (undefined *)0x0) && (puVar1 != PTR_DAT_1403200a0)) &&
      (0 < *(int *)(puVar1 + -8))) && (*(char *)(param_1 + 0x18) != '\0')) {
    if (*(char *)(param_1 + 0x1b) == '\0') {
      if ((*(char *)(param_1 + 0x1a) != '\0') && (*(longlong *)(param_1 + 0x10) != 0)) {
        (**(code **)(**(longlong **)(param_1 + 0x10) + 0x98))(*(longlong **)(param_1 + 0x10),0);
      }
    }
    else if (*(char *)(param_1 + 0x1c) != '\0') {
      Sleep((DWORD)(longlong)*(double *)(param_1 + 0x28));
      local_28 = 7;
      local_30 = 0;
      local_40 = 0;
      FUN_140144340(param_1,&local_40);
      wprintf(L"%s : RETRY CONNECT : IP[ %s ] PORT[ %d ]\n");
      FUN_140143be0(param_1);
      if (7 < local_28) {
        operator_delete((void *)CONCAT62(uStack_3e,local_40));
      }
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140143f50(longlong param_1,double param_2)

{
  undefined *puVar1;
  longlong *plVar2;
  double dVar3;
  undefined1 auStack_68 [32];
  undefined8 local_48;
  undefined2 local_40;
  undefined6 uStack_3e;
  undefined8 local_30;
  ulonglong local_28;
  ulonglong local_18;
  
  local_48 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  puVar1 = *(undefined **)(param_1 + 0x30);
  if (((puVar1 != (undefined *)0x0) && (puVar1 != PTR_DAT_1403200a0)) && (0 < *(int *)(puVar1 + -8))
     ) {
    if (*(char *)(param_1 + 0x18) == '\0') {
      if (*(char *)(param_1 + 0x1a) != '\0') {
        plVar2 = *(longlong **)(param_1 + 0x10);
        if (plVar2 != (longlong *)0x0) {
          (**(code **)(*plVar2 + 0x98))(plVar2,0);
        }
        Sleep(100);
      }
    }
    else if (*(char *)(param_1 + 0x1b) == '\0') {
      if ((*(char *)(param_1 + 0x1a) != '\0') &&
         (plVar2 = *(longlong **)(param_1 + 0x10), plVar2 != (longlong *)0x0)) {
        (**(code **)(*plVar2 + 0x98))(plVar2,0);
      }
    }
    else {
      dVar3 = param_2 - *(double *)(param_1 + 0x20);
      if ((*(double *)(param_1 + 0x28) <= dVar3 && dVar3 != *(double *)(param_1 + 0x28)) &&
         (*(double *)(param_1 + 0x20) = param_2, *(char *)(param_1 + 0x1c) != '\0')) {
        local_28 = 7;
        local_30 = 0;
        local_40 = 0;
        FUN_140144340(dVar3,&local_40);
        wprintf(L"%s : RETRY CONNECT : ADDRESS[ %s ] PORT[ %d ]\n");
        FUN_140143be0(param_1);
        if (7 < local_28) {
          operator_delete((void *)CONCAT62(uStack_3e,local_40));
        }
      }
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401440a0(longlong param_1,int param_2)

{
  ulonglong uVar1;
  code *pcVar2;
  undefined2 *puVar3;
  undefined2 *puVar4;
  wchar_t *pwVar5;
  ulonglong uVar6;
  undefined8 uVar7;
  undefined1 auStack_e8 [32];
  uint local_c8;
  uint local_c0;
  undefined8 local_b8;
  undefined2 local_b0;
  undefined6 uStack_ae;
  ulonglong local_a0;
  ulonglong local_98;
  undefined2 local_88;
  undefined6 uStack_86;
  undefined8 local_78;
  ulonglong local_70;
  undefined2 local_60;
  undefined6 uStack_5e;
  ulonglong local_50;
  ulonglong local_48;
  ulonglong local_38;
  
  local_b8 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_e8;
  local_48 = 7;
  local_50 = 0;
  local_60 = 0;
  local_70 = 7;
  local_78 = 0;
  local_88 = 0;
  local_98 = 7;
  local_a0 = 0;
  local_b0 = 0;
  FUN_140144340(param_1,&local_60);
  uVar6 = 0xffffffffffffffff;
  if (local_50 != 0xffffffffffffffff) {
    uVar6 = local_50;
  }
  if (-local_a0 - 1 <= uVar6) {
    std::_Xlength_error("string too long");
    pcVar2 = (code *)swi(3);
    (*pcVar2)();
    return;
  }
  if (uVar6 != 0) {
    uVar1 = local_a0 + uVar6;
    if (0x7ffffffffffffffe < uVar1) {
      std::_Xlength_error("string too long");
      pcVar2 = (code *)swi(3);
      (*pcVar2)();
      return;
    }
    if (local_98 < uVar1) {
      FUN_140056c60(&local_b0,uVar1);
    }
    else if (uVar1 == 0) {
      local_a0 = 0;
      puVar4 = &local_b0;
      if (7 < local_98) {
        puVar4 = (undefined2 *)CONCAT62(uStack_ae,local_b0);
      }
      *puVar4 = 0;
    }
    if (uVar1 != 0) {
      puVar4 = &local_60;
      if (7 < local_48) {
        puVar4 = (undefined2 *)CONCAT62(uStack_5e,local_60);
      }
      puVar3 = &local_b0;
      if (7 < local_98) {
        puVar3 = (undefined2 *)CONCAT62(uStack_ae,local_b0);
      }
      memcpy(puVar3 + local_a0,puVar4,uVar6 * 2);
      puVar4 = &local_b0;
      if (7 < local_98) {
        puVar4 = (undefined2 *)CONCAT62(uStack_ae,local_b0);
      }
      local_a0 = uVar1;
      puVar4[uVar1] = 0;
    }
  }
  FUN_140144570(&local_b0,9);
  if (*(char *)(param_1 + 0x18) == '\0') {
    uVar7 = 10;
    pwVar5 = L"[ DisUse ]";
  }
  else {
    uVar7 = 7;
    pwVar5 = L"[ Use ]";
  }
  FUN_140056dd0(&local_88,pwVar5,uVar7);
  if (param_2 < 1) {
    wprintf(L"\n-%s %s---------------------------------------------------------\n");
  }
  local_c8 = *(uint *)(param_1 + 0x3c);
  if (param_2 == -1) {
    wprintf(L"Session S[ %d ] : ADDRESS[ %s ] PORT[ %d ] CODE[ %d ]\n");
  }
  else {
    local_c0 = local_c8;
    local_c8 = (uint)*(ushort *)(param_1 + 0x38);
    wprintf(L"Session [%d] S[ %d ] : ADDRESS[ %s ] PORT[ %d ] CODE[ %d ]\n");
  }
  if (7 < local_98) {
    operator_delete((void *)CONCAT62(uStack_ae,local_b0));
  }
  local_98 = 7;
  local_a0 = 0;
  local_b0 = 0;
  if (7 < local_70) {
    operator_delete((void *)CONCAT62(uStack_86,local_88));
  }
  local_70 = 7;
  local_78 = 0;
  local_88 = 0;
  if (7 < local_48) {
    operator_delete((void *)CONCAT62(uStack_5e,local_60));
  }
  return;
}



void FUN_140144340(longlong param_1,undefined8 param_2)

{
  wchar_t *pwVar1;
  
  switch(*(undefined1 *)(param_1 + 0x40)) {
  case 1:
    FUN_140056dd0(param_2,L"Lobby",5);
    return;
  case 2:
    FUN_140056dd0(param_2,L"Dungeon",7);
    return;
  case 3:
    FUN_140056dd0(param_2,&DAT_1402936a0,3);
    return;
  case 4:
    FUN_140056dd0(param_2,&DAT_1402936a8,3);
    return;
  case 5:
    FUN_140056dd0(param_2,L"Guild",5);
    return;
  case 6:
    FUN_140056dd0(param_2,L"Message",7);
    return;
  case 7:
    FUN_140056dd0(param_2,&DAT_1402936b0,2);
    return;
  case 8:
    FUN_140056dd0(param_2,L"Gate",4);
    return;
  case 9:
    FUN_140056dd0(param_2,L"Manager",7);
    return;
  case 10:
    FUN_140056dd0(param_2,L"Auction",7);
    return;
  case 0xb:
    FUN_140056dd0(param_2,L"Match",5);
    return;
  case 0xc:
    pwVar1 = L"DBC_GAME";
    break;
  case 0xd:
    FUN_140056dd0(param_2,L"Agent",5);
    return;
  default:
    goto switchD_140144369_caseD_d;
  case 0x11:
    FUN_140056dd0(param_2,L"DBC_LOG",7);
    return;
  case 0x12:
    pwVar1 = L"DBC_CHAT";
    break;
  case 0x13:
    FUN_140056dd0(param_2,L"DBC_EMERGENCY",0xd);
    return;
  case 0x15:
    FUN_140056dd0(param_2,L"Agentmanager",0xc);
    return;
  case 0x16:
    pwVar1 = L"MiniGame";
  }
  FUN_140056dd0(param_2,pwVar1,8);
switchD_140144369_caseD_d:
  return;
}



undefined8 * FUN_140144570(undefined8 *param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  code *pcVar3;
  char cVar4;
  undefined8 *puVar5;
  
  uVar2 = param_1[3];
  puVar5 = param_1;
  if (7 < uVar2) {
    puVar5 = (undefined8 *)*param_1;
  }
  if (puVar5 < (undefined8 *)((longlong)L" Sessoion" + 1)) {
    puVar5 = param_1;
    if (7 < uVar2) {
      puVar5 = (undefined8 *)*param_1;
    }
    if (L" Sessoion" < (wchar_t *)((longlong)puVar5 + param_1[2] * 2)) {
      puVar5 = param_1;
      if (7 < uVar2) {
        puVar5 = (undefined8 *)*param_1;
      }
      puVar5 = (undefined8 *)
               FUN_140142b10(param_1,param_1,(longlong)L" Sessoion" - (longlong)puVar5 >> 1,param_2)
      ;
      return puVar5;
    }
  }
  if (param_2 < -param_1[2] - 1) {
    if (param_2 != 0) {
      lVar1 = param_1[2] + param_2;
      cVar4 = FUN_140056d50(param_1,lVar1);
      if (cVar4 != '\0') {
        puVar5 = param_1;
        if (7 < (ulonglong)param_1[3]) {
          puVar5 = (undefined8 *)*param_1;
        }
        memcpy((void *)((longlong)puVar5 + param_1[2] * 2),L" Sessoion",param_2 * 2);
        param_1[2] = lVar1;
        puVar5 = param_1;
        if (7 < (ulonglong)param_1[3]) {
          puVar5 = (undefined8 *)*param_1;
        }
        *(undefined2 *)((longlong)puVar5 + lVar1 * 2) = 0;
      }
    }
    return param_1;
  }
  std::_Xlength_error("string too long");
  pcVar3 = (code *)swi(3);
  puVar5 = (undefined8 *)(*pcVar3)();
  return puVar5;
}



void FUN_140144680(undefined8 *param_1)

{
  *param_1 = Proud::INetClientEvent::vftable;
  FUN_140157ce0();
  return;
}



// Library Function - Single Match
//  public: virtual void * __ptr64 __cdecl std::bad_alloc::`scalar deleting destructor'(unsigned
// int) __ptr64
// 
// Libraries: Visual Studio 2012 Release, Visual Studio 2015 Release

void * __thiscall std::bad_alloc::_scalar_deleting_destructor_(bad_alloc *this,uint param_1)

{
  *(undefined ***)this = Proud::INetClientEvent::vftable;
  FUN_140157ce0();
  if ((param_1 & 1) != 0) {
    operator_delete(this);
  }
  return this;
}



undefined8 *
FUN_1401446d0(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *param_1 = MagiCustomOption::vftable;
  *(undefined4 *)(param_1 + 1) = 0x1010101;
  *(undefined4 *)((longlong)param_1 + 0xc) = 0x1010101;
  *(undefined4 *)(param_1 + 2) = 0x1010101;
  *(undefined4 *)((longlong)param_1 + 0x14) = 0x1010101;
  param_1[6] = 0xf;
  param_1[5] = 0;
  *(undefined1 *)(param_1 + 3) = 0;
  param_1[8] = 0;
  *(undefined1 *)(param_1 + 9) = 0;
  FUN_14004d4d0(param_1 + 3,"option\\customoption.xml",0x17,param_4,0xfffffffffffffffe);
  FUN_1401447c0(param_1);
  return param_1;
}



undefined8 * FUN_140144750(undefined8 *param_1,uint param_2)

{
  *param_1 = MagiCustomOption::vftable;
  if (0xf < (ulonglong)param_1[6]) {
    operator_delete((void *)param_1[3]);
  }
  param_1[6] = 0xf;
  param_1[5] = 0;
  *(undefined1 *)(param_1 + 3) = 0;
  *param_1 = MBISingleton<>::vftable;
  DAT_14032f268 = 0;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401447c0(longlong param_1)

{
  char cVar1;
  int iVar2;
  longlong lVar3;
  longlong lVar4;
  longlong lVar5;
  longlong *plVar6;
  longlong *plVar7;
  char *pcVar8;
  char *pcVar9;
  char *pcVar10;
  bool bVar11;
  undefined **local_98 [5];
  longlong *local_70;
  undefined8 *local_60;
  void *local_58;
  undefined8 *local_38;
  void *local_30;
  undefined8 local_18;
  
  local_18 = 0xfffffffffffffffe;
  plVar6 = (longlong *)(param_1 + 0x18);
  if (0xf < *(ulonglong *)(param_1 + 0x30)) {
    plVar6 = (longlong *)*plVar6;
  }
  FUN_14014a910(local_98,plVar6);
  DAT_140325ab8 = 0;
  cVar1 = FUN_14014a9e0(local_98,local_60 + 2);
  if (cVar1 == '\0') {
    local_98[0] = TiXmlDocument::vftable;
    if (local_38 != &DAT_14032f048) {
      operator_delete__(local_30);
    }
    local_98[0] = TiXmlNode::vftable;
    while (local_70 != (longlong *)0x0) {
      plVar6 = (longlong *)local_70[10];
      (**(code **)*local_70)(local_70,1);
      local_70 = plVar6;
    }
    if (local_60 != &DAT_14032f048) {
      operator_delete__(local_58);
      return;
    }
    return;
  }
  plVar6 = local_70;
  if (local_70 != (longlong *)0x0) {
    do {
      bVar11 = (char *)(plVar6[7] + 0x10) == (char *)0x0;
      lVar3 = 4;
      pcVar8 = (char *)(plVar6[7] + 0x10);
      pcVar9 = "log";
      do {
        if (lVar3 == 0) break;
        lVar3 = lVar3 + -1;
        bVar11 = *pcVar8 == *pcVar9;
        pcVar8 = pcVar8 + 1;
        pcVar9 = pcVar9 + 1;
      } while (bVar11);
      if (bVar11) goto LAB_1401448d6;
      plVar6 = (longlong *)plVar6[10];
      plVar7 = local_70;
    } while (plVar6 != (longlong *)0x0);
    goto joined_r0x000140144b93;
  }
  goto LAB_140144f9b;
LAB_1401448d6:
  while (lVar3 = (**(code **)(*plVar6 + 0x30))(plVar6), lVar3 == 0) {
    do {
      plVar6 = (longlong *)plVar6[10];
      plVar7 = local_70;
      if (plVar6 == (longlong *)0x0) goto joined_r0x000140144b93;
      bVar11 = (char *)(plVar6[7] + 0x10) == (char *)0x0;
      lVar3 = 4;
      pcVar8 = (char *)(plVar6[7] + 0x10);
      pcVar9 = "log";
      do {
        if (lVar3 == 0) break;
        lVar3 = lVar3 + -1;
        bVar11 = *pcVar8 == *pcVar9;
        pcVar8 = pcVar8 + 1;
        pcVar9 = pcVar9 + 1;
      } while (bVar11);
    } while (!bVar11);
  }
  lVar3 = (**(code **)(*plVar6 + 0x30))(plVar6);
  plVar7 = local_70;
  if (lVar3 != 0) {
    for (plVar6 = *(longlong **)(lVar3 + 0x28); plVar7 = local_70, plVar6 != (longlong *)0x0;
        plVar6 = (longlong *)plVar6[10]) {
      lVar3 = (**(code **)(*plVar6 + 0x30))(plVar6);
      if (lVar3 != 0) {
        lVar3 = (**(code **)(*plVar6 + 0x30))(plVar6);
        goto joined_r0x00014014495b;
      }
    }
  }
joined_r0x000140144b93:
  do {
    if (plVar7 == (longlong *)0x0) goto LAB_140144f9b;
    bVar11 = (char *)(plVar7[7] + 0x10) == (char *)0x0;
    lVar3 = 8;
    pcVar8 = (char *)(plVar7[7] + 0x10);
    pcVar9 = "connect";
    do {
      if (lVar3 == 0) break;
      lVar3 = lVar3 + -1;
      bVar11 = *pcVar8 == *pcVar9;
      pcVar8 = pcVar8 + 1;
      pcVar9 = pcVar9 + 1;
    } while (bVar11);
    if (bVar11) goto LAB_140144bc6;
    plVar7 = (longlong *)plVar7[10];
  } while( true );
joined_r0x00014014495b:
  plVar7 = local_70;
  if (lVar3 != 0) {
    pcVar8 = (char *)(*(longlong *)(lVar3 + 0x38) + 0x10);
    if (pcVar8 != (char *)0x0) {
      for (lVar4 = *(longlong *)(lVar3 + 0xa0); lVar4 != lVar3 + 0x58;
          lVar4 = *(longlong *)(lVar4 + 0x48)) {
        pcVar9 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
        bVar11 = pcVar9 == (char *)0x0;
        lVar5 = 6;
        pcVar10 = "print";
        do {
          if (lVar5 == 0) break;
          lVar5 = lVar5 + -1;
          bVar11 = *pcVar9 == *pcVar10;
          pcVar9 = pcVar9 + 1;
          pcVar10 = pcVar10 + 1;
        } while (bVar11);
        if (bVar11) {
          pcVar9 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
          if (pcVar9 != (char *)0x0) {
            lVar4 = -1;
            pcVar10 = pcVar8;
            goto code_r0x0001401449bd;
          }
          break;
        }
      }
    }
    goto LAB_140144b59;
  }
  goto joined_r0x000140144b93;
  while( true ) {
    lVar4 = lVar4 + -1;
    cVar1 = *pcVar10;
    pcVar10 = pcVar10 + 1;
    if (cVar1 == '\0') break;
code_r0x0001401449bd:
    if (lVar4 == 0) break;
  }
  if (lVar4 != -2) {
    iVar2 = _stricmp(pcVar8,"log_account");
    if (iVar2 == 0) {
      iVar2 = atoi(pcVar9);
      *(bool *)(param_1 + 0x41) = iVar2 == 1;
    }
    else {
      iVar2 = _stricmp(pcVar8,"log_item");
      if (iVar2 == 0) {
        iVar2 = atoi(pcVar9);
        *(bool *)(param_1 + 0x40) = iVar2 == 1;
      }
      else {
        iVar2 = _stricmp(pcVar8,"log_pet");
        if (iVar2 == 0) {
          iVar2 = atoi(pcVar9);
          *(bool *)(param_1 + 0x42) = iVar2 == 1;
        }
        else {
          iVar2 = _stricmp(pcVar8,"log_loginout");
          if (iVar2 == 0) {
            iVar2 = atoi(pcVar9);
            *(bool *)(param_1 + 0x43) = iVar2 == 1;
          }
          else {
            iVar2 = _stricmp(pcVar8,"agentmanagers");
            if (iVar2 == 0) {
              iVar2 = atoi(pcVar9);
              *(bool *)(param_1 + 0x44) = iVar2 == 1;
            }
            else {
              iVar2 = _stricmp(pcVar8,"agent");
              if (iVar2 == 0) {
                iVar2 = atoi(pcVar9);
                *(bool *)(param_1 + 0x45) = iVar2 == 1;
              }
              else {
                iVar2 = _stricmp(pcVar8,"api");
                if (iVar2 == 0) {
                  iVar2 = atoi(pcVar9);
                  *(bool *)(param_1 + 0x46) = iVar2 == 1;
                }
                else {
                  iVar2 = _stricmp(pcVar8,"pvp");
                  if (iVar2 == 0) {
                    iVar2 = atoi(pcVar9);
                    *(bool *)(param_1 + 0x47) = iVar2 == 1;
                  }
                  else {
                    iVar2 = _stricmp(pcVar8,"serveroption");
                    if (iVar2 == 0) {
                      iVar2 = atoi(pcVar9);
                      *(bool *)(param_1 + 0x48) = iVar2 == 1;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
LAB_140144b59:
  plVar6 = *(longlong **)(lVar3 + 0x50);
  while( true ) {
    plVar7 = local_70;
    if (plVar6 == (longlong *)0x0) goto joined_r0x000140144b93;
    lVar3 = (**(code **)(*plVar6 + 0x30))(plVar6);
    if (lVar3 != 0) break;
    plVar6 = (longlong *)plVar6[10];
  }
  lVar3 = (**(code **)(*plVar6 + 0x30))(plVar6);
  goto joined_r0x00014014495b;
LAB_140144bc6:
  while (lVar3 = (**(code **)(*plVar7 + 0x30))(plVar7), lVar3 == 0) {
    do {
      plVar7 = (longlong *)plVar7[10];
      if (plVar7 == (longlong *)0x0) goto LAB_140144f9b;
      bVar11 = (char *)(plVar7[7] + 0x10) == (char *)0x0;
      lVar3 = 8;
      pcVar8 = (char *)(plVar7[7] + 0x10);
      pcVar9 = "connect";
      do {
        if (lVar3 == 0) break;
        lVar3 = lVar3 + -1;
        bVar11 = *pcVar8 == *pcVar9;
        pcVar8 = pcVar8 + 1;
        pcVar9 = pcVar9 + 1;
      } while (bVar11);
    } while (!bVar11);
  }
  lVar3 = (**(code **)(*plVar7 + 0x30))(plVar7);
  if (lVar3 != 0) {
    for (plVar6 = *(longlong **)(lVar3 + 0x28); plVar6 != (longlong *)0x0;
        plVar6 = (longlong *)plVar6[10]) {
      lVar3 = (**(code **)(*plVar6 + 0x30))(plVar6);
      if (lVar3 != 0) {
        lVar3 = (**(code **)(*plVar6 + 0x30))(plVar6);
        while (lVar3 != 0) {
          pcVar8 = (char *)(*(longlong *)(lVar3 + 0x38) + 0x10);
          if (pcVar8 != (char *)0x0) {
            for (lVar4 = *(longlong *)(lVar3 + 0xa0); lVar4 != lVar3 + 0x58;
                lVar4 = *(longlong *)(lVar4 + 0x48)) {
              pcVar9 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
              bVar11 = pcVar9 == (char *)0x0;
              lVar5 = 8;
              pcVar10 = "connect";
              do {
                if (lVar5 == 0) break;
                lVar5 = lVar5 + -1;
                bVar11 = *pcVar9 == *pcVar10;
                pcVar9 = pcVar9 + 1;
                pcVar10 = pcVar10 + 1;
              } while (bVar11);
              if (bVar11) {
                pcVar9 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
                if (pcVar9 != (char *)0x0) {
                  iVar2 = _stricmp(pcVar8,"dbc_game");
                  if (iVar2 == 0) {
                    iVar2 = atoi(pcVar9);
                    *(bool *)(param_1 + 8) = iVar2 == 1;
                  }
                  else {
                    iVar2 = _stricmp(pcVar8,"dbc_log");
                    if (iVar2 == 0) {
                      iVar2 = atoi(pcVar9);
                      *(bool *)(param_1 + 9) = iVar2 == 1;
                    }
                    else {
                      iVar2 = _stricmp(pcVar8,"dbc_chat");
                      if (iVar2 == 0) {
                        iVar2 = atoi(pcVar9);
                        *(bool *)(param_1 + 10) = iVar2 == 1;
                      }
                      else {
                        iVar2 = _stricmp(pcVar8,"dbc_emergency");
                        if (iVar2 == 0) {
                          iVar2 = atoi(pcVar9);
                          *(bool *)(param_1 + 0xb) = iVar2 == 1;
                        }
                        else {
                          iVar2 = _stricmp(pcVar8,"auction");
                          if (iVar2 == 0) {
                            iVar2 = atoi(pcVar9);
                            *(bool *)(param_1 + 0xc) = iVar2 == 1;
                          }
                          else {
                            iVar2 = _stricmp(pcVar8,"msg");
                            if (iVar2 == 0) {
                              iVar2 = atoi(pcVar9);
                              *(bool *)(param_1 + 0xd) = iVar2 == 1;
                            }
                            else {
                              iVar2 = _stricmp(pcVar8,"manager");
                              if (iVar2 == 0) {
                                iVar2 = atoi(pcVar9);
                                *(bool *)(param_1 + 0xe) = iVar2 == 1;
                              }
                              else {
                                iVar2 = _stricmp(pcVar8,"match");
                                if (iVar2 == 0) {
                                  iVar2 = atoi(pcVar9);
                                  *(bool *)(param_1 + 0xf) = iVar2 == 1;
                                }
                                else {
                                  iVar2 = _stricmp(pcVar8,"gm");
                                  if (iVar2 == 0) {
                                    iVar2 = atoi(pcVar9);
                                    *(bool *)(param_1 + 0x10) = iVar2 == 1;
                                  }
                                  else {
                                    iVar2 = _stricmp(pcVar8,"gate");
                                    if (iVar2 == 0) {
                                      iVar2 = atoi(pcVar9);
                                      *(bool *)(param_1 + 0x11) = iVar2 == 1;
                                    }
                                    else {
                                      iVar2 = _stricmp(pcVar8,"lobby");
                                      if (iVar2 == 0) {
                                        iVar2 = atoi(pcVar9);
                                        *(bool *)(param_1 + 0x12) = iVar2 == 1;
                                      }
                                      else {
                                        iVar2 = _stricmp(pcVar8,"dungeon");
                                        if (iVar2 == 0) {
                                          iVar2 = atoi(pcVar9);
                                          *(bool *)(param_1 + 0x13) = iVar2 == 1;
                                        }
                                        else {
                                          iVar2 = _stricmp(pcVar8,"pvp");
                                          if (iVar2 == 0) {
                                            iVar2 = atoi(pcVar9);
                                            *(bool *)(param_1 + 0x14) = iVar2 == 1;
                                          }
                                          else {
                                            iVar2 = _stricmp(pcVar8,"guild");
                                            if (iVar2 == 0) {
                                              iVar2 = atoi(pcVar9);
                                              *(bool *)(param_1 + 0x15) = iVar2 == 1;
                                            }
                                            else {
                                              iVar2 = _stricmp(pcVar8,"agent");
                                              if (iVar2 == 0) {
                                                iVar2 = atoi(pcVar9);
                                                *(bool *)(param_1 + 0x16) = iVar2 == 1;
                                              }
                                              else {
                                                iVar2 = _stricmp(pcVar8,"agentmanager");
                                                if (iVar2 == 0) {
                                                  iVar2 = atoi(pcVar9);
                                                  *(bool *)(param_1 + 0x17) = iVar2 == 1;
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
                break;
              }
            }
          }
          plVar6 = *(longlong **)(lVar3 + 0x50);
          while( true ) {
            if (plVar6 == (longlong *)0x0) goto LAB_140144f9b;
            lVar3 = (**(code **)(*plVar6 + 0x30))(plVar6);
            if (lVar3 != 0) break;
            plVar6 = (longlong *)plVar6[10];
          }
          lVar3 = (**(code **)(*plVar6 + 0x30))(plVar6);
        }
        break;
      }
    }
  }
LAB_140144f9b:
  printf("//////////////////////////////////////////////////////////////////////////\n");
  if (*(char *)(param_1 + 0x40) != '\0') {
    printf("LOGVIEWER Option [%d] - LogItem View.\n");
  }
  if (*(char *)(param_1 + 0x41) != '\0') {
    printf("LOGVIEWER Option [%d] - LogAccount View.\n");
  }
  if (*(char *)(param_1 + 0x44) != '\0') {
    printf("LOGVIEWER Option [%d] - LogAgentManagers View.\n");
  }
  if (*(char *)(param_1 + 0x45) != '\0') {
    printf("LOGVIEWER Option [%d] - LogAgent View.\n");
  }
  if (*(char *)(param_1 + 0x46) != '\0') {
    printf("LOGVIEWER Option [%d] - LogApi View.\n");
  }
  if (*(char *)(param_1 + 0x47) != '\0') {
    printf("LOGVIEWER Option [%d] - LogPvp View.\n");
  }
  if (*(char *)(param_1 + 0x48) != '\0') {
    printf("LOGVIEWER Option [%d] - LogServerOption View.\n");
  }
  if (*(char *)(param_1 + 0x42) != '\0') {
    printf("LOGVIEWER Option [%d] - LogPet View.\n");
  }
  if (*(char *)(param_1 + 8) != '\0') {
    printf("Connect Option [%d] - DBC_GAME. \n");
  }
  if (*(char *)(param_1 + 9) != '\0') {
    printf("Connect Option [%d] - DBC_LOG. \n");
  }
  if (*(char *)(param_1 + 0xc) != '\0') {
    printf("Connect Option [%d] - Auction. \n");
  }
  if (*(char *)(param_1 + 0xd) != '\0') {
    printf("Connect Option [%d] - Msg. \n");
  }
  if (*(char *)(param_1 + 0xe) != '\0') {
    printf("Connect Option [%d] - Manager. \n");
  }
  if (*(char *)(param_1 + 0xf) != '\0') {
    printf("Connect Option [%d] - Match. \n");
  }
  if (*(char *)(param_1 + 0x10) != '\0') {
    printf("Connect Option [%d] - Gm. \n");
  }
  if (*(char *)(param_1 + 0x11) != '\0') {
    printf("Connect Option [%d] - Gate. \n");
  }
  if (*(char *)(param_1 + 0x12) != '\0') {
    printf("Connect Option [%d] - Lobby. \n");
  }
  if (*(char *)(param_1 + 0x13) != '\0') {
    printf("Connect Option [%d] - Dungeon. \n");
  }
  if (*(char *)(param_1 + 0x14) != '\0') {
    printf("Connect Option [%d] - Pvp. \n");
  }
  if (*(char *)(param_1 + 0x15) != '\0') {
    printf("Connect Option [%d] - Guild. \n");
  }
  if (*(char *)(param_1 + 0x16) != '\0') {
    printf("Connect Option [%d] - Agent. \n");
  }
  if (*(char *)(param_1 + 0x17) != '\0') {
    printf("Connect Option [%d] - AgentManager. \n");
  }
  printf("//////////////////////////////////////////////////////////////////////////\n");
  local_98[0] = TiXmlDocument::vftable;
  if (local_38 != &DAT_14032f048) {
    operator_delete__(local_30);
  }
  local_98[0] = TiXmlNode::vftable;
  while (local_70 != (longlong *)0x0) {
    plVar6 = (longlong *)local_70[10];
    (**(code **)*local_70)(local_70,1);
    local_70 = plVar6;
  }
  if (local_60 != &DAT_14032f048) {
    operator_delete__(local_58);
  }
  return;
}



undefined8 * FUN_140145290(undefined8 *param_1,byte param_2)

{
  DAT_14032f268 = 0;
  *param_1 = MBISingleton<>::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401452d0(undefined8 *param_1)

{
  DAT_14032f268 = 0;
  *param_1 = MBISingleton<>::vftable;
  return;
}



undefined8 * FUN_1401452f0(undefined8 *param_1)

{
  undefined4 uVar1;
  undefined8 *puVar2;
  void *pvVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  
  *param_1 = MagiAgentCommon::vftable;
  puVar2 = operator_new(0x28);
  puVar5 = (undefined8 *)0x0;
  DAT_14032f280 = puVar5;
  if (puVar2 != (undefined8 *)0x0) {
    *puVar2 = MagiServerFile::vftable;
    puVar2[1] = 0;
    puVar2[2] = 0;
    puVar2[3] = 0;
    DAT_14032f280 = puVar2;
  }
  pvVar3 = operator_new(0x1f8);
  puVar2 = puVar5;
  if (pvVar3 != (void *)0x0) {
    puVar2 = (undefined8 *)FUN_14013c8f0(pvVar3);
  }
  DAT_14032f260 = puVar2;
  pvVar3 = operator_new(0x50);
  puVar2 = puVar5;
  if (pvVar3 != (void *)0x0) {
    puVar2 = (undefined8 *)FUN_1401446d0(pvVar3);
  }
  DAT_14032f268 = puVar2;
  puVar4 = operator_new(0x80);
  puVar2 = puVar5;
  if (puVar4 != (undefined8 *)0x0) {
    *puVar4 = MagiRealTimeEventData::vftable;
    FUN_140141e80(puVar4 + 1);
    uVar1 = FUN_14015a430();
    FUN_140156a70(puVar4 + 9,uVar1,1);
    puVar2 = puVar4;
  }
  DAT_14032f288 = puVar2;
  puVar2 = operator_new(0x78);
  if (puVar2 != (undefined8 *)0x0) {
    *puVar2 = MagiServerManager::vftable;
    puVar2[1] = 0;
    puVar2[2] = 0;
    puVar2[3] = 0;
    puVar2[4] = 0x130;
    puVar2[5] = 0x20;
    puVar2[6] = 0x20;
    FUN_140141e80(puVar2 + 7);
    puVar5 = puVar2;
  }
  DAT_14032f290 = puVar5;
  return param_1;
}



void * FUN_140145460(void *param_1,uint param_2)

{
  FUN_140145490();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140145490(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *param_1 = MagiAgentCommon::vftable;
  if (DAT_14032f290 != (undefined8 *)0x0) {
    (**(code **)*DAT_14032f290)(DAT_14032f290,1,param_3,param_4,0xfffffffffffffffe);
  }
  if (DAT_14032f260 != (undefined8 *)0x0) {
    (**(code **)*DAT_14032f260)(DAT_14032f260,1);
  }
  if (DAT_14032f268 != (undefined8 *)0x0) {
    (**(code **)*DAT_14032f268)(DAT_14032f268,1);
  }
  if (DAT_14032f288 != (undefined8 *)0x0) {
    (**(code **)*DAT_14032f288)(DAT_14032f288,1);
  }
  if (DAT_14032f280 != (undefined8 *)0x0) {
    (**(code **)*DAT_14032f280)(DAT_14032f280,1);
  }
  *param_1 = MBISingleton<>::vftable;
  DAT_14032f270 = 0;
  return;
}



undefined8 * FUN_140145540(undefined8 *param_1,byte param_2)

{
  DAT_14032f270 = 0;
  *param_1 = MBISingleton<>::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140145580(undefined8 *param_1)

{
  DAT_14032f270 = 0;
  *param_1 = MBISingleton<>::vftable;
  return;
}



undefined8 * FUN_1401455a0(undefined8 *param_1,uint param_2)

{
  *param_1 = MagiServerFile::vftable;
  FUN_140145600();
  DAT_14032f280 = 0;
  *param_1 = MBISingleton<>::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140145600(longlong *param_1)

{
  longlong lVar1;
  ulonglong *puVar2;
  longlong lVar3;
  
  lVar3 = *param_1;
  if (lVar3 != 0) {
    lVar1 = param_1[1];
    if (lVar3 != lVar1) {
      puVar2 = (ulonglong *)(lVar3 + 0x20);
      do {
        if (7 < *puVar2) {
          operator_delete((void *)puVar2[-3]);
        }
        *puVar2 = 7;
        puVar2[-1] = 0;
        lVar3 = lVar3 + 0x30;
        *(undefined2 *)(puVar2 + -3) = 0;
        puVar2 = puVar2 + 6;
      } while (lVar3 != lVar1);
    }
    operator_delete((void *)*param_1);
  }
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  return;
}



undefined8 * FUN_1401456a0(undefined8 *param_1,byte param_2)

{
  DAT_14032f280 = 0;
  *param_1 = MBISingleton<>::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_1401456e0(undefined8 *param_1,uint param_2)

{
  *param_1 = MagiRealTimeEventData::vftable;
  FUN_140156c00(param_1 + 9);
  if (param_1[1] != 0) {
    FUN_14009e9b0();
  }
  *param_1 = MBISingleton<>::vftable;
  DAT_14032f288 = 0;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140145760(longlong param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  undefined8 *puVar4;
  undefined4 uVar5;
  undefined4 *puVar6;
  undefined8 uVar7;
  undefined8 *puVar8;
  undefined8 *puVar9;
  undefined8 *puVar10;
  longlong lVar11;
  undefined1 uVar12;
  
  uVar7 = 0xfffffffffffffffe;
  lVar1 = param_1 + 0x48;
  lVar11 = lVar1;
  FUN_140156b50(lVar1);
  uVar12 = 1;
  if (*(longlong *)(param_1 + 0x28) == 0) {
    puVar8 = (undefined8 *)0x0;
  }
  else {
    puVar8 = *(undefined8 **)(param_1 + 0x38);
    if (puVar8 != (undefined8 *)0x0) {
      puVar10 = (undefined8 *)*puVar8;
      puVar9 = puVar8;
      puVar4 = puVar10;
      goto joined_r0x0001401457d6;
    }
  }
  puVar10 = (undefined8 *)0x0;
  puVar9 = puVar8;
  puVar4 = puVar10;
joined_r0x0001401457d6:
  do {
    if (puVar4 == (undefined8 *)0x0) {
      FUN_140156be0(lVar1);
      return;
    }
    puVar2 = (undefined4 *)((longlong)puVar4 + 0xc);
    puVar6 = (undefined4 *)param_2[1];
    if ((puVar2 < puVar6) && (puVar3 = (undefined4 *)*param_2, puVar3 <= puVar2)) {
      if (puVar6 == (undefined4 *)param_2[2]) {
        FUN_14004a5d0(param_2,1,param_3,param_4,uVar7,puVar9,puVar10,lVar11,uVar12);
      }
      puVar6 = (undefined4 *)param_2[1];
      if (puVar6 != (undefined4 *)0x0) {
        uVar5 = *(undefined4 *)(*param_2 + ((longlong)puVar2 - (longlong)puVar3 >> 2) * 4);
LAB_14014583f:
        *puVar6 = uVar5;
      }
    }
    else {
      if (puVar6 == (undefined4 *)param_2[2]) {
        FUN_14004a5d0(param_2,1,param_3,param_4,uVar7,puVar9,puVar10,lVar11,uVar12);
      }
      puVar6 = (undefined4 *)param_2[1];
      if (puVar6 != (undefined4 *)0x0) {
        uVar5 = *puVar2;
        goto LAB_14014583f;
      }
    }
    param_2[1] = param_2[1] + 4;
    puVar4 = (undefined8 *)*puVar4;
    while (puVar4 == (undefined8 *)0x0) {
      puVar8 = puVar8 + 1;
      puVar4 = (undefined8 *)*puVar8;
    }
    if (puVar8 == puVar4) {
      puVar4 = (undefined8 *)0x0;
    }
  } while( true );
}



undefined8 * FUN_140145890(undefined8 *param_1,byte param_2)

{
  DAT_14032f288 = 0;
  *param_1 = MBISingleton<>::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401458d0(undefined8 *param_1)

{
  DAT_14032f288 = 0;
  *param_1 = MBISingleton<>::vftable;
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x0001401459ae)

undefined8 FUN_1401458f0(longlong param_1,undefined8 param_2,undefined8 param_3,longlong *param_4)

{
  longlong lVar1;
  longlong lVar2;
  char cVar3;
  undefined2 *puVar4;
  undefined2 *_Dst;
  longlong lVar5;
  undefined1 auStack_168 [32];
  undefined8 local_148;
  int local_138;
  undefined4 local_134;
  undefined2 local_130;
  undefined6 uStack_12e;
  undefined8 local_120;
  ulonglong local_118;
  undefined2 local_108;
  undefined6 uStack_106;
  longlong local_f8;
  ulonglong local_f0;
  undefined1 local_d8 [4];
  int local_d4;
  undefined1 local_cc;
  undefined4 local_c8;
  undefined2 local_b0;
  undefined6 uStack_ae;
  longlong local_a0;
  ulonglong local_98;
  undefined2 local_88;
  undefined6 uStack_86;
  undefined8 local_78;
  ulonglong local_70;
  undefined2 local_60;
  undefined6 uStack_5e;
  undefined8 local_50;
  ulonglong local_48;
  ulonglong local_38;
  
  local_148 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_168;
  lVar1 = param_4[1];
  lVar5 = *param_4;
  if (lVar5 == lVar1) {
    *(undefined1 *)(param_1 + 0x40) = 1;
  }
  else {
    do {
      FUN_140145de0(local_d8,lVar5);
      lVar2 = local_a0;
      if (*(int *)(DAT_14032f260 + 0x154) == local_d4) {
        FUN_14013cfe0(DAT_14032f260,local_d8);
      }
      else {
        local_118 = 7;
        local_120 = 0;
        local_130 = 0;
        local_f0 = 7;
        local_f8 = 0;
        local_108 = 0;
        local_138 = local_d4;
        local_134 = local_c8;
        cVar3 = FUN_140056d50(&local_108,local_a0);
        if (cVar3 != '\0') {
          puVar4 = &local_b0;
          if (7 < local_98) {
            puVar4 = (undefined2 *)CONCAT62(uStack_ae,local_b0);
          }
          _Dst = &local_108;
          if (7 < local_f0) {
            _Dst = (undefined2 *)CONCAT62(uStack_106,local_108);
          }
          memcpy(_Dst,puVar4,lVar2 * 2);
          local_f8 = lVar2;
          puVar4 = &local_108;
          if (7 < local_f0) {
            puVar4 = (undefined2 *)CONCAT62(uStack_106,local_108);
          }
          puVar4[lVar2] = 0;
        }
        FUN_140140690(DAT_14032f260,&local_138,local_cc);
        if (7 < local_f0) {
          operator_delete((void *)CONCAT62(uStack_106,local_108));
        }
        local_f0 = 7;
        local_f8 = 0;
        local_108 = 0;
        if (7 < local_118) {
          operator_delete((void *)CONCAT62(uStack_12e,local_130));
        }
        local_118 = 7;
        local_120 = 0;
        local_130 = 0;
      }
      if (7 < local_48) {
        operator_delete((void *)CONCAT62(uStack_5e,local_60));
      }
      local_48 = 7;
      local_50 = 0;
      local_60 = 0;
      if (7 < local_70) {
        operator_delete((void *)CONCAT62(uStack_86,local_88));
      }
      local_70 = 7;
      local_78 = 0;
      local_88 = 0;
      if (7 < local_98) {
        operator_delete((void *)CONCAT62(uStack_ae,local_b0));
      }
      local_98 = 7;
      local_a0 = 0;
      local_b0 = 0;
      lVar5 = lVar5 + 0xa0;
    } while (lVar5 != lVar1);
    *(undefined1 *)(param_1 + 0x40) = 1;
  }
  return 1;
}



undefined8 FUN_140145b20(longlong param_1,undefined8 param_2,undefined8 param_3,int *param_4)

{
  longlong *plVar1;
  
  if (*param_4 == 1) {
    *(undefined1 *)(param_1 + 0x40) = 1;
  }
  plVar1 = *(longlong **)(param_1 + 0x48);
  if (plVar1 != (longlong *)0x0) {
    (**(code **)(*plVar1 + 8))(plVar1,*param_4);
  }
  return 1;
}



undefined8
FUN_140145b50(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined *puVar1;
  
  if (*(longlong *)(param_1 + 0x48) != 0) {
    puVar1 = (undefined *)*param_6;
    if ((undefined *)*param_6 == (undefined *)0x0) {
      puVar1 = PTR_DAT_1403200a0;
    }
    (**(code **)(**(longlong **)(param_1 + 0x48) + 0x10))
              (*(longlong **)(param_1 + 0x48),*param_4,*param_5,puVar1);
  }
  return 1;
}



undefined8 FUN_140145b90(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined4 local_res8 [2];
  
  local_res8[0] = *param_4;
  FUN_140156b50(param_1 + 0x70);
  FUN_140047510(param_1 + 0x50,local_res8);
  FUN_140156be0(param_1 + 0x70);
  return 1;
}



undefined8
FUN_140145bf0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  if (*(longlong *)(param_1 + 0x48) != 0) {
    (**(code **)(**(longlong **)(param_1 + 0x48) + 0x38))
              (*(longlong **)(param_1 + 0x48),*param_4,*param_5,*param_6);
  }
  return 1;
}



undefined8 FUN_140145c30(longlong param_1,undefined8 param_2,undefined8 param_3,longlong *param_4)

{
  undefined *puVar1;
  
  if (*(longlong *)(param_1 + 0x48) != 0) {
    puVar1 = (undefined *)*param_4;
    if ((undefined *)*param_4 == (undefined *)0x0) {
      puVar1 = PTR_DAT_1403200a0;
    }
    (**(code **)(**(longlong **)(param_1 + 0x48) + 0x40))(*(longlong **)(param_1 + 0x48),puVar1);
  }
  return 1;
}



undefined8
FUN_140145c60(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5)

{
  if (*(longlong *)(param_1 + 0x48) != 0) {
    (**(code **)(**(longlong **)(param_1 + 0x48) + 0x48))
              (*(longlong **)(param_1 + 0x48),*param_4,*param_5);
  }
  return 1;
}



undefined8 FUN_140145c90(longlong param_1,undefined8 param_2,undefined8 param_3,longlong *param_4)

{
  undefined *puVar1;
  
  if (*(longlong *)(param_1 + 0x48) != 0) {
    puVar1 = (undefined *)*param_4;
    if ((undefined *)*param_4 == (undefined *)0x0) {
      puVar1 = PTR_DAT_1403200a0;
    }
    (**(code **)(**(longlong **)(param_1 + 0x48) + 0x50))(*(longlong **)(param_1 + 0x48),puVar1);
  }
  return 1;
}



undefined8
FUN_140145cc0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined1 *param_4,
             undefined4 *param_5,void *param_6)

{
  undefined1 local_118 [272];
  
  if (*(longlong *)(param_1 + 0x48) != 0) {
    memcpy(local_118,param_6,0x108);
    (**(code **)**(undefined8 **)(param_1 + 0x48))
              (*(undefined8 **)(param_1 + 0x48),*param_4,*param_5,local_118);
  }
  return 1;
}



undefined1 FUN_140145d30(longlong param_1)

{
  FUN_140143810(param_1 + -0x48);
  return 1;
}



void FUN_140145d50(longlong param_1)

{
  if (7 < *(ulonglong *)(param_1 + 0x90)) {
    operator_delete(*(void **)(param_1 + 0x78));
  }
  *(undefined8 *)(param_1 + 0x90) = 7;
  *(undefined8 *)(param_1 + 0x88) = 0;
  *(undefined2 *)(param_1 + 0x78) = 0;
  if (7 < *(ulonglong *)(param_1 + 0x68)) {
    operator_delete(*(void **)(param_1 + 0x50));
  }
  *(undefined8 *)(param_1 + 0x68) = 7;
  *(undefined8 *)(param_1 + 0x60) = 0;
  *(undefined2 *)(param_1 + 0x50) = 0;
  if (7 < *(ulonglong *)(param_1 + 0x40)) {
    operator_delete(*(void **)(param_1 + 0x28));
  }
  *(undefined8 *)(param_1 + 0x40) = 7;
  *(undefined8 *)(param_1 + 0x38) = 0;
  *(undefined2 *)(param_1 + 0x28) = 0;
  return;
}



undefined4 * FUN_140145de0(undefined4 *param_1,undefined4 *param_2)

{
  *param_1 = *param_2;
  param_1[1] = param_2[1];
  param_1[2] = param_2[2];
  *(undefined1 *)(param_1 + 3) = *(undefined1 *)(param_2 + 3);
  param_1[4] = param_2[4];
  param_1[5] = param_2[5];
  param_1[6] = param_2[6];
  param_1[7] = param_2[7];
  *(undefined1 *)(param_1 + 8) = *(undefined1 *)(param_2 + 8);
  *(undefined8 *)(param_1 + 0x10) = 7;
  *(undefined8 *)(param_1 + 0xe) = 0;
  *(undefined2 *)(param_1 + 10) = 0;
  FUN_140056b10(param_1 + 10,param_2 + 10,0,0xffffffffffffffff,0xfffffffffffffffe);
  *(undefined8 *)(param_1 + 0x1a) = 7;
  *(undefined8 *)(param_1 + 0x18) = 0;
  *(undefined2 *)(param_1 + 0x14) = 0;
  FUN_140056b10(param_1 + 0x14,param_2 + 0x14,0,0xffffffffffffffff);
  *(undefined8 *)(param_1 + 0x24) = 7;
  *(undefined8 *)(param_1 + 0x22) = 0;
  *(undefined2 *)(param_1 + 0x1e) = 0;
  FUN_140056b10(param_1 + 0x1e,param_2 + 0x1e,0,0xffffffffffffffff);
  return param_1;
}



undefined8
FUN_140145ec0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined *puVar1;
  
  if (*(longlong *)(param_1 + 0x48) != 0) {
    puVar1 = (undefined *)*param_5;
    if ((undefined *)*param_5 == (undefined *)0x0) {
      puVar1 = PTR_DAT_1403200a0;
    }
    (**(code **)(**(longlong **)(param_1 + 0x48) + 0x58))
              (*(longlong **)(param_1 + 0x48),*param_4,puVar1);
  }
  return 1;
}



undefined8
FUN_140145f00(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined *puVar1;
  
  if (*(longlong *)(param_1 + 0x48) != 0) {
    puVar1 = (undefined *)*param_5;
    if ((undefined *)*param_5 == (undefined *)0x0) {
      puVar1 = PTR_DAT_1403200a0;
    }
    (**(code **)(**(longlong **)(param_1 + 0x48) + 0x60))
              (*(longlong **)(param_1 + 0x48),*param_4,puVar1);
  }
  return 1;
}



undefined8
FUN_140145f40(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  undefined *puVar1;
  
  if (*(longlong *)(param_1 + 0x48) != 0) {
    puVar1 = (undefined *)*param_5;
    if ((undefined *)*param_5 == (undefined *)0x0) {
      puVar1 = PTR_DAT_1403200a0;
    }
    (**(code **)(**(longlong **)(param_1 + 0x48) + 0x68))
              (*(longlong **)(param_1 + 0x48),*param_4,puVar1);
  }
  return 1;
}



undefined8
FUN_140145f80(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5,undefined4 *param_6,undefined4 *param_7)

{
  undefined *puVar1;
  
  if (*(longlong *)(param_1 + 0x48) != 0) {
    puVar1 = (undefined *)*param_5;
    if ((undefined *)*param_5 == (undefined *)0x0) {
      puVar1 = PTR_DAT_1403200a0;
    }
    (**(code **)(**(longlong **)(param_1 + 0x48) + 0x70))
              (*(longlong **)(param_1 + 0x48),*param_4,puVar1,*param_6,*param_7);
  }
  return 1;
}



undefined8
FUN_140145fd0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,undefined4 *param_6,longlong *param_7)

{
  undefined *puVar1;
  
  if (*(longlong *)(param_1 + 0x48) != 0) {
    puVar1 = (undefined *)*param_7;
    if ((undefined *)*param_7 == (undefined *)0x0) {
      puVar1 = PTR_DAT_1403200a0;
    }
    (**(code **)(**(longlong **)(param_1 + 0x48) + 0x78))
              (*(longlong **)(param_1 + 0x48),*param_4,*param_5,*param_6,puVar1);
  }
  return 1;
}



undefined8 * FUN_140146020(undefined8 *param_1,uint param_2)

{
  *param_1 = MagiServerManager::vftable;
  if (param_1[7] != 0) {
    FUN_14009e9b0();
  }
  FUN_140146340(param_1 + 1);
  *param_1 = MBISingleton<>::vftable;
  DAT_14032f290 = 0;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401460a0(longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar2 = *param_1;
  if (lVar2 != 0) {
    lVar1 = param_1[1];
    for (; lVar2 != lVar1; lVar2 = lVar2 + 0xa0) {
      FUN_140145d50(lVar2);
    }
    operator_delete((void *)*param_1);
  }
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  return;
}



void thunk_FUN_140146560(void)

{
  FUN_140146560();
  return;
}



void FUN_140146110(longlong *param_1,longlong param_2)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0xa0;
  if (0x199999999999999U - param_2 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + param_2;
  uVar2 = (param_1[2] - *param_1) / 0xa0;
  if (uVar2 < uVar3) {
    if (0x199999999999999 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
    }
    else {
      uVar2 = uVar2 + (uVar2 >> 1);
    }
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_1401461c0(param_1,uVar2);
  }
  return;
}



void FUN_1401461c0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  code *pcVar2;
  char *pcVar3;
  longlong lVar4;
  longlong lVar5;
  char *local_res10;
  undefined8 uVar6;
  undefined **local_30 [3];
  
  uVar6 = 0xfffffffffffffffe;
  if (0x199999999999999 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar2 = (code *)swi(3);
    (*pcVar2)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0xa0) < param_2) {
    local_res10 = (char *)0x0;
    if ((param_2 != 0) && (local_res10 = operator_new(param_2 * 0xa0), local_res10 == (char *)0x0))
    {
      std::exception::exception((exception *)local_30,&local_res10);
      local_30[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_30,(ThrowInfo *)&DAT_14031d988);
    }
    pcVar3 = local_res10;
    FUN_1401465f0(*param_1,param_1[1],local_res10,param_4,uVar6);
    lVar1 = param_1[1];
    lVar5 = *param_1;
    lVar4 = lVar1 - lVar5;
    if (lVar5 != 0) {
      for (; lVar5 != lVar1; lVar5 = lVar5 + 0xa0) {
        FUN_140145d50(lVar5);
      }
      operator_delete((void *)*param_1);
    }
    param_1[2] = (longlong)(pcVar3 + param_2 * 0xa0);
    param_1[1] = (longlong)(pcVar3 + (lVar4 / 0xa0) * 0xa0);
    *param_1 = (longlong)pcVar3;
  }
  return;
}



undefined8 FUN_140146330(longlong param_1)

{
  if (*(int *)(param_1 + 0x18) == 0) {
    return 0;
  }
  return *(undefined8 *)(param_1 + 0x10);
}



void FUN_140146340(undefined8 *param_1)

{
  ulonglong uVar1;
  longlong lVar2;
  undefined8 *puVar3;
  void *pvVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  undefined8 *puVar8;
  undefined8 *puVar9;
  void *local_78;
  longlong lStack_70;
  undefined8 *local_68;
  longlong lStack_60;
  
  if (param_1[1] != 0) {
    puVar9 = (undefined8 *)*param_1;
    uVar1 = param_1[3];
    uVar5 = uVar1;
    uVar7 = 8;
    do {
      uVar6 = uVar7;
      uVar7 = uVar5 % uVar6;
      uVar5 = uVar6;
    } while (uVar7 != 0);
    local_68 = (undefined8 *)param_1[1];
    lStack_60 = param_1[2];
    do {
      lVar2 = *(longlong *)(lStack_60 + -8 + (longlong)local_68);
      puVar3 = *(undefined8 **)(lStack_60 + -0x10 + (longlong)local_68);
      for (puVar8 = local_68; puVar8 != (undefined8 *)(lStack_60 + -0x10 + (longlong)local_68);
          puVar8 = puVar8 + uVar1 / uVar6) {
        if (puVar8 == puVar9) {
          puVar9 = (undefined8 *)*puVar9;
        }
        else {
          FUN_140156c00(puVar8 + 0x1f);
          if ((void *)puVar8[0x1b] != (void *)0x0) {
            operator_delete((void *)puVar8[0x1b]);
          }
          puVar8[0x1b] = 0;
          puVar8[0x1c] = 0;
          puVar8[0x1d] = 0;
          if (7 < (ulonglong)puVar8[0x12]) {
            operator_delete((void *)puVar8[0xf]);
          }
          puVar8[0x12] = 7;
          puVar8[0x11] = 0;
          *(undefined2 *)(puVar8 + 0xf) = 0;
          if (7 < (ulonglong)puVar8[0xd]) {
            operator_delete((void *)puVar8[10]);
          }
          puVar8[0xd] = 7;
          puVar8[0xc] = 0;
          *(undefined2 *)(puVar8 + 10) = 0;
          if (7 < (ulonglong)puVar8[8]) {
            operator_delete((void *)puVar8[5]);
          }
          puVar8[8] = 7;
          puVar8[7] = 0;
          *(undefined2 *)(puVar8 + 5) = 0;
        }
      }
      operator_delete__(local_68);
      local_68 = puVar3;
      lStack_60 = lVar2;
    } while (puVar3 != (undefined8 *)0x0);
    param_1[1] = 0;
  }
  lStack_70 = param_1[2];
  local_78 = (void *)param_1[1];
  if ((void *)param_1[1] != (void *)0x0) {
    do {
      pvVar4 = *(void **)(lStack_70 + -0x10 + (longlong)local_78);
      lStack_70 = *(longlong *)(lStack_70 + -8 + (longlong)local_78);
      operator_delete__(local_78);
      local_78 = pvVar4;
    } while (pvVar4 != (void *)0x0);
    param_1[1] = 0;
    *param_1 = 0;
    param_1[4] = param_1[5];
  }
  return;
}



ulonglong FUN_140146560(undefined8 *param_1)

{
  void *pvVar1;
  ulonglong in_RAX;
  void *local_28;
  longlong lStack_20;
  
  lStack_20 = param_1[2];
  local_28 = (void *)param_1[1];
  if ((void *)param_1[1] != (void *)0x0) {
    do {
      pvVar1 = *(void **)(lStack_20 + -0x10 + (longlong)local_28);
      lStack_20 = *(longlong *)(lStack_20 + -8 + (longlong)local_28);
      operator_delete__(local_28);
      local_28 = pvVar1;
    } while (pvVar1 != (void *)0x0);
    param_1[1] = 0;
    *param_1 = 0;
    param_1[4] = param_1[5];
    return CONCAT71((int7)((ulonglong)param_1[5] >> 8),1);
  }
  return in_RAX & 0xffffffffffffff00;
}



longlong FUN_1401465f0(longlong param_1,longlong param_2,longlong param_3)

{
  for (; param_1 != param_2; param_1 = param_1 + 0xa0) {
    if (param_3 != 0) {
      FUN_140145de0(param_3,param_1);
    }
    param_3 = param_3 + 0xa0;
  }
  return param_3;
}



undefined8 * FUN_140146650(undefined8 *param_1,byte param_2)

{
  DAT_14032f290 = 0;
  *param_1 = MBISingleton<>::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140146690(undefined8 *param_1)

{
  DAT_14032f290 = 0;
  *param_1 = MBISingleton<>::vftable;
  return;
}



undefined1 *
FUN_1401466b0(undefined1 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *(undefined8 *)(param_1 + 0x18) = 0xf;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *param_1 = 0;
  *(undefined8 *)(param_1 + 0x40) = 0xf;
  *(undefined8 *)(param_1 + 0x38) = 0;
  param_1[0x28] = 0;
  *(undefined8 *)(param_1 + 0x68) = 0xf;
  *(undefined8 *)(param_1 + 0x60) = 0;
  param_1[0x50] = 0;
  *(undefined8 *)(param_1 + 0x90) = 0xf;
  *(undefined8 *)(param_1 + 0x88) = 0;
  param_1[0x78] = 0;
  *(undefined8 *)(param_1 + 0xb8) = 0xf;
  *(undefined8 *)(param_1 + 0xb0) = 0;
  param_1[0xa0] = 0;
  *(undefined8 *)(param_1 + 0xe0) = 0xf;
  *(undefined8 *)(param_1 + 0xd8) = 0;
  param_1[200] = 0;
  *(undefined8 *)(param_1 + 0x108) = 0xf;
  *(undefined8 *)(param_1 + 0x100) = 0;
  param_1[0xf0] = 0;
  *(undefined8 *)(param_1 + 0x130) = 0xf;
  *(undefined8 *)(param_1 + 0x128) = 0;
  param_1[0x118] = 0;
  *(undefined8 *)(param_1 + 0x158) = 0xf;
  *(undefined8 *)(param_1 + 0x150) = 0;
  param_1[0x140] = 0;
  *(undefined4 *)(param_1 + 0x168) = 0;
  *(undefined8 *)(param_1 + 0x188) = 0xf;
  *(undefined8 *)(param_1 + 0x180) = 0;
  param_1[0x170] = 0;
  *(undefined8 *)(param_1 + 0x1b0) = 0xf;
  *(undefined8 *)(param_1 + 0x1a8) = 0;
  param_1[0x198] = 0;
  *(undefined8 *)(param_1 + 0x1d8) = 0xf;
  *(undefined8 *)(param_1 + 0x1d0) = 0;
  param_1[0x1c0] = 0;
  *(undefined8 *)(param_1 + 0x1e8) = 0;
  *(undefined4 *)(param_1 + 0x1f0) = 0;
  *(undefined8 *)(param_1 + 500) = 100;
  param_1[0x1fc] = 0;
  *(undefined8 *)(param_1 + 0x218) = 0xf;
  *(undefined8 *)(param_1 + 0x210) = 0;
  param_1[0x200] = 0;
  FUN_14004d4d0(param_1 + 0x200,&DAT_1402943e0,3,param_4,0xfffffffffffffffe);
  *(undefined4 *)(param_1 + 0x228) = 1000;
  return param_1;
}



void FUN_140146830(undefined8 *param_1)

{
  if (0xf < (ulonglong)param_1[0x43]) {
    operator_delete((void *)param_1[0x40]);
  }
  param_1[0x43] = 0xf;
  param_1[0x42] = 0;
  *(undefined1 *)(param_1 + 0x40) = 0;
  if (0xf < (ulonglong)param_1[0x3b]) {
    operator_delete((void *)param_1[0x38]);
  }
  param_1[0x3b] = 0xf;
  param_1[0x3a] = 0;
  *(undefined1 *)(param_1 + 0x38) = 0;
  if (0xf < (ulonglong)param_1[0x36]) {
    operator_delete((void *)param_1[0x33]);
  }
  param_1[0x36] = 0xf;
  param_1[0x35] = 0;
  *(undefined1 *)(param_1 + 0x33) = 0;
  if (0xf < (ulonglong)param_1[0x31]) {
    operator_delete((void *)param_1[0x2e]);
  }
  param_1[0x31] = 0xf;
  param_1[0x30] = 0;
  *(undefined1 *)(param_1 + 0x2e) = 0;
  if (0xf < (ulonglong)param_1[0x2b]) {
    operator_delete((void *)param_1[0x28]);
  }
  param_1[0x2b] = 0xf;
  param_1[0x2a] = 0;
  *(undefined1 *)(param_1 + 0x28) = 0;
  if (0xf < (ulonglong)param_1[0x26]) {
    operator_delete((void *)param_1[0x23]);
  }
  param_1[0x26] = 0xf;
  param_1[0x25] = 0;
  *(undefined1 *)(param_1 + 0x23) = 0;
  if (0xf < (ulonglong)param_1[0x21]) {
    operator_delete((void *)param_1[0x1e]);
  }
  param_1[0x21] = 0xf;
  param_1[0x20] = 0;
  *(undefined1 *)(param_1 + 0x1e) = 0;
  if (0xf < (ulonglong)param_1[0x1c]) {
    operator_delete((void *)param_1[0x19]);
  }
  param_1[0x1c] = 0xf;
  param_1[0x1b] = 0;
  *(undefined1 *)(param_1 + 0x19) = 0;
  if (0xf < (ulonglong)param_1[0x17]) {
    operator_delete((void *)param_1[0x14]);
  }
  param_1[0x17] = 0xf;
  param_1[0x16] = 0;
  *(undefined1 *)(param_1 + 0x14) = 0;
  if (0xf < (ulonglong)param_1[0x12]) {
    operator_delete((void *)param_1[0xf]);
  }
  param_1[0x12] = 0xf;
  param_1[0x11] = 0;
  *(undefined1 *)(param_1 + 0xf) = 0;
  if (0xf < (ulonglong)param_1[0xd]) {
    operator_delete((void *)param_1[10]);
  }
  param_1[0xd] = 0xf;
  param_1[0xc] = 0;
  *(undefined1 *)(param_1 + 10) = 0;
  if (0xf < (ulonglong)param_1[8]) {
    operator_delete((void *)param_1[5]);
  }
  param_1[8] = 0xf;
  param_1[7] = 0;
  *(undefined1 *)(param_1 + 5) = 0;
  if (0xf < (ulonglong)param_1[3]) {
    operator_delete((void *)*param_1);
  }
  param_1[3] = 0xf;
  param_1[2] = 0;
  *(undefined1 *)param_1 = 0;
  return;
}



longlong FUN_140146a90(longlong param_1,longlong param_2)

{
  FUN_14004d170(param_1,param_2,0,0xffffffffffffffff);
  FUN_14004d170(param_1 + 0x28,param_2 + 0x28,0,0xffffffffffffffff);
  FUN_14004d170(param_1 + 0x50,param_2 + 0x50,0,0xffffffffffffffff);
  FUN_14004d170(param_1 + 0x78,param_2 + 0x78,0,0xffffffffffffffff);
  FUN_14004d170(param_1 + 0xa0,param_2 + 0xa0,0,0xffffffffffffffff);
  FUN_14004d170(param_1 + 200,param_2 + 200,0,0xffffffffffffffff);
  FUN_14004d170(param_1 + 0xf0,param_2 + 0xf0,0,0xffffffffffffffff);
  FUN_14004d170(param_1 + 0x118,param_2 + 0x118,0,0xffffffffffffffff);
  FUN_14004d170(param_1 + 0x140,param_2 + 0x140,0,0xffffffffffffffff);
  *(undefined4 *)(param_1 + 0x168) = *(undefined4 *)(param_2 + 0x168);
  FUN_14004d170(param_1 + 0x170,param_2 + 0x170,0,0xffffffffffffffff);
  FUN_14004d170(param_1 + 0x198,param_2 + 0x198,0,0xffffffffffffffff);
  FUN_14004d170(param_1 + 0x1c0,param_2 + 0x1c0,0,0xffffffffffffffff);
  *(undefined1 *)(param_1 + 0x1e8) = *(undefined1 *)(param_2 + 0x1e8);
  *(undefined1 *)(param_1 + 0x1e9) = *(undefined1 *)(param_2 + 0x1e9);
  *(undefined1 *)(param_1 + 0x1ea) = *(undefined1 *)(param_2 + 0x1ea);
  *(undefined1 *)(param_1 + 0x1eb) = *(undefined1 *)(param_2 + 0x1eb);
  *(undefined1 *)(param_1 + 0x1ec) = *(undefined1 *)(param_2 + 0x1ec);
  *(undefined1 *)(param_1 + 0x1ed) = *(undefined1 *)(param_2 + 0x1ed);
  *(undefined1 *)(param_1 + 0x1ee) = *(undefined1 *)(param_2 + 0x1ee);
  *(undefined1 *)(param_1 + 0x1ef) = *(undefined1 *)(param_2 + 0x1ef);
  *(undefined1 *)(param_1 + 0x1f0) = *(undefined1 *)(param_2 + 0x1f0);
  *(undefined1 *)(param_1 + 0x1f1) = *(undefined1 *)(param_2 + 0x1f1);
  *(undefined1 *)(param_1 + 0x1f2) = *(undefined1 *)(param_2 + 0x1f2);
  *(undefined1 *)(param_1 + 499) = *(undefined1 *)(param_2 + 499);
  *(undefined4 *)(param_1 + 500) = *(undefined4 *)(param_2 + 500);
  *(undefined4 *)(param_1 + 0x1f8) = *(undefined4 *)(param_2 + 0x1f8);
  *(undefined1 *)(param_1 + 0x1fc) = *(undefined1 *)(param_2 + 0x1fc);
  FUN_14004d170(param_1 + 0x200,param_2 + 0x200,0,0xffffffffffffffff);
  *(undefined4 *)(param_1 + 0x228) = *(undefined4 *)(param_2 + 0x228);
  return param_1;
}



void FUN_140146cc0(longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar2 = *param_1;
  if (lVar2 != 0) {
    lVar1 = param_1[1];
    for (; lVar2 != lVar1; lVar2 = lVar2 + 0x230) {
      FUN_140146830(lVar2);
    }
    operator_delete((void *)*param_1);
  }
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  return;
}



void FUN_140146d20(ulonglong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  uVar1 = param_1[1];
  if ((param_2 < uVar1) && (uVar2 = *param_1, uVar2 <= param_2)) {
    if (uVar1 == param_1[2]) {
      FUN_140146de0(param_1);
    }
    if (param_1[1] != 0) {
      FUN_140147010(param_1[1],((longlong)(param_2 - uVar2) / 0x230) * 0x230 + *param_1,param_3,
                    param_4,uVar3);
    }
  }
  else {
    if (uVar1 == param_1[2]) {
      FUN_140146de0(param_1);
    }
    if (param_1[1] != 0) {
      FUN_140147010(param_1[1],param_2,param_3,param_4,uVar3);
    }
  }
  param_1[1] = param_1[1] + 0x230;
  return;
}



void FUN_140146de0(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x230;
  if (0x75075075075074 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x230;
  if (uVar2 < uVar3) {
    if (0x75075075075075 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_140146ea0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_140146ea0(param_1,uVar2);
  }
  return;
}



void FUN_140146ea0(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  code *pcVar2;
  char *pcVar3;
  longlong lVar4;
  longlong lVar5;
  char *local_res10;
  undefined8 uVar6;
  undefined **local_30 [3];
  
  uVar6 = 0xfffffffffffffffe;
  if (0x75075075075075 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar2 = (code *)swi(3);
    (*pcVar2)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x230) < param_2) {
    local_res10 = (char *)0x0;
    if ((param_2 != 0) && (local_res10 = operator_new(param_2 * 0x230), local_res10 == (char *)0x0))
    {
      std::exception::exception((exception *)local_30,&local_res10);
      local_30[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_30,(ThrowInfo *)&DAT_14031d988);
    }
    pcVar3 = local_res10;
    FUN_140147330(*param_1,param_1[1],local_res10,param_4,uVar6);
    lVar1 = param_1[1];
    lVar5 = *param_1;
    lVar4 = lVar1 - lVar5;
    if (lVar5 != 0) {
      for (; lVar5 != lVar1; lVar5 = lVar5 + 0x230) {
        FUN_140146830(lVar5);
      }
      operator_delete((void *)*param_1);
    }
    param_1[2] = (longlong)(pcVar3 + param_2 * 0x230);
    param_1[1] = (longlong)(pcVar3 + (lVar4 / 0x230) * 0x230);
    *param_1 = (longlong)pcVar3;
  }
  return;
}



undefined1 * FUN_140147010(undefined1 *param_1,longlong param_2)

{
  *(undefined8 *)(param_1 + 0x18) = 0xf;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *param_1 = 0;
  FUN_14004d170(param_1,param_2,0,0xffffffffffffffff,0xfffffffffffffffe);
  *(undefined8 *)(param_1 + 0x40) = 0xf;
  *(undefined8 *)(param_1 + 0x38) = 0;
  param_1[0x28] = 0;
  FUN_14004d170(param_1 + 0x28,param_2 + 0x28,0,0xffffffffffffffff);
  *(undefined8 *)(param_1 + 0x68) = 0xf;
  *(undefined8 *)(param_1 + 0x60) = 0;
  param_1[0x50] = 0;
  FUN_14004d170(param_1 + 0x50,param_2 + 0x50,0,0xffffffffffffffff);
  *(undefined8 *)(param_1 + 0x90) = 0xf;
  *(undefined8 *)(param_1 + 0x88) = 0;
  param_1[0x78] = 0;
  FUN_14004d170(param_1 + 0x78,param_2 + 0x78,0,0xffffffffffffffff);
  *(undefined8 *)(param_1 + 0xb8) = 0xf;
  *(undefined8 *)(param_1 + 0xb0) = 0;
  param_1[0xa0] = 0;
  FUN_14004d170(param_1 + 0xa0,param_2 + 0xa0,0,0xffffffffffffffff);
  *(undefined8 *)(param_1 + 0xe0) = 0xf;
  *(undefined8 *)(param_1 + 0xd8) = 0;
  param_1[200] = 0;
  FUN_14004d170(param_1 + 200,param_2 + 200,0,0xffffffffffffffff);
  *(undefined8 *)(param_1 + 0x108) = 0xf;
  *(undefined8 *)(param_1 + 0x100) = 0;
  param_1[0xf0] = 0;
  FUN_14004d170(param_1 + 0xf0,param_2 + 0xf0,0,0xffffffffffffffff);
  *(undefined8 *)(param_1 + 0x130) = 0xf;
  *(undefined8 *)(param_1 + 0x128) = 0;
  param_1[0x118] = 0;
  FUN_14004d170(param_1 + 0x118,param_2 + 0x118,0,0xffffffffffffffff);
  *(undefined8 *)(param_1 + 0x158) = 0xf;
  *(undefined8 *)(param_1 + 0x150) = 0;
  param_1[0x140] = 0;
  FUN_14004d170(param_1 + 0x140,param_2 + 0x140,0,0xffffffffffffffff);
  *(undefined4 *)(param_1 + 0x168) = *(undefined4 *)(param_2 + 0x168);
  *(undefined8 *)(param_1 + 0x188) = 0xf;
  *(undefined8 *)(param_1 + 0x180) = 0;
  param_1[0x170] = 0;
  FUN_14004d170(param_1 + 0x170,param_2 + 0x170,0,0xffffffffffffffff);
  *(undefined8 *)(param_1 + 0x1b0) = 0xf;
  *(undefined8 *)(param_1 + 0x1a8) = 0;
  param_1[0x198] = 0;
  FUN_14004d170(param_1 + 0x198,param_2 + 0x198,0,0xffffffffffffffff);
  *(undefined8 *)(param_1 + 0x1d8) = 0xf;
  *(undefined8 *)(param_1 + 0x1d0) = 0;
  param_1[0x1c0] = 0;
  FUN_14004d170(param_1 + 0x1c0,param_2 + 0x1c0,0,0xffffffffffffffff);
  param_1[0x1e8] = *(undefined1 *)(param_2 + 0x1e8);
  param_1[0x1e9] = *(undefined1 *)(param_2 + 0x1e9);
  param_1[0x1ea] = *(undefined1 *)(param_2 + 0x1ea);
  param_1[0x1eb] = *(undefined1 *)(param_2 + 0x1eb);
  param_1[0x1ec] = *(undefined1 *)(param_2 + 0x1ec);
  param_1[0x1ed] = *(undefined1 *)(param_2 + 0x1ed);
  param_1[0x1ee] = *(undefined1 *)(param_2 + 0x1ee);
  param_1[0x1ef] = *(undefined1 *)(param_2 + 0x1ef);
  param_1[0x1f0] = *(undefined1 *)(param_2 + 0x1f0);
  param_1[0x1f1] = *(undefined1 *)(param_2 + 0x1f1);
  param_1[0x1f2] = *(undefined1 *)(param_2 + 0x1f2);
  param_1[499] = *(undefined1 *)(param_2 + 499);
  *(undefined4 *)(param_1 + 500) = *(undefined4 *)(param_2 + 500);
  *(undefined4 *)(param_1 + 0x1f8) = *(undefined4 *)(param_2 + 0x1f8);
  param_1[0x1fc] = *(undefined1 *)(param_2 + 0x1fc);
  *(undefined8 *)(param_1 + 0x218) = 0xf;
  *(undefined8 *)(param_1 + 0x210) = 0;
  param_1[0x200] = 0;
  FUN_14004d170(param_1 + 0x200,param_2 + 0x200,0,0xffffffffffffffff);
  *(undefined4 *)(param_1 + 0x228) = *(undefined4 *)(param_2 + 0x228);
  return param_1;
}



longlong FUN_140147330(longlong param_1,longlong param_2,longlong param_3)

{
  for (; param_1 != param_2; param_1 = param_1 + 0x230) {
    if (param_3 != 0) {
      FUN_140147010(param_3,param_1);
    }
    param_3 = param_3 + 0x230;
  }
  return param_3;
}



void * FUN_140147390(void *param_1,uint param_2)

{
  FUN_1402030a0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401473c0(undefined8 *param_1)

{
  DAT_14032f258 = 0;
  *param_1 = MBISingleton<>::vftable;
  return;
}



void FUN_1401473e0(void)

{
                    // WARNING: Could not recover jumptable at 0x0001401473e7. Too many branches
                    // WARNING: Treating indirect jump as call
  LeaveCriticalSection(DAT_14032f298);
  return;
}



undefined8 * FUN_1401473f0(undefined8 *param_1,byte param_2)

{
  DAT_14032f258 = 0;
  *param_1 = MBISingleton<>::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_140147430(undefined8 *param_1,uint param_2)

{
  LPCRITICAL_SECTION lpCriticalSection;
  
  lpCriticalSection = DAT_14032f298;
  *param_1 = MBMultiThreadSync<>::vftable;
  if (lpCriticalSection != (LPCRITICAL_SECTION)0x0) {
    DeleteCriticalSection(lpCriticalSection);
    operator_delete(lpCriticalSection);
  }
  DAT_14032f298 = (LPCRITICAL_SECTION)0x0;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401474a0(wchar_t *param_1,size_t param_2,wchar_t *param_3,undefined8 param_4)

{
  undefined8 local_res20;
  
  local_res20 = param_4;
  _vsnwprintf_s(param_1,0x20,param_2,param_3,(va_list)&local_res20);
  return;
}



void FUN_1401474d0(wchar_t *param_1,size_t param_2,wchar_t *param_3,undefined8 param_4)

{
  undefined8 local_res20;
  
  local_res20 = param_4;
  _vsnwprintf_s(param_1,0x104,param_2,param_3,(va_list)&local_res20);
  return;
}



void FUN_140147500(longlong param_1)

{
  FUN_140147390(param_1 + -8);
  return;
}



void thunk_FUN_140147780(void)

{
  FUN_140147780();
  return;
}



void FUN_140147520(ulonglong *param_1,ulonglong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  undefined2 *puVar3;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  uVar1 = param_1[1];
  if ((param_2 < uVar1) && (uVar2 = *param_1, uVar2 <= param_2)) {
    if (uVar1 == param_1[2]) {
      FUN_1401476c0(param_1);
    }
    uVar1 = *param_1;
    puVar3 = (undefined2 *)param_1[1];
    if (puVar3 != (undefined2 *)0x0) {
      *(undefined8 *)(puVar3 + 0xc) = 7;
      *(undefined8 *)(puVar3 + 8) = 0;
      *puVar3 = 0;
      FUN_140056b10(puVar3,uVar1 + ((longlong)(param_2 - uVar2) / 0x28) * 0x28,0,0xffffffffffffffff,
                    uVar4);
    }
  }
  else {
    if (uVar1 == param_1[2]) {
      FUN_1401476c0(param_1);
    }
    puVar3 = (undefined2 *)param_1[1];
    if (puVar3 != (undefined2 *)0x0) {
      *(undefined8 *)(puVar3 + 0xc) = 7;
      *(undefined8 *)(puVar3 + 8) = 0;
      *puVar3 = 0;
      FUN_140056b10(puVar3,param_2,0,0xffffffffffffffff,uVar4);
    }
  }
  param_1[1] = param_1[1] + 0x28;
  return;
}



undefined * FUN_140147610(void)

{
  void *pvVar1;
  char *local_res8 [4];
  undefined **local_28 [5];
  
  DAT_14032f210 = 0;
  pvVar1 = operator_new(0x30);
  if (pvVar1 != (void *)0x0) {
    DAT_14032f208 = pvVar1;
    *(void **)pvVar1 = pvVar1;
    *(void **)((longlong)DAT_14032f208 + 8) = DAT_14032f208;
    *(void **)((longlong)DAT_14032f208 + 0x10) = DAT_14032f208;
    *(undefined1 *)((longlong)DAT_14032f208 + 0x28) = 1;
    *(undefined1 *)((longlong)DAT_14032f208 + 0x29) = 1;
    return &DAT_14032f200;
  }
  local_res8[0] = (char *)0x0;
  std::exception::exception((exception *)local_28,local_res8);
  local_28[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_28,(ThrowInfo *)&DAT_14031d988);
}



void FUN_1401476b0(void)

{
                    // WARNING: Could not recover jumptable at 0x0001401476b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(DAT_14032f208);
  return;
}



void FUN_1401476c0(longlong *param_1)

{
  code *pcVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar3 = (param_1[1] - *param_1) / 0x28;
  if (0x666666666666665 < uVar3) {
    std::_Xlength_error("vector<T> too long");
    pcVar1 = (code *)swi(3);
    (*pcVar1)();
    return;
  }
  uVar3 = uVar3 + 1;
  uVar2 = (param_1[2] - *param_1) / 0x28;
  if (uVar2 < uVar3) {
    if (0x666666666666666 - (uVar2 >> 1) < uVar2) {
      uVar2 = 0;
      if (uVar3 != 0) {
        uVar2 = uVar3;
      }
      FUN_1401478d0(param_1,uVar2);
      return;
    }
    uVar2 = uVar2 + (uVar2 >> 1);
    if (uVar2 < uVar3) {
      uVar2 = uVar3;
    }
    FUN_1401478d0(param_1,uVar2);
  }
  return;
}



void FUN_140147780(undefined8 *param_1)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  puVar2 = (undefined8 *)*param_1;
  if (puVar2 != (undefined8 *)0x0) {
    puVar1 = (undefined8 *)param_1[1];
    for (; puVar2 != puVar1; puVar2 = puVar2 + 5) {
      if (7 < (ulonglong)puVar2[3]) {
        operator_delete((void *)*puVar2);
      }
      puVar2[3] = 7;
      puVar2[2] = 0;
      *(undefined2 *)puVar2 = 0;
    }
    operator_delete((void *)*param_1);
  }
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  return;
}



longlong * FUN_140147810(longlong *param_1,longlong *param_2,longlong *param_3)

{
  char cVar1;
  longlong *plVar2;
  longlong *plVar3;
  longlong *local_res10;
  undefined1 local_res20 [8];
  
  if ((param_2 == (longlong *)*DAT_14032f208) && (param_3 == DAT_14032f208)) {
    FUN_140147dd0();
    *param_1 = *DAT_14032f208;
    return param_1;
  }
  while (param_2 != param_3) {
    local_res10 = param_2;
    if (*(char *)((longlong)param_2 + 0x29) == '\0') {
      local_res10 = (longlong *)param_2[2];
      if (*(char *)((longlong)local_res10 + 0x29) == '\0') {
        cVar1 = *(char *)(*local_res10 + 0x29);
        plVar2 = (longlong *)*local_res10;
        while (cVar1 == '\0') {
          cVar1 = *(char *)(*plVar2 + 0x29);
          local_res10 = plVar2;
          plVar2 = (longlong *)*plVar2;
        }
      }
      else {
        cVar1 = *(char *)(param_2[1] + 0x29);
        plVar3 = (longlong *)param_2[1];
        plVar2 = param_2;
        while ((local_res10 = plVar3, cVar1 == '\0' && (plVar2 == (longlong *)local_res10[2]))) {
          cVar1 = *(char *)(local_res10[1] + 0x29);
          plVar3 = (longlong *)local_res10[1];
          plVar2 = local_res10;
        }
      }
    }
    FUN_140147a80(local_res20,param_2);
    param_2 = local_res10;
  }
  *param_1 = (longlong)param_2;
  return param_1;
}



void FUN_1401478d0(longlong *param_1,ulonglong param_2)

{
  longlong lVar1;
  longlong lVar2;
  code *pcVar3;
  char *pcVar4;
  char *local_res10;
  undefined8 uVar5;
  undefined **local_20 [3];
  
  uVar5 = 0xfffffffffffffffe;
  if (0x666666666666666 < param_2) {
    std::_Xlength_error("vector<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  if ((ulonglong)((param_1[2] - *param_1) / 0x28) < param_2) {
    local_res10 = (char *)0x0;
    if (param_2 != 0) {
      local_res10 = operator_new(param_2 * 0x28);
      if (local_res10 == (char *)0x0) {
        std::exception::exception((exception *)local_20,&local_res10);
        local_20[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_20,(ThrowInfo *)&DAT_14031d988);
      }
    }
    pcVar4 = local_res10;
    FUN_140147f70(*param_1,param_1[1],local_res10);
    lVar1 = param_1[1];
    lVar2 = *param_1;
    if (lVar2 != 0) {
      FUN_140147a20(lVar2,lVar1,lVar1 - lVar2,lVar1,uVar5);
      operator_delete((void *)*param_1);
    }
    param_1[2] = (longlong)(pcVar4 + param_2 * 0x28);
    param_1[1] = (longlong)(pcVar4 + ((lVar1 - lVar2) / 0x28) * 0x28);
    *param_1 = (longlong)pcVar4;
  }
  return;
}



void FUN_140147a20(undefined8 *param_1,undefined8 *param_2)

{
  for (; param_1 != param_2; param_1 = param_1 + 5) {
    if (7 < (ulonglong)param_1[3]) {
      operator_delete((void *)*param_1);
    }
    param_1[3] = 7;
    param_1[2] = 0;
    *(undefined2 *)param_1 = 0;
  }
  return;
}



undefined8 * FUN_140147a80(undefined8 *param_1,longlong *param_2)

{
  char cVar1;
  longlong *plVar2;
  code *pcVar3;
  longlong *plVar4;
  longlong lVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *plVar10;
  
  if (*(char *)((longlong)param_2 + 0x29) != '\0') {
    std::_Xout_of_range("invalid map/set<T> iterator");
    pcVar3 = (code *)swi(3);
    puVar6 = (undefined8 *)(*pcVar3)();
    return puVar6;
  }
  plVar10 = (longlong *)param_2[2];
  plVar7 = param_2 + 2;
  if (*(char *)((longlong)plVar10 + 0x29) == '\0') {
    cVar1 = *(char *)(*plVar10 + 0x29);
    plVar8 = (longlong *)*plVar10;
    while (cVar1 == '\0') {
      cVar1 = *(char *)(*plVar8 + 0x29);
      plVar10 = plVar8;
      plVar8 = (longlong *)*plVar8;
    }
  }
  else {
    cVar1 = *(char *)(param_2[1] + 0x29);
    plVar9 = (longlong *)param_2[1];
    plVar8 = param_2;
    while ((plVar10 = plVar9, cVar1 == '\0' && (plVar8 == (longlong *)plVar10[2]))) {
      cVar1 = *(char *)(plVar10[1] + 0x29);
      plVar9 = (longlong *)plVar10[1];
      plVar8 = plVar10;
    }
  }
  plVar8 = (longlong *)*param_2;
  if (*(char *)((longlong)plVar8 + 0x29) == '\0') {
    plVar9 = plVar8;
    if ((*(char *)(*plVar7 + 0x29) == '\0') && (plVar9 = (longlong *)plVar10[2], plVar10 != param_2)
       ) {
      plVar8[1] = (longlong)plVar10;
      *plVar10 = *param_2;
      plVar8 = plVar10;
      if (plVar10 != (longlong *)*plVar7) {
        plVar8 = (longlong *)plVar10[1];
        if (*(char *)((longlong)plVar9 + 0x29) == '\0') {
          plVar9[1] = (longlong)plVar8;
        }
        *plVar8 = (longlong)plVar9;
        plVar10[2] = *plVar7;
        *(longlong **)(*plVar7 + 8) = plVar10;
      }
      if ((longlong *)DAT_14032f208[1] == param_2) {
        DAT_14032f208[1] = plVar10;
      }
      else {
        puVar6 = (undefined8 *)param_2[1];
        if ((longlong *)*puVar6 == param_2) {
          *puVar6 = plVar10;
        }
        else {
          puVar6[2] = plVar10;
        }
      }
      plVar10[1] = param_2[1];
      lVar5 = plVar10[5];
      *(char *)(plVar10 + 5) = (char)param_2[5];
      *(char *)(param_2 + 5) = (char)lVar5;
      goto LAB_140147c53;
    }
  }
  else {
    plVar9 = (longlong *)*plVar7;
  }
  plVar8 = (longlong *)param_2[1];
  if (*(char *)((longlong)plVar9 + 0x29) == '\0') {
    plVar9[1] = (longlong)plVar8;
  }
  if ((longlong *)DAT_14032f208[1] == param_2) {
    DAT_14032f208[1] = plVar9;
  }
  else if ((longlong *)*plVar8 == param_2) {
    *plVar8 = (longlong)plVar9;
  }
  else {
    plVar8[2] = (longlong)plVar9;
  }
  if ((longlong *)*DAT_14032f208 == param_2) {
    plVar7 = plVar8;
    if (*(char *)((longlong)plVar9 + 0x29) == '\0') {
      cVar1 = *(char *)(*plVar9 + 0x29);
      plVar2 = (longlong *)*plVar9;
      plVar7 = plVar9;
      while (plVar4 = plVar2, cVar1 == '\0') {
        plVar2 = (longlong *)*plVar4;
        cVar1 = *(char *)((longlong)plVar2 + 0x29);
        plVar7 = plVar4;
      }
    }
    *DAT_14032f208 = plVar7;
  }
  if ((longlong *)DAT_14032f208[2] == param_2) {
    if (*(char *)((longlong)plVar9 + 0x29) == '\0') {
      cVar1 = *(char *)(plVar9[2] + 0x29);
      plVar7 = (longlong *)plVar9[2];
      plVar2 = plVar9;
      while (plVar4 = plVar7, cVar1 == '\0') {
        plVar7 = (longlong *)plVar4[2];
        cVar1 = *(char *)((longlong)plVar7 + 0x29);
        plVar2 = plVar4;
      }
      DAT_14032f208[2] = plVar2;
    }
    else {
      DAT_14032f208[2] = plVar8;
    }
  }
LAB_140147c53:
  if ((char)param_2[5] == '\x01') {
    if (plVar9 != (longlong *)DAT_14032f208[1]) {
      do {
        plVar7 = plVar8;
        if ((char)plVar9[5] != '\x01') break;
        plVar8 = (longlong *)*plVar7;
        if (plVar9 == plVar8) {
          plVar8 = (longlong *)plVar7[2];
          if ((char)plVar8[5] == '\0') {
            *(undefined1 *)(plVar8 + 5) = 1;
            *(undefined1 *)(plVar7 + 5) = 0;
            FUN_140147eb0(plVar7);
            plVar8 = (longlong *)plVar7[2];
          }
          if (*(char *)((longlong)plVar8 + 0x29) == '\0') {
            if ((*(char *)(*plVar8 + 0x28) != '\x01') || (*(char *)(plVar8[2] + 0x28) != '\x01')) {
              if (*(char *)(plVar8[2] + 0x28) == '\x01') {
                *(undefined1 *)(*plVar8 + 0x28) = 1;
                *(undefined1 *)(plVar8 + 5) = 0;
                FUN_140147f10();
                plVar8 = (longlong *)plVar7[2];
              }
              *(char *)(plVar8 + 5) = (char)plVar7[5];
              *(undefined1 *)(plVar7 + 5) = 1;
              *(undefined1 *)(plVar8[2] + 0x28) = 1;
              FUN_140147eb0(plVar7);
              break;
            }
LAB_140147d2d:
            *(undefined1 *)(plVar8 + 5) = 0;
          }
        }
        else {
          if ((char)plVar8[5] == '\0') {
            *(undefined1 *)(plVar8 + 5) = 1;
            *(undefined1 *)(plVar7 + 5) = 0;
            FUN_140147f10(plVar7);
            plVar8 = (longlong *)*plVar7;
          }
          if (*(char *)((longlong)plVar8 + 0x29) == '\0') {
            if ((*(char *)(plVar8[2] + 0x28) == '\x01') && (*(char *)(*plVar8 + 0x28) == '\x01'))
            goto LAB_140147d2d;
            if (*(char *)(*plVar8 + 0x28) == '\x01') {
              *(undefined1 *)(plVar8[2] + 0x28) = 1;
              *(undefined1 *)(plVar8 + 5) = 0;
              FUN_140147eb0();
              plVar8 = (longlong *)*plVar7;
            }
            *(char *)(plVar8 + 5) = (char)plVar7[5];
            *(undefined1 *)(plVar7 + 5) = 1;
            *(undefined1 *)(*plVar8 + 0x28) = 1;
            FUN_140147f10(plVar7);
            break;
          }
        }
        plVar8 = (longlong *)plVar7[1];
        plVar9 = plVar7;
      } while (plVar7 != (longlong *)DAT_14032f208[1]);
    }
    *(undefined1 *)(plVar9 + 5) = 1;
  }
  operator_delete(param_2);
  if (DAT_14032f210 != 0) {
    DAT_14032f210 = DAT_14032f210 + -1;
  }
  *param_1 = plVar10;
  return param_1;
}



void FUN_140147dd0(void)

{
  char cVar1;
  longlong *plVar2;
  longlong *plVar3;
  
  cVar1 = *(char *)((longlong)*(longlong **)(DAT_14032f208 + 8) + 0x29);
  plVar3 = *(longlong **)(DAT_14032f208 + 8);
  while (cVar1 == '\0') {
    FUN_140147e50(&DAT_14032f200,plVar3[2]);
    plVar2 = (longlong *)*plVar3;
    operator_delete(plVar3);
    plVar3 = plVar2;
    cVar1 = *(char *)((longlong)plVar2 + 0x29);
  }
  *(longlong *)(DAT_14032f208 + 8) = DAT_14032f208;
  *(longlong *)DAT_14032f208 = DAT_14032f208;
  *(longlong *)(DAT_14032f208 + 0x10) = DAT_14032f208;
  DAT_14032f210 = 0;
  return;
}



void FUN_140147e50(undefined8 param_1,longlong *param_2)

{
  char cVar1;
  longlong *plVar2;
  
  cVar1 = *(char *)((longlong)param_2 + 0x29);
  while (cVar1 == '\0') {
    FUN_140147e50(param_1,param_2[2]);
    plVar2 = (longlong *)*param_2;
    operator_delete(param_2);
    param_2 = plVar2;
    cVar1 = *(char *)((longlong)plVar2 + 0x29);
  }
  return;
}



void FUN_140147eb0(longlong param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  
  plVar1 = *(longlong **)(param_1 + 0x10);
  *(longlong *)(param_1 + 0x10) = *plVar1;
  if (*(char *)(*plVar1 + 0x29) == '\0') {
    *(longlong *)(*plVar1 + 8) = param_1;
  }
  plVar1[1] = *(longlong *)(param_1 + 8);
  if (param_1 == *(longlong *)(DAT_14032f208 + 8)) {
    *(longlong **)(DAT_14032f208 + 8) = plVar1;
    *plVar1 = param_1;
    *(longlong **)(param_1 + 8) = plVar1;
    return;
  }
  plVar2 = *(longlong **)(param_1 + 8);
  if (param_1 == *plVar2) {
    *plVar2 = (longlong)plVar1;
    *plVar1 = param_1;
    *(longlong **)(param_1 + 8) = plVar1;
    return;
  }
  plVar2[2] = (longlong)plVar1;
  *plVar1 = param_1;
  *(longlong **)(param_1 + 8) = plVar1;
  return;
}



void FUN_140147f10(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *param_1;
  *param_1 = *(longlong *)(lVar1 + 0x10);
  if (*(char *)(*(longlong *)(lVar1 + 0x10) + 0x29) == '\0') {
    *(longlong **)(*(longlong *)(lVar1 + 0x10) + 8) = param_1;
  }
  *(longlong *)(lVar1 + 8) = param_1[1];
  if (param_1 == *(longlong **)(DAT_14032f208 + 8)) {
    *(longlong *)(DAT_14032f208 + 8) = lVar1;
    *(longlong **)(lVar1 + 0x10) = param_1;
    param_1[1] = lVar1;
    return;
  }
  plVar2 = (longlong *)param_1[1];
  if (param_1 == (longlong *)plVar2[2]) {
    plVar2[2] = lVar1;
    *(longlong **)(lVar1 + 0x10) = param_1;
    param_1[1] = lVar1;
    return;
  }
  *plVar2 = lVar1;
  *(longlong **)(lVar1 + 0x10) = param_1;
  param_1[1] = lVar1;
  return;
}



undefined2 * FUN_140147f70(longlong param_1,longlong param_2,undefined2 *param_3)

{
  for (; param_1 != param_2; param_1 = param_1 + 0x28) {
    if (param_3 != (undefined2 *)0x0) {
      *(undefined8 *)(param_3 + 0xc) = 7;
      *(undefined8 *)(param_3 + 8) = 0;
      *param_3 = 0;
      FUN_140142a80(param_3,param_1);
    }
    param_3 = param_3 + 0x14;
  }
  return param_3;
}



undefined8 * FUN_140147ff0(undefined8 *param_1,uint param_2)

{
  char cVar1;
  
  *param_1 = MagiFileStream::vftable;
  cVar1 = FUN_140148100();
  if (cVar1 != '\0') {
    fclose((FILE *)param_1[3]);
    param_1[3] = 0;
  }
  *param_1 = MagiStream::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140148060(undefined8 *param_1)

{
  char cVar1;
  
  *param_1 = MagiFileStream::vftable;
  cVar1 = FUN_140148100();
  if (cVar1 != '\0') {
    fclose((FILE *)param_1[3]);
    param_1[3] = 0;
  }
  *param_1 = MagiStream::vftable;
  return;
}



void FUN_1401480b0(longlong param_1,void *param_2,size_t param_3)

{
                    // WARNING: Could not recover jumptable at 0x0001401480c6. Too many branches
                    // WARNING: Treating indirect jump as call
  fread(param_2,param_3,1,*(FILE **)(param_1 + 0x18));
  return;
}



void FUN_1401480d0(longlong param_1,undefined8 param_2,undefined8 param_3)

{
                    // WARNING: Could not recover jumptable at 0x0001401480e6. Too many branches
                    // WARNING: Treating indirect jump as call
  fwrite(param_2,param_3,1,*(undefined8 *)(param_1 + 0x18));
  return;
}



void FUN_1401480f0(longlong param_1,longlong param_2,int param_3)

{
                    // WARNING: Could not recover jumptable at 0x0001401480f4. Too many branches
                    // WARNING: Treating indirect jump as call
  _fseeki64(*(FILE **)(param_1 + 0x18),param_2,param_3);
  return;
}



bool FUN_140148100(longlong param_1)

{
  return *(longlong *)(param_1 + 0x18) != 0;
}



void FUN_140148110(longlong param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140148114. Too many branches
                    // WARNING: Treating indirect jump as call
  _ftelli64(*(FILE **)(param_1 + 0x18));
  return;
}



bool FUN_140148120(longlong param_1)

{
  int iVar1;
  
  iVar1 = feof(*(FILE **)(param_1 + 0x18));
  return iVar1 != 0;
}



undefined8 FUN_140148140(longlong param_1)

{
  longlong lVar1;
  
  if (*(longlong *)(param_1 + 8) == 0) {
    _fseeki64(*(FILE **)(param_1 + 0x18),0,2);
    lVar1 = _ftelli64(*(FILE **)(param_1 + 0x18));
    *(longlong *)(param_1 + 8) = lVar1;
    _fseeki64(*(FILE **)(param_1 + 0x18),0,0);
    return *(undefined8 *)(param_1 + 8);
  }
  return *(undefined8 *)(param_1 + 8);
}



void FUN_1401481a0(undefined8 *param_1)

{
  *param_1 = MagiStream::vftable;
  return;
}



undefined8 * FUN_1401481b0(undefined8 *param_1,byte param_2)

{
  *param_1 = MagiStream::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401481e0(wchar_t *param_1,wchar_t *param_2,longlong param_3)

{
  undefined8 uVar1;
  undefined1 auStack_2e8 [32];
  undefined2 *local_2c8;
  longlong local_2c0;
  uint local_2b8;
  uint local_2b0;
  uint local_2a8;
  _SYSTEMTIME local_298;
  undefined2 local_288;
  undefined8 local_286;
  undefined8 local_27e;
  undefined8 local_276;
  undefined8 local_26e;
  undefined8 local_266;
  undefined8 local_25e;
  undefined8 local_256;
  undefined4 local_24e;
  undefined2 local_24a;
  undefined2 local_248;
  undefined1 local_246 [526];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_2e8;
  if (((param_1 == (wchar_t *)0x0) || (param_3 == 0)) || (param_2 == (wchar_t *)0x0)) {
    uVar1 = 0;
  }
  else {
    local_248 = 0;
    memset(local_246,0,0x206);
    GetLocalTime(&local_298);
    local_2b8 = (uint)local_298.wHour;
    local_2c0._0_4_ = (uint)local_298.wDay;
    local_2c8 = (undefined2 *)CONCAT44(local_2c8._4_4_,(uint)local_298.wMonth);
    FUN_1401474d0(&local_248,0x104,L"%04d-%02d-%02d_%02d.log",local_298.wYear);
    local_2c8 = &local_248;
    _snwprintf_s(param_2,0x104,0x104,L"%s");
    local_288 = 0;
    local_286 = 0;
    local_27e = 0;
    local_276 = 0;
    local_26e = 0;
    local_266 = 0;
    local_25e = 0;
    local_256 = 0;
    local_24e = 0;
    local_24a = 0;
    local_2a8 = (uint)local_298.wSecond;
    local_2b0 = (uint)local_298.wMinute;
    local_2b8 = (uint)local_298.wHour;
    local_2c0 = CONCAT44(local_2c0._4_4_,(uint)local_298.wDay);
    local_2c8 = (undefined2 *)CONCAT44(local_2c8._4_4_,(uint)local_298.wMonth);
    FUN_1401474a0(&local_288,0x20,L"%04d-%02d-%02d %02d:%02d:%02d",local_298.wYear);
    local_2c8 = &local_288;
    local_2c0 = param_3;
    _snwprintf_s(param_1,0x100,0x100,L"[%s] %s\n");
    uVar1 = 1;
  }
  return uVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140148380(char *param_1,char *param_2,longlong param_3)

{
  undefined8 uVar1;
  undefined1 auStack_1b8 [32];
  undefined1 *local_198;
  longlong local_190;
  uint local_188;
  uint local_180;
  uint local_178;
  _SYSTEMTIME local_168;
  undefined1 local_158;
  undefined8 local_157;
  undefined8 local_14f;
  undefined8 local_147;
  undefined4 local_13f;
  undefined2 local_13b;
  undefined1 local_139;
  undefined1 local_138;
  undefined1 local_137 [271];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_1b8;
  if (((param_1 == (char *)0x0) || (param_3 == 0)) || (param_2 == (char *)0x0)) {
    uVar1 = 0;
  }
  else {
    local_138 = 0;
    memset(local_137,0,0x103);
    GetLocalTime(&local_168);
    local_188 = (uint)local_168.wHour;
    local_190._0_4_ = (uint)local_168.wDay;
    local_198 = (undefined1 *)CONCAT44(local_198._4_4_,(uint)local_168.wMonth);
    FUN_14009e980(&local_138,0x104,"%04d-%02d-%02d_%02d.log",local_168.wYear);
    local_198 = &local_138;
    _snprintf_s(param_2,0x104,0x104,"%s");
    local_158 = 0;
    local_157 = 0;
    local_14f = 0;
    local_147 = 0;
    local_13f = 0;
    local_13b = 0;
    local_139 = 0;
    local_178 = (uint)local_168.wSecond;
    local_180 = (uint)local_168.wMinute;
    local_188 = (uint)local_168.wHour;
    local_190 = CONCAT44(local_190._4_4_,(uint)local_168.wDay);
    local_198 = (undefined1 *)CONCAT44(local_198._4_4_,(uint)local_168.wMonth);
    FUN_140148e10(&local_158,0x20,"%04d-%02d-%02d %02d:%02d:%02d",local_168.wYear);
    local_198 = &local_158;
    local_190 = param_3;
    _snprintf_s(param_1,0x100,0x100,"[%s] %s\n");
    uVar1 = 1;
  }
  return uVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140148500(wchar_t *param_1,wchar_t *param_2,longlong param_3,int param_4)

{
  undefined8 uVar1;
  undefined1 auStack_2e8 [32];
  undefined2 *local_2c8;
  longlong local_2c0;
  uint local_2b8;
  uint local_2b0;
  uint local_2a8;
  _SYSTEMTIME local_298;
  undefined2 local_288;
  undefined8 local_286;
  undefined8 local_27e;
  undefined8 local_276;
  undefined8 local_26e;
  undefined8 local_266;
  undefined8 local_25e;
  undefined8 local_256;
  undefined4 local_24e;
  undefined2 local_24a;
  undefined2 local_248;
  undefined1 local_246 [526];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_2e8;
  if (((param_1 == (wchar_t *)0x0) || (param_3 == 0)) || (param_2 == (wchar_t *)0x0)) {
    uVar1 = 0;
  }
  else {
    local_248 = 0;
    memset(local_246,0,0x206);
    GetLocalTime(&local_298);
    local_2b8 = (uint)local_298.wHour;
    local_2c0._0_4_ = (uint)local_298.wDay;
    local_2c8 = (undefined2 *)CONCAT44(local_2c8._4_4_,(uint)local_298.wMonth);
    FUN_1401474d0(&local_248,0x104,L"%04d-%02d-%02d_%02d.log",local_298.wYear);
    local_2c8 = &local_248;
    _snwprintf_s(param_2,0x104,0x104,L"%s");
    if (param_4 == 1) {
      local_286 = 0;
      local_27e = 0;
      local_276 = 0;
      local_26e = 0;
      local_266 = 0;
      local_25e = 0;
      local_256 = 0;
      local_24e = 0;
      local_24a = 0;
      local_288 = 0;
      local_2a8 = (uint)local_298.wSecond;
      local_2b0 = (uint)local_298.wMinute;
      local_2b8 = (uint)local_298.wHour;
      local_2c0 = CONCAT44(local_2c0._4_4_,(uint)local_298.wDay);
      local_2c8 = (undefined2 *)CONCAT44(local_2c8._4_4_,(uint)local_298.wMonth);
      FUN_1401474a0(&local_288,0x20,L"%04d-%02d-%02d %02d:%02d:%02d",local_298.wYear);
      local_2c8 = &local_288;
      local_2c0 = param_3;
      _snwprintf_s(param_1,0x100,0x100,L"[%s] %s\n");
    }
    else {
      local_2c8 = (undefined2 *)param_3;
      _snwprintf_s(param_1,0x100,0x100,L"%s\n");
    }
    uVar1 = 1;
  }
  return uVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x000140148750)

undefined8 FUN_1401486d0(longlong param_1,longlong param_2)

{
  errno_t eVar1;
  undefined1 auStack_268 [32];
  longlong local_248;
  FILE *local_238 [2];
  wchar_t local_228;
  undefined1 local_226 [526];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_268;
  if ((param_1 != 0) && (param_2 != 0)) {
    local_228 = L'\0';
    memset(local_226,0,0x206);
    local_248 = param_1;
    FUN_1401474d0(&local_228,0x104,L"%s_%s");
    local_238[0] = (FILE *)0x0;
    eVar1 = _wfopen_s(local_238,&local_228,L"a");
    if ((eVar1 == 0) && (local_238[0] != (FILE *)0x0)) {
      fwprintf(local_238[0],L"%s");
      fflush(local_238[0]);
      fclose(local_238[0]);
      return 1;
    }
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x000140148866)

undefined8 FUN_1401487f0(longlong param_1,longlong param_2)

{
  errno_t eVar1;
  undefined1 auStack_168 [32];
  longlong local_148;
  FILE *local_138 [2];
  char local_128;
  undefined1 local_127 [271];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_168;
  if ((param_1 != 0) && (param_2 != 0)) {
    local_128 = '\0';
    memset(local_127,0,0x103);
    local_148 = param_1;
    FUN_14009e980(&local_128,0x104,"%s_%s");
    local_138[0] = (FILE *)0x0;
    eVar1 = fopen_s(local_138,&local_128,"a");
    if ((eVar1 == 0) && (local_138[0] != (FILE *)0x0)) {
      fprintf(local_138[0],"%s");
      fflush(local_138[0]);
      fclose(local_138[0]);
      return 1;
    }
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

bool FUN_140148900(wchar_t *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined1 auStack_648 [32];
  WCHAR local_628;
  undefined1 local_626 [510];
  wchar_t local_428;
  undefined1 local_426 [510];
  undefined2 local_228;
  undefined1 local_226 [526];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_648;
  local_res10 = param_2;
  local_res18 = param_3;
  local_res20 = param_4;
  EnterCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
  local_428 = L'\0';
  memset(local_426,0,0x1fe);
  vswprintf_s(&local_428,0x100,param_1,(va_list)&local_res10);
  local_228 = 0;
  memset(local_226,0,0x206);
  local_628 = L'\0';
  memset(local_626,0,0x1fe);
  iVar1 = FUN_1401481e0(&local_628,&local_228,&local_428);
  if (iVar1 != 0) {
    FUN_1401486d0(&local_228,&local_628);
    OutputDebugStringW(&local_628);
    wprintf(L"%s");
    LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
  }
  else {
    LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
  }
  return iVar1 != 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140148a40(char *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined1 auStack_348 [32];
  CHAR local_328;
  undefined1 local_327 [255];
  char local_228;
  undefined1 local_227 [255];
  undefined1 local_128;
  undefined1 local_127 [271];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_348;
  local_res10 = param_2;
  local_res18 = param_3;
  local_res20 = param_4;
  EnterCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
  local_228 = '\0';
  memset(local_227,0,0xff);
  vsprintf_s(&local_228,0x100,param_1,(va_list)&local_res10);
  local_128 = 0;
  memset(local_127,0,0x103);
  local_328 = '\0';
  memset(local_327,0,0xff);
  iVar1 = FUN_140148380(&local_328,&local_128,&local_228);
  if (iVar1 == 0) {
    LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
    return 0;
  }
  FUN_1401487f0(&local_128,&local_328);
  OutputDebugStringA(&local_328);
  printf("%s");
  LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

bool FUN_140148b90(wchar_t *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined1 auStack_648 [32];
  WCHAR local_628;
  undefined1 local_626 [510];
  wchar_t local_428;
  undefined1 local_426 [510];
  undefined2 local_228;
  undefined1 local_226 [526];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_648;
  local_res10 = param_2;
  local_res18 = param_3;
  local_res20 = param_4;
  EnterCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
  local_428 = L'\0';
  memset(local_426,0,0x1fe);
  vswprintf_s(&local_428,0x100,param_1,(va_list)&local_res10);
  local_228 = 0;
  memset(local_226,0,0x206);
  local_628 = L'\0';
  memset(local_626,0,0x1fe);
  iVar1 = FUN_140148500(&local_628,&local_228,&local_428,1);
  if (iVar1 != 0) {
    FUN_1401486d0(&local_228,&local_628);
    OutputDebugStringW(&local_628);
    wprintf(L"%s");
    LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
  }
  else {
    LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
  }
  return iVar1 != 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

bool FUN_140148cd0(wchar_t *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined1 auStack_648 [32];
  WCHAR local_628;
  undefined1 local_626 [510];
  wchar_t local_428;
  undefined1 local_426 [510];
  undefined2 local_228;
  undefined1 local_226 [526];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_648;
  local_res10 = param_2;
  local_res18 = param_3;
  local_res20 = param_4;
  EnterCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
  local_428 = L'\0';
  memset(local_426,0,0x1fe);
  vswprintf_s(&local_428,0x100,param_1,(va_list)&local_res10);
  local_228 = 0;
  memset(local_226,0,0x206);
  local_628 = L'\0';
  memset(local_626,0,0x1fe);
  iVar1 = FUN_140148500(&local_628,&local_228,&local_428,0);
  if (iVar1 != 0) {
    FUN_1401486d0(&local_228,&local_628);
    OutputDebugStringW(&local_628);
    wprintf(L"%s");
    LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
  }
  else {
    LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
  }
  return iVar1 != 0;
}



void FUN_140148e10(char *param_1,size_t param_2,char *param_3,undefined8 param_4)

{
  undefined8 local_res20;
  
  local_res20 = param_4;
  _vsnprintf_s(param_1,0x20,param_2,param_3,(va_list)&local_res20);
  return;
}



undefined8 * FUN_140148e40(undefined8 *param_1)

{
  *param_1 = 0;
  return param_1;
}



void FUN_140148e50(undefined8 *param_1)

{
  ReleaseMutex((HANDLE)*param_1);
                    // WARNING: Could not recover jumptable at 0x000140148e6a. Too many branches
                    // WARNING: Treating indirect jump as call
  CloseHandle((HANDLE)*param_1);
  return;
}



undefined4 FUN_140148e80(undefined8 *param_1)

{
  DWORD DVar1;
  HANDLE pvVar2;
  wchar_t *_Format;
  
  pvVar2 = CreateMutexW((LPSECURITY_ATTRIBUTES)0x0,1,L"Global\\RustyHearts_DBC_LOG");
  *param_1 = pvVar2;
  DVar1 = GetLastError();
  if (DVar1 == 5) {
    _Format = L"ERROR_ACCESS_DENIED!!! %s \n";
  }
  else {
    if (DVar1 != 0xb7) {
      return 1;
    }
    _Format = L"ERROR_ALREADY_EXISTS!!! %s \n";
  }
  wprintf(_Format);
  Sleep(3000);
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140148ef0(void)

{
  DWORD DVar1;
  HMODULE hModule;
  FARPROC pFVar2;
  wchar_t *pwVar3;
  wchar_t *pwVar4;
  HANDLE hObject;
  HANDLE pvVar5;
  INT_PTR IVar6;
  undefined2 *puVar7;
  undefined1 auStackY_938 [32];
  _SYSTEMTIME local_8d0;
  undefined2 local_8c0;
  undefined6 uStack_8be;
  undefined8 local_8b0;
  ulonglong local_8a8;
  undefined2 local_898;
  undefined6 uStack_896;
  undefined8 local_888;
  ulonglong local_880;
  wchar_t local_868 [5];
  undefined1 local_85e [502];
  WCHAR local_668;
  undefined1 local_666 [526];
  wchar_t local_458;
  undefined1 local_456 [526];
  WCHAR local_248;
  undefined1 local_246 [526];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_938;
  hModule = LoadLibraryW(L"DBGHELP.DLL");
  if (hModule != (HMODULE)0x0) {
    pFVar2 = GetProcAddress(hModule,"MiniDumpWriteDump");
    if (pFVar2 != (FARPROC)0x0) {
      local_880 = 7;
      local_888 = 0;
      local_898 = 0;
      FUN_140056dd0(&local_898,L"Dump",4);
      local_8a8 = 7;
      local_8b0 = 0;
      local_8c0 = 0;
      FUN_140056dd0(&local_8c0,L"None",4);
      local_458 = L'\0';
      memset(local_456,0,0x206);
      local_248 = L'\0';
      memset(local_246,0,0x206);
      GetLocalTime(&local_8d0);
      puVar7 = &local_898;
      if (7 < local_880) {
        puVar7 = (undefined2 *)CONCAT62(uStack_896,local_898);
      }
      FUN_1401474d0(&local_458,0x104,L"%s_%d-%d-%d",puVar7);
      _wmkdir(&local_458);
      local_668 = L'\0';
      memset(local_666,0,0x206);
      builtin_wcsncpy(local_868,L"null",5);
      memset(local_85e,0,0x1f6);
      DVar1 = GetModuleFileNameW((HMODULE)0x0,&local_668,0x104);
      if (0 < (int)DVar1) {
        memset(local_868,0,0x200);
        pwVar3 = wcsrchr(&local_668,L'\\');
        pwVar4 = wcsrchr(&local_668,L'.');
        wcsncat_s(local_868,0x100,pwVar3 + 1,(longlong)pwVar4 + (-2 - (longlong)pwVar3) >> 1);
      }
      FUN_1401474d0(&local_248,0x104,L"%s\\%s_%d-%d-%d %d_%d_%d.dmp");
      hObject = CreateFileW(&local_248,0x40000000,2,(LPSECURITY_ATTRIBUTES)0x0,2,0x80,(HANDLE)0x0);
      DVar1 = GetCurrentProcessId();
      pvVar5 = GetCurrentProcess();
      IVar6 = (*pFVar2)(pvVar5,(ulonglong)DVar1,hObject,2);
      if ((int)IVar6 != 0) {
        CloseHandle(hObject);
        FreeLibrary(hModule);
        if (7 < local_8a8) {
          operator_delete((void *)CONCAT62(uStack_8be,local_8c0));
        }
        local_8a8 = 7;
        local_8b0 = 0;
        local_8c0 = 0;
        if (7 < local_880) {
          operator_delete((void *)CONCAT62(uStack_896,local_898));
        }
        return 1;
      }
      if (7 < local_8a8) {
        operator_delete((void *)CONCAT62(uStack_8be,local_8c0));
      }
      local_8a8 = 7;
      local_8b0 = 0;
      local_8c0 = 0;
      if (7 < local_880) {
        operator_delete((void *)CONCAT62(uStack_896,local_898));
      }
    }
    FreeLibrary(hModule);
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140149280(void)

{
  DWORD DVar1;
  HMODULE hModule;
  FARPROC pFVar2;
  wchar_t *pwVar3;
  wchar_t *pwVar4;
  HANDLE hObject;
  HANDLE pvVar5;
  INT_PTR IVar6;
  undefined2 *puVar7;
  undefined1 auStackY_938 [32];
  _SYSTEMTIME local_8c0;
  undefined2 local_8b0;
  undefined6 uStack_8ae;
  undefined8 local_8a0;
  ulonglong local_898;
  undefined2 local_888;
  undefined6 uStack_886;
  undefined8 local_878;
  ulonglong local_870;
  wchar_t local_858 [5];
  undefined1 local_84e [502];
  WCHAR local_658;
  undefined1 local_656 [526];
  wchar_t local_448;
  undefined1 local_446 [526];
  WCHAR local_238;
  undefined1 local_236 [526];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStackY_938;
  GetCurrentThreadId();
  hModule = LoadLibraryW(L"DBGHELP.DLL");
  if (hModule != (HMODULE)0x0) {
    pFVar2 = GetProcAddress(hModule,"MiniDumpWriteDump");
    if (pFVar2 != (FARPROC)0x0) {
      local_870 = 7;
      local_878 = 0;
      local_888 = 0;
      FUN_140056dd0(&local_888,L"Dump",4);
      local_898 = 7;
      local_8a0 = 0;
      local_8b0 = 0;
      FUN_140056dd0(&local_8b0,L"None",4);
      local_448 = L'\0';
      memset(local_446,0,0x206);
      local_238 = L'\0';
      memset(local_236,0,0x206);
      GetLocalTime(&local_8c0);
      puVar7 = &local_888;
      if (7 < local_870) {
        puVar7 = (undefined2 *)CONCAT62(uStack_886,local_888);
      }
      FUN_1401474d0(&local_448,0x104,L"%s_%d-%d-%d",puVar7);
      _wmkdir(&local_448);
      local_658 = L'\0';
      memset(local_656,0,0x206);
      builtin_wcsncpy(local_858,L"null",5);
      memset(local_84e,0,0x1f6);
      DVar1 = GetModuleFileNameW((HMODULE)0x0,&local_658,0x104);
      if (0 < (int)DVar1) {
        memset(local_858,0,0x200);
        pwVar3 = wcsrchr(&local_658,L'\\');
        pwVar4 = wcsrchr(&local_658,L'.');
        wcsncat_s(local_858,0x100,pwVar3 + 1,(longlong)pwVar4 + (-2 - (longlong)pwVar3) >> 1);
      }
      FUN_1401474d0(&local_238,0x104,L"%s\\%s_%d-%d-%d %d_%d_%d.dmp");
      hObject = CreateFileW(&local_238,0x40000000,2,(LPSECURITY_ATTRIBUTES)0x0,2,0x80,(HANDLE)0x0);
      DVar1 = GetCurrentProcessId();
      pvVar5 = GetCurrentProcess();
      IVar6 = (*pFVar2)(pvVar5,(ulonglong)DVar1,hObject,2);
      if ((int)IVar6 != 0) {
        CloseHandle(hObject);
        FreeLibrary(hModule);
        if (7 < local_898) {
          operator_delete((void *)CONCAT62(uStack_8ae,local_8b0));
        }
        local_898 = 7;
        local_8a0 = 0;
        local_8b0 = 0;
        if (7 < local_870) {
          operator_delete((void *)CONCAT62(uStack_886,local_888));
        }
        return 1;
      }
      if (7 < local_898) {
        operator_delete((void *)CONCAT62(uStack_8ae,local_8b0));
      }
      local_898 = 7;
      local_8a0 = 0;
      local_8b0 = 0;
      if (7 < local_870) {
        operator_delete((void *)CONCAT62(uStack_886,local_888));
      }
    }
    FreeLibrary(hModule);
  }
  return 0;
}



undefined8 FUN_140149620(undefined8 *param_1)

{
  HANDLE hHandle;
  DWORD local_18;
  undefined8 *local_14;
  undefined4 local_c;
  
  if (*(int *)*param_1 == -0x3fffff03) {
    hHandle = CreateThread((LPSECURITY_ATTRIBUTES)0x0,0,FUN_140149280,param_1,0,(LPDWORD)0x0);
    if (hHandle != (HANDLE)0x0) {
      WaitForSingleObject(hHandle,0xffffffff);
      CloseHandle(hHandle);
      return 1;
    }
  }
  else {
    local_18 = GetCurrentThreadId();
    local_c = 0;
    local_14 = param_1;
    FUN_140148ef0(&local_18);
  }
  return 1;
}



undefined8 FUN_1401496b0(void)

{
  SetErrorMode(7);
  DAT_14032f040 = SetUnhandledExceptionFilter(FUN_140149620);
  return 1;
}



undefined8 FUN_1401496e0(void)

{
  SetUnhandledExceptionFilter(DAT_14032f040);
  return 1;
}



longlong * FUN_140149700(longlong *param_1,undefined1 param_2)

{
  longlong *plVar1;
  ulonglong uVar2;
  undefined1 local_res10 [24];
  
  plVar1 = (longlong *)*param_1;
  uVar2 = *plVar1 + 1;
  local_res10[0] = param_2;
  if (((ulonglong)plVar1[1] < uVar2) && ((ulonglong)plVar1[1] < plVar1[1] + uVar2)) {
    FUN_14014c320();
  }
  memmove((void *)(*(longlong *)*param_1 + 0x10 + *param_1),local_res10,1);
  *(ulonglong *)*param_1 = uVar2;
  *(undefined1 *)(*param_1 + 0x10 + uVar2) = 0;
  return param_1;
}



void FUN_140149770(undefined8 *param_1)

{
  *param_1 = TiXmlBase::vftable;
  return;
}



undefined8 * FUN_140149780(undefined8 *param_1,byte param_2)

{
  *param_1 = TiXmlBase::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 FUN_1401497b0(longlong *param_1)

{
  longlong lVar1;
  undefined8 uVar2;
  
  while( true ) {
    if (param_1 == (longlong *)0x0) {
      return 0;
    }
    lVar1 = (**(code **)(*param_1 + 0x20))(param_1);
    if (lVar1 != 0) break;
    param_1 = (longlong *)param_1[3];
  }
                    // WARNING: Could not recover jumptable at 0x0001401497ea. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar2 = (**(code **)(*param_1 + 0x20))(param_1);
  return uVar2;
}



undefined8 * FUN_1401497f0(undefined8 *param_1,char *param_2,char *param_3,undefined8 param_4)

{
  char cVar1;
  ulonglong uVar2;
  char *pcVar3;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  param_1[1] = 0xffffffffffffffff;
  param_1[2] = 0;
  *param_1 = TiXmlAttribute::vftable;
  param_1[4] = &DAT_14032f048;
  param_1[6] = &DAT_14032f048;
  uVar2 = 0xffffffffffffffff;
  pcVar3 = param_2;
  do {
    if (uVar2 == 0) break;
    uVar2 = uVar2 - 1;
    cVar1 = *pcVar3;
    pcVar3 = pcVar3 + 1;
  } while (cVar1 != '\0');
  FUN_14014c3f0(param_1 + 4,param_2,~uVar2 - 1,param_4,0xfffffffffffffffe);
  uVar2 = 0xffffffffffffffff;
  pcVar3 = param_3;
  do {
    if (uVar2 == 0) break;
    uVar2 = uVar2 - 1;
    cVar1 = *pcVar3;
    pcVar3 = pcVar3 + 1;
  } while (cVar1 != '\0');
  FUN_14014c3f0(param_1 + 6,param_3,~uVar2 - 1,param_4,uVar4);
  param_1[3] = 0;
  param_1[9] = 0;
  param_1[8] = 0;
  return param_1;
}



void FUN_1401498a0(undefined8 param_1,undefined8 param_2)

{
  FUN_14014b7d0(param_1,param_2,0);
  return;
}



undefined8 * FUN_1401498b0(undefined8 *param_1,uint param_2)

{
  if ((undefined8 *)param_1[6] != &DAT_14032f048) {
    operator_delete__((void *)param_1[7]);
  }
  if ((undefined8 *)param_1[4] != &DAT_14032f048) {
    operator_delete__((void *)param_1[5]);
  }
  *param_1 = TiXmlBase::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140149920(undefined8 *param_1)

{
  if ((undefined8 *)param_1[6] != &DAT_14032f048) {
    operator_delete__((void *)param_1[7]);
  }
  if ((undefined8 *)param_1[4] != &DAT_14032f048) {
    operator_delete__((void *)param_1[5]);
  }
  *param_1 = TiXmlBase::vftable;
  return;
}



undefined8 FUN_140149970(undefined8 param_1)

{
  return param_1;
}



// Library Function - Single Match
//  public: virtual void * __ptr64 __cdecl std::bad_alloc::`scalar deleting destructor'(unsigned
// int) __ptr64
// 
// Libraries: Visual Studio 2012 Release, Visual Studio 2015 Release

void * __thiscall std::bad_alloc::_scalar_deleting_destructor_(bad_alloc *this,uint param_1)

{
  *(undefined ***)this = TiXmlComment::vftable;
  FUN_140149e40();
  if ((param_1 & 1) != 0) {
    operator_delete(this);
  }
  return this;
}



undefined8 *
FUN_1401499c0(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  param_1[1] = 0xffffffffffffffff;
  param_1[2] = 0;
  param_1[7] = &DAT_14032f048;
  param_1[3] = 0;
  *(undefined4 *)(param_1 + 4) = 4;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[9] = 0;
  param_1[10] = 0;
  *param_1 = TiXmlText::vftable;
  FUN_14014c3f0(param_1 + 7,&DAT_140281f00,0,param_4,0xfffffffffffffffe);
  *(undefined1 *)(param_1 + 0xb) = 0;
  return param_1;
}



// Library Function - Single Match
//  public: virtual void * __ptr64 __cdecl std::bad_alloc::`scalar deleting destructor'(unsigned
// int) __ptr64
// 
// Libraries: Visual Studio 2012 Release, Visual Studio 2015 Release

void * __thiscall std::bad_alloc::_scalar_deleting_destructor_(bad_alloc *this,uint param_1)

{
  *(undefined ***)this = TiXmlText::vftable;
  FUN_140149e40();
  if ((param_1 & 1) != 0) {
    operator_delete(this);
  }
  return this;
}



void FUN_140149a80(undefined8 *param_1)

{
  *param_1 = TiXmlDeclaration::vftable;
  if ((undefined8 *)param_1[0xf] != &DAT_14032f048) {
    operator_delete__((void *)param_1[0x10]);
  }
  if ((undefined8 *)param_1[0xd] != &DAT_14032f048) {
    operator_delete__((void *)param_1[0xe]);
  }
  if ((undefined8 *)param_1[0xb] != &DAT_14032f048) {
    operator_delete__((void *)param_1[0xc]);
  }
  FUN_140149e40(param_1);
  return;
}



void FUN_140149af0(longlong *param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140149af6. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x88))();
  return;
}



void * FUN_140149b00(void *param_1,uint param_2)

{
  FUN_140149a80();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



// Library Function - Single Match
//  public: virtual void * __ptr64 __cdecl std::bad_alloc::`scalar deleting destructor'(unsigned
// int) __ptr64
// 
// Libraries: Visual Studio 2012 Release, Visual Studio 2015 Release

void * __thiscall std::bad_alloc::_scalar_deleting_destructor_(bad_alloc *this,uint param_1)

{
  *(undefined ***)this = TiXmlUnknown::vftable;
  FUN_140149e40();
  if ((param_1 & 1) != 0) {
    operator_delete(this);
  }
  return this;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140149b70(undefined8 *param_1,longlong *param_2)

{
  char cVar1;
  byte bVar2;
  longlong *plVar3;
  undefined *_Src;
  int *piVar4;
  int iVar5;
  longlong lVar6;
  size_t _Size;
  undefined8 uVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  char *pcVar10;
  undefined1 auStack_78 [32];
  char local_58 [32];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  piVar4 = (int *)*param_1;
  iVar5 = 0;
  uVar7 = *(undefined8 *)piVar4;
  if (0 < (int)uVar7) {
    do {
      _Src = PTR_s__amp__140325b50;
      lVar6 = (longlong)iVar5;
      bVar2 = *(byte *)((longlong)piVar4 + lVar6 + 0x10);
      if (bVar2 == 0x26) {
        if ((((int)uVar7 + -2 <= iVar5) ||
            (*(char *)((longlong)(iVar5 + 1) + 0x10 + (longlong)piVar4) != '#')) ||
           (*(char *)((longlong)(iVar5 + 2) + 0x10 + (longlong)piVar4) != 'x')) {
          plVar3 = (longlong *)*param_2;
          uVar8 = (ulonglong)DAT_140325b58;
          uVar9 = *plVar3 + uVar8;
          if (((ulonglong)plVar3[1] < uVar9) && ((ulonglong)plVar3[1] < plVar3[1] + uVar9)) {
            FUN_14014c320(param_2);
          }
          memmove((void *)(*(longlong *)*param_2 + 0x10 + *param_2),_Src,uVar8);
          *(ulonglong *)*param_2 = uVar9;
          *(undefined1 *)(*param_2 + 0x10 + uVar9) = 0;
          goto LAB_140149dd8;
        }
        if (iVar5 < (int)uVar7 + -1) {
          do {
            plVar3 = (longlong *)*param_2;
            uVar8 = *plVar3 + 1;
            if (((ulonglong)plVar3[1] < uVar8) && ((ulonglong)plVar3[1] < plVar3[1] + uVar8)) {
              FUN_14014c320(param_2);
            }
            memmove((void *)(*(longlong *)*param_2 + 0x10 + *param_2),
                    (void *)((longlong)iVar5 + 0x10 + (longlong)piVar4),1);
            *(ulonglong *)*param_2 = uVar8;
            iVar5 = iVar5 + 1;
            *(undefined1 *)(*param_2 + 0x10 + uVar8) = 0;
            piVar4 = (int *)*param_1;
          } while ((*(char *)((longlong)piVar4 + lVar6 + 0x11) != ';') &&
                  (lVar6 = lVar6 + 1, iVar5 < *piVar4 + -1));
        }
      }
      else {
        if (bVar2 == 0x3c) {
          FUN_14014c4f0(param_2,PTR_DAT_140325b60,DAT_140325b68);
        }
        else if (bVar2 == 0x3e) {
          FUN_14014c4f0(param_2,PTR_DAT_140325b70,DAT_140325b78);
        }
        else if (bVar2 == 0x22) {
          FUN_14014c4f0(param_2,PTR_s__quot__140325b80,DAT_140325b88);
        }
        else if (bVar2 == 0x27) {
          FUN_14014c4f0(param_2,PTR_s__apos__140325b90,DAT_140325b98);
        }
        else if (bVar2 < 0x20) {
          FUN_140148e10(local_58,0x20,"&#x%02X;",bVar2);
          lVar6 = -1;
          pcVar10 = local_58;
          do {
            if (lVar6 == 0) break;
            lVar6 = lVar6 + -1;
            cVar1 = *pcVar10;
            pcVar10 = pcVar10 + 1;
          } while (cVar1 != '\0');
          _Size = (size_t)(int)(~(uint)lVar6 - 1);
          plVar3 = (longlong *)*param_2;
          uVar8 = *plVar3 + _Size;
          if (((ulonglong)plVar3[1] < uVar8) && ((ulonglong)plVar3[1] < plVar3[1] + uVar8)) {
            FUN_14014c320(param_2);
          }
          memmove((void *)(*(longlong *)*param_2 + 0x10 + *param_2),local_58,_Size);
          *(ulonglong *)*param_2 = uVar8;
          *(undefined1 *)(*param_2 + 0x10 + uVar8) = 0;
        }
        else {
          FUN_140149700(param_2,bVar2);
        }
LAB_140149dd8:
        iVar5 = iVar5 + 1;
      }
      piVar4 = (int *)*param_1;
      uVar7 = *(undefined8 *)piVar4;
    } while (iVar5 < (int)uVar7);
  }
  return;
}



void * FUN_140149e10(void *param_1,uint param_2)

{
  FUN_140149e40();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140149e40(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  *param_1 = TiXmlNode::vftable;
  puVar2 = (undefined8 *)param_1[5];
  while (puVar2 != (undefined8 *)0x0) {
    puVar1 = (undefined8 *)puVar2[10];
    (**(code **)*puVar2)(puVar2,1,param_3,param_4,uVar3);
    puVar2 = puVar1;
  }
  if ((undefined8 *)param_1[7] != &DAT_14032f048) {
    operator_delete__((void *)param_1[8]);
  }
  *param_1 = TiXmlBase::vftable;
  return;
}



void FUN_140149ec0(longlong param_1)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  puVar2 = *(undefined8 **)(param_1 + 0x28);
  if (puVar2 == (undefined8 *)0x0) {
    *(undefined8 *)(param_1 + 0x28) = 0;
    *(undefined8 *)(param_1 + 0x30) = 0;
    return;
  }
  do {
    puVar1 = (undefined8 *)puVar2[10];
    (**(code **)*puVar2)(puVar2,1);
    puVar2 = puVar1;
  } while (puVar1 != (undefined8 *)0x0);
  *(undefined8 *)(param_1 + 0x28) = 0;
  *(undefined8 *)(param_1 + 0x30) = 0;
  return;
}



undefined8 * FUN_140149f20(longlong *param_1,undefined8 *param_2)

{
  char cVar1;
  longlong lVar2;
  ulonglong uVar3;
  longlong *plVar4;
  char *pcVar5;
  
  if (*(int *)(param_2 + 4) != 0) {
    param_2[3] = param_1;
    param_2[9] = param_1[6];
    param_2[10] = 0;
    if (param_1[6] != 0) {
      *(undefined8 **)(param_1[6] + 0x50) = param_2;
      param_1[6] = (longlong)param_2;
      return param_2;
    }
    param_1[5] = (longlong)param_2;
    param_1[6] = (longlong)param_2;
    return param_2;
  }
  (**(code **)*param_2)(param_2,1);
  plVar4 = param_1;
  if (param_1 != (longlong *)0x0) {
    while( true ) {
      lVar2 = (**(code **)(*plVar4 + 0x20))(plVar4);
      if (lVar2 != 0) break;
      plVar4 = (longlong *)plVar4[3];
      if (plVar4 == (longlong *)0x0) {
        return (undefined8 *)0x0;
      }
    }
    lVar2 = (**(code **)(*plVar4 + 0x20))(plVar4);
    if (lVar2 != 0) {
      do {
        lVar2 = (**(code **)(*param_1 + 0x20))();
        if (lVar2 != 0) {
          lVar2 = (**(code **)(*param_1 + 0x20))();
          goto LAB_140149faa;
        }
        param_1 = (longlong *)param_1[3];
      } while (param_1 != (longlong *)0x0);
      lVar2 = 0;
LAB_140149faa:
      if (*(char *)(lVar2 + 0x58) == '\0') {
        uVar3 = 0xffffffffffffffff;
        *(undefined1 *)(lVar2 + 0x58) = 1;
        *(undefined4 *)(lVar2 + 0x5c) = 0x10;
        pcVar5 = PTR_s_Error_when_TiXmlDocument_added_t_140325b40;
        do {
          if (uVar3 == 0) break;
          uVar3 = uVar3 - 1;
          cVar1 = *pcVar5;
          pcVar5 = pcVar5 + 1;
        } while (cVar1 != '\0');
        FUN_14014c3f0(lVar2 + 0x60,PTR_s_Error_when_TiXmlDocument_added_t_140325b40,~uVar3 - 1);
        *(undefined8 *)(lVar2 + 0x74) = 0xffffffffffffffff;
      }
    }
  }
  return (undefined8 *)0x0;
}



undefined8 FUN_14014a040(longlong param_1,longlong param_2)

{
  char cVar1;
  char cVar2;
  char *pcVar3;
  undefined8 uVar4;
  longlong *plVar5;
  longlong lVar6;
  
  plVar5 = *(longlong **)(param_1 + 0x28);
  do {
    if (plVar5 == (longlong *)0x0) {
      return 0;
    }
    pcVar3 = (char *)(plVar5[7] + 0x10);
    lVar6 = param_2 - (longlong)pcVar3;
    do {
      cVar1 = *pcVar3;
      cVar2 = pcVar3[lVar6];
      if (cVar1 != cVar2) break;
      pcVar3 = pcVar3 + 1;
    } while (cVar2 != '\0');
    if (cVar1 == cVar2) {
LAB_14014a0a0:
      lVar6 = (**(code **)(*plVar5 + 0x30))(plVar5);
      if (lVar6 != 0) {
                    // WARNING: Could not recover jumptable at 0x00014014a10d. Too many branches
                    // WARNING: Treating indirect jump as call
        uVar4 = (**(code **)(*plVar5 + 0x30))(plVar5);
        return uVar4;
      }
      plVar5 = (longlong *)plVar5[10];
      if (plVar5 == (longlong *)0x0) {
        return 0;
      }
      do {
        pcVar3 = (char *)(plVar5[7] + 0x10);
        lVar6 = param_2 - (longlong)pcVar3;
        do {
          cVar1 = *pcVar3;
          cVar2 = pcVar3[lVar6];
          if (cVar1 != cVar2) break;
          pcVar3 = pcVar3 + 1;
        } while (cVar2 != '\0');
        if (cVar1 == cVar2) goto LAB_14014a0a0;
        plVar5 = (longlong *)plVar5[10];
        if (plVar5 == (longlong *)0x0) {
          return 0;
        }
      } while( true );
    }
    plVar5 = (longlong *)plVar5[10];
  } while( true );
}



undefined8 * FUN_14014a120(undefined8 *param_1,char *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  char cVar2;
  ulonglong uVar3;
  char *pcVar4;
  
  param_1[1] = 0xffffffffffffffff;
  param_1[2] = 0;
  param_1[7] = &DAT_14032f048;
  param_1[3] = 0;
  *(undefined4 *)(param_1 + 4) = 1;
  param_1[9] = 0;
  param_1[10] = 0;
  *param_1 = TiXmlElement::vftable;
  puVar1 = param_1 + 0xb;
  param_1[0xc] = 0xffffffffffffffff;
  param_1[0xd] = 0;
  *puVar1 = TiXmlAttribute::vftable;
  param_1[0xf] = &DAT_14032f048;
  param_1[0x11] = &DAT_14032f048;
  param_1[0xe] = 0;
  param_1[0x14] = puVar1;
  param_1[0x13] = puVar1;
  param_1[6] = 0;
  param_1[5] = 0;
  uVar3 = 0xffffffffffffffff;
  pcVar4 = param_2;
  do {
    if (uVar3 == 0) break;
    uVar3 = uVar3 - 1;
    cVar2 = *pcVar4;
    pcVar4 = pcVar4 + 1;
  } while (cVar2 != '\0');
  FUN_14014c3f0(param_1 + 7,param_2,~uVar3 - 1,param_4,0xfffffffffffffffe);
  return param_1;
}



void * FUN_14014a1e0(void *param_1,uint param_2)

{
  FUN_14014a210();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14014a210(undefined8 *param_1)

{
  *param_1 = TiXmlElement::vftable;
  FUN_14014a290();
  if ((undefined8 *)param_1[0x11] != &DAT_14032f048) {
    operator_delete__((void *)param_1[0x12]);
  }
  if ((undefined8 *)param_1[0xf] != &DAT_14032f048) {
    operator_delete__((void *)param_1[0x10]);
  }
  param_1[0xb] = TiXmlBase::vftable;
  FUN_140149e40(param_1);
  return;
}



void FUN_14014a290(longlong param_1)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  FUN_140149ec0();
  do {
    puVar1 = *(undefined8 **)(param_1 + 0xa0);
    if ((puVar1 == (undefined8 *)(param_1 + 0x58)) || (puVar2 = puVar1, puVar1 == (undefined8 *)0x0)
       ) {
      return;
    }
    for (; puVar2 != (undefined8 *)(param_1 + 0x58); puVar2 = (undefined8 *)puVar2[9]) {
      if (puVar2 == puVar1) {
        *(undefined8 *)(puVar2[8] + 0x48) = puVar2[9];
        *(undefined8 *)(puVar2[9] + 0x40) = puVar2[8];
        puVar2[9] = 0;
        puVar2[8] = 0;
        break;
      }
    }
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
  } while( true );
}



longlong FUN_14014a320(longlong param_1,longlong param_2)

{
  char cVar1;
  char cVar2;
  longlong lVar3;
  char *pcVar4;
  longlong lVar5;
  
  lVar3 = *(longlong *)(param_1 + 0xa0);
  do {
    if (lVar3 == param_1 + 0x58) {
      return 0;
    }
    pcVar4 = (char *)(*(longlong *)(lVar3 + 0x20) + 0x10);
    lVar5 = param_2 - (longlong)pcVar4;
    do {
      cVar1 = *pcVar4;
      cVar2 = pcVar4[lVar5];
      if (cVar1 != cVar2) break;
      pcVar4 = pcVar4 + 1;
    } while (cVar2 != '\0');
    if (cVar1 == cVar2) {
      return *(longlong *)(lVar3 + 0x30) + 0x10;
    }
    lVar3 = *(longlong *)(lVar3 + 0x48);
  } while( true );
}



void FUN_14014a370(longlong *param_1,longlong param_2,char *param_3)

{
  char cVar1;
  char cVar2;
  longlong *plVar3;
  char *pcVar4;
  void *pvVar5;
  ulonglong uVar6;
  longlong lVar7;
  
  for (plVar3 = (longlong *)param_1[0x14]; plVar3 != param_1 + 0xb; plVar3 = (longlong *)plVar3[9])
  {
    pcVar4 = (char *)(plVar3[4] + 0x10);
    lVar7 = param_2 - (longlong)pcVar4;
    do {
      cVar1 = *pcVar4;
      cVar2 = pcVar4[lVar7];
      if (cVar1 != cVar2) break;
      pcVar4 = pcVar4 + 1;
    } while (cVar2 != '\0');
    if (cVar1 == cVar2) {
      if (plVar3 != (longlong *)0x0) {
        uVar6 = 0xffffffffffffffff;
        pcVar4 = param_3;
        goto code_r0x00014014a3f0;
      }
      break;
    }
  }
  pvVar5 = operator_new(0x50);
  if (pvVar5 == (void *)0x0) {
    lVar7 = 0;
  }
  else {
    lVar7 = FUN_1401497f0(pvVar5,param_2,param_3);
  }
  if (lVar7 != 0) {
    *(longlong **)(lVar7 + 0x48) = param_1 + 0xb;
    *(longlong *)(lVar7 + 0x40) = param_1[0x13];
    *(longlong *)(param_1[0x13] + 0x48) = lVar7;
    param_1[0x13] = lVar7;
    return;
  }
  while( true ) {
    if (param_1 == (longlong *)0x0) {
      return;
    }
    lVar7 = (**(code **)(*param_1 + 0x20))(param_1);
    if (lVar7 != 0) break;
    param_1 = (longlong *)param_1[3];
  }
  lVar7 = (**(code **)(*param_1 + 0x20))();
  if (lVar7 == 0) {
    return;
  }
  if (*(char *)(lVar7 + 0x58) != '\0') {
    return;
  }
  *(undefined1 *)(lVar7 + 0x58) = 1;
  *(undefined4 *)(lVar7 + 0x5c) = 3;
  uVar6 = 0xffffffffffffffff;
  pcVar4 = PTR_s_Memory_allocation_failed__140325ad8;
  do {
    if (uVar6 == 0) break;
    uVar6 = uVar6 - 1;
    cVar1 = *pcVar4;
    pcVar4 = pcVar4 + 1;
  } while (cVar1 != '\0');
  FUN_14014c3f0(lVar7 + 0x60,PTR_s_Memory_allocation_failed__140325ad8,~uVar6 - 1);
  *(undefined8 *)(lVar7 + 0x74) = 0xffffffffffffffff;
  return;
  while( true ) {
    uVar6 = uVar6 - 1;
    cVar1 = *pcVar4;
    pcVar4 = pcVar4 + 1;
    if (cVar1 == '\0') break;
code_r0x00014014a3f0:
    if (uVar6 == 0) break;
  }
  FUN_14014c3f0(plVar3 + 6,param_3,~uVar6 - 1,plVar3,0xfffffffffffffffe);
  return;
}



void FUN_14014a4e0(longlong param_1,FILE *param_2,uint param_3)

{
  longlong *plVar1;
  longlong lVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  uVar4 = (ulonglong)param_3;
  uVar3 = uVar4;
  if (0 < (int)param_3) {
    do {
      fprintf(param_2,"    ");
      uVar3 = uVar3 - 1;
    } while (uVar3 != 0);
  }
  fprintf(param_2,"<%s");
  plVar1 = *(longlong **)(param_1 + 0xa0);
  if (plVar1 != (longlong *)(param_1 + 0x58)) {
    do {
      if (plVar1 == (longlong *)0x0) break;
      fprintf(param_2," ");
      (**(code **)(*plVar1 + 8))(plVar1,param_2,uVar4);
      plVar1 = (longlong *)plVar1[9];
    } while ((*(longlong *)plVar1[6] != 0) || (*(longlong *)plVar1[4] != 0));
  }
  plVar1 = *(longlong **)(param_1 + 0x28);
  if (plVar1 == (longlong *)0x0) {
    fprintf(param_2," />");
  }
  else {
    if ((plVar1 == *(longlong **)(param_1 + 0x30)) &&
       (lVar2 = (**(code **)(*plVar1 + 0x58))(plVar1), lVar2 != 0)) {
      fprintf(param_2,">");
      (**(code **)(**(longlong **)(param_1 + 0x28) + 8))
                (*(longlong **)(param_1 + 0x28),param_2,param_3 + 1);
    }
    else {
      fprintf(param_2,">");
      for (plVar1 = *(longlong **)(param_1 + 0x28); plVar1 != (longlong *)0x0;
          plVar1 = (longlong *)plVar1[10]) {
        lVar2 = (**(code **)(*plVar1 + 0x58))(plVar1);
        if (lVar2 == 0) {
          fprintf(param_2,"\n");
        }
        (**(code **)(*plVar1 + 8))(plVar1,param_2,param_3 + 1);
      }
      fprintf(param_2,"\n");
      if (0 < (int)param_3) {
        do {
          fprintf(param_2,"    ");
          uVar4 = uVar4 - 1;
        } while (uVar4 != 0);
      }
    }
    fprintf(param_2,"</%s>");
  }
  return;
}



void FUN_14014a6b0(longlong param_1,longlong param_2)

{
  char cVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined8 uVar4;
  ulonglong uVar5;
  char *pcVar6;
  char *pcVar7;
  
  uVar5 = 0xffffffffffffffff;
  pcVar6 = (char *)(*(longlong *)(param_1 + 0x38) + 0x10);
  pcVar7 = pcVar6;
  do {
    if (uVar5 == 0) break;
    uVar5 = uVar5 - 1;
    cVar1 = *pcVar7;
    pcVar7 = pcVar7 + 1;
  } while (cVar1 != '\0');
  FUN_14014c3f0(param_2 + 0x38,pcVar6,~uVar5 - 1);
  *(undefined8 *)(param_2 + 0x10) = *(undefined8 *)(param_1 + 0x10);
  lVar2 = *(longlong *)(param_1 + 0xa0);
  if (lVar2 != param_1 + 0x58) {
    do {
      if (lVar2 == 0) break;
      FUN_14014a370(param_2,*(longlong *)(lVar2 + 0x20) + 0x10,*(longlong *)(lVar2 + 0x30) + 0x10);
      lVar2 = *(longlong *)(lVar2 + 0x48);
    } while ((**(longlong **)(lVar2 + 0x30) != 0) || (**(longlong **)(lVar2 + 0x20) != 0));
  }
  for (plVar3 = *(longlong **)(param_1 + 0x28); plVar3 != (longlong *)0x0;
      plVar3 = (longlong *)plVar3[10]) {
    uVar4 = (**(code **)(*plVar3 + 0x78))(plVar3);
    FUN_140149f20(param_2,uVar4);
  }
  return;
}



void FUN_14014a780(longlong param_1,longlong *param_2)

{
  longlong *plVar1;
  char cVar2;
  longlong lVar3;
  
  lVar3 = *(longlong *)(param_1 + 0xa0);
  if (*(longlong *)(param_1 + 0xa0) == param_1 + 0x58) {
    lVar3 = 0;
  }
  cVar2 = (**(code **)(*param_2 + 8))(param_2,param_1,lVar3);
  if (cVar2 != '\0') {
    plVar1 = *(longlong **)(param_1 + 0x28);
    while ((plVar1 != (longlong *)0x0 &&
           (cVar2 = (**(code **)(*plVar1 + 0x80))(plVar1,param_2), cVar2 != '\0'))) {
      plVar1 = (longlong *)plVar1[10];
    }
  }
                    // WARNING: Could not recover jumptable at 0x00014014a7f4. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x18))(param_2,param_1);
  return;
}



longlong FUN_14014a800(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  pvVar1 = operator_new(0xa8);
  if (pvVar1 == (void *)0x0) {
    lVar2 = 0;
  }
  else {
    lVar2 = FUN_14014a120(pvVar1,*(longlong *)(param_1 + 0x38) + 0x10,param_3,param_4,uVar3);
  }
  if (lVar2 == 0) {
    lVar2 = 0;
  }
  else {
    FUN_14014a6b0(param_1,lVar2);
  }
  return lVar2;
}



undefined8 *
FUN_14014a870(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  param_1[1] = 0xffffffffffffffff;
  param_1[2] = 0;
  param_1[7] = &DAT_14032f048;
  param_1[3] = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[9] = 0;
  param_1[10] = 0;
  *param_1 = TiXmlDocument::vftable;
  param_1[0xc] = &DAT_14032f048;
  *(undefined8 *)((longlong)param_1 + 0x74) = 0xffffffffffffffff;
  *(undefined4 *)(param_1 + 0xe) = 4;
  *(undefined1 *)((longlong)param_1 + 0x7c) = 0;
  *(undefined1 *)(param_1 + 0xb) = 0;
  *(undefined4 *)((longlong)param_1 + 0x5c) = 0;
  FUN_14014c3f0(param_1 + 0xc,&DAT_140281f00,0,param_4,0xfffffffffffffffe);
  *(undefined8 *)((longlong)param_1 + 0x74) = 0;
  return param_1;
}



undefined8 * FUN_14014a910(undefined8 *param_1,char *param_2,undefined8 param_3,undefined8 param_4)

{
  char cVar1;
  ulonglong uVar2;
  char *pcVar3;
  
  param_1[1] = 0xffffffffffffffff;
  param_1[2] = 0;
  param_1[7] = &DAT_14032f048;
  param_1[3] = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[9] = 0;
  param_1[10] = 0;
  *param_1 = TiXmlDocument::vftable;
  param_1[0xc] = &DAT_14032f048;
  *(undefined8 *)((longlong)param_1 + 0x74) = 0xffffffffffffffff;
  *(undefined4 *)(param_1 + 0xe) = 4;
  *(undefined1 *)((longlong)param_1 + 0x7c) = 0;
  uVar2 = 0xffffffffffffffff;
  pcVar3 = param_2;
  do {
    if (uVar2 == 0) break;
    uVar2 = uVar2 - 1;
    cVar1 = *pcVar3;
    pcVar3 = pcVar3 + 1;
  } while (cVar1 != '\0');
  FUN_14014c3f0(param_1 + 7,param_2,~uVar2 - 1,param_4,0xfffffffffffffffe);
  *(undefined1 *)(param_1 + 0xb) = 0;
  *(undefined4 *)((longlong)param_1 + 0x5c) = 0;
  FUN_14014c3f0(param_1 + 0xc,&DAT_140281f00,0);
  *(undefined8 *)((longlong)param_1 + 0x74) = 0;
  return param_1;
}



ulonglong FUN_14014a9e0(longlong param_1,char *param_2,undefined8 param_3,undefined8 param_4)

{
  char cVar1;
  undefined1 auVar2 [16];
  FILE *_File;
  byte bVar3;
  errno_t eVar4;
  __uint64 _Var5;
  undefined4 extraout_var;
  ulonglong extraout_RAX;
  ulonglong uVar6;
  size_t sVar7;
  char *pcVar8;
  FILE *local_res8;
  undefined8 uVar9;
  size_t *psVar10;
  size_t *psVar11;
  size_t *local_38;
  
  uVar9 = 0xfffffffffffffffe;
  uVar6 = 0xffffffffffffffff;
  pcVar8 = param_2;
  do {
    if (uVar6 == 0) break;
    uVar6 = uVar6 - 1;
    cVar1 = *pcVar8;
    pcVar8 = pcVar8 + 1;
  } while (cVar1 != '\0');
  uVar6 = ~uVar6;
  sVar7 = uVar6 - 1;
  if (sVar7 == 0) {
    psVar10 = &DAT_14032f048;
  }
  else {
    auVar2._8_8_ = 0;
    auVar2._0_8_ = uVar6 + 0x1a >> 2;
    _Var5 = SUB168(ZEXT816(4) * auVar2,0);
    if (SUB168(ZEXT816(4) * auVar2,8) != 0) {
      _Var5 = 0xffffffffffffffff;
    }
    local_38 = operator_new(_Var5);
    *local_38 = sVar7;
    *(undefined1 *)((longlong)local_38 + uVar6 + 0xf) = 0;
    local_38[1] = sVar7;
    psVar10 = local_38;
  }
  psVar11 = psVar10;
  memcpy(psVar10 + 2,param_2,*psVar10);
  FUN_14014c3f0(param_1 + 0x38,psVar10 + 2,*psVar10,param_4,uVar9,psVar11);
  local_res8 = (FILE *)0x0;
  eVar4 = fopen_s(&local_res8,(char *)(*(longlong *)(param_1 + 0x38) + 0x10),"rb");
  _File = local_res8;
  uVar6 = CONCAT44(extraout_var,eVar4);
  if ((eVar4 == 0) && (local_res8 != (FILE *)0x0)) {
    bVar3 = FUN_14014ab60(param_1,local_res8);
    fclose(_File);
    if (psVar10 != &DAT_14032f048) {
      operator_delete__(local_38);
    }
    uVar6 = (ulonglong)bVar3;
  }
  else {
    if (*(char *)(param_1 + 0x58) == '\0') {
      *(undefined1 *)(param_1 + 0x58) = 1;
      *(undefined4 *)(param_1 + 0x5c) = 2;
      uVar6 = 0xffffffffffffffff;
      pcVar8 = PTR_s_Failed_to_open_file_140325ad0;
      do {
        if (uVar6 == 0) break;
        uVar6 = uVar6 - 1;
        cVar1 = *pcVar8;
        pcVar8 = pcVar8 + 1;
      } while (cVar1 != '\0');
      uVar6 = FUN_14014c3f0(param_1 + 0x60,PTR_s_Failed_to_open_file_140325ad0,~uVar6 - 1,param_4,
                            uVar9,psVar11);
      *(undefined4 *)(param_1 + 0x78) = 0xffffffff;
      *(undefined4 *)(param_1 + 0x74) = 0xffffffff;
    }
    if (psVar10 != &DAT_14032f048) {
      operator_delete__(local_38);
      uVar6 = extraout_RAX;
    }
    uVar6 = uVar6 & 0xffffffffffffff00;
  }
  return uVar6;
}



// WARNING: Type propagation algorithm not settling

undefined8 FUN_14014ab60(longlong *param_1,FILE *param_2)

{
  char cVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  undefined1 auVar4 [16];
  undefined1 auVar5 [16];
  undefined1 auVar6 [16];
  ulonglong *puVar7;
  long lVar8;
  char *pcVar9;
  size_t sVar10;
  __uint64 _Var11;
  ulonglong *puVar12;
  ulonglong *puVar13;
  ulonglong uVar14;
  ulonglong uVar15;
  char *pcVar16;
  char *_Src;
  char *pcVar17;
  ulonglong *local_res10;
  ulonglong *local_res18;
  ulonglong *local_res20;
  ulonglong *local_a8;
  ulonglong *local_88;
  ulonglong *local_80;
  ulonglong *local_78;
  ulonglong *local_70;
  ulonglong *local_68;
  ulonglong *local_60;
  ulonglong *local_58;
  ulonglong *local_50;
  
  if (param_2 == (FILE *)0x0) {
    if ((char)param_1[0xb] != '\0') {
      return 0;
    }
    *(undefined1 *)(param_1 + 0xb) = 1;
    *(undefined4 *)((longlong)param_1 + 0x5c) = 2;
    pcVar9 = PTR_s_Failed_to_open_file_140325ad0;
  }
  else {
    FUN_140149ec0();
    param_1[1] = -1;
    fseek(param_2,0,2);
    lVar8 = ftell(param_2);
    uVar14 = (ulonglong)lVar8;
    fseek(param_2,0,0);
    if (0 < lVar8) {
      local_88 = &DAT_14032f048;
      if (DAT_14032f050 < uVar14) {
        FUN_14014c320(&local_88,uVar14);
      }
      puVar13 = local_88;
      pcVar9 = operator_new((longlong)(lVar8 + 1));
      *pcVar9 = '\0';
      sVar10 = fread(pcVar9,uVar14,1,param_2);
      if (sVar10 == 1) {
        pcVar9[uVar14] = '\0';
        pcVar17 = pcVar9;
        _Src = pcVar9;
        if (*pcVar9 != '\0') {
          local_res18 = local_70;
          local_res20 = local_60;
          local_a8 = local_50;
          pcVar16 = pcVar9;
          do {
            puVar12 = &DAT_14032f048;
            if (*pcVar16 == '\n') {
              pcVar17 = pcVar16 + (1 - (longlong)_Src) + *puVar13;
              puVar7 = puVar13;
              if (((char *)puVar13[1] < pcVar17) &&
                 (uVar14 = puVar13[1] + (longlong)pcVar17, puVar13[1] < uVar14)) {
                local_78 = &DAT_14032f048;
                local_res10 = (ulonglong *)*puVar13;
                if (uVar14 != 0) {
                  auVar4._8_8_ = 0;
                  auVar4._0_8_ = uVar14 + 0x1b >> 2;
                  _Var11 = SUB168(ZEXT816(4) * auVar4,0);
                  if (SUB168(ZEXT816(4) * auVar4,8) != 0) {
                    _Var11 = 0xffffffffffffffff;
                  }
                  puVar12 = operator_new(_Var11);
                  *puVar12 = (ulonglong)local_res10;
                  *(undefined1 *)((longlong)(puVar12 + 2) + (longlong)local_res10) = 0;
                  puVar12[1] = uVar14;
                  local_res18 = puVar12;
                }
                memcpy(puVar12 + 2,puVar13 + 2,*puVar13);
                local_70 = local_80;
                local_80 = local_res18;
                local_res18 = local_70;
                puVar7 = puVar12;
                local_88 = puVar12;
                local_78 = puVar13;
                if (puVar13 != &DAT_14032f048) {
                  operator_delete__(local_70);
                }
              }
              puVar13 = puVar7;
              memmove((void *)(*puVar13 + 0x10 + (longlong)puVar13),_Src,
                      (size_t)(pcVar16 + (1 - (longlong)_Src)));
              *puVar13 = (ulonglong)pcVar17;
              *(char *)((longlong)puVar13 + (longlong)(pcVar17 + 0x10)) = '\0';
              pcVar17 = pcVar16 + 1;
              _Src = pcVar17;
            }
            else if (*pcVar16 == '\r') {
              sVar10 = (longlong)pcVar16 - (longlong)_Src;
              puVar12 = puVar13;
              if (0 < (longlong)sVar10) {
                uVar14 = sVar10 + *puVar13;
                if ((puVar13[1] < uVar14) && (uVar15 = puVar13[1] + uVar14, puVar13[1] < uVar15)) {
                  local_68 = &DAT_14032f048;
                  uVar2 = *puVar13;
                  if (uVar15 == 0) {
                    local_res10 = &DAT_14032f048;
                  }
                  else {
                    auVar5._8_8_ = 0;
                    auVar5._0_8_ = uVar15 + 0x1b >> 2;
                    _Var11 = SUB168(ZEXT816(4) * auVar5,0);
                    if (SUB168(ZEXT816(4) * auVar5,8) != 0) {
                      _Var11 = 0xffffffffffffffff;
                    }
                    local_res10 = operator_new(_Var11);
                    *local_res10 = uVar2;
                    *(undefined1 *)((longlong)local_res10 + uVar2 + 0x10) = 0;
                    local_res10[1] = uVar15;
                    local_res20 = local_res10;
                  }
                  memcpy(local_res10 + 2,puVar13 + 2,*puVar13);
                  local_60 = local_80;
                  puVar12 = local_res10;
                  local_88 = local_res10;
                  local_80 = local_res20;
                  local_res20 = local_60;
                  local_68 = puVar13;
                  if (puVar13 != &DAT_14032f048) {
                    operator_delete__(local_60);
                  }
                }
                memmove((void *)(*puVar12 + 0x10 + (longlong)puVar12),_Src,sVar10);
                *puVar12 = uVar14;
                *(undefined1 *)(uVar14 + 0x10 + (longlong)puVar12) = 0;
              }
              local_res10 = (ulonglong *)CONCAT71(local_res10._1_7_,10);
              uVar14 = *puVar12;
              uVar15 = uVar14 + 1;
              puVar13 = puVar12;
              if ((puVar12[1] < uVar15) && (uVar2 = puVar12[1] + uVar15, puVar12[1] < uVar2)) {
                local_58 = &DAT_14032f048;
                uVar3 = *puVar12;
                if (uVar2 == 0) {
                  puVar13 = &DAT_14032f048;
                }
                else {
                  auVar6._8_8_ = 0;
                  auVar6._0_8_ = uVar2 + 0x1b >> 2;
                  _Var11 = SUB168(ZEXT816(4) * auVar6,0);
                  if (SUB168(ZEXT816(4) * auVar6,8) != 0) {
                    _Var11 = 0xffffffffffffffff;
                  }
                  puVar13 = operator_new(_Var11);
                  *puVar13 = uVar3;
                  *(undefined1 *)((longlong)puVar13 + uVar3 + 0x10) = 0;
                  puVar13[1] = uVar2;
                  local_a8 = puVar13;
                }
                memcpy(puVar13 + 2,puVar12 + 2,*puVar12);
                local_50 = local_80;
                local_80 = local_a8;
                local_a8 = local_50;
                local_88 = puVar13;
                local_58 = puVar12;
                if (puVar12 != &DAT_14032f048) {
                  operator_delete__(local_50);
                }
              }
              memmove((void *)(*puVar13 + 0x10 + (longlong)puVar13),&local_res10,1);
              *puVar13 = uVar15;
              *(undefined1 *)(uVar14 + 0x11 + (longlong)puVar13) = 0;
              pcVar17 = pcVar16 + 1;
              _Src = pcVar17;
              if (*pcVar17 == '\n') {
                pcVar17 = pcVar16 + 2;
                _Src = pcVar17;
              }
            }
            else {
              pcVar17 = pcVar16 + 1;
            }
            pcVar16 = pcVar17;
          } while (*pcVar17 != '\0');
        }
        if ((longlong)pcVar17 - (longlong)_Src != 0) {
          FUN_14014c4f0(&local_88,_Src,(longlong)pcVar17 - (longlong)_Src);
          puVar13 = local_88;
        }
        operator_delete(pcVar9);
        (**(code **)(*param_1 + 0x10))(param_1,puVar13 + 2,0,0);
        if ((char)param_1[0xb] == '\0') {
          if (puVar13 != &DAT_14032f048) {
            operator_delete__(local_80);
          }
          return 1;
        }
      }
      else {
        operator_delete(pcVar9);
        if ((char)param_1[0xb] == '\0') {
          *(undefined1 *)(param_1 + 0xb) = 1;
          *(undefined4 *)((longlong)param_1 + 0x5c) = 2;
          uVar14 = 0xffffffffffffffff;
          pcVar9 = PTR_s_Failed_to_open_file_140325ad0;
          do {
            if (uVar14 == 0) break;
            uVar14 = uVar14 - 1;
            cVar1 = *pcVar9;
            pcVar9 = pcVar9 + 1;
          } while (cVar1 != '\0');
          FUN_14014c3f0(param_1 + 0xc,PTR_s_Failed_to_open_file_140325ad0,~uVar14 - 1);
          *(undefined8 *)((longlong)param_1 + 0x74) = 0xffffffffffffffff;
        }
      }
      if (puVar13 == &DAT_14032f048) {
        return 0;
      }
      operator_delete__(local_80);
      return 0;
    }
    if ((char)param_1[0xb] != '\0') {
      return 0;
    }
    *(undefined1 *)(param_1 + 0xb) = 1;
    *(undefined4 *)((longlong)param_1 + 0x5c) = 0xd;
    pcVar9 = PTR_s_Error_document_empty__140325b28;
  }
  uVar14 = 0xffffffffffffffff;
  pcVar17 = pcVar9;
  do {
    if (uVar14 == 0) break;
    uVar14 = uVar14 - 1;
    cVar1 = *pcVar17;
    pcVar17 = pcVar17 + 1;
  } while (cVar1 != '\0');
  FUN_14014c3f0(param_1 + 0xc,pcVar9,~uVar14 - 1);
  *(undefined8 *)((longlong)param_1 + 0x74) = 0xffffffffffffffff;
  return 0;
}



// WARNING: Type propagation algorithm not settling

undefined8 FUN_14014b070(longlong *param_1,void *param_2,int param_3)

{
  ulonglong uVar1;
  char cVar2;
  ulonglong uVar3;
  undefined1 auVar4 [16];
  undefined1 auVar5 [16];
  undefined1 auVar6 [16];
  undefined1 auVar7 [16];
  undefined8 uVar8;
  char *_Dst;
  ulonglong *puVar9;
  __uint64 _Var10;
  ulonglong *puVar11;
  ulonglong uVar12;
  char *pcVar13;
  char *pcVar14;
  size_t sVar15;
  ulonglong uVar16;
  ulonglong *puVar17;
  char *_Src;
  undefined1 *puVar18;
  ulonglong *puVar19;
  ulonglong *local_res10;
  ulonglong *local_res20;
  ulonglong *local_98;
  ulonglong *local_80;
  ulonglong *local_78;
  ulonglong *local_70;
  ulonglong *local_68;
  ulonglong *local_60;
  ulonglong *local_58;
  ulonglong *local_50;
  ulonglong *local_48;
  
  uVar12 = (ulonglong)param_3;
  if (param_2 == (void *)0x0) {
    if ((char)param_1[0xb] == '\0') {
      *(undefined1 *)(param_1 + 0xb) = 1;
      *(undefined4 *)((longlong)param_1 + 0x5c) = 2;
      uVar12 = 0xffffffffffffffff;
      pcVar14 = PTR_s_Failed_to_open_file_140325ad0;
      do {
        if (uVar12 == 0) break;
        uVar12 = uVar12 - 1;
        cVar2 = *pcVar14;
        pcVar14 = pcVar14 + 1;
      } while (cVar2 != '\0');
      FUN_14014c3f0(param_1 + 0xc,PTR_s_Failed_to_open_file_140325ad0,~uVar12 - 1);
      *(undefined4 *)(param_1 + 0xf) = 0xffffffff;
      *(undefined4 *)((longlong)param_1 + 0x74) = 0xffffffff;
    }
    uVar8 = 0;
  }
  else {
    FUN_140149ec0();
    *(undefined4 *)((longlong)param_1 + 0xc) = 0xffffffff;
    *(undefined4 *)(param_1 + 1) = 0xffffffff;
    if (param_3 < 1) {
      if ((char)param_1[0xb] == '\0') {
        *(undefined1 *)(param_1 + 0xb) = 1;
        *(undefined4 *)((longlong)param_1 + 0x5c) = 0xd;
        uVar12 = 0xffffffffffffffff;
        pcVar14 = PTR_s_Error_document_empty__140325b28;
        do {
          if (uVar12 == 0) break;
          uVar12 = uVar12 - 1;
          cVar2 = *pcVar14;
          pcVar14 = pcVar14 + 1;
        } while (cVar2 != '\0');
        FUN_14014c3f0(param_1 + 0xc,PTR_s_Error_document_empty__140325b28,~uVar12 - 1);
        *(undefined4 *)(param_1 + 0xf) = 0xffffffff;
        *(undefined4 *)((longlong)param_1 + 0x74) = 0xffffffff;
      }
      uVar8 = 0;
    }
    else {
      local_80 = &DAT_14032f048;
      if (DAT_14032f050 < uVar12) {
        FUN_14014c320(&local_80,uVar12);
      }
      puVar11 = local_80;
      _Dst = operator_new((longlong)(param_3 + 1));
      *_Dst = '\0';
      memcpy(_Dst,param_2,uVar12);
      _Dst[uVar12] = '\0';
      pcVar14 = _Dst;
      _Src = _Dst;
      if (*_Dst != '\0') {
        local_res20 = local_58;
        local_98 = local_48;
        pcVar13 = _Dst;
        puVar17 = local_68;
        do {
          if (*pcVar13 == '\n') {
            local_res10 = (ulonglong *)(pcVar13 + (1 - (longlong)_Src));
            puVar18 = (undefined1 *)(*puVar11 + (longlong)local_res10);
            puVar9 = puVar11;
            if (((undefined1 *)puVar11[1] < puVar18) &&
               (uVar12 = puVar11[1] + (longlong)puVar18, puVar11[1] < uVar12)) {
              puVar9 = &DAT_14032f048;
              local_60 = &DAT_14032f048;
              uVar16 = *puVar11;
              if (uVar12 != 0) {
                auVar4._8_8_ = 0;
                auVar4._0_8_ = uVar12 + 0x1b >> 2;
                _Var10 = SUB168(ZEXT816(4) * auVar4,0);
                if (SUB168(ZEXT816(4) * auVar4,8) != 0) {
                  _Var10 = 0xffffffffffffffff;
                }
                puVar9 = operator_new(_Var10);
                *puVar9 = uVar16;
                *(undefined1 *)((longlong)puVar9 + uVar16 + 0x10) = 0;
                puVar9[1] = uVar12;
                local_res20 = puVar9;
              }
              memcpy(puVar9 + 2,puVar11 + 2,*puVar11);
              local_58 = local_78;
              local_78 = local_res20;
              local_res20 = local_58;
              puVar17 = local_68;
              local_80 = puVar9;
              local_60 = puVar11;
              if (puVar11 != &DAT_14032f048) {
                operator_delete__(local_58);
                puVar17 = local_68;
              }
            }
            puVar11 = puVar9;
            memmove((void *)(*puVar11 + 0x10 + (longlong)puVar11),_Src,(size_t)local_res10);
            *puVar11 = (ulonglong)puVar18;
            (puVar18 + 0x10)[(longlong)puVar11] = 0;
            pcVar14 = pcVar13 + 1;
            _Src = pcVar14;
          }
          else if (*pcVar13 == '\r') {
            sVar15 = (longlong)pcVar13 - (longlong)_Src;
            puVar9 = puVar11;
            if (0 < (longlong)sVar15) {
              uVar12 = sVar15 + *puVar11;
              if ((puVar11[1] < uVar12) && (uVar16 = puVar11[1] + uVar12, puVar11[1] < uVar16)) {
                local_50 = &DAT_14032f048;
                local_res10 = (ulonglong *)*puVar11;
                if (uVar16 == 0) {
                  puVar9 = &DAT_14032f048;
                }
                else {
                  auVar5._8_8_ = 0;
                  auVar5._0_8_ = uVar16 + 0x1b >> 2;
                  _Var10 = SUB168(ZEXT816(4) * auVar5,0);
                  if (SUB168(ZEXT816(4) * auVar5,8) != 0) {
                    _Var10 = 0xffffffffffffffff;
                  }
                  puVar9 = operator_new(_Var10);
                  *puVar9 = (ulonglong)local_res10;
                  *(undefined1 *)((longlong)(puVar9 + 2) + (longlong)local_res10) = 0;
                  puVar9[1] = uVar16;
                  local_98 = puVar9;
                }
                memcpy(puVar9 + 2,puVar11 + 2,*puVar11);
                local_48 = local_78;
                local_78 = local_98;
                local_98 = local_48;
                puVar17 = local_68;
                local_80 = puVar9;
                local_50 = puVar11;
                if (puVar11 != &DAT_14032f048) {
                  operator_delete__(local_48);
                  puVar17 = local_68;
                }
              }
              memmove((void *)(*puVar9 + 0x10 + (longlong)puVar9),_Src,sVar15);
              *puVar9 = uVar12;
              *(undefined1 *)(uVar12 + 0x10 + (longlong)puVar9) = 0;
            }
            local_res10 = (ulonglong *)CONCAT71(local_res10._1_7_,10);
            uVar12 = *puVar9;
            uVar16 = uVar12 + 1;
            puVar11 = puVar9;
            if ((puVar9[1] < uVar16) && (uVar1 = puVar9[1] + uVar16, puVar9[1] < uVar1)) {
              puVar11 = &DAT_14032f048;
              local_70 = &DAT_14032f048;
              uVar3 = *puVar9;
              puVar19 = puVar17;
              if (uVar1 != 0) {
                auVar6._8_8_ = 0;
                auVar6._0_8_ = uVar1 + 0x1b >> 2;
                _Var10 = SUB168(ZEXT816(4) * auVar6,0);
                if (SUB168(ZEXT816(4) * auVar6,8) != 0) {
                  _Var10 = 0xffffffffffffffff;
                }
                puVar11 = operator_new(_Var10);
                *puVar11 = uVar3;
                *(undefined1 *)((longlong)puVar11 + uVar3 + 0x10) = 0;
                puVar11[1] = uVar1;
                puVar19 = puVar11;
              }
              memcpy(puVar11 + 2,puVar9 + 2,*puVar9);
              puVar17 = local_78;
              local_68 = local_78;
              local_80 = puVar11;
              local_78 = puVar19;
              local_70 = puVar9;
              if (puVar9 != &DAT_14032f048) {
                operator_delete__(puVar17);
              }
            }
            memmove((void *)(*puVar11 + 0x10 + (longlong)puVar11),&local_res10,1);
            *puVar11 = uVar16;
            *(undefined1 *)(uVar12 + 0x11 + (longlong)puVar11) = 0;
            pcVar14 = pcVar13 + 1;
            _Src = pcVar14;
            if (*pcVar14 == '\n') {
              pcVar14 = pcVar13 + 2;
              _Src = pcVar14;
            }
          }
          else {
            pcVar14 = pcVar13 + 1;
          }
          pcVar13 = pcVar14;
        } while (*pcVar14 != '\0');
      }
      sVar15 = (longlong)pcVar14 - (longlong)_Src;
      puVar17 = puVar11;
      if (sVar15 != 0) {
        uVar16 = *puVar11;
        uVar12 = sVar15 + uVar16;
        if ((puVar11[1] < uVar12) && (uVar1 = puVar11[1] + uVar12, puVar11[1] < uVar1)) {
          local_50 = &DAT_14032f048;
          if (uVar1 == 0) {
            local_res10 = &DAT_14032f048;
            puVar9 = local_48;
          }
          else {
            auVar7._8_8_ = 0;
            auVar7._0_8_ = uVar1 + 0x1b >> 2;
            _Var10 = SUB168(ZEXT816(4) * auVar7,0);
            if (SUB168(ZEXT816(4) * auVar7,8) != 0) {
              _Var10 = 0xffffffffffffffff;
            }
            local_res10 = operator_new(_Var10);
            *local_res10 = uVar16;
            *(undefined1 *)((longlong)local_res10 + uVar16 + 0x10) = 0;
            local_res10[1] = uVar1;
            puVar9 = local_res10;
          }
          memcpy(local_res10 + 2,puVar11 + 2,*puVar11);
          puVar19 = local_78;
          puVar17 = local_res10;
          local_80 = local_res10;
          local_78 = puVar9;
          if (puVar11 != &DAT_14032f048) {
            operator_delete__(puVar19);
          }
        }
        memmove((void *)(*puVar17 + 0x10 + (longlong)puVar17),_Src,sVar15);
        *puVar17 = uVar12;
        *(undefined1 *)(uVar12 + 0x10 + (longlong)puVar17) = 0;
      }
      operator_delete(_Dst);
      (**(code **)(*param_1 + 0x10))(param_1,puVar17 + 2,0,0);
      if ((char)param_1[0xb] == '\0') {
        if (puVar17 != &DAT_14032f048) {
          operator_delete__(local_78);
        }
        uVar8 = 1;
      }
      else {
        if (puVar17 != &DAT_14032f048) {
          operator_delete__(local_78);
        }
        uVar8 = 0;
      }
    }
  }
  return uVar8;
}



void FUN_14014b5f0(longlong param_1,longlong param_2)

{
  char cVar1;
  longlong *plVar2;
  undefined8 uVar3;
  ulonglong uVar4;
  char *pcVar5;
  char *pcVar6;
  
  uVar4 = 0xffffffffffffffff;
  pcVar5 = (char *)(*(longlong *)(param_1 + 0x38) + 0x10);
  pcVar6 = pcVar5;
  do {
    if (uVar4 == 0) break;
    uVar4 = uVar4 - 1;
    cVar1 = *pcVar6;
    pcVar6 = pcVar6 + 1;
  } while (cVar1 != '\0');
  FUN_14014c3f0(param_2 + 0x38,pcVar5,~uVar4 - 1);
  *(undefined8 *)(param_2 + 0x10) = *(undefined8 *)(param_1 + 0x10);
  *(undefined1 *)(param_2 + 0x58) = *(undefined1 *)(param_1 + 0x58);
  *(undefined4 *)(param_2 + 0x5c) = *(undefined4 *)(param_1 + 0x5c);
  FUN_14014c3f0(param_2 + 0x60,*(undefined8 **)(param_1 + 0x60) + 2,
                **(undefined8 **)(param_1 + 0x60));
  *(undefined4 *)(param_2 + 0x70) = *(undefined4 *)(param_1 + 0x70);
  *(undefined8 *)(param_2 + 0x74) = *(undefined8 *)(param_1 + 0x74);
  *(undefined1 *)(param_2 + 0x7c) = *(undefined1 *)(param_1 + 0x7c);
  for (plVar2 = *(longlong **)(param_1 + 0x28); plVar2 != (longlong *)0x0;
      plVar2 = (longlong *)plVar2[10]) {
    uVar3 = (**(code **)(*plVar2 + 0x78))(plVar2);
    FUN_140149f20(param_2,uVar3);
  }
  return;
}



longlong FUN_14014b6a0(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong lVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  pvVar1 = operator_new(0x80);
  if (pvVar1 == (void *)0x0) {
    lVar2 = 0;
  }
  else {
    lVar2 = FUN_14014a870(pvVar1);
  }
  if (lVar2 == 0) {
    lVar2 = 0;
  }
  else {
    FUN_14014b5f0(param_1,lVar2,param_3,param_4,uVar3);
  }
  return lVar2;
}



void FUN_14014b700(longlong param_1,FILE *param_2,undefined4 param_3)

{
  longlong *plVar1;
  
  for (plVar1 = *(longlong **)(param_1 + 0x28); plVar1 != (longlong *)0x0;
      plVar1 = (longlong *)plVar1[10]) {
    (**(code **)(*plVar1 + 8))(plVar1,param_2,param_3);
    fprintf(param_2,"\n");
  }
  return;
}



void FUN_14014b760(longlong param_1,longlong *param_2)

{
  longlong *plVar1;
  char cVar2;
  
  cVar2 = (**(code **)(*param_2 + 0x10))(param_2,param_1);
  if (cVar2 != '\0') {
    plVar1 = *(longlong **)(param_1 + 0x28);
    while ((plVar1 != (longlong *)0x0 &&
           (cVar2 = (**(code **)(*plVar1 + 0x80))(plVar1,param_2), cVar2 != '\0'))) {
      plVar1 = (longlong *)plVar1[10];
    }
  }
                    // WARNING: Could not recover jumptable at 0x00014014b7c4. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x20))(param_2,param_1);
  return;
}



void FUN_14014b7d0(longlong param_1,FILE *param_2,longlong *param_3,undefined8 param_4)

{
  char cVar1;
  longlong *plVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  longlong *plVar5;
  undefined *_Src;
  ulonglong uVar6;
  undefined8 *local_30;
  void *local_28;
  undefined8 *local_20;
  void *local_18;
  
  local_20 = &DAT_14032f048;
  local_30 = &DAT_14032f048;
  FUN_140149b70(param_1 + 0x20,&local_20,param_3,param_4,0xfffffffffffffffe);
  FUN_140149b70(param_1 + 0x30,&local_30);
  puVar4 = local_20;
  puVar3 = local_30;
  plVar2 = *(longlong **)(param_1 + 0x30);
  if (*plVar2 != 0) {
    plVar5 = plVar2 + 2;
    cVar1 = (char)*plVar5;
    while (cVar1 != '\0') {
      if (cVar1 == '\"') {
        if ((longlong)plVar5 - (longlong)plVar2 != 0xf) {
          if (param_2 != (FILE *)0x0) {
            fprintf(param_2,"%s=\'%s\'");
          }
          if (param_3 == (longlong *)0x0) goto LAB_14014ba25;
          FUN_14014c4f0(param_3,puVar4 + 2,*puVar4);
          plVar2 = (longlong *)*param_3;
          uVar6 = *plVar2 + 2;
          if (((ulonglong)plVar2[1] < uVar6) && ((ulonglong)plVar2[1] < plVar2[1] + uVar6)) {
            FUN_14014c320(param_3);
          }
          memmove((void *)(*param_3 + *(longlong *)*param_3 + 0x10),&DAT_140295770,2);
          *(ulonglong *)*param_3 = uVar6;
          *(undefined1 *)(*param_3 + 0x10 + uVar6) = 0;
          FUN_14014c4f0(param_3,puVar3 + 2,*puVar3);
          plVar2 = (longlong *)*param_3;
          uVar6 = *plVar2 + 1;
          if (((ulonglong)plVar2[1] < uVar6) && ((ulonglong)plVar2[1] < plVar2[1] + uVar6)) {
            FUN_14014c320(param_3);
          }
          _Src = &DAT_140295774;
          goto LAB_14014ba00;
        }
        break;
      }
      plVar5 = (longlong *)((longlong)plVar5 + 1);
      cVar1 = *(char *)plVar5;
    }
  }
  if (param_2 != (FILE *)0x0) {
    fprintf(param_2,"%s=\"%s\"");
  }
  if (param_3 != (longlong *)0x0) {
    FUN_14014c4f0(param_3,puVar4 + 2,*puVar4);
    plVar2 = (longlong *)*param_3;
    uVar6 = *plVar2 + 2;
    if (((ulonglong)plVar2[1] < uVar6) && ((ulonglong)plVar2[1] < plVar2[1] + uVar6)) {
      FUN_14014c320(param_3);
    }
    memmove((void *)(*param_3 + *(longlong *)*param_3 + 0x10),&DAT_140295760,2);
    *(ulonglong *)*param_3 = uVar6;
    *(undefined1 *)(*param_3 + 0x10 + uVar6) = 0;
    FUN_14014c4f0(param_3,puVar3 + 2,*puVar3);
    plVar2 = (longlong *)*param_3;
    uVar6 = *plVar2 + 1;
    if (((ulonglong)plVar2[1] < uVar6) && ((ulonglong)plVar2[1] < plVar2[1] + uVar6)) {
      FUN_14014c320(param_3);
    }
    _Src = &DAT_140295764;
LAB_14014ba00:
    memmove((void *)(*param_3 + *(longlong *)*param_3 + 0x10),_Src,1);
    *(ulonglong *)*param_3 = uVar6;
    *(undefined1 *)(*param_3 + 0x10 + uVar6) = 0;
  }
LAB_14014ba25:
  if (puVar3 != &DAT_14032f048) {
    operator_delete__(local_28);
  }
  if (puVar4 != &DAT_14032f048) {
    operator_delete__(local_18);
  }
  return;
}



void FUN_14014ba70(undefined8 param_1,FILE *param_2,uint param_3)

{
  ulonglong uVar1;
  
  if (0 < (int)param_3) {
    uVar1 = (ulonglong)param_3;
    do {
      fprintf(param_2,"    ");
      uVar1 = uVar1 - 1;
    } while (uVar1 != 0);
  }
                    // WARNING: Could not recover jumptable at 0x00014014bac6. Too many branches
                    // WARNING: Treating indirect jump as call
  fprintf(param_2,"<!--%s-->");
  return;
}



void FUN_14014bad0(undefined8 param_1,longlong *param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014014badc. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x30))(param_2,param_1);
  return;
}



undefined8 * FUN_14014bae0(longlong param_1)

{
  char cVar1;
  undefined8 *puVar2;
  ulonglong uVar3;
  char *pcVar4;
  char *pcVar5;
  
  puVar2 = operator_new(0x58);
  if (puVar2 == (undefined8 *)0x0) {
    return (undefined8 *)0x0;
  }
  puVar2[1] = 0xffffffffffffffff;
  uVar3 = 0xffffffffffffffff;
  puVar2[2] = 0;
  puVar2[7] = &DAT_14032f048;
  puVar2[3] = 0;
  puVar2[5] = 0;
  puVar2[6] = 0;
  puVar2[9] = 0;
  puVar2[10] = 0;
  *(undefined4 *)(puVar2 + 4) = 2;
  *puVar2 = TiXmlComment::vftable;
  pcVar4 = (char *)(*(longlong *)(param_1 + 0x38) + 0x10);
  pcVar5 = pcVar4;
  do {
    if (uVar3 == 0) break;
    uVar3 = uVar3 - 1;
    cVar1 = *pcVar5;
    pcVar5 = pcVar5 + 1;
  } while (cVar1 != '\0');
  FUN_14014c3f0(puVar2 + 7,pcVar4,~uVar3 - 1);
  puVar2[2] = *(undefined8 *)(param_1 + 0x10);
  return puVar2;
}



void FUN_14014bb90(longlong param_1,FILE *param_2,ulonglong param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  ulonglong uVar2;
  undefined8 *local_20;
  void *local_18;
  
  uVar2 = param_3 & 0xffffffff;
  if (*(char *)(param_1 + 0x58) == '\0') {
    local_20 = &DAT_14032f048;
    FUN_140149b70(param_1 + 0x38,&local_20,param_3,param_4,0xfffffffffffffffe);
    puVar1 = local_20;
    fprintf(param_2,"%s");
    if (puVar1 != &DAT_14032f048) {
      operator_delete__(local_18);
    }
  }
  else {
    fprintf(param_2,"\n");
    if (0 < (int)param_3) {
      do {
        fprintf(param_2,"    ");
        uVar2 = uVar2 - 1;
      } while (uVar2 != 0);
    }
    fprintf(param_2,"<![CDATA[%s]]>\n");
  }
  return;
}



void FUN_14014bc70(undefined8 param_1,longlong *param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014014bc7c. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x38))(param_2,param_1);
  return;
}



longlong FUN_14014bc80(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  char cVar1;
  void *pvVar2;
  longlong lVar3;
  longlong lVar4;
  ulonglong uVar5;
  char *pcVar6;
  char *pcVar7;
  undefined8 uVar8;
  
  uVar8 = 0xfffffffffffffffe;
  pvVar2 = operator_new(0x60);
  if (pvVar2 == (void *)0x0) {
    lVar3 = 0;
  }
  else {
    lVar3 = FUN_1401499c0();
  }
  lVar4 = 0;
  if (lVar3 != 0) {
    pcVar6 = (char *)(*(longlong *)(param_1 + 0x38) + 0x10);
    uVar5 = 0xffffffffffffffff;
    pcVar7 = pcVar6;
    do {
      if (uVar5 == 0) break;
      uVar5 = uVar5 - 1;
      cVar1 = *pcVar7;
      pcVar7 = pcVar7 + 1;
    } while (cVar1 != '\0');
    FUN_14014c3f0(lVar3 + 0x38,pcVar6,~uVar5 - 1,param_4,uVar8);
    *(undefined8 *)(lVar3 + 0x10) = *(undefined8 *)(param_1 + 0x10);
    *(undefined1 *)(lVar3 + 0x58) = *(undefined1 *)(param_1 + 0x58);
    lVar4 = lVar3;
  }
  return lVar4;
}



void FUN_14014bd10(longlong param_1,FILE *param_2,undefined8 param_3,longlong *param_4)

{
  longlong *plVar1;
  longlong lVar2;
  ulonglong uVar3;
  
  if (param_2 != (FILE *)0x0) {
    fprintf(param_2,"<?xml ");
  }
  if (param_4 != (longlong *)0x0) {
    plVar1 = (longlong *)*param_4;
    uVar3 = *plVar1 + 6;
    if (((ulonglong)plVar1[1] < uVar3) && ((ulonglong)plVar1[1] < plVar1[1] + uVar3)) {
      FUN_14014c320(param_4);
    }
    memmove((void *)(*param_4 + *(longlong *)*param_4 + 0x10),"<?xml ",6);
    *(ulonglong *)*param_4 = uVar3;
    *(undefined1 *)(*param_4 + 0x10 + uVar3) = 0;
  }
  if (**(longlong **)(param_1 + 0x58) != 0) {
    if (param_2 != (FILE *)0x0) {
      fprintf(param_2,"version=\"%s\" ");
    }
    if (param_4 != (longlong *)0x0) {
      plVar1 = (longlong *)*param_4;
      uVar3 = *plVar1 + 9;
      if (((ulonglong)plVar1[1] < uVar3) && ((ulonglong)plVar1[1] < plVar1[1] + uVar3)) {
        FUN_14014c320(param_4);
      }
      memmove((void *)(*param_4 + *(longlong *)*param_4 + 0x10),"version=\"",9);
      *(ulonglong *)*param_4 = uVar3;
      *(undefined1 *)(*param_4 + 0x10 + uVar3) = 0;
      FUN_14014c4f0(param_4,*(undefined8 **)(param_1 + 0x58) + 2,**(undefined8 **)(param_1 + 0x58));
      plVar1 = (longlong *)*param_4;
      uVar3 = *plVar1 + 2;
      if (((ulonglong)plVar1[1] < uVar3) && ((ulonglong)plVar1[1] < plVar1[1] + uVar3)) {
        FUN_14014c320(param_4);
      }
      memmove((void *)(*param_4 + *(longlong *)*param_4 + 0x10),&DAT_1402957bc,2);
      *(ulonglong *)*param_4 = uVar3;
      *(undefined1 *)(*param_4 + 0x10 + uVar3) = 0;
    }
  }
  if (**(longlong **)(param_1 + 0x68) != 0) {
    if (param_2 != (FILE *)0x0) {
      fprintf(param_2,"encoding=\"%s\" ");
    }
    if (param_4 != (longlong *)0x0) {
      plVar1 = (longlong *)*param_4;
      uVar3 = *plVar1 + 10;
      if (((ulonglong)plVar1[1] < uVar3) && ((ulonglong)plVar1[1] < plVar1[1] + uVar3)) {
        FUN_14014c320(param_4);
      }
      memmove((void *)(*param_4 + *(longlong *)*param_4 + 0x10),"encoding=\"",10);
      *(ulonglong *)*param_4 = uVar3;
      *(undefined1 *)(*param_4 + 0x10 + uVar3) = 0;
      FUN_14014c4f0(param_4,*(undefined8 **)(param_1 + 0x68) + 2,**(undefined8 **)(param_1 + 0x68));
      plVar1 = (longlong *)*param_4;
      uVar3 = *plVar1 + 2;
      if (((ulonglong)plVar1[1] < uVar3) && ((ulonglong)plVar1[1] < plVar1[1] + uVar3)) {
        FUN_14014c320(param_4);
      }
      memmove((void *)(*param_4 + *(longlong *)*param_4 + 0x10),&DAT_1402957bc,2);
      *(ulonglong *)*param_4 = uVar3;
      *(undefined1 *)(*param_4 + 0x10 + uVar3) = 0;
    }
  }
  if (**(longlong **)(param_1 + 0x78) != 0) {
    if (param_2 != (FILE *)0x0) {
      fprintf(param_2,"standalone=\"%s\" ");
    }
    if (param_4 != (longlong *)0x0) {
      plVar1 = (longlong *)*param_4;
      uVar3 = *plVar1 + 0xc;
      if (((ulonglong)plVar1[1] < uVar3) && ((ulonglong)plVar1[1] < plVar1[1] + uVar3)) {
        FUN_14014c320(param_4);
      }
      memmove((void *)(*param_4 + *(longlong *)*param_4 + 0x10),"standalone=\"",0xc);
      *(ulonglong *)*param_4 = uVar3;
      *(undefined1 *)(*param_4 + 0x10 + uVar3) = 0;
      FUN_14014c4f0(param_4,*(undefined8 **)(param_1 + 0x78) + 2,**(undefined8 **)(param_1 + 0x78));
      plVar1 = (longlong *)*param_4;
      lVar2 = *plVar1;
      uVar3 = lVar2 + 2;
      if (((ulonglong)plVar1[1] < uVar3) && ((ulonglong)plVar1[1] < plVar1[1] + uVar3)) {
        FUN_14014c320(param_4);
      }
      memmove((void *)(*param_4 + *(longlong *)*param_4 + 0x10),&DAT_1402957bc,2);
      *(ulonglong *)*param_4 = uVar3;
      *(undefined1 *)(lVar2 + 0x12 + *param_4) = 0;
    }
  }
  if (param_2 != (FILE *)0x0) {
    fprintf(param_2,"?>");
  }
  if (param_4 != (longlong *)0x0) {
    plVar1 = (longlong *)*param_4;
    lVar2 = *plVar1;
    uVar3 = lVar2 + 2;
    if (((ulonglong)plVar1[1] < uVar3) && ((ulonglong)plVar1[1] < plVar1[1] + uVar3)) {
      FUN_14014c320(param_4);
    }
    memmove((void *)(*param_4 + *(longlong *)*param_4 + 0x10),&DAT_140295808,2);
    *(ulonglong *)*param_4 = uVar3;
    *(undefined1 *)(lVar2 + 0x12 + *param_4) = 0;
  }
  return;
}



void FUN_14014c0d0(longlong param_1,longlong param_2)

{
  char cVar1;
  ulonglong uVar2;
  char *pcVar3;
  char *pcVar4;
  
  uVar2 = 0xffffffffffffffff;
  pcVar3 = (char *)(*(longlong *)(param_1 + 0x38) + 0x10);
  pcVar4 = pcVar3;
  do {
    if (uVar2 == 0) break;
    uVar2 = uVar2 - 1;
    cVar1 = *pcVar4;
    pcVar4 = pcVar4 + 1;
  } while (cVar1 != '\0');
  FUN_14014c3f0(param_2 + 0x38,pcVar3,~uVar2 - 1);
  *(undefined8 *)(param_2 + 0x10) = *(undefined8 *)(param_1 + 0x10);
  FUN_14014c3f0(param_2 + 0x58,*(undefined8 **)(param_1 + 0x58) + 2,
                **(undefined8 **)(param_1 + 0x58));
  FUN_14014c3f0(param_2 + 0x68,*(undefined8 **)(param_1 + 0x68) + 2,
                **(undefined8 **)(param_1 + 0x68));
  FUN_14014c3f0(param_2 + 0x78,*(undefined8 **)(param_1 + 0x78) + 2,
                **(undefined8 **)(param_1 + 0x78));
  return;
}



void FUN_14014c160(undefined8 param_1,longlong *param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014014c16c. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x40))(param_2,param_1);
  return;
}



undefined8 * FUN_14014c170(undefined8 param_1)

{
  undefined8 *puVar1;
  
  puVar1 = operator_new(0x88);
  if (puVar1 != (undefined8 *)0x0) {
    puVar1[1] = 0xffffffffffffffff;
    puVar1[2] = 0;
    puVar1[7] = &DAT_14032f048;
    puVar1[3] = 0;
    puVar1[5] = 0;
    puVar1[6] = 0;
    puVar1[9] = 0;
    puVar1[10] = 0;
    *(undefined4 *)(puVar1 + 4) = 5;
    *puVar1 = TiXmlDeclaration::vftable;
    puVar1[0xb] = &DAT_14032f048;
    puVar1[0xd] = &DAT_14032f048;
    puVar1[0xf] = &DAT_14032f048;
    FUN_14014c0d0(param_1,puVar1);
    return puVar1;
  }
  return (undefined8 *)0x0;
}



void FUN_14014c200(undefined8 param_1,FILE *param_2,uint param_3)

{
  ulonglong uVar1;
  
  if (0 < (int)param_3) {
    uVar1 = (ulonglong)param_3;
    do {
      fprintf(param_2,"    ");
      uVar1 = uVar1 - 1;
    } while (uVar1 != 0);
  }
                    // WARNING: Could not recover jumptable at 0x00014014c256. Too many branches
                    // WARNING: Treating indirect jump as call
  fprintf(param_2,"<%s>");
  return;
}



void FUN_14014c260(undefined8 param_1,longlong *param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014014c26c. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x28))(param_2,param_1);
  return;
}



undefined8 * FUN_14014c270(longlong param_1)

{
  char cVar1;
  undefined8 *puVar2;
  ulonglong uVar3;
  char *pcVar4;
  char *pcVar5;
  
  puVar2 = operator_new(0x58);
  if (puVar2 == (undefined8 *)0x0) {
    return (undefined8 *)0x0;
  }
  puVar2[1] = 0xffffffffffffffff;
  uVar3 = 0xffffffffffffffff;
  puVar2[2] = 0;
  puVar2[7] = &DAT_14032f048;
  puVar2[3] = 0;
  puVar2[5] = 0;
  puVar2[6] = 0;
  puVar2[9] = 0;
  puVar2[10] = 0;
  *(undefined4 *)(puVar2 + 4) = 3;
  *puVar2 = TiXmlUnknown::vftable;
  pcVar4 = (char *)(*(longlong *)(param_1 + 0x38) + 0x10);
  pcVar5 = pcVar4;
  do {
    if (uVar3 == 0) break;
    uVar3 = uVar3 - 1;
    cVar1 = *pcVar5;
    pcVar5 = pcVar5 + 1;
  } while (cVar1 != '\0');
  FUN_14014c3f0(puVar2 + 7,pcVar4,~uVar3 - 1);
  puVar2[2] = *(undefined8 *)(param_1 + 0x10);
  return puVar2;
}



void FUN_14014c320(longlong *param_1,longlong param_2)

{
  longlong lVar1;
  void *pvVar2;
  undefined8 *puVar3;
  undefined1 auVar4 [16];
  __uint64 _Var5;
  longlong *plVar6;
  longlong *local_28;
  
  lVar1 = *(longlong *)*param_1;
  if (param_2 == 0) {
    plVar6 = &DAT_14032f048;
  }
  else {
    auVar4._8_8_ = 0;
    auVar4._0_8_ = param_2 + 0x1bU >> 2;
    _Var5 = SUB168(ZEXT816(4) * auVar4,0);
    if (SUB168(ZEXT816(4) * auVar4,8) != 0) {
      _Var5 = 0xffffffffffffffff;
    }
    plVar6 = operator_new(_Var5);
    *plVar6 = lVar1;
    *(undefined1 *)((longlong)plVar6 + lVar1 + 0x10) = 0;
    plVar6[1] = param_2;
    local_28 = plVar6;
  }
  memcpy(plVar6 + 2,(size_t *)*param_1 + 2,*(size_t *)*param_1);
  pvVar2 = (void *)param_1[1];
  puVar3 = (undefined8 *)*param_1;
  *param_1 = (longlong)plVar6;
  param_1[1] = (longlong)local_28;
  if (puVar3 != &DAT_14032f048) {
    operator_delete__(pvVar2);
  }
  return;
}



longlong * FUN_14014c3f0(longlong *param_1,void *param_2,size_t param_3)

{
  ulonglong uVar1;
  void *pvVar2;
  undefined8 *puVar3;
  undefined1 auVar4 [16];
  __uint64 _Var5;
  size_t *psVar6;
  size_t *local_28;
  
  uVar1 = *(ulonglong *)(*param_1 + 8);
  if ((uVar1 < param_3) || (param_3 * 3 + 0x18 < uVar1)) {
    if (param_3 == 0) {
      psVar6 = &DAT_14032f048;
    }
    else {
      auVar4._8_8_ = 0;
      auVar4._0_8_ = param_3 + 0x1b >> 2;
      _Var5 = SUB168(ZEXT816(4) * auVar4,0);
      if (SUB168(ZEXT816(4) * auVar4,8) != 0) {
        _Var5 = 0xffffffffffffffff;
      }
      psVar6 = operator_new(_Var5);
      *psVar6 = param_3;
      *(undefined1 *)((longlong)psVar6 + param_3 + 0x10) = 0;
      psVar6[1] = param_3;
      local_28 = psVar6;
    }
    memcpy(psVar6 + 2,param_2,param_3);
    pvVar2 = (void *)param_1[1];
    puVar3 = (undefined8 *)*param_1;
    *param_1 = (longlong)psVar6;
    param_1[1] = (longlong)local_28;
    if (puVar3 != &DAT_14032f048) {
      operator_delete__(pvVar2);
    }
  }
  else {
    memmove((void *)(*param_1 + 0x10),param_2,param_3);
    *(size_t *)*param_1 = param_3;
    *(undefined1 *)(*param_1 + 0x10 + param_3) = 0;
  }
  return param_1;
}



longlong * FUN_14014c4f0(longlong *param_1,void *param_2,size_t param_3)

{
  ulonglong uVar1;
  longlong *plVar2;
  
  plVar2 = (longlong *)*param_1;
  uVar1 = param_3 + *plVar2;
  if (((ulonglong)plVar2[1] < uVar1) && ((ulonglong)plVar2[1] < plVar2[1] + uVar1)) {
    FUN_14014c320(param_1);
  }
  memmove((void *)(*(longlong *)*param_1 + 0x10 + *param_1),param_2,param_3);
  *(ulonglong *)*param_1 = uVar1;
  *(undefined1 *)(*param_1 + 0x10 + uVar1) = 0;
  return param_1;
}



undefined4 FUN_14014c570(byte param_1)

{
  int iVar1;
  
  iVar1 = isspace((uint)param_1);
  if (((iVar1 == 0) && (param_1 != 10)) && (param_1 != 0xd)) {
    return 0;
  }
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14014c5a0(uint param_1,longlong param_2,int *param_3)

{
  int iVar1;
  byte *pbVar2;
  byte bVar3;
  byte local_38 [32];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)local_38;
  local_38[8] = 0xc0;
  local_38[9] = 0;
  local_38[10] = 0;
  local_38[0xb] = 0;
  local_38[0xc] = 0xe0;
  local_38[0xd] = 0;
  local_38[0xe] = 0;
  local_38[0xf] = 0;
  local_38[0x10] = 0xf0;
  local_38[0x11] = 0;
  local_38[0x12] = 0;
  local_38[0x13] = 0;
  local_38[0x14] = 0xf8;
  local_38[0x15] = 0;
  local_38[0x16] = 0;
  local_38[0x17] = 0;
  local_38[0] = 0;
  local_38[1] = 0;
  local_38[2] = 0;
  local_38[3] = 0;
  local_38[4] = 0;
  local_38[5] = 0;
  local_38[6] = 0;
  local_38[7] = 0;
  local_38[0x18] = 0xfc;
  local_38[0x19] = 0;
  local_38[0x1a] = 0;
  local_38[0x1b] = 0;
  if (param_1 < 0x80) {
    *param_3 = 1;
  }
  else if (param_1 < 0x800) {
    *param_3 = 2;
  }
  else if (param_1 < 0x10000) {
    *param_3 = 3;
  }
  else {
    if (0x1fffff < param_1) {
      *param_3 = 0;
      return;
    }
    *param_3 = 4;
  }
  iVar1 = *param_3;
  pbVar2 = (byte *)(param_2 + iVar1);
  if (iVar1 != 1) {
    if (iVar1 != 2) {
      if (iVar1 != 3) {
        if (iVar1 != 4) {
          return;
        }
        bVar3 = (byte)param_1;
        pbVar2 = pbVar2 + -1;
        param_1 = param_1 >> 6;
        *pbVar2 = bVar3 & 0x3f | 0x80;
      }
      bVar3 = (byte)param_1;
      pbVar2 = pbVar2 + -1;
      param_1 = param_1 >> 6;
      *pbVar2 = bVar3 & 0x3f | 0x80;
    }
    bVar3 = (byte)param_1;
    pbVar2 = pbVar2 + -1;
    param_1 = param_1 >> 6;
    *pbVar2 = bVar3 & 0x3f | 0x80;
  }
  pbVar2[-1] = local_38[(longlong)*param_3 * 4] | (byte)param_1;
  return;
}



void FUN_14014c6b0(int *param_1,byte *param_2,int param_3)

{
  byte bVar1;
  byte bVar2;
  int iVar3;
  byte *pbVar4;
  byte *pbVar5;
  int iVar6;
  int iVar7;
  int iVar8;
  
  iVar3 = param_1[4];
  if (0 < iVar3) {
    iVar8 = *param_1;
    iVar7 = param_1[1];
    pbVar5 = *(byte **)(param_1 + 2);
joined_r0x00014014c6e8:
    pbVar4 = pbVar5;
    if (pbVar4 < param_2) {
      bVar1 = *pbVar4;
      if (bVar1 == 0) {
        return;
      }
      if (bVar1 == 9) {
        iVar7 = (iVar7 / iVar3 + 1) * iVar3;
        pbVar5 = pbVar4 + 1;
      }
      else {
        if (bVar1 != 10) {
          if (bVar1 == 0xd) {
            iVar8 = iVar8 + 1;
            iVar7 = 0;
            pbVar5 = pbVar4 + 1;
            if (pbVar4[1] == 10) {
              pbVar5 = pbVar4 + 2;
            }
            goto joined_r0x00014014c6e8;
          }
          if (bVar1 == 0xef) {
            if (param_3 == 1) {
              bVar1 = pbVar4[1];
              pbVar5 = pbVar4;
              if ((bVar1 != 0) && (bVar2 = pbVar4[2], bVar2 != 0)) {
                if ((bVar1 != 0xbb) || (bVar2 != 0xbf)) {
                  if (bVar1 == 0xbf) {
                    if (bVar2 == 0xbe) {
                      pbVar5 = pbVar4 + 3;
                      goto joined_r0x00014014c6e8;
                    }
                    if (bVar2 == 0xbf) {
                      pbVar5 = pbVar4 + 3;
                      goto joined_r0x00014014c6e8;
                    }
                  }
                  iVar7 = iVar7 + 1;
                  pbVar5 = pbVar4 + 3;
                  goto joined_r0x00014014c6e8;
                }
                pbVar5 = pbVar4 + 3;
              }
              goto joined_r0x00014014c6e8;
            }
          }
          else if (param_3 == 1) {
            iVar6 = *(int *)(&DAT_1402861a0 + (ulonglong)bVar1 * 4);
            if (iVar6 == 0) {
              iVar6 = 1;
            }
            iVar7 = iVar7 + 1;
            pbVar5 = pbVar4 + iVar6;
            goto joined_r0x00014014c6e8;
          }
          iVar7 = iVar7 + 1;
          pbVar5 = pbVar4 + 1;
          goto joined_r0x00014014c6e8;
        }
        iVar8 = iVar8 + 1;
        iVar7 = 0;
        pbVar5 = pbVar4 + 1;
        if (pbVar4[1] == 0xd) {
          pbVar5 = pbVar4 + 2;
        }
      }
      goto joined_r0x00014014c6e8;
    }
    *param_1 = iVar8;
    param_1[1] = iVar7;
    *(byte **)(param_1 + 2) = pbVar4;
  }
  return;
}



byte * FUN_14014c800(byte *param_1,int param_2)

{
  int iVar1;
  byte bVar2;
  
  if ((param_1 == (byte *)0x0) || (bVar2 = *param_1, bVar2 == 0)) {
    return (byte *)0x0;
  }
  if (param_2 == 1) {
    do {
      if (bVar2 == 0xef) {
        if ((param_1[1] == 0xbb) && (param_1[2] == 0xbf)) {
          param_1 = param_1 + 3;
        }
        else {
          if (param_1[1] != 0xbf) goto LAB_14014c860;
          if (param_1[2] == 0xbe) {
            param_1 = param_1 + 3;
          }
          else {
            if (param_1[2] != 0xbf) goto LAB_14014c860;
            param_1 = param_1 + 3;
          }
        }
      }
      else {
LAB_14014c860:
        iVar1 = isspace((uint)bVar2);
        if ((((iVar1 == 0) && (bVar2 != 10)) && (bVar2 != 0xd)) &&
           ((*param_1 != 10 && (*param_1 != 0xd)))) {
          return param_1;
        }
        param_1 = param_1 + 1;
      }
      bVar2 = *param_1;
    } while (bVar2 != 0);
  }
  else {
    for (; ((bVar2 = *param_1, bVar2 != 0 &&
            (((iVar1 = isspace((uint)bVar2), iVar1 != 0 || (bVar2 == 10)) || (bVar2 == 0xd)))) ||
           ((*param_1 == 10 || (*param_1 == 0xd)))); param_1 = param_1 + 1) {
    }
  }
  return param_1;
}



byte * FUN_14014c8e0(byte *param_1,undefined8 param_2)

{
  byte bVar1;
  int iVar2;
  byte *pbVar3;
  
  FUN_14014c3f0(param_2,&DAT_140281f00,0);
  if (((param_1 == (byte *)0x0) || (bVar1 = *param_1, bVar1 == 0)) ||
     ((pbVar3 = param_1, bVar1 < 0x7f &&
      ((iVar2 = isalpha((uint)bVar1), iVar2 == 0 && (*param_1 != 0x5f)))))) {
    return (byte *)0x0;
  }
  do {
    bVar1 = *pbVar3;
    if ((bVar1 == 0) ||
       (((((bVar1 < 0x7f && (iVar2 = isalnum((uint)bVar1), iVar2 == 0)) &&
          (bVar1 = *pbVar3, bVar1 != 0x5f)) && ((bVar1 != 0x2d && (bVar1 != 0x2e)))) &&
        (bVar1 != 0x3a)))) break;
    pbVar3 = pbVar3 + 1;
  } while (pbVar3 != (byte *)0x0);
  if (0 < (longlong)pbVar3 - (longlong)param_1) {
    FUN_14014c3f0(param_2,param_1);
  }
  return pbVar3;
}



char * FUN_14014c9a0(char *param_1,char *param_2,undefined4 *param_3,int param_4)

{
  char cVar1;
  int iVar2;
  char *pcVar3;
  int iVar4;
  int iVar5;
  undefined **ppuVar6;
  longlong lVar7;
  char *pcVar8;
  
  cVar1 = param_1[1];
  iVar4 = 0;
  *param_3 = 0;
  if ((cVar1 != '\0') && (cVar1 == '#')) {
    if (param_1[2] != '\0') {
      iVar5 = 1;
      if (param_1[2] == 'x') {
        if (((param_1[3] != '\0') && (pcVar3 = strchr(param_1 + 3,0x3b), pcVar3 != (char *)0x0)) &&
           (*pcVar3 != '\0')) {
          pcVar8 = pcVar3 + -1;
          lVar7 = (longlong)pcVar3 - (longlong)param_1;
          cVar1 = *pcVar8;
          while (cVar1 != 'x') {
            if ((cVar1 < '0') || ('9' < cVar1)) {
              if ((cVar1 < 'a') || ('f' < cVar1)) {
                if (cVar1 < 'A') {
                  return (char *)0x0;
                }
                if ('F' < cVar1) {
                  return (char *)0x0;
                }
                iVar2 = cVar1 + -0x37;
              }
              else {
                iVar2 = cVar1 + -0x57;
              }
            }
            else {
              iVar2 = cVar1 + -0x30;
            }
            iVar2 = iVar2 * iVar5;
            pcVar8 = pcVar8 + -1;
            iVar5 = iVar5 << 4;
            iVar4 = iVar4 + iVar2;
            cVar1 = *pcVar8;
          }
LAB_14014cad0:
          if (param_4 != 1) {
            *param_2 = (char)iVar4;
            *param_3 = 1;
            return param_1 + lVar7 + 1;
          }
          FUN_14014c5a0(iVar4,param_2,param_3);
          return param_1 + lVar7 + 1;
        }
      }
      else {
        pcVar3 = strchr(param_1 + 2,0x3b);
        if ((pcVar3 != (char *)0x0) && (*pcVar3 != '\0')) {
          pcVar8 = pcVar3 + -1;
          lVar7 = (longlong)pcVar3 - (longlong)param_1;
          cVar1 = *pcVar8;
          while (cVar1 != '#') {
            if (cVar1 < '0') {
              return (char *)0x0;
            }
            if ('9' < cVar1) {
              return (char *)0x0;
            }
            pcVar8 = pcVar8 + -1;
            iVar4 = iVar4 + (cVar1 + -0x30) * iVar5;
            iVar5 = iVar5 * 10;
            cVar1 = *pcVar8;
          }
          goto LAB_14014cad0;
        }
      }
      return (char *)0x0;
    }
  }
  ppuVar6 = &PTR_s__amp__140325b50;
  do {
    iVar5 = strncmp(*ppuVar6,param_1,(ulonglong)*(uint *)(ppuVar6 + 1));
    if (iVar5 == 0) {
      *param_3 = 1;
      *param_2 = (&DAT_140325b5c)[(longlong)iVar4 * 0x10];
      return param_1 + (uint)(&DAT_140325b58)[(longlong)iVar4 * 4];
    }
    ppuVar6 = ppuVar6 + 2;
    iVar4 = iVar4 + 1;
  } while ((longlong)ppuVar6 < 0x140325ba0);
  *param_2 = *param_1;
  return param_1 + 1;
}



undefined8 FUN_14014cb90(char *param_1,char *param_2,char param_3,int param_4)

{
  char cVar1;
  int _C;
  undefined8 uVar2;
  int _C_00;
  longlong lVar3;
  
  if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {
    return 0;
  }
  if (param_3 == '\0') {
    do {
      if (*param_2 == '\0') goto LAB_14014cc10;
      if (*param_1 != *param_2) break;
      param_1 = param_1 + 1;
      param_2 = param_2 + 1;
    } while (*param_1 != '\0');
    cVar1 = *param_2;
  }
  else {
    lVar3 = (longlong)param_1 - (longlong)param_2;
    do {
      if (*param_2 == '\0') goto LAB_14014cc10;
      _C_00 = (int)param_2[lVar3];
      if ((param_4 != 1) || (_C_00 < 0x80)) {
        _C_00 = tolower(_C_00);
      }
      _C = (int)*param_2;
      if ((param_4 != 1) || (_C < 0x80)) {
        _C = tolower(_C);
      }
    } while ((_C_00 == _C) && (param_2 = param_2 + 1, param_2[lVar3] != '\0'));
    cVar1 = *param_2;
  }
  if (cVar1 == '\0') {
LAB_14014cc10:
    uVar2 = 1;
  }
  else {
    uVar2 = 0;
  }
  return uVar2;
}



byte * FUN_14014cc60(byte *param_1,longlong *param_2,char param_3,char *param_4,int param_5)

{
  byte bVar1;
  longlong *plVar2;
  bool bVar3;
  char cVar4;
  int iVar5;
  byte *pbVar6;
  ulonglong uVar7;
  size_t sVar8;
  int local_res8 [2];
  uint local_res18 [2];
  char *local_res20;
  
  local_res20 = param_4;
  FUN_14014c3f0(param_2,&DAT_140281f00,0);
  if ((param_3 == '\0') || (DAT_140325ab8 == '\0')) {
    while (param_1 != (byte *)0x0) {
      if ((*param_1 == 0) || (cVar4 = FUN_14014cb90(param_1,param_4,0,param_5), cVar4 != '\0'))
      goto LAB_14014cf62;
      local_res18[0] = 0;
      if (param_5 == 1) {
        local_res8[0] = *(int *)(&DAT_1402861a0 + (ulonglong)*param_1 * 4);
        if (local_res8[0] == 1) goto LAB_14014ceda;
        if (local_res8[0] == 0) {
          param_1 = (byte *)0x0;
        }
        else {
          iVar5 = 0;
          if (*param_1 != 0) {
            pbVar6 = param_1;
            do {
              if (local_res8[0] <= iVar5) break;
              bVar1 = *pbVar6;
              pbVar6 = pbVar6 + 1;
              iVar5 = iVar5 + 1;
              pbVar6[(longlong)(&stack0x00000017 + -(longlong)param_1)] = bVar1;
            } while (*pbVar6 != 0);
          }
          param_1 = param_1 + local_res8[0];
        }
      }
      else {
        local_res8[0] = 1;
LAB_14014ceda:
        if (*param_1 == 0x26) {
          param_1 = (byte *)FUN_14014c9a0(param_1,local_res18,local_res8,param_5);
        }
        else {
          local_res18[0] = (uint)*param_1;
          param_1 = param_1 + 1;
        }
      }
      plVar2 = (longlong *)*param_2;
      sVar8 = (size_t)local_res8[0];
      uVar7 = sVar8 + *plVar2;
      if (((ulonglong)plVar2[1] < uVar7) && ((ulonglong)plVar2[1] < plVar2[1] + uVar7)) {
        FUN_14014c320(param_2);
      }
      memmove((void *)(*(longlong *)*param_2 + 0x10 + *param_2),local_res18,sVar8);
      *(ulonglong *)*param_2 = uVar7;
      *(undefined1 *)(*param_2 + 0x10 + uVar7) = 0;
      param_4 = local_res20;
    }
  }
  else {
    bVar3 = false;
    param_1 = (byte *)FUN_14014c800(param_1,param_5);
    if (param_1 == (byte *)0x0) {
      return (byte *)0x0;
    }
    do {
      if ((*param_1 == 0) || (cVar4 = FUN_14014cb90(param_1,param_4,0,param_5), cVar4 != '\0'))
      goto LAB_14014cf62;
      bVar1 = *param_1;
      if ((((bVar1 == 0xd) || (bVar1 == 10)) || (iVar5 = isspace((uint)bVar1), iVar5 != 0)) ||
         ((bVar1 == 10 || (bVar1 == 0xd)))) {
        param_1 = param_1 + 1;
        bVar3 = true;
      }
      else {
        if (bVar3) {
          FUN_140149700(param_2);
          bVar3 = false;
        }
        local_res18[0] = 0;
        if (param_5 == 1) {
          local_res8[0] = *(int *)(&DAT_1402861a0 + (ulonglong)*param_1 * 4);
          if (local_res8[0] == 1) goto LAB_14014cd9d;
          if (local_res8[0] != 0) {
            iVar5 = 0;
            if (*param_1 != 0) {
              pbVar6 = param_1;
              do {
                if (local_res8[0] <= iVar5) break;
                bVar1 = *pbVar6;
                pbVar6 = pbVar6 + 1;
                iVar5 = iVar5 + 1;
                pbVar6[(longlong)(&stack0x00000017 + -(longlong)param_1)] = bVar1;
              } while (*pbVar6 != 0);
            }
            param_1 = param_1 + local_res8[0];
            goto LAB_14014cdbd;
          }
          param_1 = (byte *)0x0;
LAB_14014cdc2:
          plVar2 = (longlong *)*param_2;
          sVar8 = (size_t)local_res8[0];
          uVar7 = sVar8 + *plVar2;
          if (((ulonglong)plVar2[1] < uVar7) && ((ulonglong)plVar2[1] < plVar2[1] + uVar7)) {
            FUN_14014c320(param_2);
          }
          memmove((void *)(*(longlong *)*param_2 + 0x10 + *param_2),local_res18,sVar8);
          *(ulonglong *)*param_2 = uVar7;
          *(undefined1 *)(*param_2 + 0x10 + uVar7) = 0;
          param_4 = local_res20;
        }
        else {
          local_res8[0] = 1;
LAB_14014cd9d:
          if (*param_1 == 0x26) {
            param_1 = (byte *)FUN_14014c9a0(param_1,local_res18,local_res8,param_5);
LAB_14014cdbd:
            if (local_res8[0] != 1) goto LAB_14014cdc2;
          }
          else {
            local_res18[0] = (uint)*param_1;
            param_1 = param_1 + 1;
          }
          FUN_140149700(param_2,(undefined1)local_res18[0]);
        }
      }
    } while (param_1 != (byte *)0x0);
  }
  return (byte *)0x0;
LAB_14014cf62:
  uVar7 = 0xffffffffffffffff;
  do {
    if (uVar7 == 0) break;
    uVar7 = uVar7 - 1;
    cVar4 = *param_4;
    param_4 = param_4 + 1;
  } while (cVar4 != '\0');
  return param_1 + (~uVar7 - 1);
}



char * FUN_14014cf80(longlong param_1,char *param_2,undefined4 *param_3,int param_4)

{
  char cVar1;
  int iVar2;
  int iVar3;
  char *pcVar4;
  longlong *plVar5;
  undefined8 uVar6;
  longlong lVar7;
  ulonglong uVar8;
  undefined4 local_48;
  undefined4 uStack_44;
  char *local_40;
  undefined4 local_38;
  
  *(undefined1 *)(param_1 + 0x58) = 0;
  *(undefined4 *)(param_1 + 0x5c) = 0;
  FUN_14014c3f0(param_1 + 0x60,&DAT_140281f00,0);
  *(undefined8 *)(param_1 + 0x74) = 0;
  if ((param_2 != (char *)0x0) && (*param_2 != '\0')) {
    *(undefined8 *)(param_1 + 8) = 0xffffffffffffffff;
    if (param_3 == (undefined4 *)0x0) {
      *(undefined8 *)(param_1 + 8) = 0;
    }
    else {
      *(undefined4 *)(param_1 + 8) = *param_3;
      *(undefined4 *)(param_1 + 0xc) = param_3[1];
    }
    local_38 = *(undefined4 *)(param_1 + 0x70);
    local_48 = *(undefined4 *)(param_1 + 8);
    uStack_44 = *(undefined4 *)(param_1 + 0xc);
    *(undefined8 *)(param_1 + 8) = *(undefined8 *)(param_1 + 8);
    if (((((param_4 == 0) && (*param_2 != '\0')) && (*param_2 == -0x11)) &&
        ((param_2[1] != '\0' && (param_2[1] == -0x45)))) &&
       ((param_2[2] != '\0' && (param_2[2] == -0x41)))) {
      param_4 = 1;
      *(undefined1 *)(param_1 + 0x7c) = 1;
    }
    local_40 = param_2;
    pcVar4 = (char *)FUN_14014c800(param_2,param_4);
    if (pcVar4 != (char *)0x0) {
      do {
        if ((*pcVar4 == '\0') ||
           (plVar5 = (longlong *)FUN_14014d2a0(param_1,pcVar4,param_4), plVar5 == (longlong *)0x0))
        break;
        uVar6 = (**(code **)(*plVar5 + 0x10))(plVar5,pcVar4,&local_48,param_4);
        FUN_140149f20(param_1,plVar5);
        if ((param_4 == 0) && (lVar7 = (**(code **)(*plVar5 + 0x68))(plVar5), lVar7 != 0)) {
          lVar7 = (**(code **)(*plVar5 + 0x68))(plVar5);
          lVar7 = *(longlong *)(lVar7 + 0x68);
          if (*(char *)(lVar7 + 0x10) != '\0') {
            pcVar4 = "UTF-8";
            do {
              if (*pcVar4 == '\0') goto LAB_14014d16a;
              iVar2 = tolower((int)pcVar4[lVar7 + -0x140295c08]);
              iVar3 = tolower((int)*pcVar4);
            } while ((iVar2 == iVar3) && (pcVar4 = pcVar4 + 1, pcVar4[lVar7 + -0x140295c08] != '\0')
                    );
            if (*pcVar4 != '\0') {
              pcVar4 = "UTF8";
              if (*(char *)(lVar7 + 0x10) != '\0') {
                do {
                  if (*pcVar4 == '\0') goto LAB_14014d16a;
                  iVar2 = tolower((int)pcVar4[lVar7 + -0x140295c10]);
                  iVar3 = tolower((int)*pcVar4);
                } while ((iVar2 == iVar3) &&
                        (pcVar4 = pcVar4 + 1, pcVar4[lVar7 + -0x140295c10] != '\0'));
                if (*pcVar4 == '\0') goto LAB_14014d16a;
              }
              param_4 = 2;
              goto LAB_14014d16f;
            }
          }
LAB_14014d16a:
          param_4 = 1;
        }
LAB_14014d16f:
        pcVar4 = (char *)FUN_14014c800(uVar6,param_4);
      } while (pcVar4 != (char *)0x0);
      if (*(longlong *)(param_1 + 0x28) != 0) {
        return pcVar4;
      }
      cVar1 = *(char *)(param_1 + 0x58);
      goto LAB_14014d1a9;
    }
  }
  cVar1 = *(char *)(param_1 + 0x58);
LAB_14014d1a9:
  if (cVar1 == '\0') {
    uVar8 = 0xffffffffffffffff;
    *(undefined1 *)(param_1 + 0x58) = 1;
    *(undefined4 *)(param_1 + 0x5c) = 0xd;
    pcVar4 = PTR_s_Error_document_empty__140325b28;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar1 = *pcVar4;
      pcVar4 = pcVar4 + 1;
    } while (cVar1 != '\0');
    FUN_14014c3f0(param_1 + 0x60,PTR_s_Error_document_empty__140325b28,~uVar8 - 1);
    *(undefined8 *)(param_1 + 0x74) = 0xffffffffffffffff;
  }
  return (char *)0x0;
}



void FUN_14014d200(longlong param_1,int param_2,longlong param_3,undefined8 *param_4,
                  undefined4 param_5)

{
  char cVar1;
  ulonglong uVar2;
  char *pcVar3;
  
  if (*(char *)(param_1 + 0x58) == '\0') {
    *(int *)(param_1 + 0x5c) = param_2;
    *(undefined1 *)(param_1 + 0x58) = 1;
    uVar2 = 0xffffffffffffffff;
    pcVar3 = (&PTR_s_No_error_140325ac0)[param_2];
    do {
      if (uVar2 == 0) break;
      uVar2 = uVar2 - 1;
      cVar1 = *pcVar3;
      pcVar3 = pcVar3 + 1;
    } while (cVar1 != '\0');
    FUN_14014c3f0(param_1 + 0x60,(&PTR_s_No_error_140325ac0)[param_2],~uVar2 - 1);
    *(undefined8 *)(param_1 + 0x74) = 0xffffffffffffffff;
    if ((param_3 != 0) && (param_4 != (undefined8 *)0x0)) {
      FUN_14014c6b0(param_4,param_3,param_5);
      *(undefined8 *)(param_1 + 0x74) = *param_4;
    }
  }
  return;
}



undefined8 *
FUN_14014d2a0(undefined8 param_1,undefined8 param_2,ulonglong param_3,undefined8 param_4)

{
  char cVar1;
  int iVar2;
  char *pcVar3;
  longlong lVar4;
  undefined8 *puVar5;
  char *pcVar6;
  void *pvVar7;
  ulonglong uVar8;
  
  pcVar3 = (char *)FUN_14014c800(param_2,param_3 & 0xffffffff,param_3,param_4,0xfffffffffffffffe);
  if (((pcVar3 == (char *)0x0) || (*pcVar3 == '\0')) || (*pcVar3 != '<')) {
    return (undefined8 *)0x0;
  }
  lVar4 = FUN_1401497b0(param_1);
  pcVar3 = (char *)FUN_14014c800(pcVar3,param_3 & 0xffffffff);
  if (pcVar3 == (char *)0x0) {
    return (undefined8 *)0x0;
  }
  if (*pcVar3 == '\0') {
    return (undefined8 *)0x0;
  }
  cVar1 = FUN_14014cb90(pcVar3,&DAT_140295c28,1,param_3 & 0xffffffff);
  if (cVar1 == '\0') {
    pcVar6 = "<!--";
    cVar1 = *pcVar3;
    if (cVar1 != '\0') {
      do {
        if (*pcVar6 == '\0') goto LAB_14014d3cb;
      } while (((pcVar3 + -0x140295830)[(longlong)pcVar6] == *pcVar6) &&
              (pcVar6 = pcVar6 + 1, (pcVar3 + -0x140295830)[(longlong)pcVar6] != '\0'));
      if (*pcVar6 == '\0') {
LAB_14014d3cb:
        puVar5 = operator_new(0x58);
        if (puVar5 != (undefined8 *)0x0) {
          puVar5[1] = 0xffffffffffffffff;
          puVar5[2] = 0;
          puVar5[7] = &DAT_14032f048;
          puVar5[3] = 0;
          *(undefined4 *)(puVar5 + 4) = 2;
          puVar5[5] = 0;
          puVar5[6] = 0;
          puVar5[9] = 0;
          puVar5[10] = 0;
          *puVar5 = TiXmlComment::vftable;
          goto LAB_14014d545;
        }
        goto LAB_14014d4fd;
      }
    }
    pcVar6 = "<![CDATA[";
    if (cVar1 != '\0') {
      do {
        if (*pcVar6 == '\0') goto LAB_14014d451;
      } while (((pcVar3 + -0x140295820)[(longlong)pcVar6] == *pcVar6) &&
              (pcVar6 = pcVar6 + 1, (pcVar3 + -0x140295820)[(longlong)pcVar6] != '\0'));
      if (*pcVar6 == '\0') {
LAB_14014d451:
        pvVar7 = operator_new(0x60);
        puVar5 = (undefined8 *)0x0;
        if (pvVar7 != (void *)0x0) {
          puVar5 = (undefined8 *)FUN_1401499c0();
        }
        *(undefined1 *)(puVar5 + 0xb) = 1;
        goto LAB_14014d545;
      }
    }
    pcVar6 = "<!";
    if (cVar1 == '\0') {
LAB_14014d503:
      if (((0x7e < (byte)pcVar3[1]) || (iVar2 = isalpha((uint)(byte)pcVar3[1]), iVar2 != 0)) ||
         (pcVar3[1] == '_')) {
        pvVar7 = operator_new(0xa8);
        puVar5 = (undefined8 *)0x0;
        if (pvVar7 != (void *)0x0) {
          puVar5 = (undefined8 *)FUN_14014a120(pvVar7,&DAT_140281f00);
        }
        goto LAB_14014d545;
      }
    }
    else {
      do {
        if (*pcVar6 == '\0') goto LAB_14014d4aa;
      } while ((pcVar6[(longlong)(pcVar3 + -0x140295c30)] == *pcVar6) &&
              (pcVar6 = pcVar6 + 1, pcVar6[(longlong)(pcVar3 + -0x140295c30)] != '\0'));
      if (*pcVar6 != '\0') goto LAB_14014d503;
    }
LAB_14014d4aa:
    puVar5 = operator_new(0x58);
    if (puVar5 != (undefined8 *)0x0) {
      puVar5[1] = 0xffffffffffffffff;
      puVar5[2] = 0;
      puVar5[7] = &DAT_14032f048;
      puVar5[3] = 0;
      *(undefined4 *)(puVar5 + 4) = 3;
      puVar5[5] = 0;
      puVar5[6] = 0;
      puVar5[9] = 0;
      puVar5[10] = 0;
      *puVar5 = TiXmlUnknown::vftable;
      goto LAB_14014d545;
    }
  }
  else {
    puVar5 = operator_new(0x88);
    if (puVar5 != (undefined8 *)0x0) {
      puVar5[1] = 0xffffffffffffffff;
      puVar5[2] = 0;
      puVar5[7] = &DAT_14032f048;
      puVar5[3] = 0;
      *(undefined4 *)(puVar5 + 4) = 5;
      puVar5[5] = 0;
      puVar5[6] = 0;
      puVar5[9] = 0;
      puVar5[10] = 0;
      *puVar5 = TiXmlDeclaration::vftable;
      puVar5[0xb] = &DAT_14032f048;
      puVar5[0xd] = &DAT_14032f048;
      puVar5[0xf] = &DAT_14032f048;
      goto LAB_14014d545;
    }
  }
LAB_14014d4fd:
  puVar5 = (undefined8 *)0x0;
LAB_14014d545:
  if (puVar5 != (undefined8 *)0x0) {
    puVar5[3] = param_1;
    return puVar5;
  }
  if (lVar4 == 0) {
    return (undefined8 *)0x0;
  }
  if (*(char *)(lVar4 + 0x58) != '\0') {
    return (undefined8 *)0x0;
  }
  *(undefined1 *)(lVar4 + 0x58) = 1;
  *(undefined4 *)(lVar4 + 0x5c) = 3;
  uVar8 = 0xffffffffffffffff;
  pcVar3 = PTR_s_Memory_allocation_failed__140325ad8;
  do {
    if (uVar8 == 0) break;
    uVar8 = uVar8 - 1;
    cVar1 = *pcVar3;
    pcVar3 = pcVar3 + 1;
  } while (cVar1 != '\0');
  FUN_14014c3f0(lVar4 + 0x60,PTR_s_Memory_allocation_failed__140325ad8,~uVar8 - 1);
  *(undefined8 *)(lVar4 + 0x74) = 0xffffffffffffffff;
  return (undefined8 *)0x0;
}



char * FUN_14014d5b0(longlong *param_1,undefined8 param_2,longlong *param_3,undefined4 param_4)

{
  ulonglong uVar1;
  char cVar2;
  char cVar3;
  size_t sVar4;
  size_t sVar5;
  longlong *plVar6;
  undefined1 auVar7 [16];
  undefined1 auVar8 [16];
  char *pcVar9;
  longlong lVar10;
  undefined8 uVar11;
  __uint64 _Var12;
  size_t *psVar13;
  char *pcVar14;
  longlong *plVar15;
  size_t *psVar16;
  ulonglong uVar17;
  longlong lVar18;
  size_t *psVar19;
  size_t *local_res10;
  size_t *local_60;
  size_t *local_50;
  
  pcVar9 = (char *)FUN_14014c800(param_2,param_4);
  for (plVar15 = param_1; plVar15 != (longlong *)0x0; plVar15 = (longlong *)plVar15[3]) {
    lVar10 = (**(code **)(*plVar15 + 0x20))(plVar15);
    if (lVar10 != 0) {
      lVar10 = (**(code **)(*plVar15 + 0x20))(plVar15);
      goto LAB_14014d62a;
    }
  }
  lVar10 = 0;
LAB_14014d62a:
  if ((pcVar9 == (char *)0x0) || (*pcVar9 == '\0')) {
    if (lVar10 == 0) {
      return (char *)0x0;
    }
    if (*(char *)(lVar10 + 0x58) != '\0') {
      return (char *)0x0;
    }
    *(undefined1 *)(lVar10 + 0x58) = 1;
    *(undefined4 *)(lVar10 + 0x5c) = 4;
    uVar17 = 0xffffffffffffffff;
    pcVar9 = PTR_s_Error_parsing_Element__140325ae0;
    do {
      if (uVar17 == 0) break;
      uVar17 = uVar17 - 1;
      cVar2 = *pcVar9;
      pcVar9 = pcVar9 + 1;
    } while (cVar2 != '\0');
    FUN_14014c3f0(lVar10 + 0x60,PTR_s_Error_parsing_Element__140325ae0,~uVar17 - 1);
    *(undefined4 *)(lVar10 + 0x78) = 0xffffffff;
    *(undefined4 *)(lVar10 + 0x74) = 0xffffffff;
    return (char *)0x0;
  }
  if (param_3 != (longlong *)0x0) {
    FUN_14014c6b0(param_3,pcVar9,param_4);
    param_1[1] = *param_3;
  }
  if (*pcVar9 != '<') {
    if (lVar10 == 0) {
      return (char *)0x0;
    }
    FUN_14014d200(lVar10,4,pcVar9,param_3,param_4);
    return (char *)0x0;
  }
  uVar11 = FUN_14014c800(pcVar9 + 1,param_4);
  pcVar9 = (char *)FUN_14014c8e0(uVar11,param_1 + 7);
  if ((pcVar9 == (char *)0x0) || (*pcVar9 == '\0')) {
    if (lVar10 == 0) {
      return (char *)0x0;
    }
    FUN_14014d200(lVar10,5,uVar11,param_3,param_4);
    return (char *)0x0;
  }
  _Var12 = SUB168(ZEXT816(4) * ZEXT816(7),0);
  if (SUB168(ZEXT816(4) * ZEXT816(7),8) != 0) {
    _Var12 = 0xffffffffffffffff;
  }
  psVar13 = operator_new(_Var12);
  *psVar13 = 2;
  *(undefined1 *)((longlong)psVar13 + 0x12) = 0;
  psVar13[1] = 2;
  memcpy(psVar13 + 2,&DAT_140295818,*psVar13);
  psVar19 = (size_t *)param_1[7];
  sVar4 = *psVar19;
  uVar17 = *psVar13 + sVar4;
  local_res10 = psVar13;
  local_60 = psVar13;
  if ((psVar13[1] < uVar17) && (uVar1 = psVar13[1] + uVar17, psVar13[1] < uVar1)) {
    sVar5 = *psVar13;
    if (uVar1 == 0) {
      local_res10 = &DAT_14032f048;
      local_60 = local_50;
    }
    else {
      auVar7._8_8_ = 0;
      auVar7._0_8_ = uVar1 + 0x1b >> 2;
      _Var12 = SUB168(ZEXT816(4) * auVar7,0);
      if (SUB168(ZEXT816(4) * auVar7,8) != 0) {
        _Var12 = 0xffffffffffffffff;
      }
      local_res10 = operator_new(_Var12);
      *local_res10 = sVar5;
      *(undefined1 *)((longlong)local_res10 + sVar5 + 0x10) = 0;
      local_res10[1] = uVar1;
      local_60 = local_res10;
    }
    memcpy(local_res10 + 2,psVar13 + 2,*psVar13);
    if (psVar13 != &DAT_14032f048) {
      operator_delete__(psVar13);
    }
  }
  memmove((void *)(*local_res10 + 0x10 + (longlong)local_res10),psVar19 + 2,sVar4);
  *local_res10 = uVar17;
  *(undefined1 *)((longlong)local_res10 + uVar17 + 0x10) = 0;
  sVar4 = *local_res10;
  uVar17 = sVar4 + 1;
  psVar19 = local_60;
  psVar13 = local_res10;
  if ((local_res10[1] < uVar17) && (uVar1 = local_res10[1] + uVar17, local_res10[1] < uVar1)) {
    sVar5 = *local_res10;
    if (uVar1 == 0) {
      psVar13 = &DAT_14032f048;
    }
    else {
      auVar8._8_8_ = 0;
      auVar8._0_8_ = uVar1 + 0x1b >> 2;
      _Var12 = SUB168(ZEXT816(4) * auVar8,0);
      if (SUB168(ZEXT816(4) * auVar8,8) != 0) {
        _Var12 = 0xffffffffffffffff;
      }
      psVar13 = operator_new(_Var12);
      *psVar13 = sVar5;
      *(undefined1 *)((longlong)psVar13 + sVar5 + 0x10) = 0;
      psVar13[1] = uVar1;
      local_50 = psVar13;
    }
    memcpy(psVar13 + 2,local_res10 + 2,*local_res10);
    psVar19 = local_50;
    if (local_res10 != &DAT_14032f048) {
      operator_delete__(local_60);
    }
  }
  memmove((void *)(*psVar13 + 0x10 + (longlong)psVar13),&DAT_140295748,1);
  *psVar13 = uVar17;
  *(undefined1 *)(sVar4 + 0x11 + (longlong)psVar13) = 0;
  while( true ) {
    if (*pcVar9 == '\0') {
      if (psVar13 != &DAT_14032f048) {
        operator_delete__(psVar19);
        return pcVar9;
      }
      return pcVar9;
    }
    pcVar14 = (char *)FUN_14014c800(pcVar9,param_4);
    if ((pcVar14 == (char *)0x0) || (cVar2 = *pcVar14, cVar2 == '\0')) {
      if (lVar10 != 0) {
        FUN_14014d200(lVar10,7,pcVar9,param_3,param_4);
      }
      goto LAB_14014da54;
    }
    if (cVar2 == '/') {
      if (pcVar14[1] == '>') {
        if (psVar13 != &DAT_14032f048) {
          operator_delete__(psVar19);
        }
        return pcVar14 + 2;
      }
      if (lVar10 != 0) {
        FUN_14014d200(lVar10,8,pcVar14 + 1,param_3,param_4);
      }
      goto LAB_14014da54;
    }
    if (cVar2 == '>') break;
    plVar15 = operator_new(0x50);
    if (plVar15 == (longlong *)0x0) {
      if (lVar10 != 0) {
        FUN_14014d200(lVar10,3,pcVar9,param_3,param_4);
      }
      goto LAB_14014da54;
    }
    *(undefined4 *)((longlong)plVar15 + 0xc) = 0xffffffff;
    *(undefined4 *)(plVar15 + 1) = 0xffffffff;
    plVar15[2] = 0;
    *plVar15 = (longlong)TiXmlAttribute::vftable;
    plVar15[4] = (longlong)&DAT_14032f048;
    plVar15[6] = (longlong)&DAT_14032f048;
    plVar15[9] = 0;
    plVar15[8] = 0;
    plVar15[3] = lVar10;
    pcVar9 = (char *)(**(code **)(*plVar15 + 0x10))(plVar15,pcVar14,param_3,param_4);
    if ((pcVar9 == (char *)0x0) || (*pcVar9 == '\0')) {
      if (lVar10 != 0) {
        FUN_14014d200(lVar10,4,pcVar14,param_3,param_4);
      }
      (**(code **)*plVar15)(plVar15,1);
      goto LAB_14014da54;
    }
    for (plVar6 = (longlong *)param_1[0x14]; plVar6 != param_1 + 0xb; plVar6 = (longlong *)plVar6[9]
        ) {
      pcVar14 = (char *)(plVar6[4] + 0x10);
      lVar18 = (plVar15[4] + 0x10) - (longlong)pcVar14;
      do {
        cVar2 = *pcVar14;
        cVar3 = pcVar14[lVar18];
        if (cVar2 != cVar3) break;
        pcVar14 = pcVar14 + 1;
      } while (cVar3 != '\0');
      if (cVar2 == cVar3) {
        if (plVar6 != (longlong *)0x0) {
          uVar17 = 0xffffffffffffffff;
          pcVar9 = (char *)(plVar15[6] + 0x10);
          goto code_r0x00014014da34;
        }
        break;
      }
    }
    plVar15[9] = (longlong)(param_1 + 0xb);
    plVar15[8] = param_1[0x13];
    *(longlong **)(param_1[0x13] + 0x48) = plVar15;
    param_1[0x13] = (longlong)plVar15;
  }
  pcVar9 = (char *)FUN_14014dc70(param_1,pcVar14 + 1,param_3,param_4);
  if ((pcVar9 == (char *)0x0) || (*pcVar9 == '\0')) {
    if (lVar10 != 0) {
      FUN_14014d200(lVar10,9,pcVar9,param_3,param_4);
    }
  }
  else {
    psVar16 = psVar13 + 2;
    lVar18 = (longlong)pcVar9 - (longlong)psVar16;
    do {
      if ((char)*psVar16 == '\0') goto LAB_14014db29;
    } while ((*(char *)(lVar18 + (longlong)psVar16) == (char)*psVar16) &&
            (psVar16 = (size_t *)((longlong)psVar16 + 1),
            *(char *)(lVar18 + (longlong)psVar16) != '\0'));
    if ((char)*psVar16 == '\0') {
LAB_14014db29:
      sVar4 = *psVar13;
      if (psVar13 != &DAT_14032f048) {
        operator_delete__(psVar19);
        return pcVar9 + sVar4;
      }
      return pcVar9 + sVar4;
    }
    if (lVar10 != 0) {
      FUN_14014d200(lVar10,9,pcVar9,param_3,param_4);
    }
  }
  goto LAB_14014da54;
  while( true ) {
    uVar17 = uVar17 - 1;
    cVar2 = *pcVar9;
    pcVar9 = pcVar9 + 1;
    if (cVar2 == '\0') break;
code_r0x00014014da34:
    if (uVar17 == 0) break;
  }
  FUN_14014c3f0(plVar6 + 6,(char *)(plVar15[6] + 0x10),~uVar17 - 1);
  (**(code **)*plVar15)(plVar15,1);
LAB_14014da54:
  if (psVar13 != &DAT_14032f048) {
    operator_delete__(psVar19);
  }
  return (char *)0x0;
}



char * FUN_14014dc70(longlong *param_1,char *param_2,undefined8 param_3,undefined4 param_4)

{
  char cVar1;
  byte bVar2;
  int iVar3;
  longlong lVar4;
  char *pcVar5;
  longlong *plVar6;
  char *pcVar7;
  longlong *plVar8;
  ulonglong uVar9;
  longlong *plVar10;
  
  for (plVar10 = param_1; plVar10 != (longlong *)0x0; plVar10 = (longlong *)plVar10[3]) {
    lVar4 = (**(code **)(*plVar10 + 0x20))(plVar10);
    if (lVar4 != 0) {
      lVar4 = (**(code **)(*plVar10 + 0x20))(plVar10);
      goto LAB_14014dcdd;
    }
  }
  lVar4 = 0;
LAB_14014dcdd:
  pcVar5 = (char *)FUN_14014c800(param_2,param_4);
  while (pcVar5 != (char *)0x0) {
    plVar10 = (longlong *)0x0;
    if (*pcVar5 == '\0') {
      return pcVar5;
    }
    if (*pcVar5 == '<') {
      pcVar7 = "</";
      do {
        if (*pcVar7 == '\0') {
          return pcVar5;
        }
      } while (((pcVar5 + -0x140295818)[(longlong)pcVar7] == *pcVar7) &&
              (pcVar7 = pcVar7 + 1, (pcVar5 + -0x140295818)[(longlong)pcVar7] != '\0'));
      if (*pcVar7 == '\0') {
        return pcVar5;
      }
      plVar8 = (longlong *)FUN_14014d2a0(param_1,pcVar5,param_4);
      if (plVar8 == (longlong *)0x0) {
        return (char *)0x0;
      }
      param_2 = (char *)(**(code **)(*plVar8 + 0x10))(plVar8,pcVar5,param_3,param_4);
LAB_14014de60:
      FUN_140149f20(param_1,plVar8);
    }
    else {
      plVar6 = operator_new(0x60);
      plVar8 = plVar10;
      if (plVar6 != (longlong *)0x0) {
        plVar6[1] = -1;
        plVar6[2] = 0;
        plVar6[7] = (longlong)&DAT_14032f048;
        plVar6[3] = 0;
        *(undefined4 *)(plVar6 + 4) = 4;
        plVar6[5] = 0;
        plVar6[6] = 0;
        plVar6[9] = 0;
        plVar6[10] = 0;
        *plVar6 = (longlong)TiXmlText::vftable;
        FUN_14014c3f0(plVar6 + 7,&DAT_140281f00,0);
        *(undefined1 *)(plVar6 + 0xb) = 0;
        plVar8 = plVar6;
      }
      if (plVar8 == (longlong *)0x0) {
        if (lVar4 == 0) {
          return (char *)0x0;
        }
        if (*(char *)(lVar4 + 0x58) != '\0') {
          return (char *)0x0;
        }
        *(undefined1 *)(lVar4 + 0x58) = 1;
        *(undefined4 *)(lVar4 + 0x5c) = 3;
        uVar9 = 0xffffffffffffffff;
        pcVar5 = PTR_s_Memory_allocation_failed__140325ad8;
        goto code_r0x00014014dea8;
      }
      if (DAT_140325ab8 == '\0') {
        pcVar5 = param_2;
      }
      param_2 = (char *)(**(code **)(*plVar8 + 0x10))(plVar8,pcVar5,param_3,param_4);
      plVar6 = (longlong *)plVar8[7];
      if (*plVar6 != 0) {
        do {
          bVar2 = *(byte *)((longlong)(plVar6 + 2) + (longlong)plVar10);
          iVar3 = isspace((uint)bVar2);
          if (((iVar3 == 0) && (bVar2 != 10)) && (bVar2 != 0xd)) goto LAB_14014de60;
          plVar10 = (longlong *)(ulonglong)((int)plVar10 + 1);
          plVar6 = (longlong *)plVar8[7];
        } while (plVar10 < (longlong *)*plVar6);
      }
      (**(code **)*plVar8)(plVar8,1);
    }
    pcVar5 = (char *)FUN_14014c800(param_2,param_4);
  }
  if ((lVar4 != 0) && (*(char *)(lVar4 + 0x58) == '\0')) {
    *(undefined1 *)(lVar4 + 0x58) = 1;
    *(undefined4 *)(lVar4 + 0x5c) = 6;
    uVar9 = 0xffffffffffffffff;
    pcVar5 = PTR_s_Error_reading_Element_value__140325af0;
    do {
      if (uVar9 == 0) break;
      uVar9 = uVar9 - 1;
      cVar1 = *pcVar5;
      pcVar5 = pcVar5 + 1;
    } while (cVar1 != '\0');
    FUN_14014c3f0(lVar4 + 0x60,PTR_s_Error_reading_Element_value__140325af0,~uVar9 - 1);
    *(undefined8 *)(lVar4 + 0x74) = 0xffffffffffffffff;
  }
  return (char *)0x0;
  while( true ) {
    uVar9 = uVar9 - 1;
    cVar1 = *pcVar5;
    pcVar5 = pcVar5 + 1;
    if (cVar1 == '\0') break;
code_r0x00014014dea8:
    if (uVar9 == 0) break;
  }
  FUN_14014c3f0(lVar4 + 0x60,PTR_s_Memory_allocation_failed__140325ad8,~uVar9 - 1);
  *(undefined8 *)(lVar4 + 0x74) = 0xffffffffffffffff;
  return (char *)0x0;
}



char * FUN_14014df30(longlong *param_1,undefined8 param_2,longlong *param_3,undefined4 param_4)

{
  char cVar1;
  longlong *plVar2;
  longlong lVar3;
  char *pcVar4;
  ulonglong uVar5;
  char *pcVar6;
  char local_res8 [8];
  
  for (plVar2 = param_1; plVar2 != (longlong *)0x0; plVar2 = (longlong *)plVar2[3]) {
    lVar3 = (**(code **)(*plVar2 + 0x20))(plVar2);
    if (lVar3 != 0) {
      lVar3 = (**(code **)(*plVar2 + 0x20))(plVar2);
      goto LAB_14014df7d;
    }
  }
  lVar3 = 0;
LAB_14014df7d:
  pcVar4 = (char *)FUN_14014c800(param_2,param_4);
  if (param_3 != (longlong *)0x0) {
    FUN_14014c6b0(param_3,pcVar4,param_4);
    param_1[1] = *param_3;
  }
  if (((pcVar4 == (char *)0x0) || (*pcVar4 == '\0')) || (*pcVar4 != '<')) {
    if ((lVar3 != 0) && (*(char *)(lVar3 + 0x58) == '\0')) {
      uVar5 = 0xffffffffffffffff;
      *(undefined1 *)(lVar3 + 0x58) = 1;
      *(undefined4 *)(lVar3 + 0x5c) = 10;
      pcVar6 = PTR_s_Error_parsing_Unknown__140325b10;
      do {
        if (uVar5 == 0) break;
        uVar5 = uVar5 - 1;
        cVar1 = *pcVar6;
        pcVar6 = pcVar6 + 1;
      } while (cVar1 != '\0');
      FUN_14014c3f0(lVar3 + 0x60,PTR_s_Error_parsing_Unknown__140325b10,~uVar5 - 1);
      *(undefined8 *)(lVar3 + 0x74) = 0xffffffffffffffff;
      if ((pcVar4 != (char *)0x0) && (param_3 != (longlong *)0x0)) {
        FUN_14014c6b0(param_3,pcVar4,param_4);
        *(longlong *)(lVar3 + 0x74) = *param_3;
      }
    }
    pcVar4 = (char *)0x0;
  }
  else {
    FUN_14014c3f0(param_1 + 7,&DAT_140281f00,0);
    while (pcVar4 = pcVar4 + 1, pcVar4 != (char *)0x0) {
      local_res8[0] = *pcVar4;
      if (local_res8[0] == '\0') goto LAB_14014e094;
      if (local_res8[0] == '>') goto LAB_14014e099;
      plVar2 = (longlong *)param_1[7];
      uVar5 = *plVar2 + 1;
      if (((ulonglong)plVar2[1] < uVar5) && ((ulonglong)plVar2[1] < plVar2[1] + uVar5)) {
        FUN_14014c320(param_1 + 7);
      }
      memmove((void *)(param_1[7] + *(longlong *)param_1[7] + 0x10),local_res8,1);
      *(ulonglong *)param_1[7] = uVar5;
      *(undefined1 *)(param_1[7] + 0x10 + uVar5) = 0;
    }
    if ((lVar3 != 0) && (*(char *)(lVar3 + 0x58) == '\0')) {
      uVar5 = 0xffffffffffffffff;
      *(undefined1 *)(lVar3 + 0x58) = 1;
      *(undefined4 *)(lVar3 + 0x5c) = 10;
      pcVar6 = PTR_s_Error_parsing_Unknown__140325b10;
      do {
        if (uVar5 == 0) break;
        uVar5 = uVar5 - 1;
        cVar1 = *pcVar6;
        pcVar6 = pcVar6 + 1;
      } while (cVar1 != '\0');
      FUN_14014c3f0(lVar3 + 0x60,PTR_s_Error_parsing_Unknown__140325b10,~uVar5 - 1);
      *(undefined8 *)(lVar3 + 0x74) = 0xffffffffffffffff;
    }
LAB_14014e094:
    if (*pcVar4 == '>') {
LAB_14014e099:
      pcVar4 = pcVar4 + 1;
    }
  }
  return pcVar4;
}



char * FUN_14014e130(longlong *param_1,undefined8 param_2,longlong *param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong lVar3;
  char *pcVar4;
  char *pcVar5;
  undefined8 uVar6;
  char *pcVar7;
  ulonglong uVar8;
  
  for (plVar1 = param_1; plVar1 != (longlong *)0x0; plVar1 = (longlong *)plVar1[3]) {
    lVar3 = (**(code **)(*plVar1 + 0x20))(plVar1);
    if (lVar3 != 0) {
      uVar6 = (**(code **)(*plVar1 + 0x20))(plVar1);
      goto LAB_14014e17d;
    }
  }
  uVar6 = 0;
LAB_14014e17d:
  plVar1 = param_1 + 7;
  FUN_14014c3f0(plVar1,&DAT_140281f00,0);
  pcVar4 = (char *)FUN_14014c800(param_2,param_4);
  if (param_3 != (longlong *)0x0) {
    FUN_14014c6b0(param_3,pcVar4,param_4);
    param_1[1] = *param_3;
  }
  pcVar7 = "<!--";
  if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {
    do {
      if (*pcVar7 == '\0') goto LAB_14014e200;
    } while (((pcVar4 + -0x140295830)[(longlong)pcVar7] == *pcVar7) &&
            (pcVar7 = pcVar7 + 1, (pcVar4 + -0x140295830)[(longlong)pcVar7] != '\0'));
    if (*pcVar7 == '\0') {
LAB_14014e200:
      FUN_14014c3f0(plVar1,&DAT_140281f00,0);
      pcVar7 = pcVar4 + 4;
      if (pcVar7 == (char *)0x0) {
        return (char *)0x0;
      }
      pcVar4 = pcVar4 + -0x140295834;
      while (*pcVar7 != '\0') {
        pcVar5 = "-->";
        do {
          if (*pcVar5 == '\0') goto LAB_14014e2d0;
        } while ((pcVar4[(longlong)pcVar5] == *pcVar5) &&
                (pcVar5 = pcVar5 + 1, pcVar4[(longlong)pcVar5] != '\0'));
        if (*pcVar5 == '\0') break;
        plVar2 = (longlong *)*plVar1;
        lVar3 = *plVar2;
        uVar8 = lVar3 + 1;
        if (((ulonglong)plVar2[1] < uVar8) && ((ulonglong)plVar2[1] < plVar2[1] + uVar8)) {
          FUN_14014c320(plVar1);
        }
        memmove((void *)(*(longlong *)*plVar1 + 0x10 + *plVar1),pcVar7,1);
        pcVar4 = pcVar4 + 1;
        pcVar7 = pcVar7 + 1;
        *(ulonglong *)*plVar1 = uVar8;
        *(undefined1 *)(lVar3 + 0x11 + *plVar1) = 0;
        if (pcVar7 == (char *)0x0) {
          return (char *)0x0;
        }
      }
LAB_14014e2d0:
      return pcVar7 + 3;
    }
  }
  FUN_14014d200(uVar6,0xb,pcVar4,param_3,param_4);
  return (char *)0x0;
}



char * FUN_14014e310(longlong param_1,undefined8 param_2,undefined8 *param_3,undefined4 param_4)

{
  char cVar1;
  char *pcVar2;
  char *pcVar3;
  undefined *puVar4;
  
  pcVar2 = (char *)FUN_14014c800(param_2,param_4);
  if ((pcVar2 != (char *)0x0) && (*pcVar2 != '\0')) {
    if (param_3 != (undefined8 *)0x0) {
      FUN_14014c6b0(param_3,pcVar2,param_4);
      *(undefined8 *)(param_1 + 8) = *param_3;
    }
    pcVar3 = (char *)FUN_14014c8e0(pcVar2,param_1 + 0x20);
    if ((pcVar3 != (char *)0x0) && (*pcVar3 != '\0')) {
      pcVar2 = (char *)FUN_14014c800(pcVar3,param_4);
      if ((pcVar2 == (char *)0x0) || ((*pcVar2 == '\0' || (*pcVar2 != '=')))) {
        if (*(longlong *)(param_1 + 0x18) != 0) {
          FUN_14014d200(*(longlong *)(param_1 + 0x18),7,pcVar2,param_3,param_4);
        }
        return (char *)0x0;
      }
      pcVar2 = (char *)FUN_14014c800(pcVar2 + 1,param_4);
      if ((pcVar2 != (char *)0x0) && (cVar1 = *pcVar2, cVar1 != '\0')) {
        if (cVar1 == '\'') {
          puVar4 = &DAT_140295774;
        }
        else {
          if (cVar1 != '\"') {
            FUN_14014c3f0(param_1 + 0x30,&DAT_140281f00,0);
            while( true ) {
              if (*pcVar2 == '\0') {
                return pcVar2;
              }
              cVar1 = FUN_14014c570();
              if (cVar1 != '\0') {
                return pcVar2;
              }
              cVar1 = *pcVar2;
              if (cVar1 == '\n') {
                return pcVar2;
              }
              if (cVar1 == '\r') break;
              if (cVar1 == '/') {
                return pcVar2;
              }
              if (cVar1 == '>') {
                return pcVar2;
              }
              if ((cVar1 == '\'') || (cVar1 == '\"')) {
                if (*(longlong *)(param_1 + 0x18) != 0) {
                  FUN_14014d200(*(longlong *)(param_1 + 0x18),7,pcVar2,param_3,param_4);
                }
                return (char *)0x0;
              }
              FUN_140149700(param_1 + 0x30);
              pcVar2 = pcVar2 + 1;
              if (pcVar2 == (char *)0x0) {
                return (char *)0x0;
              }
            }
            return pcVar2;
          }
          puVar4 = &DAT_140295764;
        }
        pcVar2 = (char *)FUN_14014cc60(pcVar2 + 1,param_1 + 0x30,0,puVar4,param_4);
        return pcVar2;
      }
    }
    if (*(longlong *)(param_1 + 0x18) != 0) {
      FUN_14014d200(*(longlong *)(param_1 + 0x18),7,pcVar2,param_3,param_4);
    }
  }
  return (char *)0x0;
}



longlong FUN_14014e500(longlong *param_1,char *param_2,longlong *param_3,undefined4 param_4)

{
  longlong *plVar1;
  char cVar2;
  longlong *plVar3;
  longlong lVar4;
  undefined8 uVar5;
  char *pcVar6;
  char *pcVar7;
  ulonglong uVar8;
  char local_res8 [8];
  undefined8 *local_30;
  void *local_28;
  
  plVar1 = param_1 + 7;
  FUN_14014c3f0(plVar1,&DAT_140281f00,0);
  for (plVar3 = param_1; plVar3 != (longlong *)0x0; plVar3 = (longlong *)plVar3[3]) {
    lVar4 = (**(code **)(*plVar3 + 0x20))(plVar3);
    if (lVar4 != 0) {
      uVar5 = (**(code **)(*plVar3 + 0x20))(plVar3);
      goto LAB_14014e579;
    }
  }
  uVar5 = 0;
LAB_14014e579:
  if (param_3 != (longlong *)0x0) {
    FUN_14014c6b0(param_3,param_2,param_4);
    param_1[1] = *param_3;
  }
  pcVar6 = "<![CDATA[";
  if ((char)param_1[0xb] == '\0') {
    pcVar7 = "<![CDATA[";
    if ((param_2 != (char *)0x0) && (*param_2 != '\0')) {
      do {
        if (*pcVar7 == '\0') goto LAB_14014e5fb;
      } while (((param_2 + -0x140295820)[(longlong)pcVar7] == *pcVar7) &&
              (pcVar7 = pcVar7 + 1, (param_2 + -0x140295820)[(longlong)pcVar7] != '\0'));
      if (*pcVar7 == '\0') goto LAB_14014e5fb;
    }
    lVar4 = FUN_14014cc60(param_2,plVar1,1,&DAT_140295814,param_4);
    if (lVar4 != 0) {
      return lVar4 + -1;
    }
  }
  else {
LAB_14014e5fb:
    *(undefined1 *)(param_1 + 0xb) = 1;
    if ((param_2 != (char *)0x0) && (*param_2 != '\0')) {
      do {
        if (*pcVar6 == '\0') goto LAB_14014e635;
      } while (((param_2 + -0x140295820)[(longlong)pcVar6] == *pcVar6) &&
              (pcVar6 = pcVar6 + 1, (param_2 + -0x140295820)[(longlong)pcVar6] != '\0'));
      if (*pcVar6 == '\0') {
LAB_14014e635:
        pcVar6 = param_2 + 9;
        if (pcVar6 != (char *)0x0) {
          param_2 = param_2 + -0x140295823;
          while (cVar2 = *pcVar6, cVar2 != '\0') {
            pcVar7 = "]]>";
            do {
              if (*pcVar7 == '\0') goto LAB_14014e6dc;
            } while ((param_2[(longlong)pcVar7] == *pcVar7) &&
                    (pcVar7 = pcVar7 + 1, param_2[(longlong)pcVar7] != '\0'));
            if (*pcVar7 == '\0') break;
            plVar3 = (longlong *)*plVar1;
            uVar8 = *plVar3 + 1;
            local_res8[0] = cVar2;
            if (((ulonglong)plVar3[1] < uVar8) && ((ulonglong)plVar3[1] < plVar3[1] + uVar8)) {
              FUN_14014c320(plVar1);
            }
            memmove((void *)(*plVar1 + *(longlong *)*plVar1 + 0x10),local_res8,1);
            *(ulonglong *)*plVar1 = uVar8;
            *(undefined1 *)(*plVar1 + 0x10 + uVar8) = 0;
            param_2 = param_2 + 1;
            pcVar6 = pcVar6 + 1;
            if (pcVar6 == (char *)0x0) break;
          }
        }
LAB_14014e6dc:
        local_30 = &DAT_14032f048;
        lVar4 = FUN_14014cc60(pcVar6,&local_30,0,&DAT_14029582c,param_4);
        if (local_30 == &DAT_14032f048) {
          return lVar4;
        }
        operator_delete__(local_28);
        return lVar4;
      }
    }
    FUN_14014d200(uVar5,0xf,param_2,param_3,param_4);
  }
  return 0;
}



byte * FUN_14014e750(longlong *param_1,undefined8 param_2,longlong *param_3,int param_4)

{
  char cVar1;
  byte bVar2;
  longlong *plVar3;
  int iVar4;
  char *pcVar5;
  longlong lVar6;
  ulonglong uVar7;
  int iVar8;
  undefined8 *puVar9;
  char *pcVar10;
  byte *pbVar11;
  undefined **local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 local_70;
  undefined8 *local_68;
  void *local_60;
  undefined8 *local_58;
  void *local_50;
  undefined8 local_48;
  undefined8 local_40;
  
  pcVar5 = (char *)FUN_14014c800(param_2,param_4);
  for (plVar3 = param_1; plVar3 != (longlong *)0x0; plVar3 = (longlong *)plVar3[3]) {
    lVar6 = (**(code **)(*plVar3 + 0x20))();
    if (lVar6 != 0) {
      lVar6 = (**(code **)(*plVar3 + 0x20))();
      goto LAB_14014e7ca;
    }
  }
  lVar6 = 0;
LAB_14014e7ca:
  if ((pcVar5 != (char *)0x0) && (*pcVar5 != '\0')) {
    pcVar10 = "<?xml";
    do {
      if (*pcVar10 == '\0') goto LAB_14014e83f;
      iVar8 = (int)(pcVar5 + -0x140295c28)[(longlong)pcVar10];
      if ((param_4 != 1) || (iVar8 < 0x80)) {
        iVar8 = tolower(iVar8);
      }
      iVar4 = (int)*pcVar10;
      if ((param_4 != 1) || (iVar4 < 0x80)) {
        iVar4 = tolower(iVar4);
      }
    } while ((iVar8 == iVar4) &&
            (pcVar10 = pcVar10 + 1, (pcVar5 + -0x140295c28)[(longlong)pcVar10] != '\0'));
    if (*pcVar10 == '\0') {
LAB_14014e83f:
      if (param_3 != (longlong *)0x0) {
        FUN_14014c6b0(param_3,pcVar5,param_4);
        param_1[1] = *param_3;
      }
      FUN_14014c3f0(param_1 + 0xb,&DAT_140281f00,0);
      FUN_14014c3f0(param_1 + 0xd,&DAT_140281f00,0);
      FUN_14014c3f0(param_1 + 0xf,&DAT_140281f00,0);
      pbVar11 = (byte *)(pcVar5 + 5);
      do {
        while( true ) {
          if (pbVar11 == (byte *)0x0) {
            return (byte *)0x0;
          }
          pcVar5 = "version";
          if (*pbVar11 == 0) {
            return (byte *)0x0;
          }
          if (*pbVar11 == 0x3e) {
            return pbVar11 + 1;
          }
          pbVar11 = (byte *)FUN_14014c800(pbVar11,param_4);
          if ((pbVar11 == (byte *)0x0) || (*pbVar11 == 0)) break;
          do {
            if (*pcVar5 == '\0') goto LAB_14014e95c;
            iVar8 = (int)(char)(pbVar11 + -0x140295c38)[(longlong)pcVar5];
            if ((param_4 != 1) || (iVar8 < 0x80)) {
              iVar8 = tolower(iVar8);
            }
            iVar4 = (int)*pcVar5;
            if ((param_4 != 1) || (iVar4 < 0x80)) {
              iVar4 = tolower(iVar4);
            }
          } while ((iVar8 == iVar4) &&
                  (pcVar5 = pcVar5 + 1, (pbVar11 + -0x140295c38)[(longlong)pcVar5] != 0));
          if (*pcVar5 != '\0') break;
LAB_14014e95c:
          local_80 = 0xffffffffffffffff;
          local_78 = 0;
          local_88 = TiXmlAttribute::vftable;
          local_68 = &DAT_14032f048;
          local_58 = &DAT_14032f048;
          local_70 = 0;
          local_40 = 0;
          local_48 = 0;
          pbVar11 = (byte *)FUN_14014e310(&local_88,pbVar11,param_3,param_4);
          puVar9 = local_58;
          uVar7 = 0xffffffffffffffff;
          pcVar5 = (char *)(local_58 + 2);
          do {
            if (uVar7 == 0) break;
            uVar7 = uVar7 - 1;
            cVar1 = *pcVar5;
            pcVar5 = pcVar5 + 1;
          } while (cVar1 != '\0');
          FUN_14014c3f0(param_1 + 0xb,local_58 + 2,~uVar7 - 1);
LAB_14014ebc4:
          if (puVar9 != &DAT_14032f048) {
            operator_delete__(local_50);
          }
          if (local_68 != &DAT_14032f048) {
            operator_delete__(local_60);
          }
        }
        pcVar5 = "encoding";
        if ((pbVar11 != (byte *)0x0) && (*pbVar11 != 0)) {
          do {
            if (*pcVar5 == '\0') goto LAB_14014ea3b;
            iVar8 = (int)pcVar5[(longlong)(pbVar11 + -0x140295c40)];
            if ((param_4 != 1) || (iVar8 < 0x80)) {
              iVar8 = tolower(iVar8);
            }
            iVar4 = (int)*pcVar5;
            if ((param_4 != 1) || (iVar4 < 0x80)) {
              iVar4 = tolower(iVar4);
            }
          } while ((iVar8 == iVar4) &&
                  (pcVar5 = pcVar5 + 1, pcVar5[(longlong)(pbVar11 + -0x140295c40)] != '\0'));
          if (*pcVar5 == '\0') {
LAB_14014ea3b:
            local_80 = 0xffffffffffffffff;
            local_78 = 0;
            local_88 = TiXmlAttribute::vftable;
            local_68 = &DAT_14032f048;
            local_58 = &DAT_14032f048;
            local_70 = 0;
            local_40 = 0;
            local_48 = 0;
            pbVar11 = (byte *)FUN_14014e310(&local_88,pbVar11,param_3,param_4);
            puVar9 = local_58;
            uVar7 = 0xffffffffffffffff;
            pcVar5 = (char *)(local_58 + 2);
            do {
              if (uVar7 == 0) break;
              uVar7 = uVar7 - 1;
              cVar1 = *pcVar5;
              pcVar5 = pcVar5 + 1;
            } while (cVar1 != '\0');
            FUN_14014c3f0(param_1 + 0xd,local_58 + 2,~uVar7 - 1);
            goto LAB_14014ebc4;
          }
        }
        pcVar5 = "standalone";
        if (pbVar11 == (byte *)0x0) {
          return (byte *)0x0;
        }
        if (*pbVar11 != 0) {
          do {
            if (*pcVar5 == '\0') goto LAB_14014eb1b;
            iVar8 = (int)pcVar5[(longlong)(pbVar11 + -0x140295c50)];
            if ((param_4 != 1) || (iVar8 < 0x80)) {
              iVar8 = tolower(iVar8);
            }
            iVar4 = (int)*pcVar5;
            if ((param_4 != 1) || (iVar4 < 0x80)) {
              iVar4 = tolower(iVar4);
            }
          } while ((iVar8 == iVar4) &&
                  (pcVar5 = pcVar5 + 1, pcVar5[(longlong)(pbVar11 + -0x140295c50)] != '\0'));
          if (*pcVar5 == '\0') {
LAB_14014eb1b:
            local_80 = 0xffffffffffffffff;
            local_78 = 0;
            local_88 = TiXmlAttribute::vftable;
            local_68 = &DAT_14032f048;
            local_58 = &DAT_14032f048;
            local_70 = 0;
            local_40 = 0;
            local_48 = 0;
            pbVar11 = (byte *)FUN_14014e310(&local_88,pbVar11,param_3,param_4);
            puVar9 = local_58;
            uVar7 = 0xffffffffffffffff;
            pcVar5 = (char *)(local_58 + 2);
            do {
              if (uVar7 == 0) break;
              uVar7 = uVar7 - 1;
              cVar1 = *pcVar5;
              pcVar5 = pcVar5 + 1;
            } while (cVar1 != '\0');
            FUN_14014c3f0(param_1 + 0xf,local_58 + 2,~uVar7 - 1);
            goto LAB_14014ebc4;
          }
        }
        while ((((bVar2 = *pbVar11, bVar2 != 0 && (bVar2 != 0x3e)) &&
                (iVar8 = isspace((uint)bVar2), iVar8 == 0)) && ((bVar2 != 10 && (bVar2 != 0xd))))) {
          pbVar11 = pbVar11 + 1;
          if (pbVar11 == (byte *)0x0) {
            return (byte *)0x0;
          }
        }
      } while( true );
    }
  }
  if ((lVar6 != 0) && (*(char *)(lVar6 + 0x58) == '\0')) {
    *(undefined1 *)(lVar6 + 0x58) = 1;
    *(undefined4 *)(lVar6 + 0x5c) = 0xc;
    uVar7 = 0xffffffffffffffff;
    pcVar5 = PTR_s_Error_parsing_Declaration__140325b20;
    do {
      if (uVar7 == 0) break;
      uVar7 = uVar7 - 1;
      cVar1 = *pcVar5;
      pcVar5 = pcVar5 + 1;
    } while (cVar1 != '\0');
    FUN_14014c3f0(lVar6 + 0x60,PTR_s_Error_parsing_Declaration__140325b20,~uVar7 - 1);
    *(undefined8 *)(lVar6 + 0x74) = 0xffffffffffffffff;
  }
  return (byte *)0x0;
}



undefined8 FUN_14014ec70(void)

{
  return 0x8534;
}



undefined8 FUN_14014ec80(void)

{
  return 0x8541;
}



void * FUN_14014ec90(void *param_1,uint param_2)

{
  FUN_140156cd0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined1
FUN_14014ecc0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x8535);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,param_5[1]);
  FUN_14004fe70(local_30,param_5[2]);
  FUN_14004fbc0(local_30,*(undefined8 *)(param_5 + 4));
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"PT_SERVER_REGISTER",0x8535);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014edd0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x8535);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_14004fe70(local_30,param_6[1]);
  FUN_14004fe70(local_30,param_6[2]);
  FUN_14004fbc0(local_30,*(undefined8 *)(param_6 + 4));
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"PT_SERVER_REGISTER",0x8535);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014ef00(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,longlong *param_6)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x8536);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,param_5[1]);
  FUN_14004fe70(local_30,param_5[2]);
  FUN_14004fe70(local_30,param_5[6]);
  FUN_14004fe70(local_30,param_5[3]);
  FUN_14004fd90(local_30,*(undefined1 *)(param_5 + 7));
  FUN_14004fd90(local_30,*(undefined1 *)((longlong)param_5 + 0x1d));
  FUN_14004fbc0(local_30,*(undefined8 *)(param_5 + 4));
  FUN_14004fe70(local_30,param_6[1] - *param_6 >> 2);
  puVar2 = (undefined4 *)*param_6;
  if (puVar2 != (undefined4 *)param_6[1]) {
    do {
      FUN_14004fe70(local_30,*puVar2);
      puVar2 = puVar2 + 1;
    } while (puVar2 != (undefined4 *)param_6[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"PT_SERVER_INFORMATION",0x8536);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014f090(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,longlong *param_7)

{
  undefined1 uVar1;
  undefined4 *puVar2;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x8536);
  FUN_14004fe70(local_40,*param_5);
  FUN_14004fe70(local_40,*param_6);
  FUN_14004fe70(local_40,param_6[1]);
  FUN_14004fe70(local_40,param_6[2]);
  FUN_14004fe70(local_40,param_6[6]);
  FUN_14004fe70(local_40,param_6[3]);
  FUN_14004fd90(local_40,*(undefined1 *)(param_6 + 7));
  FUN_14004fd90(local_40,*(undefined1 *)((longlong)param_6 + 0x1d));
  FUN_14004fbc0(local_40,*(undefined8 *)(param_6 + 4));
  FUN_14004fe70(local_40,param_7[1] - *param_7 >> 2);
  puVar2 = (undefined4 *)*param_7;
  if (puVar2 != (undefined4 *)param_7[1]) {
    do {
      FUN_14004fe70(local_40,*puVar2);
      puVar2 = puVar2 + 1;
    } while (puVar2 != (undefined4 *)param_7[1]);
  }
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,L"PT_SERVER_INFORMATION",0x8536);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014f230(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined1 *param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x8537);
  FUN_14004fd90(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"PT_SERVER_COMMAND_RESULT",0x8537);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014f330(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined1 *param_5,undefined4 *param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x8537);
  FUN_14004fd90(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_14004fe70(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"PT_SERVER_COMMAND_RESULT",0x8537);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014f440(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined1 *param_5,undefined4 *param_6,undefined8 param_7)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x8538);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fd90(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_140155f20(local_30,param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"PWE_RESP_RESULT_CODE",0x8538);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014f550(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined1 *param_6,undefined4 *param_7,undefined8 param_8)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x8538);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fd90(local_30,*param_6);
  FUN_14004fe70(local_30,*param_7);
  FUN_140155f20(local_30,param_8);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"PWE_RESP_RESULT_CODE",0x8538);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_14014f670(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x8539);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"RESP_SERVER_LOCK",0x8539);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_14014f730(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x8539);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"RESP_SERVER_LOCK",0x8539);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014f800(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             undefined8 param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x853a);
  FUN_140155f20(local_30,param_4);
  FUN_140157600(local_30,param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"NOTIFY_STORAGE_ALARM",0x853a);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014f900(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x853a);
  FUN_140155f20(local_30,param_5);
  FUN_140157600(local_30,param_6);
  FUN_14004fe70(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"NOTIFY_STORAGE_ALARM",0x853a);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014fa00(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             undefined8 param_5,undefined8 param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x853b);
  FUN_140155f20(local_30,param_4);
  FUN_140155f20(local_30,param_5);
  FUN_140157600(local_30,param_6);
  FUN_14004fe70(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"NOTIFY_MAIL_ALARM",0x853b);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014fb10(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5,undefined8 param_6,undefined8 param_7,undefined4 *param_8)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x853b);
  FUN_140155f20(local_30,param_5);
  FUN_140155f20(local_30,param_6);
  FUN_140157600(local_30,param_7);
  FUN_14004fe70(local_30,*param_8);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"NOTIFY_MAIL_ALARM",0x853b);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014fc30(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x853c);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fcb0(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"REQ_STATISTICS",0x853c);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014fd20(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x853c);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fcb0(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"REQ_STATISTICS",0x853c);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014fe20(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x853d);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"PT_SERVER_STEP",0x853d);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014ff00(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x853d);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"PT_SERVER_STEP",0x853d);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14014ffe0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x853e);
  FUN_14004fe70(local_30,*param_4);
  FUN_140155f20(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"PT_MESSAGE",0x853e);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401500d0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x853e);
  FUN_14004fe70(local_30,*param_5);
  FUN_140155f20(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"PT_MESSAGE",0x853e);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401501c0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x853f);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"PT_BACKUP_CHARACTER_TABLE_COUNT",
                     0x853f);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401502a0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x853f);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"PT_BACKUP_CHARACTER_TABLE_COUNT",
                     0x853f);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140150380(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x8540);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,L"PT_BACKUP_CHARACTER_TABLE_END",0x8540)
  ;
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140150440(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x8540);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,L"PT_BACKUP_CHARACTER_TABLE_END",
                     0x8540);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

undefined8 FUN_140150510(longlong *param_1,int *param_2,undefined8 param_3)

{
  undefined4 **ppuVar1;
  undefined **ppuVar2;
  int *piVar3;
  int iVar4;
  wchar_t *pwVar5;
  undefined4 **ppuVar6;
  char cVar7;
  undefined4 uVar8;
  DWORD DVar9;
  DWORD DVar10;
  undefined4 **ppuVar11;
  undefined **ppuVar12;
  void *pvVar13;
  undefined8 uVar14;
  int iVar15;
  undefined4 *puVar16;
  undefined1 auStack_428 [32];
  undefined4 ***local_408;
  undefined ***local_400;
  undefined4 ***local_3f8;
  undefined4 *local_3e8;
  undefined4 local_3e0;
  undefined8 local_3dc;
  void *local_3d0;
  wchar_t *local_3c8;
  undefined8 local_3c0;
  undefined8 local_3b8;
  int local_3b0;
  undefined1 local_3a8 [4];
  undefined1 local_3a4 [4];
  undefined4 **local_3a0;
  undefined1 local_398;
  undefined **local_390;
  undefined1 local_388;
  undefined1 local_380 [8];
  undefined1 local_378 [4];
  int local_374;
  undefined8 local_340;
  undefined8 local_318;
  wchar_t *local_310;
  int local_308;
  undefined8 local_300;
  int local_2f8;
  undefined4 *local_2f0;
  undefined4 *local_2e8;
  undefined4 *local_2e0;
  undefined4 *local_2d8;
  undefined4 *local_2d0;
  undefined *local_2c8;
  undefined4 *local_2c0;
  undefined4 *local_2b8;
  undefined *local_2b0;
  undefined *local_2a8;
  undefined4 *local_2a0;
  undefined *local_298;
  undefined4 *local_290;
  undefined *local_288;
  undefined *local_280;
  undefined4 *local_278;
  undefined4 *local_270;
  undefined *local_268;
  undefined4 *local_260;
  undefined4 local_258 [2];
  undefined4 *local_250;
  undefined *local_248;
  undefined *local_240;
  undefined *local_238;
  undefined *local_230;
  undefined *local_228;
  undefined *local_220;
  undefined1 local_218 [8];
  undefined1 local_210 [8];
  undefined1 local_208 [8];
  undefined1 local_200 [8];
  undefined1 local_1f8 [8];
  undefined1 local_1f0 [8];
  undefined1 local_1e8 [8];
  undefined1 local_1e0 [8];
  undefined1 local_1d8 [8];
  undefined1 local_1d0 [8];
  undefined1 local_1c8 [8];
  undefined1 local_1c0 [8];
  undefined1 local_1b8 [8];
  undefined1 local_1b0 [8];
  undefined1 local_1a8 [8];
  undefined1 local_1a0 [8];
  undefined1 local_198 [8];
  undefined8 local_190;
  undefined1 local_188 [8];
  undefined1 local_180 [8];
  undefined1 local_178 [8];
  undefined1 local_170 [8];
  undefined1 local_168 [16];
  undefined8 local_158;
  undefined1 local_150 [264];
  ulonglong local_48;
  undefined4 *puVar17;
  
  local_190 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_428;
  iVar4 = param_2[10];
  if (iVar4 == 0) {
    FUN_1401c5a30(param_1,0);
  }
  iVar15 = *param_2;
  cVar7 = FUN_140154d80(param_2,local_258);
  if (cVar7 == '\0') {
switchD_1401505b4_default:
    FUN_1401540a0(param_2,(int)((iVar15 >> 0x1f & 7U) + iVar15) >> 3);
    uVar14 = 0;
  }
  else {
    local_340 = param_3;
    switch(local_258[0]) {
    case 0x84d1:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      puVar17 = (undefined4 *)0x0;
      puVar16 = (undefined4 *)0x0;
      local_3d0 = (void *)0x0;
      local_3c8 = (void *)0x0;
      local_3c0 = 0;
      FUN_1401538d0(param_2,&local_3d0);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PT_SERVER_OPTIONS");
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84d1,L"PT_SERVER_OPTIONS");
          goto LAB_14015097a;
        }
      }
      else {
        puVar16 = puVar17;
        if ((char)param_1[3] == '\0') {
          FUN_1401568c0();
          local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
          FUN_1401568c0();
          local_3a0 = (undefined4 **)PTR_DAT_1403200a0;
          FUN_14004ce50(&local_3a0,L"<Array %d>",((longlong)local_3c8 - (longlong)local_3d0) / 0xa0)
          ;
          FUN_14004cc50(&local_3e8,&local_3a0);
          ppuVar6 = local_3a0;
          if (((local_3a0 != (undefined4 **)0x0) && (local_3a0 != (undefined4 **)PTR_DAT_1403200a0))
             && (ppuVar1 = local_3a0 + -1, ppuVar1 != (undefined4 **)0x0)) {
            ppuVar11 = (undefined4 **)FUN_1401568c0();
            local_3a0 = ppuVar11;
            FUN_140156b50(ppuVar11);
            local_398 = 1;
            piVar3 = (int *)((longlong)ppuVar6 + -4);
            *piVar3 = *piVar3 + -1;
            if (*piVar3 == 0) {
              FUN_140156970(ppuVar1);
            }
            FUN_140156be0(ppuVar11);
          }
          FUN_14004f840(&local_3e8,&DAT_140286e98);
          puVar16 = local_3e8;
          iVar15 = 0;
          if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
            iVar15 = local_3e8[-2];
          }
          local_3a0 = (undefined4 **)FUN_1400457d0(&local_3e8,&local_240,iVar15 + -2);
          if (puVar16 == (undefined4 *)0x0) {
            puVar16 = (undefined4 *)PTR_DAT_1403200a0;
          }
          local_3e8 = puVar16;
          if (*local_3a0 != puVar16) {
            ppuVar12 = (undefined **)FUN_1401568c0();
            local_390 = ppuVar12;
            FUN_140156b50(ppuVar12);
            local_388 = 1;
            if (((puVar16 != (undefined4 *)0x0) && (puVar16 != (undefined4 *)PTR_DAT_1403200a0)) &&
               (puVar16 + -2 != (undefined4 *)0x0)) {
              uVar14 = FUN_1401568c0();
              local_318 = uVar14;
              FUN_140156b50(uVar14);
              local_310 = (wchar_t *)CONCAT71(local_310._1_7_,1);
              piVar3 = puVar16 + -1;
              *piVar3 = *piVar3 + -1;
              if (*piVar3 == 0) {
                FUN_140156970(puVar16 + -2);
              }
              FUN_140156be0(uVar14);
            }
            puVar16 = *local_3a0;
            if (((puVar16 != (undefined4 *)PTR_DAT_1403200a0) && (puVar16 != (undefined4 *)0x0)) &&
               (puVar16 != (undefined4 *)0x8)) {
              puVar16[-1] = puVar16[-1] + 1;
            }
            local_3e8 = puVar16;
            FUN_140156be0(ppuVar12);
          }
          if (((local_240 != (undefined *)0x0) && (local_240 != PTR_DAT_1403200a0)) &&
             (local_240 + -8 != (undefined *)0x0)) {
            uVar14 = FUN_1401568c0();
            local_318 = uVar14;
            FUN_140156b50(uVar14);
            local_310 = (wchar_t *)CONCAT71(local_310._1_7_,1);
            piVar3 = (int *)(local_240 + -4);
            *piVar3 = *piVar3 + -1;
            if (*piVar3 == 0) {
              FUN_140156970(local_240 + -8);
            }
            FUN_140156be0(uVar14);
          }
          local_3a0 = &local_2f0;
          local_240 = PTR_DAT_1403200a0;
          FUN_1401568c0();
          local_2f0 = (undefined4 *)PTR_DAT_1403200a0;
          if (PTR_DAT_1403200a0 == (undefined *)0x0) {
            local_2f0 = puVar17;
          }
          if (puVar16 != (undefined4 *)PTR_DAT_1403200a0) {
            uVar14 = FUN_1401568c0();
            local_318 = uVar14;
            FUN_140156b50(uVar14);
            local_310 = (wchar_t *)CONCAT71(local_310._1_7_,1);
            FUN_14004f990(&local_2f0);
            if (((puVar16 != (undefined4 *)PTR_DAT_1403200a0) && (puVar16 != (undefined4 *)0x0)) &&
               (puVar16 != (undefined4 *)0x8)) {
              puVar16[-1] = puVar16[-1] + 1;
            }
            local_2f0 = puVar16;
            FUN_140156be0(uVar14);
          }
          FUN_1401568c0();
          local_268 = PTR_DAT_1403200a0;
          uVar8 = FUN_140156740(L"PT_SERVER_OPTIONS");
          uVar14 = FUN_14004f760(&local_268,uVar8);
          FUN_140156770(uVar14,L"PT_SERVER_OPTIONS",uVar8);
          FUN_14004f380(&local_268);
          (**(code **)(*param_1 + 0x28))(param_1,0x84d1,&local_268,&local_2f0);
          local_408 = (undefined4 ***)puVar16;
          if (puVar16 == (undefined4 *)0x0) {
            local_408 = (undefined4 ***)PTR_DAT_1403200a0;
          }
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84d1,L"PT_SERVER_OPTIONS");
          if (((puVar16 != (undefined4 *)0x0) && (puVar16 != (undefined4 *)PTR_DAT_1403200a0)) &&
             (puVar16 + -2 != (undefined4 *)0x0)) {
            uVar14 = FUN_1401568c0();
            local_318 = uVar14;
            FUN_140156b50(uVar14);
            local_310 = (wchar_t *)CONCAT71(local_310._1_7_,1);
            piVar3 = puVar16 + -1;
            *piVar3 = *piVar3 + -1;
            if (*piVar3 == 0) {
              FUN_140156970(puVar16 + -2);
            }
            FUN_140156be0(uVar14);
          }
LAB_14015097a:
          puVar16 = puVar17;
          if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
            local_318 = CONCAT44(local_318._4_4_,0x84d1);
            local_310 = L"PT_SERVER_OPTIONS";
            local_308 = iVar4;
            local_300 = param_3;
            (**(code **)(*param_1 + 0x20))(param_1,&local_318);
            DVar9 = GetTickCount();
            puVar16 = (undefined4 *)(ulonglong)DVar9;
          }
        }
      }
      cVar7 = (**(code **)(*param_1 + 0x38))(param_1,iVar4,local_378,&local_3d0);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],L"PT_SERVER_OPTIONS");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_318 = CONCAT44(local_318._4_4_,0x84d1);
        local_310 = L"PT_SERVER_OPTIONS";
        local_308 = iVar4;
        local_300 = param_3;
        DVar9 = GetTickCount();
        local_2f8 = DVar9 - (int)puVar16;
        (**(code **)(*param_1 + 0x18))(param_1,&local_318);
      }
      pwVar5 = local_3c8;
      pvVar13 = local_3d0;
      if (local_3d0 != (void *)0x0) {
        for (; pvVar13 != pwVar5; pvVar13 = (void *)((longlong)pvVar13 + 0xa0)) {
          FUN_140145d50(pvVar13);
        }
        operator_delete(local_3d0);
      }
      break;
    case 0x84d2:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      FUN_1401543d0(param_2,&local_3e0,4);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PT_SERVER_COMMAND");
      DVar9 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84d2,L"PT_SERVER_COMMAND");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157840(&local_3e8,(undefined4 *)((longlong)&local_3dc + 4));
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        local_3a0 = (undefined4 **)FUN_1400457d0(&local_3e8,&local_220,iVar15 + -2);
        if (local_3e8 == (undefined4 *)0x0) {
          local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        }
        if (*local_3a0 != local_3e8) {
          uVar14 = FUN_1401568c0();
          local_318 = uVar14;
          FUN_140156b50(uVar14);
          puVar16 = local_3e8;
          local_310 = (wchar_t *)CONCAT71(local_310._1_7_,1);
          if (((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0))
             && (puVar17 = local_3e8 + -2, puVar17 != (undefined4 *)0x0)) {
            ppuVar12 = (undefined **)FUN_1401568c0();
            local_390 = ppuVar12;
            FUN_140156b50(ppuVar12);
            local_388 = 1;
            piVar3 = puVar16 + -1;
            *piVar3 = *piVar3 + -1;
            if (*piVar3 == 0) {
              FUN_140156970(puVar17);
            }
            FUN_140156be0(ppuVar12);
          }
          local_3e8 = *local_3a0;
          if (((local_3e8 != (undefined4 *)PTR_DAT_1403200a0) && (local_3e8 != (undefined4 *)0x0))
             && (local_3e8 != (undefined4 *)0x8)) {
            local_3e8[-1] = local_3e8[-1] + 1;
          }
          FUN_140156be0(uVar14);
        }
        if (((local_220 != (undefined *)0x0) && (local_220 != PTR_DAT_1403200a0)) &&
           (local_220 + -8 != (undefined *)0x0)) {
          uVar14 = FUN_1401568c0();
          local_318 = uVar14;
          FUN_140156b50(uVar14);
          local_310 = (wchar_t *)CONCAT71(local_310._1_7_,1);
          piVar3 = (int *)(local_220 + -4);
          *piVar3 = *piVar3 + -1;
          if (*piVar3 == 0) {
            FUN_140156970(local_220 + -8);
          }
          FUN_140156be0(uVar14);
        }
        local_3a0 = &local_2d8;
        local_220 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_2d8 = (undefined4 *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_2d8 = (undefined4 *)0x0;
        }
        if (local_3e8 != (undefined4 *)PTR_DAT_1403200a0) {
          uVar14 = FUN_1401568c0();
          local_318 = uVar14;
          FUN_140156b50(uVar14);
          local_310 = (wchar_t *)CONCAT71(local_310._1_7_,1);
          FUN_14004f990(&local_2d8);
          local_2d8 = local_3e8;
          if (((local_3e8 != (undefined4 *)PTR_DAT_1403200a0) && (local_3e8 != (undefined4 *)0x0))
             && (local_3e8 != (undefined4 *)0x8)) {
            local_3e8[-1] = local_3e8[-1] + 1;
          }
          FUN_140156be0(uVar14);
        }
        FUN_1401568c0();
        local_2c8 = PTR_DAT_1403200a0;
        uVar8 = FUN_140156740(L"PT_SERVER_COMMAND");
        uVar14 = FUN_14004f760(&local_2c8,uVar8);
        FUN_140156770(uVar14,L"PT_SERVER_COMMAND",uVar8);
        FUN_14004f380(&local_2c8);
        (**(code **)(*param_1 + 0x28))(param_1,0x84d2,&local_2c8,&local_2d8);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84d2,L"PT_SERVER_COMMAND");
        puVar16 = local_3e8;
        if (((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) &&
           (puVar17 = local_3e8 + -2, puVar17 != (undefined4 *)0x0)) {
          uVar14 = FUN_1401568c0();
          local_318 = uVar14;
          FUN_140156b50(uVar14);
          local_310 = (wchar_t *)CONCAT71(local_310._1_7_,1);
          piVar3 = puVar16 + -1;
          *piVar3 = *piVar3 + -1;
          if (*piVar3 == 0) {
            FUN_140156970(puVar17);
          }
          FUN_140156be0(uVar14);
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d2);
        local_3c8 = L"PT_SERVER_COMMAND";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      cVar7 = (**(code **)(*param_1 + 0x40))
                        (param_1,iVar4,local_378,(undefined4 *)((longlong)&local_3dc + 4));
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],L"PT_SERVER_COMMAND");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d2);
        local_3c8 = L"PT_SERVER_COMMAND";
LAB_140153789:
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        DVar10 = GetTickCount();
        local_3b0 = DVar10 - DVar9;
        (**(code **)(*param_1 + 0x18))(param_1,&local_3d0);
      }
      break;
    case 0x84d3:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      FUN_1401543d0(param_2,&local_3e0,4);
      FUN_1401543d0(param_2,&local_3e0,4);
      FUN_1401568c0();
      local_390 = (undefined **)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_390);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PT_SERVER_NOTICE");
      DVar9 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84d3,L"PT_SERVER_NOTICE");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157840(&local_3e8,&local_3dc);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157840(&local_3e8,(undefined4 *)((longlong)&local_3dc + 4));
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157b00(&local_3e8,&local_390);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        DVar10 = DVar9;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          DVar10 = local_3e8[-2];
        }
        local_3a0 = (undefined4 **)FUN_1400457d0(&local_3e8,&local_228,DVar10 - 2);
        if (local_3e8 == (undefined4 *)0x0) {
          local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        }
        if (*local_3a0 != local_3e8) {
          uVar14 = FUN_1401568c0();
          local_318 = uVar14;
          FUN_140156b50(uVar14);
          puVar16 = local_3e8;
          local_310 = (wchar_t *)CONCAT71(local_310._1_7_,1);
          if (((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0))
             && (puVar17 = local_3e8 + -2, puVar17 != (undefined4 *)0x0)) {
            pvVar13 = (void *)FUN_1401568c0();
            local_3d0 = pvVar13;
            FUN_140156b50(pvVar13);
            local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
            piVar3 = puVar16 + -1;
            *piVar3 = *piVar3 + -1;
            if (*piVar3 == 0) {
              FUN_140156970(puVar17);
            }
            FUN_140156be0(pvVar13);
          }
          local_3e8 = *local_3a0;
          if (((local_3e8 != (undefined4 *)PTR_DAT_1403200a0) && (local_3e8 != (undefined4 *)0x0))
             && (local_3e8 != (undefined4 *)0x8)) {
            local_3e8[-1] = local_3e8[-1] + 1;
          }
          FUN_140156be0(uVar14);
        }
        if (((local_228 != (undefined *)0x0) && (local_228 != PTR_DAT_1403200a0)) &&
           (local_228 + -8 != (undefined *)0x0)) {
          pvVar13 = (void *)FUN_1401568c0();
          local_3d0 = pvVar13;
          FUN_140156b50(pvVar13);
          local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
          piVar3 = (int *)(local_228 + -4);
          *piVar3 = *piVar3 + -1;
          if (*piVar3 == 0) {
            FUN_140156970(local_228 + -8);
          }
          FUN_140156be0(pvVar13);
        }
        local_3a0 = &local_2e8;
        local_228 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_2e8 = (undefined4 *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_2e8 = (undefined4 *)0x0;
        }
        if (local_3e8 != (undefined4 *)PTR_DAT_1403200a0) {
          pvVar13 = (void *)FUN_1401568c0();
          local_3d0 = pvVar13;
          FUN_140156b50(pvVar13);
          local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
          FUN_14004f990(&local_2e8);
          local_2e8 = local_3e8;
          if (((local_3e8 != (undefined4 *)PTR_DAT_1403200a0) && (local_3e8 != (undefined4 *)0x0))
             && (local_3e8 != (undefined4 *)0x8)) {
            local_3e8[-1] = local_3e8[-1] + 1;
          }
          FUN_140156be0(pvVar13);
        }
        FUN_1401568c0();
        local_248 = PTR_DAT_1403200a0;
        uVar8 = FUN_140156740(L"PT_SERVER_NOTICE");
        uVar14 = FUN_14004f760(&local_248,uVar8);
        FUN_140156770(uVar14,L"PT_SERVER_NOTICE",uVar8);
        FUN_14004f380(&local_248);
        (**(code **)(*param_1 + 0x28))(param_1,0x84d3,&local_248,&local_2e8);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84d3,L"PT_SERVER_NOTICE");
        puVar16 = local_3e8;
        if (((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) &&
           (puVar17 = local_3e8 + -2, puVar17 != (undefined4 *)0x0)) {
          pvVar13 = (void *)FUN_1401568c0();
          local_3d0 = pvVar13;
          FUN_140156b50(pvVar13);
          local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
          piVar3 = puVar16 + -1;
          *piVar3 = *piVar3 + -1;
          if (*piVar3 == 0) {
            FUN_140156970(puVar17);
          }
          FUN_140156be0(pvVar13);
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d3);
        local_3c8 = L"PT_SERVER_NOTICE";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      local_400 = &local_390;
      local_408 = (undefined4 ***)((longlong)&local_3dc + 4);
      cVar7 = (**(code **)(*param_1 + 0x48))(param_1,iVar4,local_378,&local_3dc);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],L"PT_SERVER_NOTICE");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d3);
        local_3c8 = L"PT_SERVER_NOTICE";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        DVar10 = GetTickCount();
        local_3b0 = DVar10 - DVar9;
        (**(code **)(*param_1 + 0x18))(param_1,&local_3d0);
      }
      ppuVar12 = local_390;
      if (((local_390 != (undefined **)0x0) && (local_390 != (undefined **)PTR_DAT_1403200a0)) &&
         (ppuVar2 = local_390 + -1, ppuVar2 != (undefined **)0x0)) {
        pvVar13 = (void *)FUN_1401568c0();
        local_3d0 = pvVar13;
        FUN_140156b50(pvVar13);
        local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
        piVar3 = (int *)((longlong)ppuVar12 + -4);
        *piVar3 = *piVar3 + -1;
        if (*piVar3 == 0) {
          FUN_140156970(ppuVar2);
        }
        FUN_140156be0(pvVar13);
      }
      break;
    case 0x84d4:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      FUN_1401543d0(param_2,&local_3e0,4);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PT_SERVER_CONNECT");
      DVar9 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84d4,L"PT_SERVER_CONNECT");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157840(&local_3e8,&local_3dc);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        local_3a0 = (undefined4 **)FUN_1400457d0(&local_3e8,&local_238,iVar15 + -2);
        if (local_3e8 == (undefined4 *)0x0) {
          local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        }
        if (*local_3a0 != local_3e8) {
          pvVar13 = (void *)FUN_1401568c0();
          local_3d0 = pvVar13;
          FUN_140156b50(pvVar13);
          puVar16 = local_3e8;
          local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
          if (((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0))
             && (puVar17 = local_3e8 + -2, puVar17 != (undefined4 *)0x0)) {
            uVar14 = FUN_1401568c0();
            local_318 = uVar14;
            FUN_140156b50(uVar14);
            local_310 = (wchar_t *)CONCAT71(local_310._1_7_,1);
            piVar3 = puVar16 + -1;
            *piVar3 = *piVar3 + -1;
            if (*piVar3 == 0) {
              FUN_140156970(puVar17);
            }
            FUN_140156be0(uVar14);
          }
          local_3e8 = *local_3a0;
          if (((local_3e8 != (undefined4 *)PTR_DAT_1403200a0) && (local_3e8 != (undefined4 *)0x0))
             && (local_3e8 != (undefined4 *)0x8)) {
            local_3e8[-1] = local_3e8[-1] + 1;
          }
          FUN_140156be0(pvVar13);
        }
        if (((local_238 != (undefined *)0x0) && (local_238 != PTR_DAT_1403200a0)) &&
           (local_238 + -8 != (undefined *)0x0)) {
          pvVar13 = (void *)FUN_1401568c0();
          local_3d0 = pvVar13;
          FUN_140156b50(pvVar13);
          local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
          piVar3 = (int *)(local_238 + -4);
          *piVar3 = *piVar3 + -1;
          if (*piVar3 == 0) {
            FUN_140156970(local_238 + -8);
          }
          FUN_140156be0(pvVar13);
        }
        local_3a0 = &local_2e0;
        local_238 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_2e0 = (undefined4 *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_2e0 = (undefined4 *)0x0;
        }
        if (local_3e8 != (undefined4 *)PTR_DAT_1403200a0) {
          pvVar13 = (void *)FUN_1401568c0();
          local_3d0 = pvVar13;
          FUN_140156b50(pvVar13);
          local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
          FUN_14004f990(&local_2e0);
          local_2e0 = local_3e8;
          if (((local_3e8 != (undefined4 *)PTR_DAT_1403200a0) && (local_3e8 != (undefined4 *)0x0))
             && (local_3e8 != (undefined4 *)0x8)) {
            local_3e8[-1] = local_3e8[-1] + 1;
          }
          FUN_140156be0(pvVar13);
        }
        FUN_1401568c0();
        local_280 = PTR_DAT_1403200a0;
        uVar8 = FUN_140156740(L"PT_SERVER_CONNECT");
        uVar14 = FUN_14004f760(&local_280,uVar8);
        FUN_140156770(uVar14,L"PT_SERVER_CONNECT",uVar8);
        FUN_14004f380(&local_280);
        (**(code **)(*param_1 + 0x28))(param_1,0x84d4,&local_280,&local_2e0);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84d4,L"PT_SERVER_CONNECT");
        puVar16 = local_3e8;
        if (((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) &&
           (puVar17 = local_3e8 + -2, puVar17 != (undefined4 *)0x0)) {
          pvVar13 = (void *)FUN_1401568c0();
          local_3d0 = pvVar13;
          FUN_140156b50(pvVar13);
          local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
          piVar3 = puVar16 + -1;
          *piVar3 = *piVar3 + -1;
          if (*piVar3 == 0) {
            FUN_140156970(puVar17);
          }
          FUN_140156be0(pvVar13);
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d4);
        local_3c8 = L"PT_SERVER_CONNECT";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      cVar7 = (**(code **)(*param_1 + 0x50))(param_1,iVar4,local_378,&local_3dc);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],L"PT_SERVER_CONNECT");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d4);
        local_3c8 = L"PT_SERVER_CONNECT";
        goto LAB_140153789;
      }
      break;
    case 0x84d5:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      FUN_1401543d0(param_2,local_3a8,4);
      FUN_1401543d0(param_2,local_3a8,4);
      FUN_1401543d0(param_2,local_3a8,4);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PT_CHANNEL_STATUS_CHANGE");
      DVar9 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84d5,L"PT_CHANNEL_STATUS_CHANGE");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157840(&local_3e8,&local_3e0);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157840(&local_3e8,(undefined4 *)((longlong)&local_3dc + 4));
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157840(&local_3e8,&local_3dc);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        local_3a0 = (undefined4 **)FUN_1400457d0(&local_3e8,&local_230,iVar15 + -2);
        if (local_3e8 == (undefined4 *)0x0) {
          local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        }
        if (*local_3a0 != local_3e8) {
          pvVar13 = (void *)FUN_1401568c0();
          local_3d0 = pvVar13;
          FUN_140156b50(pvVar13);
          puVar16 = local_3e8;
          local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
          if (((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0))
             && (puVar17 = local_3e8 + -2, puVar17 != (undefined4 *)0x0)) {
            uVar14 = FUN_1401568c0();
            local_318 = uVar14;
            FUN_140156b50(uVar14);
            local_310 = (wchar_t *)CONCAT71(local_310._1_7_,1);
            piVar3 = puVar16 + -1;
            *piVar3 = *piVar3 + -1;
            if (*piVar3 == 0) {
              FUN_140156970(puVar17);
            }
            FUN_140156be0(uVar14);
          }
          local_3e8 = *local_3a0;
          if (((local_3e8 != (undefined4 *)PTR_DAT_1403200a0) && (local_3e8 != (undefined4 *)0x0))
             && (local_3e8 != (undefined4 *)0x8)) {
            local_3e8[-1] = local_3e8[-1] + 1;
          }
          FUN_140156be0(pvVar13);
        }
        if (((local_230 != (undefined *)0x0) && (local_230 != PTR_DAT_1403200a0)) &&
           (local_230 + -8 != (undefined *)0x0)) {
          pvVar13 = (void *)FUN_1401568c0();
          local_3d0 = pvVar13;
          FUN_140156b50(pvVar13);
          local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
          piVar3 = (int *)(local_230 + -4);
          *piVar3 = *piVar3 + -1;
          if (*piVar3 == 0) {
            FUN_140156970(local_230 + -8);
          }
          FUN_140156be0(pvVar13);
        }
        local_3a0 = &local_2d0;
        local_230 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_2d0 = (undefined4 *)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_2d0 = (undefined4 *)0x0;
        }
        if (local_3e8 != (undefined4 *)PTR_DAT_1403200a0) {
          pvVar13 = (void *)FUN_1401568c0();
          local_3d0 = pvVar13;
          FUN_140156b50(pvVar13);
          local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
          FUN_14004f990(&local_2d0);
          local_2d0 = local_3e8;
          if (((local_3e8 != (undefined4 *)PTR_DAT_1403200a0) && (local_3e8 != (undefined4 *)0x0))
             && (local_3e8 != (undefined4 *)0x8)) {
            local_3e8[-1] = local_3e8[-1] + 1;
          }
          FUN_140156be0(pvVar13);
        }
        FUN_1401568c0();
        local_2b0 = PTR_DAT_1403200a0;
        uVar8 = FUN_140156740(L"PT_CHANNEL_STATUS_CHANGE");
        uVar14 = FUN_14004f760(&local_2b0,uVar8);
        FUN_140156770(uVar14,L"PT_CHANNEL_STATUS_CHANGE",uVar8);
        FUN_14004f380(&local_2b0);
        (**(code **)(*param_1 + 0x28))(param_1,0x84d5,&local_2b0,&local_2d0);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84d5,L"PT_CHANNEL_STATUS_CHANGE");
        puVar16 = local_3e8;
        if (((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) &&
           (puVar17 = local_3e8 + -2, puVar17 != (undefined4 *)0x0)) {
          pvVar13 = (void *)FUN_1401568c0();
          local_3d0 = pvVar13;
          FUN_140156b50(pvVar13);
          local_3c8 = (wchar_t *)CONCAT71(local_3c8._1_7_,1);
          piVar3 = puVar16 + -1;
          *piVar3 = *piVar3 + -1;
          if (*piVar3 == 0) {
            FUN_140156970(puVar17);
          }
          FUN_140156be0(pvVar13);
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d5);
        local_3c8 = L"PT_CHANNEL_STATUS_CHANGE";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      local_400 = (undefined ***)&local_3dc;
      local_408 = (undefined4 ***)((longlong)&local_3dc + 4);
      cVar7 = (**(code **)(*param_1 + 0x58))(param_1,iVar4,local_378,&local_3e0);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))
                  ((longlong *)param_1[2],L"PT_CHANNEL_STATUS_CHANGE");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d5);
        local_3c8 = L"PT_CHANNEL_STATUS_CHANGE";
        goto LAB_140153789;
      }
      break;
    case 0x84d6:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      FUN_1401568c0();
      local_390 = (undefined **)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_390);
      (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,L"PT_USER_KICK");
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84d6,L"PT_USER_KICK");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157b00(&local_3e8,&local_390);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        uVar14 = FUN_1400457d0(&local_3e8,local_1e0,iVar15 + -2);
        FUN_14004f4f0(&local_3e8,uVar14);
        FUN_14004f990(local_1e0);
        local_3a0 = &local_260;
        FUN_1401568c0();
        local_260 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_260,&local_3e8);
        uVar14 = FUN_14004f400(local_1c0,L"PT_USER_KICK",0);
        (**(code **)(*param_1 + 0x28))(param_1,0x84d6,uVar14,&local_260);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84d6,L"PT_USER_KICK");
        FUN_14004f990(&local_3e8);
      }
      DVar9 = 0;
      if (((char)param_1[3] == '\0') && (DVar9 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d6);
        local_3c8 = L"PT_USER_KICK";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      cVar7 = (**(code **)(*param_1 + 0x60))(param_1,iVar4,local_378,&local_390);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],L"PT_USER_KICK");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d6);
        local_3c8 = L"PT_USER_KICK";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        DVar10 = GetTickCount();
        local_3b0 = DVar10 - DVar9;
        (**(code **)(*param_1 + 0x18))(param_1,&local_3d0);
      }
      FUN_14004f990(&local_390);
      break;
    case 0x84d7:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      FUN_1401543d0(param_2,local_3a8,4);
      FUN_1401543d0(param_2,(undefined4 *)((longlong)&local_3dc + 4),4);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PT_CURRENT_USER_COUNT");
      DVar9 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84d7,L"PT_CURRENT_USER_COUNT");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157840(&local_3e8,&local_3dc);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157840(&local_3e8,&local_3e0);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        uVar14 = FUN_1400457d0(&local_3e8,local_1e8,iVar15 + -2);
        FUN_14004f4f0(&local_3e8,uVar14);
        FUN_14004f990(local_1e8);
        local_3a0 = &local_2a0;
        FUN_1401568c0();
        local_2a0 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_2a0,&local_3e8);
        uVar14 = FUN_14004f400(local_180,L"PT_CURRENT_USER_COUNT",0);
        (**(code **)(*param_1 + 0x28))(param_1,0x84d7,uVar14,&local_2a0);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84d7,L"PT_CURRENT_USER_COUNT");
        FUN_14004f990(&local_3e8);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d7);
        local_3c8 = L"PT_CURRENT_USER_COUNT";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      local_408 = (undefined4 ***)&local_3e0;
      cVar7 = (**(code **)(*param_1 + 0x68))(param_1,iVar4,local_378,&local_3dc);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))
                  ((longlong *)param_1[2],L"PT_CURRENT_USER_COUNT");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d7);
        local_3c8 = L"PT_CURRENT_USER_COUNT";
        goto LAB_140153789;
      }
      break;
    case 0x84d8:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      FUN_1401568c0();
      local_390 = (undefined **)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_390);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PT_STRING_COMMAND");
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84d8,L"PT_STRING_COMMAND");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157b00(&local_3e8,&local_390);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        uVar14 = FUN_1400457d0(&local_3e8,local_1d8,iVar15 + -2);
        FUN_14004f4f0(&local_3e8,uVar14);
        FUN_14004f990(local_1d8);
        local_3a0 = &local_270;
        FUN_1401568c0();
        local_270 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_270,&local_3e8);
        uVar14 = FUN_14004f400(local_170,L"PT_STRING_COMMAND",0);
        (**(code **)(*param_1 + 0x28))(param_1,0x84d8,uVar14,&local_270);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84d8,L"PT_STRING_COMMAND");
        FUN_14004f990(&local_3e8);
      }
      DVar9 = 0;
      if (((char)param_1[3] == '\0') && (DVar9 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d8);
        local_3c8 = L"PT_STRING_COMMAND";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      cVar7 = (**(code **)(*param_1 + 0x70))(param_1,iVar4,local_378,&local_390);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],L"PT_STRING_COMMAND");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d8);
        local_3c8 = L"PT_STRING_COMMAND";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        DVar10 = GetTickCount();
        local_3b0 = DVar10 - DVar9;
        (**(code **)(*param_1 + 0x18))(param_1,&local_3d0);
      }
      FUN_14004f990(&local_390);
      break;
    case 0x84d9:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      FUN_1401543d0(param_2,local_380,1);
      FUN_1401543d0(param_2,local_3a8,4);
      DVar9 = 0;
      local_158 = 0;
      memset(local_150,0,0x100);
      FUN_140131450(param_2,&local_158);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PT_REAL_TIME_EVENT");
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84d9,L"PT_REAL_TIME_EVENT");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157700(&local_3e8,local_3a4);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157840(&local_3e8,&local_3e0);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_1401313a0(&local_3e8,&local_158);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        uVar14 = FUN_1400457d0(&local_3e8,local_1c8,iVar15 + -2);
        FUN_14004f4f0(&local_3e8,uVar14);
        FUN_14004f990(local_1c8);
        local_3a0 = &local_290;
        FUN_1401568c0();
        local_290 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_290,&local_3e8);
        uVar14 = FUN_14004f400(local_188,L"PT_REAL_TIME_EVENT",0);
        (**(code **)(*param_1 + 0x28))(param_1,0x84d9,uVar14,&local_290);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84d9,L"PT_REAL_TIME_EVENT");
        FUN_14004f990(&local_3e8);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d9);
        local_3c8 = L"PT_REAL_TIME_EVENT";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      local_400 = (undefined ***)&local_158;
      local_408 = (undefined4 ***)&local_3e0;
      cVar7 = (**(code **)(*param_1 + 0x78))(param_1,iVar4,local_378,local_3a4);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],L"PT_REAL_TIME_EVENT");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84d9);
        local_3c8 = L"PT_REAL_TIME_EVENT";
        goto LAB_140153789;
      }
      break;
    case 0x84da:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      FUN_1401543d0(param_2,local_3a8,4);
      FUN_1401568c0();
      local_390 = (undefined **)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_390);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PWE_REQ_PLAYER_KICK");
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84da,L"PWE_REQ_PLAYER_KICK");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157840(&local_3e8,&local_3e0);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157b00(&local_3e8,&local_390);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        uVar14 = FUN_1400457d0(&local_3e8,local_1d0,iVar15 + -2);
        FUN_14004f4f0(&local_3e8,uVar14);
        FUN_14004f990(local_1d0);
        local_3a0 = &local_250;
        FUN_1401568c0();
        local_250 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_250,&local_3e8);
        uVar14 = FUN_14004f400(local_1a8,L"PWE_REQ_PLAYER_KICK",0);
        (**(code **)(*param_1 + 0x28))(param_1,0x84da,uVar14,&local_250);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84da,L"PWE_REQ_PLAYER_KICK");
        FUN_14004f990(&local_3e8);
      }
      DVar9 = 0;
      if (((char)param_1[3] == '\0') && (DVar9 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84da);
        local_3c8 = L"PWE_REQ_PLAYER_KICK";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      local_408 = (undefined4 ***)&local_390;
      cVar7 = (**(code **)(*param_1 + 0x80))(param_1,iVar4,local_378,&local_3e0);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],L"PWE_REQ_PLAYER_KICK")
        ;
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84da);
        local_3c8 = L"PWE_REQ_PLAYER_KICK";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        DVar10 = GetTickCount();
        local_3b0 = DVar10 - DVar9;
        (**(code **)(*param_1 + 0x18))(param_1,&local_3d0);
      }
      FUN_14004f990(&local_390);
      break;
    case 0x84db:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      FUN_1401543d0(param_2,local_3a8,4);
      FUN_1401568c0();
      local_390 = (undefined **)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_390);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PWE_REQ_PLAYER_BAN");
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84db,L"PWE_REQ_PLAYER_BAN");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157840(&local_3e8,&local_3e0);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157b00(&local_3e8,&local_390);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        uVar14 = FUN_1400457d0(&local_3e8,local_200,iVar15 + -2);
        FUN_14004f4f0(&local_3e8,uVar14);
        FUN_14004f990(local_200);
        local_3a0 = &local_2c0;
        FUN_1401568c0();
        local_2c0 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_2c0,&local_3e8);
        uVar14 = FUN_14004f400(local_168,L"PWE_REQ_PLAYER_BAN",0);
        (**(code **)(*param_1 + 0x28))(param_1,0x84db,uVar14,&local_2c0);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84db,L"PWE_REQ_PLAYER_BAN");
        FUN_14004f990(&local_3e8);
      }
      DVar9 = 0;
      if (((char)param_1[3] == '\0') && (DVar9 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84db);
        local_3c8 = L"PWE_REQ_PLAYER_BAN";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      local_408 = (undefined4 ***)&local_390;
      cVar7 = (**(code **)(*param_1 + 0x88))(param_1,iVar4,local_378,&local_3e0);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],L"PWE_REQ_PLAYER_BAN");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84db);
        local_3c8 = L"PWE_REQ_PLAYER_BAN";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        DVar10 = GetTickCount();
        local_3b0 = DVar10 - DVar9;
        (**(code **)(*param_1 + 0x18))(param_1,&local_3d0);
      }
      FUN_14004f990(&local_390);
      break;
    case 0x84dc:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      FUN_1401543d0(param_2,local_3a8,4);
      FUN_1401568c0();
      local_390 = (undefined **)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_390);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PWE_REQ_UPDATE_CASH");
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84dc,L"PWE_REQ_UPDATE_CASH");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157840(&local_3e8,&local_3e0);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157b00(&local_3e8,&local_390);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        uVar14 = FUN_1400457d0(&local_3e8,local_218,iVar15 + -2);
        FUN_14004f4f0(&local_3e8,uVar14);
        FUN_14004f990(local_218);
        local_3a0 = &local_2b8;
        FUN_1401568c0();
        local_2b8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_2b8,&local_3e8);
        uVar14 = FUN_14004f400(local_198,L"PWE_REQ_UPDATE_CASH",0);
        (**(code **)(*param_1 + 0x28))(param_1,0x84dc,uVar14,&local_2b8);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84dc,L"PWE_REQ_UPDATE_CASH");
        FUN_14004f990(&local_3e8);
      }
      DVar9 = 0;
      if (((char)param_1[3] == '\0') && (DVar9 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84dc);
        local_3c8 = L"PWE_REQ_UPDATE_CASH";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      local_408 = (undefined4 ***)&local_390;
      cVar7 = (**(code **)(*param_1 + 0x90))(param_1,iVar4,local_378,&local_3e0);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],L"PWE_REQ_UPDATE_CASH")
        ;
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84dc);
        local_3c8 = L"PWE_REQ_UPDATE_CASH";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        DVar10 = GetTickCount();
        local_3b0 = DVar10 - DVar9;
        (**(code **)(*param_1 + 0x18))(param_1,&local_3d0);
      }
      FUN_14004f990(&local_390);
      break;
    case 0x84dd:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      FUN_1401543d0(param_2,local_3a8,4);
      FUN_1401568c0();
      local_3a0 = (undefined4 **)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_3a0);
      cVar7 = FUN_1401543d0(param_2,&local_390,4);
      if (cVar7 != '\0') {
        local_3dc._0_4_ = local_390._0_4_;
      }
      cVar7 = FUN_1401543d0(param_2,&local_3e8,4);
      if (cVar7 != '\0') {
        local_3e0 = local_3e8._0_4_;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PWE_REQ_INSERT_ITEM");
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84dd,L"PWE_REQ_INSERT_ITEM");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157840(&local_3e8,(undefined4 *)((longlong)&local_3dc + 4));
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157b00(&local_3e8,&local_3a0);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157840(&local_3e8,&local_3dc);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157840(&local_3e8,&local_3e0);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        uVar14 = FUN_1400457d0(&local_3e8,local_1f0,iVar15 + -2);
        FUN_14004f4f0(&local_3e8,uVar14);
        FUN_14004f990(local_1f0);
        local_390 = &local_2a8;
        FUN_1401568c0();
        local_2a8 = PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_2a8,&local_3e8);
        uVar14 = FUN_14004f400(local_178,L"PWE_REQ_INSERT_ITEM",0);
        (**(code **)(*param_1 + 0x28))(param_1,0x84dd,uVar14,&local_2a8);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84dd,L"PWE_REQ_INSERT_ITEM");
        FUN_14004f990(&local_3e8);
      }
      DVar9 = 0;
      if (((char)param_1[3] == '\0') && (DVar9 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84dd);
        local_3c8 = L"PWE_REQ_INSERT_ITEM";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      local_3f8 = (undefined4 ***)&local_3e0;
      local_400 = (undefined ***)&local_3dc;
      local_408 = &local_3a0;
      cVar7 = (**(code **)(*param_1 + 0x98))
                        (param_1,iVar4,local_378,(undefined4 *)((longlong)&local_3dc + 4));
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],L"PWE_REQ_INSERT_ITEM")
        ;
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84dd);
        local_3c8 = L"PWE_REQ_INSERT_ITEM";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        DVar10 = GetTickCount();
        local_3b0 = DVar10 - DVar9;
        (**(code **)(*param_1 + 0x18))(param_1,&local_3d0);
      }
      FUN_14004f990(&local_3a0);
      break;
    case 0x84de:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      cVar7 = FUN_1401543d0(param_2,&local_3e8,4);
      if (cVar7 != '\0') {
        local_3dc._4_4_ = local_3e8._0_4_;
      }
      cVar7 = FUN_1401543d0(param_2,&local_390,4);
      if (cVar7 != '\0') {
        local_3dc._0_4_ = local_390._0_4_;
      }
      FUN_1401543d0(param_2,local_3a8,4);
      FUN_1401568c0();
      local_3a0 = (undefined4 **)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_3a0);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PWE_REQ_NOTICE");
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84de,L"PWE_REQ_NOTICE");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157840(&local_3e8,(undefined4 *)((longlong)&local_3dc + 4));
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157840(&local_3e8,&local_3dc);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157840(&local_3e8,&local_3e0);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157b00(&local_3e8,&local_3a0);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        uVar14 = FUN_1400457d0(&local_3e8,local_210,iVar15 + -2);
        FUN_14004f4f0(&local_3e8,uVar14);
        FUN_14004f990(local_210);
        local_390 = &local_298;
        FUN_1401568c0();
        local_298 = PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_298,&local_3e8);
        uVar14 = FUN_14004f400(local_1b8,L"PWE_REQ_NOTICE",0);
        (**(code **)(*param_1 + 0x28))(param_1,0x84de,uVar14,&local_298);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84de,L"PWE_REQ_NOTICE");
        FUN_14004f990(&local_3e8);
      }
      DVar9 = 0;
      if (((char)param_1[3] == '\0') && (DVar9 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84de);
        local_3c8 = L"PWE_REQ_NOTICE";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      local_3f8 = &local_3a0;
      local_400 = (undefined ***)&local_3e0;
      local_408 = (undefined4 ***)&local_3dc;
      cVar7 = (**(code **)(*param_1 + 0xa0))
                        (param_1,iVar4,local_378,(undefined4 *)((longlong)&local_3dc + 4));
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],L"PWE_REQ_NOTICE");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84de);
        local_3c8 = L"PWE_REQ_NOTICE";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        DVar10 = GetTickCount();
        local_3b0 = DVar10 - DVar9;
        (**(code **)(*param_1 + 0x18))(param_1,&local_3d0);
      }
      FUN_14004f990(&local_3a0);
      break;
    case 0x84df:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      cVar7 = FUN_1401543d0(param_2,&local_3e8,4);
      if (cVar7 != '\0') {
        local_3e0 = local_3e8._0_4_;
      }
      FUN_1401568c0();
      local_3a0 = (undefined4 **)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_3a0);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PWE_REQ_CHARGE_FATIGUE");
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84df,L"PWE_REQ_CHARGE_FATIGUE");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_140157840(&local_3e8,&local_3e0);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        FUN_140157b00(&local_3e8,&local_3a0);
        FUN_14004f840(&local_3e8,&DAT_140286e98);
        iVar15 = 0;
        if ((local_3e8 != (undefined4 *)0x0) && (local_3e8 != (undefined4 *)PTR_DAT_1403200a0)) {
          iVar15 = local_3e8[-2];
        }
        uVar14 = FUN_1400457d0(&local_3e8,local_208,iVar15 + -2);
        FUN_14004f4f0(&local_3e8,uVar14);
        FUN_14004f990(local_208);
        local_390 = &local_288;
        FUN_1401568c0();
        local_288 = PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_288,&local_3e8);
        uVar14 = FUN_14004f400(local_1b0,L"PWE_REQ_CHARGE_FATIGUE",0);
        (**(code **)(*param_1 + 0x28))(param_1,0x84df,uVar14,&local_288);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84df,L"PWE_REQ_CHARGE_FATIGUE");
        FUN_14004f990(&local_3e8);
      }
      DVar9 = 0;
      if (((char)param_1[3] == '\0') && (DVar9 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84df);
        local_3c8 = L"PWE_REQ_CHARGE_FATIGUE";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      local_408 = &local_3a0;
      cVar7 = (**(code **)(*param_1 + 0xa8))(param_1,iVar4,local_378,&local_3e0);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))
                  ((longlong *)param_1[2],L"PWE_REQ_CHARGE_FATIGUE");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84df);
        local_3c8 = L"PWE_REQ_CHARGE_FATIGUE";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        DVar10 = GetTickCount();
        local_3b0 = DVar10 - DVar9;
        (**(code **)(*param_1 + 0x18))(param_1,&local_3d0);
      }
      FUN_14004f990(&local_3a0);
      break;
    case 0x84e0:
      FUN_140157c90(local_378);
      local_374 = param_2[10];
      local_378[0] = (undefined1)param_2[0x10];
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,L"PT_REQ_SERVER_REGISTER");
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          local_408 = (undefined4 ***)&DAT_140288b80;
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar4,0x84e0,L"PT_REQ_SERVER_REGISTER");
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_3e8 = (undefined4 *)PTR_DAT_1403200a0;
        uVar14 = FUN_1400457d0(&local_3e8,local_1f8,0xfffffffe);
        FUN_14004f4f0(&local_3e8,uVar14);
        FUN_14004f990(local_1f8);
        local_3a0 = &local_278;
        FUN_1401568c0();
        local_278 = (undefined4 *)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_278,&local_3e8);
        uVar14 = FUN_14004f400(local_1a0,L"PT_REQ_SERVER_REGISTER",0);
        (**(code **)(*param_1 + 0x28))(param_1,0x84e0,uVar14,&local_278);
        local_408 = (undefined4 ***)local_3e8;
        if (local_3e8 == (undefined4 *)0x0) {
          local_408 = (undefined4 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar4,0x84e0,L"PT_REQ_SERVER_REGISTER");
        FUN_14004f990(&local_3e8);
      }
      DVar9 = 0;
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84e0);
        local_3c8 = L"PT_REQ_SERVER_REGISTER";
        local_3c0 = CONCAT44(local_3c0._4_4_,iVar4);
        local_3b8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
        DVar9 = GetTickCount();
      }
      cVar7 = (**(code **)(*param_1 + 0xb0))(param_1,iVar4,local_378);
      if (cVar7 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))
                  ((longlong *)param_1[2],L"PT_REQ_SERVER_REGISTER");
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_3d0 = (void *)CONCAT44(local_3d0._4_4_,0x84e0);
        local_3c8 = L"PT_REQ_SERVER_REGISTER";
        goto LAB_140153789;
      }
      break;
    default:
      goto switchD_1401505b4_default;
    }
    uVar14 = 1;
  }
  return uVar14;
}



// Library Function - Single Match
//  public: virtual void * __ptr64 __cdecl std::bad_alloc::`scalar deleting destructor'(unsigned
// int) __ptr64
// 
// Libraries: Visual Studio 2012 Release, Visual Studio 2015 Release

void * __thiscall std::bad_alloc::_scalar_deleting_destructor_(bad_alloc *this,uint param_1)

{
  *(undefined ***)this = RNP::Agent2ServerStub::vftable;
  FUN_140157bd0();
  if ((param_1 & 1) != 0) {
    operator_delete(this);
  }
  return this;
}



void FUN_140153870(undefined8 *param_1)

{
  *param_1 = RNP::Agent2ServerStub::vftable;
  FUN_140157bd0();
  return;
}



// Library Function - Single Match
//  public: virtual void * __ptr64 __cdecl std::bad_alloc::`scalar deleting destructor'(unsigned
// int) __ptr64
// 
// Libraries: Visual Studio 2012 Release, Visual Studio 2015 Release

void * __thiscall std::bad_alloc::_scalar_deleting_destructor_(bad_alloc *this,uint param_1)

{
  *(undefined ***)this = RNP::Server2AgentProxy::vftable;
  FUN_140156cd0();
  if ((param_1 & 1) != 0) {
    operator_delete(this);
  }
  return this;
}



void FUN_1401538c0(undefined8 *param_1)

{
  *param_1 = RNP::Server2AgentProxy::vftable;
  FUN_140156cd0();
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401538d0(undefined8 param_1,ulonglong *param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  int iVar3;
  ulonglong uVar4;
  undefined1 auStack_118 [32];
  ulonglong local_f8;
  ulonglong local_f0;
  undefined8 local_e8;
  undefined8 local_d8;
  undefined4 local_d0;
  undefined1 local_cc;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined1 local_b8;
  undefined2 local_b0;
  undefined6 uStack_ae;
  undefined8 local_a0;
  ulonglong local_98;
  undefined2 local_88;
  undefined6 uStack_86;
  undefined8 local_78;
  ulonglong local_70;
  undefined2 local_60;
  undefined6 uStack_5e;
  undefined8 local_50;
  ulonglong local_48;
  ulonglong local_38;
  
  local_e8 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  FUN_1401543d0(param_1,&local_f8,4);
  uVar4 = local_f8;
  iVar3 = (int)local_f8;
  if (((int)local_f8 < 0) || (DAT_140320d70 <= (int)local_f8)) {
    FUN_140157570(local_f8 & 0xffffffff);
  }
  FUN_1401461c0(param_2,(longlong)iVar3);
  FUN_140153b00(param_2);
  if (0 < iVar3) {
    uVar4 = uVar4 & 0xffffffff;
    do {
      local_d8 = 0;
      local_d0 = 0;
      local_cc = 0;
      local_c8 = 0;
      local_c0 = 0;
      local_b8 = 0;
      local_98 = 7;
      local_a0 = 0;
      local_b0 = 0;
      local_70 = 7;
      local_78 = 0;
      local_88 = 0;
      local_48 = 7;
      local_50 = 0;
      local_60 = 0;
      FUN_1401315d0(param_1,&local_d8);
      puVar1 = (undefined8 *)param_2[1];
      if ((&local_d8 < puVar1) && (puVar2 = (undefined8 *)*param_2, puVar2 <= &local_d8)) {
        if (puVar1 == (undefined8 *)param_2[2]) {
          FUN_140146110(param_2,1);
        }
        local_f8 = param_2[1];
        local_f0 = local_f8;
        if (local_f8 != 0) {
          FUN_140145de0(local_f8,(((longlong)&local_d8 - (longlong)puVar2) / 0xa0) * 0xa0 + *param_2
                       );
        }
      }
      else {
        if (puVar1 == (undefined8 *)param_2[2]) {
          FUN_140146110(param_2,1);
        }
        local_f8 = param_2[1];
        local_f0 = local_f8;
        if (local_f8 != 0) {
          FUN_140145de0(local_f8,&local_d8);
        }
      }
      param_2[1] = param_2[1] + 0xa0;
      if (7 < local_48) {
        operator_delete((void *)CONCAT62(uStack_5e,local_60));
      }
      local_48 = 7;
      local_50 = 0;
      local_60 = 0;
      if (7 < local_70) {
        operator_delete((void *)CONCAT62(uStack_86,local_88));
      }
      local_70 = 7;
      local_78 = 0;
      local_88 = 0;
      if (7 < local_98) {
        operator_delete((void *)CONCAT62(uStack_ae,local_b0));
      }
      uVar4 = uVar4 - 1;
    } while (uVar4 != 0);
  }
  return param_1;
}



void FUN_140153b00(longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar1 = param_1[1];
  lVar2 = lVar1 - *param_1;
  lVar3 = lVar2 >> 0x3f;
  if ((lVar2 / 0xa0 + lVar3 != lVar3) && (*param_1 != lVar1)) {
    lVar2 = FUN_140153b90(lVar1,lVar1);
    lVar1 = param_1[1];
    for (lVar3 = lVar2; lVar3 != lVar1; lVar3 = lVar3 + 0xa0) {
      FUN_140145d50(lVar3);
    }
    param_1[1] = lVar2;
  }
  return;
}



undefined4 * FUN_140153b90(undefined4 *param_1,undefined4 *param_2,undefined4 *param_3)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  
  if (param_1 != param_2) {
    puVar2 = param_1 + 2;
    do {
      *param_3 = puVar2[-2];
      param_3[1] = puVar2[-1];
      param_3[2] = *puVar2;
      *(undefined1 *)(param_3 + 3) = *(undefined1 *)(puVar2 + 1);
      param_3[4] = puVar2[2];
      param_3[5] = puVar2[3];
      param_3[6] = puVar2[4];
      param_3[7] = puVar2[5];
      *(undefined1 *)(param_3 + 8) = *(undefined1 *)(puVar2 + 6);
      FUN_140056b10(param_3 + 10,puVar2 + 8,0,0xffffffffffffffff);
      FUN_140056b10(param_3 + 0x14,puVar2 + 0x12);
      FUN_140056b10(param_3 + 0x1e,puVar2 + 0x1c);
      param_3 = param_3 + 0x28;
      puVar1 = puVar2 + 0x26;
      puVar2 = puVar2 + 0x28;
    } while (puVar1 != param_2);
  }
  return param_3;
}



longlong * FUN_140153c60(longlong *param_1,longlong param_2)

{
  *param_1 = param_2;
  *(undefined1 *)(param_1 + 1) = *(undefined1 *)(param_2 + 0x20);
  *(undefined1 *)(param_2 + 0x20) = 0;
  return param_1;
}



void FUN_140153c80(longlong *param_1)

{
  *(char *)(*param_1 + 0x20) = (char)param_1[1];
  return;
}



void FUN_140153c90(longlong *param_1,int param_2,void *param_3,int param_4)

{
  void *pvVar1;
  
  if (param_1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  if (param_3 == (void *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  pvVar1 = (void *)*param_1;
  if (pvVar1 == param_3) {
    if (param_2 <= param_4) {
      *param_1 = (longlong)param_3;
      goto LAB_140153d21;
    }
    pvVar1 = calloc((longlong)param_2,1);
  }
  else {
    if (param_2 <= param_4) {
      free(pvVar1);
      *param_1 = (longlong)param_3;
      goto LAB_140153d21;
    }
    pvVar1 = _recalloc(pvVar1,(longlong)param_2,1);
    if (pvVar1 == (void *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  *param_1 = (longlong)pvVar1;
LAB_140153d21:
  if (*param_1 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x8007000e);
  }
  return;
}



void FUN_140153d40(longlong *param_1)

{
  longlong lVar1;
  undefined1 local_58 [80];
  
  if (param_1[1] != 0) {
    FUN_140156300(local_58,PTR_u_Cannot_use_internal_buffer_becau_140320030);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  if (*param_1 == 0) {
    lVar1 = FUN_140156120();
    *param_1 = lVar1;
    *(undefined8 *)(lVar1 + 0x28) = 1;
  }
  return;
}



void FUN_140153d90(longlong param_1)

{
  int iVar1;
  longlong lVar2;
  undefined1 local_58 [80];
  
  if (*(longlong *)(param_1 + 0x10) != 0) {
    FUN_140156300(local_58,PTR_u_Cannot_use_internal_buffer_becau_140320030);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  if (*(longlong *)(param_1 + 8) == 0) {
    lVar2 = FUN_140156120();
    *(longlong *)(param_1 + 8) = lVar2;
    *(undefined8 *)(lVar2 + 0x28) = 1;
  }
  if (*(longlong *)(param_1 + 8) != 0) {
    *(undefined4 *)(*(longlong *)(param_1 + 8) + 0x24) = 1;
  }
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 != 0) {
    iVar1 = *(int *)(lVar2 + 0x20);
    if (iVar1 < 0x80) {
      iVar1 = 0x80;
    }
    *(int *)(lVar2 + 0x20) = iVar1;
  }
  return;
}



void FUN_140153e10(undefined8 *param_1)

{
  *param_1 = 0;
  FUN_1401560e0(param_1 + 1);
  param_1[3] = 0;
  param_1[2] = 0;
  return;
}



void FUN_140153e40(undefined8 *param_1,LPCWSTR param_2,UINT param_3)

{
  code *pcVar1;
  int iVar2;
  int iVar3;
  DWORD DVar4;
  bool bVar5;
  
  if (param_2 == (LPCWSTR)0x0) {
    *param_1 = 0;
    return;
  }
  iVar2 = lstrlenW(param_2);
  iVar2 = iVar2 + 1;
  FUN_140153c90(param_1,iVar2 * 4,param_1 + 1,0x80);
  iVar3 = WideCharToMultiByte(param_3,0,param_2,iVar2,(LPSTR)*param_1,iVar2 * 4,(LPCSTR)0x0,
                              (LPBOOL)0x0);
  if (iVar3 == 0) {
    DVar4 = GetLastError();
    bVar5 = true;
    if (DVar4 == 0x7a) {
      iVar3 = WideCharToMultiByte(param_3,0,param_2,iVar2,(LPSTR)0x0,0,(LPCSTR)0x0,(LPBOOL)0x0);
      FUN_140153c90(param_1,iVar3,param_1 + 1,0x80);
      iVar2 = WideCharToMultiByte(param_3,0,param_2,iVar2,(LPSTR)*param_1,iVar3,(LPCSTR)0x0,
                                  (LPBOOL)0x0);
      bVar5 = iVar2 == 0;
    }
    if (bVar5) {
      FUN_140142da0();
      pcVar1 = (code *)swi(3);
      (*pcVar1)();
      return;
    }
  }
  return;
}



undefined4 FUN_140153f80(longlong *param_1)

{
  if (*param_1 != 0) {
    return *(undefined4 *)(*param_1 + 0x18);
  }
  if (param_1[1] != 0) {
    return (int)param_1[2];
  }
                    // WARNING: Subroutine does not return
  FUN_1401561e0();
}



void FUN_140153fb0(longlong *param_1,longlong param_2,int param_3)

{
  undefined1 local_58 [88];
  
  if (*param_1 != 0) {
    FUN_140156300(local_58,PTR_u_Cannot_use_external_buffer_becau_140320028);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  if (param_1[1] != 0) {
    FUN_140156300(local_58,PTR_u_Cannot_use_internal_buffer_becau_140320030);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  if ((param_2 != 0) && (param_3 != 0)) {
    *(int *)((longlong)param_1 + 0x14) = param_3;
    *(undefined4 *)(param_1 + 2) = 0;
    param_1[1] = param_2;
  }
  return;
}



undefined4 FUN_140154030(longlong param_1)

{
  if (*(longlong *)(param_1 + 8) != 0) {
    return *(undefined4 *)(*(longlong *)(param_1 + 8) + 0x18);
  }
  if (*(longlong *)(param_1 + 0x10) != 0) {
    return *(undefined4 *)(param_1 + 0x18);
  }
                    // WARNING: Subroutine does not return
  FUN_1401561e0();
}



longlong FUN_140154060(longlong param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(param_1 + 0x10);
  if (lVar1 == 0) {
    lVar1 = *(longlong *)(param_1 + 8);
    if (lVar1 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(int *)(lVar1 + 0x18) != 0) {
      return *(longlong *)(lVar1 + 0x10);
    }
    lVar1 = 0;
  }
  return lVar1;
}



void FUN_1401540a0(int *param_1,int param_2)

{
  int iVar1;
  longlong lVar2;
  undefined1 local_50 [80];
  
  lVar2 = *(longlong *)(param_1 + 2);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 4) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = param_1[6];
  }
  else {
    iVar1 = *(int *)(lVar2 + 0x18);
  }
  if (iVar1 < param_2) {
    if (lVar2 == 0) {
      if (*(longlong *)(param_1 + 4) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      iVar1 = param_1[6];
    }
    else {
      iVar1 = *(int *)(lVar2 + 0x18);
    }
    FUN_140156300(local_50,&DAT_140259ea0,iVar1,param_2);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
  }
  *param_1 = param_2 * 8;
  return;
}



void FUN_140154120(longlong param_1,undefined8 param_2,int param_3)

{
  undefined1 local_58 [88];
  
  if (DAT_140320d70 < param_3) {
    FUN_140156300(local_58,L"UseExternalBuffer failed due to too large capacity");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  FUN_140153fb0(param_1 + 8);
  return;
}



undefined8 FUN_140154160(int *param_1,undefined8 param_2,int param_3)

{
  int iVar1;
  uint uVar2;
  longlong lVar3;
  uint uVar4;
  int iVar5;
  undefined1 local_58 [80];
  
  lVar3 = *(longlong *)(param_1 + 2);
  if ((lVar3 == 0) && (*(longlong *)(param_1 + 4) == 0)) {
    FUN_140156300(local_58,L"Cannot read from Null pointer message!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  uVar4 = *param_1 >> 0x1f & 7;
  uVar2 = *param_1 + uVar4;
  iVar5 = (int)uVar2 >> 3;
  if ((uVar2 & 7) != uVar4) {
    FUN_140156300(local_58,L"Read offset is not byte aligned!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  if (lVar3 == 0) {
    if (*(longlong *)(param_1 + 4) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = param_1[6];
  }
  else {
    iVar1 = *(int *)(lVar3 + 0x18);
  }
  if (iVar1 < iVar5 + param_3) {
    return 0;
  }
  if (*(longlong *)(param_1 + 4) == 0) {
    if (lVar3 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(int *)(lVar3 + 0x18) == 0) {
      lVar3 = 0;
    }
    else {
      lVar3 = *(longlong *)(lVar3 + 0x10);
    }
  }
  else {
    lVar3 = *(longlong *)(param_1 + 4);
    if (lVar3 == 0) {
      FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
  }
  FUN_140050120(param_2,iVar5 + lVar3,(longlong)param_3);
  *param_1 = *param_1 + param_3 * 8;
  return 1;
}



undefined4 FUN_140154290(int *param_1,int param_2)

{
  longlong lVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  undefined1 local_58 [88];
  
  lVar1 = *(longlong *)(param_1 + 2);
  if ((lVar1 == 0) && (*(longlong *)(param_1 + 4) == 0)) {
    FUN_140156300(local_58,L"Cannot read from Null pointer message!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  uVar3 = *param_1 >> 0x1f & 7;
  uVar2 = *param_1 + uVar3;
  iVar4 = (int)uVar2 >> 3;
  if ((uVar2 & 7) != uVar3) {
    FUN_140156300(local_58,L"Read offset is not byte aligned!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  if (lVar1 != 0) {
    iVar4 = iVar4 + param_2;
    return CONCAT31((int3)((uint)iVar4 >> 8),iVar4 <= *(int *)(lVar1 + 0x18));
  }
  if (*(longlong *)(param_1 + 4) != 0) {
    iVar4 = iVar4 + param_2;
    return CONCAT31((int3)((uint)iVar4 >> 8),iVar4 <= param_1[6]);
  }
                    // WARNING: Subroutine does not return
  FUN_1401561e0();
}



void FUN_140154340(int *param_1)

{
  int iVar1;
  char cVar2;
  char local_res8 [32];
  undefined1 local_58 [80];
  
  if ((char)param_1[8] != '\0') {
    cVar2 = FUN_140154160(param_1,local_res8,1);
    if ((cVar2 == '\0') || (local_res8[0] != -2)) {
      if (*(longlong *)(param_1 + 2) == 0) {
        if (*(longlong *)(param_1 + 4) == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        iVar1 = param_1[6];
      }
      else {
        iVar1 = *(int *)(*(longlong *)(param_1 + 2) + 0x18);
      }
      FUN_140156300(local_58,L"CMessage: Test splitter failure(reading=%d,length=%d)",
                    (int)((*param_1 >> 0x1f & 7U) + *param_1) >> 3,iVar1);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
  }
  return;
}



undefined1 FUN_1401543d0(uint *param_1,undefined8 param_2,int param_3)

{
  char cVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  
  if (param_3 != 0) {
    uVar4 = (int)*param_1 >> 0x1f & 7;
    uVar2 = *param_1 + uVar4;
    uVar3 = uVar2 & 0xfffffff8;
    *param_1 = uVar3;
    if (0 < (int)((uVar2 & 7) - uVar4)) {
      *param_1 = uVar3 + 8;
    }
    cVar1 = FUN_140154160(param_1,param_2);
    if (cVar1 == '\0') {
      return 0;
    }
    FUN_140154340(param_1);
  }
  return 1;
}



undefined1 FUN_140154430(uint *param_1,int param_2)

{
  uint uVar1;
  char cVar2;
  uint uVar3;
  uint uVar4;
  uint uVar5;
  
  if (param_2 == 0) {
    return 1;
  }
  uVar1 = *param_1;
  uVar5 = (int)uVar1 >> 0x1f & 7;
  uVar3 = uVar1 + uVar5;
  uVar4 = uVar3 & 0xfffffff8;
  *param_1 = uVar4;
  if (0 < (int)((uVar3 & 7) - uVar5)) {
    *param_1 = uVar4 + 8;
  }
  cVar2 = FUN_140154290(param_1,param_2);
  if (cVar2 == '\0') {
    *param_1 = uVar1;
    return 0;
  }
  FUN_140154340(param_1);
  *param_1 = uVar1;
  return 1;
}



undefined4 * FUN_1401544a0(undefined4 *param_1)

{
  *(undefined8 *)(param_1 + 6) = 0;
  *(undefined8 *)(param_1 + 4) = 0;
  *(undefined8 *)(param_1 + 2) = 0;
  *param_1 = 0;
  param_1[1] = 0;
  *(undefined1 *)(param_1 + 8) = 0;
  return param_1;
}



undefined4 * FUN_1401544d0(undefined4 *param_1,undefined4 *param_2)

{
  longlong *plVar1;
  
  *(undefined8 *)(param_1 + 6) = 0;
  *(undefined8 *)(param_1 + 4) = 0;
  *(undefined8 *)(param_1 + 2) = 0;
  *param_1 = *param_2;
  *(undefined1 *)(param_1 + 8) = *(undefined1 *)(param_2 + 8);
  param_1[1] = param_2[1];
  if (*(longlong *)(param_2 + 2) == *(longlong *)(param_1 + 2)) {
    param_1[7] = param_2[7];
    *(undefined8 *)(param_1 + 4) = *(undefined8 *)(param_2 + 4);
    param_1[6] = param_2[6];
  }
  else {
    FUN_1401560e0(param_1 + 2);
    if (*(longlong *)(param_2 + 2) != 0) {
      plVar1 = (longlong *)(*(longlong *)(param_2 + 2) + 0x28);
      *plVar1 = *plVar1 + 1;
      *(undefined8 *)(param_1 + 2) = *(undefined8 *)(param_2 + 2);
    }
  }
  return param_1;
}



void FUN_140154570(undefined4 *param_1,longlong *param_2)

{
  longlong *plVar1;
  
  if (*param_2 == *(longlong *)(param_1 + 2)) {
    param_1[7] = *(undefined4 *)((longlong)param_2 + 0x14);
    *(longlong *)(param_1 + 4) = param_2[1];
    param_1[6] = (int)param_2[2];
  }
  else {
    FUN_1401560e0(param_1 + 2);
    if (*param_2 != 0) {
      plVar1 = (longlong *)(*param_2 + 0x28);
      *plVar1 = *plVar1 + 1;
      *(longlong *)(param_1 + 2) = *param_2;
    }
  }
  *param_1 = 0;
  FUN_1401560e0(param_2);
  if (param_2[1] != 0) {
    if (*(int *)((longlong)param_2 + 0x14) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_2 + 2) = 0;
  }
  return;
}



void FUN_140154600(int *param_1,undefined8 param_2)

{
  longlong lVar1;
  int iVar2;
  
  iVar2 = (int)param_2;
  if (iVar2 * 8 < *param_1) {
    *param_1 = iVar2 * 8;
  }
  if (-1 < iVar2) {
    if (*(longlong *)(param_1 + 4) != 0) {
      if (param_1[7] < iVar2) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      param_1[6] = iVar2;
      return;
    }
    lVar1 = *(longlong *)(param_1 + 2);
    if (iVar2 < 1) {
      if (lVar1 == 0) {
        return;
      }
      param_2 = 0;
    }
    else if (lVar1 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    FUN_140050060(lVar1,param_2);
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



longlong FUN_140154660(int *param_1,int param_2)

{
  longlong lVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  undefined1 local_58 [80];
  
  FUN_140154340();
  lVar1 = *(longlong *)(param_1 + 2);
  if ((lVar1 == 0) && (*(longlong *)(param_1 + 4) == 0)) {
    FUN_140156300(local_58,&DAT_14025a0b0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  iVar3 = *param_1;
  if (lVar1 == 0) {
    if (*(longlong *)(param_1 + 4) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar4 = param_1[6];
  }
  else {
    iVar4 = *(int *)(lVar1 + 0x18);
  }
  iVar2 = ((int)(iVar3 + (iVar3 >> 0x1f & 7U)) >> 3) + param_2;
  if (iVar4 < iVar2) {
    return (ulonglong)(uint3)((uint)iVar2 >> 8) << 8;
  }
  iVar3 = iVar3 + param_2 * 8;
  *param_1 = iVar3;
  return CONCAT71((uint7)(uint3)((uint)iVar3 >> 8),1);
}



undefined8 FUN_140154700(int *param_1,int *param_2,int param_3)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  undefined1 local_58 [80];
  
  lVar2 = *(longlong *)(param_1 + 2);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 4) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar3 = param_1[6];
  }
  else {
    iVar3 = *(int *)(lVar2 + 0x18);
  }
  iVar1 = (int)(*param_1 + (*param_1 >> 0x1f & 7U)) >> 3;
  if (iVar3 < iVar1 + param_3) {
    return 0;
  }
  if (*(longlong *)(param_1 + 4) == 0) {
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(int *)(lVar2 + 0x18) == 0) {
      lVar2 = 0;
    }
    else {
      lVar2 = *(longlong *)(lVar2 + 0x10);
    }
  }
  else {
    lVar2 = *(longlong *)(param_1 + 4);
    if (lVar2 == 0) {
      FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
  }
  if (DAT_140320d70 < param_3) {
    FUN_140156300(local_58,L"UseExternalBuffer failed due to too large capacity");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  FUN_140153fb0(param_2 + 2,iVar1 + lVar2,param_3);
  if (param_3 * 8 < *param_2) {
    *param_2 = param_3 * 8;
  }
  if (param_3 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (*(longlong *)(param_2 + 4) == 0) {
    lVar2 = *(longlong *)(param_2 + 2);
    if (param_3 < 1) {
      if (lVar2 == 0) goto LAB_140154843;
      iVar3 = 0;
    }
    else {
      iVar3 = param_3;
      if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
    }
    FUN_140050060(lVar2,iVar3);
  }
  else {
    if (param_2[7] < param_3) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    param_2[6] = param_3;
  }
LAB_140154843:
  FUN_140154660(param_1,param_3);
  return 1;
}



void FUN_140154880(longlong param_1,longlong param_2)

{
  int iVar1;
  int iVar2;
  undefined8 uVar3;
  int iVar4;
  longlong lVar5;
  longlong lVar6;
  int iVar7;
  longlong lVar8;
  undefined1 local_b8 [72];
  undefined1 local_70 [72];
  
  lVar5 = *(longlong *)(param_2 + 0xc80);
  iVar7 = 0;
  lVar8 = 0;
  if (lVar5 != 0) {
    lVar6 = 0;
    do {
      if (*(int *)(param_2 + 0xc88) <= iVar7) {
        return;
      }
      if (lVar5 == 0) {
        FUN_140156300(local_b8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_b8,(ThrowInfo *)&DAT_14031d928);
      }
      if (lVar8 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      uVar3 = *(undefined8 *)(lVar5 + lVar6);
      iVar1 = *(int *)(lVar5 + 8 + lVar6);
      if (*(longlong *)(param_1 + 0x10) == 0) {
        lVar5 = *(longlong *)(param_1 + 8);
        if (lVar5 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        if (iVar1 != 0) {
          iVar2 = *(int *)(lVar5 + 0x18);
          FUN_140050060(lVar5,iVar2 + iVar1);
          if (*(int *)(lVar5 + 0x18) == 0) {
            lVar5 = 0;
          }
          else {
            lVar5 = *(longlong *)(lVar5 + 0x10);
          }
          lVar5 = lVar5 + iVar2;
          goto LAB_14015496f;
        }
      }
      else {
        if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        if (iVar1 != 0) {
          if (*(longlong *)(param_1 + 0x10) == 0) {
            FUN_140156300(local_70,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
            _CxxThrowException(local_70,(ThrowInfo *)&DAT_14031d928);
          }
          iVar2 = *(int *)(param_1 + 0x18);
          iVar4 = iVar2 + iVar1;
          if ((iVar4 < 0) || (*(int *)(param_1 + 0x1c) < iVar4)) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          *(int *)(param_1 + 0x18) = iVar4;
          lVar5 = (longlong)iVar2 + *(longlong *)(param_1 + 0x10);
LAB_14015496f:
          FUN_140050120(lVar5,uVar3,(longlong)iVar1);
        }
      }
      lVar5 = *(longlong *)(param_2 + 0xc80);
      iVar7 = iVar7 + 1;
      lVar8 = lVar8 + 1;
      lVar6 = lVar6 + 0x10;
    } while (lVar5 != 0);
  }
  FUN_140156300(local_b8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_b8,(ThrowInfo *)&DAT_14031d928);
}



void FUN_140154a40(longlong param_1)

{
  if (*(longlong *)(param_1 + 0x10) != 0) {
    FUN_14004ff50(param_1 + 0x10);
    return;
  }
  if (*(longlong *)(param_1 + 8) != 0) {
    FUN_140050180();
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401561e0();
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140154a70(int *param_1,undefined8 *param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  undefined8 uVar4;
  longlong lVar5;
  undefined1 auStack_158 [32];
  undefined1 local_138 [144];
  undefined1 local_a8 [120];
  undefined8 local_30;
  int local_28;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_158;
  lVar5 = *(longlong *)(param_1 + 2);
  if (lVar5 == 0) {
    if (*(longlong *)(param_1 + 4) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = param_1[6];
  }
  else {
    iVar1 = *(int *)(lVar5 + 0x18);
  }
  iVar2 = (int)(*param_1 + (*param_1 >> 0x1f & 7U)) >> 3;
  if (*(longlong *)(param_1 + 4) == 0) {
    if (lVar5 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(int *)(lVar5 + 0x18) == 0) {
      lVar5 = 0;
    }
    else {
      lVar5 = *(longlong *)(lVar5 + 0x10);
    }
  }
  else {
    lVar5 = *(longlong *)(param_1 + 4);
    if (lVar5 == 0) {
      FUN_140156300(local_138,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_138,(ThrowInfo *)&DAT_14031d928);
    }
  }
  uVar4 = FUN_1401837e0(local_a8,iVar2 + lVar5,iVar1 - iVar2);
  if ((char)uVar4 != '\0') {
    *param_2 = local_30;
    FUN_140154340(param_1);
    lVar5 = *(longlong *)(param_1 + 2);
    if ((lVar5 == 0) && (*(longlong *)(param_1 + 4) == 0)) {
      FUN_140156300(local_138,&DAT_14025a0b0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_138,(ThrowInfo *)&DAT_14031d928);
    }
    iVar1 = *param_1;
    if (lVar5 == 0) {
      if (*(longlong *)(param_1 + 4) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      iVar2 = param_1[6];
    }
    else {
      iVar2 = *(int *)(lVar5 + 0x18);
    }
    iVar3 = ((int)(iVar1 + (iVar1 >> 0x1f & 7U)) >> 3) + local_28;
    if (iVar3 <= iVar2) {
      iVar3 = iVar1 + local_28 * 8;
      *param_1 = iVar3;
    }
    uVar4 = CONCAT71((uint7)(uint3)((uint)iVar3 >> 8),1);
  }
  return uVar4;
}



void FUN_140154be0(undefined8 *param_1)

{
  FUN_1401244c0(*param_1);
  return;
}



void FUN_140154bf0(undefined8 *param_1)

{
  FUN_14004f380(*param_1);
  return;
}



undefined8 FUN_140154c00(uint *param_1,uint *param_2)

{
  char cVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  byte local_res8 [8];
  
  *param_2 = 0;
  uVar3 = (int)*param_1 >> 0x1f & 7;
  uVar2 = *param_1 + uVar3;
  uVar4 = uVar2 & 0xfffffff8;
  *param_1 = uVar4;
  if (0 < (int)((uVar2 & 7) - uVar3)) {
    *param_1 = uVar4 + 8;
  }
  cVar1 = FUN_140154160(param_1,local_res8,1);
  if (cVar1 != '\0') {
    FUN_140154340(param_1);
    *param_2 = (uint)local_res8[0];
    return 1;
  }
  return 0;
}



undefined8 FUN_140154c80(uint *param_1,uint *param_2)

{
  char cVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  byte local_res8 [8];
  
  *param_2 = 6;
  uVar3 = (int)*param_1 >> 0x1f & 7;
  uVar2 = *param_1 + uVar3;
  uVar4 = uVar2 & 0xfffffff8;
  *param_1 = uVar4;
  if (0 < (int)((uVar2 & 7) - uVar3)) {
    *param_1 = uVar4 + 8;
  }
  cVar1 = FUN_140154160(param_1,local_res8,1);
  if (cVar1 != '\0') {
    FUN_140154340(param_1);
    *param_2 = (uint)local_res8[0];
    return 1;
  }
  return 0;
}



undefined8 FUN_140154d00(uint *param_1,uint *param_2)

{
  char cVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  byte local_res8 [8];
  
  *param_2 = 2;
  uVar3 = (int)*param_1 >> 0x1f & 7;
  uVar2 = *param_1 + uVar3;
  uVar4 = uVar2 & 0xfffffff8;
  *param_1 = uVar4;
  if (0 < (int)((uVar2 & 7) - uVar3)) {
    *param_1 = uVar4 + 8;
  }
  cVar1 = FUN_140154160(param_1,local_res8,1);
  if (cVar1 != '\0') {
    FUN_140154340(param_1);
    *param_2 = (uint)local_res8[0];
    return 1;
  }
  return 0;
}



undefined8 FUN_140154d80(uint *param_1,uint *param_2)

{
  char cVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  ushort local_res8 [4];
  
  *param_2 = 0;
  uVar3 = (int)*param_1 >> 0x1f & 7;
  uVar2 = *param_1 + uVar3;
  uVar4 = uVar2 & 0xfffffff8;
  *param_1 = uVar4;
  if (0 < (int)((uVar2 & 7) - uVar3)) {
    *param_1 = uVar4 + 8;
  }
  cVar1 = FUN_140154160(param_1,local_res8,2);
  if (cVar1 != '\0') {
    FUN_140154340(param_1);
    *param_2 = (uint)local_res8[0];
    return 1;
  }
  return 0;
}



ulonglong FUN_140154e00(undefined8 param_1,longlong param_2)

{
  ulonglong uVar1;
  
  *(undefined4 *)(param_2 + 8) = DAT_140320450;
  *(undefined2 *)(param_2 + 0xc) = DAT_140320454;
  uVar1 = FUN_14004fa60();
  if ((char)uVar1 == '\x01') {
    uVar1 = FUN_14004f0a0(param_1,(undefined2 *)(param_2 + 0xc));
    if ((char)uVar1 == '\x01') {
      return uVar1;
    }
  }
  return uVar1 & 0xffffffffffffff00;
}



undefined8 FUN_140154e60(uint *param_1,undefined4 *param_2)

{
  char cVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  undefined4 local_res8 [2];
  
  *param_2 = 0;
  uVar3 = (int)*param_1 >> 0x1f & 7;
  uVar2 = *param_1 + uVar3;
  uVar4 = uVar2 & 0xfffffff8;
  *param_1 = uVar4;
  if (0 < (int)((uVar2 & 7) - uVar3)) {
    *param_1 = uVar4 + 8;
  }
  cVar1 = FUN_140154160(param_1,local_res8,4);
  if (cVar1 != '\0') {
    FUN_140154340(param_1);
    *param_2 = local_res8[0];
    return 1;
  }
  return 0;
}



undefined1 FUN_140154ee0(undefined8 param_1,longlong param_2)

{
  char cVar1;
  
  cVar1 = FUN_140154c00();
  if (cVar1 != '\0') {
    cVar1 = FUN_14004fa60(param_1,param_2 + 4);
    if (cVar1 != '\0') {
      cVar1 = FUN_14004ed60(param_1,param_2 + 8);
      if (cVar1 != '\0') {
        cVar1 = FUN_140154d00(param_1,param_2 + 0x10);
        if (cVar1 != '\0') {
          cVar1 = FUN_14004fa60(param_1,param_2 + 0x14);
          if (cVar1 != '\0') {
            cVar1 = FUN_14004f190(param_1,param_2 + 0x18);
            if (cVar1 != '\0') {
              cVar1 = FUN_14004fa60(param_1,param_2 + 0x1c);
              if (cVar1 != '\0') {
                cVar1 = FUN_14004fa60(param_1,param_2 + 0x20);
                if (cVar1 != '\0') {
                  cVar1 = FUN_14004f190(param_1,param_2 + 0x24);
                  if (cVar1 != '\0') {
                    cVar1 = FUN_14004f190(param_1,param_2 + 0x25);
                    if (cVar1 != '\0') {
                      cVar1 = FUN_14004f190(param_1,param_2 + 0x26);
                      if (cVar1 != '\0') {
                        cVar1 = FUN_14004f190(param_1,param_2 + 0x27);
                        if (cVar1 != '\0') {
                          cVar1 = FUN_14004fa60(param_1,param_2 + 0x28);
                          if (cVar1 != '\0') {
                            cVar1 = FUN_14004f190(param_1,param_2 + 0x2c);
                            if (cVar1 != '\0') {
                              cVar1 = FUN_14004f190(param_1,param_2 + 0x2d);
                              if (cVar1 != '\0') {
                                return 1;
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  return 0;
}



undefined8 *
FUN_140155010(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  uint *puVar4;
  uint *puVar5;
  uint *puVar6;
  uint uVar7;
  uint *local_res18 [2];
  undefined8 uVar8;
  
  uVar8 = 0xfffffffffffffffe;
  FUN_1401568c0();
  puVar6 = (uint *)PTR_DAT_140320098;
  local_res18[0] = (uint *)PTR_DAT_140320098;
  uVar1 = FUN_1401567e0(param_2);
  if (puVar6 == (uint *)0x0) {
    iVar2 = 0;
  }
  else if (puVar6 == (uint *)PTR_DAT_140320098) {
    iVar2 = 0;
  }
  else {
    iVar2 = *(int *)((longlong)puVar6 + -8);
  }
  uVar3 = uVar1;
  if ((int)uVar1 <= iVar2) {
    if (puVar6 == (uint *)0x0) {
      uVar3 = 0;
    }
    else if (puVar6 == (uint *)PTR_DAT_140320098) {
      uVar3 = 0;
    }
    else {
      uVar3 = *(uint *)((longlong)puVar6 + -8);
    }
  }
  uVar7 = 1;
  if (1 < (int)uVar3) {
    uVar7 = uVar3;
  }
  if (puVar6 == (uint *)0x0) {
    iVar2 = 0;
  }
  else if (puVar6 == (uint *)PTR_DAT_140320098) {
    iVar2 = 0;
  }
  else {
    iVar2 = *(int *)((longlong)puVar6 + -8);
  }
  if ((int)uVar7 <= iVar2) goto LAB_140155168;
  if (puVar6 == (uint *)0x0) {
    puVar6 = (uint *)PTR_DAT_140320098;
  }
  local_res18[0] = puVar6;
  if ((int)uVar7 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (uVar7 == 0) {
    FUN_140050520(local_res18);
    goto LAB_140155168;
  }
  if (puVar6 == (uint *)0x0) {
    uVar3 = 0;
  }
  else if (puVar6 == (uint *)PTR_DAT_140320098) {
    uVar3 = 0;
  }
  else {
    uVar3 = puVar6[-2];
  }
  if (uVar7 == uVar3) goto LAB_140155168;
  puVar4 = (uint *)FUN_140156940();
  if (puVar4 != (uint *)0x0) {
    *puVar4 = 0;
    puVar4[1] = 1;
  }
  *puVar4 = uVar7;
  if (puVar6 == (uint *)0x0) {
    uVar3 = 0;
  }
  else if (puVar6 == (uint *)PTR_DAT_140320098) {
    uVar3 = 0;
  }
  else {
    uVar3 = puVar6[-2];
  }
  puVar5 = (uint *)PTR_DAT_140320098;
  if ((int)uVar7 < (int)uVar3) {
LAB_140155142:
    if (puVar6 != (uint *)0x0) {
      puVar5 = puVar6;
    }
  }
  else {
    if (puVar6 != (uint *)0x0) {
      if (puVar6 == (uint *)PTR_DAT_140320098) {
        uVar7 = 0;
      }
      else {
        uVar7 = puVar6[-2];
      }
      goto LAB_140155142;
    }
    uVar7 = 0;
  }
  FUN_140156810(puVar4 + 2,puVar5,uVar7,param_4,uVar8);
  FUN_140050520(local_res18);
  local_res18[0] = puVar4 + 2;
LAB_140155168:
  FUN_1401242e0(local_res18);
  puVar6 = local_res18[0];
  puVar4 = local_res18[0];
  if (local_res18[0] == (uint *)0x0) {
    puVar4 = (uint *)PTR_DAT_140320098;
  }
  FUN_140156810(puVar4,param_2,uVar1,param_4,uVar8);
  uVar3 = FUN_1401567e0();
  uVar1 = 0;
  if (0 < (int)uVar3) {
    uVar1 = uVar3;
  }
  if (puVar6 == (uint *)0x0) {
    uVar3 = 0;
  }
  else if (puVar6 == (uint *)PTR_DAT_140320098) {
    uVar3 = 0;
  }
  else {
    uVar3 = puVar6[-2];
  }
  if ((int)uVar3 <= (int)uVar1) {
    if (puVar6 == (uint *)0x0) {
      uVar1 = 0;
    }
    else if (puVar6 == (uint *)PTR_DAT_140320098) {
      uVar1 = 0;
    }
    else {
      uVar1 = puVar6[-2];
    }
  }
  if (((puVar6 != (uint *)PTR_DAT_140320098) && (puVar6 != (uint *)0x0)) &&
     (puVar4 = puVar6 + -2, puVar4 != (uint *)0x0)) {
    *puVar4 = uVar1;
    *(undefined1 *)((longlong)(int)uVar1 + 8 + (longlong)puVar4) = 0;
  }
  puVar4 = (uint *)*param_1;
  if ((uint *)*param_1 == (uint *)0x0) {
    puVar4 = (uint *)PTR_DAT_140320098;
  }
  *param_1 = puVar4;
  if (puVar6 != puVar4) {
    uVar8 = FUN_1401568c0();
    FUN_140156b50(uVar8);
    FUN_140050520(param_1);
    *param_1 = puVar6;
    if (((puVar6 != (uint *)PTR_DAT_140320098) && (puVar6 != (uint *)0x0)) &&
       (puVar6 != (uint *)0x8)) {
      puVar6[-1] = puVar6[-1] + 1;
    }
    FUN_140156be0(uVar8);
  }
  if (((puVar6 != (uint *)0x0) && (puVar6 != (uint *)PTR_DAT_140320098)) &&
     (puVar6 + -2 != (uint *)0x0)) {
    uVar8 = FUN_1401568c0();
    FUN_140156b50(uVar8);
    puVar4 = puVar6 + -1;
    *puVar4 = *puVar4 - 1;
    if (*puVar4 == 0) {
      FUN_140156970(puVar6 + -2);
    }
    FUN_140156be0(uVar8);
  }
  return param_1;
}



undefined1 FUN_1401552c0(undefined8 param_1,longlong param_2)

{
  char cVar1;
  undefined1 uVar2;
  undefined8 uVar3;
  int iVar4;
  ulonglong local_res18 [2];
  
  cVar1 = FUN_140154a70(param_1,local_res18);
  if (cVar1 == '\0') {
    return 0;
  }
  iVar4 = (int)local_res18[0];
  if ((-1 < iVar4) && (iVar4 <= DAT_140320d70)) {
    FUN_14015d550(param_2,local_res18[0] & 0xffffffff);
    if (*(int *)(param_2 + 0x18) == 0) {
      uVar3 = 0;
    }
    else {
      uVar3 = *(undefined8 *)(param_2 + 0x10);
    }
    uVar2 = FUN_1401543d0(param_1,uVar3,iVar4 * 8);
    return uVar2;
  }
  return 0;
}



void FUN_140155350(undefined8 param_1,longlong param_2)

{
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 8));
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 0xc));
  return;
}



undefined1 thunk_FUN_1401552c0(undefined8 param_1,longlong param_2)

{
  char cVar1;
  undefined1 uVar2;
  undefined8 uVar3;
  int iVar4;
  ulonglong auStackX_18 [2];
  
  cVar1 = FUN_140154a70(param_1,auStackX_18);
  if (cVar1 == '\0') {
    return 0;
  }
  iVar4 = (int)auStackX_18[0];
  if ((-1 < iVar4) && (iVar4 <= DAT_140320d70)) {
    FUN_14015d550(param_2,auStackX_18[0] & 0xffffffff);
    if (*(int *)(param_2 + 0x18) == 0) {
      uVar3 = 0;
    }
    else {
      uVar3 = *(undefined8 *)(param_2 + 0x10);
    }
    uVar2 = FUN_1401543d0(param_1,uVar3,iVar4 * 8);
    return uVar2;
  }
  return 0;
}



void FUN_140155390(undefined8 param_1,undefined1 *param_2)

{
  FUN_14004fd90(param_1,*param_2);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 4));
  FUN_14004fbc0(param_1,*(undefined8 *)(param_2 + 8));
  FUN_14004fd90(param_1,param_2[0x10]);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x14));
  FUN_14004fd90(param_1,param_2[0x18]);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x1c));
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x20));
  FUN_14004fd90(param_1,param_2[0x24]);
  FUN_14004fd90(param_1,param_2[0x25]);
  FUN_14004fd90(param_1,param_2[0x26]);
  FUN_14004fd90(param_1,param_2[0x27]);
  FUN_14004fe70(param_1,*(undefined4 *)(param_2 + 0x28));
  FUN_14004fd90(param_1,param_2[0x2c]);
  FUN_14004fd90(param_1,param_2[0x2d]);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined1 FUN_140155460(uint *param_1,int *param_2)

{
  char cVar1;
  undefined1 uVar2;
  uint uVar3;
  int iVar4;
  int *piVar5;
  undefined8 uVar6;
  uint uVar7;
  uint uVar8;
  int *piVar9;
  int iVar10;
  int iVar11;
  undefined1 auStack_118 [32];
  char local_f8 [8];
  int *local_f0;
  undefined1 *local_e8;
  int **local_e0;
  int *local_d8;
  undefined8 local_d0;
  undefined1 *local_c8;
  undefined1 local_c0 [136];
  ulonglong local_38;
  
  local_d0 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  uVar8 = (int)*param_1 >> 0x1f & 7;
  uVar3 = *param_1 + uVar8;
  uVar7 = uVar3 & 0xfffffff8;
  *param_1 = uVar7;
  if (0 < (int)((uVar3 & 7) - uVar8)) {
    *param_1 = uVar7 + 8;
  }
  cVar1 = FUN_140154160(param_1,local_f8,1);
  if (cVar1 == '\0') {
    return 0;
  }
  FUN_140154340(param_1);
  cVar1 = FUN_140154a70(param_1,&local_f0);
  piVar5 = local_f0;
  if (cVar1 == '\0') {
    return 0;
  }
  iVar10 = (int)local_f0;
  if ((iVar10 < 0) || (0x100000 < iVar10)) {
    FUN_140156300(&local_c8,L"CMessage.ReadString failed! length=%d",
                  (ulonglong)local_f0 & 0xffffffff);
                    // WARNING: Subroutine does not return
    _CxxThrowException(&local_c8,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_f8[0] == '\x01') {
    local_f0 = param_2;
    local_e8 = (undefined1 *)FUN_1401243d0(param_2,iVar10 + 1);
    *local_e8 = 0;
    local_e8[iVar10] = 0;
    uVar2 = FUN_1401543d0(param_1,local_e8,(ulonglong)piVar5 & 0xffffffff);
    FUN_1401244c0(param_2);
    return uVar2;
  }
  FUN_1401568c0();
  local_f0 = (int *)PTR_DAT_1403200a0;
  iVar4 = iVar10 + 1;
  local_e0 = &local_f0;
  if (iVar4 < 1) {
    iVar4 = 0;
  }
  iVar11 = 1;
  if (1 < iVar4) {
    iVar11 = iVar4;
  }
  if (iVar11 < 1) goto LAB_140155623;
  local_f0 = (int *)PTR_DAT_1403200a0;
  if (iVar11 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (iVar11 == 0) {
    FUN_14004f990(&local_f0);
    goto LAB_140155623;
  }
  piVar5 = (int *)FUN_140156940((longlong)iVar11 * 2 + 10);
  if (piVar5 != (int *)0x0) {
    *piVar5 = 0;
    piVar5[1] = 1;
  }
  *piVar5 = iVar11;
  iVar4 = 0;
  if ((local_f0 != (int *)0x0) && (iVar4 = 0, local_f0 != (int *)PTR_DAT_1403200a0)) {
    iVar4 = local_f0[-2];
  }
  piVar9 = (int *)PTR_DAT_1403200a0;
  if (iVar11 < iVar4) {
LAB_1401555fd:
    if (local_f0 != (int *)0x0) {
      piVar9 = local_f0;
    }
  }
  else {
    iVar11 = 0;
    if (local_f0 != (int *)0x0) {
      if (local_f0 != (int *)PTR_DAT_1403200a0) {
        iVar11 = local_f0[-2];
      }
      goto LAB_1401555fd;
    }
  }
  FUN_140156770(piVar5 + 2,piVar9,iVar11);
  FUN_14004f990(&local_f0);
  local_f0 = piVar5 + 2;
LAB_140155623:
  FUN_14004f670(&local_f0);
  local_d8 = local_f0;
  if (local_f0 == (int *)0x0) {
    local_d8 = (int *)PTR_DAT_1403200a0;
  }
  *(undefined2 *)local_d8 = 0;
  *(undefined2 *)((longlong)local_d8 + (longlong)iVar10 * 2) = 0;
  cVar1 = FUN_1401543d0(param_1,local_d8,iVar10 * 2);
  if (cVar1 == '\0') {
    FUN_14004f380(&local_f0);
    piVar5 = local_f0;
    if (((local_f0 != (int *)0x0) && (local_f0 != (int *)PTR_DAT_1403200a0)) &&
       (piVar9 = local_f0 + -2, piVar9 != (int *)0x0)) {
      uVar6 = FUN_1401568c0();
      local_e0 = (int **)uVar6;
      FUN_140156b50(uVar6);
      local_d8 = (int *)CONCAT71(local_d8._1_7_,1);
      piVar5 = piVar5 + -1;
      *piVar5 = *piVar5 + -1;
      if (*piVar5 == 0) {
        FUN_140156970(piVar9);
      }
      FUN_140156be0(uVar6);
    }
    return 0;
  }
  FUN_14004f380(&local_f0);
  piVar5 = local_f0;
  if (local_f0 == (int *)0x0) {
    piVar5 = (int *)PTR_DAT_1403200a0;
  }
  local_c8 = local_c0;
  FUN_140153e40(&local_c8,piVar5,3);
  FUN_140155010(param_2,local_c8);
  if (local_c8 != local_c0) {
    free(local_c8);
  }
  piVar5 = local_f0;
  if (((local_f0 != (int *)0x0) && (local_f0 != (int *)PTR_DAT_1403200a0)) &&
     (piVar9 = local_f0 + -2, piVar9 != (int *)0x0)) {
    uVar6 = FUN_1401568c0();
    local_e0 = (int **)uVar6;
    FUN_140156b50(uVar6);
    local_d8 = (int *)CONCAT71(local_d8._1_7_,1);
    piVar5 = piVar5 + -1;
    *piVar5 = *piVar5 + -1;
    if (*piVar5 == 0) {
      FUN_140156970(piVar9);
    }
    FUN_140156be0(uVar6);
  }
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined1 FUN_1401557c0(uint *param_1,int *param_2)

{
  char cVar1;
  undefined1 uVar2;
  uint uVar3;
  int iVar4;
  int *piVar5;
  undefined8 uVar6;
  uint uVar7;
  uint uVar8;
  int *piVar9;
  int *piVar10;
  int iVar11;
  int iVar12;
  undefined1 auStack_1e8 [32];
  char local_1c8 [8];
  int *local_1c0;
  undefined2 *local_1b8;
  int **local_1b0;
  int *local_1a8;
  undefined8 local_1a0;
  undefined1 local_198 [80];
  undefined1 *local_148;
  undefined1 local_140 [264];
  ulonglong local_38;
  
  local_1a0 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_1e8;
  uVar8 = (int)*param_1 >> 0x1f & 7;
  uVar3 = *param_1 + uVar8;
  uVar7 = uVar3 & 0xfffffff8;
  *param_1 = uVar7;
  if (0 < (int)((uVar3 & 7) - uVar8)) {
    *param_1 = uVar7 + 8;
  }
  cVar1 = FUN_140154160(param_1,local_1c8,1);
  if (cVar1 == '\0') {
    return 0;
  }
  FUN_140154340(param_1);
  cVar1 = FUN_140154a70(param_1,&local_1c0);
  piVar10 = local_1c0;
  if (cVar1 == '\0') {
    return 0;
  }
  iVar11 = (int)local_1c0;
  if ((iVar11 < 0) || (0x100000 < iVar11)) {
    FUN_140156300(local_198,L"CMessage.ReadString failed! length=%d",
                  (ulonglong)local_1c0 & 0xffffffff);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_198,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_1c8[0] == '\x02') {
    local_1c0 = param_2;
    local_1b8 = (undefined2 *)FUN_14004f760(param_2,iVar11 + 1);
    *local_1b8 = 0;
    local_1b8[iVar11] = 0;
    uVar2 = FUN_1401543d0(param_1,local_1b8,iVar11 * 2);
    FUN_14004f380(param_2);
    return uVar2;
  }
  FUN_1401568c0();
  local_1c0 = (int *)PTR_DAT_140320098;
  iVar4 = iVar11 + 1;
  local_1b0 = &local_1c0;
  if (iVar4 < 1) {
    iVar4 = 0;
  }
  iVar12 = 1;
  if (1 < iVar4) {
    iVar12 = iVar4;
  }
  if (iVar12 < 1) goto LAB_140155986;
  local_1c0 = (int *)PTR_DAT_140320098;
  if (iVar12 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (iVar12 == 0) {
    FUN_140050520(&local_1c0);
    goto LAB_140155986;
  }
  piVar5 = (int *)FUN_140156940((longlong)iVar12 + 9);
  if (piVar5 != (int *)0x0) {
    *piVar5 = 0;
    piVar5[1] = 1;
  }
  *piVar5 = iVar12;
  iVar4 = 0;
  if ((local_1c0 != (int *)0x0) && (iVar4 = 0, local_1c0 != (int *)PTR_DAT_140320098)) {
    iVar4 = local_1c0[-2];
  }
  piVar9 = (int *)PTR_DAT_140320098;
  if (iVar12 < iVar4) {
LAB_140155960:
    if (local_1c0 != (int *)0x0) {
      piVar9 = local_1c0;
    }
  }
  else {
    iVar12 = 0;
    if (local_1c0 != (int *)0x0) {
      if (local_1c0 != (int *)PTR_DAT_140320098) {
        iVar12 = local_1c0[-2];
      }
      goto LAB_140155960;
    }
  }
  FUN_140156810(piVar5 + 2,piVar9,iVar12);
  FUN_140050520(&local_1c0);
  local_1c0 = piVar5 + 2;
LAB_140155986:
  FUN_1401242e0(&local_1c0);
  local_1a8 = local_1c0;
  if (local_1c0 == (int *)0x0) {
    local_1a8 = (int *)PTR_DAT_140320098;
  }
  *(undefined1 *)local_1a8 = 0;
  *(undefined1 *)((longlong)iVar11 + (longlong)local_1a8) = 0;
  cVar1 = FUN_1401543d0(param_1,local_1a8,(ulonglong)piVar10 & 0xffffffff);
  if (cVar1 == '\0') {
    FUN_1401244c0(&local_1c0);
    piVar10 = local_1c0;
    if (((local_1c0 != (int *)0x0) && (local_1c0 != (int *)PTR_DAT_140320098)) &&
       (piVar5 = local_1c0 + -2, piVar5 != (int *)0x0)) {
      uVar6 = FUN_1401568c0();
      local_1b0 = (int **)uVar6;
      FUN_140156b50(uVar6);
      local_1a8 = (int *)CONCAT71(local_1a8._1_7_,1);
      piVar10 = piVar10 + -1;
      *piVar10 = *piVar10 + -1;
      if (*piVar10 == 0) {
        FUN_140156970(piVar5);
      }
      FUN_140156be0(uVar6);
    }
    return 0;
  }
  FUN_1401244c0(&local_1c0);
  piVar10 = local_1c0;
  if (local_1c0 == (int *)0x0) {
    piVar10 = (int *)PTR_DAT_140320098;
  }
  local_148 = local_140;
  FUN_140142dc0(&local_148,piVar10,3);
  FUN_14004ce80(param_2,local_148);
  if (local_148 != local_140) {
    free(local_148);
  }
  piVar10 = local_1c0;
  if (((local_1c0 != (int *)0x0) && (local_1c0 != (int *)PTR_DAT_140320098)) &&
     (piVar5 = local_1c0 + -2, piVar5 != (int *)0x0)) {
    uVar6 = FUN_1401568c0();
    local_1b0 = (int **)uVar6;
    FUN_140156b50(uVar6);
    local_1a8 = (int *)CONCAT71(local_1a8._1_7_,1);
    piVar10 = piVar10 + -1;
    *piVar10 = *piVar10 + -1;
    if (*piVar10 == 0) {
      FUN_140156970(piVar5);
    }
    FUN_140156be0(uVar6);
  }
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140155b20(longlong param_1)

{
  undefined1 uVar1;
  int iVar2;
  longlong lVar3;
  undefined8 uVar4;
  int iVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  ulonglong uVar8;
  longlong lVar9;
  ulonglong uVar10;
  undefined8 *_Dst;
  undefined1 auStack_128 [32];
  undefined1 local_108 [80];
  undefined1 local_b8 [12];
  undefined8 local_ac [12];
  uint local_48;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_128;
  FUN_140183750(local_b8);
  uVar10 = (ulonglong)(int)local_48;
  if (local_48 == 0) {
    return;
  }
  lVar9 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  lVar3 = *(longlong *)(param_1 + 8);
  if (lVar3 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
LAB_140155b8d:
    if ((int)local_48 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (*(longlong *)(param_1 + 0x10) == 0) {
      FUN_140156300(local_108,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_108,(ThrowInfo *)&DAT_14031d928);
    }
    iVar2 = *(int *)(param_1 + 0x18);
    iVar5 = iVar2 + local_48;
    if ((iVar5 < 0) || (*(int *)(param_1 + 0x1c) < iVar5)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(int *)(param_1 + 0x18) = iVar5;
    _Dst = (undefined8 *)(*(longlong *)(param_1 + 0x10) + (longlong)iVar2);
    if (uVar10 < 0x21) {
      puVar6 = local_ac;
      uVar8 = (ulonglong)(local_48 & 7);
      for (uVar10 = uVar10 >> 3; uVar10 != 0; uVar10 = uVar10 - 1) {
        uVar4 = *puVar6;
        puVar6 = puVar6 + 1;
        *_Dst = uVar4;
        _Dst = _Dst + 1;
      }
      if (uVar8 != 0) {
        puVar7 = puVar6;
        do {
          uVar1 = *(undefined1 *)puVar7;
          puVar7 = (undefined8 *)((longlong)puVar7 + 1);
          uVar8 = uVar8 - 1;
          *(undefined1 *)((longlong)_Dst + (-1 - (longlong)puVar6) + (longlong)puVar7) = uVar1;
        } while (uVar8 != 0);
      }
      goto LAB_140155cdf;
    }
  }
  else {
    if (*(longlong *)(param_1 + 0x10) != 0) goto LAB_140155b8d;
    if (lVar3 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if ((int)local_48 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    iVar2 = *(int *)(lVar3 + 0x18);
    FUN_140050060(lVar3,iVar2 + local_48);
    if (*(int *)(lVar3 + 0x18) != 0) {
      lVar9 = *(longlong *)(lVar3 + 0x10);
    }
    _Dst = (undefined8 *)(lVar9 + iVar2);
    if (uVar10 < 0x21) {
      puVar6 = local_ac;
      uVar8 = (ulonglong)(local_48 & 7);
      for (uVar10 = uVar10 >> 3; uVar10 != 0; uVar10 = uVar10 - 1) {
        uVar4 = *puVar6;
        puVar6 = puVar6 + 1;
        *_Dst = uVar4;
        _Dst = _Dst + 1;
      }
      if (uVar8 != 0) {
        puVar7 = puVar6;
        do {
          uVar1 = *(undefined1 *)puVar7;
          puVar7 = (undefined8 *)((longlong)puVar7 + 1);
          uVar8 = uVar8 - 1;
          *(undefined1 *)((longlong)_Dst + (-1 - (longlong)puVar6) + (longlong)puVar7) = uVar1;
        } while (uVar8 != 0);
      }
      goto LAB_140155cdf;
    }
  }
  memcpy(_Dst,local_ac,uVar10);
LAB_140155cdf:
  FUN_1400501f0(param_1);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined1 thunk_FUN_140155460(uint *param_1,int *param_2)

{
  char cVar1;
  undefined1 uVar2;
  uint uVar3;
  int iVar4;
  int *piVar5;
  undefined8 uVar6;
  uint uVar7;
  uint uVar8;
  int *piVar9;
  int iVar10;
  int iVar11;
  undefined1 auStack_118 [32];
  char acStack_f8 [8];
  int *piStack_f0;
  undefined1 *puStack_e8;
  int **ppiStack_e0;
  int *piStack_d8;
  undefined8 uStack_d0;
  undefined1 *puStack_c8;
  undefined1 auStack_c0 [136];
  ulonglong uStack_38;
  
  uStack_d0 = 0xfffffffffffffffe;
  uStack_38 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  uVar8 = (int)*param_1 >> 0x1f & 7;
  uVar3 = *param_1 + uVar8;
  uVar7 = uVar3 & 0xfffffff8;
  *param_1 = uVar7;
  if (0 < (int)((uVar3 & 7) - uVar8)) {
    *param_1 = uVar7 + 8;
  }
  cVar1 = FUN_140154160(param_1,acStack_f8,1);
  if (cVar1 == '\0') {
    return 0;
  }
  FUN_140154340(param_1);
  cVar1 = FUN_140154a70(param_1,&piStack_f0);
  piVar5 = piStack_f0;
  if (cVar1 == '\0') {
    return 0;
  }
  iVar10 = (int)piStack_f0;
  if ((iVar10 < 0) || (0x100000 < iVar10)) {
    FUN_140156300(&puStack_c8,L"CMessage.ReadString failed! length=%d",
                  (ulonglong)piStack_f0 & 0xffffffff);
                    // WARNING: Subroutine does not return
    _CxxThrowException(&puStack_c8,(ThrowInfo *)&DAT_14031d928);
  }
  if (acStack_f8[0] == '\x01') {
    piStack_f0 = param_2;
    puStack_e8 = (undefined1 *)FUN_1401243d0(param_2,iVar10 + 1);
    *puStack_e8 = 0;
    puStack_e8[iVar10] = 0;
    uVar2 = FUN_1401543d0(param_1,puStack_e8,(ulonglong)piVar5 & 0xffffffff);
    FUN_1401244c0(param_2);
    return uVar2;
  }
  FUN_1401568c0();
  piStack_f0 = (int *)PTR_DAT_1403200a0;
  iVar4 = iVar10 + 1;
  ppiStack_e0 = &piStack_f0;
  if (iVar4 < 1) {
    iVar4 = 0;
  }
  iVar11 = 1;
  if (1 < iVar4) {
    iVar11 = iVar4;
  }
  if (iVar11 < 1) goto LAB_140155623;
  piStack_f0 = (int *)PTR_DAT_1403200a0;
  if (iVar11 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (iVar11 == 0) {
    FUN_14004f990(&piStack_f0);
    goto LAB_140155623;
  }
  piVar5 = (int *)FUN_140156940((longlong)iVar11 * 2 + 10);
  if (piVar5 != (int *)0x0) {
    *piVar5 = 0;
    piVar5[1] = 1;
  }
  *piVar5 = iVar11;
  iVar4 = 0;
  if ((piStack_f0 != (int *)0x0) && (iVar4 = 0, piStack_f0 != (int *)PTR_DAT_1403200a0)) {
    iVar4 = piStack_f0[-2];
  }
  piVar9 = (int *)PTR_DAT_1403200a0;
  if (iVar11 < iVar4) {
LAB_1401555fd:
    if (piStack_f0 != (int *)0x0) {
      piVar9 = piStack_f0;
    }
  }
  else {
    iVar11 = 0;
    if (piStack_f0 != (int *)0x0) {
      if (piStack_f0 != (int *)PTR_DAT_1403200a0) {
        iVar11 = piStack_f0[-2];
      }
      goto LAB_1401555fd;
    }
  }
  FUN_140156770(piVar5 + 2,piVar9,iVar11);
  FUN_14004f990(&piStack_f0);
  piStack_f0 = piVar5 + 2;
LAB_140155623:
  FUN_14004f670(&piStack_f0);
  piStack_d8 = piStack_f0;
  if (piStack_f0 == (int *)0x0) {
    piStack_d8 = (int *)PTR_DAT_1403200a0;
  }
  *(undefined2 *)piStack_d8 = 0;
  *(undefined2 *)((longlong)piStack_d8 + (longlong)iVar10 * 2) = 0;
  cVar1 = FUN_1401543d0(param_1,piStack_d8,iVar10 * 2);
  if (cVar1 == '\0') {
    FUN_14004f380(&piStack_f0);
    piVar5 = piStack_f0;
    if (((piStack_f0 != (int *)0x0) && (piStack_f0 != (int *)PTR_DAT_1403200a0)) &&
       (piVar9 = piStack_f0 + -2, piVar9 != (int *)0x0)) {
      uVar6 = FUN_1401568c0();
      ppiStack_e0 = (int **)uVar6;
      FUN_140156b50(uVar6);
      piStack_d8 = (int *)CONCAT71(piStack_d8._1_7_,1);
      piVar5 = piVar5 + -1;
      *piVar5 = *piVar5 + -1;
      if (*piVar5 == 0) {
        FUN_140156970(piVar9);
      }
      FUN_140156be0(uVar6);
    }
    return 0;
  }
  FUN_14004f380(&piStack_f0);
  piVar5 = piStack_f0;
  if (piStack_f0 == (int *)0x0) {
    piVar5 = (int *)PTR_DAT_1403200a0;
  }
  puStack_c8 = auStack_c0;
  FUN_140153e40(&puStack_c8,piVar5,3);
  FUN_140155010(param_2,puStack_c8);
  if (puStack_c8 != auStack_c0) {
    free(puStack_c8);
  }
  piVar5 = piStack_f0;
  if (((piStack_f0 != (int *)0x0) && (piStack_f0 != (int *)PTR_DAT_1403200a0)) &&
     (piVar9 = piStack_f0 + -2, piVar9 != (int *)0x0)) {
    uVar6 = FUN_1401568c0();
    ppiStack_e0 = (int **)uVar6;
    FUN_140156b50(uVar6);
    piStack_d8 = (int *)CONCAT71(piStack_d8._1_7_,1);
    piVar5 = piVar5 + -1;
    *piVar5 = *piVar5 + -1;
    if (*piVar5 == 0) {
      FUN_140156970(piVar9);
    }
    FUN_140156be0(uVar6);
  }
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined1 thunk_FUN_1401557c0(uint *param_1,int *param_2)

{
  char cVar1;
  undefined1 uVar2;
  uint uVar3;
  int iVar4;
  int *piVar5;
  undefined8 uVar6;
  uint uVar7;
  uint uVar8;
  int *piVar9;
  int *piVar10;
  int iVar11;
  int iVar12;
  undefined1 auStack_1e8 [32];
  char acStack_1c8 [8];
  int *piStack_1c0;
  undefined2 *puStack_1b8;
  int **ppiStack_1b0;
  int *piStack_1a8;
  undefined8 uStack_1a0;
  undefined1 auStack_198 [80];
  undefined1 *puStack_148;
  undefined1 auStack_140 [264];
  ulonglong uStack_38;
  
  uStack_1a0 = 0xfffffffffffffffe;
  uStack_38 = DAT_1403223c0 ^ (ulonglong)auStack_1e8;
  uVar8 = (int)*param_1 >> 0x1f & 7;
  uVar3 = *param_1 + uVar8;
  uVar7 = uVar3 & 0xfffffff8;
  *param_1 = uVar7;
  if (0 < (int)((uVar3 & 7) - uVar8)) {
    *param_1 = uVar7 + 8;
  }
  cVar1 = FUN_140154160(param_1,acStack_1c8,1);
  if (cVar1 == '\0') {
    return 0;
  }
  FUN_140154340(param_1);
  cVar1 = FUN_140154a70(param_1,&piStack_1c0);
  piVar10 = piStack_1c0;
  if (cVar1 == '\0') {
    return 0;
  }
  iVar11 = (int)piStack_1c0;
  if ((iVar11 < 0) || (0x100000 < iVar11)) {
    FUN_140156300(auStack_198,L"CMessage.ReadString failed! length=%d",
                  (ulonglong)piStack_1c0 & 0xffffffff);
                    // WARNING: Subroutine does not return
    _CxxThrowException(auStack_198,(ThrowInfo *)&DAT_14031d928);
  }
  if (acStack_1c8[0] == '\x02') {
    piStack_1c0 = param_2;
    puStack_1b8 = (undefined2 *)FUN_14004f760(param_2,iVar11 + 1);
    *puStack_1b8 = 0;
    puStack_1b8[iVar11] = 0;
    uVar2 = FUN_1401543d0(param_1,puStack_1b8,iVar11 * 2);
    FUN_14004f380(param_2);
    return uVar2;
  }
  FUN_1401568c0();
  piStack_1c0 = (int *)PTR_DAT_140320098;
  iVar4 = iVar11 + 1;
  ppiStack_1b0 = &piStack_1c0;
  if (iVar4 < 1) {
    iVar4 = 0;
  }
  iVar12 = 1;
  if (1 < iVar4) {
    iVar12 = iVar4;
  }
  if (iVar12 < 1) goto LAB_140155986;
  piStack_1c0 = (int *)PTR_DAT_140320098;
  if (iVar12 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (iVar12 == 0) {
    FUN_140050520(&piStack_1c0);
    goto LAB_140155986;
  }
  piVar5 = (int *)FUN_140156940((longlong)iVar12 + 9);
  if (piVar5 != (int *)0x0) {
    *piVar5 = 0;
    piVar5[1] = 1;
  }
  *piVar5 = iVar12;
  iVar4 = 0;
  if ((piStack_1c0 != (int *)0x0) && (iVar4 = 0, piStack_1c0 != (int *)PTR_DAT_140320098)) {
    iVar4 = piStack_1c0[-2];
  }
  piVar9 = (int *)PTR_DAT_140320098;
  if (iVar12 < iVar4) {
LAB_140155960:
    if (piStack_1c0 != (int *)0x0) {
      piVar9 = piStack_1c0;
    }
  }
  else {
    iVar12 = 0;
    if (piStack_1c0 != (int *)0x0) {
      if (piStack_1c0 != (int *)PTR_DAT_140320098) {
        iVar12 = piStack_1c0[-2];
      }
      goto LAB_140155960;
    }
  }
  FUN_140156810(piVar5 + 2,piVar9,iVar12);
  FUN_140050520(&piStack_1c0);
  piStack_1c0 = piVar5 + 2;
LAB_140155986:
  FUN_1401242e0(&piStack_1c0);
  piStack_1a8 = piStack_1c0;
  if (piStack_1c0 == (int *)0x0) {
    piStack_1a8 = (int *)PTR_DAT_140320098;
  }
  *(undefined1 *)piStack_1a8 = 0;
  *(undefined1 *)((longlong)iVar11 + (longlong)piStack_1a8) = 0;
  cVar1 = FUN_1401543d0(param_1,piStack_1a8,(ulonglong)piVar10 & 0xffffffff);
  if (cVar1 == '\0') {
    FUN_1401244c0(&piStack_1c0);
    piVar10 = piStack_1c0;
    if (((piStack_1c0 != (int *)0x0) && (piStack_1c0 != (int *)PTR_DAT_140320098)) &&
       (piVar5 = piStack_1c0 + -2, piVar5 != (int *)0x0)) {
      uVar6 = FUN_1401568c0();
      ppiStack_1b0 = (int **)uVar6;
      FUN_140156b50(uVar6);
      piStack_1a8 = (int *)CONCAT71(piStack_1a8._1_7_,1);
      piVar10 = piVar10 + -1;
      *piVar10 = *piVar10 + -1;
      if (*piVar10 == 0) {
        FUN_140156970(piVar5);
      }
      FUN_140156be0(uVar6);
    }
    return 0;
  }
  FUN_1401244c0(&piStack_1c0);
  piVar10 = piStack_1c0;
  if (piStack_1c0 == (int *)0x0) {
    piVar10 = (int *)PTR_DAT_140320098;
  }
  puStack_148 = auStack_140;
  FUN_140142dc0(&puStack_148,piVar10,3);
  FUN_14004ce80(param_2,puStack_148);
  if (puStack_148 != auStack_140) {
    free(puStack_148);
  }
  piVar10 = piStack_1c0;
  if (((piStack_1c0 != (int *)0x0) && (piStack_1c0 != (int *)PTR_DAT_140320098)) &&
     (piVar5 = piStack_1c0 + -2, piVar5 != (int *)0x0)) {
    uVar6 = FUN_1401568c0();
    ppiStack_1b0 = (int **)uVar6;
    FUN_140156b50(uVar6);
    piStack_1a8 = (int *)CONCAT71(piStack_1a8._1_7_,1);
    piVar10 = piVar10 + -1;
    *piVar10 = *piVar10 + -1;
    if (*piVar10 == 0) {
      FUN_140156970(piVar5);
    }
    FUN_140156be0(uVar6);
  }
  return 1;
}



void FUN_140155d40(undefined8 param_1,undefined8 param_2,uint param_3)

{
  undefined1 local_58 [80];
  
  if (param_3 < 0x100001) {
    FUN_14004fd90(param_1,1);
    FUN_140155b20(param_1,(longlong)(int)param_3);
    FUN_1400502d0(param_1,param_2,param_3);
    return;
  }
  FUN_140156300(local_58,L"CMessage.WriteString failed! length=%d",param_3);
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



void FUN_140155dc0(undefined8 param_1,undefined8 param_2,uint param_3)

{
  undefined1 local_58 [80];
  
  if (param_3 < 0x100001) {
    FUN_14004fd90(param_1,2);
    FUN_140155b20(param_1,(longlong)(int)param_3);
    FUN_1400502d0(param_1,param_2,param_3 * 2);
    return;
  }
  FUN_140156300(local_58,L"CMessage.WriteString failed! length=%d",param_3);
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



void FUN_140155e40(undefined8 param_1,longlong param_2)

{
  int iVar1;
  undefined8 uVar2;
  
  iVar1 = *(int *)(param_2 + 0x18);
  FUN_140155b20(param_1,(longlong)iVar1);
  if (*(int *)(param_2 + 0x18) == 0) {
    uVar2 = 0;
  }
  else {
    uVar2 = *(undefined8 *)(param_2 + 0x10);
  }
  FUN_1400502d0(param_1,uVar2,iVar1 * 8);
  return;
}



undefined1 FUN_140155e90(undefined8 param_1,longlong param_2)

{
  char cVar1;
  
  cVar1 = FUN_140155460();
  if (cVar1 != '\0') {
    cVar1 = FUN_14004f0a0(param_1,param_2 + 8);
    if (cVar1 != '\0') {
      return 1;
    }
  }
  return 0;
}



void FUN_140155ee0(undefined8 param_1,longlong *param_2)

{
  undefined *puVar1;
  undefined *puVar2;
  
  puVar1 = (undefined *)*param_2;
  if ((puVar1 != (undefined *)0x0) && (puVar1 != PTR_DAT_140320098)) {
    puVar2 = puVar1;
    if (puVar1 == (undefined *)0x0) {
      puVar2 = PTR_DAT_140320098;
    }
    FUN_140155d40(param_1,puVar2,*(undefined4 *)(puVar1 + -8));
    return;
  }
  if (puVar1 == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  FUN_140155d40(param_1,puVar1,0);
  return;
}



void FUN_140155f20(undefined8 param_1,longlong *param_2)

{
  undefined *puVar1;
  undefined *puVar2;
  
  puVar1 = (undefined *)*param_2;
  if ((puVar1 != (undefined *)0x0) && (puVar1 != PTR_DAT_1403200a0)) {
    puVar2 = puVar1;
    if (puVar1 == (undefined *)0x0) {
      puVar2 = PTR_DAT_1403200a0;
    }
    FUN_140155dc0(param_1,puVar2,*(undefined4 *)(puVar1 + -8));
    return;
  }
  if (puVar1 == (undefined *)0x0) {
    puVar1 = PTR_DAT_1403200a0;
  }
  FUN_140155dc0(param_1,puVar1,0);
  return;
}



void FUN_140155f60(undefined8 param_1,short *param_2)

{
  short sVar1;
  ulonglong uVar2;
  short *psVar3;
  undefined1 local_58 [80];
  
  uVar2 = 0xffffffffffffffff;
  psVar3 = param_2;
  do {
    if (uVar2 == 0) break;
    uVar2 = uVar2 - 1;
    sVar1 = *psVar3;
    psVar3 = psVar3 + 1;
  } while (sVar1 != 0);
  uVar2 = ~uVar2 - 1;
  if (0x7fffffff < uVar2) {
    FUN_140156300(local_58,L"WriteString failed! length=%I64d",uVar2);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  FUN_140155dc0(param_1,param_2,uVar2 & 0xffffffff);
  return;
}



void FUN_140155fc0(undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  undefined4 uVar2;
  
  puVar1 = (undefined *)*param_2;
  if ((puVar1 == (undefined *)0x0) || (puVar1 == PTR_DAT_140320098)) {
    uVar2 = 0;
  }
  else {
    uVar2 = *(undefined4 *)(puVar1 + -8);
  }
  if (puVar1 == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  FUN_140155d40(param_1,puVar1,uVar2,param_4,0xfffffffffffffffe);
  FUN_140050340(param_1,(short)param_2[1]);
  FUN_140050520(param_2);
  return;
}



undefined8 FUN_140156030(undefined8 param_1,uint param_2)

{
  FUN_1401858d0();
  if ((param_2 & 1) != 0) {
    FUN_140183990(param_1);
  }
  return param_1;
}



void FUN_140156060(longlong param_1)

{
  FUN_140156b50(&DAT_1403284b0);
  if ((*(short *)(param_1 + -8) == 0x1de6) && (*(longlong *)(param_1 + 0x30) == 0)) {
    *(short **)(param_1 + 0x30) = DAT_1403284e8;
    DAT_1403284e8 = (short *)(param_1 + -8);
    FUN_140156be0(&DAT_1403284b0);
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_1401560e0(longlong *param_1)

{
  longlong *plVar1;
  
  if (*param_1 != 0) {
    plVar1 = (longlong *)(*param_1 + 0x28);
    *plVar1 = *plVar1 + -1;
    if (*(longlong *)(*param_1 + 0x28) == 0) {
      FUN_140156060();
    }
    *param_1 = 0;
  }
  return;
}



undefined2 *
FUN_140156120(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined2 *puVar2;
  undefined2 *puVar3;
  undefined8 uVar4;
  undefined *puVar5;
  undefined1 uVar6;
  
  uVar4 = 0xfffffffffffffffe;
  puVar5 = &DAT_1403284b0;
  FUN_140156b50();
  puVar3 = DAT_1403284e8;
  uVar6 = 1;
  if (DAT_1403284e8 == (undefined2 *)0x0) {
    puVar2 = (undefined2 *)FUN_140156940();
    puVar3 = (undefined2 *)0x0;
    if (puVar2 != (undefined2 *)0x0) {
      *(undefined8 *)(puVar2 + 8) = 0;
      *(undefined8 *)(puVar2 + 0xc) = 0;
      *(undefined8 *)(puVar2 + 0x10) = 0;
      *(undefined8 *)(puVar2 + 0x14) = 0;
      *(undefined ***)(puVar2 + 4) = Proud::ByteArray::vftable;
      *(undefined8 *)(puVar2 + 0x18) = 0;
      *puVar2 = 0x1de6;
      *(undefined8 *)(puVar2 + 0x1c) = 0;
      puVar3 = puVar2;
    }
  }
  else {
    puVar1 = (undefined8 *)(DAT_1403284e8 + 0x1c);
    DAT_1403284e8 = *(undefined2 **)(DAT_1403284e8 + 0x1c);
    *puVar1 = 0;
  }
  FUN_140050060(puVar3 + 4,0,param_3,param_4,uVar4,puVar5,uVar6);
  FUN_140156be0(&DAT_1403284b0);
  return puVar3 + 4;
}



void FUN_1401561e0(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *local_res8 [4];
  undefined8 uVar1;
  undefined1 local_50 [80];
  
  uVar1 = 0xfffffffffffffffe;
  FUN_140158700(local_res8);
  FUN_14004f840(local_res8,L".dmp",param_3,param_4,uVar1);
  if (local_res8[0] == (undefined *)0x0) {
    local_res8[0] = PTR_DAT_1403200a0;
  }
  FUN_140183a30(local_res8[0],0);
  FUN_140156300(local_50,PTR_u_error__ArrayPtr_is_null__140320000);
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
}



undefined * FUN_140156250(longlong param_1)

{
  undefined *puVar1;
  
  puVar1 = *(undefined **)(param_1 + 0x40);
  if (*(undefined **)(param_1 + 0x40) == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  return puVar1;
}



void FUN_140156260(exception *param_1)

{
  *(undefined ***)param_1 = Proud::Exception::vftable;
  FUN_140050520(param_1 + 0x40);
                    // WARNING: Could not recover jumptable at 0x000140156292. Too many branches
                    // WARNING: Treating indirect jump as call
  std::exception::~exception(param_1);
  return;
}



exception * FUN_1401562a0(exception *param_1,undefined8 param_2)

{
  std::exception::exception(param_1);
  *(undefined ***)param_1 = Proud::Exception::vftable;
  FUN_1401568c0();
  *(undefined **)(param_1 + 0x40) = PTR_DAT_140320098;
  *(undefined8 *)(param_1 + 0x20) = param_2;
  *(undefined4 *)(param_1 + 0x18) = 0;
  *(undefined4 *)(param_1 + 0x38) = 4;
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

exception * FUN_140156300(exception *param_1,wchar_t *param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  undefined *puVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  undefined *puVar6;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined1 auStack_928 [32];
  undefined *local_908;
  undefined1 local_900;
  exception *local_8f8;
  undefined8 local_8f0;
  undefined1 *local_8e8;
  undefined1 local_8e0 [136];
  wchar_t local_858 [1040];
  ulonglong local_38;
  
  local_8f0 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_928;
  local_res18 = param_3;
  local_res20 = param_4;
  local_8f8 = param_1;
  std::exception::exception(param_1);
  *(undefined ***)param_1 = Proud::Exception::vftable;
  FUN_1401568c0();
  *(undefined **)(param_1 + 0x40) = PTR_DAT_140320098;
  FUN_1401568c0();
  puVar2 = PTR_DAT_1403200a0;
  local_908 = PTR_DAT_1403200a0;
  if (param_2 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  iVar3 = vswprintf_s(local_858,0x400,param_2,(va_list)&local_res18);
  iVar4 = 0;
  if ((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) {
    iVar4 = *(int *)(puVar2 + -8);
  }
  iVar5 = iVar3;
  if (((iVar3 <= iVar4) && (iVar5 = 0, puVar2 != (undefined *)0x0)) && (puVar2 != PTR_DAT_1403200a0)
     ) {
    iVar5 = *(int *)(puVar2 + -8);
  }
  iVar4 = 1;
  if (1 < iVar5) {
    iVar4 = iVar5;
  }
  iVar5 = 0;
  if ((puVar2 != (undefined *)0x0) && (iVar5 = 0, puVar2 != PTR_DAT_1403200a0)) {
    iVar5 = *(int *)(puVar2 + -8);
  }
  if (iVar5 < iVar4) {
    FUN_14004f590(&local_908);
  }
  FUN_14004f670(&local_908);
  puVar2 = local_908;
  puVar6 = local_908;
  if (local_908 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar6,local_858,iVar3);
  puVar6 = puVar2;
  if (puVar2 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(puVar6);
  iVar4 = 0;
  if (0 < iVar3) {
    iVar4 = iVar3;
  }
  iVar3 = 0;
  if ((puVar2 != (undefined *)0x0) && (iVar3 = 0, puVar2 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(puVar2 + -8);
  }
  if ((iVar4 < iVar3) || (iVar4 = 0, puVar2 == (undefined *)0x0)) {
LAB_140156472:
    if (puVar2 != PTR_DAT_1403200a0) {
      puVar6 = PTR_DAT_1403200a0;
      if (puVar2 == (undefined *)0x0) goto LAB_1401564a0;
      if ((int *)(puVar2 + -8) != (int *)0x0) {
        *(int *)(puVar2 + -8) = iVar4;
        *(undefined2 *)(puVar2 + (longlong)iVar4 * 2) = 0;
      }
    }
  }
  else if (puVar2 != PTR_DAT_1403200a0) {
    iVar4 = *(int *)(puVar2 + -8);
    goto LAB_140156472;
  }
  puVar6 = PTR_DAT_1403200a0;
  if (puVar2 != (undefined *)0x0) {
    puVar6 = puVar2;
  }
LAB_1401564a0:
  local_8e8 = local_8e0;
  FUN_140153e40(&local_8e8,puVar6,3);
  FUN_140155010(param_1 + 0x40,local_8e8);
  if (local_8e8 != local_8e0) {
    free(local_8e8);
  }
  *(undefined4 *)(param_1 + 0x18) = 0;
  *(undefined4 *)(param_1 + 0x38) = 1;
  if (((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) &&
     (puVar2 + -8 != (undefined *)0x0)) {
    puVar6 = (undefined *)FUN_1401568c0();
    local_908 = puVar6;
    FUN_140156b50(puVar6);
    local_900 = 1;
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
    FUN_140156be0(puVar6);
  }
  return param_1;
}



exception *
FUN_140156550(exception *param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  std::exception::exception(param_1);
  *(undefined ***)param_1 = Proud::Exception::vftable;
  FUN_1401568c0();
  *(undefined **)(param_1 + 0x40) = PTR_DAT_140320098;
  uVar1 = (**(code **)(*param_2 + 8))(param_2);
  FUN_140155010(param_1 + 0x40,uVar1,param_3,param_4,uVar2);
  *(longlong **)(param_1 + 0x28) = param_2;
  *(undefined4 *)(param_1 + 0x18) = 0;
  *(undefined4 *)(param_1 + 0x38) = 2;
  return param_1;
}



exception *
FUN_1401565d0(exception *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  longlong lVar2;
  longlong *plVar3;
  longlong *local_res10;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  std::exception::exception(param_1);
  *(undefined ***)param_1 = Proud::Exception::vftable;
  FUN_1401568c0();
  *(undefined **)(param_1 + 0x40) = PTR_DAT_140320098;
  plVar3 = (longlong *)FUN_1400010f0(param_2,&local_res10,param_3,param_4,uVar4);
  puVar1 = (undefined8 *)*plVar3;
  if (puVar1 == (undefined8 *)0x0) {
    uVar4 = 0;
  }
  else {
    if (puVar1[1] == 0) {
      uVar4 = FUN_140201620(*puVar1);
      puVar1[1] = uVar4;
    }
    uVar4 = puVar1[1];
  }
  FUN_140155010(param_1 + 0x40,uVar4);
  if (local_res10 != (longlong *)0x0) {
    LOCK();
    plVar3 = local_res10 + 2;
    lVar2 = *plVar3;
    *(int *)plVar3 = (int)*plVar3 + -1;
    UNLOCK();
    if (((int)lVar2 == 1) && (local_res10 != (longlong *)0x0)) {
      if (*local_res10 != 0) {
        Ordinal_6();
      }
      if ((void *)local_res10[1] != (void *)0x0) {
        operator_delete__((void *)local_res10[1]);
      }
      operator_delete(local_res10);
    }
  }
  *(undefined8 *)(param_1 + 0x30) = param_2;
  *(undefined4 *)(param_1 + 0x18) = 0;
  *(undefined4 *)(param_1 + 0x38) = 3;
  return param_1;
}



void FUN_1401566b0(void)

{
  undefined1 local_58 [88];
  
  FUN_140156300(local_58,L"An invalid argument is detected!");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



void FUN_1401566e0(void)

{
  undefined1 local_58 [88];
  
  FUN_140156300(local_58,L"Array index out of range!");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



void FUN_140156710(undefined8 param_1)

{
  undefined1 local_58 [88];
  
  FUN_140156300(local_58,L"32bit integer out of range! %s",param_1);
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



int FUN_140156740(short *param_1)

{
  short sVar1;
  longlong lVar2;
  
  if (param_1 == (short *)0x0) {
    return 0;
  }
  lVar2 = -1;
  do {
    if (lVar2 == 0) break;
    lVar2 = lVar2 + -1;
    sVar1 = *param_1;
    param_1 = param_1 + 1;
  } while (sVar1 != 0);
  return ~(uint)lVar2 - 1;
}



void FUN_140156770(void *param_1,void *param_2,int param_3)

{
  memcpy(param_1,param_2,(longlong)(param_3 + 1) * 2);
  return;
}



int FUN_140156780(ushort *param_1,longlong param_2)

{
  ushort uVar1;
  ushort uVar2;
  uint uVar3;
  
  param_2 = param_2 - (longlong)param_1;
  do {
    uVar1 = *param_1;
    uVar2 = *(ushort *)((longlong)param_1 + param_2);
    if (uVar1 != uVar2) {
      uVar3 = (uint)(uVar1 < uVar2);
      return (1 - uVar3) - (uint)(uVar3 != 0);
    }
    param_1 = param_1 + 1;
  } while (uVar1 != 0);
  return 0;
}



int __cdecl vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,wchar_t *_Format,va_list _ArgList)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001401567a0. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = vswprintf_s(_Dst,_SizeInWords,_Format,_ArgList);
  return iVar1;
}



wchar_t * __cdecl wcsstr(wchar_t *_Str,wchar_t *_SubStr)

{
  wchar_t *pwVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001401567b0. Too many branches
                    // WARNING: Treating indirect jump as call
  pwVar1 = wcsstr(_Str,_SubStr);
  return pwVar1;
}



longlong FUN_1401567c0(longlong param_1)

{
  return param_1 + 2;
}



int __cdecl iswspace(wint_t _C)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001401567d0. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = iswspace(_C);
  return iVar1;
}



int FUN_1401567e0(char *param_1)

{
  char cVar1;
  longlong lVar2;
  
  if (param_1 == (char *)0x0) {
    return 0;
  }
  lVar2 = -1;
  do {
    if (lVar2 == 0) break;
    lVar2 = lVar2 + -1;
    cVar1 = *param_1;
    param_1 = param_1 + 1;
  } while (cVar1 != '\0');
  return ~(uint)lVar2 - 1;
}



void FUN_140156810(void *param_1,void *param_2,int param_3)

{
  memcpy(param_1,param_2,(longlong)param_3);
  *(undefined1 *)((longlong)param_3 + (longlong)param_1) = 0;
  return;
}



int FUN_140156840(byte *param_1,longlong param_2)

{
  byte bVar1;
  uint uVar2;
  
  param_2 = param_2 - (longlong)param_1;
  do {
    bVar1 = *param_1;
    if (bVar1 != param_1[param_2]) {
      uVar2 = (uint)(bVar1 < param_1[param_2]);
      return (1 - uVar2) - (uint)(uVar2 != 0);
    }
    param_1 = param_1 + 1;
  } while (bVar1 != 0);
  return 0;
}



int __cdecl vsprintf_s(char *_DstBuf,size_t _SizeInBytes,char *_Format,va_list _ArgList)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140156860. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = vsprintf_s(_DstBuf,_SizeInBytes,_Format,_ArgList);
  return iVar1;
}



char * FUN_140156870(char *param_1,size_t param_2)

{
  errno_t eVar1;
  char *pcVar2;
  
  eVar1 = _strupr_s(param_1,param_2);
  pcVar2 = (char *)0x0;
  if (eVar1 == 0) {
    pcVar2 = param_1;
  }
  return pcVar2;
}



char * __cdecl strstr(char *_Str,char *_SubStr)

{
  char *pcVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140156890. Too many branches
                    // WARNING: Treating indirect jump as call
  pcVar1 = strstr(_Str,_SubStr);
  return pcVar1;
}



uchar * __cdecl _mbsinc(uchar *_Ptr)

{
  uchar *puVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001401568a0. Too many branches
                    // WARNING: Treating indirect jump as call
  puVar1 = _mbsinc(_Ptr);
  return puVar1;
}



void FUN_1401568b0(char param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001401568b3. Too many branches
                    // WARNING: Treating indirect jump as call
  _ismbcspace((int)param_1);
  return;
}



undefined * FUN_1401568c0(void)

{
  undefined4 uVar1;
  undefined8 in_R9;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  if ((DAT_140328528 & 1) == 0) {
    DAT_140328528 = DAT_140328528 | 1;
    uVar1 = FUN_14015a430();
    FUN_140156a70(&DAT_1403284f0,uVar1,1,in_R9,uVar2);
    atexit((_func_5014 *)&LAB_140257e60);
  }
  DAT_140328520 = 1;
  return &DAT_1403284f0;
}



undefined8 * FUN_140156920(undefined8 *param_1)

{
  *param_1 = Proud::CFastHeap::vftable;
  return param_1;
}



void FUN_140156930(undefined8 *param_1)

{
  *param_1 = Proud::CFastHeap::vftable;
  return;
}



void FUN_140156940(SIZE_T param_1)

{
  HANDLE hHeap;
  SIZE_T dwBytes;
  
  dwBytes = 1;
  if (param_1 != 0) {
    dwBytes = param_1;
  }
  hHeap = GetProcessHeap();
                    // WARNING: Could not recover jumptable at 0x000140156965. Too many branches
                    // WARNING: Treating indirect jump as call
  HeapAlloc(hHeap,0,dwBytes);
  return;
}



void FUN_140156970(LPVOID param_1)

{
  HANDLE hHeap;
  
  hHeap = GetProcessHeap();
                    // WARNING: Could not recover jumptable at 0x00014015698c. Too many branches
                    // WARNING: Treating indirect jump as call
  HeapFree(hHeap,0,param_1);
  return;
}



void FUN_1401569a0(undefined8 param_1,longlong param_2)

{
  HANDLE pvVar1;
  longlong lVar2;
  
  lVar2 = 1;
  if (param_2 != 0) {
    lVar2 = param_2;
  }
  pvVar1 = GetProcessHeap();
                    // WARNING: Could not recover jumptable at 0x0001401569d4. Too many branches
                    // WARNING: Treating indirect jump as call
  HeapReAlloc(pvVar1,0,param_1,lVar2);
  return;
}



undefined8 * FUN_1401569e0(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::CFastHeap::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8
FUN_140156a10(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  HANDLE hHeap;
  LPVOID pvVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  hHeap = GetProcessHeap();
  pvVar1 = HeapAlloc(hHeap,0,0x80);
  if (pvVar1 == (LPVOID)0x0) {
    uVar2 = 0;
  }
  else {
    uVar2 = FUN_1401842c0(pvVar1,param_1,param_2,param_4,uVar2);
  }
  return uVar2;
}



undefined4 * FUN_140156a70(undefined4 *param_1,DWORD param_2,char param_3)

{
  int iVar1;
  BOOL BVar2;
  longlong lVar3;
  undefined1 local_58 [80];
  
  *(undefined1 *)(param_1 + 0xc) = 0;
  *param_1 = 0x3faf713;
  iVar1 = FUN_140157f20();
  if (iVar1 == 1) {
    param_2 = 0;
  }
  if ((param_3 != '\0') && (lVar3 = FUN_140158090(), *(longlong *)(lVar3 + 0x50) != 0)) {
    lVar3 = FUN_140158090();
    iVar1 = (**(code **)(lVar3 + 0x50))(param_1 + 2,param_2,0x1000000);
    if (iVar1 != 0) {
      return param_1;
    }
    FUN_140156300(local_58,L"InitializeCriticalSectionEx Failure!",
                  L"Proud::CriticalSection::CriticalSection");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  if (param_2 == 0) {
    InitializeCriticalSection((LPCRITICAL_SECTION)(param_1 + 2));
  }
  else {
    BVar2 = InitializeCriticalSectionAndSpinCount((LPCRITICAL_SECTION)(param_1 + 2),param_2);
    if (BVar2 == 0) {
      FUN_140156300(local_58,L"InitializeCriticalSectionEx Failure!",
                    L"Proud::CriticalSection::CriticalSection");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
  }
  return param_1;
}



void FUN_140156b50(int *param_1)

{
  if (*param_1 != 0x3faf713) {
    FUN_1401580e0(
                 L"Cannot enter critical section which has been already destroyed! NOTE: This may be solved by deleting CNetClient instance before your WinMain() finishes working."
                 );
  }
                    // WARNING: Could not recover jumptable at 0x000140156b76. Too many branches
                    // WARNING: Treating indirect jump as call
  EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 2));
  return;
}



void FUN_140156b80(int *param_1)

{
  if (*param_1 == 0x3faf713) {
    EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 2));
  }
  return;
}



bool FUN_140156ba0(int *param_1)

{
  BOOL BVar1;
  
  if (*param_1 != 0x3faf713) {
    FUN_1401580e0(
                 L"Lock invalid critical section is prohibited! NOTE: This may be solved by manually destroying ProudNet related objects if they are defined as Global Objects."
                 );
  }
  BVar1 = TryEnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 2));
  return BVar1 != 0;
}



void FUN_140156be0(longlong param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140156be4. Too many branches
                    // WARNING: Treating indirect jump as call
  LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 8));
  return;
}



bool FUN_140156bf0(int *param_1)

{
  return *param_1 == 0x3faf713;
}



void FUN_140156c00(undefined4 *param_1)

{
  undefined1 local_58 [80];
  
  if (*(char *)(param_1 + 0xc) == '\0') {
    if ((*(longlong *)(param_1 + 6) != 0) && (*(longlong *)(param_1 + 6) != -1)) {
      FUN_140156300(local_58,L"Critical section is still in use! Destruction may cause problems!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    DeleteCriticalSection((LPCRITICAL_SECTION)(param_1 + 2));
    *param_1 = 0;
    *(undefined8 *)(param_1 + 2) = 0;
    *(undefined8 *)(param_1 + 4) = 0;
    *(undefined8 *)(param_1 + 6) = 0;
    *(undefined8 *)(param_1 + 8) = 0;
    *(undefined8 *)(param_1 + 10) = 0;
  }
  return;
}



bool FUN_140156c80(longlong param_1)

{
  DWORD DVar1;
  
  DVar1 = GetCurrentThreadId();
  return *(ulonglong *)(param_1 + 0x18) == (ulonglong)DVar1;
}



undefined8 * FUN_140156ca0(undefined8 *param_1)

{
  *(undefined4 *)((longlong)param_1 + 0x14) = 1;
  param_1[1] = 0;
  *param_1 = Proud::IRmiProxy::vftable;
  *(undefined1 *)(param_1 + 2) = 0;
  *(undefined1 *)(param_1 + 3) = 1;
  return param_1;
}



void FUN_140156cd0(undefined8 *param_1)

{
  *param_1 = Proud::IRmiProxy::vftable;
  if (param_1[1] != 0) {
    FUN_1401580e0(
                 L"RMI Proxy which is still in use by ProudNet core cannot be destroyed! Destroy CNetClient or CNetServer instance first."
                 );
  }
  return;
}



undefined8 * FUN_140156d00(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::IRmiProxy::vftable;
  if (param_1[1] != 0) {
    FUN_1401580e0(
                 L"RMI Proxy which is still in use by ProudNet core cannot be destroyed! Destroy CNetClient or CNetServer instance first."
                 );
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



longlong FUN_140156d50(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = param_1[1];
  if (lVar1 == 0) {
    lVar1 = *param_1;
    if (lVar1 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(int *)(lVar1 + 0x18) != 0) {
      return *(longlong *)(lVar1 + 0x10);
    }
    lVar1 = 0;
  }
  return lVar1;
}



void FUN_140156d90(longlong *param_1)

{
  if (*param_1 != 0) {
    if (*(int *)((longlong)param_1 + 0xc) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_1 + 1) = 0;
  }
  return;
}



void FUN_140156dc0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined1 local_50 [80];
  
  if (*(longlong *)(param_1 + 0xc80) == 0) {
    FUN_140156300(local_50,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0,param_3,param_4,
                  0xfffffffffffffffe);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
  }
  if (*(int *)(param_1 + 0xc8c) < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(undefined4 *)(param_1 + 0xc88) = 0;
  if (*(longlong *)(param_1 + 0xc80) != 0) {
    if (*(int *)(param_1 + 0xc8c) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_1 + 0xc88) = 0;
  }
  return;
}



void FUN_140156e40(longlong param_1,undefined8 param_2,undefined4 param_3)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  undefined4 uStack_5c;
  undefined1 local_58 [88];
  
  lVar2 = *(longlong *)(param_1 + 0xc80);
  if (lVar2 == 0) {
    FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  iVar1 = *(int *)(param_1 + 0xc88);
  if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  iVar3 = iVar1 + 1;
  if ((-1 < iVar3) && (iVar3 <= *(int *)(param_1 + 0xc8c))) {
    *(int *)(param_1 + 0xc88) = iVar3;
    *(undefined8 *)(lVar2 + (longlong)iVar1 * 0x10) = param_2;
    *(ulonglong *)(lVar2 + 8 + (longlong)iVar1 * 0x10) = CONCAT44(uStack_5c,param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_140156ed0(longlong param_1,longlong param_2)

{
  longlong lVar1;
  int iVar2;
  int iVar3;
  longlong lVar4;
  int iVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  undefined1 local_58 [80];
  
  if (*(longlong *)(param_2 + 0xc80) == 0) {
    FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  iVar2 = *(int *)(param_2 + 0xc88);
  if (*(longlong *)(param_1 + 0xc80) == 0) {
    FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  iVar3 = *(int *)(param_1 + 0xc88);
  iVar5 = iVar3 + iVar2;
  if (*(longlong *)(param_1 + 0xc80) == 0) {
    FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  if ((-1 < iVar5) && (iVar5 <= *(int *)(param_1 + 0xc8c))) {
    *(int *)(param_1 + 0xc88) = iVar5;
    if (*(longlong *)(param_1 + 0xc80) == 0) {
      FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    if (*(longlong *)(param_2 + 0xc80) == 0) {
      FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    uVar6 = 0;
    if (0 < iVar2) {
      lVar1 = *(longlong *)(param_1 + 0xc80) + (longlong)iVar3 * 0x10;
      uVar7 = uVar6;
      uVar8 = uVar6;
      do {
        lVar4 = *(longlong *)(param_2 + 0xc80);
        if (lVar4 == 0) {
          FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
        if (((longlong)uVar7 < 0) || (*(int *)(param_2 + 0xc88) <= (int)uVar6)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        uVar7 = uVar7 + 1;
        uVar9 = uVar8 + 0x10;
        *(undefined8 *)(lVar1 + -0x10 + uVar9) = *(undefined8 *)(uVar8 + lVar4);
        uVar6 = (ulonglong)((int)uVar6 + 1);
        *(undefined8 *)(lVar1 + -8 + uVar9) = *(undefined8 *)(uVar8 + 8 + lVar4);
        uVar8 = uVar9;
      } while ((longlong)uVar7 < (longlong)iVar2);
    }
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_140157080(longlong param_1)

{
  FUN_1401560e0(param_1 + 8);
  if (*(longlong *)(param_1 + 0x10) != 0) {
    if (*(int *)(param_1 + 0x1c) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_1 + 0x18) = 0;
  }
  return;
}



longlong FUN_1401570d0(longlong param_1,longlong param_2)

{
  undefined4 uVar1;
  longlong lVar2;
  longlong lVar3;
  undefined1 local_58 [80];
  
  *(undefined4 *)(param_1 + 0xc8c) = 200;
  lVar3 = 0;
  *(undefined4 *)(param_1 + 0xc88) = 0;
  *(longlong *)(param_1 + 0xc80) = param_1;
  lVar2 = *(longlong *)(param_2 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_2 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    uVar1 = *(undefined4 *)(param_2 + 0x18);
  }
  else {
    uVar1 = *(undefined4 *)(lVar2 + 0x18);
  }
  if (*(longlong *)(param_2 + 0x10) == 0) {
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0(param_1,param_2,uVar1,0,0xfffffffffffffffe);
    }
    if (*(int *)(lVar2 + 0x18) != 0) {
      lVar3 = *(longlong *)(lVar2 + 0x10);
    }
  }
  else {
    lVar3 = *(longlong *)(param_2 + 0x10);
    if (lVar3 == 0) {
      FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
  }
  FUN_140156e40(param_1,lVar3);
  return param_1;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_140157190(longlong *param_1,longlong param_2,int param_3,longlong param_4,
                       undefined8 param_5,undefined8 param_6,undefined4 param_7)

{
  byte bVar1;
  undefined4 uVar2;
  ulonglong uVar3;
  longlong lVar4;
  undefined1 auStack_1ac8 [32];
  longlong local_1aa8;
  undefined8 local_1a98;
  undefined8 uStack_1a90;
  undefined4 local_1a88;
  undefined4 local_1a84;
  undefined4 local_1a80;
  undefined4 local_1a7c;
  undefined8 local_1a78;
  undefined4 local_1a70;
  undefined8 local_1a68;
  undefined4 local_1a60;
  undefined4 local_1a5c;
  undefined4 local_1a58;
  undefined1 local_1a54;
  undefined1 local_1a53;
  undefined1 local_1a52;
  undefined4 local_1a50;
  undefined8 local_1a48;
  undefined1 local_1a40;
  undefined1 local_1a3f;
  undefined8 local_1a38;
  undefined1 local_1a28 [8];
  longlong local_1a20;
  longlong local_1a18;
  undefined4 local_1a10;
  int local_1a0c;
  undefined1 local_1a00 [136];
  undefined4 local_1978;
  undefined4 uStack_1974;
  undefined4 uStack_1970;
  undefined4 uStack_196c;
  undefined4 *local_cf8;
  undefined4 local_cf0;
  int local_cec;
  undefined1 local_ce8 [3200];
  undefined1 *local_68;
  undefined4 local_60;
  int local_5c;
  ulonglong local_58;
  undefined8 uStack_48;
  
  uStack_48 = 0x1401571af;
  local_1a38 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_1ac8;
  if (param_1[1] == 0) {
    uVar3 = FUN_1401580e0(L"ProudNet RMI Proxy is not attached yet!");
    uVar3 = uVar3 & 0xffffffffffffff00;
  }
  else {
    FUN_140157c50(param_4);
    FUN_1401544a0(local_1a28);
    FUN_140154120(local_1a28,local_1a00);
    FUN_14004fd90(local_1a28,1);
    local_5c = 200;
    local_60 = 0;
    local_68 = local_ce8;
    local_cec = 200;
    local_cf0 = 0;
    local_cf8 = &local_1978;
    if (local_1a20 == 0) {
      if (local_1a18 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
    }
    else {
      local_1a10 = *(undefined4 *)(local_1a20 + 0x18);
    }
    lVar4 = local_1a18;
    if (local_1a18 == 0) {
      if (local_1a20 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      lVar4 = 0;
      if (*(int *)(local_1a20 + 0x18) != 0) {
        lVar4 = *(longlong *)(local_1a20 + 0x10);
      }
    }
    uStack_1a90 = CONCAT44(uStack_1a90._4_4_,local_1a10);
    local_cf0 = 1;
    local_1a98._0_4_ = (undefined4)lVar4;
    local_1a98._4_4_ = (undefined4)((ulonglong)lVar4 >> 0x20);
    local_1978 = (undefined4)local_1a98;
    uStack_1974 = local_1a98._4_4_;
    uStack_196c = uStack_1a90._4_4_;
    local_1a98 = (longlong *)lVar4;
    uStack_1970 = local_1a10;
    FUN_140156ed0(local_ce8,&local_1978);
    if (local_cf8 == (undefined4 *)0x0) {
      FUN_140156300(&local_1a80,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(&local_1a80,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_cec < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_1401570d0(&local_1978,param_5);
    FUN_140156ed0(local_ce8,&local_1978);
    if (local_cf8 == (undefined4 *)0x0) {
      FUN_140156300(&local_1a80,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(&local_1a80,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_cec < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_1a80 = *(undefined4 *)(param_4 + 0x2c);
    local_1a7c = *(undefined4 *)(param_4 + 8);
    local_1a78 = *(undefined8 *)(param_4 + 0x10);
    local_1a70 = *(undefined4 *)(param_4 + 0x18);
    local_1a68 = *(undefined8 *)(param_4 + 0x20);
    local_1a60 = *(undefined4 *)(param_4 + 0x28);
    local_1a53 = *(undefined1 *)(param_4 + 0x30);
    local_1a54 = *(undefined1 *)(param_4 + 0x40);
    local_1a52 = *(undefined1 *)(param_4 + 0x41);
    local_1a5c = *(undefined4 *)(param_4 + 0x54);
    local_1a50 = 0xffffffff;
    local_1a48 = *(undefined8 *)(param_4 + 0x48);
    local_1a3f = *(undefined1 *)(param_4 + 0x50);
    local_1a40 = DAT_140320dfc;
    local_1a58 = *(undefined4 *)(param_4 + 0x58);
    local_1aa8 = CONCAT44(local_1aa8._4_4_,param_3);
    bVar1 = (**(code **)(*(longlong *)param_1[1] + 0x28))
                      ((longlong *)param_1[1],local_ce8,&local_1a80,param_2);
    if ((char)param_1[2] == '\0') {
      uVar2 = FUN_1401843d0(local_ce8);
      local_1a98 = (longlong *)CONCAT44(param_7,uVar2);
      uStack_1a90 = param_6;
      local_1a88 = *(undefined4 *)(param_4 + 0x54);
      local_1a84 = *(undefined4 *)(param_4 + 0x58);
      if (((char)param_1[3] != '\0') && (lVar4 = 0, 0 < param_3)) {
        do {
          (**(code **)(*param_1 + 0x10))
                    (param_1,*(undefined4 *)(param_2 + lVar4 * 4),&local_1a98,param_4);
          lVar4 = lVar4 + 1;
        } while (lVar4 < param_3);
      }
      local_1aa8 = param_4;
      (**(code **)(*(longlong *)param_1[1] + 0x68))
                ((longlong *)param_1[1],param_2,param_3,&local_1a98);
    }
    if (local_68 == (undefined1 *)0x0) {
      FUN_140156300(&local_1a80,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(&local_1a80,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_5c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_60 = 0;
    local_1a98 = &local_1a20;
    FUN_1401560e0(&local_1a20);
    if ((local_1a18 != 0) && (local_1a0c < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    uVar3 = (ulonglong)bVar1;
  }
  return uVar3;
}



undefined8 FUN_140157530(undefined8 param_1)

{
  FUN_140155e90();
  return param_1;
}



undefined8 FUN_140157550(undefined8 param_1,undefined8 param_2)

{
  FUN_1401543d0(param_1,param_2,0x10);
  return param_1;
}



void FUN_140157570(undefined4 param_1)

{
  undefined1 local_58 [88];
  
  FUN_140156300(local_58,&DAT_14025b120,param_1);
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



undefined8 FUN_1401575a0(undefined8 param_1,longlong param_2)

{
  undefined *local_18;
  undefined2 local_10;
  
  FUN_1401568c0();
  local_18 = PTR_DAT_140320098;
  FUN_140050450(&local_18,param_2);
  local_10 = *(undefined2 *)(param_2 + 8);
  FUN_140155fc0(param_1,&local_18);
  return param_1;
}



longlong FUN_140157600(longlong param_1,undefined8 param_2)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  undefined1 local_58 [80];
  
  lVar4 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (*(longlong *)(param_1 + 0x10) == 0) {
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(lVar2 + 0x18);
    FUN_140050060(lVar2,iVar1 + 0x10);
    if (*(int *)(lVar2 + 0x18) != 0) {
      lVar4 = *(longlong *)(lVar2 + 0x10);
    }
    FUN_140050120(lVar4 + iVar1,param_2,0x10);
    goto LAB_1401576d2;
  }
  if (*(longlong *)(param_1 + 0x10) == 0) {
    FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  iVar1 = *(int *)(param_1 + 0x18);
  iVar3 = iVar1 + 0x10;
  if ((iVar3 < 0) || (*(int *)(param_1 + 0x1c) < iVar3)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(int *)(param_1 + 0x18) = iVar3;
  FUN_140050120((longlong)iVar1 + *(longlong *)(param_1 + 0x10),param_2,0x10);
LAB_1401576d2:
  FUN_1400501f0(param_1);
  return param_1;
}



void FUN_140157700(undefined8 param_1,char *param_2)

{
  wchar_t *pwVar1;
  
  pwVar1 = L"false";
  if (*param_2 != '\0') {
    pwVar1 = L"true";
  }
  FUN_14004f840(param_1,pwVar1);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140157720(undefined8 param_1)

{
  undefined1 auStack_108 [32];
  wchar_t local_e8 [104];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_108;
  swprintf_s(local_e8,99,L"%d");
  FUN_14004f840(param_1,local_e8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140157780(undefined8 param_1)

{
  undefined1 auStack_108 [32];
  wchar_t local_e8 [104];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_108;
  swprintf_s(local_e8,99,L"%d");
  FUN_14004f840(param_1,local_e8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401577e0(undefined8 param_1)

{
  undefined1 auStack_108 [32];
  wchar_t local_e8 [104];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_108;
  swprintf_s(local_e8,99,L"%d");
  FUN_14004f840(param_1,local_e8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140157840(undefined8 param_1)

{
  undefined1 auStack_108 [32];
  wchar_t local_e8 [104];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_108;
  swprintf_s(local_e8,99,L"%d");
  FUN_14004f840(param_1,local_e8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401578a0(undefined8 param_1)

{
  undefined1 auStack_108 [32];
  wchar_t local_e8 [104];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_108;
  swprintf_s(local_e8,99,L"%ld");
  FUN_14004f840(param_1,local_e8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140157900(undefined8 param_1)

{
  undefined1 auStack_108 [32];
  wchar_t local_e8 [104];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_108;
  swprintf_s(local_e8,99,L"%I64d");
  FUN_14004f840(param_1,local_e8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140157960(undefined8 param_1)

{
  undefined1 auStack_108 [32];
  wchar_t local_e8 [104];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_108;
  swprintf_s(local_e8,99,L"%f");
  FUN_14004f840(param_1,local_e8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401579d0(undefined8 param_1)

{
  undefined1 auStack_108 [32];
  wchar_t local_e8 [104];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_108;
  swprintf_s(local_e8,99,L"%lf");
  FUN_14004f840(param_1,local_e8);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140157a40(undefined8 param_1,longlong *param_2)

{
  undefined *puVar1;
  undefined1 auStack_158 [32];
  undefined8 local_138;
  undefined1 *local_128;
  undefined1 local_120 [264];
  ulonglong local_18;
  
  local_138 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_158;
  FUN_14004f840(param_1,&DAT_14025b1d0);
  puVar1 = (undefined *)*param_2;
  if ((undefined *)*param_2 == (undefined *)0x0) {
    puVar1 = PTR_DAT_140320098;
  }
  local_128 = local_120;
  FUN_140142dc0(&local_128,puVar1,3);
  FUN_14004f840(param_1,local_128);
  if (local_128 != local_120) {
    free(local_128);
  }
  FUN_14004f840(param_1,&DAT_14025b1d0);
  return;
}



void FUN_140157b00(undefined8 param_1,undefined8 param_2)

{
  FUN_14004f840(param_1,&DAT_14025b1d0);
  FUN_14004cc50(param_1,param_2);
  FUN_14004f840(param_1,&DAT_14025b1d0);
  return;
}



void FUN_140157b40(undefined8 param_1)

{
  FUN_14004f840(param_1,L"<ByteArray>");
  return;
}



void FUN_140157b50(undefined8 param_1,UUID *param_2)

{
  RPC_STATUS RVar1;
  wchar_t *pwVar2;
  wchar_t *local_res18 [2];
  
  RVar1 = UuidToStringW(param_2,(RPC_WSTR *)local_res18);
  pwVar2 = L"<BAD>";
  if (RVar1 == 0) {
    pwVar2 = local_res18[0];
  }
  FUN_14004f840(param_1,pwVar2);
  RpcStringFreeW((RPC_WSTR *)local_res18);
  return;
}



undefined8 * FUN_140157ba0(undefined8 *param_1)

{
  *(undefined2 *)(param_1 + 1) = 0;
  param_1[2] = 0;
  *param_1 = Proud::IRmiStub::vftable;
  *(undefined2 *)(param_1 + 3) = 0;
  *(undefined1 *)((longlong)param_1 + 0x1a) = 0;
  return param_1;
}



void FUN_140157bd0(undefined8 *param_1)

{
  *param_1 = Proud::IRmiStub::vftable;
  if (param_1[2] != 0) {
    FUN_1401580e0(
                 L"RMI Stub which is still in use by ProudNet core cannot be destroyed! Destroy CNetClient or CNetServer instance first."
                 );
  }
  return;
}



undefined8 * FUN_140157c00(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::IRmiStub::vftable;
  if (param_1[2] != 0) {
    FUN_1401580e0(
                 L"RMI Stub which is still in use by ProudNet core cannot be destroyed! Destroy CNetClient or CNetServer instance first."
                 );
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140157c50(longlong param_1)

{
  undefined1 local_58 [88];
  
  if ((*(int *)(param_1 + 0x2c) == 0) &&
     ((*(int *)(param_1 + 0x28) < 2 || (4 < *(int *)(param_1 + 0x28))))) {
    FUN_140156300(local_58,L"RMI messaging cannot have Engine level priority!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  return;
}



undefined1 * FUN_140157c90(undefined1 *param_1)

{
  undefined4 uVar1;
  
  param_1[0x30] = 1;
  param_1[0x40] = 1;
  *param_1 = 0;
  *(undefined4 *)(param_1 + 0x28) = 3;
  *(undefined4 *)(param_1 + 0x2c) = 1;
  *(undefined8 *)(param_1 + 4) = 0;
  *(undefined8 *)(param_1 + 0x10) = DAT_140320d68;
  uVar1 = DAT_140320d78;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined4 *)(param_1 + 0x18) = uVar1;
  *(undefined8 *)(param_1 + 0x38) = 0;
  param_1[0x41] = 1;
  *(undefined8 *)(param_1 + 0x48) = 0;
  param_1[0x50] = 0;
  *(undefined8 *)(param_1 + 0x54) = 0;
  return param_1;
}



void FUN_140157ce0(undefined8 *param_1)

{
  *param_1 = Proud::INetCoreEvent::vftable;
  return;
}



void FUN_140157cf0(wchar_t *param_1,rsize_t param_2,wchar_t *param_3,rsize_t param_4)

{
  errno_t eVar1;
  
  eVar1 = wmemcpy_s(param_1,param_2,param_3,param_4);
  if (eVar1 != 0) {
    if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  return;
}



ushort * FUN_140157d40(HMODULE param_1,HRSRC param_2,uint param_3)

{
  DWORD DVar1;
  HGLOBAL hResData;
  ushort *puVar2;
  ushort *puVar3;
  
  hResData = LoadResource(param_1,param_2);
  if (hResData == (HGLOBAL)0x0) {
    return (ushort *)0x0;
  }
  puVar2 = LockResource(hResData);
  if (puVar2 != (ushort *)0x0) {
    DVar1 = SizeofResource(param_1,param_2);
    puVar3 = (ushort *)((ulonglong)DVar1 + (longlong)puVar2);
    for (param_3 = param_3 & 0xf; param_3 != 0; param_3 = param_3 - 1) {
      if (puVar3 <= puVar2) {
        return (ushort *)0x0;
      }
      puVar2 = puVar2 + (ulonglong)*puVar2 + 1;
    }
    if (puVar2 < puVar3) {
      if (*puVar2 == 0) {
        return (ushort *)0x0;
      }
      return puVar2;
    }
  }
  return (ushort *)0x0;
}



HMODULE FUN_140157de0(uint param_1,WORD param_2)

{
  HMODULE hModule;
  HRSRC pHVar1;
  longlong lVar2;
  int iVar3;
  
  hModule = ATL::CAtlBaseModule::GetHInstanceAt((CAtlBaseModule *)&DAT_14032e680,0);
  iVar3 = 0;
  while( true ) {
    if (hModule == (HMODULE)0x0) {
      return (HMODULE)0x0;
    }
    iVar3 = iVar3 + 1;
    pHVar1 = FindResourceExW(hModule,(LPCWSTR)0x6,
                             (LPCWSTR)(ulonglong)(ushort)((short)(param_1 >> 4) + 1),param_2);
    if ((pHVar1 != (HRSRC)0x0) && (lVar2 = FUN_140157d40(hModule,pHVar1,param_1), lVar2 != 0))
    break;
    hModule = ATL::CAtlBaseModule::GetHInstanceAt((CAtlBaseModule *)&DAT_14032e680,iVar3);
  }
  return hModule;
}



void FUN_140157ea0(wchar_t *param_1,int param_2,wchar_t *param_3,uint param_4)

{
  wchar_t wVar1;
  errno_t eVar2;
  longlong lVar3;
  wchar_t *pwVar4;
  
  if (param_4 == 0xffffffff) {
    lVar3 = -1;
    pwVar4 = param_3;
    do {
      if (lVar3 == 0) break;
      lVar3 = lVar3 + -1;
      wVar1 = *pwVar4;
      pwVar4 = pwVar4 + 1;
    } while (wVar1 != L'\0');
    param_4 = ~(uint)lVar3;
  }
  eVar2 = wmemcpy_s(param_1,(longlong)param_2,param_3,(longlong)(int)param_4);
  if (eVar2 != 0) {
    if (eVar2 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar2 == 0x16) || (eVar2 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar2 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  return;
}



DWORD FUN_140157f20(void)

{
  _SYSTEM_INFO local_38;
  
  GetSystemInfo(&local_38);
  return local_38.dwNumberOfProcessors;
}



undefined8 * FUN_140157f40(undefined8 *param_1)

{
  HMODULE hModule;
  FARPROC pFVar1;
  undefined1 local_58 [80];
  
  hModule = LoadLibraryA("kernel32.dll");
  param_1[0xc] = hModule;
  if (hModule == (HMODULE)0x0) {
    FUN_140156300(local_58,L"Cannot find kernel32.dll handle!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  pFVar1 = GetProcAddress(hModule,"CreateIoCompletionPort");
  *param_1 = pFVar1;
  pFVar1 = GetProcAddress((HMODULE)param_1[0xc],"HeapSetInformation");
  param_1[1] = pFVar1;
  pFVar1 = GetProcAddress((HMODULE)param_1[0xc],"QueueUserWorkItem");
  param_1[2] = pFVar1;
  pFVar1 = GetProcAddress((HMODULE)param_1[0xc],"GetQueuedCompletionStatus");
  param_1[3] = pFVar1;
  pFVar1 = GetProcAddress((HMODULE)param_1[0xc],"GetQueuedCompletionStatusEx");
  param_1[4] = pFVar1;
  pFVar1 = GetProcAddress((HMODULE)param_1[0xc],"AddVectoredExceptionHandler");
  param_1[5] = pFVar1;
  pFVar1 = GetProcAddress((HMODULE)param_1[0xc],"CreateTimerQueue");
  param_1[6] = pFVar1;
  pFVar1 = GetProcAddress((HMODULE)param_1[0xc],"CreateTimerQueueTimer");
  param_1[7] = pFVar1;
  pFVar1 = GetProcAddress((HMODULE)param_1[0xc],"DeleteTimerQueueTimer");
  param_1[8] = pFVar1;
  pFVar1 = GetProcAddress((HMODULE)param_1[0xc],"DeleteTimerQueueEx");
  param_1[9] = pFVar1;
  pFVar1 = GetProcAddress((HMODULE)param_1[0xc],"InitializeCriticalSectionEx");
  param_1[10] = pFVar1;
  pFVar1 = GetProcAddress((HMODULE)param_1[0xc],"GetLogicalProcessorInformation");
  param_1[0xb] = pFVar1;
  return param_1;
}



undefined * FUN_140158090(void)

{
  if ((DAT_140328718 & 1) == 0) {
    DAT_140328718 = DAT_140328718 | 1;
    FUN_140157f40(&DAT_1403286b0);
  }
  return &DAT_1403286b0;
}



void FUN_1401580e0(wchar_t *param_1)

{
  if (DAT_1403288e8 == 0) {
    OutputDebugStringW(param_1);
                    // WARNING: Could not recover jumptable at 0x000140158110. Too many branches
                    // WARNING: Treating indirect jump as call
    MessageBoxW((HWND)0x0,param_1,L"ProudNet",0x10);
    return;
  }
  if (DAT_1403288e8 == 2) {
                    // WARNING: Could not recover jumptable at 0x000140158121. Too many branches
                    // WARNING: Treating indirect jump as call
    OutputDebugStringW(param_1);
    return;
  }
                    // WARNING: Could not recover jumptable at 0x000140158137. Too many branches
                    // WARNING: Treating indirect jump as call
  wcscpy_s((wchar_t *)0x0,1000,param_1);
  return;
}



void FUN_140158140(void)

{
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x8007000e);
}



void FUN_140158150(longlong *param_1)

{
  int *piVar1;
  int iVar2;
  longlong *plVar3;
  longlong lVar4;
  
  lVar4 = *param_1;
  plVar3 = *(longlong **)(lVar4 + -0x18);
  if (*(int *)(lVar4 + -0x10) != 0) {
    if (*(int *)(lVar4 + -8) < 0) {
      if (*(int *)(lVar4 + -0xc) < 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80070057);
      }
      *(undefined4 *)(lVar4 + -0x10) = 0;
      *(undefined2 *)*param_1 = 0;
      return;
    }
    LOCK();
    piVar1 = (int *)(lVar4 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
    if (iVar2 + -1 < 1) {
      (**(code **)(**(longlong **)(lVar4 + -0x18) + 8))();
    }
    lVar4 = (**(code **)(*plVar3 + 0x18))(plVar3);
    *param_1 = lVar4 + 0x18;
  }
  return;
}



undefined8 FUN_1401581d0(void)

{
  HANDLE pvVar1;
  bool bVar2;
  undefined4 local_res8 [8];
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  LOCK();
  bVar2 = DAT_140328740 == 0;
  if (bVar2) {
    DAT_140328740 = 1;
  }
  UNLOCK();
  if (bVar2) {
    local_res8[0] = 2;
    if ((DAT_140328718 & 1) == 0) {
      DAT_140328718 = DAT_140328718 | 1;
      FUN_140157f40(&DAT_1403286b0);
    }
    if (DAT_1403286b8 != (code *)0x0) {
      if ((DAT_140328718 & 1) == 0) {
        DAT_140328718 = DAT_140328718 | 1;
        FUN_140157f40(&DAT_1403286b0);
      }
      pvVar1 = GetProcessHeap();
      (*DAT_1403286b8)(pvVar1,0,local_res8,4,uVar3);
    }
  }
  return 1;
}



bool FUN_140158270(void)

{
  if ((DAT_140328718 & 1) == 0) {
    DAT_140328718 = DAT_140328718 | 1;
    FUN_140157f40(&DAT_1403286b0);
  }
  return DAT_1403286d0 != 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

undefined * FUN_1401582b0(void)

{
  char cVar1;
  int iVar2;
  char cVar3;
  undefined1 auStack_58 [32];
  undefined *local_38;
  char local_30;
  undefined8 local_28;
  CHAR local_20 [8];
  ulonglong local_18;
  
  local_28 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  local_38 = &DAT_140328788;
  local_30 = '\0';
  cVar1 = FUN_140156bf0(&DAT_140328788);
  cVar3 = '\0';
  if ((cVar1 != '\0') && (cVar3 = local_30, DAT_1403203c0 != '\0')) {
    local_30 = '\x01';
    FUN_140156b50(&DAT_140328788);
    cVar3 = '\x01';
  }
  if ((DAT_140328748 & 1) == 0) {
    DAT_140328748 = DAT_140328748 | 1;
    _DAT_140328744 = 0;
    iVar2 = GetLocaleInfoA(0x800,5,local_20,7);
    if (iVar2 != 0) {
      _DAT_140328744 = atoi(local_20);
    }
  }
  DAT_1403203c0 = 0;
  if (cVar3 != '\0') {
    FUN_140156be0(&DAT_140328788);
  }
  return &DAT_140328744;
}



void FUN_140158390(longlong *param_1)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  lVar3 = *param_1;
  LOCK();
  piVar1 = (int *)(lVar3 + -8);
  iVar2 = *piVar1;
  *piVar1 = *piVar1 + -1;
  UNLOCK();
  if (iVar2 + -1 < 1) {
    (**(code **)(**(longlong **)(lVar3 + -0x18) + 8))();
  }
  return;
}



void FUN_1401583c0(undefined8 *param_1,int param_2)

{
  int *piVar1;
  int iVar2;
  void *_Src;
  rsize_t _DstSize;
  undefined8 *puVar3;
  longlong lVar4;
  
  _Src = (void *)*param_1;
  iVar2 = *(int *)((longlong)_Src + -0x10);
  puVar3 = (undefined8 *)(**(code **)(**(longlong **)((longlong)_Src + -0x18) + 0x20))();
  lVar4 = (**(code **)*puVar3)(puVar3,param_2,2);
  if (lVar4 == 0) {
                    // WARNING: Subroutine does not return
    FUN_140158140();
  }
  if (iVar2 < param_2) {
    param_2 = iVar2;
  }
  _DstSize = (longlong)(param_2 + 1) * 2;
  memcpy_s((void *)(lVar4 + 0x18),_DstSize,_Src,_DstSize);
  *(int *)(lVar4 + 8) = iVar2;
  LOCK();
  piVar1 = (int *)((longlong)_Src + -8);
  iVar2 = *piVar1;
  *piVar1 = *piVar1 + -1;
  UNLOCK();
  if (iVar2 + -1 < 1) {
    (**(code **)(**(longlong **)((longlong)_Src + -0x18) + 8))
              (*(longlong **)((longlong)_Src + -0x18),(longlong)_Src + -0x18);
  }
  *param_1 = (void *)(lVar4 + 0x18);
  return;
}



void FUN_140158470(longlong *param_1,int param_2)

{
  longlong lVar1;
  
  if ((*(int *)(*param_1 + -0xc) < param_2) && (0 < param_2)) {
    lVar1 = (**(code **)(**(longlong **)(*param_1 + -0x18) + 0x10))();
    if (lVar1 == 0) {
                    // WARNING: Subroutine does not return
      FUN_140158140();
    }
    *param_1 = lVar1 + 0x18;
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_140158140();
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

undefined * thunk_FUN_1401582b0(void)

{
  char cVar1;
  int iVar2;
  char cVar3;
  undefined1 auStack_58 [32];
  undefined *puStack_38;
  char cStack_30;
  undefined8 uStack_28;
  CHAR aCStack_20 [8];
  ulonglong uStack_18;
  
  uStack_28 = 0xfffffffffffffffe;
  uStack_18 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  puStack_38 = &DAT_140328788;
  cStack_30 = '\0';
  cVar1 = FUN_140156bf0(&DAT_140328788);
  cVar3 = '\0';
  if ((cVar1 != '\0') && (cVar3 = cStack_30, DAT_1403203c0 != '\0')) {
    cStack_30 = '\x01';
    FUN_140156b50(&DAT_140328788);
    cVar3 = '\x01';
  }
  if ((DAT_140328748 & 1) == 0) {
    DAT_140328748 = DAT_140328748 | 1;
    _DAT_140328744 = 0;
    iVar2 = GetLocaleInfoA(0x800,5,aCStack_20,7);
    if (iVar2 != 0) {
      _DAT_140328744 = atoi(aCStack_20);
    }
  }
  DAT_1403203c0 = 0;
  if (cVar3 != '\0') {
    FUN_140156be0(&DAT_140328788);
  }
  return &DAT_140328744;
}



void FUN_1401584d0(longlong *param_1,int param_2)

{
  longlong lVar1;
  int iVar2;
  
  lVar1 = *param_1;
  if (param_2 < *(int *)(lVar1 + -0x10)) {
    param_2 = *(int *)(lVar1 + -0x10);
  }
  if (1 < *(int *)(lVar1 + -8)) {
    FUN_1401583c0(param_1,param_2);
    return;
  }
  iVar2 = *(int *)(lVar1 + -0xc);
  if (iVar2 < param_2) {
    if (iVar2 < 0x40000001) {
      iVar2 = iVar2 + iVar2 / 2;
    }
    else {
      iVar2 = iVar2 + 0x100000;
    }
    if (iVar2 < param_2) {
      iVar2 = param_2;
    }
    FUN_140158470(param_1,iVar2);
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x000140158589)

undefined8 FUN_140158530(longlong *param_1,HMODULE param_2,uint param_3)

{
  uint uVar1;
  ushort uVar2;
  HRSRC pHVar3;
  ushort *puVar4;
  uint uVar5;
  
  pHVar3 = FindResourceW(param_2,(LPCWSTR)(ulonglong)(ushort)((short)(param_3 >> 4) + 1),
                         (LPCWSTR)0x6);
  if ((pHVar3 == (HRSRC)0x0) ||
     (puVar4 = (ushort *)FUN_140157d40(param_2,pHVar3,param_3), puVar4 == (ushort *)0x0)) {
    return 0;
  }
  uVar2 = *puVar4;
  uVar5 = (uint)uVar2;
  if ((int)(1U - *(int *)(*param_1 + -8) | *(int *)(*param_1 + -0xc) - uVar5) < 0) {
    FUN_1401584d0(param_1,uVar5);
  }
  FUN_140157ea0(*param_1,uVar5,puVar4 + 1,*puVar4);
  uVar1 = *(uint *)(*param_1 + -0xc);
  if (uVar2 != uVar1 && (int)uVar1 <= (int)uVar5) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  *(uint *)(*param_1 + -0x10) = (uint)uVar2;
  *(undefined2 *)(*param_1 + (ulonglong)uVar2 * 2) = 0;
  return 1;
}



void FUN_140158610(longlong *param_1,void *param_2,int param_3)

{
  uint uVar1;
  longlong lVar2;
  void *_Dst;
  rsize_t _DstSize;
  rsize_t _MaxCount;
  ulonglong uVar3;
  
  if (param_3 == 0) {
    FUN_140158150();
    return;
  }
  if (param_2 == (void *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  lVar2 = *param_1;
  uVar1 = *(uint *)(lVar2 + -0x10);
  uVar3 = (longlong)param_2 - lVar2 >> 1;
  if (param_3 < 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  if ((int)(1U - *(int *)(lVar2 + -8) | *(int *)(lVar2 + -0xc) - param_3) < 0) {
    FUN_1401584d0(param_1,param_3);
  }
  _Dst = (void *)*param_1;
  _DstSize = (longlong)*(int *)((longlong)_Dst + -0xc) * 2;
  _MaxCount = (longlong)param_3 * 2;
  if (uVar1 < uVar3) {
    memcpy_s(_Dst,_DstSize,param_2,_MaxCount);
  }
  else {
    memmove_s(_Dst,_DstSize,(void *)((longlong)_Dst + uVar3 * 2),_MaxCount);
  }
  if (param_3 <= *(int *)(*param_1 + -0xc)) {
    *(int *)(*param_1 + -0x10) = param_3;
    *(undefined2 *)(_MaxCount + *param_1) = 0;
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80070057);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_140158700(undefined8 *param_1)

{
  undefined4 uVar1;
  undefined8 uVar2;
  undefined1 auStack_258 [32];
  undefined4 local_238;
  WCHAR local_228 [264];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_258;
  local_238 = 0;
  GetModuleFileNameW((HMODULE)0x0,local_228,0x104);
  FUN_1401568c0();
  *param_1 = PTR_DAT_1403200a0;
  uVar1 = FUN_140156740(local_228);
  uVar2 = FUN_14004f760(param_1,uVar1);
  FUN_140156770(uVar2,local_228,uVar1);
  FUN_14004f380(param_1);
  return param_1;
}



longlong * FUN_1401587a0(longlong *param_1,short *param_2,undefined8 param_3,undefined8 param_4)

{
  short sVar1;
  longlong lVar2;
  int iVar3;
  short *psVar4;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  lVar2 = (**(code **)(PTR_PTR_140322350 + 0x18))();
  *param_1 = lVar2 + 0x18;
  if (param_2 == (short *)0x0) {
    iVar3 = 0;
  }
  else {
    if (((ulonglong)param_2 & 0xffffffffffff0000) == 0) {
      lVar2 = FUN_140157de0((ulonglong)param_2 & 0xffff,0);
      if (lVar2 == 0) {
        return param_1;
      }
      FUN_140158530(param_1,lVar2,(ulonglong)param_2 & 0xffff);
      return param_1;
    }
    lVar2 = -1;
    psVar4 = param_2;
    do {
      if (lVar2 == 0) break;
      lVar2 = lVar2 + -1;
      sVar1 = *psVar4;
      psVar4 = psVar4 + 1;
    } while (sVar1 != 0);
    iVar3 = ~(uint)lVar2 - 1;
  }
  FUN_140158610(param_1,param_2,iVar3,param_4,uVar5);
  return param_1;
}



void FUN_140158850(longlong param_1,undefined2 *param_2)

{
  undefined2 uVar1;
  
  uVar1 = Ordinal_9(*(undefined2 *)(param_1 + 0xc));
  param_2[1] = uVar1;
  *(undefined4 *)(param_2 + 2) = *(undefined4 *)(param_1 + 8);
  *param_2 = 2;
  return;
}



void FUN_140158890(longlong param_1,longlong param_2)

{
  undefined2 uVar1;
  
  *(undefined4 *)(param_1 + 8) = *(undefined4 *)(param_2 + 4);
  uVar1 = Ordinal_15(*(undefined2 *)(param_2 + 2));
  *(undefined2 *)(param_1 + 0xc) = uVar1;
  return;
}



ulonglong FUN_1401588c0(longlong param_1)

{
  ushort uVar1;
  uint uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ushort *)(param_1 + 0xc);
  uVar3 = (ulonglong)uVar1;
  if ((uVar1 != 0) && (uVar1 != 0xffff)) {
    uVar2 = *(uint *)(param_1 + 8);
    uVar3 = (ulonglong)uVar2;
    if ((uVar2 != 0) && (uVar2 != 0xffffffff)) {
      return CONCAT71((uint7)(uint3)(uVar2 >> 8),1);
    }
  }
  return uVar3 & 0xffffffffffffff00;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401588f0(char param_1)

{
  HKEY hKey;
  LSTATUS LVar1;
  undefined8 uVar2;
  undefined1 auStackY_118 [32];
  uint local_c8 [2];
  HKEY local_c0;
  DWORD local_b8 [2];
  wchar_t local_b0 [20];
  wchar_t local_88 [56];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStackY_118;
  builtin_wcsncpy(local_88,L"SYSTEM\\CurrentControlSet\\services\\Tcpip\\Parameters",0x33);
  builtin_wcsncpy(local_b0,L"DisableTaskOffload",0x13);
  local_c0 = (HKEY)0x0;
  LVar1 = RegCreateKeyExW((HKEY)0xffffffff80000002,local_88,0,(LPWSTR)0x0,0,0x20006,
                          (LPSECURITY_ATTRIBUTES)0x0,&local_c0,local_b8);
  hKey = local_c0;
  if (LVar1 == 0) {
    local_c8[0] = (uint)(param_1 != '\x01');
    LVar1 = RegSetValueExW(local_c0,local_b0,0,4,(BYTE *)local_c8,4);
    if (LVar1 == 0) {
      if ((hKey == (HKEY)0x0) || (LVar1 = RegCloseKey(hKey), LVar1 == 0)) {
        uVar2 = 0;
      }
      else {
        uVar2 = 1;
        if (LVar1 == 5) {
          uVar2 = 0x12;
        }
      }
    }
    else if (LVar1 == 5) {
      if (hKey != (HKEY)0x0) {
        RegCloseKey(hKey);
      }
      uVar2 = 0x12;
    }
    else {
      if (hKey != (HKEY)0x0) {
        RegCloseKey(hKey);
      }
      uVar2 = 1;
    }
  }
  else {
    uVar2 = 1;
    if (LVar1 == 5) {
      uVar2 = 0x12;
    }
  }
  return uVar2;
}



undefined * FUN_140158ad0(void)

{
  bool bVar1;
  char cVar2;
  
  bVar1 = false;
  cVar2 = FUN_140156bf0(&DAT_140328858);
  if (cVar2 != '\0') {
    if (DAT_140320400 == '\0') {
      bVar1 = false;
    }
    else {
      bVar1 = true;
      FUN_140156b50(&DAT_140328858);
    }
  }
  if ((DAT_1403287c4 & 1) == 0) {
    DAT_1403287c4 = DAT_1403287c4 | 1;
    FUN_140185030(&DAT_1403287c0);
    atexit((_func_5014 *)&LAB_140257e90);
  }
  DAT_140320400 = 0;
  if (bVar1) {
    FUN_140156be0(&DAT_140328858);
  }
  return &DAT_1403287c0;
}



void FUN_140158b90(undefined8 *param_1,longlong param_2)

{
  int iVar1;
  
  if (0 < param_2) {
    iVar1 = 0;
    do {
      if (param_1 != (undefined8 *)0x0) {
        FUN_1401568c0();
        *param_1 = PTR_DAT_140320098;
      }
      iVar1 = iVar1 + 1;
      param_1 = param_1 + 1;
    } while (iVar1 < param_2);
  }
  return;
}



undefined8 * FUN_140158bf0(undefined8 *param_1,longlong *param_2,undefined2 param_3)

{
  undefined4 uVar1;
  undefined *puVar2;
  
  *param_1 = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 1) = 0;
  *(undefined2 *)((longlong)param_1 + 0xc) = 0;
  puVar2 = (undefined *)*param_2;
  if ((undefined *)*param_2 == (undefined *)0x0) {
    puVar2 = PTR_DAT_140320098;
  }
  uVar1 = Ordinal_11(puVar2);
  *(undefined2 *)((longlong)param_1 + 0xc) = param_3;
  *(undefined4 *)(param_1 + 1) = uVar1;
  FUN_140050520(param_2);
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_140158c60(undefined8 *param_1,longlong *param_2,undefined2 param_3)

{
  undefined4 uVar1;
  undefined *puVar2;
  undefined1 auStack_d8 [32];
  longlong *local_b8;
  undefined8 local_b0;
  undefined1 *local_a8;
  undefined1 local_a0 [136];
  ulonglong local_18;
  
  local_b0 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_d8;
  *param_1 = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 1) = 0;
  *(undefined2 *)((longlong)param_1 + 0xc) = 0;
  puVar2 = (undefined *)*param_2;
  if ((undefined *)*param_2 == (undefined *)0x0) {
    puVar2 = PTR_DAT_1403200a0;
  }
  local_a8 = local_a0;
  local_b8 = param_2;
  FUN_140153e40(&local_a8,puVar2,3);
  uVar1 = Ordinal_11(local_a8);
  *(undefined4 *)(param_1 + 1) = uVar1;
  if (local_a8 != local_a0) {
    free(local_a8);
  }
  *(undefined2 *)((longlong)param_1 + 0xc) = param_3;
  FUN_14004f990(param_2);
  return param_1;
}



void FUN_140158d30(longlong *param_1,longlong *param_2)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  undefined *puVar4;
  int iVar5;
  undefined4 uVar6;
  undefined *puVar7;
  
  puVar4 = (undefined *)*param_2;
  if (((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_140320098)) && (0 < *(int *)(puVar4 + -8))
     ) {
    puVar7 = (undefined *)*param_1;
    if (puVar7 == (undefined *)0x0) {
      iVar5 = 0;
    }
    else if (puVar7 == PTR_DAT_140320098) {
      iVar5 = 0;
    }
    else {
      iVar5 = *(int *)(puVar7 + -8);
    }
    iVar3 = *(int *)(puVar4 + -8) + iVar5;
    if (puVar7 == (undefined *)0x0) {
      iVar2 = 0;
    }
    else if (puVar7 == PTR_DAT_140320098) {
      iVar2 = 0;
    }
    else {
      iVar2 = *(int *)(puVar7 + -8);
    }
    if (iVar3 <= iVar2) {
      if (puVar7 == (undefined *)0x0) {
        iVar3 = 0;
      }
      else if (puVar7 == PTR_DAT_140320098) {
        iVar3 = 0;
      }
      else {
        iVar3 = *(int *)(puVar7 + -8);
      }
    }
    iVar2 = 1;
    if (1 < iVar3) {
      iVar2 = iVar3;
    }
    if (puVar7 == (undefined *)0x0) {
      iVar3 = 0;
    }
    else if (puVar7 == PTR_DAT_140320098) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(puVar7 + -8);
    }
    if (iVar3 < iVar2) {
      FUN_140124200(param_1,iVar2);
    }
    FUN_1401242e0(param_1);
    puVar4 = (undefined *)*param_2;
    puVar7 = (undefined *)*param_1;
    if ((undefined *)*param_1 == (undefined *)0x0) {
      puVar7 = PTR_DAT_140320098;
    }
    if (puVar4 == (undefined *)0x0) {
      uVar6 = 0;
    }
    else if (puVar4 == PTR_DAT_140320098) {
      uVar6 = 0;
    }
    else {
      uVar6 = *(undefined4 *)(puVar4 + -8);
    }
    if (puVar4 == (undefined *)0x0) {
      puVar4 = PTR_DAT_140320098;
    }
    FUN_140156810(puVar7 + iVar5,puVar4,uVar6);
    puVar4 = (undefined *)*param_2;
    if (puVar4 == (undefined *)0x0) {
      iVar3 = 0;
    }
    else if (puVar4 == PTR_DAT_140320098) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(puVar4 + -8);
    }
    iVar2 = 0;
    if (0 < iVar3 + iVar5) {
      iVar2 = iVar3 + iVar5;
    }
    puVar4 = (undefined *)*param_1;
    if (puVar4 == (undefined *)0x0) {
      iVar5 = 0;
    }
    else if (puVar4 == PTR_DAT_140320098) {
      iVar5 = 0;
    }
    else {
      iVar5 = *(int *)(puVar4 + -8);
    }
    if (iVar5 <= iVar2) {
      if (puVar4 == (undefined *)0x0) {
        iVar2 = 0;
      }
      else if (puVar4 == PTR_DAT_140320098) {
        iVar2 = 0;
      }
      else {
        iVar2 = *(int *)(puVar4 + -8);
      }
    }
    if (((puVar4 != PTR_DAT_140320098) && (puVar4 != (undefined *)0x0)) &&
       (piVar1 = (int *)(puVar4 + -8), piVar1 != (int *)0x0)) {
      *piVar1 = iVar2;
      *(undefined1 *)((longlong)iVar2 + 8 + (longlong)piVar1) = 0;
    }
  }
  return;
}



void FUN_140158ec0(longlong *param_1,longlong param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  undefined *puVar8;
  
  if (param_2 != 0) {
    iVar1 = FUN_1401567e0(param_2);
    puVar8 = (undefined *)*param_1;
    iVar7 = 0;
    iVar6 = 0;
    iVar3 = 0;
    iVar4 = iVar6;
    if ((puVar8 != (undefined *)0x0) && (iVar4 = iVar3, puVar8 != PTR_DAT_140320098)) {
      iVar4 = *(int *)(puVar8 + -8);
    }
    iVar5 = iVar4 + iVar1;
    if ((puVar8 != (undefined *)0x0) && (puVar8 != PTR_DAT_140320098)) {
      iVar3 = *(int *)(puVar8 + -8);
    }
    iVar2 = iVar5;
    if (((iVar5 <= iVar3) && (iVar2 = iVar6, puVar8 != (undefined *)0x0)) &&
       (puVar8 != PTR_DAT_140320098)) {
      iVar2 = *(int *)(puVar8 + -8);
    }
    iVar3 = 1;
    if (1 < iVar2) {
      iVar3 = iVar2;
    }
    if ((puVar8 != (undefined *)0x0) && (puVar8 != PTR_DAT_140320098)) {
      iVar7 = *(int *)(puVar8 + -8);
    }
    if (iVar7 < iVar3) {
      FUN_140124200(param_1);
    }
    FUN_1401242e0(param_1);
    puVar8 = (undefined *)*param_1;
    if ((undefined *)*param_1 == (undefined *)0x0) {
      puVar8 = PTR_DAT_140320098;
    }
    FUN_140156810(puVar8 + iVar4,param_2,iVar1);
    FUN_140124450(param_1,iVar5);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140158fb0(undefined8 param_1,char *param_2,va_list param_3)

{
  int iVar1;
  undefined8 uVar2;
  undefined1 auStack_448 [32];
  char local_428 [1040];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_448;
  if (param_2 == (char *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  iVar1 = vsprintf_s(local_428,0x400,param_2,param_3);
  uVar2 = FUN_1401243d0(param_1,iVar1);
  FUN_140156810(uVar2,local_428,iVar1);
  FUN_1401244c0(param_1);
  return;
}



longlong * FUN_140159040(longlong *param_1)

{
  int *piVar1;
  uchar *puVar2;
  undefined *puVar3;
  int iVar4;
  int iVar5;
  uchar *_Ptr;
  uchar *puVar6;
  int iVar7;
  undefined *_Dst;
  
  _Ptr = (uchar *)*param_1;
  if ((uchar *)*param_1 == (uchar *)0x0) {
    _Ptr = PTR_DAT_140320098;
  }
  iVar4 = FUN_1401568b0(*_Ptr);
  while (iVar4 != 0) {
    _Ptr = _mbsinc(_Ptr);
    iVar4 = FUN_1401568b0(*_Ptr);
  }
  puVar2 = (uchar *)*param_1;
  puVar6 = puVar2;
  if (puVar2 == (uchar *)0x0) {
    puVar6 = PTR_DAT_140320098;
  }
  if (_Ptr != puVar6) {
    iVar4 = (int)puVar2;
    if (puVar2 == (uchar *)0x0) {
      iVar4 = (int)PTR_DAT_140320098;
    }
    iVar4 = (int)_Ptr - iVar4;
    if (puVar2 == (uchar *)0x0) {
      iVar5 = 0;
    }
    else if (puVar2 == PTR_DAT_140320098) {
      iVar5 = 0;
    }
    else {
      iVar5 = *(int *)(puVar2 + -8);
    }
    if (puVar2 == (uchar *)0x0) {
      iVar7 = 0;
    }
    else if (puVar2 == PTR_DAT_140320098) {
      iVar7 = 0;
    }
    else {
      iVar7 = *(int *)(puVar2 + -8);
    }
    if (iVar5 <= iVar7) {
      if (puVar2 == (uchar *)0x0) {
        iVar5 = 0;
      }
      else if (puVar2 == PTR_DAT_140320098) {
        iVar5 = 0;
      }
      else {
        iVar5 = *(int *)(puVar2 + -8);
      }
    }
    iVar7 = 1;
    if (1 < iVar5) {
      iVar7 = iVar5;
    }
    if (puVar2 == (uchar *)0x0) {
      iVar5 = 0;
    }
    else if (puVar2 == PTR_DAT_140320098) {
      iVar5 = 0;
    }
    else {
      iVar5 = *(int *)(puVar2 + -8);
    }
    if (iVar5 < iVar7) {
      FUN_140124200(param_1,iVar7);
    }
    FUN_1401242e0(param_1);
    puVar3 = (undefined *)*param_1;
    _Dst = puVar3;
    if (puVar3 == (undefined *)0x0) {
      _Dst = PTR_DAT_140320098;
    }
    if (puVar3 == (undefined *)0x0) {
      iVar5 = 0;
    }
    else if (puVar3 == PTR_DAT_140320098) {
      iVar5 = 0;
    }
    else {
      iVar5 = *(int *)(puVar3 + -8);
    }
    iVar5 = iVar5 - iVar4;
    if (puVar3 == (undefined *)0x0) {
      iVar7 = 0;
    }
    else if (puVar3 == PTR_DAT_140320098) {
      iVar7 = 0;
    }
    else {
      iVar7 = *(int *)(puVar3 + -8);
    }
    memmove_s(_Dst,(longlong)(iVar7 + 1),_Dst + iVar4,(longlong)(iVar5 + 1));
    puVar3 = (undefined *)*param_1;
    iVar4 = 0;
    if (0 < iVar5) {
      iVar4 = iVar5;
    }
    if (puVar3 == (undefined *)0x0) {
      iVar5 = 0;
    }
    else if (puVar3 == PTR_DAT_140320098) {
      iVar5 = 0;
    }
    else {
      iVar5 = *(int *)(puVar3 + -8);
    }
    if (iVar5 <= iVar4) {
      if (puVar3 == (undefined *)0x0) {
        iVar4 = 0;
      }
      else if (puVar3 == PTR_DAT_140320098) {
        iVar4 = 0;
      }
      else {
        iVar4 = *(int *)(puVar3 + -8);
      }
    }
    if (((puVar3 != PTR_DAT_140320098) && (puVar3 != (undefined *)0x0)) &&
       (piVar1 = (int *)(puVar3 + -8), piVar1 != (int *)0x0)) {
      *piVar1 = iVar4;
      *(undefined1 *)((longlong)iVar4 + 8 + (longlong)piVar1) = 0;
    }
  }
  return param_1;
}



void FUN_140159200(longlong *param_1,int param_2)

{
  int *piVar1;
  undefined *puVar2;
  int iVar3;
  int iVar4;
  
  FUN_1401243d0();
  puVar2 = (undefined *)*param_1;
  iVar3 = 0;
  if (0 < param_2) {
    iVar3 = param_2;
  }
  if (puVar2 == (undefined *)0x0) {
    iVar4 = 0;
  }
  else if (puVar2 == PTR_DAT_140320098) {
    iVar4 = 0;
  }
  else {
    iVar4 = *(int *)(puVar2 + -8);
  }
  if (iVar4 <= iVar3) {
    if (puVar2 == (undefined *)0x0) {
      iVar3 = 0;
    }
    else if (puVar2 == PTR_DAT_140320098) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(puVar2 + -8);
    }
  }
  if (((puVar2 != PTR_DAT_140320098) && (puVar2 != (undefined *)0x0)) &&
     (piVar1 = (int *)(puVar2 + -8), piVar1 != (int *)0x0)) {
    *piVar1 = iVar3;
    *(undefined1 *)((longlong)iVar3 + 8 + (longlong)piVar1) = 0;
  }
  return;
}



void FUN_140159280(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  uint uVar2;
  ulonglong uVar3;
  
  if (0 < param_2) {
    uVar1 = 0;
    uVar3 = uVar1;
    do {
      FUN_140050520(param_1 + uVar1 * 8);
      uVar2 = (int)uVar3 + 1;
      uVar3 = (ulonglong)uVar2;
      uVar1 = (ulonglong)(int)uVar2;
    } while ((longlong)uVar1 < param_2);
  }
  return;
}



void FUN_1401592d0(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 local_res18;
  undefined8 local_res20;
  
  local_res18 = param_3;
  local_res20 = param_4;
  FUN_140158fb0(param_1,param_2,&local_res18);
  return;
}



longlong * FUN_140159300(longlong *param_1)

{
  uchar uVar1;
  int iVar2;
  uchar *_Ptr;
  undefined *puVar3;
  uchar *puVar4;
  
  _Ptr = (uchar *)*param_1;
  if ((uchar *)*param_1 == (uchar *)0x0) {
    _Ptr = PTR_DAT_140320098;
  }
  puVar4 = (uchar *)0x0;
  uVar1 = *_Ptr;
  if (uVar1 != '\0') {
    do {
      iVar2 = FUN_1401568b0(uVar1);
      if (iVar2 == 0) {
        puVar4 = (uchar *)0x0;
      }
      else if (puVar4 == (uchar *)0x0) {
        puVar4 = _Ptr;
      }
      _Ptr = _mbsinc(_Ptr);
      uVar1 = *_Ptr;
    } while (uVar1 != '\0');
    if (puVar4 != (uchar *)0x0) {
      puVar3 = (undefined *)*param_1;
      if ((undefined *)*param_1 == (undefined *)0x0) {
        puVar3 = PTR_DAT_140320098;
      }
      FUN_140159200(param_1,(int)puVar4 - (int)puVar3);
    }
  }
  return param_1;
}



void FUN_140159390(longlong param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  longlong *plVar2;
  longlong lVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 *puVar6;
  int iVar7;
  longlong lVar8;
  undefined8 *puVar9;
  undefined1 local_88 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  iVar4 = *(int *)(param_1 + 0x18);
  if (param_2 != iVar4) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar4 = FUN_1401abc90(param_1,param_2,param_3,param_4,0xfffffffffffffffe);
      lVar8 = (longlong)iVar4;
      plVar2 = *(longlong **)(param_1 + 8);
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar2 == (longlong *)0x0) {
          uVar5 = FUN_140156940(lVar8 << 3);
        }
        else {
          uVar5 = (**(code **)(*plVar2 + 8))(plVar2,lVar8 << 3);
        }
        *(undefined8 *)(param_1 + 0x10) = uVar5;
        FUN_140158b90(uVar5,(longlong)param_2);
      }
      else {
        lVar3 = *(longlong *)(param_1 + 0x10);
        if (plVar2 == (longlong *)0x0) {
          puVar6 = (undefined8 *)FUN_140156940(lVar8 << 3);
        }
        else {
          puVar6 = (undefined8 *)(**(code **)(*plVar2 + 8))(plVar2,lVar8 << 3);
        }
        iVar1 = *(int *)(param_1 + 0x18);
        iVar7 = 0;
        if (0 < (longlong)iVar1) {
          lVar8 = 0;
          puVar9 = puVar6;
          do {
            if (puVar9 != (undefined8 *)0x0) {
              FUN_1401568c0();
              *puVar9 = PTR_DAT_140320098;
              FUN_140050450(puVar9,lVar3 + lVar8 * 8);
            }
            iVar7 = iVar7 + 1;
            puVar9 = puVar9 + 1;
            lVar8 = (longlong)iVar7;
          } while (lVar8 < iVar1);
        }
        FUN_140158b90(puVar6 + *(int *)(param_1 + 0x18),
                      (longlong)(param_2 - *(int *)(param_1 + 0x18)));
        if (puVar6 == (undefined8 *)0x0) {
          FUN_140156300(local_88,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_88,(ThrowInfo *)&DAT_14031d928);
        }
        FUN_140159280(lVar3,(longlong)*(int *)(param_1 + 0x18));
        plVar2 = *(longlong **)(param_1 + 8);
        if (plVar2 == (longlong *)0x0) {
          FUN_140156970(lVar3);
        }
        else {
          (**(code **)(*plVar2 + 0x18))(plVar2,lVar3);
        }
        *(undefined8 **)(param_1 + 0x10) = puVar6;
      }
      *(int *)(param_1 + 0x1c) = iVar4;
    }
    else if (iVar4 - param_2 < 1) {
      if (0 < param_2 - iVar4) {
        FUN_140158b90(*(longlong *)(param_1 + 0x10) + (longlong)iVar4 * 8,
                      (longlong)(param_2 - iVar4));
      }
    }
    else {
      FUN_140159280(*(longlong *)(param_1 + 0x10) + (longlong)param_2 * 8,
                    (longlong)(iVar4 - param_2));
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_140159580(longlong param_1,undefined8 *param_2)

{
  int *piVar1;
  undefined2 uVar2;
  undefined *puVar3;
  undefined1 *puVar4;
  undefined4 uVar5;
  undefined8 uVar6;
  undefined *puVar7;
  undefined1 auStack_188 [32];
  undefined4 local_168;
  undefined *local_160;
  undefined1 local_158;
  undefined8 local_150;
  undefined8 *local_148;
  undefined1 *local_138;
  undefined1 local_130 [264];
  ulonglong local_28;
  
  local_150 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_188;
  local_168 = 0;
  uVar5 = *(undefined4 *)(param_1 + 8);
  local_148 = param_2;
  FUN_1401568c0();
  local_160 = PTR_DAT_140320098;
  uVar2 = *(undefined2 *)(param_1 + 0xc);
  uVar6 = Ordinal_12(uVar5);
  FUN_1401592d0(&local_160,"%s:%d",uVar6,uVar2);
  puVar3 = local_160;
  puVar7 = local_160;
  if (local_160 == (undefined *)0x0) {
    puVar7 = PTR_DAT_140320098;
  }
  local_138 = local_130;
  FUN_140142dc0(&local_138,puVar7,3);
  puVar4 = local_138;
  FUN_1401568c0();
  *param_2 = PTR_DAT_1403200a0;
  uVar5 = FUN_140156740(puVar4);
  uVar6 = FUN_14004f760(param_2,uVar5);
  FUN_140156770(uVar6,puVar4,uVar5);
  FUN_14004f380(param_2);
  local_168 = 1;
  if (local_138 != local_130) {
    free(local_138);
  }
  if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_140320098)) &&
     (puVar3 + -8 != (undefined *)0x0)) {
    puVar7 = (undefined *)FUN_1401568c0();
    local_160 = puVar7;
    FUN_140156b50(puVar7);
    local_158 = 1;
    piVar1 = (int *)(puVar3 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar3 + -8);
    }
    FUN_140156be0(puVar7);
  }
  return param_2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_1401596f0(longlong param_1,undefined8 *param_2)

{
  int *piVar1;
  undefined *puVar2;
  undefined1 *puVar3;
  undefined4 uVar4;
  undefined8 uVar5;
  undefined *puVar6;
  undefined1 auStack_188 [32];
  undefined4 local_168;
  undefined *local_160;
  undefined1 local_158;
  undefined8 local_150;
  undefined8 *local_148;
  undefined1 *local_138;
  undefined1 local_130 [264];
  ulonglong local_28;
  
  local_150 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_188;
  local_168 = 0;
  uVar4 = *(undefined4 *)(param_1 + 8);
  local_148 = param_2;
  FUN_1401568c0();
  local_160 = PTR_DAT_140320098;
  uVar5 = Ordinal_12(uVar4);
  FUN_140155010(&local_160,uVar5);
  puVar2 = local_160;
  puVar6 = local_160;
  if (local_160 == (undefined *)0x0) {
    puVar6 = PTR_DAT_140320098;
  }
  local_138 = local_130;
  FUN_140142dc0(&local_138,puVar6,3);
  puVar3 = local_138;
  FUN_1401568c0();
  *param_2 = PTR_DAT_1403200a0;
  uVar4 = FUN_140156740(puVar3);
  uVar5 = FUN_14004f760(param_2,uVar4);
  FUN_140156770(uVar5,puVar3,uVar4);
  FUN_14004f380(param_2);
  local_168 = 1;
  if (local_138 != local_130) {
    free(local_138);
  }
  if (((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_140320098)) &&
     (puVar2 + -8 != (undefined *)0x0)) {
    puVar6 = (undefined *)FUN_1401568c0();
    local_160 = puVar6;
    FUN_140156b50(puVar6);
    local_158 = 1;
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
    FUN_140156be0(puVar6);
  }
  return param_2;
}



undefined8 * FUN_140159850(longlong param_1,undefined8 *param_2)

{
  undefined4 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  uVar2 = Ordinal_12(*(undefined4 *)(param_1 + 8));
  FUN_1401568c0();
  *param_2 = PTR_DAT_140320098;
  uVar1 = FUN_1401567e0(uVar2);
  uVar3 = FUN_1401243d0(param_2,uVar1);
  FUN_140156810(uVar3,uVar2,uVar1);
  FUN_1401244c0(param_2);
  return param_2;
}



undefined8 * FUN_1401598d0(undefined8 *param_1,undefined8 param_2,undefined2 param_3)

{
  FUN_1401568c0();
  *param_1 = PTR_DAT_140320098;
  FUN_140155010(param_1,param_2);
  *(undefined2 *)(param_1 + 1) = param_3;
  return param_1;
}



undefined8 *
FUN_140159940(undefined8 *param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  undefined *local_res18;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  FUN_1401568c0();
  *param_1 = PTR_DAT_140320098;
  uVar2 = FUN_140159850(param_2,&local_res18,param_3,param_4,uVar2);
  FUN_140050450(param_1,uVar2);
  if (((local_res18 != (undefined *)0x0) && (local_res18 != PTR_DAT_140320098)) &&
     (local_res18 + -8 != (undefined *)0x0)) {
    uVar2 = FUN_1401568c0();
    FUN_140156b50(uVar2);
    piVar1 = (int *)(local_res18 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res18 + -8);
    }
    FUN_140156be0(uVar2);
  }
  *(undefined2 *)(param_1 + 1) = *(undefined2 *)(param_2 + 0xc);
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_140159a00(longlong *param_1,undefined8 *param_2)

{
  int *piVar1;
  undefined1 *puVar2;
  undefined4 uVar3;
  undefined8 uVar4;
  undefined *puVar5;
  undefined *puVar6;
  undefined1 auStack_188 [32];
  undefined4 local_168;
  undefined *local_160;
  undefined1 local_158;
  undefined8 local_150;
  undefined8 *local_148;
  undefined1 *local_138;
  undefined1 local_130 [264];
  ulonglong local_28;
  
  local_150 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_188;
  local_168 = 0;
  local_148 = param_2;
  FUN_1401568c0();
  local_160 = PTR_DAT_140320098;
  puVar6 = (undefined *)*param_1;
  if ((undefined *)*param_1 == (undefined *)0x0) {
    puVar6 = PTR_DAT_140320098;
  }
  FUN_1401592d0(&local_160,"%s:%d",puVar6,(short)param_1[1]);
  puVar6 = local_160;
  puVar5 = local_160;
  if (local_160 == (undefined *)0x0) {
    puVar5 = PTR_DAT_140320098;
  }
  local_138 = local_130;
  FUN_140142dc0(&local_138,puVar5,3);
  puVar2 = local_138;
  FUN_1401568c0();
  *param_2 = PTR_DAT_1403200a0;
  uVar3 = FUN_140156740(puVar2);
  uVar4 = FUN_14004f760(param_2,uVar3);
  FUN_140156770(uVar4,puVar2,uVar3);
  FUN_14004f380(param_2);
  local_168 = 1;
  if (local_138 != local_130) {
    free(local_138);
  }
  if (((puVar6 != (undefined *)0x0) && (puVar6 != PTR_DAT_140320098)) &&
     (puVar6 + -8 != (undefined *)0x0)) {
    puVar5 = (undefined *)FUN_1401568c0();
    local_160 = puVar5;
    FUN_140156b50(puVar5);
    local_158 = 1;
    piVar1 = (int *)(puVar6 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar6 + -8);
    }
    FUN_140156be0(puVar5);
  }
  return param_2;
}



void FUN_140159b70(undefined8 param_1,char *param_2)

{
  char cVar1;
  longlong lVar2;
  
  if (param_2 != (char *)0x0) {
    lVar2 = -1;
    do {
      if (lVar2 == 0) break;
      lVar2 = lVar2 + -1;
      cVar1 = *param_2;
      param_2 = param_2 + 1;
    } while (cVar1 != '\0');
    if (lVar2 != -2) {
      FUN_140155010(param_1);
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_140159bb0(undefined8 *param_1)

{
  int *piVar1;
  undefined *puVar2;
  undefined1 *puVar3;
  int iVar4;
  undefined4 uVar5;
  longlong lVar6;
  undefined8 uVar7;
  undefined *puVar8;
  uint uVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  undefined1 auStack_208 [32];
  undefined *local_1e8;
  undefined *local_1e0;
  undefined8 local_1d8;
  undefined1 local_1d0;
  undefined8 local_1c8;
  undefined1 *local_1b8;
  undefined1 local_1b0 [264];
  undefined1 local_a8 [128];
  ulonglong local_28;
  
  local_1c8 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_208;
  uVar10 = 0;
  local_1e8 = (undefined *)((ulonglong)local_1e8 & 0xffffffff00000000);
  iVar4 = Ordinal_57(local_a8,0x80);
  if (((iVar4 == 0) && (lVar6 = Ordinal_52(local_a8), lVar6 != 0)) &&
     (**(longlong **)(lVar6 + 0x18) != 0)) {
    FUN_1401568c0();
    local_1e0 = PTR_DAT_140320098;
    uVar11 = uVar10;
    if (0 < *(short *)(lVar6 + 0x12)) {
      do {
        FUN_1401568c0();
        local_1e8 = PTR_DAT_140320098;
        if (0 < (longlong)uVar11) {
          FUN_140158ec0(&local_1e0,&DAT_14025b904);
        }
        FUN_1401592d0(&local_1e8,&DAT_14025b900,
                      *(undefined1 *)(**(longlong **)(lVar6 + 0x18) + uVar11));
        FUN_140158d30(&local_1e0,&local_1e8);
        puVar2 = local_1e8;
        if (((local_1e8 != (undefined *)0x0) && (local_1e8 != PTR_DAT_140320098)) &&
           (puVar8 = local_1e8 + -8, puVar8 != (undefined *)0x0)) {
          uVar7 = FUN_1401568c0();
          local_1d8 = uVar7;
          FUN_140156b50(uVar7);
          local_1d0 = 1;
          piVar1 = (int *)(puVar2 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(puVar8);
          }
          FUN_140156be0(uVar7);
          local_1d0 = 0;
        }
        uVar9 = (int)uVar10 + 1;
        uVar10 = (ulonglong)uVar9;
        uVar11 = uVar11 + 1;
      } while ((int)uVar9 < (int)*(short *)(lVar6 + 0x12));
    }
    puVar2 = local_1e0;
    puVar8 = local_1e0;
    if (local_1e0 == (undefined *)0x0) {
      puVar8 = PTR_DAT_140320098;
    }
    local_1b8 = local_1b0;
    FUN_140142dc0(&local_1b8,puVar8,3);
    puVar3 = local_1b8;
    FUN_1401568c0();
    *param_1 = PTR_DAT_1403200a0;
    uVar5 = FUN_140156740(puVar3);
    uVar7 = FUN_14004f760(param_1,uVar5);
    FUN_140156770(uVar7,puVar3,uVar5);
    FUN_14004f380(param_1);
    if (local_1b8 != local_1b0) {
      free(local_1b8);
    }
    if (((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_140320098)) &&
       (puVar2 + -8 != (undefined *)0x0)) {
      uVar7 = FUN_1401568c0();
      local_1d8 = uVar7;
      FUN_140156b50(uVar7);
      local_1d0 = 1;
      piVar1 = (int *)(puVar2 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar2 + -8);
      }
      FUN_140156be0(uVar7);
    }
  }
  else {
    FUN_1401568c0();
    *param_1 = PTR_DAT_1403200a0;
    uVar5 = FUN_140156740(&DAT_140288b80);
    uVar7 = FUN_14004f760(param_1,uVar5);
    FUN_140156770(uVar7,&DAT_140288b80,uVar5);
    FUN_14004f380(param_1);
  }
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong FUN_140159e50(longlong param_1)

{
  int *piVar1;
  undefined *puVar2;
  undefined2 uVar3;
  undefined4 uVar4;
  undefined *puVar5;
  undefined *puVar6;
  undefined1 auStack_e8 [32];
  undefined *local_c8;
  undefined1 local_c0;
  undefined8 local_b8;
  longlong local_b0;
  undefined1 *local_a8;
  undefined1 local_a0 [136];
  ulonglong local_18;
  
  local_b8 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_e8;
  local_b0 = param_1;
  uVar4 = FUN_14015a430();
  FUN_140156a70(param_1,uVar4,1);
  *(undefined ***)(param_1 + 0x38) = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0x40) = 0;
  *(undefined2 *)(param_1 + 0x44) = 0;
  FUN_140158ad0();
  FUN_140159bb0(&local_c8);
  puVar2 = local_c8;
  puVar6 = local_c8;
  if (local_c8 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  local_a8 = local_a0;
  FUN_140153e40(&local_a8,puVar6,3);
  uVar4 = Ordinal_11(local_a8);
  if (local_a8 != local_a0) {
    free(local_a8);
  }
  *(undefined4 *)(param_1 + 0x40) = uVar4;
  uVar3 = Ordinal_9(0);
  *(undefined2 *)(param_1 + 0x44) = uVar3;
  if (((local_c8 != (undefined *)0x0) && (local_c8 != PTR_DAT_1403200a0)) &&
     (puVar6 = local_c8 + -8, puVar6 != (undefined *)0x0)) {
    puVar5 = (undefined *)FUN_1401568c0();
    local_c8 = puVar5;
    FUN_140156b50(puVar5);
    local_c0 = 1;
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar6);
    }
    FUN_140156be0(puVar5);
  }
  return param_1;
}



undefined8 FUN_140159f90(longlong *param_1)

{
  int iVar1;
  undefined8 uVar2;
  undefined *puVar3;
  
  uVar2 = FUN_140159300();
  uVar2 = FUN_140159040(uVar2);
  FUN_140050450(param_1,uVar2);
  if (((short)param_1[1] != 0) && ((short)param_1[1] != -1)) {
    puVar3 = (undefined *)*param_1;
    if ((undefined *)*param_1 == (undefined *)0x0) {
      puVar3 = PTR_DAT_140320098;
    }
    iVar1 = FUN_140156840(puVar3,&DAT_140281f00);
    if (iVar1 != 0) {
      puVar3 = (undefined *)*param_1;
      if ((undefined *)*param_1 == (undefined *)0x0) {
        puVar3 = PTR_DAT_140320098;
      }
      iVar1 = FUN_140156840(puVar3,"0.0.0.0");
      if (iVar1 != 0) {
        puVar3 = (undefined *)*param_1;
        if ((undefined *)*param_1 == (undefined *)0x0) {
          puVar3 = PTR_DAT_140320098;
        }
        iVar1 = FUN_140156840(puVar3,"255.255.255.255");
        if (iVar1 != 0) {
          return 1;
        }
      }
    }
  }
  return 0;
}



undefined * FUN_14015a040(void)

{
  bool bVar1;
  char cVar2;
  
  bVar1 = false;
  cVar2 = FUN_140156bf0(&DAT_140328820);
  if (cVar2 != '\0') {
    if (DAT_140320440 == '\0') {
      bVar1 = false;
    }
    else {
      bVar1 = true;
      FUN_140156b50(&DAT_140328820);
    }
  }
  if ((DAT_140328818 & 1) == 0) {
    DAT_140328818 = DAT_140328818 | 1;
    FUN_140159e50(&DAT_1403287d0);
    atexit((_func_5014 *)&LAB_140257ec0);
  }
  DAT_140320440 = 0;
  if (bVar1) {
    FUN_140156be0(&DAT_140328820);
  }
  return &DAT_1403287d0;
}



undefined8 * FUN_14015a100(undefined8 *param_1)

{
  undefined2 uVar1;
  undefined4 uVar2;
  longlong lVar3;
  
  lVar3 = FUN_14015a040();
  uVar2 = *(undefined4 *)(lVar3 + 0x40);
  uVar1 = *(undefined2 *)(lVar3 + 0x44);
  *param_1 = Proud::AddrPort::vftable;
  *(undefined2 *)((longlong)param_1 + 0xc) = uVar1;
  *(undefined4 *)(param_1 + 1) = uVar2;
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14015a130(longlong param_1)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  int iVar4;
  longlong lVar5;
  undefined8 uVar6;
  longlong lVar7;
  longlong lVar8;
  uint uVar9;
  int iVar11;
  ulonglong uVar12;
  longlong lVar13;
  longlong lVar14;
  longlong lVar15;
  undefined1 auStack_128 [32];
  undefined *local_108;
  undefined *local_100;
  longlong local_f8;
  longlong local_f0;
  undefined8 local_e8;
  undefined1 local_e0;
  undefined8 local_d8;
  undefined1 local_d0;
  undefined8 local_c8;
  undefined1 local_b8 [128];
  ulonglong local_38;
  ulonglong uVar10;
  
  local_c8 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_128;
  local_f8 = param_1;
  FUN_140158ad0();
  FUN_140159390(param_1,0);
  iVar4 = Ordinal_57(local_b8,0x80);
  if ((iVar4 == 0) && (lVar5 = Ordinal_52(local_b8), lVar5 != 0)) {
    local_f0 = lVar5;
    for (lVar15 = 0; uVar10 = 0, *(longlong *)(lVar15 + *(longlong *)(lVar5 + 0x18)) != 0;
        lVar15 = lVar15 + 8) {
      FUN_1401568c0();
      local_108 = PTR_DAT_140320098;
      uVar12 = uVar10;
      if (0 < *(short *)(lVar5 + 0x12)) {
        do {
          FUN_1401568c0();
          local_100 = PTR_DAT_140320098;
          if (0 < (longlong)uVar12) {
            FUN_140158ec0(&local_108,&DAT_14025b904);
          }
          FUN_1401592d0(&local_100,&DAT_14025b900,
                        *(undefined1 *)
                         (*(longlong *)(lVar15 + *(longlong *)(lVar5 + 0x18)) + uVar12));
          FUN_140158d30(&local_108,&local_100);
          puVar3 = local_100;
          if (((local_100 != (undefined *)0x0) && (local_100 != PTR_DAT_140320098)) &&
             (puVar1 = local_100 + -8, puVar1 != (undefined *)0x0)) {
            uVar6 = FUN_1401568c0();
            local_e8 = uVar6;
            FUN_140156b50(uVar6);
            local_e0 = 1;
            piVar2 = (int *)(puVar3 + -4);
            *piVar2 = *piVar2 + -1;
            if (*piVar2 == 0) {
              FUN_140156970(puVar1);
            }
            FUN_140156be0(uVar6);
            local_e0 = 0;
          }
          uVar9 = (int)uVar10 + 1;
          uVar10 = (ulonglong)uVar9;
          uVar12 = uVar12 + 1;
        } while ((int)uVar9 < (int)*(short *)(lVar5 + 0x12));
      }
      puVar3 = local_108;
      iVar4 = *(int *)(param_1 + 0x18);
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      iVar11 = *(int *)(param_1 + 0x18);
      FUN_140159390(param_1,iVar11 + 1);
      lVar8 = local_f8;
      iVar11 = iVar11 - iVar4;
      if ((0 < iVar11) && (iVar11 = iVar11 + -1, -1 < iVar11)) {
        lVar13 = (longlong)(iVar11 + iVar4 + 1) << 3;
        lVar14 = (longlong)(iVar11 + iVar4) << 3;
        do {
          lVar5 = FUN_1401a7bb0(lVar8);
          lVar7 = FUN_1401a7bb0(lVar8);
          FUN_140050450(lVar13 + lVar7,lVar14 + lVar5);
          lVar14 = lVar14 + -8;
          lVar13 = lVar13 + -8;
          iVar11 = iVar11 + -1;
          param_1 = local_f8;
          lVar5 = local_f0;
        } while (-1 < iVar11);
      }
      lVar8 = FUN_1401a7bb0(param_1);
      FUN_140050450(lVar8 + (longlong)iVar4 * 8,&local_108);
      if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_140320098)) &&
         (puVar3 + -8 != (undefined *)0x0)) {
        uVar6 = FUN_1401568c0();
        local_d8 = uVar6;
        FUN_140156b50(uVar6);
        local_d0 = 1;
        piVar2 = (int *)(puVar3 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(puVar3 + -8);
        }
        FUN_140156be0(uVar6);
        local_d0 = 0;
      }
    }
  }
  return;
}



void thunk_FUN_140156970(LPVOID param_1)

{
  HANDLE hHeap;
  
  hHeap = GetProcessHeap();
                    // WARNING: Could not recover jumptable at 0x00014015698c. Too many branches
                    // WARNING: Treating indirect jump as call
  HeapFree(hHeap,0,param_1);
  return;
}



undefined8 * FUN_14015a3f0(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::IRmiHost::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14015a420(undefined8 *param_1)

{
  *param_1 = Proud::ICompletionContext::vftable;
  return;
}



undefined8 FUN_14015a430(void)

{
  return 0;
}



undefined8 * FUN_14015a440(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::ICompletionContext::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14015a470(undefined8 *param_1)

{
  *param_1 = Proud::ICompletionPortEventSink::vftable;
  return;
}



undefined8 * FUN_14015a480(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::ICompletionPortEventSink::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14015a4b0(undefined8 *param_1)

{
  *param_1 = Proud::ISendDest_S::vftable;
  return;
}



undefined8 * FUN_14015a4c0(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::ISendDest_S::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14015a4f0(undefined8 *param_1)

{
  *param_1 = Proud::IUserTaskQueueOwner::vftable;
  return;
}



undefined8 * FUN_14015a500(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::IUserTaskQueueOwner::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14015a530(undefined8 *param_1)

{
  *param_1 = Proud::IVizAgentDg::vftable;
  return;
}



undefined8 * FUN_14015a540(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::IVizAgentDg::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 FUN_14015a570(void)

{
  return 0xfbf4;
}



undefined8 FUN_14015a580(void)

{
  return 0xfc08;
}



longlong FUN_14015a590(longlong param_1)

{
  return param_1 + 0x128;
}



void thunk_FUN_1401889e0(longlong param_1,longlong *param_2)

{
  longlong *plVar1;
  short sVar2;
  ushort uVar3;
  ushort uVar4;
  longlong lVar5;
  longlong lVar6;
  int iVar7;
  ushort uVar8;
  ushort uVar9;
  ushort uVar10;
  longlong lVar11;
  int iVar12;
  longlong lVar13;
  undefined1 auStack_78 [80];
  
  iVar12 = 0;
  lVar13 = 0;
  if (0 < *(int *)(param_1 + 0x48)) {
    do {
      if ((lVar13 < 0) || (*(int *)(param_1 + 0x48) <= iVar12)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x40) + lVar13 * 8);
      sVar2 = (**(code **)(*param_2 + 8))(param_2);
      uVar10 = sVar2 + 1;
      uVar3 = (**(code **)*param_2)(param_2);
      sVar2 = (**(code **)(*plVar1 + 8))(plVar1);
      uVar8 = sVar2 + 1;
      uVar4 = (**(code **)*plVar1)(plVar1);
      uVar9 = uVar8;
      if (uVar8 < uVar4) {
        uVar9 = uVar4;
        uVar4 = uVar8;
      }
      uVar8 = uVar10;
      if (uVar10 < uVar3) {
        uVar8 = uVar3;
        uVar3 = uVar10;
      }
      if (uVar4 < uVar3) {
LAB_140188a8d:
        if ((uVar8 <= uVar9) || ((uVar3 <= uVar9 && (uVar9 <= uVar8)))) goto LAB_140188b62;
        if (uVar3 <= uVar4) goto LAB_140188aaa;
      }
      else {
        if (uVar9 <= uVar8) goto LAB_140188b62;
        if (uVar4 <= uVar3) goto LAB_140188a8d;
LAB_140188aaa:
        if ((uVar4 <= uVar8) && (uVar8 <= uVar9)) {
LAB_140188b62:
          FUN_140156300(auStack_78,PTR_u_Duplicated_RMI_ID_is_found__Revi_140320fc8);
                    // WARNING: Subroutine does not return
          _CxxThrowException(auStack_78,(ThrowInfo *)&DAT_14031d928);
        }
      }
      iVar12 = iVar12 + 1;
      lVar13 = lVar13 + 1;
    } while (iVar12 < *(int *)(param_1 + 0x48));
  }
  param_2[2] = param_1;
  iVar12 = *(int *)(param_1 + 0x48);
  if (-1 < iVar12) {
    iVar7 = *(int *)(param_1 + 0x48);
    FUN_14015d550(param_1 + 0x30,iVar7 + 1);
    iVar7 = iVar7 - iVar12;
    if ((0 < iVar7) && (iVar7 = iVar7 + -1, lVar13 = (longlong)iVar7, -1 < iVar7)) {
      lVar11 = (lVar13 + iVar12) * 8 + 8;
      do {
        lVar5 = FUN_1401a7bb0(param_1 + 0x30);
        lVar6 = FUN_1401a7bb0(param_1 + 0x30);
        *(undefined8 *)(lVar6 + lVar11) = *(undefined8 *)(lVar5 + -8 + lVar11);
        lVar11 = lVar11 + -8;
        lVar13 = lVar13 + -1;
      } while (-1 < lVar13);
    }
    lVar13 = FUN_1401a7bb0(param_1 + 0x30);
    *(longlong **)(lVar13 + (longlong)iVar12 * 8) = param_2;
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



undefined8 FUN_14015a5b0(longlong param_1)

{
  return *(undefined8 *)(param_1 + 0x758);
}



void FUN_14015a5c0(longlong param_1)

{
  FUN_1401858d0(param_1 + 0x3d0);
  return;
}



void thunk_FUN_140187ae0(undefined8 *param_1)

{
  *param_1 = Proud::CRandom::vftable;
  FUN_140156c00();
  return;
}



undefined1 FUN_14015a5e0(longlong param_1)

{
  return *(undefined1 *)(param_1 + 0x380);
}



void FUN_14015a5f0(longlong param_1,undefined1 param_2)

{
  *(undefined1 *)(param_1 + 0x380) = param_2;
  return;
}



void FUN_14015a600(longlong param_1)

{
  FUN_14018aee0(param_1 + 0x6b8);
  return;
}



void FUN_14015a610(longlong param_1,int param_2)

{
  undefined1 local_58 [88];
  
  if (param_2 == 3) {
    FUN_140156300(local_58,L"Not supported value yet!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  *(int *)(param_1 + 0x180) = param_2;
  return;
}



void FUN_14015a650(longlong param_1,double param_2)

{
  if ((0.0 < param_2) && (param_2 < 1.0)) {
    *(double *)(param_1 + 0x1750) = param_2;
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_14015a680(longlong *param_1,int param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014015a693. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x178))(param_1,(double)param_2 / 1000.0);
  return;
}



undefined4 FUN_14015a6a0(longlong param_1)

{
  return *(undefined4 *)(param_1 + 0x178);
}



void FUN_14015a6b0(longlong param_1,undefined8 param_2)

{
  char cVar1;
  undefined1 local_58 [80];
  
  cVar1 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x90))();
  if (cVar1 != '\0') {
    FUN_140156300(local_58,PTR_u_Already_async_callback_may_occur_140320fd8);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  *(undefined8 *)(param_1 + 0x6b0) = param_2;
  return;
}



undefined4 FUN_14015a710(longlong param_1)

{
  return *(undefined4 *)(param_1 + 0x22c);
}



void FUN_14015a720(longlong param_1,int param_2)

{
  int iVar1;
  int iVar2;
  
  iVar1 = DAT_140320dc0;
  if (param_2 < DAT_140320dc0) {
    iVar1 = param_2;
  }
  iVar2 = 0;
  if (0 < iVar1) {
    iVar2 = iVar1;
  }
  *(int *)(param_1 + 0x194) = iVar2;
  return;
}



undefined1 FUN_14015a740(longlong param_1)

{
  return *(undefined1 *)(param_1 + 0x198);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14015a750(undefined8 param_1)

{
  undefined1 auStack_c8 [32];
  undefined8 local_a8;
  undefined1 local_98 [120];
  undefined8 local_20;
  ulonglong local_18;
  
  local_a8 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_c8;
  FUN_14018afb0(local_98);
  local_20 = param_1;
  FUN_1401c5a30(local_98);
  FUN_14018b000(local_98);
  return;
}



void FUN_14015a7c0(longlong param_1,int param_2,longlong param_3,longlong param_4)

{
  int *piVar1;
  ulonglong uVar2;
  longlong lVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  int *piVar6;
  ulonglong uVar7;
  
  uVar2 = 0;
  piVar6 = (int *)(param_1 + 0x10);
  piVar1 = piVar6;
  uVar5 = uVar2;
  uVar7 = uVar2;
  do {
    if (*piVar1 == param_2) {
      lVar3 = (longlong)(int)uVar5;
      *(undefined4 *)(param_1 + 0x30 + lVar3 * 0x30) = *(undefined4 *)(param_3 + 8);
      *(undefined2 *)(param_1 + 0x34 + lVar3 * 0x30) = *(undefined2 *)(param_3 + 0xc);
      *(undefined4 *)(param_1 + 0x20 + lVar3 * 0x30) = *(undefined4 *)(param_4 + 8);
      *(undefined2 *)(param_1 + 0x24 + lVar3 * 0x30) = *(undefined2 *)(param_4 + 0xc);
      return;
    }
    uVar7 = uVar7 + 1;
    uVar5 = (ulonglong)((int)uVar5 + 1);
    piVar1 = piVar1 + 0xc;
    uVar4 = uVar2;
  } while ((longlong)uVar7 < 2);
  do {
    if (*piVar6 == 0) {
      lVar3 = (longlong)(int)uVar4;
      *(undefined4 *)(param_1 + 0x30 + lVar3 * 0x30) = *(undefined4 *)(param_3 + 8);
      *(undefined2 *)(param_1 + 0x34 + lVar3 * 0x30) = *(undefined2 *)(param_3 + 0xc);
      *(undefined4 *)(param_1 + 0x20 + lVar3 * 0x30) = *(undefined4 *)(param_4 + 8);
      *(undefined2 *)(param_1 + 0x24 + lVar3 * 0x30) = *(undefined2 *)(param_4 + 0xc);
      *(int *)(param_1 + 0x10 + lVar3 * 0x30) = param_2;
      return;
    }
    uVar2 = uVar2 + 1;
    piVar6 = piVar6 + 0xc;
    uVar4 = (ulonglong)((int)uVar4 + 1);
  } while ((longlong)uVar2 < 2);
  return;
}



undefined8 * FUN_14015a8a0(longlong param_1,undefined8 *param_2,int param_3)

{
  int *piVar1;
  ulonglong uVar2;
  int iVar3;
  ulonglong uVar4;
  
  uVar2 = 0;
  piVar1 = (int *)(param_1 + 0x10);
  uVar4 = uVar2;
  do {
    iVar3 = (int)uVar4;
    if (*piVar1 == param_3) {
      *param_2 = Proud::AddrPort::vftable;
      *(undefined4 *)(param_2 + 1) = *(undefined4 *)(param_1 + 0x30 + (longlong)iVar3 * 0x30);
      *(undefined2 *)((longlong)param_2 + 0xc) =
           *(undefined2 *)(param_1 + 0x34 + (longlong)iVar3 * 0x30);
      return param_2;
    }
    uVar2 = uVar2 + 1;
    uVar4 = (ulonglong)(iVar3 + 1);
    piVar1 = piVar1 + 0xc;
  } while ((longlong)uVar2 < 2);
  *param_2 = Proud::AddrPort::vftable;
  *(undefined4 *)(param_2 + 1) = DAT_140320450;
  *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  return param_2;
}



undefined8 * FUN_14015a920(longlong param_1,undefined8 *param_2,int param_3)

{
  int *piVar1;
  ulonglong uVar2;
  int iVar3;
  ulonglong uVar4;
  
  uVar2 = 0;
  piVar1 = (int *)(param_1 + 0x70);
  uVar4 = uVar2;
  do {
    iVar3 = (int)uVar4;
    if (*piVar1 == param_3) {
      *param_2 = Proud::AddrPort::vftable;
      *(undefined4 *)(param_2 + 1) = *(undefined4 *)(param_1 + 0x80 + (longlong)iVar3 * 0x48);
      *(undefined2 *)((longlong)param_2 + 0xc) =
           *(undefined2 *)(param_1 + 0x84 + (longlong)iVar3 * 0x48);
      return param_2;
    }
    uVar2 = uVar2 + 1;
    uVar4 = (ulonglong)(iVar3 + 1);
    piVar1 = piVar1 + 0x12;
  } while ((longlong)uVar2 < 2);
  *param_2 = Proud::AddrPort::vftable;
  *(undefined4 *)(param_2 + 1) = DAT_140320450;
  *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  return param_2;
}



undefined8 * FUN_14015a9a0(longlong param_1,undefined8 *param_2,int param_3)

{
  int *piVar1;
  ulonglong uVar2;
  int iVar3;
  ulonglong uVar4;
  
  uVar2 = 0;
  piVar1 = (int *)(param_1 + 0x10);
  uVar4 = uVar2;
  do {
    iVar3 = (int)uVar4;
    if (*piVar1 == param_3) {
      *param_2 = Proud::AddrPort::vftable;
      *(undefined4 *)(param_2 + 1) = *(undefined4 *)(param_1 + 0x20 + (longlong)iVar3 * 0x30);
      *(undefined2 *)((longlong)param_2 + 0xc) =
           *(undefined2 *)(param_1 + 0x24 + (longlong)iVar3 * 0x30);
      return param_2;
    }
    uVar2 = uVar2 + 1;
    uVar4 = (ulonglong)(iVar3 + 1);
    piVar1 = piVar1 + 0xc;
  } while ((longlong)uVar2 < 2);
  *param_2 = Proud::AddrPort::vftable;
  *(undefined4 *)(param_2 + 1) = DAT_140320450;
  *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  return param_2;
}



int FUN_14015aa20(longlong param_1)

{
  int iVar1;
  short *psVar2;
  longlong lVar3;
  
  iVar1 = 0;
  lVar3 = 2;
  psVar2 = (short *)(param_1 + 0x24);
  do {
    if ((*(int *)(psVar2 + -2) != DAT_140320450) || (*psVar2 != DAT_140320454)) {
      iVar1 = iVar1 + 1;
    }
    psVar2 = psVar2 + 0x18;
    lVar3 = lVar3 + -1;
  } while (lVar3 != 0);
  return iVar1;
}



void FUN_14015aa60(longlong param_1)

{
  FUN_1401858d0(param_1 + 0x148);
  FUN_1401858d0(param_1 + 0x120);
  return;
}



undefined1 FUN_14015aaa0(longlong param_1)

{
  return *(undefined1 *)(param_1 + 8);
}



void FUN_14015aab0(longlong param_1,int param_2,longlong param_3,longlong param_4)

{
  undefined4 uVar1;
  ulonglong uVar2;
  longlong lVar3;
  int *piVar4;
  ulonglong uVar5;
  undefined2 uVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  longlong lVar9;
  ulonglong uVar10;
  int *piVar11;
  
  uVar5 = 0;
  piVar11 = (int *)(param_1 + 0x70);
  piVar4 = piVar11;
  uVar7 = uVar5;
  uVar10 = uVar5;
  do {
    if (*piVar4 == param_2) {
      piVar11 = (int *)(param_1 + 0x10);
      piVar4 = piVar11;
      uVar7 = uVar5;
      uVar2 = uVar5;
      goto LAB_14015ac20;
    }
    uVar7 = uVar7 + 1;
    uVar10 = (ulonglong)((int)uVar10 + 1);
    piVar4 = piVar4 + 0x12;
    uVar2 = uVar5;
    uVar8 = uVar5;
  } while ((longlong)uVar7 < 2);
  while (*piVar11 != 0) {
    uVar2 = uVar2 + 1;
    piVar11 = piVar11 + 0x12;
    uVar8 = (ulonglong)((int)uVar8 + 1);
    if (1 < (longlong)uVar2) {
      return;
    }
  }
  lVar3 = (longlong)(int)uVar8;
  piVar11 = (int *)(param_1 + 0x10);
  *(int *)(param_1 + 0x70 + lVar3 * 0x48) = param_2;
  piVar4 = piVar11;
  uVar7 = uVar5;
  uVar10 = uVar5;
  do {
    if (*piVar4 == param_2) {
      lVar9 = (longlong)(int)uVar10 * 0x30;
      uVar1 = *(undefined4 *)(lVar9 + 0x30 + param_1);
      uVar6 = *(undefined2 *)(lVar9 + 0x34 + param_1);
      break;
    }
    uVar7 = uVar7 + 1;
    uVar10 = (ulonglong)((int)uVar10 + 1);
    piVar4 = piVar4 + 0xc;
    uVar1 = DAT_140320450;
    uVar6 = DAT_140320454;
  } while ((longlong)uVar7 < 2);
  *(undefined4 *)(param_1 + 0x80 + lVar3 * 0x48) = uVar1;
  *(undefined2 *)(param_1 + 0x84 + lVar3 * 0x48) = uVar6;
  uVar7 = uVar5;
  do {
    if (*piVar11 == param_2) {
      lVar9 = (longlong)(int)uVar7 * 0x30;
      uVar1 = *(undefined4 *)(lVar9 + 0x20 + param_1);
      uVar6 = *(undefined2 *)(lVar9 + 0x24 + param_1);
      break;
    }
    uVar5 = uVar5 + 1;
    uVar7 = (ulonglong)((int)uVar7 + 1);
    piVar11 = piVar11 + 0xc;
    uVar1 = DAT_140320450;
    uVar6 = DAT_140320454;
  } while ((longlong)uVar5 < 2);
  *(undefined4 *)(param_1 + 0x90 + lVar3 * 0x48) = uVar1;
  *(undefined2 *)(param_1 + 0x94 + lVar3 * 0x48) = uVar6;
  *(undefined4 *)(param_1 + 0xa0 + lVar3 * 0x48) = *(undefined4 *)(param_3 + 8);
  *(undefined2 *)(param_1 + 0xa4 + lVar3 * 0x48) = *(undefined2 *)(param_3 + 0xc);
  *(undefined4 *)(param_1 + 0xb0 + lVar3 * 0x48) = *(undefined4 *)(param_4 + 8);
  *(undefined2 *)(param_1 + 0xb4 + lVar3 * 0x48) = *(undefined2 *)(param_4 + 0xc);
  return;
  while( true ) {
    uVar7 = uVar7 + 1;
    uVar2 = (ulonglong)((int)uVar2 + 1);
    piVar4 = piVar4 + 0xc;
    uVar1 = DAT_140320450;
    uVar6 = DAT_140320454;
    if (1 < (longlong)uVar7) break;
LAB_14015ac20:
    if (*piVar4 == param_2) {
      lVar3 = (longlong)(int)uVar2 * 0x30;
      uVar1 = *(undefined4 *)(lVar3 + 0x30 + param_1);
      uVar6 = *(undefined2 *)(lVar3 + 0x34 + param_1);
      break;
    }
  }
  lVar3 = (longlong)(int)uVar10;
  *(undefined4 *)(param_1 + 0x80 + lVar3 * 0x48) = uVar1;
  *(undefined2 *)(param_1 + 0x84 + lVar3 * 0x48) = uVar6;
  uVar7 = uVar5;
  do {
    if (*piVar11 == param_2) {
      lVar9 = (longlong)(int)uVar7 * 0x30;
      uVar1 = *(undefined4 *)(lVar9 + 0x20 + param_1);
      uVar6 = *(undefined2 *)(lVar9 + 0x24 + param_1);
      break;
    }
    uVar5 = uVar5 + 1;
    uVar7 = (ulonglong)((int)uVar7 + 1);
    piVar11 = piVar11 + 0xc;
    uVar1 = DAT_140320450;
    uVar6 = DAT_140320454;
  } while ((longlong)uVar5 < 2);
  *(undefined4 *)(param_1 + 0x90 + lVar3 * 0x48) = uVar1;
  *(undefined2 *)(param_1 + 0x94 + lVar3 * 0x48) = uVar6;
  *(undefined4 *)(param_1 + 0xa0 + lVar3 * 0x48) = *(undefined4 *)(param_3 + 8);
  *(undefined2 *)(param_1 + 0xa4 + lVar3 * 0x48) = *(undefined2 *)(param_3 + 0xc);
  *(undefined4 *)(param_1 + 0xb0 + lVar3 * 0x48) = *(undefined4 *)(param_4 + 8);
  *(undefined2 *)(param_1 + 0xb4 + lVar3 * 0x48) = *(undefined2 *)(param_4 + 0xc);
  return;
}



undefined8 * FUN_14015ad10(longlong param_1,undefined8 *param_2,int param_3)

{
  int *piVar1;
  ulonglong uVar2;
  int iVar3;
  ulonglong uVar4;
  
  uVar2 = 0;
  piVar1 = (int *)(param_1 + 0x70);
  uVar4 = uVar2;
  do {
    iVar3 = (int)uVar4;
    if (*piVar1 == param_3) {
      *param_2 = Proud::AddrPort::vftable;
      *(undefined4 *)(param_2 + 1) = *(undefined4 *)(param_1 + 0xa0 + (longlong)iVar3 * 0x48);
      *(undefined2 *)((longlong)param_2 + 0xc) =
           *(undefined2 *)(param_1 + 0xa4 + (longlong)iVar3 * 0x48);
      return param_2;
    }
    uVar2 = uVar2 + 1;
    uVar4 = (ulonglong)(iVar3 + 1);
    piVar1 = piVar1 + 0x12;
  } while ((longlong)uVar2 < 2);
  *param_2 = Proud::AddrPort::vftable;
  *(undefined4 *)(param_2 + 1) = DAT_140320450;
  *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  return param_2;
}



undefined8 * FUN_14015ad90(longlong param_1,undefined8 *param_2,int param_3)

{
  int *piVar1;
  ulonglong uVar2;
  int iVar3;
  ulonglong uVar4;
  
  uVar2 = 0;
  piVar1 = (int *)(param_1 + 0x70);
  uVar4 = uVar2;
  do {
    iVar3 = (int)uVar4;
    if (*piVar1 == param_3) {
      *param_2 = Proud::AddrPort::vftable;
      *(undefined4 *)(param_2 + 1) = *(undefined4 *)(param_1 + 0xb0 + (longlong)iVar3 * 0x48);
      *(undefined2 *)((longlong)param_2 + 0xc) =
           *(undefined2 *)(param_1 + 0xb4 + (longlong)iVar3 * 0x48);
      return param_2;
    }
    uVar2 = uVar2 + 1;
    uVar4 = (ulonglong)(iVar3 + 1);
    piVar1 = piVar1 + 0x12;
  } while ((longlong)uVar2 < 2);
  *param_2 = Proud::AddrPort::vftable;
  *(undefined4 *)(param_2 + 1) = DAT_140320450;
  *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  return param_2;
}



undefined8 * FUN_14015ae10(undefined8 *param_1)

{
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  param_1[6] = 0;
  param_1[5] = 0;
  return param_1;
}



undefined1 * FUN_14015ae40(undefined1 *param_1)

{
  *param_1 = 1;
  return param_1;
}



void FUN_14015ae50(longlong *param_1)

{
  undefined8 *puVar1;
  
  puVar1 = (undefined8 *)*param_1;
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  return;
}



undefined8 FUN_14015ae70(longlong *param_1)

{
  if ((undefined8 *)*param_1 != (undefined8 *)0x0) {
    return *(undefined8 *)*param_1;
  }
  return 0;
}



int FUN_14015ae80(longlong param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  int iVar4;
  
  iVar4 = *(int *)(param_1 + 0x24);
  if (iVar4 == 0) {
    iVar2 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
    iVar4 = 0x400;
    if (iVar2 < 0x400) {
      iVar4 = iVar2;
    }
    iVar2 = 4;
    if (4 < iVar4) {
      iVar2 = iVar4;
    }
    iVar4 = iVar2 + param_2;
    if (iVar2 + param_2 < *(int *)(param_1 + 0x20)) {
      iVar4 = *(int *)(param_1 + 0x20);
    }
    return iVar4;
  }
  if (iVar4 != 1) {
    if (iVar4 != 2) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (param_2 < *(int *)(param_1 + 0x20)) {
      param_2 = *(int *)(param_1 + 0x20);
    }
    return param_2;
  }
  uVar1 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
  uVar3 = 0x10;
  if (0x10 < (int)uVar1) {
    uVar3 = uVar1;
  }
  if (uVar3 < 2) {
    uVar3 = 1;
  }
  iVar4 = uVar3 + param_2;
  if ((int)(uVar3 + param_2) < *(int *)(param_1 + 0x20)) {
    iVar4 = *(int *)(param_1 + 0x20);
  }
  return iVar4;
}



void FUN_14015af20(longlong *param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  undefined1 local_58 [88];
  
  if (*(longlong **)(param_2 + 0x120) != param_1) {
    FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                  L"Proud::CListNode<class Proud::CRemoteClient_S>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  lVar1 = *(longlong *)(param_2 + 0x118);
  lVar2 = *(longlong *)(param_2 + 0x110);
  if (lVar1 != 0) {
    *(longlong *)(lVar1 + 0x110) = lVar2;
  }
  if (lVar2 != 0) {
    *(longlong *)(lVar2 + 0x118) = lVar1;
  }
  if (lVar1 == 0) {
    if (param_1[1] != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CRemoteClient_S>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    param_1[1] = lVar2;
  }
  if (lVar2 == 0) {
    if (*param_1 != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CRemoteClient_S>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    *param_1 = lVar1;
  }
  *(undefined8 *)(param_2 + 0x110) = 0;
  *(undefined8 *)(param_2 + 0x118) = 0;
  *(undefined8 *)(param_2 + 0x120) = 0;
  *(int *)(param_1 + 2) = (int)param_1[2] + -1;
  return;
}



void FUN_14015b010(undefined8 *param_1,longlong param_2,longlong param_3)

{
  undefined8 *puVar1;
  
  if (0 < param_3) {
    param_2 = param_2 - (longlong)param_1;
    do {
      puVar1 = param_1 + 4;
      param_3 = param_3 + -1;
      *param_1 = *(undefined8 *)(param_2 + (longlong)param_1);
      param_1[1] = *(undefined8 *)(param_2 + -0x18 + (longlong)puVar1);
      param_1[2] = *(undefined8 *)(param_2 + -0x10 + (longlong)puVar1);
      param_1[3] = *(undefined8 *)(param_2 + -8 + (longlong)puVar1);
      param_1 = puVar1;
    } while (param_3 != 0);
  }
  return;
}



void FUN_14015b050(char *param_1)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  int iVar4;
  undefined1 local_58 [88];
  
  if (*param_1 != '\0') {
    iVar4 = 0;
    if ((*(longlong *)(param_1 + 0x20) != 0) && (*(longlong *)(param_1 + 8) == 0)) {
      FUN_140156300(local_58,L"CFastMap consistency error #0!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    lVar1 = *(longlong *)(param_1 + 0x10);
    lVar3 = lVar1;
    while (lVar3 != 0) {
      lVar2 = *(longlong *)(lVar3 + 0x18);
      if ((lVar2 != 0) && (*(longlong *)(lVar2 + 0x20) != lVar3)) {
        FUN_140156300(local_58,L"CFastMap consistency error #1!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      if ((lVar3 == lVar1) && (*(longlong *)(lVar3 + 0x20) != 0)) {
        FUN_140156300(local_58,L"CFastMap consistency error #2!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      if ((lVar3 == *(longlong *)(param_1 + 0x18)) && (lVar2 != 0)) {
        FUN_140156300(local_58,L"CFastMap consistency error #3!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      iVar4 = iVar4 + 1;
      lVar3 = lVar2;
    }
    if (iVar4 != *(int *)(param_1 + 0x20)) {
      for (; lVar1 != 0; lVar1 = *(longlong *)(lVar1 + 0x18)) {
      }
      FUN_140156300(local_58,L"CFastMap consistency error #4!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
  }
  return;
}



void FUN_14015b180(longlong *param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  undefined1 local_58 [88];
  
  if (*(longlong **)(param_2 + 0xa0) != param_1) {
    FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                  L"Proud::CListNode<class Proud::CUdpSocket_S>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  lVar1 = *(longlong *)(param_2 + 0x98);
  lVar2 = *(longlong *)(param_2 + 0x90);
  if (lVar1 != 0) {
    *(longlong *)(lVar1 + 0x90) = lVar2;
  }
  if (lVar2 != 0) {
    *(longlong *)(lVar2 + 0x98) = lVar1;
  }
  if (lVar1 == 0) {
    if (param_1[1] != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CUdpSocket_S>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    param_1[1] = lVar2;
  }
  if (lVar2 == 0) {
    if (*param_1 != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CUdpSocket_S>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    *param_1 = lVar1;
  }
  *(undefined8 *)(param_2 + 0x90) = 0;
  *(undefined8 *)(param_2 + 0x98) = 0;
  *(undefined8 *)(param_2 + 0xa0) = 0;
  *(int *)(param_1 + 2) = (int)param_1[2] + -1;
  return;
}



int FUN_14015b270(longlong param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  int iVar4;
  
  iVar4 = *(int *)(param_1 + 0x24);
  if (iVar4 == 0) {
    iVar2 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
    iVar4 = 0x400;
    if (iVar2 < 0x400) {
      iVar4 = iVar2;
    }
    iVar2 = 4;
    if (4 < iVar4) {
      iVar2 = iVar4;
    }
    iVar4 = iVar2 + param_2;
    if (iVar2 + param_2 < *(int *)(param_1 + 0x20)) {
      iVar4 = *(int *)(param_1 + 0x20);
    }
    return iVar4;
  }
  if (iVar4 != 1) {
    if (iVar4 != 2) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (param_2 < *(int *)(param_1 + 0x20)) {
      param_2 = *(int *)(param_1 + 0x20);
    }
    return param_2;
  }
  uVar1 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
  uVar3 = 0x10;
  if (0x10 < (int)uVar1) {
    uVar3 = uVar1;
  }
  if (uVar3 < 3) {
    uVar3 = 2;
  }
  iVar4 = uVar3 + param_2;
  if ((int)(uVar3 + param_2) < *(int *)(param_1 + 0x20)) {
    iVar4 = *(int *)(param_1 + 0x20);
  }
  return iVar4;
}



int FUN_14015b310(longlong param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  int iVar4;
  
  iVar4 = *(int *)(param_1 + 0x24);
  if (iVar4 == 0) {
    iVar2 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
    iVar4 = 0x400;
    if (iVar2 < 0x400) {
      iVar4 = iVar2;
    }
    iVar2 = 4;
    if (4 < iVar4) {
      iVar2 = iVar4;
    }
    iVar4 = iVar2 + param_2;
    if (iVar2 + param_2 < *(int *)(param_1 + 0x20)) {
      iVar4 = *(int *)(param_1 + 0x20);
    }
    return iVar4;
  }
  if (iVar4 != 1) {
    if (iVar4 != 2) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (param_2 < *(int *)(param_1 + 0x20)) {
      param_2 = *(int *)(param_1 + 0x20);
    }
    return param_2;
  }
  uVar1 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
  uVar3 = 0x10;
  if (0x10 < (int)uVar1) {
    uVar3 = uVar1;
  }
  if (uVar3 < 0x11) {
    uVar3 = 0x10;
  }
  iVar4 = uVar3 + param_2;
  if ((int)(uVar3 + param_2) < *(int *)(param_1 + 0x20)) {
    iVar4 = *(int *)(param_1 + 0x20);
  }
  return iVar4;
}



void FUN_14015b3b0(char *param_1)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  int iVar4;
  undefined1 local_58 [88];
  
  if (*param_1 != '\0') {
    iVar4 = 0;
    if ((*(longlong *)(param_1 + 0x20) != 0) && (*(longlong *)(param_1 + 8) == 0)) {
      FUN_140156300(local_58,L"CFastMap consistency error #0!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    lVar1 = *(longlong *)(param_1 + 0x10);
    lVar3 = lVar1;
    while (lVar3 != 0) {
      lVar2 = *(longlong *)(lVar3 + 0x10);
      if ((lVar2 != 0) && (*(longlong *)(lVar2 + 0x18) != lVar3)) {
        FUN_140156300(local_58,L"CFastMap consistency error #1!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      if ((lVar3 == lVar1) && (*(longlong *)(lVar3 + 0x18) != 0)) {
        FUN_140156300(local_58,L"CFastMap consistency error #2!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      if ((lVar3 == *(longlong *)(param_1 + 0x18)) && (lVar2 != 0)) {
        FUN_140156300(local_58,L"CFastMap consistency error #3!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      iVar4 = iVar4 + 1;
      lVar3 = lVar2;
    }
    if (iVar4 != *(int *)(param_1 + 0x20)) {
      for (; lVar1 != 0; lVar1 = *(longlong *)(lVar1 + 0x10)) {
      }
      FUN_140156300(local_58,L"CFastMap consistency error #4!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
  }
  return;
}



int FUN_14015b4e0(longlong param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  
  iVar3 = *(int *)(param_1 + 0x24);
  if (iVar3 == 0) {
    iVar2 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
    iVar3 = 0x400;
    if (iVar2 < 0x400) {
      iVar3 = iVar2;
    }
    iVar2 = 4;
    if (4 < iVar3) {
      iVar2 = iVar3;
    }
    iVar3 = iVar2 + param_2;
    if (iVar2 + param_2 < *(int *)(param_1 + 0x20)) {
      iVar3 = *(int *)(param_1 + 0x20);
    }
    return iVar3;
  }
  if (iVar3 != 1) {
    if (iVar3 != 2) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (param_2 < *(int *)(param_1 + 0x20)) {
      param_2 = *(int *)(param_1 + 0x20);
    }
    return param_2;
  }
  uVar1 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
  uVar4 = 0x10;
  if (0x10 < (int)uVar1) {
    uVar4 = uVar1;
  }
  if (uVar4 < 5) {
    uVar4 = 4;
  }
  iVar3 = uVar4 + param_2;
  if ((int)(uVar4 + param_2) < *(int *)(param_1 + 0x20)) {
    iVar3 = *(int *)(param_1 + 0x20);
  }
  return iVar3;
}



undefined8 FUN_14015b580(undefined8 param_1,longlong param_2)

{
  char cVar1;
  undefined4 local_res8 [2];
  
  cVar1 = FUN_1401543d0(param_1,local_res8,4);
  if (cVar1 != '\0') {
    *(undefined4 *)(param_2 + 8) = local_res8[0];
  }
  cVar1 = FUN_1401543d0(param_1,local_res8,2);
  if (cVar1 != '\0') {
    *(undefined2 *)(param_2 + 0xc) = (undefined2)local_res8[0];
  }
  return param_1;
}



undefined1 FUN_14015b5e0(longlong param_1)

{
  char cVar1;
  
  cVar1 = FUN_140198740();
  if ((cVar1 != '\0') && ((*(char *)(param_1 + 0x3f8) != '\0' || (*(int *)(param_1 + 1000) != 0))))
  {
    return 1;
  }
  return 0;
}



ulonglong FUN_14015b620(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  ulonglong uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  
  uVar3 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  uVar4 = uVar2;
  FUN_140156b50(uVar2);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::GetP2PGroupCount",
               *(longlong *)(param_1 + -0xa8),param_4,uVar3,uVar4,1);
  }
  uVar1 = *(ulonglong *)(param_1 + 0x378);
  FUN_140156be0(uVar2);
  return uVar1 & 0xffffffff;
}



ulonglong FUN_14015b6b0(longlong param_1)

{
  ulonglong in_RAX;
  ulonglong uVar1;
  
  if (*(longlong *)(param_1 + 0x3e0) == 0) {
    return in_RAX & 0xffffffffffffff00;
  }
  uVar1 = FUN_14018a700();
  return uVar1;
}



void thunk_FUN_140157bd0(void)

{
  FUN_140157bd0();
  return;
}



bool FUN_14015b6f0(longlong param_1)

{
  return *(longlong *)(param_1 + 0x3f8) == 0;
}



ulonglong FUN_14015b700(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  ulonglong uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  
  uVar3 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  uVar4 = uVar2;
  FUN_140156b50(uVar2);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::GetClientCount",
               *(longlong *)(param_1 + -0xa8),param_4,uVar3,uVar4,1);
  }
  uVar1 = *(ulonglong *)(param_1 + 0xbf0);
  FUN_140156be0(uVar2);
  return uVar1 & 0xffffffff;
}



void FUN_14015b790(longlong param_1,int param_2)

{
  int iVar1;
  undefined8 uVar2;
  
  if (param_2 < 0x81) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  uVar2 = FUN_140181860();
  FUN_140156b50(uVar2);
  iVar1 = param_2;
  if (param_2 < DAT_140320d70) {
    iVar1 = DAT_140320d70;
  }
  DAT_140320d70 = iVar1;
  FUN_140156be0(uVar2);
  *(int *)(param_1 + 0x184) = param_2;
  return;
}



void FUN_14015b800(longlong param_1,double param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined8 in_RDX;
  
  if ((1.0 <= param_2) || (*(longlong *)(param_1 + 0x6b0) == 0)) {
    if ((240.0 < param_2) && (*(longlong *)(param_1 + 0x6b0) != 0)) {
      FUN_1401580e0(L"Too long timeout value. It may take a lot of time to detect lost connection.",
                    in_RDX,param_3,param_4,0xfffffffffffffffe);
    }
    uVar1 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
    FUN_140156b50(uVar1);
    if (DAT_1403288ef != '\0') {
      (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
                (param_1 + -0xa8,L"Proud::CNetServerImpl::SetDefaultTimeoutTimeSec");
    }
    FUN_140187fd0(param_1 + -0xa8,param_2);
    *(double *)(param_1 + 0x188) = param_2;
    FUN_140156be0(uVar1);
  }
  else {
    FUN_1401580e0(L"Too short timeout value. It may cause unfair disconnection.",in_RDX,param_3,
                  param_4,0xfffffffffffffffe);
  }
  return;
}



undefined8 FUN_14015b8f0(longlong param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  uVar2 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  uVar3 = uVar1;
  FUN_140156b50(uVar1);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::SetDirectP2PStartCondition",
               *(longlong *)(param_1 + -0xa8),param_4,uVar2,uVar3,1);
  }
  if (1 < param_2) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(int *)(param_1 + 400) = param_2;
  FUN_140156be0(uVar1);
  return 1;
}



undefined8 * FUN_14015b990(longlong param_1,undefined8 *param_2)

{
  if ((*(longlong **)(param_1 + 0x6a0) != (longlong *)0x0) &&
     (**(longlong **)(param_1 + 0x6a0) != 0)) {
    FUN_140184b60();
    return param_2;
  }
  *param_2 = Proud::AddrPort::vftable;
  *(undefined4 *)(param_2 + 1) = DAT_140320450;
  *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  return param_2;
}



undefined1 FUN_14015b9f0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined1 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  
  uVar4 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))();
  uVar5 = uVar3;
  FUN_140156b50(uVar3);
  lVar1 = *(longlong *)(param_1 + 0x78);
  uVar2 = (**(code **)(lVar1 + 0x18))
                    ((longlong *)(param_1 + 0x78),param_2,lVar1,param_4,uVar4,uVar5,1);
  FUN_140156be0(uVar3);
  return uVar2;
}



bool FUN_14015ba60(longlong param_1)

{
  return *(longlong *)(param_1 + 0x3e0) != 0;
}



void FUN_14015ba70(longlong param_1,undefined1 param_2,undefined8 param_3,undefined8 param_4)

{
  char cVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined1 local_50 [72];
  
  uVar3 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  uVar4 = uVar2;
  FUN_140156b50(uVar2);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::AllowEmptyP2PGroup",
               *(longlong *)(param_1 + -0xa8),param_4,uVar3,uVar4,1);
  }
  cVar1 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x90))(param_1 + -0xa8);
  if (cVar1 != '\0') {
    FUN_140156300(local_50,L"Cannot set AllowEmptyP2PGroup after the server has started.");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
  }
  *(undefined1 *)(param_1 + 0x1758) = param_2;
  FUN_140156be0(uVar2);
  return;
}



void FUN_14015bb50(longlong param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  void *pvVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 0x58) == 0) {
    pvVar1 = operator_new(0xd0);
    uVar2 = 0;
    if (pvVar1 != (void *)0x0) {
      uVar2 = FUN_14019c470(pvVar1,param_1 + 0x118,param_2,param_3,param_4);
    }
    *(undefined8 *)(param_1 + 0x58) = uVar2;
  }
  return;
}



bool FUN_14015bbd0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  longlong lVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  
  uVar3 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  uVar4 = uVar1;
  FUN_140156b50(uVar1);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::SetHostTag",*(longlong *)(param_1 + -0xa8),
               param_4,uVar3,uVar4,1);
  }
  lVar2 = (**(code **)(*(longlong *)(param_1 + 0x78) + 0x10))((longlong *)(param_1 + 0x78),param_2);
  if (lVar2 != 0) {
    *(undefined8 *)(lVar2 + 0x28) = param_3;
    FUN_140156be0(uVar1);
  }
  else {
    FUN_140156be0(uVar1);
  }
  return lVar2 != 0;
}



ulonglong FUN_14015bc90(longlong param_1,int param_2)

{
  undefined2 uVar1;
  undefined2 uVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  int *piVar5;
  longlong lVar6;
  int *piVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  
  uVar8 = 0;
  piVar5 = (int *)(param_1 + 0x70);
  uVar9 = uVar8;
  uVar10 = uVar8;
  do {
    if (*piVar5 == param_2) {
      lVar6 = (longlong)(int)uVar10;
      uVar3 = *(undefined4 *)(param_1 + 0x90 + lVar6 * 0x48);
      uVar1 = *(undefined2 *)(param_1 + 0x94 + lVar6 * 0x48);
      uVar4 = *(undefined4 *)(param_1 + 0x80 + lVar6 * 0x48);
      uVar2 = *(undefined2 *)(param_1 + 0x84 + lVar6 * 0x48);
      piVar5 = (int *)(param_1 + 0x10);
      piVar7 = piVar5;
      uVar9 = uVar8;
      uVar10 = uVar8;
      do {
        if (*piVar7 == param_2) {
          lVar6 = (longlong)(int)uVar10;
          *(undefined4 *)(param_1 + 0x30 + lVar6 * 0x30) = uVar4;
          *(undefined2 *)(param_1 + 0x34 + lVar6 * 0x30) = uVar2;
          *(undefined2 *)(param_1 + 0x24 + lVar6 * 0x30) = uVar1;
          *(undefined4 *)(param_1 + 0x20 + lVar6 * 0x30) = uVar3;
          return CONCAT71((int7)(int3)(uVar10 >> 8),1);
        }
        uVar9 = uVar9 + 1;
        uVar10 = (ulonglong)((int)uVar10 + 1);
        piVar7 = piVar7 + 0xc;
        uVar11 = uVar8;
      } while ((longlong)uVar9 < 2);
      do {
        if (*piVar5 == 0) {
          lVar6 = (longlong)(int)uVar11;
          *(undefined4 *)(param_1 + 0x30 + lVar6 * 0x30) = uVar4;
          *(undefined2 *)(param_1 + 0x34 + lVar6 * 0x30) = uVar2;
          *(undefined2 *)(param_1 + 0x24 + lVar6 * 0x30) = uVar1;
          *(undefined4 *)(param_1 + 0x20 + lVar6 * 0x30) = uVar3;
          *(int *)(param_1 + 0x10 + lVar6 * 0x30) = param_2;
          return CONCAT71((int7)(int3)(uVar11 >> 8),1);
        }
        uVar8 = uVar8 + 1;
        piVar5 = piVar5 + 0xc;
        uVar11 = (ulonglong)((int)uVar11 + 1);
      } while ((longlong)uVar8 < 2);
      return CONCAT71((int7)(uVar8 >> 8),1);
    }
    uVar9 = uVar9 + 1;
    uVar10 = (ulonglong)((int)uVar10 + 1);
    piVar5 = piVar5 + 0x12;
  } while ((longlong)uVar9 < 2);
  return (ulonglong)piVar5 & 0xffffffffffffff00;
}



void FUN_14015bdb0(undefined8 *param_1)

{
  if (100 < (ulonglong)param_1[2]) {
    operator_delete__((void *)*param_1);
  }
  return;
}



void FUN_14015bdd0(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014015bdf7. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



void FUN_14015be10(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014015be37. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



void FUN_14015be50(longlong param_1,int param_2)

{
  int iVar1;
  longlong *plVar2;
  longlong lVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  int iVar8;
  longlong lVar9;
  undefined1 local_58 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 != *(int *)(param_1 + 0x18)) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar4 = FUN_14015ae80();
      plVar2 = *(longlong **)(param_1 + 8);
      lVar9 = (longlong)iVar4;
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar2 == (longlong *)0x0) {
          uVar5 = FUN_140156940(lVar9 << 6);
          *(undefined8 *)(param_1 + 0x10) = uVar5;
        }
        else {
          uVar5 = (**(code **)(*plVar2 + 8))(plVar2,lVar9 << 6);
          *(undefined8 *)(param_1 + 0x10) = uVar5;
        }
      }
      else {
        lVar3 = *(longlong *)(param_1 + 0x10);
        if (plVar2 == (longlong *)0x0) {
          puVar6 = (undefined8 *)FUN_140156940(lVar9 << 6);
        }
        else {
          puVar6 = (undefined8 *)(**(code **)(*plVar2 + 8))();
        }
        iVar1 = *(int *)(param_1 + 0x18);
        iVar8 = 0;
        if (0 < iVar1) {
          lVar9 = lVar3 - (longlong)puVar6;
          puVar7 = puVar6;
          do {
            if (puVar7 != (undefined8 *)0x0) {
              *puVar7 = *(undefined8 *)(lVar9 + (longlong)puVar7);
              puVar7[1] = *(undefined8 *)(lVar9 + 8 + (longlong)puVar7);
              puVar7[2] = *(undefined8 *)(lVar9 + 0x10 + (longlong)puVar7);
              puVar7[3] = *(undefined8 *)(lVar9 + 0x18 + (longlong)puVar7);
              puVar7[4] = *(undefined8 *)(lVar9 + 0x20 + (longlong)puVar7);
              puVar7[5] = *(undefined8 *)(lVar9 + 0x28 + (longlong)puVar7);
              puVar7[6] = *(undefined8 *)(lVar9 + 0x30 + (longlong)puVar7);
              puVar7[7] = *(undefined8 *)(lVar9 + 0x38 + (longlong)puVar7);
            }
            iVar8 = iVar8 + 1;
            puVar7 = puVar7 + 8;
          } while (iVar8 < iVar1);
        }
        if (puVar6 == (undefined8 *)0x0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
        plVar2 = *(longlong **)(param_1 + 8);
        if (plVar2 == (longlong *)0x0) {
          FUN_140156970(lVar3);
        }
        else {
          (**(code **)(*plVar2 + 0x18))(plVar2,lVar3);
        }
        *(undefined8 **)(param_1 + 0x10) = puVar6;
      }
      *(int *)(param_1 + 0x1c) = iVar4;
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_14015bfe0(undefined8 *param_1)

{
  void *pvVar1;
  
  pvVar1 = (void *)*param_1;
  if (pvVar1 != (void *)0x0) {
    FUN_14018c200(pvVar1);
    operator_delete(pvVar1);
  }
  return;
}



void FUN_14015c010(undefined8 *param_1)

{
  void *pvVar1;
  
  pvVar1 = (void *)*param_1;
  if (pvVar1 != (void *)0x0) {
    FUN_140191cc0(pvVar1);
    operator_delete(pvVar1);
  }
  return;
}



void FUN_14015c040(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014015c067. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



void FUN_14015c080(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<int,1>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014015c0a7. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



void FUN_14015c0c0(longlong param_1,int param_2)

{
  int iVar1;
  longlong *plVar2;
  int iVar3;
  longlong lVar4;
  int iVar5;
  undefined1 local_58 [80];
  
  iVar1 = *(int *)(param_1 + 0x1c);
  iVar3 = iVar1;
  if (iVar1 < param_2) {
    iVar3 = param_2;
  }
  iVar5 = *(int *)(param_1 + 0x20);
  if ((*(int *)(param_1 + 0x20) <= iVar3) && (iVar5 = param_2, param_2 <= iVar1)) {
    iVar5 = iVar1;
  }
  if (iVar1 < iVar5) {
    plVar2 = *(longlong **)(param_1 + 8);
    if (iVar1 == 0) {
      if (plVar2 == (longlong *)0x0) {
        lVar4 = FUN_140156940((longlong)iVar5 << 2);
      }
      else {
        lVar4 = (**(code **)(*plVar2 + 8))(plVar2,(longlong)iVar5 << 2);
      }
    }
    else {
      if (plVar2 == (longlong *)0x0) {
        lVar4 = FUN_1401569a0(*(undefined8 *)(param_1 + 0x10),(longlong)iVar5 << 2);
      }
      else {
        lVar4 = (**(code **)(*plVar2 + 0x10))
                          (plVar2,*(undefined8 *)(param_1 + 0x10),(longlong)iVar5 << 2);
      }
      if (lVar4 == 0) {
        FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
    }
    *(longlong *)(param_1 + 0x10) = lVar4;
    *(int *)(param_1 + 0x1c) = iVar5;
  }
  return;
}



void FUN_14015c180(undefined8 *param_1)

{
  void *pvVar1;
  
  pvVar1 = (void *)*param_1;
  if (pvVar1 != (void *)0x0) {
    FUN_140197a30(pvVar1);
    operator_delete(pvVar1);
  }
  return;
}



void FUN_14015c1b0(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014015c1d7. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



undefined8 * FUN_14015c1f0(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14015c250(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14015c2b0(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14015c310(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14015c370(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14015c3d0(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14015c430(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<int,1>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14015c490(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14015c4f0(longlong param_1,int param_2,int param_3)

{
  undefined8 *puVar1;
  int iVar2;
  longlong lVar3;
  longlong lVar4;
  longlong lVar5;
  longlong lVar6;
  
  if ((-1 < param_2) && (-1 < param_3)) {
    iVar2 = *(int *)(param_1 + 0x18) - param_2;
    if (iVar2 <= param_3) {
      param_3 = iVar2;
    }
    if (0 < iVar2 - param_3) {
      lVar6 = (longlong)(iVar2 - param_3);
      lVar5 = (longlong)param_2 * 0x18;
      do {
        lVar3 = FUN_1401a7bb0(param_1);
        lVar3 = lVar3 + (longlong)param_3 * 0x18;
        lVar4 = FUN_1401a7bb0(param_1);
        *(undefined8 *)(lVar4 + lVar5) = *(undefined8 *)(lVar3 + lVar5);
        puVar1 = (undefined8 *)(lVar3 + 8 + lVar5);
        lVar5 = lVar5 + 0x18;
        lVar6 = lVar6 + -1;
        *(undefined8 *)(lVar4 + -0x10 + lVar5) = *puVar1;
        *(undefined8 *)(lVar4 + -8 + lVar5) = *(undefined8 *)(lVar3 + -8 + lVar5);
      } while (lVar6 != 0);
    }
    FUN_14015c9c0(param_1,*(int *)(param_1 + 0x18) - param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_14015c5b0(undefined8 *param_1,longlong param_2,longlong param_3)

{
  ulonglong uVar1;
  undefined8 *puVar2;
  longlong lVar3;
  void *pvVar4;
  int iVar5;
  undefined8 *puVar6;
  longlong lVar7;
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (-1 < param_3) {
    param_1[3] = param_3;
  }
  if (param_2 == 0) {
    if ((100 < (ulonglong)param_1[2]) && ((void *)*param_1 != (void *)0x0)) {
      operator_delete__((void *)*param_1);
      *param_1 = 0;
    }
    param_1[1] = 0;
    param_1[2] = 100;
    return;
  }
  uVar1 = param_1[2];
  if ((longlong)uVar1 < param_2) {
    lVar3 = param_1[3];
    if (lVar3 == 0) {
      lVar3 = (longlong)(param_1[1] + (ulonglong)((uint)((longlong)param_1[1] >> 0x3f) & 7)) >> 3;
      if (lVar3 < 4) {
        lVar3 = 4;
      }
      else if (0x400 < lVar3) {
        lVar3 = 0x400;
      }
    }
    lVar7 = param_2;
    if (param_2 < (longlong)(lVar3 + uVar1)) {
      lVar7 = lVar3 + uVar1;
    }
    if (lVar7 < (longlong)uVar1) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    pvVar4 = operator_new(lVar7 << 5);
    puVar2 = param_1 + 4;
    if (100 < (ulonglong)param_1[2]) {
      puVar2 = (undefined8 *)*param_1;
    }
    FUN_14015b010(pvVar4,puVar2,param_1[1]);
    memset((void *)(param_1[1] * 0x20 + (longlong)pvVar4),0,(param_2 - param_1[1]) * 0x20);
    iVar5 = 0;
    lVar3 = param_2 - param_1[1];
    if (0 < lVar3) {
      puVar6 = (undefined8 *)((longlong)pvVar4 + param_1[1] * 0x20 + 0x18);
      do {
        if (puVar6 + -3 != (undefined8 *)0x0) {
          *(undefined4 *)(puVar6 + -3) = 0;
          puVar6[-2] = 0;
          *puVar6 = 0;
          puVar6[-1] = 0;
        }
        iVar5 = iVar5 + 1;
        puVar6 = puVar6 + 4;
      } while (iVar5 < lVar3);
    }
    if (100 < (ulonglong)param_1[2]) {
      operator_delete__(puVar2);
    }
    *param_1 = pvVar4;
    param_1[2] = lVar7;
  }
  else {
    puVar2 = param_1 + 4;
    if (100 < uVar1) {
      puVar2 = (undefined8 *)*param_1;
    }
    lVar3 = param_1[1];
    if (lVar3 < param_2) {
      iVar5 = 0;
      if (0 < param_2 - lVar3) {
        puVar2 = puVar2 + lVar3 * 4 + 3;
        do {
          if (puVar2 + -3 != (undefined8 *)0x0) {
            *(undefined4 *)(puVar2 + -3) = 0;
            puVar2[-2] = 0;
            *puVar2 = 0;
            puVar2[-1] = 0;
          }
          iVar5 = iVar5 + 1;
          puVar2 = puVar2 + 4;
        } while ((longlong)iVar5 < param_2 - lVar3);
        param_1[1] = param_2;
        return;
      }
    }
  }
  param_1[1] = param_2;
  return;
}



void FUN_14015c7a0(longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  undefined1 local_58 [88];
  
  lVar1 = *param_1;
  while( true ) {
    if (lVar1 == 0) {
      return;
    }
    lVar1 = *param_1;
    if (*(longlong **)(lVar1 + 0x120) != param_1) break;
    lVar2 = *(longlong *)(lVar1 + 0x118);
    lVar3 = *(longlong *)(lVar1 + 0x110);
    if (lVar2 != 0) {
      *(longlong *)(lVar2 + 0x110) = lVar3;
    }
    if (lVar3 != 0) {
      *(longlong *)(lVar3 + 0x118) = lVar2;
    }
    if (lVar2 == 0) {
      if (param_1[1] != lVar1) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::CRemoteClient_S>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      param_1[1] = lVar3;
    }
    if (lVar3 == 0) {
      if (*param_1 != lVar1) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::CRemoteClient_S>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      *param_1 = lVar2;
    }
    *(undefined8 *)(lVar1 + 0x110) = 0;
    *(undefined8 *)(lVar1 + 0x118) = 0;
    *(undefined8 *)(lVar1 + 0x120) = 0;
    *(int *)(param_1 + 2) = (int)param_1[2] + -1;
    lVar1 = *param_1;
  }
  FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                L"Proud::CListNode<class Proud::CRemoteClient_S>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



void FUN_14015c8b0(longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  undefined1 local_58 [88];
  
  lVar1 = *param_1;
  while( true ) {
    if (lVar1 == 0) {
      return;
    }
    lVar1 = *param_1;
    if (*(longlong **)(lVar1 + 0xa0) != param_1) break;
    lVar2 = *(longlong *)(lVar1 + 0x98);
    lVar3 = *(longlong *)(lVar1 + 0x90);
    if (lVar2 != 0) {
      *(longlong *)(lVar2 + 0x90) = lVar3;
    }
    if (lVar3 != 0) {
      *(longlong *)(lVar3 + 0x98) = lVar2;
    }
    if (lVar2 == 0) {
      if (param_1[1] != lVar1) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::CUdpSocket_S>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      param_1[1] = lVar3;
    }
    if (lVar3 == 0) {
      if (*param_1 != lVar1) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::CUdpSocket_S>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      *param_1 = lVar2;
    }
    *(undefined8 *)(lVar1 + 0x90) = 0;
    *(undefined8 *)(lVar1 + 0x98) = 0;
    *(undefined8 *)(lVar1 + 0xa0) = 0;
    *(int *)(param_1 + 2) = (int)param_1[2] + -1;
    lVar1 = *param_1;
  }
  FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                L"Proud::CListNode<class Proud::CUdpSocket_S>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



void FUN_14015c9c0(longlong param_1,int param_2)

{
  int iVar1;
  longlong *plVar2;
  longlong lVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  int iVar8;
  longlong lVar9;
  undefined1 local_58 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 != *(int *)(param_1 + 0x18)) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar4 = FUN_14015b270();
      plVar2 = *(longlong **)(param_1 + 8);
      lVar9 = (longlong)iVar4;
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar2 == (longlong *)0x0) {
          uVar5 = FUN_140156940(lVar9 * 0x18);
          *(undefined8 *)(param_1 + 0x10) = uVar5;
        }
        else {
          uVar5 = (**(code **)(*plVar2 + 8))(plVar2,lVar9 * 0x18);
          *(undefined8 *)(param_1 + 0x10) = uVar5;
        }
      }
      else {
        lVar3 = *(longlong *)(param_1 + 0x10);
        if (plVar2 == (longlong *)0x0) {
          puVar6 = (undefined8 *)FUN_140156940(lVar9 * 0x18);
        }
        else {
          puVar6 = (undefined8 *)(**(code **)(*plVar2 + 8))();
        }
        iVar1 = *(int *)(param_1 + 0x18);
        iVar8 = 0;
        if (0 < iVar1) {
          lVar9 = lVar3 - (longlong)puVar6;
          puVar7 = puVar6;
          do {
            if (puVar7 != (undefined8 *)0x0) {
              *puVar7 = *(undefined8 *)(lVar9 + (longlong)puVar7);
              puVar7[1] = *(undefined8 *)(lVar9 + 8 + (longlong)puVar7);
              puVar7[2] = *(undefined8 *)(lVar9 + 0x10 + (longlong)puVar7);
            }
            iVar8 = iVar8 + 1;
            puVar7 = puVar7 + 3;
          } while (iVar8 < iVar1);
        }
        if (puVar6 == (undefined8 *)0x0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
        plVar2 = *(longlong **)(param_1 + 8);
        if (plVar2 == (longlong *)0x0) {
          FUN_140156970(lVar3);
        }
        else {
          (**(code **)(*plVar2 + 0x18))(plVar2,lVar3);
        }
        *(undefined8 **)(param_1 + 0x10) = puVar6;
      }
      *(int *)(param_1 + 0x1c) = iVar4;
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_14015cb30(longlong param_1,int param_2)

{
  longlong *plVar1;
  int iVar2;
  longlong lVar3;
  undefined1 local_58 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 != *(int *)(param_1 + 0x18)) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar2 = FUN_14015b310();
      plVar1 = *(longlong **)(param_1 + 8);
      lVar3 = (longlong)iVar2;
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar1 == (longlong *)0x0) {
          lVar3 = FUN_140156940(lVar3 << 2);
        }
        else {
          lVar3 = (**(code **)(*plVar1 + 8))(plVar1,lVar3 << 2);
        }
      }
      else {
        if (plVar1 == (longlong *)0x0) {
          lVar3 = FUN_1401569a0(*(undefined8 *)(param_1 + 0x10),lVar3 << 2);
        }
        else {
          lVar3 = (**(code **)(*plVar1 + 0x10))(plVar1,*(undefined8 *)(param_1 + 0x10),lVar3 << 2);
        }
        if (lVar3 == 0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
      }
      *(longlong *)(param_1 + 0x10) = lVar3;
      *(int *)(param_1 + 0x1c) = iVar2;
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_14015cc00(longlong param_1,int param_2)

{
  longlong *plVar1;
  int iVar2;
  longlong lVar3;
  int iVar4;
  undefined8 *puVar5;
  undefined4 *puVar6;
  longlong lVar7;
  int iVar8;
  int iVar9;
  undefined1 local_58 [80];
  
  lVar7 = (longlong)param_2;
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  iVar8 = *(int *)(param_1 + 0x18);
  if (param_2 != iVar8) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar8 = FUN_14015b4e0(param_1);
      plVar1 = *(longlong **)(param_1 + 8);
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar1 == (longlong *)0x0) {
          puVar5 = (undefined8 *)FUN_140156940((longlong)iVar8 << 4);
        }
        else {
          puVar5 = (undefined8 *)(**(code **)(*plVar1 + 8))();
        }
        *(undefined8 **)(param_1 + 0x10) = puVar5;
        if (0 < param_2) {
          do {
            if (puVar5 != (undefined8 *)0x0) {
              *puVar5 = Proud::AddrPort::vftable;
              *(undefined4 *)(puVar5 + 1) = 0;
              *(undefined2 *)((longlong)puVar5 + 0xc) = 0;
            }
            puVar5 = puVar5 + 2;
            lVar7 = lVar7 + -1;
          } while (lVar7 != 0);
        }
      }
      else {
        lVar7 = *(longlong *)(param_1 + 0x10);
        if (plVar1 == (longlong *)0x0) {
          lVar3 = FUN_140156940((longlong)iVar8 << 4);
        }
        else {
          lVar3 = (**(code **)(*plVar1 + 8))();
        }
        iVar2 = *(int *)(param_1 + 0x18);
        iVar4 = 0;
        if (0 < iVar2) {
          puVar6 = (undefined4 *)(lVar3 + 8);
          iVar9 = iVar4;
          do {
            if ((undefined8 *)(puVar6 + -2) != (undefined8 *)0x0) {
              *(undefined ***)(puVar6 + -2) = Proud::AddrPort::vftable;
              *puVar6 = *(undefined4 *)((lVar7 - lVar3) + (longlong)puVar6);
              *(undefined2 *)(puVar6 + 1) = *(undefined2 *)((lVar7 - lVar3) + 4 + (longlong)puVar6);
            }
            iVar9 = iVar9 + 1;
            puVar6 = puVar6 + 4;
          } while (iVar9 < iVar2);
        }
        iVar2 = param_2 - *(int *)(param_1 + 0x18);
        puVar5 = (undefined8 *)((longlong)*(int *)(param_1 + 0x18) * 0x10 + lVar3);
        if (0 < iVar2) {
          do {
            if (puVar5 != (undefined8 *)0x0) {
              *puVar5 = Proud::AddrPort::vftable;
              *(undefined4 *)(puVar5 + 1) = 0;
              *(undefined2 *)((longlong)puVar5 + 0xc) = 0;
            }
            iVar4 = iVar4 + 1;
            puVar5 = puVar5 + 2;
          } while (iVar4 < iVar2);
        }
        if (lVar3 == 0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
        plVar1 = *(longlong **)(param_1 + 8);
        if (plVar1 == (longlong *)0x0) {
          FUN_140156970(lVar7);
        }
        else {
          (**(code **)(*plVar1 + 0x18))(plVar1,lVar7);
        }
        *(longlong *)(param_1 + 0x10) = lVar3;
      }
      *(int *)(param_1 + 0x1c) = iVar8;
    }
    else if ((iVar8 - param_2 < 1) && (iVar2 = param_2 - iVar8, 0 < iVar2)) {
      puVar5 = (undefined8 *)((longlong)iVar8 * 0x10 + *(longlong *)(param_1 + 0x10));
      iVar8 = 0;
      if (0 < iVar2) {
        do {
          if (puVar5 != (undefined8 *)0x0) {
            *puVar5 = Proud::AddrPort::vftable;
            *(undefined4 *)(puVar5 + 1) = 0;
            *(undefined2 *)((longlong)puVar5 + 0xc) = 0;
          }
          iVar8 = iVar8 + 1;
          puVar5 = puVar5 + 2;
        } while (iVar8 < iVar2);
      }
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_14015ce40(char *param_1)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  int iVar4;
  undefined1 local_58 [88];
  
  if (*param_1 != '\0') {
    iVar4 = 0;
    if ((*(longlong *)(param_1 + 0x20) != 0) && (*(longlong *)(param_1 + 8) == 0)) {
      FUN_140156300(local_58,L"CFastMap consistency error #0!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    lVar1 = *(longlong *)(param_1 + 0x10);
    lVar3 = lVar1;
    while (lVar3 != 0) {
      lVar2 = *(longlong *)(lVar3 + 8);
      if ((lVar2 != 0) && (*(longlong *)(lVar2 + 0x10) != lVar3)) {
        FUN_140156300(local_58,L"CFastMap consistency error #1!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      if ((lVar3 == lVar1) && (*(longlong *)(lVar3 + 0x10) != 0)) {
        FUN_140156300(local_58,L"CFastMap consistency error #2!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      if ((lVar3 == *(longlong *)(param_1 + 0x18)) && (lVar2 != 0)) {
        FUN_140156300(local_58,L"CFastMap consistency error #3!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      iVar4 = iVar4 + 1;
      lVar3 = lVar2;
    }
    if (iVar4 != *(int *)(param_1 + 0x20)) {
      for (; lVar1 != 0; lVar1 = *(longlong *)(lVar1 + 8)) {
      }
      FUN_140156300(local_58,L"CFastMap consistency error #4!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
  }
  return;
}



void FUN_14015cf70(longlong param_1,int param_2,longlong param_3,int param_4)

{
  undefined8 *puVar1;
  longlong lVar2;
  longlong lVar3;
  int iVar4;
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lVar8;
  
  lVar8 = (longlong)param_4;
  lVar6 = (longlong)param_2;
  if (((-1 < param_4) && (-1 < param_2)) && (param_2 <= *(int *)(param_1 + 0x18))) {
    iVar4 = *(int *)(param_1 + 0x18);
    FUN_14015c9c0(param_1,iVar4 + param_4);
    iVar4 = iVar4 - param_2;
    if ((0 < iVar4) && (iVar4 = iVar4 + -1, lVar7 = (longlong)iVar4, -1 < iVar4)) {
      lVar5 = (lVar8 + lVar6 + lVar7) * 0x18;
      do {
        lVar2 = FUN_1401a7bb0(param_1);
        lVar2 = lVar8 * -0x18 + lVar2;
        lVar3 = FUN_1401a7bb0(param_1);
        *(undefined8 *)(lVar3 + lVar5) = *(undefined8 *)(lVar2 + lVar5);
        puVar1 = (undefined8 *)(lVar2 + 8 + lVar5);
        lVar5 = lVar5 + -0x18;
        lVar7 = lVar7 + -1;
        *(undefined8 *)(lVar3 + 0x20 + lVar5) = *puVar1;
        *(undefined8 *)(lVar3 + 0x28 + lVar5) = *(undefined8 *)(lVar2 + 0x28 + lVar5);
      } while (-1 < lVar7);
    }
    if (0 < param_4) {
      lVar7 = lVar6 * 0x18;
      param_3 = param_3 + lVar6 * -0x18;
      do {
        lVar6 = FUN_1401a7bb0(param_1);
        puVar1 = (undefined8 *)(param_3 + lVar7);
        lVar7 = lVar7 + 0x18;
        lVar8 = lVar8 + -1;
        *(undefined8 *)(lVar6 + -0x18 + lVar7) = *puVar1;
        *(undefined8 *)(lVar6 + -0x10 + lVar7) = *(undefined8 *)(param_3 + -0x10 + lVar7);
        *(undefined8 *)(lVar6 + -8 + lVar7) = *(undefined8 *)(param_3 + -8 + lVar7);
      } while (lVar8 != 0);
    }
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_14015d090(undefined8 *param_1,longlong param_2,longlong param_3)

{
  longlong lVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  longlong lVar4;
  undefined8 *puVar5;
  longlong lVar6;
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (-1 < param_3) {
    param_1[3] = param_3;
  }
  if (param_2 == 0) {
    if ((100 < (ulonglong)param_1[2]) && ((void *)*param_1 != (void *)0x0)) {
      operator_delete__((void *)*param_1);
      *param_1 = 0;
    }
    param_1[2] = 100;
    param_1[1] = 0;
    return;
  }
  lVar4 = param_1[2];
  if (param_2 <= lVar4) {
    param_1[1] = param_2;
    return;
  }
  lVar1 = param_1[3];
  if (lVar1 == 0) {
    lVar1 = (longlong)(param_1[1] + (ulonglong)((uint)((longlong)param_1[1] >> 0x3f) & 7)) >> 3;
    if (lVar1 < 4) {
      lVar1 = 4;
    }
    else if (0x400 < lVar1) {
      lVar1 = 0x400;
    }
  }
  lVar6 = param_2;
  if (param_2 < lVar1 + lVar4) {
    lVar6 = lVar1 + lVar4;
  }
  if (lVar6 < lVar4) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  puVar2 = operator_new(lVar6 * 4);
  puVar5 = param_1 + 4;
  if (100 < (ulonglong)param_1[2]) {
    puVar5 = (undefined8 *)*param_1;
  }
  lVar4 = param_1[1];
  if (0 < lVar4) {
    puVar3 = puVar2;
    do {
      lVar4 = lVar4 + -1;
      *puVar3 = *(undefined4 *)(((longlong)puVar5 - (longlong)puVar2) + (longlong)puVar3);
      puVar3 = puVar3 + 1;
    } while (lVar4 != 0);
  }
  memset(puVar2 + param_1[1],0,(param_2 - param_1[1]) * 4);
  if (100 < (ulonglong)param_1[2]) {
    operator_delete__(puVar5);
  }
  *param_1 = puVar2;
  param_1[2] = lVar6;
  param_1[1] = param_2;
  return;
}



void FUN_14015d1f0(longlong param_1,int param_2,longlong param_3,int param_4)

{
  longlong lVar1;
  longlong lVar2;
  undefined2 *puVar3;
  undefined2 *puVar4;
  int iVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lVar8;
  
  lVar7 = (longlong)param_4;
  if (((-1 < param_4) && (-1 < param_2)) && (param_2 <= *(int *)(param_1 + 0x18))) {
    iVar5 = *(int *)(param_1 + 0x18);
    FUN_14015cc00(param_1,iVar5 + param_4);
    iVar5 = iVar5 - param_2;
    if ((0 < iVar5) && (iVar5 = iVar5 + -1, lVar8 = (longlong)iVar5, -1 < iVar5)) {
      lVar6 = (lVar8 + param_2 + lVar7) * 0x10;
      do {
        lVar1 = FUN_1401a7bb0(param_1);
        lVar1 = lVar1 + lVar7 * -0x10;
        lVar2 = FUN_1401a7bb0(param_1);
        *(undefined4 *)(lVar2 + 8 + lVar6) = *(undefined4 *)(lVar1 + 8 + lVar6);
        puVar3 = (undefined2 *)(lVar1 + 0xc + lVar6);
        lVar6 = lVar6 + -0x10;
        lVar8 = lVar8 + -1;
        *(undefined2 *)(lVar2 + 0x1c + lVar6) = *puVar3;
      } while (-1 < lVar8);
    }
    if (0 < lVar7) {
      puVar3 = (undefined2 *)(param_3 + 0xc);
      do {
        lVar8 = FUN_1401a7bb0(param_1);
        puVar4 = puVar3 + 8;
        lVar8 = lVar8 + ((longlong)param_2 * 0x10 - param_3) + -0xc;
        lVar7 = lVar7 + -1;
        *(undefined4 *)(lVar8 + -8 + (longlong)puVar4) = *(undefined4 *)(puVar3 + -2);
        *(undefined2 *)(lVar8 + -4 + (longlong)puVar4) = *puVar3;
        puVar3 = puVar4;
      } while (lVar7 != 0);
    }
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_14015d300(longlong param_1,uint param_2)

{
  ulonglong uVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  void *_Dst;
  longlong lVar5;
  longlong lVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  int iVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  float fVar12;
  float fVar13;
  
  if (param_2 == 0) {
    param_2 = FUN_14019e650();
  }
  if (param_2 != *(uint *)(param_1 + 0x28)) {
    if (*(longlong *)(param_1 + 8) == 0) {
      lVar5 = 0;
      *(uint *)(param_1 + 0x28) = param_2;
      fVar13 = (float)param_2 * *(float *)(param_1 + 0x34);
      if ((9.223372e+18 < fVar13) && (fVar13 = fVar13 - 9.223372e+18, fVar13 < 9.223372e+18)) {
        lVar5 = -0x8000000000000000;
      }
      fVar12 = (float)param_2 * *(float *)(param_1 + 0x30);
      lVar6 = 0;
      *(longlong *)(param_1 + 0x38) = (longlong)fVar13 + lVar5;
      if ((9.223372e+18 < fVar12) && (fVar12 = fVar12 - 9.223372e+18, fVar12 < 9.223372e+18)) {
        lVar6 = -0x8000000000000000;
      }
      *(longlong *)(param_1 + 0x40) = (longlong)fVar12 + lVar6;
      if ((ulonglong)((longlong)fVar12 + lVar6) < 0x11) {
        *(undefined8 *)(param_1 + 0x40) = 0;
        return;
      }
    }
    else {
      _Dst = (void *)FUN_140156940((ulonglong)param_2 << 3);
      if (_Dst == (void *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x8007000e);
      }
      memset(_Dst,0,(ulonglong)param_2 << 3);
      uVar7 = 0;
      uVar4 = *(ulonglong *)(param_1 + 0x10);
      uVar10 = uVar7;
      uVar11 = uVar7;
      while (uVar4 != 0) {
        uVar1 = *(ulonglong *)(uVar4 + 8);
        uVar3 = (ulonglong)*(uint *)(uVar4 + 0x18) % (ulonglong)param_2;
        lVar5 = *(longlong *)((longlong)_Dst + uVar3 * 8);
        iVar9 = (int)uVar10;
        if (iVar9 == 0) {
          *(undefined8 *)(uVar4 + 0x10) = 0;
          *(undefined8 *)(uVar4 + 8) = 0;
          uVar10 = 1;
          uVar7 = uVar4;
          uVar11 = uVar4;
        }
        else if (lVar5 == 0) {
          *(undefined8 *)(uVar4 + 0x10) = 0;
          *(ulonglong *)(uVar4 + 8) = uVar7;
          if (uVar7 != 0) {
            *(ulonglong *)(uVar7 + 0x10) = uVar4;
          }
          uVar10 = (ulonglong)(iVar9 + 1);
          uVar7 = uVar4;
        }
        else {
          uVar8 = uVar4;
          if (*(longlong *)(lVar5 + 0x10) != 0) {
            *(ulonglong *)(*(longlong *)(lVar5 + 0x10) + 8) = uVar4;
            uVar8 = uVar7;
          }
          uVar2 = *(undefined8 *)(lVar5 + 0x10);
          *(longlong *)(uVar4 + 8) = lVar5;
          uVar10 = (ulonglong)(iVar9 + 1);
          *(undefined8 *)(uVar4 + 0x10) = uVar2;
          *(ulonglong *)(lVar5 + 0x10) = uVar4;
          uVar7 = uVar8;
        }
        *(ulonglong *)((longlong)_Dst + uVar3 * 8) = uVar4;
        uVar4 = uVar1;
      }
      FUN_140156970(*(undefined8 *)(param_1 + 8));
      *(void **)(param_1 + 8) = _Dst;
      *(uint *)(param_1 + 0x28) = param_2;
      *(ulonglong *)(param_1 + 0x10) = uVar7;
      *(ulonglong *)(param_1 + 0x18) = uVar11;
      FUN_14015ce40(param_1);
      lVar5 = 0;
      fVar13 = (float)*(uint *)(param_1 + 0x28) * *(float *)(param_1 + 0x34);
      if ((9.223372e+18 < fVar13) && (fVar13 = fVar13 - 9.223372e+18, fVar13 < 9.223372e+18)) {
        lVar5 = -0x8000000000000000;
      }
      fVar12 = (float)*(uint *)(param_1 + 0x28) * *(float *)(param_1 + 0x30);
      lVar6 = 0;
      *(longlong *)(param_1 + 0x38) = (longlong)fVar13 + lVar5;
      if ((9.223372e+18 < fVar12) && (fVar12 = fVar12 - 9.223372e+18, fVar12 < 9.223372e+18)) {
        lVar6 = -0x8000000000000000;
      }
      *(longlong *)(param_1 + 0x40) = (longlong)fVar12 + lVar6;
      if ((ulonglong)((longlong)fVar12 + lVar6) < 0x11) {
        *(undefined8 *)(param_1 + 0x40) = 0;
      }
    }
  }
  return;
}



void FUN_14015d550(longlong param_1,int param_2)

{
  int iVar1;
  longlong *plVar2;
  longlong lVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  int iVar8;
  longlong lVar9;
  undefined1 local_58 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 != *(int *)(param_1 + 0x18)) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar4 = FUN_1401abc90();
      plVar2 = *(longlong **)(param_1 + 8);
      lVar9 = (longlong)iVar4;
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar2 == (longlong *)0x0) {
          uVar5 = FUN_140156940(lVar9 << 3);
          *(undefined8 *)(param_1 + 0x10) = uVar5;
        }
        else {
          uVar5 = (**(code **)(*plVar2 + 8))(plVar2,lVar9 << 3);
          *(undefined8 *)(param_1 + 0x10) = uVar5;
        }
      }
      else {
        lVar3 = *(longlong *)(param_1 + 0x10);
        if (plVar2 == (longlong *)0x0) {
          puVar6 = (undefined8 *)FUN_140156940(lVar9 << 3);
        }
        else {
          puVar6 = (undefined8 *)(**(code **)(*plVar2 + 8))();
        }
        iVar1 = *(int *)(param_1 + 0x18);
        iVar8 = 0;
        if (0 < iVar1) {
          puVar7 = puVar6;
          do {
            if (puVar7 != (undefined8 *)0x0) {
              *puVar7 = *(undefined8 *)((lVar3 - (longlong)puVar6) + (longlong)puVar7);
            }
            iVar8 = iVar8 + 1;
            puVar7 = puVar7 + 1;
          } while (iVar8 < iVar1);
        }
        if (puVar6 == (undefined8 *)0x0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
        plVar2 = *(longlong **)(param_1 + 8);
        if (plVar2 == (longlong *)0x0) {
          FUN_140156970(lVar3);
        }
        else {
          (**(code **)(*plVar2 + 0x18))(plVar2,lVar3);
        }
        *(undefined8 **)(param_1 + 0x10) = puVar6;
      }
      *(int *)(param_1 + 0x1c) = iVar4;
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_14015d6a0(longlong param_1,int param_2)

{
  int iVar1;
  longlong *plVar2;
  longlong lVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  int iVar8;
  longlong lVar9;
  undefined1 local_58 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 != *(int *)(param_1 + 0x18)) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar4 = FUN_14015b4e0();
      plVar2 = *(longlong **)(param_1 + 8);
      lVar9 = (longlong)iVar4;
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar2 == (longlong *)0x0) {
          uVar5 = FUN_140156940(lVar9 << 4);
          *(undefined8 *)(param_1 + 0x10) = uVar5;
        }
        else {
          uVar5 = (**(code **)(*plVar2 + 8))(plVar2,lVar9 << 4);
          *(undefined8 *)(param_1 + 0x10) = uVar5;
        }
      }
      else {
        lVar3 = *(longlong *)(param_1 + 0x10);
        if (plVar2 == (longlong *)0x0) {
          puVar6 = (undefined8 *)FUN_140156940(lVar9 << 4);
        }
        else {
          puVar6 = (undefined8 *)(**(code **)(*plVar2 + 8))();
        }
        iVar1 = *(int *)(param_1 + 0x18);
        iVar8 = 0;
        if (0 < iVar1) {
          puVar7 = puVar6;
          do {
            if (puVar7 != (undefined8 *)0x0) {
              *puVar7 = *(undefined8 *)((lVar3 - (longlong)puVar6) + (longlong)puVar7);
              puVar7[1] = *(undefined8 *)((lVar3 - (longlong)puVar6) + 8 + (longlong)puVar7);
            }
            iVar8 = iVar8 + 1;
            puVar7 = puVar7 + 2;
          } while (iVar8 < iVar1);
        }
        if (puVar6 == (undefined8 *)0x0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
        plVar2 = *(longlong **)(param_1 + 8);
        if (plVar2 == (longlong *)0x0) {
          FUN_140156970(lVar3);
        }
        else {
          (**(code **)(*plVar2 + 0x18))(plVar2,lVar3);
        }
        *(undefined8 **)(param_1 + 0x10) = puVar6;
      }
      *(int *)(param_1 + 0x1c) = iVar4;
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_14015d800(longlong param_1,uint param_2)

{
  ulonglong uVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  void *_Dst;
  longlong lVar5;
  longlong lVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  int iVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  float fVar12;
  float fVar13;
  
  if (param_2 == 0) {
    param_2 = FUN_14019e650();
  }
  if (param_2 != *(uint *)(param_1 + 0x28)) {
    if (*(longlong *)(param_1 + 8) == 0) {
      lVar5 = 0;
      *(uint *)(param_1 + 0x28) = param_2;
      fVar13 = (float)param_2 * *(float *)(param_1 + 0x34);
      if ((9.223372e+18 < fVar13) && (fVar13 = fVar13 - 9.223372e+18, fVar13 < 9.223372e+18)) {
        lVar5 = -0x8000000000000000;
      }
      fVar12 = (float)param_2 * *(float *)(param_1 + 0x30);
      lVar6 = 0;
      *(longlong *)(param_1 + 0x38) = (longlong)fVar13 + lVar5;
      if ((9.223372e+18 < fVar12) && (fVar12 = fVar12 - 9.223372e+18, fVar12 < 9.223372e+18)) {
        lVar6 = -0x8000000000000000;
      }
      *(longlong *)(param_1 + 0x40) = (longlong)fVar12 + lVar6;
      if ((ulonglong)((longlong)fVar12 + lVar6) < 0x11) {
        *(undefined8 *)(param_1 + 0x40) = 0;
        return;
      }
    }
    else {
      _Dst = (void *)FUN_140156940((ulonglong)param_2 << 3);
      if (_Dst == (void *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x8007000e);
      }
      memset(_Dst,0,(ulonglong)param_2 << 3);
      uVar7 = 0;
      uVar4 = *(ulonglong *)(param_1 + 0x10);
      uVar10 = uVar7;
      uVar11 = uVar7;
      while (uVar4 != 0) {
        uVar1 = *(ulonglong *)(uVar4 + 0x10);
        uVar3 = (ulonglong)*(uint *)(uVar4 + 0x20) % (ulonglong)param_2;
        lVar5 = *(longlong *)((longlong)_Dst + uVar3 * 8);
        iVar9 = (int)uVar10;
        if (iVar9 == 0) {
          *(undefined8 *)(uVar4 + 0x18) = 0;
          *(undefined8 *)(uVar4 + 0x10) = 0;
          uVar10 = 1;
          uVar7 = uVar4;
          uVar11 = uVar4;
        }
        else if (lVar5 == 0) {
          *(undefined8 *)(uVar4 + 0x18) = 0;
          *(ulonglong *)(uVar4 + 0x10) = uVar7;
          if (uVar7 != 0) {
            *(ulonglong *)(uVar7 + 0x18) = uVar4;
          }
          uVar10 = (ulonglong)(iVar9 + 1);
          uVar7 = uVar4;
        }
        else {
          uVar8 = uVar4;
          if (*(longlong *)(lVar5 + 0x18) != 0) {
            *(ulonglong *)(*(longlong *)(lVar5 + 0x18) + 0x10) = uVar4;
            uVar8 = uVar7;
          }
          uVar2 = *(undefined8 *)(lVar5 + 0x18);
          *(longlong *)(uVar4 + 0x10) = lVar5;
          uVar10 = (ulonglong)(iVar9 + 1);
          *(undefined8 *)(uVar4 + 0x18) = uVar2;
          *(ulonglong *)(lVar5 + 0x18) = uVar4;
          uVar7 = uVar8;
        }
        *(ulonglong *)((longlong)_Dst + uVar3 * 8) = uVar4;
        uVar4 = uVar1;
      }
      FUN_140156970(*(undefined8 *)(param_1 + 8));
      *(void **)(param_1 + 8) = _Dst;
      *(uint *)(param_1 + 0x28) = param_2;
      *(ulonglong *)(param_1 + 0x10) = uVar7;
      *(ulonglong *)(param_1 + 0x18) = uVar11;
      FUN_14015b3b0(param_1);
      lVar5 = 0;
      fVar13 = (float)*(uint *)(param_1 + 0x28) * *(float *)(param_1 + 0x34);
      if ((9.223372e+18 < fVar13) && (fVar13 = fVar13 - 9.223372e+18, fVar13 < 9.223372e+18)) {
        lVar5 = -0x8000000000000000;
      }
      fVar12 = (float)*(uint *)(param_1 + 0x28) * *(float *)(param_1 + 0x30);
      lVar6 = 0;
      *(longlong *)(param_1 + 0x38) = (longlong)fVar13 + lVar5;
      if ((9.223372e+18 < fVar12) && (fVar12 = fVar12 - 9.223372e+18, fVar12 < 9.223372e+18)) {
        lVar6 = -0x8000000000000000;
      }
      *(longlong *)(param_1 + 0x40) = (longlong)fVar12 + lVar6;
      if ((ulonglong)((longlong)fVar12 + lVar6) < 0x11) {
        *(undefined8 *)(param_1 + 0x40) = 0;
      }
    }
  }
  return;
}



void FUN_14015da50(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014015da77. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



void * FUN_14015da90(undefined8 param_1,ulonglong param_2)

{
  void *pvVar1;
  char *local_res10 [3];
  undefined **local_28 [5];
  
  if (param_2 == 0) {
    return (void *)0x0;
  }
  if ((param_2 < 0x2000000000000000) && (pvVar1 = operator_new(param_2 * 8), pvVar1 != (void *)0x0))
  {
    return pvVar1;
  }
  local_res10[0] = (char *)0x0;
  std::exception::exception((exception *)local_28,local_res10);
  local_28[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_28,(ThrowInfo *)&DAT_14031d988);
}



void FUN_14015db00(longlong param_1,ulonglong param_2,int param_3)

{
  int iVar1;
  undefined4 uVar2;
  ulonglong uVar3;
  ulonglong uVar5;
  uint uVar6;
  ulonglong uVar8;
  ulonglong uVar9;
  longlong lVar10;
  uint local_res10;
  ulonglong local_res20;
  ulonglong local_28;
  ulonglong uVar4;
  int iVar7;
  
  local_res10 = (uint)param_2;
  uVar5 = (ulonglong)param_3;
  local_res20 = (ulonglong)(int)local_res10;
  local_28 = uVar5;
  if (param_3 < (int)local_res10) {
    do {
      uVar8 = param_2 & 0xffffffff;
      lVar10 = (longlong)(int)uVar5;
      uVar3 = local_res20;
      while( true ) {
        iVar1 = *(int *)(param_1 + local_28 * 4);
        iVar7 = *(int *)(param_1 + lVar10 * 4);
        while ((iVar7 < iVar1 && (lVar10 < (longlong)uVar3))) {
          lVar10 = lVar10 + 1;
          iVar7 = *(int *)(param_1 + lVar10 * 4);
        }
        do {
          uVar9 = uVar8;
          uVar4 = uVar3;
          uVar3 = uVar4 - 1;
          iVar7 = (int)uVar9;
          uVar6 = iVar7 - 1;
          uVar8 = (ulonglong)uVar6;
        } while (iVar1 < *(int *)(param_1 + uVar3 * 4));
        if ((longlong)uVar3 <= lVar10) break;
        uVar2 = *(undefined4 *)(param_1 + lVar10 * 4);
        *(undefined4 *)(param_1 + lVar10 * 4) = *(undefined4 *)(param_1 + uVar3 * 4);
        *(undefined4 *)(param_1 + uVar3 * 4) = uVar2;
      }
      *(undefined4 *)(param_1 + local_28 * 4) = *(undefined4 *)(param_1 + uVar3 * 4);
      *(int *)(param_1 + uVar3 * 4) = iVar1;
      if ((int)(((int)param_2 - uVar6) + -1) < (int)(uVar6 - (int)uVar5)) {
        FUN_14015db00(param_1,iVar7 + -2,uVar5 & 0xffffffff);
        uVar5 = uVar9;
        local_28 = uVar4;
      }
      else {
        FUN_14015db00(param_1,param_2,uVar9);
        local_res10 = iVar7 - 2;
        local_res20 = uVar4 - 2;
      }
      param_2 = (ulonglong)local_res10;
    } while ((int)uVar5 < (int)local_res10);
  }
  return;
}



void FUN_14015dc10(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014015dc37. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



undefined8 FUN_14015dc50(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  longlong lVar2;
  
  uVar1 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8)) %
          (ulonglong)*(uint *)(param_1 + 0x3b0);
  if (*(longlong *)(param_1 + 0x390) != 0) {
    for (lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x390) + uVar1 * 8);
        (lVar2 != 0 && ((uint)uVar1 == *(uint *)(lVar2 + 0x28) % *(uint *)(param_1 + 0x3b0)));
        lVar2 = *(longlong *)(lVar2 + 0x18)) {
      if ((*(uint *)(lVar2 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar2 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        return *(undefined8 *)(lVar2 + 0x10);
      }
    }
  }
  return 0;
}



undefined8 FUN_14015dcb0(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  longlong lVar2;
  
  uVar1 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8)) %
          (ulonglong)*(uint *)(param_1 + 0x1710);
  if (*(longlong *)(param_1 + 0x16f0) != 0) {
    for (lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x16f0) + uVar1 * 8);
        (lVar2 != 0 && ((uint)uVar1 == *(uint *)(lVar2 + 0x28) % *(uint *)(param_1 + 0x1710)));
        lVar2 = *(longlong *)(lVar2 + 0x18)) {
      if ((*(uint *)(lVar2 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar2 + 0xc) == *(ushort *)(param_2 + 0xc))) goto LAB_14015dd08;
    }
  }
  lVar2 = 0;
LAB_14015dd08:
  if (lVar2 != 0) {
    return *(undefined8 *)(lVar2 + 0x10);
  }
  return 0;
}



undefined8 * FUN_14015dd20(undefined8 *param_1,undefined8 param_2,undefined1 param_3)

{
  undefined2 *puVar1;
  undefined8 *puVar2;
  int iVar3;
  
  param_1[3] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined2 *)((longlong)param_1 + 0x24) = 0;
  param_1[5] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 6) = 0;
  *(undefined2 *)((longlong)param_1 + 0x34) = 0;
  *(undefined4 *)(param_1 + 2) = 0;
  *(undefined1 *)(param_1 + 7) = 0;
  *(undefined4 *)(param_1 + 4) = DAT_140320450;
  puVar2 = param_1 + 0xe;
  *(undefined2 *)((longlong)param_1 + 0x24) = DAT_140320454;
  *(undefined4 *)(param_1 + 6) = DAT_140320450;
  *(undefined2 *)((longlong)param_1 + 0x34) = DAT_140320454;
  param_1[9] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 10) = 0;
  *(undefined2 *)((longlong)param_1 + 0x54) = 0;
  param_1[0xb] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0xc) = 0;
  *(undefined2 *)((longlong)param_1 + 100) = 0;
  *(undefined4 *)(param_1 + 8) = 0;
  *(undefined1 *)(param_1 + 0xd) = 0;
  iVar3 = 1;
  *(undefined4 *)(param_1 + 10) = DAT_140320450;
  *(undefined2 *)((longlong)param_1 + 0x54) = DAT_140320454;
  *(undefined4 *)(param_1 + 0xc) = DAT_140320450;
  *(undefined2 *)((longlong)param_1 + 100) = DAT_140320454;
  puVar1 = (undefined2 *)((longlong)param_1 + 0x84);
  do {
    *(undefined ***)(puVar1 + -6) = Proud::AddrPort::vftable;
    *(undefined4 *)(puVar1 + -2) = 0;
    *puVar1 = 0;
    *(undefined ***)(puVar1 + 2) = Proud::AddrPort::vftable;
    *(undefined4 *)(puVar1 + 6) = 0;
    puVar1[8] = 0;
    *(undefined ***)(puVar1 + 10) = Proud::AddrPort::vftable;
    *(undefined4 *)(puVar1 + 0xe) = 0;
    puVar1[0x10] = 0;
    *(undefined ***)(puVar1 + 0x12) = Proud::AddrPort::vftable;
    *(undefined4 *)(puVar1 + 0x16) = 0;
    puVar1[0x18] = 0;
    *(undefined4 *)puVar2 = 0;
    *(undefined4 *)(puVar1 + -2) = DAT_140320450;
    puVar2 = puVar2 + 9;
    iVar3 = iVar3 + -1;
    *puVar1 = DAT_140320454;
    *(undefined4 *)(puVar1 + 6) = DAT_140320450;
    puVar1[8] = DAT_140320454;
    *(undefined4 *)(puVar1 + 0xe) = DAT_140320450;
    puVar1[0x10] = DAT_140320454;
    *(undefined4 *)(puVar1 + 0x16) = DAT_140320450;
    puVar1[0x18] = DAT_140320454;
    puVar1 = puVar1 + 0x24;
  } while (-1 < iVar3);
  param_1[0x25] = 0;
  param_1[0x26] = 0;
  param_1[0x27] = 0;
  param_1[0x28] = 0;
  param_1[0x24] = Proud::ByteArray::vftable;
  param_1[0x2a] = 0;
  param_1[0x2b] = 0;
  param_1[0x2c] = 0;
  param_1[0x2d] = 0;
  param_1[0x29] = Proud::ByteArray::vftable;
  *(undefined4 *)((longlong)param_1 + 0x174) = 0;
  *(undefined4 *)(param_1 + 0x2f) = 0;
  *(undefined4 *)((longlong)param_1 + 0x17c) = 0;
  *(undefined4 *)(param_1 + 0x30) = 0;
  *(undefined1 *)(param_1 + 0x22) = 0;
  *(undefined4 *)((longlong)param_1 + 0x114) = 0;
  param_1[0x31] = 0;
  param_1[0x32] = 0;
  param_1[0x33] = 0;
  *(undefined1 *)(param_1 + 0x34) = 0;
  *(undefined8 *)((longlong)param_1 + 0x1a4) = 0;
  *param_1 = param_2;
  *(undefined1 *)(param_1 + 1) = 1;
  *(undefined1 *)(param_1 + 0x23) = param_3;
  return param_1;
}



void thunk_FUN_14015c7a0(void)

{
  FUN_14015c7a0();
  return;
}



void thunk_FUN_14015c8b0(void)

{
  FUN_14015c8b0();
  return;
}



undefined4 * FUN_14015df50(longlong *param_1,longlong param_2,undefined4 param_3)

{
  undefined4 *puVar1;
  longlong lVar2;
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_1[1] <= param_2) {
    FUN_14015d090(param_1,param_2 + 1,0xffffffffffffffff);
  }
  if (param_2 < param_1[1]) {
    if ((ulonglong)param_1[2] < 0x65) {
      puVar1 = (undefined4 *)((longlong)param_1 + param_2 * 4 + 0x20);
      *puVar1 = param_3;
      return puVar1;
    }
    lVar2 = *param_1;
    *(undefined4 *)(lVar2 + param_2 * 4) = param_3;
    return (undefined4 *)(lVar2 + param_2 * 4);
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_14015dfd0(longlong param_1,int param_2,undefined8 param_3,int param_4)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  int iVar4;
  
  lVar2 = (longlong)param_2;
  if (((-1 < param_4) && (-1 < param_2)) && (param_2 <= *(int *)(param_1 + 0x18))) {
    iVar4 = *(int *)(param_1 + 0x18);
    FUN_14015cb30(param_1,iVar4 + param_4);
    iVar4 = iVar4 - param_2;
    lVar1 = 0;
    if (0 < iVar4) {
      lVar3 = lVar1;
      if (*(int *)(param_1 + 0x18) != 0) {
        lVar3 = *(longlong *)(param_1 + 0x10);
      }
      memmove((void *)(lVar3 + (lVar2 + param_4) * 4),(void *)(lVar3 + lVar2 * 4),
              (longlong)iVar4 << 2);
    }
    if (*(int *)(param_1 + 0x18) != 0) {
      lVar1 = *(longlong *)(param_1 + 0x10);
    }
    FUN_140050120(lVar1 + lVar2 * 4,param_3,(longlong)param_4 << 2);
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_14015e090(longlong param_1,longlong param_2,char param_3)

{
  undefined4 uVar1;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if (*(longlong **)(param_1 + 0x50) == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(**(longlong **)(param_1 + 0x50) + 0x18))();
  }
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
  if (((param_3 != '\0') && (*(ulonglong *)(param_1 + 0x20) < *(ulonglong *)(param_1 + 0x40))) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar1 = FUN_14019e650(param_1);
    FUN_1401a8ca0(param_1,uVar1);
  }
  return;
}



undefined1 FUN_14015e100(undefined8 param_1,longlong param_2)

{
  char cVar1;
  undefined1 uVar2;
  ulonglong local_res18 [2];
  
  cVar1 = FUN_140154a70(param_1,local_res18);
  if (cVar1 == '\0') {
    return 0;
  }
  if ((-1 < (int)local_res18[0]) && ((int)local_res18[0] <= DAT_140320d70)) {
    FUN_140050060(param_2,local_res18[0] & 0xffffffff);
    if (*(int *)(param_2 + 0x18) == 0) {
      uVar2 = FUN_1401543d0(param_1,0,local_res18[0] & 0xffffffff);
      return uVar2;
    }
    uVar2 = FUN_1401543d0(param_1,*(undefined8 *)(param_2 + 0x10),local_res18[0] & 0xffffffff);
    return uVar2;
  }
  return 0;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14015e1a0(longlong *param_1)

{
  longlong lVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  longlong *plVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  undefined4 *puVar7;
  int *piVar8;
  undefined1 *puVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  undefined4 *puVar12;
  ulonglong uVar13;
  undefined1 auStack_38 [32];
  ulonglong local_18 [2];
  
  puVar9 = auStack_38;
  local_18[0] = DAT_1403223c0 ^ (ulonglong)local_18;
  if ((ulonglong)param_1[2] < 0x65) {
    plVar4 = param_1 + 4;
  }
  else {
    plVar4 = (longlong *)*param_1;
  }
  FUN_14015db00(plVar4,(int)param_1[1],0);
  uVar5 = param_1[1] * 4 + 0x10;
  if (uVar5 < 0x401) {
    lVar1 = param_1[1] * 4;
    uVar5 = lVar1 + 0x1f;
    if (uVar5 <= lVar1 + 0x10U) {
      uVar5 = 0xffffffffffffff0;
    }
    lVar1 = -(uVar5 & 0xfffffffffffffff0);
    puVar9 = auStack_38 + lVar1;
    puVar3 = (undefined4 *)((longlong)local_18 + lVar1);
    puVar12 = (undefined4 *)0x0;
    if (puVar3 == (undefined4 *)0x0) goto LAB_14015e250;
    *puVar3 = 0xcccc;
    puVar9 = auStack_38 + lVar1;
  }
  else {
    puVar3 = malloc(uVar5);
    puVar12 = (undefined4 *)0x0;
    if (puVar3 == (undefined4 *)0x0) goto LAB_14015e250;
    *puVar3 = 0xdddd;
    puVar9 = auStack_38;
  }
  puVar12 = puVar3 + 4;
LAB_14015e250:
  uVar5 = param_1[1];
  uVar13 = 0;
  uVar6 = uVar13;
  uVar10 = uVar13;
  uVar11 = uVar13;
  if (uVar5 != 0) {
    do {
      if (uVar10 == 0) {
LAB_14015e297:
        if (((longlong)uVar6 < 0) || (param_1[1] <= (longlong)uVar6)) {
                    // WARNING: Subroutine does not return
          *(undefined **)(puVar9 + -8) = &UNK_14015e314;
          FUN_1401566b0();
        }
        if ((ulonglong)param_1[2] < 0x65) {
          puVar3 = (undefined4 *)((longlong)param_1 + uVar6 * 4 + 0x20);
        }
        else {
          puVar3 = (undefined4 *)(*param_1 + uVar6 * 4);
        }
        uVar11 = uVar10 + 1;
        puVar12[uVar10] = *puVar3;
      }
      else {
        if (((longlong)uVar6 < 0) || (param_1[1] <= (longlong)uVar6)) {
                    // WARNING: Subroutine does not return
          *(undefined **)(puVar9 + -8) = &UNK_14015e30e;
          FUN_1401566b0();
        }
        if ((ulonglong)param_1[2] < 0x65) {
          piVar8 = (int *)((longlong)param_1 + uVar6 * 4 + 0x20);
        }
        else {
          piVar8 = (int *)(*param_1 + uVar6 * 4);
        }
        uVar11 = uVar10;
        if (*piVar8 != puVar12[uVar10 - 1]) goto LAB_14015e297;
      }
      uVar6 = uVar6 + 1;
      uVar10 = uVar11;
    } while (uVar6 < uVar5);
  }
  *(undefined8 *)(puVar9 + -8) = 0x14015e2d7;
  FUN_14015d090(param_1,uVar11,0xffffffffffffffff);
  if (0 < (longlong)uVar11) {
    puVar3 = puVar12;
    do {
      if (((longlong)uVar13 < 0) || (param_1[1] <= (longlong)uVar13)) {
                    // WARNING: Subroutine does not return
        *(undefined **)(puVar9 + -8) = &UNK_14015e36b;
        FUN_1401566b0();
      }
      if ((ulonglong)param_1[2] < 0x65) {
        lVar1 = (longlong)param_1 + (0x20 - (longlong)puVar12);
      }
      else {
        lVar1 = *param_1 - (longlong)puVar12;
      }
      puVar7 = (undefined4 *)(lVar1 + (longlong)puVar3);
      uVar2 = *puVar3;
      uVar13 = uVar13 + 1;
      puVar3 = puVar3 + 1;
      *puVar7 = uVar2;
    } while ((longlong)uVar13 < (longlong)uVar11);
  }
  if ((puVar12 != (undefined4 *)0x0) && (puVar12[-4] == 0xdddd)) {
    *(undefined8 *)(puVar9 + -8) = 0x14015e344;
    free(puVar12 + -4);
  }
  *(undefined8 *)(puVar9 + -8) = 0x14015e350;
  return;
}



void FUN_14015e370(longlong param_1,uint param_2,uint param_3)

{
  double dVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  longlong *plVar5;
  longlong lVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  uint uVar9;
  ulonglong uVar11;
  ulonglong uVar12;
  longlong lVar13;
  uint local_res10;
  uint local_res18;
  ulonglong local_res20;
  ulonglong local_28;
  uint uVar10;
  
  uVar12 = (ulonglong)(int)param_3;
  uVar8 = (ulonglong)(int)param_2;
  local_res10 = param_2;
  local_res18 = param_3;
  local_res20 = uVar8;
  local_28 = uVar12;
  if ((int)param_3 < (int)param_2) {
    do {
      uVar8 = uVar8 & 0xffffffff;
      lVar13 = (longlong)(int)uVar12;
      uVar12 = local_res20;
      while( true ) {
        dVar1 = *(double *)(*(longlong *)(param_1 + local_28 * 0x18) + 0x188);
        plVar5 = (longlong *)(param_1 + lVar13 * 0x18);
        for (; (*(double *)(*plVar5 + 0x188) <= dVar1 && dVar1 != *(double *)(*plVar5 + 0x188) &&
               (lVar13 < (longlong)uVar12)); lVar13 = lVar13 + 1) {
          plVar5 = plVar5 + 3;
        }
        lVar6 = param_1 + uVar12 * 0x18;
        do {
          uVar11 = uVar8;
          uVar7 = uVar12;
          plVar5 = (longlong *)(lVar6 + -0x18);
          lVar6 = lVar6 + -0x18;
          uVar10 = (uint)uVar11;
          uVar9 = uVar10 - 1;
          uVar8 = (ulonglong)uVar9;
          uVar12 = uVar7 - 1;
        } while (dVar1 < *(double *)(*plVar5 + 0x188));
        if ((longlong)uVar12 <= lVar13) break;
        uVar2 = *(undefined8 *)(param_1 + lVar13 * 0x18);
        uVar3 = *(undefined8 *)(param_1 + 8 + lVar13 * 0x18);
        uVar4 = *(undefined8 *)(param_1 + 0x10 + lVar13 * 0x18);
        *(undefined8 *)(param_1 + lVar13 * 0x18) = *(undefined8 *)(param_1 + uVar12 * 0x18);
        *(undefined8 *)(param_1 + 8 + lVar13 * 0x18) = *(undefined8 *)(param_1 + 8 + uVar12 * 0x18);
        *(undefined8 *)(param_1 + 0x10 + lVar13 * 0x18) =
             *(undefined8 *)(param_1 + 0x10 + uVar12 * 0x18);
        *(undefined8 *)(param_1 + uVar12 * 0x18) = uVar2;
        *(undefined8 *)(param_1 + 8 + uVar12 * 0x18) = uVar3;
        *(undefined8 *)(param_1 + 0x10 + uVar12 * 0x18) = uVar4;
      }
      uVar2 = *(undefined8 *)(param_1 + local_28 * 0x18);
      uVar3 = *(undefined8 *)(param_1 + 8 + local_28 * 0x18);
      uVar4 = *(undefined8 *)(param_1 + 0x10 + local_28 * 0x18);
      *(undefined8 *)(param_1 + local_28 * 0x18) = *(undefined8 *)(param_1 + uVar12 * 0x18);
      *(undefined8 *)(param_1 + 8 + local_28 * 0x18) = *(undefined8 *)(param_1 + 8 + uVar12 * 0x18);
      *(undefined8 *)(param_1 + 0x10 + local_28 * 0x18) =
           *(undefined8 *)(param_1 + 0x10 + uVar12 * 0x18);
      *(undefined8 *)(param_1 + uVar12 * 0x18) = uVar2;
      *(undefined8 *)(param_1 + 8 + uVar12 * 0x18) = uVar3;
      *(undefined8 *)(param_1 + 0x10 + uVar12 * 0x18) = uVar4;
      if ((int)((local_res10 - uVar9) + -1) < (int)(uVar9 - local_res18)) {
        FUN_14015e370(param_1,uVar10 - 2,local_res18);
        local_res18 = uVar10;
        local_28 = uVar7;
      }
      else {
        FUN_14015e370(param_1,local_res10,uVar11);
        local_res10 = uVar10 - 2;
        local_res20 = uVar7 - 2;
      }
      uVar12 = (ulonglong)local_res18;
      uVar8 = (ulonglong)local_res10;
    } while ((int)local_res18 < (int)local_res10);
  }
  return;
}



void FUN_14015e530(longlong param_1)

{
  FUN_1401560e0(param_1 + 8);
  if (*(longlong *)(param_1 + 0x10) != 0) {
    if (*(int *)(param_1 + 0x1c) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_1 + 0x18) = 0;
  }
  return;
}



undefined8 * FUN_14015e580(undefined8 param_1,undefined8 *param_2)

{
  FUN_1401568c0();
  *param_2 = PTR_DAT_1403200a0;
  return param_2;
}



void FUN_14015e5b0(longlong param_1,undefined8 param_2,longlong *param_3,undefined8 param_4)

{
  undefined *puVar1;
  
  if (*(longlong *)(param_1 + 0x1790) != 0) {
    puVar1 = (undefined *)*param_3;
    if ((undefined *)*param_3 == (undefined *)0x0) {
      puVar1 = PTR_DAT_1403200a0;
    }
    FUN_140196a90(*(longlong *)(param_1 + 0x1790),0,puVar1,param_4,0xfffffffffffffffe);
  }
  FUN_14004f990(param_3);
  return;
}



undefined4 FUN_14015e600(longlong param_1,longlong param_2)

{
  ushort uVar1;
  uint uVar2;
  longlong lVar3;
  ulonglong uVar4;
  char cVar5;
  
  if ((*(int *)(param_2 + 8) == 0) || (cVar5 = FUN_1401588c0(param_2), cVar5 != '\0')) {
    uVar1 = *(ushort *)(param_2 + 0xc);
    uVar2 = *(uint *)(param_2 + 8);
    uVar4 = (ulonglong)(uVar1 ^ uVar2) % (ulonglong)*(uint *)(param_1 + 0x3b0);
    if (*(longlong *)(param_1 + 0x390) != 0) {
      lVar3 = *(longlong *)(*(longlong *)(param_1 + 0x390) + uVar4 * 8);
      while( true ) {
        if ((lVar3 == 0) || ((uint)uVar4 != *(uint *)(lVar3 + 0x28) % *(uint *)(param_1 + 0x3b0)))
        goto LAB_14015e683;
        if ((*(uint *)(lVar3 + 8) == uVar2) && (*(ushort *)(lVar3 + 0xc) == uVar1)) break;
        lVar3 = *(longlong *)(lVar3 + 0x18);
      }
      if (*(longlong *)(lVar3 + 0x10) != 0) {
        return *(undefined4 *)(*(longlong *)(lVar3 + 0x10) + 0x6f8);
      }
    }
LAB_14015e683:
    uVar4 = (ulonglong)(uVar1 ^ uVar2) % (ulonglong)*(uint *)(param_1 + 0x718);
    if (*(longlong *)(param_1 + 0x6f8) != 0) {
      for (lVar3 = *(longlong *)(*(longlong *)(param_1 + 0x6f8) + uVar4 * 8);
          (lVar3 != 0 && ((uint)uVar4 == *(uint *)(lVar3 + 0x28) % *(uint *)(param_1 + 0x718)));
          lVar3 = *(longlong *)(lVar3 + 0x18)) {
        if ((*(uint *)(lVar3 + 8) == uVar2) && (*(ushort *)(lVar3 + 0xc) == uVar1)) {
          return 1;
        }
      }
    }
  }
  return 0;
}



void FUN_14015e710(longlong param_1)

{
  FUN_14004f990(param_1 + 8);
  return;
}



undefined8 * FUN_14015e720(undefined8 *param_1,longlong param_2)

{
  undefined4 uVar1;
  int iVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  
  *param_1 = Proud::CFastArray<>::vftable;
  if (DAT_140320e08 != 5) {
    FUN_1401838a0();
  }
  uVar4 = 0;
  param_1[1] = *(undefined8 *)(param_2 + 8);
  uVar1 = *(undefined4 *)(param_2 + 0x24);
  param_1[2] = 0;
  param_1[3] = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined4 *)((longlong)param_1 + 0x24) = uVar1;
  iVar2 = *(int *)(param_2 + 0x18);
  if (-1 < iVar2) {
    FUN_140050060(param_1,iVar2);
    uVar3 = uVar4;
    if (*(int *)(param_2 + 0x18) != 0) {
      uVar3 = *(undefined8 *)(param_2 + 0x10);
    }
    if (*(int *)(param_1 + 3) != 0) {
      uVar4 = param_1[2];
    }
    FUN_140050120(uVar4,uVar3,(longlong)iVar2);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_14015e7c0(longlong *param_1,undefined4 *param_2,longlong param_3)

{
  longlong lVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  longlong lVar5;
  
  if (param_3 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_14015d090(param_1,param_3,0xffffffffffffffff);
  lVar5 = 0;
  if (0 < param_3) {
    puVar4 = param_2;
    do {
      if ((lVar5 < 0) || (param_1[1] <= lVar5)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_1[2] < 0x65) {
        lVar1 = (longlong)param_1 + (0x20 - (longlong)param_2);
      }
      else {
        lVar1 = *param_1 - (longlong)param_2;
      }
      puVar3 = (undefined4 *)(lVar1 + (longlong)puVar4);
      uVar2 = *puVar4;
      lVar5 = lVar5 + 1;
      puVar4 = puVar4 + 1;
      *puVar3 = uVar2;
    } while (lVar5 < param_3);
  }
  return;
}



void FUN_14015e850(longlong param_1)

{
  longlong *plVar1;
  uint uVar2;
  ulonglong uVar3;
  longlong lVar4;
  longlong lVar5;
  float fVar6;
  float fVar7;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_14015ce40();
  lVar4 = *(longlong *)(param_1 + 0x10);
  while (lVar4 != 0) {
    plVar1 = *(longlong **)(param_1 + 0x50);
    lVar5 = *(longlong *)(lVar4 + 8);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,lVar4);
    }
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    lVar4 = lVar5;
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_14015ce40(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar2 = FUN_14019e650(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    lVar4 = 0;
    *(uint *)(param_1 + 0x28) = uVar2;
    fVar7 = (float)uVar2 * *(float *)(param_1 + 0x34);
    if ((9.223372e+18 < fVar7) && (fVar7 = fVar7 - 9.223372e+18, fVar7 < 9.223372e+18)) {
      lVar4 = -0x8000000000000000;
    }
    fVar6 = (float)uVar2 * *(float *)(param_1 + 0x30);
    lVar5 = 0;
    *(longlong *)(param_1 + 0x38) = (longlong)fVar7 + lVar4;
    if ((9.223372e+18 < fVar6) && (fVar6 = fVar6 - 9.223372e+18, fVar6 < 9.223372e+18)) {
      lVar5 = -0x8000000000000000;
    }
    uVar3 = (longlong)fVar6 + lVar5;
    if ((ulonglong)((longlong)fVar6 + lVar5) < 0x11) {
      uVar3 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar3;
  }
  FUN_14015ce40(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



void FUN_14015e980(longlong param_1)

{
  longlong *plVar1;
  uint uVar2;
  ulonglong uVar3;
  longlong lVar4;
  longlong lVar5;
  float fVar6;
  float fVar7;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_14015b050();
  lVar4 = *(longlong *)(param_1 + 0x10);
  while (lVar4 != 0) {
    plVar1 = *(longlong **)(param_1 + 0x50);
    lVar5 = *(longlong *)(lVar4 + 0x18);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,lVar4);
    }
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    lVar4 = lVar5;
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_14015b050(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar2 = FUN_14019e650(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    lVar4 = 0;
    *(uint *)(param_1 + 0x28) = uVar2;
    fVar7 = (float)uVar2 * *(float *)(param_1 + 0x34);
    if ((9.223372e+18 < fVar7) && (fVar7 = fVar7 - 9.223372e+18, fVar7 < 9.223372e+18)) {
      lVar4 = -0x8000000000000000;
    }
    fVar6 = (float)uVar2 * *(float *)(param_1 + 0x30);
    lVar5 = 0;
    *(longlong *)(param_1 + 0x38) = (longlong)fVar7 + lVar4;
    if ((9.223372e+18 < fVar6) && (fVar6 = fVar6 - 9.223372e+18, fVar6 < 9.223372e+18)) {
      lVar5 = -0x8000000000000000;
    }
    uVar3 = (longlong)fVar6 + lVar5;
    if ((ulonglong)((longlong)fVar6 + lVar5) < 0x11) {
      uVar3 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar3;
  }
  FUN_14015b050(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



void FUN_14015eab0(longlong param_1,longlong param_2,undefined1 param_3)

{
  uint uVar1;
  ulonglong uVar2;
  uint uVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar1 = *(uint *)(param_1 + 0x28);
  uVar2 = (ulonglong)*(uint *)(param_2 + 0x28) % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x20) == 1) {
    *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    *(undefined8 *)(param_1 + 0x10) = 0;
    *(undefined8 *)(param_1 + 0x18) = 0;
  }
  else {
    uVar3 = (uint)uVar2;
    if (((*(longlong *)(param_2 + 0x20) == 0) ||
        (*(uint *)(*(longlong *)(param_2 + 0x20) + 0x28) % uVar1 != uVar3)) &&
       ((*(longlong *)(param_2 + 0x18) == 0 ||
        (*(uint *)(*(longlong *)(param_2 + 0x18) + 0x28) % uVar1 != uVar3)))) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    }
    else if (param_2 == *(longlong *)(*(longlong *)(param_1 + 8) + (longlong)(int)uVar3 * 8)) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = *(undefined8 *)(param_2 + 0x18);
    }
    if (param_2 == *(longlong *)(param_1 + 0x10)) {
      *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_2 + 0x18);
      *(undefined8 *)(param_2 + 0x20) = 0;
    }
    if (param_2 == *(longlong *)(param_1 + 0x18)) {
      *(undefined8 *)(param_1 + 0x18) = *(undefined8 *)(param_2 + 0x20);
      *(undefined8 *)(param_2 + 0x18) = 0;
    }
    if (*(longlong *)(param_2 + 0x20) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x20) + 0x18) = *(undefined8 *)(param_2 + 0x18);
    }
    if (*(longlong *)(param_2 + 0x18) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x18) + 0x20) = *(undefined8 *)(param_2 + 0x20);
    }
  }
  FUN_14015e090(param_1,param_2,param_3);
  FUN_14015b050(param_1);
  return;
}



void FUN_14015ebb0(undefined8 *param_1)

{
  void *pvVar1;
  
  pvVar1 = (void *)*param_1;
  if (pvVar1 != (void *)0x0) {
    FUN_1401858d0((longlong)pvVar1 + 0x148);
    FUN_1401858d0((longlong)pvVar1 + 0x120);
    operator_delete(pvVar1);
  }
  FUN_140156970(param_1);
  return;
}



void FUN_14015ec10(longlong param_1)

{
  void *pvVar1;
  
  pvVar1 = *(void **)(param_1 + 0x38);
  if (pvVar1 != (void *)0x0) {
    FUN_140197f50(pvVar1);
    operator_delete(pvVar1);
  }
  FUN_140156c00(param_1);
  FUN_140156970(param_1);
  return;
}



undefined4 * FUN_14015ec60(longlong param_1,undefined4 *param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 uVar3;
  undefined4 uVar4;
  undefined4 *puVar5;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar5 = (undefined4 *)FUN_140156940(0x20);
  }
  else {
    puVar5 = (undefined4 *)(**(code **)(*plVar1 + 8))(plVar1,0x20);
  }
  if (puVar5 != (undefined4 *)0x0) {
    uVar4 = *param_2;
    puVar5[6] = param_4;
    *puVar5 = uVar4;
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015ce40(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined4 **)(param_1 + 0x10) = puVar5;
    *(undefined4 **)(param_1 + 0x18) = puVar5;
    *(undefined8 *)(puVar5 + 4) = 0;
    *(undefined8 *)(puVar5 + 2) = 0;
  }
  else {
    FUN_14015ce40(param_1);
    FUN_14015ce40(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      *(undefined8 *)(puVar5 + 4) = 0;
      *(longlong *)(puVar5 + 2) = lVar2;
      if (lVar2 != 0) {
        *(undefined4 **)(lVar2 + 0x10) = puVar5;
      }
      *(undefined4 **)(param_1 + 0x10) = puVar5;
    }
    else {
      if (*(longlong *)(lVar2 + 0x10) == 0) {
        *(undefined4 **)(param_1 + 0x10) = puVar5;
      }
      else {
        *(undefined4 **)(*(longlong *)(lVar2 + 0x10) + 8) = puVar5;
      }
      uVar3 = *(undefined8 *)(lVar2 + 0x10);
      *(longlong *)(puVar5 + 2) = lVar2;
      *(undefined8 *)(puVar5 + 4) = uVar3;
      *(undefined4 **)(lVar2 + 0x10) = puVar5;
    }
  }
  *(undefined4 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar5;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015ce40(param_1);
  FUN_14015ce40(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar4 = FUN_14019e650(param_1);
    FUN_14015d300(param_1,uVar4);
  }
  FUN_14015ce40(param_1);
  return puVar5;
}



undefined4 * FUN_14015eda0(longlong param_1,undefined4 *param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 uVar3;
  undefined4 uVar4;
  undefined4 *puVar5;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar5 = (undefined4 *)FUN_140156940(0x30);
  }
  else {
    puVar5 = (undefined4 *)(**(code **)(*plVar1 + 8))(plVar1,0x30);
  }
  if (puVar5 != (undefined4 *)0x0) {
    uVar4 = *param_2;
    puVar5[10] = param_4;
    *puVar5 = uVar4;
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015b050(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined4 **)(param_1 + 0x10) = puVar5;
    *(undefined4 **)(param_1 + 0x18) = puVar5;
    *(undefined8 *)(puVar5 + 8) = 0;
    *(undefined8 *)(puVar5 + 6) = 0;
  }
  else {
    FUN_14015b050(param_1);
    FUN_14015b050(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      *(undefined8 *)(puVar5 + 8) = 0;
      *(longlong *)(puVar5 + 6) = lVar2;
      if (lVar2 != 0) {
        *(undefined4 **)(lVar2 + 0x20) = puVar5;
      }
      *(undefined4 **)(param_1 + 0x10) = puVar5;
    }
    else {
      if (*(longlong *)(lVar2 + 0x20) == 0) {
        *(undefined4 **)(param_1 + 0x10) = puVar5;
      }
      else {
        *(undefined4 **)(*(longlong *)(lVar2 + 0x20) + 0x18) = puVar5;
      }
      uVar3 = *(undefined8 *)(lVar2 + 0x20);
      *(longlong *)(puVar5 + 6) = lVar2;
      *(undefined8 *)(puVar5 + 8) = uVar3;
      *(undefined4 **)(lVar2 + 0x20) = puVar5;
    }
  }
  *(undefined4 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar5;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b050(param_1);
  FUN_14015b050(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar4 = FUN_14019e650(param_1);
    FUN_1401a8ca0(param_1,uVar4);
  }
  FUN_14015b050(param_1);
  return puVar5;
}



undefined8 * FUN_14015eee0(longlong param_1,undefined8 *param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  undefined8 uVar2;
  longlong lVar3;
  undefined4 uVar4;
  undefined8 *puVar5;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar5 = (undefined8 *)FUN_140156940(0x28);
  }
  else {
    puVar5 = (undefined8 *)(**(code **)(*plVar1 + 8))(plVar1,0x28);
  }
  if (puVar5 != (undefined8 *)0x0) {
    uVar2 = *param_2;
    *(undefined4 *)(puVar5 + 4) = param_4;
    *puVar5 = uVar2;
  }
  lVar3 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015b3b0(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined8 **)(param_1 + 0x10) = puVar5;
    *(undefined8 **)(param_1 + 0x18) = puVar5;
    puVar5[3] = 0;
    puVar5[2] = 0;
  }
  else {
    FUN_14015b3b0(param_1);
    FUN_14015b3b0(param_1);
    if (lVar3 == 0) {
      lVar3 = *(longlong *)(param_1 + 0x10);
      puVar5[3] = 0;
      puVar5[2] = lVar3;
      if (lVar3 != 0) {
        *(undefined8 **)(lVar3 + 0x18) = puVar5;
      }
      *(undefined8 **)(param_1 + 0x10) = puVar5;
    }
    else {
      if (*(longlong *)(lVar3 + 0x18) == 0) {
        *(undefined8 **)(param_1 + 0x10) = puVar5;
      }
      else {
        *(undefined8 **)(*(longlong *)(lVar3 + 0x18) + 0x10) = puVar5;
      }
      uVar2 = *(undefined8 *)(lVar3 + 0x18);
      puVar5[2] = lVar3;
      puVar5[3] = uVar2;
      *(undefined8 **)(lVar3 + 0x18) = puVar5;
    }
  }
  *(undefined8 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar5;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b3b0(param_1);
  FUN_14015b3b0(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar4 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar4);
  }
  FUN_14015b3b0(param_1);
  return puVar5;
}



undefined4 * FUN_14015f020(longlong param_1,undefined4 *param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 uVar3;
  undefined4 uVar4;
  undefined4 *puVar5;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar5 = (undefined4 *)FUN_140156940(0x28);
  }
  else {
    puVar5 = (undefined4 *)(**(code **)(*plVar1 + 8))(plVar1,0x28);
  }
  if (puVar5 != (undefined4 *)0x0) {
    uVar4 = *param_2;
    puVar5[8] = param_4;
    *puVar5 = uVar4;
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015b3b0(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined4 **)(param_1 + 0x10) = puVar5;
    *(undefined4 **)(param_1 + 0x18) = puVar5;
    *(undefined8 *)(puVar5 + 6) = 0;
    *(undefined8 *)(puVar5 + 4) = 0;
  }
  else {
    FUN_14015b3b0(param_1);
    FUN_14015b3b0(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      *(undefined8 *)(puVar5 + 6) = 0;
      *(longlong *)(puVar5 + 4) = lVar2;
      if (lVar2 != 0) {
        *(undefined4 **)(lVar2 + 0x18) = puVar5;
      }
      *(undefined4 **)(param_1 + 0x10) = puVar5;
    }
    else {
      if (*(longlong *)(lVar2 + 0x18) == 0) {
        *(undefined4 **)(param_1 + 0x10) = puVar5;
      }
      else {
        *(undefined4 **)(*(longlong *)(lVar2 + 0x18) + 0x10) = puVar5;
      }
      uVar3 = *(undefined8 *)(lVar2 + 0x18);
      *(longlong *)(puVar5 + 4) = lVar2;
      *(undefined8 *)(puVar5 + 6) = uVar3;
      *(undefined4 **)(lVar2 + 0x18) = puVar5;
    }
  }
  *(undefined4 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar5;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b3b0(param_1);
  FUN_14015b3b0(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar4 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar4);
  }
  FUN_14015b3b0(param_1);
  return puVar5;
}



void FUN_14015f160(longlong param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar2 = *(longlong *)(param_1 + 0x20);
  lVar1 = lVar2;
  while (lVar1 != 0) {
    if (lVar2 != 0) {
      lVar2 = lVar2 + -1;
      *(longlong *)(param_1 + 0x20) = lVar2;
      if (lVar2 == 0) {
        *(undefined8 *)(param_1 + 0x18) = 0;
      }
    }
    lVar1 = *(longlong *)(param_1 + 0x20);
  }
  lVar2 = *(longlong *)(param_1 + 0x10);
  while (lVar2 != 0) {
    lVar2 = lVar2 + -1;
    if (*(longlong *)(*(longlong *)(param_1 + 8) + lVar2 * 8) != 0) {
      operator_delete(*(void **)(*(longlong *)(param_1 + 8) + lVar2 * 8));
    }
  }
  if (*(void **)(param_1 + 8) != (void *)0x0) {
    operator_delete(*(void **)(param_1 + 8));
  }
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  return;
}



longlong * FUN_14015f1f0(longlong *param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  longlong lVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  if (param_2 == 0) {
    *param_1 = 0;
  }
  else {
    lVar2 = FUN_140156940(0x48);
    if (lVar2 != 0) {
      uVar1 = FUN_14015a430();
      FUN_140156a70(lVar2,uVar1,1,param_4,uVar3);
    }
    *param_1 = lVar2;
    FUN_140156b50(lVar2);
    *(undefined8 *)(*param_1 + 0x40) = 1;
    *(longlong *)(*param_1 + 0x38) = param_2;
    FUN_140156be0(lVar2);
  }
  return param_1;
}



undefined8 * FUN_14015f290(undefined8 *param_1,undefined8 *param_2)

{
  undefined8 uVar1;
  longlong lVar2;
  longlong lVar3;
  
  uVar1 = *param_1;
  lVar2 = param_1[4];
  param_2[1] = 0;
  lVar3 = param_1[3];
  *param_2 = uVar1;
  param_2[2] = lVar2 + lVar3;
  return param_2;
}



void FUN_14015f2b0(longlong param_1,ulonglong param_2)

{
  longlong lVar1;
  size_t sVar2;
  code *pcVar3;
  ulonglong uVar4;
  void *_Dst;
  void *pvVar5;
  void *pvVar6;
  ulonglong uVar7;
  
  uVar7 = *(ulonglong *)(param_1 + 0x10);
  if (0xfffffffffffffff - uVar7 < param_2) {
    std::_Xlength_error("deque<T> too long");
    pcVar3 = (code *)swi(3);
    (*pcVar3)();
    return;
  }
  uVar4 = uVar7 >> 1;
  if (uVar4 < 8) {
    uVar4 = 8;
  }
  if ((param_2 < uVar4) && (uVar7 <= 0xfffffffffffffff - uVar4)) {
    param_2 = uVar4;
  }
  uVar4 = *(ulonglong *)(param_1 + 0x18) >> 2;
  _Dst = (void *)FUN_14015da90(param_1 + 0x29,uVar7 + param_2);
  lVar1 = uVar4 * 8;
  pvVar5 = (void *)(lVar1 + *(longlong *)(param_1 + 8));
  uVar7 = (*(longlong *)(param_1 + 0x10) * 8 - (longlong)pvVar5) + *(longlong *)(param_1 + 8) &
          0xfffffffffffffff8;
  pvVar5 = memmove((void *)(lVar1 + (longlong)_Dst),pvVar5,uVar7);
  pvVar5 = (void *)((longlong)pvVar5 + uVar7);
  if (param_2 < uVar4) {
    memmove(pvVar5,*(void **)(param_1 + 8),param_2 * 8);
    pvVar5 = (void *)(param_2 * 8 + *(longlong *)(param_1 + 8));
    sVar2 = ((lVar1 - (longlong)pvVar5) + *(longlong *)(param_1 + 8) >> 3) * 8;
    pvVar5 = memmove(_Dst,pvVar5,sVar2);
    pvVar5 = (void *)((longlong)pvVar5 + sVar2);
    uVar4 = param_2;
  }
  else {
    sVar2 = (lVar1 >> 3) * 8;
    pvVar6 = memmove(pvVar5,*(void **)(param_1 + 8),sVar2);
    pvVar5 = _Dst;
    if (param_2 - uVar4 != 0) {
      memset((void *)((longlong)pvVar6 + sVar2),0,(param_2 - uVar4) * 8);
    }
  }
  if (uVar4 != 0) {
    memset(pvVar5,0,uVar4 << 3);
  }
  if (*(void **)(param_1 + 8) != (void *)0x0) {
    operator_delete(*(void **)(param_1 + 8));
  }
  *(longlong *)(param_1 + 0x10) = *(longlong *)(param_1 + 0x10) + param_2;
  *(void **)(param_1 + 8) = _Dst;
  return;
}



longlong FUN_14015f450(longlong param_1,longlong param_2)

{
  int iVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  iVar1 = *(int *)(param_2 + 0x18);
  if (-1 < iVar1) {
    FUN_140050060(param_1,iVar1);
    uVar2 = 0;
    uVar3 = uVar2;
    if (*(int *)(param_2 + 0x18) != 0) {
      uVar3 = *(undefined8 *)(param_2 + 0x10);
    }
    if (*(int *)(param_1 + 0x18) != 0) {
      uVar2 = *(undefined8 *)(param_1 + 0x10);
    }
    FUN_140050120(uVar2,uVar3,(longlong)iVar1);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



undefined8 FUN_14015f4b0(longlong param_1,uint param_2,longlong param_3)

{
  undefined4 uVar1;
  int iVar2;
  uint *puVar3;
  ulonglong uVar4;
  undefined8 uVar5;
  longlong lVar6;
  longlong lVar7;
  int iVar8;
  longlong lVar9;
  undefined4 *puVar10;
  
  FUN_14015cb30(param_3);
  uVar5 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar5);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))(param_1 + -0xa8);
  }
  uVar4 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0xbf8);
  if (*(longlong *)(param_1 + 0xbd8) != 0) {
    for (puVar3 = *(uint **)(*(longlong *)(param_1 + 0xbd8) + uVar4 * 8);
        (puVar3 != (uint *)0x0 && ((uint)uVar4 == puVar3[8] % *(uint *)(param_1 + 0xbf8)));
        puVar3 = *(uint **)(puVar3 + 4)) {
      if (*puVar3 == param_2) {
        if (*(longlong *)(*(longlong *)(puVar3 + 2) + 0x68) == 0) {
          puVar10 = (undefined4 *)0x0;
        }
        else {
          puVar10 = *(undefined4 **)(*(longlong *)(puVar3 + 2) + 0x58);
        }
        while( true ) {
          if (puVar10 == (undefined4 *)0x0) {
            FUN_140156be0(uVar5);
            return 1;
          }
          uVar1 = *puVar10;
          iVar2 = *(int *)(param_3 + 0x18);
          lVar9 = (longlong)iVar2;
          if (iVar2 < 0) break;
          iVar8 = *(int *)(param_3 + 0x18);
          FUN_14015cb30(param_3,iVar8 + 1);
          iVar8 = iVar8 - iVar2;
          if (0 < iVar8) {
            if (*(int *)(param_3 + 0x18) == 0) {
              lVar7 = 0;
              lVar6 = 0;
            }
            else {
              lVar7 = *(longlong *)(param_3 + 0x10);
              lVar6 = *(longlong *)(param_3 + 0x10);
            }
            memmove((void *)(lVar6 + 4 + lVar9 * 4),(void *)(lVar7 + lVar9 * 4),(longlong)iVar8 << 2
                   );
          }
          if (*(int *)(param_3 + 0x18) == 0) {
            lVar7 = 0;
          }
          else {
            lVar7 = *(longlong *)(param_3 + 0x10);
          }
          *(undefined4 *)(lVar7 + lVar9 * 4) = uVar1;
          puVar10 = *(undefined4 **)(puVar10 + 4);
        }
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
    }
  }
  FUN_140156be0(uVar5);
  return 0;
}



void FUN_14015f640(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 uVar3;
  longlong lVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  
  uVar6 = 0xfffffffffffffffe;
  plVar1 = (longlong *)(param_1 + -0xa8);
  uVar3 = (**(code **)(*plVar1 + 0x58))(plVar1);
  uVar5 = uVar3;
  FUN_140156b50(uVar3);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*plVar1 + 200))
              (plVar1,L"Proud::CNetServerImpl::CloseEveryConnection",*plVar1,param_4,uVar6,uVar5,1);
  }
  if (*(longlong *)(param_1 + 0xbf0) == 0) {
    lVar4 = 0;
  }
  else {
    lVar4 = *(longlong *)(param_1 + 0xbe0);
  }
  for (; lVar4 != 0; lVar4 = *(longlong *)(lVar4 + 0x10)) {
    lVar2 = *(longlong *)(lVar4 + 8);
    if ((*(longlong *)(lVar2 + 0x228) == 0) && (*(double *)(lVar2 + 0x758) == 0.0)) {
      uVar5 = (**(code **)(*(longlong *)(param_1 + 0x70) + 8))();
      *(undefined8 *)(lVar2 + 0x758) = uVar5;
      (**(code **)(*(longlong *)(param_1 + 0x400) + 0x100))
                ((longlong *)(param_1 + 0x400),*(undefined4 *)(lVar2 + 0x6f8),&DAT_140328530);
    }
  }
  FUN_140156be0(uVar3);
  return;
}



longlong FUN_14015f740(longlong param_1,uint param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  uint *puVar3;
  
  uVar2 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0xca0);
  if ((*(longlong *)(param_1 + 0xc80) != 0) &&
     (puVar3 = *(uint **)(*(longlong *)(param_1 + 0xc80) + uVar2 * 8), puVar3 != (uint *)0x0)) {
    while ((uint)uVar2 == puVar3[8] % *(uint *)(param_1 + 0xca0)) {
      if (*puVar3 == param_2) {
        lVar1 = *(longlong *)(puVar3 + 2);
        if (lVar1 == 0) {
          return 0;
        }
        if (*(longlong *)(lVar1 + 0x228) != 0) {
          return 0;
        }
        return lVar1;
      }
      puVar3 = *(uint **)(puVar3 + 4);
      if (puVar3 == (uint *)0x0) {
        return 0;
      }
    }
  }
  return 0;
}



undefined8 FUN_14015f7b0(longlong param_1,uint param_2)

{
  undefined8 uVar1;
  longlong lVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  uint *puVar5;
  
  uVar4 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar4);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))(param_1 + -0xa8);
  }
  uVar3 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0xbf8);
  if ((*(longlong *)(param_1 + 0xbd8) != 0) &&
     (puVar5 = *(uint **)(*(longlong *)(param_1 + 0xbd8) + uVar3 * 8), puVar5 != (uint *)0x0)) {
    while ((uint)uVar3 == puVar5[8] % *(uint *)(param_1 + 0xbf8)) {
      if (*puVar5 == param_2) {
        lVar2 = *(longlong *)(puVar5 + 2);
        if ((lVar2 != 0) && (*(longlong *)(lVar2 + 0x228) == 0)) {
          uVar1 = *(undefined8 *)(lVar2 + 0x1c0);
          FUN_140156be0(uVar4);
          return uVar1;
        }
        break;
      }
      puVar5 = *(uint **)(puVar5 + 4);
      if (puVar5 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar4);
  return 0xbff0000000000000;
}



undefined8 FUN_14015f8c0(longlong param_1,uint param_2)

{
  undefined8 uVar1;
  longlong lVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  uint *puVar5;
  
  uVar4 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar4);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))(param_1 + -0xa8);
  }
  uVar3 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0xbf8);
  if ((*(longlong *)(param_1 + 0xbd8) != 0) &&
     (puVar5 = *(uint **)(*(longlong *)(param_1 + 0xbd8) + uVar3 * 8), puVar5 != (uint *)0x0)) {
    while ((uint)uVar3 == puVar5[8] % *(uint *)(param_1 + 0xbf8)) {
      if (*puVar5 == param_2) {
        lVar2 = *(longlong *)(puVar5 + 2);
        if ((lVar2 != 0) && (*(longlong *)(lVar2 + 0x228) == 0)) {
          uVar1 = *(undefined8 *)(lVar2 + 0x1c8);
          FUN_140156be0(uVar4);
          return uVar1;
        }
        break;
      }
      puVar5 = *(uint **)(puVar5 + 4);
      if (puVar5 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar4);
  return 0xbff0000000000000;
}



int FUN_14015f9d0(longlong param_1,longlong param_2,int param_3)

{
  undefined8 uVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  
  uVar1 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar1);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))(param_1 + -0xa8);
  }
  iVar3 = 0;
  if (*(longlong *)(param_1 + 0xbf0) == 0) {
    lVar2 = 0;
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0xbe0);
  }
  lVar4 = 0;
  if (0 < param_3) {
    do {
      if (lVar2 == 0) break;
      if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      *(undefined4 *)(param_2 + lVar4 * 4) = *(undefined4 *)(*(longlong *)(lVar2 + 8) + 0x6f8);
      iVar3 = iVar3 + 1;
      lVar4 = lVar4 + 1;
      if (lVar2 != 0) {
        lVar2 = *(longlong *)(lVar2 + 0x10);
      }
    } while (lVar4 < param_3);
  }
  FUN_140156be0(uVar1);
  return iVar3;
}



undefined8 FUN_14015fad0(longlong param_1,uint param_2,undefined8 param_3)

{
  uint uVar1;
  uint *puVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  undefined1 uVar7;
  
  uVar5 = 0xfffffffffffffffe;
  uVar4 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  uVar6 = uVar4;
  FUN_140156b50(uVar4);
  uVar7 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))(param_1 + -0xa8);
  }
  uVar1 = *(uint *)(param_1 + 0xbf8);
  uVar3 = (ulonglong)param_2 % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0xbd8) != 0) {
    puVar2 = *(uint **)(*(longlong *)(param_1 + 0xbd8) + uVar3 * 8);
    while( true ) {
      if ((puVar2 == (uint *)0x0) || ((uint)uVar3 != puVar2[8] % uVar1)) goto LAB_14015fbaa;
      if (*puVar2 == param_2) break;
      puVar2 = *(uint **)(puVar2 + 4);
    }
    if (*(longlong *)(puVar2 + 2) != 0) {
      FUN_14019d0e0(*(longlong *)(puVar2 + 2),param_3,uVar3,(ulonglong)uVar1,uVar5,uVar6,uVar7);
      FUN_140156be0(uVar4);
      return 1;
    }
  }
LAB_14015fbaa:
  FUN_140156be0(uVar4);
  return 0;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x0001401600bb)
// WARNING: Removing unreachable block (ram,0x00014015ff5f)
// WARNING: Removing unreachable block (ram,0x00014016021b)

void FUN_14015fbd0(longlong *param_1)

{
  ulonglong uVar1;
  code *pcVar2;
  undefined8 uVar3;
  longlong lVar4;
  undefined8 uVar5;
  longlong lVar6;
  ulonglong uVar7;
  undefined4 *puVar8;
  longlong *plVar9;
  longlong lVar10;
  undefined1 *puVar11;
  undefined1 *puVar12;
  undefined1 *puVar13;
  undefined1 *puVar14;
  int iVar15;
  longlong lVar16;
  undefined8 *puVar17;
  longlong *plVar18;
  undefined8 uVar19;
  undefined1 auStack_a8 [32];
  undefined8 local_88;
  char local_80;
  longlong *local_78;
  undefined8 local_70;
  undefined1 local_68;
  longlong local_60;
  longlong local_58;
  undefined8 local_50;
  ulonglong local_48;
  
  puVar11 = auStack_a8;
  puVar14 = auStack_a8;
  local_50 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)&local_88;
  uVar5 = (**(code **)(*param_1 + 0x58))();
  local_70 = uVar5;
  FUN_140156b50(uVar5);
  local_68 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::TcpAndUdp_DoForLongInterval");
  }
  lVar6 = (longlong)(int)param_1[0xdc];
  puVar17 = (undefined8 *)0x0;
  if (0 < (int)param_1[0xdc]) {
    uVar1 = lVar6 * 8 + 0x10;
    if (uVar1 < 0x401) {
      uVar7 = lVar6 * 8 + 0x1f;
      if (uVar7 <= uVar1) {
        uVar7 = 0xffffffffffffff0;
      }
      lVar10 = -(uVar7 & 0xfffffffffffffff0);
      puVar11 = auStack_a8 + lVar10;
      puVar8 = (undefined4 *)((longlong)&local_88 + lVar10);
      puVar17 = (undefined8 *)0x0;
      puVar14 = auStack_a8 + lVar10;
      if (puVar8 != (undefined4 *)0x0) {
        *puVar8 = 0xcccc;
LAB_14015fcbe:
        puVar17 = (undefined8 *)(puVar8 + 4);
        puVar14 = puVar11;
      }
    }
    else {
      puVar8 = malloc(uVar1);
      puVar17 = (undefined8 *)0x0;
      puVar14 = auStack_a8;
      if (puVar8 != (undefined4 *)0x0) {
        *puVar8 = 0xdddd;
        goto LAB_14015fcbe;
      }
    }
    iVar15 = 0;
    lVar10 = 0;
    uVar5 = local_70;
    if (0 < lVar6) {
      do {
        if ((lVar10 < 0) || ((int)param_1[0xdc] <= iVar15)) {
                    // WARNING: Subroutine does not return
          *(undefined **)(puVar14 + -8) = &UNK_14015fd0f;
          FUN_1401566e0();
        }
        plVar18 = *(longlong **)(param_1[0xdb] + lVar10 * 8);
        lVar16 = 0;
        if (plVar18 != (longlong *)0x0) {
          lVar16 = *plVar18;
        }
        *(undefined8 *)(puVar14 + -8) = 0x14015fcfa;
        FUN_1401a37c0(lVar16 + 0x40);
        puVar17[lVar10] = lVar16;
        iVar15 = iVar15 + 1;
        lVar10 = lVar10 + 1;
        uVar5 = local_70;
      } while (lVar10 < lVar6);
    }
  }
  local_58 = param_1[0x193];
  plVar18 = (longlong *)0x0;
  if (0 < (int)local_58) {
    lVar10 = (longlong)(int)local_58 * 8;
    uVar1 = lVar10 + 0x10;
    if (uVar1 < 0x401) {
      uVar7 = lVar10 + 0x1f;
      if (uVar7 <= uVar1) {
        uVar7 = 0xffffffffffffff0;
      }
      *(undefined8 *)(puVar14 + -8) = 0x14015fd5c;
      lVar10 = -(uVar7 & 0xfffffffffffffff0);
      puVar12 = puVar14 + lVar10;
      puVar8 = (undefined4 *)(puVar14 + lVar10 + 0x20);
      plVar18 = (longlong *)0x0;
      puVar14 = puVar14 + lVar10;
      if (puVar8 != (undefined4 *)0x0) {
        *puVar8 = 0xcccc;
        puVar14 = puVar12;
LAB_14015fd86:
        plVar18 = (longlong *)(puVar8 + 4);
      }
    }
    else {
      *(undefined8 *)(puVar14 + -8) = 0x14015fd78;
      puVar8 = malloc(uVar1);
      plVar18 = (longlong *)0x0;
      if (puVar8 != (undefined4 *)0x0) {
        *puVar8 = 0xdddd;
        goto LAB_14015fd86;
      }
    }
    plVar9 = plVar18;
    if (param_1[0x193] == 0) {
      lVar10 = 0;
    }
    else {
      lVar10 = param_1[0x191];
    }
    for (; uVar5 = local_70, lVar10 != 0; lVar10 = *(longlong *)(lVar10 + 0x10)) {
      lVar16 = *(longlong *)(lVar10 + 8);
      *(undefined8 *)(puVar14 + -8) = 0x14015fdb7;
      FUN_1401a37c0(lVar16 + 0xc0);
      *plVar9 = lVar16;
      plVar9 = plVar9 + 1;
    }
  }
  local_60 = param_1[0x2e1];
  local_78 = (longlong *)0x0;
  if ((int)local_60 < 1) goto LAB_14015fe86;
  lVar10 = (longlong)(int)local_60 * 8;
  uVar1 = lVar10 + 0x10;
  if (uVar1 < 0x401) {
    uVar7 = lVar10 + 0x1f;
    if (uVar7 <= uVar1) {
      uVar7 = 0xffffffffffffff0;
    }
    *(undefined8 *)(puVar14 + -8) = 0x14015fe11;
    lVar10 = -(uVar7 & 0xfffffffffffffff0);
    puVar13 = puVar14 + lVar10;
    plVar9 = (longlong *)(puVar14 + lVar10 + 0x20);
    puVar14 = puVar14 + lVar10;
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      *(undefined4 *)plVar9 = 0xcccc;
      puVar14 = puVar13;
LAB_14015fe3f:
      local_78 = plVar9 + 2;
    }
  }
  else {
    *(undefined8 *)(puVar14 + -8) = 0x14015fe30;
    plVar9 = malloc(uVar1);
    local_78 = plVar9;
    if (plVar9 != (longlong *)0x0) {
      *(undefined4 *)plVar9 = 0xdddd;
      goto LAB_14015fe3f;
    }
  }
  plVar9 = local_78;
  if (param_1[0x2e1] == 0) {
    lVar10 = 0;
  }
  else {
    lVar10 = param_1[0x2df];
  }
  for (; uVar5 = local_70, lVar10 != 0; lVar10 = *(longlong *)(lVar10 + 0x18)) {
    lVar16 = *(longlong *)(lVar10 + 0x10);
    *(undefined8 *)(puVar14 + -8) = 0x14015fe75;
    FUN_1401a37c0(lVar16 + 0xc0);
    *plVar9 = lVar16;
    plVar9 = plVar9 + 1;
  }
LAB_14015fe86:
  pcVar2 = *(code **)(param_1[0x23] + 8);
  *(undefined8 *)(puVar14 + -8) = 0x14015fe93;
  uVar19 = (*pcVar2)();
  *(undefined8 *)(puVar14 + -8) = 0x14015fe9f;
  FUN_140156be0(uVar5);
  local_68 = 0;
  if (puVar17 != (undefined8 *)0x0) {
    while ((0 < lVar6 && (lVar10 = 0, 0 < lVar6))) {
      do {
        lVar16 = puVar17[lVar10];
        pcVar2 = *(code **)(*(longlong *)(lVar16 + 0x88) + 0x10);
        *(undefined8 *)(puVar14 + -8) = 0x14015fed1;
        uVar5 = (*pcVar2)();
        local_80 = 0;
        local_88 = uVar5;
        if (lVar10 == 0) {
          local_80 = 1;
          *(undefined8 *)(puVar14 + -8) = 0x14015ff2b;
          FUN_140156b50(uVar5);
          *(undefined8 *)(puVar14 + -8) = 0x14015ff37;
          FUN_1401a3b30(lVar16,uVar19);
          *(undefined8 *)(puVar14 + -8) = 0x14015ff3f;
          FUN_140156be0(uVar5);
          local_80 = '\0';
          *(undefined8 *)(puVar14 + -8) = 0x14015ff4f;
          FUN_1401a37d0(lVar16 + 0x40);
          *puVar17 = puVar17[lVar6 + -1];
LAB_14015ff57:
          lVar6 = lVar6 + -1;
        }
        else {
          *(undefined8 *)(puVar14 + -8) = 0x14015fee9;
          local_80 = FUN_140156ba0();
          if (local_80 != '\0') {
            *(undefined8 *)(puVar14 + -8) = 0x14015feff;
            FUN_1401a3b30(lVar16,uVar19);
            *(undefined8 *)(puVar14 + -8) = 0x14015ff07;
            FUN_140156be0(uVar5);
            local_80 = '\0';
            *(undefined8 *)(puVar14 + -8) = 0x14015ff17;
            FUN_1401a37d0(lVar16 + 0x40);
            puVar17[lVar10] = puVar17[lVar6 + -1];
            goto LAB_14015ff57;
          }
        }
        lVar10 = lVar10 + 1;
      } while (lVar10 < lVar6);
    }
    if (*(int *)(puVar17 + -2) == 0xdddd) {
      *(undefined8 *)(puVar14 + -8) = 0x14015ff92;
      free(puVar17 + -2);
    }
  }
  if (plVar18 != (longlong *)0x0) {
    lVar6 = (longlong)(int)local_58;
    while ((0 < lVar6 && (lVar10 = 0, 0 < lVar6))) {
      do {
        lVar16 = plVar18[lVar10];
        pcVar2 = *(code **)(*(longlong *)(lVar16 + 0x108) + 0x10);
        *(undefined8 *)(puVar14 + -8) = 0x14015ffd2;
        uVar5 = (*pcVar2)();
        local_80 = 0;
        local_88 = uVar5;
        if (lVar10 == 0) {
          local_80 = 1;
          *(undefined8 *)(puVar14 + -8) = 0x14016005c;
          FUN_140156b50(uVar5);
          uVar3 = *(undefined8 *)(lVar16 + 0x748);
          *(undefined8 *)(puVar14 + -8) = 0x14016006d;
          FUN_1401a3240(uVar3,uVar19);
          if ((*(longlong **)(lVar16 + 0x760) != (longlong *)0x0) &&
             (lVar4 = **(longlong **)(lVar16 + 0x760), lVar4 != 0)) {
            uVar3 = *(undefined8 *)(lVar4 + 0x168);
            *(undefined8 *)(puVar14 + -8) = 0x140160092;
            FUN_1401a0b70(uVar3,uVar19);
          }
          *(undefined8 *)(puVar14 + -8) = 0x14016009a;
          FUN_140156be0(uVar5);
          local_80 = '\0';
          *(undefined8 *)(puVar14 + -8) = 0x1401600ac;
          FUN_1401a37d0(lVar16 + 0xc0);
          *plVar18 = plVar18[lVar6 + -1];
LAB_1401600b4:
          lVar6 = lVar6 + -1;
        }
        else {
          *(undefined8 *)(puVar14 + -8) = 0x14015ffea;
          local_80 = FUN_140156ba0();
          if (local_80 != '\0') {
            uVar3 = *(undefined8 *)(lVar16 + 0x748);
            *(undefined8 *)(puVar14 + -8) = 0x140160009;
            FUN_1401a3240(uVar3,uVar19);
            if ((*(longlong **)(lVar16 + 0x760) != (longlong *)0x0) &&
               (lVar4 = **(longlong **)(lVar16 + 0x760), lVar4 != 0)) {
              uVar3 = *(undefined8 *)(lVar4 + 0x168);
              *(undefined8 *)(puVar14 + -8) = 0x14016002e;
              FUN_1401a0b70(uVar3,uVar19);
            }
            *(undefined8 *)(puVar14 + -8) = 0x140160036;
            FUN_140156be0(uVar5);
            local_80 = '\0';
            *(undefined8 *)(puVar14 + -8) = 0x140160048;
            FUN_1401a37d0(lVar16 + 0xc0);
            plVar18[lVar10] = plVar18[lVar6 + -1];
            goto LAB_1401600b4;
          }
        }
        lVar10 = lVar10 + 1;
      } while (lVar10 < lVar6);
    }
    if ((int)plVar18[-2] == 0xdddd) {
      *(undefined8 *)(puVar14 + -8) = 0x1401600ee;
      free(plVar18 + -2);
    }
  }
  plVar18 = local_78;
  if (local_78 != (longlong *)0x0) {
    lVar6 = (longlong)(int)local_60;
    while ((0 < lVar6 && (lVar10 = 0, 0 < lVar6))) {
      do {
        lVar16 = plVar18[lVar10];
        pcVar2 = *(code **)(*(longlong *)(lVar16 + 0x108) + 0x10);
        *(undefined8 *)(puVar14 + -8) = 0x140160132;
        uVar5 = (*pcVar2)();
        local_80 = 0;
        local_88 = uVar5;
        if (lVar10 == 0) {
          local_80 = 1;
          *(undefined8 *)(puVar14 + -8) = 0x1401601bc;
          FUN_140156b50(uVar5);
          uVar3 = *(undefined8 *)(lVar16 + 0x748);
          *(undefined8 *)(puVar14 + -8) = 0x1401601cd;
          FUN_1401a3240(uVar3,uVar19);
          if ((*(longlong **)(lVar16 + 0x760) != (longlong *)0x0) &&
             (lVar4 = **(longlong **)(lVar16 + 0x760), lVar4 != 0)) {
            uVar3 = *(undefined8 *)(lVar4 + 0x168);
            *(undefined8 *)(puVar14 + -8) = 0x1401601f2;
            FUN_1401a0b70(uVar3,uVar19);
          }
          *(undefined8 *)(puVar14 + -8) = 0x1401601fa;
          FUN_140156be0(uVar5);
          local_80 = '\0';
          *(undefined8 *)(puVar14 + -8) = 0x14016020c;
          FUN_1401a37d0(lVar16 + 0xc0);
          *plVar18 = plVar18[lVar6 + -1];
LAB_140160214:
          lVar6 = lVar6 + -1;
        }
        else {
          *(undefined8 *)(puVar14 + -8) = 0x14016014a;
          local_80 = FUN_140156ba0();
          if (local_80 != '\0') {
            uVar3 = *(undefined8 *)(lVar16 + 0x748);
            *(undefined8 *)(puVar14 + -8) = 0x140160169;
            FUN_1401a3240(uVar3,uVar19);
            if ((*(longlong **)(lVar16 + 0x760) != (longlong *)0x0) &&
               (lVar4 = **(longlong **)(lVar16 + 0x760), lVar4 != 0)) {
              uVar3 = *(undefined8 *)(lVar4 + 0x168);
              *(undefined8 *)(puVar14 + -8) = 0x14016018e;
              FUN_1401a0b70(uVar3,uVar19);
            }
            *(undefined8 *)(puVar14 + -8) = 0x140160196;
            FUN_140156be0(uVar5);
            local_80 = '\0';
            *(undefined8 *)(puVar14 + -8) = 0x1401601a8;
            FUN_1401a37d0(lVar16 + 0xc0);
            plVar18[lVar10] = plVar18[lVar6 + -1];
            goto LAB_140160214;
          }
        }
        lVar10 = lVar10 + 1;
      } while (lVar10 < lVar6);
    }
    if ((int)plVar18[-2] == 0xdddd) {
      *(undefined8 *)(puVar14 + -8) = 0x14016024e;
      free(plVar18 + -2);
    }
  }
  *(undefined8 *)(puVar14 + -8) = 0x14016025b;
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x000140160432)
// WARNING: Removing unreachable block (ram,0x000140160439)
// WARNING: Removing unreachable block (ram,0x000140160445)
// WARNING: Removing unreachable block (ram,0x000140160452)
// WARNING: Removing unreachable block (ram,0x00014016044a)
// WARNING: Removing unreachable block (ram,0x000140160459)
// WARNING: Removing unreachable block (ram,0x00014016046a)

undefined1
FUN_140160290(longlong *param_1,longlong *param_2,undefined4 param_3,longlong param_4,int param_5,
             undefined4 *param_6,undefined4 param_7,undefined8 param_8)

{
  int *piVar1;
  undefined *puVar2;
  undefined1 uVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  longlong lVar8;
  undefined *puVar9;
  longlong lVar10;
  uint uVar11;
  longlong lVar12;
  undefined1 auStack_178 [32];
  undefined8 local_158;
  undefined8 local_150;
  undefined1 local_148;
  longlong *local_140;
  longlong *local_138;
  undefined8 local_130;
  undefined8 local_128;
  undefined1 local_120;
  undefined *local_118;
  undefined1 local_110 [8];
  undefined4 local_108;
  undefined **local_100;
  longlong *local_f8;
  ulonglong local_f0;
  int local_e8;
  undefined4 local_d4;
  undefined4 local_d0;
  undefined4 local_cc;
  undefined4 local_c8;
  undefined4 local_c4;
  undefined **local_90;
  longlong *local_88;
  longlong local_80;
  ulonglong local_58;
  
  local_130 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_178;
  local_158 = param_8;
  local_140 = param_1;
  local_138 = param_2;
  FUN_1401a4960(&local_118);
  if (local_118 == (undefined *)0x0) {
    local_118 = PTR_DAT_1403200a0;
  }
  if ((undefined *)*param_2 != local_118) {
    uVar4 = FUN_1401568c0();
    local_128 = uVar4;
    FUN_140156b50(uVar4);
    puVar2 = local_118;
    local_120 = 1;
    if (((local_118 != (undefined *)0x0) && (local_118 != PTR_DAT_1403200a0)) &&
       (puVar9 = local_118 + -8, puVar9 != (undefined *)0x0)) {
      uVar5 = FUN_1401568c0();
      local_150 = uVar5;
      FUN_140156b50(uVar5);
      local_148 = 1;
      piVar1 = (int *)(puVar2 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar9);
      }
      FUN_140156be0(uVar5);
    }
    local_118 = (undefined *)*param_2;
    if (((local_118 != PTR_DAT_1403200a0) && (local_118 != (undefined *)0x0)) &&
       (local_118 != (undefined *)0x8)) {
      *(int *)(local_118 + -4) = *(int *)(local_118 + -4) + 1;
    }
    FUN_140156be0(uVar4);
  }
  local_108 = param_3;
  if (param_4 == 0) {
    uVar7 = 0;
    if (0 < param_5) {
      do {
        lVar12 = (longlong)local_e8;
        if (local_e8 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        FUN_14013c2c0(&local_100,local_e8 + 1);
        uVar6 = local_f0;
        if (local_e8 == 0) {
          uVar6 = 0;
        }
        *(undefined4 *)(uVar6 + lVar12 * 4) = 0;
        uVar11 = (int)uVar7 + 1;
        uVar7 = (ulonglong)uVar11;
      } while ((int)uVar11 < param_5);
    }
  }
  else {
    lVar12 = (longlong)param_5;
    if (param_5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (param_5 != 0) {
      lVar10 = (longlong)local_e8;
      FUN_14013c2c0(&local_100,local_e8 + param_5);
      if (0 < param_5) {
        lVar8 = lVar10 * 4;
        do {
          uVar7 = local_f0;
          if (local_e8 == 0) {
            uVar7 = 0;
          }
          *(undefined4 *)(lVar8 + uVar7) = *(undefined4 *)(param_4 + lVar10 * -4 + lVar8);
          lVar8 = lVar8 + 4;
          lVar12 = lVar12 + -1;
        } while (lVar12 != 0);
      }
    }
  }
  local_d4 = *param_6;
  local_d0 = param_6[1];
  local_cc = param_6[2];
  local_c8 = param_6[3];
  local_c4 = param_7;
  uVar3 = (**(code **)(*local_140 + 0x138))(local_140,&local_118,local_158);
  local_90 = Proud::CFastArray<int,0>::vftable;
  if (local_80 != 0) {
    if (local_88 == (longlong *)0x0) {
      FUN_140156970(local_80);
    }
    else {
      (**(code **)(*local_88 + 0x18))();
    }
  }
  local_100 = Proud::CFastArray<int,0>::vftable;
  if (local_f0 != 0) {
    if (local_f8 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*local_f8 + 0x18))(local_f8,local_f0);
    }
  }
  FUN_14004f990(local_110);
  puVar2 = local_118;
  if (((local_118 != (undefined *)0x0) && (local_118 != PTR_DAT_1403200a0)) &&
     (puVar9 = local_118 + -8, puVar9 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    local_150 = uVar4;
    FUN_140156b50(uVar4);
    local_148 = 1;
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar9);
    }
    FUN_140156be0(uVar4);
  }
  local_118 = PTR_DAT_1403200a0;
  FUN_14004f990(param_2);
  return uVar3;
}



void FUN_1401605c0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined4 *puVar3;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  uVar2 = uVar1;
  FUN_140156b50(uVar1);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::EnableLog",*(longlong *)(param_1 + -0xa8),
               param_4,uVar4,uVar2,1);
  }
  if (*(longlong *)(param_1 + 0x1748) == 0) {
    uVar2 = FUN_140197b80(param_2);
    *(undefined8 *)(param_1 + 0x1748) = uVar2;
    if (*(longlong *)(param_1 + 0xbf0) == 0) {
      puVar3 = (undefined4 *)0x0;
    }
    else {
      puVar3 = *(undefined4 **)(param_1 + 0xbe0);
    }
    for (; puVar3 != (undefined4 *)0x0; puVar3 = *(undefined4 **)(puVar3 + 4)) {
      if (*(longlong *)(*(longlong *)(puVar3 + 2) + 0x228) == 0) {
        (**(code **)(*(longlong *)(param_1 + 0x400) + 0xb0))
                  ((longlong *)(param_1 + 0x400),*puVar3,&DAT_140328530);
      }
    }
  }
  FUN_140156be0(uVar1);
  return;
}



void FUN_1401606b0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  undefined8 uVar2;
  undefined4 *puVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  
  uVar4 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  uVar5 = uVar2;
  FUN_140156b50(uVar2);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::DisableLog",*(longlong *)(param_1 + -0xa8),
               param_4,uVar4,uVar5,1);
  }
  pvVar1 = *(void **)(param_1 + 0x1748);
  if (pvVar1 != (void *)0x0) {
    FUN_140197a30(pvVar1);
    operator_delete(pvVar1);
  }
  puVar3 = (undefined4 *)0x0;
  *(undefined8 *)(param_1 + 0x1748) = 0;
  if (*(longlong *)(param_1 + 0xbf0) != 0) {
    puVar3 = *(undefined4 **)(param_1 + 0xbe0);
  }
  for (; puVar3 != (undefined4 *)0x0; puVar3 = *(undefined4 **)(puVar3 + 4)) {
    if (*(longlong *)(*(longlong *)(puVar3 + 2) + 0x228) == 0) {
      (**(code **)(*(longlong *)(param_1 + 0x400) + 0xc0))
                ((longlong *)(param_1 + 0x400),*puVar3,&DAT_140328530);
    }
  }
  FUN_140156be0(uVar2);
  return;
}



void FUN_1401607a0(longlong param_1,undefined8 *param_2)

{
  undefined8 uVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 local_20;
  undefined8 local_18;
  undefined4 local_10;
  
  uVar1 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar1);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::GetStats");
  }
  lVar4 = 0;
  local_20 = 0;
  local_58 = 0;
  local_60 = 0;
  local_48 = 0;
  local_50 = 0;
  local_28 = 0;
  local_30 = 0;
  local_38 = 0;
  local_40 = 0;
  local_18 = 0;
  local_10 = 0;
  memcpy(param_2,&local_60,0x58);
  *param_2 = *(undefined8 *)(param_1 + 0x458);
  param_2[1] = *(undefined8 *)(param_1 + 0x498);
  param_2[2] = *(undefined8 *)(param_1 + 0x4d8);
  param_2[3] = *(undefined8 *)(param_1 + 0x518);
  param_2[6] = *(undefined8 *)(param_1 + 0x558);
  param_2[7] = *(undefined8 *)(param_1 + 0x598);
  param_2[4] = *(undefined8 *)(param_1 + 0x618);
  param_2[5] = *(undefined8 *)(param_1 + 0x5d8);
  *(int *)(param_2 + 9) = (int)*(undefined8 *)(param_1 + 0xbf0);
  *(undefined4 *)((longlong)param_2 + 0x4c) = 0;
  *(undefined4 *)(param_2 + 10) = *(undefined4 *)(param_1 + 0x638);
  lVar2 = lVar4;
  if (*(longlong *)(param_1 + 0xbf0) != 0) {
    lVar2 = *(longlong *)(param_1 + 0xbe0);
  }
  for (; lVar2 != 0; lVar2 = *(longlong *)(lVar2 + 0x10)) {
    if (*(char *)(*(longlong *)(lVar2 + 8) + 0x700) != '\0') {
      *(int *)((longlong)param_2 + 0x4c) = *(int *)((longlong)param_2 + 0x4c) + 1;
    }
  }
  lVar2 = lVar4;
  if (*(longlong *)(param_1 + 0x250) != 0) {
    lVar2 = *(longlong *)(param_1 + 0x240);
  }
  for (; lVar2 != 0; lVar2 = *(longlong *)(lVar2 + 0x10)) {
    lVar3 = lVar4;
    if (*(longlong **)(lVar2 + 8) != (longlong *)0x0) {
      lVar3 = **(longlong **)(lVar2 + 8);
    }
    if ((*(char *)(lVar3 + 0x110) != '\0') &&
       (*(int *)(param_2 + 8) = *(int *)(param_2 + 8) + 1, *(char *)(lVar3 + 8) == '\0')) {
      *(int *)((longlong)param_2 + 0x44) = *(int *)((longlong)param_2 + 0x44) + 1;
    }
  }
  FUN_140156be0(uVar1);
  return;
}



void FUN_140160960(longlong param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  longlong lVar3;
  undefined8 uVar4;
  int iVar5;
  longlong lVar6;
  undefined1 local_60 [16];
  undefined1 local_50 [72];
  
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar2);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::GetUdpListenerLocalAddrs");
  }
  if (*(int *)(param_1 + 0x179c) == 1) {
    FUN_14015cc00(param_2,0);
    iVar5 = 0;
    lVar6 = 0;
    if (0 < *(int *)(param_1 + 0x638)) {
      do {
        if ((lVar6 < 0) || (*(int *)(param_1 + 0x638) <= iVar5)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x630) + lVar6 * 8);
        lVar3 = 0;
        if (plVar1 != (longlong *)0x0) {
          lVar3 = *plVar1;
        }
        if ((*(longlong **)(lVar3 + 0x150) != (longlong *)0x0) &&
           (**(longlong **)(lVar3 + 0x150) != 0)) {
          if (*(int *)(param_1 + 0x638) <= iVar5) {
                    // WARNING: Subroutine does not return
            FUN_1401566e0();
          }
          plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x630) + lVar6 * 8);
          lVar3 = 0;
          if (plVar1 != (longlong *)0x0) {
            lVar3 = *plVar1;
          }
          uVar4 = 0;
          if (*(undefined8 **)(lVar3 + 0x150) != (undefined8 *)0x0) {
            uVar4 = **(undefined8 **)(lVar3 + 0x150);
          }
          uVar4 = FUN_140184b60(uVar4,local_60);
          FUN_14015d1f0(param_2,*(undefined4 *)(param_2 + 0x18),uVar4,1);
        }
        iVar5 = iVar5 + 1;
        lVar6 = lVar6 + 1;
      } while (iVar5 < *(int *)(param_1 + 0x638));
    }
    FUN_140156be0(uVar2);
    return;
  }
  FUN_140156300(local_50,
                L"Cannot call GetUdpListenerLocalAddrs unless ServerUdpAssignMode_Static is used!");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
}



void FUN_140160ae0(longlong param_1,undefined8 *param_2,longlong *param_3)

{
  uint uVar1;
  undefined8 *puVar2;
  ulonglong uVar3;
  longlong lVar4;
  uint *puVar5;
  undefined **ppuVar6;
  undefined4 *puVar7;
  longlong lVar8;
  longlong lVar9;
  
  FUN_14015c5b0(param_2,param_3[1],0xffffffffffffffff);
  lVar4 = param_3[1];
  lVar9 = 0;
  if (0 < lVar4) {
    lVar8 = 0;
    do {
      if ((lVar9 < 0) || (lVar4 <= lVar9)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_3[2] < 0x65) {
        puVar7 = (undefined4 *)((longlong)param_3 + lVar9 * 4 + 0x20);
      }
      else {
        puVar7 = (undefined4 *)(*param_3 + lVar9 * 4);
      }
      if ((longlong)param_2[1] <= lVar9) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_2[2] < 0x65) {
        puVar2 = param_2 + 4;
      }
      else {
        puVar2 = (undefined8 *)*param_2;
      }
      *(undefined4 *)((longlong)puVar2 + lVar8) = *puVar7;
      if (param_3[1] <= lVar9) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_3[2] < 0x65) {
        puVar5 = (uint *)((longlong)param_3 + lVar9 * 4 + 0x20);
      }
      else {
        puVar5 = (uint *)(*param_3 + lVar9 * 4);
      }
      uVar1 = *puVar5;
      if (uVar1 == 1) {
        if (param_1 == 0) {
LAB_140160c10:
          ppuVar6 = (undefined **)0x0;
        }
        else {
          ppuVar6 = (undefined **)(param_1 + 0x70);
        }
      }
      else {
        if (uVar1 != 0) {
          uVar3 = (ulonglong)uVar1 % (ulonglong)*(uint *)(param_1 + 0xca0);
          if ((*(longlong *)(param_1 + 0xc80) != 0) &&
             (puVar5 = *(uint **)(*(longlong *)(param_1 + 0xc80) + uVar3 * 8), puVar5 != (uint *)0x0
             )) {
            while ((uint)uVar3 == puVar5[8] % *(uint *)(param_1 + 0xca0)) {
              if (*puVar5 == uVar1) {
                ppuVar6 = *(undefined ***)(puVar5 + 2);
                if ((ppuVar6 != (undefined **)0x0) && (ppuVar6[0x45] == (undefined *)0x0))
                goto LAB_140160c12;
                break;
              }
              puVar5 = *(uint **)(puVar5 + 4);
              if (puVar5 == (uint *)0x0) break;
            }
          }
          goto LAB_140160c10;
        }
        ppuVar6 = &PTR_vftable_140321570;
      }
LAB_140160c12:
      if ((longlong)param_2[1] <= lVar9) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_2[2] < 0x65) {
        puVar2 = param_2 + 4;
      }
      else {
        puVar2 = (undefined8 *)*param_2;
      }
      *(undefined ***)((longlong)puVar2 + lVar8 + 8) = ppuVar6;
      lVar4 = param_3[1];
      lVar9 = lVar9 + 1;
      lVar8 = lVar8 + 0x20;
    } while (lVar9 < lVar4);
  }
  return;
}



// WARNING: Type propagation algorithm not settling

bool FUN_140160c80(longlong *param_1,uint param_2,undefined2 *param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  uint *puVar4;
  
  uVar3 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar3);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1);
  }
  uVar2 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0x194);
  if ((param_1[400] != 0) && (puVar4 = *(uint **)(param_1[400] + uVar2 * 8), puVar4 != (uint *)0x0))
  {
    while ((uint)uVar2 == puVar4[8] % *(uint *)(param_1 + 0x194)) {
      if (*puVar4 == param_2) {
        lVar1 = *(longlong *)(puVar4 + 2);
        if ((lVar1 != 0) && (*(longlong *)(lVar1 + 0x228) == 0)) {
          *param_3 = *(undefined2 *)(lVar1 + 0x68a);
          *(short *)(lVar1 + 0x68a) = *(short *)(lVar1 + 0x68a) + 1;
          FUN_140156be0(uVar3);
          return true;
        }
        break;
      }
      puVar4 = *(uint **)(puVar4 + 4);
      if (puVar4 == (uint *)0x0) break;
    }
  }
  if (param_2 != 1) {
    FUN_140156be0(uVar3);
  }
  else {
    *param_3 = (short)param_1[0x188];
    *(short *)(param_1 + 0x188) = (short)param_1[0x188] + 1;
    FUN_140156be0(uVar3);
  }
  return param_2 == 1;
}



void FUN_140160da0(longlong *param_1,uint param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  uint *puVar4;
  
  uVar3 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar3);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1);
  }
  uVar2 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0x194);
  if ((param_1[400] != 0) && (puVar4 = *(uint **)(param_1[400] + uVar2 * 8), puVar4 != (uint *)0x0))
  {
    while ((uint)uVar2 == puVar4[8] % *(uint *)(param_1 + 0x194)) {
      if (*puVar4 == param_2) {
        lVar1 = *(longlong *)(puVar4 + 2);
        if ((lVar1 != 0) && (*(longlong *)(lVar1 + 0x228) == 0)) {
          *(short *)(lVar1 + 0x68a) = *(short *)(lVar1 + 0x68a) + -1;
          goto LAB_140160e6e;
        }
        break;
      }
      puVar4 = *(uint **)(puVar4 + 4);
      if (puVar4 == (uint *)0x0) break;
    }
  }
  if (param_2 == 1) {
    *(short *)(param_1 + 0x188) = (short)param_1[0x188] + -1;
  }
LAB_140160e6e:
  FUN_140156be0(uVar3);
  return;
}



// WARNING: Type propagation algorithm not settling

bool FUN_140160e90(longlong *param_1,uint param_2,undefined2 *param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  uint *puVar4;
  
  uVar3 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar3);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1);
  }
  uVar2 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0x194);
  if ((param_1[400] != 0) && (puVar4 = *(uint **)(param_1[400] + uVar2 * 8), puVar4 != (uint *)0x0))
  {
    while ((uint)uVar2 == puVar4[8] % *(uint *)(param_1 + 0x194)) {
      if (*puVar4 == param_2) {
        lVar1 = *(longlong *)(puVar4 + 2);
        if ((lVar1 != 0) && (*(longlong *)(lVar1 + 0x228) == 0)) {
          *param_3 = *(undefined2 *)(lVar1 + 0x68c);
          FUN_140156be0(uVar3);
          return true;
        }
        break;
      }
      puVar4 = *(uint **)(puVar4 + 4);
      if (puVar4 == (uint *)0x0) break;
    }
  }
  if (param_2 != 1) {
    FUN_140156be0(uVar3);
  }
  else {
    *param_3 = *(undefined2 *)((longlong)param_1 + 0xc42);
    FUN_140156be0(uVar3);
  }
  return param_2 == 1;
}



// WARNING: Type propagation algorithm not settling

bool FUN_140160fb0(longlong *param_1,uint param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  uint *puVar4;
  
  uVar3 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar3);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1);
  }
  uVar2 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0x194);
  if ((param_1[400] != 0) && (puVar4 = *(uint **)(param_1[400] + uVar2 * 8), puVar4 != (uint *)0x0))
  {
    while ((uint)uVar2 == puVar4[8] % *(uint *)(param_1 + 0x194)) {
      if (*puVar4 == param_2) {
        lVar1 = *(longlong *)(puVar4 + 2);
        if ((lVar1 != 0) && (*(longlong *)(lVar1 + 0x228) == 0)) {
          *(short *)(lVar1 + 0x68c) = *(short *)(lVar1 + 0x68c) + 1;
          FUN_140156be0(uVar3);
          return true;
        }
        break;
      }
      puVar4 = *(uint **)(puVar4 + 4);
      if (puVar4 == (uint *)0x0) break;
    }
  }
  if (param_2 != 1) {
    FUN_140156be0(uVar3);
  }
  else {
    *(short *)((longlong)param_1 + 0xc42) = *(short *)((longlong)param_1 + 0xc42) + 1;
    FUN_140156be0(uVar3);
  }
  return param_2 == 1;
}



undefined8 FUN_1401610b0(longlong param_1,uint param_2)

{
  ulonglong uVar1;
  undefined8 uVar2;
  uint *puVar3;
  
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar2);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))(param_1 + -0xa8);
  }
  uVar1 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0xbf8);
  if ((*(longlong *)(param_1 + 0xbd8) != 0) &&
     (puVar3 = *(uint **)(*(longlong *)(param_1 + 0xbd8) + uVar1 * 8), puVar3 != (uint *)0x0)) {
    while ((uint)uVar1 == puVar3[8] % *(uint *)(param_1 + 0xbf8)) {
      if (*puVar3 == param_2) {
        if ((*(longlong *)(puVar3 + 2) != 0) &&
           (*(longlong *)(*(longlong *)(puVar3 + 2) + 0x228) == 0)) {
          FUN_140156be0(uVar2);
          return 1;
        }
        break;
      }
      puVar3 = *(uint **)(puVar3 + 4);
      if (puVar3 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar2);
  return 0;
}



undefined8 FUN_1401611b0(longlong param_1,uint param_2,char param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  undefined1 *puVar4;
  uint *puVar5;
  undefined1 local_res10 [8];
  undefined8 uVar6;
  undefined8 uVar7;
  undefined1 uVar8;
  
  uVar6 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  uVar7 = uVar3;
  FUN_140156b50(uVar3);
  uVar8 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))(param_1 + -0xa8);
  }
  uVar2 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0xbf8);
  if ((*(longlong *)(param_1 + 0xbd8) != 0) &&
     (puVar5 = *(uint **)(*(longlong *)(param_1 + 0xbd8) + uVar2 * 8), puVar5 != (uint *)0x0)) {
    while ((uint)uVar2 == puVar5[8] % *(uint *)(param_1 + 0xbf8)) {
      if (*puVar5 == param_2) {
        lVar1 = *(longlong *)(puVar5 + 2);
        if ((lVar1 != 0) && (*(longlong *)(lVar1 + 0x228) == 0)) {
          if (param_3 == '\0') {
            if (*(longlong *)(lVar1 + 0x750) == 0) goto LAB_14016132e;
            if (*(void **)(lVar1 + 0x750) != (void *)0x0) {
              operator_delete(*(void **)(lVar1 + 0x750));
            }
            *(undefined8 *)(lVar1 + 0x750) = 0;
            local_res10[0] = 0;
          }
          else {
            if (*(longlong *)(lVar1 + 0x750) != 0) goto LAB_14016132e;
            puVar4 = operator_new(0x20);
            if (puVar4 != (undefined1 *)0x0) {
              *(undefined8 *)(puVar4 + 0x18) = 0x3fe2e147ae147ae1;
              *(undefined8 *)(puVar4 + 0x10) = 0;
              *(undefined8 *)(puVar4 + 8) = 0;
              *puVar4 = 0;
            }
            *(undefined1 **)(lVar1 + 0x750) = puVar4;
            local_res10[0] = 1;
          }
          (**(code **)(*(longlong *)(param_1 + 0x400) + 0xe0))
                    ((longlong *)(param_1 + 0x400),(ulonglong)param_2,&DAT_140328530,local_res10,
                     uVar6,uVar7,uVar8);
LAB_14016132e:
          FUN_140156be0(uVar3);
          return 1;
        }
        break;
      }
      puVar5 = *(uint **)(puVar5 + 4);
      if (puVar5 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar3);
  return 0;
}



void FUN_140161360(longlong param_1,uint param_2,int param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  int iVar3;
  undefined8 uVar4;
  uint *puVar5;
  
  uVar4 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar4);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))(param_1 + -0xa8);
  }
  uVar2 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0xbf8);
  if ((*(longlong *)(param_1 + 0xbd8) != 0) &&
     (puVar5 = *(uint **)(*(longlong *)(param_1 + 0xbd8) + uVar2 * 8), puVar5 != (uint *)0x0)) {
    while ((uint)uVar2 == puVar5[8] % *(uint *)(param_1 + 0xbf8)) {
      if (*puVar5 == param_2) {
        lVar1 = *(longlong *)(puVar5 + 2);
        if ((lVar1 != 0) && (*(longlong *)(lVar1 + 0x228) == 0)) {
          iVar3 = 0;
          if (0 < param_3) {
            iVar3 = param_3;
          }
          *(double *)(lVar1 + 0x1a8) = (double)iVar3;
        }
        break;
      }
      puVar5 = *(uint **)(puVar5 + 4);
      if (puVar5 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar4);
  return;
}



undefined4 FUN_140161470(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  int *piVar2;
  undefined **local_40;
  longlong *local_38;
  int *local_30;
  undefined8 local_28;
  undefined8 local_20;
  
  local_40 = Proud::CFastArray<>::vftable;
  local_38 = (longlong *)0x0;
  local_30 = (int *)0x0;
  local_28 = 0;
  local_20 = 0;
  if ((int)param_4 != 0) {
    FUN_14013c2c0(&local_40,1,param_3,param_4,0xfffffffffffffffe);
    piVar2 = local_30;
    if ((int)local_28 == 0) {
      piVar2 = (int *)0x0;
    }
    *piVar2 = (int)param_4;
  }
  uVar1 = (**(code **)(*param_1 + 0x1d0))(param_1,param_2,param_3,&local_40);
  local_40 = Proud::CFastArray<>::vftable;
  if (local_30 != (int *)0x0) {
    if (local_38 == (longlong *)0x0) {
      FUN_140156970(local_30);
    }
    else {
      (**(code **)(*local_38 + 0x18))(local_38,local_30);
    }
  }
  return uVar1;
}



void FUN_140161550(longlong param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  longlong lVar3;
  undefined8 uVar4;
  int iVar5;
  longlong lVar6;
  undefined1 local_60 [16];
  undefined1 local_50 [72];
  
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar2);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::GetUdpSocketAddrList");
  }
  if (*(int *)(param_1 + 0x179c) == 1) {
    FUN_14015cc00(param_2,0);
    iVar5 = 0;
    lVar6 = 0;
    if (0 < *(int *)(param_1 + 0x638)) {
      do {
        if ((lVar6 < 0) || (*(int *)(param_1 + 0x638) <= iVar5)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x630) + lVar6 * 8);
        lVar3 = 0;
        if (plVar1 != (longlong *)0x0) {
          lVar3 = *plVar1;
        }
        uVar4 = 0;
        if (*(undefined8 **)(lVar3 + 0x150) != (undefined8 *)0x0) {
          uVar4 = **(undefined8 **)(lVar3 + 0x150);
        }
        uVar4 = FUN_140184b60(uVar4,local_60);
        FUN_14015d1f0(param_2,*(undefined4 *)(param_2 + 0x18),uVar4,1);
        iVar5 = iVar5 + 1;
        lVar6 = lVar6 + 1;
      } while (iVar5 < *(int *)(param_1 + 0x638));
    }
    FUN_140156be0(uVar2);
    return;
  }
  FUN_140156300(local_50,
                L"Cannot call GetUdpSocketAddrList unless ServerUdpAssignMode_Static is used!");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
}



ulonglong FUN_1401616a0(longlong param_1,ulonglong param_2)

{
  uint uVar1;
  ulonglong *puVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  uVar1 = *(uint *)(param_1 + 0x2a8);
  uVar4 = (param_2 & 0xffffffff) / (ulonglong)uVar1;
  uVar3 = (param_2 & 0xffffffff) % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x288) != 0) {
    puVar2 = *(ulonglong **)(*(longlong *)(param_1 + 0x288) + uVar3 * 8);
    uVar4 = uVar3;
    while ((puVar2 != (ulonglong *)0x0 &&
           (uVar4 = (ulonglong)(uint)puVar2[4] / (ulonglong)uVar1,
           (uint)uVar3 == (uint)puVar2[4] % uVar1))) {
      if (*puVar2 == param_2) {
        return CONCAT71((int7)(uVar4 >> 8),1);
      }
      puVar2 = (ulonglong *)puVar2[2];
    }
  }
  return uVar4 & 0xffffffffffffff00;
}



longlong FUN_140161700(longlong param_1,uint param_2)

{
  longlong *plVar1;
  uint *puVar2;
  ulonglong uVar3;
  
  plVar1 = (longlong *)(param_1 + -0x120);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*plVar1 + 200))(plVar1);
  }
  if (param_2 == 1) {
    if (plVar1 != (longlong *)0x0) {
      return param_1 + -0xa8;
    }
  }
  else {
    uVar3 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0xb80);
    if (*(longlong *)(param_1 + 0xb60) != 0) {
      puVar2 = *(uint **)(*(longlong *)(param_1 + 0xb60) + uVar3 * 8);
      while( true ) {
        if (puVar2 == (uint *)0x0) {
          return 0;
        }
        if ((uint)uVar3 != puVar2[8] % *(uint *)(param_1 + 0xb80)) {
          return 0;
        }
        if (*puVar2 == param_2) break;
        puVar2 = *(uint **)(puVar2 + 4);
      }
      if (*(longlong *)(puVar2 + 2) != 0) {
        return *(longlong *)(puVar2 + 2) + 8;
      }
    }
  }
  return 0;
}



void FUN_1401617d0(void)

{
  FUN_14015e850();
  return;
}



void FUN_1401617f0(longlong *param_1)

{
  longlong lVar1;
  
  if (*param_1 != 0) {
    *(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1;
    if (*(longlong *)(*param_1 + 8) == 0) {
      param_1 = (longlong *)*param_1;
      lVar1 = *param_1;
      if (lVar1 != 0) {
        FUN_1401859b0(lVar1);
        FUN_140156970(lVar1);
      }
      FUN_140156970(param_1);
    }
  }
  return;
}



void FUN_140161860(longlong *param_1)

{
  if (*param_1 != 0) {
    *(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1;
    if (*(longlong *)(*param_1 + 8) == 0) {
      FUN_14015ebb0(*param_1);
    }
  }
  return;
}



longlong * FUN_1401618a0(longlong *param_1,longlong *param_2,longlong param_3)

{
  longlong lVar1;
  
  if (param_3 != 0) {
    FUN_140183b90(param_3);
    param_1[1] = (longlong)param_2;
    lVar1 = (**(code **)(*param_2 + 8))(param_2,0x10);
    *param_1 = lVar1;
    *(undefined8 *)(lVar1 + 8) = 1;
    *(longlong *)*param_1 = param_3;
    return param_1;
  }
  param_1[1] = (longlong)param_2;
  *param_1 = 0;
  return param_1;
}



void FUN_140161920(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  if (lVar1 != 0) {
    FUN_140156b50(lVar1);
    *(longlong *)(*param_1 + 0x40) = *(longlong *)(*param_1 + 0x40) + -1;
    if (*(longlong *)(*param_1 + 0x40) == 0) {
      FUN_140156be0(lVar1);
      FUN_14015ec10(*param_1);
    }
    else {
      FUN_140156be0(lVar1);
    }
  }
  return;
}



undefined8 FUN_1401619a0(longlong param_1,longlong param_2,undefined1 param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  
  uVar2 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8)) %
          (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (lVar1 = *(longlong *)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (lVar1 != 0 && ((uint)uVar2 == *(uint *)(lVar1 + 0x28) % *(uint *)(param_1 + 0x28)));
        lVar1 = *(longlong *)(lVar1 + 0x18)) {
      if ((*(uint *)(lVar1 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar1 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        FUN_14015eab0(param_1,lVar1,param_3);
        return 1;
      }
    }
  }
  return 0;
}



void FUN_140161a30(void)

{
  FUN_14015e980();
  return;
}



void FUN_140161a50(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *param_2;
  if (lVar1 != *param_1) {
    if (lVar1 != 0) {
      *(longlong *)(*param_2 + 8) = *(longlong *)(lVar1 + 8) + 1;
    }
    plVar2 = (longlong *)0x0;
    if ((*param_1 != 0) &&
       (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
       *(longlong *)(*param_1 + 8) == 0)) {
      plVar2 = (longlong *)*param_1;
    }
    *param_1 = *param_2;
    if (plVar2 != (longlong *)0x0) {
      lVar1 = *plVar2;
      if (lVar1 != 0) {
        FUN_1401859b0(lVar1);
        FUN_140156970(lVar1);
      }
      FUN_140156970(plVar2);
    }
  }
  return;
}



void FUN_140161ae0(longlong param_1,longlong *param_2)

{
  undefined8 *puVar1;
  longlong *plVar2;
  
  puVar1 = (undefined8 *)*param_2;
  plVar2 = *(longlong **)(param_1 + 8);
  *puVar1 = Proud::CFastArray<>::vftable;
  if (puVar1[2] != 0) {
    if ((longlong *)puVar1[1] == (longlong *)0x0) {
      FUN_140156970(puVar1[2]);
    }
    else {
      (**(code **)(*(longlong *)puVar1[1] + 0x18))();
    }
  }
  (**(code **)(*plVar2 + 0x18))(plVar2,puVar1);
                    // WARNING: Could not recover jumptable at 0x000140161b58. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(**(longlong **)(param_1 + 8) + 0x18))(*(longlong **)(param_1 + 8),param_2);
  return;
}



// WARNING: Removing unreachable block (ram,0x000140161c56)
// WARNING: Removing unreachable block (ram,0x000140161c64)

void FUN_140161b60(ulonglong *param_1,ulonglong *param_2)

{
  longlong *plVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  uVar3 = *param_2;
  uVar4 = *param_1;
  if (uVar4 != uVar3) {
    uVar2 = uVar4;
    if (uVar3 < uVar4) {
      uVar2 = uVar3;
      uVar3 = uVar4;
    }
    if (uVar2 != 0) {
      FUN_140156b50(uVar2);
    }
    if (uVar3 != 0) {
      FUN_140156b50(uVar3);
    }
    if (*param_2 != 0) {
      plVar1 = (longlong *)(*param_2 + 0x40);
      *plVar1 = *plVar1 + 1;
    }
    uVar4 = 0;
    if (*param_1 != 0) {
      plVar1 = (longlong *)(*param_1 + 0x40);
      *plVar1 = *plVar1 + -1;
      if (*(longlong *)(*param_1 + 0x40) == 0) {
        uVar4 = *param_1;
      }
    }
    *param_1 = *param_2;
    if (uVar2 != 0) {
      FUN_140156be0(uVar2);
    }
    if (uVar3 != 0) {
      FUN_140156be0(uVar3);
    }
    if (uVar4 != 0) {
      FUN_14015ec10(uVar4);
    }
  }
  return;
}



undefined8 FUN_140161c90(longlong param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4)

{
  char cVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 8) == 0) {
    cVar1 = FUN_1401a8bb0(param_1,*(undefined4 *)(param_1 + 0x28),1);
    if (cVar1 == '\0') {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  FUN_14015ce40(param_1);
  uVar2 = FUN_14015ec60(param_1,param_2,param_3,param_4);
  FUN_14015ce40(param_1);
  return uVar2;
}



undefined8 * FUN_140161d10(undefined8 *param_1,undefined8 param_2,undefined8 param_3)

{
  FUN_1401568c0();
  *param_1 = PTR_DAT_1403200a0;
  FUN_14004f4f0(param_1,param_2);
  FUN_14004cc50(param_1,param_3);
  return param_1;
}



void FUN_140161d80(longlong param_1,uint param_2,uint param_3)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  uint uVar9;
  longlong *plVar11;
  longlong lVar12;
  double dVar13;
  double dVar14;
  uint local_res10;
  uint local_res18;
  ulonglong local_res20;
  ulonglong local_28;
  uint uVar10;
  
  uVar7 = (ulonglong)(int)param_3;
  local_28 = (ulonglong)(int)param_2;
  local_res10 = param_2;
  local_res18 = param_3;
  local_res20 = uVar7;
  if ((int)param_3 < (int)param_2) {
    do {
      lVar12 = (longlong)(int)uVar7;
      uVar7 = local_28;
      uVar9 = local_res10;
      while( true ) {
        plVar11 = (longlong *)(param_1 + 8 + lVar12 * 0x18);
        while( true ) {
          lVar1 = *plVar11;
          lVar2 = plVar11[-1];
          if ((*(int *)(lVar1 + 0x78) < 1) || (**(int **)(lVar1 + 0x70) != *(int *)(lVar2 + 0x6f8)))
          {
            dVar14 = *(double *)(lVar2 + 0x1b0);
          }
          else {
            dVar14 = DAT_140320dc8 + *(double *)(lVar2 + 0x1b0);
          }
          lVar2 = *(longlong *)(param_1 + local_res20 * 0x18);
          if ((*(int *)(lVar1 + 0x78) < 1) || (**(int **)(lVar1 + 0x70) != *(int *)(lVar2 + 0x6f8)))
          {
            dVar13 = *(double *)(lVar2 + 0x1b0);
          }
          else {
            dVar13 = DAT_140320dc8 + *(double *)(lVar2 + 0x1b0);
          }
          if ((dVar14 <= dVar13) || ((longlong)uVar7 <= lVar12)) break;
          lVar12 = lVar12 + 1;
          plVar11 = plVar11 + 3;
        }
        lVar1 = *(longlong *)(param_1 + local_res20 * 0x18);
        lVar2 = *(longlong *)(param_1 + 8 + local_res20 * 0x18);
        plVar11 = (longlong *)(param_1 + uVar7 * 0x18);
        do {
          uVar10 = uVar9;
          uVar8 = uVar7;
          uVar9 = uVar10 - 1;
          uVar7 = uVar8 - 1;
          plVar11 = plVar11 + -3;
          if ((*(int *)(lVar2 + 0x78) < 1) || (**(int **)(lVar2 + 0x70) != *(int *)(lVar1 + 0x6f8)))
          {
            dVar14 = *(double *)(lVar1 + 0x1b0);
          }
          else {
            dVar14 = DAT_140320dc8 + *(double *)(lVar1 + 0x1b0);
          }
          lVar3 = *plVar11;
          if ((*(int *)(lVar2 + 0x78) < 1) || (**(int **)(lVar2 + 0x70) != *(int *)(lVar3 + 0x6f8)))
          {
            dVar13 = *(double *)(lVar3 + 0x1b0);
          }
          else {
            dVar13 = DAT_140320dc8 + *(double *)(lVar3 + 0x1b0);
          }
        } while (dVar13 < dVar14);
        if ((longlong)uVar7 <= lVar12) break;
        uVar4 = *(undefined8 *)(param_1 + lVar12 * 0x18);
        uVar5 = *(undefined8 *)(param_1 + 8 + lVar12 * 0x18);
        uVar6 = *(undefined8 *)(param_1 + 0x10 + lVar12 * 0x18);
        *(undefined8 *)(param_1 + lVar12 * 0x18) = *(undefined8 *)(param_1 + uVar7 * 0x18);
        *(undefined8 *)(param_1 + 8 + lVar12 * 0x18) = *(undefined8 *)(param_1 + 8 + uVar7 * 0x18);
        *(undefined8 *)(param_1 + 0x10 + lVar12 * 0x18) =
             *(undefined8 *)(param_1 + 0x10 + uVar7 * 0x18);
        *(undefined8 *)(param_1 + uVar7 * 0x18) = uVar4;
        *(undefined8 *)(param_1 + 8 + uVar7 * 0x18) = uVar5;
        *(undefined8 *)(param_1 + 0x10 + uVar7 * 0x18) = uVar6;
      }
      uVar4 = *(undefined8 *)(param_1 + local_res20 * 0x18);
      uVar5 = *(undefined8 *)(param_1 + 8 + local_res20 * 0x18);
      uVar6 = *(undefined8 *)(param_1 + 0x10 + local_res20 * 0x18);
      *(undefined8 *)(param_1 + local_res20 * 0x18) = *(undefined8 *)(param_1 + uVar7 * 0x18);
      *(undefined8 *)(param_1 + 8 + local_res20 * 0x18) =
           *(undefined8 *)(param_1 + 8 + uVar7 * 0x18);
      *(undefined8 *)(param_1 + 0x10 + local_res20 * 0x18) =
           *(undefined8 *)(param_1 + 0x10 + uVar7 * 0x18);
      *(undefined8 *)(param_1 + uVar7 * 0x18) = uVar4;
      *(undefined8 *)(param_1 + 8 + uVar7 * 0x18) = uVar5;
      *(undefined8 *)(param_1 + 0x10 + uVar7 * 0x18) = uVar6;
      if ((int)((local_res10 - uVar9) + -1) < (int)(uVar9 - local_res18)) {
        FUN_140161d80(param_1,uVar10 - 2);
        local_res18 = uVar10;
        local_res20 = uVar8;
      }
      else {
        FUN_140161d80(param_1,local_res10,uVar10);
        local_res10 = uVar10 - 2;
        local_28 = uVar8 - 2;
      }
      uVar7 = (ulonglong)local_res18;
    } while ((int)local_res18 < (int)local_res10);
  }
  return;
}



void FUN_140162010(longlong *param_1,longlong param_2,longlong param_3)

{
  undefined8 *puVar1;
  uint uVar2;
  longlong *plVar4;
  longlong *plVar5;
  longlong *plVar3;
  
  if (0 < param_3) {
    plVar5 = (longlong *)0x0;
    param_2 = param_2 - (longlong)param_1;
    plVar3 = plVar5;
    do {
      if (param_1 != (longlong *)0x0) {
        *param_1 = 0;
        if (*(longlong *)((longlong)param_1 + param_2) != 0) {
          *(longlong *)(*(longlong *)((longlong)param_1 + param_2) + 8) =
               *(longlong *)(*(longlong *)((longlong)param_1 + param_2) + 8) + 1;
          plVar4 = plVar5;
          if ((*param_1 != 0) &&
             (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
             *(longlong *)(*param_1 + 8) == 0)) {
            plVar4 = (longlong *)*param_1;
          }
          *param_1 = *(longlong *)((longlong)param_1 + param_2);
          if (plVar4 != (longlong *)0x0) {
            puVar1 = (undefined8 *)*plVar4;
            if (puVar1 != (undefined8 *)0x0) {
              (**(code **)*puVar1)(puVar1,1);
            }
            FUN_140156970(plVar4);
          }
        }
      }
      uVar2 = (int)plVar3 + 1;
      plVar3 = (longlong *)(ulonglong)uVar2;
      param_1 = param_1 + 1;
    } while ((int)uVar2 < param_3);
  }
  return;
}



void FUN_1401620f0(longlong *param_1)

{
  undefined8 *puVar1;
  void *pvVar2;
  
  if (*param_1 != 0) {
    *(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1;
    if (*(longlong *)(*param_1 + 8) == 0) {
      puVar1 = (undefined8 *)*param_1;
      pvVar2 = (void *)*puVar1;
      if (pvVar2 != (void *)0x0) {
        FUN_140182790(pvVar2);
        operator_delete(pvVar2);
      }
      FUN_140156970(puVar1);
    }
  }
  return;
}



void FUN_140162160(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  
  *(undefined ***)(param_1 + 200) = Proud::CFastArray<>::vftable;
  if (*(longlong *)(param_1 + 0xd8) != 0) {
    plVar1 = *(longlong **)(param_1 + 0xd0);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))
                (plVar1,*(longlong *)(param_1 + 0xd8),plVar1,param_4,0xfffffffffffffffe);
    }
  }
  *(undefined ***)(param_1 + 0x60) = Proud::CFastArray<>::vftable;
  if (*(longlong *)(param_1 + 0x70) != 0) {
    plVar1 = *(longlong **)(param_1 + 0x68);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,*(longlong *)(param_1 + 0x70));
    }
  }
  FUN_140161a30(param_1 + 8);
  return;
}



void FUN_1401621f0(_Container_base12 *param_1,undefined4 *param_2)

{
  undefined4 *puVar1;
  longlong lVar2;
  longlong lVar3;
  void *pvVar4;
  ulonglong uVar5;
  char *local_res8;
  undefined **local_28 [4];
  
  std::_Container_base12::_Orphan_all(param_1);
  if ((((char)*(longlong *)(param_1 + 0x20) + (char)param_1[0x18] & 3U) == 0) &&
     (*(ulonglong *)(param_1 + 0x10) <= *(longlong *)(param_1 + 0x20) + 4U >> 2)) {
    FUN_14015f2b0(param_1,1);
  }
  lVar2 = *(longlong *)(param_1 + 0x18);
  lVar3 = *(longlong *)(param_1 + 0x20);
  uVar5 = (ulonglong)(lVar2 + lVar3) >> 2;
  if (*(ulonglong *)(param_1 + 0x10) <= uVar5) {
    uVar5 = uVar5 - *(ulonglong *)(param_1 + 0x10);
  }
  if (*(longlong *)(*(longlong *)(param_1 + 8) + uVar5 * 8) == 0) {
    pvVar4 = operator_new(0x10);
    if (pvVar4 == (void *)0x0) {
      local_res8 = (char *)0x0;
      std::exception::exception((exception *)local_28,&local_res8);
      local_28[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_28,(ThrowInfo *)&DAT_14031d988);
    }
    *(void **)(*(longlong *)(param_1 + 8) + uVar5 * 8) = pvVar4;
  }
  puVar1 = (undefined4 *)
           (*(longlong *)(*(longlong *)(param_1 + 8) + uVar5 * 8) +
           (ulonglong)((uint)(lVar2 + lVar3) & 3) * 4);
  if (puVar1 != (undefined4 *)0x0) {
    *puVar1 = *param_2;
  }
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  return;
}



undefined8 * FUN_1401622e0(longlong *param_1,undefined8 *param_2,longlong param_3)

{
  undefined8 *puVar1;
  longlong lVar2;
  longlong *plVar3;
  
  plVar3 = (longlong *)0x0;
  if (((longlong *)*param_1 != (longlong *)0x0) &&
     (puVar1 = *(undefined8 **)*param_1, plVar3 = (longlong *)0x0, puVar1 != (undefined8 *)0x0)) {
    plVar3 = (longlong *)*puVar1;
  }
  lVar2 = param_1[2];
  *param_2 = 0;
  param_2[1] = 0;
  param_2[2] = lVar2 - param_3;
  if ((plVar3 != (longlong *)0x0) && ((undefined8 *)*plVar3 != (undefined8 *)0x0)) {
    *param_2 = *(undefined8 *)*plVar3;
  }
  return param_2;
}



void FUN_140162330(undefined8 param_1,undefined8 *param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  undefined8 uVar2;
  undefined *local_res10 [3];
  
  uVar2 = (**(code **)*param_2)(param_2,local_res10,param_2,param_4,0xfffffffffffffffe);
  FUN_14004cc50(param_1,uVar2);
  if (((local_res10[0] != (undefined *)0x0) && (local_res10[0] != PTR_DAT_1403200a0)) &&
     (local_res10[0] + -8 != (undefined *)0x0)) {
    uVar2 = FUN_1401568c0();
    FUN_140156b50(uVar2);
    piVar1 = (int *)(local_res10[0] + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res10[0] + -8);
    }
    FUN_140156be0(uVar2);
  }
  return;
}



undefined8 FUN_1401623c0(longlong *param_1,int *param_2,undefined8 param_3)

{
  int *piVar1;
  int iVar2;
  undefined *puVar3;
  undefined8 **ppuVar4;
  char cVar5;
  undefined4 uVar6;
  DWORD DVar7;
  DWORD DVar8;
  undefined **ppuVar9;
  undefined **ppuVar10;
  undefined8 uVar11;
  undefined1 uVar12;
  undefined8 ****ppppuVar13;
  int iVar14;
  undefined8 ***pppuVar15;
  undefined8 ****ppppuVar16;
  undefined8 ***local_res10 [2];
  undefined8 ***local_res20;
  undefined8 **local_358;
  undefined8 ***local_350;
  undefined **local_348;
  undefined *local_340;
  undefined8 local_338;
  undefined8 local_330;
  undefined8 local_328;
  undefined8 local_320;
  undefined *local_318;
  int local_310;
  undefined8 local_308;
  int local_300;
  undefined **local_2f8;
  undefined4 local_2f0;
  undefined2 local_2ec;
  undefined **local_2e8;
  undefined4 local_2e0;
  undefined2 local_2dc;
  undefined4 local_2d8 [2];
  undefined **local_2d0;
  undefined4 local_2c8;
  undefined2 local_2c4;
  undefined1 local_2b8 [4];
  int local_2b4;
  undefined8 local_280;
  undefined8 ***local_258;
  undefined8 **local_250;
  undefined8 ***local_248;
  undefined **local_240;
  undefined4 local_238;
  undefined2 local_234;
  undefined8 ***local_230;
  undefined8 **local_228;
  undefined8 **local_220;
  undefined8 **local_218;
  undefined4 local_210 [2];
  undefined8 **local_208;
  undefined *local_200;
  undefined8 **local_1f8;
  undefined *local_1f0;
  undefined8 **local_1e8;
  undefined8 **local_1e0;
  undefined8 **local_1d8;
  undefined8 **local_1d0;
  undefined8 **local_1c8;
  undefined8 **local_1c0;
  undefined8 **local_1b8;
  undefined4 local_1b0;
  undefined4 local_1ac;
  undefined *local_1a8;
  undefined4 local_1a0 [2];
  undefined8 **local_198;
  undefined4 local_190 [2];
  undefined8 **local_188;
  undefined4 local_180;
  undefined4 local_17c;
  undefined4 local_178 [2];
  undefined *local_170;
  undefined4 local_168 [2];
  undefined8 **local_160;
  undefined4 local_158 [2];
  undefined *local_150;
  undefined *local_148;
  undefined *local_140;
  undefined *local_138;
  undefined1 local_130 [8];
  undefined1 local_128 [8];
  undefined1 local_120 [8];
  undefined1 local_118 [8];
  undefined1 local_110 [8];
  undefined1 local_108 [8];
  undefined1 local_100 [8];
  undefined1 local_f8 [8];
  undefined1 local_f0 [8];
  undefined1 local_e8 [8];
  undefined1 local_e0 [8];
  undefined1 local_d8 [8];
  undefined1 local_d0 [8];
  undefined1 local_c8 [8];
  undefined1 local_c0 [8];
  undefined1 local_b8 [8];
  undefined1 local_b0 [8];
  undefined1 local_a8 [8];
  undefined1 local_a0 [8];
  undefined1 local_98 [8];
  undefined1 local_90 [8];
  undefined1 local_88 [8];
  undefined1 local_80 [8];
  undefined1 local_78 [8];
  undefined1 local_70 [8];
  undefined1 local_68 [8];
  undefined8 local_60;
  undefined1 local_58 [8];
  undefined1 local_50 [8];
  undefined1 local_48 [8];
  undefined1 local_40 [8];
  
  local_60 = 0xfffffffffffffffe;
  iVar2 = param_2[10];
  if (iVar2 == 0) {
    FUN_1401c5a30(param_1,0);
  }
  iVar14 = *param_2;
  cVar5 = FUN_140154d80(param_2,local_168);
  if (cVar5 == '\0') {
switchD_140162453_default:
    FUN_1401540a0(param_2,(int)((iVar14 >> 0x1f & 7U) + iVar14) >> 3);
    uVar11 = 0;
  }
  else {
    local_280 = param_3;
    switch(local_168[0]) {
    case 0xfa01:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      cVar5 = FUN_1401543d0(param_2,&local_res20,4);
      if (cVar5 != '\0') {
        local_res10[0] = (undefined8 ***)CONCAT44(local_res10[0]._4_4_,local_res20._0_4_);
      }
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_140320458);
      DVar7 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa01,PTR_DAT_140320458,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res20 = (undefined8 ***)PTR_DAT_1403200a0;
        FUN_140157960(&local_res20,local_res10);
        FUN_14004f840(&local_res20,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ****)local_res20 != (undefined8 ****)0x0) &&
           (local_res20 != (undefined8 ***)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_res20 + -1);
        }
        local_358 = (undefined8 **)FUN_1400457d0(&local_res20,&local_148,iVar14 + -2);
        if ((undefined8 ****)local_res20 == (undefined8 ****)0x0) {
          local_res20 = (undefined8 ***)PTR_DAT_1403200a0;
        }
        if ((undefined8 ***)*local_358 != local_res20) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          pppuVar15 = local_res20;
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          if ((((undefined8 ****)local_res20 != (undefined8 ****)0x0) &&
              (local_res20 != (undefined8 ***)PTR_DAT_1403200a0)) &&
             (ppppuVar13 = (undefined8 ****)(local_res20 + -1), ppppuVar13 != (undefined8 ****)0x0))
          {
            ppuVar10 = (undefined **)FUN_1401568c0();
            local_2d0 = ppuVar10;
            FUN_140156b50(ppuVar10);
            local_2c8 = CONCAT31(local_2c8._1_3_,1);
            piVar1 = (int *)((longlong)pppuVar15 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(ppppuVar13);
            }
            FUN_140156be0(ppuVar10);
          }
          local_res20 = (undefined8 ***)*local_358;
          if (((local_res20 != (undefined8 ***)PTR_DAT_1403200a0) &&
              ((undefined8 ****)local_res20 != (undefined8 ****)0x0)) &&
             ((undefined8 ****)local_res20 != (undefined8 ****)0x8)) {
            *(int *)((longlong)local_res20 + -4) = *(int *)((longlong)local_res20 + -4) + 1;
          }
          FUN_140156be0(ppuVar9);
        }
        if (((local_148 != (undefined *)0x0) && (local_148 != PTR_DAT_1403200a0)) &&
           (local_148 + -8 != (undefined *)0x0)) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          piVar1 = (int *)(local_148 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(local_148 + -8);
          }
          FUN_140156be0(ppuVar9);
        }
        local_350 = &local_230;
        local_148 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_230 = (undefined8 ***)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_230 = (undefined8 ****)0x0;
        }
        if (local_res20 != (undefined8 ***)PTR_DAT_1403200a0) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          FUN_14004f990(&local_230);
          local_230 = local_res20;
          if (((local_res20 != (undefined8 ***)PTR_DAT_1403200a0) &&
              ((undefined8 ****)local_res20 != (undefined8 ****)0x0)) &&
             ((undefined8 ****)local_res20 != (undefined8 ****)0x8)) {
            *(int *)((longlong)local_res20 + -4) = *(int *)((longlong)local_res20 + -4) + 1;
          }
          FUN_140156be0(ppuVar9);
        }
        puVar3 = PTR_DAT_140320458;
        FUN_1401568c0();
        local_170 = PTR_DAT_1403200a0;
        uVar6 = FUN_140156740(puVar3);
        uVar11 = FUN_14004f760(&local_170,uVar6);
        FUN_140156770(uVar11,puVar3,uVar6);
        FUN_14004f380(&local_170);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa01,&local_170,&local_230);
        ppppuVar13 = (undefined8 ****)local_res20;
        if ((undefined8 ****)local_res20 == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa01,PTR_DAT_140320458,ppppuVar13);
        pppuVar15 = local_res20;
        if ((((undefined8 ****)local_res20 != (undefined8 ****)0x0) &&
            (local_res20 != (undefined8 ***)PTR_DAT_1403200a0)) &&
           (ppppuVar13 = (undefined8 ****)(local_res20 + -1), ppppuVar13 != (undefined8 ****)0x0)) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          piVar1 = (int *)((longlong)pppuVar15 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(ppppuVar13);
          }
          FUN_140156be0(ppuVar9);
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa01);
        local_318 = PTR_DAT_140320458;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0x38))(param_1,iVar2,local_2b8,local_res10);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140320458);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa01);
        local_340 = PTR_DAT_140320458;
LAB_140165e95:
        local_338 = CONCAT44(local_338._4_4_,iVar2);
        local_330 = param_3;
        DVar8 = GetTickCount();
        local_328 = CONCAT44(local_328._4_4_,DVar8 - DVar7);
        (**(code **)(*param_1 + 0x18))(param_1,&local_348);
      }
      break;
    case 0xfa02:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      FUN_140154e60(param_2,&local_res20);
      cVar5 = FUN_1401543d0(param_2,&local_358,4);
      uVar6 = local_res10[0]._0_4_;
      if (cVar5 != '\0') {
        uVar6 = local_358._0_4_;
      }
      local_res10[0] = (undefined8 ***)CONCAT44(local_res10[0]._4_4_,uVar6);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_140320460);
      DVar7 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa02,PTR_DAT_140320460,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_358 = (undefined8 **)PTR_DAT_1403200a0;
        local_158[0] = local_res20._0_4_;
        FUN_140157840(&local_358,local_158);
        FUN_14004f840(&local_358,&DAT_140286e98);
        uVar11 = FUN_140181e70((ulonglong)local_res10[0] & 0xffffffff);
        FUN_14004f840(&local_358,uVar11);
        FUN_14004f840(&local_358,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ***)local_358 != (undefined8 ***)0x0) &&
           (local_358 != (undefined8 **)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_358 + -1);
        }
        local_2e8 = (undefined **)FUN_1400457d0(&local_358,&local_140,iVar14 + -2);
        if ((undefined8 ***)local_358 == (undefined8 ***)0x0) {
          local_358 = (undefined8 **)PTR_DAT_1403200a0;
        }
        if ((undefined8 **)*local_2e8 != local_358) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          ppuVar4 = local_358;
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          if ((((undefined8 ***)local_358 != (undefined8 ***)0x0) &&
              (local_358 != (undefined8 **)PTR_DAT_1403200a0)) &&
             (pppuVar15 = (undefined8 ***)(local_358 + -1), pppuVar15 != (undefined8 ***)0x0)) {
            ppuVar10 = (undefined **)FUN_1401568c0();
            local_2d0 = ppuVar10;
            FUN_140156b50(ppuVar10);
            local_2c8 = CONCAT31(local_2c8._1_3_,1);
            piVar1 = (int *)((longlong)ppuVar4 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(pppuVar15);
            }
            FUN_140156be0(ppuVar10);
          }
          local_358 = (undefined8 **)*local_2e8;
          if (((local_358 != (undefined8 **)PTR_DAT_1403200a0) &&
              ((undefined8 ***)local_358 != (undefined8 ***)0x0)) &&
             ((undefined8 ***)local_358 != (undefined8 ***)0x8)) {
            *(int *)((longlong)local_358 + -4) = *(int *)((longlong)local_358 + -4) + 1;
          }
          FUN_140156be0(ppuVar9);
        }
        if (((local_140 != (undefined *)0x0) && (local_140 != PTR_DAT_1403200a0)) &&
           (local_140 + -8 != (undefined *)0x0)) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          piVar1 = (int *)(local_140 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(local_140 + -8);
          }
          FUN_140156be0(ppuVar9);
        }
        local_350 = &local_250;
        local_140 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_250 = (undefined8 **)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_250 = (undefined8 ***)0x0;
        }
        if (local_358 != (undefined8 **)PTR_DAT_1403200a0) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          FUN_14004f990(&local_250);
          local_250 = local_358;
          if (((local_358 != (undefined8 **)PTR_DAT_1403200a0) &&
              ((undefined8 ***)local_358 != (undefined8 ***)0x0)) &&
             ((undefined8 ***)local_358 != (undefined8 ***)0x8)) {
            *(int *)((longlong)local_358 + -4) = *(int *)((longlong)local_358 + -4) + 1;
          }
          FUN_140156be0(ppuVar9);
        }
        puVar3 = PTR_DAT_140320460;
        FUN_1401568c0();
        local_200 = PTR_DAT_1403200a0;
        uVar6 = FUN_140156740(puVar3);
        uVar11 = FUN_14004f760(&local_200,uVar6);
        FUN_140156770(uVar11,puVar3,uVar6);
        FUN_14004f380(&local_200);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa02,&local_200,&local_250);
        pppuVar15 = (undefined8 ***)local_358;
        if ((undefined8 ***)local_358 == (undefined8 ***)0x0) {
          pppuVar15 = (undefined8 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa02,PTR_DAT_140320460,pppuVar15);
        ppuVar4 = local_358;
        if ((((undefined8 ***)local_358 != (undefined8 ***)0x0) &&
            (local_358 != (undefined8 **)PTR_DAT_1403200a0)) &&
           (pppuVar15 = (undefined8 ***)(local_358 + -1), pppuVar15 != (undefined8 ***)0x0)) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          piVar1 = (int *)((longlong)ppuVar4 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(pppuVar15);
          }
          FUN_140156be0(ppuVar9);
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa02);
        local_318 = PTR_DAT_140320460;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0x40))(param_1,iVar2,local_2b8,&local_res20,local_res10);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140320460);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa02);
        local_340 = PTR_DAT_140320460;
        goto LAB_140165e95;
      }
      break;
    case 0xfa03:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_140320468);
      DVar7 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa03,PTR_DAT_140320468,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        local_res10[0] = (undefined8 ***)PTR_DAT_1403200a0;
        local_res20 = (undefined8 ***)FUN_1400457d0(local_res10,&local_150,0xfffffffe);
        if (ppppuVar13 == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        local_res10[0] = ppppuVar13;
        if ((undefined8 ****)*local_res20 != ppppuVar13) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          if (((ppppuVar13 != (undefined8 ****)0x0) &&
              (ppppuVar13 != (undefined8 ****)PTR_DAT_1403200a0)) &&
             (ppppuVar13 + -1 != (undefined8 ****)0x0)) {
            ppuVar10 = (undefined **)FUN_1401568c0();
            local_2d0 = ppuVar10;
            FUN_140156b50(ppuVar10);
            local_2c8 = CONCAT31(local_2c8._1_3_,1);
            piVar1 = (int *)((longlong)ppppuVar13 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(ppppuVar13 + -1);
            }
            FUN_140156be0(ppuVar10);
          }
          ppppuVar13 = (undefined8 ****)*local_res20;
          if (((ppppuVar13 != (undefined8 ****)PTR_DAT_1403200a0) &&
              (ppppuVar13 != (undefined8 ****)0x0)) && (ppppuVar13 != (undefined8 ****)0x8)) {
            *(int *)((longlong)ppppuVar13 + -4) = *(int *)((longlong)ppppuVar13 + -4) + 1;
          }
          local_res10[0] = ppppuVar13;
          FUN_140156be0(ppuVar9);
        }
        if (((local_150 != (undefined *)0x0) && (local_150 != PTR_DAT_1403200a0)) &&
           (local_150 + -8 != (undefined *)0x0)) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          piVar1 = (int *)(local_150 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(local_150 + -8);
          }
          FUN_140156be0(ppuVar9);
        }
        local_res20 = &local_248;
        local_150 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_248 = (undefined8 ***)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_248 = (undefined8 ****)0x0;
        }
        if (ppppuVar13 != (undefined8 ****)PTR_DAT_1403200a0) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          FUN_14004f990(&local_248);
          if (((ppppuVar13 != (undefined8 ****)PTR_DAT_1403200a0) &&
              (ppppuVar13 != (undefined8 ****)0x0)) && (ppppuVar13 != (undefined8 ****)0x8)) {
            *(int *)((longlong)ppppuVar13 + -4) = *(int *)((longlong)ppppuVar13 + -4) + 1;
          }
          local_248 = ppppuVar13;
          FUN_140156be0(ppuVar9);
        }
        puVar3 = PTR_DAT_140320468;
        FUN_1401568c0();
        local_1a8 = PTR_DAT_1403200a0;
        uVar6 = FUN_140156740(puVar3);
        uVar11 = FUN_14004f760(&local_1a8,uVar6);
        FUN_140156770(uVar11,puVar3,uVar6);
        FUN_14004f380(&local_1a8);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa03,&local_1a8,&local_248);
        ppppuVar16 = ppppuVar13;
        if (ppppuVar13 == (undefined8 ****)0x0) {
          ppppuVar16 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa03,PTR_DAT_140320468,ppppuVar16);
        if (((ppppuVar13 != (undefined8 ****)0x0) &&
            (ppppuVar13 != (undefined8 ****)PTR_DAT_1403200a0)) &&
           (ppppuVar13 + -1 != (undefined8 ****)0x0)) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          piVar1 = (int *)((longlong)ppppuVar13 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(ppppuVar13 + -1);
          }
          FUN_140156be0(ppuVar9);
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa03);
        local_318 = PTR_DAT_140320468;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0x48))(param_1,iVar2,local_2b8);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140320468);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa03);
        local_340 = PTR_DAT_140320468;
        goto LAB_140165e95;
      }
      break;
    case 0xfa04:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      FUN_140154e60(param_2,&local_358);
      FUN_140154e60(param_2,&local_2e8);
      cVar5 = FUN_1401543d0(param_2,&local_res20,4);
      if (cVar5 != '\0') {
        local_2d8[0] = local_res20._0_4_;
      }
      cVar5 = FUN_1401543d0(param_2,&local_res20,1);
      uVar12 = (byte)local_res10[0];
      if (cVar5 != '\0') {
        uVar12 = local_res20._0_1_;
      }
      local_res10[0] = (undefined8 ***)CONCAT71(local_res10[0]._1_7_,uVar12);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_140320470);
      DVar7 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa04,PTR_DAT_140320470,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res20 = (undefined8 ***)PTR_DAT_1403200a0;
        local_1b0 = local_358._0_4_;
        FUN_140157840(&local_res20,&local_1b0);
        FUN_14004f840(&local_res20,&DAT_140286e98);
        local_210[0] = local_2e8._0_4_;
        FUN_140157840(&local_res20,local_210);
        FUN_14004f840(&local_res20,&DAT_140286e98);
        FUN_1401578a0(&local_res20,local_2d8);
        FUN_14004f840(&local_res20,&DAT_140286e98);
        FUN_140157700(&local_res20,local_res10);
        FUN_14004f840(&local_res20,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ****)local_res20 != (undefined8 ****)0x0) &&
           (local_res20 != (undefined8 ***)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_res20 + -1);
        }
        local_350 = (undefined8 ***)FUN_1400457d0(&local_res20,&local_138,iVar14 + -2);
        if ((undefined8 ****)local_res20 == (undefined8 ****)0x0) {
          local_res20 = (undefined8 ***)PTR_DAT_1403200a0;
        }
        if ((undefined8 ***)*local_350 != local_res20) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          pppuVar15 = local_res20;
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          if ((((undefined8 ****)local_res20 != (undefined8 ****)0x0) &&
              (local_res20 != (undefined8 ***)PTR_DAT_1403200a0)) &&
             (ppppuVar13 = (undefined8 ****)(local_res20 + -1), ppppuVar13 != (undefined8 ****)0x0))
          {
            ppuVar10 = (undefined **)FUN_1401568c0();
            local_2d0 = ppuVar10;
            FUN_140156b50(ppuVar10);
            local_2c8 = CONCAT31(local_2c8._1_3_,1);
            piVar1 = (int *)((longlong)pppuVar15 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(ppppuVar13);
            }
            FUN_140156be0(ppuVar10);
          }
          local_res20 = (undefined8 ***)*local_350;
          if (((local_res20 != (undefined8 ***)PTR_DAT_1403200a0) &&
              ((undefined8 ****)local_res20 != (undefined8 ****)0x0)) &&
             ((undefined8 ****)local_res20 != (undefined8 ****)0x8)) {
            *(int *)((longlong)local_res20 + -4) = *(int *)((longlong)local_res20 + -4) + 1;
          }
          FUN_140156be0(ppuVar9);
        }
        if (((local_138 != (undefined *)0x0) && (local_138 != PTR_DAT_1403200a0)) &&
           (local_138 + -8 != (undefined *)0x0)) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          piVar1 = (int *)(local_138 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(local_138 + -8);
          }
          FUN_140156be0(ppuVar9);
        }
        local_350 = &local_258;
        local_138 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_258 = (undefined8 ***)PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_258 = (undefined8 ****)0x0;
        }
        if (local_res20 != (undefined8 ***)PTR_DAT_1403200a0) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          FUN_14004f990(&local_258);
          local_258 = local_res20;
          if (((local_res20 != (undefined8 ***)PTR_DAT_1403200a0) &&
              ((undefined8 ****)local_res20 != (undefined8 ****)0x0)) &&
             ((undefined8 ****)local_res20 != (undefined8 ****)0x8)) {
            *(int *)((longlong)local_res20 + -4) = *(int *)((longlong)local_res20 + -4) + 1;
          }
          FUN_140156be0(ppuVar9);
        }
        puVar3 = PTR_DAT_140320470;
        FUN_1401568c0();
        local_1f0 = PTR_DAT_1403200a0;
        uVar6 = FUN_140156740(puVar3);
        uVar11 = FUN_14004f760(&local_1f0,uVar6);
        FUN_140156770(uVar11,puVar3,uVar6);
        FUN_14004f380(&local_1f0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa04,&local_1f0,&local_258);
        ppppuVar13 = (undefined8 ****)local_res20;
        if ((undefined8 ****)local_res20 == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa04,PTR_DAT_140320470,ppppuVar13);
        pppuVar15 = local_res20;
        if ((((undefined8 ****)local_res20 != (undefined8 ****)0x0) &&
            (local_res20 != (undefined8 ***)PTR_DAT_1403200a0)) &&
           (ppppuVar13 = (undefined8 ****)(local_res20 + -1), ppppuVar13 != (undefined8 ****)0x0)) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_2f8 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_2f0 = CONCAT31(local_2f0._1_3_,1);
          piVar1 = (int *)((longlong)pppuVar15 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(ppppuVar13);
          }
          FUN_140156be0(ppuVar9);
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa04);
        local_318 = PTR_DAT_140320470;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0x50))
                        (param_1,iVar2,local_2b8,&local_358,&local_2e8,local_2d8,local_res10);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140320470);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa04);
        local_340 = PTR_DAT_140320470;
        goto LAB_140165e95;
      }
      break;
    case 0xfa05:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      FUN_140154e60(param_2,&local_358);
      FUN_140154e60(param_2,&local_res20);
      local_2f8 = Proud::AddrPort::vftable;
      DVar7 = 0;
      local_2f0 = 0;
      local_2ec = 0;
      cVar5 = FUN_1401543d0(param_2,local_res10,4);
      if (cVar5 != '\0') {
        local_2f0 = local_res10[0]._0_4_;
      }
      cVar5 = FUN_1401543d0(param_2,local_res10,2);
      if (cVar5 != '\0') {
        local_2ec = local_res10[0]._0_2_;
      }
      local_2d0 = Proud::AddrPort::vftable;
      local_2c8 = 0;
      local_2c4 = 0;
      cVar5 = FUN_1401543d0(param_2,local_res10,4);
      if (cVar5 != '\0') {
        local_2c8 = local_res10[0]._0_4_;
      }
      cVar5 = FUN_1401543d0(param_2,local_res10,2);
      if (cVar5 != '\0') {
        local_2c4 = local_res10[0]._0_2_;
      }
      local_240 = Proud::AddrPort::vftable;
      local_238 = 0;
      local_234 = 0;
      cVar5 = FUN_1401543d0(param_2,local_res10,4);
      if (cVar5 != '\0') {
        local_238 = local_res10[0]._0_4_;
      }
      cVar5 = FUN_1401543d0(param_2,local_res10,2);
      if (cVar5 != '\0') {
        local_234 = local_res10[0]._0_2_;
      }
      local_2e8 = Proud::AddrPort::vftable;
      local_2e0 = 0;
      local_2dc = 0;
      cVar5 = FUN_1401543d0(param_2,local_res10,4);
      if (cVar5 != '\0') {
        local_2e0 = local_res10[0]._0_4_;
      }
      cVar5 = FUN_1401543d0(param_2,local_res10,2);
      if (cVar5 != '\0') {
        local_2dc = local_res10[0]._0_2_;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_140320478);
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa05,PTR_DAT_140320478,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res10[0] = (undefined8 ***)PTR_DAT_1403200a0;
        local_17c = local_358._0_4_;
        FUN_140157840(local_res10,&local_17c);
        FUN_14004f840(local_res10,&DAT_140286e98);
        local_1ac = local_res20._0_4_;
        FUN_140157840(local_res10,&local_1ac);
        FUN_14004f840(local_res10,&DAT_140286e98);
        uVar11 = (*(code *)*local_2f8)(&local_2f8,&local_350);
        FUN_14004cc50(local_res10,uVar11);
        pppuVar15 = local_350;
        if ((((undefined8 ****)local_350 != (undefined8 ****)0x0) &&
            (local_350 != (undefined8 ***)PTR_DAT_1403200a0)) &&
           (ppppuVar13 = (undefined8 ****)(local_350 + -1), ppppuVar13 != (undefined8 ****)0x0)) {
          uVar11 = FUN_1401568c0();
          local_320 = uVar11;
          FUN_140156b50(uVar11);
          local_318 = (undefined *)CONCAT71(local_318._1_7_,1);
          piVar1 = (int *)((longlong)pppuVar15 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(ppppuVar13);
          }
          FUN_140156be0(uVar11);
        }
        FUN_14004f840(local_res10,&DAT_140286e98);
        uVar11 = (*(code *)*local_2d0)(&local_2d0,&local_350);
        FUN_14004cc50(local_res10,uVar11);
        pppuVar15 = local_350;
        if ((((undefined8 ****)local_350 != (undefined8 ****)0x0) &&
            (local_350 != (undefined8 ***)PTR_DAT_1403200a0)) &&
           (ppppuVar13 = (undefined8 ****)(local_350 + -1), ppppuVar13 != (undefined8 ****)0x0)) {
          uVar11 = FUN_1401568c0();
          local_320 = uVar11;
          FUN_140156b50(uVar11);
          local_318 = (undefined *)CONCAT71(local_318._1_7_,1);
          piVar1 = (int *)((longlong)pppuVar15 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(ppppuVar13);
          }
          FUN_140156be0(uVar11);
        }
        FUN_14004f840(local_res10,&DAT_140286e98);
        uVar11 = (*(code *)*local_240)(&local_240,&local_350);
        FUN_14004cc50(local_res10,uVar11);
        pppuVar15 = local_350;
        if ((((undefined8 ****)local_350 != (undefined8 ****)0x0) &&
            (local_350 != (undefined8 ***)PTR_DAT_1403200a0)) &&
           (ppppuVar13 = (undefined8 ****)(local_350 + -1), ppppuVar13 != (undefined8 ****)0x0)) {
          uVar11 = FUN_1401568c0();
          local_320 = uVar11;
          FUN_140156b50(uVar11);
          local_318 = (undefined *)CONCAT71(local_318._1_7_,1);
          piVar1 = (int *)((longlong)pppuVar15 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(ppppuVar13);
          }
          FUN_140156be0(uVar11);
        }
        FUN_14004f840(local_res10,&DAT_140286e98);
        uVar11 = (*(code *)*local_2e8)(&local_2e8,&local_350);
        FUN_14004cc50(local_res10,uVar11);
        if ((((undefined8 ****)local_350 != (undefined8 ****)0x0) &&
            (local_350 != (undefined8 ***)PTR_DAT_1403200a0)) &&
           ((undefined8 ****)(local_350 + -1) != (undefined8 ****)0x0)) {
          uVar11 = FUN_1401568c0();
          local_320 = uVar11;
          FUN_140156b50(uVar11);
          local_318 = (undefined *)CONCAT71(local_318._1_7_,1);
          piVar1 = (int *)((longlong)local_350 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(local_350 + -1);
          }
          FUN_140156be0(uVar11);
        }
        FUN_14004f840(local_res10,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ****)local_res10[0] != (undefined8 ****)0x0) &&
           (local_res10[0] != (undefined8 ***)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_res10[0] + -1);
        }
        uVar11 = FUN_1400457d0(local_res10,local_d0,iVar14 + -2);
        FUN_14004f4f0(local_res10,uVar11);
        FUN_14004f990(local_d0);
        local_350 = &local_228;
        FUN_1401568c0();
        local_228 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_228,local_res10);
        uVar11 = FUN_14004f400(local_90,PTR_DAT_140320478,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa05,uVar11,&local_228);
        ppppuVar13 = (undefined8 ****)local_res10[0];
        if ((undefined8 ****)local_res10[0] == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa05,PTR_DAT_140320478,ppppuVar13);
        FUN_14004f990(local_res10);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa05);
        local_318 = PTR_DAT_140320478;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0x58))
                        (param_1,iVar2,local_2b8,&local_358,&local_res20,&local_2f8,&local_2d0,
                         &local_240,&local_2e8);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140320478);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa05);
        local_340 = PTR_DAT_140320478;
        goto LAB_140165e95;
      }
      break;
    case 0xfa06:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      DVar8 = 0;
      DVar7 = 0;
      local_340 = (undefined *)0x0;
      local_338 = 0;
      local_330 = 0;
      local_328 = 0;
      local_348 = Proud::ByteArray::vftable;
      FUN_14015e100(param_2,&local_348);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_140320480);
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa06,PTR_DAT_140320480,&DAT_140288b80);
          goto LAB_140163d67;
        }
      }
      else {
        DVar7 = DVar8;
        if ((char)param_1[3] == '\0') {
          FUN_1401568c0();
          local_res10[0] = (undefined8 ***)PTR_DAT_1403200a0;
          FUN_140157b40(local_res10,&local_348);
          FUN_14004f840(local_res10,&DAT_140286e98);
          iVar14 = 0;
          if (((undefined8 ****)local_res10[0] != (undefined8 ****)0x0) &&
             (local_res10[0] != (undefined8 ***)PTR_DAT_1403200a0)) {
            iVar14 = *(int *)(local_res10[0] + -1);
          }
          uVar11 = FUN_1400457d0(local_res10,local_c0,iVar14 + -2);
          FUN_14004f4f0(local_res10,uVar11);
          FUN_14004f990(local_c0);
          local_res20 = &local_1e0;
          FUN_1401568c0();
          local_1e0 = (undefined8 **)PTR_DAT_1403200a0;
          FUN_14004f4f0(&local_1e0,local_res10);
          uVar11 = FUN_14004f400(local_80,PTR_DAT_140320480,0);
          (**(code **)(*param_1 + 0x28))(param_1,0xfa06,uVar11,&local_1e0);
          ppppuVar13 = (undefined8 ****)local_res10[0];
          if ((undefined8 ****)local_res10[0] == (undefined8 ****)0x0) {
            ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
          }
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa06,PTR_DAT_140320480,ppppuVar13);
          FUN_14004f990(local_res10);
LAB_140163d67:
          DVar7 = DVar8;
          if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
            local_320 = CONCAT44(local_320._4_4_,0xfa06);
            local_318 = PTR_DAT_140320480;
            local_310 = iVar2;
            local_308 = param_3;
            (**(code **)(*param_1 + 0x20))(param_1,&local_320);
            DVar7 = GetTickCount();
          }
        }
      }
      cVar5 = (**(code **)(*param_1 + 0x60))(param_1,iVar2,local_2b8,&local_348);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140320480);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa06);
        local_318 = PTR_DAT_140320480;
        local_310 = iVar2;
        local_308 = param_3;
        DVar8 = GetTickCount();
        local_300 = DVar8 - DVar7;
        (**(code **)(*param_1 + 0x18))(param_1,&local_320);
      }
      FUN_1401858d0(&local_348);
      break;
    case 0xfa07:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_140320488);
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa07,PTR_DAT_140320488,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res10[0] = (undefined8 ***)PTR_DAT_1403200a0;
        uVar11 = FUN_1400457d0(local_res10,local_c8,0xfffffffe);
        FUN_14004f4f0(local_res10,uVar11);
        FUN_14004f990(local_c8);
        local_res20 = &local_198;
        FUN_1401568c0();
        local_198 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_198,local_res10);
        uVar11 = FUN_14004f400(local_70,PTR_DAT_140320488,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa07,uVar11,&local_198);
        ppppuVar13 = (undefined8 ****)local_res10[0];
        if ((undefined8 ****)local_res10[0] == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa07,PTR_DAT_140320488,ppppuVar13);
        FUN_14004f990(local_res10);
      }
      DVar7 = 0;
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa07);
        local_318 = PTR_DAT_140320488;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0x68))(param_1,iVar2,local_2b8);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140320488);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa07);
        local_340 = PTR_DAT_140320488;
        goto LAB_140165e95;
      }
      break;
    case 0xfa08:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      FUN_1401543d0(param_2,local_res10,1);
      local_res20 = (undefined8 ***)CONCAT44(local_res20._4_4_,(uint)(byte)local_res10[0]);
      FUN_1401568c0();
      local_358 = (undefined8 **)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_358);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_140320490);
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa08,PTR_DAT_140320490,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res10[0] = (undefined8 ***)PTR_DAT_1403200a0;
        uVar11 = FUN_1401a4a50((ulonglong)local_res20 & 0xffffffff);
        FUN_14004f840(local_res10,uVar11);
        FUN_14004f840(local_res10,&DAT_140286e98);
        FUN_140157b00(local_res10,&local_358);
        FUN_14004f840(local_res10,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ****)local_res10[0] != (undefined8 ****)0x0) &&
           (local_res10[0] != (undefined8 ***)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_res10[0] + -1);
        }
        uVar11 = FUN_1400457d0(local_res10,local_110,iVar14 + -2);
        FUN_14004f4f0(local_res10,uVar11);
        FUN_14004f990(local_110);
        local_350 = &local_1d0;
        FUN_1401568c0();
        local_1d0 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_1d0,local_res10);
        uVar11 = FUN_14004f400(local_b8,PTR_DAT_140320490,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa08,uVar11,&local_1d0);
        ppppuVar13 = (undefined8 ****)local_res10[0];
        if ((undefined8 ****)local_res10[0] == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa08,PTR_DAT_140320490,ppppuVar13);
        FUN_14004f990(local_res10);
      }
      DVar7 = 0;
      if (((char)param_1[3] == '\0') && (DVar7 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa08);
        local_318 = PTR_DAT_140320490;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0x70))(param_1,iVar2,local_2b8,&local_res20,&local_358);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140320490);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa08);
        local_340 = PTR_DAT_140320490;
        local_338 = CONCAT44(local_338._4_4_,iVar2);
        local_330 = param_3;
        DVar8 = GetTickCount();
        local_328 = CONCAT44(local_328._4_4_,DVar8 - DVar7);
        (**(code **)(*param_1 + 0x18))(param_1,&local_348);
      }
      FUN_14004f990(&local_358);
      break;
    case 0xfa09:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      cVar5 = FUN_1401543d0(param_2,&local_res20,4);
      uVar6 = local_res10[0]._0_4_;
      if (cVar5 != '\0') {
        uVar6 = local_res20._0_4_;
      }
      local_res10[0] = (undefined8 ***)CONCAT44(local_res10[0]._4_4_,uVar6);
      FUN_1401568c0();
      local_358 = (undefined8 **)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_358);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_140320498);
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa09,PTR_DAT_140320498,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res20 = (undefined8 ***)PTR_DAT_1403200a0;
        FUN_140157840(&local_res20,local_res10);
        FUN_14004f840(&local_res20,&DAT_140286e98);
        FUN_140157b00(&local_res20,&local_358);
        FUN_14004f840(&local_res20,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ****)local_res20 != (undefined8 ****)0x0) &&
           (local_res20 != (undefined8 ***)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_res20 + -1);
        }
        uVar11 = FUN_1400457d0(&local_res20,local_100,iVar14 + -2);
        FUN_14004f4f0(&local_res20,uVar11);
        FUN_14004f990(local_100);
        local_350 = &local_160;
        FUN_1401568c0();
        local_160 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_160,&local_res20);
        uVar11 = FUN_14004f400(local_50,PTR_DAT_140320498,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa09,uVar11,&local_160);
        ppppuVar13 = (undefined8 ****)local_res20;
        if ((undefined8 ****)local_res20 == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa09,PTR_DAT_140320498,ppppuVar13);
        FUN_14004f990(&local_res20);
      }
      DVar7 = 0;
      if (((char)param_1[3] == '\0') && (DVar7 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa09);
        local_318 = PTR_DAT_140320498;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0x78))(param_1,iVar2,local_2b8,local_res10,&local_358);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140320498);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa09);
        local_340 = PTR_DAT_140320498;
        local_338 = CONCAT44(local_338._4_4_,iVar2);
        local_330 = param_3;
        DVar8 = GetTickCount();
        local_328 = CONCAT44(local_328._4_4_,DVar8 - DVar7);
        (**(code **)(*param_1 + 0x18))(param_1,&local_348);
      }
      FUN_14004f990(&local_358);
      break;
    case 0xfa0a:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      FUN_1401568c0();
      local_res20 = (undefined8 ***)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_res20);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403204a0);
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa0a,PTR_DAT_1403204a0,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res10[0] = (undefined8 ***)PTR_DAT_1403200a0;
        FUN_140157b00(local_res10,&local_res20);
        FUN_14004f840(local_res10,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ****)local_res10[0] != (undefined8 ****)0x0) &&
           (local_res10[0] != (undefined8 ***)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_res10[0] + -1);
        }
        uVar11 = FUN_1400457d0(local_res10,local_f0,iVar14 + -2);
        FUN_14004f4f0(local_res10,uVar11);
        FUN_14004f990(local_f0);
        local_350 = &local_1c0;
        FUN_1401568c0();
        local_1c0 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_1c0,local_res10);
        uVar11 = FUN_14004f400(local_40,PTR_DAT_1403204a0,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa0a,uVar11,&local_1c0);
        ppppuVar13 = (undefined8 ****)local_res10[0];
        if ((undefined8 ****)local_res10[0] == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa0a,PTR_DAT_1403204a0,ppppuVar13);
        FUN_14004f990(local_res10);
      }
      DVar7 = 0;
      if (((char)param_1[3] == '\0') && (DVar7 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa0a);
        local_318 = PTR_DAT_1403204a0;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0x80))(param_1,iVar2,local_2b8,&local_res20);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403204a0);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa0a);
        local_340 = PTR_DAT_1403204a0;
        local_338 = CONCAT44(local_338._4_4_,iVar2);
        local_330 = param_3;
        DVar8 = GetTickCount();
        local_328 = CONCAT44(local_328._4_4_,DVar8 - DVar7);
        (**(code **)(*param_1 + 0x18))(param_1,&local_348);
      }
      FUN_14004f990(&local_res20);
      break;
    case 0xfa0b:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      FUN_140154e60(param_2,local_res10);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403204a8);
      DVar7 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa0b,PTR_DAT_1403204a8,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res20 = (undefined8 ***)PTR_DAT_1403200a0;
        local_1a0[0] = local_res10[0]._0_4_;
        FUN_140157840(&local_res20,local_1a0);
        FUN_14004f840(&local_res20,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ****)local_res20 != (undefined8 ****)0x0) &&
           (local_res20 != (undefined8 ***)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_res20 + -1);
        }
        uVar11 = FUN_1400457d0(&local_res20,local_e0,iVar14 + -2);
        FUN_14004f4f0(&local_res20,uVar11);
        FUN_14004f990(local_e0);
        local_350 = &local_188;
        FUN_1401568c0();
        local_188 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_188,&local_res20);
        uVar11 = FUN_14004f400(local_a8,PTR_DAT_1403204a8,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa0b,uVar11,&local_188);
        ppppuVar13 = (undefined8 ****)local_res20;
        if ((undefined8 ****)local_res20 == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa0b,PTR_DAT_1403204a8,ppppuVar13);
        FUN_14004f990(&local_res20);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa0b);
        local_318 = PTR_DAT_1403204a8;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0x88))(param_1,iVar2,local_2b8,local_res10);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403204a8);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa0b);
        local_340 = PTR_DAT_1403204a8;
        goto LAB_140165e95;
      }
      break;
    case 0xfa0c:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      FUN_140154e60(param_2,local_res10);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403204b0);
      DVar7 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa0c,PTR_DAT_1403204b0,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res20 = (undefined8 ***)PTR_DAT_1403200a0;
        local_190[0] = local_res10[0]._0_4_;
        FUN_140157840(&local_res20,local_190);
        FUN_14004f840(&local_res20,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ****)local_res20 != (undefined8 ****)0x0) &&
           (local_res20 != (undefined8 ***)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_res20 + -1);
        }
        uVar11 = FUN_1400457d0(&local_res20,local_d8,iVar14 + -2);
        FUN_14004f4f0(&local_res20,uVar11);
        FUN_14004f990(local_d8);
        local_350 = &local_220;
        FUN_1401568c0();
        local_220 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_220,&local_res20);
        uVar11 = FUN_14004f400(local_58,PTR_DAT_1403204b0,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa0c,uVar11,&local_220);
        ppppuVar13 = (undefined8 ****)local_res20;
        if ((undefined8 ****)local_res20 == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa0c,PTR_DAT_1403204b0,ppppuVar13);
        FUN_14004f990(&local_res20);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa0c);
        local_318 = PTR_DAT_1403204b0;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0x90))(param_1,iVar2,local_2b8,local_res10);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403204b0);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa0c);
        local_340 = PTR_DAT_1403204b0;
        goto LAB_140165e95;
      }
      break;
    case 0xfa0d:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      FUN_1401568c0();
      local_res20 = (undefined8 ***)PTR_DAT_1403200a0;
      thunk_FUN_1401557c0(param_2,&local_res20);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403204b8);
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa0d,PTR_DAT_1403204b8,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res10[0] = (undefined8 ***)PTR_DAT_1403200a0;
        FUN_140157b00(local_res10,&local_res20);
        FUN_14004f840(local_res10,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ****)local_res10[0] != (undefined8 ****)0x0) &&
           (local_res10[0] != (undefined8 ***)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_res10[0] + -1);
        }
        uVar11 = FUN_1400457d0(local_res10,local_118,iVar14 + -2);
        FUN_14004f4f0(local_res10,uVar11);
        FUN_14004f990(local_118);
        local_350 = &local_218;
        FUN_1401568c0();
        local_218 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_218,local_res10);
        uVar11 = FUN_14004f400(local_98,PTR_DAT_1403204b8,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa0d,uVar11,&local_218);
        ppppuVar13 = (undefined8 ****)local_res10[0];
        if ((undefined8 ****)local_res10[0] == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa0d,PTR_DAT_1403204b8,ppppuVar13);
        FUN_14004f990(local_res10);
      }
      DVar7 = 0;
      if (((char)param_1[3] == '\0') && (DVar7 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa0d);
        local_318 = PTR_DAT_1403204b8;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0x98))(param_1,iVar2,local_2b8,&local_res20);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403204b8);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa0d);
        local_340 = PTR_DAT_1403204b8;
        local_338 = CONCAT44(local_338._4_4_,iVar2);
        local_330 = param_3;
        DVar8 = GetTickCount();
        local_328 = CONCAT44(local_328._4_4_,DVar8 - DVar7);
        (**(code **)(*param_1 + 0x18))(param_1,&local_348);
      }
      FUN_14004f990(&local_res20);
      break;
    case 0xfa0e:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      cVar5 = FUN_1401543d0(param_2,local_res10,8);
      if (cVar5 != '\0') {
        local_res20 = local_res10[0];
      }
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403204c0);
      DVar7 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa0e,PTR_DAT_1403204c0,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res10[0] = (undefined8 ***)PTR_DAT_1403200a0;
        FUN_1401579d0(local_res10,&local_res20);
        FUN_14004f840(local_res10,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ****)local_res10[0] != (undefined8 ****)0x0) &&
           (local_res10[0] != (undefined8 ***)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_res10[0] + -1);
        }
        uVar11 = FUN_1400457d0(local_res10,local_e8,iVar14 + -2);
        FUN_14004f4f0(local_res10,uVar11);
        FUN_14004f990(local_e8);
        local_350 = &local_208;
        FUN_1401568c0();
        local_208 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_208,local_res10);
        uVar11 = FUN_14004f400(local_68,PTR_DAT_1403204c0,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa0e,uVar11,&local_208);
        ppppuVar13 = (undefined8 ****)local_res10[0];
        if ((undefined8 ****)local_res10[0] == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa0e,PTR_DAT_1403204c0,ppppuVar13);
        FUN_14004f990(local_res10);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa0e);
        local_318 = PTR_DAT_1403204c0;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0xa0))(param_1,iVar2,local_2b8,&local_res20);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403204c0);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa0e);
        local_340 = PTR_DAT_1403204c0;
        goto LAB_140165e95;
      }
      break;
    case 0xfa0f:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      FUN_140154e60(param_2,&local_res20);
      cVar5 = FUN_1401543d0(param_2,&local_358,4);
      uVar6 = local_res10[0]._0_4_;
      if (cVar5 != '\0') {
        uVar6 = local_358._0_4_;
      }
      local_res10[0] = (undefined8 ***)CONCAT44(local_res10[0]._4_4_,uVar6);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403204c8);
      DVar7 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa0f,PTR_DAT_1403204c8,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_358 = (undefined8 **)PTR_DAT_1403200a0;
        local_180 = local_res20._0_4_;
        FUN_140157840(&local_358,&local_180);
        FUN_14004f840(&local_358,&DAT_140286e98);
        FUN_1401578a0(&local_358,local_res10);
        FUN_14004f840(&local_358,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ***)local_358 != (undefined8 ***)0x0) &&
           (local_358 != (undefined8 **)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_358 + -1);
        }
        uVar11 = FUN_1400457d0(&local_358,local_108,iVar14 + -2);
        FUN_14004f4f0(&local_358,uVar11);
        FUN_14004f990(local_108);
        local_350 = &local_1f8;
        FUN_1401568c0();
        local_1f8 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_1f8,&local_358);
        uVar11 = FUN_14004f400(local_88,PTR_DAT_1403204c8,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa0f,uVar11,&local_1f8);
        pppuVar15 = (undefined8 ***)local_358;
        if ((undefined8 ***)local_358 == (undefined8 ***)0x0) {
          pppuVar15 = (undefined8 ***)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa0f,PTR_DAT_1403204c8,pppuVar15);
        FUN_14004f990(&local_358);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa0f);
        local_318 = PTR_DAT_1403204c8;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0xa8))(param_1,iVar2,local_2b8,&local_res20,local_res10);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403204c8);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa0f);
        local_340 = PTR_DAT_1403204c8;
        goto LAB_140165e95;
      }
      break;
    case 0xfa10:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403204d0);
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa10,PTR_DAT_1403204d0,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res10[0] = (undefined8 ***)PTR_DAT_1403200a0;
        uVar11 = FUN_1400457d0(local_res10,local_130,0xfffffffe);
        FUN_14004f4f0(local_res10,uVar11);
        FUN_14004f990(local_130);
        local_res20 = &local_1e8;
        FUN_1401568c0();
        local_1e8 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_1e8,local_res10);
        uVar11 = FUN_14004f400(local_48,PTR_DAT_1403204d0,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa10,uVar11,&local_1e8);
        ppppuVar13 = (undefined8 ****)local_res10[0];
        if ((undefined8 ****)local_res10[0] == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa10,PTR_DAT_1403204d0,ppppuVar13);
        FUN_14004f990(local_res10);
      }
      DVar7 = 0;
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa10);
        local_318 = PTR_DAT_1403204d0;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0xb0))(param_1,iVar2,local_2b8);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403204d0);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa10);
        local_340 = PTR_DAT_1403204d0;
        goto LAB_140165e95;
      }
      break;
    case 0xfa11:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      cVar5 = FUN_1401543d0(param_2,&local_res20,1);
      uVar12 = (byte)local_res10[0];
      if (cVar5 != '\0') {
        uVar12 = local_res20._0_1_;
      }
      local_res10[0] = (undefined8 ***)CONCAT71(local_res10[0]._1_7_,uVar12);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403204d8);
      DVar7 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa11,PTR_DAT_1403204d8,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res20 = (undefined8 ***)PTR_DAT_1403200a0;
        FUN_140157700(&local_res20,local_res10);
        FUN_14004f840(&local_res20,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ****)local_res20 != (undefined8 ****)0x0) &&
           (local_res20 != (undefined8 ***)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_res20 + -1);
        }
        uVar11 = FUN_1400457d0(&local_res20,local_f8,iVar14 + -2);
        FUN_14004f4f0(&local_res20,uVar11);
        FUN_14004f990(local_f8);
        local_350 = &local_1d8;
        FUN_1401568c0();
        local_1d8 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_1d8,&local_res20);
        uVar11 = FUN_14004f400(local_78,PTR_DAT_1403204d8,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa11,uVar11,&local_1d8);
        ppppuVar13 = (undefined8 ****)local_res20;
        if ((undefined8 ****)local_res20 == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa11,PTR_DAT_1403204d8,ppppuVar13);
        FUN_14004f990(&local_res20);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa11);
        local_318 = PTR_DAT_1403204d8;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0xb8))(param_1,iVar2,local_2b8,local_res10);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403204d8);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa11);
        local_340 = PTR_DAT_1403204d8;
        goto LAB_140165e95;
      }
      break;
    case 0xfa12:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      FUN_140154e60(param_2,&local_358);
      cVar5 = FUN_1401543d0(param_2,&local_2e8,4);
      uVar6 = local_res20._0_4_;
      if (cVar5 != '\0') {
        uVar6 = local_2e8._0_4_;
      }
      local_res20 = (undefined8 ***)CONCAT44(local_res20._4_4_,uVar6);
      cVar5 = FUN_1401543d0(param_2,local_2d8,4);
      uVar6 = local_res10[0]._0_4_;
      if (cVar5 != '\0') {
        uVar6 = local_2d8[0];
      }
      local_res10[0] = (undefined8 ***)CONCAT44(local_res10[0]._4_4_,uVar6);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403204e0);
      DVar7 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa12,PTR_DAT_1403204e0,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_2e8 = (undefined **)PTR_DAT_1403200a0;
        local_178[0] = local_358._0_4_;
        FUN_140157840(&local_2e8,local_178);
        FUN_14004f840(&local_2e8,&DAT_140286e98);
        FUN_1401578a0(&local_2e8,&local_res20);
        FUN_14004f840(&local_2e8,&DAT_140286e98);
        FUN_1401578a0(&local_2e8,local_res10);
        FUN_14004f840(&local_2e8,&DAT_140286e98);
        iVar14 = 0;
        if ((local_2e8 != (undefined **)0x0) && (local_2e8 != (undefined **)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_2e8 + -1);
        }
        uVar11 = FUN_1400457d0(&local_2e8,local_128,iVar14 + -2);
        FUN_14004f4f0(&local_2e8,uVar11);
        FUN_14004f990(local_128);
        local_350 = &local_1c8;
        FUN_1401568c0();
        local_1c8 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_1c8,&local_2e8);
        uVar11 = FUN_14004f400(local_b0,PTR_DAT_1403204e0,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa12,uVar11,&local_1c8);
        ppuVar9 = local_2e8;
        if (local_2e8 == (undefined **)0x0) {
          ppuVar9 = (undefined **)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa12,PTR_DAT_1403204e0,ppuVar9);
        FUN_14004f990(&local_2e8);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa12);
        local_318 = PTR_DAT_1403204e0;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 0xc0))
                        (param_1,iVar2,local_2b8,&local_358,&local_res20,local_res10);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403204e0);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa12);
        local_340 = PTR_DAT_1403204e0;
        goto LAB_140165e95;
      }
      break;
    case 0xfa13:
      FUN_140157c90(local_2b8);
      local_2b4 = param_2[10];
      local_2b8[0] = (undefined1)param_2[0x10];
      cVar5 = FUN_1401543d0(param_2,&local_res20,4);
      uVar6 = local_res10[0]._0_4_;
      if (cVar5 != '\0') {
        uVar6 = local_res20._0_4_;
      }
      local_res10[0] = (undefined8 ***)CONCAT44(local_res10[0]._4_4_,uVar6);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403204e8);
      DVar7 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfa13,PTR_DAT_1403204e8,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_res20 = (undefined8 ***)PTR_DAT_1403200a0;
        FUN_1401578a0(&local_res20,local_res10);
        FUN_14004f840(&local_res20,&DAT_140286e98);
        iVar14 = 0;
        if (((undefined8 ****)local_res20 != (undefined8 ****)0x0) &&
           (local_res20 != (undefined8 ***)PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(local_res20 + -1);
        }
        uVar11 = FUN_1400457d0(&local_res20,local_120,iVar14 + -2);
        FUN_14004f4f0(&local_res20,uVar11);
        FUN_14004f990(local_120);
        local_350 = &local_1b8;
        FUN_1401568c0();
        local_1b8 = (undefined8 **)PTR_DAT_1403200a0;
        FUN_14004f4f0(&local_1b8,&local_res20);
        uVar11 = FUN_14004f400(local_a0,PTR_DAT_1403204e8,0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfa13,uVar11,&local_1b8);
        ppppuVar13 = (undefined8 ****)local_res20;
        if ((undefined8 ****)local_res20 == (undefined8 ****)0x0) {
          ppppuVar13 = (undefined8 ****)PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfa13,PTR_DAT_1403204e8,ppppuVar13);
        FUN_14004f990(&local_res20);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_320 = CONCAT44(local_320._4_4_,0xfa13);
        local_318 = PTR_DAT_1403204e8;
        local_310 = iVar2;
        local_308 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_320);
        DVar7 = GetTickCount();
      }
      cVar5 = (**(code **)(*param_1 + 200))(param_1,iVar2,local_2b8,local_res10);
      if (cVar5 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403204e8);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfa13);
        local_340 = PTR_DAT_1403204e8;
        goto LAB_140165e95;
      }
      break;
    default:
      goto switchD_140162453_default;
    }
    uVar11 = 1;
  }
  return uVar11;
}



undefined1
FUN_140165f40(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined1 *param_5,longlong param_6,longlong param_7,longlong param_8,longlong param_9
             )

{
  undefined2 uVar1;
  undefined1 uVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbf7);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fd90(local_30,*param_5);
  uVar1 = *(undefined2 *)(param_6 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_6 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_7 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_7 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_8 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_8 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_9 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_9 + 8));
  FUN_140050340(local_30,uVar1);
  uVar2 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320500,0xfbf7);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar2;
}



undefined1
FUN_1401660d0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined1 *param_6,longlong param_7,longlong param_8,
             longlong param_9,longlong param_10)

{
  undefined2 uVar1;
  undefined1 uVar2;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbf7);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fd90(local_30,*param_6);
  uVar1 = *(undefined2 *)(param_7 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_7 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_8 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_8 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_9 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_9 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_10 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_10 + 8));
  FUN_140050340(local_30,uVar1);
  uVar2 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320500,0xfbf7);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar2;
}



undefined1
FUN_140166270(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong param_5,longlong param_6)

{
  undefined2 uVar1;
  undefined1 uVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbf8);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = *(undefined2 *)(param_5 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_5 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_6 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_6 + 8));
  FUN_140050340(local_30,uVar1);
  uVar2 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320508,0xfbf8);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar2;
}



undefined1
FUN_1401663a0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,longlong param_6,longlong param_7)

{
  undefined2 uVar1;
  undefined1 uVar2;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbf8);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = *(undefined2 *)(param_6 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_6 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_7 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_7 + 8));
  FUN_140050340(local_30,uVar1);
  uVar2 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320508,0xfbf8);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar2;
}



undefined1
FUN_1401664e0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbf9);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320510,0xfbf9);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401665d0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbf9);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320510,0xfbf9);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401666d0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbfa);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320518,0xfbfa);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401667c0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbfa);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320518,0xfbfa);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401668c0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,longlong param_6,longlong param_7,longlong param_8,longlong param_9
             )

{
  undefined2 uVar1;
  undefined1 uVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbfb);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = *(undefined2 *)(param_6 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_6 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_7 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_7 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_8 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_8 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_9 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_9 + 8));
  FUN_140050340(local_30,uVar1);
  uVar2 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320520,0xfbfb);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar2;
}



undefined1
FUN_140166a50(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,longlong param_7,longlong param_8,
             longlong param_9,longlong param_10)

{
  undefined2 uVar1;
  undefined1 uVar2;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbfb);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = *(undefined2 *)(param_7 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_7 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_8 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_8 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_9 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_9 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_10 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_10 + 8));
  FUN_140050340(local_30,uVar1);
  uVar2 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320520,0xfbfb);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar2;
}



undefined1 FUN_140166bf0(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbfc);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320528,0xfbfc);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140166cb0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbfc);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320528,0xfbfc);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140166d80(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbfd);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320530,0xfbfd);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140166e40(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbfd);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320530,0xfbfd);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140166f10(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbfe);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320538,0xfbfe);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140166fd0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbfe);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320538,0xfbfe);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1401670a0(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbff);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320540,0xfbff);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140167160(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfbff);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320540,0xfbff);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140167230(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined1 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc00);
  FUN_14004fd90(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320548,0xfc00);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140167310(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined1 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc00);
  FUN_14004fd90(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320548,0xfc00);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1401673f0(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc01);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320550,0xfc01);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1401674b0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc01);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320550,0xfc01);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140167580(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc02);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320558,0xfc02);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140167640(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc02);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320558,0xfc02);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140167710(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc03);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320560,0xfc03);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401677f0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc03);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320560,0xfc03);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401678d0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc04);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320568,0xfc04);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401679b0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc04);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320568,0xfc04);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140167a90(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined1 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc05);
  FUN_14004fd90(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320570,0xfc05);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140167b70(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined1 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc05);
  FUN_14004fd90(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320570,0xfc05);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_140167c50(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc06);
  FUN_1401575a0(local_30,param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320578,0xfc06);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140167d30(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc06);
  FUN_1401575a0(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320578,0xfc06);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140167e10(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined1 *param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc07);
  FUN_14004fd90(local_30,*param_4);
  FUN_1401575a0(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140320580,0xfc07);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_140167f00(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined1 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfc07);
  FUN_14004fd90(local_30,*param_5);
  FUN_1401575a0(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140320580,0xfc07);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined8 FUN_140167ff0(longlong param_1,uint param_2,undefined8 param_3,undefined8 param_4)

{
  uint uVar1;
  longlong lVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  uint *puVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  undefined1 uVar8;
  
  uVar6 = 0xfffffffffffffffe;
  uVar4 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  uVar7 = uVar4;
  FUN_140156b50(uVar4);
  uVar8 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  uVar1 = *(uint *)(*(longlong *)(param_1 + 0x20) + 0xca0);
  uVar3 = (ulonglong)param_2 % (ulonglong)uVar1;
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x20) + 0xc80);
  if ((lVar2 != 0) && (puVar5 = *(uint **)(lVar2 + uVar3 * 8), puVar5 != (uint *)0x0)) {
    while ((uint)uVar3 == puVar5[8] % uVar1) {
      if (*puVar5 == param_2) {
        lVar2 = *(longlong *)(puVar5 + 2);
        if ((lVar2 != 0) && (*(longlong *)(lVar2 + 0x228) == 0)) {
          FUN_14004f4f0(lVar2 + 0x1f0,param_4,uVar3,(ulonglong)uVar1,uVar6,uVar7,uVar8);
        }
        break;
      }
      puVar5 = *(uint **)(puVar5 + 4);
      if (puVar5 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar4);
  return 1;
}



undefined8 FUN_1401680e0(longlong param_1,uint param_2,undefined8 param_3,undefined8 *param_4)

{
  uint uVar1;
  longlong lVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  uint *puVar5;
  
  uVar4 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar4);
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  uVar1 = *(uint *)(*(longlong *)(param_1 + 0x20) + 0xca0);
  uVar3 = (ulonglong)param_2 % (ulonglong)uVar1;
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x20) + 0xc80);
  if ((lVar2 != 0) && (puVar5 = *(uint **)(lVar2 + uVar3 * 8), puVar5 != (uint *)0x0)) {
    while ((uint)uVar3 == puVar5[8] % uVar1) {
      if (*puVar5 == param_2) {
        lVar2 = *(longlong *)(puVar5 + 2);
        if ((lVar2 != 0) && (*(longlong *)(lVar2 + 0x228) == 0)) {
          *(undefined8 *)(lVar2 + 400) = *param_4;
        }
        break;
      }
      puVar5 = *(uint **)(puVar5 + 4);
      if (puVar5 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar4);
  return 1;
}



undefined8
FUN_1401681d0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             longlong *param_5)

{
  int *piVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined *puVar4;
  undefined *puVar5;
  undefined *local_res8;
  undefined8 uVar6;
  
  uVar6 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  uVar3 = uVar2;
  FUN_140156b50(uVar2);
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))
              (*(longlong **)(param_1 + 0x20),L"Proud::CNetServerImpl::C2SStub::NotifyLog");
  }
  if (*(longlong *)(*(longlong *)(param_1 + 0x20) + 0x17f0) != 0) {
    FUN_1401568c0();
    local_res8 = PTR_DAT_1403200a0;
    puVar5 = (undefined *)*param_5;
    if ((undefined *)*param_5 == (undefined *)0x0) {
      puVar5 = PTR_DAT_1403200a0;
    }
    FUN_14004ce50(&local_res8,L"[Client %d] %s",param_2,puVar5,uVar6,uVar3);
    puVar5 = local_res8;
    puVar4 = local_res8;
    if (local_res8 == (undefined *)0x0) {
      puVar4 = PTR_DAT_1403200a0;
    }
    FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x17f0),*param_4,puVar4);
    if (((puVar5 != (undefined *)0x0) && (puVar5 != PTR_DAT_1403200a0)) &&
       (puVar5 + -8 != (undefined *)0x0)) {
      uVar3 = FUN_1401568c0();
      FUN_140156b50(uVar3);
      piVar1 = (int *)(puVar5 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar5 + -8);
      }
      FUN_140156be0(uVar3);
    }
  }
  FUN_140156be0(uVar2);
  return 1;
}



undefined8
FUN_140168310(longlong param_1,undefined4 param_2,undefined8 param_3,int *param_4,undefined8 param_5
             )

{
  int *piVar1;
  undefined *puVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  longlong lVar5;
  longlong *plVar6;
  undefined8 *puVar7;
  undefined *puVar8;
  undefined *local_res8;
  undefined *local_res20;
  undefined *local_118;
  undefined *local_110;
  undefined *local_108;
  undefined8 local_100;
  undefined1 local_f8;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined4 local_98;
  undefined8 local_88;
  undefined1 local_80;
  undefined8 local_78;
  undefined1 local_70;
  undefined8 local_68;
  undefined1 local_60;
  undefined8 local_58;
  undefined1 local_50;
  undefined8 local_48;
  undefined1 local_40;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  local_100 = uVar3;
  FUN_140156b50(uVar3);
  local_f8 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))
              (*(longlong **)(param_1 + 0x20),
               L"Proud::CNetServerImpl::C2SStub::NotifyLogHolepunchFreqFail");
  }
  local_a8 = 0;
  local_e0 = 0;
  local_e8 = 0;
  local_d0 = 0;
  local_d8 = 0;
  local_b0 = 0;
  local_b8 = 0;
  local_c0 = 0;
  local_c8 = 0;
  local_a0 = 0;
  local_98 = 0;
  plVar6 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0xa8);
  (**(code **)(*plVar6 + 0xb0))(plVar6,&local_e8);
  if (*(longlong *)(*(longlong *)(param_1 + 0x20) + 0x17f0) != 0) {
    FUN_1401568c0();
    local_res8 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_res8,L"[Client %d] Pair=%d/%d##CCU=%d##",param_2,local_a8._4_4_,
                  (undefined4)local_a8,(undefined4)local_a0);
    plVar6 = (longlong *)FUN_140161d10(&local_108,&local_res8,param_5);
    puVar8 = (undefined *)*plVar6;
    if ((undefined *)*plVar6 == (undefined *)0x0) {
      puVar8 = PTR_DAT_1403200a0;
    }
    FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x17f0),2,puVar8);
    if (((local_108 != (undefined *)0x0) && (local_108 != PTR_DAT_1403200a0)) &&
       (local_108 + -8 != (undefined *)0x0)) {
      uVar4 = FUN_1401568c0();
      local_88 = uVar4;
      FUN_140156b50(uVar4);
      local_80 = 1;
      piVar1 = (int *)(local_108 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_108 + -8);
      }
      FUN_140156be0(uVar4);
    }
    puVar8 = local_res8;
    if (((local_res8 != (undefined *)0x0) && (local_res8 != PTR_DAT_1403200a0)) &&
       (puVar2 = local_res8 + -8, puVar2 != (undefined *)0x0)) {
      uVar4 = FUN_1401568c0();
      local_68 = uVar4;
      FUN_140156b50(uVar4);
      local_60 = 1;
      piVar1 = (int *)(puVar8 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar2);
      }
      FUN_140156be0(uVar4);
    }
  }
  if ((*(int *)(*(longlong *)(param_1 + 0x20) + 0x1804) < *param_4) &&
     (lVar5 = FUN_14015f740(*(longlong *)(param_1 + 0x20),param_2), lVar5 != 0)) {
    FUN_1401568c0();
    local_res20 = PTR_DAT_1403200a0;
    puVar7 = (undefined8 *)(*(longlong *)(lVar5 + 0x748) + 0x128);
    plVar6 = (longlong *)(**(code **)*puVar7)(puVar7,&local_110);
    puVar8 = (undefined *)*plVar6;
    if ((undefined *)*plVar6 == (undefined *)0x0) {
      puVar8 = PTR_DAT_1403200a0;
    }
    FUN_14004ce50(&local_res20,L"[Client %d %s] Pair=%d/%d##CCU=%d",param_2,puVar8,local_a8._4_4_,
                  (undefined4)local_a8,(undefined4)local_a0);
    if (((local_110 != (undefined *)0x0) && (local_110 != PTR_DAT_1403200a0)) &&
       (local_110 + -8 != (undefined *)0x0)) {
      uVar3 = FUN_1401568c0();
      local_48 = uVar3;
      FUN_140156b50(uVar3);
      local_40 = 1;
      piVar1 = (int *)(local_110 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_110 + -8);
      }
      FUN_140156be0(uVar3);
    }
    *(int *)(*(longlong *)(param_1 + 0x20) + 0x1804) = *param_4;
    uVar3 = FUN_140161d10(&local_118,&local_res20,param_5);
    FUN_14004f4f0(*(longlong *)(param_1 + 0x20) + 0x1808,uVar3);
    if (((local_118 != (undefined *)0x0) && (local_118 != PTR_DAT_1403200a0)) &&
       (local_118 + -8 != (undefined *)0x0)) {
      uVar3 = FUN_1401568c0();
      local_78 = uVar3;
      FUN_140156b50(uVar3);
      local_70 = 1;
      piVar1 = (int *)(local_118 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_118 + -8);
      }
      FUN_140156be0(uVar3);
    }
    puVar8 = local_res20;
    LOCK();
    *(undefined4 *)(*(longlong *)(param_1 + 0x20) + 0x1840) = 1;
    UNLOCK();
    uVar3 = local_100;
    if (((local_res20 != (undefined *)0x0) && (local_res20 != PTR_DAT_1403200a0)) &&
       (puVar2 = local_res20 + -8, puVar2 != (undefined *)0x0)) {
      uVar3 = FUN_1401568c0();
      local_58 = uVar3;
      FUN_140156b50(uVar3);
      local_50 = 1;
      piVar1 = (int *)(puVar8 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar2);
      }
      FUN_140156be0(uVar3);
      uVar3 = local_100;
    }
  }
  FUN_140156be0(uVar3);
  return 1;
}



undefined8 FUN_1401686b0(longlong param_1,ulonglong param_2,undefined8 param_3,float *param_4)

{
  uint uVar1;
  longlong lVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  int *piVar5;
  longlong *plVar6;
  undefined8 uVar7;
  
  uVar4 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))
                    (*(longlong **)(param_1 + 0x20),param_2,param_3,param_4,0xfffffffffffffffe);
  FUN_140156b50(uVar4);
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  uVar1 = *(uint *)(*(longlong *)(param_1 + 0x20) + 0xca0);
  uVar3 = (param_2 & 0xffffffff) % (ulonglong)uVar1;
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x20) + 0xc80);
  if ((lVar2 != 0) && (piVar5 = *(int **)(lVar2 + uVar3 * 8), piVar5 != (int *)0x0)) {
    while ((uint)uVar3 == (uint)piVar5[8] % uVar1) {
      if (*piVar5 == (int)param_2) {
        lVar2 = *(longlong *)(piVar5 + 2);
        if ((lVar2 != 0) && (*(longlong *)(lVar2 + 0x228) == 0)) {
          uVar7 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x20) + 0x118) + 8))();
          *(undefined8 *)(lVar2 + 0x180) = uVar7;
          *(double *)(lVar2 + 0x1e0) = (double)*param_4;
          plVar6 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x4a8);
          (**(code **)(*plVar6 + 0xa0))(plVar6,param_2 & 0xffffffff,&DAT_140328530);
        }
        break;
      }
      piVar5 = *(int **)(piVar5 + 4);
      if (piVar5 == (int *)0x0) break;
    }
  }
  FUN_140156be0(uVar4);
  return 1;
}



undefined8 FUN_1401687f0(longlong param_1,uint param_2,undefined8 param_3,longlong param_4)

{
  uint uVar1;
  int iVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined8 uVar5;
  uint *puVar6;
  longlong *plVar7;
  undefined8 uVar8;
  undefined8 uVar9;
  undefined1 uVar10;
  
  uVar9 = 0xfffffffffffffffe;
  uVar5 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  uVar8 = uVar5;
  FUN_140156b50(uVar5);
  uVar10 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  uVar1 = *(uint *)(*(longlong *)(param_1 + 0x20) + 0xca0);
  uVar4 = (ulonglong)param_2 % (ulonglong)uVar1;
  lVar3 = *(longlong *)(*(longlong *)(param_1 + 0x20) + 0xc80);
  if ((lVar3 != 0) && (puVar6 = *(uint **)(lVar3 + uVar4 * 8), puVar6 != (uint *)0x0)) {
    while ((uint)uVar4 == puVar6[8] % uVar1) {
      if (*puVar6 == param_2) {
        lVar3 = *(longlong *)(puVar6 + 2);
        if ((lVar3 != 0) && (*(longlong *)(lVar3 + 0x228) == 0)) {
          iVar2 = *(int *)(param_4 + 0x18);
          if (iVar2 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          FUN_140050060(lVar3 + 0x1f8,iVar2,uVar4,(ulonglong)uVar1,uVar9,uVar8,uVar10);
          uVar9 = 0;
          uVar8 = uVar9;
          if (*(int *)(param_4 + 0x18) != 0) {
            uVar8 = *(undefined8 *)(param_4 + 0x10);
          }
          if (*(int *)(lVar3 + 0x210) != 0) {
            uVar9 = *(undefined8 *)(lVar3 + 0x208);
          }
          FUN_140050120(uVar9,uVar8,(longlong)iVar2);
          plVar7 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x4a8);
          (**(code **)(*plVar7 + 0xf0))(plVar7,(ulonglong)param_2,&DAT_140328530);
        }
        break;
      }
      puVar6 = *(uint **)(puVar6 + 4);
      if (puVar6 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar5);
  return 1;
}



undefined8 FUN_140168950(longlong param_1,uint param_2,undefined8 param_3,undefined8 param_4)

{
  uint uVar1;
  longlong lVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  uint *puVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  undefined1 uVar8;
  
  uVar6 = 0xfffffffffffffffe;
  uVar4 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  uVar7 = uVar4;
  FUN_140156b50(uVar4);
  uVar8 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  uVar1 = *(uint *)(*(longlong *)(param_1 + 0x20) + 0xca0);
  uVar3 = (ulonglong)param_2 % (ulonglong)uVar1;
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x20) + 0xc80);
  if ((lVar2 != 0) && (puVar5 = *(uint **)(lVar2 + uVar3 * 8), puVar5 != (uint *)0x0)) {
    while ((uint)uVar3 == puVar5[8] % uVar1) {
      if (*puVar5 == param_2) {
        lVar2 = *(longlong *)(puVar5 + 2);
        if ((lVar2 != 0) && (*(longlong *)(lVar2 + 0x228) == 0)) {
          FUN_14004f4f0(lVar2 + 0x1f0,param_4,uVar3,(ulonglong)uVar1,uVar6,uVar7,uVar8);
        }
        break;
      }
      puVar5 = *(uint **)(puVar5 + 4);
      if (puVar5 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar4);
  return 1;
}



// WARNING: Removing unreachable block (ram,0x000140168b4f)

undefined8
FUN_140168a40(longlong param_1,ulonglong param_2,undefined8 param_3,int *param_4,uint *param_5)

{
  undefined8 uVar1;
  longlong lVar2;
  longlong *plVar3;
  int *piVar4;
  longlong lVar5;
  
  uVar1 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))
                    (*(longlong **)(param_1 + 0x20),param_2,param_3,param_4,0xfffffffffffffffe);
  FUN_140156b50(uVar1);
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))
              (*(longlong **)(param_1 + 0x20),L"Proud::CNetServerImpl::C2SStub::ReportP2PPeerPing");
  }
  lVar2 = FUN_14015f740(*(undefined8 *)(param_1 + 0x20),param_2 & 0xffffffff);
  if (lVar2 != 0) {
    if (*(longlong *)(lVar2 + 0x6c0) == 0) {
      plVar3 = (longlong *)0x0;
    }
    else {
      plVar3 = *(longlong **)(lVar2 + 0x6b0);
    }
    for (; plVar3 != (longlong *)0x0; plVar3 = (longlong *)plVar3[2]) {
      if ((longlong *)*plVar3 == (longlong *)0x0) {
        lVar2 = 0;
      }
      else {
        lVar2 = *(longlong *)*plVar3;
      }
      lVar5 = 0;
      piVar4 = (int *)(lVar2 + 0x10);
      do {
        if (*piVar4 == *param_4) {
          *(double *)(lVar2 + 0x188) = (double)*param_5 / 1000.0;
          break;
        }
        lVar5 = lVar5 + 1;
        piVar4 = piVar4 + 0xc;
      } while (lVar5 < 2);
    }
  }
  FUN_140156be0(uVar1);
  return 1;
}



// WARNING: Removing unreachable block (ram,0x000140168d02)

undefined8
FUN_140168b80(longlong param_1,uint param_2,undefined8 param_3,int *param_4,int *param_5,
             int *param_6)

{
  uint uVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  longlong *plVar4;
  int *piVar5;
  uint *puVar6;
  longlong lVar7;
  longlong lVar8;
  
  uVar3 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar3);
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  uVar1 = *(uint *)(*(longlong *)(param_1 + 0x20) + 0xca0);
  uVar2 = (ulonglong)param_2 % (ulonglong)uVar1;
  lVar8 = *(longlong *)(*(longlong *)(param_1 + 0x20) + 0xc80);
  if ((lVar8 != 0) && (puVar6 = *(uint **)(lVar8 + uVar2 * 8), puVar6 != (uint *)0x0)) {
    while ((uint)uVar2 == puVar6[8] % uVar1) {
      if (*puVar6 == param_2) {
        lVar8 = *(longlong *)(puVar6 + 2);
        if (((lVar8 != 0) && (*(longlong *)(lVar8 + 0x228) == 0)) && (*param_4 != 0)) {
          *(int *)(lVar8 + 0x1d4) = *(int *)(lVar8 + 0x1d4) + *param_5;
          *(int *)(lVar8 + 0x1d0) = *(int *)(lVar8 + 0x1d0) + *param_6;
          if (*(longlong *)(lVar8 + 0x6c0) == 0) {
            plVar4 = (longlong *)0x0;
          }
          else {
            plVar4 = *(longlong **)(lVar8 + 0x6b0);
          }
          for (; plVar4 != (longlong *)0x0; plVar4 = (longlong *)plVar4[2]) {
            if ((longlong *)*plVar4 == (longlong *)0x0) {
              lVar8 = 0;
            }
            else {
              lVar8 = *(longlong *)*plVar4;
            }
            lVar7 = 0;
            piVar5 = (int *)(lVar8 + 0x10);
            do {
              if (*piVar5 == *param_4) {
                *(int *)(lVar8 + 0x1a8) = *param_5;
                *(int *)(lVar8 + 0x1a4) = *param_6;
                break;
              }
              lVar7 = lVar7 + 1;
              piVar5 = piVar5 + 0xc;
            } while (lVar7 < 2);
          }
        }
        break;
      }
      puVar6 = *(uint **)(puVar6 + 4);
      if (puVar6 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar3);
  return 1;
}



undefined8 FUN_140168d30(longlong param_1,uint param_2,undefined8 param_3,undefined4 *param_4)

{
  uint uVar1;
  longlong lVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  uint *puVar5;
  
  uVar4 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar4);
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  uVar1 = *(uint *)(*(longlong *)(param_1 + 0x20) + 0xca0);
  uVar3 = (ulonglong)param_2 % (ulonglong)uVar1;
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x20) + 0xc80);
  if ((lVar2 != 0) && (puVar5 = *(uint **)(lVar2 + uVar3 * 8), puVar5 != (uint *)0x0)) {
    while ((uint)uVar3 == puVar5[8] % uVar1) {
      if (*puVar5 == param_2) {
        lVar2 = *(longlong *)(puVar5 + 2);
        if ((lVar2 != 0) && (*(longlong *)(lVar2 + 0x228) == 0)) {
          *(undefined4 *)(lVar2 + 0x1d8) = *param_4;
        }
        break;
      }
      puVar5 = *(uint **)(puVar5 + 4);
      if (puVar5 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar4);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Removing unreachable block (ram,0x000140169280)

void FUN_140168e20(longlong *param_1)

{
  ulonglong _Size;
  undefined4 uVar1;
  longlong lVar2;
  code *pcVar3;
  undefined8 uVar4;
  double dVar5;
  undefined8 uVar6;
  ulonglong uVar7;
  undefined4 *puVar8;
  longlong lVar9;
  undefined1 *puVar10;
  undefined1 *puVar11;
  longlong lVar12;
  longlong lVar13;
  undefined8 *puVar14;
  undefined1 auStack_dd8 [32];
  undefined4 local_db8 [2];
  longlong local_db0;
  longlong local_da8;
  undefined4 local_da0;
  int local_d9c;
  undefined8 local_d90;
  char local_d88;
  longlong *local_d80;
  undefined8 local_d78;
  undefined1 local_d70;
  undefined8 local_d68;
  undefined1 local_d60;
  undefined8 local_d58;
  undefined4 uStack_d50;
  undefined4 uStack_d4c;
  undefined8 local_d48;
  undefined1 local_d40;
  undefined8 local_d38;
  undefined4 uStack_d30;
  undefined4 uStack_d2c;
  undefined8 local_d28;
  undefined1 local_d20 [72];
  undefined4 local_cd8;
  undefined4 uStack_cd4;
  undefined4 uStack_cd0;
  undefined4 uStack_ccc;
  undefined4 *local_58;
  undefined4 local_50;
  int local_4c;
  ulonglong local_48;
  
  puVar10 = auStack_dd8;
  puVar11 = auStack_dd8;
  local_d28 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)local_db8;
  uVar6 = (**(code **)(*param_1 + 0x58))();
  local_d48 = uVar6;
  FUN_140156b50(uVar6);
  local_d40 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::PurgeTooOldUnmatureClient");
  }
  if ((int)param_1[0x2e1] < 1) {
    FUN_140156be0(uVar6);
    goto LAB_140169338;
  }
  lVar13 = (longlong)(int)param_1[0x2e1] * 8;
  _Size = lVar13 + 0x10;
  if (_Size < 0x401) {
    uVar7 = lVar13 + 0x1f;
    if (uVar7 <= _Size) {
      uVar7 = 0xffffffffffffff0;
    }
    lVar13 = -(uVar7 & 0xfffffffffffffff0);
    puVar10 = auStack_dd8 + lVar13;
    puVar8 = (undefined4 *)((longlong)local_db8 + lVar13);
    puVar14 = (undefined8 *)0x0;
    puVar11 = auStack_dd8 + lVar13;
    if (puVar8 != (undefined4 *)0x0) {
      *puVar8 = 0xcccc;
LAB_140168f18:
      puVar14 = (undefined8 *)(puVar8 + 4);
      puVar11 = puVar10;
    }
  }
  else {
    puVar8 = malloc(_Size);
    puVar14 = (undefined8 *)0x0;
    puVar11 = auStack_dd8;
    if (puVar8 != (undefined4 *)0x0) {
      *puVar8 = 0xdddd;
      goto LAB_140168f18;
    }
  }
  *(undefined8 *)(puVar11 + -8) = 0x140168f28;
  dVar5 = (double)FUN_14018aee0(param_1 + 0xec);
  lVar12 = 0;
  lVar13 = lVar12;
  if (param_1[0x2e1] != 0) {
    lVar13 = param_1[0x2df];
  }
  for (; lVar13 != 0; lVar13 = *(longlong *)(lVar13 + 0x18)) {
    lVar2 = *(longlong *)(lVar13 + 0x10);
    if ((DAT_140328928 < dVar5 - *(double *)(lVar2 + 0x690)) && (*(char *)(lVar2 + 0x698) == '\0'))
    {
      *(undefined8 *)(puVar11 + -8) = 0x140168f7c;
      FUN_1401a37c0(lVar2 + 0xc0);
      puVar14[lVar12] = lVar2;
      lVar12 = lVar12 + 1;
    }
  }
  *(undefined8 *)(puVar11 + -8) = 0x140168f94;
  FUN_140156be0(uVar6);
  local_d40 = 0;
  while ((0 < lVar12 && (lVar13 = 0, 0 < lVar12))) {
    do {
      lVar2 = puVar14[lVar13];
      pcVar3 = *(code **)(*(longlong *)(lVar2 + 0x108) + 0x10);
      *(undefined8 *)(puVar11 + -8) = 0x140168fc2;
      uVar6 = (*pcVar3)();
      local_d88 = 0;
      local_d90 = uVar6;
      if (lVar13 == 0) {
        local_d88 = 1;
        *(undefined8 *)(puVar11 + -8) = 0x14016913d;
        FUN_140156b50(uVar6);
        *(undefined8 *)(puVar11 + -8) = 0x140169146;
        FUN_1401544a0(local_db8);
        *(undefined8 *)(puVar11 + -8) = 0x140169150;
        FUN_140153d90(local_db8);
        *(undefined8 *)(puVar11 + -8) = 0x14016915e;
        FUN_140154600(local_db8,0x800);
        *(undefined8 *)(puVar11 + -8) = 0x140169169;
        FUN_140154600(local_db8,0);
        *(undefined8 *)(puVar11 + -8) = 0x140169175;
        FUN_14004fd90(local_db8,3);
        local_4c = 200;
        local_50 = 0;
        local_58 = &local_cd8;
        if (local_db0 == 0) {
          uVar1 = local_da0;
          if (local_da8 == 0) {
                    // WARNING: Subroutine does not return
            *(undefined8 *)(puVar11 + -8) = 0x14016931f;
            FUN_1401561e0();
          }
        }
        else {
          uVar1 = *(undefined4 *)(local_db0 + 0x18);
        }
        lVar9 = local_da8;
        if (local_da8 == 0) {
          if (local_db0 == 0) {
                    // WARNING: Subroutine does not return
            *(undefined **)(puVar11 + -8) = &UNK_140169319;
            FUN_1401561e0();
          }
          lVar9 = 0;
          if (*(int *)(local_db0 + 0x18) != 0) {
            lVar9 = *(longlong *)(local_db0 + 0x10);
          }
        }
        local_50 = 1;
        local_d38._0_4_ = (undefined4)lVar9;
        local_d38._4_4_ = (undefined4)((ulonglong)lVar9 >> 0x20);
        local_cd8 = (undefined4)local_d38;
        uStack_cd4 = local_d38._4_4_;
        uStack_ccc = uStack_d2c;
        local_d68 = 0;
        local_d60 = 1;
        uVar4 = *(undefined8 *)(lVar2 + 0x748);
        local_d38 = lVar9;
        uStack_d30 = uVar1;
        uStack_cd0 = uVar1;
        *(undefined8 *)(puVar11 + -8) = 0x140169210;
        FUN_1401a3610(uVar4,&local_cd8);
        if (local_58 == (undefined4 *)0x0) {
          *(undefined8 *)(puVar11 + -8) = 0x140169300;
          FUN_140156300(local_d20,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
          *(undefined8 *)(puVar11 + -8) = 0x140169313;
          _CxxThrowException(local_d20,(ThrowInfo *)&DAT_14031d928);
        }
        if (local_4c < 0) {
                    // WARNING: Subroutine does not return
          *(undefined **)(puVar11 + -8) = &UNK_1401692ec;
          FUN_1401566b0();
        }
        *(undefined1 *)(lVar2 + 0x698) = 1;
        *(undefined8 *)(puVar11 + -8) = 0x14016923d;
        FUN_140156be0(uVar6);
        local_d88 = '\0';
        *(undefined8 *)(puVar11 + -8) = 0x14016924f;
        FUN_1401a37d0(lVar2 + 0xc0);
        *puVar14 = puVar14[lVar12 + -1];
        lVar12 = lVar12 + -1;
        local_d80 = &local_db0;
        *(undefined8 *)(puVar11 + -8) = 0x14016926e;
        FUN_1401560e0(&local_db0);
        if ((local_da8 != 0) && (local_d9c < 0)) {
                    // WARNING: Subroutine does not return
          *(undefined8 *)(puVar11 + -8) = 0x1401692e6;
          FUN_1401566b0();
        }
      }
      else {
        *(undefined8 *)(puVar11 + -8) = 0x140168fde;
        local_d88 = FUN_140156ba0();
        if (local_d88 != '\0') {
          *(undefined8 *)(puVar11 + -8) = 0x140168ff5;
          FUN_1401544a0(local_db8);
          *(undefined8 *)(puVar11 + -8) = 0x140168fff;
          FUN_140153d90(local_db8);
          *(undefined8 *)(puVar11 + -8) = 0x14016900d;
          FUN_140154600(local_db8,0x800);
          *(undefined8 *)(puVar11 + -8) = 0x140169018;
          FUN_140154600(local_db8,0);
          *(undefined8 *)(puVar11 + -8) = 0x140169024;
          FUN_14004fd90(local_db8,3);
          local_4c = 200;
          local_50 = 0;
          local_58 = &local_cd8;
          if (local_db0 == 0) {
            uVar1 = local_da0;
            if (local_da8 == 0) {
                    // WARNING: Subroutine does not return
              *(undefined8 *)(puVar11 + -8) = 0x1401692e0;
              FUN_1401561e0();
            }
          }
          else {
            uVar1 = *(undefined4 *)(local_db0 + 0x18);
          }
          lVar9 = local_da8;
          if (local_da8 == 0) {
            if (local_db0 == 0) {
                    // WARNING: Subroutine does not return
              *(undefined **)(puVar11 + -8) = &UNK_1401692da;
              FUN_1401561e0();
            }
            lVar9 = 0;
            if (*(int *)(local_db0 + 0x18) != 0) {
              lVar9 = *(longlong *)(local_db0 + 0x10);
            }
          }
          local_50 = 1;
          local_d58._0_4_ = (undefined4)lVar9;
          local_d58._4_4_ = (undefined4)((ulonglong)lVar9 >> 0x20);
          local_cd8 = (undefined4)local_d58;
          uStack_cd4 = local_d58._4_4_;
          uStack_ccc = uStack_d4c;
          local_d78 = 0;
          local_d70 = 1;
          uVar4 = *(undefined8 *)(lVar2 + 0x748);
          local_d58 = lVar9;
          uStack_d50 = uVar1;
          uStack_cd0 = uVar1;
          *(undefined8 *)(puVar11 + -8) = 0x1401690ba;
          FUN_1401a3610(uVar4,&local_cd8);
          if (local_58 == (undefined4 *)0x0) {
            *(undefined8 *)(puVar11 + -8) = 0x1401692c1;
            FUN_140156300(local_d20,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
            *(undefined8 *)(puVar11 + -8) = 0x1401692d4;
            _CxxThrowException(local_d20,(ThrowInfo *)&DAT_14031d928);
          }
          if (local_4c < 0) {
                    // WARNING: Subroutine does not return
            *(undefined **)(puVar11 + -8) = &UNK_1401692ad;
            FUN_1401566b0();
          }
          *(undefined1 *)(lVar2 + 0x698) = 1;
          *(undefined8 *)(puVar11 + -8) = 0x1401690e7;
          FUN_140156be0(uVar6);
          local_d88 = '\0';
          *(undefined8 *)(puVar11 + -8) = 0x1401690f9;
          FUN_1401a37d0(lVar2 + 0xc0);
          puVar14[lVar13] = puVar14[lVar12 + -1];
          lVar12 = lVar12 + -1;
          local_d80 = &local_db0;
          *(undefined8 *)(puVar11 + -8) = 0x140169119;
          FUN_1401560e0(&local_db0);
          if ((local_da8 != 0) && (local_d9c < 0)) {
                    // WARNING: Subroutine does not return
            *(undefined8 *)(puVar11 + -8) = 0x1401692a7;
            FUN_1401566b0();
          }
        }
      }
      lVar13 = lVar13 + 1;
    } while (lVar13 < lVar12);
  }
  if ((puVar14 != (undefined8 *)0x0) && (*(int *)(puVar14 + -2) == 0xdddd)) {
    *(undefined8 *)(puVar11 + -8) = 0x140169337;
    free(puVar14 + -2);
  }
LAB_140169338:
  *(undefined8 *)(puVar11 + -8) = 0x140169347;
  return;
}



longlong * FUN_140169380(longlong *param_1,uint param_2,undefined8 param_3)

{
  ulonglong uVar1;
  char cVar2;
  undefined8 uVar3;
  longlong *plVar4;
  uint *puVar5;
  longlong *plVar6;
  wchar_t *pwVar7;
  undefined8 uVar8;
  undefined8 uVar9;
  undefined1 uVar10;
  
  uVar8 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*param_1 + 0x58))();
  uVar9 = uVar3;
  FUN_140156b50(uVar3);
  uVar10 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1);
  }
  uVar1 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0x194);
  plVar6 = (longlong *)0x0;
  if ((param_1[400] != 0) && (puVar5 = *(uint **)(param_1[400] + uVar1 * 8), puVar5 != (uint *)0x0))
  {
    while ((uint)uVar1 == puVar5[8] % *(uint *)(param_1 + 0x194)) {
      if (*puVar5 == param_2) {
        plVar4 = *(longlong **)(puVar5 + 2);
        if ((plVar4 != (longlong *)0x0) && (plVar4[0x45] == 0)) goto LAB_140169441;
        break;
      }
      puVar5 = *(uint **)(puVar5 + 4);
      if (puVar5 == (uint *)0x0) break;
    }
  }
  plVar4 = plVar6;
LAB_140169441:
  if (plVar4 == (longlong *)0x0) {
    if (param_2 == 1) {
      plVar6 = param_1 + 0x108;
      goto LAB_14016945b;
    }
  }
  else {
    plVar6 = plVar4 + 0x51;
LAB_14016945b:
    if (plVar6 != (longlong *)0x0) {
      cVar2 = FUN_140198740(plVar6);
      if ((cVar2 == '\0') || (((char)plVar6[0x7f] == '\0' && ((int)plVar6[0x7d] == 0)))) {
        FUN_14004ce50(param_3,L"key not exists");
        FUN_140156be0(uVar3);
        return (longlong *)0x0;
      }
      goto LAB_1401694c2;
    }
  }
  pwVar7 = L"not NULL";
  if (plVar4 == (longlong *)0x0) {
    pwVar7 = L"NULL";
  }
  FUN_14004ce50(param_3,L"%d remote rc is %s in netserver!",param_2,pwVar7,uVar8,uVar9,uVar10);
LAB_1401694c2:
  FUN_140156be0(uVar3);
  return plVar6;
}



undefined8 FUN_1401694f0(longlong param_1,uint param_2)

{
  int *piVar1;
  longlong *plVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined *puVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  uint *puVar8;
  undefined *puVar9;
  undefined *local_res8;
  
  plVar2 = (longlong *)(param_1 + -0xa8);
  uVar6 = (**(code **)(*plVar2 + 0x58))(plVar2);
  FUN_140156b50(uVar6);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*plVar2 + 200))(plVar2);
  }
  uVar4 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0xbf8);
  if ((*(longlong *)(param_1 + 0xbd8) != 0) &&
     (puVar8 = *(uint **)(*(longlong *)(param_1 + 0xbd8) + uVar4 * 8), puVar8 != (uint *)0x0)) {
    while ((uint)uVar4 == puVar8[8] % *(uint *)(param_1 + 0xbf8)) {
      if (*puVar8 == param_2) {
        lVar3 = *(longlong *)(puVar8 + 2);
        if ((lVar3 != 0) && (*(longlong *)(lVar3 + 0x228) == 0)) {
          if (*(longlong *)(param_1 + 0x1748) != 0) {
            FUN_1401568c0();
            local_res8 = PTR_DAT_1403200a0;
            FUN_14004ce50(&local_res8,&DAT_14025e700,param_2);
            puVar5 = local_res8;
            puVar9 = local_res8;
            if (local_res8 == (undefined *)0x0) {
              puVar9 = PTR_DAT_1403200a0;
            }
            FUN_140196a90(*(undefined8 *)(param_1 + 0x1748),0,puVar9);
            if (((puVar5 != (undefined *)0x0) && (puVar5 != PTR_DAT_1403200a0)) &&
               (puVar5 + -8 != (undefined *)0x0)) {
              uVar7 = FUN_1401568c0();
              FUN_140156b50(uVar7);
              piVar1 = (int *)(puVar5 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(puVar5 + -8);
              }
              FUN_140156be0(uVar7);
            }
          }
          if (*(double *)(lVar3 + 0x758) == 0.0) {
            uVar7 = (**(code **)(*(longlong *)(param_1 + 0x70) + 8))();
            *(undefined8 *)(lVar3 + 0x758) = uVar7;
            (**(code **)(*(longlong *)(param_1 + 0x400) + 0x100))
                      ((longlong *)(param_1 + 0x400),*(undefined4 *)(lVar3 + 0x6f8),&DAT_140328530);
          }
          FUN_140156be0(uVar6);
          return 1;
        }
        break;
      }
      puVar8 = *(uint **)(puVar8 + 4);
      if (puVar8 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar6);
  return 0;
}



double FUN_1401696e0(longlong param_1,uint param_2,int param_3)

{
  double dVar1;
  double dVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined8 uVar5;
  longlong *plVar6;
  int *piVar7;
  uint *puVar8;
  longlong lVar9;
  longlong lVar10;
  
  uVar5 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar5);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))(param_1 + -0xa8);
  }
  uVar4 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0xbf8);
  if ((*(longlong *)(param_1 + 0xbd8) != 0) &&
     (puVar8 = *(uint **)(*(longlong *)(param_1 + 0xbd8) + uVar4 * 8), puVar8 != (uint *)0x0)) {
    while ((uint)uVar4 == puVar8[8] % *(uint *)(param_1 + 0xbf8)) {
      if (*puVar8 == param_2) {
        lVar3 = *(longlong *)(puVar8 + 2);
        if ((lVar3 != 0) && (*(longlong *)(lVar3 + 0x228) == 0)) {
          if (*(longlong *)(lVar3 + 0x6c0) == 0) {
            plVar6 = (longlong *)0x0;
          }
          else {
            plVar6 = *(longlong **)(lVar3 + 0x6b0);
          }
          for (; plVar6 != (longlong *)0x0; plVar6 = (longlong *)plVar6[2]) {
            if (plVar6 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
              FUN_14004ea80(0x80004005);
            }
            if ((longlong *)*plVar6 == (longlong *)0x0) {
              lVar10 = 0;
            }
            else {
              lVar10 = *(longlong *)*plVar6;
            }
            lVar9 = 0;
            piVar7 = (int *)(lVar10 + 0x10);
            do {
              if (*piVar7 == param_3) {
                if (*(char *)(lVar10 + 8) != '\0') {
                  lVar9 = *(longlong *)(lVar10 + 0x100);
                  if (lVar9 == lVar3) {
                    lVar9 = *(longlong *)(lVar10 + 0x108);
                  }
                  dVar1 = *(double *)(lVar3 + 0x1c8);
                  dVar2 = *(double *)(lVar9 + 0x1c8);
                  FUN_140156be0(uVar5);
                  return dVar1 + dVar2;
                }
                dVar1 = *(double *)(lVar10 + 0x188);
                FUN_140156be0(uVar5);
                return dVar1;
              }
              lVar9 = lVar9 + 1;
              piVar7 = piVar7 + 0xc;
            } while (lVar9 < 2);
          }
        }
        break;
      }
      puVar8 = *(uint **)(puVar8 + 4);
      if (puVar8 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar5);
  return 0.0;
}



undefined8 * FUN_1401698e0(longlong param_1,undefined8 *param_2)

{
  longlong lVar1;
  int iVar2;
  
  iVar2 = FUN_1401a4af0(param_1 + 0xcd0,*(int *)(param_1 + 0x6e0) + -1);
  if ((-1 < iVar2) && (iVar2 < *(int *)(param_1 + 0x6e0))) {
    lVar1 = *(longlong *)(param_1 + 0x6d8);
    *param_2 = 0;
    FUN_1401d43e0(param_2,lVar1 + (longlong)iVar2 * 8);
    return param_2;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566e0();
}



void thunk_FUN_140161a30(void)

{
  FUN_140161a30();
  return;
}



void thunk_FUN_1401b2400(void)

{
  FUN_1401b2400();
  return;
}



// WARNING: Removing unreachable block (ram,0x000140169bcd)
// WARNING: Removing unreachable block (ram,0x000140169b3a)

undefined8 FUN_140169970(longlong param_1,uint param_2,uint param_3,undefined8 *param_4)

{
  uint uVar1;
  longlong lVar2;
  undefined8 uVar3;
  longlong *plVar4;
  uint *puVar5;
  longlong *plVar6;
  longlong *plVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *plVar11;
  
  uVar3 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar3);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))(param_1 + -0xa8);
  }
  plVar11 = (longlong *)0x0;
  param_4[1] = 0;
  *param_4 = 0;
  uVar1 = *(uint *)(param_1 + 0xbf8);
  lVar2 = *(longlong *)(param_1 + 0xbd8);
  if ((lVar2 != 0) &&
     (puVar5 = *(uint **)(lVar2 + ((ulonglong)param_2 % (ulonglong)uVar1) * 8),
     puVar5 != (uint *)0x0)) {
    while ((uint)((ulonglong)param_2 % (ulonglong)uVar1) == puVar5[8] % uVar1) {
      if (*puVar5 == param_2) {
        plVar9 = *(longlong **)(puVar5 + 2);
        if ((plVar9 != (longlong *)0x0) && (plVar9[0x45] == 0)) goto LAB_140169a51;
        break;
      }
      puVar5 = *(uint **)(puVar5 + 4);
      if (puVar5 == (uint *)0x0) break;
    }
  }
  plVar9 = plVar11;
LAB_140169a51:
  if ((lVar2 != 0) &&
     (puVar5 = *(uint **)(lVar2 + ((ulonglong)param_3 % (ulonglong)uVar1) * 8),
     puVar5 != (uint *)0x0)) {
    while ((uint)((ulonglong)param_3 % (ulonglong)uVar1) == puVar5[8] % uVar1) {
      if (*puVar5 == param_3) {
        plVar8 = *(longlong **)(puVar5 + 2);
        if ((plVar8 != (longlong *)0x0) && (plVar8[0x45] == 0)) goto LAB_140169aa1;
        break;
      }
      puVar5 = *(uint **)(puVar5 + 4);
      if (puVar5 == (uint *)0x0) break;
    }
  }
  plVar8 = plVar11;
LAB_140169aa1:
  if ((plVar9 == (longlong *)0x0) || (plVar8 == (longlong *)0x0)) {
    FUN_140156be0(uVar3);
    uVar3 = 0;
  }
  else {
    plVar10 = plVar11;
    if (plVar9[0xd8] != 0) {
      plVar10 = (longlong *)plVar9[0xd6];
    }
    for (; plVar10 != (longlong *)0x0; plVar10 = (longlong *)plVar10[2]) {
      plVar4 = plVar11;
      if ((undefined8 *)*plVar10 != (undefined8 *)0x0) {
        plVar4 = *(longlong **)*plVar10;
      }
      plVar7 = plVar4 + 2;
      plVar6 = plVar11;
      do {
        if ((int)*plVar7 == (int)plVar8[0xdf]) {
          *(undefined4 *)((longlong)param_4 + 4) = *(undefined4 *)((longlong)plVar4 + 0x1a4);
          *(int *)param_4 = (int)plVar4[0x35];
          break;
        }
        plVar6 = (longlong *)((longlong)plVar6 + 1);
        plVar7 = plVar7 + 6;
      } while ((longlong)plVar6 < 2);
    }
    plVar10 = plVar11;
    if (plVar8[0xd8] != 0) {
      plVar10 = (longlong *)plVar8[0xd6];
    }
    for (; plVar10 != (longlong *)0x0; plVar10 = (longlong *)plVar10[2]) {
      plVar8 = plVar11;
      if ((undefined8 *)*plVar10 != (undefined8 *)0x0) {
        plVar8 = *(longlong **)*plVar10;
      }
      plVar4 = plVar8 + 2;
      plVar7 = plVar11;
      do {
        if ((int)*plVar4 == (int)plVar9[0xdf]) {
          *(undefined4 *)((longlong)param_4 + 0xc) = *(undefined4 *)((longlong)plVar8 + 0x1a4);
          *(int *)(param_4 + 1) = (int)plVar8[0x35];
          break;
        }
        plVar7 = (longlong *)((longlong)plVar7 + 1);
        plVar4 = plVar4 + 6;
      } while ((longlong)plVar7 < 2);
    }
    FUN_140156be0(uVar3);
    uVar3 = 1;
  }
  return uVar3;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

longlong * FUN_140169c10(longlong param_1,longlong *param_2)

{
  int *piVar1;
  char cVar2;
  undefined8 uVar3;
  longlong *plVar4;
  undefined *puVar5;
  undefined1 auStack_128 [32];
  undefined4 local_108;
  undefined4 uStack_104;
  undefined *local_100;
  undefined2 local_f8;
  undefined8 local_f0;
  undefined1 local_e8;
  undefined8 local_e0;
  undefined1 local_d8 [16];
  undefined1 local_c8 [16];
  undefined1 *local_b8;
  undefined1 local_b0 [136];
  ulonglong local_28;
  
  local_e0 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_128;
  local_108 = 0;
  plVar4 = *(longlong **)(param_1 + 0x6a0);
  if ((plVar4 == (longlong *)0x0) || (*plVar4 == 0)) {
    FUN_1401568c0();
    *param_2 = (longlong)PTR_DAT_140320098;
    FUN_140050450(param_2,&DAT_140328890);
    *(undefined2 *)(param_2 + 1) = DAT_140328898;
  }
  else {
    uVar3 = FUN_140184b60(*plVar4,local_d8);
    FUN_140159940(&local_100,uVar3);
    uVar3 = FUN_14015a100(local_c8);
    plVar4 = (longlong *)FUN_140159850(uVar3,&local_108);
    puVar5 = (undefined *)*plVar4;
    if ((undefined *)*plVar4 == (undefined *)0x0) {
      puVar5 = PTR_DAT_140320098;
    }
    FUN_140159b70(&local_100,puVar5);
    puVar5 = (undefined *)CONCAT44(uStack_104,local_108);
    if (((puVar5 != (undefined *)0x0) && (puVar5 != PTR_DAT_140320098)) &&
       (puVar5 + -8 != (undefined *)0x0)) {
      uVar3 = FUN_1401568c0();
      local_f0 = uVar3;
      FUN_140156b50(uVar3);
      local_e8 = 1;
      piVar1 = (int *)(puVar5 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar5 + -8);
      }
      FUN_140156be0(uVar3);
    }
    puVar5 = *(undefined **)(param_1 + 0x170);
    if (*(undefined **)(param_1 + 0x170) == (undefined *)0x0) {
      puVar5 = PTR_DAT_140320098;
    }
    FUN_140159b70(&local_100,puVar5);
    puVar5 = *(undefined **)(param_1 + 0x168);
    if (*(undefined **)(param_1 + 0x168) == (undefined *)0x0) {
      puVar5 = PTR_DAT_140320098;
    }
    FUN_140159b70(&local_100,puVar5);
    cVar2 = FUN_140159f90(&local_100);
    if (cVar2 == '\0') {
      plVar4 = (longlong *)FUN_140159bb0(&local_108);
      puVar5 = (undefined *)*plVar4;
      if ((undefined *)*plVar4 == (undefined *)0x0) {
        puVar5 = PTR_DAT_1403200a0;
      }
      local_b8 = local_b0;
      FUN_140153e40(&local_b8,puVar5,3);
      FUN_140155010(&local_100,local_b8);
      if (local_b8 != local_b0) {
        free(local_b8);
      }
      puVar5 = (undefined *)CONCAT44(uStack_104,local_108);
      if (((puVar5 != (undefined *)0x0) && (puVar5 != PTR_DAT_1403200a0)) &&
         (puVar5 + -8 != (undefined *)0x0)) {
        uVar3 = FUN_1401568c0();
        local_f0 = uVar3;
        FUN_140156b50(uVar3);
        local_e8 = 1;
        piVar1 = (int *)(puVar5 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar5 + -8);
        }
        FUN_140156be0(uVar3);
      }
    }
    FUN_1401568c0();
    puVar5 = PTR_DAT_140320098;
    *param_2 = (longlong)PTR_DAT_140320098;
    if (puVar5 == (undefined *)0x0) {
      *param_2 = (longlong)PTR_DAT_140320098;
    }
    if (local_100 != (undefined *)*param_2) {
      uVar3 = FUN_1401568c0();
      local_f0 = uVar3;
      FUN_140156b50(uVar3);
      local_e8 = 1;
      FUN_140050520(param_2);
      *param_2 = (longlong)local_100;
      if (((local_100 != PTR_DAT_140320098) && (local_100 != (undefined *)0x0)) &&
         (local_100 != (undefined *)0x8)) {
        *(int *)(local_100 + -4) = *(int *)(local_100 + -4) + 1;
      }
      FUN_140156be0(uVar3);
    }
    *(undefined2 *)(param_2 + 1) = local_f8;
    if (((local_100 != (undefined *)0x0) && (local_100 != PTR_DAT_140320098)) &&
       (local_100 + -8 != (undefined *)0x0)) {
      uVar3 = FUN_1401568c0();
      local_f0 = uVar3;
      FUN_140156b50(uVar3);
      local_e8 = 1;
      piVar1 = (int *)(local_100 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_100 + -8);
      }
      FUN_140156be0(uVar3);
    }
  }
  return param_2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140169f10(undefined8 param_1,longlong *param_2,double param_3)

{
  undefined4 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  undefined1 auStack_d78 [32];
  undefined8 local_d58;
  undefined8 uStack_d50;
  undefined1 local_d48;
  undefined4 local_d44;
  undefined1 local_d40;
  undefined1 local_d3f;
  undefined1 local_d38 [8];
  longlong local_d30;
  longlong local_d28;
  undefined4 local_d20;
  int local_d1c;
  undefined8 local_d10;
  undefined1 local_d08;
  undefined8 local_d00;
  undefined1 local_cf8 [80];
  undefined4 local_ca8;
  uint uStack_ca4;
  undefined4 uStack_ca0;
  undefined4 uStack_c9c;
  undefined4 *local_28;
  undefined4 local_20;
  int local_1c;
  ulonglong local_18;
  
  local_d00 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_d78;
  if (((DAT_140320d28 * 1.5 < param_3 - (double)param_2[0x37]) &&
      (param_3 - (double)param_2[0x33] < DAT_140320d28)) &&
     (DAT_140320d28 < param_3 - (double)param_2[0x34])) {
    param_2[0x34] = (longlong)param_3;
    FUN_1401544a0(local_d38);
    FUN_140153d90(local_d38);
    FUN_14004fd90(local_d38,0x1d);
    uVar2 = (**(code **)(param_2[0x21] + 0x10))();
    local_d10 = uVar2;
    FUN_140156b50(uVar2);
    local_d08 = 1;
    local_1c = 200;
    local_20 = 0;
    local_28 = &local_ca8;
    if (local_d30 == 0) {
      if (local_d28 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
    }
    else {
      local_d20 = *(undefined4 *)(local_d30 + 0x18);
    }
    lVar3 = local_d28;
    if (local_d28 == 0) {
      if (local_d30 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      lVar3 = 0;
      if (*(int *)(local_d30 + 0x18) != 0) {
        lVar3 = *(longlong *)(local_d30 + 0x10);
      }
    }
    local_20 = 1;
    local_d58._0_4_ = (undefined4)lVar3;
    local_d58._4_4_ = (uint)((ulonglong)lVar3 >> 0x20);
    local_ca8 = (undefined4)local_d58;
    uStack_ca4 = local_d58._4_4_;
    uStack_c9c = uStack_d50._4_4_;
    local_d58 = (longlong *)((ulonglong)local_d58._4_4_ << 0x20);
    uStack_d50 = 0;
    local_d48 = 1;
    local_d44 = 0xffffffff;
    local_d40 = 1;
    local_d3f = DAT_140320dfc;
    uStack_ca0 = local_d20;
    uVar1 = (**(code **)(*param_2 + 0x10))(param_2);
    FUN_1401a4be0(param_2 + 0xe0,uVar1,&local_ca8,&local_d58);
    if (local_28 == (undefined4 *)0x0) {
      FUN_140156300(local_cf8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_cf8,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_1c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_140156be0(uVar2);
    local_d58 = &local_d30;
    FUN_1401560e0(&local_d30);
    if ((local_d28 != 0) && (local_d1c < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14016a150(longlong param_1,undefined4 *param_2)

{
  undefined4 uVar1;
  longlong lVar2;
  undefined1 uVar3;
  char cVar4;
  undefined4 *puVar5;
  longlong lVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  undefined1 *puVar9;
  undefined1 *puVar10;
  int iVar11;
  ulonglong uVar12;
  longlong *plVar13;
  ulonglong uVar14;
  longlong *plVar15;
  double dVar16;
  undefined8 uVar17;
  double dVar18;
  undefined1 auStack_d8 [32];
  undefined4 local_b8;
  longlong local_a8;
  longlong local_a0;
  double local_98;
  ulonglong local_90;
  undefined4 *local_88;
  longlong *local_80;
  undefined8 local_60;
  ulonglong local_58;
  
  puVar10 = auStack_d8;
  puVar9 = auStack_d8;
  local_60 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)&local_a8;
  dVar16 = (double)(**(code **)(*(longlong *)(param_1 + 0x118) + 8))();
  local_98 = dVar16;
  if ((*(longlong *)(param_2 + 10) == 0) || (*(char *)(param_2 + 0x22) == '\0')) {
    FUN_14015be50(param_2 + 0x18,0);
    goto LAB_14016a70e;
  }
  local_88 = param_2 + 2;
  uVar12 = 0;
  uVar7 = uVar12;
  if (*(longlong *)(param_2 + 10) != 0) {
    uVar7 = *(ulonglong *)(param_2 + 6);
  }
  while (uVar14 = uVar7, local_90 = uVar14, uVar14 != 0) {
    if (uVar14 == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    local_80 = *(longlong **)(uVar14 + 8);
    local_a0 = 0;
    local_b8 = 0;
    lVar6 = __RTDynamicCast(*(undefined8 *)(uVar14 + 0x10),0,
                            &Proud::CP2PGroupMemberBase_S::RTTI_Type_Descriptor,
                            &Proud::CRemoteClient_S::RTTI_Type_Descriptor);
    local_a0 = lVar6;
    if ((lVar6 != 0) &&
       ((((*(double *)(lVar6 + 0x1b0) == 0.0 || ((int)param_2[0x1e] < 1)) ||
         (**(int **)(param_2 + 0x1c) != *(int *)(lVar6 + 0x6f8))) ||
        (*(char *)(lVar6 + 0x700) == '\0')))) {
      *(undefined8 *)(lVar6 + 0x1b0) = 0;
      if (*(char *)(lVar6 + 0x700) != '\0') {
        *(double *)(lVar6 + 0x1b0) = *(double *)(param_2 + 0x24) + 0.0;
      }
      cVar4 = FUN_14019ca40(lVar6);
      if (cVar4 == '\0') {
        *(double *)(lVar6 + 0x1b0) = *(double *)(param_2 + 0x26) + *(double *)(lVar6 + 0x1b0);
      }
      dVar18 = *(double *)(lVar6 + 0x1b0) - *(double *)(lVar6 + 0x1c8) * *(double *)(param_2 + 0x28)
      ;
      *(double *)(lVar6 + 0x1b0) = dVar18;
      *(double *)(lVar6 + 0x1b0) = *(double *)(lVar6 + 0x1e0) * *(double *)(param_2 + 0x2e) + dVar18
      ;
      dVar18 = (double)FUN_14019d860(lVar6);
      if (0.0 <= dVar18) {
        dVar18 = (double)FUN_14019d860(lVar6);
      }
      else {
        dVar18 = 0.0;
      }
      dVar18 = *(double *)(lVar6 + 0x1b0) - dVar18 * *(double *)(param_2 + 0x2a);
      *(double *)(lVar6 + 0x1b0) = dVar18;
      *(double *)(lVar6 + 0x1b0) =
           *(double *)(lVar6 + 400) * *(double *)(param_2 + 0x2c) * 10485760.0 + dVar18;
      if ((0.0 < *(double *)(param_2 + 0x30)) &&
         (dVar16 - (double)local_80 < *(double *)(param_2 + 0x30))) {
        *(undefined8 *)(lVar6 + 0x1b0) = 0xc65c662460d49e87;
      }
    }
    uVar7 = uVar12;
    if (uVar14 != 0) {
      uVar7 = *(ulonglong *)(uVar14 + 0x18);
    }
  }
  lVar6 = *(longlong *)(param_2 + 10);
  if (lVar6 * 0x18 + 0x10U < 0x401) {
    uVar7 = lVar6 * 0x18 + 0x1f;
    if (uVar7 <= lVar6 * 0x18 + 0x10U) {
      uVar7 = 0xffffffffffffff0;
    }
    lVar6 = -(uVar7 & 0xfffffffffffffff0);
    puVar9 = auStack_d8 + lVar6;
    puVar5 = (undefined4 *)((longlong)&local_a8 + lVar6);
    plVar13 = (longlong *)0x0;
    puVar10 = auStack_d8 + lVar6;
    if (puVar5 != (undefined4 *)0x0) {
      *puVar5 = 0xcccc;
LAB_14016a287:
      plVar13 = (longlong *)(puVar5 + 4);
      puVar10 = puVar9;
    }
  }
  else {
    puVar5 = malloc(lVar6 * 0x18 + 0x10);
    plVar13 = (longlong *)0x0;
    puVar10 = auStack_d8;
    if (puVar5 != (undefined4 *)0x0) {
      *puVar5 = 0xdddd;
      goto LAB_14016a287;
    }
  }
  local_a8._0_4_ = 0;
  local_88 = param_2 + 2;
  uVar7 = uVar12;
  uVar14 = uVar12;
  local_80 = plVar13;
  if (*(longlong *)(param_2 + 10) != 0) {
    uVar7 = *(ulonglong *)(param_2 + 6);
  }
  while (uVar8 = uVar7, iVar11 = (int)uVar14, local_90 = uVar8, uVar8 != 0) {
    local_a0 = 0;
    if (uVar8 == 0) {
                    // WARNING: Subroutine does not return
      *(undefined8 *)(puVar10 + -8) = 0x14016a491;
      FUN_14004ea80(0x80004005);
    }
    *(undefined4 *)(puVar10 + 0x20) = 0;
    uVar17 = *(undefined8 *)(uVar8 + 0x10);
    *(undefined8 *)(puVar10 + -8) = 0x14016a4ae;
    local_a0 = __RTDynamicCast(uVar17,0,&Proud::CP2PGroupMemberBase_S::RTTI_Type_Descriptor,
                               &Proud::CRemoteClient_S::RTTI_Type_Descriptor);
    if (local_a0 != 0) {
      lVar6 = (longlong)iVar11;
      plVar13[lVar6 * 3] = local_a0;
      plVar13[lVar6 * 3 + 1] = (longlong)param_2;
      if (uVar8 == 0) {
                    // WARNING: Subroutine does not return
        *(undefined **)(puVar10 + -8) = &UNK_14016a4fd;
        FUN_14004ea80(0x80004005);
      }
      plVar13[lVar6 * 3 + 2] = (longlong)(dVar16 - *(double *)(uVar8 + 8));
      local_a8._0_4_ = iVar11 + 1;
      uVar14 = (ulonglong)(uint)local_a8;
    }
    uVar7 = uVar12;
    if (uVar8 != 0) {
      uVar7 = *(ulonglong *)(uVar8 + 0x18);
    }
  }
  *(undefined8 *)(puVar10 + -8) = 0x14016a2d5;
  FUN_140161d80(plVar13,uVar14,0);
  *(undefined8 *)(puVar10 + -8) = 0x14016a2e1;
  FUN_14015be50(param_2 + 0x18,uVar14);
  local_a8 = 0;
  local_98 = (double)(longlong)iVar11;
  uVar7 = uVar12;
  plVar15 = plVar13;
  if (0 < iVar11) {
    do {
      if ((local_a8 < 0) || (iVar11 = (int)uVar12, (int)param_2[0x1e] <= iVar11)) {
                    // WARNING: Subroutine does not return
        *(undefined **)(puVar10 + -8) = &UNK_14016a452;
        FUN_1401566e0();
      }
      *(undefined4 *)(uVar7 + *(longlong *)(param_2 + 0x1c)) = *(undefined4 *)(*plVar15 + 0x6f8);
      if ((int)param_2[0x1e] <= iVar11) {
                    // WARNING: Subroutine does not return
        *(undefined **)(puVar10 + -8) = &UNK_14016a44c;
        FUN_1401566e0();
      }
      *(undefined8 *)(*(longlong *)(param_2 + 0x1c) + 8 + uVar7) = *(undefined8 *)(*plVar15 + 0x1b0)
      ;
      if ((int)param_2[0x1e] <= iVar11) {
                    // WARNING: Subroutine does not return
        *(undefined **)(puVar10 + -8) = &UNK_14016a446;
        FUN_1401566e0();
      }
      *(undefined1 *)(*(longlong *)(param_2 + 0x1c) + 0x10 + uVar7) =
           *(undefined1 *)(*plVar15 + 0x700);
      if ((int)param_2[0x1e] <= iVar11) {
                    // WARNING: Subroutine does not return
        *(undefined **)(puVar10 + -8) = &UNK_14016a440;
        FUN_1401566e0();
      }
      lVar6 = *(longlong *)(param_2 + 0x1c);
      lVar2 = *plVar15;
      *(undefined8 *)(puVar10 + -8) = 0x14016a374;
      uVar3 = FUN_14019ca40(lVar2);
      *(undefined1 *)(uVar7 + 0x11 + lVar6) = uVar3;
      if ((int)param_2[0x1e] <= iVar11) {
                    // WARNING: Subroutine does not return
        *(undefined **)(puVar10 + -8) = &UNK_14016a43a;
        FUN_1401566e0();
      }
      *(undefined8 *)(*(longlong *)(param_2 + 0x1c) + 0x18 + uVar7) =
           *(undefined8 *)(*plVar15 + 0x1c8);
      if ((int)param_2[0x1e] <= iVar11) {
                    // WARNING: Subroutine does not return
        *(undefined **)(puVar10 + -8) = &UNK_14016a434;
        FUN_1401566e0();
      }
      lVar6 = *(longlong *)(param_2 + 0x1c);
      uVar1 = *param_2;
      lVar2 = *plVar15;
      *(undefined8 *)(puVar10 + -8) = 0x14016a3b0;
      uVar17 = FUN_14019d860(lVar2,uVar1);
      *(undefined8 *)(uVar7 + 0x20 + lVar6) = uVar17;
      if ((int)param_2[0x1e] <= iVar11) {
                    // WARNING: Subroutine does not return
        *(undefined **)(puVar10 + -8) = &UNK_14016a42e;
        FUN_1401566e0();
      }
      *(undefined8 *)(*(longlong *)(param_2 + 0x1c) + 0x28 + uVar7) =
           *(undefined8 *)(*plVar15 + 400);
      if ((int)param_2[0x1e] <= iVar11) {
                    // WARNING: Subroutine does not return
        *(undefined **)(puVar10 + -8) = &UNK_14016a428;
        FUN_1401566e0();
      }
      *(longlong *)(*(longlong *)(param_2 + 0x1c) + 0x30 + uVar7) = plVar15[2];
      if ((int)param_2[0x1e] <= iVar11) {
                    // WARNING: Subroutine does not return
        *(undefined **)(puVar10 + -8) = &UNK_14016a422;
        FUN_1401566e0();
      }
      *(undefined8 *)(*(longlong *)(param_2 + 0x1c) + 0x38 + uVar7) =
           *(undefined8 *)(*plVar15 + 0x1e0);
      uVar12 = (ulonglong)(iVar11 + 1);
      local_a8 = local_a8 + 1;
      uVar7 = uVar7 + 0x40;
      plVar15 = plVar15 + 3;
    } while (local_a8 < (longlong)local_98);
  }
  if ((plVar13 != (longlong *)0x0) && ((int)plVar13[-2] == 0xdddd)) {
    *(undefined8 *)(puVar10 + -8) = 0x14016a472;
    free(plVar13 + -2);
  }
LAB_14016a70e:
  *(undefined8 *)(puVar10 + -8) = 0x14016a71a;
  return;
}



void FUN_14016a750(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  
  if (*(longlong *)(param_2 + 0x68) == 0) {
    lVar1 = 0;
  }
  else {
    lVar1 = *(longlong *)(param_2 + 0x58);
  }
  while (lVar1 != 0) {
    if (*(undefined8 **)(lVar1 + 8) == (undefined8 *)0x0) {
      FUN_14016a150(param_1,0);
      lVar1 = *(longlong *)(lVar1 + 0x10);
    }
    else {
      FUN_14016a150(param_1,**(undefined8 **)(lVar1 + 8));
      lVar1 = *(longlong *)(lVar1 + 0x10);
    }
  }
  return;
}



void FUN_14016a7b0(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(*param_1 + 0x58))();
  uVar2 = uVar1;
  FUN_140156b50(uVar1);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))
              (param_1,L"Proud::CNetServerImpl::ElectSuperPeer",*param_1,param_4,uVar4,uVar2,1);
  }
  if (param_1[0x84] == 0) {
    lVar3 = 0;
  }
  else {
    lVar3 = param_1[0x82];
  }
  for (; lVar3 != 0; lVar3 = *(longlong *)(lVar3 + 0x10)) {
    if (*(undefined8 **)(lVar3 + 8) == (undefined8 *)0x0) {
      uVar2 = 0;
    }
    else {
      uVar2 = **(undefined8 **)(lVar3 + 8);
    }
    FUN_14016a150(param_1,uVar2);
  }
  FUN_140156be0(uVar1);
  return;
}



void FUN_14016a860(longlong param_1)

{
  undefined *puVar1;
  undefined8 uVar2;
  undefined *local_res8;
  
  puVar1 = *(undefined **)(param_1 + 0x1808);
  if (((puVar1 != (undefined *)0x0) && (puVar1 != PTR_DAT_1403200a0)) &&
     (*(int *)(puVar1 + -8) != 0)) {
    FUN_1401568c0();
    local_res8 = PTR_DAT_1403200a0;
    FUN_14004f4f0(&local_res8,param_1 + 0x1808);
    FUN_1401a7000(&local_res8);
  }
  uVar2 = (**(code **)(*(longlong *)(param_1 + 0x118) + 8))();
  *(undefined4 *)(param_1 + 0x1804) = 0;
  *(undefined8 *)(param_1 + 0x1810) = uVar2;
  FUN_14004ce80(param_1 + 0x1808,&DAT_140288b80);
  LOCK();
  *(undefined4 *)(param_1 + 0x1840) = 0;
  UNLOCK();
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_14016a900(longlong param_1,longlong param_2,undefined8 *param_3)

{
  longlong lVar1;
  longlong lVar2;
  double dVar3;
  longlong local_res20;
  
  dVar3 = (double)(**(code **)(*(longlong *)(param_1 + 0x118) + 8))();
  lVar1 = 0;
  if (*(longlong *)(param_2 + 0x28) != 0) {
    lVar1 = *(longlong *)(param_2 + 0x18);
  }
  while( true ) {
    lVar2 = lVar1;
    if (lVar2 == 0) {
      *(undefined8 *)(param_2 + 0x90) = *param_3;
      *(undefined8 *)(param_2 + 0x98) = param_3[1];
      *(undefined8 *)(param_2 + 0xa0) = param_3[2];
      *(undefined8 *)(param_2 + 0xa8) = param_3[3];
      *(undefined8 *)(param_2 + 0xb0) = param_3[4];
      *(undefined8 *)(param_2 + 0xb8) = param_3[5];
      *(undefined8 *)(param_2 + 0xc0) = param_3[6];
      *(undefined1 *)(param_2 + 0x88) = 1;
      if ((*(int *)(param_2 + 0x78) == 0) && (*(longlong *)(param_2 + 0x28) != 0)) {
        FUN_14016a150(param_1,param_2);
      }
      return;
    }
    local_res20 = 0;
    if (lVar2 == 0) break;
    lVar1 = __RTDynamicCast(*(undefined8 *)(lVar2 + 0x10),0,
                            &Proud::CP2PGroupMemberBase_S::RTTI_Type_Descriptor,
                            &Proud::CRemoteClient_S::RTTI_Type_Descriptor,0);
    if (((lVar1 != 0) && (*(double *)(lVar1 + 0x188) == 0.0)) ||
       (local_res20 = lVar1, _DAT_140320d88 < dVar3 - *(double *)(lVar1 + 0x188))) {
      *(double *)(lVar1 + 0x188) = dVar3;
      local_res20._1_7_ = (uint7)((ulonglong)lVar1 >> 8);
      local_res20 = CONCAT71(local_res20._1_7_,1);
      if ((double)param_3[4] <= 0.0) {
        local_res20 = (ulonglong)local_res20._1_7_ << 8;
      }
      (**(code **)(*(longlong *)(param_1 + 0x4a8) + 0x130))
                ((longlong *)(param_1 + 0x4a8),*(undefined4 *)(lVar1 + 0x6f8),&DAT_140328530,
                 &local_res20);
    }
    lVar1 = 0;
    if (lVar2 != 0) {
      lVar1 = *(longlong *)(lVar2 + 0x18);
    }
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



void FUN_14016ab30(longlong param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined4 uVar2;
  longlong lVar3;
  undefined8 *puVar4;
  longlong *plVar5;
  undefined8 uVar6;
  undefined8 *puVar7;
  longlong lVar8;
  longlong lVar9;
  longlong lVar10;
  longlong lVar11;
  longlong lVar12;
  int iVar13;
  longlong lVar14;
  int iVar15;
  undefined8 uVar16;
  undefined4 uStack_3c;
  
  uVar16 = 0xfffffffffffffffe;
  uVar6 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar6);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::GetUserWorkerThreadInfo",
               *(longlong *)(param_1 + -0xa8),param_4,uVar16,uVar6,1);
  }
  lVar3 = *(longlong *)(param_1 + 0x338);
  iVar15 = 0;
  iVar1 = *(int *)(lVar3 + 0x78);
  lVar11 = 0;
  if (0 < iVar1) {
    do {
      if ((lVar11 < 0) || (iVar1 <= iVar15)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      puVar4 = *(undefined8 **)(*(longlong *)(lVar3 + 0x70) + lVar11 * 8);
      puVar7 = (undefined8 *)0x0;
      if (puVar4 != (undefined8 *)0x0) {
        puVar7 = (undefined8 *)*puVar4;
      }
      uVar16 = *puVar7;
      if (iVar1 <= iVar15) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      plVar5 = *(longlong **)(*(longlong *)(lVar3 + 0x70) + lVar11 * 8);
      if (plVar5 == (longlong *)0x0) {
        lVar10 = 0;
      }
      else {
        lVar10 = *plVar5;
      }
      uVar2 = *(undefined4 *)(lVar10 + 8);
      iVar1 = *(int *)(param_2 + 0x18);
      lVar10 = (longlong)iVar1;
      if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      iVar13 = *(int *)(param_2 + 0x18);
      FUN_14015d6a0(param_2,iVar13 + 1);
      iVar13 = iVar13 - iVar1;
      if ((0 < iVar13) && (iVar13 = iVar13 + -1, lVar12 = (longlong)iVar13, -1 < iVar13)) {
        lVar14 = (lVar12 + 1 + lVar10) * 0x10;
        do {
          lVar8 = FUN_1401a7bb0(param_2);
          lVar9 = FUN_1401a7bb0(param_2);
          *(undefined8 *)(lVar9 + lVar14) = *(undefined8 *)(lVar8 + -0x10 + lVar14);
          *(undefined8 *)(lVar9 + 8 + lVar14) = *(undefined8 *)(lVar8 + -8 + lVar14);
          lVar14 = lVar14 + -0x10;
          lVar12 = lVar12 + -1;
        } while (-1 < lVar12);
      }
      lVar12 = FUN_1401a7bb0(param_2);
      *(ulonglong *)(lVar12 + lVar10 * 0x10) = CONCAT44(uStack_3c,uVar2);
      *(undefined8 *)(lVar12 + 8 + lVar10 * 0x10) = uVar16;
      iVar15 = iVar15 + 1;
      lVar11 = lVar11 + 1;
      iVar1 = *(int *)(lVar3 + 0x78);
    } while (iVar15 < iVar1);
  }
  FUN_140156be0(uVar6);
  return;
}



void FUN_14016acf0(longlong param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined4 uVar2;
  longlong lVar3;
  undefined8 *puVar4;
  longlong *plVar5;
  undefined8 uVar6;
  undefined8 *puVar7;
  longlong lVar8;
  longlong lVar9;
  longlong lVar10;
  longlong lVar11;
  longlong lVar12;
  int iVar13;
  longlong lVar14;
  int iVar15;
  undefined8 uVar16;
  undefined4 uStack_3c;
  
  uVar16 = 0xfffffffffffffffe;
  uVar6 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar6);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::GetNetWorkerThreadInfo",
               *(longlong *)(param_1 + -0xa8),param_4,uVar16,uVar6,1);
  }
  lVar3 = *(longlong *)(param_1 + 0x338);
  iVar15 = 0;
  iVar1 = *(int *)(lVar3 + 0x50);
  lVar11 = 0;
  if (0 < iVar1) {
    do {
      if ((lVar11 < 0) || (iVar1 <= iVar15)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      puVar4 = *(undefined8 **)(*(longlong *)(lVar3 + 0x48) + lVar11 * 8);
      puVar7 = (undefined8 *)0x0;
      if (puVar4 != (undefined8 *)0x0) {
        puVar7 = (undefined8 *)*puVar4;
      }
      uVar16 = *puVar7;
      if (iVar1 <= iVar15) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      plVar5 = *(longlong **)(*(longlong *)(lVar3 + 0x48) + lVar11 * 8);
      if (plVar5 == (longlong *)0x0) {
        lVar10 = 0;
      }
      else {
        lVar10 = *plVar5;
      }
      uVar2 = *(undefined4 *)(lVar10 + 8);
      iVar1 = *(int *)(param_2 + 0x18);
      lVar10 = (longlong)iVar1;
      if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      iVar13 = *(int *)(param_2 + 0x18);
      FUN_14015d6a0(param_2,iVar13 + 1);
      iVar13 = iVar13 - iVar1;
      if ((0 < iVar13) && (iVar13 = iVar13 + -1, lVar12 = (longlong)iVar13, -1 < iVar13)) {
        lVar14 = (lVar12 + 1 + lVar10) * 0x10;
        do {
          lVar8 = FUN_1401a7bb0(param_2);
          lVar9 = FUN_1401a7bb0(param_2);
          *(undefined8 *)(lVar9 + lVar14) = *(undefined8 *)(lVar8 + -0x10 + lVar14);
          *(undefined8 *)(lVar9 + 8 + lVar14) = *(undefined8 *)(lVar8 + -8 + lVar14);
          lVar14 = lVar14 + -0x10;
          lVar12 = lVar12 + -1;
        } while (-1 < lVar12);
      }
      lVar12 = FUN_1401a7bb0(param_2);
      *(ulonglong *)(lVar12 + lVar10 * 0x10) = CONCAT44(uStack_3c,uVar2);
      *(undefined8 *)(lVar12 + 8 + lVar10 * 0x10) = uVar16;
      iVar15 = iVar15 + 1;
      lVar11 = lVar11 + 1;
      iVar1 = *(int *)(lVar3 + 0x50);
    } while (iVar15 < iVar1);
  }
  FUN_140156be0(uVar6);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14016aeb0(undefined8 param_1,longlong param_2)

{
  bool bVar1;
  undefined4 *puVar2;
  undefined8 uVar3;
  longlong lVar4;
  undefined1 auStack_d68 [32];
  undefined1 local_d48 [8];
  longlong local_d40;
  longlong local_d38;
  undefined4 local_d30;
  int local_d2c;
  undefined8 local_d20;
  undefined1 local_d18 [80];
  undefined8 local_cc8;
  undefined4 uStack_cc0;
  undefined4 uStack_cbc;
  undefined8 local_cb8;
  undefined1 local_cb0;
  undefined4 local_ca8;
  undefined4 uStack_ca4;
  undefined4 uStack_ca0;
  undefined4 uStack_c9c;
  undefined4 *local_28;
  undefined4 local_20;
  int local_1c;
  ulonglong local_18;
  
  local_d20 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_d68;
  local_cc8 = (longlong *)0x0;
  uStack_cc0 = 0;
  uStack_cbc = 0;
  if ((*(longlong *)(param_2 + 0x728) == 0) && (*(longlong *)(param_2 + 0x730) == 0)) {
    bVar1 = false;
  }
  else {
    bVar1 = true;
  }
  if (!bVar1) {
    puVar2 = (undefined4 *)FUN_1401828e0(&local_cb8);
    *(undefined4 *)(param_2 + 0x728) = *puVar2;
    *(undefined4 *)(param_2 + 0x72c) = puVar2[1];
    *(undefined4 *)(param_2 + 0x730) = puVar2[2];
    *(undefined4 *)(param_2 + 0x734) = puVar2[3];
    FUN_1401544a0(local_d48);
    FUN_140153d90(local_d48);
    FUN_140154600(local_d48,0x800);
    FUN_140154600(local_d48,0);
    FUN_14004fd90(local_d48,0xb);
    local_cc8 = *(longlong **)(param_2 + 0x728);
    uStack_cc0 = *(undefined4 *)(param_2 + 0x730);
    uStack_cbc = *(undefined4 *)(param_2 + 0x734);
    FUN_14013b2a0(local_d48,&local_cc8);
    uVar3 = (**(code **)(*(longlong *)(param_2 + 0x108) + 0x10))();
    local_cb8 = uVar3;
    FUN_140156b50(uVar3);
    local_cb0 = 1;
    local_1c = 200;
    local_20 = 0;
    local_28 = &local_ca8;
    if (local_d40 == 0) {
      if (local_d38 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
    }
    else {
      local_d30 = *(undefined4 *)(local_d40 + 0x18);
    }
    lVar4 = local_d38;
    if (local_d38 == 0) {
      if (local_d40 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(int *)(local_d40 + 0x18) != 0) {
        lVar4 = *(longlong *)(local_d40 + 0x10);
      }
    }
    local_20 = 1;
    local_cc8._0_4_ = (undefined4)lVar4;
    local_cc8._4_4_ = (undefined4)((ulonglong)lVar4 >> 0x20);
    local_ca8 = (undefined4)local_cc8;
    uStack_ca4 = local_cc8._4_4_;
    uStack_c9c = uStack_cbc;
    local_cc8 = (longlong *)0x0;
    uStack_cc0 = CONCAT31((int3)((uint)local_d30 >> 8),1);
    uStack_ca0 = local_d30;
    FUN_1401a3610(*(undefined8 *)(param_2 + 0x748),&local_ca8,&local_cc8);
    if (local_28 == (undefined4 *)0x0) {
      FUN_140156300(local_d18,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_d18,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_1c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_140156be0(uVar3);
    local_cc8 = &local_d40;
    FUN_1401560e0(&local_d40);
    if ((local_d38 != 0) && (local_d2c < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  return;
}



void FUN_14016b110(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  int iVar2;
  longlong *plVar3;
  undefined *puVar4;
  char cVar5;
  longlong *plVar6;
  undefined8 uVar7;
  undefined8 uVar8;
  longlong lVar9;
  undefined *puVar10;
  longlong lVar11;
  int iVar12;
  undefined *local_res8;
  undefined8 local_res10;
  undefined8 uVar13;
  
  uVar13 = 0xfffffffffffffffe;
  local_res10 = param_2;
  if (*(longlong *)(param_1 + 0x1760) == 0) {
    plVar6 = (longlong *)0x0;
  }
  else {
    plVar6 = *(longlong **)(param_1 + 0x1750);
  }
  for (; uVar8 = local_res10, plVar6 != (longlong *)0x0; plVar6 = (longlong *)plVar6[2]) {
    if (plVar6 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    lVar11 = *plVar6;
    uVar7 = (**(code **)(*(longlong *)(lVar11 + 0x108) + 0x10))();
    cVar5 = FUN_140156c80(uVar7);
    if (cVar5 == '\x01') {
      FUN_1401568c0();
      local_res8 = PTR_DAT_1403200a0;
      FUN_14004ce50(&local_res8,L"RemoteClient DeadLock - %s",uVar8,param_4,uVar13);
      puVar4 = local_res8;
      puVar10 = local_res8;
      if (local_res8 == (undefined *)0x0) {
        puVar10 = PTR_DAT_1403200a0;
      }
      FUN_1401580e0(puVar10);
      uVar8 = local_res10;
      if (((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_1403200a0)) &&
         (puVar4 + -8 != (undefined *)0x0)) {
        uVar8 = FUN_1401568c0();
        FUN_140156b50(uVar8);
        piVar1 = (int *)(puVar4 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar4 + -8);
        }
        FUN_140156be0(uVar8);
        uVar8 = local_res10;
      }
    }
    if (((*(int *)(param_1 + 0x1844) == 0) &&
        (plVar3 = *(longlong **)(lVar11 + 0x760), plVar3 != (longlong *)0x0)) &&
       (lVar11 = *plVar3, lVar11 != 0)) {
      uVar7 = (**(code **)(*(longlong *)(lVar11 + 0x88) + 0x10))();
      cVar5 = FUN_140156c80(uVar7);
      if (cVar5 == '\x01') {
        FUN_1401568c0();
        local_res8 = PTR_DAT_1403200a0;
        FUN_14004ce50(&local_res8,L"UDPSocket DeadLock - %s",uVar8);
        puVar4 = local_res8;
        puVar10 = local_res8;
        if (local_res8 == (undefined *)0x0) {
          puVar10 = PTR_DAT_1403200a0;
        }
        FUN_1401580e0(puVar10);
        if (((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_1403200a0)) &&
           (puVar4 + -8 != (undefined *)0x0)) {
          uVar8 = FUN_1401568c0();
          FUN_140156b50(uVar8);
          piVar1 = (int *)(puVar4 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(puVar4 + -8);
          }
          FUN_140156be0(uVar8);
        }
      }
    }
  }
  uVar13 = local_res10;
  if (*(int *)(param_1 + 0x1844) == 1) {
    iVar12 = 0;
    lVar11 = 0;
    iVar2 = *(int *)(param_1 + 0x6e0);
    if (0 < (longlong)iVar2) {
      do {
        if ((lVar11 < 0) || (*(int *)(param_1 + 0x6e0) <= iVar12)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        plVar6 = *(longlong **)(*(longlong *)(param_1 + 0x6d8) + lVar11 * 8);
        lVar9 = 0;
        if (plVar6 != (longlong *)0x0) {
          lVar9 = *plVar6;
        }
        uVar8 = (**(code **)(*(longlong *)(lVar9 + 0x88) + 0x10))();
        cVar5 = FUN_140156c80(uVar8);
        if (cVar5 == '\x01') {
          FUN_1401568c0();
          local_res8 = PTR_DAT_1403200a0;
          FUN_14004ce50(&local_res8,L"UDPSocket DeadLock - %s",uVar13);
          puVar4 = local_res8;
          puVar10 = local_res8;
          if (local_res8 == (undefined *)0x0) {
            puVar10 = PTR_DAT_1403200a0;
          }
          FUN_1401580e0(puVar10);
          uVar13 = local_res10;
          if (((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_1403200a0)) &&
             (puVar4 + -8 != (undefined *)0x0)) {
            uVar13 = FUN_1401568c0();
            FUN_140156b50(uVar13);
            piVar1 = (int *)(puVar4 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(puVar4 + -8);
            }
            FUN_140156be0(uVar13);
            uVar13 = local_res10;
          }
        }
        iVar12 = iVar12 + 1;
        lVar11 = lVar11 + 1;
      } while (lVar11 < iVar2);
    }
  }
  cVar5 = FUN_140156c80(param_1 + 0x798);
  if (cVar5 == '\x01') {
    FUN_1401568c0();
    local_res8 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_res8,L"NetServer tcpIssueQueueCS DeadLock!! - %s",uVar13);
    puVar4 = local_res8;
    puVar10 = local_res8;
    if (local_res8 == (undefined *)0x0) {
      puVar10 = PTR_DAT_1403200a0;
    }
    FUN_1401580e0(puVar10);
    if (((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_1403200a0)) &&
       (puVar4 + -8 != (undefined *)0x0)) {
      uVar13 = FUN_1401568c0();
      FUN_140156b50(uVar13);
      piVar1 = (int *)(puVar4 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar4 + -8);
      }
      FUN_140156be0(uVar13);
    }
  }
  cVar5 = FUN_140156c80(param_1 + 2000);
  if (cVar5 == '\x01') {
    FUN_1401568c0();
    local_res8 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_res8,L"NetServer udpIssueQueueCS DeadLock!! - %s",local_res10);
    puVar4 = local_res8;
    puVar10 = local_res8;
    if (local_res8 == (undefined *)0x0) {
      puVar10 = PTR_DAT_1403200a0;
    }
    FUN_1401580e0(puVar10);
    if (((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_1403200a0)) &&
       (puVar4 + -8 != (undefined *)0x0)) {
      uVar13 = FUN_1401568c0();
      FUN_140156b50(uVar13);
      piVar1 = (int *)(puVar4 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar4 + -8);
      }
      FUN_140156be0(uVar13);
    }
  }
  return;
}



longlong * FUN_14016b560(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  
  lVar1 = *param_2;
  if (lVar1 != *param_1) {
    if (lVar1 != 0) {
      *(longlong *)(*param_2 + 8) = *(longlong *)(lVar1 + 8) + 1;
    }
    lVar1 = 0;
    if ((*param_1 != 0) &&
       (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
       *(longlong *)(*param_1 + 8) == 0)) {
      lVar1 = *param_1;
    }
    *param_1 = *param_2;
    if (lVar1 != 0) {
      FUN_14015ebb0(lVar1);
    }
  }
  return param_1;
}



void FUN_14016b5d0(longlong *param_1)

{
  longlong *plVar1;
  
  if (*param_1 != 0) {
    plVar1 = (longlong *)(*param_1 + 8);
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      FUN_140161ae0(param_1,*param_1);
    }
  }
  return;
}



void FUN_14016b5f0(undefined8 *param_1)

{
  longlong *plVar1;
  
  *param_1 = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 3)) {
    FUN_1401de290(param_1[2],(longlong)*(int *)(param_1 + 3));
  }
  if (param_1[2] != 0) {
    plVar1 = (longlong *)param_1[1];
    if (plVar1 != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014016b637. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*plVar1 + 0x18))(plVar1,param_1[2]);
      return;
    }
    FUN_140156970();
  }
  return;
}



undefined8 * FUN_14016b650(undefined8 *param_1,uint param_2)

{
  longlong *plVar1;
  
  *param_1 = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 3)) {
    FUN_1401de290(param_1[2],(longlong)*(int *)(param_1 + 3));
  }
  if (param_1[2] != 0) {
    plVar1 = (longlong *)param_1[1];
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,param_1[2]);
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14016b6c0(longlong param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 uVar2;
  undefined8 *puVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  longlong lVar7;
  longlong lVar8;
  undefined1 local_a0 [152];
  
  lVar7 = (longlong)param_2;
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  iVar5 = *(int *)(param_1 + 0x18);
  if (param_2 != iVar5) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar5 = FUN_1401abc90(param_1,param_2,param_3,param_4,0xfffffffffffffffe);
      lVar8 = (longlong)iVar5;
      plVar1 = *(longlong **)(param_1 + 8);
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar1 == (longlong *)0x0) {
          puVar3 = (undefined8 *)FUN_140156940(lVar8 << 3);
        }
        else {
          puVar3 = (undefined8 *)(**(code **)(*plVar1 + 8))(plVar1,lVar8 << 3);
        }
        *(undefined8 **)(param_1 + 0x10) = puVar3;
        if (0 < param_2) {
          do {
            if (puVar3 != (undefined8 *)0x0) {
              *puVar3 = 0;
            }
            puVar3 = puVar3 + 1;
            lVar7 = lVar7 + -1;
          } while (lVar7 != 0);
        }
      }
      else {
        uVar2 = *(undefined8 *)(param_1 + 0x10);
        if (plVar1 == (longlong *)0x0) {
          lVar7 = FUN_140156940(lVar8 << 3);
        }
        else {
          lVar7 = (**(code **)(*plVar1 + 8))(plVar1,lVar8 << 3);
        }
        FUN_140162010(lVar7,uVar2);
        iVar4 = param_2 - *(int *)(param_1 + 0x18);
        puVar3 = (undefined8 *)(lVar7 + (longlong)*(int *)(param_1 + 0x18) * 8);
        iVar6 = 0;
        if (0 < iVar4) {
          do {
            if (puVar3 != (undefined8 *)0x0) {
              *puVar3 = 0;
            }
            iVar6 = iVar6 + 1;
            puVar3 = puVar3 + 1;
          } while (iVar6 < iVar4);
        }
        if (lVar7 == 0) {
          FUN_140156300(local_a0,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_a0,(ThrowInfo *)&DAT_14031d928);
        }
        FUN_1401de290(uVar2,(longlong)*(int *)(param_1 + 0x18));
        plVar1 = *(longlong **)(param_1 + 8);
        if (plVar1 == (longlong *)0x0) {
          FUN_140156970(uVar2);
        }
        else {
          (**(code **)(*plVar1 + 0x18))(plVar1,uVar2);
        }
        *(longlong *)(param_1 + 0x10) = lVar7;
      }
      *(int *)(param_1 + 0x1c) = iVar5;
    }
    else if (iVar5 - param_2 < 1) {
      iVar4 = param_2 - iVar5;
      if (0 < iVar4) {
        puVar3 = (undefined8 *)(*(longlong *)(param_1 + 0x10) + (longlong)iVar5 * 8);
        iVar5 = 0;
        if (0 < iVar4) {
          do {
            if (puVar3 != (undefined8 *)0x0) {
              *puVar3 = 0;
            }
            iVar5 = iVar5 + 1;
            puVar3 = puVar3 + 1;
          } while (iVar5 < iVar4);
        }
      }
    }
    else {
      FUN_1401de290(*(longlong *)(param_1 + 0x10) + lVar7 * 8,(longlong)(iVar5 - param_2));
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_14016b8b0(_Container_base12 *param_1)

{
  FUN_14015f160();
  std::_Container_base12::_Orphan_all(param_1);
  operator_delete(*(void **)param_1);
  *(undefined8 *)param_1 = 0;
                    // WARNING: Could not recover jumptable at 0x00014016b8ec. Too many branches
                    // WARNING: Treating indirect jump as call
  std::_Container_base12::~_Container_base12(param_1);
  return;
}



void thunk_FUN_1401617d0(void)

{
  FUN_1401617d0();
  return;
}



longlong * FUN_14016b910(longlong *param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  longlong lVar2;
  longlong lVar3;
  undefined1 local_50 [72];
  
  lVar3 = 0;
  puVar1 = (undefined8 *)
           (**(code **)(*param_2 + 8))(param_2,0x30,param_3,param_4,0xfffffffffffffffe);
  if (puVar1 != (undefined8 *)0x0) {
    *puVar1 = Proud::CFastArray<>::vftable;
    puVar1[1] = 0;
    puVar1[2] = 0;
    puVar1[3] = 0;
    *(undefined4 *)(puVar1 + 4) = 0;
    *(undefined4 *)((longlong)puVar1 + 0x24) = 1;
  }
  FUN_1401618a0(param_1,param_2,puVar1);
  lVar2 = lVar3;
  if ((longlong *)*param_1 != (longlong *)0x0) {
    lVar2 = *(longlong *)*param_1;
  }
  *(longlong **)(lVar2 + 0x28) = param_2;
  if ((longlong *)*param_1 != (longlong *)0x0) {
    lVar3 = *(longlong *)*param_1;
  }
  if (*(int *)(lVar3 + 0x1c) < 1) {
    *(longlong **)(lVar3 + 8) = param_2;
    return param_1;
  }
  FUN_140156300(local_50,PTR_u_Collection_object_can_use_fast_h_140320e48);
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
}



void FUN_14016b9f0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong *plVar2;
  
  plVar2 = (longlong *)(param_1 + 0x20);
  if (*plVar2 != 0) {
    plVar1 = (longlong *)(*plVar2 + 8);
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      FUN_140161ae0(plVar2,*plVar2,param_3,param_4,0xfffffffffffffffe);
    }
  }
  FUN_1401560e0(param_1 + 8);
  if (*(longlong *)(param_1 + 0x10) != 0) {
    if (*(int *)(param_1 + 0x1c) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_1 + 0x18) = 0;
  }
  return;
}



undefined1
FUN_14016ba60(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,longlong param_6,undefined4 *param_7,longlong param_8,
             longlong param_9,undefined4 *param_10,undefined8 *param_11,undefined1 *param_12,
             undefined2 *param_13)

{
  int iVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined1 uVar5;
  longlong lVar6;
  longlong lVar7;
  undefined4 local_res10 [2];
  undefined1 local_48 [4];
  undefined4 local_44;
  longlong local_40;
  longlong local_38;
  int local_30;
  int local_2c;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_48);
  FUN_140153d90(local_48);
  FUN_140050340(local_48,0xfbf5);
  FUN_14004fe70(local_48,*param_4);
  FUN_14004fe70(local_48,*param_5);
  iVar1 = *(int *)(param_6 + 0x18);
  FUN_140155b20(local_48,(longlong)iVar1);
  lVar7 = 0;
  lVar6 = lVar7;
  if (*(int *)(param_6 + 0x18) != 0) {
    lVar6 = *(longlong *)(param_6 + 0x10);
  }
  if (iVar1 != 0) {
    local_44 = 0;
    if (local_40 == 0) {
      if (local_38 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
LAB_14016bb12:
      FUN_14004ff50(&local_38,lVar6,iVar1);
    }
    else {
      if (local_38 != 0) goto LAB_14016bb12;
      if (local_40 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
      FUN_140050180(local_40,lVar6,iVar1);
    }
    FUN_1400501f0(local_48);
  }
  FUN_14004fe70(local_48,*param_7);
  iVar1 = *(int *)(param_8 + 0x18);
  FUN_140155b20(local_48,(longlong)iVar1);
  lVar6 = lVar7;
  if (*(int *)(param_8 + 0x18) != 0) {
    lVar6 = *(longlong *)(param_8 + 0x10);
  }
  if (iVar1 != 0) {
    local_44 = 0;
    if (local_40 == 0) {
      if (local_38 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
LAB_14016bb8f:
      FUN_14004ff50(&local_38,lVar6,iVar1);
    }
    else {
      if (local_38 != 0) goto LAB_14016bb8f;
      if (local_40 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
      FUN_140050180(local_40,lVar6,iVar1);
    }
    FUN_1400501f0(local_48);
  }
  iVar1 = *(int *)(param_9 + 0x18);
  FUN_140155b20(local_48,(longlong)iVar1);
  lVar6 = lVar7;
  if (*(int *)(param_9 + 0x18) != 0) {
    lVar6 = *(longlong *)(param_9 + 0x10);
  }
  if (iVar1 != 0) {
    local_44 = 0;
    if (local_40 == 0) {
      if (local_38 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
LAB_14016bbfd:
      FUN_14004ff50(&local_38,lVar6,iVar1);
    }
    else {
      if (local_38 != 0) goto LAB_14016bbfd;
      if (local_40 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
      FUN_140050180(local_40,lVar6,iVar1);
    }
    FUN_1400501f0(local_48);
  }
  FUN_14004fe70(local_48,*param_10);
  uVar3 = *param_11;
  uVar4 = param_11[1];
  uVar2 = param_11[1];
  local_44 = 0;
  if (local_40 == 0) {
    if (local_38 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (local_38 == 0) {
    if (local_40 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(local_40 + 0x18);
    FUN_140050060(local_40,iVar1 + 0x10);
    if (*(int *)(local_40 + 0x18) != 0) {
      lVar7 = *(longlong *)(local_40 + 0x10);
    }
    *(undefined8 *)(iVar1 + lVar7) = uVar3;
    *(undefined8 *)((longlong)iVar1 + 8 + lVar7) = uVar4;
    goto LAB_14016bcc9;
  }
  lVar6 = (longlong)local_30;
  local_30 = local_30 + 0x10;
  if ((local_30 < 0) || (local_2c < local_30)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(undefined8 *)(local_38 + lVar6) = *param_11;
  ((undefined8 *)(local_38 + lVar6))[1] = uVar2;
LAB_14016bcc9:
  FUN_1400501f0(local_48);
  FUN_14004fd90(local_48,*param_12);
  FUN_140050340(local_48,*param_13);
  uVar5 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_48,PTR_DAT_1403204f0,0xfbf5);
  FUN_1401560e0(&local_40);
  if ((local_38 != 0) && (local_2c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar5;
}



undefined1
FUN_14016bd80(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,longlong param_7,undefined4 *param_8,
             longlong param_9,longlong param_10,undefined4 *param_11,undefined8 *param_12,
             undefined1 *param_13,undefined2 *param_14)

{
  int iVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined1 uVar5;
  longlong lVar6;
  longlong lVar7;
  undefined1 local_58 [4];
  undefined4 local_54;
  longlong local_50;
  longlong local_48;
  int local_40;
  int local_3c;
  
  FUN_1401544a0(local_58);
  FUN_140153d90(local_58);
  FUN_140050340(local_58,0xfbf5);
  FUN_14004fe70(local_58,*param_5);
  FUN_14004fe70(local_58,*param_6);
  iVar1 = *(int *)(param_7 + 0x18);
  FUN_140155b20(local_58,(longlong)iVar1);
  lVar7 = 0;
  lVar6 = lVar7;
  if (*(int *)(param_7 + 0x18) != 0) {
    lVar6 = *(longlong *)(param_7 + 0x10);
  }
  if (iVar1 != 0) {
    local_54 = 0;
    if (local_50 == 0) {
      if (local_48 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
LAB_14016be3b:
      FUN_14004ff50(&local_48,lVar6,iVar1);
    }
    else {
      if (local_48 != 0) goto LAB_14016be3b;
      if (local_50 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
      FUN_140050180(local_50,lVar6,iVar1);
    }
    FUN_1400501f0(local_58);
  }
  FUN_14004fe70(local_58,*param_8);
  iVar1 = *(int *)(param_9 + 0x18);
  FUN_140155b20(local_58,(longlong)iVar1);
  lVar6 = lVar7;
  if (*(int *)(param_9 + 0x18) != 0) {
    lVar6 = *(longlong *)(param_9 + 0x10);
  }
  if (iVar1 != 0) {
    local_54 = 0;
    if (local_50 == 0) {
      if (local_48 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
LAB_14016beb8:
      FUN_14004ff50(&local_48,lVar6,iVar1);
    }
    else {
      if (local_48 != 0) goto LAB_14016beb8;
      if (local_50 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
      FUN_140050180(local_50,lVar6,iVar1);
    }
    FUN_1400501f0(local_58);
  }
  iVar1 = *(int *)(param_10 + 0x18);
  FUN_140155b20(local_58,(longlong)iVar1);
  lVar6 = lVar7;
  if (*(int *)(param_10 + 0x18) != 0) {
    lVar6 = *(longlong *)(param_10 + 0x10);
  }
  if (iVar1 != 0) {
    local_54 = 0;
    if (local_50 == 0) {
      if (local_48 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
LAB_14016bf26:
      FUN_14004ff50(&local_48,lVar6,iVar1);
    }
    else {
      if (local_48 != 0) goto LAB_14016bf26;
      if (local_50 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
      FUN_140050180(local_50,lVar6,iVar1);
    }
    FUN_1400501f0(local_58);
  }
  FUN_14004fe70(local_58,*param_11);
  uVar3 = *param_12;
  uVar4 = param_12[1];
  uVar2 = param_12[1];
  local_54 = 0;
  if (local_50 == 0) {
    if (local_48 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (local_48 == 0) {
    if (local_50 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(local_50 + 0x18);
    FUN_140050060(local_50,iVar1 + 0x10);
    if (*(int *)(local_50 + 0x18) != 0) {
      lVar7 = *(longlong *)(local_50 + 0x10);
    }
    *(undefined8 *)(iVar1 + lVar7) = uVar3;
    *(undefined8 *)((longlong)iVar1 + 8 + lVar7) = uVar4;
    goto LAB_14016bff8;
  }
  lVar6 = (longlong)local_40;
  local_40 = local_40 + 0x10;
  if ((local_40 < 0) || (local_3c < local_40)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(undefined8 *)(local_48 + lVar6) = *param_12;
  ((undefined8 *)(local_48 + lVar6))[1] = uVar2;
LAB_14016bff8:
  FUN_1400501f0(local_58);
  FUN_14004fd90(local_58,*param_13);
  FUN_140050340(local_58,*param_14);
  uVar5 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_58,PTR_DAT_1403204f0,0xfbf5);
  FUN_1401560e0(&local_50);
  if ((local_48 != 0) && (local_3c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar5;
}



undefined1
FUN_14016c0b0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,longlong param_6,undefined4 *param_7,undefined4 *param_8,
             undefined8 *param_9,undefined1 *param_10,undefined2 *param_11)

{
  int iVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined1 uVar5;
  longlong lVar6;
  longlong lVar7;
  undefined4 local_res10 [2];
  undefined1 local_48 [4];
  undefined4 local_44;
  longlong local_40;
  longlong local_38;
  int local_30;
  int local_2c;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_48);
  FUN_140153d90(local_48);
  FUN_140050340(local_48,0xfbf6);
  FUN_14004fe70(local_48,*param_4);
  FUN_14004fe70(local_48,*param_5);
  iVar1 = *(int *)(param_6 + 0x18);
  FUN_140155b20(local_48,(longlong)iVar1);
  lVar7 = 0;
  lVar6 = lVar7;
  if (*(int *)(param_6 + 0x18) != 0) {
    lVar6 = *(longlong *)(param_6 + 0x10);
  }
  if (iVar1 != 0) {
    local_44 = 0;
    if (local_40 == 0) {
      if (local_38 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
LAB_14016c162:
      FUN_14004ff50(&local_38,lVar6,iVar1);
    }
    else {
      if (local_38 != 0) goto LAB_14016c162;
      if (local_40 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
      FUN_140050180(local_40,lVar6,iVar1);
    }
    FUN_1400501f0(local_48);
  }
  FUN_14004fe70(local_48,*param_7);
  FUN_14004fe70(local_48,*param_8);
  uVar3 = *param_9;
  uVar4 = param_9[1];
  uVar2 = param_9[1];
  local_44 = 0;
  if (local_40 == 0) {
    if (local_38 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (local_38 == 0) {
    if (local_40 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(local_40 + 0x18);
    FUN_140050060(local_40,iVar1 + 0x10);
    if (*(int *)(local_40 + 0x18) != 0) {
      lVar7 = *(longlong *)(local_40 + 0x10);
    }
    *(undefined8 *)(iVar1 + lVar7) = uVar3;
    *(undefined8 *)((longlong)iVar1 + 8 + lVar7) = uVar4;
    goto LAB_14016c23e;
  }
  lVar6 = (longlong)local_30;
  local_30 = local_30 + 0x10;
  if ((local_30 < 0) || (local_2c < local_30)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(undefined8 *)(local_38 + lVar6) = *param_9;
  ((undefined8 *)(local_38 + lVar6))[1] = uVar2;
LAB_14016c23e:
  FUN_1400501f0(local_48);
  FUN_14004fd90(local_48,*param_10);
  FUN_140050340(local_48,*param_11);
  uVar5 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_48,PTR_DAT_1403204f8,0xfbf6);
  FUN_1401560e0(&local_40);
  if ((local_38 != 0) && (local_2c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar5;
}



undefined1
FUN_14016c2f0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,longlong param_7,undefined4 *param_8,
             undefined4 *param_9,undefined8 *param_10,undefined1 *param_11,undefined2 *param_12)

{
  int iVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined1 uVar5;
  longlong lVar6;
  longlong lVar7;
  undefined1 local_58 [4];
  undefined4 local_54;
  longlong local_50;
  longlong local_48;
  int local_40;
  int local_3c;
  
  FUN_1401544a0(local_58);
  FUN_140153d90(local_58);
  FUN_140050340(local_58,0xfbf6);
  FUN_14004fe70(local_58,*param_5);
  FUN_14004fe70(local_58,*param_6);
  iVar1 = *(int *)(param_7 + 0x18);
  FUN_140155b20(local_58,(longlong)iVar1);
  lVar7 = 0;
  lVar6 = lVar7;
  if (*(int *)(param_7 + 0x18) != 0) {
    lVar6 = *(longlong *)(param_7 + 0x10);
  }
  if (iVar1 != 0) {
    local_54 = 0;
    if (local_50 == 0) {
      if (local_48 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
LAB_14016c3ab:
      FUN_14004ff50(&local_48,lVar6,iVar1);
    }
    else {
      if (local_48 != 0) goto LAB_14016c3ab;
      if (local_50 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar6);
      }
      FUN_140050180(local_50,lVar6,iVar1);
    }
    FUN_1400501f0(local_58);
  }
  FUN_14004fe70(local_58,*param_8);
  FUN_14004fe70(local_58,*param_9);
  uVar3 = *param_10;
  uVar4 = param_10[1];
  uVar2 = param_10[1];
  local_54 = 0;
  if (local_50 == 0) {
    if (local_48 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (local_48 == 0) {
    if (local_50 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(local_50 + 0x18);
    FUN_140050060(local_50,iVar1 + 0x10);
    if (*(int *)(local_50 + 0x18) != 0) {
      lVar7 = *(longlong *)(local_50 + 0x10);
    }
    *(undefined8 *)(iVar1 + lVar7) = uVar3;
    *(undefined8 *)((longlong)iVar1 + 8 + lVar7) = uVar4;
    goto LAB_14016c487;
  }
  lVar6 = (longlong)local_40;
  local_40 = local_40 + 0x10;
  if ((local_40 < 0) || (local_3c < local_40)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(undefined8 *)(local_48 + lVar6) = *param_10;
  ((undefined8 *)(local_48 + lVar6))[1] = uVar2;
LAB_14016c487:
  FUN_1400501f0(local_58);
  FUN_14004fd90(local_58,*param_11);
  FUN_140050340(local_58,*param_12);
  uVar5 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_58,PTR_DAT_1403204f8,0xfbf6);
  FUN_1401560e0(&local_50);
  if ((local_48 != 0) && (local_3c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar5;
}



undefined8 FUN_14016c540(longlong param_1,uint param_2,undefined8 param_3,char *param_4)

{
  int *piVar1;
  uint uVar2;
  longlong lVar3;
  undefined *puVar4;
  undefined8 uVar5;
  ulonglong uVar6;
  undefined8 uVar7;
  uint *puVar8;
  undefined *puVar9;
  undefined *local_res8;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined1 local_30;
  undefined8 local_28;
  undefined1 local_20;
  
  local_40 = 0xfffffffffffffffe;
  uVar5 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  local_38 = uVar5;
  FUN_140156b50(uVar5);
  local_30 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  uVar2 = *(uint *)(*(longlong *)(param_1 + 0x20) + 0xca0);
  uVar6 = (ulonglong)param_2 % (ulonglong)uVar2;
  lVar3 = *(longlong *)(*(longlong *)(param_1 + 0x20) + 0xc80);
  if ((lVar3 != 0) && (puVar8 = *(uint **)(lVar3 + uVar6 * 8), puVar8 != (uint *)0x0)) {
    while ((uint)uVar6 == puVar8[8] % uVar2) {
      if (*puVar8 == param_2) {
        lVar3 = *(longlong *)(puVar8 + 2);
        if ((lVar3 != 0) && (*(longlong *)(lVar3 + 0x228) == 0)) {
          *(undefined1 *)(lVar3 + 0x701) = 0;
          if (*param_4 == '\0') {
            if (*(longlong *)(*(longlong *)(param_1 + 0x20) + 0x17f0) != 0) {
              FUN_1401568c0();
              local_res8 = PTR_DAT_1403200a0;
              uVar6 = 0;
              if (*(longlong *)(lVar3 + 0x740) != 0) {
                uVar6 = *(ulonglong *)(*(longlong *)(lVar3 + 0x740) + 8);
                uVar5 = local_38;
              }
              FUN_14004ce50(&local_res8,&DAT_14025ee50,*(undefined4 *)(lVar3 + 0x6f8),
                            uVar6 & 0xffffffff);
              puVar4 = local_res8;
              puVar9 = local_res8;
              if (local_res8 == (undefined *)0x0) {
                puVar9 = PTR_DAT_1403200a0;
              }
              FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x17f0),0,puVar9);
              if (((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_1403200a0)) &&
                 (puVar4 + -8 != (undefined *)0x0)) {
                uVar7 = FUN_1401568c0();
                local_28 = uVar7;
                FUN_140156b50(uVar7);
                local_20 = 1;
                piVar1 = (int *)(puVar4 + -4);
                *piVar1 = *piVar1 + -1;
                if (*piVar1 == 0) {
                  FUN_140156970(puVar4 + -8);
                }
                FUN_140156be0(uVar7);
              }
            }
            *(undefined1 *)(lVar3 + 0x700) = 0;
            *(undefined1 *)(lVar3 + 0x702) = 1;
            local_48 = 0;
            FUN_1401d43e0(lVar3 + 0x740,&local_48);
          }
          else {
            FUN_14016aeb0(*(undefined8 *)(param_1 + 0x20),lVar3);
          }
        }
        break;
      }
      puVar8 = *(uint **)(puVar8 + 4);
      if (puVar8 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar5);
  return 1;
}



void FUN_14016c750(longlong param_1,longlong param_2)

{
  longlong lVar1;
  uint *puVar2;
  longlong *plVar3;
  ulonglong uVar4;
  undefined8 uVar5;
  
  uVar4 = (ulonglong)((uint)*(ushort *)(param_2 + 0x714) ^ *(uint *)(param_2 + 0x710)) %
          (ulonglong)*(uint *)(param_1 + 0x3b0);
  if (*(longlong *)(param_1 + 0x390) != 0) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 0x390) + uVar4 * 8);
    while( true ) {
      if ((lVar1 == 0) || ((uint)uVar4 != *(uint *)(lVar1 + 0x28) % *(uint *)(param_1 + 0x3b0)))
      goto LAB_14016c7e8;
      if ((*(uint *)(lVar1 + 8) == *(uint *)(param_2 + 0x710)) &&
         (*(ushort *)(lVar1 + 0xc) == *(ushort *)(param_2 + 0x714))) break;
      lVar1 = *(longlong *)(lVar1 + 0x18);
    }
    FUN_14015eab0(param_1 + 0x388,lVar1,0);
  }
LAB_14016c7e8:
  if (*(longlong *)(param_2 + 0x120) != 0) {
    FUN_14015af20(*(longlong *)(param_2 + 0x120),param_2);
  }
  if (*(longlong *)(*(longlong *)(param_2 + 0x748) + 0x110) != 0) {
    FUN_1401855c0();
  }
  if ((*(longlong **)(param_2 + 0x740) != (longlong *)0x0) &&
     (**(longlong **)(param_2 + 0x740) != 0)) {
    FUN_1401a4cb0(param_2 + 0x700);
  }
  FUN_1401619a0(param_1 + 0x16e8,*(longlong *)(param_2 + 0x748) + 0x128,0);
  uVar4 = (ulonglong)*(uint *)(param_2 + 0x6f8) % (ulonglong)*(uint *)(param_1 + 0xca0);
  if (*(longlong *)(param_1 + 0xc80) != 0) {
    puVar2 = *(uint **)(*(longlong *)(param_1 + 0xc80) + uVar4 * 8);
    while( true ) {
      if ((puVar2 == (uint *)0x0) || ((uint)uVar4 != puVar2[8] % *(uint *)(param_1 + 0xca0)))
      goto LAB_14016c8b0;
      if (*puVar2 == *(uint *)(param_2 + 0x6f8)) break;
      puVar2 = *(uint **)(puVar2 + 4);
    }
    FUN_1401b0d90(param_1 + 0xc78,puVar2,0);
  }
LAB_14016c8b0:
  plVar3 = *(longlong **)(param_1 + 0x478);
  lVar1 = *plVar3;
  uVar5 = (**(code **)(*(longlong *)(param_1 + 0x118) + 8))();
  (**(code **)(lVar1 + 0x10))(plVar3,uVar5,*(undefined4 *)(param_2 + 0x6f8));
  FUN_1401619a0(param_1 + 0x388,param_2 + 0x708,0);
  return;
}



void FUN_14016c910(longlong param_1,longlong param_2)

{
  int *piVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined8 *puVar4;
  longlong lVar5;
  undefined *puVar6;
  undefined *puVar7;
  undefined *local_res10;
  undefined *local_res18;
  
  if (*(char *)(param_2 + 0x700) != '\0') {
    *(undefined1 *)(param_2 + 0x700) = 0;
    if (*(longlong *)(param_2 + 0x68) == 0) {
      lVar5 = 0;
    }
    else {
      lVar5 = *(longlong *)(param_2 + 0x58);
    }
    for (; lVar5 != 0; lVar5 = *(longlong *)(lVar5 + 0x10)) {
      if (*(undefined8 **)(lVar5 + 8) == (undefined8 *)0x0) {
        uVar3 = 0;
      }
      else {
        uVar3 = **(undefined8 **)(lVar5 + 8);
      }
      FUN_14016a150(param_1,uVar3);
    }
    if (*(longlong *)(param_1 + 0x17f0) != 0) {
      FUN_1401568c0();
      local_res10 = PTR_DAT_1403200a0;
      puVar4 = (undefined8 *)(*(longlong *)(param_2 + 0x748) + 0x128);
      plVar2 = (longlong *)(**(code **)*puVar4)(puVar4,&local_res18);
      puVar7 = (undefined *)*plVar2;
      if ((undefined *)*plVar2 == (undefined *)0x0) {
        puVar7 = PTR_DAT_1403200a0;
      }
      FUN_14004ce50(&local_res10,&DAT_14025ef60,*(undefined4 *)(param_2 + 0x6f8),puVar7);
      if (((local_res18 != (undefined *)0x0) && (local_res18 != PTR_DAT_1403200a0)) &&
         (local_res18 + -8 != (undefined *)0x0)) {
        uVar3 = FUN_1401568c0();
        FUN_140156b50(uVar3);
        piVar1 = (int *)(local_res18 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_res18 + -8);
        }
        FUN_140156be0(uVar3);
      }
      puVar7 = local_res10;
      puVar6 = local_res10;
      if (local_res10 == (undefined *)0x0) {
        puVar6 = PTR_DAT_1403200a0;
      }
      FUN_140196a90(*(undefined8 *)(param_1 + 0x17f0),1,puVar6);
      if (((puVar7 != (undefined *)0x0) && (puVar7 != PTR_DAT_1403200a0)) &&
         (puVar7 + -8 != (undefined *)0x0)) {
        uVar3 = FUN_1401568c0();
        FUN_140156b50(uVar3);
        piVar1 = (int *)(puVar7 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar7 + -8);
        }
        FUN_140156be0(uVar3);
      }
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14016caa0(undefined8 param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  undefined8 uVar2;
  longlong lVar3;
  undefined1 auStack_d78 [32];
  undefined1 local_d58 [4];
  undefined4 local_d54;
  longlong local_d50;
  longlong local_d48;
  undefined4 local_d40;
  int local_d3c;
  undefined8 local_d30;
  undefined1 uStack_d28;
  undefined3 uStack_d27;
  undefined4 uStack_d24;
  undefined8 local_d20;
  undefined1 local_d18;
  undefined8 local_d10;
  undefined1 local_d08 [80];
  undefined4 local_cb8;
  undefined4 uStack_cb4;
  undefined4 uStack_cb0;
  undefined4 uStack_cac;
  undefined4 *local_38;
  undefined4 local_30;
  int local_2c;
  ulonglong local_28;
  
  local_d10 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_d78;
  FUN_1401544a0(local_d58);
  FUN_140153d90(local_d58);
  FUN_140154600(local_d58,0x800);
  FUN_140154600(local_d58,0);
  FUN_14004fd90(local_d58,9);
  iVar1 = *(int *)(param_3 + 0x18);
  FUN_140155b20(local_d58,(longlong)iVar1);
  if (*(int *)(param_3 + 0x18) == 0) {
    uVar2 = 0;
  }
  else {
    uVar2 = *(undefined8 *)(param_3 + 0x10);
  }
  if (iVar1 == 0) goto LAB_14016cb90;
  local_d54 = 0;
  if (local_d50 == 0) {
    if (local_d48 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0(0,uVar2);
    }
LAB_14016cb62:
    FUN_14004ff50(&local_d48,uVar2,iVar1);
  }
  else {
    if (local_d48 != 0) goto LAB_14016cb62;
    if (local_d50 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0(0,uVar2);
    }
    FUN_140050180(local_d50,uVar2,iVar1);
  }
  FUN_1400501f0(local_d58);
LAB_14016cb90:
  uVar2 = (**(code **)(*(longlong *)(param_2 + 0x108) + 0x10))();
  local_d20 = uVar2;
  FUN_140156b50(uVar2);
  local_d18 = 1;
  local_2c = 200;
  local_30 = 0;
  local_38 = &local_cb8;
  if (local_d50 == 0) {
    if (local_d48 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else {
    local_d40 = *(undefined4 *)(local_d50 + 0x18);
  }
  lVar3 = local_d48;
  if (local_d48 == 0) {
    if (local_d50 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(int *)(local_d50 + 0x18) != 0) {
      lVar3 = *(longlong *)(local_d50 + 0x10);
    }
  }
  local_30 = 1;
  local_d30._0_4_ = (undefined4)lVar3;
  local_d30._4_4_ = (undefined4)((ulonglong)lVar3 >> 0x20);
  local_cb8 = (undefined4)local_d30;
  uStack_cb4 = local_d30._4_4_;
  uStack_cac = uStack_d24;
  local_d30 = (longlong *)0x0;
  _uStack_d28 = CONCAT31((int3)((uint)local_d40 >> 8),1);
  uStack_cb0 = local_d40;
  FUN_1401a3610(*(undefined8 *)(param_2 + 0x748),&local_cb8,&local_d30);
  if (local_38 == (undefined4 *)0x0) {
    FUN_140156300(local_d08,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_d08,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_2c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_140156be0(uVar2);
  local_d30 = &local_d50;
  FUN_1401560e0(&local_d50);
  if ((local_d48 != 0) && (local_d3c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



void FUN_14016ccf0(longlong param_1)

{
  double dVar1;
  
  if (0 < *(int *)(param_1 + 0x1840)) {
    dVar1 = (double)(**(code **)(*(longlong *)(param_1 + 0x118) + 8))();
    if (30.0 < dVar1 - *(double *)(param_1 + 0x1810)) {
      FUN_14016a860(param_1);
    }
  }
  return;
}



undefined8 * FUN_14016cd30(undefined8 *param_1)

{
  longlong *plVar1;
  undefined4 uVar2;
  int iVar3;
  void *pvVar4;
  longlong lVar5;
  longlong lVar6;
  bool bVar7;
  longlong local_res10;
  
  LOCK();
  bVar7 = DAT_1403288c0 == 0;
  if (bVar7) {
    DAT_1403288c0 = 1;
  }
  UNLOCK();
  if (bVar7) {
    pvVar4 = operator_new(0xc0);
    if (pvVar4 == (void *)0x0) {
      lVar5 = 0;
    }
    else {
      lVar5 = FUN_1401981f0(pvVar4);
    }
    if (lVar5 == 0) {
      lVar6 = 0;
      local_res10 = 0;
    }
    else {
      lVar6 = FUN_140156940(0x48);
      if (lVar6 != 0) {
        local_res10 = lVar6;
        uVar2 = FUN_14015a430();
        FUN_140156a70(lVar6,uVar2,1);
      }
      local_res10 = lVar6;
      FUN_140156b50(lVar6);
      *(undefined8 *)(lVar6 + 0x40) = 1;
      *(longlong *)(lVar6 + 0x38) = lVar5;
      FUN_140156be0(lVar6);
    }
    FUN_140161b60(&DAT_1403288c8,&local_res10);
    if (lVar6 != 0) {
      FUN_140156b50(lVar6);
      plVar1 = (longlong *)(lVar6 + 0x40);
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_140156be0(lVar6);
        FUN_14015ec10(lVar6);
      }
      else {
        FUN_140156be0(lVar6);
      }
    }
    LOCK();
    UNLOCK();
    DAT_1403288c0 = 2;
  }
  else {
    LOCK();
    iVar3 = DAT_1403288c0;
    if (DAT_1403288c0 == 9999) {
      DAT_1403288c0 = 999;
      iVar3 = 9999;
    }
    UNLOCK();
    while (iVar3 != 2) {
      Sleep(5);
      LOCK();
      iVar3 = DAT_1403288c0;
      if (DAT_1403288c0 == 9999) {
        DAT_1403288c0 = 999;
        iVar3 = 9999;
      }
      UNLOCK();
    }
  }
  *param_1 = 0;
  FUN_140161b60(param_1,&DAT_1403288c8);
  return param_1;
}



void FUN_14016cec0(longlong param_1,longlong param_2,char param_3)

{
  longlong *plVar1;
  undefined8 *puVar2;
  undefined4 uVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if ((*(longlong *)(param_2 + 0x10) != 0) &&
     (*(longlong *)(*(longlong *)(param_2 + 0x10) + 8) =
           *(longlong *)(*(longlong *)(param_2 + 0x10) + 8) + -1,
     *(longlong *)(*(longlong *)(param_2 + 0x10) + 8) == 0)) {
    plVar1 = *(longlong **)(param_2 + 0x10);
    puVar2 = (undefined8 *)*plVar1;
    if (puVar2 != (undefined8 *)0x0) {
      (**(code **)*puVar2)(puVar2,1);
    }
    FUN_140156970(plVar1);
  }
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(*plVar1 + 0x18))(plVar1,param_2);
  }
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
  if (((param_3 != '\0') && (*(ulonglong *)(param_1 + 0x20) < *(ulonglong *)(param_1 + 0x40))) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar3 = FUN_14019e650(param_1);
    FUN_1401a8ca0(param_1,uVar3);
  }
  return;
}



undefined8 * FUN_14016cf90(longlong param_1,longlong param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  undefined8 *puVar4;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar4 = (undefined8 *)FUN_140156940(0x30);
  }
  else {
    puVar4 = (undefined8 *)
             (**(code **)(*plVar1 + 8))(plVar1,0x30,param_3,param_4,0xfffffffffffffffe);
  }
  if (puVar4 != (undefined8 *)0x0) {
    *puVar4 = Proud::AddrPort::vftable;
    *(undefined4 *)(puVar4 + 1) = *(undefined4 *)(param_2 + 8);
    *(undefined2 *)((longlong)puVar4 + 0xc) = *(undefined2 *)(param_2 + 0xc);
    puVar4[2] = 0;
    *(undefined4 *)(puVar4 + 5) = param_4;
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015b050(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined8 **)(param_1 + 0x10) = puVar4;
    *(undefined8 **)(param_1 + 0x18) = puVar4;
    puVar4[4] = 0;
    puVar4[3] = 0;
  }
  else {
    FUN_14015b050(param_1);
    FUN_14015b050(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      puVar4[4] = 0;
      puVar4[3] = lVar2;
      if (lVar2 != 0) {
        *(undefined8 **)(lVar2 + 0x20) = puVar4;
      }
      *(undefined8 **)(param_1 + 0x10) = puVar4;
    }
    else {
      if (*(longlong *)(lVar2 + 0x20) == 0) {
        *(undefined8 **)(param_1 + 0x10) = puVar4;
      }
      else {
        *(undefined8 **)(*(longlong *)(lVar2 + 0x20) + 0x18) = puVar4;
      }
      puVar4[4] = *(undefined8 *)(lVar2 + 0x20);
      puVar4[3] = lVar2;
      *(undefined8 **)(lVar2 + 0x20) = puVar4;
    }
  }
  *(undefined8 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar4;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b050(param_1);
  FUN_14015b050(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar3 = FUN_14019e650(param_1);
    FUN_1401a8ca0(param_1,uVar3);
  }
  FUN_14015b050(param_1);
  return puVar4;
}



void FUN_14016d0f0(longlong *param_1,longlong param_2)

{
  undefined8 *puVar1;
  void *pvVar2;
  int iVar3;
  
  if (0 < param_2) {
    iVar3 = 0;
    do {
      if ((*param_1 != 0) &&
         (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
         *(longlong *)(*param_1 + 8) == 0)) {
        puVar1 = (undefined8 *)*param_1;
        pvVar2 = (void *)*puVar1;
        if (pvVar2 != (void *)0x0) {
          FUN_140182790(pvVar2);
          operator_delete(pvVar2);
        }
        FUN_140156970(puVar1);
      }
      iVar3 = iVar3 + 1;
      param_1 = param_1 + 1;
    } while (iVar3 < param_2);
  }
  return;
}



longlong * FUN_14016d190(longlong *param_1,longlong *param_2,undefined4 param_3)

{
  longlong lVar1;
  
  lVar1 = 0;
  *param_1 = 0;
  if (*param_2 != 0) {
    *(longlong *)(*param_2 + 8) = *(longlong *)(*param_2 + 8) + 1;
    if ((*param_1 != 0) &&
       (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
       *(longlong *)(*param_1 + 8) == 0)) {
      lVar1 = *param_1;
    }
    *param_1 = *param_2;
    if (lVar1 != 0) {
      FUN_14015ebb0(lVar1);
    }
    *(undefined4 *)(param_1 + 4) = param_3;
    return param_1;
  }
  *(undefined4 *)(param_1 + 4) = param_3;
  return param_1;
}



// WARNING: Removing unreachable block (ram,0x00014016d8b7)
// WARNING: Removing unreachable block (ram,0x00014016d8bf)
// WARNING: Removing unreachable block (ram,0x00014016d8c3)
// WARNING: Removing unreachable block (ram,0x00014016d8cd)

void FUN_14016d220(longlong param_1,int param_2,int param_3)

{
  double *pdVar1;
  int *piVar2;
  double dVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  longlong *plVar8;
  longlong lVar9;
  void *pvVar10;
  ulonglong uVar11;
  int iVar12;
  longlong lVar13;
  ulonglong uVar14;
  int iVar15;
  longlong lVar16;
  longlong lVar17;
  int local_res10 [2];
  int local_res18 [2];
  char *local_res20;
  longlong *local_138;
  void *local_130;
  ulonglong local_128;
  longlong local_120;
  longlong local_118;
  longlong *local_108;
  undefined **local_100 [3];
  undefined **local_e8 [3];
  undefined1 local_d0 [8];
  undefined8 local_c8;
  undefined8 local_c0;
  undefined **local_b8 [3];
  undefined8 local_a0;
  undefined **local_98 [3];
  undefined **local_80 [3];
  undefined1 local_68 [24];
  undefined1 local_50 [24];
  
  local_a0 = 0xfffffffffffffffe;
  if (1 < param_2 - param_3) {
    std::_Container_base12::_Container_base12((_Container_base12 *)&local_138);
    local_138 = operator_new(0x10);
    if (local_138 == (longlong *)0x0) {
      local_108 = local_138;
      std::exception::exception((exception *)local_e8,(char **)&local_108);
      local_e8[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_e8,(ThrowInfo *)&DAT_14031d988);
    }
    *local_138 = 0;
    local_138[1] = 0;
    *local_138 = (longlong)&local_138;
    local_130 = (void *)0x0;
    local_128 = 0;
    local_120 = 0;
    local_118 = 0;
    local_res18[0] = param_2 + -1;
    local_res10[0] = param_3;
    FUN_1401621f0(&local_138,local_res10);
    FUN_1401621f0(&local_138,local_res18);
    lVar13 = local_118;
    while (lVar16 = 0, uVar11 = local_128, lVar13 != 0) {
      uVar7 = FUN_14015f290(&local_138,local_d0);
      plVar8 = (longlong *)FUN_1401622e0(uVar7,local_68,1);
      lVar17 = lVar16;
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        lVar17 = *(longlong *)*plVar8;
      }
      uVar11 = (ulonglong)plVar8[2] >> 2;
      if (*(ulonglong *)(lVar17 + 0x10) <= uVar11) {
        uVar11 = uVar11 - *(ulonglong *)(lVar17 + 0x10);
      }
      local_res10[0] =
           *(int *)(*(longlong *)(*(longlong *)(lVar17 + 8) + uVar11 * 8) +
                   (ulonglong)((uint)plVar8[2] & 3) * 4);
      if ((lVar13 != 0) && (lVar13 = lVar13 + -1, local_118 = lVar13, lVar13 == 0)) {
        local_120 = lVar16;
      }
      uVar7 = FUN_14015f290(&local_138,local_68);
      plVar8 = (longlong *)FUN_1401622e0(uVar7,local_50,1);
      lVar17 = lVar16;
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        lVar17 = *(longlong *)*plVar8;
      }
      uVar11 = (ulonglong)plVar8[2] >> 2;
      if (*(ulonglong *)(lVar17 + 0x10) <= uVar11) {
        uVar11 = uVar11 - *(ulonglong *)(lVar17 + 0x10);
      }
      iVar4 = *(int *)(*(longlong *)(*(longlong *)(lVar17 + 8) + uVar11 * 8) +
                      (ulonglong)((uint)plVar8[2] & 3) * 4);
      lVar17 = (longlong)iVar4;
      if ((lVar13 != 0) && (lVar13 = lVar13 + -1, local_118 = lVar13, lVar13 == 0)) {
        local_120 = lVar16;
      }
      iVar15 = iVar4 + 1;
      lVar16 = *(longlong *)(param_1 + lVar17 * 0x18);
      local_c8 = *(undefined8 *)(param_1 + 8 + lVar17 * 0x18);
      local_c0 = *(undefined8 *)(param_1 + 0x10 + lVar17 * 0x18);
      if (iVar15 <= local_res10[0]) {
        iVar12 = local_res10[0];
        if ((iVar15 < local_res10[0]) && (lVar13 = local_118, iVar15 <= local_res10[0])) {
          do {
            dVar3 = *(double *)(lVar16 + 0x188);
            while (*(double *)(*(longlong *)(param_1 + (longlong)iVar15 * 0x18) + 0x188) <= dVar3) {
              iVar15 = iVar15 + 1;
              lVar13 = local_118;
              if (iVar12 < iVar15) goto LAB_14016d4a8;
            }
            while( true ) {
              lVar13 = local_118;
              if (iVar12 < iVar15) goto LAB_14016d4a8;
              if (*(double *)(*(longlong *)(param_1 + (longlong)iVar12 * 0x18) + 0x188) < dVar3)
              break;
              iVar12 = iVar12 + -1;
            }
            if (iVar12 < iVar15) break;
            lVar13 = (longlong)iVar12;
            lVar9 = (longlong)iVar15;
            uVar7 = *(undefined8 *)(param_1 + lVar9 * 0x18);
            uVar6 = *(undefined8 *)(param_1 + 8 + lVar9 * 0x18);
            uVar5 = *(undefined8 *)(param_1 + 0x10 + lVar9 * 0x18);
            *(undefined8 *)(param_1 + lVar9 * 0x18) = *(undefined8 *)(param_1 + lVar13 * 0x18);
            *(undefined8 *)(param_1 + 8 + lVar9 * 0x18) =
                 *(undefined8 *)(param_1 + 8 + lVar13 * 0x18);
            *(undefined8 *)(param_1 + 0x10 + lVar9 * 0x18) =
                 *(undefined8 *)(param_1 + 0x10 + lVar13 * 0x18);
            *(undefined8 *)(param_1 + lVar13 * 0x18) = uVar7;
            *(undefined8 *)(param_1 + 8 + lVar13 * 0x18) = uVar6;
            *(undefined8 *)(param_1 + 0x10 + lVar13 * 0x18) = uVar5;
            lVar13 = local_118;
          } while (iVar15 < iVar12);
        }
LAB_14016d4a8:
        if (iVar4 <= iVar12) {
          lVar9 = (longlong)iVar12;
          lVar16 = *(longlong *)(param_1 + lVar17 * 0x18);
          dVar3 = *(double *)(lVar16 + 0x188);
          pdVar1 = (double *)(*(longlong *)(param_1 + lVar9 * 0x18) + 0x188);
          if (*pdVar1 <= dVar3 && dVar3 != *pdVar1) {
            uVar7 = *(undefined8 *)(param_1 + 8 + lVar17 * 0x18);
            uVar6 = *(undefined8 *)(param_1 + 0x10 + lVar17 * 0x18);
            *(undefined8 *)(param_1 + lVar17 * 0x18) = *(undefined8 *)(param_1 + lVar9 * 0x18);
            *(undefined8 *)(param_1 + 8 + lVar17 * 0x18) =
                 *(undefined8 *)(param_1 + 8 + lVar9 * 0x18);
            *(undefined8 *)(param_1 + 0x10 + lVar17 * 0x18) =
                 *(undefined8 *)(param_1 + 0x10 + lVar9 * 0x18);
            *(longlong *)(param_1 + lVar9 * 0x18) = lVar16;
            *(undefined8 *)(param_1 + 8 + lVar9 * 0x18) = uVar7;
            *(undefined8 *)(param_1 + 0x10 + lVar9 * 0x18) = uVar6;
            lVar13 = local_118;
          }
          if (iVar4 < iVar12) {
            std::_Container_base12::_Orphan_all((_Container_base12 *)&local_138);
            if ((((int)local_120 + (int)local_118 & 3U) == 0) && (local_128 <= local_118 + 4U >> 2))
            {
              FUN_14015f2b0(&local_138,1);
            }
            uVar11 = local_118 + local_120;
            uVar14 = uVar11 >> 2;
            if (local_128 <= uVar14) {
              uVar14 = uVar14 - local_128;
            }
            if (*(longlong *)((longlong)local_130 + uVar14 * 8) == 0) {
              pvVar10 = operator_new(0x10);
              if (pvVar10 == (void *)0x0) {
                local_res20 = (char *)0x0;
                std::exception::exception((exception *)local_98,&local_res20);
                local_98[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
                _CxxThrowException(local_98,(ThrowInfo *)&DAT_14031d988);
              }
              *(void **)((longlong)local_130 + uVar14 * 8) = pvVar10;
            }
            piVar2 = (int *)(*(longlong *)((longlong)local_130 + uVar14 * 8) +
                            (ulonglong)((uint)uVar11 & 3) * 4);
            if (piVar2 != (int *)0x0) {
              *piVar2 = iVar4;
            }
            local_118 = local_118 + 1;
            std::_Container_base12::_Orphan_all((_Container_base12 *)&local_138);
            if ((((char)local_118 + (char)local_120 & 3U) == 0) &&
               (local_128 <= local_118 + 4U >> 2)) {
              FUN_14015f2b0(&local_138,1);
            }
            uVar11 = local_118 + local_120;
            uVar14 = uVar11 >> 2;
            if (local_128 <= uVar14) {
              uVar14 = uVar14 - local_128;
            }
            if (*(longlong *)((longlong)local_130 + uVar14 * 8) == 0) {
              local_res20 = operator_new(0x10);
              if (local_res20 == (char *)0x0) {
                std::exception::exception((exception *)local_80,&local_res20);
                local_80[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
                _CxxThrowException(local_80,(ThrowInfo *)&DAT_14031d988);
              }
              *(char **)((longlong)local_130 + uVar14 * 8) = local_res20;
            }
            piVar2 = (int *)(*(longlong *)((longlong)local_130 + uVar14 * 8) +
                            (ulonglong)((uint)uVar11 & 3) * 4);
            if (piVar2 != (int *)0x0) {
              *piVar2 = iVar12 + -1;
            }
            lVar13 = local_118 + 1;
            local_118 = lVar13;
          }
        }
        iVar4 = local_res10[0];
        if (iVar12 < local_res10[0]) {
          std::_Container_base12::_Orphan_all((_Container_base12 *)&local_138);
          if ((((int)local_120 + (int)local_118 & 3U) == 0) && (local_128 <= local_118 + 4U >> 2)) {
            FUN_14015f2b0(&local_138,1);
          }
          uVar11 = local_118 + local_120;
          uVar14 = uVar11 >> 2;
          if (local_128 <= uVar14) {
            uVar14 = uVar14 - local_128;
          }
          if (*(longlong *)((longlong)local_130 + uVar14 * 8) == 0) {
            pvVar10 = operator_new(0x10);
            if (pvVar10 == (void *)0x0) {
              local_res20 = (char *)0x0;
              std::exception::exception((exception *)local_b8,&local_res20);
              local_b8[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
              _CxxThrowException(local_b8,(ThrowInfo *)&DAT_14031d988);
            }
            *(void **)((longlong)local_130 + uVar14 * 8) = pvVar10;
          }
          piVar2 = (int *)(*(longlong *)((longlong)local_130 + uVar14 * 8) +
                          (ulonglong)((uint)uVar11 & 3) * 4);
          if (piVar2 != (int *)0x0) {
            *piVar2 = iVar12 + 1;
          }
          local_118 = local_118 + 1;
          std::_Container_base12::_Orphan_all((_Container_base12 *)&local_138);
          if ((((char)local_118 + (char)local_120 & 3U) == 0) && (local_128 <= local_118 + 4U >> 2))
          {
            FUN_14015f2b0(&local_138,1);
          }
          uVar11 = local_118 + local_120;
          uVar14 = uVar11 >> 2;
          if (local_128 <= uVar14) {
            uVar14 = uVar14 - local_128;
          }
          if (*(longlong *)((longlong)local_130 + uVar14 * 8) == 0) {
            pvVar10 = operator_new(0x10);
            if (pvVar10 == (void *)0x0) {
              local_res20 = (char *)0x0;
              std::exception::exception((exception *)local_100,&local_res20);
              local_100[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
              _CxxThrowException(local_100,(ThrowInfo *)&DAT_14031d988);
            }
            *(void **)((longlong)local_130 + uVar14 * 8) = pvVar10;
          }
          piVar2 = (int *)(*(longlong *)((longlong)local_130 + uVar14 * 8) +
                          (ulonglong)((uint)uVar11 & 3) * 4);
          if (piVar2 != (int *)0x0) {
            *piVar2 = iVar4;
          }
          lVar13 = local_118 + 1;
          local_118 = lVar13;
        }
      }
    }
    while (uVar11 != 0) {
      uVar11 = uVar11 - 1;
      if (*(longlong *)((longlong)local_130 + uVar11 * 8) != 0) {
        operator_delete(*(void **)((longlong)local_130 + uVar11 * 8));
      }
    }
    if (local_130 != (void *)0x0) {
      operator_delete(local_130);
    }
    local_128 = 0;
    local_130 = (void *)0x0;
    std::_Container_base12::_Orphan_all((_Container_base12 *)&local_138);
    operator_delete(local_138);
    local_138 = (longlong *)0x0;
    std::_Container_base12::~_Container_base12((_Container_base12 *)&local_138);
  }
  return;
}



undefined8 FUN_14016d990(longlong param_1,uint param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  uint *puVar4;
  
  uVar3 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar3);
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  lVar1 = *(longlong *)(param_1 + 0x20);
  uVar2 = (ulonglong)param_2 % (ulonglong)*(uint *)(lVar1 + 0xca0);
  if ((*(longlong *)(lVar1 + 0xc80) != 0) &&
     (puVar4 = *(uint **)(*(longlong *)(lVar1 + 0xc80) + uVar2 * 8), puVar4 != (uint *)0x0)) {
    while ((uint)uVar2 == puVar4[8] % *(uint *)(lVar1 + 0xca0)) {
      if (*puVar4 == param_2) {
        if ((*(longlong *)(puVar4 + 2) != 0) &&
           (*(longlong *)(*(longlong *)(puVar4 + 2) + 0x228) == 0)) {
          FUN_14016c910(lVar1);
        }
        break;
      }
      puVar4 = *(uint **)(puVar4 + 4);
      if (puVar4 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar3);
  return 1;
}



// WARNING: Removing unreachable block (ram,0x00014016db1e)

longlong * FUN_14016da80(longlong param_1,longlong *param_2,uint param_3,uint param_4)

{
  longlong *plVar1;
  ulonglong uVar2;
  uint *puVar3;
  longlong lVar4;
  uint uVar5;
  longlong local_res8;
  
  lVar4 = 0;
  local_res8 = 0;
  uVar5 = param_3;
  if ((int)param_4 < (int)param_3) {
    uVar5 = param_4;
    param_4 = param_3;
  }
  uVar2 = (ulonglong)(uVar5 << 0x10 ^ param_4) % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    puVar3 = *(uint **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
    while( true ) {
      if ((puVar3 == (uint *)0x0) || ((uint)uVar2 != puVar3[8] % *(uint *)(param_1 + 0x28)))
      goto LAB_14016dbb3;
      if ((*puVar3 == uVar5) && (puVar3[1] == param_4)) break;
      puVar3 = *(uint **)(puVar3 + 4);
    }
    if (puVar3 != (uint *)0x0) {
      if (*(longlong *)(puVar3 + 2) != 0) {
        *(longlong *)(*(longlong *)(puVar3 + 2) + 8) =
             *(longlong *)(*(longlong *)(puVar3 + 2) + 8) + 1;
        local_res8 = *(longlong *)(puVar3 + 2);
      }
      *param_2 = 0;
      if (local_res8 != 0) {
        *(longlong *)(local_res8 + 8) = *(longlong *)(local_res8 + 8) + 1;
        if ((*param_2 != 0) &&
           (*(longlong *)(*param_2 + 8) = *(longlong *)(*param_2 + 8) + -1,
           *(longlong *)(*param_2 + 8) == 0)) {
          lVar4 = *param_2;
        }
        *param_2 = local_res8;
        if (lVar4 != 0) {
          FUN_14015ebb0(lVar4);
        }
      }
      if (local_res8 == 0) {
        return param_2;
      }
      plVar1 = (longlong *)(local_res8 + 8);
      *plVar1 = *plVar1 + -1;
      if (*plVar1 != 0) {
        return param_2;
      }
      FUN_14015ebb0(local_res8);
      return param_2;
    }
  }
LAB_14016dbb3:
  *param_2 = 0;
  return param_2;
}



void FUN_14016dbd0(undefined8 *param_1)

{
  longlong *plVar1;
  
  *param_1 = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 3)) {
    FUN_14016d0f0(param_1[2],(longlong)*(int *)(param_1 + 3));
  }
  if (param_1[2] != 0) {
    plVar1 = (longlong *)param_1[1];
    if (plVar1 != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014016dc17. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*plVar1 + 0x18))(plVar1,param_1[2]);
      return;
    }
    FUN_140156970();
  }
  return;
}



undefined8 * FUN_14016dc30(undefined8 *param_1,uint param_2)

{
  longlong *plVar1;
  
  *param_1 = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 3)) {
    FUN_14016d0f0(param_1[2],(longlong)*(int *)(param_1 + 3));
  }
  if (param_1[2] != 0) {
    plVar1 = (longlong *)param_1[1];
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,param_1[2]);
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



// WARNING: Removing unreachable block (ram,0x00014016dd96)
// WARNING: Removing unreachable block (ram,0x00014016dda4)

void FUN_14016dca0(ulonglong *param_1,ulonglong *param_2)

{
  longlong *plVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  uVar3 = *param_2;
  uVar4 = *param_1;
  if (uVar4 != uVar3) {
    uVar2 = uVar4;
    if (uVar3 < uVar4) {
      uVar2 = uVar3;
      uVar3 = uVar4;
    }
    if (uVar2 != 0) {
      FUN_140156b50(uVar2);
    }
    if (uVar3 != 0) {
      FUN_140156b50(uVar3);
    }
    if (*param_2 != 0) {
      plVar1 = (longlong *)(*param_2 + 0x40);
      *plVar1 = *plVar1 + 1;
    }
    uVar4 = 0;
    if (*param_1 != 0) {
      plVar1 = (longlong *)(*param_1 + 0x40);
      *plVar1 = *plVar1 + -1;
      if (*(longlong *)(*param_1 + 0x40) == 0) {
        uVar4 = *param_1;
      }
    }
    *param_1 = *param_2;
    if (uVar2 != 0) {
      FUN_140156be0(uVar2);
    }
    if (uVar3 != 0) {
      FUN_140156be0(uVar3);
    }
    if (uVar4 != 0) {
      FUN_14013c4c0(uVar4);
    }
  }
  return;
}



void FUN_14016ddd0(longlong param_1)

{
  longlong *plVar1;
  undefined8 *puVar2;
  uint uVar3;
  ulonglong uVar4;
  longlong lVar5;
  longlong lVar6;
  float fVar7;
  float fVar8;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_14015b050();
  lVar5 = *(longlong *)(param_1 + 0x10);
  while (lVar5 != 0) {
    lVar6 = *(longlong *)(lVar5 + 0x18);
    if ((*(longlong *)(lVar5 + 0x10) != 0) &&
       (*(longlong *)(*(longlong *)(lVar5 + 0x10) + 8) =
             *(longlong *)(*(longlong *)(lVar5 + 0x10) + 8) + -1,
       *(longlong *)(*(longlong *)(lVar5 + 0x10) + 8) == 0)) {
      plVar1 = *(longlong **)(lVar5 + 0x10);
      puVar2 = (undefined8 *)*plVar1;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
      }
      FUN_140156970(plVar1);
    }
    plVar1 = *(longlong **)(param_1 + 0x50);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970(lVar5);
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,lVar5);
    }
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    lVar5 = lVar6;
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_14015b050(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar3 = FUN_14019e650(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    lVar5 = 0;
    *(uint *)(param_1 + 0x28) = uVar3;
    fVar8 = (float)uVar3 * *(float *)(param_1 + 0x34);
    if ((9.223372e+18 < fVar8) && (fVar8 = fVar8 - 9.223372e+18, fVar8 < 9.223372e+18)) {
      lVar5 = -0x8000000000000000;
    }
    fVar7 = (float)uVar3 * *(float *)(param_1 + 0x30);
    lVar6 = 0;
    *(longlong *)(param_1 + 0x38) = (longlong)fVar8 + lVar5;
    if ((9.223372e+18 < fVar7) && (fVar7 = fVar7 - 9.223372e+18, fVar7 < 9.223372e+18)) {
      lVar6 = -0x8000000000000000;
    }
    uVar4 = (longlong)fVar7 + lVar6;
    if ((ulonglong)((longlong)fVar7 + lVar6) < 0x11) {
      uVar4 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar4;
  }
  FUN_14015b050(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



void FUN_14016df50(longlong param_1,longlong param_2,char param_3)

{
  longlong *plVar1;
  undefined4 uVar2;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if ((*(longlong *)(param_2 + 8) != 0) &&
     (*(longlong *)(*(longlong *)(param_2 + 8) + 8) =
           *(longlong *)(*(longlong *)(param_2 + 8) + 8) + -1,
     *(longlong *)(*(longlong *)(param_2 + 8) + 8) == 0)) {
    FUN_14015ebb0(*(undefined8 *)(param_2 + 8));
  }
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(*plVar1 + 0x18))(plVar1,param_2);
  }
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
  if (((param_3 != '\0') && (*(ulonglong *)(param_1 + 0x20) < *(ulonglong *)(param_1 + 0x40))) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar2 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar2);
  }
  return;
}



void FUN_14016e000(longlong param_1,longlong param_2,undefined1 param_3)

{
  uint uVar1;
  ulonglong uVar2;
  uint uVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar1 = *(uint *)(param_1 + 0x28);
  uVar2 = (ulonglong)*(uint *)(param_2 + 0x20) % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x20) == 1) {
    *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    *(undefined8 *)(param_1 + 0x10) = 0;
    *(undefined8 *)(param_1 + 0x18) = 0;
  }
  else {
    uVar3 = (uint)uVar2;
    if (((*(longlong *)(param_2 + 0x18) == 0) ||
        (*(uint *)(*(longlong *)(param_2 + 0x18) + 0x20) % uVar1 != uVar3)) &&
       ((*(longlong *)(param_2 + 0x10) == 0 ||
        (*(uint *)(*(longlong *)(param_2 + 0x10) + 0x20) % uVar1 != uVar3)))) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    }
    else if (param_2 == *(longlong *)(*(longlong *)(param_1 + 8) + (longlong)(int)uVar3 * 8)) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = *(undefined8 *)(param_2 + 0x10);
    }
    if (param_2 == *(longlong *)(param_1 + 0x10)) {
      *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_2 + 0x10);
      *(undefined8 *)(param_2 + 0x18) = 0;
    }
    if (param_2 == *(longlong *)(param_1 + 0x18)) {
      *(undefined8 *)(param_1 + 0x18) = *(undefined8 *)(param_2 + 0x18);
      *(undefined8 *)(param_2 + 0x10) = 0;
    }
    if (*(longlong *)(param_2 + 0x18) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x18) + 0x10) = *(undefined8 *)(param_2 + 0x10);
    }
    if (*(longlong *)(param_2 + 0x10) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x10) + 0x18) = *(undefined8 *)(param_2 + 0x18);
    }
  }
  FUN_14016df50(param_1,param_2,param_3);
  FUN_14015b3b0(param_1);
  return;
}



undefined8 FUN_14016e100(longlong param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4)

{
  char cVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 8) == 0) {
    cVar1 = FUN_1401a8bb0(param_1,*(undefined4 *)(param_1 + 0x28),1);
    if (cVar1 == '\0') {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  FUN_14015b050(param_1);
  uVar2 = FUN_14016cf90(param_1,param_2,param_3,param_4);
  FUN_14015b050(param_1);
  return uVar2;
}



undefined8 * FUN_14016e180(longlong param_1,undefined8 *param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  undefined8 *puVar4;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar4 = (undefined8 *)FUN_140156940(0x28);
  }
  else {
    puVar4 = (undefined8 *)
             (**(code **)(*plVar1 + 8))(plVar1,0x28,param_3,param_4,0xfffffffffffffffe);
  }
  if (puVar4 != (undefined8 *)0x0) {
    *puVar4 = *param_2;
    puVar4[1] = 0;
    *(undefined4 *)(puVar4 + 4) = param_4;
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015b3b0(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined8 **)(param_1 + 0x10) = puVar4;
    *(undefined8 **)(param_1 + 0x18) = puVar4;
    puVar4[3] = 0;
    puVar4[2] = 0;
  }
  else {
    FUN_14015b3b0(param_1);
    FUN_14015b3b0(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      puVar4[3] = 0;
      puVar4[2] = lVar2;
      if (lVar2 != 0) {
        *(undefined8 **)(lVar2 + 0x18) = puVar4;
      }
      *(undefined8 **)(param_1 + 0x10) = puVar4;
    }
    else {
      if (*(longlong *)(lVar2 + 0x18) == 0) {
        *(undefined8 **)(param_1 + 0x10) = puVar4;
      }
      else {
        *(undefined8 **)(*(longlong *)(lVar2 + 0x18) + 0x10) = puVar4;
      }
      puVar4[3] = *(undefined8 *)(lVar2 + 0x18);
      puVar4[2] = lVar2;
      *(undefined8 **)(lVar2 + 0x18) = puVar4;
    }
  }
  *(undefined8 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar4;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b3b0(param_1);
  FUN_14015b3b0(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar3 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar3);
  }
  FUN_14015b3b0(param_1);
  return puVar4;
}



void FUN_14016e2d0(longlong param_1,longlong *param_2,char param_3)

{
  longlong *plVar1;
  undefined4 uVar2;
  
  if (param_2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if ((*param_2 != 0) &&
     (*(longlong *)(*param_2 + 8) = *(longlong *)(*param_2 + 8) + -1,
     *(longlong *)(*param_2 + 8) == 0)) {
    FUN_14015ebb0(*param_2);
  }
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(*plVar1 + 0x18))(plVar1,param_2);
  }
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
  if (((param_3 != '\0') && (*(ulonglong *)(param_1 + 0x20) < *(ulonglong *)(param_1 + 0x40))) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar2 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar2);
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x00014016e963)
// WARNING: Removing unreachable block (ram,0x00014016e96b)
// WARNING: Removing unreachable block (ram,0x00014016e96f)
// WARNING: Removing unreachable block (ram,0x00014016e979)

void FUN_14016e380(longlong param_1,int param_2,int param_3)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  undefined8 uVar5;
  longlong *plVar6;
  void *pvVar7;
  ulonglong uVar8;
  int iVar9;
  longlong lVar10;
  ulonglong uVar11;
  int iVar12;
  longlong lVar13;
  longlong lVar14;
  int iVar15;
  int local_res10 [2];
  int local_res18 [2];
  char *local_res20;
  longlong *local_128;
  void *local_120;
  ulonglong local_118;
  longlong local_110;
  longlong local_108;
  longlong *local_f8;
  undefined **local_f0 [3];
  undefined **local_d8 [3];
  undefined **local_c0 [3];
  undefined8 local_a8;
  undefined **local_a0 [3];
  undefined **local_88 [3];
  undefined1 local_70 [24];
  undefined1 local_58 [32];
  
  local_a8 = 0xfffffffffffffffe;
  if (1 < param_2 - param_3) {
    std::_Container_base12::_Container_base12((_Container_base12 *)&local_128);
    local_128 = operator_new(0x10);
    if (local_128 == (longlong *)0x0) {
      local_f8 = local_128;
      std::exception::exception((exception *)local_d8,(char **)&local_f8);
      local_d8[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_d8,(ThrowInfo *)&DAT_14031d988);
    }
    *local_128 = 0;
    local_128[1] = 0;
    *local_128 = (longlong)&local_128;
    local_120 = (void *)0x0;
    local_118 = 0;
    local_110 = 0;
    local_108 = 0;
    local_res18[0] = param_2 + -1;
    local_res10[0] = param_3;
    FUN_1401621f0(&local_128,local_res10);
    FUN_1401621f0(&local_128,local_res18);
    lVar10 = local_108;
    while (lVar14 = 0, uVar8 = local_118, lVar10 != 0) {
      uVar5 = FUN_14015f290(&local_128,local_70);
      plVar6 = (longlong *)FUN_1401622e0(uVar5,local_58,1);
      lVar13 = lVar14;
      if ((longlong *)*plVar6 != (longlong *)0x0) {
        lVar13 = *(longlong *)*plVar6;
      }
      uVar8 = (ulonglong)plVar6[2] >> 2;
      if (*(ulonglong *)(lVar13 + 0x10) <= uVar8) {
        uVar8 = uVar8 - *(ulonglong *)(lVar13 + 0x10);
      }
      iVar15 = *(int *)(*(longlong *)(*(longlong *)(lVar13 + 8) + uVar8 * 8) +
                       (ulonglong)((uint)plVar6[2] & 3) * 4);
      if ((lVar10 != 0) && (lVar10 = lVar10 + -1, local_108 = lVar10, lVar10 == 0)) {
        local_110 = lVar14;
      }
      local_res10[0] = iVar15;
      uVar5 = FUN_14015f290(&local_128,local_58);
      plVar6 = (longlong *)FUN_1401622e0(uVar5,local_70,1);
      lVar13 = lVar14;
      if ((longlong *)*plVar6 != (longlong *)0x0) {
        lVar13 = *(longlong *)*plVar6;
      }
      uVar8 = (ulonglong)plVar6[2] >> 2;
      if (*(ulonglong *)(lVar13 + 0x10) <= uVar8) {
        uVar8 = uVar8 - *(ulonglong *)(lVar13 + 0x10);
      }
      iVar2 = *(int *)(*(longlong *)(*(longlong *)(lVar13 + 8) + uVar8 * 8) +
                      (ulonglong)((uint)plVar6[2] & 3) * 4);
      lVar13 = (longlong)iVar2;
      if ((lVar10 != 0) && (lVar10 = lVar10 + -1, local_108 = lVar10, lVar10 == 0)) {
        local_110 = lVar14;
      }
      iVar12 = iVar2 + 1;
      iVar3 = *(int *)(param_1 + lVar13 * 4);
      if (iVar12 <= iVar15) {
        iVar9 = iVar15;
        if ((iVar12 < iVar15) && (lVar10 = local_108, iVar12 <= iVar15)) {
LAB_14016e547:
          do {
            if (iVar3 < *(int *)(param_1 + (longlong)iVar12 * 4)) {
              if (iVar9 < iVar12) break;
              do {
                if (*(int *)(param_1 + (longlong)iVar9 * 4) < iVar3) {
                  if (iVar9 < iVar12) goto LAB_14016e595;
                  uVar4 = *(undefined4 *)(param_1 + (longlong)iVar12 * 4);
                  *(undefined4 *)(param_1 + (longlong)iVar12 * 4) =
                       *(undefined4 *)(param_1 + (longlong)iVar9 * 4);
                  *(undefined4 *)(param_1 + (longlong)iVar9 * 4) = uVar4;
                  break;
                }
                iVar9 = iVar9 + -1;
              } while (iVar12 <= iVar9);
            }
            else {
              iVar12 = iVar12 + 1;
              if (iVar12 <= iVar9) goto LAB_14016e547;
            }
          } while (iVar12 < iVar9);
        }
LAB_14016e595:
        if (iVar2 <= iVar9) {
          iVar3 = *(int *)(param_1 + (longlong)iVar9 * 4);
          if (iVar3 < *(int *)(param_1 + lVar13 * 4)) {
            uVar4 = *(undefined4 *)(param_1 + lVar13 * 4);
            *(int *)(param_1 + lVar13 * 4) = iVar3;
            *(undefined4 *)(param_1 + (longlong)iVar9 * 4) = uVar4;
            lVar10 = local_108;
          }
          if (iVar2 < iVar9) {
            std::_Container_base12::_Orphan_all((_Container_base12 *)&local_128);
            if ((((int)local_110 + (int)local_108 & 3U) == 0) && (local_118 <= local_108 + 4U >> 2))
            {
              FUN_14015f2b0(&local_128,1);
            }
            uVar8 = local_108 + local_110;
            uVar11 = uVar8 >> 2;
            if (local_118 <= uVar11) {
              uVar11 = uVar11 - local_118;
            }
            if (*(longlong *)((longlong)local_120 + uVar11 * 8) == 0) {
              pvVar7 = operator_new(0x10);
              if (pvVar7 == (void *)0x0) {
                local_res20 = (char *)0x0;
                std::exception::exception((exception *)local_a0,&local_res20);
                local_a0[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
                _CxxThrowException(local_a0,(ThrowInfo *)&DAT_14031d988);
              }
              *(void **)((longlong)local_120 + uVar11 * 8) = pvVar7;
            }
            piVar1 = (int *)(*(longlong *)((longlong)local_120 + uVar11 * 8) +
                            (ulonglong)((uint)uVar8 & 3) * 4);
            if (piVar1 != (int *)0x0) {
              *piVar1 = iVar2;
            }
            local_108 = local_108 + 1;
            std::_Container_base12::_Orphan_all((_Container_base12 *)&local_128);
            if ((((char)local_108 + (char)local_110 & 3U) == 0) &&
               (local_118 <= local_108 + 4U >> 2)) {
              FUN_14015f2b0(&local_128,1);
            }
            uVar8 = local_108 + local_110;
            uVar11 = uVar8 >> 2;
            if (local_118 <= uVar11) {
              uVar11 = uVar11 - local_118;
            }
            if (*(longlong *)((longlong)local_120 + uVar11 * 8) == 0) {
              local_res20 = operator_new(0x10);
              if (local_res20 == (char *)0x0) {
                std::exception::exception((exception *)local_c0,&local_res20);
                local_c0[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
                _CxxThrowException(local_c0,(ThrowInfo *)&DAT_14031d988);
              }
              *(char **)((longlong)local_120 + uVar11 * 8) = local_res20;
            }
            piVar1 = (int *)(*(longlong *)((longlong)local_120 + uVar11 * 8) +
                            (ulonglong)((uint)uVar8 & 3) * 4);
            if (piVar1 != (int *)0x0) {
              *piVar1 = iVar9 + -1;
            }
            lVar10 = local_108 + 1;
            iVar15 = local_res10[0];
            local_108 = lVar10;
          }
        }
        if (iVar9 < iVar15) {
          std::_Container_base12::_Orphan_all((_Container_base12 *)&local_128);
          if ((((int)local_110 + (int)local_108 & 3U) == 0) && (local_118 <= local_108 + 4U >> 2)) {
            FUN_14015f2b0(&local_128,1);
          }
          uVar8 = local_108 + local_110;
          uVar11 = uVar8 >> 2;
          if (local_118 <= uVar11) {
            uVar11 = uVar11 - local_118;
          }
          if (*(longlong *)((longlong)local_120 + uVar11 * 8) == 0) {
            pvVar7 = operator_new(0x10);
            if (pvVar7 == (void *)0x0) {
              local_res20 = (char *)0x0;
              std::exception::exception((exception *)local_f0,&local_res20);
              local_f0[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
              _CxxThrowException(local_f0,(ThrowInfo *)&DAT_14031d988);
            }
            *(void **)((longlong)local_120 + uVar11 * 8) = pvVar7;
          }
          piVar1 = (int *)(*(longlong *)((longlong)local_120 + uVar11 * 8) +
                          (ulonglong)((uint)uVar8 & 3) * 4);
          if (piVar1 != (int *)0x0) {
            *piVar1 = iVar9 + 1;
          }
          local_108 = local_108 + 1;
          std::_Container_base12::_Orphan_all((_Container_base12 *)&local_128);
          if ((((char)local_108 + (char)local_110 & 3U) == 0) && (local_118 <= local_108 + 4U >> 2))
          {
            FUN_14015f2b0(&local_128,1);
          }
          uVar8 = local_108 + local_110;
          uVar11 = uVar8 >> 2;
          if (local_118 <= uVar11) {
            uVar11 = uVar11 - local_118;
          }
          if (*(longlong *)((longlong)local_120 + uVar11 * 8) == 0) {
            pvVar7 = operator_new(0x10);
            if (pvVar7 == (void *)0x0) {
              local_res20 = (char *)0x0;
              std::exception::exception((exception *)local_88,&local_res20);
              local_88[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
              _CxxThrowException(local_88,(ThrowInfo *)&DAT_14031d988);
            }
            *(void **)((longlong)local_120 + uVar11 * 8) = pvVar7;
          }
          piVar1 = (int *)(*(longlong *)((longlong)local_120 + uVar11 * 8) +
                          (ulonglong)((uint)uVar8 & 3) * 4);
          if (piVar1 != (int *)0x0) {
            *piVar1 = iVar15;
          }
          lVar10 = local_108 + 1;
          local_108 = lVar10;
        }
      }
    }
    while (uVar8 != 0) {
      uVar8 = uVar8 - 1;
      if (*(longlong *)((longlong)local_120 + uVar8 * 8) != 0) {
        operator_delete(*(void **)((longlong)local_120 + uVar8 * 8));
      }
    }
    if (local_120 != (void *)0x0) {
      operator_delete(local_120);
    }
    local_118 = 0;
    local_120 = (void *)0x0;
    std::_Container_base12::_Orphan_all((_Container_base12 *)&local_128);
    operator_delete(local_128);
    local_128 = (longlong *)0x0;
    std::_Container_base12::~_Container_base12((_Container_base12 *)&local_128);
  }
  return;
}



undefined8
FUN_14016ea40(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,undefined8 *param_6,undefined8 *param_7,undefined8 *param_8,
             undefined8 *param_9)

{
  int *piVar1;
  longlong lVar2;
  longlong *plVar3;
  longlong *plVar4;
  longlong *plVar5;
  longlong *plVar6;
  undefined *puVar7;
  undefined *puVar8;
  undefined *puVar9;
  undefined *puVar10;
  undefined8 uVar11;
  longlong *local_res8;
  longlong local_108;
  undefined *local_100;
  undefined *local_f8;
  undefined *local_f0;
  undefined *local_e8;
  undefined *local_e0;
  undefined **local_d8;
  undefined4 local_d0;
  undefined2 local_cc;
  undefined **local_c8;
  undefined4 local_c0;
  undefined2 local_bc;
  undefined **local_b8;
  undefined4 local_b0;
  undefined2 local_ac;
  undefined **local_a8;
  undefined4 local_a0;
  undefined2 local_9c;
  undefined8 local_98;
  undefined1 local_90;
  undefined8 local_88;
  undefined1 local_80;
  undefined8 local_78;
  undefined1 local_70;
  undefined8 local_68;
  undefined1 local_60;
  undefined8 local_58;
  undefined1 local_50;
  undefined8 local_48;
  undefined1 local_40;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  local_48 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(local_48);
  local_40 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))
              (*(longlong **)(param_1 + 0x20),
               L"Proud::CNetServerImpl::C2SStub::NotifyP2PHolepunchSuccess");
  }
  local_res8 = (longlong *)0x0;
  plVar3 = (longlong *)
           FUN_14016da80(*(longlong *)(param_1 + 0x20) + 0x2d8,&local_108,*param_4,*param_5);
  if (*plVar3 != 0) {
    *(longlong *)(*plVar3 + 8) = *(longlong *)(*plVar3 + 8) + 1;
    local_res8 = (longlong *)*plVar3;
  }
  if ((local_108 != 0) &&
     (*(longlong *)(local_108 + 8) = *(longlong *)(local_108 + 8) + -1,
     *(longlong *)(local_108 + 8) == 0)) {
    FUN_14015ebb0(local_108);
  }
  if (((local_res8 != (longlong *)0x0) && (lVar2 = *local_res8, lVar2 != 0)) &&
     (*(char *)(lVar2 + 8) == '\x01')) {
    if (*(char *)(lVar2 + 8) != '\0') {
      *(undefined1 *)(lVar2 + 8) = 0;
    }
    lVar2 = *local_res8;
    uVar11 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x20) + 0x118) + 8))();
    *(undefined8 *)(lVar2 + 0x198) = uVar11;
    local_b8 = Proud::AddrPort::vftable;
    local_b0 = *(undefined4 *)(param_9 + 1);
    local_ac = *(undefined2 *)((longlong)param_9 + 0xc);
    local_d8 = Proud::AddrPort::vftable;
    local_d0 = *(undefined4 *)(param_6 + 1);
    local_cc = *(undefined2 *)((longlong)param_6 + 0xc);
    FUN_14015aab0(*local_res8,*param_4,&local_d8,&local_b8);
    local_c8 = Proud::AddrPort::vftable;
    local_c0 = *(undefined4 *)(param_7 + 1);
    local_bc = *(undefined2 *)((longlong)param_7 + 0xc);
    local_a8 = Proud::AddrPort::vftable;
    local_a0 = *(undefined4 *)(param_8 + 1);
    local_9c = *(undefined2 *)((longlong)param_8 + 0xc);
    FUN_14015aab0(*local_res8,*param_5,&local_a8,&local_c8);
    plVar3 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x4a8);
    (**(code **)(*plVar3 + 0x90))
              (plVar3,*param_4,&DAT_140328530,param_4,param_5,param_6,param_7,param_8,param_9);
    plVar3 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x4a8);
    (**(code **)(*plVar3 + 0x90))
              (plVar3,*param_5,&DAT_140328530,param_4,param_5,param_6,param_7,param_8,param_9);
    if (*(longlong *)(*(longlong *)(param_1 + 0x20) + 0x17f0) != 0) {
      FUN_1401568c0();
      local_100 = PTR_DAT_1403200a0;
      plVar3 = (longlong *)(**(code **)*param_9)(param_9,&local_e0);
      plVar4 = (longlong *)(**(code **)*param_8)(param_8,&local_f0);
      plVar5 = (longlong *)(**(code **)*param_7)(param_7,&local_e8);
      plVar6 = (longlong *)(**(code **)*param_6)(param_6,&local_f8);
      puVar10 = (undefined *)*plVar3;
      if ((undefined *)*plVar3 == (undefined *)0x0) {
        puVar10 = PTR_DAT_1403200a0;
      }
      puVar9 = (undefined *)*plVar4;
      if ((undefined *)*plVar4 == (undefined *)0x0) {
        puVar9 = PTR_DAT_1403200a0;
      }
      puVar8 = (undefined *)*plVar5;
      if ((undefined *)*plVar5 == (undefined *)0x0) {
        puVar8 = PTR_DAT_1403200a0;
      }
      puVar7 = (undefined *)*plVar6;
      if ((undefined *)*plVar6 == (undefined *)0x0) {
        puVar7 = PTR_DAT_1403200a0;
      }
      FUN_14004ce50(&local_100,&DAT_14025f240,*param_4,*param_5,puVar7,puVar8,puVar9,puVar10);
      if (((local_f8 != (undefined *)0x0) && (local_f8 != PTR_DAT_1403200a0)) &&
         (local_f8 + -8 != (undefined *)0x0)) {
        uVar11 = FUN_1401568c0();
        local_98 = uVar11;
        FUN_140156b50(uVar11);
        local_90 = 1;
        piVar1 = (int *)(local_f8 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_f8 + -8);
        }
        FUN_140156be0(uVar11);
        local_90 = 0;
      }
      local_f8 = PTR_DAT_1403200a0;
      if (((local_e8 != (undefined *)0x0) && (local_e8 != PTR_DAT_1403200a0)) &&
         (local_e8 + -8 != (undefined *)0x0)) {
        uVar11 = FUN_1401568c0();
        local_68 = uVar11;
        FUN_140156b50(uVar11);
        local_60 = 1;
        piVar1 = (int *)(local_e8 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_e8 + -8);
        }
        FUN_140156be0(uVar11);
        local_60 = 0;
      }
      local_e8 = PTR_DAT_1403200a0;
      if (((local_f0 != (undefined *)0x0) && (local_f0 != PTR_DAT_1403200a0)) &&
         (local_f0 + -8 != (undefined *)0x0)) {
        uVar11 = FUN_1401568c0();
        local_88 = uVar11;
        FUN_140156b50(uVar11);
        local_80 = 1;
        piVar1 = (int *)(local_f0 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_f0 + -8);
        }
        FUN_140156be0(uVar11);
        local_80 = 0;
      }
      local_f0 = PTR_DAT_1403200a0;
      if (((local_e0 != (undefined *)0x0) && (local_e0 != PTR_DAT_1403200a0)) &&
         (local_e0 + -8 != (undefined *)0x0)) {
        uVar11 = FUN_1401568c0();
        local_78 = uVar11;
        FUN_140156b50(uVar11);
        local_70 = 1;
        piVar1 = (int *)(local_e0 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_e0 + -8);
        }
        FUN_140156be0(uVar11);
        local_70 = 0;
      }
      puVar10 = local_100;
      puVar9 = local_100;
      if (local_100 == (undefined *)0x0) {
        puVar9 = PTR_DAT_1403200a0;
      }
      local_e0 = PTR_DAT_1403200a0;
      FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x17f0),1,puVar9);
      if (((puVar10 != (undefined *)0x0) && (puVar10 != PTR_DAT_1403200a0)) &&
         (puVar10 + -8 != (undefined *)0x0)) {
        uVar11 = FUN_1401568c0();
        local_58 = uVar11;
        FUN_140156b50(uVar11);
        local_50 = 1;
        piVar1 = (int *)(puVar10 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar10 + -8);
        }
        FUN_140156be0(uVar11);
        local_50 = 0;
      }
      local_100 = PTR_DAT_1403200a0;
    }
  }
  if (local_res8 != (longlong *)0x0) {
    plVar3 = local_res8 + 1;
    *plVar3 = *plVar3 + -1;
    if (*plVar3 == 0) {
      FUN_14015ebb0(local_res8);
    }
  }
  FUN_140156be0(local_48);
  return 1;
}



undefined8
FUN_14016ef70(longlong param_1,undefined4 param_2,undefined8 param_3,uint *param_4,int *param_5)

{
  int *piVar1;
  longlong lVar2;
  ulonglong uVar3;
  undefined4 uVar4;
  undefined2 uVar5;
  undefined *puVar6;
  undefined8 uVar7;
  undefined8 uVar8;
  uint *puVar9;
  longlong *plVar10;
  longlong lVar11;
  undefined *puVar12;
  longlong *local_res8;
  undefined4 local_res10 [2];
  undefined *local_res20;
  
  local_res10[0] = param_2;
  uVar7 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar7);
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  lVar2 = *(longlong *)(param_1 + 0x20);
  uVar3 = (ulonglong)*param_4 % (ulonglong)*(uint *)(lVar2 + 0xca0);
  if ((*(longlong *)(lVar2 + 0xc80) != 0) &&
     (puVar9 = *(uint **)(*(longlong *)(lVar2 + 0xc80) + uVar3 * 8), puVar9 != (uint *)0x0)) {
    while ((uint)uVar3 == puVar9[8] % *(uint *)(lVar2 + 0xca0)) {
      if (*puVar9 == *param_4) {
        if ((*(longlong *)(puVar9 + 2) != 0) &&
           (*(longlong *)(*(longlong *)(puVar9 + 2) + 0x228) == 0)) {
          FUN_14016da80(lVar2 + 0x2d8,&local_res8,local_res10[0]);
          if ((local_res8 != (longlong *)0x0) &&
             ((lVar2 = *local_res8, lVar2 != 0 && (*(char *)(lVar2 + 8) == '\0')))) {
            lVar11 = 0;
            if (*param_5 != 0x1d) {
              *(undefined8 *)(lVar2 + 0x198) = 0;
            }
            uVar5 = DAT_140320454;
            uVar4 = DAT_140320450;
            if (local_res8 != (longlong *)0x0) {
              lVar11 = *local_res8;
            }
            if (*(char *)(lVar11 + 8) != '\x01') {
              *(undefined4 *)(lVar11 + 0x10) = 0;
              *(undefined4 *)(lVar11 + 0x20) = uVar4;
              *(undefined2 *)(lVar11 + 0x24) = uVar5;
              *(undefined4 *)(lVar11 + 0x30) = uVar4;
              *(undefined2 *)(lVar11 + 0x34) = uVar5;
              *(undefined1 *)(lVar11 + 0x38) = 0;
              uVar5 = DAT_140320454;
              uVar4 = DAT_140320450;
              *(undefined4 *)(lVar11 + 0x40) = 0;
              *(undefined4 *)(lVar11 + 0x50) = uVar4;
              *(undefined2 *)(lVar11 + 0x54) = uVar5;
              *(undefined4 *)(lVar11 + 0x60) = uVar4;
              *(undefined2 *)(lVar11 + 100) = uVar5;
              *(undefined1 *)(lVar11 + 0x68) = 0;
              *(undefined1 *)(lVar11 + 8) = 1;
            }
            plVar10 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x4a8);
            (**(code **)(*plVar10 + 0x70))(plVar10,*param_4,&DAT_140328530,local_res10,param_5);
            if (*(longlong *)(*(longlong *)(param_1 + 0x20) + 0x17f0) != 0) {
              FUN_1401568c0();
              local_res20 = PTR_DAT_1403200a0;
              FUN_14004ce50(&local_res20,&DAT_14025f3c0,local_res10[0],*param_4);
              puVar6 = local_res20;
              puVar12 = local_res20;
              if (local_res20 == (undefined *)0x0) {
                puVar12 = PTR_DAT_1403200a0;
              }
              FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x17f0),1,puVar12);
              if (((puVar6 != (undefined *)0x0) && (puVar6 != PTR_DAT_1403200a0)) &&
                 (puVar6 + -8 != (undefined *)0x0)) {
                uVar8 = FUN_1401568c0();
                FUN_140156b50(uVar8);
                piVar1 = (int *)(puVar6 + -4);
                *piVar1 = *piVar1 + -1;
                if (*piVar1 == 0) {
                  FUN_140156970(puVar6 + -8);
                }
                FUN_140156be0(uVar8);
              }
              local_res20 = PTR_DAT_1403200a0;
            }
          }
          if ((local_res8 != (longlong *)0x0) &&
             (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
            FUN_14015ebb0(local_res8);
          }
        }
        break;
      }
      puVar9 = *(uint **)(puVar9 + 4);
      if (puVar9 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar7);
  return 1;
}



undefined8 FUN_14016f240(longlong param_1,undefined4 param_2,undefined8 param_3,uint *param_4)

{
  int *piVar1;
  uint uVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined4 uVar5;
  undefined2 uVar6;
  undefined *puVar7;
  undefined8 uVar8;
  uint *puVar9;
  longlong *plVar10;
  undefined *puVar11;
  longlong *local_res8;
  undefined4 local_res10 [2];
  undefined *local_res20;
  undefined8 uVar12;
  undefined8 uVar13;
  undefined1 uVar14;
  
  uVar12 = 0xfffffffffffffffe;
  local_res10[0] = param_2;
  uVar8 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  uVar13 = uVar8;
  FUN_140156b50(uVar8);
  uVar14 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  uVar2 = *param_4;
  lVar3 = *(longlong *)(param_1 + 0x20);
  uVar4 = (ulonglong)uVar2 % (ulonglong)*(uint *)(lVar3 + 0xca0);
  if ((*(longlong *)(lVar3 + 0xc80) != 0) &&
     (puVar9 = *(uint **)(*(longlong *)(lVar3 + 0xc80) + uVar4 * 8), puVar9 != (uint *)0x0)) {
    while ((uint)uVar4 == puVar9[8] % *(uint *)(lVar3 + 0xca0)) {
      if (*puVar9 == uVar2) {
        if ((*(longlong *)(puVar9 + 2) != 0) &&
           (*(longlong *)(*(longlong *)(puVar9 + 2) + 0x228) == 0)) {
          FUN_14016da80(lVar3 + 0x2d8,&local_res8,local_res10[0],(ulonglong)uVar2,uVar12,uVar13,
                        uVar14);
          uVar6 = DAT_140320454;
          uVar5 = DAT_140320450;
          if ((local_res8 != (longlong *)0x0) && (lVar3 = *local_res8, lVar3 != 0)) {
            if (*(char *)(lVar3 + 8) != '\x01') {
              *(undefined4 *)(lVar3 + 0x10) = 0;
              *(undefined4 *)(lVar3 + 0x20) = uVar5;
              *(undefined2 *)(lVar3 + 0x24) = uVar6;
              *(undefined4 *)(lVar3 + 0x30) = uVar5;
              *(undefined2 *)(lVar3 + 0x34) = uVar6;
              *(undefined1 *)(lVar3 + 0x38) = 0;
              uVar6 = DAT_140320454;
              uVar5 = DAT_140320450;
              *(undefined4 *)(lVar3 + 0x40) = 0;
              *(undefined4 *)(lVar3 + 0x50) = uVar5;
              *(undefined2 *)(lVar3 + 0x54) = uVar6;
              *(undefined4 *)(lVar3 + 0x60) = uVar5;
              *(undefined2 *)(lVar3 + 100) = uVar6;
              *(undefined1 *)(lVar3 + 0x68) = 0;
              *(undefined1 *)(lVar3 + 8) = 1;
            }
            plVar10 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x4a8);
            (**(code **)(*plVar10 + 0x110))(plVar10,*param_4,&DAT_140328530,local_res10);
            plVar10 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x4a8);
            (**(code **)(*plVar10 + 0x110))(plVar10,local_res10[0],&DAT_140328530,param_4);
            if (*(longlong *)(*(longlong *)(param_1 + 0x20) + 0x17f0) != 0) {
              FUN_1401568c0();
              local_res20 = PTR_DAT_1403200a0;
              FUN_14004ce50(&local_res20,&DAT_14025f4c0,local_res10[0],*param_4);
              puVar7 = local_res20;
              puVar11 = local_res20;
              if (local_res20 == (undefined *)0x0) {
                puVar11 = PTR_DAT_1403200a0;
              }
              FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x17f0),1,puVar11);
              if (((puVar7 != (undefined *)0x0) && (puVar7 != PTR_DAT_1403200a0)) &&
                 (puVar7 + -8 != (undefined *)0x0)) {
                uVar12 = FUN_1401568c0();
                FUN_140156b50(uVar12);
                piVar1 = (int *)(puVar7 + -4);
                *piVar1 = *piVar1 + -1;
                if (*piVar1 == 0) {
                  FUN_140156970(puVar7 + -8);
                }
                FUN_140156be0(uVar12);
              }
              local_res20 = PTR_DAT_1403200a0;
            }
          }
          if ((local_res8 != (longlong *)0x0) &&
             (local_res8[1] = local_res8[1] + -1, uVar8 = uVar13, local_res8[1] == 0)) {
            FUN_14015ebb0(local_res8);
          }
        }
        break;
      }
      puVar9 = *(uint **)(puVar9 + 4);
      if (puVar9 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar8);
  return 1;
}



void FUN_14016f500(longlong param_1,longlong *param_2,undefined8 param_3,double param_4)

{
  int *piVar1;
  int iVar2;
  void *pvVar3;
  undefined8 uVar4;
  uint uVar5;
  undefined8 *puVar6;
  longlong *plVar7;
  ulonglong uVar8;
  longlong lVar9;
  undefined8 uVar10;
  longlong lVar11;
  longlong lVar12;
  longlong *plVar13;
  int iVar14;
  ulonglong uVar15;
  uint uVar16;
  uint uVar17;
  int iVar18;
  int iVar19;
  longlong lVar20;
  ulonglong uVar21;
  longlong lVar22;
  undefined8 in_R9;
  int iVar23;
  int iVar24;
  longlong lVar25;
  longlong lVar26;
  bool bVar27;
  bool bVar28;
  undefined8 *local_e0;
  longlong local_d8;
  longlong local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  void *local_98;
  undefined1 local_90 [88];
  
  if ((int)param_3 == 0) {
    return;
  }
  local_a0 = 0xfffffffffffffffe;
  uVar16 = 0;
  lVar9 = param_1 + 0x17a0;
  FUN_14015c9c0(lVar9,0,param_3,in_R9,0);
  lVar25 = param_2[1];
  iVar24 = 0;
  lVar26 = lVar25;
  local_d8 = lVar25;
  if (0 < (int)lVar25) {
    do {
      if ((iVar24 < 0) || (param_2[1] <= (longlong)iVar24)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      iVar19 = iVar24;
      if (iVar24 < (int)lVar25) {
        do {
          lVar20 = (longlong)iVar24;
          if (iVar24 == iVar19) {
LAB_14016f638:
            bVar27 = false;
          }
          else {
            if ((iVar19 < 0) || (param_2[1] <= (longlong)iVar19)) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            if (param_2[1] <= lVar20) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            if ((ulonglong)param_2[2] < 0x65) {
              plVar7 = param_2 + (lVar20 + 1) * 4;
            }
            else {
              plVar7 = (longlong *)(lVar20 * 0x20 + *param_2);
            }
            plVar7 = (longlong *)FUN_14016da80(param_1 + 0x2d8,&local_e0,(int)*plVar7);
            uVar16 = uVar16 | 1;
            if ((longlong *)*plVar7 == (longlong *)0x0) {
              lVar26 = 0;
              goto LAB_14016f638;
            }
            lVar26 = *(longlong *)*plVar7;
            if (lVar26 == 0) goto LAB_14016f638;
            bVar27 = true;
          }
          puVar6 = local_e0;
          if ((uVar16 & 1) != 0) {
            uVar17 = 0;
            uVar16 = 0;
            if ((local_e0 != (undefined8 *)0x0) &&
               (local_e0[1] = local_e0[1] + -1, local_e0[1] == 0)) {
              pvVar3 = (void *)*local_e0;
              local_98 = pvVar3;
              if (pvVar3 != (void *)0x0) {
                FUN_1401858d0((longlong)pvVar3 + 0x148);
                FUN_1401858d0((longlong)pvVar3 + 0x120);
                operator_delete(pvVar3);
              }
              FUN_140156970(puVar6);
              lVar25 = local_d8;
              uVar16 = uVar17;
            }
          }
          if (((bVar27) && (*(char *)(lVar26 + 8) == '\0')) &&
             (*(double *)(lVar26 + 0x188) <= param_4 && param_4 != *(double *)(lVar26 + 0x188))) {
            local_c8 = CONCAT44(iVar19,iVar24);
            local_d0 = lVar26;
            FUN_14015cf70(lVar9,*(undefined4 *)(param_1 + 0x17b8),&local_d0,1);
            uVar8 = 0;
            iVar18 = *(int *)(param_1 + 0x17b8);
            uVar15 = uVar8;
            uVar21 = uVar8;
            if (0 < (longlong)iVar18) {
              do {
                if (((longlong)uVar21 < 0) ||
                   (iVar14 = (int)uVar15, *(int *)(param_1 + 0x17b8) <= iVar14)) {
                    // WARNING: Subroutine does not return
                  FUN_1401566e0();
                }
                lVar20 = *(longlong *)(param_1 + 0x17b0);
                if (*(int *)(uVar8 + 8 + lVar20) == iVar24) {
                  piVar1 = (int *)(uVar8 + 0x10 + lVar20);
                  *piVar1 = *piVar1 + 1;
                }
                else if (*(int *)(uVar8 + 0xc + lVar20) == iVar24) {
                  piVar1 = (int *)(uVar8 + 0x14 + lVar20);
                  *piVar1 = *piVar1 + 1;
                }
                if (*(int *)(param_1 + 0x17b8) <= iVar14) {
                    // WARNING: Subroutine does not return
                  FUN_1401566e0();
                }
                lVar20 = *(longlong *)(param_1 + 0x17b0);
                if (*(int *)(uVar8 + 8 + lVar20) == iVar19) {
                  piVar1 = (int *)(uVar8 + 0x10 + lVar20);
                  *piVar1 = *piVar1 + 1;
                }
                else if (*(int *)(uVar8 + 0xc + lVar20) == iVar19) {
                  piVar1 = (int *)(uVar8 + 0x14 + lVar20);
                  *piVar1 = *piVar1 + 1;
                }
                uVar21 = uVar21 + 1;
                uVar8 = uVar8 + 0x18;
                uVar15 = (ulonglong)(iVar14 + 1);
              } while ((longlong)uVar21 < (longlong)iVar18);
            }
            local_d0 = 0;
            local_c8 = 0;
            local_c0 = 0;
          }
          iVar19 = iVar19 + 1;
        } while (iVar19 < (int)lVar25);
      }
      iVar24 = iVar24 + 1;
    } while (iVar24 < (int)lVar25);
  }
  uVar10 = 0;
  if (*(int *)(param_1 + 0x17b8) != 0) {
    uVar10 = *(undefined8 *)(param_1 + 0x17b0);
  }
  if (*(int *)(param_1 + 0x17b8) < 0x65) {
    FUN_14015e370(uVar10);
  }
  else {
    FUN_14016d220();
  }
  FUN_14015cb30(param_1 + 0x17c8);
  iVar24 = 0;
  lVar25 = 0;
  if (0 < *(int *)(param_1 + 0x17b8)) {
    lVar26 = 0;
    do {
      if ((lVar25 < 0) || (*(int *)(param_1 + 0x17b8) <= iVar24)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      lVar20 = *(longlong *)(param_1 + 0x17b0);
      local_b8 = *(undefined8 *)(lVar26 + lVar20);
      uVar10 = *(undefined8 *)(lVar26 + 8 + lVar20);
      uVar4 = *(undefined8 *)(lVar26 + 0x10 + lVar20);
      iVar19 = *(int *)(param_1 + 0x17e0);
      lVar20 = (longlong)iVar19;
      local_b0._4_4_ = (int)((ulonglong)uVar10 >> 0x20);
      iVar18 = local_b0._4_4_;
      for (iVar14 = 0; local_b0 = uVar10, local_a8 = uVar4, iVar14 != iVar19; iVar14 = iVar14 + 1) {
        if ((iVar14 < 0) || (*(int *)(param_1 + 0x17e0) <= iVar14)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        iVar23 = *(int *)(*(longlong *)(param_1 + 0x17d8) + (longlong)iVar14 * 4);
        if ((iVar23 == (int)uVar10) || (iVar23 == local_b0._4_4_)) goto LAB_14016f95f;
      }
      local_a8._4_4_ = (int)((ulonglong)uVar4 >> 0x20);
      if ((int)uVar4 < local_a8._4_4_) {
        if (iVar19 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        iVar14 = *(int *)(param_1 + 0x17e0);
        FUN_14015cb30();
        iVar14 = iVar14 - iVar19;
        if (0 < iVar14) {
          if (*(int *)(param_1 + 0x17e0) == 0) {
            lVar22 = 0;
            lVar12 = 0;
          }
          else {
            lVar22 = *(longlong *)(param_1 + 0x17d8);
            lVar12 = *(longlong *)(param_1 + 0x17d8);
          }
          memmove((void *)(lVar12 + 4 + lVar20 * 4),(void *)(lVar22 + lVar20 * 4),
                  (longlong)iVar14 << 2);
        }
        if (*(int *)(param_1 + 0x17e0) == 0) {
          lVar22 = 0;
        }
        else {
          lVar22 = *(longlong *)(param_1 + 0x17d8);
        }
        *(int *)(lVar22 + lVar20 * 4) = iVar18;
        uVar10 = local_b0;
      }
      else {
        if (iVar19 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        iVar18 = *(int *)(param_1 + 0x17e0);
        FUN_14015cb30(param_1 + 0x17c8);
        iVar18 = iVar18 - iVar19;
        if (0 < iVar18) {
          if (*(int *)(param_1 + 0x17e0) == 0) {
            lVar22 = 0;
            lVar12 = 0;
          }
          else {
            lVar22 = *(longlong *)(param_1 + 0x17d8);
            lVar12 = *(longlong *)(param_1 + 0x17d8);
          }
          memmove((void *)(lVar12 + 4 + lVar20 * 4),(void *)(lVar22 + lVar20 * 4),
                  (longlong)iVar18 << 2);
        }
        if (*(int *)(param_1 + 0x17e0) == 0) {
          lVar22 = 0;
        }
        else {
          lVar22 = *(longlong *)(param_1 + 0x17d8);
        }
        *(undefined4 *)(lVar22 + lVar20 * 4) = (undefined4)local_b0;
        uVar10 = local_b0;
      }
LAB_14016f95f:
      local_b0 = uVar10;
      iVar24 = iVar24 + 1;
      lVar25 = lVar25 + 1;
      lVar26 = lVar26 + 0x18;
    } while (iVar24 < *(int *)(param_1 + 0x17b8));
  }
  iVar19 = 0;
  lVar25 = 0;
  iVar24 = *(int *)(param_1 + 0x17e0);
  if (0 < (longlong)iVar24) {
    do {
      if ((lVar25 < 0) || (*(int *)(param_1 + 0x17e0) <= iVar19)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      iVar18 = *(int *)(*(longlong *)(param_1 + 0x17d8) + lVar25 * 4);
      lVar26 = (longlong)iVar18;
      if ((iVar18 < 0) || (param_2[1] <= lVar26)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_2[2] < 0x65) {
        plVar7 = param_2 + (lVar26 + 1) * 4;
      }
      else {
        plVar7 = (longlong *)(lVar26 * 0x20 + *param_2);
      }
      if ((plVar7[2] == 0) && (plVar7[3] == 0)) {
        lVar20 = 0;
        iVar23 = 0;
        lVar26 = 0;
        iVar14 = *(int *)(param_1 + 0x17b8);
        if (0 < (longlong)iVar14) {
          lVar22 = 0;
          do {
            if ((int)param_3 <= lVar20) break;
            if ((lVar26 < 0) || (*(int *)(param_1 + 0x17b8) <= iVar23)) {
                    // WARNING: Subroutine does not return
              FUN_1401566e0();
            }
            lVar12 = *(longlong *)(param_1 + 0x17b0);
            iVar2 = *(int *)(lVar12 + 8 + lVar22);
            lVar11 = (longlong)iVar2;
            if (iVar18 == iVar2) {
              lVar12 = (longlong)*(int *)(lVar12 + 0xc + lVar22);
              if ((lVar12 < 0) || (param_2[1] <= lVar12)) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              if ((ulonglong)param_2[2] < 0x65) {
                plVar13 = param_2 + (lVar12 + 1) * 4;
              }
              else {
                plVar13 = (longlong *)(lVar12 * 0x20 + *param_2);
              }
              if ((plVar13[2] == 0) && (plVar13[3] == 0)) {
LAB_14016fafd:
                plVar7[3] = (longlong)plVar13;
                plVar13[2] = (longlong)plVar7;
                lVar20 = lVar20 + 1;
                plVar7 = (longlong *)plVar7[3];
              }
            }
            else if (iVar18 == *(int *)(lVar12 + 0xc + lVar22)) {
              if ((lVar11 < 0) || (param_2[1] <= lVar11)) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              if ((ulonglong)param_2[2] < 0x65) {
                plVar13 = param_2 + (lVar11 + 1) * 4;
              }
              else {
                plVar13 = (longlong *)(lVar11 * 0x20 + *param_2);
              }
              if ((plVar13[2] == 0) && (plVar13[3] == 0)) {
                plVar7[2] = 0;
                goto LAB_14016fafd;
              }
            }
            iVar23 = iVar23 + 1;
            lVar26 = lVar26 + 1;
            lVar22 = lVar22 + 0x18;
          } while (lVar26 < iVar14);
        }
      }
      iVar19 = iVar19 + 1;
      lVar25 = lVar25 + 1;
    } while (lVar25 < iVar24);
  }
  FUN_14015c9c0(lVar9,0);
  iVar24 = *(int *)(param_1 + 0x17e0);
  if (iVar24 == 0) {
    return;
  }
  if (-1 < *(int *)(param_1 + 0x17e4)) goto LAB_14016fc61;
  iVar19 = *(int *)(param_1 + 0x17ec);
  if (iVar19 == 0) {
    uVar17 = (int)(iVar24 + (iVar24 >> 0x1f & 7U)) >> 3;
    uVar16 = 0x400;
    if ((int)uVar17 < 0x400) {
      uVar16 = uVar17;
    }
    uVar17 = 4;
    if (4 < (int)uVar16) {
      uVar17 = uVar16;
    }
LAB_14016fbd5:
    uVar16 = *(uint *)(param_1 + 0x17e8);
    bVar28 = SBORROW4(uVar16,uVar17);
    uVar5 = uVar16 - uVar17;
    bVar27 = uVar16 == uVar17;
  }
  else {
    if (iVar19 == 1) {
      uVar16 = (int)(iVar24 + (iVar24 >> 0x1f & 7U)) >> 3;
      uVar17 = 0x10;
      if (0x10 < (int)uVar16) {
        uVar17 = uVar16;
      }
      if (uVar17 < 0x11) {
        uVar17 = 0x10;
      }
      goto LAB_14016fbd5;
    }
    if (iVar19 != 2) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    uVar16 = *(uint *)(param_1 + 0x17e8);
    uVar17 = 0;
    bVar28 = false;
    bVar27 = uVar16 == 0;
    uVar5 = uVar16;
  }
  if (!bVar27 && bVar28 == (int)uVar5 < 0) {
    uVar17 = uVar16;
  }
  plVar7 = *(longlong **)(param_1 + 0x17d0);
  if (*(int *)(param_1 + 0x17e4) == 0) {
    if (plVar7 == (longlong *)0x0) {
      lVar9 = FUN_140156940((longlong)(int)uVar17 << 2);
    }
    else {
      lVar9 = (**(code **)(*plVar7 + 8))(plVar7,(longlong)(int)uVar17 << 2);
    }
  }
  else {
    if (plVar7 == (longlong *)0x0) {
      lVar9 = FUN_1401569a0(*(undefined8 *)(param_1 + 0x17d8),(longlong)(int)uVar17 << 2);
    }
    else {
      lVar9 = (**(code **)(*plVar7 + 0x10))
                        (plVar7,*(undefined8 *)(param_1 + 0x17d8),(longlong)(int)uVar17 << 2);
    }
    if (lVar9 == 0) {
      FUN_140156300(local_90,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_90,(ThrowInfo *)&DAT_14031d928);
    }
  }
  *(longlong *)(param_1 + 0x17d8) = lVar9;
  *(uint *)(param_1 + 0x17e4) = uVar17;
LAB_14016fc61:
  *(undefined4 *)(param_1 + 0x17e0) = 0;
  return;
}



void FUN_14016fc90(longlong param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined *puVar5;
  undefined *puVar6;
  undefined *local_res8;
  longlong *local_res10;
  undefined *local_res18 [2];
  undefined8 uVar7;
  
  uVar7 = 0xfffffffffffffffe;
  local_res10 = param_2;
  FUN_1401568c0();
  local_res8 = PTR_DAT_1403200a0;
  uVar4 = 0;
  uVar3 = uVar4;
  if (*param_2 != 0) {
    uVar3 = *(undefined8 *)(*param_2 + 0x38);
  }
  plVar2 = (longlong *)FUN_140182070(uVar3,local_res18);
  puVar5 = (undefined *)*plVar2;
  if ((undefined *)*plVar2 == (undefined *)0x0) {
    puVar5 = PTR_DAT_1403200a0;
  }
  FUN_14004ce50(&local_res8,L"WARNING: %s",puVar5,param_4,uVar7);
  if (((local_res18[0] != (undefined *)0x0) && (local_res18[0] != PTR_DAT_1403200a0)) &&
     (local_res18[0] + -8 != (undefined *)0x0)) {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    piVar1 = (int *)(local_res18[0] + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res18[0] + -8);
    }
    FUN_140156be0(uVar3);
  }
  puVar5 = local_res8;
  if (*(longlong *)(param_1 + 0x17f0) != 0) {
    puVar6 = local_res8;
    if (local_res8 == (undefined *)0x0) {
      puVar6 = PTR_DAT_1403200a0;
    }
    FUN_140196a90(*(longlong *)(param_1 + 0x17f0),0,puVar6);
  }
  if (*(longlong *)(param_1 + 0x758) != 0) {
    if (*param_2 != 0) {
      uVar4 = *(undefined8 *)(*param_2 + 0x38);
    }
    (**(code **)(**(longlong **)(param_1 + 0x758) + 0x10))(*(longlong **)(param_1 + 0x758),uVar4);
  }
  if (((puVar5 != (undefined *)0x0) && (puVar5 != PTR_DAT_1403200a0)) &&
     (puVar5 + -8 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar1 = (int *)(puVar5 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar5 + -8);
    }
    FUN_140156be0(uVar4);
  }
  FUN_14013c530(param_2);
  return;
}



void FUN_14016fe00(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  FUN_1401a70a0(param_1 + 5);
  *param_1 = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 3)) {
    FUN_14016d0f0(param_1[2],(longlong)*(int *)(param_1 + 3));
  }
  if (param_1[2] != 0) {
    plVar1 = (longlong *)param_1[1];
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,param_1[2],plVar1,param_4,uVar2);
    }
  }
  return;
}



void FUN_14016fe70(longlong *param_1,longlong param_2,undefined8 param_3)

{
  ulonglong uVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  undefined8 uVar5;
  uint *puVar6;
  undefined8 uVar7;
  longlong lVar8;
  uint *puVar9;
  uint uVar10;
  uint uVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  uint *local_res8;
  undefined1 local_res10 [8];
  undefined **local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  
  uVar5 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar5);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1);
  }
  uVar1 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8)) %
          (ulonglong)*(uint *)(param_1 + 0x76);
  uVar12 = 0;
  uVar13 = uVar12;
  if (param_1[0x72] != 0) {
    lVar8 = *(longlong *)(param_1[0x72] + uVar1 * 8);
    while( true ) {
      if ((lVar8 == 0) || ((uint)uVar1 != *(uint *)(lVar8 + 0x28) % *(uint *)(param_1 + 0x76)))
      goto LAB_14016ff33;
      if ((*(uint *)(lVar8 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar8 + 0xc) == *(ushort *)(param_2 + 0xc))) break;
      lVar8 = *(longlong *)(lVar8 + 0x18);
    }
    uVar13 = *(ulonglong *)(lVar8 + 0x10);
  }
LAB_14016ff33:
  FUN_1401568c0();
  local_res8 = (uint *)PTR_DAT_1403200a0;
  uVar2 = FUN_140156740(param_3);
  uVar10 = 0;
  if ((local_res8 != (uint *)0x0) && (uVar12 = 0, local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar12 = (ulonglong)local_res8[-2];
  }
  uVar4 = uVar2;
  if ((((int)uVar2 <= (int)uVar12) && (uVar4 = uVar10, local_res8 != (uint *)0x0)) &&
     (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar4 = local_res8[-2];
  }
  uVar11 = 1;
  if (1 < (int)uVar4) {
    uVar11 = uVar4;
  }
  uVar3 = 0;
  uVar4 = uVar3;
  if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar4 = local_res8[-2];
  }
  if ((int)uVar4 < (int)uVar11) {
    if (local_res8 == (uint *)0x0) {
      local_res8 = (uint *)PTR_DAT_1403200a0;
    }
    if ((int)uVar11 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar11 == 0) {
      FUN_14004f990(&local_res8);
    }
    else {
      uVar4 = uVar3;
      if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
        uVar4 = local_res8[-2];
      }
      if (uVar11 != uVar4) {
        puVar6 = (uint *)FUN_140156940((longlong)(int)uVar11 * 2 + 10);
        if (puVar6 != (uint *)0x0) {
          *puVar6 = 0;
          puVar6[1] = 1;
        }
        *puVar6 = uVar11;
        if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
          uVar3 = local_res8[-2];
        }
        puVar9 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar11 < (int)uVar3) {
LAB_140170024:
          if (local_res8 != (uint *)0x0) {
            puVar9 = local_res8;
          }
        }
        else {
          uVar11 = uVar10;
          if (local_res8 != (uint *)0x0) {
            if (local_res8 != (uint *)PTR_DAT_1403200a0) {
              uVar11 = local_res8[-2];
            }
            goto LAB_140170024;
          }
        }
        FUN_140156770(puVar6 + 2,puVar9,uVar11);
        FUN_14004f990(&local_res8);
        local_res8 = puVar6 + 2;
      }
    }
  }
  uVar10 = 0;
  FUN_14004f670(&local_res8);
  puVar6 = local_res8;
  if (local_res8 == (uint *)0x0) {
    puVar6 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar6,param_3,uVar2);
  puVar6 = local_res8;
  if (local_res8 == (uint *)0x0) {
    puVar6 = (uint *)PTR_DAT_1403200a0;
  }
  uVar4 = FUN_140156740(puVar6);
  uVar11 = 0;
  uVar2 = uVar10;
  if (0 < (int)uVar4) {
    uVar2 = uVar4;
  }
  uVar4 = uVar11;
  if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar4 = local_res8[-2];
  }
  if (((int)uVar4 <= (int)uVar2) && (uVar2 = uVar11, local_res8 != (uint *)0x0)) {
    if (local_res8 == (uint *)PTR_DAT_1403200a0) goto LAB_1401700d2;
    uVar2 = local_res8[-2];
  }
  if (((local_res8 != (uint *)PTR_DAT_1403200a0) && (local_res8 != (uint *)0x0)) &&
     (local_res8 + -2 != (uint *)0x0)) {
    local_res8[-2] = uVar2;
    *(undefined2 *)((longlong)local_res8 + (longlong)(int)uVar2 * 2) = 0;
  }
LAB_1401700d2:
  if (uVar13 != 0) {
    uVar10 = *(uint *)(uVar13 + 0x6f8);
  }
  local_58 = 0;
  local_50 = 0;
  local_48 = 0;
  local_40 = 0;
  local_60 = Proud::ByteArray::vftable;
  uVar7 = FUN_140181f50(local_res10,0x1f,uVar10,&local_res8,&local_60);
  (**(code **)(*param_1 + 0x88))(param_1,uVar7);
  FUN_1401858d0(&local_60);
  puVar6 = local_res8;
  if (((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar9 = local_res8 + -2, puVar9 != (uint *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    puVar6 = puVar6 + -1;
    *puVar6 = *puVar6 - 1;
    if (*puVar6 == 0) {
      FUN_140156970(puVar9);
    }
    FUN_140156be0(uVar7);
  }
  FUN_140156be0(uVar5);
  return;
}



longlong FUN_1401701b0(longlong param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong *local_res8;
  longlong local_28 [4];
  
  local_28[1] = 0xfffffffffffffffe;
  local_res8 = (longlong *)0x0;
  plVar1 = (longlong *)FUN_14016da80(param_1 + 0x230,local_28,param_2,param_3);
  if (*plVar1 != 0) {
    *(longlong *)(*plVar1 + 8) = *(longlong *)(*plVar1 + 8) + 1;
    local_res8 = (longlong *)*plVar1;
  }
  if ((local_28[0] != 0) &&
     (*(longlong *)(local_28[0] + 8) = *(longlong *)(local_28[0] + 8) + -1,
     *(longlong *)(local_28[0] + 8) == 0)) {
    local_28[0] = FUN_14015ebb0(local_28[0]);
  }
  if ((local_res8 != (longlong *)0x0) && (local_28[0] = *local_res8, local_28[0] != 0)) {
    *(undefined8 *)(local_28[0] + 0x188) = param_4;
  }
  if (local_res8 != (longlong *)0x0) {
    plVar1 = local_res8 + 1;
    *plVar1 = *plVar1 + -1;
    local_28[0] = local_res8[1];
    if (*plVar1 == 0) {
      local_28[0] = FUN_14015ebb0(local_res8);
    }
  }
  return local_28[0];
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140170270(longlong *param_1,longlong *param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  longlong *plVar4;
  undefined *puVar5;
  int iVar6;
  undefined4 uVar7;
  undefined8 uVar8;
  undefined **ppuVar9;
  double dVar10;
  undefined *local_res8;
  undefined1 local_res10 [8];
  undefined **local_60;
  undefined4 local_58;
  undefined2 local_54;
  undefined **local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_30;
  
  iVar3 = *(int *)(param_2[0xe9] + 0x7c);
  plVar4 = (longlong *)param_2[0xe8];
  iVar6 = 0;
  if (((plVar4 != (longlong *)0x0) && (iVar6 = 0, *plVar4 != 0)) && ((char)param_2[0xe0] != '\0')) {
    local_60 = Proud::AddrPort::vftable;
    local_58 = (undefined4)param_2[0xe2];
    local_54 = *(undefined2 *)((longlong)param_2 + 0x714);
    iVar6 = FUN_14019f0a0(*(undefined8 *)(*plVar4 + 0x168),&local_60);
  }
  *(int *)(param_2 + 0x3d) = iVar6 + iVar3;
  dVar10 = (double)(**(code **)(param_1[0x23] + 8))();
  if ((double)param_2[0x44] == 0.0) {
    if (DAT_140320dc4 < (int)param_2[0x3d]) {
      param_2[0x44] = (longlong)dVar10;
    }
  }
  else if (DAT_140320dc4 < (int)param_2[0x3d]) {
    if (_DAT_140320de0 < dVar10 - (double)param_2[0x44]) {
      FUN_1401568c0();
      local_res8 = PTR_DAT_1403200a0;
      FUN_14004ce50(&local_res8,L"sendQueue %dBytes",(int)param_2[0x3d]);
      local_48 = 0;
      local_40 = 0;
      local_38 = 0;
      local_30 = 0;
      local_50 = Proud::ByteArray::vftable;
      uVar7 = (**(code **)(*param_2 + 0x10))(param_2);
      uVar8 = FUN_140181f50(local_res10,0x25,uVar7,&local_res8,&local_50);
      (**(code **)(*param_1 + 0x88))(param_1,uVar8);
      FUN_1401858d0(&local_50);
      puVar5 = local_res8;
      param_2[0x44] = (longlong)dVar10;
      if (((local_res8 != (undefined *)0x0) && (local_res8 != PTR_DAT_1403200a0)) &&
         (puVar1 = local_res8 + -8, puVar1 != (undefined *)0x0)) {
        ppuVar9 = (undefined **)FUN_1401568c0();
        local_60 = ppuVar9;
        FUN_140156b50(ppuVar9);
        local_58 = CONCAT31(local_58._1_3_,1);
        piVar2 = (int *)(puVar5 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(puVar1);
        }
        FUN_140156be0(ppuVar9);
      }
    }
  }
  else {
    param_2[0x44] = 0;
  }
  return;
}



void FUN_140170480(void)

{
  FUN_14016ddd0();
  return;
}



void FUN_1401704a0(longlong param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined8 *puVar2;
  void *pvVar3;
  longlong *plVar4;
  uint uVar5;
  ulonglong uVar6;
  longlong lVar7;
  float fVar8;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_14015b3b0(param_1,param_2,param_3,param_4,0xfffffffffffffffe);
  lVar7 = *(longlong *)(param_1 + 0x10);
  while (lVar7 != 0) {
    lVar1 = *(longlong *)(lVar7 + 0x10);
    if ((*(longlong *)(lVar7 + 8) != 0) &&
       (*(longlong *)(*(longlong *)(lVar7 + 8) + 8) =
             *(longlong *)(*(longlong *)(lVar7 + 8) + 8) + -1,
       *(longlong *)(*(longlong *)(lVar7 + 8) + 8) == 0)) {
      puVar2 = *(undefined8 **)(lVar7 + 8);
      pvVar3 = (void *)*puVar2;
      if (pvVar3 != (void *)0x0) {
        FUN_1401858d0((longlong)pvVar3 + 0x148);
        FUN_1401858d0((longlong)pvVar3 + 0x120);
        operator_delete(pvVar3);
      }
      FUN_140156970(puVar2);
    }
    plVar4 = *(longlong **)(param_1 + 0x50);
    if (plVar4 == (longlong *)0x0) {
      FUN_140156970(lVar7);
    }
    else {
      (**(code **)(*plVar4 + 0x18))(plVar4,lVar7);
    }
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    lVar7 = lVar1;
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_14015b3b0(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar5 = FUN_14019e650(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    *(uint *)(param_1 + 0x28) = uVar5;
    fVar8 = (float)uVar5 * *(float *)(param_1 + 0x34);
    lVar7 = 0;
    if ((9.223372e+18 < fVar8) && (fVar8 = fVar8 - 9.223372e+18, fVar8 < 9.223372e+18)) {
      lVar7 = -0x8000000000000000;
    }
    *(longlong *)(param_1 + 0x38) = (longlong)fVar8 + lVar7;
    fVar8 = (float)uVar5 * *(float *)(param_1 + 0x30);
    lVar7 = 0;
    if ((9.223372e+18 < fVar8) && (fVar8 = fVar8 - 9.223372e+18, fVar8 < 9.223372e+18)) {
      lVar7 = -0x8000000000000000;
    }
    uVar6 = (longlong)fVar8 + lVar7;
    if ((ulonglong)((longlong)fVar8 + lVar7) < 0x11) {
      uVar6 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar6;
  }
  FUN_14015b3b0(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



longlong FUN_140170650(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  longlong lVar2;
  uint uVar3;
  
  uVar3 = (uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8);
  uVar1 = (ulonglong)uVar3 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + uVar1 * 8);
        (lVar2 != 0 && ((uint)uVar1 == *(uint *)(lVar2 + 0x28) % *(uint *)(param_1 + 0x28)));
        lVar2 = *(longlong *)(lVar2 + 0x18)) {
      if ((*(uint *)(lVar2 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar2 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        return lVar2 + 0x10;
      }
    }
  }
  lVar2 = FUN_14016e100(param_1,param_2,uVar1,uVar3);
  return lVar2 + 0x10;
}



undefined8 FUN_140170700(longlong param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4)

{
  char cVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 8) == 0) {
    cVar1 = FUN_1401a8bb0(param_1,*(undefined4 *)(param_1 + 0x28),1);
    if (cVar1 == '\0') {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  FUN_14015b3b0(param_1);
  uVar2 = FUN_14016e180(param_1,param_2,param_3,param_4);
  FUN_14015b3b0(param_1);
  return uVar2;
}



longlong FUN_140170780(longlong param_1,undefined8 param_2,ulonglong param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  longlong lVar4;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    lVar4 = FUN_140156940(0x28);
  }
  else {
    lVar4 = (**(code **)(*plVar1 + 8))(plVar1,0x28,param_3,param_4,0xfffffffffffffffe);
  }
  if (lVar4 != 0) {
    FUN_14016d190(lVar4,param_2,param_4);
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (param_3 & 0xffffffff) * 8);
  FUN_14015b3b0(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(longlong *)(param_1 + 0x10) = lVar4;
    *(longlong *)(param_1 + 0x18) = lVar4;
    *(undefined8 *)(lVar4 + 0x18) = 0;
    *(undefined8 *)(lVar4 + 0x10) = 0;
  }
  else {
    FUN_14015b3b0(param_1);
    FUN_14015b3b0(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      *(undefined8 *)(lVar4 + 0x18) = 0;
      *(longlong *)(lVar4 + 0x10) = lVar2;
      if (lVar2 != 0) {
        *(longlong *)(lVar2 + 0x18) = lVar4;
      }
      *(longlong *)(param_1 + 0x10) = lVar4;
    }
    else {
      if (*(longlong *)(lVar2 + 0x18) == 0) {
        *(longlong *)(param_1 + 0x10) = lVar4;
      }
      else {
        *(longlong *)(*(longlong *)(lVar2 + 0x18) + 0x10) = lVar4;
      }
      *(undefined8 *)(lVar4 + 0x18) = *(undefined8 *)(lVar2 + 0x18);
      *(longlong *)(lVar4 + 0x10) = lVar2;
      *(longlong *)(lVar2 + 0x18) = lVar4;
    }
  }
  *(longlong *)(*(longlong *)(param_1 + 8) + (param_3 & 0xffffffff) * 8) = lVar4;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b3b0(param_1);
  FUN_14015b3b0(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar3 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar3);
  }
  FUN_14015b3b0(param_1);
  return lVar4;
}



void FUN_1401708d0(longlong param_1,longlong param_2,undefined1 param_3)

{
  uint uVar1;
  ulonglong uVar2;
  uint uVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar1 = *(uint *)(param_1 + 0x28);
  uVar2 = (ulonglong)*(uint *)(param_2 + 0x20) % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x20) == 1) {
    *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    *(undefined8 *)(param_1 + 0x10) = 0;
    *(undefined8 *)(param_1 + 0x18) = 0;
  }
  else {
    uVar3 = (uint)uVar2;
    if (((*(longlong *)(param_2 + 0x18) == 0) ||
        (*(uint *)(*(longlong *)(param_2 + 0x18) + 0x20) % uVar1 != uVar3)) &&
       ((*(longlong *)(param_2 + 0x10) == 0 ||
        (*(uint *)(*(longlong *)(param_2 + 0x10) + 0x20) % uVar1 != uVar3)))) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    }
    else if (param_2 == *(longlong *)(*(longlong *)(param_1 + 8) + (longlong)(int)uVar3 * 8)) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = *(undefined8 *)(param_2 + 0x10);
    }
    if (param_2 == *(longlong *)(param_1 + 0x10)) {
      *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_2 + 0x10);
      *(undefined8 *)(param_2 + 0x18) = 0;
    }
    if (param_2 == *(longlong *)(param_1 + 0x18)) {
      *(undefined8 *)(param_1 + 0x18) = *(undefined8 *)(param_2 + 0x18);
      *(undefined8 *)(param_2 + 0x10) = 0;
    }
    if (*(longlong *)(param_2 + 0x18) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x18) + 0x10) = *(undefined8 *)(param_2 + 0x10);
    }
    if (*(longlong *)(param_2 + 0x10) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x10) + 0x18) = *(undefined8 *)(param_2 + 0x18);
    }
  }
  FUN_14016e2d0(param_1,param_2,param_3);
  FUN_14015b3b0(param_1);
  return;
}



undefined8 FUN_1401709d0(longlong param_1,undefined4 param_2,undefined8 param_3)

{
  ulonglong *puVar1;
  longlong lVar2;
  ulonglong *puVar3;
  char cVar4;
  uint uVar5;
  uint uVar6;
  uint uVar7;
  ulonglong uVar8;
  uint *puVar9;
  undefined8 uVar10;
  undefined *puVar11;
  uint *puVar12;
  uint uVar13;
  uint uVar14;
  ulonglong uVar15;
  uint *local_res8;
  longlong local_res20;
  ulonglong *local_98;
  undefined8 local_90;
  longlong local_88;
  undefined1 local_80;
  undefined8 local_78;
  undefined1 local_70;
  undefined **local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  
  local_90 = 0xfffffffffffffffe;
  local_res8 = (uint *)FUN_140156940(0x400);
  uVar15 = 0;
  uVar14 = 0;
  uVar8 = uVar15;
  if (local_res8 != (uint *)0x0) {
    uVar8 = param_1 + 0x60;
    if (param_1 == 0) {
      uVar8 = uVar15;
    }
    uVar8 = FUN_140185b00(local_res8,0,uVar8);
  }
  if (uVar8 == 0) {
    local_98 = (ulonglong *)0x0;
  }
  else {
    local_98 = (ulonglong *)FUN_140156940(0x10);
    local_98[1] = 1;
    *local_98 = uVar8;
  }
  puVar1 = local_98;
  FUN_140161a50(param_1 + 0x748,&local_98);
  puVar3 = local_98;
  if (puVar1 != (ulonglong *)0x0) {
    puVar1 = puVar1 + 1;
    *puVar1 = *puVar1 - 1;
    if (*puVar1 == 0) {
      uVar8 = *local_98;
      if (uVar8 != 0) {
        FUN_1401859b0(uVar8);
        FUN_140156970(uVar8);
      }
      FUN_140156970(puVar3);
    }
  }
  uVar8 = uVar15;
  if (*(ulonglong **)(param_1 + 0x748) != (ulonglong *)0x0) {
    uVar8 = **(ulonglong **)(param_1 + 0x748);
  }
  *(undefined1 *)(uVar8 + 0x314) = 1;
  puVar11 = *(undefined **)(param_1 + 0x218);
  if (*(undefined **)(param_1 + 0x218) == (undefined *)0x0) {
    puVar11 = PTR_DAT_140320098;
  }
  uVar8 = uVar15;
  if (*(ulonglong **)(param_1 + 0x748) != (ulonglong *)0x0) {
    uVar8 = **(ulonglong **)(param_1 + 0x748);
  }
  cVar4 = FUN_140187140(uVar8,puVar11,param_2);
  if (cVar4 != '\0') {
    uVar8 = uVar15;
    if (*(ulonglong **)(param_1 + 0x748) != (ulonglong *)0x0) {
      uVar8 = **(ulonglong **)(param_1 + 0x748);
    }
    FUN_140186b10(uVar8);
    uVar8 = uVar15;
    if (*(ulonglong **)(param_1 + 0x748) != (ulonglong *)0x0) {
      uVar8 = **(ulonglong **)(param_1 + 0x748);
    }
    FUN_140184cc0(uVar8,param_1 + 0xb0);
    if (*(ulonglong **)(param_1 + 0x748) != (ulonglong *)0x0) {
      uVar15 = **(ulonglong **)(param_1 + 0x748);
    }
    FUN_14018c430(*(undefined8 *)(param_1 + 0x790),uVar15);
    return 1;
  }
  FUN_1401568c0();
  local_res8 = (uint *)PTR_DAT_1403200a0;
  uVar5 = FUN_140156740(&DAT_140288b80);
  if ((local_res8 != (uint *)0x0) && (uVar15 = 0, local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar15 = (ulonglong)local_res8[-2];
  }
  uVar6 = 0;
  uVar7 = uVar5;
  if ((((int)uVar5 <= (int)uVar15) && (uVar7 = uVar14, local_res8 != (uint *)0x0)) &&
     (uVar7 = uVar6, local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar7 = local_res8[-2];
  }
  uVar13 = 1;
  if (1 < (int)uVar7) {
    uVar13 = uVar7;
  }
  uVar7 = uVar6;
  if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar7 = local_res8[-2];
  }
  if ((int)uVar7 < (int)uVar13) {
    if (local_res8 == (uint *)0x0) {
      local_res8 = (uint *)PTR_DAT_1403200a0;
    }
    if ((int)uVar13 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar13 == 0) {
      FUN_14004f990(&local_res8);
    }
    else {
      uVar7 = uVar14;
      if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
        uVar7 = local_res8[-2];
      }
      if (uVar13 != uVar7) {
        puVar9 = (uint *)FUN_140156940((longlong)(int)uVar13 * 2 + 10);
        if (puVar9 != (uint *)0x0) {
          *puVar9 = 0;
          puVar9[1] = 1;
        }
        *puVar9 = uVar13;
        uVar7 = uVar14;
        if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
          uVar7 = local_res8[-2];
        }
        puVar12 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar13 < (int)uVar7) {
LAB_140170bed:
          if (local_res8 != (uint *)0x0) {
            puVar12 = local_res8;
          }
        }
        else {
          uVar13 = uVar14;
          if (local_res8 != (uint *)0x0) {
            if (local_res8 != (uint *)PTR_DAT_1403200a0) {
              uVar13 = local_res8[-2];
            }
            goto LAB_140170bed;
          }
        }
        FUN_140156770(puVar9 + 2,puVar12,uVar13);
        FUN_14004f990(&local_res8);
        local_res8 = puVar9 + 2;
      }
    }
  }
  FUN_14004f670(&local_res8);
  puVar9 = local_res8;
  if (local_res8 == (uint *)0x0) {
    puVar9 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar9,&DAT_140288b80,uVar5);
  puVar9 = local_res8;
  if (local_res8 == (uint *)0x0) {
    puVar9 = (uint *)PTR_DAT_1403200a0;
  }
  uVar5 = FUN_140156740(puVar9);
  uVar14 = 0;
  if (0 < (int)uVar5) {
    uVar14 = uVar5;
  }
  uVar5 = uVar6;
  if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar5 = local_res8[-2];
  }
  if (((int)uVar5 <= (int)uVar14) && (uVar14 = uVar6, local_res8 != (uint *)0x0)) {
    if (local_res8 == (uint *)PTR_DAT_1403200a0) goto LAB_140170c9d;
    uVar14 = local_res8[-2];
  }
  if (((local_res8 != (uint *)PTR_DAT_1403200a0) && (local_res8 != (uint *)0x0)) &&
     (local_res8 + -2 != (uint *)0x0)) {
    local_res8[-2] = uVar14;
    *(undefined2 *)((longlong)local_res8 + (longlong)(int)uVar14 * 2) = 0;
  }
LAB_140170c9d:
  local_60 = 0;
  local_58 = 0;
  local_50 = 0;
  local_48 = 0;
  local_68 = Proud::ByteArray::vftable;
  uVar10 = FUN_140181f50(&local_res20,0x10,1,&local_res8,&local_68);
  FUN_14016dca0(param_3,uVar10);
  lVar2 = local_res20;
  if (local_res20 != 0) {
    local_88 = local_res20;
    FUN_140156b50(local_res20);
    local_80 = 1;
    *(longlong *)(local_res20 + 0x40) = *(longlong *)(local_res20 + 0x40) + -1;
    if (*(longlong *)(local_res20 + 0x40) == 0) {
      FUN_140156be0(lVar2);
      local_80 = 0;
      FUN_14013c4c0(local_res20);
    }
    else {
      FUN_140156be0(lVar2);
    }
  }
  FUN_1401858d0(&local_68);
  puVar9 = local_res8;
  if (((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar12 = local_res8 + -2, puVar12 != (uint *)0x0)) {
    uVar10 = FUN_1401568c0();
    local_78 = uVar10;
    FUN_140156b50(uVar10);
    local_70 = 1;
    puVar9 = puVar9 + -1;
    *puVar9 = *puVar9 - 1;
    if (*puVar9 == 0) {
      FUN_140156970(puVar12);
    }
    FUN_140156be0(uVar10);
  }
  return 0;
}



void FUN_140170e20(longlong param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined *puVar4;
  undefined *local_res8;
  longlong *local_res10;
  
  local_res10 = param_2;
  if (*(longlong *)(param_1 + 0x17f0) != 0) {
    if (*param_2 == 0) {
      uVar3 = 0;
    }
    else {
      uVar3 = *(undefined8 *)(*param_2 + 0x38);
    }
    plVar2 = (longlong *)FUN_140182070(uVar3,&local_res8,param_3,param_4,0xfffffffffffffffe);
    puVar4 = (undefined *)*plVar2;
    if ((undefined *)*plVar2 == (undefined *)0x0) {
      puVar4 = PTR_DAT_1403200a0;
    }
    FUN_140196a90(*(undefined8 *)(param_1 + 0x17f0),0,puVar4);
    if (((local_res8 != (undefined *)0x0) && (local_res8 != PTR_DAT_1403200a0)) &&
       (local_res8 + -8 != (undefined *)0x0)) {
      uVar3 = FUN_1401568c0();
      FUN_140156b50(uVar3);
      piVar1 = (int *)(local_res8 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_res8 + -8);
      }
      FUN_140156be0(uVar3);
    }
  }
  local_res8 = (undefined *)0x0;
  FUN_14016dca0(&local_res8,param_2);
  FUN_140188f10(param_1,&local_res8);
  FUN_14013c530(param_2);
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140170f10(undefined8 param_1)

{
  undefined1 auStack_1138 [56];
  undefined **local_1100;
  longlong *local_10f8;
  longlong local_10f0;
  int local_10e8;
  undefined1 local_10d8 [4192];
  undefined8 local_78;
  ulonglong local_40;
  undefined8 local_10;
  
  local_10 = 0xfffffffffffffffe;
  local_40 = DAT_1403223c0 ^ (ulonglong)auStack_1138;
  FUN_1401a76b0(&local_1100);
  local_78 = param_1;
  FUN_1401a7720(&local_1100);
  FUN_1401a70a0(local_10d8);
  local_1100 = Proud::CFastArray<>::vftable;
  if (0 < local_10e8) {
    FUN_14016d0f0(local_10f0,(longlong)local_10e8);
  }
  if (local_10f0 != 0) {
    if (local_10f8 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*local_10f8 + 0x18))(local_10f8,local_10f0);
    }
  }
  return;
}



void FUN_140170fe0(void)

{
  FUN_1401704a0();
  return;
}



undefined8 FUN_140171000(longlong param_1,longlong param_2,undefined8 param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  
  uVar2 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8)) %
          (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (lVar1 = *(longlong *)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (lVar1 != 0 && ((uint)uVar2 == *(uint *)(lVar1 + 0x28) % *(uint *)(param_1 + 0x28)));
        lVar1 = *(longlong *)(lVar1 + 0x18)) {
      if ((*(uint *)(lVar1 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar1 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        return 0;
      }
    }
  }
  uVar3 = FUN_140170650(param_1,param_2);
  FUN_1401d43e0(uVar3,param_3);
  return 1;
}



void FUN_1401710b0(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *param_2;
  if (lVar1 != *param_1) {
    if (lVar1 != 0) {
      *(longlong *)(*param_2 + 8) = *(longlong *)(lVar1 + 8) + 1;
    }
    plVar2 = (longlong *)0x0;
    if ((*param_1 != 0) &&
       (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
       *(longlong *)(*param_1 + 8) == 0)) {
      plVar2 = (longlong *)*param_1;
    }
    *param_1 = *param_2;
    if (plVar2 != (longlong *)0x0) {
      lVar1 = *plVar2;
      if (lVar1 != 0) {
        FUN_140162160(lVar1);
        FUN_140156970(lVar1);
      }
      FUN_140156970(plVar2);
    }
  }
  return;
}



int * FUN_140171140(longlong param_1,int *param_2)

{
  int *piVar1;
  ulonglong uVar2;
  longlong lVar3;
  uint uVar4;
  
  uVar4 = *param_2 << 0x10 ^ param_2[1];
  uVar2 = (ulonglong)uVar4 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (piVar1 = *(int **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (piVar1 != (int *)0x0 && ((uint)uVar2 == (uint)piVar1[8] % *(uint *)(param_1 + 0x28)));
        piVar1 = *(int **)(piVar1 + 4)) {
      if ((*piVar1 == *param_2) && (piVar1[1] == param_2[1])) {
        return piVar1 + 2;
      }
    }
  }
  lVar3 = FUN_140170700(param_1,param_2,uVar2,uVar4);
  return (int *)(lVar3 + 8);
}



undefined8 FUN_1401711f0(longlong param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4)

{
  char cVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 8) == 0) {
    cVar1 = FUN_1401a8bb0(param_1,*(undefined4 *)(param_1 + 0x28),1);
    if (cVar1 == '\0') {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  FUN_14015b3b0(param_1);
  uVar2 = FUN_140170780(param_1,param_2,param_3,param_4);
  FUN_14015b3b0(param_1);
  return uVar2;
}



void FUN_140171270(longlong param_1)

{
  longlong *plVar1;
  longlong lVar2;
  
  if (*(longlong *)(param_1 + 8) != 0) {
    *(longlong *)(*(longlong *)(param_1 + 8) + 8) =
         *(longlong *)(*(longlong *)(param_1 + 8) + 8) + -1;
    if (*(longlong *)(*(longlong *)(param_1 + 8) + 8) == 0) {
      plVar1 = *(longlong **)(param_1 + 8);
      lVar2 = *plVar1;
      if (lVar2 != 0) {
        FUN_140162160(lVar2);
        FUN_140156970(lVar2);
      }
      FUN_140156970(plVar1);
    }
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x0001401713a3)
// WARNING: Removing unreachable block (ram,0x0001401713aa)
// WARNING: Removing unreachable block (ram,0x0001401713b6)
// WARNING: Removing unreachable block (ram,0x0001401713e0)
// WARNING: Removing unreachable block (ram,0x000140171400)

undefined8
FUN_1401712e0(longlong *param_1,int param_2,undefined8 *param_3,longlong param_4,undefined8 param_5)

{
  undefined4 uVar1;
  int iVar2;
  undefined *puVar3;
  undefined8 *puVar4;
  longlong *plVar5;
  char cVar6;
  uint uVar7;
  uint uVar8;
  undefined8 uVar9;
  undefined4 *puVar10;
  longlong lVar11;
  longlong *plVar12;
  longlong lVar13;
  longlong lVar14;
  uint *puVar15;
  uint *puVar16;
  int iVar17;
  uint uVar18;
  uint uVar19;
  longlong lVar20;
  int local_res10;
  uint *local_158;
  longlong *local_150;
  longlong local_148;
  longlong local_140;
  longlong *local_138;
  longlong *local_130;
  undefined1 local_128 [8];
  undefined8 local_120;
  undefined1 local_118;
  longlong local_110;
  undefined1 local_108;
  undefined4 local_100;
  int local_fc;
  undefined **local_f8;
  undefined8 local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  longlong local_d0;
  undefined1 local_c8;
  undefined8 local_c0;
  undefined1 local_b8;
  undefined8 local_b0;
  undefined1 local_a8 [16];
  undefined1 local_98 [88];
  
  local_b0 = 0xfffffffffffffffe;
  uVar9 = (**(code **)(*param_1 + 0x58))();
  local_120 = uVar9;
  FUN_140156b50(uVar9);
  local_118 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::CreateAndInitUdpSockets");
  }
  if (param_2 == 0) {
    FUN_14013c150(param_3,param_1 + 0x309);
    FUN_140156be0(uVar9);
  }
  else {
    if (*(int *)(param_3 + 3) == 0) {
      local_fc = *(int *)(param_3 + 3);
      FUN_14013c2c0(param_3,1);
      puVar10 = (undefined4 *)FUN_140146330(param_3);
      *puVar10 = 0;
    }
    local_138 = param_1 + 0xd9;
    FUN_14016b6c0(local_138,0);
    local_130 = param_1 + 0xde;
    FUN_14016ddd0(local_130);
    local_res10 = 0;
    local_148 = 0;
    if (0 < *(int *)(param_3 + 3)) {
      do {
        lVar13 = local_148;
        local_150 = (longlong *)FUN_140156940(0x180);
        if (local_150 == (longlong *)0x0) {
          lVar11 = 0;
        }
        else {
          lVar11 = FUN_1401a45b0(local_150,param_1);
        }
        if (lVar11 == 0) {
          plVar12 = (longlong *)0x0;
        }
        else {
          plVar12 = (longlong *)FUN_140156940(0x10);
          plVar12[1] = 1;
          *plVar12 = lVar11;
        }
        lVar11 = 0;
        local_150 = plVar12;
        if ((lVar13 < 0) || (*(int *)(param_3 + 3) <= local_res10)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        uVar1 = *(undefined4 *)(param_3[2] + lVar13 * 4);
        puVar3 = (undefined *)param_1[0x43];
        local_100 = uVar1;
        if (((puVar3 == (undefined *)0x0) || (puVar3 == PTR_DAT_140320098)) ||
           (*(int *)(puVar3 + -8) == 0)) {
          lVar20 = lVar11;
          if (plVar12 != (longlong *)0x0) {
            lVar20 = *plVar12;
          }
          lVar14 = lVar11;
          if (*(longlong **)(lVar20 + 0x150) != (longlong *)0x0) {
            lVar14 = **(longlong **)(lVar20 + 0x150);
          }
          cVar6 = FUN_1401870f0(lVar14,uVar1);
        }
        else {
          lVar20 = lVar11;
          if (plVar12 != (longlong *)0x0) {
            lVar20 = *plVar12;
          }
          lVar14 = lVar11;
          if (*(longlong **)(lVar20 + 0x150) != (longlong *)0x0) {
            lVar14 = **(longlong **)(lVar20 + 0x150);
          }
          cVar6 = FUN_140187140(lVar14,puVar3,uVar1);
        }
        if (cVar6 == '\0') {
          if (*(char *)((longlong)param_1 + 0x255) == '\0') {
            FUN_1401568c0();
            local_158 = (uint *)PTR_DAT_1403200a0;
            uVar7 = FUN_140156740(&DAT_140288b80);
            uVar18 = 0;
            uVar19 = 0;
            if ((local_158 != (uint *)0x0) && (local_158 != (uint *)PTR_DAT_1403200a0)) {
              uVar19 = local_158[-2];
            }
            uVar8 = uVar7;
            if ((((int)uVar7 <= (int)uVar19) && (uVar8 = uVar18, local_158 != (uint *)0x0)) &&
               (local_158 != (uint *)PTR_DAT_1403200a0)) {
              uVar8 = local_158[-2];
            }
            uVar19 = 1;
            if (1 < (int)uVar8) {
              uVar19 = uVar8;
            }
            uVar8 = uVar18;
            if ((local_158 != (uint *)0x0) && (local_158 != (uint *)PTR_DAT_1403200a0)) {
              uVar8 = local_158[-2];
            }
            if ((int)uVar8 < (int)uVar19) {
              if (local_158 == (uint *)0x0) {
                local_158 = (uint *)PTR_DAT_1403200a0;
              }
              if ((int)uVar19 < 0) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              if (uVar19 == 0) {
                FUN_14004f990(&local_158);
              }
              else {
                uVar8 = uVar18;
                if ((local_158 != (uint *)0x0) && (local_158 != (uint *)PTR_DAT_1403200a0)) {
                  uVar8 = local_158[-2];
                }
                if (uVar19 != uVar8) {
                  puVar15 = (uint *)FUN_140156940((longlong)(int)uVar19 * 2 + 10);
                  if (puVar15 != (uint *)0x0) {
                    *puVar15 = 0;
                    puVar15[1] = 1;
                  }
                  *puVar15 = uVar19;
                  uVar8 = uVar18;
                  if ((local_158 != (uint *)0x0) && (local_158 != (uint *)PTR_DAT_1403200a0)) {
                    uVar8 = local_158[-2];
                  }
                  puVar16 = (uint *)PTR_DAT_1403200a0;
                  if ((int)uVar19 < (int)uVar8) {
LAB_1401719a3:
                    if (local_158 != (uint *)0x0) {
                      puVar16 = local_158;
                    }
                  }
                  else {
                    uVar19 = uVar18;
                    if (local_158 != (uint *)0x0) {
                      if (local_158 != (uint *)PTR_DAT_1403200a0) {
                        uVar19 = local_158[-2];
                      }
                      goto LAB_1401719a3;
                    }
                  }
                  FUN_140156770(puVar15 + 2,puVar16,uVar19);
                  FUN_14004f990(&local_158);
                  local_158 = puVar15 + 2;
                }
              }
            }
            FUN_14004f670(&local_158);
            puVar15 = local_158;
            if (local_158 == (uint *)0x0) {
              puVar15 = (uint *)PTR_DAT_1403200a0;
            }
            FUN_140156770(puVar15,&DAT_140288b80,uVar7);
            puVar15 = local_158;
            if (local_158 == (uint *)0x0) {
              puVar15 = (uint *)PTR_DAT_1403200a0;
            }
            uVar7 = FUN_140156740(puVar15);
            uVar18 = 0;
            uVar19 = 0;
            if (0 < (int)uVar7) {
              uVar19 = uVar7;
            }
            uVar7 = uVar18;
            if ((local_158 != (uint *)0x0) && (local_158 != (uint *)PTR_DAT_1403200a0)) {
              uVar7 = local_158[-2];
            }
            if (((int)uVar7 <= (int)uVar19) && (uVar19 = uVar18, local_158 != (uint *)0x0)) {
              if (local_158 == (uint *)PTR_DAT_1403200a0) goto LAB_140171a60;
              uVar19 = local_158[-2];
            }
            if (((local_158 != (uint *)PTR_DAT_1403200a0) && (local_158 != (uint *)0x0)) &&
               (local_158 + -2 != (uint *)0x0)) {
              local_158[-2] = uVar19;
              *(undefined2 *)((longlong)local_158 + (longlong)(int)uVar19 * 2) = 0;
            }
LAB_140171a60:
            local_f0 = 0;
            local_e8 = 0;
            local_e0 = 0;
            local_d8 = 0;
            local_f8 = Proud::ByteArray::vftable;
            uVar9 = FUN_140181f50(&local_140,0x10,1,&local_158,&local_f8);
            FUN_14016dca0(param_5,uVar9);
            lVar13 = local_140;
            if (local_140 != 0) {
              local_110 = local_140;
              FUN_140156b50(local_140);
              local_108 = 1;
              *(longlong *)(local_140 + 0x40) = *(longlong *)(local_140 + 0x40) + -1;
              if (*(longlong *)(local_140 + 0x40) == 0) {
                FUN_140156be0(lVar13);
                local_108 = 0;
                FUN_14013c4c0(local_140);
              }
              else {
                FUN_140156be0(lVar13);
                local_108 = 0;
              }
            }
            FUN_1401858d0(&local_f8);
            puVar15 = local_158;
            if (((local_158 != (uint *)0x0) && (local_158 != (uint *)PTR_DAT_1403200a0)) &&
               (puVar16 = local_158 + -2, puVar16 != (uint *)0x0)) {
              uVar9 = FUN_1401568c0();
              local_c0 = uVar9;
              FUN_140156b50(uVar9);
              local_b8 = 1;
              puVar15 = puVar15 + -1;
              *puVar15 = *puVar15 - 1;
              if (*puVar15 == 0) {
                FUN_140156970(puVar16);
              }
              FUN_140156be0(uVar9);
              local_b8 = 0;
            }
            local_158 = (uint *)PTR_DAT_1403200a0;
            FUN_14016b6c0(local_138,0);
            FUN_14016ddd0(local_130);
            plVar5 = local_150;
            if (plVar12 != (longlong *)0x0) {
              plVar12 = plVar12 + 1;
              *plVar12 = *plVar12 + -1;
              if (*plVar12 == 0) {
                puVar4 = (undefined8 *)*local_150;
                if (puVar4 != (undefined8 *)0x0) {
                  (**(code **)*puVar4)(puVar4,1);
                }
                FUN_140156970(plVar5);
              }
            }
            FUN_140156be0(local_120);
            *param_3 = Proud::CFastArray<int,0>::vftable;
            if (param_3[2] != 0) {
              if ((longlong *)param_3[1] == (longlong *)0x0) {
                FUN_140156970(param_3[2]);
              }
              else {
                (**(code **)(*(longlong *)param_3[1] + 0x18))();
              }
            }
            return 0;
          }
          iVar2 = *(int *)(param_4 + 0x18);
          if (iVar2 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          iVar17 = *(int *)(param_4 + 0x18);
          FUN_14013c2c0(param_4,iVar17 + 1);
          iVar17 = iVar17 - iVar2;
          if ((0 < iVar17) && (iVar17 = iVar17 + -1, lVar11 = (longlong)iVar17, -1 < iVar17)) {
            lVar20 = (iVar2 + lVar11) * 4 + 4;
            do {
              lVar13 = FUN_140146330(param_4);
              lVar14 = FUN_140146330(param_4);
              *(undefined4 *)(lVar14 + lVar20) = *(undefined4 *)(lVar13 + -4 + lVar20);
              lVar20 = lVar20 + -4;
              lVar11 = lVar11 + -1;
              lVar13 = local_148;
            } while (-1 < lVar11);
          }
          lVar11 = FUN_140146330(param_4);
          plVar5 = local_150;
          *(undefined4 *)(lVar11 + (longlong)iVar2 * 4) = uVar1;
          if (plVar12 != (longlong *)0x0) {
            plVar12 = plVar12 + 1;
            *plVar12 = *plVar12 + -1;
            if (*plVar12 == 0) {
              puVar4 = (undefined8 *)*local_150;
              if (puVar4 != (undefined8 *)0x0) {
                (**(code **)*puVar4)(puVar4,1);
              }
              FUN_140156970(plVar5);
            }
          }
        }
        else {
          lVar13 = lVar11;
          if (plVar12 != (longlong *)0x0) {
            lVar13 = *plVar12;
          }
          lVar20 = lVar11;
          if (*(longlong **)(lVar13 + 0x150) != (longlong *)0x0) {
            lVar20 = **(longlong **)(lVar13 + 0x150);
          }
          if (plVar12 != (longlong *)0x0) {
            lVar11 = *plVar12;
          }
          lVar13 = FUN_140184b60(lVar20,local_a8);
          *(undefined4 *)(lVar11 + 0x160) = *(undefined4 *)(lVar13 + 8);
          *(undefined2 *)(lVar11 + 0x164) = *(undefined2 *)(lVar13 + 0xc);
          if (plVar12 == (longlong *)0x0) {
            lVar13 = 0;
          }
          else {
            lVar13 = *plVar12;
          }
          if (*(short *)(lVar13 + 0x164) == 0) {
LAB_140171bfd:
            FUN_140156300(local_98,L"m_cachedLocalAddr has an unexpected value!");
                    // WARNING: Subroutine does not return
            _CxxThrowException(local_98,(ThrowInfo *)&DAT_14031d928);
          }
          if (plVar12 == (longlong *)0x0) {
            lVar13 = 0;
          }
          else {
            lVar13 = *plVar12;
          }
          if (*(short *)(lVar13 + 0x164) == -1) goto LAB_140171bfd;
          iVar2 = (int)local_138[3];
          if (iVar2 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          lVar13 = local_138[3];
          FUN_14016b6c0(local_138,(int)lVar13 + 1);
          plVar5 = local_138;
          iVar17 = (int)lVar13 - iVar2;
          if ((0 < iVar17) && (iVar17 = iVar17 + -1, -1 < iVar17)) {
            lVar13 = (longlong)(iVar17 + iVar2 + 1) << 3;
            lVar11 = (longlong)(iVar17 + iVar2) << 3;
            do {
              lVar20 = FUN_1401a7bb0(plVar5);
              lVar14 = FUN_1401a7bb0(plVar5);
              FUN_1401d43e0(lVar13 + lVar14,lVar11 + lVar20);
              lVar11 = lVar11 + -8;
              lVar13 = lVar13 + -8;
              iVar17 = iVar17 + -1;
            } while (-1 < iVar17);
          }
          lVar13 = FUN_1401a7bb0(local_138);
          FUN_1401d43e0(lVar13 + (longlong)iVar2 * 8,&local_150);
          lVar13 = 0;
          lVar11 = lVar13;
          if (plVar12 != (longlong *)0x0) {
            lVar11 = *plVar12;
          }
          FUN_140171000(local_130,lVar11 + 0x158,&local_150);
          lVar11 = lVar13;
          if (plVar12 != (longlong *)0x0) {
            lVar11 = *plVar12;
          }
          lVar20 = lVar13;
          if (*(longlong **)(lVar11 + 0x150) != (longlong *)0x0) {
            lVar20 = **(longlong **)(lVar11 + 0x150);
          }
          FUN_140184cc0(lVar20,lVar11);
          lVar11 = lVar13;
          if (plVar12 != (longlong *)0x0) {
            lVar11 = *plVar12;
          }
          lVar20 = lVar13;
          if (*(longlong **)(lVar11 + 0x150) != (longlong *)0x0) {
            lVar20 = **(longlong **)(lVar11 + 0x150);
          }
          FUN_14018c430(param_1[0xf1],lVar20);
          lVar11 = lVar13;
          if (plVar12 != (longlong *)0x0) {
            lVar11 = *plVar12;
          }
          lVar20 = lVar13;
          if (*(longlong **)(lVar11 + 0x150) != (longlong *)0x0) {
            lVar20 = **(longlong **)(lVar11 + 0x150);
          }
          FUN_1401a7b80(lVar20);
          if ((plVar12 == (longlong *)0x0) || (lVar11 = *plVar12 + 0x40, *plVar12 == 0)) {
            lVar11 = lVar13;
          }
          FUN_1401a37e0(local_128,lVar11);
          lVar11 = lVar13;
          if (plVar12 != (longlong *)0x0) {
            lVar11 = *plVar12;
          }
          lVar11 = lVar11 + 0xa8;
          local_d0 = lVar11;
          FUN_140156b50(lVar11);
          local_c8 = 1;
          if (plVar12 != (longlong *)0x0) {
            lVar13 = *plVar12;
          }
          FUN_1401a3ac0(lVar13);
          FUN_140156be0(lVar11);
          local_c8 = 0;
          FUN_1401a37f0(local_128);
          plVar5 = local_150;
          lVar13 = local_148;
          if (plVar12 != (longlong *)0x0) {
            plVar12 = plVar12 + 1;
            *plVar12 = *plVar12 + -1;
            if (*plVar12 == 0) {
              puVar4 = (undefined8 *)*local_150;
              if (puVar4 != (undefined8 *)0x0) {
                (**(code **)*puVar4)(puVar4,1);
              }
              FUN_140156970(plVar5);
              lVar13 = local_148;
            }
          }
        }
        local_res10 = local_res10 + 1;
        local_148 = lVar13 + 1;
        uVar9 = local_120;
      } while (local_res10 < *(int *)(param_3 + 3));
    }
    FUN_140156be0(uVar9);
  }
  *param_3 = Proud::CFastArray<int,0>::vftable;
  if (param_3[2] != 0) {
    if ((longlong *)param_3[1] == (longlong *)0x0) {
      FUN_140156970(param_3[2]);
    }
    else {
      (**(code **)(*(longlong *)param_3[1] + 0x18))();
    }
  }
  return 1;
}



void FUN_140171c70(longlong *param_1)

{
  longlong lVar1;
  
  if (*param_1 != 0) {
    *(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1;
    if (*(longlong *)(*param_1 + 8) == 0) {
      param_1 = (longlong *)*param_1;
      lVar1 = *param_1;
      if (lVar1 != 0) {
        FUN_140162160(lVar1);
        FUN_140156970(lVar1);
      }
      FUN_140156970(param_1);
    }
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x000140171d4a)
// WARNING: Removing unreachable block (ram,0x000140171d53)
// WARNING: Removing unreachable block (ram,0x000140171d71)
// WARNING: Removing unreachable block (ram,0x000140171d7a)

undefined1 * FUN_140171ce0(undefined1 *param_1)

{
  *param_1 = 0;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  *(undefined4 *)(param_1 + 0x28) = 0x11;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined4 *)(param_1 + 0x48) = 0;
  *(undefined4 *)(param_1 + 0x2c) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x30) = 0x3e800000;
  *(undefined4 *)(param_1 + 0x34) = 0x40100000;
  *(undefined8 *)(param_1 + 0x38) = 0x26;
  *(undefined8 *)(param_1 + 0x40) = 0;
  param_1[0x58] = 0;
  *(undefined8 *)(param_1 + 0xa8) = 0;
  *(undefined8 *)(param_1 + 0x60) = 0;
  *(undefined8 *)(param_1 + 0x68) = 0;
  *(undefined8 *)(param_1 + 0x70) = 0;
  *(undefined4 *)(param_1 + 0x80) = 0x11;
  *(undefined8 *)(param_1 + 0x78) = 0;
  *(undefined4 *)(param_1 + 0xa0) = 0;
  *(undefined4 *)(param_1 + 0x84) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x88) = 0x3e800000;
  *(undefined4 *)(param_1 + 0x8c) = 0x40100000;
  *(undefined8 *)(param_1 + 0x90) = 0x26;
  *(undefined8 *)(param_1 + 0x98) = 0;
  return param_1;
}



void FUN_140171e00(longlong param_1)

{
  FUN_140170fe0(param_1 + 0x58);
  FUN_140170fe0(param_1);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140171e30(longlong *param_1,longlong *param_2)

{
  int iVar1;
  undefined8 *puVar2;
  undefined *puVar3;
  char cVar4;
  undefined2 uVar5;
  uint uVar6;
  uint uVar7;
  uint uVar8;
  undefined4 uVar9;
  longlong *plVar10;
  longlong *plVar11;
  uint *puVar12;
  undefined8 uVar13;
  longlong lVar14;
  longlong lVar15;
  longlong *plVar16;
  longlong *plVar17;
  uint *puVar18;
  uint uVar19;
  int iVar20;
  longlong lVar21;
  longlong lVar22;
  uint uVar23;
  undefined1 auStack_e68 [32];
  undefined ***local_e48;
  undefined4 *local_e40;
  longlong *local_e38;
  uint *local_e30;
  uint local_e28;
  uint local_e24;
  longlong *local_e18;
  longlong *local_e10;
  undefined8 local_e08;
  undefined4 uStack_e00;
  undefined4 uStack_dfc;
  longlong local_df8;
  undefined1 local_df0 [8];
  longlong local_de8;
  longlong *local_de0;
  undefined4 local_dd8;
  int local_dd4;
  undefined **local_dc8;
  undefined4 local_dc0;
  undefined2 local_dbc;
  undefined1 local_db8 [8];
  undefined **local_db0;
  undefined8 local_da8;
  undefined8 local_da0;
  undefined8 local_d98;
  undefined8 local_d90;
  undefined4 local_d88 [2];
  undefined8 local_d80;
  undefined1 local_d78;
  undefined4 local_d74;
  undefined1 local_d70;
  undefined1 local_d6f;
  longlong *local_d68;
  undefined1 local_d60;
  undefined8 local_d58;
  undefined1 local_d50;
  undefined8 local_d48;
  undefined1 local_d40 [8];
  undefined1 local_d38 [16];
  undefined1 local_d28 [80];
  undefined4 local_cd8;
  undefined4 uStack_cd4;
  undefined4 uStack_cd0;
  undefined4 uStack_ccc;
  undefined4 *local_58;
  undefined4 local_50;
  int local_4c;
  ulonglong local_48;
  
  local_d48 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_e68;
  if (((longlong *)param_2[0xe8] != (longlong *)0x0) && (*(longlong *)param_2[0xe8] != 0)) {
    return 1;
  }
  if (*(char *)((longlong)param_2 + 0x702) != '\0') {
    return 0;
  }
  plVar17 = (longlong *)0x0;
  uVar23 = 0;
  local_e38 = (longlong *)0x0;
  local_e08 = param_1;
  if (*(int *)((longlong)param_1 + 0x1844) != 0) {
    plVar10 = (longlong *)FUN_1401698e0(param_1,&local_e10);
    if (*plVar10 != 0) {
      *(longlong *)(*plVar10 + 8) = *(longlong *)(*plVar10 + 8) + 1;
      plVar17 = (longlong *)*plVar10;
      local_e38 = plVar17;
    }
    if ((local_e10 != (longlong *)0x0) &&
       (local_e10[1] = local_e10[1] + -1, plVar17 = local_e38, local_e10[1] == 0)) {
      puVar2 = (undefined8 *)*local_e10;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
      }
      FUN_140156970();
      plVar17 = local_e38;
    }
    goto LAB_14017253d;
  }
  local_df8 = FUN_140156940(0x180);
  plVar10 = plVar17;
  if (local_df8 != 0) {
    plVar10 = (longlong *)FUN_1401a45b0(local_df8,param_1);
  }
  if (plVar10 == (longlong *)0x0) {
    local_e18 = (longlong *)0x0;
  }
  else {
    local_e18 = (longlong *)FUN_140156940(0x10);
    local_e18[1] = 1;
    *local_e18 = (longlong)plVar10;
  }
  plVar11 = local_e18;
  plVar10 = plVar17;
  if (local_e18 != (longlong *)0x0) {
    local_e18[1] = local_e18[1] + 1;
    local_e38 = local_e18;
    plVar16 = local_e18 + 1;
    *plVar16 = *plVar16 + -1;
    plVar10 = local_e18;
    if (*plVar16 == 0) {
      puVar2 = (undefined8 *)*local_e18;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
      }
      FUN_140156970(plVar11);
      plVar10 = local_e38;
    }
  }
  if ((int)param_1[0x30c] < 1) {
    local_e28 = 0;
    local_e24 = 0;
  }
  else {
    iVar1 = (int)param_1[0x30c];
    if (iVar1 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    uVar6 = *(uint *)(param_1[0x30b] + -4 + (longlong)iVar1 * 4);
    local_e28 = uVar6;
    FUN_14013c2c0(param_1 + 0x309,iVar1 + -1);
    local_e24 = uVar6;
  }
  uVar6 = local_e24;
  puVar3 = (undefined *)param_1[0x43];
  if (((puVar3 == (undefined *)0x0) || (puVar3 == PTR_DAT_140320098)) ||
     (*(int *)(puVar3 + -8) == 0)) {
    plVar11 = plVar17;
    if (plVar10 != (longlong *)0x0) {
      plVar11 = (longlong *)*plVar10;
    }
    plVar16 = plVar17;
    if ((undefined8 *)plVar11[0x2a] != (undefined8 *)0x0) {
      plVar16 = *(longlong **)plVar11[0x2a];
    }
    cVar4 = FUN_1401870f0(plVar16,local_e24);
  }
  else {
    plVar11 = plVar17;
    if (plVar10 != (longlong *)0x0) {
      plVar11 = (longlong *)*plVar10;
    }
    plVar16 = plVar17;
    if ((undefined8 *)plVar11[0x2a] != (undefined8 *)0x0) {
      plVar16 = *(longlong **)plVar11[0x2a];
    }
    cVar4 = FUN_140187140(plVar16,puVar3,local_e24);
  }
  if (cVar4 == '\0') {
    if ((int)uVar6 < 1) goto LAB_140172498;
    FUN_1401568c0();
    local_e30 = (uint *)PTR_DAT_1403200a0;
    uVar6 = FUN_140156740(
                         L"All UDP port numbers specified at Server Start are deleted! An arbitary port number is assigned instead."
                         );
    if ((local_e30 != (uint *)0x0) &&
       (plVar17 = (longlong *)0x0, local_e30 != (uint *)PTR_DAT_1403200a0)) {
      plVar17 = (longlong *)(ulonglong)local_e30[-2];
    }
    uVar7 = uVar6;
    if ((((int)uVar6 <= (int)plVar17) && (uVar7 = uVar23, local_e30 != (uint *)0x0)) &&
       (local_e30 != (uint *)PTR_DAT_1403200a0)) {
      uVar7 = local_e30[-2];
    }
    uVar19 = 1;
    if (1 < (int)uVar7) {
      uVar19 = uVar7;
    }
    uVar8 = 0;
    uVar7 = uVar8;
    if ((local_e30 != (uint *)0x0) && (local_e30 != (uint *)PTR_DAT_1403200a0)) {
      uVar7 = local_e30[-2];
    }
    if ((int)uVar7 < (int)uVar19) {
      if (local_e30 == (uint *)0x0) {
        local_e30 = (uint *)PTR_DAT_1403200a0;
      }
      if ((int)uVar19 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (uVar19 == 0) {
        FUN_14004f990(&local_e30);
      }
      else {
        uVar7 = uVar8;
        if ((local_e30 != (uint *)0x0) && (local_e30 != (uint *)PTR_DAT_1403200a0)) {
          uVar7 = local_e30[-2];
        }
        if (uVar19 != uVar7) {
          puVar12 = (uint *)FUN_140156940((longlong)(int)uVar19 * 2 + 10);
          if (puVar12 != (uint *)0x0) {
            *puVar12 = 0;
            puVar12[1] = 1;
          }
          *puVar12 = uVar19;
          uVar7 = uVar8;
          if ((local_e30 != (uint *)0x0) && (local_e30 != (uint *)PTR_DAT_1403200a0)) {
            uVar7 = local_e30[-2];
          }
          puVar18 = (uint *)PTR_DAT_1403200a0;
          if ((int)uVar19 < (int)uVar7) {
LAB_140172124:
            if (local_e30 != (uint *)0x0) {
              puVar18 = local_e30;
            }
          }
          else {
            uVar19 = uVar23;
            if (local_e30 != (uint *)0x0) {
              if (local_e30 != (uint *)PTR_DAT_1403200a0) {
                uVar19 = local_e30[-2];
              }
              goto LAB_140172124;
            }
          }
          FUN_140156770(puVar12 + 2,puVar18,uVar19);
          FUN_14004f990(&local_e30);
          local_e30 = puVar12 + 2;
        }
      }
    }
    FUN_14004f670(&local_e30);
    puVar12 = local_e30;
    if (local_e30 == (uint *)0x0) {
      puVar12 = (uint *)PTR_DAT_1403200a0;
    }
    FUN_140156770(puVar12,
                  L"All UDP port numbers specified at Server Start are deleted! An arbitary port number is assigned instead."
                  ,uVar6);
    puVar12 = local_e30;
    if (local_e30 == (uint *)0x0) {
      puVar12 = (uint *)PTR_DAT_1403200a0;
    }
    uVar6 = FUN_140156740(puVar12);
    uVar23 = 0;
    if (0 < (int)uVar6) {
      uVar23 = uVar6;
    }
    uVar6 = uVar8;
    if ((local_e30 != (uint *)0x0) && (local_e30 != (uint *)PTR_DAT_1403200a0)) {
      uVar6 = local_e30[-2];
    }
    if (((int)uVar23 < (int)uVar6) || (uVar23 = uVar8, local_e30 == (uint *)0x0)) {
LAB_1401721c3:
      if (((local_e30 != (uint *)PTR_DAT_1403200a0) && (local_e30 != (uint *)0x0)) &&
         (local_e30 + -2 != (uint *)0x0)) {
        local_e30[-2] = uVar23;
        *(undefined2 *)((longlong)local_e30 + (longlong)(int)uVar23 * 2) = 0;
      }
    }
    else if (local_e30 != (uint *)PTR_DAT_1403200a0) {
      uVar23 = local_e30[-2];
      goto LAB_1401721c3;
    }
    local_da8 = 0;
    local_da0 = 0;
    local_d98 = 0;
    local_d90 = 0;
    local_db0 = Proud::ByteArray::vftable;
    local_e48 = &local_db0;
    uVar13 = FUN_140181f50(local_d40,0x11,(int)param_2[0xdf],&local_e30);
    (**(code **)(*param_1 + 0x88))(param_1,uVar13);
    FUN_1401858d0(&local_db0);
    puVar12 = local_e30;
    if (((local_e30 != (uint *)0x0) && (local_e30 != (uint *)PTR_DAT_1403200a0)) &&
       (puVar18 = local_e30 + -2, puVar18 != (uint *)0x0)) {
      uVar13 = FUN_1401568c0();
      local_d58 = uVar13;
      FUN_140156b50(uVar13);
      local_d50 = 1;
      puVar12 = puVar12 + -1;
      *puVar12 = *puVar12 - 1;
      if (*puVar12 == 0) {
        FUN_140156970(puVar18);
      }
      FUN_140156be0(uVar13);
      local_d50 = 0;
    }
    local_e30 = (uint *)PTR_DAT_1403200a0;
    plVar17 = param_1 + 0x309;
    iVar1 = (int)param_1[0x30c];
    if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    lVar22 = param_1[0x30c];
    FUN_14013c2c0(plVar17,(int)lVar22 + 1);
    iVar20 = (int)lVar22 - iVar1;
    if ((0 < iVar20) && (iVar20 = iVar20 + -1, lVar22 = (longlong)iVar20, -1 < iVar20)) {
      lVar21 = (iVar1 + lVar22) * 4 + 4;
      do {
        lVar15 = FUN_140146330(plVar17);
        lVar14 = FUN_140146330(plVar17);
        *(undefined4 *)(lVar14 + lVar21) = *(undefined4 *)(lVar15 + -4 + lVar21);
        lVar21 = lVar21 + -4;
        lVar22 = lVar22 + -1;
      } while (-1 < lVar22);
    }
    lVar22 = FUN_140146330(plVar17);
    param_1 = local_e08;
    *(uint *)(lVar22 + (longlong)iVar1 * 4) = local_e28;
    lVar22 = 0;
    local_e24 = 0;
    puVar3 = (undefined *)local_e08[0x43];
    if (((puVar3 == (undefined *)0x0) || (puVar3 == PTR_DAT_140320098)) ||
       (*(int *)(puVar3 + -8) == 0)) {
      lVar21 = lVar22;
      if (plVar10 != (longlong *)0x0) {
        lVar21 = *plVar10;
      }
      if (*(longlong **)(lVar21 + 0x150) != (longlong *)0x0) {
        lVar22 = **(longlong **)(lVar21 + 0x150);
      }
      cVar4 = FUN_1401870f0(lVar22,0);
    }
    else {
      lVar21 = lVar22;
      if (plVar10 != (longlong *)0x0) {
        lVar21 = *plVar10;
      }
      if (*(longlong **)(lVar21 + 0x150) != (longlong *)0x0) {
        lVar22 = **(longlong **)(lVar21 + 0x150);
      }
      cVar4 = FUN_140187140(lVar22,puVar3,0);
    }
    if (cVar4 == '\0') {
LAB_140172498:
      plVar17 = local_e38;
      *(undefined1 *)((longlong)param_2 + 0x702) = 1;
      if (plVar10 != (longlong *)0x0) {
        plVar10 = plVar10 + 1;
        *plVar10 = *plVar10 + -1;
        if (*plVar10 == 0) {
          puVar2 = (undefined8 *)*local_e38;
          if (puVar2 != (undefined8 *)0x0) {
            (**(code **)*puVar2)(puVar2,1);
          }
          FUN_140156970(plVar17);
        }
      }
      return 0;
    }
    uVar23 = 0;
  }
  else {
    uVar23 = 0;
    if (0 < (int)uVar6) {
      uVar23 = uVar6;
    }
  }
  lVar22 = 0;
  lVar21 = lVar22;
  if (plVar10 != (longlong *)0x0) {
    lVar21 = *plVar10;
  }
  lVar15 = lVar22;
  if (*(longlong **)(lVar21 + 0x150) != (longlong *)0x0) {
    lVar15 = **(longlong **)(lVar21 + 0x150);
  }
  lVar21 = lVar22;
  if (plVar10 != (longlong *)0x0) {
    lVar21 = *plVar10;
  }
  lVar15 = FUN_140184b60(lVar15,local_d38);
  *(undefined4 *)(lVar21 + 0x160) = *(undefined4 *)(lVar15 + 8);
  *(undefined2 *)(lVar21 + 0x164) = *(undefined2 *)(lVar15 + 0xc);
  lVar21 = lVar22;
  if (plVar10 != (longlong *)0x0) {
    lVar21 = *plVar10;
  }
  FUN_140171000(param_1 + 0xde,lVar21 + 0x158,&local_e38);
  lVar21 = lVar22;
  if (plVar10 != (longlong *)0x0) {
    lVar21 = *plVar10;
  }
  lVar15 = lVar22;
  if (*(longlong **)(lVar21 + 0x150) != (longlong *)0x0) {
    lVar15 = **(longlong **)(lVar21 + 0x150);
  }
  FUN_140184cc0(lVar15,lVar21);
  lVar21 = lVar22;
  if (plVar10 != (longlong *)0x0) {
    lVar21 = *plVar10;
  }
  if (*(longlong **)(lVar21 + 0x150) != (longlong *)0x0) {
    lVar22 = **(longlong **)(lVar21 + 0x150);
  }
  FUN_14018c430(param_1[0xf1],lVar22);
  FUN_1401a7b80();
  plVar17 = plVar10;
LAB_14017253d:
  plVar10 = (longlong *)0x0;
  if (plVar17 != (longlong *)param_2[0xe8]) {
    if (plVar17 != (longlong *)0x0) {
      plVar17[1] = plVar17[1] + 1;
      plVar17 = local_e38;
    }
    plVar11 = plVar10;
    if ((param_2[0xe8] != 0) &&
       (*(longlong *)(param_2[0xe8] + 8) = *(longlong *)(param_2[0xe8] + 8) + -1,
       plVar17 = local_e38, *(longlong *)(param_2[0xe8] + 8) == 0)) {
      plVar11 = (longlong *)param_2[0xe8];
    }
    param_2[0xe8] = (longlong)plVar17;
    if (plVar11 != (longlong *)0x0) {
      puVar2 = (undefined8 *)*plVar11;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
      }
      FUN_140156970();
    }
  }
  if (*(int *)((longlong)param_1 + 0x1844) == 0) {
    if (plVar17 != (longlong *)param_2[0xec]) {
      if (plVar17 != (longlong *)0x0) {
        plVar17[1] = plVar17[1] + 1;
        plVar17 = local_e38;
      }
      plVar11 = plVar10;
      if ((param_2[0xec] != 0) &&
         (*(longlong *)(param_2[0xec] + 8) = *(longlong *)(param_2[0xec] + 8) + -1,
         plVar17 = local_e38, *(longlong *)(param_2[0xec] + 8) == 0)) {
        plVar11 = (longlong *)param_2[0xec];
      }
      param_2[0xec] = (longlong)plVar17;
      if (plVar11 != (longlong *)0x0) {
        puVar2 = (undefined8 *)*plVar11;
        if (puVar2 != (undefined8 *)0x0) {
          (**(code **)*puVar2)(puVar2,1);
        }
        FUN_140156970(plVar11);
      }
    }
    *(uint *)(param_2 + 0xed) = uVar23;
    if (((longlong *)param_2[0xec] == (longlong *)0x0) ||
       (lVar22 = *(longlong *)param_2[0xec], plVar11 = (longlong *)(lVar22 + 0x40), lVar22 == 0)) {
      plVar11 = plVar10;
    }
    FUN_1401a37e0(&local_df8,plVar11);
    plVar11 = plVar10;
    if ((undefined8 *)param_2[0xec] != (undefined8 *)0x0) {
      plVar11 = *(longlong **)param_2[0xec];
    }
    plVar11 = plVar11 + 0x15;
    local_d68 = plVar11;
    FUN_140156b50(plVar11);
    local_d60 = 1;
    plVar16 = plVar10;
    if ((longlong *)param_2[0xec] != (longlong *)0x0) {
      plVar16 = *(longlong **)param_2[0xec];
    }
    FUN_1401a3ac0(plVar16);
    FUN_140156be0(plVar11);
    local_d60 = 0;
    FUN_1401a37f0();
  }
  local_d70 = 0;
  local_d6f = DAT_140320dfc;
  local_d78 = 0;
  local_d88[0] = 0;
  local_d80 = 0;
  local_d74 = 0xffffffff;
  if ((char)param_1[0x4d] == '\0') {
    local_d74 = 0;
  }
  FUN_1401544a0(local_df0);
  FUN_140153d90(local_df0);
  FUN_14004fd90(local_df0,0x2d);
  if (((longlong *)param_2[0xe8] == (longlong *)0x0) ||
     (lVar22 = *(longlong *)param_2[0xe8], plVar11 = (longlong *)(lVar22 + 0x40), lVar22 == 0)) {
    plVar11 = plVar10;
  }
  FUN_1401a37e0(local_db8,plVar11);
  local_4c = 200;
  local_50 = 0;
  local_58 = &local_cd8;
  if (local_de8 == 0) {
    uStack_e00 = local_dd8;
    if (local_de0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else {
    uStack_e00 = *(undefined4 *)(local_de8 + 0x18);
  }
  plVar11 = local_de0;
  if (local_de0 == (longlong *)0x0) {
    if (local_de8 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    plVar11 = plVar10;
    if (*(int *)(local_de8 + 0x18) != 0) {
      plVar11 = *(longlong **)(local_de8 + 0x10);
    }
  }
  local_50 = 1;
  local_e08._0_4_ = SUB84(plVar11,0);
  local_e08._4_4_ = (undefined4)((ulonglong)plVar11 >> 0x20);
  local_cd8 = (undefined4)local_e08;
  uStack_cd4 = local_e08._4_4_;
  uStack_ccc = uStack_dfc;
  local_dc8 = Proud::AddrPort::vftable;
  local_dc0 = *(undefined4 *)(param_2[0xe9] + 0x130);
  local_dbc = *(undefined2 *)(param_2[0xe9] + 0x134);
  if ((longlong *)param_2[0xe8] != (longlong *)0x0) {
    plVar10 = *(longlong **)param_2[0xe8];
  }
  local_e08 = plVar11;
  uStack_cd0 = uStack_e00;
  uVar5 = FUN_14019e480(1);
  uVar9 = (**(code **)(*param_2 + 0x10))(param_2);
  local_e40 = local_d88;
  local_e48 = (undefined ***)&local_cd8;
  FUN_1401a3cc0(plVar10,uVar9,uVar5,&local_dc8);
  if (local_58 != (undefined4 *)0x0) {
    if (local_4c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_50 = 0;
    FUN_1401a37f0(local_db8);
    local_e08 = &local_de8;
    FUN_1401560e0(&local_de8);
    plVar10 = local_e38;
    if (local_de0 != (longlong *)0x0) {
      if (local_dd4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_dd8 = 0;
    }
    if (plVar17 != (longlong *)0x0) {
      plVar17 = plVar17 + 1;
      *plVar17 = *plVar17 + -1;
      if (*plVar17 == 0) {
        puVar2 = (undefined8 *)*local_e38;
        if (puVar2 != (undefined8 *)0x0) {
          (**(code **)*puVar2)(puVar2,1);
        }
        FUN_140156970(plVar10);
      }
    }
    return 1;
  }
  FUN_140156300(local_d28,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_d28,(ThrowInfo *)&DAT_14031d928);
}



void FUN_140172910(longlong param_1,longlong param_2)

{
  int *piVar1;
  char cVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined *local_30 [2];
  undefined8 local_20;
  undefined1 local_18;
  
  uVar4 = 0xfffffffffffffffe;
  if ((((*(longlong **)(param_2 + 0x740) == (longlong *)0x0) ||
       (**(longlong **)(param_2 + 0x740) == 0)) && (*(char *)(param_2 + 0x701) == '\0')) &&
     (*(int *)(param_1 + 0x228) == 0)) {
    cVar2 = FUN_140171e30();
    if (cVar2 != '\0') {
      if (*(undefined8 **)(param_2 + 0x740) == (undefined8 *)0x0) {
        uVar3 = 0;
      }
      else {
        uVar3 = **(undefined8 **)(param_2 + 0x740);
      }
      FUN_1401a3ee0(uVar3,local_30,param_2);
      (**(code **)(*(longlong *)(param_1 + 0x4a8) + 0x140))
                ((longlong *)(param_1 + 0x4a8),*(undefined4 *)(param_2 + 0x6f8),&DAT_140328530,
                 local_30,uVar4);
      *(undefined1 *)(param_2 + 0x701) = 1;
      if (((local_30[0] != (undefined *)0x0) && (local_30[0] != PTR_DAT_140320098)) &&
         (local_30[0] + -8 != (undefined *)0x0)) {
        uVar4 = FUN_1401568c0();
        local_20 = uVar4;
        FUN_140156b50(uVar4);
        local_18 = 1;
        piVar1 = (int *)(local_30[0] + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_30[0] + -8);
        }
        FUN_140156be0(uVar4);
      }
    }
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x000140172b8d)
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140172a10(longlong param_1,double param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  void *pvVar2;
  longlong lVar3;
  longlong lVar4;
  longlong *local_res8;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  if (*(longlong *)(param_1 + 0x78) == 0) {
    lVar4 = 0;
  }
  else {
    lVar4 = *(longlong *)(param_1 + 0x68);
  }
  while( true ) {
    if (lVar4 == 0) {
      return;
    }
    if (lVar4 == 0) break;
    local_res8 = (longlong *)0x0;
    if (*(longlong *)(lVar4 + 8) != 0) {
      *(longlong *)(*(longlong *)(lVar4 + 8) + 8) = *(longlong *)(*(longlong *)(lVar4 + 8) + 8) + 1;
      local_res8 = *(longlong **)(lVar4 + 8);
    }
    if (local_res8 == (longlong *)0x0) {
      lVar3 = 0;
    }
    else {
      lVar3 = *local_res8;
    }
    if (param_2 - *(double *)(lVar3 + 400) <= _DAT_140320d00) {
      if (lVar4 != 0) {
        lVar4 = *(longlong *)(lVar4 + 0x10);
      }
    }
    else {
      if (lVar4 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      lVar3 = *(longlong *)(lVar4 + 0x10);
      FUN_14016e000(param_1 + 0x58,lVar4,0,param_4,uVar5);
      lVar4 = lVar3;
    }
    if (local_res8 != (longlong *)0x0) {
      plVar1 = local_res8 + 1;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        pvVar2 = (void *)*local_res8;
        if (pvVar2 != (void *)0x0) {
          FUN_1401858d0((longlong)pvVar2 + 0x148);
          FUN_1401858d0((longlong)pvVar2 + 0x120);
          operator_delete(pvVar2);
        }
        FUN_140156970(local_res8);
      }
    }
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



// WARNING: Removing unreachable block (ram,0x000140172c9d)
// WARNING: Removing unreachable block (ram,0x000140172c66)

longlong * FUN_140172bc0(longlong param_1,longlong *param_2,uint param_3,uint param_4,char param_5)

{
  longlong *plVar1;
  ulonglong uVar2;
  uint *puVar3;
  uint *puVar4;
  uint *puVar5;
  uint uVar6;
  longlong local_res8;
  
  puVar3 = (uint *)0x0;
  local_res8 = 0;
  uVar6 = param_4;
  if ((int)param_4 < (int)param_3) {
    uVar6 = param_3;
    param_3 = param_4;
  }
  uVar2 = (ulonglong)(param_3 << 0x10 ^ uVar6) % (ulonglong)*(uint *)(param_1 + 0x80);
  puVar5 = puVar3;
  if ((*(longlong *)(param_1 + 0x60) != 0) &&
     (puVar4 = *(uint **)(*(longlong *)(param_1 + 0x60) + uVar2 * 8), puVar4 != (uint *)0x0)) {
    while (puVar5 = puVar3, (uint)uVar2 == puVar4[8] % *(uint *)(param_1 + 0x80)) {
      if (((*puVar4 == param_3) && (puVar5 = puVar4, puVar4[1] == uVar6)) ||
         (puVar4 = *(uint **)(puVar4 + 4), puVar5 = puVar3, puVar4 == (uint *)0x0)) break;
    }
  }
  if (puVar5 == (uint *)0x0) {
    *param_2 = 0;
  }
  else {
    if (*(longlong *)(puVar5 + 2) != 0) {
      *(longlong *)(*(longlong *)(puVar5 + 2) + 8) =
           *(longlong *)(*(longlong *)(puVar5 + 2) + 8) + 1;
      local_res8 = *(longlong *)(puVar5 + 2);
    }
    if (param_5 != '\0') {
      FUN_14016e000(param_1 + 0x58,puVar5,0,puVar5,0xfffffffffffffffe);
    }
    *param_2 = 0;
    if (local_res8 != 0) {
      *(longlong *)(local_res8 + 8) = *(longlong *)(local_res8 + 8) + 1;
      if ((*param_2 != 0) &&
         (*(longlong *)(*param_2 + 8) = *(longlong *)(*param_2 + 8) + -1,
         *(longlong *)(*param_2 + 8) == 0)) {
        puVar3 = (uint *)*param_2;
      }
      *param_2 = local_res8;
      if (puVar3 != (uint *)0x0) {
        FUN_14015ebb0(puVar3);
      }
    }
    if (local_res8 != 0) {
      plVar1 = (longlong *)(local_res8 + 8);
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_14015ebb0(local_res8);
      }
    }
  }
  return param_2;
}



undefined8 FUN_140172d40(longlong param_1,int *param_2,undefined8 param_3)

{
  int *piVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  
  uVar2 = (ulonglong)(uint)(*param_2 << 0x10 ^ param_2[1]) % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (piVar1 = *(int **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (piVar1 != (int *)0x0 && ((uint)uVar2 == (uint)piVar1[8] % *(uint *)(param_1 + 0x28)));
        piVar1 = *(int **)(piVar1 + 4)) {
      if ((*piVar1 == *param_2) && (piVar1[1] == param_2[1])) {
        return 0;
      }
    }
  }
  uVar3 = FUN_140171140(param_1,param_2);
  FUN_14016b560(uVar3,param_3);
  return 1;
}



longlong * FUN_140172df0(longlong param_1,longlong *param_2)

{
  ulonglong *puVar1;
  longlong *plVar2;
  ulonglong uVar3;
  longlong lVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  
  puVar1 = (ulonglong *)*param_2;
  if (puVar1 == (ulonglong *)0x0) {
    uVar6 = 0;
  }
  else {
    uVar6 = *puVar1;
  }
  uVar6 = (uVar6 & 0xffffffff) % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (plVar2 = *(longlong **)(*(longlong *)(param_1 + 8) + uVar6 * 8);
        (plVar2 != (longlong *)0x0 &&
        ((uint)uVar6 == *(uint *)(plVar2 + 4) % *(uint *)(param_1 + 0x28)));
        plVar2 = (longlong *)plVar2[2]) {
      if ((ulonglong *)*plVar2 == (ulonglong *)0x0) {
        uVar5 = 0;
      }
      else {
        uVar5 = *(ulonglong *)*plVar2;
      }
      if (puVar1 == (ulonglong *)0x0) {
        uVar3 = 0;
      }
      else {
        uVar3 = *puVar1;
      }
      if (uVar5 == uVar3) {
        return plVar2 + 1;
      }
    }
  }
  lVar4 = FUN_1401711f0(param_1,param_2,uVar6);
  return (longlong *)(lVar4 + 8);
}



void FUN_140172ea0(longlong param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(param_1 + 0x38);
  if (lVar1 != 0) {
    FUN_14004f990(lVar1 + 0x98);
    FUN_1401617d0(lVar1 + 0x38);
    FUN_140156970(lVar1);
  }
  FUN_140156c00(param_1);
  FUN_140156970(param_1);
  return;
}



void FUN_140172f10(longlong param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(param_1 + 0x38);
  if (lVar1 != 0) {
    FUN_1401617d0(lVar1 + 0x28);
    FUN_140156970(lVar1);
  }
  FUN_140156c00(param_1);
  FUN_140156970(param_1);
  return;
}



void FUN_140172f60(longlong param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(param_1 + 0x38);
  if (lVar1 != 0) {
    FUN_1401617d0(lVar1 + 8);
    FUN_140156970(lVar1);
  }
  FUN_140156c00(param_1);
  FUN_140156970(param_1);
  return;
}



// WARNING: Removing unreachable block (ram,0x0001401730a6)
// WARNING: Removing unreachable block (ram,0x0001401730b4)

void FUN_140172fb0(ulonglong *param_1,ulonglong *param_2)

{
  longlong *plVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  uVar3 = *param_2;
  uVar4 = *param_1;
  if (uVar4 != uVar3) {
    uVar2 = uVar4;
    if (uVar3 < uVar4) {
      uVar2 = uVar3;
      uVar3 = uVar4;
    }
    if (uVar2 != 0) {
      FUN_140156b50(uVar2);
    }
    if (uVar3 != 0) {
      FUN_140156b50(uVar3);
    }
    if (*param_2 != 0) {
      plVar1 = (longlong *)(*param_2 + 0x40);
      *plVar1 = *plVar1 + 1;
    }
    uVar4 = 0;
    if (*param_1 != 0) {
      plVar1 = (longlong *)(*param_1 + 0x40);
      *plVar1 = *plVar1 + -1;
      if (*(longlong *)(*param_1 + 0x40) == 0) {
        uVar4 = *param_1;
      }
    }
    *param_1 = *param_2;
    if (uVar2 != 0) {
      FUN_140156be0(uVar2);
    }
    if (uVar3 != 0) {
      FUN_140156be0(uVar3);
    }
    if (uVar4 != 0) {
      FUN_140172f60(uVar4);
    }
  }
  return;
}



undefined8 FUN_1401730e0(longlong param_1,undefined8 param_2,undefined8 param_3,uint *param_4)

{
  int *piVar1;
  longlong lVar2;
  ulonglong uVar3;
  undefined *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  undefined8 uVar7;
  uint *puVar8;
  longlong lVar9;
  undefined *puVar10;
  double dVar11;
  longlong local_res8;
  undefined4 local_res10 [2];
  undefined *local_res20;
  
  local_res10[0] = (undefined4)param_2;
  uVar5 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))
                    (*(longlong **)(param_1 + 0x20),param_2,param_3,param_4,0xfffffffffffffffe);
  FUN_140156b50(uVar5);
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  lVar9 = *(longlong *)(param_1 + 0x20);
  uVar3 = (ulonglong)*param_4 % (ulonglong)*(uint *)(lVar9 + 0xca0);
  if ((*(longlong *)(lVar9 + 0xc80) != 0) &&
     (puVar8 = *(uint **)(*(longlong *)(lVar9 + 0xc80) + uVar3 * 8), puVar8 != (uint *)0x0)) {
    while ((uint)uVar3 == puVar8[8] % *(uint *)(lVar9 + 0xca0)) {
      if (*puVar8 == *param_4) {
        if ((*(longlong *)(puVar8 + 2) != 0) &&
           (*(longlong *)(*(longlong *)(puVar8 + 2) + 0x228) == 0)) {
          plVar6 = (longlong *)FUN_14016da80(lVar9 + 0x2d8,&local_res8,local_res10[0]);
          lVar9 = 0;
          if ((longlong *)*plVar6 != (longlong *)0x0) {
            lVar9 = *(longlong *)*plVar6;
          }
          if ((local_res8 != 0) &&
             (*(longlong *)(local_res8 + 8) = *(longlong *)(local_res8 + 8) + -1,
             *(longlong *)(local_res8 + 8) == 0)) {
            FUN_14015ebb0(local_res8);
          }
          if (lVar9 != 0) {
            lVar2 = *(longlong *)(*(longlong *)(lVar9 + 0x100) + 0x6c0);
            dVar11 = (double)lVar2;
            if (lVar2 < 0) {
              dVar11 = dVar11 + 1.8446744073709552e+19;
            }
            if (dVar11 < *(double *)(*(longlong *)(lVar9 + 0x100) + 0x1a8)) {
              lVar2 = *(longlong *)(*(longlong *)(lVar9 + 0x108) + 0x6c0);
              dVar11 = (double)lVar2;
              if (lVar2 < 0) {
                dVar11 = dVar11 + 1.8446744073709552e+19;
              }
              if (dVar11 < *(double *)(*(longlong *)(lVar9 + 0x108) + 0x1a8)) {
                FUN_140172910(*(undefined8 *)(param_1 + 0x20));
                FUN_140172910(*(undefined8 *)(param_1 + 0x20),*(undefined8 *)(lVar9 + 0x108));
                plVar6 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x4a8);
                (**(code **)(*plVar6 + 0x120))(plVar6,*param_4,&DAT_140328530,local_res10);
                plVar6 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x4a8);
                (**(code **)(*plVar6 + 0x120))(plVar6,local_res10[0],&DAT_140328530,param_4);
                *(undefined1 *)(lVar9 + 0x110) = 1;
                if (*(longlong *)(*(longlong *)(param_1 + 0x20) + 0x17f0) != 0) {
                  FUN_1401568c0();
                  local_res20 = PTR_DAT_1403200a0;
                  FUN_14004ce50(&local_res20,&DAT_14025fcc0,local_res10[0],*param_4);
                  puVar4 = local_res20;
                  puVar10 = local_res20;
                  if (local_res20 == (undefined *)0x0) {
                    puVar10 = PTR_DAT_1403200a0;
                  }
                  FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x17f0),1,puVar10);
                  if (((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_1403200a0)) &&
                     (puVar4 + -8 != (undefined *)0x0)) {
                    uVar7 = FUN_1401568c0();
                    FUN_140156b50(uVar7);
                    piVar1 = (int *)(puVar4 + -4);
                    *piVar1 = *piVar1 + -1;
                    if (*piVar1 == 0) {
                      FUN_140156970(puVar4 + -8);
                    }
                    FUN_140156be0(uVar7);
                  }
                }
              }
            }
          }
        }
        break;
      }
      puVar8 = *(uint **)(puVar8 + 4);
      if (puVar8 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar5);
  return 1;
}



undefined8 FUN_1401733c0(longlong param_1,uint param_2)

{
  int *piVar1;
  longlong lVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined *puVar5;
  undefined8 uVar6;
  longlong *plVar7;
  undefined8 uVar8;
  undefined *puVar9;
  uint *puVar10;
  undefined *puVar11;
  char local_res10 [8];
  undefined *local_80;
  undefined2 local_78;
  undefined8 local_70;
  undefined1 local_68;
  undefined8 local_60;
  undefined1 local_58;
  undefined8 local_50;
  undefined1 local_48;
  undefined *local_40;
  undefined1 local_38;
  
  uVar6 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  local_70 = uVar6;
  FUN_140156b50(uVar6);
  local_68 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  lVar2 = *(longlong *)(param_1 + 0x20);
  uVar4 = (ulonglong)param_2 % (ulonglong)*(uint *)(lVar2 + 0xca0);
  if ((*(longlong *)(lVar2 + 0xc80) != 0) &&
     (puVar10 = *(uint **)(*(longlong *)(lVar2 + 0xc80) + uVar4 * 8), puVar10 != (uint *)0x0)) {
    while ((uint)uVar4 == puVar10[8] % *(uint *)(lVar2 + 0xca0)) {
      if (*puVar10 == param_2) {
        lVar3 = *(longlong *)(puVar10 + 2);
        if ((lVar3 != 0) && (*(longlong *)(lVar3 + 0x228) == 0)) {
          local_res10[0] = FUN_140171e30(lVar2,lVar3);
          FUN_1401568c0();
          local_80 = PTR_DAT_140320098;
          if (local_res10[0] != '\0') {
            if (*(undefined8 **)(lVar3 + 0x740) == (undefined8 *)0x0) {
              uVar8 = 0;
            }
            else {
              uVar8 = **(undefined8 **)(lVar3 + 0x740);
            }
            plVar7 = (longlong *)FUN_1401a3ee0(uVar8,&local_40,lVar3);
            if (local_80 == (undefined *)0x0) {
              local_80 = PTR_DAT_140320098;
            }
            if ((undefined *)*plVar7 != local_80) {
              uVar6 = FUN_1401568c0();
              local_60 = uVar6;
              FUN_140156b50(uVar6);
              puVar5 = local_80;
              local_58 = 1;
              if (((local_80 != (undefined *)0x0) && (local_80 != PTR_DAT_140320098)) &&
                 (puVar11 = local_80 + -8, puVar11 != (undefined *)0x0)) {
                uVar8 = FUN_1401568c0();
                local_50 = uVar8;
                FUN_140156b50(uVar8);
                local_48 = 1;
                piVar1 = (int *)(puVar5 + -4);
                *piVar1 = *piVar1 + -1;
                if (*piVar1 == 0) {
                  FUN_140156970(puVar11);
                }
                FUN_140156be0(uVar8);
              }
              local_80 = (undefined *)*plVar7;
              if (((local_80 != PTR_DAT_140320098) && (local_80 != (undefined *)0x0)) &&
                 (local_80 != (undefined *)0x8)) {
                *(int *)(local_80 + -4) = *(int *)(local_80 + -4) + 1;
              }
              FUN_140156be0(uVar6);
              uVar6 = local_70;
            }
            puVar5 = local_40;
            local_78 = (undefined2)plVar7[1];
            if (((local_40 != (undefined *)0x0) && (local_40 != PTR_DAT_140320098)) &&
               (puVar11 = local_40 + -8, puVar11 != (undefined *)0x0)) {
              uVar8 = FUN_1401568c0();
              local_50 = uVar8;
              FUN_140156b50(uVar8);
              local_48 = 1;
              piVar1 = (int *)(puVar5 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(puVar11);
              }
              FUN_140156be0(uVar8);
            }
          }
          plVar7 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x4a8);
          (**(code **)(*plVar7 + 0x150))
                    (plVar7,(ulonglong)param_2,&DAT_140328530,local_res10,&local_80);
          if (local_res10[0] != '\0') {
            FUN_14016aeb0(*(undefined8 *)(param_1 + 0x20),lVar3);
          }
          puVar5 = local_80;
          if (((local_80 != (undefined *)0x0) && (local_80 != PTR_DAT_140320098)) &&
             (puVar11 = local_80 + -8, puVar11 != (undefined *)0x0)) {
            puVar9 = (undefined *)FUN_1401568c0();
            local_40 = puVar9;
            FUN_140156b50(puVar9);
            local_38 = 1;
            piVar1 = (int *)(puVar5 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(puVar11);
            }
            FUN_140156be0(puVar9);
          }
        }
        break;
      }
      puVar10 = *(uint **)(puVar10 + 4);
      if (puVar10 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar6);
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401736a0(longlong param_1,longlong *param_2,undefined ***param_3)

{
  int *piVar1;
  void *pvVar2;
  bool bVar3;
  bool bVar4;
  undefined ***pppuVar5;
  int iVar6;
  char cVar7;
  int iVar8;
  uint uVar9;
  uint uVar10;
  uint uVar11;
  undefined4 uVar12;
  uint *puVar13;
  undefined8 uVar14;
  longlong *plVar15;
  undefined4 *puVar16;
  undefined4 *puVar17;
  undefined4 *puVar18;
  uint uVar19;
  undefined *puVar20;
  undefined4 *puVar21;
  ulonglong uVar22;
  longlong lVar23;
  uint *puVar24;
  uint uVar25;
  longlong lVar26;
  double dVar27;
  undefined1 auStack_488 [32];
  undefined ***local_468;
  uint *local_458;
  undefined ***local_450;
  undefined4 *local_448;
  char *local_440;
  undefined4 *local_438;
  undefined **local_430;
  longlong *local_428;
  longlong local_420;
  ulonglong local_418;
  undefined8 local_410;
  undefined *local_408;
  undefined **local_400;
  undefined8 local_3f8;
  undefined4 *local_3f0;
  undefined8 local_3e8;
  undefined8 local_3e0;
  undefined **local_3d8;
  longlong *local_3d0;
  undefined4 *local_3c8;
  ulonglong local_3c0;
  undefined4 local_3b8;
  undefined4 local_3b4;
  undefined **local_3b0;
  undefined8 local_3a8;
  undefined4 *local_3a0;
  undefined8 local_398;
  undefined8 local_390;
  undefined **local_388;
  longlong local_380;
  undefined4 *local_378;
  undefined8 local_370;
  undefined4 local_368;
  undefined4 local_364;
  void *local_360;
  char *local_358;
  undefined **local_350;
  undefined8 local_348;
  undefined8 local_340;
  undefined8 local_338;
  undefined8 local_330;
  undefined8 local_328;
  undefined1 local_320;
  undefined8 local_318;
  undefined1 local_310;
  undefined8 local_308;
  undefined1 local_300;
  undefined8 local_2f8;
  undefined1 local_2f0;
  undefined8 local_2e8;
  longlong local_2e0;
  undefined1 local_2d8;
  exception local_2d0 [24];
  exception local_2b8 [24];
  undefined1 local_2a0 [72];
  undefined1 local_258 [72];
  undefined1 local_210 [72];
  undefined1 local_1c8 [72];
  undefined1 local_180 [24];
  undefined1 *local_168;
  undefined1 local_160 [136];
  undefined1 *local_d8;
  undefined1 local_d0 [136];
  ulonglong local_48;
  
  local_2e8 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_488;
  local_2e0 = param_1 + 0xb8;
  local_450 = param_3;
  FUN_140156b50(local_2e0);
  local_2d8 = 1;
  if ((*(longlong **)(param_1 + 0x6a0) != (longlong *)0x0) &&
     (**(longlong **)(param_1 + 0x6a0) != 0)) goto LAB_1401744d1;
  iVar8 = *(int *)((longlong)param_2 + 0x54);
  if (iVar8 == 0) {
    iVar8 = FUN_140157f20();
    *(int *)((longlong)param_2 + 0x54) = iVar8;
  }
  if (iVar8 < 0) {
    FUN_140156300(local_210,L"Invalid thread count");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_210,(ThrowInfo *)&DAT_14031d928);
  }
  bVar4 = false;
  bVar3 = false;
  puVar17 = (undefined4 *)0x0;
  uVar11 = 0;
  puVar18 = puVar17;
  puVar16 = puVar17;
  if (0 < (int)param_2[6]) {
    do {
      if (((longlong)puVar18 < 0) || ((int)param_2[6] <= (int)puVar16)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      if (*(int *)(param_2[5] + (longlong)puVar18 * 4) == 0) {
        bVar3 = true;
      }
      else {
        bVar4 = true;
      }
      uVar19 = (int)puVar16 + 1;
      puVar16 = (undefined4 *)(ulonglong)uVar19;
      puVar18 = (undefined4 *)((longlong)puVar18 + 1);
    } while ((int)uVar19 < (int)param_2[6]);
    if ((bVar3) && (bVar4)) {
      FUN_140156300(local_258,
                    L"Cannot assign non-zero UDP port number with zero UDP port number! All non-zero or all zero must be guaranteed!"
                   );
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_258,(ThrowInfo *)&DAT_14031d928);
    }
  }
  iVar8 = *(int *)((longlong)param_2 + 0x5c);
  if (((iVar8 != 0x80) && (iVar8 != 0xc0)) && (iVar8 != 0x100)) {
    FUN_140156300(local_1c8,L"Invalid key length!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_1c8,(ThrowInfo *)&DAT_14031d928);
  }
  local_3d8 = Proud::CFastArray<int,0>::vftable;
  if (DAT_140320e08 != 5) {
    FUN_1401838a0();
  }
  local_3d0 = (longlong *)param_2[4];
  local_3b4 = *(undefined4 *)((longlong)param_2 + 0x3c);
  local_3c8 = (undefined4 *)0x0;
  local_3c0 = 0;
  local_3b8 = 0;
  iVar8 = (int)param_2[6];
  lVar26 = (longlong)iVar8;
  if (iVar8 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_14013c2c0(&local_3d8,iVar8);
  puVar18 = local_3c8;
  iVar6 = (int)local_3c0;
  puVar16 = local_3c8;
  if ((int)local_3c0 == 0) {
    puVar16 = puVar17;
  }
  puVar21 = puVar17;
  if ((int)param_2[6] != 0) {
    puVar21 = (undefined4 *)param_2[5];
  }
  if (0 < iVar8) {
    lVar23 = (longlong)puVar21 - (longlong)puVar16;
    do {
      *puVar16 = *(undefined4 *)(lVar23 + (longlong)puVar16);
      puVar16 = puVar16 + 1;
      lVar26 = lVar26 + -1;
    } while (lVar26 != 0);
  }
  puVar16 = local_3c8;
  if ((int)local_3c0 == 0) {
    puVar16 = puVar17;
  }
  FUN_14016e380(puVar16,local_3c0 & 0xffffffff,0);
  puVar16 = puVar17;
  puVar21 = puVar17;
  if (0 < iVar6 + -1) {
    do {
      if (((longlong)puVar16 < 0) || (iVar6 <= (int)puVar21)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      if ((longlong)puVar16 + 1 < 0) {
LAB_14017391c:
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      uVar19 = (int)puVar21 + 1;
      puVar21 = (undefined4 *)(ulonglong)uVar19;
      if (iVar6 <= (int)uVar19) goto LAB_14017391c;
      if ((puVar18[(longlong)puVar16] == puVar18[(longlong)puVar16 + 1]) &&
         (puVar18[(longlong)puVar16] != 0)) {
        FUN_140156300(local_2a0,L"Cannot add duplicated UDP port number!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_2a0,(ThrowInfo *)&DAT_14031d928);
      }
      puVar16 = (undefined4 *)((longlong)puVar16 + 1);
    } while ((int)uVar19 < iVar6 + -1);
  }
  local_430 = Proud::CFastArray<>::vftable;
  local_428 = (longlong *)0x0;
  local_420 = 0;
  local_418 = 0;
  local_410 = 0;
  FUN_14015a130(&local_430);
  if ((1 < (int)local_418) &&
     (((puVar20 = (undefined *)param_2[1], puVar20 == (undefined *)0x0 ||
       (puVar20 == PTR_DAT_1403200a0)) || (*(int *)(puVar20 + -8) == 0)))) {
    FUN_1401568c0();
    local_458 = (uint *)PTR_DAT_1403200a0;
    uVar19 = FUN_140156740(
                          L"Server has multiple network devices, however, no device is specified for listening. Is it your intention?"
                          );
    puVar16 = puVar17;
    if ((local_458 != (uint *)0x0) &&
       (puVar16 = (undefined4 *)0x0, local_458 != (uint *)PTR_DAT_1403200a0)) {
      puVar16 = (undefined4 *)(ulonglong)local_458[-2];
    }
    uVar9 = uVar19;
    if ((((int)uVar19 <= (int)puVar16) && (uVar9 = uVar11, local_458 != (uint *)0x0)) &&
       (local_458 != (uint *)PTR_DAT_1403200a0)) {
      uVar9 = local_458[-2];
    }
    uVar25 = 1;
    if (1 < (int)uVar9) {
      uVar25 = uVar9;
    }
    uVar10 = 0;
    uVar9 = uVar10;
    if ((local_458 != (uint *)0x0) && (local_458 != (uint *)PTR_DAT_1403200a0)) {
      uVar9 = local_458[-2];
    }
    if ((int)uVar9 < (int)uVar25) {
      if (local_458 == (uint *)0x0) {
        local_458 = (uint *)PTR_DAT_1403200a0;
      }
      if ((int)uVar25 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (uVar25 == 0) {
        FUN_14004f990(&local_458);
      }
      else {
        uVar9 = uVar10;
        if ((local_458 != (uint *)0x0) && (local_458 != (uint *)PTR_DAT_1403200a0)) {
          uVar9 = local_458[-2];
        }
        if (uVar25 != uVar9) {
          puVar13 = (uint *)FUN_140156940((longlong)(int)uVar25 * 2 + 10);
          if (puVar13 != (uint *)0x0) {
            *puVar13 = 0;
            puVar13[1] = 1;
          }
          *puVar13 = uVar25;
          uVar9 = uVar10;
          if ((local_458 != (uint *)0x0) && (local_458 != (uint *)PTR_DAT_1403200a0)) {
            uVar9 = local_458[-2];
          }
          puVar24 = (uint *)PTR_DAT_1403200a0;
          if ((int)uVar25 < (int)uVar9) {
LAB_140173a81:
            if (local_458 != (uint *)0x0) {
              puVar24 = local_458;
            }
          }
          else {
            uVar25 = uVar11;
            if (local_458 != (uint *)0x0) {
              if (local_458 != (uint *)PTR_DAT_1403200a0) {
                uVar25 = local_458[-2];
              }
              goto LAB_140173a81;
            }
          }
          FUN_140156770(puVar13 + 2,puVar24,uVar25);
          FUN_14004f990(&local_458);
          local_458 = puVar13 + 2;
        }
      }
    }
    FUN_14004f670(&local_458);
    puVar13 = local_458;
    if (local_458 == (uint *)0x0) {
      puVar13 = (uint *)PTR_DAT_1403200a0;
    }
    FUN_140156770(puVar13,
                  L"Server has multiple network devices, however, no device is specified for listening. Is it your intention?"
                  ,uVar19);
    puVar13 = local_458;
    if (local_458 == (uint *)0x0) {
      puVar13 = (uint *)PTR_DAT_1403200a0;
    }
    uVar19 = FUN_140156740(puVar13);
    uVar11 = 0;
    if (0 < (int)uVar19) {
      uVar11 = uVar19;
    }
    uVar19 = uVar10;
    if ((local_458 != (uint *)0x0) && (local_458 != (uint *)PTR_DAT_1403200a0)) {
      uVar19 = local_458[-2];
    }
    if (((int)uVar11 < (int)uVar19) || (uVar11 = uVar10, local_458 == (uint *)0x0)) {
LAB_140173b24:
      if (((local_458 != (uint *)PTR_DAT_1403200a0) && (local_458 != (uint *)0x0)) &&
         (local_458 + -2 != (uint *)0x0)) {
        local_458[-2] = uVar11;
        *(undefined2 *)((longlong)local_458 + (longlong)(int)uVar11 * 2) = 0;
      }
    }
    else if (local_458 != (uint *)PTR_DAT_1403200a0) {
      uVar11 = local_458[-2];
      goto LAB_140173b24;
    }
    local_348 = 0;
    local_340 = 0;
    local_338 = 0;
    local_330 = 0;
    local_350 = Proud::ByteArray::vftable;
    local_468 = &local_350;
    uVar14 = FUN_140181f50(&local_360,1,0,&local_458);
    FUN_14016fc90(param_1 + -0xa8,uVar14);
    FUN_1401858d0(&local_350);
    puVar13 = local_458;
    if (((local_458 != (uint *)0x0) && (local_458 != (uint *)PTR_DAT_1403200a0)) &&
       (puVar24 = local_458 + -2, puVar24 != (uint *)0x0)) {
      uVar14 = FUN_1401568c0();
      local_2f8 = uVar14;
      FUN_140156b50(uVar14);
      local_2f0 = 1;
      puVar13 = puVar13 + -1;
      *puVar13 = *puVar13 - 1;
      if (*puVar13 == 0) {
        FUN_140156970(puVar24);
      }
      FUN_140156be0(uVar14);
      local_2f0 = 0;
    }
    local_458 = (uint *)PTR_DAT_1403200a0;
    FUN_1401568c0();
    local_438 = (undefined4 *)PTR_DAT_1403200a0;
    plVar15 = (longlong *)FUN_140158700(&local_408);
    puVar20 = (undefined *)*plVar15;
    if ((undefined *)*plVar15 == (undefined *)0x0) {
      puVar20 = PTR_DAT_1403200a0;
    }
    FUN_14004ce50(&local_438,L"No NIC binding though multiple NIC detected##Process=%s",puVar20);
    if (((local_408 != (undefined *)0x0) && (local_408 != PTR_DAT_1403200a0)) &&
       (local_408 + -8 != (undefined *)0x0)) {
      uVar14 = FUN_1401568c0();
      local_318 = uVar14;
      FUN_140156b50(uVar14);
      local_310 = 1;
      piVar1 = (int *)(local_408 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_408 + -8);
      }
      FUN_140156be0(uVar14);
      local_310 = 0;
    }
    local_408 = PTR_DAT_1403200a0;
    FUN_1401568c0();
    puVar16 = local_438;
    local_448 = (undefined4 *)PTR_DAT_1403200a0;
    if (PTR_DAT_1403200a0 == (undefined *)0x0) {
      local_448 = puVar17;
    }
    if (local_438 != (undefined4 *)PTR_DAT_1403200a0) {
      uVar14 = FUN_1401568c0();
      local_308 = uVar14;
      FUN_140156b50(uVar14);
      local_300 = 1;
      FUN_14004f990(&local_448);
      local_448 = puVar16;
      if (((puVar16 != (undefined4 *)PTR_DAT_1403200a0) && (puVar16 != (undefined4 *)0x0)) &&
         (puVar16 != (undefined4 *)0x8)) {
        puVar16[-1] = puVar16[-1] + 1;
      }
      FUN_140156be0(uVar14);
      local_300 = 0;
    }
    FUN_1401a7000(&local_448);
    if (((puVar16 != (undefined4 *)0x0) && (puVar16 != (undefined4 *)PTR_DAT_1403200a0)) &&
       (puVar16 + -2 != (undefined4 *)0x0)) {
      uVar14 = FUN_1401568c0();
      local_328 = uVar14;
      FUN_140156b50(uVar14);
      local_320 = 1;
      piVar1 = puVar16 + -1;
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar16 + -2);
      }
      FUN_140156be0(uVar14);
      local_320 = 0;
    }
    local_438 = (undefined4 *)PTR_DAT_1403200a0;
  }
  dVar27 = (double)param_2[0x16];
  if ((double)param_2[0x16] <= 0.0) {
    dVar27 = DAT_140320dd0;
  }
  *(double *)(param_1 + 0x778) = dVar27;
  *(undefined1 *)(param_1 + 0x1a4) = *(undefined1 *)((longlong)param_2 + 0x65);
  *(undefined1 *)(param_1 + 0x1a5) = *(undefined1 *)((longlong)param_2 + 100);
  *(undefined1 *)(param_1 + 0x1a6) = *(undefined1 *)((longlong)param_2 + 0x67);
  *(char *)(param_1 + 0x198) = (char)param_2[0xf];
  *(char *)(param_1 + 0x1c0) = (char)param_2[0xd];
  iVar8 = *(int *)((longlong)param_2 + 0x5c);
  *(int *)(param_1 + 0x19c) = iVar8;
  if (((iVar8 != 0x80) && (iVar8 != 0xc0)) && (iVar8 != 0x100)) {
    local_358 = 
    "CStartServerParameter::m_encryptedMessageKeyLength Incorrect key length, only 128,192,256";
    std::exception::exception(local_2d0,&local_358);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_2d0,(ThrowInfo *)&DAT_14031d7e0);
  }
  iVar8 = (int)param_2[0xc];
  *(int *)(param_1 + 0x1a0) = iVar8;
  if ((((iVar8 != 0) && (iVar8 != 0x200)) && (iVar8 != 0x400)) && (iVar8 != 0x800)) {
    local_440 = 
    "CStartServerParameter::m_fastEncryptedMessageKeyLength Incorrect key lengt, MaxSize is 2048, MinSize is 8"
    ;
    std::exception::exception(local_2b8,&local_440);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_2b8,(ThrowInfo *)&DAT_14031d7e0);
  }
  *(int *)(param_1 + 0x1a8) = (int)param_2[0x10];
  *(undefined1 *)(param_1 + 0x1ac) = *(undefined1 *)((longlong)param_2 + 0x84);
  *(undefined1 *)(param_1 + 0x1ad) = *(undefined1 *)((longlong)param_2 + 0x85);
  FUN_1401aa4a0(param_1 + 0xba0,param_1 + 0xba8);
  local_3a8 = 0;
  local_3a0 = (undefined4 *)0x0;
  local_398 = 0;
  local_390 = 0;
  local_3b0 = Proud::ByteArray::vftable;
  FUN_1401aa370(&local_3b0,*(undefined4 *)(param_1 + 0x19c));
  puVar16 = local_3a0;
  if ((int)local_398 == 0) {
    puVar16 = puVar17;
  }
  FUN_140198270(param_1 + 0x798,puVar16,*(uint *)(param_1 + 0x19c) >> 3,0x10);
  local_3f8 = 0;
  local_3f0 = (undefined4 *)0x0;
  local_3e8 = 0;
  local_3e0 = 0;
  local_400 = Proud::ByteArray::vftable;
  FUN_1401aa370(&local_400,*(undefined4 *)(param_1 + 0x1a0));
  puVar16 = local_3f0;
  if ((int)local_3e8 == 0) {
    puVar16 = puVar17;
  }
  FUN_1401a9a60(param_1 + 0xb68,puVar16,*(uint *)(param_1 + 0x1a0) >> 3);
  *(undefined4 *)(param_1 + 0xb98) = 0;
  local_440 = operator_new(0xa8);
  puVar16 = puVar17;
  if (local_440 != (char *)0x0) {
    puVar16 = (undefined4 *)(param_1 + -0x40);
    if (param_1 == 0xa8) {
      puVar16 = puVar17;
    }
    puVar16 = (undefined4 *)FUN_14018c020(local_440,puVar16,1);
  }
  *(undefined4 **)(param_1 + 0x6e0) = puVar16;
  local_440 = operator_new(0xa8);
  puVar16 = puVar17;
  if (local_440 != (char *)0x0) {
    puVar16 = (undefined4 *)(param_1 + -0x40);
    if (param_1 == 0xa8) {
      puVar16 = puVar17;
    }
    puVar16 = (undefined4 *)FUN_14018c020(local_440,puVar16,1);
  }
  *(undefined4 **)(param_1 + 0x6e8) = puVar16;
  FUN_14018ae50(param_1 + 0x6b8);
  uVar14 = FUN_14018aee0(param_1 + 0x6b8);
  *(undefined8 *)(param_1 + 0x158) = uVar14;
  *(undefined8 *)(param_1 + 0x118) = 0;
  puVar16 = (undefined4 *)FUN_140182810(local_180);
  *(undefined4 *)(param_1 + 0x1c4) = *puVar16;
  *(undefined4 *)(param_1 + 0x1c8) = puVar16[1];
  *(undefined4 *)(param_1 + 0x1cc) = puVar16[2];
  *(undefined4 *)(param_1 + 0x1d0) = puVar16[3];
  *(int *)(param_1 + 0x179c) = (int)param_2[8];
  *(undefined4 *)(param_1 + 0x340) = *(undefined4 *)((longlong)param_2 + 0x44);
  *(int *)(param_1 + 0x344) = (int)param_2[9];
  *(undefined4 *)(param_1 + 0x348) = *(undefined4 *)((longlong)param_2 + 0x4c);
  *(int *)(param_1 + 0x34c) = (int)param_2[10];
  puVar20 = (undefined *)*param_2;
  if ((undefined *)*param_2 == (undefined *)0x0) {
    puVar20 = PTR_DAT_1403200a0;
  }
  local_168 = local_160;
  FUN_140153e40(&local_168,puVar20,3);
  FUN_140155010(param_1 + 0x168,local_168);
  if (local_168 != local_160) {
    free(local_168);
  }
  puVar20 = (undefined *)param_2[1];
  if ((undefined *)param_2[1] == (undefined *)0x0) {
    puVar20 = PTR_DAT_1403200a0;
  }
  local_d8 = local_d0;
  FUN_140153e40(&local_d8,puVar20,3);
  FUN_140155010(param_1 + 0x170,local_d8);
  if (local_d8 != local_d0) {
    free(local_d8);
  }
  *(undefined4 *)(param_1 + 0x1b0) = *(undefined4 *)((longlong)param_2 + 0x6c);
  *(longlong *)(param_1 + 0x1b8) = param_2[0xe];
  local_388 = Proud::CFastArray<int,0>::vftable;
  if (DAT_140320e08 != 5) {
    FUN_1401838a0();
  }
  local_380 = param_2[4];
  local_364 = *(undefined4 *)((longlong)param_2 + 0x3c);
  local_378 = (undefined4 *)0x0;
  local_370 = 0;
  local_368 = 0;
  iVar8 = (int)param_2[6];
  lVar26 = (longlong)iVar8;
  if (iVar8 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_14013c2c0(&local_388,iVar8);
  pppuVar5 = local_450;
  puVar16 = local_378;
  if ((int)local_370 == 0) {
    puVar16 = puVar17;
  }
  puVar21 = puVar17;
  if ((int)param_2[6] != 0) {
    puVar21 = (undefined4 *)param_2[5];
  }
  if (0 < iVar8) {
    lVar23 = (longlong)puVar21 - (longlong)puVar16;
    do {
      *puVar16 = *(undefined4 *)(lVar23 + (longlong)puVar16);
      puVar16 = puVar16 + 1;
      lVar26 = lVar26 + -1;
    } while (lVar26 != 0);
  }
  local_468 = local_450;
  cVar7 = FUN_1401712e0(param_1 + -0xa8,(int)param_2[8],&local_388,param_2 + 0x11);
  if ((cVar7 != '\0') &&
     (cVar7 = FUN_1401709d0(param_1 + -0xa8,(int)param_2[2],pppuVar5), cVar7 != '\0')) {
    puVar16 = puVar17;
    if (*(int *)((longlong)param_2 + 0x7c) == 0) {
      local_450 = operator_new(0x10);
      if (local_450 != (void *)0x0) {
        puVar16 = (undefined4 *)FUN_1401a8b40(local_450);
      }
    }
    else {
      local_450 = operator_new(0x90);
      if (local_450 != (void *)0x0) {
        puVar16 = (undefined4 *)FUN_1401a92f0(local_450,DAT_140320dd8);
      }
    }
    *(undefined4 **)(param_1 + 0x3d0) = puVar16;
    *(undefined4 *)(param_1 + 0x175c) = 0;
    FUN_14004ce80(param_1 + 0x1760,&DAT_140288b80);
    *(undefined8 *)(param_1 + 0x1768) = 0;
    *(undefined4 *)(param_1 + 0x1798) = 0;
    uVar11 = *(uint *)(param_2 + 0xb);
    iVar8 = FUN_140157f20();
    if (iVar8 <= (int)uVar11) {
      uVar11 = FUN_140157f20();
    }
    puVar16 = puVar17;
    if (0 < (int)uVar11) {
      puVar16 = (undefined4 *)(ulonglong)uVar11;
    }
    *(int *)(param_2 + 0xb) = (int)puVar16;
    if ((int)puVar16 == 0) {
      uVar12 = FUN_140157f20();
      *(undefined4 *)(param_2 + 0xb) = uVar12;
    }
    local_360 = operator_new(0x280);
    if (local_360 != (void *)0x0) {
      puVar17 = (undefined4 *)FUN_140191b20(local_360,param_1 + -0xa8);
    }
    *(undefined4 **)(param_1 + 0x338) = puVar17;
    FUN_140195be0(puVar17,*(undefined4 *)((longlong)param_2 + 0x54),(int)param_2[0xb]);
    Sleep(100);
    FUN_1401858d0(&local_400);
    FUN_1401858d0(&local_3b0);
    local_430 = Proud::CFastArray<>::vftable;
    if (0 < (int)local_418) {
      uVar22 = local_418 & 0xffffffff;
      lVar26 = local_420;
      do {
        FUN_140050520(lVar26);
        lVar26 = lVar26 + 8;
        uVar22 = uVar22 - 1;
      } while (uVar22 != 0);
    }
    if (local_420 != 0) {
      if (local_428 == (longlong *)0x0) {
        FUN_140156970();
      }
      else {
        (**(code **)(*local_428 + 0x18))(local_428,local_420);
      }
    }
    if (puVar18 != (undefined4 *)0x0) {
      if (local_3d0 == (longlong *)0x0) {
        FUN_140156970(puVar18);
      }
      else {
        (**(code **)(*local_3d0 + 0x18))(local_3d0,puVar18);
      }
    }
    FUN_140156be0(param_1 + 0xb8);
    return 1;
  }
  FUN_14018aea0(param_1 + 0x6b8);
  pvVar2 = *(void **)(param_1 + 0x6e0);
  if (pvVar2 != (void *)0x0) {
    FUN_14018c200(pvVar2);
    operator_delete(pvVar2);
  }
  *(undefined8 *)(param_1 + 0x6e0) = 0;
  pvVar2 = *(void **)(param_1 + 0x6e8);
  if (pvVar2 != (void *)0x0) {
    FUN_14018c200(pvVar2);
    operator_delete(pvVar2);
  }
  *(undefined8 *)(param_1 + 0x6e8) = 0;
  *(undefined4 *)(param_1 + 0x1c4) = 0;
  *(undefined4 *)(param_1 + 0x1c8) = 0;
  *(undefined4 *)(param_1 + 0x1cc) = 0;
  *(undefined4 *)(param_1 + 0x1d0) = 0;
  FUN_1401858d0(&local_400);
  FUN_1401858d0(&local_3b0);
  local_430 = Proud::CFastArray<>::vftable;
  if (0 < (int)local_418) {
    uVar22 = local_418 & 0xffffffff;
    lVar26 = local_420;
    do {
      FUN_140050520(lVar26);
      lVar26 = lVar26 + 8;
      uVar22 = uVar22 - 1;
    } while (uVar22 != 0);
  }
  if (local_420 != 0) {
    if (local_428 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*local_428 + 0x18))(local_428,local_420);
    }
  }
  if (puVar18 != (undefined4 *)0x0) {
    if (local_3d0 == (longlong *)0x0) {
      FUN_140156970(puVar18);
    }
    else {
      (**(code **)(*local_3d0 + 0x18))(local_3d0,puVar18);
    }
  }
LAB_1401744d1:
  FUN_140156be0(param_1 + 0xb8);
  return 0;
}



void FUN_140174510(undefined8 param_1,longlong param_2,longlong param_3,longlong *param_4)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  int local_res10;
  int local_res14;
  longlong *local_res20;
  
  local_res10 = *(int *)(param_2 + 0x6f8);
  iVar1 = *(int *)(param_3 + 0x6f8);
  lVar4 = param_2;
  local_res14 = iVar1;
  if (iVar1 < local_res10) {
    lVar4 = param_3;
    param_3 = param_2;
    local_res14 = local_res10;
    local_res10 = iVar1;
  }
  lVar2 = 0;
  lVar3 = lVar2;
  if ((longlong *)*param_4 != (longlong *)0x0) {
    lVar3 = *(longlong *)*param_4;
  }
  *(longlong *)(lVar3 + 0x100) = lVar4;
  if ((longlong *)*param_4 != (longlong *)0x0) {
    lVar2 = *(longlong *)*param_4;
  }
  *(longlong *)(lVar2 + 0x108) = param_3;
  local_res20 = param_4;
  FUN_140172d40(param_1,&local_res10,param_4,local_res10,0xfffffffffffffffe);
  if ((*param_4 != 0) &&
     (*(longlong *)(*param_4 + 8) = *(longlong *)(*param_4 + 8) + -1,
     *(longlong *)(*param_4 + 8) == 0)) {
    FUN_14015ebb0(*param_4);
  }
  return;
}



void FUN_1401745d0(longlong param_1,longlong param_2,longlong param_3,longlong *param_4)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  int local_res8;
  int local_resc;
  longlong *local_res20;
  
  local_res8 = *(int *)(param_2 + 0x6f8);
  iVar1 = *(int *)(param_3 + 0x6f8);
  lVar4 = param_2;
  local_resc = iVar1;
  if (iVar1 < local_res8) {
    lVar4 = param_3;
    param_3 = param_2;
    local_resc = local_res8;
    local_res8 = iVar1;
  }
  lVar2 = 0;
  lVar3 = lVar2;
  if ((longlong *)*param_4 != (longlong *)0x0) {
    lVar3 = *(longlong *)*param_4;
  }
  *(longlong *)(lVar3 + 0x100) = lVar4;
  if ((longlong *)*param_4 != (longlong *)0x0) {
    lVar2 = *(longlong *)*param_4;
  }
  *(longlong *)(lVar2 + 0x108) = param_3;
  local_res20 = param_4;
  FUN_140172d40(param_1 + 0x58,&local_res8,param_4,local_res8,0xfffffffffffffffe);
  if ((*param_4 != 0) &&
     (*(longlong *)(*param_4 + 8) = *(longlong *)(*param_4 + 8) + -1,
     *(longlong *)(*param_4 + 8) == 0)) {
    FUN_14015ebb0(*param_4);
  }
  return;
}



void FUN_140174690(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  if (lVar1 != 0) {
    FUN_140156b50(lVar1);
    *(longlong *)(*param_1 + 0x40) = *(longlong *)(*param_1 + 0x40) + -1;
    if (*(longlong *)(*param_1 + 0x40) == 0) {
      FUN_140156be0(lVar1);
      FUN_140172ea0(*param_1);
    }
    else {
      FUN_140156be0(lVar1);
    }
  }
  return;
}



void FUN_140174710(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  if (lVar1 != 0) {
    FUN_140156b50(lVar1);
    *(longlong *)(*param_1 + 0x40) = *(longlong *)(*param_1 + 0x40) + -1;
    if (*(longlong *)(*param_1 + 0x40) == 0) {
      FUN_140156be0(lVar1);
      FUN_140172f10(*param_1);
    }
    else {
      FUN_140156be0(lVar1);
    }
  }
  return;
}



void FUN_140174790(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  if (lVar1 != 0) {
    FUN_140156b50(lVar1);
    *(longlong *)(*param_1 + 0x40) = *(longlong *)(*param_1 + 0x40) + -1;
    if (*(longlong *)(*param_1 + 0x40) == 0) {
      FUN_140156be0(lVar1);
      FUN_140172f60(*param_1);
    }
    else {
      FUN_140156be0(lVar1);
    }
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x000140174906)
// WARNING: Removing unreachable block (ram,0x000140174914)

void FUN_140174810(ulonglong *param_1,ulonglong *param_2)

{
  longlong *plVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  uVar3 = *param_2;
  uVar4 = *param_1;
  if (uVar4 != uVar3) {
    uVar2 = uVar4;
    if (uVar3 < uVar4) {
      uVar2 = uVar3;
      uVar3 = uVar4;
    }
    if (uVar2 != 0) {
      FUN_140156b50(uVar2);
    }
    if (uVar3 != 0) {
      FUN_140156b50(uVar3);
    }
    if (*param_2 != 0) {
      plVar1 = (longlong *)(*param_2 + 0x40);
      *plVar1 = *plVar1 + 1;
    }
    uVar4 = 0;
    if (*param_1 != 0) {
      plVar1 = (longlong *)(*param_1 + 0x40);
      *plVar1 = *plVar1 + -1;
      if (*(longlong *)(*param_1 + 0x40) == 0) {
        uVar4 = *param_1;
      }
    }
    *param_1 = *param_2;
    if (uVar2 != 0) {
      FUN_140156be0(uVar2);
    }
    if (uVar3 != 0) {
      FUN_140156be0(uVar3);
    }
    if (uVar4 != 0) {
      FUN_140172ea0(uVar4);
    }
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x000140174a36)
// WARNING: Removing unreachable block (ram,0x000140174a44)

void FUN_140174940(ulonglong *param_1,ulonglong *param_2)

{
  longlong *plVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  uVar3 = *param_2;
  uVar4 = *param_1;
  if (uVar4 != uVar3) {
    uVar2 = uVar4;
    if (uVar3 < uVar4) {
      uVar2 = uVar3;
      uVar3 = uVar4;
    }
    if (uVar2 != 0) {
      FUN_140156b50(uVar2);
    }
    if (uVar3 != 0) {
      FUN_140156b50(uVar3);
    }
    if (*param_2 != 0) {
      plVar1 = (longlong *)(*param_2 + 0x40);
      *plVar1 = *plVar1 + 1;
    }
    uVar4 = 0;
    if (*param_1 != 0) {
      plVar1 = (longlong *)(*param_1 + 0x40);
      *plVar1 = *plVar1 + -1;
      if (*(longlong *)(*param_1 + 0x40) == 0) {
        uVar4 = *param_1;
      }
    }
    *param_1 = *param_2;
    if (uVar2 != 0) {
      FUN_140156be0(uVar2);
    }
    if (uVar3 != 0) {
      FUN_140156be0(uVar3);
    }
    if (uVar4 != 0) {
      FUN_140172f10(uVar4);
    }
  }
  return;
}



longlong FUN_140174a70(longlong param_1)

{
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x30) = 0;
  *(undefined8 *)(param_1 + 0x38) = 0;
  *(undefined8 *)(param_1 + 0x40) = 0;
  *(undefined8 *)(param_1 + 0x48) = 0;
  *(undefined ***)(param_1 + 0x28) = Proud::ByteArray::vftable;
  *(undefined8 *)(param_1 + 0x60) = 0;
  *(undefined8 *)(param_1 + 0x58) = 0;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined8 *)(param_1 + 0x80) = 0;
  *(undefined8 *)(param_1 + 0x88) = 0;
  *(undefined8 *)(param_1 + 0x90) = 0;
  *(undefined8 *)(param_1 + 0x98) = 0;
  *(undefined ***)(param_1 + 0x78) = Proud::ByteArray::vftable;
  *(undefined ***)(param_1 + 0xa8) = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0xb0) = 0;
  *(undefined2 *)(param_1 + 0xb4) = 0;
  *(undefined8 *)(param_1 + 200) = 0;
  *(undefined8 *)(param_1 + 0xd0) = 0;
  *(undefined8 *)(param_1 + 0xd8) = 0;
  *(undefined8 *)(param_1 + 0xe0) = 0;
  *(undefined ***)(param_1 + 0xc0) = Proud::ByteArray::vftable;
  return param_1;
}



void FUN_140174b20(longlong param_1)

{
  FUN_1401858d0(param_1 + 0xc0);
  FUN_1401858d0(param_1 + 0x78);
  FUN_1401560e0(param_1 + 0x50);
  if (*(longlong *)(param_1 + 0x58) != 0) {
    if (*(int *)(param_1 + 100) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_1 + 0x60) = 0;
  }
  FUN_1401858d0(param_1 + 0x28);
  FUN_140174710(param_1 + 0x20);
  FUN_140174690(param_1 + 0x18);
  FUN_14013c530(param_1 + 8);
  return;
}



undefined4 * FUN_140174bb0(undefined4 *param_1,undefined8 param_2,undefined4 param_3,char param_4)

{
  longlong lVar1;
  int iVar2;
  int iVar3;
  void *pvVar4;
  undefined1 local_50 [72];
  
  FUN_1401544d0(param_1 + 2);
  FUN_140174a70(param_1 + 0xc);
  if (param_4 != '\0') {
    if (*(longlong *)(param_1 + 4) == 0) {
      if (*(longlong *)(param_1 + 6) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      iVar2 = param_1[8];
    }
    else {
      iVar2 = *(int *)(*(longlong *)(param_1 + 4) + 0x18);
    }
    if (1 < iVar2) {
      if (*(longlong *)(param_1 + 6) == 0) {
        lVar1 = *(longlong *)(param_1 + 4);
        if (lVar1 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        iVar2 = *(int *)(lVar1 + 0x18);
        iVar3 = 1;
        if (iVar2 < 2) {
          iVar3 = iVar2;
        }
        if (0 < iVar2 - iVar3) {
          pvVar4 = (void *)0x0;
          if (iVar2 != 0) {
            pvVar4 = *(void **)(lVar1 + 0x10);
          }
          memmove(pvVar4,(void *)((longlong)iVar3 + (longlong)pvVar4),(longlong)(iVar2 - iVar3));
        }
        FUN_140050060(lVar1,*(int *)(lVar1 + 0x18) - iVar3);
      }
      else {
        pvVar4 = *(void **)(param_1 + 6);
        if (pvVar4 == (void *)0x0) {
          FUN_140156300(local_50,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
        }
        iVar2 = param_1[8];
        iVar3 = 1;
        if (iVar2 < 2) {
          iVar3 = iVar2;
        }
        memmove(pvVar4,(void *)((longlong)iVar3 + (longlong)pvVar4),(longlong)(iVar2 - iVar3));
        if (*(longlong *)(param_1 + 6) == 0) {
          FUN_140156300(local_50,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
        }
        iVar3 = param_1[8] - iVar3;
        if ((iVar3 < 0) || ((int)param_1[9] < iVar3)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        param_1[8] = iVar3;
      }
    }
  }
  *param_1 = param_3;
  return param_1;
}



void FUN_140174d30(longlong param_1)

{
  FUN_140174b20(param_1 + 0x30);
  FUN_1401560e0(param_1 + 0x10);
  if (*(longlong *)(param_1 + 0x18) != 0) {
    if (*(int *)(param_1 + 0x24) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_1 + 0x20) = 0;
  }
  return;
}



undefined8 * FUN_140174d90(longlong param_1,undefined8 *param_2,uint param_3)

{
  uint *puVar1;
  ulonglong uVar2;
  
  *param_2 = 0;
  uVar2 = (ulonglong)param_3 % (ulonglong)*(uint *)(param_1 + 0x428);
  if (*(longlong *)(param_1 + 0x408) != 0) {
    puVar1 = *(uint **)(*(longlong *)(param_1 + 0x408) + uVar2 * 8);
    while( true ) {
      if (puVar1 == (uint *)0x0) {
        return param_2;
      }
      if ((uint)uVar2 != puVar1[8] % *(uint *)(param_1 + 0x428)) {
        return param_2;
      }
      if (*puVar1 == param_3) break;
      puVar1 = *(uint **)(puVar1 + 4);
    }
    FUN_1401710b0(param_2,puVar1 + 2,param_3,uVar2,0xfffffffffffffffe);
  }
  return param_2;
}



undefined8 FUN_140174e20(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 uVar3;
  longlong *local_res8;
  undefined8 uVar4;
  undefined1 uVar5;
  
  uVar4 = 0xfffffffffffffffe;
  plVar1 = (longlong *)(param_1 + -0xa8);
  uVar3 = (**(code **)(*plVar1 + 0x58))(plVar1);
  FUN_140156b50(uVar3);
  uVar5 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*plVar1 + 200))(plVar1,L"Proud::CNetServerImpl::GetP2PGroupInfo");
  }
  FUN_140174d90(plVar1,&local_res8,param_2,param_4,uVar4,uVar3,uVar5);
  if ((local_res8 == (longlong *)0x0) || (*local_res8 == 0)) {
    if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0))
    {
      lVar2 = *local_res8;
      if (lVar2 != 0) {
        FUN_140162160(lVar2);
        FUN_140156970(lVar2);
      }
      FUN_140156970(local_res8);
    }
    FUN_140156be0(uVar3);
    uVar3 = 0;
  }
  else {
    FUN_1401aae40(*local_res8,param_3);
    if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0))
    {
      lVar2 = *local_res8;
      if (lVar2 != 0) {
        FUN_140162160(lVar2);
        FUN_140156970(lVar2);
      }
      FUN_140156970(local_res8);
    }
    FUN_140156be0(uVar3);
    uVar3 = 1;
  }
  return uVar3;
}



longlong * FUN_140174f60(undefined8 param_1,int param_2,longlong *param_3)

{
  undefined4 uVar1;
  longlong lVar2;
  undefined8 *puVar3;
  longlong lVar4;
  undefined4 *puVar5;
  undefined4 *puVar6;
  longlong *local_res20;
  
  puVar3 = (undefined8 *)FUN_140174d90(param_1,&local_res20,param_2);
  puVar5 = (undefined4 *)0x0;
  puVar6 = puVar5;
  if ((undefined8 *)*puVar3 != (undefined8 *)0x0) {
    puVar6 = *(undefined4 **)*puVar3;
  }
  if ((local_res20 != (longlong *)0x0) &&
     (local_res20[1] = local_res20[1] + -1, local_res20[1] == 0)) {
    lVar4 = *local_res20;
    if (lVar4 != 0) {
      FUN_140162160(lVar4);
      FUN_140156970(lVar4);
    }
    local_res20 = (longlong *)FUN_140156970(local_res20);
  }
  if (puVar6 == (undefined4 *)0x0) {
    if ((param_2 != 1) && (lVar4 = FUN_14015f740(param_1,param_2), lVar4 == 0)) {
      return (longlong *)0x0;
    }
    local_res20 = (longlong *)FUN_14015df50(param_3,param_3[1],param_2);
  }
  else {
    if (*(longlong *)(puVar6 + 10) != 0) {
      puVar5 = *(undefined4 **)(puVar6 + 6);
    }
    while (puVar5 != (undefined4 *)0x0) {
      lVar4 = param_3[1];
      uVar1 = *puVar5;
      if (lVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      FUN_14015d090(param_3,lVar4 + 1,0xffffffffffffffff);
      if (param_3[1] <= lVar4) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_3[2] < 0x65) {
        local_res20 = (longlong *)((longlong)param_3 + lVar4 * 4 + 0x20);
        *(undefined4 *)local_res20 = uVar1;
        puVar5 = *(undefined4 **)(puVar5 + 6);
      }
      else {
        lVar2 = *param_3;
        *(undefined4 *)(lVar2 + lVar4 * 4) = uVar1;
        puVar5 = *(undefined4 **)(puVar5 + 6);
        local_res20 = (longlong *)(lVar2 + lVar4 * 4);
      }
    }
  }
  return local_res20;
}



// WARNING: Removing unreachable block (ram,0x00014017555b)
// WARNING: Removing unreachable block (ram,0x000140175562)
// WARNING: Removing unreachable block (ram,0x000140175570)
// WARNING: Removing unreachable block (ram,0x00014017557d)
// WARNING: Removing unreachable block (ram,0x000140175575)
// WARNING: Removing unreachable block (ram,0x000140175583)
// WARNING: Removing unreachable block (ram,0x000140175595)
// WARNING: Removing unreachable block (ram,0x0001401751fa)

undefined8 FUN_140175080(longlong param_1,uint param_2,int *param_3)

{
  longlong lVar1;
  undefined8 *puVar2;
  ulonglong uVar3;
  uint uVar4;
  int iVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong *plVar8;
  undefined8 *puVar9;
  longlong *plVar10;
  longlong *plVar11;
  uint uVar12;
  longlong lVar13;
  uint *puVar14;
  longlong *plVar15;
  longlong *plVar16;
  longlong *plVar17;
  longlong *plVar18;
  double dVar19;
  double dVar20;
  double dVar21;
  longlong *local_res8;
  undefined **local_90;
  longlong *local_88;
  longlong *local_80;
  ulonglong local_78;
  int local_70;
  undefined4 local_6c;
  longlong *local_68;
  longlong lStack_60;
  longlong *local_58;
  longlong lStack_50;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  uVar6 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar6);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))(param_1 + -0xa8);
  }
  uVar3 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0xbf8);
  if ((*(longlong *)(param_1 + 0xbd8) != 0) &&
     (puVar14 = *(uint **)(*(longlong *)(param_1 + 0xbd8) + uVar3 * 8), puVar14 != (uint *)0x0)) {
    while ((uint)uVar3 == puVar14[8] % *(uint *)(param_1 + 0xbf8)) {
      if (*puVar14 == param_2) {
        lVar1 = *(longlong *)(puVar14 + 2);
        if ((lVar1 != 0) && (*(longlong *)(lVar1 + 0x228) == 0)) {
          plVar8 = (longlong *)0x0;
          param_3[0] = 0;
          param_3[1] = 0;
          param_3[3] = *(int *)(lVar1 + 0x1d0);
          param_3[2] = *(int *)(lVar1 + 0x1d4);
          plVar7 = plVar8;
          if (*(longlong *)(lVar1 + 0x6c0) != 0) {
            plVar7 = *(longlong **)(lVar1 + 0x6b0);
          }
          for (; plVar7 != (longlong *)0x0; plVar7 = (longlong *)plVar7[2]) {
            plVar15 = plVar8;
            if ((undefined8 *)*plVar7 != (undefined8 *)0x0) {
              plVar15 = *(longlong **)*plVar7;
            }
            if ((char)plVar15[0x22] != '\0') {
              *param_3 = *param_3 + 1;
              plVar15 = plVar8;
              if ((undefined8 *)*plVar7 != (undefined8 *)0x0) {
                plVar15 = *(longlong **)*plVar7;
              }
              if ((char)plVar15[1] == '\0') {
                param_3[1] = param_3[1] + 1;
              }
            }
          }
          FUN_140156be0(uVar6);
          return 1;
        }
        break;
      }
      puVar14 = *(uint **)(puVar14 + 4);
      if (puVar14 == (uint *)0x0) break;
    }
  }
  plVar8 = (longlong *)FUN_140174d90(param_1 + -0xa8,&local_res8,param_2);
  plVar15 = (longlong *)0x0;
  plVar7 = plVar15;
  if ((undefined8 *)*plVar8 != (undefined8 *)0x0) {
    plVar7 = *(longlong **)*plVar8;
  }
  if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
    lVar1 = *local_res8;
    if (lVar1 != 0) {
      FUN_140162160(lVar1);
      FUN_140156970(lVar1);
    }
    FUN_140156970(local_res8);
  }
  if (plVar7 == (longlong *)0x0) {
    FUN_140156be0(uVar6);
    uVar6 = 0;
  }
  else {
    param_3[0] = 0;
    param_3[1] = 0;
    param_3[2] = 0;
    param_3[3] = 0;
    local_90 = Proud::CFastArray<>::vftable;
    local_88 = (longlong *)0x0;
    local_6c = 0;
    local_80 = (longlong *)0x0;
    local_78 = 0;
    lVar1 = plVar7[5];
    dVar19 = (double)lVar1;
    if (lVar1 < 0) {
      dVar19 = dVar19 + 1.8446744073709552e+19;
    }
    uVar4 = 2;
    uVar12 = 2;
    dVar20 = 1.0;
    dVar21 = 1.0;
    while( true ) {
      if ((uVar12 & 1) != 0) {
        dVar21 = dVar21 * dVar19;
      }
      uVar12 = uVar12 >> 1;
      if (uVar12 == 0) break;
      dVar19 = dVar19 * dVar19;
    }
    if (1.0 < dVar21 * 0.5) {
      dVar19 = (double)lVar1;
      if (lVar1 < 0) {
        dVar19 = dVar19 + 1.8446744073709552e+19;
      }
      while( true ) {
        if ((uVar4 & 1) != 0) {
          dVar20 = dVar20 * dVar19;
        }
        uVar4 = uVar4 >> 1;
        if (uVar4 == 0) break;
        dVar19 = dVar19 * dVar19;
      }
      dVar20 = dVar20 * 0.5;
    }
    local_70 = 0;
    if (0 < (int)dVar20) {
      local_70 = (int)dVar20;
    }
    plVar8 = plVar15;
    plVar10 = plVar15;
    plVar17 = plVar15;
    if (lVar1 != 0) {
      plVar8 = (longlong *)plVar7[3];
      plVar10 = (longlong *)0x0;
    }
    for (; plVar8 != (longlong *)0x0; plVar8 = (longlong *)plVar8[3]) {
      iVar5 = (*(code *)**(undefined8 **)plVar8[2])();
      if (((iVar5 != 1) && (lVar1 = plVar8[2], lVar1 != 0)) && (lVar1 != 0x40)) {
        param_3[3] = param_3[3] + *(int *)(lVar1 + 400);
        param_3[2] = param_3[2] + *(int *)(lVar1 + 0x194);
        lVar13 = lVar1 + 0x660;
        plVar18 = plVar15;
        local_68 = plVar15;
        lStack_60 = lVar13;
        local_58 = plVar15;
        lStack_50 = lVar13;
        if (*(longlong *)(lVar1 + 0x680) != 0) {
          plVar18 = *(longlong **)(lVar1 + 0x670);
          local_68 = plVar18;
          local_58 = plVar18;
        }
LAB_1401753d0:
        if (plVar18 != (longlong *)0x0) {
          puVar2 = (undefined8 *)*plVar18;
          plVar11 = plVar15;
          if (puVar2 != (undefined8 *)0x0) {
            plVar11 = (longlong *)*puVar2;
          }
          uVar12 = *(uint *)(plVar7 + 6);
          uVar3 = (ulonglong)*(uint *)(plVar11[0x20] + 0x6f8) % (ulonglong)uVar12;
          lVar1 = plVar7[2];
          if ((lVar1 != 0) && (puVar14 = *(uint **)(lVar1 + uVar3 * 8), puVar14 != (uint *)0x0)) {
            while ((uint)uVar3 == puVar14[10] % uVar12) {
              if (*puVar14 == *(uint *)(plVar11[0x20] + 0x6f8)) {
                if (puVar14 != (uint *)0x0) {
                  plVar11 = plVar15;
                  if (puVar2 != (undefined8 *)0x0) {
                    plVar11 = (longlong *)*puVar2;
                  }
                  uVar3 = (ulonglong)*(uint *)(plVar11[0x21] + 0x6f8) % (ulonglong)uVar12;
                  puVar14 = *(uint **)(lVar1 + uVar3 * 8);
                  if (puVar14 != (uint *)0x0) goto LAB_140175484;
                }
                break;
              }
              puVar14 = *(uint **)(puVar14 + 6);
              if (puVar14 == (uint *)0x0) break;
            }
          }
          goto LAB_1401755b4;
        }
        if (lStack_50 != lVar13) {
                    // WARNING: Subroutine does not return
          FUN_14004ea80(0x80004005);
        }
      }
    }
    if (plVar17 != (longlong *)0x0) {
      if (local_88 == (longlong *)0x0) {
        FUN_140156970(plVar17);
      }
      else {
        (**(code **)(*local_88 + 0x18))(local_88,plVar17);
      }
    }
    FUN_140156be0(uVar6);
    uVar6 = 1;
  }
  return uVar6;
  while( true ) {
    if (*puVar14 == *(uint *)(plVar11[0x21] + 0x6f8)) {
      if (puVar14 != (uint *)0x0) {
        plVar11 = plVar15;
        if (puVar2 != (undefined8 *)0x0) {
          plVar11 = (longlong *)*puVar2;
        }
        iVar5 = (int)plVar10;
        if (iVar5 < 1) goto LAB_1401754eb;
        puVar9 = (undefined8 *)FUN_1401a7bb0(&local_90);
        plVar16 = plVar15;
        goto LAB_1401754d0;
      }
      break;
    }
    puVar14 = *(uint **)(puVar14 + 6);
    if (puVar14 == (uint *)0x0) break;
LAB_140175484:
    if ((uint)uVar3 != puVar14[10] % uVar12) break;
  }
  goto LAB_1401755b4;
  while( true ) {
    uVar12 = (int)plVar16 + 1;
    plVar16 = (longlong *)(ulonglong)uVar12;
    puVar9 = puVar9 + 1;
    if (iVar5 <= (int)uVar12) break;
LAB_1401754d0:
    if (plVar11 == (longlong *)*puVar9) {
      if ((int)plVar16 != -1) goto LAB_1401755b4;
      break;
    }
  }
LAB_1401754eb:
  plVar10 = plVar15;
  if (puVar2 != (undefined8 *)0x0) {
    plVar10 = (longlong *)*puVar2;
  }
  if ((char)plVar10[0x22] != '\0') {
    *param_3 = *param_3 + 1;
    plVar10 = plVar15;
    if ((undefined8 *)*plVar18 != (undefined8 *)0x0) {
      plVar10 = *(longlong **)*plVar18;
    }
    if ((char)plVar10[1] == '\0') {
      param_3[1] = param_3[1] + 1;
    }
  }
  plVar17 = plVar15;
  if ((longlong *)*plVar18 != (longlong *)0x0) {
    plVar17 = *(longlong **)*plVar18;
  }
  if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_14015d550(&local_90);
  plVar10 = (longlong *)(local_78 & 0xffffffff);
  plVar11 = local_80;
  if ((int)local_78 == 0) {
    plVar11 = plVar15;
  }
  plVar11[iVar5] = (longlong)plVar17;
  plVar17 = local_80;
LAB_1401755b4:
  plVar18 = (longlong *)plVar18[2];
  goto LAB_1401753d0;
}



void FUN_140175640(undefined8 param_1,uint param_2,int *param_3,undefined8 param_4)

{
  ulonglong uVar1;
  
  if (0 < (int)param_2) {
    uVar1 = (ulonglong)param_2;
    do {
      if (*param_3 != 0) {
        FUN_140174f60(param_1,*param_3,param_4);
      }
      param_3 = param_3 + 1;
      uVar1 = uVar1 - 1;
    } while (uVar1 != 0);
  }
  FUN_14015e1a0(param_4);
  return;
}



undefined4 FUN_1401756a0(longlong param_1,undefined4 param_2,undefined8 param_3,longlong param_4)

{
  longlong *plVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong lVar8;
  int iVar9;
  longlong lVar10;
  int iVar11;
  longlong lVar12;
  longlong *local_res8;
  
  plVar1 = (longlong *)(param_1 + -0xa8);
  uVar5 = (**(code **)(*plVar1 + 0x58))(plVar1);
  FUN_140156b50(uVar5);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*plVar1 + 200))(plVar1,L"Proud::CNetServerImpl::GetMostSuitableSuperPeerInGroup");
  }
  plVar6 = (longlong *)FUN_140174d90(plVar1,&local_res8,param_2);
  if ((longlong *)*plVar6 == (longlong *)0x0) {
    lVar12 = 0;
  }
  else {
    lVar12 = *(longlong *)*plVar6;
  }
  if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
    lVar8 = *local_res8;
    if (lVar8 != 0) {
      FUN_140162160(lVar8);
      FUN_140156970(lVar8);
    }
    FUN_140156970(local_res8);
  }
  if (lVar12 != 0) {
    FUN_14016a900(plVar1);
    iVar11 = 0;
    iVar2 = *(int *)(lVar12 + 0x78);
    lVar8 = 0;
    if (0 < iVar2) {
      lVar10 = 0;
      do {
        if ((lVar8 < 0) || (iVar2 <= iVar11)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        iVar9 = 0;
        lVar7 = 0;
        iVar3 = *(int *)(param_4 + 0x18);
        if (iVar3 < 1) {
LAB_1401757fb:
          if ((-1 < iVar11) && (iVar11 < iVar2)) {
            uVar4 = *(undefined4 *)((longlong)iVar11 * 0x40 + *(longlong *)(lVar12 + 0x70));
            FUN_140156be0(uVar5);
            return uVar4;
          }
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        while( true ) {
          if ((lVar7 < 0) || (iVar3 <= iVar9)) {
                    // WARNING: Subroutine does not return
            FUN_1401566e0();
          }
          if (*(int *)(*(longlong *)(param_4 + 0x10) + lVar7 * 4) ==
              *(int *)(lVar10 + *(longlong *)(lVar12 + 0x70))) break;
          iVar9 = iVar9 + 1;
          lVar7 = lVar7 + 1;
          if (iVar3 <= iVar9) goto LAB_1401757fb;
        }
        iVar11 = iVar11 + 1;
        lVar8 = lVar8 + 1;
        lVar10 = lVar10 + 0x40;
      } while (iVar11 < iVar2);
    }
  }
  FUN_140156be0(uVar5);
  return 0;
}



bool FUN_140175850(longlong param_1,uint param_2)

{
  uint *puVar1;
  longlong lVar2;
  ulonglong uVar3;
  longlong *plVar4;
  longlong lVar5;
  longlong *local_res8;
  
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0x120) + 200))(param_1 + -0x120);
  }
  if (param_2 == 1) {
    return true;
  }
  uVar3 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0xb80);
  if (*(longlong *)(param_1 + 0xb60) != 0) {
    puVar1 = *(uint **)(*(longlong *)(param_1 + 0xb60) + uVar3 * 8);
    while( true ) {
      if ((puVar1 == (uint *)0x0) || ((uint)uVar3 != puVar1[8] % *(uint *)(param_1 + 0xb80)))
      goto LAB_1401758f3;
      if (*puVar1 == param_2) break;
      puVar1 = *(uint **)(puVar1 + 4);
    }
    if (*(longlong *)(puVar1 + 2) != 0) {
      return true;
    }
  }
LAB_1401758f3:
  plVar4 = (longlong *)FUN_140174d90(param_1 + -0x120,&local_res8,param_2);
  lVar5 = 0;
  if ((longlong *)*plVar4 != (longlong *)0x0) {
    lVar5 = *(longlong *)*plVar4;
  }
  if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
    lVar2 = *local_res8;
    if (lVar2 != 0) {
      FUN_140162160(lVar2);
      FUN_140156970(lVar2);
    }
    FUN_140156970(local_res8);
  }
  return lVar5 != 0;
}



int FUN_140175970(longlong param_1,undefined4 param_2,undefined8 *param_3,int param_4,
                 undefined8 param_5,longlong param_6)

{
  int iVar1;
  longlong lVar2;
  undefined8 uVar3;
  longlong *plVar4;
  int iVar5;
  longlong lVar6;
  longlong lVar7;
  int iVar8;
  longlong lVar9;
  int iVar10;
  longlong lVar11;
  longlong lVar12;
  int local_res8;
  undefined8 *local_res18;
  longlong *local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined1 local_40;
  
  local_50 = 0xfffffffffffffffe;
  plVar4 = (longlong *)(param_1 + -0xa8);
  uVar3 = (**(code **)(*plVar4 + 0x58))(plVar4);
  local_48 = uVar3;
  FUN_140156b50(uVar3);
  local_40 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*plVar4 + 200))
              (plVar4,L"Proud::CNetServerImpl::GetSuitableSuperPeerRankListInGroup");
  }
  plVar4 = (longlong *)FUN_140174d90(plVar4,&local_58,param_2);
  if ((longlong *)*plVar4 == (longlong *)0x0) {
    lVar11 = 0;
  }
  else {
    lVar11 = *(longlong *)*plVar4;
  }
  if ((local_58 != (longlong *)0x0) &&
     (local_58[1] = local_58[1] + -1, uVar3 = local_48, local_58[1] == 0)) {
    lVar7 = *local_58;
    if (lVar7 != 0) {
      FUN_140162160(lVar7);
      FUN_140156970(lVar7);
    }
    FUN_140156970(local_58);
    uVar3 = local_48;
  }
  if (lVar11 == 0) {
    FUN_140156be0(uVar3);
    local_res8 = 0;
  }
  else {
    FUN_14016a900();
    iVar5 = 0;
    local_res8 = 0;
    iVar10 = 0;
    lVar7 = 0;
    lVar12 = 0;
    if (0 < *(int *)(lVar11 + 0x78)) {
      lVar9 = 0;
      local_res18 = param_3;
      do {
        if (lVar12 < param_4) {
          if ((lVar7 < 0) || (*(int *)(lVar11 + 0x78) <= iVar10)) {
                    // WARNING: Subroutine does not return
            FUN_1401566e0();
          }
          lVar2 = *(longlong *)(lVar11 + 0x70);
          iVar8 = 0;
          lVar6 = 0;
          iVar1 = *(int *)(param_6 + 0x18);
          if (0 < iVar1) {
            do {
              if ((lVar6 < 0) || (iVar1 <= iVar8)) {
                    // WARNING: Subroutine does not return
                FUN_1401566e0();
              }
              iVar5 = local_res8;
              if (*(int *)(*(longlong *)(param_6 + 0x10) + lVar6 * 4) == *(int *)(lVar2 + lVar9))
              goto LAB_140175b70;
              iVar8 = iVar8 + 1;
              lVar6 = lVar6 + 1;
            } while (iVar8 < iVar1);
          }
          if (*(int *)(lVar11 + 0x78) <= iVar10) {
                    // WARNING: Subroutine does not return
            FUN_1401566e0();
          }
          *local_res18 = *(undefined8 *)(lVar2 + lVar9);
          local_res18[1] = *(undefined8 *)(lVar2 + 8 + lVar9);
          local_res18[2] = *(undefined8 *)(lVar2 + 0x10 + lVar9);
          local_res18[3] = *(undefined8 *)(lVar2 + 0x18 + lVar9);
          local_res18[4] = *(undefined8 *)(lVar2 + 0x20 + lVar9);
          local_res18[5] = *(undefined8 *)(lVar2 + 0x28 + lVar9);
          local_res18[6] = *(undefined8 *)(lVar2 + 0x30 + lVar9);
          local_res18[7] = *(undefined8 *)(lVar2 + 0x38 + lVar9);
          local_res8 = iVar5 + 1;
          lVar12 = lVar12 + 1;
          local_res18 = local_res18 + 8;
          iVar5 = local_res8;
        }
LAB_140175b70:
        iVar10 = iVar10 + 1;
        lVar7 = lVar7 + 1;
        lVar9 = lVar9 + 0x40;
      } while (iVar10 < *(int *)(lVar11 + 0x78));
    }
    FUN_140156be0(uVar3);
  }
  return local_res8;
}



// WARNING: Removing unreachable block (ram,0x000140175fa3)
// WARNING: Removing unreachable block (ram,0x000140175fbf)

void FUN_140175bd0(longlong param_1,longlong param_2)

{
  ulonglong *puVar1;
  longlong *plVar2;
  void *pvVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  longlong lVar6;
  ulonglong uVar7;
  longlong lVar8;
  ulonglong *local_res8;
  longlong *local_res18;
  undefined8 uVar9;
  
  uVar9 = 0xfffffffffffffffe;
  if (*(longlong *)(param_1 + 0x20) == 0) {
    lVar8 = 0;
  }
  else {
    lVar8 = *(longlong *)(param_1 + 0x10);
  }
  while (lVar8 != 0) {
    if (lVar8 == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    local_res8 = (ulonglong *)0x0;
    if (*(longlong *)(lVar8 + 8) != 0) {
      *(longlong *)(*(longlong *)(lVar8 + 8) + 8) = *(longlong *)(*(longlong *)(lVar8 + 8) + 8) + 1;
      local_res8 = *(ulonglong **)(lVar8 + 8);
    }
    if (local_res8 == (ulonglong *)0x0) {
      uVar4 = 0;
    }
    else {
      uVar4 = *local_res8;
    }
    if (*(longlong *)(uVar4 + 0x100) == param_2) {
LAB_140175c91:
      if (local_res8 == (ulonglong *)0x0) {
        uVar4 = 0;
      }
      else {
        uVar4 = *local_res8;
      }
      lVar6 = *(longlong *)(uVar4 + 0x100);
      if (local_res8 == (ulonglong *)0x0) {
        uVar4 = 0;
      }
      else {
        uVar4 = *local_res8;
      }
      uVar4 = (uVar4 & 0xffffffff) % (ulonglong)*(uint *)(lVar6 + 0x6c8);
      if (*(longlong *)(lVar6 + 0x6a8) != 0) {
        plVar2 = *(longlong **)(*(longlong *)(lVar6 + 0x6a8) + uVar4 * 8);
        while( true ) {
          if ((plVar2 == (longlong *)0x0) ||
             ((uint)uVar4 != *(uint *)(plVar2 + 4) % *(uint *)(lVar6 + 0x6c8))) goto LAB_140175d2a;
          if ((ulonglong *)*plVar2 == (ulonglong *)0x0) {
            uVar7 = 0;
          }
          else {
            uVar7 = *(ulonglong *)*plVar2;
          }
          if (local_res8 == (ulonglong *)0x0) {
            uVar5 = 0;
          }
          else {
            uVar5 = *local_res8;
          }
          if (uVar7 == uVar5) break;
          plVar2 = (longlong *)plVar2[2];
        }
        FUN_1401708d0(lVar6 + 0x6a0,plVar2,0,lVar6,uVar9);
      }
LAB_140175d2a:
      if (local_res8 == (ulonglong *)0x0) {
        uVar4 = 0;
      }
      else {
        uVar4 = *local_res8;
      }
      lVar6 = *(longlong *)(uVar4 + 0x108);
      if (local_res8 == (ulonglong *)0x0) {
        uVar4 = 0;
      }
      else {
        uVar4 = *local_res8;
      }
      uVar4 = (uVar4 & 0xffffffff) % (ulonglong)*(uint *)(lVar6 + 0x6c8);
      if (*(longlong *)(lVar6 + 0x6a8) != 0) {
        plVar2 = *(longlong **)(*(longlong *)(lVar6 + 0x6a8) + uVar4 * 8);
        while( true ) {
          if ((plVar2 == (longlong *)0x0) ||
             ((uint)uVar4 != *(uint *)(plVar2 + 4) % *(uint *)(lVar6 + 0x6c8))) goto LAB_140175dba;
          if ((ulonglong *)*plVar2 == (ulonglong *)0x0) {
            uVar7 = 0;
          }
          else {
            uVar7 = *(ulonglong *)*plVar2;
          }
          if (local_res8 == (ulonglong *)0x0) {
            uVar5 = 0;
          }
          else {
            uVar5 = *local_res8;
          }
          if (uVar7 == uVar5) break;
          plVar2 = (longlong *)plVar2[2];
        }
        FUN_1401708d0(lVar6 + 0x6a0,plVar2,0,lVar6,uVar9);
      }
LAB_140175dba:
      if (lVar8 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      lVar6 = *(longlong *)(lVar8 + 0x10);
      FUN_14016e000(param_1,lVar8,0);
      lVar8 = lVar6;
    }
    else {
      if (local_res8 == (ulonglong *)0x0) {
        uVar4 = 0;
      }
      else {
        uVar4 = *local_res8;
      }
      if (*(longlong *)(uVar4 + 0x108) == param_2) goto LAB_140175c91;
      if (lVar8 != 0) {
        lVar8 = *(longlong *)(lVar8 + 0x10);
      }
    }
    if (local_res8 != (ulonglong *)0x0) {
      puVar1 = local_res8 + 1;
      *puVar1 = *puVar1 - 1;
      if (*puVar1 == 0) {
        pvVar3 = (void *)*local_res8;
        if (pvVar3 != (void *)0x0) {
          FUN_1401858d0((longlong)pvVar3 + 0x148);
          FUN_1401858d0((longlong)pvVar3 + 0x120);
          operator_delete(pvVar3);
        }
        FUN_140156970(local_res8);
      }
    }
  }
  if (*(longlong *)(param_1 + 0x78) == 0) {
    lVar8 = 0;
  }
  else {
    lVar8 = *(longlong *)(param_1 + 0x68);
  }
  do {
    if (lVar8 == 0) {
      return;
    }
    if (lVar8 == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    local_res18 = (longlong *)0x0;
    if (*(longlong *)(lVar8 + 8) != 0) {
      *(longlong *)(*(longlong *)(lVar8 + 8) + 8) = *(longlong *)(*(longlong *)(lVar8 + 8) + 8) + 1;
      local_res18 = *(longlong **)(lVar8 + 8);
    }
    if (local_res18 == (longlong *)0x0) {
      lVar6 = 0;
    }
    else {
      lVar6 = *local_res18;
    }
    if (*(longlong *)(lVar6 + 0x100) == param_2) {
code_r0x000140175f06:
      if (lVar8 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      lVar6 = *(longlong *)(lVar8 + 0x10);
      FUN_14016e000(param_1 + 0x58,lVar8,0);
      lVar8 = lVar6;
    }
    else {
      if (local_res18 == (longlong *)0x0) {
        lVar6 = 0;
      }
      else {
        lVar6 = *local_res18;
      }
      if (*(longlong *)(lVar6 + 0x108) == param_2) goto code_r0x000140175f06;
      if (lVar8 != 0) {
        lVar8 = *(longlong *)(lVar8 + 0x10);
      }
    }
    if (local_res18 != (longlong *)0x0) {
      plVar2 = local_res18 + 1;
      *plVar2 = *plVar2 + -1;
      if (*plVar2 == 0) {
        pvVar3 = (void *)*local_res18;
        if (pvVar3 != (void *)0x0) {
          FUN_1401858d0((longlong)pvVar3 + 0x148);
          FUN_1401858d0((longlong)pvVar3 + 0x120);
          operator_delete(pvVar3);
        }
        FUN_140156970(local_res18);
      }
    }
  } while( true );
}



// WARNING: Removing unreachable block (ram,0x000140176340)
// WARNING: Removing unreachable block (ram,0x00014017631f)
// WARNING: Removing unreachable block (ram,0x00014017632e)
// WARNING: Removing unreachable block (ram,0x000140176098)

undefined8 * FUN_140175fe0(longlong param_1,longlong param_2,longlong param_3,longlong param_4)

{
  int *piVar1;
  longlong *plVar2;
  uint uVar3;
  longlong lVar4;
  ulonglong uVar5;
  undefined4 uVar6;
  undefined2 uVar7;
  undefined *puVar8;
  undefined8 *puVar9;
  undefined8 *puVar10;
  undefined8 *puVar11;
  undefined8 *puVar12;
  uint *puVar13;
  undefined8 *puVar14;
  ulonglong uVar15;
  undefined *puVar16;
  uint uVar17;
  uint uVar18;
  undefined8 *local_res8;
  undefined *local_res20;
  undefined8 *puVar19;
  undefined8 uVar20;
  
  uVar20 = 0xfffffffffffffffe;
  puVar14 = (undefined8 *)0x0;
  puVar11 = (undefined8 *)0x0;
  puVar19 = (undefined8 *)0x0;
  uVar3 = *(uint *)(param_4 + 0x6f8);
  uVar18 = *(uint *)(param_3 + 0x6f8);
  uVar17 = uVar3;
  if ((int)uVar3 < (int)uVar18) {
    uVar17 = uVar18;
    uVar18 = uVar3;
  }
  uVar15 = (ulonglong)*(uint *)(param_1 + 0x28);
  uVar5 = (ulonglong)(uVar18 << 0x10 ^ uVar17);
  puVar10 = (undefined8 *)(uVar5 / uVar15);
  uVar5 = uVar5 % uVar15;
  puVar12 = puVar14;
  if (*(longlong *)(param_1 + 8) != 0) {
    puVar13 = *(uint **)(*(longlong *)(param_1 + 8) + uVar5 * 8);
    while( true ) {
      puVar12 = puVar11;
      if ((puVar13 == (uint *)0x0) ||
         (puVar10 = (undefined8 *)(puVar13[8] / uVar15),
         (uint)uVar5 != puVar13[8] % *(uint *)(param_1 + 0x28))) goto LAB_140176447;
      if ((*puVar13 == uVar18) && (puVar13[1] == uVar17)) break;
      puVar13 = *(uint **)(puVar13 + 4);
    }
    if (puVar13 != (uint *)0x0) {
      puVar11 = puVar14;
      puVar12 = puVar19;
      if (*(longlong *)(puVar13 + 2) != 0) {
        *(longlong *)(*(longlong *)(puVar13 + 2) + 8) =
             *(longlong *)(*(longlong *)(puVar13 + 2) + 8) + 1;
        puVar12 = *(undefined8 **)(puVar13 + 2);
        if (puVar12 != (undefined8 *)0x0) {
          puVar11 = (undefined8 *)*puVar12;
        }
      }
      *(int *)((longlong)puVar11 + 0x114) = *(int *)((longlong)puVar11 + 0x114) + -1;
      puVar10 = puVar14;
      if (puVar12 != (undefined8 *)0x0) {
        puVar10 = (undefined8 *)*puVar12;
      }
      puVar19 = puVar12;
      if (*(int *)((longlong)puVar10 + 0x114) == 0) {
        puVar11 = puVar14;
        if (puVar12 != (undefined8 *)0x0) {
          puVar11 = (undefined8 *)*puVar12;
        }
        lVar4 = puVar11[0x20];
        puVar11 = puVar14;
        if (puVar12 != (undefined8 *)0x0) {
          puVar11 = (undefined8 *)*puVar12;
        }
        uVar5 = ((ulonglong)puVar11 & 0xffffffff) % (ulonglong)*(uint *)(lVar4 + 0x6c8);
        if (*(longlong *)(lVar4 + 0x6a8) == 0) goto LAB_14017618c;
        puVar11 = *(undefined8 **)(*(longlong *)(lVar4 + 0x6a8) + uVar5 * 8);
        goto joined_r0x000140176133;
      }
    }
  }
  goto LAB_140176447;
joined_r0x000140176133:
  if ((puVar11 == (undefined8 *)0x0) ||
     ((uint)uVar5 != *(uint *)(puVar11 + 4) % *(uint *)(lVar4 + 0x6c8))) goto LAB_14017618c;
  puVar10 = puVar14;
  if ((undefined8 *)*puVar11 != (undefined8 *)0x0) {
    puVar10 = *(undefined8 **)*puVar11;
  }
  puVar9 = puVar14;
  if (puVar12 != (undefined8 *)0x0) {
    puVar9 = (undefined8 *)*puVar12;
  }
  if (puVar10 != puVar9) {
    puVar11 = (undefined8 *)puVar11[2];
    goto joined_r0x000140176133;
  }
  FUN_1401708d0(lVar4 + 0x6a0,puVar11,0,lVar4,puVar12,0xfffffffffffffffe);
LAB_14017618c:
  puVar11 = puVar14;
  if (puVar12 != (undefined8 *)0x0) {
    puVar11 = (undefined8 *)*puVar12;
  }
  lVar4 = puVar11[0x21];
  puVar11 = puVar14;
  if (puVar12 != (undefined8 *)0x0) {
    puVar11 = (undefined8 *)*puVar12;
  }
  uVar5 = ((ulonglong)puVar11 & 0xffffffff) % (ulonglong)*(uint *)(lVar4 + 0x6c8);
  if (*(longlong *)(lVar4 + 0x6a8) != 0) {
    puVar11 = *(undefined8 **)(*(longlong *)(lVar4 + 0x6a8) + uVar5 * 8);
    while( true ) {
      if ((puVar11 == (undefined8 *)0x0) ||
         ((uint)uVar5 != *(uint *)(puVar11 + 4) % *(uint *)(lVar4 + 0x6c8))) goto LAB_14017621d;
      puVar10 = puVar14;
      if ((undefined8 *)*puVar11 != (undefined8 *)0x0) {
        puVar10 = *(undefined8 **)*puVar11;
      }
      puVar9 = puVar14;
      if (puVar12 != (undefined8 *)0x0) {
        puVar9 = (undefined8 *)*puVar12;
      }
      if (puVar10 == puVar9) break;
      puVar11 = (undefined8 *)puVar11[2];
    }
    FUN_1401708d0(lVar4 + 0x6a0,puVar11,0,lVar4,puVar19,uVar20);
  }
LAB_14017621d:
  puVar11 = puVar14;
  if (puVar12 != (undefined8 *)0x0) {
    puVar11 = (undefined8 *)*puVar12;
  }
  if (((((double)puVar11[0x33] != 0.0) && (*(int *)(puVar11 + 0xe) != 0)) &&
      (*(int *)(puVar11 + 0x17) != 0)) && (*(int *)(puVar11 + 0xe) != *(int *)(puVar11 + 0x17))) {
    puVar11 = puVar14;
    if (puVar12 != (undefined8 *)0x0) {
      puVar11 = (undefined8 *)*puVar12;
    }
    uVar20 = (**(code **)(*(longlong *)(param_2 + 0x118) + 8))();
    puVar11[0x32] = uVar20;
    uVar7 = DAT_140320454;
    uVar6 = DAT_140320450;
    puVar11 = puVar14;
    if (puVar12 != (undefined8 *)0x0) {
      puVar11 = (undefined8 *)*puVar12;
    }
    if (*(char *)(puVar11 + 1) != '\x01') {
      *(undefined4 *)(puVar11 + 2) = 0;
      *(undefined4 *)(puVar11 + 4) = uVar6;
      *(undefined2 *)((longlong)puVar11 + 0x24) = uVar7;
      *(undefined4 *)(puVar11 + 6) = uVar6;
      *(undefined2 *)((longlong)puVar11 + 0x34) = uVar7;
      *(undefined1 *)(puVar11 + 7) = 0;
      uVar7 = DAT_140320454;
      uVar6 = DAT_140320450;
      *(undefined4 *)(puVar11 + 8) = 0;
      *(undefined4 *)(puVar11 + 10) = uVar6;
      *(undefined2 *)((longlong)puVar11 + 0x54) = uVar7;
      *(undefined4 *)(puVar11 + 0xc) = uVar6;
      *(undefined2 *)((longlong)puVar11 + 100) = uVar7;
      *(undefined1 *)(puVar11 + 0xd) = 0;
      *(undefined1 *)(puVar11 + 1) = 1;
    }
    local_res8 = (undefined8 *)0x0;
    if (puVar12 != (undefined8 *)0x0) {
      puVar12[1] = puVar12[1] + 1;
      puVar14 = (undefined8 *)*puVar19;
      puVar12 = puVar19;
      local_res8 = puVar19;
    }
    FUN_1401745d0(param_1,puVar14[0x20],puVar14[0x21],&local_res8);
  }
  if (puVar13 == (uint *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  puVar10 = (undefined8 *)FUN_14016e000(param_1,puVar13,0);
  if (*(longlong *)(param_2 + 0x17f0) != 0) {
    FUN_1401568c0();
    local_res20 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_res20,&DAT_140260770,*(undefined4 *)(param_3 + 0x6f8),
                  *(undefined4 *)(param_4 + 0x6f8));
    puVar8 = local_res20;
    puVar16 = local_res20;
    if (local_res20 == (undefined *)0x0) {
      puVar16 = PTR_DAT_1403200a0;
    }
    FUN_140196a90(*(undefined8 *)(param_2 + 0x17f0),1,puVar16);
    if (((puVar8 != (undefined *)0x0) && (puVar8 != PTR_DAT_1403200a0)) &&
       (puVar8 + -8 != (undefined *)0x0)) {
      uVar20 = FUN_1401568c0();
      FUN_140156b50(uVar20);
      piVar1 = (int *)(puVar8 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar8 + -8);
      }
      FUN_140156be0(uVar20);
    }
    local_res20 = PTR_DAT_1403200a0;
    puVar10 = (undefined8 *)PTR_DAT_1403200a0;
  }
LAB_140176447:
  if (puVar12 != (undefined8 *)0x0) {
    plVar2 = puVar12 + 1;
    *plVar2 = *plVar2 + -1;
    puVar10 = (undefined8 *)puVar12[1];
    if (*plVar2 == 0) {
      puVar10 = (undefined8 *)FUN_14015ebb0(puVar19);
    }
  }
  return puVar10;
}



undefined4 *
FUN_140176480(undefined4 *param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  
  *param_1 = *param_2;
  *(undefined8 *)(param_1 + 2) = 0;
  FUN_14016dca0(param_1 + 2,param_2 + 2,param_3,param_4,0xfffffffffffffffe);
  param_1[4] = param_2[4];
  *(undefined8 *)(param_1 + 6) = 0;
  FUN_140174810(param_1 + 6,param_2 + 6);
  *(undefined8 *)(param_1 + 8) = 0;
  FUN_140174940(param_1 + 8,param_2 + 8);
  FUN_14015e720(param_1 + 10,param_2 + 10);
  *(undefined ***)(param_1 + 10) = Proud::ByteArray::vftable;
  *(undefined8 *)(param_1 + 0x18) = 0;
  *(undefined8 *)(param_1 + 0x16) = 0;
  if (*(longlong *)(param_2 + 0x14) == 0) {
    *(undefined8 *)(param_1 + 0x14) = 0;
    param_1[0x19] = param_2[0x19];
    *(undefined8 *)(param_1 + 0x16) = *(undefined8 *)(param_2 + 0x16);
    param_1[0x18] = param_2[0x18];
  }
  else {
    plVar1 = (longlong *)(*(longlong *)(param_2 + 0x14) + 0x28);
    *plVar1 = *plVar1 + 1;
    *(undefined8 *)(param_1 + 0x14) = *(undefined8 *)(param_2 + 0x14);
  }
  param_1[0x1a] = param_2[0x1a];
  param_1[0x1b] = param_2[0x1b];
  param_1[0x1c] = param_2[0x1c];
  FUN_14015e720(param_1 + 0x1e,param_2 + 0x1e);
  *(undefined ***)(param_1 + 0x1e) = Proud::ByteArray::vftable;
  param_1[0x28] = param_2[0x28];
  *(undefined ***)(param_1 + 0x2a) = Proud::AddrPort::vftable;
  param_1[0x2c] = param_2[0x2c];
  *(undefined2 *)(param_1 + 0x2d) = *(undefined2 *)(param_2 + 0x2d);
  param_1[0x2e] = param_2[0x2e];
  FUN_14015e720(param_1 + 0x30,param_2 + 0x30);
  *(undefined ***)(param_1 + 0x30) = Proud::ByteArray::vftable;
  return param_1;
}



void FUN_1401765d0(longlong param_1,longlong param_2,undefined4 param_3,undefined4 param_4,
                  longlong param_5)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  undefined4 *puVar8;
  undefined4 *local_res8;
  longlong lVar9;
  undefined4 local_128 [2];
  longlong local_120 [2];
  undefined8 local_110;
  undefined8 local_108;
  undefined **local_100;
  undefined8 local_f8;
  undefined4 *local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined4 local_b8;
  undefined **local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined **local_80;
  undefined4 local_78;
  undefined2 local_74;
  undefined **local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  if ((*(longlong *)(param_1 + 0x758) != 0) && (*(int *)(param_2 + 0x6f8) != 0)) {
    puVar8 = (undefined4 *)0x0;
    local_120[0] = 0;
    local_110 = 0;
    local_108 = 0;
    local_f8 = 0;
    local_f0 = (undefined4 *)0x0;
    local_e8 = 0;
    local_e0 = 0;
    local_100 = Proud::ByteArray::vftable;
    local_c8 = 0;
    local_d0 = 0;
    local_d8 = 0;
    local_a8 = 0;
    local_a0 = 0;
    local_98 = 0;
    local_90 = 0;
    local_b0 = Proud::ByteArray::vftable;
    local_80 = Proud::AddrPort::vftable;
    local_78 = 0;
    local_74 = 0;
    local_60 = 0;
    local_58 = 0;
    local_50 = 0;
    local_48 = 0;
    local_68 = Proud::ByteArray::vftable;
    local_res8 = (undefined4 *)FUN_140156940(0x60);
    puVar3 = puVar8;
    if (local_res8 != (undefined4 *)0x0) {
      puVar3 = (undefined4 *)FUN_140181eb0(local_res8);
    }
    if (puVar3 == (undefined4 *)0x0) {
      local_res8 = (undefined4 *)0x0;
      puVar4 = puVar8;
    }
    else {
      puVar4 = (undefined4 *)FUN_140156940(0x48);
      if (puVar4 != (undefined4 *)0x0) {
        local_res8 = puVar4;
        uVar2 = FUN_14015a430();
        FUN_140156a70(puVar4,uVar2,1);
      }
      local_res8 = puVar4;
      FUN_140156b50(puVar4);
      *(undefined8 *)(puVar4 + 0x10) = 1;
      *(undefined4 **)(puVar4 + 0xe) = puVar3;
      FUN_140156be0(puVar4);
    }
    FUN_14016dca0(local_120,&local_res8);
    if (puVar4 != (undefined4 *)0x0) {
      FUN_140156b50(puVar4);
      plVar6 = (longlong *)(puVar4 + 0x10);
      *plVar6 = *plVar6 + -1;
      if (*plVar6 == 0) {
        FUN_140156be0(puVar4);
        FUN_14013c4c0(puVar4);
      }
      else {
        FUN_140156be0(puVar4);
      }
    }
    puVar3 = puVar8;
    if (local_120[0] != 0) {
      puVar3 = *(undefined4 **)(local_120[0] + 0x38);
    }
    *puVar3 = param_3;
    puVar3 = puVar8;
    if (local_120[0] != 0) {
      puVar3 = *(undefined4 **)(local_120[0] + 0x38);
    }
    puVar3[1] = param_4;
    uVar5 = FUN_14019daa0(param_2,&local_res8);
    FUN_140174810(&local_110,uVar5);
    puVar3 = local_res8;
    if (local_res8 != (undefined4 *)0x0) {
      FUN_140156b50(local_res8);
      *(longlong *)(local_res8 + 0x10) = *(longlong *)(local_res8 + 0x10) + -1;
      if (*(longlong *)(local_res8 + 0x10) == 0) {
        FUN_140156be0(puVar3);
        FUN_140172ea0(local_res8);
      }
      else {
        FUN_140156be0(puVar3);
      }
    }
    local_128[0] = 6;
    iVar1 = *(int *)(param_5 + 0x18);
    if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_140050060(&local_100,iVar1);
    puVar3 = puVar8;
    if (*(int *)(param_5 + 0x18) != 0) {
      puVar3 = *(undefined4 **)(param_5 + 0x10);
    }
    puVar4 = local_f0;
    if ((int)local_e8 == 0) {
      puVar4 = puVar8;
    }
    FUN_140050120(puVar4,puVar3,(longlong)iVar1);
    local_b8 = *(undefined4 *)(param_2 + 0x6f8);
    FUN_14019e2e0(param_2,local_128);
    FUN_140174b20(local_128);
  }
  if (*(longlong *)(param_1 + 0x58) != 0) {
    lVar7 = *(longlong *)(param_1 + 0x58) + 0x98;
    lVar9 = lVar7;
    FUN_140156b50(lVar7);
    plVar6 = (longlong *)(*(longlong *)(param_1 + 0x58) + 0x68);
    (**(code **)(*plVar6 + 0xb0))(plVar6,1,&DAT_140328530,param_2 + 0x6f8,lVar9,1);
    FUN_140156be0(lVar7);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401768f0(longlong param_1,longlong param_2,longlong param_3)

{
  uint uVar1;
  int iVar2;
  ulonglong uVar3;
  char cVar4;
  uint uVar5;
  uint *puVar6;
  longlong *plVar7;
  undefined8 uVar8;
  longlong lVar9;
  longlong *plVar10;
  undefined1 auStack_ea8 [32];
  undefined8 local_e88;
  undefined1 uStack_e80;
  undefined3 uStack_e7f;
  undefined4 uStack_e7c;
  longlong *local_e78;
  undefined4 uStack_e70;
  undefined4 uStack_e6c;
  undefined1 local_e68 [4];
  undefined4 local_e64;
  longlong local_e60;
  longlong local_e58;
  undefined4 local_e50;
  int local_e4c;
  undefined4 local_e18 [2];
  undefined8 local_e10 [2];
  undefined8 local_e00;
  undefined8 local_df8;
  undefined **local_df0;
  undefined8 local_de8;
  undefined8 local_de0;
  undefined8 local_dd8;
  undefined8 local_dd0;
  undefined8 local_dc8;
  longlong local_dc0;
  ulonglong local_db8;
  undefined4 local_da8;
  undefined **local_da0;
  undefined8 local_d98;
  undefined8 local_d90;
  undefined8 local_d88;
  undefined8 local_d80;
  undefined **local_d70;
  undefined4 local_d68;
  undefined2 local_d64;
  undefined **local_d58;
  undefined8 local_d50;
  undefined8 local_d48;
  undefined8 local_d40;
  undefined8 local_d38;
  undefined8 local_d28;
  undefined1 local_d20 [72];
  undefined4 local_cd8;
  undefined4 uStack_cd4;
  undefined4 uStack_cd0;
  undefined4 uStack_ccc;
  undefined4 *local_58;
  undefined4 local_50;
  int local_4c;
  ulonglong local_48;
  
  local_d28 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_ea8;
  if (param_2 == 0) {
    FUN_140156300(local_e68,L"Unexpected at candidate remote client removal!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_e68,(ThrowInfo *)&DAT_14031d928);
  }
  plVar7 = *(longlong **)(param_1 + 0x478);
  lVar9 = *plVar7;
  uVar8 = (**(code **)(*(longlong *)(param_1 + 0x118) + 8))();
  uVar5 = (**(code **)(lVar9 + 8))(plVar7,uVar8);
  local_e88 = (longlong *)CONCAT44(local_e88._4_4_,uVar5);
  *(uint *)(param_2 + 0x6f8) = uVar5;
  FUN_1401619a0(param_1 + 0x16e8,*(longlong *)(param_2 + 0x748) + 0x128,0);
  uVar1 = *(uint *)(param_1 + 0xca0);
  uVar3 = (ulonglong)uVar5 % (ulonglong)uVar1;
  lVar9 = *(longlong *)(param_1 + 0xc80);
  if (lVar9 == 0) {
LAB_140176a1e:
    cVar4 = FUN_1401a8bb0(param_1 + 0xc78,(ulonglong)uVar1,CONCAT71((int7)((ulonglong)lVar9 >> 8),1)
                         );
    if (cVar4 == '\0') {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  else {
    for (puVar6 = *(uint **)(lVar9 + uVar3 * 8);
        (puVar6 != (uint *)0x0 && ((uint)uVar3 == puVar6[8] % uVar1));
        puVar6 = *(uint **)(puVar6 + 4)) {
      if (*puVar6 == uVar5) goto LAB_140176a75;
    }
    if (lVar9 == 0) goto LAB_140176a1e;
    for (puVar6 = *(uint **)(lVar9 + uVar3 * 8);
        (puVar6 != (uint *)0x0 && ((uint)uVar3 == puVar6[8] % uVar1));
        puVar6 = *(uint **)(puVar6 + 4)) {
      if (*puVar6 == uVar5) goto LAB_140176a71;
    }
    if (lVar9 == 0) goto LAB_140176a1e;
  }
  FUN_14015b3b0(param_1 + 0xc78);
  puVar6 = (uint *)FUN_14015f020(param_1 + 0xc78,&local_e88,uVar3,uVar5);
  FUN_14015b3b0(param_1 + 0xc78);
LAB_140176a71:
  *(longlong *)(puVar6 + 2) = param_2;
LAB_140176a75:
  FUN_1401544a0(local_e68);
  FUN_140153d90(local_e68);
  FUN_140154600(local_e68,0x800);
  FUN_140154600(local_e68,0);
  FUN_14004fd90(local_e68,10);
  FUN_14004fe70(local_e68,(ulonglong)uVar5);
  local_e78 = *(longlong **)(param_1 + 0x26c);
  uStack_e70 = *(undefined4 *)(param_1 + 0x274);
  uStack_e6c = *(undefined4 *)(param_1 + 0x278);
  FUN_14013b2a0(local_e68,&local_e78);
  iVar2 = *(int *)(param_3 + 0x18);
  FUN_140155b20(local_e68,(longlong)iVar2);
  lVar9 = 0;
  if (*(int *)(param_3 + 0x18) != 0) {
    lVar9 = *(longlong *)(param_3 + 0x10);
  }
  if (iVar2 == 0) goto LAB_140176b4d;
  local_e64 = 0;
  if (local_e60 == 0) {
    if (local_e58 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0(0,lVar9);
    }
LAB_140176b1f:
    FUN_14004ff50(&local_e58,lVar9,iVar2);
  }
  else {
    if (local_e58 != 0) goto LAB_140176b1f;
    if (local_e60 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0(0,lVar9);
    }
    FUN_140050180(local_e60,lVar9,iVar2);
  }
  FUN_1400501f0(local_e68);
LAB_140176b4d:
  FUN_140155350(local_e68,*(longlong *)(param_2 + 0x748) + 0x128);
  plVar7 = (longlong *)(**(code **)(*(longlong *)(param_2 + 0x108) + 0x10))();
  local_e78 = plVar7;
  FUN_140156b50(plVar7);
  uStack_e70._0_1_ = 1;
  local_4c = 200;
  local_50 = 0;
  local_58 = &local_cd8;
  if (local_e60 == 0) {
    if (local_e58 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else {
    local_e50 = *(undefined4 *)(local_e60 + 0x18);
  }
  lVar9 = local_e58;
  if (local_e58 == 0) {
    if (local_e60 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    lVar9 = 0;
    if (*(int *)(local_e60 + 0x18) != 0) {
      lVar9 = *(longlong *)(local_e60 + 0x10);
    }
  }
  local_50 = 1;
  local_e88._0_4_ = (undefined4)lVar9;
  local_e88._4_4_ = (undefined4)((ulonglong)lVar9 >> 0x20);
  local_cd8 = (undefined4)local_e88;
  uStack_cd4 = local_e88._4_4_;
  uStack_ccc = uStack_e7c;
  local_e88 = (longlong *)0x0;
  _uStack_e80 = CONCAT31((int3)((uint)local_e50 >> 8),1);
  uStack_cd0 = local_e50;
  FUN_1401a3610(*(undefined8 *)(param_2 + 0x748),&local_cd8,&local_e88);
  if (local_58 == (undefined4 *)0x0) {
    FUN_140156300(local_d20,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_d20,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_4c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_140156be0(plVar7);
  local_e88 = &local_e60;
  FUN_1401560e0(&local_e60);
  if ((local_e58 != 0) && (local_e4c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  local_e10[0] = 0;
  local_e00 = 0;
  local_df8 = 0;
  local_de8 = 0;
  local_de0 = 0;
  local_dd8 = 0;
  local_dd0 = 0;
  local_df0 = Proud::ByteArray::vftable;
  local_db8 = 0;
  local_dc0 = 0;
  local_dc8 = 0;
  local_d98 = 0;
  local_d90 = 0;
  local_d88 = 0;
  local_d80 = 0;
  local_da0 = Proud::ByteArray::vftable;
  local_d70 = Proud::AddrPort::vftable;
  local_d68 = 0;
  local_d64 = 0;
  local_d50 = 0;
  local_d48 = 0;
  local_d40 = 0;
  local_d38 = 0;
  local_d58 = Proud::ByteArray::vftable;
  local_e18[0] = 5;
  uVar8 = FUN_14019daa0(param_2,&local_e88);
  FUN_140174810(&local_e00,uVar8);
  plVar7 = local_e88;
  if (local_e88 != (longlong *)0x0) {
    local_e78 = local_e88;
    FUN_140156b50(local_e88);
    uStack_e70._0_1_ = 1;
    local_e88[8] = local_e88[8] + -1;
    if (local_e88[8] == 0) {
      FUN_140156be0(plVar7);
      uStack_e70._0_1_ = 0;
      FUN_140172ea0(local_e88);
    }
    else {
      FUN_140156be0(plVar7);
    }
  }
  local_da8 = *(undefined4 *)(param_2 + 0x6f8);
  FUN_14019e2e0(param_2,local_e18);
  FUN_1401858d0(&local_d58);
  FUN_1401858d0(&local_da0);
  local_e88 = &local_dc8;
  FUN_1401560e0(&local_dc8);
  if (local_dc0 != 0) {
    if ((longlong)local_db8 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_db8 = local_db8 & 0xffffffff00000000;
  }
  FUN_1401858d0(&local_df0);
  FUN_140174710(&local_df8);
  FUN_140174690(&local_e00);
  FUN_14013c530(local_e10);
  if (*(longlong *)(param_1 + 0x58) != 0) {
    plVar10 = (longlong *)(*(longlong *)(param_1 + 0x58) + 0x98);
    local_e78 = plVar10;
    FUN_140156b50(plVar10);
    uStack_e70 = CONCAT31(uStack_e70._1_3_,1);
    plVar7 = (longlong *)(*(longlong *)(param_1 + 0x58) + 0x68);
    (**(code **)(*plVar7 + 0xa0))(plVar7,1,&DAT_140328530,param_2 + 0x6f8);
    FUN_140156be0(plVar10);
  }
  return;
}



void FUN_140176e90(longlong *param_1,undefined4 *param_2)

{
  undefined *puVar1;
  int *piVar2;
  undefined4 *puVar3;
  undefined *puVar4;
  char cVar5;
  undefined **ppuVar6;
  undefined8 uVar7;
  longlong lVar8;
  undefined4 *puVar9;
  undefined8 uVar10;
  undefined *local_res18;
  undefined1 local_res20 [8];
  undefined **local_188;
  uint local_180;
  undefined2 local_17c;
  undefined **local_178;
  undefined8 local_170;
  undefined8 local_168;
  undefined8 local_160;
  undefined8 local_158;
  undefined **local_128;
  undefined8 local_120;
  undefined8 local_118;
  undefined8 local_110;
  undefined8 local_108;
  undefined **local_100;
  undefined4 local_f8;
  undefined2 local_f4;
  undefined **local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined **local_c8;
  undefined8 local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined8 local_a8;
  undefined **local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined1 local_70;
  undefined1 local_60 [16];
  undefined1 local_50 [8];
  undefined8 local_48;
  undefined1 local_38 [16];
  
  local_48 = 0xfffffffffffffffe;
  if (param_1[0xeb] != 0) {
    switch(*param_2) {
    case 4:
      local_120 = 0;
      local_118 = 0;
      local_110 = 0;
      local_108 = 0;
      local_128 = Proud::ByteArray::vftable;
      local_100 = Proud::AddrPort::vftable;
      local_f8 = param_2[0x2c];
      local_f4 = *(undefined2 *)(param_2 + 0x2d);
      cVar5 = (**(code **)(*(longlong *)param_1[0xeb] + 0x48))
                        ((longlong *)param_1[0xeb],&local_100,param_2 + 0x30,&local_128);
      uVar7 = (**(code **)(*param_1 + 0x58))(param_1);
      local_70 = 0;
      local_78 = uVar7;
      FUN_140156b50(uVar7);
      local_70 = 1;
      if (DAT_1403288ef != '\0') {
        (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::ProcessOneLocalEvent");
      }
      local_188 = Proud::AddrPort::vftable;
      local_180 = param_2[0x2c];
      local_17c = *(undefined2 *)(param_2 + 0x2d);
      lVar8 = FUN_14015dcb0(param_1,&local_188);
      if (lVar8 != 0) {
        if (cVar5 == '\0') {
          FUN_14016caa0(param_1,lVar8,&local_128);
        }
        else {
          FUN_1401768f0();
        }
      }
      FUN_140156be0(uVar7);
      FUN_1401858d0(&local_128);
      break;
    case 5:
      uVar7 = 0;
      if (*(longlong *)(param_2 + 6) != 0) {
        uVar7 = *(undefined8 *)(*(longlong *)(param_2 + 6) + 0x38);
      }
      (**(code **)(*(longlong *)param_1[0xeb] + 0x38))((longlong *)param_1[0xeb],uVar7);
      break;
    case 6:
      uVar7 = 0;
      uVar10 = uVar7;
      if (*(longlong *)(param_2 + 2) != 0) {
        uVar10 = *(undefined8 *)(*(longlong *)(param_2 + 2) + 0x38);
      }
      if (*(longlong *)(param_2 + 6) != 0) {
        uVar7 = *(undefined8 *)(*(longlong *)(param_2 + 6) + 0x38);
      }
      (**(code **)(*(longlong *)param_1[0xeb] + 0x40))
                ((longlong *)param_1[0xeb],uVar7,uVar10,param_2 + 10);
      break;
    case 7:
      puVar9 = (undefined4 *)0x0;
      if (*(longlong *)(param_2 + 2) != 0) {
        puVar9 = *(undefined4 **)(*(longlong *)(param_2 + 2) + 0x38);
      }
      (**(code **)(*(longlong *)param_1[0xeb] + 0x50))
                ((longlong *)param_1[0xeb],param_2[0x1a],param_2[0x1b],*puVar9);
      break;
    case 0xf:
      (**(code **)(*(longlong *)param_1[0xeb] + 0x68))
                ((longlong *)param_1[0xeb],param_2[0x1c],param_2[4]);
      break;
    case 0x10:
      local_e8 = 0;
      local_e0 = 0;
      local_d8 = 0;
      local_d0 = 0;
      local_f0 = Proud::ByteArray::vftable;
      FUN_1401568c0();
      local_res18 = PTR_DAT_1403200a0;
      uVar7 = FUN_140181f50(local_res20,0x10,1,&local_res18,&local_f0);
      (**(code **)(*param_1 + 0x38))(param_1,uVar7);
      puVar4 = local_res18;
      if (((local_res18 != (undefined *)0x0) && (local_res18 != PTR_DAT_1403200a0)) &&
         (puVar1 = local_res18 + -8, puVar1 != (undefined *)0x0)) {
        ppuVar6 = (undefined **)FUN_1401568c0();
        local_180 = local_180 & 0xffffff00;
        local_188 = ppuVar6;
        FUN_140156b50(ppuVar6);
        local_180 = CONCAT31(local_180._1_3_,1);
        piVar2 = (int *)(puVar4 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(puVar1);
        }
        FUN_140156be0(ppuVar6);
      }
      local_res18 = PTR_DAT_1403200a0;
      FUN_1401858d0(&local_f0);
      break;
    case 0x11:
      (**(code **)(*(longlong *)param_1[0xeb] + 0x70))((longlong *)param_1[0xeb],param_2[0x1c]);
      break;
    case 0x13:
      lVar8 = 0;
      local_98 = 0;
      local_90 = 0;
      local_88 = 0;
      local_80 = 0;
      local_a0 = Proud::ByteArray::vftable;
      if (*(longlong *)(param_2 + 2) != 0) {
        lVar8 = *(longlong *)(*(longlong *)(param_2 + 2) + 0x38);
      }
      uVar7 = FUN_140181f50(local_60,0x19,1,lVar8 + 0x10,&local_a0);
      (**(code **)(*param_1 + 0x38))(param_1,uVar7);
      FUN_1401858d0(&local_a0);
      break;
    case 0x14:
      puVar9 = (undefined4 *)0x0;
      local_c0 = 0;
      local_b8 = 0;
      local_b0 = 0;
      local_a8 = 0;
      local_c8 = Proud::ByteArray::vftable;
      lVar8 = *(longlong *)(param_2 + 2);
      puVar3 = puVar9;
      if (lVar8 != 0) {
        puVar9 = *(undefined4 **)(lVar8 + 0x38);
        puVar3 = *(undefined4 **)(lVar8 + 0x38);
      }
      uVar7 = FUN_140181f50(local_50,*puVar9,param_2[0x1c],puVar3 + 4,&local_c8);
      (**(code **)(*param_1 + 0x38))(param_1,uVar7);
      FUN_1401858d0(&local_c8);
      break;
    case 0x15:
      puVar9 = (undefined4 *)0x0;
      local_170 = 0;
      local_168 = 0;
      local_160 = 0;
      local_158 = 0;
      local_178 = Proud::ByteArray::vftable;
      lVar8 = *(longlong *)(param_2 + 2);
      puVar3 = puVar9;
      if (lVar8 != 0) {
        puVar9 = *(undefined4 **)(lVar8 + 0x38);
        puVar3 = *(undefined4 **)(lVar8 + 0x38);
      }
      uVar7 = FUN_140181f50(local_38,*puVar9,param_2[0x1c],puVar3 + 4,&local_178);
      FUN_14016fc90(param_1,uVar7);
      FUN_1401858d0(&local_178);
    }
  }
  return;
}



void FUN_1401773b0(longlong param_1,longlong param_2,char param_3)

{
  longlong *plVar1;
  undefined4 uVar2;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  FUN_140171270(param_2);
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(*plVar1 + 0x18))(plVar1,param_2);
  }
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
  if (((param_3 != '\0') && (*(ulonglong *)(param_1 + 0x20) < *(ulonglong *)(param_1 + 0x40))) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar2 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar2);
  }
  return;
}



void FUN_140177440(longlong param_1,longlong param_2,undefined1 param_3)

{
  uint uVar1;
  ulonglong uVar2;
  uint uVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar1 = *(uint *)(param_1 + 0x28);
  uVar2 = (ulonglong)*(uint *)(param_2 + 0x20) % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x20) == 1) {
    *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    *(undefined8 *)(param_1 + 0x10) = 0;
    *(undefined8 *)(param_1 + 0x18) = 0;
  }
  else {
    uVar3 = (uint)uVar2;
    if (((*(longlong *)(param_2 + 0x18) == 0) ||
        (*(uint *)(*(longlong *)(param_2 + 0x18) + 0x20) % uVar1 != uVar3)) &&
       ((*(longlong *)(param_2 + 0x10) == 0 ||
        (*(uint *)(*(longlong *)(param_2 + 0x10) + 0x20) % uVar1 != uVar3)))) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    }
    else if (param_2 == *(longlong *)(*(longlong *)(param_1 + 8) + (longlong)(int)uVar3 * 8)) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = *(undefined8 *)(param_2 + 0x10);
    }
    if (param_2 == *(longlong *)(param_1 + 0x10)) {
      *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_2 + 0x10);
      *(undefined8 *)(param_2 + 0x18) = 0;
    }
    if (param_2 == *(longlong *)(param_1 + 0x18)) {
      *(undefined8 *)(param_1 + 0x18) = *(undefined8 *)(param_2 + 0x18);
      *(undefined8 *)(param_2 + 0x10) = 0;
    }
    if (*(longlong *)(param_2 + 0x18) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x18) + 0x10) = *(undefined8 *)(param_2 + 0x10);
    }
    if (*(longlong *)(param_2 + 0x10) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x10) + 0x18) = *(undefined8 *)(param_2 + 0x18);
    }
  }
  FUN_1401773b0(param_1,param_2,param_3);
  FUN_14015b3b0(param_1);
  return;
}



void FUN_140177540(longlong param_1)

{
  longlong *plVar1;
  longlong lVar2;
  uint uVar3;
  ulonglong uVar4;
  longlong lVar5;
  longlong lVar6;
  float fVar7;
  float fVar8;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_14015b3b0();
  lVar5 = *(longlong *)(param_1 + 0x10);
  while (lVar5 != 0) {
    lVar6 = *(longlong *)(lVar5 + 0x10);
    if ((*(longlong *)(lVar5 + 8) != 0) &&
       (*(longlong *)(*(longlong *)(lVar5 + 8) + 8) =
             *(longlong *)(*(longlong *)(lVar5 + 8) + 8) + -1,
       *(longlong *)(*(longlong *)(lVar5 + 8) + 8) == 0)) {
      plVar1 = *(longlong **)(lVar5 + 8);
      lVar2 = *plVar1;
      if (lVar2 != 0) {
        FUN_140162160(lVar2);
        FUN_140156970(lVar2);
      }
      FUN_140156970(plVar1);
    }
    plVar1 = *(longlong **)(param_1 + 0x50);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970(lVar5);
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,lVar5);
    }
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    lVar5 = lVar6;
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_14015b3b0(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar3 = FUN_14019e650(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    lVar5 = 0;
    *(uint *)(param_1 + 0x28) = uVar3;
    fVar8 = (float)uVar3 * *(float *)(param_1 + 0x34);
    if ((9.223372e+18 < fVar8) && (fVar8 = fVar8 - 9.223372e+18, fVar8 < 9.223372e+18)) {
      lVar5 = -0x8000000000000000;
    }
    fVar7 = (float)uVar3 * *(float *)(param_1 + 0x30);
    lVar6 = 0;
    *(longlong *)(param_1 + 0x38) = (longlong)fVar8 + lVar5;
    if ((9.223372e+18 < fVar7) && (fVar7 = fVar7 - 9.223372e+18, fVar7 < 9.223372e+18)) {
      lVar6 = -0x8000000000000000;
    }
    uVar4 = (longlong)fVar7 + lVar6;
    if ((ulonglong)((longlong)fVar7 + lVar6) < 0x11) {
      uVar4 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar4;
  }
  FUN_14015b3b0(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



void FUN_1401776d0(longlong *param_1,longlong param_2)

{
  longlong *plVar1;
  
  FUN_140174b20(param_2 + 0x40);
  FUN_1401560e0(param_2 + 0x20);
  if (*(longlong *)(param_2 + 0x28) != 0) {
    if (*(int *)(param_2 + 0x34) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_2 + 0x30) = 0;
  }
  plVar1 = (longlong *)*param_1;
  if (plVar1 == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(*plVar1 + 0x10))(plVar1,param_2);
  }
  param_1[3] = param_1[3] + -1;
  return;
}



undefined4 * FUN_140177740(longlong param_1,undefined4 *param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  undefined4 *puVar4;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar4 = (undefined4 *)FUN_140156940(0x28);
  }
  else {
    puVar4 = (undefined4 *)
             (**(code **)(*plVar1 + 8))(plVar1,0x28,param_3,param_4,0xfffffffffffffffe);
  }
  if (puVar4 != (undefined4 *)0x0) {
    *puVar4 = *param_2;
    *(undefined8 *)(puVar4 + 2) = 0;
    puVar4[8] = param_4;
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015b3b0(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined4 **)(param_1 + 0x10) = puVar4;
    *(undefined4 **)(param_1 + 0x18) = puVar4;
    *(undefined8 *)(puVar4 + 6) = 0;
    *(undefined8 *)(puVar4 + 4) = 0;
  }
  else {
    FUN_14015b3b0(param_1);
    FUN_14015b3b0(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      *(undefined8 *)(puVar4 + 6) = 0;
      *(longlong *)(puVar4 + 4) = lVar2;
      if (lVar2 != 0) {
        *(undefined4 **)(lVar2 + 0x18) = puVar4;
      }
      *(undefined4 **)(param_1 + 0x10) = puVar4;
    }
    else {
      if (*(longlong *)(lVar2 + 0x18) == 0) {
        *(undefined4 **)(param_1 + 0x10) = puVar4;
      }
      else {
        *(undefined4 **)(*(longlong *)(lVar2 + 0x18) + 0x10) = puVar4;
      }
      *(undefined8 *)(puVar4 + 6) = *(undefined8 *)(lVar2 + 0x18);
      *(longlong *)(puVar4 + 4) = lVar2;
      *(undefined4 **)(lVar2 + 0x18) = puVar4;
    }
  }
  *(undefined4 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar4;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b3b0(param_1);
  FUN_14015b3b0(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar3 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar3);
  }
  FUN_14015b3b0(param_1);
  return puVar4;
}



void FUN_140177890(void)

{
  FUN_140177540();
  return;
}



undefined4 *
FUN_1401778b0(longlong param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  
  plVar1 = *(longlong **)(param_1 + 8);
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  *param_2 = (int)plVar1[2];
  FUN_1401544d0(param_2 + 2,plVar1 + 3,param_3,param_4,0xfffffffffffffffe);
  FUN_140176480(param_2 + 0xc,plVar1 + 8);
  lVar2 = *plVar1;
  *(longlong *)(param_1 + 8) = lVar2;
  if (lVar2 == 0) {
    *(undefined8 *)(param_1 + 0x10) = 0;
  }
  else {
    *(undefined8 *)(lVar2 + 8) = 0;
  }
  FUN_1401776d0(param_1,plVar1);
  return param_2;
}



void FUN_140177960(longlong param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  longlong lVar5;
  bool bVar6;
  uint uVar7;
  ulonglong uVar8;
  longlong lVar9;
  float fVar10;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_14015b3b0(param_1,param_2,param_3,param_4,0xfffffffffffffffe);
  lVar9 = *(longlong *)(param_1 + 0x10);
  while (lVar9 != 0) {
    lVar2 = *(longlong *)(lVar9 + 0x10);
    lVar3 = *(longlong *)(lVar9 + 8);
    if (lVar3 != 0) {
      FUN_140156b50(lVar3);
      bVar6 = true;
      plVar1 = (longlong *)(*(longlong *)(lVar9 + 8) + 0x40);
      *plVar1 = *plVar1 + -1;
      if (*(longlong *)(*(longlong *)(lVar9 + 8) + 0x40) == 0) {
        FUN_140156be0(lVar3);
        bVar6 = false;
        lVar4 = *(longlong *)(lVar9 + 8);
        lVar5 = *(longlong *)(lVar4 + 0x38);
        if (lVar5 != 0) {
          FUN_1401617d0(lVar5 + 8);
          FUN_140156970(lVar5);
        }
        FUN_140156c00(lVar4);
        FUN_140156970(lVar4);
      }
      if (bVar6) {
        FUN_140156be0(lVar3);
      }
    }
    plVar1 = *(longlong **)(param_1 + 0x50);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970(lVar9);
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,lVar9);
    }
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    lVar9 = lVar2;
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_14015b3b0(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar7 = FUN_14019e650(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    *(uint *)(param_1 + 0x28) = uVar7;
    fVar10 = (float)uVar7 * *(float *)(param_1 + 0x34);
    lVar9 = 0;
    if ((9.223372e+18 < fVar10) && (fVar10 = fVar10 - 9.223372e+18, fVar10 < 9.223372e+18)) {
      lVar9 = -0x8000000000000000;
    }
    *(longlong *)(param_1 + 0x38) = (longlong)fVar10 + lVar9;
    fVar10 = (float)uVar7 * *(float *)(param_1 + 0x30);
    lVar9 = 0;
    if ((9.223372e+18 < fVar10) && (fVar10 = fVar10 - 9.223372e+18, fVar10 < 9.223372e+18)) {
      lVar9 = -0x8000000000000000;
    }
    uVar8 = (longlong)fVar10 + lVar9;
    if ((ulonglong)((longlong)fVar10 + lVar9) < 0x11) {
      uVar8 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar8;
  }
  FUN_14015b3b0(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



void FUN_140177b40(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  
  lVar1 = param_1[3];
  while( true ) {
    if (lVar1 == 0) {
      param_1[1] = 0;
      param_1[2] = 0;
      return;
    }
    plVar2 = (longlong *)param_1[1];
    if (plVar2 == (longlong *)0x0) break;
    param_1[1] = *plVar2;
    FUN_140174b20(plVar2 + 8);
    FUN_1401560e0(plVar2 + 4);
    if (plVar2[5] != 0) {
      if (*(int *)((longlong)plVar2 + 0x34) < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      *(undefined4 *)(plVar2 + 6) = 0;
    }
    plVar3 = (longlong *)*param_1;
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970(plVar2);
    }
    else {
      (**(code **)(*plVar3 + 0x10))(plVar3,plVar2);
    }
    param_1[3] = param_1[3] + -1;
    lVar1 = param_1[3];
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



undefined8 *
FUN_140177bf0(longlong *param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  
  plVar1 = (longlong *)*param_1;
  if (plVar1 == (longlong *)0x0) {
    puVar2 = (undefined8 *)FUN_140156940(0x128);
  }
  else {
    puVar2 = (undefined8 *)
             (**(code **)(*plVar1 + 8))(plVar1,0x128,param_3,param_4,0xfffffffffffffffe);
  }
  if (puVar2 != (undefined8 *)0x0) {
    *(undefined4 *)(puVar2 + 2) = *param_2;
    FUN_1401544d0(puVar2 + 3,param_2 + 2);
    FUN_140176480(puVar2 + 8,param_2 + 0xc);
  }
  puVar2[1] = param_3;
  *puVar2 = param_4;
  param_1[3] = param_1[3] + 1;
  return puVar2;
}



undefined8 FUN_140177ca0(longlong param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4)

{
  char cVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 8) == 0) {
    cVar1 = FUN_1401a8bb0(param_1,*(undefined4 *)(param_1 + 0x28),1);
    if (cVar1 == '\0') {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  FUN_14015b3b0(param_1);
  uVar2 = FUN_140177740(param_1,param_2,param_3,param_4);
  FUN_14015b3b0(param_1);
  return uVar2;
}



void FUN_140177d20(undefined8 *param_1)

{
  *param_1 = Proud::CP2PGroupMemberBase_S::vftable;
  FUN_140177890();
  return;
}



undefined8 * FUN_140177d40(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CP2PGroupMemberBase_S::vftable;
  FUN_140177890();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



// WARNING: Removing unreachable block (ram,0x000140177de6)
// WARNING: Removing unreachable block (ram,0x000140177def)
// WARNING: Removing unreachable block (ram,0x000140177e0d)
// WARNING: Removing unreachable block (ram,0x000140177e16)

undefined8 * FUN_140177d80(undefined8 *param_1)

{
  *param_1 = Proud::CP2PGroupMemberBase_S::vftable;
  *(undefined1 *)(param_1 + 1) = 0;
  param_1[0xb] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  *(undefined4 *)(param_1 + 6) = 0x11;
  param_1[5] = 0;
  *(undefined4 *)(param_1 + 10) = 0;
  *(undefined4 *)((longlong)param_1 + 0x34) = 0x3f400000;
  *(undefined4 *)(param_1 + 7) = 0x3e800000;
  *(undefined4 *)((longlong)param_1 + 0x3c) = 0x40100000;
  param_1[8] = 0x26;
  param_1[9] = 0;
  return param_1;
}



undefined8 FUN_140177e40(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined1 local_120 [16];
  undefined1 local_110 [8];
  longlong local_108;
  int local_fc;
  undefined1 local_f0 [232];
  
  if (*(longlong *)(param_1 + 0x3f8) == 0) {
    uVar1 = 0;
  }
  else {
    uVar1 = FUN_1401778b0(param_1 + 0x3e0,local_120,param_3,param_4,0xfffffffffffffffe);
    FUN_1401ab440(param_2,uVar1,1);
    FUN_140174b20(local_f0);
    FUN_1401560e0(local_110);
    if ((local_108 != 0) && (local_fc < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    uVar1 = 1;
  }
  return uVar1;
}



void FUN_140177ed0(longlong *param_1)

{
  undefined8 *puVar1;
  
  FUN_140177b40();
  puVar1 = (undefined8 *)*param_1;
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8
FUN_140177f00(longlong *param_1,undefined8 param_2,ulonglong *param_3,undefined8 param_4,
             undefined4 param_5)

{
  longlong lVar1;
  ulonglong uVar2;
  double dVar3;
  longlong *plVar4;
  code *pcVar5;
  undefined1 *puVar6;
  void *pvVar7;
  undefined4 uVar8;
  int iVar9;
  ulonglong uVar10;
  longlong *plVar11;
  undefined8 uVar12;
  longlong lVar13;
  ulonglong *puVar14;
  int *piVar15;
  int *piVar16;
  undefined8 uVar17;
  longlong lVar18;
  uint uVar19;
  undefined1 *puVar20;
  undefined1 *puVar21;
  undefined8 *puVar22;
  int iVar23;
  int iVar24;
  int iVar25;
  int iVar26;
  undefined4 uVar27;
  undefined1 auStack_2aa8 [32];
  int local_2a88 [2];
  undefined8 *local_2a80;
  undefined1 local_2a78 [8];
  ulonglong local_2a70;
  longlong *local_2a68;
  int local_2a60;
  int local_2a5c;
  undefined8 local_2a50;
  undefined8 local_2a48;
  int iStack_2a40;
  undefined4 uStack_2a3c;
  longlong *local_2a38;
  ulonglong *local_2a30;
  longlong local_2a28;
  undefined1 local_2a20;
  int local_2a1c;
  undefined1 local_2a18;
  undefined1 local_2a17;
  int local_2a10;
  undefined8 local_2a08;
  undefined1 local_2a00;
  undefined8 local_29f8;
  undefined1 local_29f0;
  undefined8 local_29e8;
  undefined1 local_29e0;
  undefined8 local_29d8;
  undefined1 local_29d0 [72];
  void *local_2988;
  longlong local_2980;
  ulonglong local_2978;
  longlong local_2970;
  int local_2968 [4];
  undefined1 local_2958 [384];
  void *local_27d8;
  undefined8 local_27d0;
  ulonglong local_27c8;
  undefined8 local_27c0;
  undefined1 *local_2628;
  longlong local_2620;
  ulonglong local_2618;
  undefined8 local_2610;
  undefined1 local_2608 [3200];
  undefined1 local_1988 [3200];
  undefined1 *local_d08;
  undefined4 local_d00;
  int local_cfc;
  undefined4 local_cf8;
  undefined4 uStack_cf4;
  int iStack_cf0;
  undefined4 uStack_cec;
  undefined4 *local_78;
  undefined4 local_70;
  int local_6c;
  ulonglong local_68;
  undefined8 uStack_48;
  
  uStack_48 = 0x140177f17;
  puVar21 = auStack_2aa8;
  local_29d8 = 0xfffffffffffffffe;
  local_68 = DAT_1403223c0 ^ (ulonglong)local_2a88;
  local_2a50 = param_2;
  local_2a48 = param_3;
  local_2a08 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(local_2a08);
  local_2a00 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::Send_BroadcastLayer");
  }
  iVar9 = 0;
  iVar24 = 0;
  if (0 < *(int *)((longlong)param_3 + 4)) {
    iVar24 = *(int *)((longlong)param_3 + 4);
  }
  dVar3 = (double)param_3[1];
  uVar8 = SUB84(dVar3,0);
  uVar27 = (int)((ulonglong)dVar3 >> 0x20);
  if (dVar3 <= 0.0) {
    uVar8 = 0;
    uVar27 = 0;
  }
  local_27d8 = (void *)0x0;
  local_27c0 = 0;
  local_27d0 = 0;
  local_27c8 = 100;
  (**(code **)(*param_1 + 0x50))(param_1,param_5,param_4,&local_27d8);
  local_2628 = (undefined1 *)0x0;
  local_2610 = 0;
  local_2620 = 0;
  local_2618 = 100;
  FUN_140160ae0(param_1,&local_2628,&local_27d8);
  iVar25 = (int)local_2620;
  lVar13 = (longlong)iVar25 * 8;
  uVar2 = lVar13 + 0x10;
  if (uVar2 < 0x401) {
    uVar10 = lVar13 + 0x1f;
    if (uVar10 <= uVar2) {
      uVar10 = 0xffffffffffffff0;
    }
    lVar13 = -(uVar10 & 0xfffffffffffffff0);
    puVar21 = auStack_2aa8 + lVar13;
    local_2a80 = (undefined8 *)((longlong)local_2a88 + lVar13);
    if (local_2a80 != (undefined8 *)0x0) {
      *(undefined4 *)local_2a80 = 0xcccc;
      puVar21 = auStack_2aa8 + lVar13;
LAB_140178088:
      local_2a80 = local_2a80 + 2;
    }
  }
  else {
    local_2a80 = malloc(uVar2);
    if (local_2a80 != (undefined8 *)0x0) {
      *(undefined4 *)local_2a80 = 0xdddd;
      puVar21 = auStack_2aa8;
      goto LAB_140178088;
    }
  }
  lVar13 = (longlong)iVar25 * 8;
  uVar2 = lVar13 + 0x10;
  if (uVar2 < 0x401) {
    uVar10 = lVar13 + 0x1f;
    if (uVar10 <= uVar2) {
      uVar10 = 0xffffffffffffff0;
    }
    *(undefined8 *)(puVar21 + -8) = 0x1401780b6;
    lVar13 = -(uVar10 & 0xfffffffffffffff0);
    puVar20 = puVar21 + lVar13;
    plVar11 = (longlong *)(puVar21 + lVar13 + 0x20);
    puVar21 = puVar21 + lVar13;
    local_2a38 = plVar11;
    if (plVar11 == (longlong *)0x0) goto LAB_1401780ef;
    *(undefined4 *)plVar11 = 0xcccc;
    puVar21 = puVar20;
  }
  else {
    *(undefined8 *)(puVar21 + -8) = 0x1401780d5;
    plVar11 = malloc(uVar2);
    local_2a38 = plVar11;
    if (plVar11 == (longlong *)0x0) goto LAB_1401780ef;
    *(undefined4 *)plVar11 = 0xdddd;
  }
  local_2a38 = plVar11 + 2;
LAB_1401780ef:
  plVar11 = local_2a38;
  local_2a10 = 0;
  iVar23 = 0;
  local_2a88[0] = 0;
  if ((int)*param_3 == 1) {
    puVar22 = local_2a80;
    if (iVar25 < 1) {
      iVar24 = 0;
      iVar9 = 0;
    }
    else {
      do {
        if ((iVar23 < 0) || (local_2620 <= iVar23)) {
                    // WARNING: Subroutine does not return
          *(undefined **)(puVar21 + -8) = &UNK_140178299;
          FUN_1401566b0();
        }
        puVar6 = local_2628;
        if (local_2618 < 0x65) {
          puVar6 = local_2608;
        }
        plVar11 = *(longlong **)(puVar6 + (longlong)iVar23 * 0x20 + 8);
        if ((plVar11 == param_1 + 0xe) && (*(char *)((longlong)param_3 + 0x2d) != '\0')) {
          *(undefined8 *)(puVar21 + -8) = 0x14017816e;
          FUN_1401544a0(local_2a78);
          uVar12 = local_2a50;
          *(undefined8 *)(puVar21 + -8) = 0x14017817c;
          FUN_1401846e0(uVar12,local_2a78);
          *(undefined8 *)(puVar21 + -8) = 0x140178185;
          uVar8 = FUN_1401ab010(local_2a78);
          *(undefined8 *)(puVar21 + -8) = 0x14017819b;
          uVar12 = FUN_140174bb0(&local_2988,local_2a78,uVar8,1);
          lVar13 = param_1[0x8d];
          *(undefined8 *)(puVar21 + -8) = 0x1401781b7;
          lVar13 = FUN_140177bf0(param_1 + 0x8b,uVar12,lVar13,0);
          if ((longlong *)param_1[0x8d] == (longlong *)0x0) {
            param_1[0x8c] = lVar13;
          }
          else {
            *(longlong *)param_1[0x8d] = lVar13;
          }
          param_1[0x8d] = lVar13;
          *(undefined8 *)(puVar21 + -8) = 0x1401781e5;
          FUN_140174b20(local_2958);
          local_2a48 = &local_2978;
          *(undefined8 *)(puVar21 + -8) = 0x1401781fd;
          FUN_1401560e0(&local_2978);
          if ((local_2970 != 0) && (local_2968[1] < 0)) {
                    // WARNING: Subroutine does not return
            *(undefined8 *)(puVar21 + -8) = 0x140178285;
            FUN_1401566b0();
          }
          lVar13 = param_1[0x7c];
          *(undefined8 *)(puVar21 + -8) = 0x14017822a;
          FUN_1401ab5e0(lVar13 + 0x160,param_1 + 0xf);
          local_2a48 = &local_2a70;
          *(undefined8 *)(puVar21 + -8) = 0x14017823c;
          FUN_1401560e0(&local_2a70);
          if (((ulonglong *)local_2a68 != (ulonglong *)0x0) && (local_2a5c < 0)) {
                    // WARNING: Subroutine does not return
            *(undefined **)(puVar21 + -8) = &UNK_14017828b;
            FUN_1401566b0();
          }
        }
        else if (plVar11 != (longlong *)0x0) {
          *(undefined8 *)(puVar21 + -8) = 0x140178259;
          lVar13 = FUN_1401ab570(plVar11);
          if (lVar13 != 0) {
            *(undefined8 *)(puVar21 + -8) = 0x14017826a;
            FUN_1401a37c0(plVar11 + 0x18);
            *puVar22 = plVar11;
            iVar9 = iVar9 + 1;
            puVar22 = puVar22 + 1;
          }
        }
        iVar23 = iVar23 + 1;
        iVar24 = local_2a88[0];
      } while (iVar23 < iVar25);
    }
  }
  else {
    *(undefined8 *)(puVar21 + -8) = 0x1401782b0;
    FUN_14016f500(param_1,&local_2628,iVar24,CONCAT44(uVar27,uVar8));
    iVar25 = 0;
    iVar26 = (int)local_2620;
    param_3 = local_2a48;
    iVar24 = iVar23;
    if (0 < iVar26) {
      do {
        lVar13 = (longlong)iVar25;
        if ((iVar25 < 0) || (local_2620 <= lVar13)) {
                    // WARNING: Subroutine does not return
          *(undefined **)(puVar21 + -8) = &UNK_1401784ac;
          FUN_1401566b0();
        }
        puVar6 = local_2628;
        if (local_2618 < 0x65) {
          puVar6 = local_2608;
        }
        plVar4 = *(longlong **)(puVar6 + lVar13 * 0x20 + 8);
        if ((plVar4 == param_1 + 0xe) && (*(char *)((longlong)local_2a48 + 0x2d) != '\0')) {
          *(undefined8 *)(puVar21 + -8) = 0x140178338;
          FUN_1401544a0(local_2a78);
          uVar12 = local_2a50;
          *(undefined8 *)(puVar21 + -8) = 0x140178346;
          FUN_1401846e0(uVar12,local_2a78);
          *(undefined8 *)(puVar21 + -8) = 0x14017834f;
          uVar8 = FUN_1401ab010(local_2a78);
          *(undefined8 *)(puVar21 + -8) = 0x140178365;
          uVar12 = FUN_140174bb0(&local_2988,local_2a78,uVar8,1);
          lVar13 = param_1[0x8d];
          *(undefined8 *)(puVar21 + -8) = 0x140178381;
          lVar13 = FUN_140177bf0(param_1 + 0x8b,uVar12,lVar13,0);
          if ((longlong *)param_1[0x8d] == (longlong *)0x0) {
            param_1[0x8c] = lVar13;
          }
          else {
            *(longlong *)param_1[0x8d] = lVar13;
          }
          param_1[0x8d] = lVar13;
          *(undefined8 *)(puVar21 + -8) = 0x1401783af;
          FUN_140174b20(local_2958);
          local_2a30 = &local_2978;
          *(undefined8 *)(puVar21 + -8) = 0x1401783c7;
          FUN_1401560e0(&local_2978);
          if ((local_2970 != 0) && (local_2968[1] < 0)) {
                    // WARNING: Subroutine does not return
            *(undefined8 *)(puVar21 + -8) = 0x140178494;
            FUN_1401566b0();
          }
          lVar13 = param_1[0x7c];
          *(undefined8 *)(puVar21 + -8) = 0x1401783f8;
          FUN_1401ab5e0(lVar13 + 0x160,param_1 + 0xf);
          local_2a30 = &local_2a70;
          *(undefined8 *)(puVar21 + -8) = 0x14017840a;
          FUN_1401560e0(&local_2a70);
          if (((ulonglong *)local_2a68 != (ulonglong *)0x0) && (local_2a5c < 0)) {
                    // WARNING: Subroutine does not return
            *(undefined **)(puVar21 + -8) = &UNK_14017849a;
            FUN_1401566b0();
          }
        }
        else if (plVar4 != (longlong *)0x0) {
          *(undefined8 *)(puVar21 + -8) = 0x14017842b;
          lVar18 = FUN_1401ab570(plVar4);
          if (lVar18 != 0) {
            *(undefined8 *)(puVar21 + -8) = 0x14017843b;
            FUN_140172910(param_1,plVar4);
            *(undefined8 *)(puVar21 + -8) = 0x140178447;
            FUN_1401a37c0(plVar4 + 0x18);
            if (local_2620 <= lVar13) {
                    // WARNING: Subroutine does not return
              *(undefined **)(puVar21 + -8) = &UNK_1401784a0;
              FUN_1401566b0();
            }
            puVar6 = local_2628;
            if (local_2618 < 0x65) {
              puVar6 = local_2608;
            }
            *plVar11 = (longlong)(puVar6 + lVar13 * 0x20);
            local_2a88[0] = local_2a88[0] + 1;
            plVar11 = plVar11 + 1;
          }
        }
        iVar25 = iVar25 + 1;
        param_3 = local_2a48;
        iVar24 = local_2a88[0];
        iVar9 = local_2a10;
      } while (iVar25 < iVar26);
    }
  }
  uVar12 = local_2a08;
  lVar13 = 0;
  *(undefined8 *)(puVar21 + -8) = 0x1401784c3;
  FUN_140156be0(uVar12);
  local_2a00 = 0;
  if ((int)*param_3 == 1) {
    if (0 < iVar9) {
      do {
        lVar18 = local_2a80[lVar13];
        pcVar5 = *(code **)(*(longlong *)(lVar18 + 0x108) + 0x10);
        *(undefined8 *)(puVar21 + -8) = 0x1401784f5;
        puVar14 = (ulonglong *)(*pcVar5)();
        local_2a48 = puVar14;
        *(undefined8 *)(puVar21 + -8) = 0x140178504;
        FUN_140156b50(puVar14);
        uVar17 = local_2a50;
        iStack_2a40._0_1_ = 1;
        local_2a30 = (ulonglong *)0x0;
        local_2a28 = CONCAT71(local_2a28._1_7_,1);
        uVar12 = *(undefined8 *)(lVar18 + 0x748);
        *(undefined8 *)(puVar21 + -8) = 0x140178528;
        FUN_1401a3610(uVar12,uVar17,&local_2a30);
        *(undefined8 *)(puVar21 + -8) = 0x140178530;
        FUN_140156be0(puVar14);
        iStack_2a40 = (uint)iStack_2a40._1_3_ << 8;
        *(undefined8 *)(puVar21 + -8) = 0x140178540;
        FUN_1401a37d0(lVar18 + 0xc0);
        lVar13 = lVar13 + 1;
      } while (lVar13 < iVar9);
    }
  }
  else if (0 < iVar24) {
    do {
      piVar16 = (int *)local_2a38[lVar13];
      plVar11 = *(longlong **)(piVar16 + 2);
      if (*(longlong *)(piVar16 + 4) == 0) {
        if (*(longlong *)(piVar16 + 6) == 0) {
          pcVar5 = *(code **)(plVar11[0x21] + 0x10);
          *(undefined8 *)(puVar21 + -8) = 0x140178881;
          uVar17 = (*pcVar5)();
          local_29f8 = uVar17;
          *(undefined8 *)(puVar21 + -8) = 0x140178893;
          FUN_140156b50(uVar17);
          local_29f0 = 1;
          local_2a30 = (ulonglong *)CONCAT44(local_2a30._4_4_,(int)param_3[4]);
          local_2a28 = param_3[3];
          local_2a20 = *(undefined1 *)((longlong)param_3 + 0x2d);
          local_2a1c = (int)param_3[6];
          local_2a18 = *(undefined1 *)((longlong)param_3 + 0x41);
          local_2a17 = (undefined1)param_3[8];
          pcVar5 = *(code **)(*plVar11 + 0x10);
          *(undefined8 *)(puVar21 + -8) = 0x1401788d2;
          uVar8 = (*pcVar5)(plVar11);
          uVar12 = local_2a50;
          *(undefined8 *)(puVar21 + -8) = 0x1401788e8;
          FUN_1401a4be0(plVar11 + 0xe0,uVar8,uVar12,&local_2a30);
          *(undefined8 *)(puVar21 + -8) = 0x1401788f0;
          FUN_140156be0(uVar17);
          local_29f0 = 0;
        }
        else {
          *(undefined8 *)(puVar21 + -8) = 0x14017858b;
          FUN_1401544a0(local_2a78);
          *(undefined8 *)(puVar21 + -8) = 0x140178595;
          FUN_140153d90(local_2a78);
          *(undefined8 *)(puVar21 + -8) = 0x1401785a0;
          FUN_14004fd90(local_2a78,0x22);
          uVar2 = param_3[4];
          *(undefined8 *)(puVar21 + -8) = 0x1401785ae;
          FUN_14004fd90(local_2a78,(char)uVar2);
          uVar2 = param_3[3];
          *(undefined8 *)(puVar21 + -8) = 0x1401785bb;
          FUN_140155b20(local_2a78,uVar2);
          local_2988 = (void *)0x0;
          local_2970 = 0;
          local_2980 = 0;
          local_2978 = 100;
          do {
            lVar18 = local_2980;
            iVar9 = *piVar16;
            if (local_2980 < 0) {
                    // WARNING: Subroutine does not return
              *(undefined8 *)(puVar21 + -8) = 0x140178991;
              FUN_1401566b0();
            }
            lVar1 = local_2980 + 1;
            *(undefined8 *)(puVar21 + -8) = 0x1401785ff;
            FUN_14015d090(&local_2988,lVar1,0xffffffffffffffff);
            if (local_2980 <= lVar18) {
                    // WARNING: Subroutine does not return
              *(undefined **)(puVar21 + -8) = &UNK_14017898b;
              FUN_1401566b0();
            }
            if (local_2978 < 0x65) {
              piVar15 = local_2968 + lVar18;
            }
            else {
              piVar15 = (int *)((longlong)local_2988 + lVar18 * 4);
            }
            *piVar15 = iVar9;
            piVar16 = *(int **)(piVar16 + 6);
          } while (piVar16 != (int *)0x0);
          lVar18 = (longlong)(int)local_2980;
          *(undefined8 *)(puVar21 + -8) = 0x14017864f;
          FUN_140155b20(local_2a78,lVar18);
          if (0 < local_2980) {
            lVar18 = 0;
            puVar14 = (ulonglong *)0x0;
            do {
              if ((lVar18 < 0) || (local_2980 <= lVar18)) {
                    // WARNING: Subroutine does not return
                *(undefined8 *)(puVar21 + -8) = 0x140178919;
                FUN_1401566b0();
              }
              if (local_2978 < 0x65) {
                piVar16 = local_2968 + lVar18;
              }
              else {
                piVar16 = (int *)((longlong)local_2988 + lVar18 * 4);
              }
              iVar9 = *piVar16;
              *(undefined8 *)(puVar21 + -8) = 0x14017869d;
              FUN_14004fe70(local_2a78,iVar9);
              uVar19 = (int)puVar14 + 1;
              puVar14 = (ulonglong *)(ulonglong)uVar19;
              lVar18 = (longlong)(int)uVar19;
            } while (lVar18 < local_2980);
          }
          uVar12 = local_2a50;
          *(undefined8 *)(puVar21 + -8) = 0x1401786ba;
          iVar9 = FUN_1401843d0(uVar12);
          *(undefined8 *)(puVar21 + -8) = 0x1401786c6;
          FUN_140155b20(local_2a78,(longlong)iVar9);
          local_cfc = 200;
          local_d00 = 0;
          local_d08 = local_1988;
          local_6c = 200;
          local_70 = 0;
          local_78 = &local_cf8;
          if (local_2a70 == 0) {
            iVar9 = local_2a60;
            if ((ulonglong *)local_2a68 == (ulonglong *)0x0) {
                    // WARNING: Subroutine does not return
              *(undefined8 *)(puVar21 + -8) = 0x140178985;
              FUN_1401561e0();
            }
          }
          else {
            iVar9 = *(int *)(local_2a70 + 0x18);
          }
          puVar14 = (ulonglong *)local_2a68;
          if ((ulonglong *)local_2a68 == (ulonglong *)0x0) {
            if (local_2a70 == 0) {
                    // WARNING: Subroutine does not return
              *(undefined **)(puVar21 + -8) = &UNK_14017897f;
              FUN_1401561e0();
            }
            puVar14 = (ulonglong *)0x0;
            if (*(int *)(local_2a70 + 0x18) != 0) {
              puVar14 = *(ulonglong **)(local_2a70 + 0x10);
            }
          }
          local_70 = 1;
          local_2a48._0_4_ = SUB84(puVar14,0);
          local_2a48._4_4_ = (undefined4)((ulonglong)puVar14 >> 0x20);
          local_cf8 = (undefined4)local_2a48;
          uStack_cf4 = local_2a48._4_4_;
          uStack_cec = uStack_2a3c;
          local_2a48 = puVar14;
          iStack_2a40 = iVar9;
          *(undefined8 *)(puVar21 + -8) = 0x140178769;
          iStack_cf0 = iVar9;
          FUN_140156ed0(local_1988,&local_cf8);
          if (local_78 == (undefined4 *)0x0) {
            *(undefined8 *)(puVar21 + -8) = 0x140178966;
            FUN_140156300(local_29d0,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
            *(undefined8 *)(puVar21 + -8) = 0x140178979;
            _CxxThrowException(local_29d0,(ThrowInfo *)&DAT_14031d928);
          }
          if (local_6c < 0) {
                    // WARNING: Subroutine does not return
            *(undefined **)(puVar21 + -8) = &UNK_140178952;
            FUN_1401566b0();
          }
          *(undefined8 *)(puVar21 + -8) = 0x140178794;
          FUN_140156ed0(local_1988,uVar12);
          pcVar5 = *(code **)(plVar11[0x21] + 0x10);
          *(undefined8 *)(puVar21 + -8) = 0x1401787a1;
          uVar12 = (*pcVar5)();
          local_29e8 = uVar12;
          *(undefined8 *)(puVar21 + -8) = 0x1401787b3;
          FUN_140156b50(uVar12);
          local_29e0 = 1;
          local_2a30 = (ulonglong *)CONCAT44(local_2a30._4_4_,(int)param_3[4]);
          local_2a28 = param_3[3];
          local_2a20 = *(undefined1 *)((longlong)param_3 + 0x2d);
          local_2a1c = (int)param_3[6];
          local_2a18 = *(undefined1 *)((longlong)param_3 + 0x41);
          local_2a17 = (undefined1)param_3[8];
          *(undefined8 *)(puVar21 + -8) = 0x140178801;
          FUN_1401a4be0(plVar11 + 0xe0,0,local_1988,&local_2a30);
          *(undefined8 *)(puVar21 + -8) = 0x140178809;
          FUN_140156be0(uVar12);
          pvVar7 = local_2988;
          local_29e0 = 0;
          if (local_d08 == (undefined1 *)0x0) {
            *(undefined8 *)(puVar21 + -8) = 0x140178939;
            FUN_140156300(local_29d0,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
            *(undefined8 *)(puVar21 + -8) = 0x14017894c;
            _CxxThrowException(local_29d0,(ThrowInfo *)&DAT_14031d928);
          }
          if (local_cfc < 0) {
                    // WARNING: Subroutine does not return
            *(undefined **)(puVar21 + -8) = &UNK_140178925;
            FUN_1401566b0();
          }
          local_d00 = 0;
          if (100 < local_2978) {
            *(undefined8 *)(puVar21 + -8) = 0x140178847;
            operator_delete__(pvVar7);
          }
          local_2a30 = &local_2a70;
          *(undefined8 *)(puVar21 + -8) = 0x140178859;
          FUN_1401560e0(&local_2a70);
          if (((ulonglong *)local_2a68 != (ulonglong *)0x0) && (local_2a5c < 0)) {
                    // WARNING: Subroutine does not return
            *(undefined8 *)(puVar21 + -8) = 0x14017891f;
            FUN_1401566b0();
          }
        }
      }
      *(undefined8 *)(puVar21 + -8) = 0x140178903;
      FUN_1401a37d0(plVar11 + 0x18);
      lVar13 = lVar13 + 1;
    } while (lVar13 < iVar24);
  }
  if ((local_2a80 != (undefined8 *)0x0) && (piVar16 = (int *)(local_2a80 + -2), *piVar16 == 0xdddd))
  {
    *(undefined8 *)(puVar21 + -8) = 0x1401789ad;
    free(piVar16);
  }
  if ((local_2a38 != (longlong *)0x0) && (plVar11 = local_2a38 + -2, (int)*plVar11 == 0xdddd)) {
    *(undefined8 *)(puVar21 + -8) = 0x1401789c8;
    free(plVar11);
  }
  puVar6 = local_2628;
  if (100 < local_2618) {
    *(undefined8 *)(puVar21 + -8) = 0x1401789df;
    operator_delete__(puVar6);
  }
  pvVar7 = local_27d8;
  if (100 < local_27c8) {
    *(undefined8 *)(puVar21 + -8) = 0x1401789f6;
    operator_delete__(pvVar7);
  }
  *(undefined8 *)(puVar21 + -8) = 0x140178a08;
  return 1;
}



// WARNING: Removing unreachable block (ram,0x000140178c42)
// WARNING: Removing unreachable block (ram,0x000140178c4b)
// WARNING: Removing unreachable block (ram,0x000140178c6c)
// WARNING: Removing unreachable block (ram,0x000140178c75)

undefined8 *
FUN_140178a30(undefined8 *param_1,undefined8 param_2,undefined1 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  undefined4 uVar3;
  undefined8 uVar4;
  undefined8 *local_res10;
  
  FUN_140188390(param_1,param_2,param_3,param_4,0xfffffffffffffffe);
  param_1[0xc] = Proud::IFastSocketDelegate::vftable;
  param_1[0xd] = Proud::ICompletionPortEventSink::vftable;
  param_1[0xe] = Proud::ISendDest_S::vftable;
  FUN_1401ab880(param_1 + 0xf);
  param_1[0x15] = Proud::CNetServer::vftable;
  param_1[0x16] = Proud::ICompletionContext::vftable;
  FUN_140177d80(param_1 + 0x17);
  *param_1 = Proud::CNetServerImpl::vftable;
  param_1[0xc] = Proud::CNetServerImpl::vftable;
  param_1[0xd] = Proud::CNetServerImpl::vftable;
  param_1[0xe] = Proud::CNetServerImpl::vftable;
  param_1[0xf] = Proud::CNetServerImpl::vftable;
  param_1[0x15] = Proud::CNetServerImpl::vftable;
  param_1[0x16] = Proud::CNetServerImpl::vftable;
  param_1[0x17] = Proud::CNetServerImpl::vftable;
  param_1[0x23] = Proud::CNetServerImpl::vftable;
  param_1[0x24] = Proud::CNetServerImpl::vftable;
  uVar3 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x25,uVar3,1);
  uVar3 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x2c,uVar3,1);
  param_1[0x41] = 0;
  FUN_1401568c0();
  param_1[0x42] = PTR_DAT_140320098;
  FUN_1401568c0();
  param_1[0x43] = PTR_DAT_140320098;
  FUN_1401ab900(param_1 + 0x45);
  *(undefined4 *)((longlong)param_1 + 0x26c) = 0;
  *(undefined4 *)(param_1 + 0x4e) = 0;
  *(undefined4 *)((longlong)param_1 + 0x274) = 0;
  *(undefined4 *)(param_1 + 0x4f) = 0;
  *(undefined1 *)(param_1 + 0x50) = 0;
  param_1[0x5a] = 0;
  param_1[0x51] = 0;
  param_1[0x52] = 0;
  param_1[0x53] = 0;
  *(undefined4 *)(param_1 + 0x55) = 0x11;
  param_1[0x54] = 0;
  *(undefined4 *)(param_1 + 0x59) = 0;
  *(undefined4 *)((longlong)param_1 + 0x2ac) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x56) = 0x3e800000;
  *(undefined4 *)((longlong)param_1 + 0x2b4) = 0x40100000;
  param_1[0x57] = 0x26;
  param_1[0x58] = 4;
  param_1[0x58] = 0;
  FUN_140171ce0(param_1 + 0x5b);
  FUN_14019d7a0(param_1 + 0x71);
  param_1[0x7c] = 0;
  *(undefined4 *)(param_1 + 0x7d) = 0;
  *(undefined4 *)((longlong)param_1 + 0x3ec) = 0;
  *(undefined4 *)(param_1 + 0x7e) = 0;
  *(undefined4 *)((longlong)param_1 + 0x3f4) = 0;
  *(undefined1 *)(param_1 + 0x80) = 0;
  param_1[0x8a] = 0;
  param_1[0x81] = 0;
  param_1[0x82] = 0;
  param_1[0x83] = 0;
  *(undefined4 *)(param_1 + 0x85) = 0x11;
  param_1[0x84] = 0;
  *(undefined4 *)(param_1 + 0x89) = 0;
  *(undefined4 *)((longlong)param_1 + 0x42c) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x86) = 0x3e800000;
  *(undefined4 *)((longlong)param_1 + 0x434) = 0x40100000;
  param_1[0x87] = 0x26;
  param_1[0x88] = 4;
  param_1[0x88] = 0;
  param_1[0x8b] = 0;
  param_1[0x8e] = 0;
  param_1[0x8c] = 0;
  param_1[0x8d] = 0;
  param_1[0x8f] = 0;
  FUN_140157ba0(param_1 + 0x90);
  param_1[0x90] = Proud::CNetServerImpl::C2SStub::vftable;
  puVar1 = param_1 + 0x95;
  local_res10 = puVar1;
  FUN_140156ca0(puVar1);
  *puVar1 = ProudS2C::Proxy::vftable;
  if (*(int *)((longlong)param_1 + 0x4bc) != 1) {
    FUN_1401580e0(PTR_u_PIDL_compiler_is_incompatible_to_1403200e0);
  }
  *puVar1 = Proud::CNetServerImpl::Proxy::vftable;
  param_1[0xd9] = Proud::CFastArray<>::vftable;
  param_1[0xda] = 0;
  param_1[0xdb] = 0;
  param_1[0xdc] = 0;
  param_1[0xdd] = 0;
  *(undefined1 *)(param_1 + 0xde) = 0;
  param_1[0xe8] = 0;
  param_1[0xdf] = 0;
  param_1[0xe0] = 0;
  param_1[0xe1] = 0;
  *(undefined4 *)(param_1 + 0xe3) = 0x11;
  param_1[0xe2] = 0;
  *(undefined4 *)(param_1 + 0xe7) = 0;
  *(undefined4 *)((longlong)param_1 + 0x71c) = 0x3f400000;
  *(undefined4 *)(param_1 + 0xe4) = 0x3e800000;
  *(undefined4 *)((longlong)param_1 + 0x724) = 0x40100000;
  param_1[0xe5] = 0x26;
  param_1[0xe6] = 0;
  param_1[0xe9] = 0;
  param_1[0xea] = 0;
  FUN_14018ae00(param_1 + 0xec);
  param_1[0xf1] = 0;
  param_1[0xf2] = 0;
  uVar3 = FUN_14015a430();
  FUN_140156a70(param_1 + 0xf3,uVar3,1);
  uVar3 = FUN_14015a430();
  FUN_140156a70(param_1 + 0xfa,uVar3,1);
  param_1[0x101] = 0;
  param_1[0x102] = 0;
  *(undefined4 *)(param_1 + 0x103) = 0;
  param_1[0x105] = 0;
  param_1[0x106] = 0;
  *(undefined4 *)(param_1 + 0x107) = 0;
  *(undefined4 *)(param_1 + 0x180) = 0;
  param_1[0x183] = 0;
  param_1[0x184] = 0;
  param_1[0x185] = 0;
  param_1[0x186] = 0;
  param_1[0x182] = Proud::ByteArray::vftable;
  *(undefined1 *)(param_1 + 0x187) = 0;
  FUN_1401aa230();
  param_1[0x18b] = 0;
  param_1[0x18c] = 0;
  param_1[0x18d] = 0;
  param_1[0x18e] = 0;
  param_1[0x18a] = Proud::ByteArray::vftable;
  *(undefined1 *)(param_1 + 399) = 0;
  param_1[0x199] = 0;
  param_1[400] = 0;
  param_1[0x191] = 0;
  param_1[0x192] = 0;
  *(undefined4 *)(param_1 + 0x194) = 0x11;
  param_1[0x193] = 0;
  *(undefined4 *)(param_1 + 0x198) = 0;
  *(undefined4 *)((longlong)param_1 + 0xca4) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x195) = 0x3e800000;
  *(undefined4 *)((longlong)param_1 + 0xcac) = 0x40100000;
  param_1[0x196] = 0x26;
  param_1[0x197] = 4;
  param_1[0x197] = 0;
  puVar2 = param_1 + 0x19a;
  local_res10 = puVar2;
  FUN_140187aa0(puVar2);
  FUN_140187bc0(puVar2);
  FUN_14019d7a0(param_1 + 0x2dd);
  FUN_14019d7a0(param_1 + 0x2e8);
  param_1[0x2f4] = Proud::CFastArray<>::vftable;
  param_1[0x2f5] = 0;
  param_1[0x2f6] = 0;
  param_1[0x2f7] = 0;
  param_1[0x2f8] = 0;
  param_1[0x2f9] = Proud::CFastArray<int,1>::vftable;
  param_1[0x2fa] = 0;
  param_1[0x2fb] = 0;
  param_1[0x2fc] = 0;
  param_1[0x2fd] = 0;
  param_1[0x2fe] = 0;
  FUN_1401568c0();
  param_1[0x301] = PTR_DAT_1403200a0;
  param_1[0x309] = Proud::CFastArray<int,0>::vftable;
  param_1[0x30a] = 0;
  param_1[0x30b] = 0;
  param_1[0x30c] = 0;
  param_1[0x30d] = 0;
  uVar4 = FUN_14016cd30(&local_res10);
  FUN_140161b60(param_1 + 0xea,uVar4);
  puVar2 = local_res10;
  if (local_res10 != (undefined8 *)0x0) {
    FUN_140156b50(local_res10);
    local_res10[8] = local_res10[8] + -1;
    if (local_res10[8] == 0) {
      FUN_140156be0(puVar2);
      FUN_14015ec10(local_res10);
    }
    else {
      FUN_140156be0(puVar2);
    }
  }
  *(undefined4 *)(param_1 + 0x44) = DAT_140320d40;
  FUN_1401581d0();
  param_1[0xeb] = 0;
  FUN_14018ae50(param_1 + 0xec);
  FUN_1401887e0(param_1,puVar1);
  FUN_1401889e0(param_1,param_1 + 0x90);
  param_1[0x94] = param_1;
  *(undefined1 *)(param_1 + 0x7f) = 0;
  param_1[0x2ff] = 0x3ff0000000000000;
  FUN_1401f0c30(param_1 + 0x8b);
  *(undefined1 *)(param_1 + 0x300) = 1;
  *(undefined1 *)(param_1 + 0x97) = 1;
  *(undefined1 *)(param_1 + 0x93) = 1;
  FUN_14015c0c0(param_1 + 0x2f9,100);
  *(undefined4 *)(param_1 + 0x2f3) = 0;
  *(undefined4 *)(param_1 + 0x4b) = 0;
  param_1[0x4c] = 0;
  param_1[0xa0] = 0;
  param_1[0xa8] = 0;
  param_1[0xb0] = 0;
  param_1[0xb8] = 0;
  param_1[0xc0] = 0;
  param_1[200] = 0;
  param_1[0xd0] = 0;
  param_1[0xd8] = 0;
  return param_1;
}



undefined8 FUN_140179250(longlong param_1)

{
  undefined8 uVar1;
  
  if (*(double *)(param_1 + 0xe8) != 0.0) {
    return *(undefined8 *)(param_1 + 0xe8);
  }
  uVar1 = FUN_14018aee0(param_1 + 0x648);
  *(undefined8 *)(param_1 + 0xe8) = uVar1;
  return *(undefined8 *)(param_1 + 0xe8);
}



undefined8 FUN_1401792a0(void)

{
  return 1;
}



void thunk_FUN_140188490(longlong *param_1,longlong param_2)

{
  char cVar1;
  int iVar2;
  longlong lVar3;
  longlong lVar4;
  int iVar5;
  longlong lVar6;
  longlong *plVar7;
  longlong lVar8;
  int iVar9;
  undefined1 auStack_68 [80];
  
  cVar1 = (**(code **)(*param_1 + 0x90))();
  if (cVar1 != '\0') {
    FUN_140156300(auStack_68,PTR_u_Already_async_callback_may_occur_140320fd8);
                    // WARNING: Subroutine does not return
    _CxxThrowException(auStack_68,(ThrowInfo *)&DAT_14031d928);
  }
  iVar5 = 0;
  lVar6 = 0;
  if (0 < (int)param_1[4]) {
    plVar7 = param_1 + 1;
    while( true ) {
      if ((lVar6 < 0) || ((int)param_1[4] <= iVar5)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      if (*(longlong *)(param_1[3] + lVar6 * 8) == param_2) break;
      iVar5 = iVar5 + 1;
      lVar6 = lVar6 + 1;
      if ((int)param_1[4] <= iVar5) {
        return;
      }
    }
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    iVar2 = (int)param_1[4] - iVar5;
    iVar9 = 1;
    if (iVar2 < 2) {
      iVar9 = iVar2;
    }
    iVar5 = ((int)param_1[4] - iVar9) - iVar5;
    if (0 < iVar5) {
      lVar8 = (longlong)iVar5;
      lVar6 = lVar6 * 8;
      do {
        lVar3 = FUN_1401a7bb0(plVar7);
        lVar4 = FUN_1401a7bb0(plVar7);
        *(undefined8 *)(lVar4 + lVar6) = *(undefined8 *)((longlong)iVar9 * 8 + lVar3 + lVar6);
        lVar6 = lVar6 + 8;
        lVar8 = lVar8 + -1;
      } while (lVar8 != 0);
    }
    FUN_14015d550(plVar7,(int)param_1[4] - iVar9);
    *(undefined8 *)(param_2 + 8) = 0;
  }
  return;
}



void thunk_FUN_1401c5a30(void)

{
  return;
}



void FUN_1401792d0(longlong param_1)

{
  FUN_140188ba0(param_1 + -0xa8);
  return;
}



longlong FUN_140179300(longlong param_1)

{
  return param_1 + -0x118;
}



void FUN_140179310(longlong param_1)

{
  thunk_FUN_1401885f0(param_1 + -0xa8);
  return;
}



void FUN_140179320(longlong param_1)

{
  FUN_140181810(param_1 + -0x120);
  return;
}



void FUN_140179330(longlong param_1)

{
  thunk_FUN_1401c5a30(param_1 + -0xa8);
  return;
}



void FUN_140179340(longlong param_1)

{
  FUN_140181810(param_1 + -0x68);
  return;
}



void FUN_140179350(longlong param_1)

{
  FUN_1401792a0(param_1 + -0xa8);
  return;
}



void FUN_140179360(longlong param_1)

{
  FUN_140181810(param_1 + -0xa8);
  return;
}



void FUN_140179370(longlong param_1)

{
  thunk_FUN_1401889e0(param_1 + -0xa8);
  return;
}



void FUN_140179380(longlong param_1)

{
  FUN_1401792a0(param_1 + -8);
  return;
}



void FUN_140179390(longlong param_1)

{
  FUN_140181810(param_1 + -0x70);
  return;
}



void FUN_1401793a0(longlong param_1)

{
  FUN_1401792a0(param_1 + -0x48);
  return;
}



void FUN_1401793b0(longlong param_1)

{
  FUN_140181810(param_1 + -0xb0);
  return;
}



void FUN_1401793c0(longlong param_1)

{
  FUN_14015a590(param_1 + -0x120);
  return;
}



void FUN_1401793d0(longlong param_1)

{
  FUN_14015a590(param_1 + -0xa8);
  return;
}



void FUN_1401793e0(longlong param_1)

{
  thunk_FUN_140188490(param_1 + -0xa8);
  return;
}



void FUN_1401793f0(longlong param_1)

{
  FUN_140181810(param_1 + -0x78);
  return;
}



void FUN_140179400(longlong param_1)

{
  FUN_140181810(param_1 + -0xb8);
  return;
}



void FUN_140179410(longlong param_1)

{
  thunk_FUN_140188250(param_1 + -0xa8);
  return;
}



void FUN_140179420(longlong param_1)

{
  thunk_FUN_1401887e0(param_1 + -0xa8);
  return;
}



void FUN_140179430(longlong param_1)

{
  FUN_140181810(param_1 + -0x118);
  return;
}



void FUN_140179440(longlong param_1)

{
  FUN_140181810(param_1 + -0x60);
  return;
}



void FUN_140179450(longlong param_1)

{
  FUN_14015b6b0(param_1 + -0xa8);
  return;
}



void FUN_140179460(longlong param_1)

{
  FUN_14015bb50(param_1 + -0xa8);
  return;
}



void FUN_140179470(longlong param_1)

{
  FUN_1401bab10(param_1 + -0xa8);
  return;
}



void FUN_140179480(longlong param_1)

{
  FUN_1401ba990(param_1 + -0xa8);
  return;
}



void FUN_140179490(longlong param_1)

{
  FUN_140170e20(param_1 + -0xa8);
  return;
}



void FUN_1401794a0(longlong param_1)

{
  FUN_140175640(param_1 + -0xa8);
  return;
}



void FUN_1401794b0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  undefined1 local_128 [8];
  undefined1 local_120 [8];
  longlong local_118;
  int local_10c;
  undefined1 local_100 [232];
  
  uVar3 = 0xfffffffffffffffe;
  if (*(longlong *)(param_1 + 0x3e0) != 0) {
    FUN_1401544a0(local_128);
    FUN_140176480(local_100,param_2,param_3,param_4,uVar3);
    uVar3 = *(undefined8 *)(param_1 + 0x468);
    plVar1 = *(longlong **)(param_1 + 0x458);
    if (plVar1 == (longlong *)0x0) {
      puVar2 = (undefined8 *)FUN_140156940(0x128);
    }
    else {
      puVar2 = (undefined8 *)(**(code **)(*plVar1 + 8))(plVar1,0x128);
    }
    if (puVar2 != (undefined8 *)0x0) {
      *(undefined4 *)(puVar2 + 2) = 0;
      FUN_1401544d0(puVar2 + 3,local_128);
      FUN_140176480(puVar2 + 8,local_100);
    }
    puVar2[1] = uVar3;
    *puVar2 = 0;
    *(longlong *)(param_1 + 0x470) = *(longlong *)(param_1 + 0x470) + 1;
    if (*(undefined8 **)(param_1 + 0x468) == (undefined8 *)0x0) {
      *(undefined8 **)(param_1 + 0x460) = puVar2;
    }
    else {
      **(undefined8 **)(param_1 + 0x468) = puVar2;
    }
    *(undefined8 **)(param_1 + 0x468) = puVar2;
    FUN_140174b20(local_100);
    FUN_1401560e0(local_120);
    if ((local_118 != 0) && (local_10c < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_1401ab5e0(*(longlong *)(param_1 + 0x3e0) + 0x160,param_1 + 0x78);
  }
  return;
}



void FUN_140179610(undefined8 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)

{
  undefined8 *puVar1;
  int *piVar2;
  undefined8 *puVar3;
  undefined8 uVar4;
  longlong lVar5;
  longlong local_158;
  undefined8 *local_150;
  longlong local_148;
  undefined1 local_140;
  undefined **local_138;
  undefined8 local_130;
  undefined8 local_128;
  undefined8 local_120;
  undefined8 local_118;
  undefined4 local_108 [2];
  undefined8 local_100 [2];
  undefined8 local_f0;
  undefined8 local_e8;
  undefined **local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined8 local_b8;
  longlong local_b0;
  ulonglong local_a8;
  undefined4 local_a0;
  undefined4 local_9c;
  undefined4 local_98;
  undefined **local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 local_70;
  undefined **local_60;
  undefined4 local_58;
  undefined2 local_54;
  undefined **local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 local_18;
  
  local_18 = 0xfffffffffffffffe;
  local_100[0] = 0;
  local_f0 = 0;
  local_e8 = 0;
  local_d8 = 0;
  local_d0 = 0;
  local_c8 = 0;
  local_c0 = 0;
  local_e0 = Proud::ByteArray::vftable;
  local_a8 = 0;
  local_b0 = 0;
  local_b8 = 0;
  local_88 = 0;
  local_80 = 0;
  local_78 = 0;
  local_70 = 0;
  local_90 = Proud::ByteArray::vftable;
  local_60 = Proud::AddrPort::vftable;
  local_58 = 0;
  local_54 = 0;
  local_40 = 0;
  local_38 = 0;
  local_30 = 0;
  local_28 = 0;
  local_48 = Proud::ByteArray::vftable;
  local_108[0] = 7;
  local_130 = 0;
  local_128 = 0;
  local_120 = 0;
  local_118 = 0;
  local_138 = Proud::ByteArray::vftable;
  local_a0 = param_2;
  local_9c = param_3;
  local_98 = param_3;
  FUN_1401568c0();
  local_150 = (undefined8 *)PTR_DAT_1403200a0;
  uVar4 = FUN_140181f50(&local_158,param_4,0,&local_150,&local_138);
  FUN_14016dca0(local_100,uVar4);
  lVar5 = local_158;
  if (local_158 != 0) {
    local_148 = local_158;
    FUN_140156b50(local_158);
    local_140 = 1;
    *(longlong *)(local_158 + 0x40) = *(longlong *)(local_158 + 0x40) + -1;
    if (*(longlong *)(local_158 + 0x40) == 0) {
      FUN_140156be0(lVar5);
      local_140 = 0;
      FUN_14013c4c0(local_158);
    }
    else {
      FUN_140156be0(lVar5);
    }
  }
  puVar3 = local_150;
  if (((local_150 != (undefined8 *)0x0) && (local_150 != (undefined8 *)PTR_DAT_1403200a0)) &&
     (puVar1 = local_150 + -1, puVar1 != (undefined8 *)0x0)) {
    lVar5 = FUN_1401568c0();
    local_148 = lVar5;
    FUN_140156b50(lVar5);
    local_140 = 1;
    piVar2 = (int *)((longlong)puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(lVar5);
  }
  local_150 = (undefined8 *)PTR_DAT_1403200a0;
  FUN_1401858d0(&local_138);
  FUN_1401794b0(param_1,local_108);
  FUN_1401858d0(&local_48);
  FUN_1401858d0(&local_90);
  local_150 = &local_b8;
  FUN_1401560e0(&local_b8);
  if (local_b0 != 0) {
    if ((longlong)local_a8 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_a8 = local_a8 & 0xffffffff00000000;
  }
  FUN_1401858d0(&local_e0);
  FUN_140174710(&local_e8);
  FUN_140174690(&local_f0);
  FUN_14013c530(local_100);
  return;
}



// WARNING: Removing unreachable block (ram,0x000140179928)
// WARNING: Removing unreachable block (ram,0x000140179931)
// WARNING: Removing unreachable block (ram,0x00014017994f)
// WARNING: Removing unreachable block (ram,0x000140179958)
// WARNING: Removing unreachable block (ram,0x0001401799e5)
// WARNING: Removing unreachable block (ram,0x0001401799ec)
// WARNING: Removing unreachable block (ram,0x0001401799f4)
// WARNING: Removing unreachable block (ram,0x000140179a01)
// WARNING: Removing unreachable block (ram,0x0001401799f9)
// WARNING: Removing unreachable block (ram,0x000140179a07)
// WARNING: Removing unreachable block (ram,0x000140179a18)
// WARNING: Removing unreachable block (ram,0x000140179c1a)

void FUN_140179860(undefined8 param_1,undefined4 *param_2,uint param_3,undefined4 param_4)

{
  uint *puVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  ulonglong uVar5;
  longlong *plVar6;
  char cVar7;
  uint *puVar8;
  longlong lVar9;
  longlong lVar10;
  int iVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  undefined4 *puVar14;
  uint uVar15;
  ulonglong uVar16;
  undefined4 *puVar17;
  ulonglong uVar18;
  undefined4 *puVar19;
  undefined **local_e8;
  longlong *local_e0;
  ulonglong local_d8;
  ulonglong local_d0;
  undefined8 local_c8;
  undefined1 local_b8 [8];
  longlong local_b0;
  undefined4 *local_a8;
  undefined8 local_a0;
  longlong local_98;
  uint local_90;
  undefined4 local_8c;
  undefined4 local_88;
  undefined4 local_84;
  undefined8 local_80;
  undefined8 local_78;
  undefined4 local_70;
  undefined8 local_68;
  undefined8 local_58;
  
  local_58 = 0xfffffffffffffffe;
  local_e8 = Proud::CFastArray<int,0>::vftable;
  uVar12 = 0;
  iVar11 = 0;
  local_e0 = (longlong *)0x0;
  local_d8 = 0;
  local_d0 = 0;
  local_c8 = 0;
  local_b8[0] = 0;
  local_68 = 0;
  local_b0 = 0;
  local_a8 = (undefined4 *)0x0;
  local_a0 = 0;
  local_90 = 0x11;
  local_98 = 0;
  local_70 = 0;
  local_8c = 0x3f400000;
  local_88 = 0x3e800000;
  local_84 = 0x40100000;
  local_80 = 0x26;
  local_78 = 0;
  iVar2 = param_2[0x38];
  uVar18 = uVar12;
  plVar6 = local_e0;
  do {
    iVar2 = iVar2 + -1;
    local_e0 = plVar6;
    if (iVar2 < 0) {
      uVar13 = 0;
      puVar19 = (undefined4 *)0x0;
      uVar12 = uVar13;
      if (0 < iVar11) {
        do {
          if (((longlong)uVar13 < 0) || (iVar11 <= (int)uVar12)) {
                    // WARNING: Subroutine does not return
            FUN_1401566e0();
          }
          iVar2 = *(int *)(uVar18 + uVar13 * 4);
          lVar10 = (longlong)iVar2;
          iVar3 = param_2[0x38];
          lVar9 = (longlong)iVar3;
          if ((iVar2 < 0) || (iVar3 <= iVar2)) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          if (iVar2 < iVar3 + -1) {
            puVar14 = puVar19;
            puVar17 = puVar19;
            if (iVar3 != 0) {
              puVar14 = *(undefined4 **)(param_2 + 0x36);
              puVar17 = *(undefined4 **)(param_2 + 0x36);
            }
            *(undefined8 *)(puVar17 + lVar10 * 6) = *(undefined8 *)(puVar14 + lVar9 * 6 + -6);
            *(undefined8 *)(puVar17 + lVar10 * 6 + 2) = *(undefined8 *)(puVar14 + lVar9 * 6 + -4);
            *(undefined8 *)(puVar17 + lVar10 * 6 + 4) = *(undefined8 *)(puVar14 + lVar9 * 6 + -2);
          }
          FUN_14015c9c0(param_2 + 0x32,iVar3 + -1);
          uVar15 = (int)uVar12 + 1;
          uVar13 = uVar13 + 1;
          uVar12 = (ulonglong)uVar15;
        } while ((int)uVar15 < iVar11);
      }
      puVar14 = local_a8;
      if (local_98 == 0) {
        puVar14 = puVar19;
      }
      for (; puVar14 != (undefined4 *)0x0; puVar14 = *(undefined4 **)(puVar14 + 2)) {
        uVar4 = *puVar14;
        cVar7 = FUN_1401aabb0(param_2 + 0x32,uVar4);
        if (cVar7 == '\0') {
          FUN_140179610(param_1,*param_2,uVar4,param_4);
        }
      }
      FUN_1401617d0(local_b8);
      if (uVar18 != 0) {
        if (plVar6 == (longlong *)0x0) {
          FUN_140156970(uVar18);
        }
        else {
          (**(code **)(*plVar6 + 0x18))(plVar6,uVar18);
        }
      }
      return;
    }
    if ((iVar2 < 0) || ((int)param_2[0x38] <= iVar2)) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    puVar1 = (uint *)(*(longlong *)(param_2 + 0x36) + (longlong)iVar2 * 0x18);
    if ((*puVar1 == param_3) || (puVar1[1] == param_3)) {
      iVar11 = (int)uVar12;
      if (iVar11 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      FUN_14013c2c0(&local_e8);
      uVar18 = local_d8;
      uVar12 = local_d0 & 0xffffffff;
      uVar13 = local_d8;
      if ((int)local_d0 == 0) {
        uVar13 = 0;
      }
      *(int *)(uVar13 + (longlong)iVar11 * 4) = iVar2;
      uVar15 = *puVar1;
      uVar16 = (ulonglong)local_90;
      uVar13 = (ulonglong)uVar15 % uVar16;
      if (local_b0 != 0) {
        for (puVar8 = *(uint **)(local_b0 + uVar13 * 8);
            (puVar8 != (uint *)0x0 && ((uint)uVar13 == puVar8[6] % local_90));
            puVar8 = *(uint **)(puVar8 + 2)) {
          if (*puVar8 == uVar15) goto LAB_140179ae6;
        }
      }
      uVar5 = (ulonglong)uVar15 % uVar16;
      if (local_b0 == 0) {
        cVar7 = FUN_1401a8bb0(local_b8,uVar16,CONCAT71((int7)(uVar13 >> 8),1));
        if (cVar7 == '\0') {
                    // WARNING: Subroutine does not return
          FUN_14004ea80(0x8007000e);
        }
      }
      else {
        for (puVar8 = *(uint **)(local_b0 + uVar5 * 8);
            (puVar8 != (uint *)0x0 && ((uint)uVar5 == puVar8[6] % local_90));
            puVar8 = *(uint **)(puVar8 + 2)) {
          if (*puVar8 == uVar15) goto LAB_140179ad8;
        }
      }
      FUN_14015ce40(local_b8);
      puVar8 = (uint *)FUN_14015ec60(local_b8,puVar1,uVar5,uVar15);
      FUN_14015ce40(local_b8);
LAB_140179ad8:
      *(undefined1 *)(puVar8 + 1) = 0;
    }
LAB_140179ae6:
    iVar11 = (int)uVar12;
    plVar6 = local_e0;
  } while( true );
}



longlong FUN_140179c70(void)

{
  void *pvVar1;
  longlong lVar2;
  
  pvVar1 = operator_new(0x1880);
  lVar2 = 0;
  if (pvVar1 != (void *)0x0) {
    lVar2 = FUN_140178a30(pvVar1);
  }
  if (lVar2 != 0) {
    lVar2 = lVar2 + 0xa8;
  }
  return lVar2;
}



undefined8
FUN_140179cb0(ulonglong param_1,uint param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,undefined4 *param_6,char *param_7)

{
  undefined4 uVar1;
  longlong lVar2;
  undefined2 uVar3;
  char cVar4;
  int iVar5;
  uint *puVar6;
  char *pcVar7;
  undefined8 uVar8;
  undefined8 uVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  longlong *plVar14;
  ulonglong uVar15;
  longlong lVar16;
  ulonglong *puVar17;
  ulonglong uVar18;
  double dVar19;
  ulonglong local_res8;
  uint local_res10 [2];
  ulonglong *local_188;
  undefined1 local_180;
  undefined1 local_17f;
  undefined1 local_17e [6];
  ulonglong *local_178;
  ulonglong local_170;
  ulonglong local_168 [2];
  undefined8 local_158;
  undefined1 local_150;
  ulonglong local_148 [2];
  undefined4 local_138;
  undefined **local_130;
  undefined4 local_128;
  undefined2 local_124;
  undefined **local_120;
  undefined4 local_118;
  undefined2 local_114;
  undefined1 local_110;
  undefined4 local_108;
  undefined **local_100;
  undefined4 local_f8;
  undefined2 local_f4;
  undefined **local_f0;
  undefined4 local_e8;
  undefined2 local_e4;
  undefined1 local_e0;
  undefined4 local_d8;
  undefined **local_d0;
  undefined4 local_c8;
  undefined2 local_c4;
  undefined **local_c0;
  undefined4 local_b8;
  undefined2 local_b4;
  undefined1 local_b0;
  undefined8 local_a8;
  undefined1 local_a0 [16];
  undefined1 local_90 [16];
  undefined1 local_80 [16];
  undefined1 local_70 [16];
  undefined1 local_60 [16];
  undefined1 local_50 [24];
  
  local_a8 = 0xfffffffffffffffe;
  local_res8 = param_1;
  local_res10[0] = param_2;
  local_158 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(local_158);
  local_150 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))
              (*(longlong **)(param_1 + 0x20),
               L"Proud::CNetServerImpl::C2SStub::P2PGroup_MemberJoin_Ack");
  }
  FUN_140174d90(*(undefined8 *)(param_1 + 0x20),&local_178,*param_4);
  uVar18 = 0;
  if (((local_178 != (ulonglong *)0x0) && (*local_178 != 0)) &&
     (cVar4 = FUN_1401aac20(*local_178 + 200,local_res10[0],*param_5,*param_6), cVar4 == '\x01')) {
    uVar12 = uVar18;
    if (local_178 != (ulonglong *)0x0) {
      uVar12 = *local_178;
    }
    cVar4 = FUN_1401aab30(uVar12 + 200,*param_5,*param_6);
    if (cVar4 == '\0') {
      FUN_140179610(*(undefined8 *)(param_1 + 0x20),*param_4,*param_5,0);
    }
  }
  FUN_14016da80(*(longlong *)(param_1 + 0x20) + 0x2d8,&local_188,local_res10[0],*param_5);
  if ((local_188 == (ulonglong *)0x0) || (uVar12 = *local_188, uVar12 == 0)) {
    if ((local_188 != (ulonglong *)0x0) && (local_188[1] = local_188[1] - 1, local_188[1] == 0)) {
      FUN_14015ebb0(local_188);
    }
    if ((local_178 != (ulonglong *)0x0) && (local_178[1] = local_178[1] - 1, local_178[1] == 0)) {
      uVar18 = *local_178;
      if (uVar18 != 0) {
        FUN_140162160(uVar18);
        FUN_140156970(uVar18);
      }
      FUN_140156970(local_178);
    }
    goto LAB_14017a366;
  }
  if (*(char *)(uVar12 + 0x1a0) != '\0') {
    puVar6 = (uint *)(uVar12 + 0x10);
    uVar13 = uVar18;
    uVar15 = uVar18;
    do {
      if (*puVar6 == local_res10[0]) {
        *(undefined1 *)(uVar12 + 0x38 + (longlong)(int)uVar15 * 0x30) = 1;
        break;
      }
      uVar15 = (ulonglong)((int)uVar15 + 1);
      uVar13 = uVar13 + 1;
      puVar6 = puVar6 + 0xc;
    } while ((longlong)uVar13 < 2);
    uVar13 = (ulonglong)local_res10[0];
    uVar12 = uVar18;
    if (local_188 != (ulonglong *)0x0) {
      uVar12 = *local_188;
    }
    dVar19 = 0.0;
    if ((*(double *)(uVar12 + 400) != 0.0) && (*param_7 != '\0')) {
      uVar12 = uVar18;
      if (local_188 != (ulonglong *)0x0) {
        uVar12 = *local_188;
      }
      FUN_14015bc90(uVar12,uVar13);
      uVar13 = (ulonglong)local_res10[0];
    }
    uVar12 = uVar18;
    if (local_188 != (ulonglong *)0x0) {
      uVar12 = *local_188;
    }
    pcVar7 = (char *)(uVar12 + 0x38);
    lVar16 = 2;
    uVar12 = uVar18;
    do {
      if (*pcVar7 != '\0') {
        uVar12 = (ulonglong)((int)uVar12 + 1);
      }
      pcVar7 = pcVar7 + 0x30;
      lVar16 = lVar16 + -1;
    } while (lVar16 != 0);
    if ((int)uVar12 == 2) {
      uVar12 = uVar18;
      if (local_188 != (ulonglong *)0x0) {
        uVar12 = *local_188;
      }
      if (*(double *)(uVar12 + 400) == dVar19) {
LAB_14017a0a5:
        local_res8 = local_res8 & 0xffffffffffffff00;
        plVar14 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x4a8);
        (**(code **)(*plVar14 + 0x50))
                  (plVar14,uVar13 & 0xffffffff,&DAT_140328530,param_5,&local_res8,
                   &PTR_vftable_140320448,&PTR_vftable_140320448,&PTR_vftable_140320448,
                   &PTR_vftable_140320448);
        local_17f = 0;
        plVar14 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x4a8);
        (**(code **)(*plVar14 + 0x50))
                  (plVar14,*param_5,&DAT_140328530,local_res10,&local_17f,&PTR_vftable_140320448,
                   &PTR_vftable_140320448,&PTR_vftable_140320448,&PTR_vftable_140320448);
        uVar3 = DAT_140320454;
        uVar1 = DAT_140320450;
        uVar12 = uVar18;
        if (local_188 != (ulonglong *)0x0) {
          uVar12 = *local_188;
        }
        if (*(char *)(uVar12 + 8) != '\x01') {
          *(undefined4 *)(uVar12 + 0x10) = 0;
          *(undefined4 *)(uVar12 + 0x20) = uVar1;
          *(undefined2 *)(uVar12 + 0x24) = uVar3;
          *(undefined4 *)(uVar12 + 0x30) = uVar1;
          *(undefined2 *)(uVar12 + 0x34) = uVar3;
          *(undefined1 *)(uVar12 + 0x38) = 0;
          uVar3 = DAT_140320454;
          uVar1 = DAT_140320450;
          local_d0 = Proud::AddrPort::vftable;
          local_c0 = Proud::AddrPort::vftable;
          local_d8 = 0;
          local_b0 = 0;
          local_c8 = DAT_140320450;
          local_c4 = DAT_140320454;
          local_b8 = DAT_140320450;
          local_b4 = DAT_140320454;
          *(undefined4 *)(uVar12 + 0x40) = 0;
          *(undefined4 *)(uVar12 + 0x50) = uVar1;
          *(undefined2 *)(uVar12 + 0x54) = uVar3;
          *(undefined4 *)(uVar12 + 0x60) = uVar1;
          *(undefined2 *)(uVar12 + 100) = uVar3;
          *(undefined1 *)(uVar12 + 0x68) = 0;
          *(undefined1 *)(uVar12 + 8) = 1;
        }
        uVar3 = DAT_140320454;
        uVar1 = DAT_140320450;
        uVar12 = uVar18;
        if (local_188 != (ulonglong *)0x0) {
          uVar12 = *local_188;
        }
        local_100 = Proud::AddrPort::vftable;
        local_f0 = Proud::AddrPort::vftable;
        local_108 = 0;
        local_e0 = 0;
        local_f8 = DAT_140320450;
        local_f4 = DAT_140320454;
        local_e8 = DAT_140320450;
        local_e4 = DAT_140320454;
        *(undefined4 *)(uVar12 + 0x10) = 0;
        *(undefined4 *)(uVar12 + 0x20) = uVar1;
        *(undefined2 *)(uVar12 + 0x24) = uVar3;
        *(undefined4 *)(uVar12 + 0x30) = uVar1;
        *(undefined2 *)(uVar12 + 0x34) = uVar3;
        *(undefined1 *)(uVar12 + 0x38) = 0;
        uVar3 = DAT_140320454;
        uVar1 = DAT_140320450;
        local_130 = Proud::AddrPort::vftable;
        local_120 = Proud::AddrPort::vftable;
        local_138 = 0;
        local_110 = 0;
        local_128 = DAT_140320450;
        local_124 = DAT_140320454;
        local_118 = DAT_140320450;
        local_114 = DAT_140320454;
        *(undefined4 *)(uVar12 + 0x40) = 0;
        *(undefined4 *)(uVar12 + 0x50) = uVar1;
        *(undefined2 *)(uVar12 + 0x54) = uVar3;
        *(undefined4 *)(uVar12 + 0x60) = uVar1;
        *(undefined2 *)(uVar12 + 100) = uVar3;
        *(undefined1 *)(uVar12 + 0x68) = 0;
        uVar12 = uVar18;
        if (local_188 != (ulonglong *)0x0) {
          uVar12 = *local_188;
        }
        *(undefined8 *)(uVar12 + 0x198) = 0;
      }
      else {
        uVar12 = uVar18;
        if (local_188 != (ulonglong *)0x0) {
          uVar12 = *local_188;
        }
        puVar17 = local_188;
        iVar5 = FUN_14015aa20(uVar12);
        if (iVar5 != 2) goto LAB_14017a0a5;
        local_180 = 1;
        if (puVar17 == (ulonglong *)0x0) {
          local_148[0] = 0;
        }
        else {
          local_148[0] = *puVar17;
        }
        uVar1 = *param_5;
        lVar16 = *(longlong *)(param_1 + 0x20);
        lVar2 = *(longlong *)(lVar16 + 0x4a8);
        local_170 = local_148[0];
        local_168[0] = local_148[0];
        uVar8 = FUN_14015ad90(local_148[0],local_50,local_res10[0]);
        uVar9 = FUN_14015ad10(local_148[0],local_90);
        uVar10 = FUN_14015a9a0(local_170,local_148,uVar1);
        uVar11 = FUN_14015a8a0(local_168[0],local_70);
        (**(code **)(lVar2 + 0x50))
                  (lVar16 + 0x4a8,local_res10[0],&DAT_140328530,param_5,&local_180,uVar11,uVar10,
                   uVar9,uVar8);
        local_17e[0] = 1;
        if (local_188 == (ulonglong *)0x0) {
          local_168[0] = 0;
        }
        else {
          local_168[0] = *local_188;
        }
        uVar12 = local_168[0];
        uVar1 = *param_5;
        lVar16 = *(longlong *)(local_res8 + 0x20);
        lVar2 = *(longlong *)(lVar16 + 0x4a8);
        local_170 = local_168[0];
        uVar8 = FUN_14015ad90(local_168[0],local_a0,uVar1);
        uVar9 = FUN_14015ad10(uVar12,local_80);
        uVar10 = FUN_14015a9a0(local_168[0],local_60,local_res10[0]);
        uVar11 = FUN_14015a8a0(local_170,local_168);
        (**(code **)(lVar2 + 0x50))
                  (lVar16 + 0x4a8,uVar1,&DAT_140328530,local_res10,local_17e,uVar11,uVar10,uVar9,
                   uVar8);
        uVar12 = uVar18;
        if (local_188 != (ulonglong *)0x0) {
          uVar12 = *local_188;
        }
        if (*(char *)(uVar12 + 8) != '\0') {
          *(undefined1 *)(uVar12 + 8) = 0;
        }
      }
      uVar12 = uVar18;
      if (local_188 != (ulonglong *)0x0) {
        uVar12 = *local_188;
      }
      *(undefined8 *)(uVar12 + 400) = 0;
      if (local_188 != (ulonglong *)0x0) {
        uVar18 = *local_188;
      }
      *(undefined1 *)(uVar18 + 0x1a0) = 0;
    }
  }
  if ((local_188 != (ulonglong *)0x0) && (local_188[1] = local_188[1] - 1, local_188[1] == 0)) {
    FUN_14015ebb0(local_188);
  }
  if ((local_178 != (ulonglong *)0x0) && (local_178[1] = local_178[1] - 1, local_178[1] == 0)) {
    uVar18 = *local_178;
    if (uVar18 != 0) {
      FUN_140162160(uVar18);
      FUN_140156970(uVar18);
    }
    FUN_140156970(local_178);
  }
LAB_14017a366:
  FUN_140156be0(local_158);
  return 1;
}



void FUN_14017a390(longlong param_1,longlong param_2)

{
  longlong *plVar1;
  uint uVar2;
  uint uVar3;
  longlong lVar4;
  ulonglong uVar5;
  bool bVar6;
  longlong lVar7;
  longlong *plVar8;
  undefined8 uVar9;
  uint *puVar10;
  longlong lVar11;
  uint *puVar12;
  longlong lVar13;
  longlong local_res8 [2];
  longlong *local_res18;
  longlong local_res20;
  
  FUN_140177960(param_2);
  uVar9 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
  FUN_140156b50(uVar9);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::GetP2PGroups");
  }
  if (*(longlong *)(param_1 + 0x378) == 0) {
    lVar13 = 0;
  }
  else {
    lVar13 = *(longlong *)(param_1 + 0x368);
  }
  do {
    if (lVar13 == 0) {
      FUN_140156be0(uVar9);
      return;
    }
    if (lVar13 == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    local_res18 = (longlong *)0x0;
    if (*(longlong *)(lVar13 + 8) != 0) {
      *(longlong *)(*(longlong *)(lVar13 + 8) + 8) =
           *(longlong *)(*(longlong *)(lVar13 + 8) + 8) + 1;
      local_res18 = *(longlong **)(lVar13 + 8);
    }
    plVar1 = local_res18;
    if (local_res18 == (longlong *)0x0) {
      lVar11 = 0;
    }
    else {
      lVar11 = *local_res18;
    }
    FUN_1401aaf90(lVar11);
    if (local_res8[0] == 0) {
      puVar12 = (uint *)0x0;
    }
    else {
      puVar12 = *(uint **)(local_res8[0] + 0x38);
    }
    uVar2 = *puVar12;
    uVar3 = *(uint *)(param_2 + 0x28);
    uVar5 = (ulonglong)uVar2 % (ulonglong)uVar3;
    lVar11 = *(longlong *)(param_2 + 8);
    if (lVar11 != 0) {
      for (puVar10 = *(uint **)(lVar11 + uVar5 * 8);
          (puVar10 != (uint *)0x0 && ((uint)uVar5 == puVar10[8] % uVar3));
          puVar10 = *(uint **)(puVar10 + 4)) {
        if (*puVar10 == uVar2) goto LAB_14017a532;
      }
    }
    uVar5 = (ulonglong)uVar2 % (ulonglong)uVar3;
    if (lVar11 != 0) {
      for (puVar10 = *(uint **)(lVar11 + uVar5 * 8);
          (puVar10 != (uint *)0x0 && ((uint)uVar5 == puVar10[8] % uVar3));
          puVar10 = *(uint **)(puVar10 + 4)) {
        if (*puVar10 == uVar2) goto LAB_14017a519;
      }
    }
    puVar10 = (uint *)FUN_140177ca0(param_2,puVar12);
LAB_14017a519:
    FUN_140172fb0(puVar10 + 2,local_res8);
LAB_14017a532:
    lVar11 = local_res8[0];
    if (local_res8[0] != 0) {
      FUN_140156b50(local_res8[0]);
      bVar6 = true;
      *(longlong *)(local_res8[0] + 0x40) = *(longlong *)(local_res8[0] + 0x40) + -1;
      if (*(longlong *)(local_res8[0] + 0x40) == 0) {
        FUN_140156be0(lVar11);
        lVar7 = local_res8[0];
        bVar6 = false;
        local_res20 = local_res8[0];
        lVar4 = *(longlong *)(local_res8[0] + 0x38);
        if (lVar4 != 0) {
          FUN_1401617d0(lVar4 + 8);
          FUN_140156970(lVar4);
        }
        FUN_140156c00(lVar7);
        FUN_140156970(lVar7);
      }
      if (bVar6) {
        FUN_140156be0(lVar11);
      }
    }
    plVar8 = local_res18;
    if (plVar1 != (longlong *)0x0) {
      plVar1 = plVar1 + 1;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        lVar11 = *local_res18;
        if (lVar11 != 0) {
          FUN_140162160(lVar11);
          FUN_140156970(lVar11);
        }
        FUN_140156970(plVar8);
      }
    }
    if (lVar13 != 0) {
      lVar13 = *(longlong *)(lVar13 + 0x10);
    }
  } while( true );
}



// WARNING: Removing unreachable block (ram,0x00014017a8fd)

void FUN_14017a640(longlong *param_1)

{
  longlong *plVar1;
  undefined4 uVar2;
  int iVar3;
  char cVar4;
  undefined8 uVar5;
  undefined4 *puVar6;
  undefined4 *puVar7;
  longlong lVar8;
  longlong lVar9;
  undefined4 *puVar10;
  int iVar11;
  undefined4 *puVar12;
  undefined4 *puVar13;
  int iVar14;
  undefined4 *puVar15;
  longlong lVar16;
  longlong lVar17;
  double dVar18;
  longlong *local_res18;
  
  uVar5 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar5);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::PurgeTooOldAddMemberAckItem");
  }
  dVar18 = (double)FUN_14018aee0(param_1 + 0xec);
  puVar12 = (undefined4 *)0x0;
  puVar13 = puVar12;
  if (param_1[0x84] != 0) {
    puVar13 = (undefined4 *)param_1[0x82];
  }
  do {
    if (puVar13 == (undefined4 *)0x0) {
LAB_14017a908:
      FUN_140156be0(uVar5);
      return;
    }
    local_res18 = (longlong *)0x0;
    puVar7 = puVar12;
    puVar10 = puVar12;
    puVar15 = puVar12;
    if (*(longlong *)(puVar13 + 2) != 0) {
      *(longlong *)(*(longlong *)(puVar13 + 2) + 8) =
           *(longlong *)(*(longlong *)(puVar13 + 2) + 8) + 1;
      local_res18 = *(longlong **)(puVar13 + 2);
    }
    while( true ) {
      puVar6 = puVar12;
      if (local_res18 != (longlong *)0x0) {
        puVar6 = (undefined4 *)*local_res18;
      }
      iVar14 = (int)puVar7;
      if ((int)puVar6[0x38] <= iVar14) break;
      puVar7 = puVar12;
      if (local_res18 != (longlong *)0x0) {
        puVar7 = (undefined4 *)*local_res18;
      }
      if (((longlong)puVar10 < 0) || ((int)puVar7[0x38] <= iVar14)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      if (DAT_140320cd8 <
          dVar18 - *(double *)((longlong)puVar15 + *(longlong *)(puVar7 + 0x36) + 0x10)) {
        uVar2 = *(undefined4 *)((longlong)puVar15 + *(longlong *)(puVar7 + 0x36));
        puVar13 = puVar12;
        if (local_res18 != (longlong *)0x0) {
          puVar13 = (undefined4 *)*local_res18;
        }
        puVar7 = puVar13 + 0x32;
        iVar11 = 1;
        if (iVar14 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        iVar3 = puVar13[0x38];
        if (iVar3 - iVar14 < 2) {
          iVar11 = iVar3 - iVar14;
        }
        iVar14 = (iVar3 - iVar11) - iVar14;
        if (0 < iVar14) {
          lVar17 = (longlong)iVar14;
          lVar16 = (longlong)puVar10 * 0x18;
          do {
            lVar8 = FUN_1401a7bb0(puVar7);
            lVar8 = lVar8 + (longlong)iVar11 * 0x18;
            lVar9 = FUN_1401a7bb0(puVar7);
            *(undefined8 *)(lVar9 + lVar16) = *(undefined8 *)(lVar8 + lVar16);
            *(undefined8 *)(lVar9 + 8 + lVar16) = *(undefined8 *)(lVar8 + 8 + lVar16);
            *(undefined8 *)(lVar9 + 0x10 + lVar16) = *(undefined8 *)(lVar8 + 0x10 + lVar16);
            lVar16 = lVar16 + 0x18;
            lVar17 = lVar17 + -1;
          } while (lVar17 != 0);
        }
        FUN_14015c9c0(puVar7,puVar13[0x38] - iVar11);
        puVar13 = puVar12;
        if (local_res18 != (longlong *)0x0) {
          puVar13 = (undefined4 *)*local_res18;
        }
        cVar4 = FUN_1401aabb0(puVar13 + 0x32,uVar2);
        if (cVar4 == '\0') {
          if (local_res18 != (longlong *)0x0) {
            puVar12 = (undefined4 *)*local_res18;
          }
          FUN_140179610(param_1,*puVar12,uVar2,7);
        }
        if (local_res18 != (longlong *)0x0) {
          plVar1 = local_res18 + 1;
          *plVar1 = *plVar1 + -1;
          if (*plVar1 == 0) {
            lVar16 = *local_res18;
            if (lVar16 != 0) {
              FUN_140162160(lVar16);
              FUN_140156970(lVar16);
            }
            FUN_140156970(local_res18);
          }
        }
        goto LAB_14017a908;
      }
      puVar7 = (undefined4 *)(ulonglong)(iVar14 + 1);
      puVar10 = (undefined4 *)((longlong)puVar10 + 1);
      puVar15 = puVar15 + 6;
    }
    if (local_res18 != (longlong *)0x0) {
      plVar1 = local_res18 + 1;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        lVar16 = *local_res18;
        if (lVar16 != 0) {
          FUN_140162160(lVar16);
          FUN_140156970(lVar16);
        }
        FUN_140156970(local_res18);
      }
    }
    if (puVar13 == (undefined4 *)0x0) {
      puVar13 = (undefined4 *)0x0;
    }
    else {
      puVar13 = *(undefined4 **)(puVar13 + 4);
    }
  } while( true );
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x00014017b5b1)
// WARNING: Removing unreachable block (ram,0x00014017b5c4)
// WARNING: Removing unreachable block (ram,0x00014017b5e2)
// WARNING: Type propagation algorithm not settling

undefined8
FUN_14017a930(longlong param_1,uint param_2,uint param_3,undefined8 param_4,undefined4 param_5)

{
  int *piVar1;
  uint uVar2;
  undefined4 uVar3;
  undefined8 *puVar4;
  ulonglong uVar5;
  undefined2 uVar6;
  undefined8 *puVar7;
  char cVar8;
  int iVar9;
  undefined4 uVar10;
  undefined4 uVar11;
  uint *puVar12;
  longlong *plVar13;
  longlong *plVar14;
  longlong *plVar15;
  void *pvVar16;
  undefined4 *puVar17;
  undefined1 *puVar18;
  undefined8 uVar19;
  double dVar20;
  longlong *plVar21;
  undefined8 *puVar22;
  undefined8 *puVar23;
  longlong lVar24;
  undefined ***pppuVar25;
  undefined ***pppuVar26;
  undefined *puVar27;
  undefined *puVar28;
  longlong *plVar29;
  uint uVar30;
  double dVar31;
  undefined1 auStack_708 [32];
  uint *local_6e8;
  undefined8 local_6e0;
  undefined4 *local_6d8;
  undefined ***local_6d0;
  undefined ***local_6c8;
  longlong *local_6c0;
  undefined4 *local_6b8;
  longlong *local_6b0;
  undefined2 *local_6a8;
  uint local_698;
  char local_694;
  char local_693;
  undefined4 local_690;
  uint local_68c;
  longlong *local_688;
  longlong *local_680;
  uint local_678 [2];
  undefined4 local_670 [2];
  longlong local_668;
  undefined8 *local_660;
  undefined8 *local_658;
  undefined ***local_650;
  undefined8 local_648;
  longlong *local_640;
  undefined4 local_638 [2];
  longlong *local_630;
  undefined4 local_628 [2];
  longlong *local_620;
  undefined4 local_618;
  undefined4 local_614;
  longlong *local_610;
  undefined ***local_608;
  undefined *local_5f8;
  undefined *local_5f0;
  uint local_5e8 [2];
  longlong local_5e0;
  longlong local_5d8;
  uint local_5d0 [2];
  undefined *local_5c8;
  undefined4 *local_5c0;
  longlong local_5b8;
  longlong *local_5b0;
  undefined **local_5a8;
  undefined8 local_5a0;
  longlong *local_598;
  undefined8 local_590;
  undefined4 local_588;
  undefined4 local_584;
  undefined **local_580;
  undefined8 local_578;
  longlong *local_570;
  undefined8 local_568;
  undefined4 local_560;
  undefined4 local_55c;
  undefined **local_558;
  undefined8 local_550;
  longlong *local_548;
  undefined8 local_540;
  undefined4 local_538;
  undefined4 local_534;
  undefined **local_530;
  undefined8 local_528;
  longlong *local_520;
  undefined8 local_518;
  undefined4 local_510;
  undefined4 local_50c;
  double local_508;
  undefined1 local_500;
  longlong *local_4f8;
  longlong *local_4f0;
  double local_4e8;
  undefined8 local_4e0;
  undefined **local_4d8;
  undefined8 local_4d0;
  undefined8 local_4c8;
  undefined8 local_4c0;
  undefined8 local_4b8;
  undefined **local_4b0;
  undefined8 local_4a8;
  undefined8 local_4a0;
  undefined8 local_498;
  undefined8 local_490;
  undefined **local_488;
  undefined8 local_480;
  undefined8 local_478;
  undefined8 local_470;
  undefined8 local_468;
  undefined **local_460;
  undefined8 local_458;
  undefined8 local_450;
  undefined8 local_448;
  undefined8 local_440;
  undefined **local_438;
  undefined8 local_430;
  undefined8 local_428;
  undefined8 local_420;
  undefined8 local_418;
  undefined **local_410;
  undefined8 local_408;
  undefined8 local_400;
  undefined8 local_3f8;
  undefined8 local_3f0;
  undefined8 local_3e8;
  undefined1 local_3e0;
  undefined8 local_3d8;
  undefined1 local_3d0;
  undefined4 local_3b8;
  undefined **local_3b0;
  undefined4 local_3a8;
  undefined2 local_3a4;
  undefined **local_3a0;
  undefined4 local_398;
  undefined2 local_394;
  undefined1 local_390;
  undefined4 local_388;
  undefined **local_380;
  undefined4 local_378;
  undefined2 local_374;
  undefined **local_370;
  undefined4 local_368;
  undefined2 local_364;
  undefined1 local_360;
  undefined4 local_358;
  undefined **local_350;
  undefined4 local_348;
  undefined2 local_344;
  undefined **local_340;
  undefined4 local_338;
  undefined2 local_334;
  undefined1 local_330;
  undefined8 local_320;
  undefined1 local_318 [16];
  undefined1 local_308 [288];
  undefined4 local_1e8;
  undefined4 local_1e4;
  undefined4 local_1e0;
  undefined4 local_1dc;
  undefined4 local_1d8;
  undefined4 local_1d4;
  undefined4 local_1d0;
  undefined4 local_1cc;
  undefined4 local_1c8;
  undefined4 local_1c4;
  undefined4 local_1c0;
  undefined4 local_1bc;
  undefined4 local_1b8;
  undefined4 local_1b4;
  undefined4 local_1b0;
  undefined4 local_1ac;
  undefined4 local_1a8;
  uint local_1a4;
  undefined4 local_1a0;
  double local_198;
  uint local_190;
  undefined4 local_18c;
  undefined4 local_188;
  double local_180;
  undefined1 local_178 [288];
  ulonglong local_58;
  
  local_320 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_708;
  plVar29 = (longlong *)0x0;
  local_698 = 0;
  local_68c = param_2;
  local_678[0] = param_3;
  local_668 = param_1;
  local_648 = param_4;
  local_5b8 = param_1;
  local_4e0 = param_4;
  FUN_140174d90();
  if ((local_688 == (longlong *)0x0) || (*local_688 == 0)) {
    if ((local_688 != (longlong *)0x0) && (local_688[1] = local_688[1] + -1, local_688[1] == 0)) {
      lVar24 = *local_688;
      if (lVar24 != 0) {
        FUN_140162160(lVar24);
        FUN_140156970(lVar24);
      }
      FUN_140156970(local_688);
    }
LAB_14017c5fb:
    FUN_1401858d0(param_4);
    return 0;
  }
  local_670[0] = param_5;
  uVar30 = *(uint *)(*local_688 + 0x30);
  uVar5 = (ulonglong)local_68c % (ulonglong)uVar30;
  lVar24 = *(longlong *)(*local_688 + 0x10);
  if (lVar24 != 0) {
    for (puVar12 = *(uint **)(lVar24 + uVar5 * 8);
        (puVar12 != (uint *)0x0 && ((uint)uVar5 == puVar12[10] % uVar30));
        puVar12 = *(uint **)(puVar12 + 6)) {
      if (*puVar12 == local_68c) {
        FUN_140179610(param_1,local_678[0],(ulonglong)local_68c,0x11);
        if ((local_688 != (longlong *)0x0) && (local_688[1] = local_688[1] + -1, local_688[1] == 0))
        {
          lVar24 = *local_688;
          if (lVar24 != 0) {
            FUN_140162160(lVar24);
            FUN_140156970(lVar24);
          }
          FUN_140156970(local_688);
        }
        FUN_1401858d0(param_4);
        return 1;
      }
    }
  }
  if ((*(char *)(param_1 + 0x24c) == '\0') || (local_68c != 1)) {
    plVar21 = local_688;
    lVar24 = FUN_14015f740(param_1,local_68c);
    if ((lVar24 == 0) ||
       ((puVar23 = (undefined8 *)(lVar24 + 0x40), local_658 = puVar23, puVar23 == (undefined8 *)0x0
        || (cVar8 = FUN_1401616a0(param_1), cVar8 != '\0')))) {
      plVar21[1] = plVar21[1] + -1;
      if (local_688[1] == 0) {
        lVar24 = *local_688;
        if (lVar24 != 0) {
          FUN_140162160(lVar24);
          FUN_140156970(lVar24);
        }
        FUN_140156970(local_688);
      }
      goto LAB_14017c5fb;
    }
  }
  else {
    puVar23 = (undefined8 *)(param_1 + 0xb8);
    local_658 = puVar23;
  }
  dVar31 = (double)FUN_14018aee0(param_1 + 0x760);
  uVar30 = local_68c;
  local_693 = '\0';
  plVar21 = plVar29;
  if (local_688 != (longlong *)0x0) {
    plVar21 = (longlong *)*local_688;
  }
  plVar13 = plVar21 + 1;
  uVar2 = *(uint *)(plVar21 + 6);
  uVar5 = (ulonglong)local_68c % (ulonglong)uVar2;
  lVar24 = plVar21[2];
  local_508 = dVar31;
  local_4e8 = dVar31;
  if (lVar24 != 0) {
    for (puVar12 = *(uint **)(lVar24 + uVar5 * 8);
        (puVar12 != (uint *)0x0 && ((uint)uVar5 == puVar12[10] % uVar2));
        puVar12 = *(uint **)(puVar12 + 6)) {
      if (*puVar12 == local_68c) goto LAB_14017ac13;
    }
    if (lVar24 != 0) {
      for (puVar12 = *(uint **)(lVar24 + uVar5 * 8);
          (puVar12 != (uint *)0x0 && ((uint)uVar5 == puVar12[10] % uVar2));
          puVar12 = *(uint **)(puVar12 + 6)) {
        if (*puVar12 == local_68c) goto LAB_14017abfb;
      }
    }
  }
  if ((lVar24 == 0) && (cVar8 = FUN_1401a8bb0(plVar13,(ulonglong)uVar2,1), cVar8 == '\0')) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x8007000e);
  }
  FUN_14015b050(plVar13);
  puVar12 = (uint *)FUN_14015eda0(plVar13,&local_68c,uVar5,uVar30);
  FUN_14015b050(plVar13);
LAB_14017abfb:
  *(double *)(puVar12 + 2) = local_508;
  *(undefined8 **)(puVar12 + 4) = puVar23;
LAB_14017ac13:
  local_630 = (longlong *)0x0;
  plVar21 = plVar29;
  if (local_688 != (longlong *)0x0) {
    local_688[1] = local_688[1] + 1;
    local_630 = local_688;
    plVar21 = (longlong *)(ulonglong)local_698;
  }
  uVar30 = *(uint *)(puVar23 + 6);
  uVar5 = (ulonglong)local_678[0] % (ulonglong)uVar30;
  lVar24 = puVar23[2];
  if (lVar24 != 0) {
    for (puVar12 = *(uint **)(lVar24 + uVar5 * 8);
        (puVar12 != (uint *)0x0 && ((uint)uVar5 == puVar12[8] % uVar30));
        puVar12 = *(uint **)(puVar12 + 4)) {
      if (*puVar12 == local_678[0]) goto LAB_14017ad94;
    }
    if (lVar24 != 0) {
      for (puVar12 = *(uint **)(lVar24 + uVar5 * 8);
          (puVar12 != (uint *)0x0 && ((uint)uVar5 == puVar12[8] % uVar30));
          puVar12 = *(uint **)(puVar12 + 4)) {
        if (*puVar12 == local_678[0]) goto LAB_14017ad0e;
      }
      if (lVar24 != 0) goto LAB_14017acd5;
    }
  }
  cVar8 = FUN_1401a8bb0(puVar23 + 1,(ulonglong)uVar30,1);
  if (cVar8 == '\0') {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x8007000e);
  }
LAB_14017acd5:
  FUN_14015b3b0(puVar23 + 1);
  puVar12 = (uint *)FUN_1401c2e90(puVar23 + 1,local_678,uVar5,local_678[0]);
  FUN_14015b3b0(puVar23 + 1);
LAB_14017ad0e:
  if (local_630 != *(longlong **)(puVar12 + 2)) {
    if (local_630 != (longlong *)0x0) {
      local_630[1] = local_630[1] + 1;
      plVar21 = (longlong *)(ulonglong)local_698;
    }
    plVar13 = plVar29;
    if (*(longlong *)(puVar12 + 2) != 0) {
      *(longlong *)(*(longlong *)(puVar12 + 2) + 8) =
           *(longlong *)(*(longlong *)(puVar12 + 2) + 8) + -1;
      plVar21 = (longlong *)(ulonglong)local_698;
      if (*(longlong *)(*(longlong *)(puVar12 + 2) + 8) == 0) {
        plVar13 = *(longlong **)(puVar12 + 2);
      }
    }
    *(longlong **)(puVar12 + 2) = local_630;
    if (plVar13 != (longlong *)0x0) {
      lVar24 = *plVar13;
      if (lVar24 != 0) {
        FUN_140162160(lVar24);
        FUN_140156970(lVar24);
      }
      FUN_140156970(plVar13);
    }
  }
LAB_14017ad94:
  plVar13 = plVar29;
  if (local_688 != (longlong *)0x0) {
    plVar13 = (longlong *)*local_688;
  }
  local_5b0 = plVar13 + 1;
  local_4f8 = plVar29;
  local_4f0 = local_5b0;
  if (plVar13[5] != 0) {
    local_4f8 = (longlong *)plVar13[3];
  }
  do {
    plVar13 = plVar29;
    if (local_688 != (longlong *)0x0) {
      plVar13 = (longlong *)*local_688;
    }
    local_620 = local_4f8;
    if ((local_4f8 == (longlong *)0x0) && (local_5b0 == plVar13 + 1)) {
      if (local_688 != (longlong *)0x0) {
        plVar29 = (longlong *)*local_688;
      }
      FUN_14016a150(param_1,plVar29);
      if (local_693 == '\0') {
        FUN_140179610(param_1,local_678[0],1);
      }
      plVar29 = local_630;
      if (local_630 != (longlong *)0x0) {
        plVar21 = local_630 + 1;
        *plVar21 = *plVar21 + -1;
        if (*plVar21 == 0) {
          lVar24 = *local_630;
          if (lVar24 != 0) {
            FUN_140162160(lVar24);
            FUN_140156970(lVar24);
          }
          FUN_140156970(plVar29);
        }
      }
      if ((local_688 != (longlong *)0x0) && (local_688[1] = local_688[1] + -1, local_688[1] == 0)) {
        lVar24 = *local_688;
        if (lVar24 != 0) {
          FUN_140162160(lVar24);
          FUN_140156970(lVar24);
        }
        FUN_140156970(local_688);
      }
      FUN_1401858d0(local_648);
      return 1;
    }
    if (local_4f8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    puVar23 = (undefined8 *)local_4f8[2];
    local_660 = puVar23;
    if (puVar23 != (undefined8 *)(param_1 + 0xb8)) {
      local_190 = local_68c;
      local_18c = (**(code **)*puVar23)(puVar23);
      local_188 = local_670[0];
      plVar13 = plVar29;
      if (local_688 != (longlong *)0x0) {
        plVar13 = (longlong *)*local_688;
      }
      local_180 = dVar31;
      FUN_14015cf70(plVar13 + 0x19,(int)plVar13[0x1c],&local_190,1);
      local_693 = '\x01';
    }
    if ((local_658 != (undefined8 *)(param_1 + 0xb8)) && (local_658 != puVar23)) {
      local_1a8 = (**(code **)*puVar23)(puVar23);
      local_1a4 = local_68c;
      local_1a0 = local_670[0];
      plVar13 = plVar29;
      if (local_688 != (longlong *)0x0) {
        plVar13 = (longlong *)*local_688;
      }
      local_198 = dVar31;
      FUN_14015cf70(plVar13 + 0x19,(int)plVar13[0x1c],&local_1a8,1);
      local_693 = '\x01';
    }
    local_694 = '\0';
    local_690._0_2_ = 0;
    local_680 = (longlong *)0x0;
    iVar9 = (**(code **)*puVar23)(puVar23);
    plVar13 = plVar29;
    cVar8 = '\0';
    if ((iVar9 != 1) && (iVar9 = (**(code **)*local_658)(), puVar7 = local_658, iVar9 != 1)) {
      pppuVar26 = (undefined ***)(local_658 + -8);
      lVar24 = local_668 + 0x2d8;
      local_650 = (undefined ***)(puVar23 + -8);
      local_608 = pppuVar26;
      plVar14 = (longlong *)
                FUN_14016da80(lVar24,&local_5e0,*(undefined4 *)(puVar23 + 0xd7),
                              *(undefined4 *)(local_658 + 0xd7));
      if (*plVar14 != 0) {
        *(longlong *)(*plVar14 + 8) = *(longlong *)(*plVar14 + 8) + 1;
        plVar13 = (longlong *)*plVar14;
        plVar21 = (longlong *)(ulonglong)local_698;
        local_680 = plVar13;
      }
      if (local_5e0 != 0) {
        *(longlong *)(local_5e0 + 8) = *(longlong *)(local_5e0 + 8) + -1;
        if (*(longlong *)(local_5e0 + 8) == 0) {
          FUN_14015ebb0(local_5e0);
        }
        plVar21 = (longlong *)(ulonglong)local_698;
        plVar13 = local_680;
      }
      if ((plVar13 == (longlong *)0x0) || (*plVar13 == 0)) {
        local_6e8 = (uint *)CONCAT71(local_6e8._1_7_,1);
        plVar15 = (longlong *)
                  FUN_140172bc0(lVar24,&local_5d8,*(undefined4 *)(puVar23 + 0xd7),
                                *(undefined4 *)(puVar7 + 0xd7));
        plVar14 = (longlong *)*plVar15;
        if (plVar14 != plVar13) {
          if (plVar14 != (longlong *)0x0) {
            *(longlong *)(*plVar15 + 8) = plVar14[1] + 1;
            plVar21 = (longlong *)(ulonglong)local_698;
            plVar13 = local_680;
          }
          plVar14 = plVar29;
          if (plVar13 != (longlong *)0x0) {
            plVar13 = plVar13 + 1;
            *plVar13 = *plVar13 + -1;
            if (*plVar13 == 0) {
              plVar14 = local_680;
            }
            plVar21 = (longlong *)(ulonglong)local_698;
          }
          plVar13 = (longlong *)*plVar15;
          local_680 = plVar13;
          if (plVar14 != (longlong *)0x0) {
            FUN_14015ebb0();
          }
        }
        if (local_5d8 != 0) {
          *(longlong *)(local_5d8 + 8) = *(longlong *)(local_5d8 + 8) + -1;
          if (*(longlong *)(local_5d8 + 8) == 0) {
            FUN_14015ebb0(local_5d8);
          }
          plVar21 = (longlong *)(ulonglong)local_698;
          plVar13 = local_680;
        }
        if (((plVar13 == (longlong *)0x0) || (*plVar13 == 0)) ||
           (DAT_140320d10 < dVar31 - *(double *)(*plVar13 + 400))) {
          pvVar16 = operator_new(0x1b0);
          if ((pvVar16 == (void *)0x0) ||
             (lVar24 = FUN_14015dd20(pvVar16,local_668,
                                     *(int *)(puVar23 + 0xd7) == *(int *)(puVar7 + 0xd7)),
             lVar24 == 0)) {
            local_610 = (longlong *)0x0;
          }
          else {
            local_610 = (longlong *)FUN_140156940(0x10);
            local_610[1] = 1;
            *local_610 = lVar24;
          }
          plVar14 = local_610;
          if (local_610 != plVar13) {
            if (local_610 != (longlong *)0x0) {
              local_610[1] = local_610[1] + 1;
              plVar21 = (longlong *)(ulonglong)local_698;
              plVar13 = local_680;
            }
            plVar15 = plVar29;
            if (plVar13 != (longlong *)0x0) {
              plVar13 = plVar13 + 1;
              *plVar13 = *plVar13 + -1;
              if (*plVar13 == 0) {
                plVar15 = local_680;
              }
              plVar21 = (longlong *)(ulonglong)local_698;
            }
            plVar13 = plVar14;
            local_680 = local_610;
            if (plVar15 != (longlong *)0x0) {
              FUN_14015ebb0();
            }
          }
          if (plVar14 != (longlong *)0x0) {
            plVar14 = plVar14 + 1;
            *plVar14 = *plVar14 + -1;
            if (*plVar14 == 0) {
              FUN_14015ebb0(local_610);
            }
            plVar21 = (longlong *)(ulonglong)local_698;
            plVar13 = local_680;
          }
          lVar24 = local_668;
          uVar6 = DAT_140320454;
          uVar11 = DAT_140320450;
          plVar14 = plVar29;
          if (plVar13 != (longlong *)0x0) {
            plVar14 = (longlong *)*plVar13;
          }
          if ((char)plVar14[1] != '\x01') {
            *(undefined4 *)(plVar14 + 2) = 0;
            *(undefined4 *)(plVar14 + 4) = uVar11;
            *(undefined2 *)((longlong)plVar14 + 0x24) = uVar6;
            *(undefined4 *)(plVar14 + 6) = uVar11;
            *(undefined2 *)((longlong)plVar14 + 0x34) = uVar6;
            *(undefined1 *)(plVar14 + 7) = 0;
            uVar6 = DAT_140320454;
            uVar11 = DAT_140320450;
            local_350 = Proud::AddrPort::vftable;
            local_340 = Proud::AddrPort::vftable;
            local_358 = 0;
            local_330 = 0;
            local_348 = DAT_140320450;
            local_344 = DAT_140320454;
            local_338 = DAT_140320450;
            local_334 = DAT_140320454;
            *(undefined4 *)(plVar14 + 8) = 0;
            *(undefined4 *)(plVar14 + 10) = uVar11;
            *(undefined2 *)((longlong)plVar14 + 0x54) = uVar6;
            *(undefined4 *)(plVar14 + 0xc) = uVar11;
            *(undefined2 *)((longlong)plVar14 + 100) = uVar6;
            *(undefined1 *)(plVar14 + 0xd) = 0;
            *(undefined1 *)(plVar14 + 1) = 1;
          }
          if (*(char *)(local_668 + 0x24d) == '\0') {
            local_4a8 = 0;
            local_4a0 = 0;
            local_498 = 0;
            local_490 = 0;
            local_4b0 = Proud::ByteArray::vftable;
            plVar14 = plVar29;
            if (plVar13 != (longlong *)0x0) {
              plVar14 = (longlong *)*plVar13;
            }
            FUN_14015f450(plVar14 + 0x24,&local_4b0);
            FUN_1401858d0(&local_4b0);
            local_480 = 0;
            local_478 = 0;
            local_470 = 0;
            local_468 = 0;
            local_488 = Proud::ByteArray::vftable;
            plVar14 = plVar29;
            if (plVar13 != (longlong *)0x0) {
              plVar14 = (longlong *)*plVar13;
            }
            FUN_14015f450(plVar14 + 0x29,&local_488);
            FUN_1401858d0(&local_488);
          }
          else {
            plVar14 = plVar29;
            if (plVar13 != (longlong *)0x0) {
              plVar14 = (longlong *)*plVar13;
            }
            FUN_1401aa370(plVar14 + 0x24,*(undefined4 *)(local_668 + 0x244));
            plVar14 = plVar29;
            if (plVar13 != (longlong *)0x0) {
              plVar14 = (longlong *)*plVar13;
            }
            FUN_1401aa370(plVar14 + 0x29,*(undefined4 *)(lVar24 + 0x248));
          }
          plVar14 = plVar29;
          if (plVar13 != (longlong *)0x0) {
            plVar14 = (longlong *)*plVar13;
          }
          uVar11 = FUN_1401ab970(lVar24 + 0xcd0);
          *(undefined4 *)(plVar14 + 0x2e) = uVar11;
          plVar14 = plVar29;
          if (plVar13 != (longlong *)0x0) {
            plVar14 = (longlong *)*plVar13;
          }
          puVar17 = (undefined4 *)FUN_1401a4b40(lVar24 + 0xcd0,local_178);
          *(undefined4 *)((longlong)plVar14 + 0x174) = *puVar17;
          *(undefined4 *)(plVar14 + 0x2f) = puVar17[1];
          *(undefined4 *)((longlong)plVar14 + 0x17c) = puVar17[2];
          *(undefined4 *)(plVar14 + 0x30) = puVar17[3];
          puVar22 = local_660;
        }
        else {
          local_694 = '\x01';
          puVar22 = puVar23;
        }
        cVar8 = local_694;
        plVar14 = plVar29;
        if (plVar13 != (longlong *)0x0) {
          plVar14 = (longlong *)*plVar13;
        }
        *(undefined4 *)((longlong)plVar14 + 0x114) = 1;
        local_640 = (longlong *)0x0;
        if (plVar13 != (longlong *)0x0) {
          plVar13[1] = plVar13[1] + 1;
          local_640 = local_680;
          plVar21 = (longlong *)(ulonglong)local_698;
        }
        plVar13 = local_640;
        FUN_140174510(local_668 + 0x2d8,puVar23 + -8,pppuVar26,&local_640);
        uVar6 = DAT_140320454;
        uVar11 = DAT_140320450;
        plVar14 = plVar29;
        if (plVar13 != (longlong *)0x0) {
          plVar14 = (longlong *)*plVar13;
        }
        uVar10 = *(undefined4 *)(puVar7 + 0xd7);
        uVar3 = *(undefined4 *)(puVar23 + 0xd7);
        local_380 = Proud::AddrPort::vftable;
        local_370 = Proud::AddrPort::vftable;
        local_388 = 0;
        local_360 = 0;
        local_378 = DAT_140320450;
        local_374 = DAT_140320454;
        local_368 = DAT_140320450;
        local_364 = DAT_140320454;
        *(undefined4 *)(plVar14 + 4) = DAT_140320450;
        *(undefined2 *)((longlong)plVar14 + 0x24) = uVar6;
        *(undefined4 *)(plVar14 + 6) = uVar11;
        *(undefined2 *)((longlong)plVar14 + 0x34) = uVar6;
        *(undefined1 *)(plVar14 + 7) = 0;
        *(undefined1 *)(plVar14 + 7) = 0;
        *(undefined4 *)(plVar14 + 2) = uVar3;
        uVar6 = DAT_140320454;
        uVar11 = DAT_140320450;
        local_3b0 = Proud::AddrPort::vftable;
        local_3a0 = Proud::AddrPort::vftable;
        local_3b8 = 0;
        local_390 = 0;
        local_3a8 = DAT_140320450;
        local_3a4 = DAT_140320454;
        local_398 = DAT_140320450;
        local_394 = DAT_140320454;
        *(undefined4 *)(plVar14 + 10) = DAT_140320450;
        *(undefined2 *)((longlong)plVar14 + 0x54) = uVar6;
        *(undefined4 *)(plVar14 + 0xc) = uVar11;
        *(undefined2 *)((longlong)plVar14 + 100) = uVar6;
        *(undefined1 *)(plVar14 + 0xd) = 0;
        *(undefined1 *)(plVar14 + 0xd) = 0;
        *(undefined4 *)(plVar14 + 8) = uVar10;
        *(undefined1 *)(plVar14 + 0x34) = 1;
        plVar14 = plVar29;
        if (plVar13 != (longlong *)0x0) {
          plVar14 = (longlong *)*plVar13;
        }
        uVar5 = ((ulonglong)plVar14 & 0xffffffff) % (ulonglong)*(uint *)(puVar23 + 0xd1);
        if (puVar23[0xcd] != 0) {
          for (puVar4 = *(undefined8 **)(puVar23[0xcd] + uVar5 * 8);
              (puVar4 != (undefined8 *)0x0 &&
              ((uint)uVar5 == *(uint *)(puVar4 + 4) % *(uint *)(puVar23 + 0xd1)));
              puVar4 = (undefined8 *)puVar4[2]) {
            plVar14 = plVar29;
            if ((undefined8 *)*puVar4 != (undefined8 *)0x0) {
              plVar14 = *(longlong **)*puVar4;
            }
            plVar15 = plVar29;
            if (plVar13 != (longlong *)0x0) {
              plVar15 = (longlong *)*plVar13;
            }
            if (plVar14 == plVar15) goto LAB_14017b792;
          }
        }
        puVar18 = (undefined1 *)FUN_140172df0(puVar23 + 0xcc);
        *puVar18 = 0;
LAB_14017b792:
        plVar14 = plVar29;
        if (plVar13 != (longlong *)0x0) {
          plVar14 = (longlong *)*plVar13;
        }
        uVar5 = ((ulonglong)plVar14 & 0xffffffff) % (ulonglong)*(uint *)(puVar7 + 0xd1);
        if (puVar7[0xcd] != 0) {
          for (puVar23 = *(undefined8 **)(puVar7[0xcd] + uVar5 * 8);
              (puVar23 != (undefined8 *)0x0 &&
              ((uint)uVar5 == *(uint *)(puVar23 + 4) % *(uint *)(puVar7 + 0xd1)));
              puVar23 = (undefined8 *)puVar23[2]) {
            plVar14 = plVar29;
            if ((undefined8 *)*puVar23 != (undefined8 *)0x0) {
              plVar14 = *(longlong **)*puVar23;
            }
            plVar15 = plVar29;
            if (plVar13 != (longlong *)0x0) {
              plVar15 = (longlong *)*plVar13;
            }
            if (plVar14 == plVar15) goto LAB_14017b812;
          }
        }
        puVar18 = (undefined1 *)FUN_140172df0(puVar7 + 0xcc,&local_680);
        *puVar18 = 0;
LAB_14017b812:
        param_1 = local_668;
        puVar23 = puVar22;
        if (*(longlong *)(local_668 + 0x17f0) != 0) {
          FUN_1401568c0();
          local_5f8 = PTR_DAT_1403200a0;
          uVar11 = (**(code **)*local_658)();
          uVar10 = (**(code **)*puVar22)(puVar22);
          FUN_14004ce50(&local_5f8,&DAT_1402612a0,uVar10,uVar11);
          puVar28 = local_5f8;
          puVar27 = local_5f8;
          if (local_5f8 == (undefined *)0x0) {
            puVar27 = PTR_DAT_1403200a0;
          }
          FUN_140196a90(*(undefined8 *)(param_1 + 0x17f0),1,puVar27);
          if (((puVar28 != (undefined *)0x0) && (puVar28 != PTR_DAT_1403200a0)) &&
             (puVar28 + -8 != (undefined *)0x0)) {
            uVar19 = FUN_1401568c0();
            local_3e8 = uVar19;
            FUN_140156b50(uVar19);
            local_3e0 = 1;
            piVar1 = (int *)(puVar28 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(puVar28 + -8);
            }
            FUN_140156be0(uVar19);
            local_3e0 = 0;
            puVar23 = local_660;
          }
          local_5f8 = PTR_DAT_1403200a0;
          cVar8 = local_694;
        }
      }
      else {
        piVar1 = (int *)(*plVar13 + 0x114);
        *piVar1 = *piVar1 + 1;
        param_1 = local_668;
        cVar8 = local_694;
      }
    }
    if (puVar23 != (undefined8 *)(param_1 + 0xb8)) {
      if (((cVar8 != '\0') && (plVar13 != (longlong *)0x0)) && (*plVar13 != 0)) {
        lVar24 = *plVar13;
        uVar11 = (**(code **)*puVar23)(puVar23);
        lVar24 = FUN_14015a920(lVar24,local_318,uVar11);
        local_690._0_2_ = *(undefined2 *)(lVar24 + 0xc);
      }
      if (*(char *)(param_1 + 0x24d) == '\0') {
        if ((plVar13 == (longlong *)0x0) || (*plVar13 == 0)) {
          local_1c8 = 0;
          local_1c4 = 0;
          local_1c0 = 0;
          local_1bc = 0;
          local_650 = (undefined ***)&local_1c8;
        }
        else {
          local_650 = (undefined ***)(*plVar13 + 0x174);
        }
        if ((plVar13 == (longlong *)0x0) || (*plVar13 == 0)) {
          local_618 = 0;
        }
        else {
          local_618 = *(undefined4 *)(*plVar13 + 0x170);
        }
        plVar14 = plVar29;
        if (local_688 != (longlong *)0x0) {
          plVar14 = (longlong *)*local_688;
        }
        lVar24 = *(longlong *)(param_1 + 0x4a8);
        uVar11 = (**(code **)*local_660)();
        local_6b8 = &local_690;
        local_6c8 = local_650;
        local_6d0 = (undefined ***)&local_618;
        local_6d8 = local_670;
        local_6e0 = local_648;
        local_6e8 = &local_68c;
        local_6c0 = plVar14 + 0x1e;
        (**(code **)(lVar24 + 0x40))((longlong *)(param_1 + 0x4a8),uVar11,&DAT_140328530,plVar14);
        puVar23 = local_660;
        param_1 = local_668;
      }
      else {
        if ((plVar13 == (longlong *)0x0) || (*plVar13 == 0)) {
          local_1d8 = 0;
          local_1d4 = 0;
          local_1d0 = 0;
          local_1cc = 0;
          local_5c0 = &local_1d8;
        }
        else {
          local_5c0 = (undefined4 *)(*plVar13 + 0x174);
        }
        if ((plVar13 == (longlong *)0x0) || (*plVar13 == 0)) {
          local_638[0] = 0;
        }
        else {
          local_638[0] = *(undefined4 *)(*plVar13 + 0x170);
        }
        if ((plVar13 == (longlong *)0x0) || (lVar24 = *plVar13, lVar24 == 0)) {
          local_408 = 0;
          local_400 = 0;
          local_3f8 = 0;
          local_3f0 = 0;
          local_410 = Proud::ByteArray::vftable;
          local_608 = &local_410;
          uVar30 = (uint)plVar21 | 2;
        }
        else {
          local_530 = Proud::CFastArray<>::vftable;
          if (DAT_140320e08 != 5) {
            FUN_1401838a0();
          }
          local_528 = *(undefined8 *)(lVar24 + 0x150);
          local_50c = *(undefined4 *)(lVar24 + 0x16c);
          local_520 = (longlong *)0x0;
          local_518 = 0;
          local_510 = 0;
          iVar9 = *(int *)(lVar24 + 0x160);
          if (iVar9 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          FUN_140050060(&local_530,iVar9);
          plVar14 = plVar29;
          if (*(int *)(lVar24 + 0x160) != 0) {
            plVar14 = *(longlong **)(lVar24 + 0x158);
          }
          plVar15 = local_520;
          if ((int)local_518 == 0) {
            plVar15 = plVar29;
          }
          FUN_140050120(plVar15,plVar14,(longlong)iVar9);
          local_530 = Proud::ByteArray::vftable;
          local_608 = &local_530;
          uVar30 = (uint)plVar21 | 1;
        }
        if ((plVar13 == (longlong *)0x0) || (lVar24 = *plVar13, lVar24 == 0)) {
          local_458 = 0;
          local_450 = 0;
          local_448 = 0;
          local_440 = 0;
          local_460 = Proud::ByteArray::vftable;
          local_650 = &local_460;
          uVar30 = uVar30 | 8;
        }
        else {
          local_580 = Proud::CFastArray<>::vftable;
          local_698 = uVar30;
          if (DAT_140320e08 != 5) {
            FUN_1401838a0();
          }
          local_578 = *(undefined8 *)(lVar24 + 0x128);
          local_55c = *(undefined4 *)(lVar24 + 0x144);
          local_570 = (longlong *)0x0;
          local_568 = 0;
          local_560 = 0;
          iVar9 = *(int *)(lVar24 + 0x138);
          if (iVar9 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          FUN_140050060(&local_580,iVar9);
          plVar21 = plVar29;
          if (*(int *)(lVar24 + 0x138) != 0) {
            plVar21 = *(longlong **)(lVar24 + 0x130);
          }
          plVar14 = local_570;
          if ((int)local_568 == 0) {
            plVar14 = plVar29;
          }
          FUN_140050120(plVar14,plVar21,(longlong)iVar9);
          local_580 = Proud::ByteArray::vftable;
          local_650 = &local_580;
          uVar30 = uVar30 | 4;
        }
        plVar21 = plVar29;
        if (local_688 != (longlong *)0x0) {
          plVar21 = (longlong *)*local_688;
        }
        lVar24 = *(longlong *)(param_1 + 0x4a8);
        local_698 = uVar30;
        uVar11 = (**(code **)*local_660)();
        local_6a8 = (undefined2 *)&local_690;
        local_6b8 = local_5c0;
        local_6c0 = (longlong *)local_638;
        local_6c8 = local_608;
        local_6d0 = local_650;
        local_6d8 = local_670;
        local_6e0 = local_648;
        local_6e8 = &local_68c;
        local_6b0 = plVar21 + 0x1e;
        (**(code **)(lVar24 + 0x30))((longlong *)(param_1 + 0x4a8),uVar11,&DAT_1403285f0,plVar21);
        if ((uVar30 & 8) != 0) {
          uVar30 = uVar30 & 0xfffffff7;
          local_698 = uVar30;
          FUN_1401858d0(&local_460);
        }
        if ((uVar30 & 4) != 0) {
          uVar30 = uVar30 & 0xfffffffb;
          local_698 = uVar30;
          FUN_1401858d0(&local_580);
        }
        if ((uVar30 & 2) != 0) {
          uVar30 = uVar30 & 0xfffffffd;
          local_698 = uVar30;
          FUN_1401858d0(&local_410);
        }
        plVar21 = (longlong *)(ulonglong)uVar30;
        puVar23 = local_660;
        param_1 = local_668;
        if ((uVar30 & 1) != 0) {
          local_698 = uVar30 & 0xfffffffe;
          plVar21 = (longlong *)(ulonglong)local_698;
          FUN_1401858d0(&local_530);
          puVar23 = local_660;
          param_1 = local_668;
        }
      }
    }
    if ((puVar23 != local_658) && (local_68c != 1)) {
      if ((local_694 != '\0') && ((plVar13 != (longlong *)0x0 && (*plVar13 != 0)))) {
        lVar24 = FUN_14015a920(*plVar13,local_308);
        local_690._0_2_ = *(undefined2 *)(lVar24 + 0xc);
      }
      if (*(char *)(param_1 + 0x24d) == '\0') {
        if ((plVar13 == (longlong *)0x0) || (*plVar13 == 0)) {
          local_1e8 = 0;
          local_1e4 = 0;
          local_1e0 = 0;
          local_1dc = 0;
          pppuVar26 = (undefined ***)&local_1e8;
        }
        else {
          pppuVar26 = (undefined ***)(*plVar13 + 0x174);
        }
        if ((plVar13 == (longlong *)0x0) || (*plVar13 == 0)) {
          local_628[0] = 0;
        }
        else {
          local_628[0] = *(undefined4 *)(*plVar13 + 0x170);
        }
        local_5e8[0] = (**(code **)*puVar23)(puVar23);
        plVar14 = plVar29;
        if (local_688 != (longlong *)0x0) {
          plVar14 = (longlong *)*local_688;
        }
        local_6c0 = plVar14 + 0x1e;
        local_6b8 = &local_690;
        local_6d0 = (undefined ***)local_628;
        local_6d8 = local_670;
        local_6e0 = local_648;
        local_6e8 = local_5e8;
        local_6c8 = pppuVar26;
        (**(code **)(*(longlong *)(param_1 + 0x4a8) + 0x40))
                  ((longlong *)(param_1 + 0x4a8),local_68c,&DAT_140328530,plVar14);
      }
      else {
        if ((plVar13 == (longlong *)0x0) || (*plVar13 == 0)) {
          local_1b8 = 0;
          local_1b4 = 0;
          local_1b0 = 0;
          local_1ac = 0;
          puVar17 = &local_1b8;
        }
        else {
          puVar17 = (undefined4 *)(*plVar13 + 0x174);
        }
        if ((plVar13 == (longlong *)0x0) || (*plVar13 == 0)) {
          local_614 = 0;
        }
        else {
          local_614 = *(undefined4 *)(*plVar13 + 0x170);
        }
        if ((plVar13 == (longlong *)0x0) || (lVar24 = *plVar13, lVar24 == 0)) {
          local_4d0 = 0;
          local_4c8 = 0;
          local_4c0 = 0;
          local_4b8 = 0;
          local_4d8 = Proud::ByteArray::vftable;
          pppuVar26 = &local_4d8;
          uVar30 = (uint)plVar21 | 0x20;
        }
        else {
          local_558 = Proud::CFastArray<>::vftable;
          if (DAT_140320e08 != 5) {
            FUN_1401838a0();
          }
          local_550 = *(undefined8 *)(lVar24 + 0x150);
          local_534 = *(undefined4 *)(lVar24 + 0x16c);
          local_548 = (longlong *)0x0;
          local_540 = 0;
          local_538 = 0;
          iVar9 = *(int *)(lVar24 + 0x160);
          if (iVar9 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          FUN_140050060(&local_558,iVar9);
          plVar14 = plVar29;
          if (*(int *)(lVar24 + 0x160) != 0) {
            plVar14 = *(longlong **)(lVar24 + 0x158);
          }
          plVar15 = local_548;
          if ((int)local_540 == 0) {
            plVar15 = plVar29;
          }
          FUN_140050120(plVar15,plVar14,(longlong)iVar9);
          local_558 = Proud::ByteArray::vftable;
          pppuVar26 = &local_558;
          uVar30 = (uint)plVar21 | 0x10;
        }
        if ((plVar13 == (longlong *)0x0) || (lVar24 = *plVar13, lVar24 == 0)) {
          local_430 = 0;
          local_428 = 0;
          local_420 = 0;
          local_418 = 0;
          local_438 = Proud::ByteArray::vftable;
          pppuVar25 = &local_438;
          uVar30 = uVar30 | 0x80;
        }
        else {
          local_5a8 = Proud::CFastArray<>::vftable;
          local_698 = uVar30;
          if (DAT_140320e08 != 5) {
            FUN_1401838a0();
          }
          local_5a0 = *(undefined8 *)(lVar24 + 0x128);
          local_584 = *(undefined4 *)(lVar24 + 0x144);
          local_598 = (longlong *)0x0;
          local_590 = 0;
          local_588 = 0;
          iVar9 = *(int *)(lVar24 + 0x138);
          if (iVar9 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          FUN_140050060(&local_5a8,iVar9);
          plVar21 = plVar29;
          if (*(int *)(lVar24 + 0x138) != 0) {
            plVar21 = *(longlong **)(lVar24 + 0x130);
          }
          plVar14 = local_598;
          if ((int)local_590 == 0) {
            plVar14 = plVar29;
          }
          FUN_140050120(plVar14,plVar21,(longlong)iVar9);
          local_5a8 = Proud::ByteArray::vftable;
          pppuVar25 = &local_5a8;
          uVar30 = uVar30 | 0x40;
        }
        local_698 = uVar30;
        local_5d0[0] = (**(code **)*local_660)();
        plVar21 = plVar29;
        if (local_688 != (longlong *)0x0) {
          plVar21 = (longlong *)*local_688;
        }
        local_6b0 = plVar21 + 0x1e;
        local_6a8 = (undefined2 *)&local_690;
        local_6c0 = (longlong *)&local_614;
        local_6d8 = local_670;
        local_6e0 = local_648;
        local_6e8 = local_5d0;
        local_6d0 = pppuVar25;
        local_6c8 = pppuVar26;
        local_6b8 = puVar17;
        (**(code **)(*(longlong *)(local_668 + 0x4a8) + 0x30))
                  ((longlong *)(local_668 + 0x4a8),local_68c,&DAT_1403285f0,plVar21);
        if ((char)uVar30 < '\0') {
          uVar30 = uVar30 & 0xffffff7f;
          local_698 = uVar30;
          FUN_1401858d0(&local_438);
        }
        if ((uVar30 & 0x40) != 0) {
          uVar30 = uVar30 & 0xffffffbf;
          local_698 = uVar30;
          FUN_1401858d0(&local_5a8);
        }
        if ((uVar30 & 0x20) != 0) {
          uVar30 = uVar30 & 0xffffffdf;
          local_698 = uVar30;
          FUN_1401858d0(&local_4d8);
        }
        if ((uVar30 & 0x10) != 0) {
          uVar30 = uVar30 & 0xffffffef;
          local_698 = uVar30;
          FUN_1401858d0(&local_558);
        }
        plVar21 = (longlong *)(ulonglong)uVar30;
        param_1 = local_668;
      }
    }
    if (((*(longlong *)(param_1 + 0x17f0) != 0) && (plVar13 != (longlong *)0x0)) && (*plVar13 != 0))
    {
      FUN_1401568c0();
      local_5f0 = PTR_DAT_1403200a0;
      plVar14 = (longlong *)FUN_140182ca0(*plVar13 + 0x174,&local_5c8);
      puVar28 = (undefined *)*plVar14;
      if ((undefined *)*plVar14 == (undefined *)0x0) {
        puVar28 = PTR_DAT_1403200a0;
      }
      FUN_14004ce50(&local_5f0,&DAT_140261268,puVar28);
      puVar28 = local_5c8;
      if (((local_5c8 != (undefined *)0x0) && (local_5c8 != PTR_DAT_1403200a0)) &&
         (puVar27 = local_5c8 + -8, puVar27 != (undefined *)0x0)) {
        uVar19 = FUN_1401568c0();
        local_3d8 = uVar19;
        FUN_140156b50(uVar19);
        local_3d0 = 1;
        piVar1 = (int *)(puVar28 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar27);
        }
        FUN_140156be0(uVar19);
        local_3d0 = 0;
      }
      puVar28 = local_5f0;
      puVar27 = local_5f0;
      if (local_5f0 == (undefined *)0x0) {
        puVar27 = PTR_DAT_1403200a0;
      }
      local_5c8 = PTR_DAT_1403200a0;
      FUN_140196a90(*(undefined8 *)(param_1 + 0x17f0),1,puVar27);
      if (((puVar28 != (undefined *)0x0) && (puVar28 != PTR_DAT_1403200a0)) &&
         (puVar28 + -8 != (undefined *)0x0)) {
        dVar20 = (double)FUN_1401568c0();
        local_508 = dVar20;
        FUN_140156b50(dVar20);
        local_500 = 1;
        piVar1 = (int *)(puVar28 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar28 + -8);
        }
        FUN_140156be0(dVar20);
        local_500 = 0;
      }
      local_5f0 = PTR_DAT_1403200a0;
    }
    if (plVar13 != (longlong *)0x0) {
      plVar13 = plVar13 + 1;
      *plVar13 = *plVar13 + -1;
      if (*plVar13 == 0) {
        FUN_14015ebb0(local_680);
      }
      plVar21 = (longlong *)(ulonglong)local_698;
    }
    local_4f8 = plVar29;
    if (local_620 != (longlong *)0x0) {
      local_4f8 = (longlong *)local_620[3];
    }
  } while( true );
}



undefined1 FUN_14017c630(longlong param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined4 uVar2;
  undefined1 uVar3;
  undefined8 uVar4;
  undefined **local_40 [5];
  
  plVar1 = (longlong *)(param_1 + -0xa8);
  uVar4 = (**(code **)(*plVar1 + 0x58))(plVar1);
  FUN_140156b50(uVar4);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*plVar1 + 200))(plVar1,L"Proud::CNetServerImpl::JoinP2PGroup");
  }
  *(int *)(param_1 + 0x16f0) = *(int *)(param_1 + 0x16f0) + 1;
  uVar2 = *(undefined4 *)(param_1 + 0x16f0);
  FUN_14015e720(local_40,param_4);
  local_40[0] = Proud::ByteArray::vftable;
  uVar3 = FUN_14017a930(plVar1,param_2,param_3,local_40,uVar2);
  FUN_140156be0(uVar4);
  FUN_1401858d0(param_4);
  return uVar3;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14017c710(longlong *param_1,longlong param_2,undefined8 param_3,undefined4 param_4)

{
  longlong *plVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  longlong lVar6;
  undefined1 auStack_2b8 [32];
  undefined8 *local_298;
  undefined8 *local_290;
  undefined1 local_288;
  undefined4 local_278 [2];
  longlong local_270;
  undefined4 local_268;
  undefined8 local_260;
  undefined8 local_258;
  undefined **local_250;
  undefined8 local_248;
  undefined8 local_240;
  undefined8 local_238;
  undefined8 local_230;
  undefined8 local_228;
  longlong local_220;
  ulonglong local_218;
  undefined4 local_208;
  undefined **local_200;
  undefined8 local_1f8;
  undefined8 local_1f0;
  undefined8 local_1e8;
  undefined8 local_1e0;
  undefined **local_1d0;
  undefined4 local_1c8;
  undefined2 local_1c4;
  undefined **local_1b8;
  undefined8 local_1b0;
  undefined8 local_1a8;
  undefined8 local_1a0;
  undefined8 local_198;
  undefined8 local_188;
  undefined1 local_180;
  undefined8 local_178;
  undefined1 *local_168;
  undefined1 local_160 [264];
  ulonglong local_58;
  
  local_178 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_2b8;
  uVar3 = (**(code **)(*param_1 + 0x58))();
  local_188 = uVar3;
  FUN_140156b50(uVar3);
  local_180 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::EnqueueHackSuspectEvent");
  }
  if (param_1[0xeb] != 0) {
    puVar5 = (undefined8 *)0x0;
    local_270 = 0;
    local_260 = 0;
    local_258 = 0;
    local_248 = 0;
    local_240 = 0;
    local_238 = 0;
    local_230 = 0;
    local_250 = Proud::ByteArray::vftable;
    local_218 = 0;
    local_220 = 0;
    local_228 = 0;
    local_1f8 = 0;
    local_1f0 = 0;
    local_1e8 = 0;
    local_1e0 = 0;
    local_200 = Proud::ByteArray::vftable;
    local_1d0 = Proud::AddrPort::vftable;
    local_1c8 = 0;
    local_1c4 = 0;
    local_1b0 = 0;
    local_1a8 = 0;
    local_1a0 = 0;
    local_198 = 0;
    local_1b8 = Proud::ByteArray::vftable;
    local_298 = (undefined8 *)FUN_140156940(0x60);
    puVar4 = puVar5;
    if (local_298 != (undefined8 *)0x0) {
      puVar4 = (undefined8 *)FUN_140181eb0(local_298);
    }
    if (puVar4 == (undefined8 *)0x0) {
      local_298 = (undefined8 *)0x0;
    }
    else {
      puVar5 = (undefined8 *)FUN_140156940(0x48);
      local_290 = puVar5;
      if (puVar5 != (undefined8 *)0x0) {
        local_298 = puVar5;
        uVar2 = FUN_14015a430();
        FUN_140156a70(puVar5,uVar2,1);
      }
      local_298 = puVar5;
      FUN_140156b50(puVar5);
      puVar5[8] = 1;
      puVar5[7] = puVar4;
      FUN_140156be0(puVar5);
    }
    FUN_14016dca0(&local_270,&local_298);
    if (puVar5 != (undefined8 *)0x0) {
      local_290 = puVar5;
      FUN_140156b50(puVar5);
      local_288 = 1;
      plVar1 = puVar5 + 8;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_140156be0(puVar5);
        local_288 = 0;
        FUN_14013c4c0(puVar5);
      }
      else {
        FUN_140156be0(puVar5);
      }
    }
    if (param_2 == 0) {
      local_208 = 0;
    }
    else {
      local_208 = *(undefined4 *)(param_2 + 0x6f8);
    }
    local_278[0] = 0xf;
    local_168 = local_160;
    local_268 = param_4;
    FUN_140142dc0(&local_168,param_3,3);
    lVar6 = 0;
    if (local_270 != 0) {
      lVar6 = *(longlong *)(local_270 + 0x38);
    }
    FUN_14004ce80(lVar6 + 0x10,local_168);
    if (local_168 != local_160) {
      free(local_168);
    }
    FUN_1401794b0(param_1,local_278);
    FUN_1401858d0(&local_1b8);
    FUN_1401858d0(&local_200);
    local_290 = &local_228;
    FUN_1401560e0(&local_228);
    if (local_220 != 0) {
      if ((longlong)local_218 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_218 = local_218 & 0xffffffff00000000;
    }
    FUN_1401858d0(&local_250);
    FUN_140174710(&local_258);
    FUN_140174690(&local_260);
    FUN_14013c530(&local_270);
  }
  FUN_140156be0(uVar3);
  return;
}



void FUN_14017ca00(longlong *param_1,undefined4 param_2)

{
  undefined8 uVar1;
  undefined4 local_128 [2];
  undefined8 local_120 [2];
  undefined8 local_110;
  undefined8 local_108;
  undefined **local_100;
  undefined8 local_f8;
  undefined8 local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  longlong local_d0;
  ulonglong local_c8;
  undefined4 local_b8;
  undefined **local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined **local_80;
  undefined4 local_78;
  undefined2 local_74;
  undefined **local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_38;
  undefined1 local_30;
  undefined8 local_28;
  
  local_28 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(*param_1 + 0x58))();
  local_38 = uVar1;
  FUN_140156b50(uVar1);
  local_30 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::EnqueueP2PGroupRemoveEvent");
  }
  if (param_1[0xeb] != 0) {
    local_120[0] = 0;
    local_110 = 0;
    local_108 = 0;
    local_f8 = 0;
    local_f0 = 0;
    local_e8 = 0;
    local_e0 = 0;
    local_100 = Proud::ByteArray::vftable;
    local_c8 = 0;
    local_d0 = 0;
    local_d8 = 0;
    local_a8 = 0;
    local_a0 = 0;
    local_98 = 0;
    local_90 = 0;
    local_b0 = Proud::ByteArray::vftable;
    local_80 = Proud::AddrPort::vftable;
    local_78 = 0;
    local_74 = 0;
    local_60 = 0;
    local_58 = 0;
    local_50 = 0;
    local_48 = 0;
    local_68 = Proud::ByteArray::vftable;
    local_128[0] = 0x11;
    local_b8 = param_2;
    FUN_1401794b0(param_1,local_128);
    FUN_1401858d0(&local_68);
    FUN_1401858d0(&local_b0);
    FUN_1401560e0(&local_d8);
    if (local_d0 != 0) {
      if ((longlong)local_c8 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_c8 = local_c8 & 0xffffffff00000000;
    }
    FUN_1401858d0(&local_100);
    FUN_140174710(&local_108);
    FUN_140174690(&local_110);
    FUN_14013c530(local_120);
  }
  FUN_140156be0(uVar1);
  return;
}



void FUN_14017cb90(longlong *param_1,undefined8 param_2)

{
  longlong *plVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  undefined8 *puVar6;
  undefined8 *local_res8;
  undefined8 local_res10;
  undefined8 *local_res18;
  undefined4 local_158 [2];
  longlong local_150 [2];
  undefined8 local_140;
  undefined8 local_138;
  undefined **local_130;
  undefined8 local_128;
  undefined8 local_120;
  undefined8 local_118;
  undefined8 local_110;
  undefined8 local_108;
  longlong local_100;
  ulonglong local_f8;
  undefined **local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined **local_b0;
  undefined4 local_a8;
  undefined2 local_a4;
  undefined **local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 *local_68;
  undefined1 local_60;
  undefined8 local_58;
  undefined1 local_50;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  local_res10 = param_2;
  uVar3 = (**(code **)(*param_1 + 0x58))();
  local_58 = uVar3;
  FUN_140156b50(uVar3);
  local_50 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::EnqueueUnitTestFailEvent");
  }
  if (param_1[0xeb] != 0) {
    puVar6 = (undefined8 *)0x0;
    local_150[0] = 0;
    local_140 = 0;
    local_138 = 0;
    local_128 = 0;
    local_120 = 0;
    local_118 = 0;
    local_110 = 0;
    local_130 = Proud::ByteArray::vftable;
    local_f8 = 0;
    local_100 = 0;
    local_108 = 0;
    local_d8 = 0;
    local_d0 = 0;
    local_c8 = 0;
    local_c0 = 0;
    local_e0 = Proud::ByteArray::vftable;
    local_b0 = Proud::AddrPort::vftable;
    local_a8 = 0;
    local_a4 = 0;
    local_90 = 0;
    local_88 = 0;
    local_80 = 0;
    local_78 = 0;
    local_98 = Proud::ByteArray::vftable;
    local_res8 = (undefined8 *)FUN_140156940(0x60);
    puVar4 = puVar6;
    if (local_res8 != (undefined8 *)0x0) {
      puVar4 = (undefined8 *)FUN_140181eb0(local_res8);
    }
    if (puVar4 == (undefined8 *)0x0) {
      local_res8 = (undefined8 *)0x0;
      puVar5 = puVar6;
    }
    else {
      puVar5 = (undefined8 *)FUN_140156940(0x48);
      local_res18 = puVar5;
      if (puVar5 != (undefined8 *)0x0) {
        local_res8 = puVar5;
        uVar2 = FUN_14015a430();
        FUN_140156a70(puVar5,uVar2,1);
      }
      local_res8 = puVar5;
      FUN_140156b50(puVar5);
      puVar5[8] = 1;
      puVar5[7] = puVar4;
      FUN_140156be0(puVar5);
    }
    FUN_14016dca0(local_150,&local_res8);
    if (puVar5 != (undefined8 *)0x0) {
      local_68 = puVar5;
      FUN_140156b50(puVar5);
      local_60 = 1;
      plVar1 = puVar5 + 8;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_140156be0(puVar5);
        local_60 = 0;
        FUN_14013c4c0(puVar5);
      }
      else {
        FUN_140156be0(puVar5);
      }
    }
    local_158[0] = 0x13;
    if (local_150[0] != 0) {
      puVar6 = *(undefined8 **)(local_150[0] + 0x38);
    }
    FUN_14004f4f0(puVar6 + 2,param_2);
    FUN_1401794b0(param_1,local_158);
    FUN_1401858d0(&local_98);
    FUN_1401858d0(&local_e0);
    local_res8 = &local_108;
    FUN_1401560e0(&local_108);
    if (local_100 != 0) {
      if ((longlong)local_f8 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_f8 = local_f8 & 0xffffffff00000000;
    }
    FUN_1401858d0(&local_130);
    FUN_140174710(&local_138);
    FUN_140174690(&local_140);
    FUN_14013c530(local_150);
  }
  FUN_140156be0(uVar3);
  FUN_14004f990(param_2);
  return;
}



// WARNING: Removing unreachable block (ram,0x00014017cf97)
// WARNING: Removing unreachable block (ram,0x00014017cfa3)
// WARNING: Removing unreachable block (ram,0x00014017cfb0)
// WARNING: Removing unreachable block (ram,0x00014017cfa8)
// WARNING: Removing unreachable block (ram,0x00014017cfb6)
// WARNING: Removing unreachable block (ram,0x00014017cfc7)
// WARNING: Removing unreachable block (ram,0x00014017cf26)
// WARNING: Removing unreachable block (ram,0x00014017cf32)
// WARNING: Removing unreachable block (ram,0x00014017cf3e)
// WARNING: Removing unreachable block (ram,0x00014017cf36)
// WARNING: Removing unreachable block (ram,0x00014017cf44)
// WARNING: Removing unreachable block (ram,0x00014017cf55)
// WARNING: Removing unreachable block (ram,0x00014017cebb)
// WARNING: Removing unreachable block (ram,0x00014017cec7)
// WARNING: Removing unreachable block (ram,0x00014017ced3)
// WARNING: Removing unreachable block (ram,0x00014017cecb)
// WARNING: Removing unreachable block (ram,0x00014017ced9)
// WARNING: Removing unreachable block (ram,0x00014017ceea)
// WARNING: Removing unreachable block (ram,0x00014017ceb4)
// WARNING: Removing unreachable block (ram,0x00014017cf1f)
// WARNING: Removing unreachable block (ram,0x00014017cf90)
// WARNING: Removing unreachable block (ram,0x00014017d049)
// WARNING: Removing unreachable block (ram,0x00014017d050)
// WARNING: Removing unreachable block (ram,0x00014017d060)
// WARNING: Removing unreachable block (ram,0x00014017d06c)
// WARNING: Removing unreachable block (ram,0x00014017d064)
// WARNING: Removing unreachable block (ram,0x00014017d072)
// WARNING: Removing unreachable block (ram,0x00014017d083)

void FUN_14017ce20(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int *piVar4;
  int *piVar5;
  undefined *puVar6;
  int iVar7;
  longlong lVar8;
  longlong lVar9;
  int iVar10;
  int *piVar11;
  undefined *local_res10;
  undefined **local_90;
  longlong *local_88;
  int *local_80;
  undefined8 local_78;
  undefined8 local_70;
  undefined **local_68;
  longlong *local_60;
  longlong local_58;
  uint local_50;
  undefined8 local_4c;
  undefined4 local_44;
  
  local_90 = Proud::CFastArray<int,0>::vftable;
  piVar5 = (int *)0x0;
  local_88 = (longlong *)0x0;
  local_80 = (int *)0x0;
  local_78 = 0;
  local_70 = 0;
  FUN_14013c2c0(&local_90,1,param_3,param_4,0xfffffffffffffffe);
  lVar8 = (longlong)(int)local_78;
  piVar11 = local_80;
  if ((int)local_78 == 0) {
    piVar11 = piVar5;
  }
  *piVar11 = 5;
  if ((int)local_78 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_14013c2c0(&local_90,(int)local_78 + 1);
  lVar9 = (longlong)(int)local_78;
  piVar11 = local_80;
  if ((int)local_78 == 0) {
    piVar11 = piVar5;
  }
  piVar11[lVar8] = 1;
  if ((int)local_78 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_14013c2c0(&local_90,(int)local_78 + 1);
  lVar8 = (longlong)(int)local_78;
  piVar11 = local_80;
  if ((int)local_78 == 0) {
    piVar11 = piVar5;
  }
  piVar11[lVar9] = 2;
  if ((int)local_78 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_14013c2c0(&local_90,(int)local_78 + 1);
  piVar11 = local_80;
  iVar7 = (int)local_78;
  piVar4 = local_80;
  if ((int)local_78 == 0) {
    piVar4 = piVar5;
  }
  piVar4[lVar8] = 4;
  local_68 = Proud::CFastArray<int,0>::vftable;
  local_60 = (longlong *)0x0;
  local_44 = 0;
  local_58 = 0;
  local_50 = 0;
  local_4c = 0;
  piVar4 = piVar5;
  while( true ) {
    lVar8 = local_58;
    iVar10 = (int)piVar4;
    iVar1 = (int)piVar5;
    if (iVar10 == iVar7) break;
    if ((iVar10 < 0) || (iVar7 <= iVar10)) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    iVar2 = piVar11[iVar10];
    if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_14013c2c0(&local_68,iVar1 + 1);
    piVar5 = (int *)(ulonglong)local_50;
    lVar8 = local_58;
    if (local_50 == 0) {
      lVar8 = 0;
    }
    *(int *)(lVar8 + (longlong)iVar1 * 4) = iVar2;
    piVar4 = (int *)(ulonglong)(iVar10 + 1);
  }
  if (iVar7 == iVar1) {
    piVar5 = piVar11;
    if (iVar7 == 0) {
      piVar5 = (int *)0x0;
    }
    lVar9 = local_58;
    if (iVar1 == 0) {
      lVar9 = 0;
    }
    iVar7 = 0;
    if (0 < iVar1) {
      lVar9 = lVar9 - (longlong)piVar5;
      do {
        if (*piVar5 != *(int *)(lVar9 + (longlong)piVar5)) goto LAB_14017d0fa;
        iVar7 = iVar7 + 1;
        piVar5 = piVar5 + 1;
      } while (iVar7 < iVar1);
    }
    goto LAB_14017d20d;
  }
LAB_14017d0fa:
  FUN_1401568c0();
  local_res10 = PTR_DAT_1403200a0;
  iVar1 = FUN_140156740(L"CFastArray iterator failed!");
  iVar10 = 0;
  iVar7 = iVar10;
  if ((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) {
    iVar7 = *(int *)(local_res10 + -8);
  }
  iVar3 = 0;
  iVar2 = iVar1;
  if (((iVar1 <= iVar7) && (iVar2 = iVar3, local_res10 != (undefined *)0x0)) &&
     (local_res10 != PTR_DAT_1403200a0)) {
    iVar2 = *(int *)(local_res10 + -8);
  }
  iVar7 = 1;
  if (1 < iVar2) {
    iVar7 = iVar2;
  }
  if ((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_res10 + -8);
  }
  if (iVar3 < iVar7) {
    FUN_14004f590(&local_res10,iVar7);
  }
  FUN_14004f670(&local_res10);
  puVar6 = local_res10;
  if (local_res10 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar6,L"CFastArray iterator failed!",iVar1);
  puVar6 = local_res10;
  if (local_res10 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  iVar1 = FUN_140156740(puVar6);
  iVar7 = 0;
  if (0 < iVar1) {
    iVar7 = iVar1;
  }
  iVar1 = iVar10;
  if ((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) {
    iVar1 = *(int *)(local_res10 + -8);
  }
  if ((iVar7 < iVar1) || (iVar7 = iVar10, local_res10 == (undefined *)0x0)) {
LAB_14017d1e1:
    if (((local_res10 != PTR_DAT_1403200a0) && (local_res10 != (undefined *)0x0)) &&
       ((int *)(local_res10 + -8) != (int *)0x0)) {
      *(int *)(local_res10 + -8) = iVar7;
      *(undefined2 *)(local_res10 + (longlong)iVar7 * 2) = 0;
    }
  }
  else if (local_res10 != PTR_DAT_1403200a0) {
    iVar7 = *(int *)(local_res10 + -8);
    goto LAB_14017d1e1;
  }
  FUN_14017cb90(param_1,&local_res10);
LAB_14017d20d:
  if (lVar8 != 0) {
    if (local_60 == (longlong *)0x0) {
      FUN_140156970(lVar8);
    }
    else {
      (**(code **)(*local_60 + 0x18))(local_60,lVar8);
    }
  }
  if (piVar11 != (int *)0x0) {
    if (local_88 == (longlong *)0x0) {
      FUN_140156970(piVar11);
    }
    else {
      (**(code **)(*local_88 + 0x18))(local_88,piVar11);
    }
  }
  return;
}



void FUN_14017d280(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  undefined4 uVar5;
  uint *puVar6;
  uint *puVar7;
  uint *local_res10;
  uint *local_res18;
  undefined *local_res20;
  undefined8 uVar8;
  undefined1 local_50 [8];
  undefined1 local_48 [8];
  longlong local_40;
  undefined4 local_38;
  int local_34;
  
  uVar8 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10 = (uint *)PTR_DAT_140320098;
  uVar1 = FUN_1401567e0();
  if (local_res10 == (uint *)0x0) {
    uVar3 = 0;
  }
  else if (local_res10 == (uint *)PTR_DAT_140320098) {
    uVar3 = 0;
  }
  else {
    uVar3 = local_res10[-2];
  }
  uVar2 = uVar1;
  if ((int)uVar1 <= (int)uVar3) {
    if (local_res10 == (uint *)0x0) {
      uVar2 = 0;
    }
    else if (local_res10 == (uint *)PTR_DAT_140320098) {
      uVar2 = 0;
    }
    else {
      uVar2 = local_res10[-2];
    }
  }
  uVar3 = 1;
  if (1 < (int)uVar2) {
    uVar3 = uVar2;
  }
  if (local_res10 == (uint *)0x0) {
    uVar2 = 0;
  }
  else if (local_res10 == (uint *)PTR_DAT_140320098) {
    uVar2 = 0;
  }
  else {
    uVar2 = local_res10[-2];
  }
  if ((int)uVar3 <= (int)uVar2) goto LAB_14017d3da;
  if (local_res10 == (uint *)0x0) {
    local_res10 = (uint *)PTR_DAT_140320098;
  }
  if ((int)uVar3 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (uVar3 == 0) {
    FUN_140050520(&local_res10);
    goto LAB_14017d3da;
  }
  if (local_res10 == (uint *)0x0) {
    uVar2 = 0;
  }
  else if (local_res10 == (uint *)PTR_DAT_140320098) {
    uVar2 = 0;
  }
  else {
    uVar2 = local_res10[-2];
  }
  if (uVar3 == uVar2) goto LAB_14017d3da;
  puVar6 = (uint *)FUN_140156940((longlong)(int)uVar3 + 9);
  if (puVar6 != (uint *)0x0) {
    *puVar6 = 0;
    puVar6[1] = 1;
  }
  *puVar6 = uVar3;
  if (local_res10 == (uint *)0x0) {
    uVar2 = 0;
  }
  else if (local_res10 == (uint *)PTR_DAT_140320098) {
    uVar2 = 0;
  }
  else {
    uVar2 = local_res10[-2];
  }
  puVar7 = (uint *)PTR_DAT_140320098;
  if ((int)uVar3 < (int)uVar2) {
LAB_14017d3b6:
    if (local_res10 != (uint *)0x0) {
      puVar7 = local_res10;
    }
  }
  else {
    if (local_res10 != (uint *)0x0) {
      if (local_res10 == (uint *)PTR_DAT_140320098) {
        uVar3 = 0;
      }
      else {
        uVar3 = local_res10[-2];
      }
      goto LAB_14017d3b6;
    }
    uVar3 = 0;
  }
  FUN_140156810(puVar6 + 2,puVar7,uVar3,param_4,uVar8);
  FUN_140050520(&local_res10);
  local_res10 = puVar6 + 2;
LAB_14017d3da:
  FUN_1401242e0(&local_res10);
  puVar6 = local_res10;
  if (local_res10 == (uint *)0x0) {
    puVar6 = (uint *)PTR_DAT_140320098;
  }
  FUN_140156810(puVar6,&DAT_1402615e8,uVar1,param_4,uVar8);
  uVar3 = FUN_1401567e0();
  uVar1 = 0;
  if (0 < (int)uVar3) {
    uVar1 = uVar3;
  }
  if (local_res10 == (uint *)0x0) {
    uVar3 = 0;
  }
  else if (local_res10 == (uint *)PTR_DAT_140320098) {
    uVar3 = 0;
  }
  else {
    uVar3 = local_res10[-2];
  }
  if ((int)uVar3 <= (int)uVar1) {
    if (local_res10 == (uint *)0x0) {
      uVar1 = 0;
    }
    else if (local_res10 == (uint *)PTR_DAT_140320098) {
      uVar1 = 0;
    }
    else {
      uVar1 = local_res10[-2];
    }
  }
  if (((local_res10 != (uint *)PTR_DAT_140320098) && (local_res10 != (uint *)0x0)) &&
     (puVar6 = local_res10 + -2, puVar6 != (uint *)0x0)) {
    *puVar6 = uVar1;
    *(undefined1 *)((longlong)(int)uVar1 + 8 + (longlong)puVar6) = 0;
  }
  FUN_1401568c0();
  local_res18 = (uint *)PTR_DAT_140320098;
  FUN_1401544a0(local_50);
  FUN_140153d90(local_50);
  FUN_140155ee0(local_50,&local_res10);
  FUN_1401540a0(local_50,0);
  thunk_FUN_140155460(local_50,&local_res18);
  puVar6 = local_res10;
  if (local_res10 == (uint *)0x0) {
    puVar6 = (uint *)PTR_DAT_140320098;
  }
  if (puVar6 != local_res18) {
    puVar6 = local_res18;
    if (local_res18 == (uint *)0x0) {
      puVar6 = (uint *)PTR_DAT_140320098;
    }
    puVar7 = local_res10;
    if (local_res10 == (uint *)0x0) {
      puVar7 = (uint *)PTR_DAT_140320098;
    }
    iVar4 = FUN_140156840(puVar7,puVar6);
    if (iVar4 != 0) {
      FUN_1401568c0();
      local_res20 = PTR_DAT_1403200a0;
      uVar5 = FUN_140156740(L"Proud.StringA serialization failed!");
      uVar8 = FUN_14004f760(&local_res20,uVar5);
      FUN_140156770(uVar8,L"Proud.StringA serialization failed!",uVar5);
      FUN_14004f380(&local_res20);
      FUN_14017cb90(param_1,&local_res20);
    }
  }
  local_res20 = local_48;
  FUN_1401560e0(local_48);
  puVar6 = local_res18;
  if (local_40 != 0) {
    if (local_34 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_38 = 0;
  }
  if (((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_140320098)) &&
     (puVar7 = local_res18 + -2, puVar7 != (uint *)0x0)) {
    uVar8 = FUN_1401568c0();
    FUN_140156b50(uVar8);
    puVar6 = puVar6 + -1;
    *puVar6 = *puVar6 - 1;
    if (*puVar6 == 0) {
      FUN_140156970(puVar7);
    }
    FUN_140156be0(uVar8);
  }
  puVar6 = local_res10;
  if (((local_res10 != (uint *)0x0) && (local_res10 != (uint *)PTR_DAT_140320098)) &&
     (puVar7 = local_res10 + -2, puVar7 != (uint *)0x0)) {
    local_res18 = (uint *)PTR_DAT_140320098;
    uVar8 = FUN_1401568c0();
    FUN_140156b50(uVar8);
    puVar6 = puVar6 + -1;
    *puVar6 = *puVar6 - 1;
    if (*puVar6 == 0) {
      FUN_140156970(puVar7);
    }
    FUN_140156be0(uVar8);
  }
  return;
}



void FUN_14017d620(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  undefined4 uVar5;
  uint *puVar6;
  uint *puVar7;
  uint *local_res10;
  uint *local_res18;
  undefined *local_res20;
  undefined8 uVar8;
  undefined1 local_50 [8];
  undefined1 local_48 [8];
  longlong local_40;
  undefined4 local_38;
  int local_34;
  
  uVar8 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res10 = (uint *)PTR_DAT_140320098;
  uVar1 = FUN_1401567e0();
  if (local_res10 == (uint *)0x0) {
    uVar3 = 0;
  }
  else if (local_res10 == (uint *)PTR_DAT_140320098) {
    uVar3 = 0;
  }
  else {
    uVar3 = local_res10[-2];
  }
  uVar2 = uVar1;
  if ((int)uVar1 <= (int)uVar3) {
    if (local_res10 == (uint *)0x0) {
      uVar2 = 0;
    }
    else if (local_res10 == (uint *)PTR_DAT_140320098) {
      uVar2 = 0;
    }
    else {
      uVar2 = local_res10[-2];
    }
  }
  uVar3 = 1;
  if (1 < (int)uVar2) {
    uVar3 = uVar2;
  }
  if (local_res10 == (uint *)0x0) {
    uVar2 = 0;
  }
  else if (local_res10 == (uint *)PTR_DAT_140320098) {
    uVar2 = 0;
  }
  else {
    uVar2 = local_res10[-2];
  }
  if ((int)uVar3 <= (int)uVar2) goto LAB_14017d77a;
  if (local_res10 == (uint *)0x0) {
    local_res10 = (uint *)PTR_DAT_140320098;
  }
  if ((int)uVar3 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (uVar3 == 0) {
    FUN_140050520(&local_res10);
    goto LAB_14017d77a;
  }
  if (local_res10 == (uint *)0x0) {
    uVar2 = 0;
  }
  else if (local_res10 == (uint *)PTR_DAT_140320098) {
    uVar2 = 0;
  }
  else {
    uVar2 = local_res10[-2];
  }
  if (uVar3 == uVar2) goto LAB_14017d77a;
  puVar6 = (uint *)FUN_140156940((longlong)(int)uVar3 + 9);
  if (puVar6 != (uint *)0x0) {
    *puVar6 = 0;
    puVar6[1] = 1;
  }
  *puVar6 = uVar3;
  if (local_res10 == (uint *)0x0) {
    uVar2 = 0;
  }
  else if (local_res10 == (uint *)PTR_DAT_140320098) {
    uVar2 = 0;
  }
  else {
    uVar2 = local_res10[-2];
  }
  puVar7 = (uint *)PTR_DAT_140320098;
  if ((int)uVar3 < (int)uVar2) {
LAB_14017d756:
    if (local_res10 != (uint *)0x0) {
      puVar7 = local_res10;
    }
  }
  else {
    if (local_res10 != (uint *)0x0) {
      if (local_res10 == (uint *)PTR_DAT_140320098) {
        uVar3 = 0;
      }
      else {
        uVar3 = local_res10[-2];
      }
      goto LAB_14017d756;
    }
    uVar3 = 0;
  }
  FUN_140156810(puVar6 + 2,puVar7,uVar3,param_4,uVar8);
  FUN_140050520(&local_res10);
  local_res10 = puVar6 + 2;
LAB_14017d77a:
  FUN_1401242e0(&local_res10);
  puVar6 = local_res10;
  if (local_res10 == (uint *)0x0) {
    puVar6 = (uint *)PTR_DAT_140320098;
  }
  FUN_140156810(puVar6,&DAT_1402615e8,uVar1,param_4,uVar8);
  uVar3 = FUN_1401567e0();
  uVar1 = 0;
  if (0 < (int)uVar3) {
    uVar1 = uVar3;
  }
  if (local_res10 == (uint *)0x0) {
    uVar3 = 0;
  }
  else if (local_res10 == (uint *)PTR_DAT_140320098) {
    uVar3 = 0;
  }
  else {
    uVar3 = local_res10[-2];
  }
  if ((int)uVar3 <= (int)uVar1) {
    if (local_res10 == (uint *)0x0) {
      uVar1 = 0;
    }
    else if (local_res10 == (uint *)PTR_DAT_140320098) {
      uVar1 = 0;
    }
    else {
      uVar1 = local_res10[-2];
    }
  }
  if (((local_res10 != (uint *)PTR_DAT_140320098) && (local_res10 != (uint *)0x0)) &&
     (puVar6 = local_res10 + -2, puVar6 != (uint *)0x0)) {
    *puVar6 = uVar1;
    *(undefined1 *)((longlong)(int)uVar1 + 8 + (longlong)puVar6) = 0;
  }
  FUN_1401568c0();
  local_res18 = (uint *)PTR_DAT_140320098;
  FUN_1401544a0(local_50);
  FUN_140153d90(local_50);
  FUN_140155ee0(local_50,&local_res10);
  FUN_1401540a0(local_50,0);
  thunk_FUN_140155460(local_50,&local_res18);
  puVar6 = local_res10;
  if (local_res10 == (uint *)0x0) {
    puVar6 = (uint *)PTR_DAT_140320098;
  }
  if (puVar6 != local_res18) {
    puVar6 = local_res18;
    if (local_res18 == (uint *)0x0) {
      puVar6 = (uint *)PTR_DAT_140320098;
    }
    puVar7 = local_res10;
    if (local_res10 == (uint *)0x0) {
      puVar7 = (uint *)PTR_DAT_140320098;
    }
    iVar4 = FUN_140156840(puVar7,puVar6);
    if (iVar4 != 0) {
      FUN_1401568c0();
      local_res20 = PTR_DAT_1403200a0;
      uVar5 = FUN_140156740(L"Proud.String serialization failed!");
      uVar8 = FUN_14004f760(&local_res20,uVar5);
      FUN_140156770(uVar8,L"Proud.String serialization failed!",uVar5);
      FUN_14004f380(&local_res20);
      FUN_14017cb90(param_1,&local_res20);
    }
  }
  local_res20 = local_48;
  FUN_1401560e0(local_48);
  puVar6 = local_res18;
  if (local_40 != 0) {
    if (local_34 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_38 = 0;
  }
  if (((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_140320098)) &&
     (puVar7 = local_res18 + -2, puVar7 != (uint *)0x0)) {
    uVar8 = FUN_1401568c0();
    FUN_140156b50(uVar8);
    puVar6 = puVar6 + -1;
    *puVar6 = *puVar6 - 1;
    if (*puVar6 == 0) {
      FUN_140156970(puVar7);
    }
    FUN_140156be0(uVar8);
  }
  puVar6 = local_res10;
  if (((local_res10 != (uint *)0x0) && (local_res10 != (uint *)PTR_DAT_140320098)) &&
     (puVar7 = local_res10 + -2, puVar7 != (uint *)0x0)) {
    local_res18 = (uint *)PTR_DAT_140320098;
    uVar8 = FUN_1401568c0();
    FUN_140156b50(uVar8);
    puVar6 = puVar6 + -1;
    *puVar6 = *puVar6 - 1;
    if (*puVar6 == 0) {
      FUN_140156970(puVar7);
    }
    FUN_140156be0(uVar8);
  }
  return;
}



void FUN_14017d9c0(undefined8 param_1)

{
  undefined4 uVar1;
  undefined8 uVar2;
  undefined *local_res10;
  undefined1 local_38 [8];
  char local_30;
  char local_2f;
  char local_2e;
  undefined1 local_28 [8];
  char local_20;
  char local_1f;
  char local_1e;
  undefined1 local_18 [8];
  char local_10;
  char local_f;
  char local_e;
  
  FUN_1401568c0();
  local_res10 = PTR_DAT_140320098;
  uVar1 = FUN_1401567e0("1.2.3.4");
  uVar2 = FUN_1401243d0(&local_res10,uVar1);
  FUN_140156810(uVar2,"1.2.3.4",uVar1);
  FUN_1401244c0(&local_res10);
  FUN_140158bf0(local_28,&local_res10,1);
  FUN_1401568c0();
  local_res10 = PTR_DAT_140320098;
  uVar1 = FUN_1401567e0("1.2.3.5");
  uVar2 = FUN_1401243d0(&local_res10,uVar1);
  FUN_140156810(uVar2,"1.2.3.5",uVar1);
  FUN_1401244c0(&local_res10);
  FUN_140158bf0(local_38,&local_res10,1);
  FUN_1401568c0();
  local_res10 = PTR_DAT_140320098;
  uVar1 = FUN_1401567e0("5.6.7.8");
  uVar2 = FUN_1401243d0(&local_res10,uVar1);
  FUN_140156810(uVar2,"5.6.7.8",uVar1);
  FUN_1401244c0(&local_res10);
  FUN_140158bf0(local_18,&local_res10,1);
  if (((local_30 != local_20) || (local_2f != local_1f)) || (local_2e != local_1e)) {
    FUN_1401568c0();
    local_res10 = PTR_DAT_1403200a0;
    uVar1 = FUN_140156740(L"AddrPort.IsSameLan fail!");
    uVar2 = FUN_14004f760(&local_res10,uVar1);
    FUN_140156770(uVar2,L"AddrPort.IsSameLan fail!",uVar1);
    FUN_14004f380(&local_res10);
    FUN_14017cb90(param_1,&local_res10);
  }
  if (((local_10 == local_30) && (local_f == local_2f)) && (local_e == local_2e)) {
    FUN_1401568c0();
    local_res10 = PTR_DAT_1403200a0;
    uVar1 = FUN_140156740(L"AddrPort.IsSameLan fail!");
    uVar2 = FUN_14004f760(&local_res10,uVar1);
    FUN_140156770(uVar2,L"AddrPort.IsSameLan fail!",uVar1);
    FUN_14004f380(&local_res10);
    FUN_14017cb90(param_1,&local_res10);
  }
  return;
}



void FUN_14017dbc0(longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  undefined8 uVar4;
  undefined8 *puVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  undefined8 *local_res8;
  longlong *local_res10;
  undefined8 *local_res18;
  undefined4 local_158 [2];
  longlong local_150 [2];
  undefined8 local_140;
  undefined8 local_138;
  undefined **local_130;
  undefined8 local_128;
  undefined8 local_120;
  undefined8 local_118;
  undefined8 local_110;
  undefined8 local_108;
  longlong local_100;
  ulonglong local_f8;
  undefined4 local_e8;
  undefined **local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined **local_b0;
  undefined4 local_a8;
  undefined2 local_a4;
  undefined **local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 *local_68;
  undefined1 local_60;
  undefined8 local_58;
  undefined1 local_50;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  local_res10 = param_2;
  uVar4 = (**(code **)(*param_1 + 0x58))();
  local_58 = uVar4;
  FUN_140156b50(uVar4);
  local_50 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::EnqueError");
  }
  if (param_1[0xeb] != 0) {
    puVar7 = (undefined8 *)0x0;
    local_150[0] = 0;
    local_140 = 0;
    local_138 = 0;
    local_128 = 0;
    local_120 = 0;
    local_118 = 0;
    local_110 = 0;
    local_130 = Proud::ByteArray::vftable;
    local_f8 = 0;
    local_100 = 0;
    local_108 = 0;
    local_d8 = 0;
    local_d0 = 0;
    local_c8 = 0;
    local_c0 = 0;
    local_e0 = Proud::ByteArray::vftable;
    local_b0 = Proud::AddrPort::vftable;
    local_a8 = 0;
    local_a4 = 0;
    local_90 = 0;
    local_88 = 0;
    local_80 = 0;
    local_78 = 0;
    local_98 = Proud::ByteArray::vftable;
    local_res8 = (undefined8 *)FUN_140156940(0x60);
    puVar5 = puVar7;
    if (local_res8 != (undefined8 *)0x0) {
      puVar5 = (undefined8 *)FUN_140181eb0(local_res8);
    }
    if (puVar5 == (undefined8 *)0x0) {
      local_res8 = (undefined8 *)0x0;
      puVar6 = puVar7;
    }
    else {
      puVar6 = (undefined8 *)FUN_140156940(0x48);
      local_res18 = puVar6;
      if (puVar6 != (undefined8 *)0x0) {
        local_res8 = puVar6;
        uVar3 = FUN_14015a430();
        FUN_140156a70(puVar6,uVar3,1);
      }
      local_res8 = puVar6;
      FUN_140156b50(puVar6);
      puVar6[8] = 1;
      puVar6[7] = puVar5;
      FUN_140156be0(puVar6);
    }
    FUN_14016dca0(local_150,&local_res8);
    if (puVar6 != (undefined8 *)0x0) {
      local_68 = puVar6;
      FUN_140156b50(puVar6);
      local_60 = 1;
      plVar1 = puVar6 + 8;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_140156be0(puVar6);
        local_60 = 0;
        FUN_14013c4c0(puVar6);
      }
      else {
        FUN_140156be0(puVar6);
      }
    }
    local_158[0] = 0x14;
    puVar5 = puVar7;
    if (*param_2 != 0) {
      puVar5 = *(undefined8 **)(*param_2 + 0x38);
    }
    puVar6 = puVar7;
    if (local_150[0] != 0) {
      puVar6 = *(undefined8 **)(local_150[0] + 0x38);
    }
    *(undefined4 *)puVar6 = *(undefined4 *)puVar5;
    puVar5 = puVar7;
    if (*param_2 != 0) {
      puVar5 = *(undefined8 **)(*param_2 + 0x38);
    }
    puVar6 = puVar7;
    if (local_150[0] != 0) {
      puVar6 = *(undefined8 **)(local_150[0] + 0x38);
    }
    FUN_14004f4f0(puVar6 + 2,puVar5 + 2);
    lVar2 = *param_2;
    puVar5 = puVar7;
    if (lVar2 != 0) {
      puVar5 = *(undefined8 **)(lVar2 + 0x38);
    }
    local_e8 = *(undefined4 *)((longlong)puVar5 + 0xc);
    if (lVar2 != 0) {
      puVar7 = *(undefined8 **)(lVar2 + 0x38);
    }
    local_a8 = *(undefined4 *)(puVar7 + 4);
    local_a4 = *(undefined2 *)((longlong)puVar7 + 0x24);
    FUN_1401794b0(param_1,local_158);
    FUN_1401858d0(&local_98);
    FUN_1401858d0(&local_e0);
    local_res8 = &local_108;
    FUN_1401560e0(&local_108);
    if (local_100 != 0) {
      if ((longlong)local_f8 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_f8 = local_f8 & 0xffffffff00000000;
    }
    FUN_1401858d0(&local_130);
    FUN_140174710(&local_138);
    FUN_140174690(&local_140);
    FUN_14013c530(local_150);
  }
  FUN_140156be0(uVar4);
  FUN_14013c530(param_2);
  return;
}



void FUN_14017dec0(longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  undefined8 uVar4;
  undefined8 *puVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  undefined8 *local_res8;
  longlong *local_res10;
  undefined8 *local_res18;
  undefined4 local_158 [2];
  longlong local_150 [2];
  undefined8 local_140;
  undefined8 local_138;
  undefined **local_130;
  undefined8 local_128;
  undefined8 local_120;
  undefined8 local_118;
  undefined8 local_110;
  undefined8 local_108;
  longlong local_100;
  ulonglong local_f8;
  undefined4 local_e8;
  undefined **local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined **local_b0;
  undefined4 local_a8;
  undefined2 local_a4;
  undefined **local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 *local_68;
  undefined1 local_60;
  undefined8 local_58;
  undefined1 local_50;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  local_res10 = param_2;
  uVar4 = (**(code **)(*param_1 + 0x58))();
  local_58 = uVar4;
  FUN_140156b50(uVar4);
  local_50 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::EnqueWarning");
  }
  if (param_1[0xeb] != 0) {
    puVar7 = (undefined8 *)0x0;
    local_150[0] = 0;
    local_140 = 0;
    local_138 = 0;
    local_128 = 0;
    local_120 = 0;
    local_118 = 0;
    local_110 = 0;
    local_130 = Proud::ByteArray::vftable;
    local_f8 = 0;
    local_100 = 0;
    local_108 = 0;
    local_d8 = 0;
    local_d0 = 0;
    local_c8 = 0;
    local_c0 = 0;
    local_e0 = Proud::ByteArray::vftable;
    local_b0 = Proud::AddrPort::vftable;
    local_a8 = 0;
    local_a4 = 0;
    local_90 = 0;
    local_88 = 0;
    local_80 = 0;
    local_78 = 0;
    local_98 = Proud::ByteArray::vftable;
    local_res8 = (undefined8 *)FUN_140156940(0x60);
    puVar5 = puVar7;
    if (local_res8 != (undefined8 *)0x0) {
      puVar5 = (undefined8 *)FUN_140181eb0(local_res8);
    }
    if (puVar5 == (undefined8 *)0x0) {
      local_res8 = (undefined8 *)0x0;
      puVar6 = puVar7;
    }
    else {
      puVar6 = (undefined8 *)FUN_140156940(0x48);
      local_res18 = puVar6;
      if (puVar6 != (undefined8 *)0x0) {
        local_res8 = puVar6;
        uVar3 = FUN_14015a430();
        FUN_140156a70(puVar6,uVar3,1);
      }
      local_res8 = puVar6;
      FUN_140156b50(puVar6);
      puVar6[8] = 1;
      puVar6[7] = puVar5;
      FUN_140156be0(puVar6);
    }
    FUN_14016dca0(local_150,&local_res8);
    if (puVar6 != (undefined8 *)0x0) {
      local_68 = puVar6;
      FUN_140156b50(puVar6);
      local_60 = 1;
      plVar1 = puVar6 + 8;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_140156be0(puVar6);
        local_60 = 0;
        FUN_14013c4c0(puVar6);
      }
      else {
        FUN_140156be0(puVar6);
      }
    }
    local_158[0] = 0x15;
    puVar5 = puVar7;
    if (*param_2 != 0) {
      puVar5 = *(undefined8 **)(*param_2 + 0x38);
    }
    puVar6 = puVar7;
    if (local_150[0] != 0) {
      puVar6 = *(undefined8 **)(local_150[0] + 0x38);
    }
    *(undefined4 *)puVar6 = *(undefined4 *)puVar5;
    puVar5 = puVar7;
    if (*param_2 != 0) {
      puVar5 = *(undefined8 **)(*param_2 + 0x38);
    }
    puVar6 = puVar7;
    if (local_150[0] != 0) {
      puVar6 = *(undefined8 **)(local_150[0] + 0x38);
    }
    FUN_14004f4f0(puVar6 + 2,puVar5 + 2);
    lVar2 = *param_2;
    puVar5 = puVar7;
    if (lVar2 != 0) {
      puVar5 = *(undefined8 **)(lVar2 + 0x38);
    }
    local_e8 = *(undefined4 *)((longlong)puVar5 + 0xc);
    if (lVar2 != 0) {
      puVar7 = *(undefined8 **)(lVar2 + 0x38);
    }
    local_a8 = *(undefined4 *)(puVar7 + 4);
    local_a4 = *(undefined2 *)((longlong)puVar7 + 0x24);
    FUN_1401794b0(param_1,local_158);
    FUN_1401858d0(&local_98);
    FUN_1401858d0(&local_e0);
    local_res8 = &local_108;
    FUN_1401560e0(&local_108);
    if (local_100 != 0) {
      if ((longlong)local_f8 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_f8 = local_f8 & 0xffffffff00000000;
    }
    FUN_1401858d0(&local_130);
    FUN_140174710(&local_138);
    FUN_140174690(&local_140);
    FUN_14013c530(local_150);
  }
  FUN_140156be0(uVar4);
  FUN_14013c530(param_2);
  return;
}



void FUN_14017e1c0(longlong param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined4 local_118 [2];
  undefined8 local_110 [2];
  undefined8 local_100;
  undefined8 local_f8;
  undefined **local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  longlong local_c0;
  ulonglong local_b8;
  undefined **local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined **local_70;
  undefined4 local_68;
  undefined2 local_64;
  undefined **local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_28;
  
  local_28 = 0xfffffffffffffffe;
  if (*(longlong *)(param_1 + 0x758) != 0) {
    local_110[0] = 0;
    local_100 = 0;
    local_f8 = 0;
    local_e8 = 0;
    local_e0 = 0;
    local_d8 = 0;
    local_d0 = 0;
    local_f0 = Proud::ByteArray::vftable;
    local_b8 = 0;
    local_c0 = 0;
    local_c8 = 0;
    local_98 = 0;
    local_90 = 0;
    local_88 = 0;
    local_80 = 0;
    local_a0 = Proud::ByteArray::vftable;
    local_70 = Proud::AddrPort::vftable;
    local_50 = 0;
    local_48 = 0;
    local_40 = 0;
    local_38 = 0;
    local_58 = Proud::ByteArray::vftable;
    local_118[0] = 4;
    local_68 = *(undefined4 *)(param_2 + 8);
    local_64 = *(undefined2 *)(param_2 + 0xc);
    iVar1 = *(int *)(param_3 + 0x18);
    if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_140050060(&local_58,iVar1);
    uVar3 = 0;
    if (*(int *)(param_3 + 0x18) != 0) {
      uVar3 = *(undefined8 *)(param_3 + 0x10);
    }
    uVar2 = local_48;
    if ((int)local_40 == 0) {
      uVar2 = 0;
    }
    FUN_140050120(uVar2,uVar3,(longlong)iVar1);
    FUN_1401794b0(param_1,local_118);
    FUN_1401858d0(&local_58);
    FUN_1401858d0(&local_a0);
    FUN_1401560e0(&local_c8);
    if (local_c0 != 0) {
      if ((longlong)local_b8 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_b8 = local_b8 & 0xffffffff00000000;
    }
    FUN_1401858d0(&local_f0);
    FUN_140174710(&local_f8);
    FUN_140174690(&local_100);
    FUN_14013c530(local_110);
  }
  return;
}



undefined8 FUN_14017e360(longlong *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  longlong *plVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  longlong lVar5;
  undefined4 *puVar6;
  undefined8 uVar7;
  longlong *local_res8;
  
  uVar4 = (**(code **)(param_1[-0x15] + 0x58))
                    (param_1 + -0x15,param_2,param_3,param_4,0xfffffffffffffffe);
  FUN_140156b50(uVar4);
  if (DAT_1403288ef != '\0') {
    (**(code **)(param_1[-0x15] + 200))(param_1 + -0x15,L"Proud::CNetServerImpl::DestroyP2PGroup");
  }
  FUN_140174d90(param_1 + -0x15,&local_res8,param_2 & 0xffffffff);
  if ((local_res8 == (longlong *)0x0) || (*local_res8 == 0)) {
    if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0))
    {
      lVar5 = *local_res8;
      if (lVar5 != 0) {
        FUN_140162160(lVar5);
        FUN_140156970(lVar5);
      }
      FUN_140156970(local_res8);
    }
    FUN_140156be0(uVar4);
    uVar4 = 0;
  }
  else {
    while( true ) {
      if (local_res8 == (longlong *)0x0) {
        lVar5 = 0;
      }
      else {
        lVar5 = *local_res8;
      }
      if (*(longlong *)(lVar5 + 0x28) == 0) break;
      if (local_res8 == (longlong *)0x0) {
        puVar6 = (undefined4 *)0x0;
      }
      else {
        puVar6 = (undefined4 *)*local_res8;
      }
      if ((*(longlong *)(puVar6 + 10) == 0) || (*(undefined4 **)(puVar6 + 6) == (undefined4 *)0x0))
      {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      (**(code **)(*param_1 + 0x128))(param_1,**(undefined4 **)(puVar6 + 6),*puVar6);
    }
    uVar3 = (param_2 & 0xffffffff) % (ulonglong)*(uint *)(param_1 + 0x70);
    if (param_1[0x6c] != 0) {
      piVar1 = *(int **)(param_1[0x6c] + uVar3 * 8);
      while( true ) {
        if ((piVar1 == (int *)0x0) || ((uint)uVar3 != (uint)piVar1[8] % *(uint *)(param_1 + 0x70)))
        goto LAB_14017e4e4;
        if (*piVar1 == (int)param_2) break;
        piVar1 = *(int **)(piVar1 + 4);
      }
      FUN_140177440(param_1 + 0x6b,piVar1,0);
      plVar2 = (longlong *)param_1[0x7a];
      lVar5 = *plVar2;
      uVar7 = (**(code **)(param_1[0xe] + 8))();
      (**(code **)(lVar5 + 0x10))(plVar2,uVar7,param_2 & 0xffffffff);
      FUN_14017ca00(param_1 + -0x15,param_2 & 0xffffffff);
    }
LAB_14017e4e4:
    if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0))
    {
      lVar5 = *local_res8;
      if (lVar5 != 0) {
        FUN_140162160(lVar5);
        FUN_140156970(lVar5);
      }
      FUN_140156970(local_res8);
    }
    FUN_140156be0(uVar4);
    uVar4 = 1;
  }
  return uVar4;
}



undefined8 FUN_14017e590(longlong param_1,uint param_2,uint param_3)

{
  longlong *plVar1;
  longlong lVar2;
  ulonglong uVar3;
  int iVar4;
  undefined8 uVar5;
  longlong lVar6;
  uint *puVar7;
  uint *puVar8;
  uint *puVar9;
  uint *puVar10;
  uint *puVar11;
  uint uVar12;
  uint uVar13;
  longlong *plVar14;
  undefined8 uVar15;
  longlong *local_res8;
  uint local_res10 [2];
  uint local_res18 [2];
  
  plVar1 = (longlong *)(param_1 + -0xa8);
  local_res10[0] = param_2;
  local_res18[0] = param_3;
  uVar5 = (**(code **)(*plVar1 + 0x58))(plVar1);
  FUN_140156b50(uVar5);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*plVar1 + 200))(plVar1,L"Proud::CNetServerImpl::LeaveP2PGroup");
  }
  FUN_140174d90(plVar1,&local_res8,local_res18[0]);
  uVar12 = local_res10[0];
  if ((local_res8 == (longlong *)0x0) || (lVar2 = *local_res8, lVar2 == 0)) {
    if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0))
    {
      lVar2 = *local_res8;
      if (lVar2 != 0) {
        FUN_140162160(lVar2);
        FUN_140156970(lVar2);
      }
      FUN_140156970(local_res8);
    }
  }
  else {
    uVar3 = (ulonglong)local_res10[0] % (ulonglong)*(uint *)(lVar2 + 0x30);
    if ((*(longlong *)(lVar2 + 0x10) != 0) &&
       (puVar11 = *(uint **)(*(longlong *)(lVar2 + 0x10) + uVar3 * 8), puVar11 != (uint *)0x0)) {
      while( true ) {
        if ((uint)uVar3 != puVar11[10] % *(uint *)(lVar2 + 0x30)) goto LAB_14017ea36;
        if (*puVar11 == local_res10[0]) break;
        puVar11 = *(uint **)(puVar11 + 6);
        if (puVar11 == (uint *)0x0) goto LAB_14017ea36;
      }
      puVar11 = (uint *)0x0;
      plVar14 = local_res8;
      if (local_res10[0] == 1) {
        puVar10 = puVar11;
        if (plVar1 != (longlong *)0x0) {
          puVar10 = (uint *)(param_1 + 0x10);
        }
      }
      else {
        lVar6 = FUN_14015f740(plVar1);
        if ((lVar6 == 0) ||
           (puVar10 = (uint *)(lVar6 + 0x40), (uint *)(lVar6 + 0x40) == (uint *)0x0)) {
          plVar14[1] = plVar14[1] + -1;
          if (local_res8[1] == 0) {
            lVar2 = *local_res8;
            if (lVar2 != 0) {
              FUN_140162160(lVar2);
              FUN_140156970(lVar2);
            }
            FUN_140156970(local_res8);
          }
          goto LAB_14017eaa9;
        }
      }
      puVar9 = puVar11;
      if (*(longlong *)(lVar2 + 0x28) != 0) {
        puVar9 = *(uint **)(lVar2 + 0x18);
      }
      while( true ) {
        puVar7 = puVar11;
        if (plVar14 != (longlong *)0x0) {
          puVar7 = (uint *)*plVar14;
        }
        if (puVar9 == (uint *)0x0) break;
        if (*puVar9 != 1) {
          (**(code **)(*(longlong *)(param_1 + 0x400) + 0x80))
                    ((longlong *)(param_1 + 0x400),*puVar9,&DAT_140328530,local_res10,local_res18);
          plVar14 = local_res8;
          uVar12 = local_res10[0];
        }
        if ((uVar12 != 1) && (uVar12 != *puVar9)) {
          (**(code **)(*(longlong *)(param_1 + 0x400) + 0x80))
                    ((longlong *)(param_1 + 0x400),uVar12,&DAT_140328530,puVar9,local_res18);
          plVar14 = local_res8;
          uVar12 = local_res10[0];
        }
        puVar9 = *(uint **)(puVar9 + 6);
      }
      if ((uint *)(lVar2 + 8) != puVar7 + 2) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      uVar13 = 1;
      if (uVar12 != 1) {
        puVar9 = puVar11;
        if (plVar14 != (longlong *)0x0) {
          puVar9 = (uint *)*plVar14;
        }
        puVar7 = puVar11;
        if (*(longlong *)(puVar9 + 10) != 0) {
          puVar7 = *(uint **)(puVar9 + 6);
        }
        while( true ) {
          puVar8 = puVar11;
          if (plVar14 != (longlong *)0x0) {
            puVar8 = (uint *)*plVar14;
          }
          if (puVar7 == (uint *)0x0) break;
          iVar4 = (**(code **)**(undefined8 **)(puVar7 + 4))();
          if ((iVar4 != 1) && (iVar4 = (*(code *)**(undefined8 **)puVar10)(puVar10), iVar4 != 1)) {
            puVar8 = (uint *)(*(longlong *)(puVar7 + 4) + -0x40);
            if (*(longlong *)(puVar7 + 4) == 0) {
              puVar8 = puVar11;
            }
            FUN_140175fe0(param_1 + 0x230,plVar1,puVar10 + -0x10,puVar8);
          }
          puVar7 = *(uint **)(puVar7 + 6);
          plVar14 = local_res8;
        }
        uVar13 = local_res10[0];
        if (puVar9 + 2 != puVar8 + 2) {
                    // WARNING: Subroutine does not return
          FUN_14004ea80(0x80004005);
        }
      }
      puVar9 = puVar11;
      if (plVar14 != (longlong *)0x0) {
        puVar9 = (uint *)*plVar14;
      }
      uVar3 = (ulonglong)uVar13 % (ulonglong)puVar9[0xc];
      if (*(longlong *)(puVar9 + 4) != 0) {
        puVar7 = *(uint **)(*(longlong *)(puVar9 + 4) + uVar3 * 8);
        while( true ) {
          if ((puVar7 == (uint *)0x0) || ((uint)uVar3 != puVar7[10] % puVar9[0xc]))
          goto LAB_14017e861;
          if (*puVar7 == uVar13) break;
          puVar7 = *(uint **)(puVar7 + 6);
        }
        FUN_14015eab0(puVar9 + 2,puVar7,0);
        plVar14 = local_res8;
        uVar13 = local_res10[0];
      }
LAB_14017e861:
      uVar3 = (ulonglong)local_res18[0] % (ulonglong)puVar10[0xc];
      if (*(longlong *)(puVar10 + 4) != 0) {
        puVar9 = *(uint **)(*(longlong *)(puVar10 + 4) + uVar3 * 8);
        while( true ) {
          if ((puVar9 == (uint *)0x0) || ((uint)uVar3 != puVar9[8] % puVar10[0xc]))
          goto LAB_14017e8c4;
          if (*puVar9 == local_res18[0]) break;
          puVar9 = *(uint **)(puVar9 + 4);
        }
        FUN_140177440(puVar10 + 2,puVar9,0);
        plVar14 = local_res8;
        uVar13 = local_res10[0];
      }
LAB_14017e8c4:
      puVar10 = puVar11;
      if (plVar14 != (longlong *)0x0) {
        puVar10 = (uint *)*plVar14;
      }
      FUN_140179860(plVar1,puVar10,uVar13,0x1e);
      puVar10 = puVar11;
      if (local_res8 != (longlong *)0x0) {
        puVar10 = (uint *)*local_res8;
      }
      if ((*(longlong *)(puVar10 + 10) == 0) && (*(char *)(param_1 + 0x1758) == '\0')) {
        if (local_res8 != (longlong *)0x0) {
          puVar11 = (uint *)*local_res8;
        }
        uVar12 = *puVar11;
        uVar3 = (ulonglong)uVar12 % (ulonglong)*(uint *)(param_1 + 0x380);
        if (*(longlong *)(param_1 + 0x360) != 0) {
          puVar11 = *(uint **)(*(longlong *)(param_1 + 0x360) + uVar3 * 8);
          while( true ) {
            if ((puVar11 == (uint *)0x0) || ((uint)uVar3 != puVar11[8] % *(uint *)(param_1 + 0x380))
               ) goto LAB_14017e9b3;
            if (*puVar11 == uVar12) break;
            puVar11 = *(uint **)(puVar11 + 4);
          }
          FUN_140177440(param_1 + 0x358,puVar11,0);
          plVar14 = *(longlong **)(param_1 + 0x3d0);
          lVar2 = *plVar14;
          uVar15 = (**(code **)(*(longlong *)(param_1 + 0x70) + 8))();
          (**(code **)(lVar2 + 0x10))(plVar14,uVar15,uVar12);
          FUN_14017ca00(plVar1,uVar12);
        }
      }
      else {
        if (local_res8 != (longlong *)0x0) {
          puVar11 = (uint *)*local_res8;
        }
        FUN_14016a150(plVar1,puVar11);
      }
LAB_14017e9b3:
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        lVar2 = *local_res8;
        if (lVar2 != 0) {
          FUN_140162160(lVar2);
          FUN_140156970(lVar2);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar5);
      return 1;
    }
LAB_14017ea36:
    local_res8[1] = local_res8[1] + -1;
    if (local_res8[1] == 0) {
      lVar2 = *local_res8;
      if (lVar2 != 0) {
        FUN_140162160(lVar2);
        FUN_140156970(lVar2);
      }
      FUN_140156970(local_res8);
    }
  }
LAB_14017eaa9:
  FUN_140156be0(uVar5);
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

uint FUN_14017ead0(longlong param_1,undefined8 param_2,int param_3,undefined8 param_4,
                  undefined1 *param_5)

{
  longlong *plVar1;
  char cVar2;
  uint uVar3;
  uint uVar4;
  uint uVar5;
  uint uVar6;
  undefined ***pppuVar7;
  longlong lVar8;
  undefined8 uVar9;
  uint *puVar10;
  longlong *plVar11;
  int *piVar12;
  longlong lVar13;
  void *pvVar14;
  longlong *plVar15;
  uint *puVar16;
  uint uVar17;
  int iVar18;
  uint *puVar19;
  ulonglong uVar20;
  undefined1 auStack_2e8 [32];
  undefined ***local_2c8;
  uint *local_2b8;
  longlong *local_2b0;
  undefined ***local_2a8;
  longlong local_2a0;
  undefined8 local_298;
  undefined ***local_290;
  undefined1 local_288;
  undefined **local_280;
  undefined8 local_278;
  undefined8 local_270;
  undefined8 local_268;
  undefined8 local_260;
  undefined8 local_258;
  undefined1 local_250;
  undefined8 local_248;
  undefined8 local_240;
  undefined1 local_238 [8];
  undefined **local_230 [5];
  void *local_208;
  longlong local_200;
  ulonglong local_1f8;
  undefined8 local_1f0;
  int local_1e8 [100];
  ulonglong local_58;
  
  local_240 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_2e8;
  plVar1 = (longlong *)(param_1 + -0xa8);
  local_2a0 = param_1;
  local_298 = param_4;
  local_248 = param_4;
  pppuVar7 = (undefined ***)(**(code **)(*plVar1 + 0x58))(plVar1);
  local_2a8 = pppuVar7;
  local_290 = pppuVar7;
  FUN_140156b50(pppuVar7);
  local_288 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*plVar1 + 200))(plVar1);
  }
  if ((param_3 < 0) || (*(longlong *)(param_1 + 0x3d0) == 0)) {
    FUN_140156be0(pppuVar7);
  }
  else {
    if ((*(char *)(param_1 + 0x1758) != '\0') || (param_3 != 0)) {
      puVar16 = (uint *)0x0;
      local_208 = (void *)0x0;
      local_1f0 = 0;
      local_200 = 0;
      local_1f8 = 100;
      uVar6 = 0;
      if (0 < param_3) {
        FUN_14015e7c0(&local_208,param_2,(longlong)param_3);
        FUN_14015e1a0(&local_208);
        local_2b0 = (longlong *)local_200;
        pvVar14 = local_208;
        uVar20 = local_1f8;
        puVar10 = puVar16;
        if (0 < (int)local_200) {
          do {
            iVar18 = (int)puVar10;
            lVar8 = (longlong)iVar18;
            if ((iVar18 < 0) || (local_200 <= lVar8)) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            piVar12 = local_1e8 + lVar8;
            if (100 < uVar20) {
              piVar12 = (int *)((longlong)pvVar14 + lVar8 * 4);
            }
            if (*piVar12 != 1) {
              lVar8 = FUN_14015f740(plVar1);
              if (lVar8 == 0) {
                if (100 < uVar20) {
                  operator_delete__(pvVar14);
                }
                FUN_140156be0(local_2a8);
                param_4 = local_298;
                goto LAB_14017f1cd;
              }
              cVar2 = FUN_140198740(lVar8 + 0x288);
              if ((cVar2 != '\0') &&
                 ((pvVar14 = local_208, uVar20 = local_1f8, *(char *)(lVar8 + 0x680) != '\0' ||
                  (*(int *)(lVar8 + 0x670) != 0)))) goto LAB_14017eedd;
              FUN_1401568c0();
              local_2b8 = (uint *)PTR_DAT_1403200a0;
              uVar3 = FUN_140156740(&DAT_140261930);
              puVar10 = puVar16;
              if ((local_2b8 != (uint *)0x0) &&
                 (puVar10 = (uint *)0x0, local_2b8 != (uint *)PTR_DAT_1403200a0)) {
                puVar10 = (uint *)(ulonglong)local_2b8[-2];
              }
              uVar4 = 0;
              uVar5 = uVar3;
              if ((((int)uVar3 <= (int)puVar10) && (uVar5 = uVar6, local_2b8 != (uint *)0x0)) &&
                 (uVar5 = uVar4, local_2b8 != (uint *)PTR_DAT_1403200a0)) {
                uVar5 = local_2b8[-2];
              }
              uVar17 = 1;
              if (1 < (int)uVar5) {
                uVar17 = uVar5;
              }
              uVar5 = uVar4;
              if ((local_2b8 != (uint *)0x0) && (local_2b8 != (uint *)PTR_DAT_1403200a0)) {
                uVar5 = local_2b8[-2];
              }
              if ((int)uVar5 < (int)uVar17) {
                if (local_2b8 == (uint *)0x0) {
                  local_2b8 = (uint *)PTR_DAT_1403200a0;
                }
                if ((int)uVar17 < 0) {
                    // WARNING: Subroutine does not return
                  FUN_1401566b0();
                }
                if (uVar17 == 0) {
                  FUN_14004f990(&local_2b8);
                }
                else {
                  uVar5 = uVar6;
                  if ((local_2b8 != (uint *)0x0) && (local_2b8 != (uint *)PTR_DAT_1403200a0)) {
                    uVar5 = local_2b8[-2];
                  }
                  if (uVar17 != uVar5) {
                    puVar10 = (uint *)FUN_140156940((longlong)(int)uVar17 * 2 + 10);
                    if (puVar10 != (uint *)0x0) {
                      *puVar10 = 0;
                      puVar10[1] = 1;
                    }
                    *puVar10 = uVar17;
                    uVar5 = uVar6;
                    if ((local_2b8 != (uint *)0x0) && (local_2b8 != (uint *)PTR_DAT_1403200a0)) {
                      uVar5 = local_2b8[-2];
                    }
                    puVar19 = (uint *)PTR_DAT_1403200a0;
                    if ((int)uVar17 < (int)uVar5) {
LAB_14017ed64:
                      if (local_2b8 != (uint *)0x0) {
                        puVar19 = local_2b8;
                      }
                    }
                    else {
                      uVar17 = uVar6;
                      if (local_2b8 != (uint *)0x0) {
                        if (local_2b8 != (uint *)PTR_DAT_1403200a0) {
                          uVar17 = local_2b8[-2];
                        }
                        goto LAB_14017ed64;
                      }
                    }
                    FUN_140156770(puVar10 + 2,puVar19,uVar17);
                    FUN_14004f990(&local_2b8);
                    local_2b8 = puVar10 + 2;
                  }
                }
              }
              FUN_14004f670(&local_2b8);
              puVar10 = local_2b8;
              if (local_2b8 == (uint *)0x0) {
                puVar10 = (uint *)PTR_DAT_1403200a0;
              }
              FUN_140156770(puVar10,&DAT_140261930,uVar3);
              puVar10 = local_2b8;
              if (local_2b8 == (uint *)0x0) {
                puVar10 = (uint *)PTR_DAT_1403200a0;
              }
              uVar5 = FUN_140156740(puVar10);
              uVar3 = 0;
              if (0 < (int)uVar5) {
                uVar3 = uVar5;
              }
              uVar5 = uVar4;
              if ((local_2b8 != (uint *)0x0) && (local_2b8 != (uint *)PTR_DAT_1403200a0)) {
                uVar5 = local_2b8[-2];
              }
              if (((int)uVar3 < (int)uVar5) || (uVar3 = uVar4, local_2b8 == (uint *)0x0)) {
LAB_14017ee00:
                if (((local_2b8 != (uint *)PTR_DAT_1403200a0) && (local_2b8 != (uint *)0x0)) &&
                   (local_2b8 + -2 != (uint *)0x0)) {
                  local_2b8[-2] = uVar3;
                  *(undefined2 *)((longlong)local_2b8 + (longlong)(int)uVar3 * 2) = 0;
                }
              }
              else if (local_2b8 != (uint *)PTR_DAT_1403200a0) {
                uVar3 = local_2b8[-2];
                goto LAB_14017ee00;
              }
              local_278 = 0;
              local_270 = 0;
              local_268 = 0;
              local_260 = 0;
              local_280 = Proud::ByteArray::vftable;
              local_2c8 = &local_280;
              FUN_140181f50(local_238,1,*(undefined4 *)(lVar8 + 0x6f8),&local_2b8);
              (**(code **)(*plVar1 + 0x80))(plVar1);
              FUN_1401858d0(&local_280);
              puVar10 = local_2b8;
              if (((local_2b8 != (uint *)0x0) && (local_2b8 != (uint *)PTR_DAT_1403200a0)) &&
                 (puVar19 = local_2b8 + -2, puVar19 != (uint *)0x0)) {
                uVar9 = FUN_1401568c0();
                local_258 = uVar9;
                FUN_140156b50(uVar9);
                local_250 = 1;
                puVar10 = puVar10 + -1;
                *puVar10 = *puVar10 - 1;
                if (*puVar10 == 0) {
                  FUN_140156970(puVar19);
                }
                FUN_140156be0(uVar9);
                local_250 = 0;
              }
              local_2b8 = (uint *)PTR_DAT_1403200a0;
              pvVar14 = local_208;
              uVar20 = local_1f8;
            }
LAB_14017eedd:
            puVar10 = (uint *)(ulonglong)(iVar18 + 1U);
            param_1 = local_2a0;
          } while ((int)(iVar18 + 1U) < (int)local_2b0);
        }
        param_3 = (int)local_2b0;
      }
      local_2b0 = (longlong *)FUN_140156940(0xf8);
      puVar10 = puVar16;
      if (local_2b0 != (longlong *)0x0) {
        puVar10 = (uint *)FUN_1401aaca0(local_2b0);
      }
      if (puVar10 == (uint *)0x0) {
        local_2b0 = (longlong *)0x0;
      }
      else {
        local_2b0 = (longlong *)FUN_140156940(0x10);
        local_2b0[1] = 1;
        *local_2b0 = (longlong)puVar10;
      }
      plVar15 = local_2b0;
      plVar11 = *(longlong **)(param_1 + 0x3d0);
      puVar10 = puVar16;
      if (local_2b0 != (longlong *)0x0) {
        puVar10 = (uint *)*local_2b0;
      }
      lVar8 = *plVar11;
      uVar9 = (**(code **)(*(longlong *)(local_2a0 + 0x70) + 8))();
      uVar6 = (**(code **)(lVar8 + 8))(plVar11,uVar9);
      lVar8 = local_2a0;
      *puVar10 = uVar6;
      puVar10 = puVar16;
      if (plVar15 != (longlong *)0x0) {
        puVar10 = (uint *)*plVar15;
      }
      uVar20 = (ulonglong)*puVar10 % (ulonglong)*(uint *)(local_2a0 + 0x380);
      if (*(longlong *)(local_2a0 + 0x360) != 0) {
        for (puVar19 = *(uint **)(*(longlong *)(local_2a0 + 0x360) + uVar20 * 8);
            (puVar19 != (uint *)0x0 && ((uint)uVar20 == puVar19[8] % *(uint *)(local_2a0 + 0x380)));
            puVar19 = *(uint **)(puVar19 + 4)) {
          pppuVar7 = local_2a8;
          if (*puVar19 == *puVar10) goto LAB_14017f0a8;
        }
      }
      plVar11 = (longlong *)FUN_1401c4660(local_2a0 + 0x358,puVar10);
      pppuVar7 = local_2a8;
      if (plVar15 != (longlong *)*plVar11) {
        if (plVar15 != (longlong *)0x0) {
          plVar15[1] = plVar15[1] + 1;
          plVar15 = local_2b0;
          pppuVar7 = local_290;
        }
        puVar10 = puVar16;
        if ((*plVar11 != 0) &&
           (*(longlong *)(*plVar11 + 8) = *(longlong *)(*plVar11 + 8) + -1, plVar15 = local_2b0,
           pppuVar7 = local_290, *(longlong *)(*plVar11 + 8) == 0)) {
          puVar10 = (uint *)*plVar11;
        }
        *plVar11 = (longlong)plVar15;
        if (puVar10 != (uint *)0x0) {
          lVar8 = *(longlong *)puVar10;
          if (lVar8 != 0) {
            FUN_140162160(lVar8);
            FUN_140156970(lVar8);
          }
          FUN_140156970(puVar10);
          lVar8 = local_2a0;
        }
      }
LAB_14017f0a8:
      puVar10 = puVar16;
      if (plVar15 != (longlong *)0x0) {
        puVar10 = (uint *)*plVar15;
      }
      *(undefined1 *)(puVar10 + 0x3c) = *param_5;
      *(int *)(lVar8 + 0x16f0) = *(int *)(lVar8 + 0x16f0) + 1;
      if (0 < param_3) {
        local_2a8 = local_230;
        puVar10 = puVar16;
        do {
          FUN_14015e720(local_230,local_298);
          local_230[0] = Proud::ByteArray::vftable;
          puVar19 = puVar16;
          if (plVar15 != (longlong *)0x0) {
            puVar19 = (uint *)*plVar15;
          }
          iVar18 = (int)puVar10;
          lVar13 = (longlong)iVar18;
          if ((iVar18 < 0) || (local_200 <= lVar13)) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          if (local_1f8 < 0x65) {
            piVar12 = local_1e8 + lVar13;
          }
          else {
            piVar12 = (int *)((longlong)local_208 + lVar13 * 4);
          }
          local_2c8 = (undefined ***)CONCAT44(local_2c8._4_4_,*(undefined4 *)(lVar8 + 0x16f0));
          FUN_14017a930(plVar1,*piVar12,*puVar19,local_230);
          puVar10 = (uint *)(ulonglong)(iVar18 + 1U);
        } while ((int)(iVar18 + 1U) < param_3);
      }
      plVar1 = local_2b0;
      if (plVar15 != (longlong *)0x0) {
        puVar16 = (uint *)*plVar15;
      }
      uVar6 = *puVar16;
      if (plVar15 != (longlong *)0x0) {
        plVar15 = plVar15 + 1;
        *plVar15 = *plVar15 + -1;
        pppuVar7 = local_290;
        if (*plVar15 == 0) {
          lVar8 = *local_2b0;
          if (lVar8 != 0) {
            FUN_140162160(lVar8);
            FUN_140156970(lVar8);
          }
          FUN_140156970(plVar1);
          pppuVar7 = local_290;
        }
      }
      if (100 < local_1f8) {
        operator_delete__(local_208);
      }
      FUN_140156be0(pppuVar7);
      FUN_1401858d0(local_298);
      return uVar6;
    }
    FUN_140156be0(pppuVar7);
  }
LAB_14017f1cd:
  FUN_1401858d0(param_4);
  return 0;
}



ulonglong FUN_14017f200(longlong param_1,ulonglong param_2,undefined4 param_3,undefined4 param_4,
                       longlong param_5,undefined8 param_6,undefined4 param_7)

{
  int iVar1;
  uint uVar2;
  void *pvVar3;
  longlong lVar4;
  longlong *plVar5;
  char cVar6;
  undefined4 *puVar7;
  ulonglong *puVar8;
  undefined4 *puVar9;
  longlong lVar10;
  longlong lVar11;
  uint *puVar12;
  ulonglong uVar13;
  int *piVar14;
  undefined4 *puVar15;
  ulonglong uVar16;
  undefined8 uVar17;
  ulonglong local_res10;
  longlong *local_78;
  undefined **local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  
  puVar15 = (undefined4 *)0x0;
  local_res10 = param_2;
  if (*(longlong *)(param_2 + 0x228) == 0) {
    pvVar3 = *(void **)(param_2 + 0x228);
    if (pvVar3 != (void *)0x0) {
      FUN_1401858d0((longlong)pvVar3 + 8);
      operator_delete(pvVar3);
    }
    *(undefined8 *)(param_2 + 0x228) = 0;
    puVar7 = operator_new(0x40);
    puVar9 = puVar15;
    if (puVar7 != (undefined4 *)0x0) {
      *(undefined8 *)(puVar7 + 4) = 0;
      *(undefined8 *)(puVar7 + 6) = 0;
      *(undefined8 *)(puVar7 + 8) = 0;
      *(undefined8 *)(puVar7 + 10) = 0;
      *(undefined ***)(puVar7 + 2) = Proud::ByteArray::vftable;
      *puVar7 = 0;
      puVar7[0xe] = 0;
      *(undefined8 *)(puVar7 + 0xc) = 0;
      puVar9 = puVar7;
    }
    *(undefined4 **)(param_2 + 0x228) = puVar9;
    *puVar9 = param_3;
    *(undefined4 *)(*(longlong *)(param_2 + 0x228) + 4) = param_4;
    lVar4 = *(longlong *)(param_2 + 0x228);
    iVar1 = *(int *)(param_5 + 0x18);
    if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_140050060(lVar4 + 8,iVar1);
    puVar9 = puVar15;
    if (*(int *)(param_5 + 0x18) != 0) {
      puVar9 = *(undefined4 **)(param_5 + 0x10);
    }
    puVar7 = puVar15;
    if (*(int *)(lVar4 + 0x20) != 0) {
      puVar7 = *(undefined4 **)(lVar4 + 0x18);
    }
    FUN_140050120(puVar7,puVar9,(longlong)iVar1);
    *(undefined4 *)(*(longlong *)(param_2 + 0x228) + 0x38) = param_7;
    if (*(longlong *)(param_1 + 0x17f0) != 0) {
      FUN_140196d20(*(longlong *)(param_1 + 0x17f0),L"Issuedispose %dclient in %s",
                    *(undefined4 *)(param_2 + 0x6f8),param_6);
    }
  }
  uVar2 = *(uint *)(param_1 + 0x2a8);
  uVar13 = (param_2 & 0xffffffff) % (ulonglong)uVar2;
  if (*(longlong *)(param_1 + 0x288) != 0) {
    puVar8 = *(ulonglong **)(*(longlong *)(param_1 + 0x288) + uVar13 * 8);
    while ((puVar8 != (ulonglong *)0x0 && ((uint)uVar13 == (uint)puVar8[4] % uVar2))) {
      if (*puVar8 == param_2) {
        return (ulonglong)(uint)puVar8[4] / (ulonglong)uVar2;
      }
      puVar8 = (ulonglong *)puVar8[2];
    }
  }
  if (*(longlong *)(param_2 + 0x228) == 0) {
    local_60 = 0;
    local_58 = 0;
    local_50 = 0;
    local_48 = 0;
    local_68 = Proud::ByteArray::vftable;
    FUN_1401765d0(param_1,param_2,0xc,7,&local_68,0);
    FUN_1401858d0(&local_68);
  }
  else {
    puVar9 = *(undefined4 **)(param_2 + 0x228);
    FUN_1401765d0(param_1,param_2,*puVar9,puVar9[1],puVar9 + 2,puVar9[0xe]);
  }
  uVar16 = (**(code **)(*(longlong *)(param_1 + 0x118) + 8))();
  uVar2 = *(uint *)(param_1 + 0x2a8);
  uVar13 = (param_2 & 0xffffffff) % (ulonglong)uVar2;
  lVar4 = *(longlong *)(param_1 + 0x288);
  if (lVar4 != 0) {
    puVar8 = *(ulonglong **)(lVar4 + uVar13 * 8);
    while ((puVar8 != (ulonglong *)0x0 && ((uint)uVar13 == (uint)puVar8[4] % uVar2))) {
      if (*puVar8 == param_2) goto LAB_14017f4fa;
      puVar8 = (ulonglong *)puVar8[2];
    }
    if (lVar4 != 0) {
      puVar8 = *(ulonglong **)(lVar4 + uVar13 * 8);
      while ((puVar8 != (ulonglong *)0x0 && ((uint)uVar13 == (uint)puVar8[4] % uVar2))) {
        if (*puVar8 == param_2) goto LAB_14017f4f5;
        puVar8 = (ulonglong *)puVar8[2];
      }
      if (lVar4 != 0) goto LAB_14017f4c0;
    }
  }
  cVar6 = FUN_1401a8bb0(param_1 + 0x280,(ulonglong)uVar2,CONCAT71((int7)((ulonglong)lVar4 >> 8),1));
  if (cVar6 == '\0') {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x8007000e);
  }
LAB_14017f4c0:
  FUN_14015b3b0(param_1 + 0x280);
  puVar8 = (ulonglong *)FUN_14015eee0(param_1 + 0x280,&local_res10,uVar13,param_2 & 0xffffffff);
  FUN_14015b3b0(param_1 + 0x280);
LAB_14017f4f5:
  puVar8[1] = uVar16;
LAB_14017f4fa:
  FUN_1401855c0(*(undefined8 *)(*(longlong *)(param_2 + 0x748) + 0x110));
  plVar5 = *(longlong **)(param_2 + 0x760);
  if ((plVar5 != (longlong *)0x0) && (*plVar5 != 0)) {
    puVar9 = puVar15;
    if (plVar5 != (longlong *)0x0) {
      puVar9 = (undefined4 *)*plVar5;
    }
    puVar7 = puVar15;
    if (*(undefined8 **)(puVar9 + 0x54) != (undefined8 *)0x0) {
      puVar7 = (undefined4 *)**(undefined8 **)(puVar9 + 0x54);
    }
    FUN_1401855c0(puVar7);
  }
  (**(code **)(*(longlong *)(param_2 + 0xa0) + 0x40))();
  lVar4 = param_2 + 0x48;
  if (*(longlong *)(param_2 + 0x68) != 0) {
    puVar15 = *(undefined4 **)(param_2 + 0x58);
  }
  do {
    if (puVar15 == (undefined4 *)0x0) {
      FUN_140177540(lVar4);
      uVar13 = FUN_140175bd0(param_1 + 0x2d8,param_2);
      return uVar13;
    }
    if (puVar15 == (undefined4 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    local_78 = (longlong *)0x0;
    if (*(longlong *)(puVar15 + 2) != 0) {
      *(longlong *)(*(longlong *)(puVar15 + 2) + 8) =
           *(longlong *)(*(longlong *)(puVar15 + 2) + 8) + 1;
      local_78 = *(longlong **)(puVar15 + 2);
      param_2 = local_res10;
    }
    if (local_78 == (longlong *)0x0) {
      lVar10 = 0;
    }
    else {
      lVar10 = *local_78;
    }
    FUN_140179860(param_1,lVar10,*(undefined4 *)(param_2 + 0x6f8),0xb);
    if (local_78 == (longlong *)0x0) {
      lVar10 = 0;
    }
    else {
      lVar10 = *local_78;
    }
    if (*(longlong *)(lVar10 + 0x28) == 0) {
      piVar14 = (int *)0x0;
    }
    else {
      piVar14 = *(int **)(lVar10 + 0x18);
    }
    while( true ) {
      if (local_78 == (longlong *)0x0) {
        lVar11 = 0;
      }
      else {
        lVar11 = *local_78;
      }
      if (piVar14 == (int *)0x0) break;
      if (*piVar14 != 1) {
        if (local_78 == (longlong *)0x0) {
          lVar11 = 0;
        }
        else {
          lVar11 = *local_78;
        }
        (**(code **)(*(longlong *)(param_1 + 0x4a8) + 0x80))
                  ((longlong *)(param_1 + 0x4a8),*piVar14,&DAT_140328530,param_2 + 0x6f8,lVar11);
      }
      piVar14 = *(int **)(piVar14 + 6);
    }
    if (lVar10 + 8 != lVar11 + 8) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    if (local_78 == (longlong *)0x0) {
      lVar10 = 0;
    }
    else {
      lVar10 = *local_78;
    }
    uVar13 = (ulonglong)*(uint *)(param_2 + 0x6f8) % (ulonglong)*(uint *)(lVar10 + 0x30);
    if (*(longlong *)(lVar10 + 0x10) != 0) {
      puVar12 = *(uint **)(*(longlong *)(lVar10 + 0x10) + uVar13 * 8);
      while( true ) {
        if ((puVar12 == (uint *)0x0) || ((uint)uVar13 != puVar12[10] % *(uint *)(lVar10 + 0x30)))
        goto LAB_14017f6bb;
        if (*puVar12 == *(uint *)(param_2 + 0x6f8)) break;
        puVar12 = *(uint **)(puVar12 + 6);
      }
      FUN_14015eab0(lVar10 + 8,puVar12,0);
    }
LAB_14017f6bb:
    if (local_78 == (longlong *)0x0) {
      lVar10 = 0;
    }
    else {
      lVar10 = *local_78;
    }
    if ((*(longlong *)(lVar10 + 0x28) == 0) && (*(char *)(param_1 + 0x1800) == '\0')) {
      if (local_78 == (longlong *)0x0) {
        puVar12 = (uint *)0x0;
      }
      else {
        puVar12 = (uint *)*local_78;
      }
      uVar2 = *puVar12;
      uVar13 = (ulonglong)uVar2 % (ulonglong)*(uint *)(param_1 + 0x428);
      if (*(longlong *)(param_1 + 0x408) != 0) {
        puVar12 = *(uint **)(*(longlong *)(param_1 + 0x408) + uVar13 * 8);
        while( true ) {
          if ((puVar12 == (uint *)0x0) || ((uint)uVar13 != puVar12[8] % *(uint *)(param_1 + 0x428)))
          goto LAB_14017f792;
          if (*puVar12 == uVar2) break;
          puVar12 = *(uint **)(puVar12 + 4);
        }
        FUN_140177440(param_1 + 0x400,puVar12,0);
        plVar5 = *(longlong **)(param_1 + 0x478);
        lVar10 = *plVar5;
        uVar17 = (**(code **)(*(longlong *)(param_1 + 0x118) + 8))();
        (**(code **)(lVar10 + 0x10))(plVar5,uVar17,uVar2);
        FUN_14017ca00(param_1,uVar2);
      }
    }
    else {
      if (local_78 == (longlong *)0x0) {
        lVar10 = 0;
      }
      else {
        lVar10 = *local_78;
      }
      FUN_14016a150(param_1,lVar10);
    }
LAB_14017f792:
    if (local_78 == (longlong *)0x0) {
      lVar10 = 0;
    }
    else {
      lVar10 = *local_78;
    }
    FUN_14013c1d0(param_2 + 0x240,*(undefined4 *)(param_2 + 600),lVar10,1);
    if (local_78 != (longlong *)0x0) {
      plVar5 = local_78 + 1;
      *plVar5 = *plVar5 + -1;
      param_2 = local_res10;
      if (*plVar5 == 0) {
        lVar10 = *local_78;
        if (lVar10 != 0) {
          FUN_140162160(lVar10);
          FUN_140156970(lVar10);
        }
        FUN_140156970(local_78);
        param_2 = local_res10;
      }
    }
    if (puVar15 != (undefined4 *)0x0) {
      puVar15 = *(undefined4 **)(puVar15 + 4);
    }
  } while( true );
}



// WARNING: Removing unreachable block (ram,0x00014017fa50)

void FUN_14017f860(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  longlong lVar5;
  undefined4 *puVar6;
  longlong lVar7;
  longlong *local_res8;
  
  uVar4 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))
                    (param_1 + -0xa8,param_2,param_3,param_4,0xfffffffffffffffe);
  FUN_140156b50(uVar4);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
              (param_1 + -0xa8,L"Proud::CNetServerImpl::DestroyEmptyP2PGroups");
  }
  if (*(longlong *)(param_1 + 0x378) == 0) {
    lVar7 = 0;
  }
  else {
    lVar7 = *(longlong *)(param_1 + 0x368);
  }
  while( true ) {
    if (lVar7 == 0) {
      FUN_140156be0(uVar4);
      return;
    }
    if (lVar7 == 0) break;
    local_res8 = (longlong *)0x0;
    if (*(longlong *)(lVar7 + 8) != 0) {
      *(longlong *)(*(longlong *)(lVar7 + 8) + 8) = *(longlong *)(*(longlong *)(lVar7 + 8) + 8) + 1;
      local_res8 = *(longlong **)(lVar7 + 8);
    }
    if (local_res8 == (longlong *)0x0) {
      lVar5 = 0;
    }
    else {
      lVar5 = *local_res8;
    }
    if (*(longlong *)(lVar5 + 0x28) == 0) {
      if (local_res8 == (longlong *)0x0) {
        puVar6 = (undefined4 *)0x0;
      }
      else {
        puVar6 = (undefined4 *)*local_res8;
      }
      uVar1 = *puVar6;
      if (lVar7 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      lVar5 = *(longlong *)(lVar7 + 0x10);
      FUN_140177440(param_1 + 0x358,lVar7,0);
      plVar2 = *(longlong **)(param_1 + 0x3d0);
      lVar7 = *plVar2;
      uVar3 = (**(code **)(*(longlong *)(param_1 + 0x70) + 8))();
      (**(code **)(lVar7 + 0x10))(plVar2,uVar3);
      FUN_14017ca00(param_1 + -0xa8,uVar1);
      lVar7 = lVar5;
    }
    else if (lVar7 != 0) {
      lVar7 = *(longlong *)(lVar7 + 0x10);
    }
    if (local_res8 != (longlong *)0x0) {
      plVar2 = local_res8 + 1;
      *plVar2 = *plVar2 + -1;
      if (*plVar2 == 0) {
        lVar5 = *local_res8;
        if (lVar5 != 0) {
          FUN_140162160(lVar5);
          FUN_140156970(lVar5);
        }
        FUN_140156970(local_res8);
      }
    }
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



// WARNING: Removing unreachable block (ram,0x00014017fbe1)
// WARNING: Removing unreachable block (ram,0x00014017fbed)
// WARNING: Removing unreachable block (ram,0x00014017fbe5)
// WARNING: Removing unreachable block (ram,0x00014017fbf3)
// WARNING: Removing unreachable block (ram,0x00014017fb83)
// WARNING: Removing unreachable block (ram,0x00014017fb8f)
// WARNING: Removing unreachable block (ram,0x00014017fb87)
// WARNING: Removing unreachable block (ram,0x00014017fb95)
// WARNING: Removing unreachable block (ram,0x00014017fc41)
// WARNING: Removing unreachable block (ram,0x00014017fc4d)
// WARNING: Removing unreachable block (ram,0x00014017fc46)
// WARNING: Removing unreachable block (ram,0x00014017fc53)

void FUN_14017fa80(longlong *param_1)

{
  longlong *plVar1;
  undefined8 *puVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  undefined8 uVar7;
  longlong *plVar8;
  undefined8 *puVar9;
  int *piVar10;
  int *_Buf1;
  longlong *plVar11;
  int *piVar12;
  int *_Buf2;
  uint uVar13;
  longlong lVar14;
  longlong lVar16;
  longlong *plVar17;
  longlong *plVar18;
  longlong *plVar19;
  int *piVar20;
  int iVar21;
  longlong *local_res10;
  longlong *local_res18;
  longlong *local_168;
  longlong *local_160;
  undefined **local_158;
  longlong *local_150;
  int *local_148;
  undefined8 local_140;
  undefined8 local_138;
  undefined8 local_130;
  undefined8 local_128;
  longlong local_120;
  ulonglong local_118;
  longlong *local_110;
  longlong *local_108;
  undefined4 local_fc;
  undefined8 local_f8;
  undefined8 local_f0;
  longlong local_e8;
  ulonglong local_e0;
  longlong *local_d8;
  longlong *local_d0;
  undefined4 local_c4;
  undefined **local_c0;
  longlong *local_b8;
  int *local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined1 local_98 [8];
  undefined1 local_90 [8];
  longlong local_88;
  undefined4 local_80;
  int local_7c;
  undefined8 local_70;
  undefined1 local_68;
  undefined8 local_60;
  undefined1 local_58 [32];
  longlong *plVar15;
  
  local_60 = 0xfffffffffffffffe;
  local_70 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(local_70);
  local_68 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::TestReliableUdpFrame");
  }
  uVar7 = FUN_14019c9e0(local_58);
  plVar8 = (longlong *)FUN_140156a10(0x800,uVar7);
  piVar20 = (int *)0x0;
  local_150 = (longlong *)0x0;
  local_148 = (int *)0x0;
  local_140 = 0;
  local_138 = 0;
  local_158 = Proud::CUncompressedFrameNumberArray::vftable;
  local_res18 = plVar8;
  if (plVar8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  local_150 = plVar8;
  FUN_14015cb30(&local_158,1);
  lVar14 = (longlong)(int)local_140;
  piVar12 = local_148;
  if ((int)local_140 == 0) {
    piVar12 = piVar20;
  }
  *piVar12 = 5;
  if ((int)local_140 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_14015cb30(&local_158,(int)local_140 + 1);
  lVar16 = (longlong)(int)local_140;
  piVar12 = local_148;
  if ((int)local_140 == 0) {
    piVar12 = piVar20;
  }
  piVar12[lVar14] = 1;
  if ((int)local_140 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_14015cb30(&local_158,(int)local_140 + 1);
  lVar14 = (longlong)(int)local_140;
  piVar12 = local_148;
  if ((int)local_140 == 0) {
    piVar12 = piVar20;
  }
  piVar12[lVar16] = 2;
  if ((int)local_140 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_14015cb30(&local_158,(int)local_140 + 1);
  piVar20 = local_148;
  iVar4 = (int)local_140;
  lVar16 = (longlong)(int)local_140;
  piVar12 = local_148;
  if ((int)local_140 == 0) {
    piVar12 = (int *)0x0;
  }
  piVar12[lVar14] = 4;
  piVar12 = local_148;
  if ((int)local_140 == 0) {
    piVar12 = (int *)0x0;
  }
  FUN_14015db00(piVar12,4);
  if (iVar4 < 1) {
                    // WARNING: Subroutine does not return
    FUN_1401566e0();
  }
  if (*piVar20 == 1) {
    if (iVar4 < 2) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    if (piVar20[1] != 2) goto LAB_14017fcd7;
    if (iVar4 < 3) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    if (piVar20[2] != 4) goto LAB_14017fcd7;
    if (iVar4 < 4) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    if (piVar20[3] != 5) goto LAB_14017fcd7;
  }
  else {
LAB_14017fcd7:
    FUN_1401568c0();
    local_res10 = (longlong *)PTR_DAT_1403200a0;
    uVar3 = FUN_140156740(L"Proud.QuickSort() failed!");
    uVar7 = FUN_14004f760(&local_res10,uVar3);
    FUN_140156770(uVar7,L"Proud.QuickSort() failed!",uVar3);
    FUN_14004f380(&local_res10);
    FUN_14017cb90(param_1,&local_res10);
  }
  plVar17 = (longlong *)0x0;
  local_118 = 0;
  local_120 = 0;
  local_128 = 0;
  local_110 = (longlong *)0x0;
  local_130 = 0;
  local_fc = 0;
  local_108 = plVar8;
  puVar9 = (undefined8 *)FUN_14016b910(&local_168,plVar8);
  plVar1 = local_110;
  plVar11 = (longlong *)*puVar9;
  if (plVar11 != (longlong *)0x0) {
    plVar11[1] = plVar11[1] + 1;
    plVar17 = plVar11;
  }
  if (local_110 != (longlong *)0x0) {
    plVar11 = local_110 + 1;
    *plVar11 = *plVar11 + -1;
    if (*plVar11 == 0) {
      puVar2 = (undefined8 *)*local_110;
      local_res10 = local_108;
      *puVar2 = Proud::CFastArray<>::vftable;
      if (puVar2[2] != 0) {
        if ((longlong *)puVar2[1] == (longlong *)0x0) {
          FUN_140156970(puVar2[2]);
        }
        else {
          (**(code **)(*(longlong *)puVar2[1] + 0x18))();
        }
      }
      (**(code **)(*local_res10 + 0x18))(local_res10,puVar2);
      (**(code **)(*local_108 + 0x18))(local_108,plVar1);
    }
  }
  plVar1 = local_160;
  plVar11 = local_168;
  plVar18 = (longlong *)0x0;
  local_108 = (longlong *)puVar9[1];
  plVar15 = plVar18;
  plVar19 = plVar18;
  local_110 = plVar17;
  if (local_168 != (longlong *)0x0) {
    plVar17 = local_168 + 1;
    *plVar17 = *plVar17 + -1;
    if (*plVar17 == 0) {
      puVar9 = (undefined8 *)*local_168;
      *puVar9 = Proud::CFastArray<>::vftable;
      if (puVar9[2] != 0) {
        if ((longlong *)puVar9[1] == (longlong *)0x0) {
          FUN_140156970(puVar9[2]);
        }
        else {
          (**(code **)(*(longlong *)puVar9[1] + 0x18))();
        }
      }
      (**(code **)(*plVar1 + 0x18))(plVar1,puVar9);
      (**(code **)(*local_160 + 0x18))(local_160,plVar11);
    }
  }
  do {
    if (((longlong)plVar19 < 0) || (iVar4 <= (int)plVar15)) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    plVar11 = plVar18;
    if (local_110 != (longlong *)0x0) {
      plVar11 = (longlong *)*local_110;
    }
    FUN_1401ac080(plVar11,piVar20[(longlong)plVar19]);
    uVar13 = (int)plVar15 + 1;
    plVar15 = (longlong *)(ulonglong)uVar13;
    plVar19 = (longlong *)((longlong)plVar19 + 1);
  } while ((int)uVar13 < iVar4);
  FUN_1401544a0(local_98);
  FUN_140153d90(local_98);
  plVar11 = plVar18;
  if (local_110 != (longlong *)0x0) {
    plVar11 = (longlong *)*local_110;
  }
  FUN_1401ac2f0(plVar11,local_98);
  FUN_1401540a0(local_98,0);
  local_e0 = 0;
  local_e8 = 0;
  local_f0 = 0;
  local_d8 = (longlong *)0x0;
  local_f8 = 0;
  local_c4 = 0;
  local_d0 = plVar8;
  local_res10 = (longlong *)FUN_14016b910(&local_168,plVar8);
  plVar17 = local_d0;
  plVar1 = local_d8;
  plVar11 = (longlong *)*local_res10;
  if (plVar11 != (longlong *)0x0) {
    plVar11[1] = plVar11[1] + 1;
    plVar18 = plVar11;
  }
  if (local_d8 != (longlong *)0x0) {
    plVar11 = local_d8 + 1;
    *plVar11 = *plVar11 + -1;
    if (*plVar11 == 0) {
      puVar9 = (undefined8 *)*local_d8;
      *puVar9 = Proud::CFastArray<>::vftable;
      if (puVar9[2] != 0) {
        if ((longlong *)puVar9[1] == (longlong *)0x0) {
          FUN_140156970(puVar9[2]);
        }
        else {
          (**(code **)(*(longlong *)puVar9[1] + 0x18))();
        }
      }
      (**(code **)(*plVar17 + 0x18))(plVar17,puVar9);
      (**(code **)(*local_d0 + 0x18))(local_d0,plVar1);
    }
  }
  plVar11 = local_160;
  piVar12 = (int *)0x0;
  local_d0 = (longlong *)local_res10[1];
  local_d8 = plVar18;
  if (local_168 != (longlong *)0x0) {
    plVar1 = local_168 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      puVar9 = (undefined8 *)*local_168;
      *puVar9 = Proud::CFastArray<>::vftable;
      if (puVar9[2] != 0) {
        if ((longlong *)puVar9[1] == (longlong *)0x0) {
          FUN_140156970(puVar9[2]);
        }
        else {
          (**(code **)(*(longlong *)puVar9[1] + 0x18))();
        }
      }
      (**(code **)(*plVar11 + 0x18))(plVar11,puVar9);
      (**(code **)(*local_160 + 0x18))(local_160,local_168);
    }
  }
  piVar10 = piVar12;
  if (local_d8 != (longlong *)0x0) {
    piVar10 = (int *)*local_d8;
  }
  FUN_1401abe40(piVar10,local_98);
  local_b0 = (int *)0x0;
  local_a8 = 0;
  local_a0 = 0;
  local_c0 = Proud::CUncompressedFrameNumberArray::vftable;
  piVar10 = piVar12;
  if (local_d8 != (longlong *)0x0) {
    piVar10 = (int *)*local_d8;
  }
  local_b8 = plVar8;
  FUN_1401ac1d0(piVar10,&local_c0);
  piVar10 = local_b0;
  iVar21 = 0;
  if (iVar4 == (int)local_a8) {
    _Buf1 = piVar20;
    if (iVar4 == 0) {
      _Buf1 = piVar12;
    }
    _Buf2 = local_b0;
    if ((int)local_a8 == 0) {
      _Buf2 = piVar12;
    }
    iVar4 = memcmp(_Buf1,_Buf2,lVar16 << 2);
    if (iVar4 == 0) goto LAB_1401801ba;
  }
  FUN_1401568c0();
  local_res10 = (longlong *)PTR_DAT_1403200a0;
  iVar5 = FUN_140156740(L"FrameNumberList pack/unpack failed!");
  iVar4 = iVar21;
  if ((local_res10 != (longlong *)0x0) && (local_res10 != (longlong *)PTR_DAT_1403200a0)) {
    iVar4 = (int)local_res10[-1];
  }
  iVar6 = iVar5;
  if (((iVar5 <= iVar4) && (iVar6 = iVar21, local_res10 != (longlong *)0x0)) &&
     (local_res10 != (longlong *)PTR_DAT_1403200a0)) {
    iVar6 = (int)local_res10[-1];
  }
  iVar4 = 1;
  if (1 < iVar6) {
    iVar4 = iVar6;
  }
  iVar6 = 0;
  iVar21 = iVar6;
  if ((local_res10 != (longlong *)0x0) && (local_res10 != (longlong *)PTR_DAT_1403200a0)) {
    iVar21 = (int)local_res10[-1];
  }
  if (iVar21 < iVar4) {
    FUN_14004f590(&local_res10);
  }
  FUN_14004f670(&local_res10);
  plVar11 = local_res10;
  if (local_res10 == (longlong *)0x0) {
    plVar11 = (longlong *)PTR_DAT_1403200a0;
  }
  FUN_140156770(plVar11,L"FrameNumberList pack/unpack failed!",iVar5);
  plVar11 = local_res10;
  if (local_res10 == (longlong *)0x0) {
    plVar11 = (longlong *)PTR_DAT_1403200a0;
  }
  uVar13 = FUN_140156740(plVar11);
  if (0 < (int)uVar13) {
    piVar12 = (int *)(ulonglong)uVar13;
  }
  iVar4 = iVar6;
  if ((local_res10 != (longlong *)0x0) && (local_res10 != (longlong *)PTR_DAT_1403200a0)) {
    iVar4 = (int)local_res10[-1];
  }
  iVar21 = (int)piVar12;
  if (((int)piVar12 < iVar4) || (iVar21 = iVar6, local_res10 == (longlong *)0x0)) {
LAB_140180185:
    if (((local_res10 != (longlong *)PTR_DAT_1403200a0) && (local_res10 != (longlong *)0x0)) &&
       (local_res10 + -1 != (longlong *)0x0)) {
      *(int *)(local_res10 + -1) = iVar21;
      *(undefined2 *)((longlong)local_res10 + (longlong)iVar21 * 2) = 0;
    }
  }
  else if (local_res10 != (longlong *)PTR_DAT_1403200a0) {
    iVar21 = (int)local_res10[-1];
    goto LAB_140180185;
  }
  FUN_14017cb90(param_1,&local_res10);
  piVar10 = local_b0;
LAB_1401801ba:
  local_c0 = Proud::CFastArray<>::vftable;
  if (piVar10 != (int *)0x0) {
    if (local_b8 == (longlong *)0x0) {
      FUN_140156970(piVar10);
    }
    else {
      (**(code **)(*local_b8 + 0x18))(local_b8,piVar10);
    }
  }
  if (local_d8 != (longlong *)0x0) {
    plVar11 = local_d8 + 1;
    *plVar11 = *plVar11 + -1;
    if (*plVar11 == 0) {
      FUN_140161ae0(&local_d8,local_d8);
    }
  }
  FUN_1401560e0(&local_f0);
  if (local_e8 != 0) {
    if ((longlong)local_e0 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_e0 = local_e0 & 0xffffffff00000000;
  }
  FUN_1401560e0(local_90);
  if (local_88 != 0) {
    if (local_7c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_80 = 0;
  }
  if (local_110 != (longlong *)0x0) {
    plVar11 = local_110 + 1;
    *plVar11 = *plVar11 + -1;
    if (*plVar11 == 0) {
      FUN_140161ae0(&local_110,local_110);
    }
  }
  FUN_1401560e0(&local_128);
  if (local_120 != 0) {
    if ((longlong)local_118 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_118 = local_118 & 0xffffffff00000000;
  }
  if (local_150 == (longlong *)0x0) {
    FUN_140156970(piVar20);
  }
  else {
    (**(code **)(*local_150 + 0x18))(local_150,piVar20);
  }
  (**(code **)*plVar8)(plVar8,1);
  FUN_140156be0(local_70);
  return;
}



void FUN_140180320(longlong param_1,longlong param_2)

{
  double dVar1;
  undefined **local_30;
  undefined8 local_28;
  undefined8 local_20;
  undefined8 local_18;
  undefined8 local_10;
  
  if (0.0 < *(double *)(param_2 + 0x758)) {
    dVar1 = (double)(**(code **)(*(longlong *)(param_1 + 0x118) + 8))();
    if (5.0 < dVar1 - *(double *)(param_2 + 0x758)) {
      *(undefined8 *)(param_2 + 0x758) = 0;
      local_28 = 0;
      local_20 = 0;
      local_18 = 0;
      local_10 = 0;
      local_30 = Proud::ByteArray::vftable;
      FUN_14017f200(param_1,param_2,0xc,7,&local_30,
                    L"Proud::CNetServerImpl::HardDisconnect_AutoPruneGoesTooLongClient",0);
      FUN_1401858d0(&local_30);
    }
  }
  return;
}



undefined8 FUN_1401803f0(longlong param_1,uint param_2)

{
  longlong lVar1;
  longlong lVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  uint *puVar5;
  
  uVar4 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar4);
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x20) + 200))();
  }
  lVar1 = *(longlong *)(param_1 + 0x20);
  uVar3 = (ulonglong)param_2 % (ulonglong)*(uint *)(lVar1 + 0xca0);
  if ((*(longlong *)(lVar1 + 0xc80) != 0) &&
     (puVar5 = *(uint **)(*(longlong *)(lVar1 + 0xc80) + uVar3 * 8), puVar5 != (uint *)0x0)) {
    while ((uint)uVar3 == puVar5[8] % *(uint *)(lVar1 + 0xca0)) {
      if (*puVar5 == param_2) {
        lVar2 = *(longlong *)(puVar5 + 2);
        if ((lVar2 != 0) && (*(longlong *)(lVar2 + 0x228) == 0)) {
          FUN_14017f200(lVar1,lVar2,0xb,3,lVar2 + 0x1f8,
                        L"Proud::CNetServerImpl::C2SStub::ShutdownTcpHandshake",0);
        }
        break;
      }
      puVar5 = *(uint **)(puVar5 + 4);
      if (puVar5 == (uint *)0x0) break;
    }
  }
  FUN_140156be0(uVar4);
  return 1;
}



// WARNING: Removing unreachable block (ram,0x0001401806f9)
// WARNING: Removing unreachable block (ram,0x00014018078d)

void FUN_140180500(longlong param_1)

{
  longlong lVar1;
  longlong lVar2;
  undefined8 *puVar3;
  void *pvVar4;
  char cVar5;
  undefined8 uVar6;
  longlong lVar7;
  longlong *plVar8;
  longlong lVar9;
  int iVar10;
  ulonglong uVar11;
  uint uVar12;
  ulonglong uVar13;
  longlong *local_res8;
  undefined4 local_148;
  undefined4 uStack_144;
  undefined **local_f8;
  undefined8 local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  undefined **local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined4 local_a8;
  undefined4 uStack_a4;
  undefined8 uStack_a0;
  undefined8 local_98;
  undefined1 local_90;
  undefined8 local_88;
  undefined1 local_80 [72];
  
  local_88 = 0xfffffffffffffffe;
  lVar1 = param_1 + 0xb8;
  FUN_140156b50(lVar1);
  uStack_a0 = CONCAT44(uStack_a0._4_4_,(undefined4)uStack_a0);
  if ((*(longlong **)(param_1 + 0x6a0) != (longlong *)0x0) &&
     (uStack_a0 = CONCAT44(uStack_a0._4_4_,(undefined4)uStack_a0),
     **(longlong **)(param_1 + 0x6a0) != 0)) {
    uVar6 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
    FUN_140156b50(uVar6);
    if (DAT_1403288ef != '\0') {
      (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
                (param_1 + -0xa8,L"Proud::CNetServerImpl::Stop");
    }
    if ((*(longlong *)(param_1 + 0x338) != 0) && (cVar5 = FUN_14018d810(), cVar5 != '\0')) {
      FUN_140156be0(lVar1);
      FUN_140156be0(uVar6);
      FUN_140156300(local_80,L"Call Stop in UserWorker");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_80,(ThrowInfo *)&DAT_14031d928);
    }
    FUN_140156be0(uVar6);
    if ((*(longlong **)(param_1 + 0x6a0) != (longlong *)0x0) &&
       (**(longlong **)(param_1 + 0x6a0) != 0)) {
      FUN_1401855c0();
    }
    uVar6 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
    FUN_140156b50(uVar6);
    if (DAT_1403288ef != '\0') {
      (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
                (param_1 + -0xa8,L"Proud::CNetServerImpl::Stop");
    }
    lVar9 = 0;
    if (*(longlong *)(param_1 + 0x1660) != 0) {
      lVar9 = *(longlong *)(param_1 + 0x1650);
    }
    while (lVar7 = lVar9, lVar7 != 0) {
      local_c8 = 0;
      local_c0 = 0;
      local_b8 = 0;
      local_b0 = 0;
      local_d0 = Proud::ByteArray::vftable;
      FUN_14017f200(param_1 + -0xa8);
      FUN_1401858d0(&local_d0);
      lVar9 = 0;
      if (lVar7 != 0) {
        lVar9 = *(longlong *)(lVar7 + 0x18);
      }
    }
    lVar9 = 0;
    if (*(longlong *)(param_1 + 0xbf0) != 0) {
      lVar9 = *(longlong *)(param_1 + 0xbe0);
    }
    while (lVar7 = lVar9, uVar11 = 0, lVar7 != 0) {
      local_f0 = 0;
      local_e8 = 0;
      local_e0 = 0;
      local_d8 = 0;
      local_f8 = Proud::ByteArray::vftable;
      FUN_14017f200(param_1 + -0xa8);
      FUN_1401858d0(&local_f8);
      lVar9 = 0;
      if (lVar7 != 0) {
        lVar9 = *(longlong *)(lVar7 + 0x10);
      }
    }
    uVar13 = uVar11;
    if (0 < *(int *)(param_1 + 0x638)) {
      do {
        lVar9 = 0;
        if (((longlong)uVar11 < 0) || (*(int *)(param_1 + 0x638) <= (int)uVar13)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        lVar7 = *(longlong *)(param_1 + 0x630);
        local_res8 = (longlong *)0x0;
        lVar2 = *(longlong *)(lVar7 + uVar11 * 8);
        if (lVar2 != 0) {
          *(longlong *)(*(longlong *)(lVar7 + uVar11 * 8) + 8) = *(longlong *)(lVar2 + 8) + 1;
          local_res8 = *(longlong **)(lVar7 + uVar11 * 8);
        }
        lVar7 = lVar9;
        if (local_res8 != (longlong *)0x0) {
          lVar7 = *local_res8;
        }
        if (*(longlong **)(lVar7 + 0x150) != (longlong *)0x0) {
          lVar9 = **(longlong **)(lVar7 + 0x150);
        }
        FUN_1401855c0(lVar9);
        if (local_res8 != (longlong *)0x0) {
          plVar8 = local_res8 + 1;
          *plVar8 = *plVar8 + -1;
          if (*plVar8 == 0) {
            puVar3 = (undefined8 *)*local_res8;
            if (puVar3 != (undefined8 *)0x0) {
              (**(code **)*puVar3)(puVar3,1);
            }
            FUN_140156970(local_res8);
          }
        }
        uVar12 = (int)uVar13 + 1;
        uVar11 = uVar11 + 1;
        uVar13 = (ulonglong)uVar12;
      } while ((int)uVar12 < *(int *)(param_1 + 0x638));
    }
    FUN_140156be0(uVar6);
    iVar10 = 0;
    do {
      uVar6 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
      FUN_140156b50(uVar6);
      if (DAT_1403288ef != '\0') {
        (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
                  (param_1 + -0xa8,L"Proud::CNetServerImpl::Stop");
      }
      if (((*(longlong *)(param_1 + 0xbf0) == 0) && (*(longlong *)(param_1 + 0x1660) == 0)) &&
         (*(longlong *)(param_1 + 0x1f8) == 0)) {
        FUN_140156be0(uVar6);
        break;
      }
      FUN_140156be0(uVar6);
      Sleep(100);
      iVar10 = iVar10 + 1;
    } while (iVar10 < 10000);
    pvVar4 = *(void **)(param_1 + 0x338);
    if (pvVar4 != (void *)0x0) {
      FUN_140191cc0(pvVar4);
      operator_delete(pvVar4);
    }
    plVar8 = (longlong *)0x0;
    *(undefined8 *)(param_1 + 0x338) = 0;
    uVar6 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
    FUN_140156b50(uVar6);
    if (DAT_1403288ef != '\0') {
      (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
                (param_1 + -0xa8,L"Proud::CNetServerImpl::Stop");
    }
    pvVar4 = *(void **)(param_1 + 0x6e0);
    if (pvVar4 != (void *)0x0) {
      FUN_14018c200(pvVar4);
      operator_delete(pvVar4);
    }
    *(undefined8 *)(param_1 + 0x6e0) = 0;
    pvVar4 = *(void **)(param_1 + 0x6e8);
    if (pvVar4 != (void *)0x0) {
      FUN_14018c200(pvVar4);
      operator_delete(pvVar4);
    }
    *(undefined8 *)(param_1 + 0x6e8) = 0;
    FUN_14018aea0(param_1 + 0x6b8);
    if (*(longlong *)(param_1 + 0x6a0) != 0) {
      *(longlong *)(*(longlong *)(param_1 + 0x6a0) + 8) =
           *(longlong *)(*(longlong *)(param_1 + 0x6a0) + 8) + -1;
      if (*(longlong *)(*(longlong *)(param_1 + 0x6a0) + 8) == 0) {
        plVar8 = *(longlong **)(param_1 + 0x6a0);
      }
      *(undefined8 *)(param_1 + 0x6a0) = 0;
      if (plVar8 != (longlong *)0x0) {
        lVar9 = *plVar8;
        if (lVar9 != 0) {
          FUN_1401859b0(lVar9);
          FUN_140156970(lVar9);
        }
        FUN_140156970(plVar8);
      }
    }
    lVar9 = *(longlong *)(param_1 + 0xbf0);
    while (lVar9 != 0) {
      lVar9 = 0;
      if (*(longlong *)(param_1 + 0xbf0) != 0) {
        lVar9 = *(longlong *)(param_1 + 0xbe0);
      }
      if (lVar9 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      FUN_14016c750(param_1 + -0xa8,*(undefined8 *)(lVar9 + 8));
      lVar9 = *(longlong *)(param_1 + 0xbf0);
    }
    FUN_14019f4d0(param_1 + 0xbd0);
    lVar9 = *(longlong *)(param_1 + 0x1660);
    while (lVar9 != 0) {
      if (*(longlong *)(param_1 + 0x1650) == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      FUN_14016c750(param_1 + -0xa8,*(undefined8 *)(*(longlong *)(param_1 + 0x1650) + 0x10));
      lVar9 = *(longlong *)(param_1 + 0x1660);
    }
    FUN_14015e980(param_1 + 0x1640);
    lVar9 = param_1 + 0x1698;
    if (*(longlong *)(param_1 + 0x16b8) == 0) {
      plVar8 = (longlong *)0x0;
    }
    else {
      plVar8 = *(longlong **)(param_1 + 0x16a8);
    }
    local_148 = SUB84(plVar8,0);
    uStack_144 = (undefined4)((ulonglong)plVar8 >> 0x20);
    local_a8 = local_148;
    uStack_a4 = uStack_144;
    uStack_a0 = lVar9;
    for (; plVar8 != (longlong *)0x0; plVar8 = (longlong *)plVar8[2]) {
      if ((longlong *)*plVar8 != (longlong *)0x0) {
        (**(code **)(*(longlong *)*plVar8 + 8))();
      }
    }
    if (uStack_a0 != lVar9) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    FUN_14019f4d0(lVar9);
    FUN_140177540(param_1 + 0x358);
    FUN_14016b6c0(param_1 + 0x620,0);
    FUN_14016ddd0(param_1 + 0x648);
    FUN_140156be0(uVar6);
    uVar6 = (**(code **)(*(longlong *)(param_1 + -0xa8) + 0x58))(param_1 + -0xa8);
    local_98 = uVar6;
    FUN_140156b50(uVar6);
    local_90 = 1;
    if (DAT_1403288ef != '\0') {
      (**(code **)(*(longlong *)(param_1 + -0xa8) + 200))
                (param_1 + -0xa8,L"Proud::CNetServerImpl::Stop");
    }
    FUN_140177b40(param_1 + 0x3b0);
    FUN_14019f4d0(param_1 + 0xbd0);
    FUN_1401704a0(param_1 + 0x230);
    FUN_1401704a0(param_1 + 0x288);
    FUN_14015e980(param_1 + 0x1640);
    puVar3 = *(undefined8 **)(param_1 + 0x3d0);
    if (puVar3 != (undefined8 *)0x0) {
      (**(code **)*puVar3)(puVar3,1);
    }
    *(undefined8 *)(param_1 + 0x3d0) = 0;
    puVar3 = *(undefined8 **)(param_1 + -0x50);
    if (puVar3 != (undefined8 *)0x0) {
      (**(code **)*puVar3)(puVar3,1);
    }
    *(undefined8 *)(param_1 + -0x50) = 0;
    FUN_140156be0(uVar6);
  }
  FUN_140156be0(lVar1);
  return;
}



// WARNING: Removing unreachable block (ram,0x000140181009)
// WARNING: Removing unreachable block (ram,0x000140180ffe)

void FUN_140180ca0(longlong *param_1)

{
  longlong *plVar1;
  ulonglong uVar2;
  bool bVar3;
  bool bVar4;
  bool bVar5;
  bool bVar6;
  char cVar7;
  int iVar8;
  int iVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  longlong lVar12;
  ulonglong *puVar13;
  ulonglong *puVar14;
  longlong local_b0;
  
  uVar10 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar10);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::DisposeIssuedRemoteClients");
  }
  if (param_1[0x54] == 0) {
    puVar13 = (ulonglong *)0x0;
  }
  else {
    puVar13 = (ulonglong *)param_1[0x52];
  }
  do {
    if (puVar13 == (ulonglong *)0x0) {
      FUN_140156be0(uVar10);
      return;
    }
    if (puVar13 == (ulonglong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    plVar1 = (longlong *)*puVar13;
    FUN_140180320(param_1,plVar1);
    uVar11 = (**(code **)(plVar1[0x21] + 0x10))();
    FUN_140156b50(uVar11);
    local_b0 = 0;
    bVar6 = false;
    if (((longlong *)plVar1[0xe8] != (longlong *)0x0) &&
       (lVar12 = *(longlong *)plVar1[0xe8], lVar12 != 0)) {
      local_b0 = lVar12 + 0xa8;
      FUN_140156b50();
      bVar6 = true;
    }
    FUN_140156b50();
    FUN_140156b50();
    iVar8 = FUN_1401a37b0(plVar1 + 0x18);
    if ((*(char *)(plVar1[0xe9] + 0x40) == '\0') && (*(char *)plVar1[0xe9] == '\0')) {
      bVar3 = true;
    }
    else {
      bVar3 = false;
    }
    if (((longlong *)plVar1[0xec] == (longlong *)0x0) ||
       (lVar12 = *(longlong *)plVar1[0xec], lVar12 == 0)) {
LAB_140180e75:
      bVar4 = true;
    }
    else {
      if (*(char *)(lVar12 + 0x140) == '\0') {
        if ((longlong *)plVar1[0xec] == (longlong *)0x0) {
          lVar12 = 0;
        }
        else {
          lVar12 = *(longlong *)plVar1[0xec];
        }
        if (*(char *)(lVar12 + 0x100) == '\0') {
          if ((longlong *)plVar1[0xec] == (longlong *)0x0) {
            lVar12 = 0;
          }
          else {
            lVar12 = *(longlong *)plVar1[0xec];
          }
          iVar9 = FUN_1401a37b0(lVar12 + 0x40);
          if (iVar9 == 0) goto LAB_140180e75;
        }
      }
      bVar4 = false;
    }
    if (((plVar1[4] == 0) && (cVar7 = (**(code **)(plVar1[1] + 0x18))(), cVar7 == '\0')) &&
       (plVar1[0x24] == 0)) {
      bVar5 = false;
    }
    else {
      bVar5 = true;
    }
    FUN_140156be0(uVar11);
    if (((iVar8 != 0) || (!bVar3)) || ((!bVar4 || (bVar5)))) {
      puVar14 = (ulonglong *)puVar13[2];
    }
    else {
      FUN_14016c750(param_1,plVar1);
      puVar14 = (ulonglong *)puVar13[2];
      FUN_1401b0d90(param_1 + 0x50,puVar13,0);
      uVar2 = ((ulonglong)plVar1 & 0xffffffff) % (ulonglong)*(uint *)(param_1 + 0x2ed);
      if (param_1[0x2e9] != 0) {
        puVar13 = *(ulonglong **)(param_1[0x2e9] + uVar2 * 8);
        while( true ) {
          if ((puVar13 == (ulonglong *)0x0) ||
             ((uint)uVar2 != (uint)puVar13[4] % *(uint *)(param_1 + 0x2ed))) goto LAB_140180f7f;
          if ((longlong *)*puVar13 == plVar1) break;
          puVar13 = (ulonglong *)puVar13[2];
        }
        FUN_1401b0d90(param_1 + 0x2e8,puVar13,0);
      }
LAB_140180f7f:
      if (bVar6) {
        FUN_140156be0(local_b0);
        bVar6 = false;
      }
      (**(code **)(*plVar1 + 8))(plVar1,1);
    }
    FUN_140156be0(param_1 + 0xfa);
    FUN_140156be0(param_1 + 0xf3);
    puVar13 = puVar14;
    if (bVar6) {
      FUN_140156be0(local_b0);
    }
  } while( true );
}



void FUN_140181040(longlong *param_1)

{
  longlong *plVar1;
  void *pvVar2;
  longlong *plVar3;
  longlong lVar4;
  undefined8 *puVar5;
  
  *param_1 = (longlong)Proud::CNetServerImpl::vftable;
  param_1[0xc] = (longlong)Proud::CNetServerImpl::vftable;
  param_1[0xd] = (longlong)Proud::CNetServerImpl::vftable;
  param_1[0xe] = (longlong)Proud::CNetServerImpl::vftable;
  param_1[0xf] = (longlong)Proud::CNetServerImpl::vftable;
  param_1[0x15] = (longlong)Proud::CNetServerImpl::vftable;
  param_1[0x16] = (longlong)Proud::CNetServerImpl::vftable;
  param_1[0x17] = (longlong)Proud::CNetServerImpl::vftable;
  param_1[0x23] = (longlong)Proud::CNetServerImpl::vftable;
  param_1[0x24] = (longlong)Proud::CNetServerImpl::vftable;
  FUN_140180500(param_1 + 0x15);
  plVar1 = param_1 + 0x25;
  FUN_140156b50(plVar1);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::~CNetServerImpl");
  }
  FUN_140188740(param_1);
  FUN_140156be0(plVar1);
  param_1[0x309] = (longlong)Proud::CFastArray<int,0>::vftable;
  if (param_1[0x30b] != 0) {
    if ((longlong *)param_1[0x30a] == (longlong *)0x0) {
      FUN_140156970(param_1[0x30b]);
    }
    else {
      (**(code **)(*(longlong *)param_1[0x30a] + 0x18))();
    }
  }
  FUN_14004f990(param_1 + 0x301);
  pvVar2 = (void *)param_1[0x2fe];
  if (pvVar2 != (void *)0x0) {
    FUN_140197a30(pvVar2);
    operator_delete(pvVar2);
  }
  param_1[0x2f9] = (longlong)Proud::CFastArray<int,1>::vftable;
  if (param_1[0x2fb] != 0) {
    plVar3 = (longlong *)param_1[0x2fa];
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar3 + 0x18))(plVar3,param_1[0x2fb]);
    }
  }
  param_1[0x2f4] = (longlong)Proud::CFastArray<>::vftable;
  if (param_1[0x2f6] != 0) {
    plVar3 = (longlong *)param_1[0x2f5];
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar3 + 0x18))(plVar3,param_1[0x2f6]);
    }
  }
  FUN_1401b2400(param_1 + 0x2e8);
  FUN_140161a30(param_1 + 0x2dd);
  FUN_140187ae0(param_1 + 0x19a);
  FUN_1401b2400(param_1 + 399);
  FUN_1401858d0(param_1 + 0x18a);
  FUN_1401aa280(param_1 + 0x189);
  FUN_1401858d0(param_1 + 0x182);
  FUN_14015c8b0(param_1 + 0x105);
  FUN_14015c7a0(param_1 + 0x101);
  FUN_140156c00(param_1 + 0xfa);
  FUN_140156c00(param_1 + 0xf3);
  pvVar2 = (void *)param_1[0xf2];
  if (pvVar2 != (void *)0x0) {
    FUN_14018c200(pvVar2);
    operator_delete(pvVar2);
  }
  pvVar2 = (void *)param_1[0xf1];
  if (pvVar2 != (void *)0x0) {
    FUN_14018c200(pvVar2);
    operator_delete(pvVar2);
  }
  FUN_140161920(param_1 + 0xea);
  if ((param_1[0xe9] != 0) &&
     (*(longlong *)(param_1[0xe9] + 8) = *(longlong *)(param_1[0xe9] + 8) + -1,
     *(longlong *)(param_1[0xe9] + 8) == 0)) {
    plVar3 = (longlong *)param_1[0xe9];
    lVar4 = *plVar3;
    if (lVar4 != 0) {
      FUN_1401859b0(lVar4);
      FUN_140156970(lVar4);
    }
    FUN_140156970(plVar3);
  }
  FUN_140170480(param_1 + 0xde);
  param_1[0xd9] = (longlong)Proud::CFastArray<>::vftable;
  if (0 < (int)param_1[0xdc]) {
    FUN_1401de290(param_1[0xdb],(longlong)(int)param_1[0xdc]);
  }
  if (param_1[0xdb] != 0) {
    plVar3 = (longlong *)param_1[0xda];
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar3 + 0x18))(plVar3,param_1[0xdb]);
    }
  }
  FUN_140156cd0(param_1 + 0x95);
  FUN_140157bd0(param_1 + 0x90);
  puVar5 = (undefined8 *)param_1[0x8f];
  if (puVar5 != (undefined8 *)0x0) {
    (**(code **)*puVar5)(puVar5,1);
  }
  FUN_140177b40(param_1 + 0x8b);
  puVar5 = (undefined8 *)param_1[0x8b];
  if (puVar5 != (undefined8 *)0x0) {
    (**(code **)*puVar5)(puVar5,1);
  }
  FUN_140177890(param_1 + 0x80);
  pvVar2 = (void *)param_1[0x7c];
  if (pvVar2 != (void *)0x0) {
    FUN_140191cc0(pvVar2);
    operator_delete(pvVar2);
  }
  FUN_140161a30(param_1 + 0x71);
  FUN_140170fe0(param_1 + 0x66);
  FUN_140170fe0(param_1 + 0x5b);
  FUN_1401b2400(param_1 + 0x50);
  FUN_140050520(param_1 + 0x43);
  FUN_140050520(param_1 + 0x42);
  FUN_140156c00(param_1 + 0x2c);
  FUN_140156c00(plVar1);
  param_1[0x24] = (longlong)Proud::IUserTaskQueueOwner::vftable;
  param_1[0x23] = (longlong)Proud::IVizAgentDg::vftable;
  param_1[0x17] = (longlong)Proud::CP2PGroupMemberBase_S::vftable;
  FUN_140177890(param_1 + 0x18);
  param_1[0x16] = (longlong)Proud::ICompletionContext::vftable;
  param_1[0x15] = (longlong)Proud::IRmiHost::vftable;
  FUN_1401ab800(param_1 + 0xf);
  param_1[0xe] = (longlong)Proud::ISendDest_S::vftable;
  param_1[0xd] = (longlong)Proud::ICompletionPortEventSink::vftable;
  param_1[0xc] = (longlong)Proud::IFastSocketDelegate::vftable;
  FUN_1401883e0(param_1);
  return;
}



// WARNING: Removing unreachable block (ram,0x00014018177d)

void FUN_140181520(longlong *param_1)

{
  int *piVar1;
  longlong *plVar2;
  undefined *puVar3;
  longlong lVar4;
  undefined4 uVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  longlong lVar8;
  undefined *puVar9;
  double dVar10;
  undefined *local_res8;
  undefined **local_70;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  
  uVar6 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar6);
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetServerImpl::HeartBeat_PerClient");
  }
  dVar10 = (double)(**(code **)(param_1[0x23] + 8))();
  lVar4 = 0;
  if (param_1[0x193] != 0) {
    lVar4 = param_1[0x191];
  }
  while (lVar8 = lVar4, lVar8 != 0) {
    plVar2 = *(longlong **)(lVar8 + 8);
    if (dVar10 - (double)plVar2[0x30] < (double)param_1[0x46] ||
        dVar10 - (double)plVar2[0x30] == (double)param_1[0x46]) {
      FUN_140180320(param_1,plVar2);
      if (((char)plVar2[0xe0] != '\0') && (DAT_140320d28 * 10.0 < dVar10 - (double)plVar2[0x33])) {
        (**(code **)(param_1[0x95] + 0xd0))(param_1 + 0x95,(int)plVar2[0xdf],&DAT_140328530);
      }
      FUN_140169f10(param_1,plVar2,dVar10);
      FUN_140170270(param_1,plVar2);
    }
    else {
      if (param_1[0x2fe] != 0) {
        FUN_1401568c0();
        local_res8 = PTR_DAT_1403200a0;
        uVar5 = (**(code **)(*plVar2 + 0x10))(plVar2);
        FUN_14004ce50(&local_res8,&DAT_140261a30,uVar5);
        puVar3 = local_res8;
        puVar9 = local_res8;
        if (local_res8 == (undefined *)0x0) {
          puVar9 = PTR_DAT_1403200a0;
        }
        FUN_140196a90(param_1[0x2fe],0,puVar9);
        if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_1403200a0)) &&
           (puVar3 + -8 != (undefined *)0x0)) {
          uVar7 = FUN_1401568c0();
          FUN_140156b50(uVar7);
          piVar1 = (int *)(puVar3 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(puVar3 + -8);
          }
          FUN_140156be0(uVar7);
        }
      }
      local_68 = 0;
      local_60 = 0;
      local_58 = 0;
      local_50 = 0;
      local_70 = Proud::ByteArray::vftable;
      FUN_14017f200(param_1,plVar2,0xb,7,&local_70,L"Proud::CNetServerImpl::HeartBeat_PerClient",0);
      FUN_1401858d0(&local_70);
    }
    lVar4 = 0;
    if (lVar8 != 0) {
      lVar4 = *(longlong *)(lVar8 + 0x10);
    }
  }
  FUN_140156be0(uVar6);
  return;
}



void FUN_1401817c0(undefined8 param_1)

{
  FUN_14017d9c0();
  FUN_14017fa80(param_1);
  FUN_14017ce20(param_1);
  FUN_14017d280(param_1);
  FUN_14017d620(param_1);
  FUN_140170f10(param_1);
  FUN_14015a750(param_1);
  return;
}



void * FUN_140181810(void *param_1,uint param_2)

{
  FUN_140181040();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



double FUN_140181840(void)

{
  return (double)DAT_140320cc8 * DAT_140320cc0;
}



undefined * FUN_140181860(void)

{
  return &DAT_1403288f0;
}



wchar_t * FUN_140181870(undefined4 param_1)

{
  switch(param_1) {
  case 1:
    return L"의도되지 않은 상황이 발생했습니다.";
  case 2:
    return L"이미 연결되어 있었습니다.";
  case 3:
    return L"TCP 연결이 실패했습니다.";
  case 4:
    return L"잘못된 세션 암호 키입니다.";
  case 5:
    return L"암호화가 실패했습니다.";
  case 6:
    return L"복호화 실패 혹은 해커에 의한 조작된 데이터입니다.";
  case 7:
    return L"서버와의 연결 시도가 타임 아웃하였습니다.";
  case 8:
    return L"서버와 프로토콜 버전이 맞지 않습니다.";
  case 9:
    return L"서버에서 연결을 거부했습니다.";
  case 10:
    return L"서버와의 연결이 성공했습니다.";
  case 0xb:
    return L"상대측 호스트가 연결을 끊었습니다.";
  case 0xc:
    return L"로컬 호스트에서 능동적으로 연결을 끊었습니다.";
  case 0xd:
    return L"위험한 호출 파라메터가 있습니다.";
  case 0xe:
    return L"알 수 없는 인터넷 주소입니다.";
  case 0xf:
    return L"서버가 준비되지 않았습니다.";
  case 0x10:
    return 
    L"서버 소켓의 listen을 시작할 수 없습니다. TCP 또는 UDP 소켓이 이미 사용중인 포트인지 확인하십시오."
    ;
  case 0x11:
    return L"이미 개체가 존재합니다.";
  case 0x12:
    return L"접근이 거부되었습니다.";
  case 0x13:
    return L"잘못된 session Guid입니다.";
  case 0x14:
    return L"잘못된 credential입니다.";
  case 0x15:
    return L"잘못된 hero name입니다.";
  case 0x16:
    return L"로딩 과정이 unlock 후 lock 한 후 꼬임이 발생했습니다.";
  case 0x17:
    return L"출력 파라메터 AdjustedGamerIDNotFilled가 채워지지 않았습니다.";
  case 0x18:
    return L"플레이어 캐릭터가 존재하지 않습니다.";
  case 0x19:
    return L"UnitTestFailed";
  case 0x1a:
    return L"peer-to-peer UDP 통신이 막혔습니다.";
  case 0x1b:
    return L"P2P reliable UDP가 실패했습니다.";
  case 0x1c:
    return L"클라이언트-서버 UDP 통신이 막혔습니다.";
  case 0x1d:
    return L"더 이상 같이 소속된 P2P 그룹이 없습니다.";
  case 0x1e:
    return L"사용자의 요청에 의한 실패입니다.";
  case 0x1f:
    return 
    L"잘못된 패킷 형식입니다. 상대측 호스트가 해킹되었거나 버그일 수 있습니다."
    ;
  case 0x20:
    return 
    L"너무 큰 크기의 메시징이 시도되었습니다. 기술지원부에 문의하십시오."
    ;
  case 0x21:
    return L"Unreliable 메세지는 암호화할 수 없습니다.";
  case 0x22:
    return L"존재하지 않는 값입니다.";
  case 0x23:
    return L"타임 아웃입니다.";
  case 0x24:
    return L"로드된 데이터를 찾을 수 없습니다.";
  case 0x25:
    return 
    L"송신 queue가 너무 많이 쌓여 있습니다. 송신량을 조절하는 것을 권장합니다."
    ;
  case 0x26:
    return L"Heartbeat가 너무 늦게 호출되고 있습니다.기아화를 의심하세요.";
  case 0x27:
    return L"메시지 압축을 푸는데 실패 하였습니다.";
  default:
    return L"<none>";
  }
}



wchar_t * FUN_140181a70(undefined4 param_1)

{
  switch(param_1) {
  case 1:
    return L"Unexpected Error.";
  case 2:
    return L"Already connected.";
  case 3:
    return L"TCP connection failure.";
  case 4:
    return L"Invalid session key.";
  case 5:
    return L"Encryption failed.";
  case 6:
    return L"Decryption failed or hack suspected.";
  case 7:
    return L"Connect to server timed out.";
  case 8:
    return L"Mispatched protocol between hosts.";
  case 9:
    return L"Server denied connection attempt.";
  case 10:
    return L"Connecting to server successful.";
  case 0xb:
    return L"Remote host disconnected.";
  case 0xc:
    return L"Local host disconnected.";
  case 0xd:
    return L"Dangerous parameters are detected.";
  case 0xe:
    return L"Unknown Internet address.";
  case 0xf:
    return L"Server is not ready.";
  case 0x10:
    return 
    L"Server socket listen failure. Make sure that the TCP or UDP listening port is not already in use."
    ;
  case 0x11:
    return L"Object already exists.";
  case 0x12:
    return L"Permission denied.";
  case 0x13:
    return L"Bad session Guid.";
  case 0x14:
    return L"Invalid credential.";
  case 0x15:
    return L"Invalid player character name.";
  case 0x16:
    return L"Corruption occurred while unlocked loading and locking.";
  case 0x17:
    return L"Output parameter AdjustedGamerIDNotFilled is not filled.";
  case 0x18:
    return L"No Player Character(Hero) Found.";
  case 0x19:
    return L"UnitTestFailed";
  case 0x1a:
    return L"peer-to-peer UDP comm is blocked.";
  case 0x1b:
    return L"P2P reliable UDP failed.";
  case 0x1c:
    return L"Client-server UDP comm is blocked.";
  case 0x1d:
    return L"No common P2P group exists anymore.";
  case 0x1e:
    return L"By user request.";
  case 0x1f:
    return L"Invalid packet format. Remote host is hacked or has a bug.";
  case 0x20:
    return L"Too large message is detected. Contact technical supports.";
  case 0x21:
    return L"An unreliable message cannot be encrypted.";
  case 0x22:
    return L"Not exist value.";
  case 0x23:
    return L"Working is timeout.";
  case 0x24:
    return L"Can not found loaddata.";
  case 0x25:
    return L"SendQueue has Accumulated too much.";
  case 0x26:
    return L"Heartbeat Call in too slow.Suspected starvation";
  case 0x27:
    return L"Message uncompress fail.";
  default:
    return L"<none>";
  }
}



wchar_t * FUN_140181c70(undefined4 param_1)

{
  switch(param_1) {
  case 1:
    return L"发生了以外的情况.";
  case 2:
    return L"已连接.";
  case 3:
    return L"TCP/IP 连接失败.";
  case 4:
    return L"session key不正确.";
  case 5:
    return L"暗号化失败.";
  case 6:
    return L"符号化失败或被操作的数据.";
  case 7:
    return L"服务器连接超时.";
  case 8:
    return L"跟服务器的版本不同 需要上级.";
  case 9:
    return L"被据否了服务器连接.";
  case 10:
    return L"服务器连接成功.";
  case 0xb:
    return L"Remote host disconnected.";
  case 0xc:
    return L"Local host disconnected.";
  case 0xd:
    return L"Dangerous parameters are detected.";
  case 0xe:
    return L"在网上没有地址.";
  case 0xf:
    return L"服务器还没准备.";
  case 0x10:
    return 
    L"Server socket listen failure. Make sure that the TCP or UDP listening port is not already in use."
    ;
  case 0x11:
    return L"个体已存在.";
  case 0x12:
    return L"访问被拒绝.";
  case 0x13:
    return L"session Guid不正确.";
  case 0x14:
    return L"credential不正确.";
  case 0x15:
    return L"hero name不正确.";
  case 0x16:
    return L"加载过程unlock后与lock后发生隔阂.";
  case 0x17:
    return L"Output parameter AdjustedGamerIDNotFilled is not filled.";
  case 0x18:
    return L"No Player Character(Hero) Found.";
  case 0x19:
    return L"UnitTestFailed";
  case 0x1a:
    return L"peer-to-peer UDP comm is blocked.";
  case 0x1b:
    return L"P2P reliable UDP failed.";
  case 0x1c:
    return L"Client-server UDP comm is blocked.";
  case 0x1d:
    return L"No common P2P group exists anymore.";
  case 0x1e:
    return L"By user request.";
  case 0x1f:
    return L"Invalid packet format. Remote host is hacked or has a bug.";
  case 0x20:
    return L"Too large message is detected. Contact technical supports.";
  case 0x21:
    return L"An unreliable message cannot be encrypted.";
  case 0x22:
    return L"Not exist value.";
  case 0x23:
    return L"Working is timeout.";
  case 0x24:
    return L"Can not found loaddata.";
  case 0x25:
    return L"SendQueue has Accumulated too much.";
  case 0x26:
    return L"Heartbeat Call in too slow.Suspected starvation";
  case 0x27:
    return L"Message uncompress fail.";
  default:
    return L"<none>";
  }
}



void FUN_140181e70(undefined4 param_1)

{
  int *piVar1;
  
  piVar1 = (int *)thunk_FUN_1401582b0();
  if (*piVar1 == 0x52) {
    FUN_140181870(param_1);
    return;
  }
  if (*piVar1 != 0x56) {
    FUN_140181a70();
    return;
  }
  FUN_140181c70(param_1);
  return;
}



undefined8 * FUN_140181eb0(undefined8 *param_1)

{
  FUN_1401568c0();
  param_1[2] = PTR_DAT_1403200a0;
  param_1[3] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined2 *)((longlong)param_1 + 0x24) = 0;
  param_1[6] = 0;
  param_1[7] = 0;
  param_1[8] = 0;
  param_1[9] = 0;
  param_1[5] = Proud::ByteArray::vftable;
  FUN_1401568c0();
  param_1[0xb] = PTR_DAT_1403200a0;
  *param_1 = 0;
  param_1[1] = 0;
  *(undefined4 *)(param_1 + 4) = DAT_140320450;
  *(undefined2 *)((longlong)param_1 + 0x24) = DAT_140320454;
  *(undefined4 *)(param_1 + 10) = 0;
  return param_1;
}



longlong *
FUN_140181f50(longlong *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4,
             longlong param_5)

{
  int iVar1;
  longlong lVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  undefined4 *puVar5;
  
  puVar5 = (undefined4 *)0x0;
  lVar2 = FUN_140156940(0x60);
  puVar3 = puVar5;
  if (lVar2 != 0) {
    puVar3 = (undefined4 *)FUN_140181eb0(lVar2);
  }
  FUN_14013c5b0(param_1,puVar3);
  puVar3 = puVar5;
  if (*param_1 != 0) {
    puVar3 = *(undefined4 **)(*param_1 + 0x38);
  }
  *puVar3 = param_2;
  puVar3 = puVar5;
  if (*param_1 != 0) {
    puVar3 = *(undefined4 **)(*param_1 + 0x38);
  }
  puVar3[3] = param_3;
  puVar3 = puVar5;
  if (*param_1 != 0) {
    puVar3 = *(undefined4 **)(*param_1 + 0x38);
  }
  FUN_14004f4f0(puVar3 + 4,param_4);
  puVar3 = puVar5;
  if (*param_1 != 0) {
    puVar3 = *(undefined4 **)(*param_1 + 0x38);
  }
  iVar1 = *(int *)(param_5 + 0x18);
  if (-1 < iVar1) {
    FUN_140050060(puVar3 + 10,iVar1);
    puVar4 = puVar5;
    if (*(int *)(param_5 + 0x18) != 0) {
      puVar4 = *(undefined4 **)(param_5 + 0x10);
    }
    if (puVar3[0x10] != 0) {
      puVar5 = *(undefined4 **)(puVar3 + 0xe);
    }
    FUN_140050120(puVar5,puVar4,(longlong)iVar1);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



undefined8 * FUN_140182070(int *param_1,undefined8 *param_2)

{
  undefined *puVar1;
  int iVar2;
  int *piVar3;
  undefined8 uVar4;
  longlong *plVar5;
  undefined *puVar6;
  undefined *local_res18;
  undefined *local_res20;
  undefined *local_d8;
  undefined *local_d0;
  undefined *local_c8;
  longlong local_c0;
  longlong local_b8;
  undefined *local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined1 local_98;
  undefined8 local_90;
  undefined1 local_88;
  undefined8 local_80;
  undefined1 local_78;
  undefined8 local_70;
  undefined1 local_68;
  undefined8 local_60;
  undefined1 local_58;
  undefined8 local_50;
  undefined1 local_48;
  
  local_a8 = 0xfffffffffffffffe;
  FUN_1401568c0();
  *param_2 = PTR_DAT_1403200a0;
  iVar2 = *param_1;
  piVar3 = (int *)thunk_FUN_1401582b0();
  if (*piVar3 == 0x52) {
    uVar4 = FUN_140181870(iVar2);
  }
  else if (*piVar3 == 0x56) {
    uVar4 = FUN_140181c70(iVar2);
  }
  else {
    uVar4 = FUN_140181a70();
  }
  FUN_14004ce50(param_2,L"Error=%s",uVar4);
  if ((*param_1 != param_1[1]) && (param_1[1] != 0)) {
    FUN_1401568c0();
    local_res18 = PTR_DAT_1403200a0;
    iVar2 = param_1[1];
    piVar3 = (int *)thunk_FUN_1401582b0();
    if (*piVar3 == 0x52) {
      uVar4 = FUN_140181870(iVar2);
    }
    else if (*piVar3 == 0x56) {
      uVar4 = FUN_140181c70(iVar2);
    }
    else {
      uVar4 = FUN_140181a70();
    }
    FUN_14004ce50(&local_res18,L", Detail=%s",uVar4);
    FUN_14004cc50(param_2,&local_res18);
    puVar6 = local_res18;
    if (((local_res18 != (undefined *)0x0) && (local_res18 != PTR_DAT_1403200a0)) &&
       (puVar1 = local_res18 + -8, puVar1 != (undefined *)0x0)) {
      uVar4 = FUN_1401568c0();
      local_60 = uVar4;
      FUN_140156b50(uVar4);
      local_58 = 1;
      piVar3 = (int *)(puVar6 + -4);
      *piVar3 = *piVar3 + -1;
      if (*piVar3 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar4);
    }
  }
  if (param_1[2] != 0) {
    FUN_1401568c0();
    local_res20 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_res20,L", SocketError=%d",param_1[2]);
    FUN_14004cc50(param_2,&local_res20);
    puVar6 = local_res20;
    if (((local_res20 != (undefined *)0x0) && (local_res20 != PTR_DAT_1403200a0)) &&
       (puVar1 = local_res20 + -8, puVar1 != (undefined *)0x0)) {
      uVar4 = FUN_1401568c0();
      local_80 = uVar4;
      FUN_140156b50(uVar4);
      local_78 = 1;
      piVar3 = (int *)(puVar6 + -4);
      *piVar3 = *piVar3 + -1;
      if (*piVar3 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar4);
    }
  }
  if (param_1[3] != 0) {
    FUN_1401568c0();
    local_d0 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_d0,L", HostID=%d",param_1[3]);
    FUN_14004cc50(param_2,&local_d0);
    if ((param_1[8] != -1) && (param_1[8] != 0)) {
      FUN_1401568c0();
      local_c8 = PTR_DAT_1403200a0;
      plVar5 = (longlong *)(*(code *)**(undefined8 **)(param_1 + 6))(param_1 + 6,&local_b0);
      puVar6 = (undefined *)*plVar5;
      if ((undefined *)*plVar5 == (undefined *)0x0) {
        puVar6 = PTR_DAT_1403200a0;
      }
      FUN_14004ce50(&local_c8,L", remoteAddr=%s",puVar6);
      if (((local_b0 != (undefined *)0x0) && (local_b0 != PTR_DAT_1403200a0)) &&
         (local_b0 + -8 != (undefined *)0x0)) {
        uVar4 = FUN_1401568c0();
        local_a0 = uVar4;
        FUN_140156b50(uVar4);
        local_98 = 1;
        piVar3 = (int *)(local_b0 + -4);
        *piVar3 = *piVar3 + -1;
        if (*piVar3 == 0) {
          FUN_140156970(local_b0 + -8);
        }
        FUN_140156be0(uVar4);
      }
      FUN_14004cc50(param_2,&local_c8);
      puVar6 = local_c8;
      if (((local_c8 != (undefined *)0x0) && (local_c8 != PTR_DAT_1403200a0)) &&
         (puVar1 = local_c8 + -8, puVar1 != (undefined *)0x0)) {
        uVar4 = FUN_1401568c0();
        local_90 = uVar4;
        FUN_140156b50(uVar4);
        local_88 = 1;
        piVar3 = (int *)(puVar6 + -4);
        *piVar3 = *piVar3 + -1;
        if (*piVar3 == 0) {
          FUN_140156970(puVar1);
        }
        FUN_140156be0(uVar4);
      }
    }
    puVar6 = local_d0;
    if (((local_d0 != (undefined *)0x0) && (local_d0 != PTR_DAT_1403200a0)) &&
       (puVar1 = local_d0 + -8, puVar1 != (undefined *)0x0)) {
      uVar4 = FUN_1401568c0();
      local_70 = uVar4;
      FUN_140156b50(uVar4);
      local_68 = 1;
      piVar3 = (int *)(puVar6 + -4);
      *piVar3 = *piVar3 + -1;
      if (*piVar3 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar4);
    }
  }
  puVar6 = *(undefined **)(param_1 + 4);
  if (((puVar6 != (undefined *)0x0) && (puVar6 != PTR_DAT_1403200a0)) && (0 < *(int *)(puVar6 + -8))
     ) {
    FUN_1401587a0(&local_c0);
    FUN_14004f840(param_2,&DAT_140286e98);
    FUN_14004f840(param_2,local_c0);
    LOCK();
    piVar3 = (int *)(local_c0 + -8);
    iVar2 = *piVar3;
    *piVar3 = *piVar3 + -1;
    UNLOCK();
    if (iVar2 + -1 < 1) {
      (**(code **)(**(longlong **)(local_c0 + -0x18) + 8))();
    }
  }
  if (param_1[0x14] != 0) {
    FUN_1401568c0();
    local_d8 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_d8,L", HRESULT = %d",param_1[0x14]);
    FUN_14004cc50(param_2,&local_d8);
    puVar6 = local_d8;
    if (((local_d8 != (undefined *)0x0) && (local_d8 != PTR_DAT_1403200a0)) &&
       (puVar1 = local_d8 + -8, puVar1 != (undefined *)0x0)) {
      uVar4 = FUN_1401568c0();
      local_50 = uVar4;
      FUN_140156b50(uVar4);
      local_48 = 1;
      piVar3 = (int *)(puVar6 + -4);
      *piVar3 = *piVar3 + -1;
      if (*piVar3 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar4);
    }
  }
  puVar6 = *(undefined **)(param_1 + 0x16);
  if (((puVar6 != (undefined *)0x0) && (puVar6 != PTR_DAT_1403200a0)) && (0 < *(int *)(puVar6 + -8))
     ) {
    FUN_1401587a0(&local_b8);
    FUN_14004f840(param_2,&DAT_140286e98);
    FUN_14004f840(param_2,local_b8);
    LOCK();
    piVar3 = (int *)(local_b8 + -8);
    iVar2 = *piVar3;
    *piVar3 = *piVar3 + -1;
    UNLOCK();
    if (iVar2 + -1 < 1) {
      (**(code **)(**(longlong **)(local_b8 + -0x18) + 8))();
    }
  }
  return param_2;
}



ulonglong * FUN_1401824f0(ulonglong *param_1,ulonglong param_2)

{
  ushort local_18;
  undefined1 uStack_15;
  
  if ((longlong)param_2 < 0) {
    uStack_15 = 0x80;
    param_2 = -param_2;
  }
  else {
    uStack_15 = 0;
  }
  *param_1 = (ulonglong)CONCAT13(uStack_15,(uint3)local_18);
  param_1[1] = param_2;
  *(undefined2 *)param_1 = 0xe;
  return param_1;
}



ulonglong * FUN_140182530(ulonglong *param_1,ulonglong param_2)

{
  ushort local_18;
  
  *param_1 = (ulonglong)local_18;
  param_1[1] = param_2;
  *(undefined2 *)param_1 = 0xe;
  return param_1;
}



void FUN_140182560(short *param_1)

{
  undefined1 local_58 [88];
  
  if (*param_1 == 1) {
    FUN_140156300(local_58,L"Cannot read Proud.CVariant value whose actual value is Null!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  return;
}



undefined8 * FUN_1401825a0(short *param_1,undefined8 *param_2)

{
  int iVar1;
  undefined8 uVar2;
  undefined8 local_20;
  undefined8 local_18;
  
  uVar2 = 0xfffffffffffffffe;
  if (*param_1 == 0xe) {
    *param_2 = *(undefined8 *)param_1;
    param_2[1] = *(undefined8 *)(param_1 + 4);
  }
  else {
    Ordinal_8(&local_20);
    if ((((short *)&local_20 != param_1) || ((short)local_20 != 0xe)) &&
       (iVar1 = Ordinal_12(&local_20,param_1,0,0xe,uVar2), iVar1 < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(iVar1);
    }
    *param_2 = local_20;
    param_2[1] = local_18;
    Ordinal_9(&local_20);
  }
  return param_2;
}



longlong FUN_140182640(undefined8 param_1)

{
  undefined1 local_18 [2];
  char local_16;
  char local_15;
  longlong local_10;
  
  FUN_1401825a0(param_1,local_18);
  if (local_16 != '\0') {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(0x8002000a);
  }
  if (local_15 != '\0') {
    local_10 = -local_10;
  }
  return local_10;
}



undefined8 * FUN_140182680(undefined8 *param_1,undefined8 param_2,undefined8 param_3)

{
  FUN_1401ac7a0(param_1 + 4,1);
  param_1[2] = param_2;
  param_1[3] = param_3;
  *param_1 = 0xffffffffffffffff;
  *(undefined4 *)(param_1 + 1) = 0;
  return param_1;
}



undefined8 FUN_1401826e0(longlong param_1)

{
  (**(code **)(param_1 + 0x10))(*(undefined8 *)(param_1 + 0x18));
  SetEvent(*(HANDLE *)(param_1 + 0x20));
  return 0x14d;
}



void FUN_140182710(undefined8 *param_1)

{
  char cVar1;
  DWORD DVar2;
  
  if ((HANDLE)*param_1 != (HANDLE)0xffffffffffffffff) {
    DVar2 = WaitForSingleObject((HANDLE)*param_1,1);
    if (DVar2 == 0x102) {
      cVar1 = FUN_1401ac690(param_1 + 4,0x32);
      while ((cVar1 == '\0' && (DAT_140328940 == '\0'))) {
        cVar1 = FUN_1401ac690(param_1 + 4,0x32);
      }
    }
    CloseHandle((HANDLE)*param_1);
  }
  *(undefined4 *)(param_1 + 1) = 0;
  *param_1 = 0xffffffffffffffff;
  return;
}



void FUN_140182790(longlong param_1)

{
  FUN_140182710();
  FUN_1401ac760(param_1 + 0x20);
  return;
}



MMRESULT * FUN_1401827c0(MMRESULT *param_1,LPTIMECALLBACK param_2,UINT param_3)

{
  MMRESULT MVar1;
  
  MVar1 = timeSetEvent(param_3,param_3 / 10,param_2,0,0x11);
  *param_1 = MVar1;
  return param_1;
}



void FUN_140182800(UINT *param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140182802. Too many branches
                    // WARNING: Treating indirect jump as call
  timeKillEvent(*param_1);
  return;
}



undefined8 * FUN_140182810(undefined8 *param_1)

{
  RPC_STATUS RVar1;
  UUID local_18;
  
  RVar1 = UuidCreate(&local_18);
  if (RVar1 != 0) {
    local_18.Data2 = 0;
    local_18.Data3 = 0;
    local_18.Data1 = 0;
    local_18.Data4[0] = '\0';
    local_18.Data4[1] = '\0';
    local_18.Data4[2] = '\0';
    local_18.Data4[3] = '\0';
    local_18.Data4[4] = '\0';
    local_18.Data4[5] = '\0';
    local_18.Data4[6] = '\0';
    local_18.Data4[7] = '\0';
  }
  *param_1 = CONCAT44(local_18._4_4_,local_18.Data1);
  param_1[1] = CONCAT44(local_18.Data4._4_4_,local_18.Data4._0_4_);
  return param_1;
}



void FUN_140182870(longlong *param_1)

{
  HANDLE pvVar1;
  undefined1 local_58 [80];
  
  if (*param_1 != -1) {
    FUN_140156300(local_58,L"Thread is already started!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  ResetEvent((HANDLE)param_1[4]);
  pvVar1 = CreateThread((LPSECURITY_ATTRIBUTES)0x0,0,FUN_1401826e0,param_1,0,(LPDWORD)(param_1 + 1))
  ;
  *param_1 = (longlong)pvVar1;
  return;
}



undefined8
FUN_1401828e0(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined *puVar2;
  
  uVar1 = 0xfffffffffffffffe;
  puVar2 = &DAT_140328948;
  FUN_140156b50(&DAT_140328948);
  FUN_1401a4b40(&DAT_140328980,param_1,param_3,param_4,uVar1,puVar2,1);
  FUN_140156be0(&DAT_140328948);
  return param_1;
}



longlong * FUN_140182940(longlong *param_1,uchar param_2)

{
  int *piVar1;
  uchar uVar2;
  uchar *puVar3;
  undefined *puVar4;
  int iVar5;
  uchar *_Ptr;
  uchar *puVar6;
  int iVar7;
  int iVar8;
  undefined *_Dst;
  
  _Ptr = (uchar *)*param_1;
  if ((uchar *)*param_1 == (uchar *)0x0) {
    _Ptr = PTR_DAT_140320098;
  }
  uVar2 = *_Ptr;
  while (param_2 == uVar2) {
    _Ptr = _mbsinc(_Ptr);
    uVar2 = *_Ptr;
  }
  puVar3 = (uchar *)*param_1;
  puVar6 = puVar3;
  if (puVar3 == (uchar *)0x0) {
    puVar6 = PTR_DAT_140320098;
  }
  if (_Ptr != puVar6) {
    iVar8 = (int)puVar3;
    if (puVar3 == (uchar *)0x0) {
      iVar8 = (int)PTR_DAT_140320098;
    }
    iVar8 = (int)_Ptr - iVar8;
    if (puVar3 == (uchar *)0x0) {
      iVar5 = 0;
    }
    else if (puVar3 == PTR_DAT_140320098) {
      iVar5 = 0;
    }
    else {
      iVar5 = *(int *)(puVar3 + -8);
    }
    if (puVar3 == (uchar *)0x0) {
      iVar7 = 0;
    }
    else if (puVar3 == PTR_DAT_140320098) {
      iVar7 = 0;
    }
    else {
      iVar7 = *(int *)(puVar3 + -8);
    }
    if (iVar5 <= iVar7) {
      if (puVar3 == (uchar *)0x0) {
        iVar5 = 0;
      }
      else if (puVar3 == PTR_DAT_140320098) {
        iVar5 = 0;
      }
      else {
        iVar5 = *(int *)(puVar3 + -8);
      }
    }
    iVar7 = 1;
    if (1 < iVar5) {
      iVar7 = iVar5;
    }
    if (puVar3 == (uchar *)0x0) {
      iVar5 = 0;
    }
    else if (puVar3 == PTR_DAT_140320098) {
      iVar5 = 0;
    }
    else {
      iVar5 = *(int *)(puVar3 + -8);
    }
    if (iVar5 < iVar7) {
      FUN_140124200(param_1);
    }
    FUN_1401242e0(param_1);
    puVar4 = (undefined *)*param_1;
    _Dst = puVar4;
    if (puVar4 == (undefined *)0x0) {
      _Dst = PTR_DAT_140320098;
    }
    if (puVar4 == (undefined *)0x0) {
      iVar5 = 0;
    }
    else if (puVar4 == PTR_DAT_140320098) {
      iVar5 = 0;
    }
    else {
      iVar5 = *(int *)(puVar4 + -8);
    }
    iVar5 = iVar5 - iVar8;
    if (puVar4 == (undefined *)0x0) {
      iVar7 = 0;
    }
    else if (puVar4 == PTR_DAT_140320098) {
      iVar7 = 0;
    }
    else {
      iVar7 = *(int *)(puVar4 + -8);
    }
    memmove_s(_Dst,(longlong)(iVar7 + 1),_Dst + iVar8,(longlong)(iVar5 + 1));
    puVar4 = (undefined *)*param_1;
    iVar8 = 0;
    if (0 < iVar5) {
      iVar8 = iVar5;
    }
    if (puVar4 == (undefined *)0x0) {
      iVar5 = 0;
    }
    else if (puVar4 == PTR_DAT_140320098) {
      iVar5 = 0;
    }
    else {
      iVar5 = *(int *)(puVar4 + -8);
    }
    if (iVar5 <= iVar8) {
      if (puVar4 == (undefined *)0x0) {
        iVar8 = 0;
      }
      else if (puVar4 == PTR_DAT_140320098) {
        iVar8 = 0;
      }
      else {
        iVar8 = *(int *)(puVar4 + -8);
      }
    }
    if (((puVar4 != PTR_DAT_140320098) && (puVar4 != (undefined *)0x0)) &&
       (piVar1 = (int *)(puVar4 + -8), piVar1 != (int *)0x0)) {
      *piVar1 = iVar8;
      *(undefined1 *)((longlong)iVar8 + 8 + (longlong)piVar1) = 0;
    }
  }
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_140182b00(ulong *param_1,undefined8 param_2)

{
  RPC_STATUS RVar1;
  undefined4 extraout_var;
  undefined4 extraout_var_00;
  ulonglong uVar2;
  undefined1 auStack_168 [32];
  RPC_CSTR local_148;
  undefined8 local_140;
  UUID local_138;
  undefined1 *local_128;
  undefined1 local_120 [264];
  ulonglong local_18;
  
  local_140 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_168;
  local_138.Data1 = *param_1;
  local_138._4_4_ = param_1[1];
  local_138.Data4._0_4_ = param_1[2];
  local_138.Data4._4_4_ = param_1[3];
  RVar1 = UuidToStringA(&local_138,&local_148);
  if (RVar1 == 0) {
    local_128 = local_120;
    FUN_140142dc0(&local_128,local_148,3);
    FUN_14004ce80(param_2,local_128);
    if (local_128 != local_120) {
      free(local_128);
    }
    RVar1 = RpcStringFreeA(&local_148);
    uVar2 = CONCAT71((int7)(CONCAT44(extraout_var_00,RVar1) >> 8),1);
  }
  else {
    uVar2 = CONCAT44(extraout_var,RVar1) & 0xffffffffffffff00;
  }
  return uVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_140182bd0(ulong *param_1,undefined8 param_2)

{
  RPC_STATUS RVar1;
  undefined4 extraout_var;
  undefined4 extraout_var_00;
  ulonglong uVar2;
  undefined1 auStack_168 [32];
  RPC_CSTR local_148;
  undefined8 local_140;
  UUID local_138;
  undefined1 *local_128;
  undefined1 local_120 [264];
  ulonglong local_18;
  
  local_140 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_168;
  local_138.Data1 = *param_1;
  local_138._4_4_ = param_1[1];
  local_138.Data4._0_4_ = param_1[2];
  local_138.Data4._4_4_ = param_1[3];
  RVar1 = UuidToStringA(&local_138,&local_148);
  if (RVar1 == 0) {
    local_128 = local_120;
    FUN_140142dc0(&local_128,local_148,3);
    FUN_14004ce50(param_2,L"{%s}",local_128);
    if (local_128 != local_120) {
      free(local_128);
    }
    RVar1 = RpcStringFreeA(&local_148);
    uVar2 = CONCAT71((int7)(CONCAT44(extraout_var_00,RVar1) >> 8),1);
  }
  else {
    uVar2 = CONCAT44(extraout_var,RVar1) & 0xffffffffffffff00;
  }
  return uVar2;
}



longlong * FUN_140182ca0(undefined8 param_1,longlong *param_2)

{
  int *piVar1;
  undefined *puVar2;
  undefined *puVar3;
  char cVar4;
  undefined4 uVar5;
  undefined8 uVar6;
  undefined *local_res20;
  
  FUN_1401568c0();
  local_res20 = PTR_DAT_1403200a0;
  cVar4 = FUN_140182b00(param_1,&local_res20);
  if (cVar4 == '\0') {
    FUN_1401568c0();
    *param_2 = (longlong)PTR_DAT_1403200a0;
    uVar5 = FUN_140156740(&DAT_140263738);
    uVar6 = FUN_14004f760(param_2,uVar5);
    FUN_140156770(uVar6,&DAT_140263738,uVar5);
    FUN_14004f380(param_2);
    puVar3 = local_res20;
    if (local_res20 == (undefined *)0x0) {
      return param_2;
    }
    if (local_res20 == PTR_DAT_1403200a0) {
      return param_2;
    }
    puVar2 = local_res20 + -8;
    if (puVar2 == (undefined *)0x0) {
      return param_2;
    }
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(puVar3 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2);
    }
  }
  else {
    FUN_1401568c0();
    puVar2 = local_res20;
    puVar3 = PTR_DAT_1403200a0;
    *param_2 = (longlong)PTR_DAT_1403200a0;
    if (puVar3 == (undefined *)0x0) {
      *param_2 = (longlong)PTR_DAT_1403200a0;
    }
    if (local_res20 != (undefined *)*param_2) {
      uVar6 = FUN_1401568c0();
      FUN_140156b50(uVar6);
      FUN_14004f990(param_2);
      *param_2 = (longlong)puVar2;
      if (((puVar2 != PTR_DAT_1403200a0) && (puVar2 != (undefined *)0x0)) &&
         (puVar2 != (undefined *)0x8)) {
        *(int *)(puVar2 + -4) = *(int *)(puVar2 + -4) + 1;
      }
      FUN_140156be0(uVar6);
    }
    if (puVar2 == (undefined *)0x0) {
      return param_2;
    }
    if (puVar2 == PTR_DAT_1403200a0) {
      return param_2;
    }
    if (puVar2 + -8 == (undefined *)0x0) {
      return param_2;
    }
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
  }
  FUN_140156be0(uVar6);
  return param_2;
}



longlong * FUN_140182e50(undefined8 param_1,longlong *param_2)

{
  int *piVar1;
  undefined *puVar2;
  undefined *puVar3;
  char cVar4;
  undefined4 uVar5;
  undefined8 uVar6;
  undefined *local_res20;
  
  FUN_1401568c0();
  local_res20 = PTR_DAT_1403200a0;
  cVar4 = FUN_140182bd0(param_1,&local_res20);
  if (cVar4 == '\0') {
    FUN_1401568c0();
    *param_2 = (longlong)PTR_DAT_1403200a0;
    uVar5 = FUN_140156740(&DAT_140263738);
    uVar6 = FUN_14004f760(param_2,uVar5);
    FUN_140156770(uVar6,&DAT_140263738,uVar5);
    FUN_14004f380(param_2);
    puVar3 = local_res20;
    if (local_res20 == (undefined *)0x0) {
      return param_2;
    }
    if (local_res20 == PTR_DAT_1403200a0) {
      return param_2;
    }
    puVar2 = local_res20 + -8;
    if (puVar2 == (undefined *)0x0) {
      return param_2;
    }
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(puVar3 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2);
    }
  }
  else {
    FUN_1401568c0();
    puVar2 = local_res20;
    puVar3 = PTR_DAT_1403200a0;
    *param_2 = (longlong)PTR_DAT_1403200a0;
    if (puVar3 == (undefined *)0x0) {
      *param_2 = (longlong)PTR_DAT_1403200a0;
    }
    if (local_res20 != (undefined *)*param_2) {
      uVar6 = FUN_1401568c0();
      FUN_140156b50(uVar6);
      FUN_14004f990(param_2);
      *param_2 = (longlong)puVar2;
      if (((puVar2 != PTR_DAT_1403200a0) && (puVar2 != (undefined *)0x0)) &&
         (puVar2 != (undefined *)0x8)) {
        *(int *)(puVar2 + -4) = *(int *)(puVar2 + -4) + 1;
      }
      FUN_140156be0(uVar6);
    }
    if (puVar2 == (undefined *)0x0) {
      return param_2;
    }
    if (puVar2 == PTR_DAT_1403200a0) {
      return param_2;
    }
    if (puVar2 + -8 == (undefined *)0x0) {
      return param_2;
    }
    uVar6 = FUN_1401568c0();
    FUN_140156b50(uVar6);
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
  }
  FUN_140156be0(uVar6);
  return param_2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

bool FUN_140183000(short *param_1,UUID *param_2)

{
  short sVar1;
  undefined1 *puVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  RPC_STATUS RVar7;
  uint *puVar8;
  uint *puVar9;
  char cVar10;
  longlong lVar11;
  short *psVar12;
  uint *puVar13;
  undefined1 auStack_f8 [32];
  uint *local_d8;
  undefined1 local_d0;
  undefined8 local_c8;
  undefined1 *local_b8;
  undefined1 local_b0 [136];
  ulonglong local_28;
  
  local_c8 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_f8;
  lVar11 = -1;
  psVar12 = param_1;
  do {
    if (lVar11 == 0) break;
    lVar11 = lVar11 + -1;
    sVar1 = *psVar12;
    psVar12 = psVar12 + 1;
  } while (sVar1 != 0);
  if (lVar11 == -2) {
    param_2->Data1 = 0;
    param_2->Data2 = 0;
    param_2->Data3 = 0;
    param_2->Data4[0] = '\0';
    param_2->Data4[1] = '\0';
    param_2->Data4[2] = '\0';
    param_2->Data4[3] = '\0';
    param_2->Data4[4] = '\0';
    param_2->Data4[5] = '\0';
    param_2->Data4[6] = '\0';
    param_2->Data4[7] = '\0';
    return false;
  }
  local_b8 = local_b0;
  FUN_140153e40(&local_b8,param_1,3);
  puVar2 = local_b8;
  FUN_1401568c0();
  puVar13 = (uint *)PTR_DAT_140320098;
  local_d8 = (uint *)PTR_DAT_140320098;
  uVar3 = FUN_1401567e0(puVar2);
  if (puVar13 == (uint *)0x0) {
    iVar4 = 0;
  }
  else if (puVar13 == (uint *)PTR_DAT_140320098) {
    iVar4 = 0;
  }
  else {
    iVar4 = *(int *)((longlong)puVar13 + -8);
  }
  uVar5 = uVar3;
  if ((int)uVar3 <= iVar4) {
    if (puVar13 == (uint *)0x0) {
      uVar5 = 0;
    }
    else if (puVar13 == (uint *)PTR_DAT_140320098) {
      uVar5 = 0;
    }
    else {
      uVar5 = *(uint *)((longlong)puVar13 + -8);
    }
  }
  uVar6 = 1;
  if (1 < (int)uVar5) {
    uVar6 = uVar5;
  }
  if (puVar13 == (uint *)0x0) {
    iVar4 = 0;
  }
  else if (puVar13 == (uint *)PTR_DAT_140320098) {
    iVar4 = 0;
  }
  else {
    iVar4 = *(int *)((longlong)puVar13 + -8);
  }
  if (iVar4 < (int)uVar6) {
    if (puVar13 == (uint *)0x0) {
      puVar13 = (uint *)PTR_DAT_140320098;
    }
    local_d8 = puVar13;
    if ((int)uVar6 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar6 == 0) {
      FUN_140050520(&local_d8);
    }
    else {
      if (puVar13 == (uint *)0x0) {
        uVar5 = 0;
      }
      else if (puVar13 == (uint *)PTR_DAT_140320098) {
        uVar5 = 0;
      }
      else {
        uVar5 = puVar13[-2];
      }
      if (uVar6 != uVar5) {
        puVar8 = (uint *)FUN_140156940();
        if (puVar8 != (uint *)0x0) {
          *puVar8 = 0;
          puVar8[1] = 1;
        }
        *puVar8 = uVar6;
        if (puVar13 == (uint *)0x0) {
          uVar5 = 0;
        }
        else if (puVar13 == (uint *)PTR_DAT_140320098) {
          uVar5 = 0;
        }
        else {
          uVar5 = puVar13[-2];
        }
        puVar9 = (uint *)PTR_DAT_140320098;
        if ((int)uVar6 < (int)uVar5) {
LAB_1401831a9:
          if (puVar13 != (uint *)0x0) {
            puVar9 = puVar13;
          }
        }
        else {
          if (puVar13 != (uint *)0x0) {
            if (puVar13 == (uint *)PTR_DAT_140320098) {
              uVar6 = 0;
            }
            else {
              uVar6 = puVar13[-2];
            }
            goto LAB_1401831a9;
          }
          uVar6 = 0;
        }
        FUN_140156810(puVar8 + 2,puVar9,uVar6);
        FUN_140050520(&local_d8);
        local_d8 = puVar8 + 2;
      }
    }
  }
  FUN_1401242e0(&local_d8);
  puVar13 = local_d8;
  puVar8 = local_d8;
  if (local_d8 == (uint *)0x0) {
    puVar8 = (uint *)PTR_DAT_140320098;
  }
  FUN_140156810(puVar8,puVar2,uVar3);
  uVar5 = FUN_1401567e0();
  uVar3 = 0;
  if (0 < (int)uVar5) {
    uVar3 = uVar5;
  }
  if (puVar13 == (uint *)0x0) {
    uVar5 = 0;
  }
  else if (puVar13 == (uint *)PTR_DAT_140320098) {
    uVar5 = 0;
  }
  else {
    uVar5 = puVar13[-2];
  }
  if ((int)uVar5 <= (int)uVar3) {
    if (puVar13 == (uint *)0x0) {
      uVar3 = 0;
    }
    else if (puVar13 == (uint *)PTR_DAT_140320098) {
      uVar3 = 0;
    }
    else {
      uVar3 = puVar13[-2];
    }
  }
  if (((puVar13 != (uint *)PTR_DAT_140320098) && (puVar13 != (uint *)0x0)) &&
     (puVar13 = puVar13 + -2, puVar13 != (uint *)0x0)) {
    *puVar13 = uVar3;
    *(char *)((longlong)(int)uVar3 + 8 + (longlong)puVar13) = '\0';
  }
  if (local_b8 != local_b0) {
    free(local_b8);
  }
  FUN_140182940(&local_d8,0x7b);
  puVar13 = local_d8;
  puVar8 = local_d8;
  if (local_d8 == (uint *)0x0) {
    puVar8 = (uint *)PTR_DAT_140320098;
  }
  puVar9 = (uint *)0x0;
  cVar10 = (char)*puVar8;
  if (cVar10 != '\0') {
    do {
      if (cVar10 == '}') {
        if (puVar9 == (uint *)0x0) {
          puVar9 = puVar8;
        }
      }
      else {
        puVar9 = (uint *)0x0;
      }
      puVar8 = (uint *)_mbsinc((uchar *)puVar8);
      cVar10 = (char)*puVar8;
    } while (cVar10 != '\0');
    if (puVar9 != (uint *)0x0) {
      iVar4 = (int)puVar13;
      if (puVar13 == (uint *)0x0) {
        iVar4 = (int)PTR_DAT_140320098;
      }
      uVar3 = (int)puVar9 - iVar4;
      if (puVar13 == (uint *)0x0) {
        uVar5 = 0;
      }
      else if (puVar13 == (uint *)PTR_DAT_140320098) {
        uVar5 = 0;
      }
      else {
        uVar5 = puVar13[-2];
      }
      uVar6 = uVar3;
      if ((int)uVar3 <= (int)uVar5) {
        if (puVar13 == (uint *)0x0) {
          uVar6 = 0;
        }
        else if (puVar13 == (uint *)PTR_DAT_140320098) {
          uVar6 = 0;
        }
        else {
          uVar6 = puVar13[-2];
        }
      }
      uVar5 = 1;
      if (1 < (int)uVar6) {
        uVar5 = uVar6;
      }
      if (puVar13 == (uint *)0x0) {
        uVar6 = 0;
      }
      else if (puVar13 == (uint *)PTR_DAT_140320098) {
        uVar6 = 0;
      }
      else {
        uVar6 = puVar13[-2];
      }
      if ((int)uVar6 < (int)uVar5) {
        if (puVar13 == (uint *)0x0) {
          puVar13 = (uint *)PTR_DAT_140320098;
        }
        local_d8 = puVar13;
        if ((int)uVar5 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        if (uVar5 == 0) {
          FUN_140050520(&local_d8);
        }
        else {
          if (puVar13 == (uint *)0x0) {
            uVar6 = 0;
          }
          else if (puVar13 == (uint *)PTR_DAT_140320098) {
            uVar6 = 0;
          }
          else {
            uVar6 = puVar13[-2];
          }
          if (uVar5 != uVar6) {
            puVar8 = (uint *)FUN_140156940();
            if (puVar8 != (uint *)0x0) {
              *puVar8 = 0;
              puVar8[1] = 1;
            }
            *puVar8 = uVar5;
            if (puVar13 == (uint *)0x0) {
              uVar6 = 0;
            }
            else if (puVar13 == (uint *)PTR_DAT_140320098) {
              uVar6 = 0;
            }
            else {
              uVar6 = puVar13[-2];
            }
            puVar9 = (uint *)PTR_DAT_140320098;
            if ((int)uVar5 < (int)uVar6) {
LAB_1401833ce:
              if (puVar13 != (uint *)0x0) {
                puVar9 = puVar13;
              }
            }
            else {
              if (puVar13 != (uint *)0x0) {
                if (puVar13 == (uint *)PTR_DAT_140320098) {
                  uVar5 = 0;
                }
                else {
                  uVar5 = puVar13[-2];
                }
                goto LAB_1401833ce;
              }
              uVar5 = 0;
            }
            FUN_140156810(puVar8 + 2,puVar9,uVar5);
            FUN_140050520(&local_d8);
            local_d8 = puVar8 + 2;
          }
        }
      }
      FUN_1401242e0(&local_d8);
      uVar5 = 0;
      if (0 < (int)uVar3) {
        uVar5 = uVar3;
      }
      if (local_d8 == (uint *)0x0) {
        uVar3 = 0;
      }
      else if (local_d8 == (uint *)PTR_DAT_140320098) {
        uVar3 = 0;
      }
      else {
        uVar3 = local_d8[-2];
      }
      if ((int)uVar3 <= (int)uVar5) {
        if (local_d8 == (uint *)0x0) {
          uVar5 = 0;
        }
        else if (local_d8 == (uint *)PTR_DAT_140320098) {
          uVar5 = 0;
        }
        else {
          uVar5 = local_d8[-2];
        }
      }
      puVar13 = local_d8;
      if (local_d8 != (uint *)PTR_DAT_140320098) {
        puVar8 = (uint *)PTR_DAT_140320098;
        if (local_d8 == (uint *)0x0) goto LAB_140183472;
        puVar8 = local_d8 + -2;
        if (puVar8 != (uint *)0x0) {
          *puVar8 = uVar5;
          *(char *)((longlong)(int)uVar5 + 8 + (longlong)puVar8) = '\0';
        }
      }
    }
  }
  puVar8 = (uint *)PTR_DAT_140320098;
  if (puVar13 != (uint *)0x0) {
    puVar8 = puVar13;
  }
LAB_140183472:
  RVar7 = UuidFromStringA((RPC_CSTR)puVar8,param_2);
  if (((puVar13 != (uint *)0x0) && (puVar13 != (uint *)PTR_DAT_140320098)) &&
     (puVar13 + -2 != (uint *)0x0)) {
    puVar9 = (uint *)FUN_1401568c0();
    local_d8 = puVar9;
    FUN_140156b50(puVar9);
    local_d0 = 1;
    puVar8 = puVar13 + -1;
    *puVar8 = *puVar8 - 1;
    if (*puVar8 == 0) {
      FUN_140156970(puVar13 + -2);
    }
    FUN_140156be0(puVar9);
  }
  return RVar7 == 0;
}



undefined8 * FUN_140183500(undefined8 *param_1,undefined8 param_2)

{
  *param_1 = param_2;
  *(undefined4 *)(param_1 + 1) = 0;
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_140183510(undefined8 *param_1)

{
  int iVar1;
  undefined1 auStack_48 [32];
  ushort local_28 [8];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_48;
  if (*(int *)(param_1 + 1) == 0) {
    iVar1 = Ordinal_185(*param_1,local_28);
    if (iVar1 != 0) {
      return (ulonglong)local_28[0];
    }
  }
  return 0xffffffff;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_140183570(undefined8 *param_1)

{
  int iVar1;
  undefined1 auStack_48 [32];
  undefined1 local_28 [2];
  ushort local_26;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_48;
  if (*(int *)(param_1 + 1) == 0) {
    iVar1 = Ordinal_185(*param_1,local_28);
    if (iVar1 != 0) {
      return (ulonglong)local_26;
    }
  }
  return 0xffffffff;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_1401835d0(undefined8 *param_1)

{
  int iVar1;
  undefined1 auStack_48 [32];
  undefined1 local_28 [6];
  ushort local_22;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_48;
  if (*(int *)(param_1 + 1) == 0) {
    iVar1 = Ordinal_185(*param_1,local_28);
    if (iVar1 != 0) {
      return (ulonglong)local_22;
    }
  }
  return 0xffffffff;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_140183630(undefined8 *param_1)

{
  int iVar1;
  undefined1 auStack_48 [32];
  undefined1 local_28 [8];
  ushort local_20;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_48;
  if (*(int *)(param_1 + 1) == 0) {
    iVar1 = Ordinal_185(*param_1,local_28);
    if (iVar1 != 0) {
      return (ulonglong)local_20;
    }
  }
  return 0xffffffff;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_140183690(undefined8 *param_1)

{
  int iVar1;
  undefined1 auStack_48 [32];
  undefined1 local_28 [10];
  ushort local_1e;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_48;
  if (*(int *)(param_1 + 1) == 0) {
    iVar1 = Ordinal_185(*param_1,local_28);
    if (iVar1 != 0) {
      return (ulonglong)local_1e;
    }
  }
  return 0xffffffff;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_1401836f0(undefined8 *param_1)

{
  int iVar1;
  undefined1 auStack_48 [32];
  undefined1 local_28 [12];
  ushort local_1c;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_48;
  if (*(int *)(param_1 + 1) == 0) {
    iVar1 = Ordinal_185(*param_1,local_28);
    if (iVar1 != 0) {
      return (ulonglong)local_1c;
    }
  }
  return 0xffffffff;
}



void FUN_140183750(longlong param_1,longlong param_2)

{
  *(longlong *)(param_1 + 0x78) = param_2;
  *(undefined4 *)(param_1 + 0x70) = 0;
  if (param_2 + 0x80U < 0x100) {
    *(undefined1 *)(param_1 + 0xc) = 1;
    *(int *)(param_1 + 0x70) = *(int *)(param_1 + 0x70) + 1;
    *(char *)((longlong)*(int *)(param_1 + 0x70) + 0xc + param_1) = (char)param_2;
    *(int *)(param_1 + 0x70) = *(int *)(param_1 + 0x70) + 1;
    return;
  }
  if (param_2 + 0x8000U < 0x10000) {
    *(undefined1 *)(param_1 + 0xc) = 2;
    *(int *)(param_1 + 0x70) = *(int *)(param_1 + 0x70) + 1;
    *(short *)((longlong)*(int *)(param_1 + 0x70) + 0xc + param_1) = (short)param_2;
    *(int *)(param_1 + 0x70) = *(int *)(param_1 + 0x70) + 2;
    return;
  }
  if (param_2 + 0x80000000U < 0x100000000) {
    *(undefined1 *)(param_1 + 0xc) = 4;
    *(int *)(param_1 + 0x70) = *(int *)(param_1 + 0x70) + 1;
    *(int *)((longlong)*(int *)(param_1 + 0x70) + 0xc + param_1) = (int)param_2;
    *(int *)(param_1 + 0x70) = *(int *)(param_1 + 0x70) + 4;
    return;
  }
  *(undefined1 *)(param_1 + 0xc) = 8;
  *(int *)(param_1 + 0x70) = *(int *)(param_1 + 0x70) + 1;
  *(longlong *)((longlong)*(int *)(param_1 + 0x70) + 0xc + param_1) = param_2;
  *(int *)(param_1 + 0x70) = *(int *)(param_1 + 0x70) + 8;
  return;
}



ulonglong FUN_1401837e0(undefined8 *param_1,char *param_2,int param_3)

{
  char cVar1;
  short sVar2;
  int iVar3;
  undefined8 uVar4;
  uint uVar5;
  ulonglong in_RAX;
  
  *(undefined4 *)(param_1 + 0x10) = 0;
  *param_1 = param_2;
  *(int *)(param_1 + 1) = param_3;
  if (0 < param_3) {
    uVar5 = (uint)*param_2;
    in_RAX = (ulonglong)uVar5;
    *(undefined4 *)(param_1 + 0x10) = 1;
    if (uVar5 == 1) {
      if (1 < param_3) {
        cVar1 = param_2[1];
        *(undefined4 *)(param_1 + 0x10) = 2;
        param_1[0xf] = (longlong)cVar1;
        return CONCAT71(cVar1 >> 7,1);
      }
    }
    else if (uVar5 == 2) {
      if (2 < param_3) {
        sVar2 = *(short *)(param_2 + 1);
        *(undefined4 *)(param_1 + 0x10) = 3;
        param_1[0xf] = (longlong)sVar2;
        return CONCAT71((int7)(char)((ushort)sVar2 >> 8),1);
      }
    }
    else if (uVar5 == 4) {
      if (4 < param_3) {
        iVar3 = *(int *)(param_2 + 1);
        *(undefined4 *)(param_1 + 0x10) = 5;
        param_1[0xf] = (longlong)iVar3;
        return CONCAT71((int7)(int3)((uint)iVar3 >> 8),1);
      }
    }
    else if ((uVar5 == 8) && (8 < param_3)) {
      uVar4 = *(undefined8 *)(param_2 + 1);
      *(undefined4 *)(param_1 + 0x10) = 9;
      param_1[0xf] = uVar4;
      return CONCAT71((int7)((ulonglong)uVar4 >> 8),1);
    }
  }
  return in_RAX & 0xffffffffffffff00;
}



void FUN_1401838a0(void)

{
  HANDLE hProcess;
  
  MessageBoxW((HWND)0x0,L"Library and header files version mismatch!",L"ProudNet",0x10);
  hProcess = GetCurrentProcess();
                    // WARNING: Could not recover jumptable at 0x0001401838d2. Too many branches
                    // WARNING: Treating indirect jump as call
  TerminateProcess(hProcess,1);
  return;
}



undefined8 * FUN_1401838e0(void)

{
  bool bVar1;
  char cVar2;
  undefined8 uVar3;
  undefined1 local_20 [24];
  
  bVar1 = false;
  cVar2 = FUN_140156bf0(&DAT_1403293a8);
  if (cVar2 != '\0') {
    if (DAT_140320e40 == '\0') {
      bVar1 = false;
    }
    else {
      bVar1 = true;
      FUN_140156b50(&DAT_1403293a8);
    }
  }
  if ((DAT_1403293a0 & 1) == 0) {
    DAT_1403293a0 = DAT_1403293a0 | 1;
    uVar3 = FUN_14019c9e0(local_20);
    DAT_140329398 = FUN_14019c950(uVar3);
    atexit(FUN_140257fa0);
  }
  DAT_140320e40 = 0;
  if (bVar1) {
    FUN_140156be0(&DAT_1403293a8);
  }
  return &DAT_140329398;
}



void FUN_140183990(undefined8 param_1)

{
  undefined8 *puVar1;
  
  puVar1 = (undefined8 *)FUN_1401838e0();
                    // WARNING: Could not recover jumptable at 0x0001401839ac. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*(longlong *)*puVar1 + 0x10))((longlong *)*puVar1,param_1);
  return;
}



undefined8 FUN_1401839b0(undefined8 param_1,undefined8 param_2,undefined8 param_3)

{
  DWORD DVar1;
  HANDLE pvVar2;
  DWORD local_18;
  undefined8 local_14;
  undefined4 local_c;
  
  local_18 = GetCurrentThreadId();
  local_c = 0;
  local_14 = param_2;
  DVar1 = GetCurrentProcessId();
  pvVar2 = GetCurrentProcess();
  MiniDumpWriteDump(pvVar2,DVar1,param_3,0,&local_18,0,0);
  return 1;
}



void FUN_140183a30(LPCWSTR param_1)

{
  HANDLE hObject;
  
  SetErrorMode(2);
  hObject = CreateFileW(param_1,0x40000000,2,(LPSECURITY_ATTRIBUTES)0x0,2,0x80,(HANDLE)0x0);
  if (hObject != (HANDLE)0xffffffffffffffff) {
    uRam0000000000000000 = 1;
    CloseHandle(hObject);
  }
  return;
}



undefined8 * FUN_140183aa0(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::CMemoryHeap::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140183ad0(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  longlong lVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  *param_1 = Proud::CFastHeapImpl::vftable;
  lVar2 = 0;
  do {
    puVar1 = *(undefined8 **)(lVar2 + param_1[0xd]);
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1,param_3,param_4,uVar3);
    }
    lVar2 = lVar2 + 8;
  } while (lVar2 < 0x400);
  free((void *)param_1[0xd]);
  *(undefined4 *)(param_1 + 8) = 3;
  FUN_140156930(param_1);
  return;
}



void FUN_140183b50(longlong param_1)

{
  int iVar1;
  longlong lVar2;
  
  lVar2 = 0;
  do {
    iVar1 = (**(code **)(**(longlong **)(lVar2 + *(longlong *)(param_1 + 0x68)) + 0x18))();
    if (iVar1 != -2) {
      return;
    }
    lVar2 = lVar2 + 8;
  } while (lVar2 < 0x400);
  return;
}



void FUN_140183b90(longlong param_1)

{
  undefined1 local_58 [88];
  
  if (*(short *)(param_1 + -0x10) != 0x71a) {
    FUN_140156300(local_58,L"Not a fastheap allocated block!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  return;
}



void FUN_140183bd0(longlong param_1,SIZE_T param_2)

{
  SIZE_T dwBytes;
  
  dwBytes = 1;
  if (param_2 != 0) {
    dwBytes = param_2;
  }
                    // WARNING: Could not recover jumptable at 0x000140183be3. Too many branches
                    // WARNING: Treating indirect jump as call
  HeapAlloc(*(HANDLE *)(param_1 + 8),0,dwBytes);
  return;
}



void FUN_140183bf0(longlong param_1,undefined8 param_2,longlong param_3)

{
  longlong lVar1;
  
  lVar1 = 1;
  if (param_3 != 0) {
    lVar1 = param_3;
  }
                    // WARNING: Could not recover jumptable at 0x000140183c06. Too many branches
                    // WARNING: Treating indirect jump as call
  HeapReAlloc(*(undefined8 *)(param_1 + 8),0,param_2,lVar1);
  return;
}



void FUN_140183c10(longlong param_1,LPVOID param_2)

{
  if (*(HANDLE *)(param_1 + 8) == (HANDLE)0x0) {
    FUN_1401580e0(
                 L"CMemoryHeap.Free(): Attempt Free after Heap destruction! Doing Free before WinMain returns in highly recommended. Refer the manual for the resolution."
                 );
    return;
  }
                    // WARNING: Could not recover jumptable at 0x000140183c2a. Too many branches
                    // WARNING: Treating indirect jump as call
  HeapFree(*(HANDLE *)(param_1 + 8),0,param_2);
  return;
}



undefined8 FUN_140183c40(longlong param_1)

{
  HeapValidate(*(HANDLE *)(param_1 + 8),0,(LPCVOID)0x0);
  return 0xfffffffe;
}



undefined8 * FUN_140183c60(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CMemoryHeapImpl::vftable;
  if (*(char *)(param_1 + 2) != '\0') {
    HeapDestroy((HANDLE)param_1[1]);
    param_1[1] = 0;
  }
  *param_1 = Proud::CMemoryHeap::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 FUN_140183cc0(undefined8 param_1,uint param_2)

{
  FUN_140183ad0();
  if ((param_2 & 1) != 0) {
    FUN_140156970(param_1);
  }
  return param_1;
}



undefined8 FUN_140183cf0(longlong param_1,longlong param_2)

{
  undefined1 auVar1 [16];
  undefined1 auVar2 [16];
  ulonglong uVar3;
  ulonglong uVar4;
  
  if (param_2 != 0) {
    uVar4 = *(ulonglong *)(param_1 + 0x60) >> 7;
    auVar1._8_8_ = 0;
    auVar1._0_8_ = uVar4;
    auVar2._8_8_ = 0;
    auVar2._0_8_ = param_2 - 1U;
    uVar3 = SUB168(auVar2 / auVar1,0);
    if (0xffffffff < uVar3) {
                    // WARNING: Subroutine does not return
      FUN_140156710(L"Proud::CFastHeapImpl::GetAllocByGroundSize",(param_2 - 1U) % uVar4);
    }
    if (uVar3 < 0x80) {
      return *(undefined8 *)
              (*(longlong *)(param_1 + 0x68) + (longlong)SUB164(auVar2 / auVar1,0) * 8);
    }
  }
  return 0;
}



undefined2 * FUN_140183d50(longlong param_1,longlong param_2)

{
  longlong *plVar1;
  undefined1 auVar2 [16];
  undefined1 auVar3 [16];
  ulonglong uVar4;
  undefined2 *puVar5;
  ulonglong uVar6;
  longlong lVar7;
  undefined1 local_58 [80];
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (*(int *)(param_1 + 0x40) != 2) {
    FUN_1401580e0(L"CFastHeapImpl.Alloc() is called after the allocator is already disposed!");
    return (undefined2 *)0x0;
  }
  uVar6 = *(ulonglong *)(param_1 + 0x60) >> 7;
  lVar7 = ((param_2 - 1U) / uVar6 + 1) * uVar6;
  if (lVar7 != 0) {
    auVar2._8_8_ = 0;
    auVar2._0_8_ = uVar6;
    auVar3._8_8_ = 0;
    auVar3._0_8_ = lVar7 - 1U;
    uVar4 = SUB168(auVar3 / auVar2,0);
    if (0xffffffff < uVar4) {
                    // WARNING: Subroutine does not return
      FUN_140156710(L"Proud::CFastHeapImpl::GetAllocByGroundSize",(lVar7 - 1U) % uVar6);
    }
    if ((uVar4 < 0x80) &&
       (plVar1 = *(longlong **)
                  (*(longlong *)(param_1 + 0x68) + (longlong)SUB164(auVar3 / auVar2,0) * 8),
       plVar1 != (longlong *)0x0)) {
      puVar5 = (undefined2 *)(**(code **)(*plVar1 + 8))(plVar1,lVar7 + 0x10);
      goto LAB_140183de2;
    }
  }
  puVar5 = (undefined2 *)
           (**(code **)**(undefined8 **)(param_1 + 0x48))
                     (*(undefined8 **)(param_1 + 0x48),lVar7 + 0x10);
  if (puVar5 == (undefined2 *)0x0) {
    FUN_140156300(local_58,L"CRT malloc returned NULL at %s!",L"Proud::CFastHeapImpl::Alloc");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
LAB_140183de2:
  *(longlong *)(puVar5 + 4) = lVar7;
  *puVar5 = 0x71a;
  return puVar5 + 8;
}



short * FUN_140183e40(longlong *param_1,longlong param_2,ulonglong param_3)

{
  undefined1 auVar1 [16];
  undefined1 auVar2 [16];
  ulonglong uVar3;
  ulonglong uVar4;
  longlong *plVar5;
  short *psVar6;
  short *psVar7;
  longlong lVar8;
  ulonglong uVar9;
  longlong *plVar10;
  ulonglong uVar11;
  undefined1 local_68 [80];
  
  if ((int)param_1[8] != 2) {
    FUN_1401580e0(L"CFastHeapImpl::Realloc() is called after the allocator is already disposed!");
    return (short *)0x0;
  }
  if (param_3 == 0) {
    (**(code **)(*param_1 + 0x18))();
    return (short *)0x0;
  }
  if ((param_2 == 0) || (psVar6 = (short *)(param_2 + -0x10), *psVar6 != 0x71a)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  uVar9 = (ulonglong)param_1[0xc] >> 7;
  uVar11 = ((param_3 - 1) / uVar9 + 1) * uVar9;
  if (*(longlong *)(param_2 + -8) == 0) {
LAB_140183f08:
    plVar10 = (longlong *)0x0;
  }
  else {
    uVar3 = *(longlong *)(param_2 + -8) - 1;
    auVar1._8_8_ = 0;
    auVar1._0_8_ = uVar9;
    auVar2._8_8_ = 0;
    auVar2._0_8_ = uVar3;
    uVar4 = SUB168(auVar2 / auVar1,0);
    if (0xffffffff < uVar4) {
                    // WARNING: Subroutine does not return
      FUN_140156710(L"Proud::CFastHeapImpl::GetAllocByGroundSize",uVar3 % uVar9);
    }
    if (0x7f < uVar4) goto LAB_140183f08;
    plVar10 = *(longlong **)(param_1[0xd] + (longlong)SUB164(auVar2 / auVar1,0) * 8);
  }
  plVar5 = (longlong *)FUN_140183cf0(param_1,uVar11);
  if (plVar10 == (longlong *)0x0) {
    if (plVar5 == (longlong *)0x0) {
      psVar6 = (short *)(**(code **)(*(longlong *)param_1[9] + 8))
                                  ((longlong *)param_1[9],psVar6,param_3 + 0x10);
      *(ulonglong *)(psVar6 + 4) = uVar11;
      goto LAB_14018401d;
    }
    psVar7 = (short *)(**(code **)(*plVar5 + 8))(plVar5,uVar11 + 0x10);
    uVar9 = uVar11;
    if (*(ulonglong *)(param_2 + -8) < uVar11) {
      uVar9 = *(ulonglong *)(param_2 + -8);
    }
    FUN_140050120(psVar7,psVar6,uVar9 + 0x10);
    *(ulonglong *)(psVar7 + 4) = uVar11;
    plVar10 = (longlong *)param_1[9];
    lVar8 = *plVar10;
  }
  else {
    if (plVar5 == (longlong *)0x0) {
      psVar7 = (short *)(*(code *)**(undefined8 **)param_1[9])
                                  ((undefined8 *)param_1[9],param_3 + 0x10);
      if (psVar7 == (short *)0x0) {
        FUN_140156300(local_68,L"CRT malloc returned NULL at %s!",L"Proud::CFastHeapImpl::Realloc");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_68,(ThrowInfo *)&DAT_14031d928);
      }
      if (*(ulonglong *)(param_2 + -8) < param_3) {
        param_3 = *(ulonglong *)(param_2 + -8);
      }
    }
    else {
      if (plVar10 == plVar5) goto LAB_14018401d;
      psVar7 = (short *)(**(code **)(*plVar5 + 8))(plVar5,uVar11 + 0x10);
      param_3 = uVar11;
      if (*(ulonglong *)(param_2 + -8) < uVar11) {
        param_3 = *(ulonglong *)(param_2 + -8);
      }
    }
    FUN_140050120(psVar7,psVar6,param_3 + 0x10);
    *(ulonglong *)(psVar7 + 4) = uVar11;
    lVar8 = *plVar10;
  }
  (**(code **)(lVar8 + 0x10))(plVar10,psVar6);
  psVar6 = psVar7;
LAB_14018401d:
  return psVar6 + 8;
}



void FUN_140184050(longlong param_1,longlong param_2)

{
  short *psVar1;
  undefined1 auVar2 [16];
  undefined1 auVar3 [16];
  ulonglong uVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  longlong *plVar7;
  undefined1 local_58 [88];
  
  if (*(int *)(param_1 + 0x40) != 2) {
    FUN_1401580e0(
                 L"CFastHeap.Free(): Attempt Free after Heap destruction! Doing Free before WinMain returns in highly recommended. Refer the manual for the resolution."
                 );
    return;
  }
  if ((param_2 == 0) || (psVar1 = (short *)(param_2 + -0x10), *psVar1 != 0x71a)) {
    FUN_140156300(local_58,
                  L"Not CFastHeap-allocated block! Refer to ProudNet help \'ProudNet Technical Note\' for more help."
                 );
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  *psVar1 = 0xb0c;
  if (*(longlong *)(param_2 + -8) != 0) {
    uVar6 = *(ulonglong *)(param_1 + 0x60) >> 7;
    uVar4 = *(longlong *)(param_2 + -8) - 1;
    auVar2._8_8_ = 0;
    auVar2._0_8_ = uVar6;
    auVar3._8_8_ = 0;
    auVar3._0_8_ = uVar4;
    uVar5 = SUB168(auVar3 / auVar2,0);
    if (0xffffffff < uVar5) {
                    // WARNING: Subroutine does not return
      FUN_140156710(L"Proud::CFastHeapImpl::GetAllocByGroundSize",uVar4 % uVar6);
    }
    if ((uVar5 < 0x80) &&
       (plVar7 = *(longlong **)
                  (*(longlong *)(param_1 + 0x68) + (longlong)SUB164(auVar3 / auVar2,0) * 8),
       plVar7 != (longlong *)0x0)) goto LAB_1401840d8;
  }
  plVar7 = *(longlong **)(param_1 + 0x48);
LAB_1401840d8:
                    // WARNING: Could not recover jumptable at 0x0001401840e2. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*plVar7 + 0x10))(plVar7,psVar1);
  return;
}



undefined8 * FUN_140184110(undefined1 param_1)

{
  undefined4 uVar1;
  undefined8 *puVar2;
  HANDLE pvVar3;
  undefined8 uVar4;
  longlong lVar5;
  undefined4 local_res8 [2];
  undefined *local_res10;
  
  puVar2 = operator_new(0x18);
  if (puVar2 == (undefined8 *)0x0) {
    puVar2 = (undefined8 *)0x0;
  }
  else {
    *puVar2 = Proud::CMemoryHeapImpl::vftable;
  }
  pvVar3 = HeapCreate(4,0,0);
  puVar2[1] = pvVar3;
  if (pvVar3 == (HANDLE)0x0) {
    FUN_1401568c0();
    local_res10 = PTR_DAT_1403200a0;
    uVar1 = FUN_140156740(L"FATAL: HeapCreate failed!");
    uVar4 = FUN_14004f760(&local_res10,uVar1);
    FUN_140156770(uVar4,L"FATAL: HeapCreate failed!",uVar1);
    FUN_14004f380(&local_res10);
    FUN_1401a7000(&local_res10);
  }
  local_res8[0] = 2;
  lVar5 = FUN_140158090();
  if (*(longlong *)(lVar5 + 8) != 0) {
    lVar5 = FUN_140158090();
    (**(code **)(lVar5 + 8))(puVar2[1],0,local_res8,4);
  }
  *(undefined1 *)(puVar2 + 2) = param_1;
  return puVar2;
}



undefined8 * FUN_1401841f0(void)

{
  bool bVar1;
  char cVar2;
  
  bVar1 = false;
  cVar2 = FUN_140156bf0(&DAT_1403293f0);
  if (cVar2 != '\0') {
    if (DAT_140320f00 == '\0') {
      bVar1 = false;
    }
    else {
      bVar1 = true;
      FUN_140156b50(&DAT_1403293f0);
    }
  }
  if ((DAT_1403293e8 & 1) == 0) {
    DAT_1403293e8 = DAT_1403293e8 | 1;
    DAT_1403293e0 = FUN_140184110(1);
    atexit(FUN_140257fd0);
  }
  DAT_140320f00 = 0;
  if (bVar1) {
    FUN_140156be0(&DAT_1403293f0);
  }
  return &DAT_1403293e0;
}



undefined8 FUN_1401842a0(void)

{
  undefined8 *puVar1;
  
  puVar1 = (undefined8 *)FUN_1401841f0();
  return *puVar1;
}



undefined8 * FUN_1401842c0(undefined8 *param_1,ulonglong param_2,undefined8 param_3)

{
  undefined8 *puVar1;
  void *pvVar2;
  undefined8 uVar3;
  longlong lVar4;
  undefined1 local_a0 [72];
  undefined1 local_58 [80];
  
  FUN_140156920();
  *param_1 = Proud::CFastHeapImpl::vftable;
  FUN_14019c9e0(param_1 + 9);
  FUN_1401841f0();
  if (param_2 < 0x80) {
    FUN_140156300(local_a0,L"bad AccelBlockSizeLimit value");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_a0,(ThrowInfo *)&DAT_14031d928);
  }
  if (param_1[9] == 0) {
    puVar1 = (undefined8 *)FUN_1401841f0();
    param_1[9] = *puVar1;
  }
  param_1[0xc] = param_2;
  pvVar2 = malloc(0x400);
  param_1[0xd] = pvVar2;
  if (pvVar2 == (void *)0x0) {
    FUN_140156300(local_58,L"Cannot allocate FastHeap buckets! FATAL!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  lVar4 = 0;
  do {
    uVar3 = FUN_14019c950(param_3);
    *(undefined8 *)(lVar4 + param_1[0xd]) = uVar3;
    lVar4 = lVar4 + 8;
  } while (lVar4 < 0x400);
  *(undefined4 *)(param_1 + 8) = 2;
  return param_1;
}



int FUN_1401843d0(longlong param_1)

{
  longlong lVar1;
  int *piVar2;
  longlong lVar3;
  uint uVar4;
  longlong lVar6;
  uint uVar7;
  ulonglong uVar9;
  uint uVar10;
  undefined1 local_58 [80];
  ulonglong uVar5;
  ulonglong uVar8;
  
  lVar1 = *(longlong *)(param_1 + 0xc80);
  uVar5 = 0;
  uVar10 = 0;
  if (lVar1 == 0) {
    FUN_140156300(local_58,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  lVar6 = (longlong)*(int *)(param_1 + 0xc88);
  uVar9 = uVar5;
  uVar7 = uVar10;
  uVar4 = uVar10;
  if (1 < lVar6) {
    piVar2 = (int *)(lVar1 + 0x18);
    lVar3 = (lVar6 - 2U >> 1) + 1;
    uVar9 = lVar3 * 2;
    uVar8 = uVar5;
    do {
      uVar4 = (int)uVar5 + piVar2[-4];
      uVar5 = (ulonglong)uVar4;
      uVar7 = (int)uVar8 + *piVar2;
      uVar8 = (ulonglong)uVar7;
      piVar2 = piVar2 + 8;
      lVar3 = lVar3 + -1;
    } while (lVar3 != 0);
  }
  if ((longlong)uVar9 < lVar6) {
    uVar10 = *(uint *)(lVar1 + 8 + uVar9 * 0x10);
  }
  return uVar7 + uVar4 + uVar10;
}



void FUN_140184470(longlong *param_1,longlong *param_2)

{
  int iVar1;
  undefined1 local_98 [72];
  undefined1 local_50 [80];
  
  iVar1 = (int)param_1[1];
  if (*(int *)((longlong)param_2 + 0xc) < iVar1) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (*param_1 == 0) {
    FUN_140156300(local_50,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
  }
  if (*param_2 == 0) {
    FUN_140156300(local_98,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_98,(ThrowInfo *)&DAT_14031d928);
  }
  if ((-1 < iVar1) && (iVar1 <= *(int *)((longlong)param_2 + 0xc))) {
    *(int *)(param_2 + 1) = iVar1;
    if (*param_1 == 0) {
      FUN_140156300(local_98,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_98,(ThrowInfo *)&DAT_14031d928);
    }
    FUN_140050120(*param_2,*param_1,(longlong)(int)param_1[1] << 4);
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_140184540(longlong param_1,longlong param_2)

{
  undefined1 uVar1;
  int iVar2;
  uint uVar3;
  longlong lVar4;
  undefined8 uVar5;
  undefined4 uVar6;
  undefined8 *_Dst;
  undefined8 *_Src;
  undefined8 *puVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  ulonglong uVar14;
  undefined1 local_78 [80];
  
  uVar6 = FUN_1401843d0();
  FUN_140050060(param_2,uVar6);
  uVar8 = 0;
  if (*(longlong *)(param_1 + 0xc80) == 0) {
    FUN_140156300(local_78,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
  }
  uVar14 = uVar8;
  if (*(int *)(param_2 + 0x18) != 0) {
    uVar14 = *(ulonglong *)(param_2 + 0x10);
  }
  iVar2 = *(int *)(param_1 + 0xc88);
  uVar9 = uVar8;
  uVar10 = uVar8;
  uVar11 = uVar8;
  if (0 < (longlong)iVar2) {
    do {
      lVar4 = *(longlong *)(param_1 + 0xc80);
      if (lVar4 == 0) {
        FUN_140156300(local_78,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
      }
      if (((longlong)uVar8 < 0) || (*(int *)(param_1 + 0xc88) <= (int)uVar10)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      uVar3 = *(uint *)(lVar4 + 8 + uVar9);
      uVar13 = (ulonglong)(int)uVar3;
      _Src = *(undefined8 **)(lVar4 + uVar9);
      _Dst = (undefined8 *)((longlong)(int)uVar11 + uVar14);
      if (uVar13 < 0x21) {
        uVar12 = (ulonglong)(uVar3 & 7);
        for (uVar13 = uVar13 >> 3; uVar13 != 0; uVar13 = uVar13 - 1) {
          uVar5 = *_Src;
          _Src = _Src + 1;
          *_Dst = uVar5;
          _Dst = _Dst + 1;
        }
        if (uVar12 != 0) {
          puVar7 = _Src;
          do {
            uVar1 = *(undefined1 *)puVar7;
            puVar7 = (undefined8 *)((longlong)puVar7 + 1);
            uVar12 = uVar12 - 1;
            *(undefined1 *)((longlong)_Dst + (-1 - (longlong)_Src) + (longlong)puVar7) = uVar1;
          } while (uVar12 != 0);
        }
      }
      else {
        memcpy(_Dst,_Src,uVar13);
      }
      uVar8 = uVar8 + 1;
      uVar9 = uVar9 + 0x10;
      uVar10 = (ulonglong)((int)uVar10 + 1);
      uVar11 = (ulonglong)((int)uVar11 + uVar3);
    } while ((longlong)uVar8 < (longlong)iVar2);
  }
  return;
}



void FUN_1401846e0(longlong param_1,longlong param_2)

{
  undefined1 uVar1;
  int iVar2;
  uint uVar3;
  longlong lVar4;
  undefined8 uVar5;
  undefined8 *puVar6;
  undefined4 uVar7;
  longlong lVar8;
  undefined8 *_Src;
  undefined8 *puVar9;
  longlong lVar10;
  longlong lVar11;
  int iVar12;
  ulonglong uVar13;
  int iVar14;
  ulonglong uVar15;
  undefined1 local_78 [80];
  
  FUN_140153e10(param_2);
  FUN_140153d90(param_2);
  uVar7 = FUN_1401843d0(param_1);
  FUN_140154600(param_2,uVar7);
  if (*(longlong *)(param_1 + 0xc80) == 0) {
    FUN_140156300(local_78,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
  }
  iVar2 = *(int *)(param_1 + 0xc88);
  iVar14 = 0;
  iVar12 = 0;
  lVar10 = 0;
  if (0 < (longlong)iVar2) {
    lVar11 = 0;
    do {
      lVar4 = *(longlong *)(param_1 + 0xc80);
      if (lVar4 == 0) {
        FUN_140156300(local_78,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
      }
      if ((lVar10 < 0) || (*(int *)(param_1 + 0xc88) <= iVar12)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      lVar8 = *(longlong *)(param_2 + 0x10);
      uVar3 = *(uint *)(lVar11 + 8 + lVar4);
      uVar15 = (ulonglong)(int)uVar3;
      _Src = *(undefined8 **)(lVar11 + lVar4);
      if (lVar8 == 0) {
        lVar4 = *(longlong *)(param_2 + 8);
        if (lVar4 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        if (*(int *)(lVar4 + 0x18) == 0) {
          lVar8 = 0;
        }
        else {
          lVar8 = *(longlong *)(lVar4 + 0x10);
        }
      }
      if (uVar15 < 0x21) {
        uVar13 = (ulonglong)(uVar3 & 7);
        puVar6 = (undefined8 *)(iVar14 + lVar8);
        for (uVar15 = uVar15 >> 3; uVar15 != 0; uVar15 = uVar15 - 1) {
          uVar5 = *_Src;
          _Src = _Src + 1;
          *puVar6 = uVar5;
          puVar6 = puVar6 + 1;
        }
        if (uVar13 != 0) {
          puVar9 = _Src;
          do {
            uVar1 = *(undefined1 *)puVar9;
            puVar9 = (undefined8 *)((longlong)puVar9 + 1);
            uVar13 = uVar13 - 1;
            *(undefined1 *)((longlong)puVar6 + (-1 - (longlong)_Src) + (longlong)puVar9) = uVar1;
          } while (uVar13 != 0);
        }
      }
      else {
        memcpy((undefined8 *)(iVar14 + lVar8),_Src,uVar15);
      }
      lVar10 = lVar10 + 1;
      iVar14 = iVar14 + uVar3;
      iVar12 = iVar12 + 1;
      lVar11 = lVar11 + 0x10;
    } while (lVar10 < iVar2);
  }
  return;
}



void thunk_FUN_140184540(longlong param_1,longlong param_2)

{
  undefined1 uVar1;
  int iVar2;
  uint uVar3;
  longlong lVar4;
  undefined8 uVar5;
  undefined4 uVar6;
  undefined8 *_Dst;
  undefined8 *_Src;
  undefined8 *puVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  ulonglong uVar14;
  undefined1 auStack_78 [80];
  
  uVar6 = FUN_1401843d0();
  FUN_140050060(param_2,uVar6);
  uVar8 = 0;
  if (*(longlong *)(param_1 + 0xc80) == 0) {
    FUN_140156300(auStack_78,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(auStack_78,(ThrowInfo *)&DAT_14031d928);
  }
  uVar14 = uVar8;
  if (*(int *)(param_2 + 0x18) != 0) {
    uVar14 = *(ulonglong *)(param_2 + 0x10);
  }
  iVar2 = *(int *)(param_1 + 0xc88);
  uVar9 = uVar8;
  uVar10 = uVar8;
  uVar11 = uVar8;
  if (0 < (longlong)iVar2) {
    do {
      lVar4 = *(longlong *)(param_1 + 0xc80);
      if (lVar4 == 0) {
        FUN_140156300(auStack_78,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(auStack_78,(ThrowInfo *)&DAT_14031d928);
      }
      if (((longlong)uVar8 < 0) || (*(int *)(param_1 + 0xc88) <= (int)uVar10)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      uVar3 = *(uint *)(lVar4 + 8 + uVar9);
      uVar13 = (ulonglong)(int)uVar3;
      _Src = *(undefined8 **)(lVar4 + uVar9);
      _Dst = (undefined8 *)((longlong)(int)uVar11 + uVar14);
      if (uVar13 < 0x21) {
        uVar12 = (ulonglong)(uVar3 & 7);
        for (uVar13 = uVar13 >> 3; uVar13 != 0; uVar13 = uVar13 - 1) {
          uVar5 = *_Src;
          _Src = _Src + 1;
          *_Dst = uVar5;
          _Dst = _Dst + 1;
        }
        if (uVar12 != 0) {
          puVar7 = _Src;
          do {
            uVar1 = *(undefined1 *)puVar7;
            puVar7 = (undefined8 *)((longlong)puVar7 + 1);
            uVar12 = uVar12 - 1;
            *(undefined1 *)((longlong)_Dst + (-1 - (longlong)_Src) + (longlong)puVar7) = uVar1;
          } while (uVar12 != 0);
        }
      }
      else {
        memcpy(_Dst,_Src,uVar13);
      }
      uVar8 = uVar8 + 1;
      uVar9 = uVar9 + 0x10;
      uVar10 = (ulonglong)((int)uVar10 + 1);
      uVar11 = (ulonglong)((int)uVar11 + uVar3);
    } while ((longlong)uVar8 < (longlong)iVar2);
  }
  return;
}



void FUN_1401848c0(longlong param_1,longlong *param_2)

{
  undefined1 uVar1;
  uint uVar2;
  longlong lVar3;
  undefined8 uVar4;
  int iVar5;
  undefined8 *_Dst;
  undefined8 *_Src;
  undefined8 *puVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  undefined1 local_78 [80];
  
  iVar5 = FUN_1401843d0();
  if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2[1] == 0) {
    lVar3 = *param_2;
    if (iVar5 < 1) {
      if (lVar3 == 0) goto LAB_140184919;
      iVar5 = 0;
    }
    else if (lVar3 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    FUN_140050060(lVar3,iVar5);
  }
  else {
    if (*(int *)((longlong)param_2 + 0x14) < iVar5) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(int *)(param_2 + 2) = iVar5;
  }
LAB_140184919:
  uVar7 = 0;
  if (*(longlong *)(param_1 + 0xc80) == 0) {
    FUN_140156300(local_78,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
  }
  uVar13 = param_2[1];
  if (param_2[1] == 0) {
    lVar3 = *param_2;
    if (lVar3 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    uVar13 = uVar7;
    if (*(int *)(lVar3 + 0x18) != 0) {
      uVar13 = *(ulonglong *)(lVar3 + 0x10);
    }
  }
  iVar5 = *(int *)(param_1 + 0xc88);
  uVar8 = uVar7;
  uVar9 = uVar7;
  uVar10 = uVar7;
  if (0 < (longlong)iVar5) {
    do {
      lVar3 = *(longlong *)(param_1 + 0xc80);
      if (lVar3 == 0) {
        FUN_140156300(local_78,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
      }
      if (((longlong)uVar7 < 0) || (*(int *)(param_1 + 0xc88) <= (int)uVar9)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      uVar2 = *(uint *)(lVar3 + 8 + uVar8);
      uVar12 = (ulonglong)(int)uVar2;
      _Src = *(undefined8 **)(lVar3 + uVar8);
      _Dst = (undefined8 *)((longlong)(int)uVar10 + uVar13);
      if (uVar12 < 0x21) {
        uVar11 = (ulonglong)(uVar2 & 7);
        for (uVar12 = uVar12 >> 3; uVar12 != 0; uVar12 = uVar12 - 1) {
          uVar4 = *_Src;
          _Src = _Src + 1;
          *_Dst = uVar4;
          _Dst = _Dst + 1;
        }
        if (uVar11 != 0) {
          puVar6 = _Src;
          do {
            uVar1 = *(undefined1 *)puVar6;
            puVar6 = (undefined8 *)((longlong)puVar6 + 1);
            uVar11 = uVar11 - 1;
            *(undefined1 *)((longlong)_Dst + (-1 - (longlong)_Src) + (longlong)puVar6) = uVar1;
          } while (uVar11 != 0);
        }
      }
      else {
        memcpy(_Dst,_Src,uVar12);
      }
      uVar7 = uVar7 + 1;
      uVar8 = uVar8 + 0x10;
      uVar9 = (ulonglong)((int)uVar9 + 1);
      uVar10 = (ulonglong)((int)uVar10 + uVar2);
    } while ((longlong)uVar7 < (longlong)iVar5);
  }
  return;
}



void thunk_FUN_1401848c0(void)

{
  FUN_1401848c0();
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_140184ac0(void)

{
  ulonglong uVar1;
  undefined1 auStack_1d8 [32];
  undefined1 local_1b8 [416];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_1d8;
  uVar1 = Ordinal_115(2,local_1b8);
  if ((int)uVar1 == 0) {
    if (((char)local_1b8._0_2_ == '\x02') && (SUB21(local_1b8._0_2_,1) == '\0')) {
      return 1;
    }
    uVar1 = Ordinal_116();
  }
  return uVar1 & 0xffffffffffffff00;
}



void FUN_140184b40(longlong param_1,undefined8 *param_2,undefined1 param_3)

{
  *(undefined1 *)(param_1 + 0x40) = param_3;
  if (param_2 != (undefined8 *)0x0) {
    *(undefined8 *)(param_1 + 0x18) = *param_2;
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_140184b60(longlong param_1,undefined8 *param_2)

{
  undefined2 uVar1;
  int iVar2;
  undefined1 auStack_48 [32];
  undefined4 local_28 [2];
  undefined1 local_20 [2];
  undefined2 local_1e;
  undefined4 local_1c;
  ulonglong local_10;
  
  local_10 = DAT_1403223c0 ^ (ulonglong)auStack_48;
  local_28[0] = 0x10;
  iVar2 = Ordinal_6(*(undefined8 *)(param_1 + 0x3d0),local_20,local_28);
  if (iVar2 == 0) {
    uVar1 = Ordinal_15(local_1e);
    *(undefined4 *)(param_2 + 1) = local_1c;
    *param_2 = Proud::AddrPort::vftable;
    *(undefined2 *)((longlong)param_2 + 0xc) = uVar1;
  }
  else {
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = DAT_140320450;
    *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  }
  return param_2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_140184c00(longlong param_1,undefined8 *param_2)

{
  undefined2 uVar1;
  int iVar2;
  undefined1 auStack_48 [32];
  undefined4 local_28 [2];
  undefined1 local_20 [2];
  undefined2 local_1e;
  undefined4 local_1c;
  ulonglong local_10;
  
  local_10 = DAT_1403223c0 ^ (ulonglong)auStack_48;
  local_28[0] = 0x10;
  iVar2 = Ordinal_5(*(undefined8 *)(param_1 + 0x3d0),local_20,local_28);
  if (iVar2 == 0) {
    uVar1 = Ordinal_15(local_1e);
    *(undefined4 *)(param_2 + 1) = local_1c;
    *param_2 = Proud::AddrPort::vftable;
    *(undefined2 *)((longlong)param_2 + 0xc) = uVar1;
  }
  else {
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = DAT_140320450;
    *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  }
  return param_2;
}



undefined1 FUN_140184ca0(longlong param_1)

{
  return *(undefined1 *)(param_1 + 0x21);
}



void FUN_140184cb0(longlong param_1,undefined1 param_2)

{
  *(undefined1 *)(param_1 + 0x21) = param_2;
  return;
}



void FUN_140184cc0(longlong param_1,undefined8 param_2)

{
  undefined1 local_58 [88];
  
  if (*(longlong *)(param_1 + 0x2e8) != 0) {
    FUN_140156300(local_58,&DAT_1402640d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  *(undefined8 *)(param_1 + 0x2e8) = param_2;
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140184d00(longlong param_1)

{
  undefined1 auStack_78 [32];
  undefined8 *local_58;
  undefined4 local_50;
  undefined1 *local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined1 local_28 [8];
  undefined4 local_20;
  undefined2 local_1c;
  undefined4 local_1a;
  undefined4 local_16;
  undefined2 local_12;
  ulonglong local_10;
  
  local_10 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  local_1c = 0xcbac;
  local_38 = 0;
  local_40 = 0;
  local_48 = local_28;
  local_50 = 8;
  local_20 = 0xb5367df1;
  local_1a = 0xca9511cf;
  local_58 = &DAT_140329440;
  local_16 = 0x485f8000;
  local_12 = 0x92a1;
  WSAIoctl(*(undefined8 *)(param_1 + 0x3d0),0xc8000006,&local_20,0x10);
  return;
}



void FUN_140184da0(longlong param_1,char param_2)

{
  uint local_res10 [6];
  
  local_res10[0] = (uint)(param_2 == '\0');
  Ordinal_10(*(undefined8 *)(param_1 + 0x3d0),0x8004667e,local_res10);
  return;
}



void FUN_140184dd0(longlong param_1,char param_2)

{
  int iVar1;
  uint local_res10 [6];
  
  local_res10[0] = (uint)(param_2 == '\0');
  iVar1 = Ordinal_21(*(undefined8 *)(param_1 + 0x3d0),6,1,local_res10,4);
  if (iVar1 == -1) {
    Ordinal_111();
  }
  return;
}



undefined4 * FUN_140184e20(undefined4 *param_1)

{
  *param_1 = 0;
  param_1[0x82] = 0;
  param_1[0x104] = 0;
  return param_1;
}



void FUN_140184e40(longlong param_1,longlong param_2)

{
  uint uVar1;
  longlong *plVar2;
  uint uVar3;
  ulonglong uVar4;
  
  uVar1 = *(uint *)(param_1 + 0x208);
  uVar4 = 0;
  if (uVar1 != 0) {
    plVar2 = (longlong *)(param_1 + 0x210);
    do {
      if (*plVar2 == *(longlong *)(param_2 + 0x3d0)) break;
      uVar3 = (int)uVar4 + 1;
      uVar4 = (ulonglong)uVar3;
      plVar2 = plVar2 + 1;
    } while (uVar3 < uVar1);
  }
  if (((uint)uVar4 == uVar1) && (uVar1 < 0x40)) {
    *(undefined8 *)(param_1 + 0x210 + uVar4 * 8) = *(undefined8 *)(param_2 + 0x3d0);
    *(int *)(param_1 + 0x208) = *(int *)(param_1 + 0x208) + 1;
  }
  return;
}



void FUN_140184ea0(longlong param_1,longlong param_2)

{
  uint uVar1;
  longlong *plVar2;
  uint uVar3;
  ulonglong uVar4;
  
  uVar1 = *(uint *)(param_1 + 0x410);
  uVar4 = 0;
  if (uVar1 != 0) {
    plVar2 = (longlong *)(param_1 + 0x418);
    do {
      if (*plVar2 == *(longlong *)(param_2 + 0x3d0)) break;
      uVar3 = (int)uVar4 + 1;
      uVar4 = (ulonglong)uVar3;
      plVar2 = plVar2 + 1;
    } while (uVar3 < uVar1);
  }
  if (((uint)uVar4 == uVar1) && (uVar1 < 0x40)) {
    *(undefined8 *)(param_1 + 0x418 + uVar4 * 8) = *(undefined8 *)(param_2 + 0x3d0);
    *(int *)(param_1 + 0x410) = *(int *)(param_1 + 0x410) + 1;
  }
  return;
}



void FUN_140184f00(longlong param_1,uint param_2)

{
  uint *puVar1;
  uint local_res8;
  int local_resc;
  
  puVar1 = (uint *)0x0;
  if (param_2 != 0xffffffff) {
    puVar1 = &local_res8;
    local_res8 = param_2 / 1000;
    local_resc = (param_2 % 1000) * 1000;
  }
  Ordinal_18(0,param_1,param_1 + 0x208,param_1 + 0x410,puVar1);
  return;
}



undefined8 FUN_140184f60(longlong param_1,longlong param_2,undefined4 *param_3)

{
  int iVar1;
  undefined4 local_res8 [2];
  undefined4 local_res10 [2];
  
  iVar1 = Ordinal_151(*(undefined8 *)(param_2 + 0x3d0),param_1 + 0x208);
  if (iVar1 != 0) {
    *param_3 = 0;
    return 1;
  }
  iVar1 = Ordinal_151(*(undefined8 *)(param_2 + 0x3d0),param_1 + 0x410);
  if (iVar1 != 0) {
    local_res8[0] = 0;
    local_res10[0] = 4;
    Ordinal_7(*(undefined8 *)(param_2 + 0x3d0),0xffff,0x1007,local_res8,local_res10);
    *param_3 = local_res8[0];
    return 1;
  }
  return 0;
}



undefined8 FUN_140185030(undefined8 param_1)

{
  FUN_140184ac0();
  return param_1;
}



undefined8 * FUN_140185060(undefined8 *param_1)

{
  *param_1 = Proud::IHasOverlappedIo::vftable;
  *(undefined1 *)(param_1 + 8) = 0;
  *(undefined1 *)(param_1 + 0x10) = 0;
  return param_1;
}



void FUN_140185080(undefined8 *param_1)

{
  *param_1 = Proud::IHasOverlappedIo::vftable;
  return;
}



undefined8 * FUN_140185090(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::IHasOverlappedIo::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401850c0(longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined1 local_58 [88];
  
  if ((longlong *)param_2[2] != param_1) {
    FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                  L"Proud::CListNode<class Proud::CFastSocket>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  plVar1 = (longlong *)param_2[1];
  lVar2 = *param_2;
  if (plVar1 != (longlong *)0x0) {
    *plVar1 = lVar2;
  }
  if (lVar2 != 0) {
    *(longlong **)(lVar2 + 8) = plVar1;
  }
  if (plVar1 == (longlong *)0x0) {
    if ((longlong *)param_1[1] != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CFastSocket>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    param_1[1] = lVar2;
  }
  if (lVar2 == 0) {
    if ((longlong *)*param_1 != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CFastSocket>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    *param_1 = (longlong)plVar1;
  }
  *param_2 = 0;
  param_2[1] = 0;
  param_2[2] = 0;
  *(int *)(param_1 + 2) = (int)param_1[2] + -1;
  return;
}



void FUN_1401851a0(longlong param_1,char param_2)

{
  undefined4 uVar1;
  longlong lVar2;
  longlong lVar3;
  undefined8 uVar4;
  undefined1 local_50 [72];
  
  uVar4 = 0xfffffffffffffffe;
  lVar3 = param_1 + 0x28;
  FUN_140156b50();
  if (*(char *)(param_1 + 0x80) == '\0') {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 == '\0') {
    lVar2 = WSASocketW(2,2,0,0,0,1,uVar4,lVar3,1);
  }
  else {
    lVar2 = Ordinal_23(2);
  }
  *(longlong *)(param_1 + 0x3d0) = lVar2;
  if (lVar2 == -1) {
    uVar1 = Ordinal_111();
    FUN_140156300(local_50,&DAT_1402641d8,uVar1);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
  }
  *(undefined1 *)(param_1 + 0x80) = 0;
  *(int *)(param_1 + 0x310) = *(int *)(param_1 + 0x310) + 1;
  FUN_140156be0(lVar3);
  return;
}



undefined8 FUN_140185280(longlong param_1,undefined1 param_2,undefined4 *param_3)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  undefined4 local_res8 [2];
  undefined4 local_res20 [2];
  
  if ((*(int *)(param_1 + 0x180) != 0x103) && (*(char *)(param_1 + 0x1c0) != '\0')) {
    iVar1 = WSAGetOverlappedResult
                      (*(undefined8 *)(param_1 + 0x3d0),(int *)(param_1 + 0x180),local_res20,param_2
                       ,local_res8);
    if (iVar1 == 0) {
      iVar2 = Ordinal_111();
      if (iVar2 == 0x3e4) {
        return 0;
      }
    }
    *param_3 = local_res8[0];
    param_3[6] = local_res20[0];
    if (iVar1 == 0) {
      uVar3 = Ordinal_111();
      param_3[1] = uVar3;
    }
    *(undefined1 *)(param_1 + 0x1c0) = 0;
    FUN_140158890(param_3 + 2,param_1 + 0x2f0);
    return 1;
  }
  return 0;
}



undefined8 FUN_140185350(longlong param_1,undefined1 param_2,undefined4 *param_3)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  undefined4 local_res8 [2];
  undefined4 local_res20 [2];
  
  if ((*(char *)(param_1 + 0x100) != '\0') && (*(int *)(param_1 + 0xc0) != 0x103)) {
    iVar1 = WSAGetOverlappedResult
                      (*(undefined8 *)(param_1 + 0x3d0),(int *)(param_1 + 0xc0),local_res20,param_2,
                       local_res8);
    if (iVar1 == 0) {
      iVar2 = Ordinal_111();
      if (iVar2 == 0x3e4) {
        return 0;
      }
    }
    *param_3 = local_res8[0];
    param_3[6] = local_res20[0];
    if (iVar1 == 0) {
      uVar3 = Ordinal_111();
      param_3[1] = uVar3;
    }
    *(undefined1 *)(param_1 + 0x100) = 0;
    FUN_140158890(param_3 + 2,param_1 + 0x2f0);
    return 1;
  }
  return 0;
}



undefined8 FUN_140185420(longlong param_1,undefined1 param_2,undefined4 *param_3)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  undefined4 local_res8 [2];
  undefined4 local_res20 [2];
  
  if ((*(char *)(param_1 + 0x380) != '\0') && (*(int *)(param_1 + 0x340) != 0x103)) {
    iVar1 = WSAGetOverlappedResult
                      (*(undefined8 *)(param_1 + 0x3d0),(int *)(param_1 + 0x340),local_res20,param_2
                       ,local_res8);
    if (iVar1 == 0) {
      iVar2 = Ordinal_111();
      if (iVar2 == 0x3e4) {
        return 0;
      }
    }
    *param_3 = local_res8[0];
    param_3[6] = local_res20[0];
    if (iVar1 == 0) {
      uVar3 = Ordinal_111();
      param_3[1] = uVar3;
    }
    *(undefined1 *)(param_1 + 0x100) = 0;
    FUN_140158890(param_3 + 2,param_1 + 0x2f0);
    return 1;
  }
  return 0;
}



undefined8 FUN_1401854f0(longlong param_1,undefined1 param_2,uint *param_3)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  uint local_res8 [2];
  uint local_res20 [2];
  
  if ((*(int *)(param_1 + 0x240) == 0x103) || (*(char *)(param_1 + 0x280) == '\0')) {
    return 0;
  }
  iVar1 = WSAGetOverlappedResult
                    (*(undefined8 *)(param_1 + 0x3d0),(int *)(param_1 + 0x240),local_res8,param_2,
                     local_res20);
  if (iVar1 == 0) {
    iVar2 = Ordinal_111();
    if (iVar2 == 0x3e4) {
      return 0;
    }
  }
  else if ((local_res8[0] == 0) && (local_res20[0] == 0)) {
    return 0;
  }
  param_3[6] = local_res8[0];
  *param_3 = local_res20[0];
  if (iVar1 == 0) {
    uVar3 = Ordinal_111();
    param_3[1] = uVar3;
  }
  *(undefined1 *)(param_1 + 0x280) = 0;
  return 1;
}



void FUN_1401855c0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined8 uVar2;
  undefined1 uVar3;
  
  uVar2 = 0xfffffffffffffffe;
  lVar1 = param_1 + 0x28;
  uVar3 = 1;
  FUN_140156b80();
  if (*(char *)(param_1 + 0x80) == '\0') {
    *(undefined1 *)(param_1 + 0x80) = 1;
    FUN_140187a00(*(undefined8 *)(param_1 + 0x3d0));
    Ordinal_3(*(undefined8 *)(param_1 + 0x3d0));
    if (*(longlong *)(param_1 + 0x3c8) != 0) {
      if (*(longlong *)(*(longlong *)(param_1 + 0x3c8) + 0x28) == 0) {
        if (*(char *)(param_1 + 0x1c0) != '\0') {
          *(undefined8 *)(param_1 + 0x180) = 0x80;
          FUN_14018bf40(*(undefined8 *)(param_1 + 0x3c8),param_1,2,param_4,uVar2,lVar1,uVar3);
        }
        if (*(char *)(param_1 + 0x280) != '\0') {
          *(undefined8 *)(param_1 + 0x240) = 0x80;
          FUN_14018bf40(*(undefined8 *)(param_1 + 0x3c8),param_1,1,param_4,uVar2,lVar1,uVar3);
        }
      }
      FUN_14018c110(*(undefined8 *)(param_1 + 0x3c8),param_1);
      *(undefined8 *)(param_1 + 0x3c8) = 0;
    }
  }
  FUN_140156be0(lVar1);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401856b0(longlong param_1,longlong param_2,longlong param_3,longlong param_4)

{
  undefined4 uVar1;
  undefined2 uVar2;
  int iVar3;
  PVOID lpOutputBuffer;
  undefined4 uVar4;
  undefined1 auStackY_b8 [32];
  undefined4 local_78;
  int local_74 [3];
  undefined1 local_68 [2];
  undefined2 local_66;
  undefined4 local_64;
  sockaddr *local_58 [2];
  sockaddr *local_48 [2];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_b8;
  local_74[0] = 0x10;
  local_74[1] = 0x10;
  if (*(int *)(param_2 + 0x158) == 0) {
    lpOutputBuffer = (PVOID)0x0;
  }
  else {
    lpOutputBuffer = *(PVOID *)(param_2 + 0x150);
  }
  GetAcceptExSockaddrs(lpOutputBuffer,0,0x20,0x20,local_58,local_74,local_48,local_74 + 1);
  FUN_140158890(param_3,local_58);
  FUN_140158890(param_4,local_48);
  iVar3 = Ordinal_21(*(undefined8 *)(param_1 + 0x3d0),0xffff,0x700b,param_2 + 0x3d0);
  if (iVar3 == -1) {
    Ordinal_111();
  }
  local_78 = 0x10;
  iVar3 = Ordinal_5(*(undefined8 *)(param_1 + 0x3d0),local_68,&local_78);
  uVar1 = local_64;
  uVar4 = DAT_140320450;
  uVar2 = DAT_140320454;
  if (iVar3 == 0) {
    uVar2 = Ordinal_15(local_66);
    uVar4 = uVar1;
  }
  *(undefined4 *)(param_4 + 8) = uVar4;
  *(undefined2 *)(param_4 + 0xc) = uVar2;
  local_78 = 0x10;
  iVar3 = Ordinal_6(*(undefined8 *)(param_1 + 0x3d0),local_68,&local_78);
  uVar2 = DAT_140320454;
  if (iVar3 == 0) {
    uVar2 = Ordinal_15(local_66);
    *(undefined4 *)(param_3 + 8) = local_64;
    *(undefined2 *)(param_3 + 0xc) = uVar2;
  }
  else {
    *(undefined4 *)(param_3 + 8) = DAT_140320450;
    *(undefined2 *)(param_3 + 0xc) = uVar2;
  }
  return;
}



undefined8 FUN_140185840(longlong param_1)

{
  if (*(int *)(param_1 + 0x218) == 0) {
    return 0;
  }
  return *(undefined8 *)(param_1 + 0x210);
}



undefined1 FUN_140185860(longlong param_1)

{
  longlong lVar1;
  undefined1 uVar2;
  char cVar3;
  
  lVar1 = param_1 + 0x28;
  cVar3 = FUN_140156bf0(lVar1);
  if (cVar3 == '\0') {
    return 1;
  }
  FUN_140156b50(lVar1);
  uVar2 = *(undefined1 *)(param_1 + 0x80);
  FUN_140156be0(lVar1);
  return uVar2;
}



void FUN_1401858b0(longlong param_1)

{
  if (*(longlong *)(param_1 + 0x10) != 0) {
    FUN_1401850c0(*(longlong *)(param_1 + 0x10),param_1);
  }
  return;
}



void FUN_1401858d0(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x0001401858f7. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



void FUN_140185910(longlong param_1)

{
  FUN_140158ad0();
  *(undefined1 *)(param_1 + 0x314) = 0;
  *(undefined4 *)(param_1 + 0x310) = 0;
  *(undefined8 *)(param_1 + 0x3c8) = 0;
  FUN_140156b50(param_1 + 0x28);
  *(undefined1 *)(param_1 + 0x80) = 0;
  FUN_140156be0(param_1 + 0x28);
  *(undefined1 *)(param_1 + 0x3c1) = 0;
  *(undefined8 *)(param_1 + 0x2e8) = 0;
  *(undefined1 *)(param_1 + 0x21) = 1;
  *(undefined8 *)(param_1 + 0x2f0) = 0;
  *(undefined8 *)(param_1 + 0x2f8) = 0;
  *(undefined8 *)(param_1 + 0x300) = 0;
  *(undefined4 *)(param_1 + 0x308) = 0xffffffff;
  *(undefined1 *)(param_1 + 0x30c) = 0;
  *(undefined1 *)(param_1 + 0x3c0) = 0;
  return;
}



void FUN_1401859b0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  FUN_1401855c0();
  *(undefined ***)(param_1 + 0x2c0) = Proud::CFastArray<>::vftable;
  if (*(longlong *)(param_1 + 0x2d0) != 0) {
    if (*(longlong **)(param_1 + 0x2c8) == (longlong *)0x0) {
      FUN_140156970(*(longlong *)(param_1 + 0x2d0));
    }
    else {
      (**(code **)(**(longlong **)(param_1 + 0x2c8) + 0x18))();
    }
  }
  *(undefined ***)(param_1 + 0x200) = Proud::CFastArray<>::vftable;
  if (*(longlong *)(param_1 + 0x210) != 0) {
    plVar1 = *(longlong **)(param_1 + 0x208);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,*(longlong *)(param_1 + 0x210),plVar1,param_4,uVar2);
    }
  }
  *(undefined ***)(param_1 + 0x140) = Proud::CFastArray<>::vftable;
  if (*(longlong *)(param_1 + 0x150) != 0) {
    plVar1 = *(longlong **)(param_1 + 0x148);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,*(longlong *)(param_1 + 0x150));
    }
  }
  FUN_140156c00(param_1 + 0x28);
  if (*(longlong *)(param_1 + 0x10) != 0) {
    FUN_1401850c0(*(longlong *)(param_1 + 0x10),param_1);
  }
  return;
}



undefined8 * FUN_140185aa0(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_140185b00(undefined8 *param_1,int param_2,undefined8 param_3)

{
  undefined4 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined1 local_50 [72];
  
  uVar3 = 0xfffffffffffffffe;
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  uVar1 = FUN_14015a430();
  FUN_140156a70(param_1 + 5,uVar1,1);
  param_1[0x18] = 0;
  param_1[0x19] = 0;
  param_1[0x1a] = 0;
  param_1[0x1b] = 0;
  *(undefined1 *)(param_1 + 0x20) = 0;
  param_1[0x29] = 0;
  param_1[0x2a] = 0;
  param_1[0x2b] = 0;
  *(undefined4 *)(param_1 + 0x2c) = 0;
  param_1[0x28] = Proud::CSocketBuffer::vftable;
  *(undefined4 *)((longlong)param_1 + 0x164) = 1;
  param_1[0x30] = 0;
  param_1[0x31] = 0;
  param_1[0x32] = 0;
  param_1[0x33] = 0;
  *(undefined1 *)(param_1 + 0x38) = 0;
  param_1[0x41] = 0;
  param_1[0x42] = 0;
  param_1[0x43] = 0;
  *(undefined4 *)(param_1 + 0x44) = 0;
  param_1[0x40] = Proud::CSocketBuffer::vftable;
  *(undefined4 *)((longlong)param_1 + 0x224) = 1;
  param_1[0x48] = 0;
  param_1[0x49] = 0;
  param_1[0x4a] = 0;
  param_1[0x4b] = 0;
  *(undefined1 *)(param_1 + 0x50) = 0;
  param_1[0x59] = 0;
  param_1[0x5a] = 0;
  param_1[0x5b] = 0;
  *(undefined4 *)(param_1 + 0x5c) = 0;
  param_1[0x58] = Proud::CSocketBuffer::vftable;
  *(undefined4 *)((longlong)param_1 + 0x2e4) = 1;
  param_1[0x68] = 0;
  param_1[0x69] = 0;
  param_1[0x6a] = 0;
  param_1[0x6b] = 0;
  *(undefined1 *)(param_1 + 0x70) = 0;
  *(undefined1 *)(param_1 + 4) = 0;
  param_1[3] = param_3;
  FUN_140185910(param_1);
  if (param_2 == 0) {
    uVar2 = 1;
  }
  else if (param_2 == 1) {
    uVar2 = 2;
  }
  else {
    if (param_2 != 2) {
      FUN_1401580e0(L"Invalid Parameter in Socket ctor!");
      goto LAB_140185cc4;
    }
    uVar2 = 3;
  }
  uVar3 = WSASocketW(2,uVar2,0,0,0,1,uVar3);
  param_1[0x7a] = uVar3;
LAB_140185cc4:
  if (param_1[0x7a] != -1) {
    return param_1;
  }
  uVar1 = Ordinal_111();
  FUN_140156300(local_50,&DAT_1402641d8,uVar1);
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
}



undefined8 *
FUN_140185d20(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  uVar1 = FUN_14015a430();
  FUN_140156a70(param_1 + 5,uVar1,1,param_4,uVar2);
  param_1[0x18] = 0;
  param_1[0x19] = 0;
  param_1[0x1a] = 0;
  param_1[0x1b] = 0;
  *(undefined1 *)(param_1 + 0x20) = 0;
  param_1[0x29] = 0;
  param_1[0x2a] = 0;
  param_1[0x2b] = 0;
  *(undefined4 *)(param_1 + 0x2c) = 0;
  param_1[0x28] = Proud::CSocketBuffer::vftable;
  *(undefined4 *)((longlong)param_1 + 0x164) = 1;
  param_1[0x30] = 0;
  param_1[0x31] = 0;
  param_1[0x32] = 0;
  param_1[0x33] = 0;
  *(undefined1 *)(param_1 + 0x38) = 0;
  param_1[0x41] = 0;
  param_1[0x42] = 0;
  param_1[0x43] = 0;
  *(undefined4 *)(param_1 + 0x44) = 0;
  param_1[0x40] = Proud::CSocketBuffer::vftable;
  *(undefined4 *)((longlong)param_1 + 0x224) = 1;
  param_1[0x48] = 0;
  param_1[0x49] = 0;
  param_1[0x4a] = 0;
  param_1[0x4b] = 0;
  *(undefined1 *)(param_1 + 0x50) = 0;
  param_1[0x59] = 0;
  param_1[0x5a] = 0;
  param_1[0x5b] = 0;
  *(undefined4 *)(param_1 + 0x5c) = 0;
  param_1[0x58] = Proud::CSocketBuffer::vftable;
  *(undefined4 *)((longlong)param_1 + 0x2e4) = 1;
  param_1[0x68] = 0;
  param_1[0x69] = 0;
  param_1[0x6a] = 0;
  param_1[0x6b] = 0;
  *(undefined1 *)(param_1 + 0x70) = 0;
  *(undefined1 *)(param_1 + 4) = 0;
  param_1[0x7a] = param_2;
  param_1[3] = param_3;
  FUN_140185910(param_1);
  return param_1;
}



void FUN_140185eb0(longlong param_1,int param_2,undefined8 param_3)

{
  int *piVar1;
  undefined *puVar2;
  undefined8 uVar3;
  undefined *local_res20;
  undefined *local_28;
  undefined8 local_20;
  undefined8 local_18;
  undefined1 local_10;
  
  if (((param_2 != 0x2733) && (local_20 = 0xfffffffffffffffe, param_2 != 0x3e5)) &&
     (*(char *)(param_1 + 0x21) == '\x01')) {
    FUN_1401568c0();
    local_28 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_28,&DAT_140264328,param_3,param_2);
    FUN_1401568c0();
    puVar2 = local_28;
    local_res20 = PTR_DAT_1403200a0;
    if (PTR_DAT_1403200a0 == (undefined *)0x0) {
      local_res20 = (undefined *)0x0;
    }
    if (local_28 != PTR_DAT_1403200a0) {
      uVar3 = FUN_1401568c0();
      local_18 = uVar3;
      FUN_140156b50(uVar3);
      local_10 = 1;
      FUN_14004f990(&local_res20);
      local_res20 = puVar2;
      if (((puVar2 != PTR_DAT_1403200a0) && (puVar2 != (undefined *)0x0)) &&
         (puVar2 != (undefined *)0x8)) {
        *(int *)(puVar2 + -4) = *(int *)(puVar2 + -4) + 1;
      }
      FUN_140156be0(uVar3);
    }
    (**(code **)(**(longlong **)(param_1 + 0x18) + 8))
              (*(longlong **)(param_1 + 0x18),param_1,&local_res20);
    if (((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) &&
       (puVar2 + -8 != (undefined *)0x0)) {
      uVar3 = FUN_1401568c0();
      local_18 = uVar3;
      FUN_140156b50(uVar3);
      local_10 = 1;
      piVar1 = (int *)(puVar2 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar2 + -8);
      }
      FUN_140156be0(uVar3);
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_140186000(longlong param_1,longlong *param_2,undefined2 param_3)

{
  undefined1 *puVar1;
  undefined2 uVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  undefined4 uVar6;
  uint *puVar7;
  longlong lVar8;
  uint *puVar9;
  undefined *puVar10;
  uint *puVar11;
  uint uVar12;
  undefined1 auStack_128 [32];
  uint *local_108;
  undefined1 local_100;
  longlong *local_f8;
  undefined8 local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined1 *local_d8;
  undefined1 local_d0 [136];
  ulonglong local_48;
  
  local_f0 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_128;
  puVar10 = (undefined *)*param_2;
  if ((undefined *)*param_2 == (undefined *)0x0) {
    puVar10 = PTR_DAT_1403200a0;
  }
  local_d8 = local_d0;
  local_f8 = param_2;
  FUN_140153e40(&local_d8,puVar10,3);
  puVar1 = local_d8;
  FUN_1401568c0();
  puVar11 = (uint *)PTR_DAT_140320098;
  local_108 = (uint *)PTR_DAT_140320098;
  uVar3 = FUN_1401567e0();
  if (puVar11 == (uint *)0x0) {
    iVar4 = 0;
  }
  else if (puVar11 == (uint *)PTR_DAT_140320098) {
    iVar4 = 0;
  }
  else {
    iVar4 = *(int *)((longlong)puVar11 + -8);
  }
  uVar5 = uVar3;
  if ((int)uVar3 <= iVar4) {
    if (puVar11 == (uint *)0x0) {
      uVar5 = 0;
    }
    else if (puVar11 == (uint *)PTR_DAT_140320098) {
      uVar5 = 0;
    }
    else {
      uVar5 = *(uint *)((longlong)puVar11 + -8);
    }
  }
  uVar12 = 1;
  if (1 < (int)uVar5) {
    uVar12 = uVar5;
  }
  if (puVar11 == (uint *)0x0) {
    iVar4 = 0;
  }
  else if (puVar11 == (uint *)PTR_DAT_140320098) {
    iVar4 = 0;
  }
  else {
    iVar4 = *(int *)((longlong)puVar11 + -8);
  }
  if ((int)uVar12 <= iVar4) goto LAB_1401861a1;
  if (puVar11 == (uint *)0x0) {
    puVar11 = (uint *)PTR_DAT_140320098;
  }
  local_108 = puVar11;
  if ((int)uVar12 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (uVar12 == 0) {
    FUN_140050520(&local_108);
    goto LAB_1401861a1;
  }
  if (puVar11 == (uint *)0x0) {
    uVar5 = 0;
  }
  else if (puVar11 == (uint *)PTR_DAT_140320098) {
    uVar5 = 0;
  }
  else {
    uVar5 = puVar11[-2];
  }
  if (uVar12 == uVar5) goto LAB_1401861a1;
  puVar7 = (uint *)FUN_140156940();
  if (puVar7 != (uint *)0x0) {
    *puVar7 = 0;
    puVar7[1] = 1;
  }
  *puVar7 = uVar12;
  if (puVar11 == (uint *)0x0) {
    uVar5 = 0;
  }
  else if (puVar11 == (uint *)PTR_DAT_140320098) {
    uVar5 = 0;
  }
  else {
    uVar5 = puVar11[-2];
  }
  puVar9 = (uint *)PTR_DAT_140320098;
  if ((int)uVar12 < (int)uVar5) {
LAB_14018617b:
    if (puVar11 != (uint *)0x0) {
      puVar9 = puVar11;
    }
  }
  else {
    if (puVar11 != (uint *)0x0) {
      if (puVar11 == (uint *)PTR_DAT_140320098) {
        uVar12 = 0;
      }
      else {
        uVar12 = puVar11[-2];
      }
      goto LAB_14018617b;
    }
    uVar12 = 0;
  }
  FUN_140156810(puVar7 + 2,puVar9,uVar12);
  FUN_140050520(&local_108);
  local_108 = puVar7 + 2;
LAB_1401861a1:
  FUN_1401242e0(&local_108);
  puVar11 = local_108;
  puVar7 = local_108;
  if (local_108 == (uint *)0x0) {
    puVar7 = (uint *)PTR_DAT_140320098;
  }
  FUN_140156810(puVar7,puVar1,uVar3);
  uVar5 = FUN_1401567e0();
  uVar3 = 0;
  if (0 < (int)uVar5) {
    uVar3 = uVar5;
  }
  if (puVar11 == (uint *)0x0) {
    uVar5 = 0;
  }
  else if (puVar11 == (uint *)PTR_DAT_140320098) {
    uVar5 = 0;
  }
  else {
    uVar5 = puVar11[-2];
  }
  if ((int)uVar5 <= (int)uVar3) {
    if (puVar11 == (uint *)0x0) {
      uVar3 = 0;
    }
    else if (puVar11 == (uint *)PTR_DAT_140320098) {
      uVar3 = 0;
    }
    else {
      uVar3 = puVar11[-2];
    }
  }
  if (((puVar11 != (uint *)PTR_DAT_140320098) && (puVar11 != (uint *)0x0)) &&
     (puVar7 = puVar11 + -2, puVar7 != (uint *)0x0)) {
    *puVar7 = uVar3;
    *(undefined1 *)((longlong)(int)uVar3 + 8 + (longlong)puVar7) = 0;
  }
  if (local_d8 != local_d0) {
    free(local_d8);
  }
  local_e0 = 0;
  local_e8 = 2;
  puVar7 = puVar11;
  if (puVar11 == (uint *)0x0) {
    puVar7 = (uint *)PTR_DAT_140320098;
  }
  iVar4 = Ordinal_11(puVar7);
  local_e8 = CONCAT44(iVar4,(undefined4)local_e8);
  if (iVar4 == -1) {
    puVar7 = puVar11;
    if (puVar11 == (uint *)0x0) {
      puVar7 = (uint *)PTR_DAT_140320098;
    }
    lVar8 = Ordinal_52(puVar7);
    if (lVar8 == 0) {
      uVar6 = Ordinal_111();
      FUN_140185eb0(param_1,uVar6,L"Proud::CFastSocket::Connect");
      if (((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_140320098)) &&
         (puVar11 + -2 != (uint *)0x0)) {
        puVar9 = (uint *)FUN_1401568c0();
        local_108 = puVar9;
        FUN_140156b50(puVar9);
        local_100 = 1;
        puVar7 = puVar11 + -1;
        *puVar7 = *puVar7 - 1;
        if (*puVar7 == 0) {
          FUN_140156970(puVar11 + -2);
        }
        FUN_140156be0(puVar9);
      }
      FUN_14004f990(param_2);
      return uVar6;
    }
    local_e8 = CONCAT44(*(undefined4 *)**(undefined8 **)(lVar8 + 0x18),(undefined4)local_e8);
  }
  uVar2 = Ordinal_9(param_3);
  local_e8._0_4_ = CONCAT22(uVar2,(undefined2)local_e8);
  iVar4 = Ordinal_4(*(undefined8 *)(param_1 + 0x3d0),&local_e8,0x10);
  if (iVar4 == -1) {
    uVar6 = Ordinal_111();
    FUN_140185eb0(param_1,uVar6,L"Proud::CFastSocket::Connect");
    if (((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_140320098)) &&
       (puVar11 + -2 != (uint *)0x0)) {
      puVar9 = (uint *)FUN_1401568c0();
      local_108 = puVar9;
      FUN_140156b50(puVar9);
      local_100 = 1;
      puVar7 = puVar11 + -1;
      *puVar7 = *puVar7 - 1;
      if (*puVar7 == 0) {
        FUN_140156970(puVar11 + -2);
      }
      FUN_140156be0(puVar9);
    }
    FUN_14004f990(param_2);
  }
  else {
    if (((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_140320098)) &&
       (puVar11 + -2 != (uint *)0x0)) {
      puVar9 = (uint *)FUN_1401568c0();
      local_108 = puVar9;
      FUN_140156b50(puVar9);
      local_100 = 1;
      puVar7 = puVar11 + -1;
      *puVar7 = *puVar7 - 1;
      if (*puVar7 == 0) {
        FUN_140156970(puVar11 + -2);
      }
      FUN_140156be0(puVar9);
    }
    FUN_14004f990(param_2);
    uVar6 = 0;
  }
  return uVar6;
}



undefined4 FUN_140186430(longlong param_1,int param_2)

{
  undefined4 uVar1;
  int iVar2;
  undefined8 uVar3;
  undefined *local_res8;
  undefined4 local_res10 [2];
  int local_18 [2];
  undefined8 local_10;
  
  if (*(char *)(param_1 + 0x1c0) != '\0') {
    FUN_1401568c0();
    local_res8 = PTR_DAT_1403200a0;
    uVar1 = FUN_140156740(L"WARNING: IssueRecv is duplicated!");
    uVar3 = FUN_14004f760(&local_res8,uVar1);
    FUN_140156770(uVar3,L"WARNING: IssueRecv is duplicated!",uVar1);
    FUN_14004f380(&local_res8);
    (**(code **)(**(longlong **)(param_1 + 0x18) + 8))
              (*(longlong **)(param_1 + 0x18),param_1,&local_res8);
  }
  if (param_2 < 1) {
    return 0x2726;
  }
  FUN_140050060(param_1 + 0x200,param_2);
  local_10 = 0;
  if (*(int *)(param_1 + 0x218) != 0) {
    local_10 = *(undefined8 *)(param_1 + 0x210);
  }
  *(undefined4 *)(param_1 + 0x304) = 0;
  local_res10[0] = 0;
  *(undefined1 *)(param_1 + 0x1c0) = 0;
  *(undefined1 *)(param_1 + 0x1c0) = 1;
  local_18[0] = param_2;
  iVar2 = WSARecv(*(undefined8 *)(param_1 + 0x3d0),local_18,1,local_res10,
                  (undefined4 *)(param_1 + 0x304),param_1 + 0x180,0);
  if (iVar2 != 0) {
    iVar2 = Ordinal_111();
    if (iVar2 != 0x3e5) {
      *(undefined1 *)(param_1 + 0x1c0) = 0;
      uVar1 = Ordinal_111();
      FUN_140185eb0(param_1,uVar1,L"Proud::CFastSocket::IssueRecv");
      return uVar1;
    }
  }
  return 0;
}



int FUN_1401865a0(longlong param_1,int param_2)

{
  undefined4 uVar1;
  int iVar2;
  undefined8 uVar3;
  undefined *local_res8;
  undefined4 local_res10 [2];
  int local_38 [2];
  undefined8 local_30;
  
  if (*(char *)(param_1 + 0x1c0) != '\0') {
    FUN_1401568c0();
    local_res8 = PTR_DAT_1403200a0;
    uVar1 = FUN_140156740(L"WARNING: IssueRecvFrom is duplicated!");
    uVar3 = FUN_14004f760(&local_res8,uVar1);
    FUN_140156770(uVar3,L"WARNING: IssueRecvFrom is duplicated!",uVar1);
    FUN_14004f380(&local_res8);
    (**(code **)(**(longlong **)(param_1 + 0x18) + 8))
              (*(longlong **)(param_1 + 0x18),param_1,&local_res8);
  }
  if (0 < param_2) {
    FUN_140050060(param_1 + 0x200,param_2);
    local_30 = 0;
    if (*(int *)(param_1 + 0x218) != 0) {
      local_30 = *(undefined8 *)(param_1 + 0x210);
    }
    local_res10[0] = 0;
    *(undefined4 *)(param_1 + 0x304) = 0;
    local_38[0] = param_2;
    while( true ) {
      *(undefined4 *)(param_1 + 0x300) = 0x10;
      *(undefined1 *)(param_1 + 0x1c0) = *(undefined1 *)(param_1 + 0x1c0);
      *(undefined1 *)(param_1 + 0x1c0) = 1;
      iVar2 = WSARecvFrom(*(undefined8 *)(param_1 + 0x3d0),local_38,1,local_res10,
                          (undefined4 *)(param_1 + 0x304),param_1 + 0x2f0,
                          (undefined4 *)(param_1 + 0x300),param_1 + 0x180,0);
      if (iVar2 == 0) {
        return 0;
      }
      iVar2 = Ordinal_111();
      if (iVar2 == 0x3e5) break;
      if (((iVar2 != 0x2738) && (iVar2 != 0x2744)) && (iVar2 != 0x2746)) {
        *(undefined1 *)(param_1 + 0x1c0) = 0;
        FUN_140185eb0(param_1,iVar2,L"Proud::CFastSocket::IssueRecvFrom");
        return iVar2;
      }
    }
    return 0;
  }
  return 0x2726;
}



undefined4 FUN_140186760(longlong param_1,undefined8 *param_2,uint param_3)

{
  undefined1 uVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 *_Dst;
  ulonglong uVar6;
  ulonglong uVar7;
  undefined8 *puVar8;
  undefined *local_res8;
  undefined4 local_res18 [4];
  uint local_28 [2];
  undefined8 local_20;
  
  uVar7 = (ulonglong)(int)param_3;
  if (*(char *)(param_1 + 0x280) != '\0') {
    FUN_1401568c0();
    local_res8 = PTR_DAT_1403200a0;
    uVar2 = FUN_140156740(L"WARNING: IssueSend is duplicated!");
    uVar5 = FUN_14004f760(&local_res8,uVar2);
    FUN_140156770(uVar5,L"WARNING: IssueSend is duplicated!",uVar2);
    FUN_14004f380(&local_res8);
    (**(code **)(**(longlong **)(param_1 + 0x18) + 8))
              (*(longlong **)(param_1 + 0x18),param_1,&local_res8);
  }
  if ((int)param_3 < 1) {
    return 0x2726;
  }
  FUN_140050060(param_1 + 0x2c0,param_3);
  if (*(int *)(param_1 + 0x2d8) == 0) {
    _Dst = (undefined8 *)0x0;
  }
  else {
    _Dst = *(undefined8 **)(param_1 + 0x2d0);
  }
  if (uVar7 < 0x21) {
    uVar6 = (ulonglong)(param_3 & 7);
    for (uVar7 = uVar7 >> 3; uVar7 != 0; uVar7 = uVar7 - 1) {
      uVar5 = *param_2;
      param_2 = param_2 + 1;
      *_Dst = uVar5;
      _Dst = _Dst + 1;
    }
    if (uVar6 != 0) {
      puVar8 = param_2;
      do {
        uVar1 = *(undefined1 *)puVar8;
        puVar8 = (undefined8 *)((longlong)puVar8 + 1);
        uVar6 = uVar6 - 1;
        *(undefined1 *)((longlong)_Dst + (-1 - (longlong)param_2) + (longlong)puVar8) = uVar1;
      } while (uVar6 != 0);
    }
  }
  else {
    memcpy(_Dst,param_2,uVar7);
  }
  if (*(int *)(param_1 + 0x2d8) == 0) {
    local_20 = 0;
  }
  else {
    local_20 = *(undefined8 *)(param_1 + 0x2d0);
  }
  local_res18[0] = 0;
  *(undefined1 *)(param_1 + 0x280) = 0;
  *(undefined1 *)(param_1 + 0x280) = 1;
  local_28[0] = param_3;
  iVar3 = WSASend(*(undefined8 *)(param_1 + 0x3d0),local_28,1,local_res18,0,param_1 + 0x240,0);
  if ((iVar3 < 0) && (iVar4 = Ordinal_111(), iVar4 != 0x3e5)) {
    *(undefined1 *)(param_1 + 0x280) = 0;
    uVar2 = Ordinal_111();
    FUN_140185eb0(param_1,uVar2,L"Proud::CFastSocket::IssueSend");
    return uVar2;
  }
  *(bool *)(param_1 + 0x3c2) = iVar3 == 0;
  return 0;
}



undefined4 FUN_140186940(longlong param_1,longlong *param_2)

{
  longlong lVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  undefined8 uVar5;
  longlong *plVar6;
  ulonglong uVar7;
  uint uVar8;
  ulonglong uVar9;
  uint uVar10;
  ulonglong uVar11;
  undefined4 local_res8 [2];
  undefined *local_res10;
  
  if (*(char *)(param_1 + 0x280) != '\0') {
    FUN_1401568c0();
    local_res10 = PTR_DAT_1403200a0;
    uVar2 = FUN_140156740(L"WARNING: IssueSend is duplicated!");
    uVar5 = FUN_14004f760(&local_res10,uVar2);
    FUN_140156770(uVar5,L"WARNING: IssueSend is duplicated!",uVar2);
    FUN_14004f380(&local_res10);
    (**(code **)(**(longlong **)(param_1 + 0x18) + 8))
              (*(longlong **)(param_1 + 0x18),param_1,&local_res10);
  }
  lVar1 = param_2[1];
  uVar7 = 0;
  uVar9 = uVar7;
  uVar11 = uVar7;
  if (0 < lVar1) {
    do {
      if (((longlong)uVar7 < 0) || (lVar1 <= (longlong)uVar7)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_2[2] < 0x65) {
        plVar6 = param_2 + (uVar7 + 2) * 2;
      }
      else {
        plVar6 = (longlong *)(uVar7 * 0x10 + *param_2);
      }
      uVar10 = (int)uVar11 + (int)*plVar6;
      uVar8 = (int)uVar9 + 1;
      uVar7 = (ulonglong)(int)uVar8;
      uVar9 = (ulonglong)uVar8;
      uVar11 = (ulonglong)uVar10;
    } while ((longlong)uVar7 < lVar1);
    if (0 < (int)uVar10) {
      local_res8[0] = 0;
      *(undefined1 *)(param_1 + 0x280) = 0;
      *(undefined1 *)(param_1 + 0x280) = 1;
      if (0xffffffff < param_2[1] + 0x80000000U) {
                    // WARNING: Subroutine does not return
        FUN_140156710(L"Proud::CFastSocket::IssueSend_NoCopy");
      }
      plVar6 = param_2 + 4;
      if (100 < (ulonglong)param_2[2]) {
        plVar6 = (longlong *)*param_2;
      }
      iVar3 = WSASend(*(undefined8 *)(param_1 + 0x3d0),plVar6,param_2[1] & 0xffffffff,local_res8,0,
                      param_1 + 0x240,0);
      if ((iVar3 < 0) && (iVar4 = Ordinal_111(), iVar4 != 0x3e5)) {
        *(undefined1 *)(param_1 + 0x280) = 0;
        uVar2 = Ordinal_111();
        FUN_140185eb0(param_1,uVar2,L"Proud::CFastSocket::IssueSend_NoCopy");
        return uVar2;
      }
      *(bool *)(param_1 + 0x3c2) = iVar3 == 0;
      return 0;
    }
  }
  return 0x2726;
}



void FUN_140186b10(longlong param_1)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = Ordinal_13(*(undefined8 *)(param_1 + 0x3d0),0x7fffffff);
  if (iVar1 != 0) {
    uVar2 = Ordinal_111();
    FUN_140185eb0(param_1,uVar2,L"Proud::CFastSocket::Listen");
  }
  return;
}



ulonglong FUN_140186b50(longlong param_1,undefined4 param_2)

{
  undefined4 uVar1;
  ulonglong uVar2;
  undefined4 local_res10 [6];
  
  local_res10[0] = param_2;
  uVar2 = Ordinal_21(*(undefined8 *)(param_1 + 0x3d0),0xffff,0x1001,local_res10,4);
  if ((int)uVar2 != 0) {
    uVar1 = Ordinal_111();
    FUN_140185eb0(param_1,uVar1,L"Proud::CFastSocket::SetSendBufferSize");
    uVar2 = uVar2 & 0xffffffff;
  }
  return uVar2;
}



ulonglong FUN_140186bb0(longlong param_1,undefined4 param_2)

{
  undefined4 uVar1;
  ulonglong uVar2;
  undefined4 local_res10 [6];
  
  local_res10[0] = param_2;
  uVar2 = Ordinal_21(*(undefined8 *)(param_1 + 0x3d0),0xffff,0x1002,local_res10,4);
  if ((int)uVar2 != 0) {
    uVar1 = Ordinal_111();
    FUN_140185eb0(param_1,uVar1,L"Proud::CFastSocket::SetRecvBufferSize");
    uVar2 = uVar2 & 0xffffffff;
  }
  return uVar2;
}



int FUN_140186c10(longlong param_1,longlong param_2)

{
  undefined4 uVar1;
  int iVar2;
  undefined8 uVar3;
  undefined *local_res8;
  
  if (*(char *)(param_1 + 0x100) != '\0') {
    FUN_1401568c0();
    local_res8 = PTR_DAT_1403200a0;
    uVar1 = FUN_140156740(L"WARNING: AcceptEx is duplicated!");
    uVar3 = FUN_14004f760(&local_res8,uVar1);
    FUN_140156770(uVar3,L"WARNING: AcceptEx is duplicated!",uVar1);
    FUN_14004f380(&local_res8);
    (**(code **)(**(longlong **)(param_1 + 0x18) + 8))
              (*(longlong **)(param_1 + 0x18),param_1,&local_res8);
  }
  if (DAT_140329440 == (code *)0x0) {
    FUN_140184d00(param_1);
  }
  *(undefined1 *)(param_1 + 0x100) = 0;
  FUN_140050060(param_1 + 0x140,0x40);
  *(undefined1 *)(param_1 + 0x100) = 1;
  if (*(int *)(param_1 + 0x158) == 0) {
    uVar3 = 0;
  }
  else {
    uVar3 = *(undefined8 *)(param_1 + 0x150);
  }
  iVar2 = (*DAT_140329440)(*(undefined8 *)(param_1 + 0x3d0),*(undefined8 *)(param_2 + 0x3d0),uVar3,0
                           ,0x20,0x20,param_1 + 0x168,param_1 + 0xc0);
  if (iVar2 == 0) {
    iVar2 = Ordinal_111();
    if (((iVar2 != 0x2733) && (iVar2 != 0x3e5)) &&
       ((*(char *)(param_1 + 0x314) == '\0' || (iVar2 != 0x2736)))) {
      *(undefined1 *)(param_1 + 0x100) = 0;
      FUN_140185eb0(param_1,iVar2,L"Proud::CFastSocket::AcceptEx");
      return iVar2;
    }
  }
  return 0;
}



undefined4 FUN_140186d80(longlong param_1,char param_2)

{
  int iVar1;
  undefined4 uVar2;
  uint local_res10 [6];
  
  local_res10[0] = (uint)(param_2 != '\0');
  iVar1 = Ordinal_21(*(undefined8 *)(param_1 + 0x3d0),0xffff,0x20,local_res10,4);
  if (iVar1 != 0) {
    uVar2 = Ordinal_111();
    FUN_140185eb0(param_1,uVar2,L"Proud::CFastSocket::EnableBroadcastOption");
    return uVar2;
  }
  *(char *)(param_1 + 0x20) = param_2;
  return 0;
}



int FUN_140186e00(longlong param_1,undefined4 param_2)

{
  int iVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  wchar_t *pwVar4;
  undefined4 local_res8 [4];
  undefined4 local_res18 [2];
  undefined *local_res20;
  
  local_res8[0] = 4;
  iVar1 = Ordinal_7(*(undefined8 *)(param_1 + 0x3d0),0,4,local_res18,local_res8);
  if (iVar1 == 0) {
    local_res18[0] = param_2;
    iVar1 = Ordinal_21(*(undefined8 *)(param_1 + 0x3d0),0,4,local_res18,local_res8[0]);
    if (iVar1 == 0) {
      return 0;
    }
    FUN_1401568c0();
    local_res20 = PTR_DAT_1403200a0;
    uVar2 = FUN_140156740(L"Cannot change TTL!");
    uVar3 = FUN_14004f760(&local_res20,uVar2);
    pwVar4 = L"Cannot change TTL!";
  }
  else {
    FUN_1401568c0();
    local_res20 = PTR_DAT_1403200a0;
    uVar2 = FUN_140156740(L"This socket doesn\'t support TTL change!");
    uVar3 = FUN_14004f760(&local_res20,uVar2);
    pwVar4 = L"This socket doesn\'t support TTL change!";
  }
  FUN_140156770(uVar3,pwVar4,uVar2);
  FUN_14004f380(&local_res20);
  (**(code **)(**(longlong **)(param_1 + 0x18) + 8))
            (*(longlong **)(param_1 + 0x18),param_1,&local_res20);
  return iVar1;
}



ulonglong FUN_140186f00(longlong param_1,longlong param_2)

{
  int iVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  ulonglong uVar4;
  wchar_t *pwVar5;
  undefined *local_res10 [3];
  
  iVar1 = *(int *)(param_2 + 8);
  if (iVar1 == -1) {
    FUN_1401568c0();
    local_res10[0] = PTR_DAT_1403200a0;
    uVar2 = FUN_140156740(L"Sending to 255.255.255.255 is not permitted!");
    uVar3 = FUN_14004f760(local_res10,uVar2);
    pwVar5 = L"Sending to 255.255.255.255 is not permitted!";
  }
  else if ((*(short *)(param_2 + 0xc) == -1) || (*(short *)(param_2 + 0xc) == 0)) {
    FUN_1401568c0();
    local_res10[0] = PTR_DAT_1403200a0;
    uVar2 = FUN_140156740(L"Sending to prohibited port is not permitted!");
    uVar3 = FUN_14004f760(local_res10,uVar2);
    pwVar5 = L"Sending to prohibited port is not permitted!";
  }
  else {
    if (iVar1 != 0) {
      return CONCAT71((uint7)(uint3)((uint)iVar1 >> 8),1);
    }
    FUN_1401568c0();
    local_res10[0] = PTR_DAT_1403200a0;
    uVar2 = FUN_140156740(L"Sending to 0.0.0.0 is not permitted!");
    uVar3 = FUN_14004f760(local_res10,uVar2);
    pwVar5 = L"Sending to 0.0.0.0 is not permitted!";
  }
  FUN_140156770(uVar3,pwVar5,uVar2);
  FUN_14004f380(local_res10);
  uVar4 = (**(code **)(**(longlong **)(param_1 + 0x18) + 8))
                    (*(longlong **)(param_1 + 0x18),param_1,local_res10);
  return uVar4 & 0xffffffffffffff00;
}



ulonglong FUN_140187010(longlong param_1,undefined8 param_2)

{
  undefined4 uVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  undefined4 local_res8 [2];
  undefined *local_res18;
  
  local_res8[0] = 4;
  uVar2 = Ordinal_7(*(undefined8 *)(param_1 + 0x3d0),0,4,param_2,local_res8);
  if ((int)uVar2 != 0) {
    FUN_1401568c0();
    local_res18 = PTR_DAT_1403200a0;
    uVar1 = FUN_140156740(L"This socket doesn\'t support TTL change!");
    uVar3 = FUN_14004f760(&local_res18,uVar1);
    FUN_140156770(uVar3,L"This socket doesn\'t support TTL change!",uVar1);
    FUN_14004f380(&local_res18);
    (**(code **)(**(longlong **)(param_1 + 0x18) + 8))
              (*(longlong **)(param_1 + 0x18),param_1,&local_res18);
    uVar2 = uVar2 & 0xffffffff;
  }
  return uVar2;
}



void FUN_1401870c0(longlong param_1)

{
  if (*(char *)(param_1 + 0x30c) != '\0') {
    *(undefined1 *)(param_1 + 0x30c) = 0;
    FUN_140186e00(param_1,*(undefined4 *)(param_1 + 0x308));
  }
  return;
}



undefined4 FUN_1401870f0(longlong param_1,undefined4 param_2)

{
  char cVar1;
  undefined4 uVar2;
  
  cVar1 = FUN_140187740(*(undefined8 *)(param_1 + 0x3d0),0,param_2);
  if (cVar1 == '\0') {
    uVar2 = Ordinal_111();
    FUN_140185eb0(param_1,uVar2,L"Proud::CFastSocket::Bind");
    return 0;
  }
  return 1;
}



undefined8 FUN_140187140(longlong param_1,char *param_2)

{
  char cVar1;
  undefined4 uVar2;
  longlong lVar3;
  char *pcVar4;
  
  if (param_2 != (char *)0x0) {
    lVar3 = -1;
    pcVar4 = param_2;
    do {
      if (lVar3 == 0) break;
      lVar3 = lVar3 + -1;
      cVar1 = *pcVar4;
      pcVar4 = pcVar4 + 1;
    } while (cVar1 != '\0');
    if (lVar3 != -2) goto LAB_14018716d;
  }
  param_2 = (char *)0x0;
LAB_14018716d:
  cVar1 = FUN_140187740(*(undefined8 *)(param_1 + 0x3d0),param_2);
  if (cVar1 == '\0') {
    uVar2 = Ordinal_111();
    FUN_140185eb0(param_1,uVar2,L"Proud::CFastSocket::Bind");
    return 0;
  }
  return 1;
}



undefined4 FUN_1401871b0(longlong param_1,longlong param_2)

{
  char cVar1;
  undefined4 uVar2;
  
  cVar1 = FUN_1401876d0(*(undefined8 *)(param_1 + 0x3d0),*(undefined4 *)(param_2 + 8),
                        *(undefined2 *)(param_2 + 0xc));
  if (cVar1 == '\0') {
    uVar2 = Ordinal_111();
    FUN_140185eb0(param_1,uVar2,L"Proud::CFastSocket::Bind");
    return 0;
  }
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140187200(longlong param_1,longlong *param_2,longlong param_3,int param_4)

{
  longlong lVar1;
  char cVar2;
  undefined4 uVar3;
  int iVar4;
  undefined8 uVar5;
  longlong *plVar6;
  ulonglong uVar7;
  uint uVar8;
  ulonglong uVar9;
  uint uVar10;
  ulonglong uVar11;
  undefined1 auStack_b8 [32];
  undefined4 local_98;
  undefined1 *local_90;
  undefined4 local_88;
  longlong local_80;
  undefined8 local_78;
  undefined *local_68;
  undefined4 local_60;
  undefined4 local_5c;
  undefined **local_58;
  undefined4 local_50;
  undefined2 local_4c;
  undefined1 local_48 [16];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_b8;
  if (*(char *)(param_1 + 0x280) != '\0') {
    FUN_1401568c0();
    local_68 = PTR_DAT_1403200a0;
    uVar3 = FUN_140156740(L"WARNING: IssueSendTo is duplicated!");
    uVar5 = FUN_14004f760(&local_68,uVar3);
    FUN_140156770(uVar5,L"WARNING: IssueSendTo is duplicated!",uVar3);
    FUN_14004f380(&local_68);
    (**(code **)(**(longlong **)(param_1 + 0x18) + 8))
              (*(longlong **)(param_1 + 0x18),param_1,&local_68);
  }
  lVar1 = param_2[1];
  uVar7 = 0;
  uVar9 = uVar7;
  uVar11 = uVar7;
  if (0 < lVar1) {
    do {
      if (((longlong)uVar7 < 0) || (lVar1 <= (longlong)uVar7)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_2[2] < 0x65) {
        plVar6 = param_2 + (uVar7 + 2) * 2;
      }
      else {
        plVar6 = (longlong *)(uVar7 * 0x10 + *param_2);
      }
      uVar10 = (int)uVar11 + (int)*plVar6;
      uVar8 = (int)uVar9 + 1;
      uVar7 = (ulonglong)(int)uVar8;
      uVar9 = (ulonglong)uVar8;
      uVar11 = (ulonglong)uVar10;
    } while ((longlong)uVar7 < lVar1);
    if (0 < (int)uVar10) {
      FUN_140158850(param_3,local_48);
      local_58 = Proud::AddrPort::vftable;
      local_50 = *(undefined4 *)(param_3 + 8);
      local_4c = *(undefined2 *)(param_3 + 0xc);
      local_5c = 0;
      cVar2 = FUN_140186f00(param_1,&local_58);
      if (cVar2 == '\0') {
        return 0x271d;
      }
      if (((-1 < param_4) && (iVar4 = FUN_140187010(param_1,&local_60), iVar4 == 0)) &&
         (iVar4 = FUN_140186e00(param_1,param_4), iVar4 == 0)) {
        *(undefined1 *)(param_1 + 0x30c) = 1;
        *(undefined4 *)(param_1 + 0x308) = local_60;
      }
      *(undefined1 *)(param_1 + 0x280) = 0;
      *(undefined1 *)(param_1 + 0x280) = 1;
      if (param_2[1] + 0x80000000U < 0x100000000) {
        plVar6 = param_2 + 4;
        if (100 < (ulonglong)param_2[2]) {
          plVar6 = (longlong *)*param_2;
        }
        local_78 = 0;
        local_80 = param_1 + 0x240;
        local_90 = local_48;
        local_88 = 0x10;
        local_98 = 0;
        iVar4 = WSASendTo(*(undefined8 *)(param_1 + 0x3d0),plVar6,param_2[1] & 0xffffffff,&local_5c)
        ;
        if ((iVar4 != 0) && (iVar4 = Ordinal_111(), iVar4 != 0x3e5)) {
          *(undefined1 *)(param_1 + 0x280) = 0;
          FUN_140185eb0(param_1,iVar4,L"Proud::CFastSocket::IssueSendTo_NoCopy_TempTtl");
          return iVar4;
        }
        return 0;
      }
                    // WARNING: Subroutine does not return
      FUN_140156710(L"Proud::CFastSocket::IssueSendTo_NoCopy_TempTtl");
    }
  }
  return 0x2726;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_140187440(longlong param_1,undefined8 *param_2,uint param_3,longlong param_4)

{
  undefined1 uVar1;
  char cVar2;
  undefined4 uVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 *_Dst;
  ulonglong uVar6;
  ulonglong uVar7;
  undefined8 *puVar8;
  undefined1 auStack_c8 [32];
  undefined4 local_a8;
  undefined1 *local_a0;
  undefined4 local_98;
  longlong local_90;
  undefined8 local_88;
  undefined4 local_78 [2];
  undefined *local_70;
  undefined **local_68;
  undefined4 local_60;
  undefined2 local_5c;
  uint local_58 [2];
  undefined8 local_50;
  undefined1 local_48 [16];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_c8;
  uVar7 = (ulonglong)(int)param_3;
  if (*(char *)(param_1 + 0x280) != '\0') {
    FUN_1401568c0();
    local_70 = PTR_DAT_1403200a0;
    uVar3 = FUN_140156740(L"WARNING: IssueSendTo is duplicated!");
    uVar5 = FUN_14004f760(&local_70,uVar3);
    FUN_140156770(uVar5,L"WARNING: IssueSendTo is duplicated!",uVar3);
    FUN_14004f380(&local_70);
    (**(code **)(**(longlong **)(param_1 + 0x18) + 8))
              (*(longlong **)(param_1 + 0x18),param_1,&local_70);
  }
  if ((int)param_3 < 1) {
    iVar4 = 0x2726;
  }
  else {
    FUN_140050060(param_1 + 0x2c0,param_3);
    if (*(int *)(param_1 + 0x2d8) == 0) {
      _Dst = (undefined8 *)0x0;
    }
    else {
      _Dst = *(undefined8 **)(param_1 + 0x2d0);
    }
    if (uVar7 < 0x21) {
      uVar6 = (ulonglong)(param_3 & 7);
      for (uVar7 = uVar7 >> 3; uVar7 != 0; uVar7 = uVar7 - 1) {
        uVar5 = *param_2;
        param_2 = param_2 + 1;
        *_Dst = uVar5;
        _Dst = _Dst + 1;
      }
      if (uVar6 != 0) {
        puVar8 = param_2;
        do {
          uVar1 = *(undefined1 *)puVar8;
          puVar8 = (undefined8 *)((longlong)puVar8 + 1);
          uVar6 = uVar6 - 1;
          *(undefined1 *)((longlong)_Dst + (-1 - (longlong)param_2) + (longlong)puVar8) = uVar1;
        } while (uVar6 != 0);
      }
    }
    else {
      memcpy(_Dst,param_2,uVar7);
    }
    if (*(int *)(param_1 + 0x2d8) == 0) {
      local_50 = 0;
    }
    else {
      local_50 = *(undefined8 *)(param_1 + 0x2d0);
    }
    local_58[0] = param_3;
    FUN_140158850(param_4,local_48);
    local_68 = Proud::AddrPort::vftable;
    local_60 = *(undefined4 *)(param_4 + 8);
    local_5c = *(undefined2 *)(param_4 + 0xc);
    local_78[0] = 0;
    cVar2 = FUN_140186f00(param_1,&local_68);
    if (cVar2 == '\0') {
      iVar4 = 0x271d;
    }
    else {
      local_88 = 0;
      *(undefined1 *)(param_1 + 0x280) = 0;
      local_90 = param_1 + 0x240;
      local_a0 = local_48;
      local_98 = 0x10;
      *(undefined1 *)(param_1 + 0x280) = 1;
      local_a8 = 0;
      iVar4 = WSASendTo(*(undefined8 *)(param_1 + 0x3d0),local_58,1,local_78);
      if ((iVar4 == 0) || (iVar4 = Ordinal_111(), iVar4 == 0x3e5)) {
        iVar4 = 0;
      }
      else {
        *(undefined1 *)(param_1 + 0x280) = 0;
        FUN_140185eb0(param_1,iVar4,L"Proud::CFastSocket::IssueSendTo");
      }
    }
  }
  return iVar4;
}



undefined4 FUN_140187680(longlong param_1)

{
  char cVar1;
  undefined4 uVar2;
  
  cVar1 = FUN_140187740(*(undefined8 *)(param_1 + 0x3d0),0,0);
  if (cVar1 == '\0') {
    uVar2 = Ordinal_111();
    FUN_140185eb0(param_1,uVar2,L"Proud::CFastSocket::Bind");
    return 0;
  }
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

bool FUN_1401876d0(undefined8 param_1,undefined4 param_2,undefined2 param_3)

{
  undefined2 uVar1;
  int iVar2;
  undefined1 auStack_48 [32];
  undefined4 local_28;
  undefined4 uStack_24;
  undefined8 local_20;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_48;
  local_20 = 0;
  _local_28 = CONCAT44(param_2,2);
  uVar1 = Ordinal_9(param_3);
  local_28 = CONCAT22(uVar1,(undefined2)local_28);
  iVar2 = Ordinal_2(param_1,&local_28,0x10);
  return iVar2 != -1;
}



ulonglong FUN_140187740(undefined8 param_1,longlong param_2,undefined4 param_3)

{
  int iVar1;
  ulonglong uVar2;
  
  if (param_2 == 0) {
    iVar1 = 0;
  }
  else {
    iVar1 = Ordinal_11(param_2);
    if (iVar1 == -1) {
      uVar2 = Ordinal_112(0x2726);
      return uVar2 & 0xffffffffffffff00;
    }
  }
  uVar2 = FUN_1401876d0(param_1,iVar1,param_3);
  return uVar2;
}



longlong * FUN_1401877a0(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined4 uVar4;
  longlong lVar5;
  undefined8 uVar6;
  ulonglong uVar7;
  uint uVar8;
  undefined *local_res18;
  undefined *local_res20;
  undefined8 uVar10;
  ulonglong uVar9;
  
  uVar10 = 0xfffffffffffffffe;
  uVar7 = 0;
  local_res18 = (undefined *)((ulonglong)local_res18 & 0xffffffff00000000);
  lVar5 = Ordinal_52(param_2);
  if ((lVar5 == 0) || (**(longlong **)(lVar5 + 0x18) == 0)) {
    FUN_1401568c0();
    *param_1 = (longlong)PTR_DAT_140320098;
    uVar4 = FUN_1401567e0(&DAT_140281f00);
    uVar6 = FUN_1401243d0(param_1,uVar4);
    FUN_140156810(uVar6,&DAT_140281f00,uVar4,param_4,uVar10);
    FUN_1401244c0(param_1);
  }
  else {
    FUN_1401568c0();
    local_res20 = PTR_DAT_140320098;
    uVar9 = uVar7;
    if (0 < *(short *)(lVar5 + 0x12)) {
      do {
        FUN_1401568c0();
        local_res18 = PTR_DAT_140320098;
        if (0 < (longlong)uVar7) {
          FUN_140158ec0(&local_res20,&DAT_14025b904);
        }
        FUN_1401592d0(&local_res18,&DAT_14025b900,
                      *(undefined1 *)(**(longlong **)(lVar5 + 0x18) + uVar7));
        FUN_140158d30(&local_res20,&local_res18);
        puVar3 = local_res18;
        if (((local_res18 != (undefined *)0x0) && (local_res18 != PTR_DAT_140320098)) &&
           (puVar1 = local_res18 + -8, puVar1 != (undefined *)0x0)) {
          uVar10 = FUN_1401568c0();
          FUN_140156b50(uVar10);
          piVar2 = (int *)(puVar3 + -4);
          *piVar2 = *piVar2 + -1;
          if (*piVar2 == 0) {
            FUN_140156970(puVar1);
          }
          FUN_140156be0(uVar10);
        }
        uVar8 = (int)uVar9 + 1;
        uVar9 = (ulonglong)uVar8;
        uVar7 = uVar7 + 1;
      } while ((int)uVar8 < (int)*(short *)(lVar5 + 0x12));
    }
    puVar1 = local_res20;
    FUN_1401568c0();
    puVar3 = PTR_DAT_140320098;
    *param_1 = (longlong)PTR_DAT_140320098;
    if (puVar3 == (undefined *)0x0) {
      *param_1 = (longlong)PTR_DAT_140320098;
    }
    if (puVar1 != (undefined *)*param_1) {
      uVar10 = FUN_1401568c0();
      FUN_140156b50(uVar10);
      FUN_140050520(param_1);
      *param_1 = (longlong)puVar1;
      if (((puVar1 != PTR_DAT_140320098) && (puVar1 != (undefined *)0x0)) &&
         (puVar1 != (undefined *)0x8)) {
        *(int *)(puVar1 + -4) = *(int *)(puVar1 + -4) + 1;
      }
      FUN_140156be0(uVar10);
    }
    if (((puVar1 != (undefined *)0x0) && (puVar1 != PTR_DAT_140320098)) &&
       (puVar1 + -8 != (undefined *)0x0)) {
      uVar10 = FUN_1401568c0();
      FUN_140156b50(uVar10);
      piVar2 = (int *)(puVar1 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar1 + -8);
      }
      FUN_140156be0(uVar10);
    }
  }
  return param_1;
}



void FUN_140187a00(undefined8 param_1)

{
  int iVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  short local_res10;
  short local_res12;
  undefined4 local_res18 [2];
  undefined *local_res20;
  
  local_res18[0] = 4;
  iVar1 = Ordinal_7(param_1,0xffff,0x80,&local_res10,local_res18);
  if (((iVar1 == 0) && (local_res10 != 0)) && (local_res12 != 0)) {
    FUN_1401568c0();
    local_res20 = PTR_DAT_1403200a0;
    uVar2 = FUN_140156740(
                         L"FATAL: Socket which has behavior of some waits in closesocket() has been detected!"
                         );
    uVar3 = FUN_14004f760(&local_res20,uVar2);
    FUN_140156770(uVar3,
                  L"FATAL: Socket which has behavior of some waits in closesocket() has been detected!"
                  ,uVar2);
    FUN_14004f380(&local_res20);
    FUN_1401a7000(&local_res20);
  }
  return;
}



undefined8 * FUN_140187aa0(undefined8 *param_1)

{
  undefined4 uVar1;
  
  *param_1 = Proud::CRandom::vftable;
  uVar1 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x13c,uVar1,1);
  *(undefined4 *)(param_1 + 0x13b) = 0xfffffffe;
  return param_1;
}



void FUN_140187ae0(undefined8 *param_1)

{
  *param_1 = Proud::CRandom::vftable;
  FUN_140156c00();
  return;
}



undefined8 * FUN_140187b00(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CRandom::vftable;
  FUN_140156c00();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140187b50(longlong param_1,uint param_2)

{
  uint *puVar1;
  int iVar2;
  
  FUN_140156b50(param_1 + 0x9e0);
  param_2 = param_2 | 1;
  *(undefined4 *)(param_1 + 0x9d8) = 0;
  *(uint *)(param_1 + 8) = param_2;
  iVar2 = 0x26f;
  puVar1 = (uint *)(param_1 + 0xc);
  do {
    param_2 = param_2 * 0x10dcd;
    iVar2 = iVar2 + -1;
    *puVar1 = param_2;
    puVar1 = puVar1 + 1;
  } while (iVar2 != 0);
  FUN_140156be0(param_1 + 0x9e0);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140187bc0(longlong param_1)

{
  longlong lVar1;
  DWORD DVar2;
  BOOL BVar3;
  DWORD DVar4;
  ushort uVar5;
  undefined1 auStackY_78 [32];
  DWORD local_48 [6];
  longlong local_30;
  undefined1 local_28;
  _SYSTEMTIME local_20;
  ulonglong local_10;
  
  local_48[4] = 0xfffffffe;
  local_48[5] = 0xffffffff;
  local_10 = DAT_1403223c0 ^ (ulonglong)auStackY_78;
  lVar1 = param_1 + 0x9e0;
  local_30 = lVar1;
  FUN_140156b50(lVar1);
  local_28 = 1;
  local_48[1] = 0;
  local_48[2] = 0;
  local_48[0] = 0;
  local_48[3] = 0;
  DVar2 = GetTickCount();
  BVar3 = GetDiskFreeSpaceW((LPCWSTR)0x0,local_48 + 1,local_48 + 2,local_48,local_48 + 3);
  if (BVar3 == 0) {
    local_20.wYear = 0;
    local_20.wMonth = 0;
    local_20.wDayOfWeek = 0;
    local_20.wDay = 0;
    local_20.wHour = 0;
    local_20.wMinute = 0;
    local_20.wSecond = 0;
    local_20.wMilliseconds = 0;
    GetSystemTime(&local_20);
    uVar5 = local_20.wMilliseconds << 8 |
            (ushort)(byte)(local_20.wMilliseconds._1_1_ + (char)local_20.wSecond);
  }
  else {
    uVar5 = (ushort)local_48[0];
    DVar4 = GetTickCount();
    uVar5 = uVar5 ^ (ushort)DVar4;
  }
  FUN_140187b50(param_1,DVar2 << 0x10 | (uint)uVar5);
  FUN_140156be0(lVar1);
  return;
}



uint FUN_140187cd0(longlong param_1)

{
  uint uVar1;
  uint uVar2;
  uint *puVar3;
  uint *puVar4;
  uint *puVar5;
  uint *puVar6;
  uint uVar7;
  int iVar8;
  uint *puVar9;
  
  if (*(int *)(param_1 + 0x9d8) < -1) {
    FUN_140187bc0();
  }
  *(undefined4 *)(param_1 + 0x9d8) = 0x26f;
  *(longlong *)(param_1 + 0x9d0) = param_1 + 0xc;
  iVar8 = 0xe3;
  puVar3 = (uint *)(param_1 + 0x10);
  puVar5 = (uint *)(param_1 + 8);
  uVar1 = *(uint *)(param_1 + 0xc);
  uVar2 = *(uint *)(param_1 + 8);
  do {
    uVar7 = uVar1;
    puVar4 = puVar3 + 1;
    puVar6 = puVar5 + 1;
    iVar8 = iVar8 + -1;
    *puVar5 = ((uVar7 ^ uVar2) & 0x7ffffffe ^ uVar2) >> 1 ^ -(uint)((uVar7 & 1) != 0) & 0x9908b0df ^
              *(uint *)((longlong)puVar3 + ((param_1 + 0x63c) - (param_1 + 0x10)));
    uVar1 = *puVar3;
    puVar3 = puVar4;
    puVar5 = puVar6;
    uVar2 = uVar7;
  } while (iVar8 != 0);
  iVar8 = 0x18c;
  puVar3 = (uint *)(param_1 + 8);
  do {
    uVar2 = uVar1;
    puVar5 = puVar6 + 1;
    puVar9 = puVar3 + 1;
    iVar8 = iVar8 + -1;
    *puVar6 = ((uVar2 ^ uVar7) & 0x7ffffffe ^ uVar7) >> 1 ^ -(uint)((uVar2 & 1) != 0) & 0x9908b0df ^
              *puVar3;
    uVar1 = *puVar4;
    puVar4 = puVar4 + 1;
    puVar6 = puVar5;
    puVar3 = puVar9;
    uVar7 = uVar2;
  } while (iVar8 != 0);
  uVar1 = *(uint *)(param_1 + 8);
  uVar7 = uVar1 ^ uVar1 >> 0xb;
  *puVar5 = ((uVar1 ^ uVar2) & 0x7ffffffe ^ uVar2) >> 1 ^ -(uint)((uVar1 & 1) != 0) & 0x9908b0df ^
            *puVar9;
  uVar7 = uVar7 ^ (uVar7 & 0xff3a58ad) << 7;
  uVar7 = uVar7 ^ (uVar7 & 0xffffdf8c) << 0xf;
  return uVar7 >> 0x12 ^ uVar7;
}



uint FUN_140187e40(longlong param_1)

{
  int *piVar1;
  uint uVar2;
  
  FUN_140156b50(param_1 + 0x9e0);
  piVar1 = (int *)(param_1 + 0x9d8);
  *piVar1 = *piVar1 + -1;
  if (*piVar1 < 0) {
    uVar2 = FUN_140187cd0(param_1);
  }
  else {
    uVar2 = **(uint **)(param_1 + 0x9d0);
    *(uint **)(param_1 + 0x9d0) = *(uint **)(param_1 + 0x9d0) + 1;
    uVar2 = uVar2 ^ uVar2 >> 0xb;
    uVar2 = uVar2 ^ (uVar2 & 0xff3a58ad) << 7;
    uVar2 = uVar2 ^ (uVar2 & 0xffffdf8c) << 0xf;
    uVar2 = uVar2 >> 0x12 ^ uVar2;
  }
  FUN_140156be0(param_1 + 0x9e0);
  return uVar2;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

undefined * FUN_140187ee0(void)

{
  char cVar1;
  undefined4 uVar2;
  char cVar3;
  undefined8 in_R9;
  undefined8 uVar4;
  undefined *puVar5;
  char cVar6;
  
  uVar4 = 0xfffffffffffffffe;
  puVar5 = &DAT_140329eb0;
  cVar6 = '\0';
  cVar1 = FUN_140156bf0(&DAT_140329eb0);
  cVar3 = '\0';
  if ((cVar1 != '\0') && (cVar3 = cVar6, DAT_140320fc0 != '\0')) {
    cVar6 = '\x01';
    FUN_140156b50(&DAT_140329eb0);
    cVar3 = '\x01';
  }
  if ((DAT_140329ea8 & 1) == 0) {
    DAT_140329ea8 = DAT_140329ea8 | 1;
    _DAT_140329490 = Proud::CRandom::vftable;
    uVar2 = FUN_14015a430();
    FUN_140156a70(&DAT_140329e70,uVar2,1,in_R9,uVar4,puVar5,cVar6);
    _DAT_140329e68 = 0xfffffffe;
    atexit((_func_5014 *)&LAB_140258020);
  }
  DAT_140320fc0 = 0;
  if (cVar3 != '\0') {
    FUN_140156be0(&DAT_140329eb0);
  }
  return &DAT_140329490;
}



void FUN_140187fb0(void)

{
  undefined8 uVar1;
  
  uVar1 = FUN_140187ee0();
  FUN_140187e40(uVar1);
  return;
}



void FUN_140187fd0(undefined8 param_1,double param_2)

{
  undefined1 local_58 [88];
  
  if (param_2 < DAT_140320d28 * 10.0 * 2.0) {
    FUN_140156300(local_58,L"No ping timeout value is too small!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  return;
}



void FUN_140188020(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x000140188047. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



void FUN_140188060(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x000140188087. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



undefined8 * FUN_1401880a0(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_140188100(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140188160(longlong param_1,int param_2,longlong param_3,int param_4)

{
  undefined8 *puVar1;
  longlong lVar2;
  longlong lVar3;
  int iVar4;
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lVar8;
  
  lVar8 = (longlong)param_4;
  lVar6 = (longlong)param_2;
  if (((-1 < param_4) && (-1 < param_2)) && (param_2 <= *(int *)(param_1 + 0x18))) {
    iVar4 = *(int *)(param_1 + 0x18);
    FUN_14015d550(param_1,iVar4 + param_4);
    iVar4 = iVar4 - param_2;
    if ((0 < iVar4) && (iVar4 = iVar4 + -1, lVar5 = (longlong)iVar4, -1 < iVar4)) {
      lVar7 = (lVar8 + lVar6 + lVar5) * 8;
      do {
        lVar2 = FUN_1401a7bb0(param_1);
        lVar3 = FUN_1401a7bb0(param_1);
        *(undefined8 *)(lVar3 + lVar7) = *(undefined8 *)(lVar2 + lVar8 * -8 + lVar7);
        lVar7 = lVar7 + -8;
        lVar5 = lVar5 + -1;
      } while (-1 < lVar5);
    }
    if (0 < param_4) {
      lVar5 = lVar6 * 8;
      do {
        lVar7 = FUN_1401a7bb0(param_1);
        puVar1 = (undefined8 *)(lVar5 + param_3 + lVar6 * -8);
        lVar5 = lVar5 + 8;
        lVar8 = lVar8 + -1;
        *(undefined8 *)(lVar7 + -8 + lVar5) = *puVar1;
      } while (lVar8 != 0);
    }
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_140188250(undefined8 param_1,longlong param_2)

{
  if ((*(longlong *)(param_2 + 8) == 0) && (*(longlong *)(param_2 + 0x10) == 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401561e0(param_1,param_2,param_2);
  }
  return;
}



undefined8 FUN_140188280(longlong *param_1,int *param_2,longlong param_3)

{
  int iVar1;
  longlong lVar2;
  char cVar3;
  int iVar4;
  longlong lVar5;
  int iVar6;
  longlong lVar7;
  int local_res10 [4];
  ulonglong local_res20;
  undefined4 local_28 [4];
  
  iVar1 = *param_2;
  cVar3 = FUN_140154a70(param_2,local_28);
  if (cVar3 != '\0') {
    cVar3 = FUN_140154a70(param_2,&local_res20);
    if (cVar3 != '\0') {
      iVar4 = (**(code **)(*param_1 + 0xd0))(param_1);
      iVar6 = (int)local_res20;
      if (iVar6 <= iVar4) {
        local_res10[0] = iVar6;
        FUN_140153d90(param_3);
        FUN_140154600(param_3,local_res20 & 0xffffffff);
        lVar7 = *(longlong *)(param_2 + 4);
        if (lVar7 == 0) {
          lVar5 = *(longlong *)(param_2 + 2);
          if (lVar5 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0();
          }
          if (*(int *)(lVar5 + 0x18) != 0) {
            lVar7 = *(longlong *)(lVar5 + 0x10);
          }
        }
        lVar5 = *(longlong *)(param_3 + 0x10);
        if (lVar5 == 0) {
          lVar2 = *(longlong *)(param_3 + 8);
          if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0();
          }
          if (*(int *)(lVar2 + 0x18) != 0) {
            lVar5 = *(longlong *)(lVar2 + 0x10);
          }
        }
        iVar4 = FUN_1401ac910(lVar5,local_res10,
                              lVar7 + ((int)(*param_2 + (*param_2 >> 0x1f & 7U)) >> 3),local_28[0]);
        if ((iVar4 == 0) && (local_res10[0] == iVar6)) {
          return 1;
        }
      }
    }
  }
  FUN_1401540a0(param_2,(int)((iVar1 >> 0x1f & 7U) + iVar1) >> 3);
  return 0;
}



undefined8 * FUN_140188390(undefined8 *param_1)

{
  *param_1 = Proud::CNetCoreImpl::vftable;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  param_1[5] = 0;
  param_1[1] = Proud::CFastArray<>::vftable;
  param_1[7] = 0;
  param_1[6] = Proud::CFastArray<>::vftable;
  param_1[8] = 0;
  param_1[9] = 0;
  param_1[10] = 0;
  param_1[0xb] = 0;
  return param_1;
}



void FUN_1401883e0(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  longlong *plVar2;
  
  *param_1 = Proud::CNetCoreImpl::vftable;
  puVar1 = (undefined8 *)param_1[0xb];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1,param_3,param_4,0xfffffffffffffffe);
  }
  param_1[6] = Proud::CFastArray<>::vftable;
  if (param_1[8] != 0) {
    plVar2 = (longlong *)param_1[7];
    if (plVar2 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar2 + 0x18))(plVar2,param_1[8]);
    }
  }
  param_1[1] = Proud::CFastArray<>::vftable;
  if (param_1[3] != 0) {
    plVar2 = (longlong *)param_1[2];
    if (plVar2 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar2 + 0x18))(plVar2,param_1[3]);
    }
  }
  *param_1 = Proud::IRmiHost::vftable;
  return;
}



void FUN_140188490(longlong *param_1,longlong param_2)

{
  char cVar1;
  int iVar2;
  longlong lVar3;
  longlong lVar4;
  int iVar5;
  longlong lVar6;
  longlong *plVar7;
  longlong lVar8;
  int iVar9;
  undefined1 local_68 [80];
  
  cVar1 = (**(code **)(*param_1 + 0x90))();
  if (cVar1 != '\0') {
    FUN_140156300(local_68,PTR_u_Already_async_callback_may_occur_140320fd8);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_68,(ThrowInfo *)&DAT_14031d928);
  }
  iVar5 = 0;
  lVar6 = 0;
  if (0 < (int)param_1[4]) {
    plVar7 = param_1 + 1;
    while( true ) {
      if ((lVar6 < 0) || ((int)param_1[4] <= iVar5)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      if (*(longlong *)(param_1[3] + lVar6 * 8) == param_2) break;
      iVar5 = iVar5 + 1;
      lVar6 = lVar6 + 1;
      if ((int)param_1[4] <= iVar5) {
        return;
      }
    }
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    iVar2 = (int)param_1[4] - iVar5;
    iVar9 = 1;
    if (iVar2 < 2) {
      iVar9 = iVar2;
    }
    iVar5 = ((int)param_1[4] - iVar9) - iVar5;
    if (0 < iVar5) {
      lVar8 = (longlong)iVar5;
      lVar6 = lVar6 * 8;
      do {
        lVar3 = FUN_1401a7bb0(plVar7);
        lVar4 = FUN_1401a7bb0(plVar7);
        *(undefined8 *)(lVar4 + lVar6) = *(undefined8 *)((longlong)iVar9 * 8 + lVar3 + lVar6);
        lVar6 = lVar6 + 8;
        lVar8 = lVar8 + -1;
      } while (lVar8 != 0);
    }
    FUN_14015d550(plVar7,(int)param_1[4] - iVar9);
    *(undefined8 *)(param_2 + 8) = 0;
  }
  return;
}



void FUN_1401885f0(longlong param_1,longlong param_2)

{
  longlong lVar1;
  int iVar2;
  longlong lVar3;
  longlong lVar4;
  int iVar5;
  longlong lVar6;
  longlong lVar7;
  int iVar8;
  
  iVar5 = 0;
  lVar6 = 0;
  if (0 < *(int *)(param_1 + 0x48)) {
    lVar1 = param_1 + 0x30;
    while( true ) {
      if ((lVar6 < 0) || (*(int *)(param_1 + 0x48) <= iVar5)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      if (*(longlong *)(*(longlong *)(param_1 + 0x40) + lVar6 * 8) == param_2) break;
      iVar5 = iVar5 + 1;
      lVar6 = lVar6 + 1;
      if (*(int *)(param_1 + 0x48) <= iVar5) {
        return;
      }
    }
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    iVar2 = *(int *)(param_1 + 0x48) - iVar5;
    iVar8 = 1;
    if (iVar2 < 2) {
      iVar8 = iVar2;
    }
    iVar5 = (*(int *)(param_1 + 0x48) - iVar8) - iVar5;
    if (0 < iVar5) {
      lVar7 = (longlong)iVar5;
      lVar6 = lVar6 * 8;
      do {
        lVar3 = FUN_1401a7bb0(lVar1);
        lVar4 = FUN_1401a7bb0(lVar1);
        *(undefined8 *)(lVar4 + lVar6) = *(undefined8 *)((longlong)iVar8 * 8 + lVar3 + lVar6);
        lVar6 = lVar6 + 8;
        lVar7 = lVar7 + -1;
      } while (lVar7 != 0);
    }
    FUN_14015d550(lVar1,*(int *)(param_1 + 0x48) - iVar8);
    *(undefined8 *)(param_2 + 0x10) = 0;
  }
  return;
}



void * FUN_140188710(void *param_1,uint param_2)

{
  FUN_1401883e0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140188740(longlong param_1)

{
  uint uVar1;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong uVar2;
  
  uVar3 = 0;
  uVar2 = uVar3;
  uVar4 = uVar3;
  if (0 < *(int *)(param_1 + 0x20)) {
    do {
      if (((longlong)uVar4 < 0) || (*(int *)(param_1 + 0x20) <= (int)uVar2)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      uVar1 = (int)uVar2 + 1;
      uVar2 = (ulonglong)uVar1;
      uVar4 = uVar4 + 1;
      *(undefined8 *)(*(longlong *)(*(longlong *)(param_1 + 0x18) + -8 + uVar4 * 8) + 8) = 0;
    } while ((int)uVar1 < *(int *)(param_1 + 0x20));
  }
  FUN_14015d550(param_1 + 8,0);
  uVar2 = uVar3;
  if (0 < *(int *)(param_1 + 0x48)) {
    do {
      if (((longlong)uVar3 < 0) || (*(int *)(param_1 + 0x48) <= (int)uVar2)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      uVar1 = (int)uVar2 + 1;
      uVar2 = (ulonglong)uVar1;
      uVar3 = uVar3 + 1;
      *(undefined8 *)(*(longlong *)(*(longlong *)(param_1 + 0x40) + -8 + uVar3 * 8) + 0x10) = 0;
    } while ((int)uVar1 < *(int *)(param_1 + 0x48));
  }
  FUN_14015d550(param_1 + 0x30,0);
  return;
}



void FUN_1401887e0(longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  char cVar2;
  short sVar3;
  ushort uVar4;
  ushort uVar5;
  int iVar6;
  ushort uVar7;
  ushort uVar8;
  ushort uVar9;
  int iVar10;
  longlong lVar11;
  longlong *local_res10;
  undefined1 local_78 [80];
  
  local_res10 = param_2;
  cVar2 = (**(code **)(*param_1 + 0x90))();
  if (cVar2 != '\0') {
    FUN_140156300(local_78,PTR_u_Already_async_callback_may_occur_140320fd8);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
  }
  iVar10 = 0;
  lVar11 = 0;
  if (0 < (int)param_1[4]) {
    do {
      if ((lVar11 < 0) || ((int)param_1[4] <= iVar10)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      plVar1 = *(longlong **)(param_1[3] + lVar11 * 8);
      iVar6 = (**(code **)*plVar1)(plVar1);
      if (0xfff9 < iVar6) {
LAB_1401889ab:
        FUN_140156300(local_78,PTR_u_Wrong_RMI_ID_is_found__RMI_ID_sh_140320fd0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
      }
      iVar6 = (**(code **)(*plVar1 + 8))(plVar1);
      if (iVar6 < 1) goto LAB_1401889ab;
      sVar3 = (**(code **)(*param_2 + 8))(param_2);
      uVar7 = sVar3 + 1;
      uVar4 = (**(code **)*param_2)(param_2);
      sVar3 = (**(code **)(*plVar1 + 8))(plVar1);
      uVar8 = sVar3 + 1;
      uVar5 = (**(code **)*plVar1)(plVar1);
      uVar9 = uVar8;
      if (uVar8 < uVar5) {
        uVar9 = uVar5;
        uVar5 = uVar8;
      }
      uVar8 = uVar7;
      if (uVar7 < uVar4) {
        uVar8 = uVar4;
        uVar4 = uVar7;
      }
      if (uVar5 < uVar4) {
LAB_140188904:
        if ((uVar8 <= uVar9) || ((uVar4 <= uVar9 && (uVar9 <= uVar8)))) goto LAB_140188988;
        if (uVar4 <= uVar5) goto LAB_140188919;
      }
      else {
        if (uVar9 <= uVar8) goto LAB_140188988;
        if (uVar5 <= uVar4) goto LAB_140188904;
LAB_140188919:
        if ((uVar5 <= uVar8) && (uVar8 <= uVar9)) {
LAB_140188988:
          FUN_140156300(local_78,PTR_u_Duplicated_RMI_ID_is_found__Revi_140320fc8);
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
        }
      }
      iVar10 = iVar10 + 1;
      lVar11 = lVar11 + 1;
    } while (iVar10 < (int)param_1[4]);
  }
  param_2[1] = (longlong)param_1;
  FUN_140188160(param_1 + 1,(int)param_1[4],&local_res10,1);
  return;
}



void FUN_1401889e0(longlong param_1,longlong *param_2)

{
  longlong *plVar1;
  short sVar2;
  ushort uVar3;
  ushort uVar4;
  longlong lVar5;
  longlong lVar6;
  int iVar7;
  ushort uVar8;
  ushort uVar9;
  ushort uVar10;
  longlong lVar11;
  int iVar12;
  longlong lVar13;
  undefined1 local_78 [80];
  
  iVar12 = 0;
  lVar13 = 0;
  if (0 < *(int *)(param_1 + 0x48)) {
    do {
      if ((lVar13 < 0) || (*(int *)(param_1 + 0x48) <= iVar12)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x40) + lVar13 * 8);
      sVar2 = (**(code **)(*param_2 + 8))(param_2);
      uVar10 = sVar2 + 1;
      uVar3 = (**(code **)*param_2)(param_2);
      sVar2 = (**(code **)(*plVar1 + 8))(plVar1);
      uVar8 = sVar2 + 1;
      uVar4 = (**(code **)*plVar1)(plVar1);
      uVar9 = uVar8;
      if (uVar8 < uVar4) {
        uVar9 = uVar4;
        uVar4 = uVar8;
      }
      uVar8 = uVar10;
      if (uVar10 < uVar3) {
        uVar8 = uVar3;
        uVar3 = uVar10;
      }
      if (uVar4 < uVar3) {
LAB_140188a8d:
        if ((uVar8 <= uVar9) || ((uVar3 <= uVar9 && (uVar9 <= uVar8)))) goto LAB_140188b62;
        if (uVar3 <= uVar4) goto LAB_140188aaa;
      }
      else {
        if (uVar9 <= uVar8) goto LAB_140188b62;
        if (uVar4 <= uVar3) goto LAB_140188a8d;
LAB_140188aaa:
        if ((uVar4 <= uVar8) && (uVar8 <= uVar9)) {
LAB_140188b62:
          FUN_140156300(local_78,PTR_u_Duplicated_RMI_ID_is_found__Revi_140320fc8);
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
        }
      }
      iVar12 = iVar12 + 1;
      lVar13 = lVar13 + 1;
    } while (iVar12 < *(int *)(param_1 + 0x48));
  }
  param_2[2] = param_1;
  iVar12 = *(int *)(param_1 + 0x48);
  if (-1 < iVar12) {
    iVar7 = *(int *)(param_1 + 0x48);
    FUN_14015d550(param_1 + 0x30,iVar7 + 1);
    iVar7 = iVar7 - iVar12;
    if ((0 < iVar7) && (iVar7 = iVar7 + -1, lVar13 = (longlong)iVar7, -1 < iVar7)) {
      lVar11 = (lVar13 + iVar12) * 8 + 8;
      do {
        lVar5 = FUN_1401a7bb0(param_1 + 0x30);
        lVar6 = FUN_1401a7bb0(param_1 + 0x30);
        *(undefined8 *)(lVar6 + lVar11) = *(undefined8 *)(lVar5 + -8 + lVar11);
        lVar11 = lVar11 + -8;
        lVar13 = lVar13 + -1;
      } while (-1 < lVar13);
    }
    lVar13 = FUN_1401a7bb0(param_1 + 0x30);
    *(longlong **)(lVar13 + (longlong)iVar12 * 8) = param_2;
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined1
FUN_140188ba0(longlong *param_1,undefined8 param_2,undefined4 param_3,longlong param_4,
             undefined8 param_5,int param_6)

{
  undefined1 uVar1;
  int iVar2;
  longlong lVar3;
  undefined1 auStack_1ad8 [32];
  longlong local_1ab8;
  undefined8 local_1aa8;
  int iStack_1aa0;
  undefined4 uStack_1a9c;
  undefined4 local_1a98;
  undefined4 local_1a94;
  undefined8 local_1a90;
  undefined4 local_1a88;
  undefined8 local_1a80;
  undefined4 local_1a78;
  undefined4 local_1a74;
  undefined4 local_1a70;
  undefined1 local_1a6c;
  undefined1 local_1a6b;
  undefined1 local_1a6a;
  undefined4 local_1a68;
  undefined8 local_1a60;
  undefined1 local_1a58;
  undefined1 local_1a57;
  undefined4 local_1a50;
  undefined4 local_1a4c;
  wchar_t *local_1a48;
  undefined4 local_1a40;
  undefined4 local_1a3c;
  undefined8 local_1a38;
  undefined1 local_1a28 [8];
  longlong local_1a20;
  longlong local_1a18;
  undefined4 local_1a10;
  int local_1a0c;
  undefined1 local_1a00 [136];
  undefined1 local_1978 [3200];
  undefined1 *local_cf8;
  int local_cf0;
  int local_cec;
  undefined4 local_ce8;
  undefined4 uStack_ce4;
  undefined4 uStack_ce0;
  undefined4 uStack_cdc;
  undefined4 *local_68;
  undefined4 local_60;
  int local_5c;
  ulonglong local_58;
  undefined8 uStack_48;
  
  uStack_48 = 0x140188bbf;
  local_1a38 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_1ad8;
  FUN_140157c50(param_4);
  FUN_1401544a0(local_1a28);
  FUN_140154120(local_1a28,local_1a00,0x80);
  FUN_14004fd90(local_1a28,2);
  FUN_140155b20(local_1a28,(longlong)param_6);
  local_cec = 200;
  local_cf0 = 0;
  local_cf8 = local_1978;
  local_5c = 200;
  local_60 = 0;
  local_68 = &local_ce8;
  if (local_1a20 == 0) {
    if (local_1a18 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else {
    local_1a10 = *(undefined4 *)(local_1a20 + 0x18);
  }
  lVar3 = local_1a18;
  if (local_1a18 == 0) {
    if (local_1a20 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    lVar3 = 0;
    if (*(int *)(local_1a20 + 0x18) != 0) {
      lVar3 = *(longlong *)(local_1a20 + 0x10);
    }
  }
  local_60 = 1;
  local_1aa8._0_4_ = (undefined4)lVar3;
  local_1aa8._4_4_ = (undefined4)((ulonglong)lVar3 >> 0x20);
  local_ce8 = (undefined4)local_1aa8;
  uStack_ce4 = local_1aa8._4_4_;
  uStack_cdc = uStack_1a9c;
  local_1aa8 = (longlong *)lVar3;
  iStack_1aa0 = local_1a10;
  uStack_ce0 = local_1a10;
  FUN_140156ed0(local_1978,&local_ce8);
  if (local_68 == (undefined4 *)0x0) {
    FUN_140156300(&local_1a98,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(&local_1a98,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_5c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  iStack_1aa0 = param_6;
  if (local_cf8 == (undefined1 *)0x0) {
    FUN_140156300(&local_1a98,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(&local_1a98,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_cf0 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  iVar2 = local_cf0 + 1;
  if ((iVar2 < 0) || (local_cec < iVar2)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(undefined8 *)(local_cf8 + (longlong)local_cf0 * 0x10) = param_5;
  *(ulonglong *)(local_cf8 + (longlong)local_cf0 * 0x10 + 8) = CONCAT44(uStack_1a9c,param_6);
  local_1a98 = *(undefined4 *)(param_4 + 0x2c);
  local_1a94 = *(undefined4 *)(param_4 + 8);
  local_1a90 = *(undefined8 *)(param_4 + 0x10);
  local_1a88 = *(undefined4 *)(param_4 + 0x18);
  local_1a80 = *(undefined8 *)(param_4 + 0x20);
  local_1a78 = *(undefined4 *)(param_4 + 0x28);
  local_1a6b = *(undefined1 *)(param_4 + 0x30);
  local_1a6c = *(undefined1 *)(param_4 + 0x40);
  local_1a6a = *(undefined1 *)(param_4 + 0x41);
  local_1a74 = *(undefined4 *)(param_4 + 0x54);
  local_1a68 = 0xffffffff;
  local_1a60 = *(undefined8 *)(param_4 + 0x48);
  local_1a57 = *(undefined1 *)(param_4 + 0x50);
  local_1a58 = DAT_140320dfc;
  local_1a70 = *(undefined4 *)(param_4 + 0x58);
  local_1ab8 = CONCAT44(local_1ab8._4_4_,param_3);
  local_cf0 = iVar2;
  uVar1 = (**(code **)(*param_1 + 0x28))(param_1,local_1978,&local_1a98,param_2);
  local_1a50 = FUN_1401843d0(local_1978);
  local_1a4c = 0;
  local_1a48 = L"<User Defined Message>";
  local_1a40 = *(undefined4 *)(param_4 + 0x54);
  local_1a3c = *(undefined4 *)(param_4 + 0x58);
  local_1ab8 = param_4;
  (**(code **)(*param_1 + 0x68))(param_1,param_2,param_3,&local_1a50);
  if (local_cf8 == (undefined1 *)0x0) {
    FUN_140156300(&local_1a98,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(&local_1a98,(ThrowInfo *)&DAT_14031d928);
  }
  if (-1 < local_cec) {
    local_cf0 = 0;
    local_1aa8 = &local_1a20;
    FUN_1401560e0(&local_1a20);
    if ((local_1a18 != 0) && (local_1a0c < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    return uVar1;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_140188f10(longlong *param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  lVar1 = (**(code **)(*param_1 + 0x98))();
  if (lVar1 != 0) {
    plVar2 = (longlong *)(**(code **)(*param_1 + 0x98))(param_1);
    uVar3 = 0;
    if (*param_2 != 0) {
      uVar3 = *(undefined8 *)(*param_2 + 0x38);
    }
    (**(code **)(*plVar2 + 8))(plVar2,uVar3,param_3,param_4,uVar4);
  }
  FUN_14013c530(param_2);
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_140188f70(longlong *param_1,undefined8 param_2,int *param_3,undefined8 param_4,
                       undefined4 param_5)

{
  undefined *puVar1;
  undefined4 uVar2;
  byte bVar3;
  char cVar4;
  int iVar5;
  uint uVar6;
  uint uVar7;
  uint uVar8;
  undefined8 uVar9;
  int *piVar10;
  uint *puVar11;
  undefined8 uVar12;
  undefined *extraout_RAX;
  undefined *puVar13;
  ulonglong uVar14;
  longlong lVar15;
  uint *puVar16;
  uint uVar17;
  uint uVar18;
  int iVar19;
  undefined1 auStack_1d58 [32];
  undefined ***local_1d38;
  uint *local_1d28;
  int local_1d20;
  uint *local_1d18;
  undefined8 local_1d10;
  undefined2 local_1d08 [4];
  undefined *local_1d00;
  undefined **local_1cf8;
  undefined8 local_1cf0;
  undefined8 local_1ce8;
  undefined8 local_1ce0;
  undefined8 local_1cd8;
  undefined8 local_1cb0;
  undefined8 local_1ca8;
  undefined1 local_1ca0;
  undefined1 local_1c98 [8];
  undefined1 local_1c90 [8];
  longlong local_1c88;
  undefined4 local_1c80;
  int local_1c7c;
  undefined1 *local_1c70;
  undefined1 local_1c68 [8];
  longlong local_1c60;
  longlong local_1c58;
  int local_1c50;
  int local_1c4c;
  undefined8 local_1c40;
  undefined1 local_1c38;
  undefined8 local_1c30;
  undefined1 local_1c28;
  undefined8 local_1c20;
  undefined1 local_1c18;
  undefined8 local_1c10;
  undefined4 uStack_1c08;
  undefined4 uStack_1c04;
  undefined8 local_1c00;
  int iStack_1bf8;
  undefined4 uStack_1bf4;
  undefined1 local_1bf0 [8];
  undefined1 local_1be8 [8];
  undefined8 local_1be0;
  undefined1 local_1bd8 [8];
  longlong local_1bd0;
  longlong local_1bc8;
  undefined4 local_1bc0;
  int local_1bbc;
  undefined1 local_1bb0 [136];
  void *local_1b28;
  longlong local_1b20;
  ulonglong local_1b18;
  undefined8 local_1b10;
  int local_1b08 [100];
  undefined4 local_1978;
  undefined4 uStack_1974;
  int iStack_1970;
  undefined4 uStack_196c;
  undefined4 *local_cf8;
  undefined4 local_cf0;
  int local_cec;
  undefined1 local_ce8 [3200];
  undefined1 *local_68;
  undefined4 local_60;
  int local_5c;
  ulonglong local_58;
  undefined8 uStack_48;
  
  uStack_48 = 0x140188f8f;
  local_1be0 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_1d58;
  bVar3 = 0;
  local_1cb0 = param_2;
  if ((param_3[9] == 0) || (*param_3 == 2)) {
    local_1d38 = (undefined ***)CONCAT44(local_1d38._4_4_,param_5);
    uVar14 = (**(code **)(*param_1 + 0x78))();
  }
  else {
    uVar9 = (**(code **)(*param_1 + 0x58))();
    local_1c40 = uVar9;
    FUN_140156b50(uVar9);
    local_1c38 = 1;
    if (DAT_1403288ef != '\0') {
      (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetCoreImpl::Send_SecureLayer");
    }
    local_1b28 = (void *)0x0;
    local_1b10 = 0;
    local_1b20 = 0;
    local_1b18 = 100;
    (**(code **)(*param_1 + 0x50))(param_1,param_5,param_4,&local_1b28);
    FUN_140156be0(uVar9);
    local_1c38 = 0;
    FUN_1401568c0();
    local_1d00 = PTR_DAT_1403200a0;
    iVar19 = 0;
    local_1d10 = (longlong *)((ulonglong)local_1d10._4_4_ << 0x20);
    if (0 < local_1b20) {
      lVar15 = 0;
      do {
        if ((lVar15 < 0) || (local_1b20 <= lVar15)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        if (local_1b18 < 0x65) {
          piVar10 = local_1b08 + lVar15;
        }
        else {
          piVar10 = (int *)((longlong)local_1b28 + lVar15 * 4);
        }
        local_1d20 = *piVar10;
        iVar5 = (**(code **)(*param_1 + 0x30))(param_1);
        if (iVar5 == local_1d20) {
          local_1d38 = (undefined ***)CONCAT44(local_1d38._4_4_,1);
          bVar3 = (**(code **)(*param_1 + 0x78))(param_1,param_2,param_3);
        }
        else {
          lVar15 = (**(code **)(*param_1 + 0xc0))(param_1,local_1d20,&local_1d00);
          if (lVar15 == 0) {
            uVar9 = (**(code **)(*param_1 + 0x58))(param_1);
            local_1ca8 = uVar9;
            FUN_140156b50(uVar9);
            local_1ca0 = 1;
            if (DAT_1403288ef != '\0') {
              (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetCoreImpl::Send_SecureLayer");
            }
            if (((local_1d00 == (undefined *)0x0) || (local_1d00 == PTR_DAT_1403200a0)) ||
               (*(int *)(local_1d00 + -8) < 1)) {
              FUN_1401568c0();
              local_1d28 = (uint *)PTR_DAT_1403200a0;
              uVar6 = FUN_140156740(
                                   L"CStartServerParameter.m_enableP2PEncryptedMessaging=false. P2P Messaging can not encrypted!!"
                                   );
              uVar17 = 0;
              uVar18 = 0;
              if ((local_1d28 != (uint *)0x0) &&
                 (uVar18 = 0, local_1d28 != (uint *)PTR_DAT_1403200a0)) {
                uVar18 = local_1d28[-2];
              }
              uVar7 = uVar6;
              if ((((int)uVar6 <= (int)uVar18) && (uVar7 = uVar17, local_1d28 != (uint *)0x0)) &&
                 (local_1d28 != (uint *)PTR_DAT_1403200a0)) {
                uVar7 = local_1d28[-2];
              }
              uVar18 = 1;
              if (1 < (int)uVar7) {
                uVar18 = uVar7;
              }
              uVar8 = 0;
              uVar7 = uVar8;
              if ((local_1d28 != (uint *)0x0) && (local_1d28 != (uint *)PTR_DAT_1403200a0)) {
                uVar7 = local_1d28[-2];
              }
              if ((int)uVar7 < (int)uVar18) {
                if (local_1d28 == (uint *)0x0) {
                  local_1d28 = (uint *)PTR_DAT_1403200a0;
                }
                if ((int)uVar18 < 0) {
                    // WARNING: Subroutine does not return
                  FUN_1401566b0();
                }
                if (uVar18 == 0) {
                  FUN_14004f990(&local_1d28);
                }
                else {
                  uVar7 = uVar8;
                  if ((local_1d28 != (uint *)0x0) && (local_1d28 != (uint *)PTR_DAT_1403200a0)) {
                    uVar7 = local_1d28[-2];
                  }
                  if (uVar18 != uVar7) {
                    puVar11 = (uint *)FUN_140156940((longlong)(int)uVar18 * 2 + 10);
                    if (puVar11 != (uint *)0x0) {
                      *puVar11 = 0;
                      puVar11[1] = 1;
                    }
                    *puVar11 = uVar18;
                    if ((local_1d28 != (uint *)0x0) && (local_1d28 != (uint *)PTR_DAT_1403200a0)) {
                      uVar8 = local_1d28[-2];
                    }
                    puVar16 = (uint *)PTR_DAT_1403200a0;
                    if ((int)uVar18 < (int)uVar8) {
LAB_1401898c7:
                      if (local_1d28 != (uint *)0x0) {
                        puVar16 = local_1d28;
                      }
                    }
                    else {
                      uVar18 = uVar17;
                      if (local_1d28 != (uint *)0x0) {
                        if (local_1d28 != (uint *)PTR_DAT_1403200a0) {
                          uVar18 = local_1d28[-2];
                        }
                        goto LAB_1401898c7;
                      }
                    }
                    FUN_140156770(puVar11 + 2,puVar16,uVar18);
                    FUN_14004f990(&local_1d28);
                    local_1d28 = puVar11 + 2;
                  }
                }
              }
              FUN_14004f670(&local_1d28);
              puVar11 = local_1d28;
              if (local_1d28 == (uint *)0x0) {
                puVar11 = (uint *)PTR_DAT_1403200a0;
              }
              FUN_140156770(puVar11,
                            L"CStartServerParameter.m_enableP2PEncryptedMessaging=false. P2P Messaging can not encrypted!!"
                            ,uVar6);
              puVar11 = local_1d28;
              if (local_1d28 == (uint *)0x0) {
                puVar11 = (uint *)PTR_DAT_1403200a0;
              }
              uVar6 = FUN_140156740(puVar11);
              uVar17 = 0;
              uVar18 = 0;
              if (0 < (int)uVar6) {
                uVar18 = uVar6;
              }
              uVar6 = uVar17;
              if ((local_1d28 != (uint *)0x0) && (local_1d28 != (uint *)PTR_DAT_1403200a0)) {
                uVar6 = local_1d28[-2];
              }
              if (((int)uVar18 < (int)uVar6) || (uVar18 = uVar17, local_1d28 == (uint *)0x0)) {
LAB_140189965:
                if (((local_1d28 != (uint *)PTR_DAT_1403200a0) && (local_1d28 != (uint *)0x0)) &&
                   (local_1d28 + -2 != (uint *)0x0)) {
                  local_1d28[-2] = uVar18;
                  *(undefined2 *)((longlong)local_1d28 + (longlong)(int)uVar18 * 2) = 0;
                }
              }
              else if (local_1d28 != (uint *)PTR_DAT_1403200a0) {
                uVar18 = local_1d28[-2];
                goto LAB_140189965;
              }
              local_1cf0 = 0;
              local_1ce8 = 0;
              local_1ce0 = 0;
              local_1cd8 = 0;
              local_1cf8 = Proud::ByteArray::vftable;
              local_1d38 = &local_1cf8;
              uVar12 = FUN_140181f50(&local_1c70,5,local_1d20,&local_1d28);
              (**(code **)(*param_1 + 0x80))(param_1,uVar12);
              FUN_1401858d0(&local_1cf8);
              FUN_14004f990(&local_1d28);
              param_2 = local_1cb0;
              iVar19 = (int)local_1d10;
            }
            else {
              local_1cf0 = 0;
              local_1ce8 = 0;
              local_1ce0 = 0;
              local_1cd8 = 0;
              local_1cf8 = Proud::ByteArray::vftable;
              local_1d38 = &local_1cf8;
              uVar12 = FUN_140181f50(local_1be8,5,local_1d20,&local_1d00);
              (**(code **)(*param_1 + 0x80))(param_1,uVar12);
              FUN_1401858d0(&local_1cf8);
            }
            FUN_140156be0(uVar9);
            local_1ca0 = 0;
          }
          else {
            uVar9 = (**(code **)(*param_1 + 0x58))();
            local_1c20 = uVar9;
            FUN_140156b50(uVar9);
            local_1c18 = 1;
            if (DAT_1403288ef != '\0') {
              (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetCoreImpl::Send_SecureLayer");
            }
            FUN_1401544a0(local_1c98);
            FUN_140153d90(local_1c98);
            if (*param_3 == 1) {
              cVar4 = (**(code **)(*param_1 + 0xa0))(param_1,local_1d20,local_1d08);
              if (cVar4 == '\0') {
                FUN_1401568c0();
                local_1d28 = (uint *)PTR_DAT_1403200a0;
                uVar6 = FUN_140156740(&DAT_140264fa0);
                uVar17 = 0;
                uVar18 = 0;
                if ((local_1d28 != (uint *)0x0) &&
                   (uVar18 = 0, local_1d28 != (uint *)PTR_DAT_1403200a0)) {
                  uVar18 = local_1d28[-2];
                }
                uVar7 = uVar6;
                if ((((int)uVar6 <= (int)uVar18) && (uVar7 = uVar17, local_1d28 != (uint *)0x0)) &&
                   (local_1d28 != (uint *)PTR_DAT_1403200a0)) {
                  uVar7 = local_1d28[-2];
                }
                uVar18 = 1;
                if (1 < (int)uVar7) {
                  uVar18 = uVar7;
                }
                uVar7 = uVar17;
                if ((local_1d28 != (uint *)0x0) && (local_1d28 != (uint *)PTR_DAT_1403200a0)) {
                  uVar7 = local_1d28[-2];
                }
                uVar8 = 0;
                if ((int)uVar7 < (int)uVar18) {
                  if (local_1d28 == (uint *)0x0) {
                    local_1d28 = (uint *)PTR_DAT_1403200a0;
                  }
                  if ((int)uVar18 < 0) {
                    // WARNING: Subroutine does not return
                    FUN_1401566b0();
                  }
                  if (uVar18 == 0) {
                    FUN_14004f990(&local_1d28);
                  }
                  else {
                    uVar7 = uVar17;
                    if ((local_1d28 != (uint *)0x0) && (local_1d28 != (uint *)PTR_DAT_1403200a0)) {
                      uVar7 = local_1d28[-2];
                    }
                    if (uVar18 != uVar7) {
                      puVar11 = (uint *)FUN_140156940((longlong)(int)uVar18 * 2 + 10);
                      if (puVar11 != (uint *)0x0) {
                        *puVar11 = 0;
                        puVar11[1] = 1;
                      }
                      *puVar11 = uVar18;
                      uVar7 = uVar8;
                      if ((local_1d28 != (uint *)0x0) && (local_1d28 != (uint *)PTR_DAT_1403200a0))
                      {
                        uVar7 = local_1d28[-2];
                      }
                      puVar16 = (uint *)PTR_DAT_1403200a0;
                      if ((int)uVar18 < (int)uVar7) {
LAB_140189b1d:
                        if (local_1d28 != (uint *)0x0) {
                          puVar16 = local_1d28;
                        }
                      }
                      else {
                        uVar18 = uVar17;
                        if (local_1d28 != (uint *)0x0) {
                          if (local_1d28 != (uint *)PTR_DAT_1403200a0) {
                            uVar18 = local_1d28[-2];
                          }
                          goto LAB_140189b1d;
                        }
                      }
                      FUN_140156770(puVar11 + 2,puVar16,uVar18);
                      FUN_14004f990(&local_1d28);
                      local_1d28 = puVar11 + 2;
                    }
                  }
                }
                FUN_14004f670(&local_1d28);
                puVar11 = local_1d28;
                if (local_1d28 == (uint *)0x0) {
                  puVar11 = (uint *)PTR_DAT_1403200a0;
                }
                FUN_140156770(puVar11,&DAT_140264fa0,uVar6);
                puVar11 = local_1d28;
                if (local_1d28 == (uint *)0x0) {
                  puVar11 = (uint *)PTR_DAT_1403200a0;
                }
                uVar6 = FUN_140156740(puVar11);
                uVar18 = 0;
                if (0 < (int)uVar6) {
                  uVar18 = uVar6;
                }
                uVar6 = uVar8;
                if ((local_1d28 != (uint *)0x0) && (local_1d28 != (uint *)PTR_DAT_1403200a0)) {
                  uVar6 = local_1d28[-2];
                }
                if (((int)uVar6 <= (int)uVar18) && (uVar18 = uVar8, local_1d28 != (uint *)0x0)) {
                  if (local_1d28 == (uint *)PTR_DAT_1403200a0) goto LAB_140189bd7;
                  uVar18 = local_1d28[-2];
                }
                if (((local_1d28 != (uint *)PTR_DAT_1403200a0) && (local_1d28 != (uint *)0x0)) &&
                   (local_1d28 + -2 != (uint *)0x0)) {
                  local_1d28[-2] = uVar18;
                  *(undefined2 *)((longlong)local_1d28 + (longlong)(int)uVar18 * 2) = 0;
                }
LAB_140189bd7:
                local_1cf0 = 0;
                local_1ce8 = 0;
                local_1ce0 = 0;
                local_1cd8 = 0;
                local_1cf8 = Proud::ByteArray::vftable;
                local_1d38 = &local_1cf8;
                uVar12 = FUN_140181f50(&local_1c70,5,local_1d20,&local_1d28);
                (**(code **)(*param_1 + 0x80))(param_1,uVar12);
                FUN_1401858d0(&local_1cf8);
                puVar11 = local_1d28;
                if (((local_1d28 != (uint *)0x0) && (local_1d28 != (uint *)PTR_DAT_1403200a0)) &&
                   (puVar16 = local_1d28 + -2, puVar16 != (uint *)0x0)) {
                  uVar12 = FUN_1401568c0();
                  local_1ca8 = uVar12;
                  FUN_140156b50(uVar12);
                  local_1ca0 = 1;
                  puVar11 = puVar11 + -1;
                  *puVar11 = *puVar11 - 1;
                  if (*puVar11 == 0) {
                    FUN_140156970(puVar16);
                  }
                  FUN_140156be0(uVar12);
                }
                local_1c70 = local_1c90;
                FUN_1401560e0(local_1c90);
                if (local_1c88 != 0) {
                  if (local_1c7c < 0) {
                    // WARNING: Subroutine does not return
                    FUN_1401566b0();
                  }
                  local_1c80 = 0;
                }
                FUN_140156be0(uVar9);
                puVar13 = local_1d00;
                if (((local_1d00 != (undefined *)0x0) && (local_1d00 != PTR_DAT_1403200a0)) &&
                   (puVar1 = local_1d00 + -8, puVar1 != (undefined *)0x0)) {
                  uVar9 = FUN_1401568c0();
                  local_1ca8 = uVar9;
                  FUN_140156b50(uVar9);
                  local_1ca0 = 1;
                  piVar10 = (int *)(puVar13 + -4);
                  *piVar10 = *piVar10 + -1;
                  if (*piVar10 == 0) {
                    FUN_140156970(puVar1);
                  }
                  FUN_140156be0(uVar9);
                }
                local_1d00 = PTR_DAT_1403200a0;
                puVar13 = PTR_DAT_1403200a0;
                if (100 < local_1b18) {
                  operator_delete__(local_1b28);
                  puVar13 = extraout_RAX;
                }
                return (ulonglong)puVar13 & 0xffffffffffffff00;
              }
              FUN_140050340(local_1c98,local_1d08[0]);
            }
            FUN_140154880(local_1c98,param_2);
            FUN_1401544a0(local_1c68);
            FUN_140153d90(local_1c68);
            if (param_3[9] == 1) {
              cVar4 = FUN_14019a480(local_1c98,local_1c68,lVar15);
            }
            else {
              cVar4 = FUN_1401a9bb0(local_1c98,local_1c68,lVar15 + 0x3d0,0);
            }
            if (cVar4 == '\0') {
              FUN_1401568c0();
              local_1d18 = (uint *)PTR_DAT_1403200a0;
              uVar6 = FUN_140156740(L"Encrypt Error");
              uVar17 = 0;
              uVar18 = 0;
              if ((local_1d18 != (uint *)0x0) &&
                 (uVar18 = 0, local_1d18 != (uint *)PTR_DAT_1403200a0)) {
                uVar18 = local_1d18[-2];
              }
              uVar7 = uVar6;
              if ((((int)uVar6 <= (int)uVar18) && (uVar7 = uVar17, local_1d18 != (uint *)0x0)) &&
                 (local_1d18 != (uint *)PTR_DAT_1403200a0)) {
                uVar7 = local_1d18[-2];
              }
              uVar18 = 1;
              if (1 < (int)uVar7) {
                uVar18 = uVar7;
              }
              uVar8 = 0;
              uVar7 = uVar8;
              if ((local_1d18 != (uint *)0x0) && (local_1d18 != (uint *)PTR_DAT_1403200a0)) {
                uVar7 = local_1d18[-2];
              }
              if ((int)uVar7 < (int)uVar18) {
                if (local_1d18 == (uint *)0x0) {
                  local_1d18 = (uint *)PTR_DAT_1403200a0;
                }
                if ((int)uVar18 < 0) {
                    // WARNING: Subroutine does not return
                  FUN_1401566b0();
                }
                if (uVar18 == 0) {
                  FUN_14004f990(&local_1d18);
                }
                else {
                  uVar7 = uVar8;
                  if ((local_1d18 != (uint *)0x0) && (local_1d18 != (uint *)PTR_DAT_1403200a0)) {
                    uVar7 = local_1d18[-2];
                  }
                  if (uVar18 != uVar7) {
                    puVar11 = (uint *)FUN_140156940((longlong)(int)uVar18 * 2 + 10);
                    if (puVar11 != (uint *)0x0) {
                      *puVar11 = 0;
                      puVar11[1] = 1;
                    }
                    *puVar11 = uVar18;
                    if ((local_1d18 != (uint *)0x0) && (local_1d18 != (uint *)PTR_DAT_1403200a0)) {
                      uVar8 = local_1d18[-2];
                    }
                    puVar16 = (uint *)PTR_DAT_1403200a0;
                    if ((int)uVar18 < (int)uVar8) {
LAB_14018952c:
                      if (local_1d18 != (uint *)0x0) {
                        puVar16 = local_1d18;
                      }
                    }
                    else {
                      uVar18 = uVar17;
                      if (local_1d18 != (uint *)0x0) {
                        if (local_1d18 != (uint *)PTR_DAT_1403200a0) {
                          uVar18 = local_1d18[-2];
                        }
                        goto LAB_14018952c;
                      }
                    }
                    FUN_140156770(puVar11 + 2,puVar16,uVar18);
                    FUN_14004f990(&local_1d18);
                    local_1d18 = puVar11 + 2;
                  }
                }
              }
              FUN_14004f670(&local_1d18);
              puVar11 = local_1d18;
              if (local_1d18 == (uint *)0x0) {
                puVar11 = (uint *)PTR_DAT_1403200a0;
              }
              FUN_140156770(puVar11,L"Encrypt Error",uVar6);
              puVar11 = local_1d18;
              if (local_1d18 == (uint *)0x0) {
                puVar11 = (uint *)PTR_DAT_1403200a0;
              }
              uVar6 = FUN_140156740(puVar11);
              uVar17 = 0;
              uVar18 = 0;
              if (0 < (int)uVar6) {
                uVar18 = uVar6;
              }
              uVar6 = uVar17;
              if ((local_1d18 != (uint *)0x0) && (local_1d18 != (uint *)PTR_DAT_1403200a0)) {
                uVar6 = local_1d18[-2];
              }
              if (((int)uVar18 < (int)uVar6) || (uVar18 = uVar17, local_1d18 == (uint *)0x0)) {
LAB_1401895ca:
                if (((local_1d18 != (uint *)PTR_DAT_1403200a0) && (local_1d18 != (uint *)0x0)) &&
                   (local_1d18 + -2 != (uint *)0x0)) {
                  local_1d18[-2] = uVar18;
                  *(undefined2 *)((longlong)local_1d18 + (longlong)(int)uVar18 * 2) = 0;
                }
              }
              else if (local_1d18 != (uint *)PTR_DAT_1403200a0) {
                uVar18 = local_1d18[-2];
                goto LAB_1401895ca;
              }
              local_1cf0 = 0;
              local_1ce8 = 0;
              local_1ce0 = 0;
              local_1cd8 = 0;
              local_1cf8 = Proud::ByteArray::vftable;
              local_1d38 = &local_1cf8;
              uVar12 = FUN_140181f50(local_1bf0,5,local_1d20);
              (**(code **)(*param_1 + 0x80))(param_1,uVar12);
              FUN_1401858d0(&local_1cf8);
              puVar11 = local_1d18;
              if (((local_1d18 != (uint *)0x0) && (local_1d18 != (uint *)PTR_DAT_1403200a0)) &&
                 (puVar16 = local_1d18 + -2, puVar16 != (uint *)0x0)) {
                uVar12 = FUN_1401568c0();
                local_1c30 = uVar12;
                FUN_140156b50(uVar12);
                local_1c28 = 1;
                puVar11 = puVar11 + -1;
                *puVar11 = *puVar11 - 1;
                if (*puVar11 == 0) {
                  FUN_140156970(puVar16);
                }
                FUN_140156be0(uVar12);
                local_1c28 = 0;
              }
              local_1d18 = (uint *)PTR_DAT_1403200a0;
              if (*param_3 == 1) {
                (**(code **)(*param_1 + 0xa8))(param_1,local_1d20);
              }
              param_2 = local_1cb0;
              iVar19 = (int)local_1d10;
            }
            else {
              FUN_1401544a0(local_1bd8);
              FUN_140154120(local_1bd8,local_1bb0,0x80);
              uVar12 = 0x24;
              if (*param_3 != 1) {
                uVar12 = 0x25;
              }
              FUN_14004fd90(local_1bd8,uVar12);
              FUN_14004fd90(local_1bd8,(char)param_3[9]);
              if (local_1c60 == 0) {
                iVar5 = local_1c50;
                if (local_1c58 == 0) {
                    // WARNING: Subroutine does not return
                  FUN_1401561e0();
                }
              }
              else {
                iVar5 = *(int *)(local_1c60 + 0x18);
              }
              FUN_140155b20(local_1bd8,(longlong)iVar5);
              local_5c = 200;
              local_60 = 0;
              local_68 = local_ce8;
              local_cec = 200;
              local_cf0 = 0;
              local_cf8 = &local_1978;
              if (local_1bd0 == 0) {
                uVar2 = local_1bc0;
                if (local_1bc8 == 0) {
                    // WARNING: Subroutine does not return
                  FUN_1401561e0();
                }
              }
              else {
                uVar2 = *(undefined4 *)(local_1bd0 + 0x18);
              }
              lVar15 = local_1bc8;
              if (local_1bc8 == 0) {
                if (local_1bd0 == 0) {
                    // WARNING: Subroutine does not return
                  FUN_1401561e0();
                }
                lVar15 = 0;
                if (*(int *)(local_1bd0 + 0x18) != 0) {
                  lVar15 = *(longlong *)(local_1bd0 + 0x10);
                }
              }
              local_cf0 = 1;
              local_1c10._0_4_ = (undefined4)lVar15;
              local_1c10._4_4_ = (undefined4)((ulonglong)lVar15 >> 0x20);
              local_1978 = (undefined4)local_1c10;
              uStack_1974 = local_1c10._4_4_;
              uStack_196c = uStack_1c04;
              local_1c10 = lVar15;
              uStack_1c08 = uVar2;
              iStack_1970 = uVar2;
              FUN_140156ed0(local_ce8,&local_1978);
              if (local_cf8 == (undefined4 *)0x0) {
                FUN_140156300(&local_1cf8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
                _CxxThrowException(&local_1cf8,(ThrowInfo *)&DAT_14031d928);
              }
              if (local_cec < 0) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              local_cec = 200;
              local_cf0 = 0;
              local_cf8 = &local_1978;
              if (local_1c60 == 0) {
                iVar5 = local_1c50;
                if (local_1c58 == 0) {
                    // WARNING: Subroutine does not return
                  FUN_1401561e0();
                }
              }
              else {
                iVar5 = *(int *)(local_1c60 + 0x18);
              }
              lVar15 = local_1c58;
              if (local_1c58 == 0) {
                if (local_1c60 == 0) {
                    // WARNING: Subroutine does not return
                  FUN_1401561e0();
                }
                lVar15 = 0;
                if (*(int *)(local_1c60 + 0x18) != 0) {
                  lVar15 = *(longlong *)(local_1c60 + 0x10);
                }
              }
              local_cf0 = 1;
              local_1c00._0_4_ = (undefined4)lVar15;
              local_1c00._4_4_ = (undefined4)((ulonglong)lVar15 >> 0x20);
              local_1978 = (undefined4)local_1c00;
              uStack_1974 = local_1c00._4_4_;
              uStack_196c = uStack_1bf4;
              local_1c00 = lVar15;
              iStack_1bf8 = iVar5;
              iStack_1970 = iVar5;
              FUN_140156ed0(local_ce8,&local_1978);
              if (local_cf8 == (undefined4 *)0x0) {
                FUN_140156300(&local_1cf8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
                _CxxThrowException(&local_1cf8,(ThrowInfo *)&DAT_14031d928);
              }
              if (local_cec < 0) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              local_1d38 = (undefined ***)CONCAT44(local_1d38._4_4_,1);
              bVar3 = (**(code **)(*param_1 + 0x78))(param_1,local_ce8,param_3);
              if (local_68 == (undefined1 *)0x0) {
                FUN_140156300(&local_1cf8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
                _CxxThrowException(&local_1cf8,(ThrowInfo *)&DAT_14031d928);
              }
              if (local_5c < 0) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              local_60 = 0;
              local_1d10 = &local_1bd0;
              FUN_1401560e0(&local_1bd0);
              if ((local_1bc8 != 0) && (local_1bbc < 0)) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
            }
            local_1d10 = &local_1c60;
            FUN_1401560e0(&local_1c60);
            if (local_1c58 != 0) {
              if (local_1c4c < 0) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              local_1c50 = 0;
            }
            local_1d10 = (longlong *)local_1c90;
            FUN_1401560e0(local_1c90);
            if (local_1c88 != 0) {
              if (local_1c7c < 0) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              local_1c80 = 0;
            }
            FUN_140156be0(uVar9);
            local_1c18 = 0;
          }
        }
        iVar19 = iVar19 + 1;
        local_1d10 = (longlong *)CONCAT44(local_1d10._4_4_,iVar19);
        lVar15 = (longlong)iVar19;
      } while (lVar15 < local_1b20);
    }
    FUN_14004f990(&local_1d00);
    if (100 < local_1b18) {
      operator_delete__(local_1b28);
    }
    uVar14 = (ulonglong)bVar3;
  }
  return uVar14;
}



undefined8 FUN_140189e50(longlong *param_1,int param_2,int *param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  char cVar4;
  int iVar5;
  uint uVar6;
  uint uVar7;
  longlong lVar8;
  undefined8 uVar9;
  uint *puVar10;
  undefined8 uVar11;
  uint *puVar12;
  uint uVar13;
  uint uVar14;
  uint uVar15;
  short local_res18 [4];
  undefined8 local_res20;
  uint *local_b8;
  undefined *local_b0;
  undefined8 local_a8;
  undefined1 local_a0;
  short local_98 [4];
  undefined **local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 local_70;
  int local_68;
  int local_64;
  undefined8 local_60;
  undefined1 local_58;
  undefined1 local_50 [8];
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  iVar5 = (int)(*param_3 + (*param_3 >> 0x1f & 7U)) >> 3;
  local_res20 = param_4;
  local_68 = iVar5;
  cVar4 = FUN_140154c00(param_3,&local_64);
  if ((cVar4 == '\0') || (cVar4 = FUN_140154a70(param_3,local_res18), cVar4 == '\0')) {
    FUN_1401540a0(param_3,iVar5);
    return 0;
  }
  FUN_1401568c0();
  local_b0 = PTR_DAT_1403200a0;
  lVar8 = (**(code **)(*param_1 + 0xc0))(param_1,param_3[10],&local_b0);
  if (((lVar8 == 0) || (local_64 == 0)) || (local_64 == 3)) goto LAB_14018a5d5;
  if (local_64 == 1) {
    cVar4 = FUN_140199ed0(param_3,param_4,lVar8,(int)((*param_3 >> 0x1f & 7U) + *param_3) >> 3);
LAB_140189f4e:
    if (cVar4 == '\0') {
LAB_14018a5d5:
      uVar9 = (**(code **)(*param_1 + 0x58))(param_1);
      local_a8 = uVar9;
      FUN_140156b50(uVar9);
      local_a0 = 1;
      if (DAT_1403288ef != '\0') {
        (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetCoreImpl::ProcessMessage_Encrypted");
      }
      FUN_14004f840(&local_b0,L" decrypt failed");
      local_88 = 0;
      local_80 = 0;
      local_78 = 0;
      local_70 = 0;
      local_90 = Proud::ByteArray::vftable;
      uVar11 = FUN_140181f50(local_res18,6,param_3[10],&local_b0,&local_90);
      (**(code **)(*param_1 + 0x80))(param_1,uVar11);
      FUN_1401858d0(&local_90);
      FUN_1401540a0(param_3,iVar5);
      FUN_140156be0(uVar9);
      puVar3 = local_b0;
      if (local_b0 == (undefined *)0x0) {
        return 0;
      }
      if (local_b0 == PTR_DAT_1403200a0) {
        return 0;
      }
      puVar1 = local_b0 + -8;
      if (puVar1 == (undefined *)0x0) {
        return 0;
      }
      uVar9 = FUN_1401568c0();
      local_a8 = uVar9;
      FUN_140156b50(uVar9);
      local_a0 = 1;
      piVar2 = (int *)(puVar3 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar9);
      return 0;
    }
  }
  else if (local_64 == 2) {
    cVar4 = FUN_1401a9e90(param_3,param_4,lVar8 + 0x3d0,
                          (int)((*param_3 >> 0x1f & 7U) + *param_3) >> 3);
    goto LAB_140189f4e;
  }
  if (param_2 != 0x24) {
LAB_14018a585:
    puVar3 = local_b0;
    if (((local_b0 != (undefined *)0x0) && (local_b0 != PTR_DAT_1403200a0)) &&
       (puVar1 = local_b0 + -8, puVar1 != (undefined *)0x0)) {
      uVar9 = FUN_1401568c0();
      local_a8 = uVar9;
      FUN_140156b50(uVar9);
      local_a0 = 1;
      piVar2 = (int *)(puVar3 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar9);
    }
    return 1;
  }
  cVar4 = FUN_1401543d0(param_4,local_98,2);
  if (cVar4 != '\0') {
    cVar4 = (**(code **)(*param_1 + 0xb0))(param_1,param_3[10],local_res18);
    lVar8 = *param_1;
    if (cVar4 == '\0') {
      uVar9 = (**(code **)(lVar8 + 0x58))();
      local_a8 = uVar9;
      FUN_140156b50(uVar9);
      local_a0 = 1;
      if (DAT_1403288ef != '\0') {
        (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetCoreImpl::ProcessMessage_Encrypted");
      }
      FUN_1401568c0();
      local_b8 = (uint *)PTR_DAT_1403200a0;
      FUN_14004ce50(&local_b8,L"GetExpectedDecryptCount failed!!");
      local_88 = 0;
      local_80 = 0;
      local_78 = 0;
      local_70 = 0;
      local_90 = Proud::ByteArray::vftable;
      uVar11 = FUN_140181f50(local_50,6,param_3[10],&local_b8,&local_90);
      (**(code **)(*param_1 + 0x80))(param_1,uVar11);
      FUN_1401858d0(&local_90);
      FUN_1401540a0(param_4,iVar5);
      puVar10 = local_b8;
      if (((local_b8 != (uint *)0x0) && (local_b8 != (uint *)PTR_DAT_1403200a0)) &&
         (puVar12 = local_b8 + -2, puVar12 != (uint *)0x0)) {
        uVar11 = FUN_1401568c0();
        local_60 = uVar11;
        FUN_140156b50(uVar11);
        local_58 = 1;
        puVar10 = puVar10 + -1;
        *puVar10 = *puVar10 - 1;
        if (*puVar10 == 0) {
          FUN_140156970(puVar12);
        }
        FUN_140156be0(uVar11);
      }
      local_b8 = (uint *)PTR_DAT_1403200a0;
      FUN_140156be0(uVar9);
      puVar3 = local_b0;
      if (local_b0 == (undefined *)0x0) {
        return 0;
      }
      if (local_b0 == PTR_DAT_1403200a0) {
        return 0;
      }
      puVar1 = local_b0 + -8;
      if (puVar1 == (undefined *)0x0) {
        return 0;
      }
      uVar9 = FUN_1401568c0();
      local_a8 = uVar9;
      FUN_140156b50(uVar9);
      local_a0 = 1;
      piVar2 = (int *)(puVar3 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar9);
      return 0;
    }
    if (local_98[0] != local_res18[0]) {
      uVar9 = (**(code **)(lVar8 + 0x58))();
      local_a8 = uVar9;
      FUN_140156b50(uVar9);
      local_a0 = 1;
      if (DAT_1403288ef != '\0') {
        (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetCoreImpl::ProcessMessage_Encrypted");
      }
      FUN_1401568c0();
      local_b8 = (uint *)PTR_DAT_1403200a0;
      FUN_14004ce50(&local_b8,L"decryptCount1(%d) != decryptCount2(%d)",local_98[0],local_res18[0]);
      local_88 = 0;
      local_80 = 0;
      local_78 = 0;
      local_70 = 0;
      local_90 = Proud::ByteArray::vftable;
      uVar11 = FUN_140181f50(local_50,6,param_3[10],&local_b8,&local_90);
      (**(code **)(*param_1 + 0x80))(param_1,uVar11);
      FUN_1401858d0(&local_90);
      FUN_1401540a0(param_4,iVar5);
      puVar10 = local_b8;
      if (((local_b8 != (uint *)0x0) && (local_b8 != (uint *)PTR_DAT_1403200a0)) &&
         (puVar12 = local_b8 + -2, puVar12 != (uint *)0x0)) {
        uVar11 = FUN_1401568c0();
        local_60 = uVar11;
        FUN_140156b50(uVar11);
        local_58 = 1;
        puVar10 = puVar10 + -1;
        *puVar10 = *puVar10 - 1;
        if (*puVar10 == 0) {
          FUN_140156970(puVar12);
        }
        FUN_140156be0(uVar11);
      }
      local_b8 = (uint *)PTR_DAT_1403200a0;
      FUN_140156be0(uVar9);
      puVar3 = local_b0;
      if (local_b0 == (undefined *)0x0) {
        return 0;
      }
      if (local_b0 == PTR_DAT_1403200a0) {
        return 0;
      }
      puVar1 = local_b0 + -8;
      if (puVar1 == (undefined *)0x0) {
        return 0;
      }
      uVar9 = FUN_1401568c0();
      local_a8 = uVar9;
      FUN_140156b50(uVar9);
      local_a0 = 1;
      piVar2 = (int *)(puVar3 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar9);
      return 0;
    }
    (**(code **)(lVar8 + 0xb8))(param_1,param_3[10]);
    goto LAB_14018a585;
  }
  uVar9 = (**(code **)(*param_1 + 0x58))();
  local_60 = uVar9;
  FUN_140156b50(uVar9);
  local_58 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(*param_1 + 200))(param_1,L"Proud::CNetCoreImpl::ProcessMessage_Encrypted");
  }
  FUN_1401568c0();
  local_b8 = (uint *)PTR_DAT_1403200a0;
  uVar6 = FUN_140156740(L"decryptCount1 read failed!!");
  uVar13 = 0;
  uVar15 = 0;
  if ((local_b8 != (uint *)0x0) && (uVar15 = 0, local_b8 != (uint *)PTR_DAT_1403200a0)) {
    uVar15 = local_b8[-2];
  }
  uVar7 = uVar6;
  if ((((int)uVar6 <= (int)uVar15) && (uVar7 = uVar13, local_b8 != (uint *)0x0)) &&
     (local_b8 != (uint *)PTR_DAT_1403200a0)) {
    uVar7 = local_b8[-2];
  }
  uVar15 = 1;
  if (1 < (int)uVar7) {
    uVar15 = uVar7;
  }
  uVar7 = uVar13;
  if ((local_b8 != (uint *)0x0) && (local_b8 != (uint *)PTR_DAT_1403200a0)) {
    uVar7 = local_b8[-2];
  }
  uVar14 = 0;
  if ((int)uVar7 < (int)uVar15) {
    if (local_b8 == (uint *)0x0) {
      local_b8 = (uint *)PTR_DAT_1403200a0;
    }
    if ((int)uVar15 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar15 == 0) {
      FUN_14004f990(&local_b8);
    }
    else {
      uVar7 = uVar13;
      if ((local_b8 != (uint *)0x0) && (local_b8 != (uint *)PTR_DAT_1403200a0)) {
        uVar7 = local_b8[-2];
      }
      if (uVar15 != uVar7) {
        puVar10 = (uint *)FUN_140156940((longlong)(int)uVar15 * 2 + 10);
        if (puVar10 != (uint *)0x0) {
          *puVar10 = 0;
          puVar10[1] = 1;
        }
        *puVar10 = uVar15;
        uVar7 = uVar14;
        if ((local_b8 != (uint *)0x0) && (local_b8 != (uint *)PTR_DAT_1403200a0)) {
          uVar7 = local_b8[-2];
        }
        puVar12 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar15 < (int)uVar7) {
LAB_14018a0b5:
          if (local_b8 != (uint *)0x0) {
            puVar12 = local_b8;
          }
        }
        else {
          uVar15 = uVar13;
          if (local_b8 != (uint *)0x0) {
            if (local_b8 != (uint *)PTR_DAT_1403200a0) {
              uVar15 = local_b8[-2];
            }
            goto LAB_14018a0b5;
          }
        }
        FUN_140156770(puVar10 + 2,puVar12,uVar15);
        FUN_14004f990(&local_b8);
        local_b8 = puVar10 + 2;
      }
    }
  }
  FUN_14004f670(&local_b8);
  puVar10 = local_b8;
  if (local_b8 == (uint *)0x0) {
    puVar10 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar10,L"decryptCount1 read failed!!",uVar6);
  puVar10 = local_b8;
  if (local_b8 == (uint *)0x0) {
    puVar10 = (uint *)PTR_DAT_1403200a0;
  }
  uVar6 = FUN_140156740(puVar10);
  uVar15 = 0;
  if (0 < (int)uVar6) {
    uVar15 = uVar6;
  }
  uVar6 = uVar14;
  if ((local_b8 != (uint *)0x0) && (local_b8 != (uint *)PTR_DAT_1403200a0)) {
    uVar6 = local_b8[-2];
  }
  if (((int)uVar6 <= (int)uVar15) && (uVar15 = uVar14, local_b8 != (uint *)0x0)) {
    if (local_b8 == (uint *)PTR_DAT_1403200a0) goto LAB_14018a165;
    uVar15 = local_b8[-2];
  }
  if (((local_b8 != (uint *)PTR_DAT_1403200a0) && (local_b8 != (uint *)0x0)) &&
     (local_b8 + -2 != (uint *)0x0)) {
    local_b8[-2] = uVar15;
    *(undefined2 *)((longlong)local_b8 + (longlong)(int)uVar15 * 2) = 0;
  }
LAB_14018a165:
  local_88 = 0;
  local_80 = 0;
  local_78 = 0;
  local_70 = 0;
  local_90 = Proud::ByteArray::vftable;
  uVar11 = FUN_140181f50(local_50,6,param_3[10],&local_b8,&local_90);
  (**(code **)(*param_1 + 0x80))(param_1,uVar11);
  FUN_1401858d0(&local_90);
  puVar10 = local_b8;
  if (((local_b8 != (uint *)0x0) && (local_b8 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar12 = local_b8 + -2, puVar12 != (uint *)0x0)) {
    uVar11 = FUN_1401568c0();
    local_a8 = uVar11;
    FUN_140156b50(uVar11);
    local_a0 = 1;
    puVar10 = puVar10 + -1;
    *puVar10 = *puVar10 - 1;
    if (*puVar10 == 0) {
      FUN_140156970(puVar12);
    }
    FUN_140156be0(uVar11);
  }
  FUN_1401540a0(local_res20,local_68);
  FUN_140156be0(uVar9);
  puVar3 = local_b0;
  if (((local_b0 != (undefined *)0x0) && (local_b0 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_b0 + -8, puVar1 != (undefined *)0x0)) {
    uVar9 = FUN_1401568c0();
    local_a8 = uVar9;
    FUN_140156b50(uVar9);
    local_a0 = 1;
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar9);
  }
  return 0;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_14018a700(longlong *param_1,undefined8 param_2,longlong param_3,undefined4 *param_4,
                       undefined4 param_5)

{
  int *piVar1;
  undefined *puVar2;
  byte bVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  uint *puVar7;
  undefined8 uVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  uint *puVar11;
  undefined4 uVar12;
  uint uVar13;
  ulonglong uVar14;
  undefined *puVar15;
  undefined1 auStack_1b18 [32];
  undefined ***local_1af8;
  uint *local_1ae8;
  longlong *local_1ae0;
  int local_1ad8 [2];
  undefined1 local_1ad0 [8];
  longlong local_1ac8;
  ulonglong local_1ac0;
  int local_1ab8;
  int local_1ab4;
  undefined1 local_1aa8 [8];
  longlong local_1aa0;
  ulonglong local_1a98;
  undefined4 local_1a90;
  int local_1a8c;
  undefined4 *local_1a80;
  longlong local_1a78;
  undefined *local_1a70;
  undefined8 local_1a68;
  undefined1 local_1a60;
  undefined **local_1a58;
  undefined8 local_1a50;
  undefined8 local_1a48;
  undefined8 local_1a40;
  undefined8 local_1a38;
  undefined8 local_1a30;
  undefined1 local_1a28 [8];
  longlong local_1a20;
  longlong local_1a18;
  undefined4 local_1a10;
  int local_1a0c;
  undefined1 local_1a00 [136];
  undefined1 local_1978 [3200];
  undefined1 *local_cf8;
  undefined4 local_cf0;
  undefined4 local_cec;
  undefined1 local_ce8 [3216];
  ulonglong local_58;
  undefined8 uStack_48;
  
  uStack_48 = 0x14018a71f;
  local_1a30 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_1b18;
  local_1a80 = param_4;
  local_1a78 = param_3;
  if ((*(int *)(param_3 + 0x28) == 0) || (iVar4 = FUN_1401843d0(param_2), iVar4 < 0x33))
  goto LAB_14018adb6;
  FUN_1401544a0(local_1aa8);
  FUN_140153d90(local_1aa8);
  FUN_140154880(local_1aa8,param_2);
  if (local_1aa0 == 0) {
    uVar12 = local_1a90;
    if (local_1a98 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else {
    uVar12 = *(undefined4 *)(local_1aa0 + 0x18);
  }
  FUN_1401544a0(local_1ad0);
  FUN_140153d90(local_1ad0);
  FUN_140154600(local_1ad0,uVar12);
  local_1ad8[0] = FUN_1401ac9e0(uVar12);
  uVar9 = 0;
  uVar14 = local_1a98;
  if (local_1a98 == 0) {
    if (local_1aa0 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    uVar14 = uVar9;
    if (*(int *)(local_1aa0 + 0x18) != 0) {
      uVar14 = *(ulonglong *)(local_1aa0 + 0x10);
    }
  }
  uVar10 = local_1ac0;
  if (local_1ac0 == 0) {
    if (local_1ac8 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    uVar10 = uVar9;
    if (*(int *)(local_1ac8 + 0x18) != 0) {
      uVar10 = *(ulonglong *)(local_1ac8 + 0x10);
    }
  }
  iVar4 = FUN_1401ac850(uVar10,local_1ad8,uVar14,uVar12);
  if (iVar4 == 0) {
    uVar5 = FUN_1401843d0(param_2);
    if (local_1ad8[0] + 9U < uVar5) {
      FUN_140154600(local_1ad0);
      FUN_1401544a0(local_1a28);
      FUN_140154120(local_1a28,local_1a00,0x80);
      FUN_14004fd90(local_1a28,0x26);
      if (local_1ac8 == 0) {
        iVar4 = local_1ab8;
        if (local_1ac0 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
      }
      else {
        iVar4 = *(int *)(local_1ac8 + 0x18);
      }
      FUN_140155b20(local_1a28,(longlong)iVar4);
      iVar4 = FUN_1401843d0(param_2);
      FUN_140155b20(local_1a28,(longlong)iVar4);
      local_cec = 200;
      local_cf0 = 0;
      local_cf8 = local_1978;
      FUN_1401570d0(local_ce8,local_1a28);
      FUN_140156ed0(local_1978,local_ce8);
      FUN_140156dc0(local_ce8);
      FUN_1401570d0(local_ce8,local_1ad0);
      FUN_140156ed0(local_1978,local_ce8);
      FUN_140156dc0(local_ce8);
      local_1af8 = (undefined ***)CONCAT44(local_1af8._4_4_,param_5);
      bVar3 = FUN_140188f70(param_1,local_1978,local_1a78,param_4);
      FUN_140156dc0(local_1978);
      local_1ae0 = &local_1a20;
      FUN_1401560e0(&local_1a20);
      if (local_1a18 != 0) {
        if (local_1a0c < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_1a10 = 0;
      }
      local_1ae0 = &local_1ac8;
      FUN_1401560e0(&local_1ac8);
      if (local_1ac0 != 0) {
        if (local_1ab4 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_1ab8 = 0;
      }
      local_1ae0 = &local_1aa0;
      FUN_1401560e0(&local_1aa0);
      if ((local_1a98 != 0) && (local_1a8c < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      return (ulonglong)bVar3;
    }
    local_1ae0 = &local_1ac8;
    FUN_1401560e0(&local_1ac8);
    if (local_1ac0 != 0) {
      if (local_1ab4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_1ab8 = 0;
    }
    local_1ae0 = &local_1aa0;
    FUN_1401560e0(&local_1aa0);
    if ((local_1a98 != 0) && (local_1a8c < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    goto LAB_14018adb6;
  }
  FUN_1401568c0();
  local_1a70 = PTR_DAT_1403200a0;
  FUN_14004ce50(&local_1a70,L"Packet compression failed! Error code=%d",iVar4);
  puVar2 = local_1a70;
  puVar15 = local_1a70;
  if (local_1a70 == (undefined *)0x0) {
    puVar15 = PTR_DAT_1403200a0;
  }
  FUN_1401568c0();
  local_1ae8 = (uint *)PTR_DAT_1403200a0;
  uVar5 = FUN_140156740(puVar15);
  if ((local_1ae8 != (uint *)0x0) && (uVar9 = 0, local_1ae8 != (uint *)PTR_DAT_1403200a0)) {
    uVar9 = (ulonglong)local_1ae8[-2];
  }
  uVar6 = uVar5;
  if ((((int)uVar5 <= (int)uVar9) && (uVar6 = 0, local_1ae8 != (uint *)0x0)) &&
     (uVar6 = 0, local_1ae8 != (uint *)PTR_DAT_1403200a0)) {
    uVar6 = local_1ae8[-2];
  }
  uVar13 = 1;
  if (1 < (int)uVar6) {
    uVar13 = uVar6;
  }
  if (local_1ae8 == (uint *)0x0) {
    uVar6 = 0;
  }
  else if (local_1ae8 == (uint *)PTR_DAT_1403200a0) {
    uVar6 = 0;
  }
  else {
    uVar6 = local_1ae8[-2];
  }
  if ((int)uVar6 < (int)uVar13) {
    if (local_1ae8 == (uint *)0x0) {
      local_1ae8 = (uint *)PTR_DAT_1403200a0;
    }
    if ((int)uVar13 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar13 == 0) {
      FUN_14004f990(&local_1ae8);
    }
    else {
      if (local_1ae8 == (uint *)0x0) {
        uVar6 = 0;
      }
      else if (local_1ae8 == (uint *)PTR_DAT_1403200a0) {
        uVar6 = 0;
      }
      else {
        uVar6 = local_1ae8[-2];
      }
      if (uVar13 != uVar6) {
        puVar7 = (uint *)FUN_140156940((longlong)(int)uVar13 * 2 + 10);
        if (puVar7 != (uint *)0x0) {
          *puVar7 = 0;
          puVar7[1] = 1;
        }
        *puVar7 = uVar13;
        if (local_1ae8 == (uint *)0x0) {
          uVar6 = 0;
        }
        else if (local_1ae8 == (uint *)PTR_DAT_1403200a0) {
          uVar6 = 0;
        }
        else {
          uVar6 = local_1ae8[-2];
        }
        puVar11 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar13 < (int)uVar6) {
LAB_14018a985:
          if (local_1ae8 != (uint *)0x0) {
            puVar11 = local_1ae8;
          }
        }
        else {
          if (local_1ae8 != (uint *)0x0) {
            if (local_1ae8 == (uint *)PTR_DAT_1403200a0) {
              uVar13 = 0;
            }
            else {
              uVar13 = local_1ae8[-2];
            }
            goto LAB_14018a985;
          }
          uVar13 = 0;
        }
        FUN_140156770(puVar7 + 2,puVar11,uVar13);
        FUN_14004f990(&local_1ae8);
        param_4 = local_1a80;
        local_1ae8 = puVar7 + 2;
      }
    }
  }
  FUN_14004f670(&local_1ae8);
  puVar7 = local_1ae8;
  if (local_1ae8 == (uint *)0x0) {
    puVar7 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar7,puVar15,uVar5);
  puVar7 = local_1ae8;
  if (local_1ae8 == (uint *)0x0) {
    puVar7 = (uint *)PTR_DAT_1403200a0;
  }
  uVar6 = FUN_140156740(puVar7);
  uVar13 = 0;
  uVar5 = 0;
  if (0 < (int)uVar6) {
    uVar5 = uVar6;
  }
  uVar6 = uVar13;
  if ((local_1ae8 != (uint *)0x0) && (local_1ae8 != (uint *)PTR_DAT_1403200a0)) {
    uVar6 = local_1ae8[-2];
  }
  if (((int)uVar5 < (int)uVar6) || (uVar5 = uVar13, local_1ae8 == (uint *)0x0)) {
LAB_14018aa20:
    if (((local_1ae8 != (uint *)PTR_DAT_1403200a0) && (local_1ae8 != (uint *)0x0)) &&
       (local_1ae8 + -2 != (uint *)0x0)) {
      local_1ae8[-2] = uVar5;
      *(undefined2 *)((longlong)local_1ae8 + (longlong)(int)uVar5 * 2) = 0;
    }
  }
  else if (local_1ae8 != (uint *)PTR_DAT_1403200a0) {
    uVar5 = local_1ae8[-2];
    goto LAB_14018aa20;
  }
  local_1a50 = 0;
  local_1a48 = 0;
  local_1a40 = 0;
  local_1a38 = 0;
  local_1a58 = Proud::ByteArray::vftable;
  local_1af8 = &local_1a58;
  uVar8 = FUN_140181f50(&local_1ae0,0x27,*param_4,&local_1ae8);
  (**(code **)(*param_1 + 0x80))(param_1,uVar8);
  FUN_1401858d0(&local_1a58);
  puVar7 = local_1ae8;
  if (((local_1ae8 != (uint *)0x0) && (local_1ae8 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar11 = local_1ae8 + -2, puVar11 != (uint *)0x0)) {
    uVar8 = FUN_1401568c0();
    local_1a68 = uVar8;
    FUN_140156b50(uVar8);
    local_1a60 = 1;
    puVar7 = puVar7 + -1;
    *puVar7 = *puVar7 - 1;
    if (*puVar7 == 0) {
      FUN_140156970(puVar11);
    }
    FUN_140156be0(uVar8);
  }
  if (((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) &&
     (puVar2 + -8 != (undefined *)0x0)) {
    uVar8 = FUN_1401568c0();
    local_1a68 = uVar8;
    FUN_140156b50(uVar8);
    local_1a60 = 1;
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
    FUN_140156be0(uVar8);
  }
  local_1ae0 = &local_1ac8;
  FUN_1401560e0(&local_1ac8);
  if (local_1ac0 != 0) {
    if (local_1ab4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_1ab8 = 0;
  }
  local_1ae0 = &local_1aa0;
  FUN_1401560e0(&local_1aa0);
  param_4 = local_1a80;
  if ((local_1a98 != 0) && (local_1a8c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
LAB_14018adb6:
  local_1af8 = (undefined ***)CONCAT44(local_1af8._4_4_,param_5);
  uVar9 = FUN_140188f70(param_1,param_2,local_1a78,param_4);
  return uVar9;
}



undefined2 * FUN_14018ae00(undefined2 *param_1)

{
  BOOL BVar1;
  LARGE_INTEGER local_res8 [4];
  
  *param_1 = 0x100;
  *(undefined8 *)(param_1 + 4) = 0;
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0xc) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  BVar1 = QueryPerformanceFrequency(local_res8);
  *(bool *)param_1 = BVar1 != 0;
  *(LARGE_INTEGER *)(param_1 + 4) = local_res8[0];
  return param_1;
}



void FUN_14018ae50(char *param_1)

{
  LARGE_INTEGER local_res8 [4];
  
  if (*param_1 != '\0') {
    QueryPerformanceCounter(local_res8);
    if (param_1[1] != '\0') {
      *(longlong *)(param_1 + 0x20) =
           *(longlong *)(param_1 + 0x20) + (local_res8[0].QuadPart - *(longlong *)(param_1 + 0x10));
    }
    param_1[0x10] = '\0';
    param_1[0x11] = '\0';
    param_1[0x12] = '\0';
    param_1[0x13] = '\0';
    param_1[0x14] = '\0';
    param_1[0x15] = '\0';
    param_1[0x16] = '\0';
    param_1[0x17] = '\0';
    ((LARGE_INTEGER *)(param_1 + 0x18))->QuadPart = (LONGLONG)local_res8[0];
    param_1[1] = '\0';
  }
  return;
}



void FUN_14018aea0(char *param_1)

{
  LARGE_INTEGER LVar1;
  LARGE_INTEGER local_res8 [4];
  
  if ((*param_1 != '\0') && (param_1[1] == '\0')) {
    LVar1.QuadPart = ((LARGE_INTEGER *)(param_1 + 0x10))->QuadPart;
    if (((LARGE_INTEGER *)(param_1 + 0x10))->QuadPart == 0) {
      QueryPerformanceCounter(local_res8);
      LVar1 = local_res8[0];
    }
    ((LARGE_INTEGER *)(param_1 + 0x10))->QuadPart = (LONGLONG)LVar1;
    ((LARGE_INTEGER *)(param_1 + 0x18))->QuadPart = (LONGLONG)LVar1;
    param_1[1] = '\x01';
  }
  return;
}



double FUN_14018aee0(char *param_1)

{
  LARGE_INTEGER LVar1;
  LARGE_INTEGER local_res8 [4];
  
  if (*param_1 == '\0') {
    return -1.0;
  }
  LVar1.QuadPart = ((LARGE_INTEGER *)(param_1 + 0x10))->QuadPart;
  if (((LARGE_INTEGER *)(param_1 + 0x10))->QuadPart == 0) {
    QueryPerformanceCounter(local_res8);
    LVar1 = local_res8[0];
  }
  return (double)LVar1.QuadPart / (double)*(longlong *)(param_1 + 8);
}



double FUN_14018af40(char *param_1)

{
  longlong lVar1;
  LARGE_INTEGER LVar2;
  LARGE_INTEGER local_res8 [4];
  
  if (*param_1 == '\0') {
    return -1.0;
  }
  LVar2.QuadPart = ((LARGE_INTEGER *)(param_1 + 0x10))->QuadPart;
  if (((LARGE_INTEGER *)(param_1 + 0x10))->QuadPart == 0) {
    QueryPerformanceCounter(local_res8);
    LVar2 = local_res8[0];
  }
  lVar1 = *(longlong *)(param_1 + 0x18);
  ((LARGE_INTEGER *)(param_1 + 0x18))->QuadPart = (LONGLONG)LVar2;
  return (double)(LVar2.QuadPart - lVar1) / (double)*(longlong *)(param_1 + 8);
}



undefined1 FUN_14018afa0(longlong param_1)

{
  return *(undefined1 *)(param_1 + 1);
}



undefined8 * FUN_14018afb0(undefined8 *param_1)

{
  *param_1 = Proud::CTestUdpConnReset::vftable;
  param_1[1] = 0;
  memset(param_1 + 2,0,100);
  return param_1;
}



void FUN_14018aff0(undefined8 param_1,undefined8 param_2,undefined8 param_3)

{
  FUN_14004f990(param_3);
  return;
}



void FUN_14018b000(undefined8 *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  
  *param_1 = Proud::CTestUdpConnReset::vftable;
  if (param_1[1] != 0) {
    *(longlong *)(param_1[1] + 8) = *(longlong *)(param_1[1] + 8) + -1;
    if (*(longlong *)(param_1[1] + 8) == 0) {
      plVar1 = (longlong *)param_1[1];
      lVar2 = *plVar1;
      if (lVar2 != 0) {
        FUN_1401859b0(lVar2);
        FUN_140156970(lVar2);
      }
      FUN_140156970(plVar1);
    }
  }
  *param_1 = Proud::IFastSocketDelegate::vftable;
  return;
}



void * FUN_14018b090(void *param_1,uint param_2)

{
  FUN_14018b000();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14018b0c0(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  undefined1 local_58 [88];
  
  lVar1 = *param_1;
  while( true ) {
    if (lVar1 == 0) {
      return;
    }
    plVar2 = (longlong *)*param_1;
    if ((longlong *)plVar2[2] != param_1) break;
    plVar3 = (longlong *)plVar2[1];
    lVar1 = *plVar2;
    if (plVar3 != (longlong *)0x0) {
      *plVar3 = lVar1;
    }
    if (lVar1 != 0) {
      *(longlong **)(lVar1 + 8) = plVar3;
    }
    if (plVar3 == (longlong *)0x0) {
      if ((longlong *)param_1[1] != plVar2) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::CFastSocket>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      param_1[1] = lVar1;
    }
    if (lVar1 == 0) {
      if ((longlong *)*param_1 != plVar2) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::CFastSocket>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      *param_1 = (longlong)plVar3;
    }
    *plVar2 = 0;
    plVar2[1] = 0;
    plVar2[2] = 0;
    *(int *)(param_1 + 2) = (int)param_1[2] + -1;
    lVar1 = *param_1;
  }
  FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                L"Proud::CListNode<class Proud::CFastSocket>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



void thunk_FUN_14018b0c0(void)

{
  FUN_14018b0c0();
  return;
}



longlong * FUN_14018b1c0(longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  
  plVar1 = (longlong *)param_1[1];
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  *param_2 = plVar1[2];
  param_2[1] = plVar1[3];
  param_2[2] = plVar1[4];
  lVar2 = *plVar1;
  param_1[1] = lVar2;
  if (lVar2 == 0) {
    param_1[2] = 0;
  }
  else {
    *(undefined8 *)(lVar2 + 8) = 0;
  }
  plVar3 = (longlong *)*param_1;
  if (plVar3 != (longlong *)0x0) {
    (**(code **)(*plVar3 + 0x10))(plVar3,plVar1);
    param_1[3] = param_1[3] + -1;
    return param_2;
  }
  FUN_140156970();
  param_1[3] = param_1[3] + -1;
  return param_2;
}



longlong FUN_14018b260(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  
  if (param_2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  lVar1 = *param_2;
  if (param_2 == (longlong *)param_1[1]) {
    param_1[1] = lVar1;
  }
  else {
    *(longlong *)param_2[1] = lVar1;
  }
  if (param_2 == (longlong *)param_1[2]) {
    param_1[2] = param_2[1];
  }
  else {
    *(longlong *)(*param_2 + 8) = param_2[1];
  }
  if ((longlong *)*param_1 != (longlong *)0x0) {
    (**(code **)(*(longlong *)*param_1 + 0x10))();
    param_1[3] = param_1[3] + -1;
    return lVar1;
  }
  FUN_140156970(param_2);
  param_1[3] = param_1[3] + -1;
  return lVar1;
}



undefined8 FUN_14018b2f0(longlong param_1,undefined8 *param_2,uint param_3)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  bool bVar3;
  undefined4 uVar4;
  undefined2 uVar5;
  int iVar6;
  char cVar7;
  DWORD DVar8;
  longlong lVar9;
  undefined8 *puVar10;
  int iVar11;
  double dVar12;
  double dVar13;
  int local_res8 [2];
  longlong local_res20;
  longlong local_a8;
  undefined1 local_a0;
  undefined8 local_98;
  longlong local_90;
  undefined8 local_88;
  undefined4 local_80;
  undefined8 local_78;
  undefined **local_70;
  undefined4 local_68;
  undefined2 local_64;
  undefined4 local_60;
  
  local_98 = 0xfffffffffffffffe;
  if (*(longlong *)(param_1 + 0x28) == 0) {
    SetLastError(0);
    dVar12 = (double)FUN_14018aee0(param_1);
    local_res20 = param_1 + 0x50;
    puVar1 = (undefined8 *)(param_1 + 0x38);
    iVar11 = 0;
    do {
      local_a8 = param_1 + 0x50;
      FUN_140156b50(local_a8);
      local_a0 = 1;
      local_res8[0] = *(int *)(param_1 + 0x48) * 3 + 3;
      puVar2 = (undefined8 *)*puVar1;
      local_70 = Proud::AddrPort::vftable;
      local_60 = 0;
      local_78 = 0;
      local_68 = DAT_140320450;
      local_64 = DAT_140320454;
      for (; puVar2 != (undefined8 *)0x0; puVar2 = (undefined8 *)puVar2[1]) {
        cVar7 = FUN_1401854f0(puVar2,0,&local_78);
        if (cVar7 != '\0') {
          *(undefined4 *)(param_2 + 2) = 1;
          puVar10 = puVar2 + 0x48;
LAB_14018b659:
          FUN_140184b40(puVar10,0,0);
          *param_2 = puVar2[0x5d];
          *(undefined4 *)((longlong)param_2 + 0xc) = local_78._4_4_;
          *(undefined4 *)(param_2 + 1) = local_60;
          if (puVar2[2] != 0) {
            FUN_1401850c0(puVar2[2],puVar2);
          }
          if (puVar2[2] != 0) {
            FUN_1401850c0(puVar1,puVar2);
          }
          if (*(longlong *)(param_1 + 0x40) == 0) {
            *puVar1 = puVar2;
          }
          else {
            *(undefined8 **)(*(longlong *)(param_1 + 0x40) + 8) = puVar2;
            *puVar2 = *(undefined8 *)(param_1 + 0x40);
          }
          *(undefined8 **)(param_1 + 0x40) = puVar2;
          puVar2[2] = puVar1;
          *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
          lVar9 = local_res20;
          goto LAB_14018b70a;
        }
        cVar7 = FUN_140185280(puVar2,0,&local_78);
        if (cVar7 != '\0') {
          *(undefined4 *)(param_2 + 2) = 2;
          *(undefined4 *)(param_2 + 4) = *(undefined4 *)((longlong)puVar2 + 0x304);
          FUN_140158890(param_2 + 5,puVar2 + 0x5e);
          puVar10 = puVar2 + 0x30;
          goto LAB_14018b659;
        }
        cVar7 = FUN_140185350(puVar2,0,&local_78);
        if (cVar7 != '\0') {
          *(undefined4 *)(param_2 + 2) = 3;
          puVar10 = puVar2 + 0x18;
          goto LAB_14018b659;
        }
        cVar7 = FUN_140185420(puVar2,0,&local_78);
        if (cVar7 != '\0') {
          *(undefined4 *)(param_2 + 2) = 4;
          puVar10 = puVar2 + 0x68;
          goto LAB_14018b659;
        }
      }
      if (*(longlong *)(param_1 + 0xa0) != 0) {
        FUN_14018b1c0(param_1 + 0x88,&local_90);
        if (local_90 == 0) {
          *param_2 = 0;
        }
        else {
          *param_2 = *(undefined8 *)(local_90 + 0x2e8);
        }
        *(undefined4 *)(param_2 + 2) = local_80;
        param_2[3] = local_88;
        param_2[1] = 0;
        lVar9 = param_1 + 0x50;
LAB_14018b70a:
        FUN_140156be0(lVar9);
        return 1;
      }
      FUN_140156be0(param_1 + 0x50);
      local_a0 = 0;
      if ((param_3 == 0) ||
         ((param_3 != 0xffffffff &&
          (dVar13 = (double)FUN_14018aee0(param_1), (double)param_3 < (dVar13 - dVar12) * 1000.0))))
      {
        return 0;
      }
      bVar3 = local_res8[0] <= iVar11;
      iVar6 = 0;
      if (!bVar3) {
        iVar6 = iVar11 + 1;
      }
      iVar11 = iVar6;
      Sleep((uint)bVar3);
    } while( true );
  }
  local_res8[0] = 0;
  local_a8 = 0;
  local_res20 = 0;
  SetLastError(0);
  uVar5 = DAT_140320454;
  uVar4 = DAT_140320450;
  *param_2 = 0;
  param_2[1] = 0;
  *(undefined4 *)(param_2 + 2) = 5;
  param_2[3] = 0;
  *(undefined4 *)(param_2 + 4) = 0;
  *(undefined4 *)(param_2 + 6) = uVar4;
  *(undefined2 *)((longlong)param_2 + 0x34) = uVar5;
  lVar9 = FUN_140158090();
  (**(code **)(lVar9 + 0x18))
            (*(undefined8 *)(param_1 + 0x28),local_res8,&local_a8,&local_res20,param_3);
  if (local_res20 == 0) {
    DVar8 = GetLastError();
    *(DWORD *)((longlong)param_2 + 0xc) = DVar8;
    return 0;
  }
  if (local_a8 == 0) {
    *param_2 = 0;
  }
  else {
    *param_2 = *(undefined8 *)(local_a8 + 0x2e8);
  }
  if (local_res20 < 0) {
    *(int *)(param_2 + 1) = local_res8[0];
    param_2[3] = local_res20;
    *(undefined8 *)((longlong)param_2 + 0xc) = 0;
    *(undefined4 *)(param_2 + 6) = DAT_140320450;
    *(undefined2 *)((longlong)param_2 + 0x34) = DAT_140320454;
    *(undefined4 *)(param_2 + 4) = 0;
    return 1;
  }
  if (local_a8 != 0) {
    lVar9 = local_a8 + 0x180;
    if (local_res20 == lVar9) {
      *(undefined4 *)(param_2 + 2) = 2;
      *(undefined4 *)(param_2 + 4) = *(undefined4 *)(local_a8 + 0x304);
      FUN_140158890(param_2 + 5,local_a8 + 0x2f0);
      FUN_140184b40(lVar9,0,0);
      goto LAB_14018b4a1;
    }
    if (local_res20 == local_a8 + 0x240) {
      *(undefined4 *)(param_2 + 2) = 1;
      FUN_140184b40(local_a8 + 0x240,0,0);
      goto LAB_14018b4a1;
    }
    if (local_res20 == local_a8 + 0xc0) {
      *(undefined4 *)(param_2 + 2) = 3;
      FUN_140184b40(local_a8 + 0xc0,0,0);
      goto LAB_14018b4a1;
    }
    if (local_res20 == local_a8 + 0x340) {
      *(undefined4 *)(param_2 + 2) = 4;
      FUN_140184b40(local_a8 + 0x340,0,0);
      goto LAB_14018b4a1;
    }
  }
  *(undefined4 *)(param_2 + 2) = 0;
  param_2[3] = local_res20;
LAB_14018b4a1:
  *(int *)(param_2 + 1) = local_res8[0];
  *(undefined4 *)((longlong)param_2 + 0xc) = 0;
  GetLastError();
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_14018b740(longlong param_1,longlong param_2,uint *param_3,uint param_4)

{
  uint uVar1;
  longlong lVar2;
  undefined8 *puVar3;
  longlong *plVar4;
  longlong lVar5;
  longlong *plVar6;
  bool bVar7;
  undefined4 uVar8;
  undefined2 uVar9;
  char cVar10;
  int iVar11;
  longlong lVar12;
  undefined8 *puVar13;
  undefined8 *puVar14;
  undefined8 uVar15;
  ulonglong uVar16;
  ulonglong uVar17;
  longlong *plVar18;
  double dVar19;
  double dVar20;
  undefined1 auStack_2a8 [32];
  uint local_288;
  undefined4 local_280;
  uint local_278 [2];
  undefined8 local_270;
  undefined4 local_268;
  undefined4 uStack_264;
  undefined4 local_260;
  undefined2 local_25c;
  ulonglong local_258;
  undefined4 local_250;
  undefined **local_248;
  undefined4 local_240;
  undefined2 local_23c;
  int local_238;
  uint local_234;
  longlong local_230;
  undefined8 local_228;
  undefined8 local_220;
  undefined4 local_218;
  undefined8 local_210;
  undefined4 local_208;
  undefined **local_200;
  undefined4 local_1f8;
  undefined2 local_1f4;
  longlong local_1f0;
  uint *local_1e8;
  longlong local_1e0;
  longlong local_1d8;
  undefined1 local_1d0;
  undefined8 local_1c8;
  longlong local_1b8 [3];
  undefined4 auStack_1a0 [74];
  ulonglong local_78;
  
  local_1c8 = 0xfffffffffffffffe;
  local_78 = DAT_1403223c0 ^ (ulonglong)auStack_2a8;
  if (9 < *(uint *)(param_2 + 0x18)) {
    local_234 = param_4;
    local_1f0 = param_2;
    local_1e8 = param_3;
    if (*(longlong *)(param_1 + 0x28) == 0) {
      SetLastError(0);
      dVar19 = (double)FUN_14018aee0(param_1);
      local_278[0] = 0;
      *param_3 = 0;
      local_230 = param_1 + 0x50;
      plVar18 = (longlong *)(param_1 + 0x38);
      do {
        local_1d8 = param_1 + 0x50;
        FUN_140156b50(local_1d8);
        local_1d0 = 1;
        local_238 = *(int *)(param_1 + 0x48) * 3 + 3;
        puVar13 = (undefined8 *)*plVar18;
        local_268 = 0x4025b6c0;
        uStack_264 = 1;
        local_258 = local_258 & 0xffffffff00000000;
        local_270 = 0;
        puVar3 = puVar13;
        local_260 = DAT_140320450;
        local_25c = DAT_140320454;
        do {
          if (puVar3 == (undefined8 *)0x0) break;
          local_200 = Proud::AddrPort::vftable;
          local_228 = 0;
          local_210 = 0;
          local_220 = 0;
          local_218 = 5;
          local_208 = 0;
          local_1f8 = DAT_140320450;
          local_1f4 = DAT_140320454;
          cVar10 = FUN_1401854f0(puVar3,0,&local_270);
          if (cVar10 == '\0') {
            cVar10 = FUN_140185280(puVar3,0,&local_270);
            if (cVar10 != '\0') {
              local_218 = 2;
              local_208 = *(undefined4 *)((longlong)puVar3 + 0x304);
              FUN_140158890(&local_200);
              puVar14 = puVar3 + 0x30;
              goto LAB_14018bb78;
            }
            cVar10 = FUN_140185350(puVar3,0,&local_270);
            if (cVar10 != '\0') {
              local_218 = 3;
              puVar14 = puVar3 + 0x18;
              goto LAB_14018bb78;
            }
            cVar10 = FUN_140185420(puVar3,0,&local_270);
            if (cVar10 != '\0') {
              local_218 = 4;
              puVar14 = puVar3 + 0x68;
              goto LAB_14018bb78;
            }
          }
          else {
            local_218 = 1;
            puVar14 = puVar3 + 0x48;
LAB_14018bb78:
            FUN_140184b40(puVar14,0,0);
            local_228 = puVar3[0x5d];
            local_220 = CONCAT44((int)((ulonglong)local_270 >> 0x20),(undefined4)local_258);
            if (puVar3[2] != 0) {
              FUN_1401850c0();
            }
            if (puVar3[2] != 0) {
              FUN_1401850c0(plVar18);
            }
            if (*(longlong *)(param_1 + 0x40) == 0) {
              *plVar18 = (longlong)puVar3;
            }
            else {
              *(undefined8 **)(*(longlong *)(param_1 + 0x40) + 8) = puVar3;
              *puVar3 = *(undefined8 *)(param_1 + 0x40);
            }
            *(undefined8 **)(param_1 + 0x40) = puVar3;
            puVar3[2] = plVar18;
            *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
            uVar1 = *param_3;
            if (((int)uVar1 < 0) || (*(int *)(param_2 + 0x18) <= (int)uVar1)) {
                    // WARNING: Subroutine does not return
              FUN_1401566e0();
            }
            puVar14 = (undefined8 *)((longlong)(int)uVar1 * 0x38 + *(longlong *)(param_2 + 0x10));
            *puVar14 = local_228;
            *(undefined4 *)(puVar14 + 1) = (undefined4)local_220;
            *(undefined4 *)((longlong)puVar14 + 0xc) = local_220._4_4_;
            *(undefined4 *)(puVar14 + 2) = local_218;
            puVar14[3] = local_210;
            *(undefined4 *)(puVar14 + 4) = local_208;
            *(undefined4 *)(puVar14 + 6) = local_1f8;
            *(undefined2 *)((longlong)puVar14 + 0x34) = local_1f4;
            *param_3 = *param_3 + 1;
            if (9 < *param_3) goto LAB_14018bdf3;
          }
          puVar3 = (undefined8 *)puVar3[1];
        } while (puVar3 != puVar13);
        lVar12 = *(longlong *)(param_1 + 0xa0);
        uVar8 = DAT_140320450;
        uVar9 = DAT_140320454;
        while (DAT_140320450 = uVar8, DAT_140320454 = uVar9, lVar12 != 0) {
          plVar4 = *(longlong **)(param_1 + 0x90);
          if (plVar4 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            FUN_14004ea80(0x80004005);
          }
          lVar12 = plVar4[2];
          lVar2 = plVar4[3];
          local_1e0 = plVar4[4];
          lVar5 = *plVar4;
          *(longlong *)(param_1 + 0x90) = lVar5;
          if (lVar5 == 0) {
            *(undefined8 *)(param_1 + 0x98) = 0;
          }
          else {
            *(undefined8 *)(lVar5 + 8) = 0;
          }
          plVar6 = *(longlong **)(param_1 + 0x88);
          if (plVar6 == (longlong *)0x0) {
            FUN_140156970();
          }
          else {
            (**(code **)(*plVar6 + 0x10))(plVar6,plVar4);
          }
          *(longlong *)(param_1 + 0xa0) = *(longlong *)(param_1 + 0xa0) + -1;
          uVar15 = 0;
          if (lVar12 != 0) {
            uVar15 = *(undefined8 *)(lVar12 + 0x2e8);
          }
          uVar1 = *local_1e8;
          if (((int)uVar1 < 0) || (*(int *)(local_1f0 + 0x18) <= (int)uVar1)) {
                    // WARNING: Subroutine does not return
            FUN_1401566e0();
          }
          puVar13 = (undefined8 *)((longlong)(int)uVar1 * 0x38 + *(longlong *)(local_1f0 + 0x10));
          *puVar13 = uVar15;
          puVar13[1] = 0;
          *(int *)(puVar13 + 2) = (int)local_1e0;
          puVar13[3] = lVar2;
          *(undefined4 *)(puVar13 + 4) = 0;
          *(undefined4 *)(puVar13 + 6) = uVar8;
          *(undefined2 *)((longlong)puVar13 + 0x34) = uVar9;
          *local_1e8 = *local_1e8 + 1;
          if (9 < *local_1e8) goto LAB_14018bdf3;
          param_3 = local_1e8;
          param_2 = local_1f0;
          uVar8 = DAT_140320450;
          uVar9 = DAT_140320454;
          lVar12 = *(longlong *)(param_1 + 0xa0);
        }
        if (*param_3 != 0) {
LAB_14018bdf3:
          FUN_140156be0(local_230);
          return 1;
        }
        FUN_140156be0(param_1 + 0x50);
        local_1d0 = 0;
        uVar16 = (ulonglong)local_234;
        if ((local_234 == 0) ||
           ((local_234 != 0xffffffff &&
            (dVar20 = (double)FUN_14018aee0(param_1), (double)uVar16 < (dVar20 - dVar19) * 1000.0)))
           ) {
          return 0;
        }
        bVar7 = local_238 <= (int)local_278[0];
        if (bVar7) {
          local_278[0] = 0;
        }
        else {
          local_278[0] = local_278[0] + 1;
        }
        Sleep((uint)bVar7);
      } while( true );
    }
    uVar16 = 0;
    local_278[0] = 0;
    SetLastError(0);
    lVar12 = FUN_140158090();
    local_280 = 0;
    local_288 = param_4;
    iVar11 = (**(code **)(lVar12 + 0x20))(*(undefined8 *)(param_1 + 0x28),local_1b8,10,local_278);
    if (iVar11 == 0) {
      GetLastError();
    }
    else if (local_278[0] != 0) {
      *param_3 = local_278[0];
      plVar18 = local_1b8 + 1;
      uVar17 = uVar16;
      do {
        local_248 = Proud::AddrPort::vftable;
        local_270 = 0;
        local_258 = 0;
        local_268 = 0;
        uStack_264 = 0;
        local_260 = 5;
        local_250 = 0;
        local_240 = DAT_140320450;
        local_23c = DAT_140320454;
        lVar12 = *plVar18;
        iVar11 = (int)uVar17;
        if (lVar12 == 0) {
          uStack_264 = 0xffffffff;
          if ((iVar11 < 0) || (*(int *)(param_2 + 0x18) <= iVar11)) {
                    // WARNING: Subroutine does not return
            FUN_1401566e0();
          }
          lVar12 = *(longlong *)(param_2 + 0x10);
          *(undefined8 *)(uVar16 + lVar12) = 0;
        }
        else {
          lVar2 = plVar18[-1];
          if (lVar2 == 0) {
            local_270 = 0;
          }
          else {
            local_270 = *(undefined8 *)(lVar2 + 0x2e8);
          }
          if (lVar12 < 0) {
            local_268 = (undefined4)plVar18[2];
            uStack_264 = 0;
            local_260 = 0;
            local_250 = 0;
            if ((iVar11 < 0) || (local_258 = lVar12, *(int *)(param_2 + 0x18) <= iVar11)) {
              local_258 = lVar12;
                    // WARNING: Subroutine does not return
              FUN_1401566e0();
            }
          }
          else {
            if (lVar2 == 0) {
LAB_14018b975:
              local_260 = 0;
              local_258 = lVar12;
            }
            else if (lVar12 == lVar2 + 0x180) {
              local_260 = 2;
              local_250 = *(undefined4 *)(lVar2 + 0x304);
              FUN_140158890(&local_248,lVar2 + 0x2f0);
              FUN_140184b40(lVar2 + 0x180,0,0);
            }
            else if (lVar12 == lVar2 + 0x240) {
              local_260 = 1;
              FUN_140184b40(lVar2 + 0x240,0,0);
            }
            else if (lVar12 == lVar2 + 0xc0) {
              local_260 = 3;
              FUN_140184b40(lVar2 + 0xc0,0,0);
            }
            else {
              if (lVar12 != lVar2 + 0x340) goto LAB_14018b975;
              local_260 = 4;
              FUN_140184b40(lVar2 + 0x340,0,0);
            }
            local_268 = (undefined4)plVar18[2];
            uStack_264 = 0;
            if ((iVar11 < 0) || (*(int *)(param_2 + 0x18) <= iVar11)) {
                    // WARNING: Subroutine does not return
              FUN_1401566e0();
            }
          }
          uStack_264 = 0;
          lVar12 = *(longlong *)(param_2 + 0x10);
          *(undefined8 *)(uVar16 + lVar12) = local_270;
        }
        *(undefined4 *)(uVar16 + 8 + lVar12) = local_268;
        *(undefined4 *)(uVar16 + 0xc + lVar12) = uStack_264;
        *(undefined4 *)(uVar16 + 0x10 + lVar12) = local_260;
        *(ulonglong *)(uVar16 + 0x18 + lVar12) = local_258;
        *(undefined4 *)(uVar16 + 0x20 + lVar12) = local_250;
        *(undefined4 *)(uVar16 + 0x30 + lVar12) = local_240;
        *(undefined2 *)(uVar16 + 0x34 + lVar12) = local_23c;
        uVar17 = (ulonglong)(iVar11 + 1U);
        plVar18 = plVar18 + 4;
        uVar16 = uVar16 + 0x38;
        if (local_278[0] <= iVar11 + 1U) {
          return 1;
        }
      } while( true );
    }
  }
  return 0;
}



void FUN_14018be40(longlong param_1,ULONG_PTR param_2,LPOVERLAPPED param_3)

{
  undefined8 uVar1;
  longlong *plVar2;
  undefined8 *puVar3;
  uint uStack_c;
  
  if (*(HANDLE *)(param_1 + 0x28) == (HANDLE)0x0) {
    FUN_140156b50(param_1 + 0x50);
    uVar1 = *(undefined8 *)(param_1 + 0x98);
    plVar2 = *(longlong **)(param_1 + 0x88);
    if (plVar2 == (longlong *)0x0) {
      puVar3 = (undefined8 *)FUN_140156940(0x28);
    }
    else {
      puVar3 = (undefined8 *)(**(code **)(*plVar2 + 8))(plVar2,0x28);
    }
    if (puVar3 != (undefined8 *)0x0) {
      puVar3[2] = param_2;
      puVar3[3] = param_3;
      puVar3[4] = (ulonglong)uStack_c << 0x20;
    }
    puVar3[1] = uVar1;
    *puVar3 = 0;
    *(longlong *)(param_1 + 0xa0) = *(longlong *)(param_1 + 0xa0) + 1;
    if (*(undefined8 **)(param_1 + 0x98) == (undefined8 *)0x0) {
      *(undefined8 **)(param_1 + 0x90) = puVar3;
    }
    else {
      **(undefined8 **)(param_1 + 0x98) = puVar3;
    }
    *(undefined8 **)(param_1 + 0x98) = puVar3;
    FUN_140156be0(param_1 + 0x50);
  }
  else {
    PostQueuedCompletionStatus(*(HANDLE *)(param_1 + 0x28),0,param_2,param_3);
  }
  return;
}



void FUN_14018bf40(longlong param_1,undefined8 param_2,undefined4 param_3)

{
  undefined8 uVar1;
  longlong *plVar2;
  undefined8 *puVar3;
  undefined4 uStack_c;
  
  FUN_140156b50(param_1 + 0x50);
  if (*(longlong *)(param_1 + 0x28) == 0) {
    uVar1 = *(undefined8 *)(param_1 + 0x98);
    plVar2 = *(longlong **)(param_1 + 0x88);
    if (plVar2 == (longlong *)0x0) {
      puVar3 = (undefined8 *)FUN_140156940(0x28);
    }
    else {
      puVar3 = (undefined8 *)(**(code **)(*plVar2 + 8))(plVar2,0x28);
    }
    if (puVar3 != (undefined8 *)0x0) {
      puVar3[2] = param_2;
      puVar3[3] = 0;
      puVar3[4] = CONCAT44(uStack_c,param_3);
    }
    puVar3[1] = uVar1;
    *puVar3 = 0;
    *(longlong *)(param_1 + 0xa0) = *(longlong *)(param_1 + 0xa0) + 1;
    if (*(undefined8 **)(param_1 + 0x98) == (undefined8 *)0x0) {
      *(undefined8 **)(param_1 + 0x90) = puVar3;
    }
    else {
      **(undefined8 **)(param_1 + 0x98) = puVar3;
    }
    *(undefined8 **)(param_1 + 0x98) = puVar3;
  }
  FUN_140156be0(param_1 + 0x50);
  return;
}



longlong FUN_14018c020(longlong param_1,undefined8 param_2,char param_3)

{
  undefined4 uVar1;
  longlong *plVar2;
  undefined8 *puVar3;
  longlong lVar4;
  undefined1 local_50 [72];
  
  FUN_14018ae00();
  *(undefined8 *)(param_1 + 0x38) = 0;
  *(undefined8 *)(param_1 + 0x40) = 0;
  *(undefined4 *)(param_1 + 0x48) = 0;
  uVar1 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x50,uVar1,1);
  *(undefined8 *)(param_1 + 0x88) = 0;
  *(undefined8 *)(param_1 + 0xa0) = 0;
  *(undefined8 *)(param_1 + 0x90) = 0;
  *(undefined8 *)(param_1 + 0x98) = 0;
  *(undefined8 *)(param_1 + 0x30) = param_2;
  *(undefined8 *)(param_1 + 0x28) = 0;
  if (param_3 != '\0') {
    plVar2 = (longlong *)FUN_140158090();
    if (*plVar2 != 0) {
      puVar3 = (undefined8 *)FUN_140158090();
      lVar4 = (*(code *)*puVar3)(0xffffffffffffffff,0,0,0);
      *(longlong *)(param_1 + 0x28) = lVar4;
      if (lVar4 == 0) {
        FUN_140156300(local_50,L"Cannot create IOCP object!");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
      }
    }
  }
  FUN_14018ae50(param_1);
  return param_1;
}



// WARNING: Removing unreachable block (ram,0x00014018c1aa)
// WARNING: Removing unreachable block (ram,0x00014018c1b5)

void FUN_14018c110(longlong param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  FUN_140156b50(param_1 + 0x50);
  puVar2 = *(undefined8 **)(param_1 + 0x90);
  while (puVar2 != (undefined8 *)0x0) {
    if (puVar2[2] == param_2) {
      puVar1 = (undefined8 *)*puVar2;
      FUN_14018b260(param_1 + 0x88,puVar2);
      puVar2 = puVar1;
    }
    else {
      puVar2 = (undefined8 *)*puVar2;
    }
  }
  if (*(longlong *)(param_2 + 0x10) != 0) {
    FUN_1401850c0(*(longlong *)(param_2 + 0x10),param_2,param_3,param_4,uVar3);
  }
  *(undefined8 *)(param_2 + 0x3c8) = 0;
  FUN_140156be0(param_1 + 0x50);
  return;
}



void FUN_14018c200(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  longlong lVar2;
  undefined8 *puVar3;
  longlong *plVar4;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  if (*(HANDLE *)(param_1 + 0x28) != (HANDLE)0x0) {
    CloseHandle(*(HANDLE *)(param_1 + 0x28));
    *(undefined8 *)(param_1 + 0x28) = 0;
  }
  lVar2 = *(longlong *)(param_1 + 0xa0);
  while( true ) {
    if (lVar2 == 0) {
      *(undefined8 *)(param_1 + 0x90) = 0;
      *(undefined8 *)(param_1 + 0x98) = 0;
      iVar1 = *(int *)(param_1 + 0x48);
      while (0 < iVar1) {
        FUN_14018c110(param_1,*(undefined8 *)(param_1 + 0x38));
        iVar1 = *(int *)(param_1 + 0x48);
      }
      FUN_1401a9270(param_1 + 0x88);
      FUN_140156c00(param_1 + 0x50);
      FUN_14018b0c0(param_1 + 0x38);
      return;
    }
    puVar3 = *(undefined8 **)(param_1 + 0x90);
    if (puVar3 == (undefined8 *)0x0) break;
    *(undefined8 *)(param_1 + 0x90) = *puVar3;
    plVar4 = *(longlong **)(param_1 + 0x88);
    if (plVar4 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar4 + 0x10))(plVar4,puVar3,plVar4,param_4,uVar5);
    }
    *(longlong *)(param_1 + 0xa0) = *(longlong *)(param_1 + 0xa0) + -1;
    lVar2 = *(longlong *)(param_1 + 0xa0);
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



void FUN_14018c300(longlong param_1,undefined8 param_2)

{
  int *piVar1;
  undefined *puVar2;
  DWORD DVar3;
  undefined *local_res8;
  undefined *local_res18;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_res18 = PTR_DAT_1403200a0;
  DVar3 = GetLastError();
  FUN_14004ce50(&local_res18,&DAT_140264328,param_2,DVar3,uVar4);
  FUN_1401568c0();
  puVar2 = local_res18;
  local_res8 = PTR_DAT_1403200a0;
  if (PTR_DAT_1403200a0 == (undefined *)0x0) {
    local_res8 = (undefined *)0x0;
  }
  if (local_res18 != PTR_DAT_1403200a0) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    FUN_14004f990(&local_res8);
    local_res8 = puVar2;
    if (((puVar2 != PTR_DAT_1403200a0) && (puVar2 != (undefined *)0x0)) &&
       (puVar2 != (undefined *)0x8)) {
      *(int *)(puVar2 + -4) = *(int *)(puVar2 + -4) + 1;
    }
    FUN_140156be0(uVar4);
  }
  (**(code **)(**(longlong **)(param_1 + 0x30) + 8))
            (*(longlong **)(param_1 + 0x30),param_1,&local_res8);
  if (((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) &&
     (puVar2 + -8 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    FUN_140156b50(uVar4);
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



void FUN_14018c430(longlong param_1,undefined8 *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  longlong lVar2;
  undefined1 local_50 [72];
  
  if (param_2[0x5d] == 0) {
    FUN_140156300(local_50,&DAT_140265590,param_3,param_4,0xfffffffffffffffe);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
  }
  if (param_2[0x79] != 0) {
    FUN_140156300(local_50,&DAT_140265570,param_3,param_4,0xfffffffffffffffe);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
  }
  if (*(longlong *)(param_1 + 0x28) != 0) {
    puVar1 = (undefined8 *)FUN_140158090();
    lVar2 = (*(code *)*puVar1)(param_2[0x7a],*(undefined8 *)(param_1 + 0x28),param_2,0);
    if (lVar2 == 0) {
      FUN_14018c300(param_1,L"Proud::CompletionPort::AssociateSocket");
    }
  }
  FUN_140156b50(param_1 + 0x50);
  puVar1 = (undefined8 *)(param_1 + 0x38);
  if (param_2[2] != 0) {
    FUN_1401850c0(puVar1,param_2);
  }
  if (*(longlong *)(param_1 + 0x40) == 0) {
    *puVar1 = param_2;
  }
  else {
    *(undefined8 **)(*(longlong *)(param_1 + 0x40) + 8) = param_2;
    *param_2 = *(undefined8 *)(param_1 + 0x40);
  }
  *(undefined8 **)(param_1 + 0x40) = param_2;
  param_2[2] = puVar1;
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  param_2[0x79] = param_1;
  FUN_140156be0(param_1 + 0x50);
  return;
}



void FUN_14018c560(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  if (lVar1 != 0) {
    FUN_1401859b0(lVar1);
    FUN_140156970(lVar1);
  }
  return;
}



void FUN_14018c590(longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined1 local_58 [88];
  
  if ((longlong *)param_2[2] != param_1) {
    FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                  L"Proud::CListNode<class Proud::ITaskSubject::CNode>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  plVar1 = (longlong *)param_2[1];
  lVar2 = *param_2;
  if (plVar1 != (longlong *)0x0) {
    *plVar1 = lVar2;
  }
  if (lVar2 != 0) {
    *(longlong **)(lVar2 + 8) = plVar1;
  }
  if (plVar1 == (longlong *)0x0) {
    if ((longlong *)param_1[1] != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::ITaskSubject::CNode>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    param_1[1] = lVar2;
  }
  if (lVar2 == 0) {
    if ((longlong *)*param_1 != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::ITaskSubject::CNode>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    *param_1 = (longlong)plVar1;
  }
  *param_2 = 0;
  param_2[1] = 0;
  param_2[2] = 0;
  *(int *)(param_1 + 2) = (int)param_1[2] + -1;
  return;
}



int FUN_14018c670(longlong param_1,int param_2)

{
  int iVar1;
  int iVar2;
  
  iVar2 = *(int *)(param_1 + 0x24);
  if (iVar2 == 0) {
    iVar1 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
    iVar2 = 0x400;
    if (iVar1 < 0x400) {
      iVar2 = iVar1;
    }
    iVar1 = 4;
    if (4 < iVar2) {
      iVar1 = iVar2;
    }
    iVar2 = iVar1 + param_2;
    if (iVar1 + param_2 < *(int *)(param_1 + 0x20)) {
      iVar2 = *(int *)(param_1 + 0x20);
    }
    return iVar2;
  }
  if (iVar2 == 1) {
    iVar1 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
    iVar2 = 0x10;
    if (0x10 < iVar1) {
      iVar2 = iVar1;
    }
    iVar1 = iVar2 + param_2;
    if (iVar2 + param_2 < *(int *)(param_1 + 0x20)) {
      iVar1 = *(int *)(param_1 + 0x20);
    }
    return iVar1;
  }
  if (iVar2 == 2) {
    if (param_2 < *(int *)(param_1 + 0x20)) {
      param_2 = *(int *)(param_1 + 0x20);
    }
    return param_2;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_14018c710(longlong param_1,longlong param_2)

{
  undefined2 *puVar1;
  int iVar2;
  
  iVar2 = 0;
  if (0 < param_2) {
    puVar1 = (undefined2 *)(param_1 + 0x34);
    do {
      if ((undefined8 *)(puVar1 + -0x1a) != (undefined8 *)0x0) {
        *(undefined ***)(puVar1 + -6) = Proud::AddrPort::vftable;
        *(undefined4 *)(puVar1 + -2) = 0;
        *puVar1 = 0;
        *(undefined8 *)(puVar1 + -0x1a) = 0;
        *(undefined8 *)(puVar1 + -0xe) = 0;
        *(undefined8 *)(puVar1 + -0x16) = 0;
        *(undefined4 *)(puVar1 + -0x12) = 5;
        *(undefined4 *)(puVar1 + -10) = 0;
        *(undefined4 *)(puVar1 + -2) = DAT_140320450;
        *puVar1 = DAT_140320454;
      }
      iVar2 = iVar2 + 1;
      puVar1 = puVar1 + 0x1c;
    } while (iVar2 < param_2);
  }
  return;
}



void FUN_14018c780(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  FUN_1401ae800(param_1 + 0x188,*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x1c0),param_3,
                param_4,0xfffffffffffffffe);
  if (*(char *)(param_1 + 0x198) == '\x01') {
    FUN_140168e20(*(undefined8 *)(param_1 + 0x148));
  }
  FUN_1401ae800(param_1 + 0x1a0,*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x1c0));
  if (*(char *)(param_1 + 0x1b0) == '\x01') {
    FUN_14017a640(*(undefined8 *)(param_1 + 0x148));
  }
  FUN_1401ae800(param_1 + 0x1b8,*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x1c0));
  if (*(char *)(param_1 + 0x1c8) == '\x01') {
    FUN_140180ca0(*(undefined8 *)(param_1 + 0x148));
  }
  FUN_1401ae800(param_1 + 0x1d0,*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x1c0));
  if (*(char *)(param_1 + 0x1e0) == '\x01') {
    FUN_14016a7b0(*(undefined8 *)(param_1 + 0x148));
  }
  FUN_1401ae800(param_1 + 0xa0,*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x1c0));
  if (*(char *)(param_1 + 0xb0) == '\x01') {
    FUN_14015fbd0(*(undefined8 *)(param_1 + 0x148));
  }
  FUN_1401ae800(param_1 + 0xb8,*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x1c0));
  if (*(char *)(param_1 + 200) == '\x01') {
    FUN_140181520(*(undefined8 *)(param_1 + 0x148));
  }
  FUN_1401ae800(param_1 + 0x248,*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x1c0));
  if (*(char *)(param_1 + 600) == '\x01') {
    uVar1 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
    FUN_140156b50(uVar1);
    if (DAT_1403288ef != '\0') {
      (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                (*(longlong **)(param_1 + 0x148),L"Proud::CNetThreads_S::Heartbeat_One");
    }
    uVar2 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
    FUN_140172a10(*(longlong *)(param_1 + 0x148) + 0x2d8,uVar2);
    FUN_140156be0(uVar1);
  }
  if (*(int *)(*(longlong *)(param_1 + 0x148) + 600) != 0) {
    FUN_1401ae800(param_1 + 0x1e8,*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x1c0));
    if (*(char *)(param_1 + 0x1f8) == '\x01') {
      LOCK();
      *(undefined4 *)(param_1 + 0x200) = 1;
      UNLOCK();
    }
  }
  FUN_14016ccf0(*(undefined8 *)(param_1 + 0x148));
  return;
}



void FUN_14018c9a0(longlong param_1,longlong param_2,longlong param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined1 local_res10 [8];
  
  if (param_3 == 0) {
    lVar1 = 0;
  }
  else {
    lVar1 = param_3 + 0x40;
  }
  FUN_1401a37e0(local_res10,lVar1,param_3,param_4,0xfffffffffffffffe);
  FUN_140156b50(param_3 + 0xa8);
  if ((*(longlong **)(param_3 + 0x150) != (longlong *)0x0) &&
     (**(longlong **)(param_3 + 0x150) != 0)) {
    FUN_1401870c0();
  }
  if (0 < *(int *)(param_2 + 8)) {
    *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x6c0) =
         *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x6c0) + 1;
    *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x680) =
         *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x680) + (longlong)*(int *)(param_2 + 8);
  }
  *(undefined1 *)(param_3 + 0x100) = 0;
  FUN_1401a3990(param_3);
  FUN_140156be0(param_3 + 0xa8);
  FUN_1401a37f0(local_res10);
  return;
}



void FUN_14018caa0(longlong param_1,undefined8 param_2,longlong param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  
  uVar3 = 0xfffffffffffffffe;
  FUN_1401c5a30(param_3 + 0xc0);
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
  uVar4 = uVar2;
  FUN_140156b50(uVar2);
  if (DAT_1403288ef != '\0') {
    lVar1 = **(longlong **)(param_1 + 0x148);
    (**(code **)(lVar1 + 200))
              (*(longlong **)(param_1 + 0x148),
               L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_SpeedHackDetectorPing",lVar1,
               param_4,uVar3,uVar4,1);
  }
  FUN_14019cb20(param_3);
  FUN_140156be0(uVar2);
  return;
}



void FUN_14018cb30(longlong param_1,undefined8 param_2,longlong param_3,undefined8 param_4)

{
  char cVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  longlong lVar5;
  undefined8 local_res18;
  undefined1 local_res20 [8];
  undefined **local_50;
  undefined4 local_48;
  undefined2 local_44;
  undefined8 local_40;
  undefined1 local_38;
  longlong local_30;
  undefined1 local_28;
  
  if ((param_3 != 0) &&
     (cVar1 = FUN_1401543d0(param_2,&local_res18,8,param_4,0xfffffffffffffffe), cVar1 != '\0')) {
    uVar2 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
    local_40 = uVar2;
    FUN_140156b50(uVar2);
    local_38 = 1;
    if (DAT_1403288ef != '\0') {
      (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                (*(longlong **)(param_1 + 0x148),
                 L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_ReplyReceiveSpeedAtReceiverSide_NoBypass"
                );
    }
    lVar5 = 0;
    if ((*(longlong **)(param_3 + 0x740) == (longlong *)0x0) ||
       (lVar3 = **(longlong **)(param_3 + 0x740), lVar4 = lVar3 + 0x40, lVar3 == 0)) {
      lVar4 = lVar5;
    }
    FUN_1401a37e0(local_res20,lVar4);
    lVar3 = lVar5;
    if (*(longlong **)(param_3 + 0x740) != (longlong *)0x0) {
      lVar3 = **(longlong **)(param_3 + 0x740);
    }
    lVar3 = lVar3 + 0xa8;
    local_30 = lVar3;
    FUN_140156b50(lVar3);
    local_28 = 1;
    local_50 = Proud::AddrPort::vftable;
    local_48 = *(undefined4 *)(param_3 + 0x710);
    local_44 = *(undefined2 *)(param_3 + 0x714);
    if (*(longlong **)(param_3 + 0x740) != (longlong *)0x0) {
      lVar5 = **(longlong **)(param_3 + 0x740);
    }
    FUN_14019f040(*(undefined8 *)(lVar5 + 0x168),&local_50,local_res18);
    FUN_140156be0(lVar3);
    FUN_1401a37f0(local_res20);
    FUN_140156be0(uVar2);
  }
  return;
}



void FUN_14018cc90(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014018ccb7. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



void FUN_14018ccd0(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014018ccf7. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



undefined8 * FUN_14018cd10(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14018cd70(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14018cdd0(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14018ce30(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14018ce90(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  undefined1 local_58 [88];
  
  lVar1 = *param_1;
  while( true ) {
    if (lVar1 == 0) {
      return;
    }
    plVar2 = (longlong *)*param_1;
    if ((longlong *)plVar2[2] != param_1) break;
    plVar3 = (longlong *)plVar2[1];
    lVar1 = *plVar2;
    if (plVar3 != (longlong *)0x0) {
      *plVar3 = lVar1;
    }
    if (lVar1 != 0) {
      *(longlong **)(lVar1 + 8) = plVar3;
    }
    if (plVar3 == (longlong *)0x0) {
      if ((longlong *)param_1[1] != plVar2) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::ITaskSubject::CNode>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      param_1[1] = lVar1;
    }
    if (lVar1 == 0) {
      if ((longlong *)*param_1 != plVar2) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::ITaskSubject::CNode>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      *param_1 = (longlong)plVar3;
    }
    *plVar2 = 0;
    plVar2[1] = 0;
    plVar2[2] = 0;
    *(int *)(param_1 + 2) = (int)param_1[2] + -1;
    lVar1 = *param_1;
  }
  FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                L"Proud::CListNode<class Proud::ITaskSubject::CNode>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



void FUN_14018cf80(longlong param_1,int param_2)

{
  longlong *plVar1;
  int iVar2;
  longlong lVar3;
  undefined1 local_58 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 != *(int *)(param_1 + 0x18)) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar2 = FUN_1401dcff0();
      plVar1 = *(longlong **)(param_1 + 8);
      lVar3 = (longlong)iVar2;
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar1 == (longlong *)0x0) {
          lVar3 = FUN_140156940(lVar3);
        }
        else {
          lVar3 = (**(code **)(*plVar1 + 8))(plVar1,lVar3);
        }
      }
      else {
        if (plVar1 == (longlong *)0x0) {
          lVar3 = FUN_1401569a0(*(undefined8 *)(param_1 + 0x10),lVar3);
        }
        else {
          lVar3 = (**(code **)(*plVar1 + 0x10))(plVar1,*(undefined8 *)(param_1 + 0x10),lVar3);
        }
        if (lVar3 == 0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
      }
      *(longlong *)(param_1 + 0x10) = lVar3;
      *(int *)(param_1 + 0x1c) = iVar2;
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_14018d040(longlong param_1,longlong param_2,longlong param_3)

{
  undefined4 *puVar1;
  int iVar2;
  
  iVar2 = 0;
  if (0 < param_3) {
    puVar1 = (undefined4 *)(param_1 + 0x30);
    param_2 = param_2 - param_1;
    do {
      if ((undefined8 *)(puVar1 + -0xc) != (undefined8 *)0x0) {
        *(undefined8 *)(puVar1 + -0xc) = *(undefined8 *)(param_2 + -0x30 + (longlong)puVar1);
        puVar1[-10] = *(undefined4 *)(param_2 + -0x28 + (longlong)puVar1);
        puVar1[-9] = *(undefined4 *)(param_2 + -0x24 + (longlong)puVar1);
        puVar1[-8] = *(undefined4 *)(param_2 + -0x20 + (longlong)puVar1);
        *(undefined8 *)(puVar1 + -6) = *(undefined8 *)(param_2 + -0x18 + (longlong)puVar1);
        puVar1[-4] = *(undefined4 *)(param_2 + -0x10 + (longlong)puVar1);
        *(undefined ***)(puVar1 + -2) = Proud::AddrPort::vftable;
        *puVar1 = *(undefined4 *)(param_2 + (longlong)puVar1);
        *(undefined2 *)(puVar1 + 1) = *(undefined2 *)(param_2 + 4 + (longlong)puVar1);
      }
      iVar2 = iVar2 + 1;
      puVar1 = puVar1 + 0xe;
    } while (iVar2 < param_3);
  }
  return;
}



void FUN_14018d0c0(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014018d0e7. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



void FUN_14018d100(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014018d127. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x00014018d47a)

void FUN_14018d140(longlong param_1,longlong param_2)

{
  char cVar1;
  longlong lVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong lVar5;
  int iVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong *plVar9;
  int iVar10;
  
  lVar5 = *(longlong *)(param_1 + 0x148) + 0x798;
  FUN_140156b50(lVar5);
  lVar8 = *(longlong *)(param_1 + 0x148) + 2000;
  FUN_140156b50(lVar8);
  iVar6 = 0;
  iVar10 = *(int *)(*(longlong *)(param_1 + 0x148) + 0x818) +
           *(int *)(*(longlong *)(param_1 + 0x148) + 0x838);
  FUN_14015d550(param_2,iVar10);
  if (*(int *)(param_2 + 0x18) == 0) {
    plVar9 = (longlong *)0x0;
  }
  else {
    plVar9 = *(longlong **)(param_2 + 0x10);
  }
  lVar4 = *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x828);
  plVar7 = plVar9;
  while (lVar4 != 0) {
    FUN_1401a37c0(lVar4 + 0x40);
    if (lVar4 == 0) {
      lVar2 = 0;
    }
    else {
      lVar2 = lVar4 + 0x88;
    }
    *plVar7 = lVar2;
    if (*(longlong *)(lVar4 + 0xa0) != 0) {
      FUN_14015b180(*(longlong *)(lVar4 + 0xa0),lVar4);
    }
    iVar6 = iVar6 + 1;
    plVar7 = plVar7 + 1;
    lVar4 = *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x828);
  }
  lVar4 = *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x808);
  if (lVar4 != 0) {
    plVar7 = plVar9 + iVar6;
    do {
      FUN_1401a37c0(lVar4 + 0xc0);
      if (lVar4 == 0) {
        lVar2 = 0;
      }
      else {
        lVar2 = lVar4 + 0x108;
      }
      *plVar7 = lVar2;
      if (*(longlong *)(lVar4 + 0x120) != 0) {
        FUN_14015af20(*(longlong *)(lVar4 + 0x120),lVar4);
      }
      plVar7 = plVar7 + 1;
      lVar4 = *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x808);
    } while (lVar4 != 0);
  }
  FUN_140156be0(lVar8);
  FUN_140156be0(lVar5);
  lVar5 = (longlong)iVar10;
  if (0 < iVar10) {
    do {
      lVar8 = 0;
      if (lVar5 < 1) {
        return;
      }
      do {
        plVar7 = (longlong *)plVar9[lVar8];
        uVar3 = (**(code **)(*plVar7 + 0x10))(plVar7);
        if (lVar8 == 0) {
          FUN_140156b50(uVar3);
          iVar6 = (**(code **)(*plVar7 + 8))(plVar7);
          FUN_140156be0(uVar3);
          if (iVar6 != 0) {
            uVar3 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
            FUN_140156b50(uVar3);
            if (DAT_1403288ef != '\0') {
              (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                        (*(longlong **)(param_1 + 0x148),
                         L"Proud::CNetThreads_S::NetworkerThread_EveryRemote_IssueSendOnNeed");
            }
            (**(code **)(*plVar7 + 0x20))
                      (plVar7,L"Proud::CNetThreads_S::NetworkerThread_EveryRemote_IssueSendOnNeed",
                       iVar6);
            FUN_140156be0(uVar3);
          }
          (**(code **)(*plVar7 + 0x18))(plVar7);
          *plVar9 = plVar9[lVar5 + -1];
LAB_14018d472:
          lVar5 = lVar5 + -1;
        }
        else {
          cVar1 = FUN_140156ba0();
          if (cVar1 != '\0') {
            iVar6 = (**(code **)(*plVar7 + 8))(plVar7);
            FUN_140156be0(uVar3);
            if (iVar6 != 0) {
              uVar3 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
              FUN_140156b50(uVar3);
              if (DAT_1403288ef != '\0') {
                (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                          (*(longlong **)(param_1 + 0x148),
                           L"Proud::CNetThreads_S::NetworkerThread_EveryRemote_IssueSendOnNeed");
              }
              (**(code **)(*plVar7 + 0x20))
                        (plVar7,L"Proud::CNetThreads_S::NetworkerThread_EveryRemote_IssueSendOnNeed"
                         ,iVar6);
              FUN_140156be0(uVar3);
            }
            (**(code **)(*plVar7 + 0x18))(plVar7);
            plVar9[lVar8] = plVar9[lVar5 + -1];
            goto LAB_14018d472;
          }
        }
        lVar8 = lVar8 + 1;
      } while (lVar8 < lVar5);
    } while (0 < lVar5);
  }
  return;
}



void thunk_FUN_14018ce90(void)

{
  FUN_14018ce90();
  return;
}



void FUN_14018d4e0(longlong param_1,int param_2)

{
  longlong *plVar1;
  int iVar2;
  undefined8 uVar3;
  longlong lVar4;
  undefined1 local_58 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  iVar2 = *(int *)(param_1 + 0x18);
  if (param_2 != iVar2) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar2 = FUN_14015ae80(param_1,param_2);
      plVar1 = *(longlong **)(param_1 + 8);
      lVar4 = (longlong)iVar2;
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar1 == (longlong *)0x0) {
          uVar3 = FUN_140156940(lVar4 * 0x38);
        }
        else {
          uVar3 = (**(code **)(*plVar1 + 8))(plVar1,lVar4 * 0x38);
        }
        *(undefined8 *)(param_1 + 0x10) = uVar3;
        FUN_14018c710(uVar3,(longlong)param_2);
      }
      else {
        uVar3 = *(undefined8 *)(param_1 + 0x10);
        if (plVar1 == (longlong *)0x0) {
          lVar4 = FUN_140156940(lVar4 * 0x38);
        }
        else {
          lVar4 = (**(code **)(*plVar1 + 8))(plVar1,lVar4 * 0x38);
        }
        FUN_14018d040(lVar4,uVar3,(longlong)*(int *)(param_1 + 0x18));
        FUN_14018c710((longlong)*(int *)(param_1 + 0x18) * 0x38 + lVar4,
                      (longlong)(param_2 - *(int *)(param_1 + 0x18)));
        if (lVar4 == 0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
        plVar1 = *(longlong **)(param_1 + 8);
        if (plVar1 == (longlong *)0x0) {
          FUN_140156970(uVar3);
        }
        else {
          (**(code **)(*plVar1 + 0x18))(plVar1,uVar3);
        }
        *(longlong *)(param_1 + 0x10) = lVar4;
      }
      *(int *)(param_1 + 0x1c) = iVar2;
    }
    else if ((iVar2 - param_2 < 1) && (0 < param_2 - iVar2)) {
      FUN_14018c710((longlong)iVar2 * 0x38 + *(longlong *)(param_1 + 0x10),
                    (longlong)(param_2 - iVar2));
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_14018d670(longlong param_1)

{
  CloseHandle(*(HANDLE *)(param_1 + 0x20));
  FUN_14018ce90(param_1 + 8);
  return;
}



void FUN_14018d6a0(longlong param_1,longlong param_2)

{
  longlong *plVar1;
  char cVar2;
  byte bVar3;
  int iVar4;
  int iVar5;
  byte local_res20;
  undefined4 local_a0 [2];
  int *local_98;
  int local_90;
  undefined8 local_20;
  
  local_20 = 0xfffffffffffffffe;
  local_98 = (int *)(param_2 + 8);
  iVar4 = (int)(*local_98 + (*local_98 >> 0x1f & 7U)) >> 3;
  if (iVar4 != 0) {
    FUN_14017c710(*(undefined8 *)(param_1 + 0x148),0,
                  "Proud::CNetThreads_S::UserWorkerThread_FinalReceiveRmi",2);
  }
  local_res20 = 0;
  iVar5 = 0;
  local_a0[0] = 0;
  cVar2 = FUN_140154d80(local_98,local_a0);
  if (cVar2 != '\0') {
    local_90 = *(int *)(*(longlong *)(param_1 + 0x148) + 0x48);
    for (; iVar5 < local_90; iVar5 = iVar5 + 1) {
      if ((iVar5 < 0) || (*(int *)(*(longlong *)(param_1 + 0x148) + 0x48) <= iVar5)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      plVar1 = *(longlong **)
                (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x40) + (longlong)iVar5 * 8);
      FUN_1401540a0(local_98,iVar4);
      bVar3 = (**(code **)(*plVar1 + 0x10))(plVar1,param_2 + 8);
      local_res20 = local_res20 | bVar3;
    }
    if (local_res20 == 0) {
      FUN_1401540a0(local_98,iVar4);
      if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
        plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x148) + 0x758);
        (**(code **)(*plVar1 + 0x28))(plVar1,local_a0[0]);
      }
    }
    FUN_1401ab750(param_1 + 0x160,*(undefined4 *)(param_2 + 0x30),0);
  }
  return;
}



undefined8 FUN_14018d810(longlong param_1)

{
  int iVar1;
  longlong *plVar2;
  DWORD DVar3;
  longlong lVar4;
  int iVar5;
  longlong lVar6;
  
  FUN_140156b50();
  if (*(int *)(param_1 + 0x78) != 0) {
    DVar3 = GetCurrentThreadId();
    iVar5 = 0;
    iVar1 = *(int *)(param_1 + 0x78);
    lVar6 = 0;
    if (0 < iVar1) {
      do {
        if ((lVar6 < 0) || (iVar1 <= iVar5)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        plVar2 = *(longlong **)(*(longlong *)(param_1 + 0x70) + lVar6 * 8);
        lVar4 = 0;
        if (plVar2 != (longlong *)0x0) {
          lVar4 = *plVar2;
        }
        if (*(DWORD *)(lVar4 + 8) == DVar3) {
          FUN_140156be0(param_1);
          return 1;
        }
        iVar5 = iVar5 + 1;
        lVar6 = lVar6 + 1;
      } while (iVar5 < iVar1);
    }
  }
  FUN_140156be0(param_1);
  return 0;
}



void FUN_14018d8a0(longlong param_1,longlong param_2)

{
  undefined2 *puVar1;
  int iVar2;
  
  if (0 < param_2) {
    iVar2 = 0;
    puVar1 = (undefined2 *)(param_1 + 0x3c);
    do {
      if (puVar1 != (undefined2 *)0x3c) {
        FUN_1401544a0();
        *(undefined ***)(puVar1 + -6) = Proud::AddrPort::vftable;
        *(undefined4 *)(puVar1 + -2) = 0;
        *puVar1 = 0;
        *(undefined1 *)(puVar1 + 2) = 0;
        *(undefined4 *)(puVar1 + -10) = 0;
        *(undefined4 *)(puVar1 + -2) = DAT_140320450;
        *puVar1 = DAT_140320454;
      }
      iVar2 = iVar2 + 1;
      puVar1 = puVar1 + 0x24;
    } while (iVar2 < param_2);
  }
  return;
}



void FUN_14018d940(longlong param_1,longlong param_2,longlong param_3)

{
  undefined4 *puVar1;
  int iVar2;
  
  if (0 < param_3) {
    iVar2 = 0;
    puVar1 = (undefined4 *)(param_1 + 0x38);
    param_2 = param_2 - param_1;
    do {
      if (puVar1 + -0xe != (undefined4 *)0x0) {
        FUN_1401544d0(puVar1 + -0xe,(longlong)puVar1 + param_2 + -0x38);
        puVar1[-4] = *(undefined4 *)((longlong)puVar1 + param_2 + -0x10);
        *(undefined ***)(puVar1 + -2) = Proud::AddrPort::vftable;
        *puVar1 = *(undefined4 *)((longlong)puVar1 + param_2);
        *(undefined2 *)(puVar1 + 1) = *(undefined2 *)((longlong)puVar1 + param_2 + 4);
        *(undefined1 *)(puVar1 + 2) = *(undefined1 *)((longlong)puVar1 + param_2 + 8);
      }
      iVar2 = iVar2 + 1;
      puVar1 = puVar1 + 0x12;
    } while (iVar2 < param_3);
  }
  return;
}



void FUN_14018d9e0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  undefined *puVar3;
  
  uVar2 = 0xfffffffffffffffe;
  puVar3 = &DAT_14032a038;
  FUN_140156b50(&DAT_14032a038);
  *(undefined4 *)(param_1 + 0x50) = 0;
  *(undefined8 *)(param_1 + 0x58) = 0;
  FUN_14018cf80(param_1,0,param_3,param_4,uVar2,puVar3,1);
  FUN_140050060(param_1 + 0x28,0);
  puVar1 = DAT_14032a030;
  if ((*(short *)(param_1 + -8) == 0x1de6) && (*(longlong *)(param_1 + 0x60) == 0)) {
    *(undefined8 *)(param_1 + 0x60) = *DAT_14032a030;
    *puVar1 = (short *)(param_1 + -8);
    FUN_140156be0(&DAT_14032a038);
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_14018da70(longlong *param_1)

{
  if (*param_1 != 0) {
    FUN_14018d9e0();
  }
  return;
}



void FUN_14018da90(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  void *pvVar2;
  undefined8 *puVar3;
  
  lVar1 = *param_2;
  if (lVar1 != *param_1) {
    if (lVar1 != 0) {
      *(longlong *)(*param_2 + 8) = *(longlong *)(lVar1 + 8) + 1;
    }
    puVar3 = (undefined8 *)0x0;
    if ((*param_1 != 0) &&
       (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
       *(longlong *)(*param_1 + 8) == 0)) {
      puVar3 = (undefined8 *)*param_1;
    }
    *param_1 = *param_2;
    if (puVar3 != (undefined8 *)0x0) {
      pvVar2 = (void *)*puVar3;
      if (pvVar2 != (void *)0x0) {
        FUN_140182790(pvVar2);
        operator_delete(pvVar2);
      }
      FUN_140156970(puVar3);
    }
  }
  return;
}



void FUN_14018db20(longlong param_1,longlong param_2)

{
  undefined4 *puVar1;
  int iVar2;
  
  if (0 < param_2) {
    iVar2 = 0;
    puVar1 = (undefined4 *)(param_1 + 0x18);
    do {
      FUN_1401560e0(puVar1 + -4);
      if (*(longlong *)(puVar1 + -2) != 0) {
        if ((int)puVar1[1] < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        *puVar1 = 0;
      }
      iVar2 = iVar2 + 1;
      puVar1 = puVar1 + 0x12;
    } while (iVar2 < param_2);
  }
  return;
}



void FUN_14018db90(longlong param_1)

{
  int *piVar1;
  char cVar2;
  undefined *puVar3;
  HANDLE hThread;
  __time64_t _Var4;
  undefined *puVar5;
  undefined8 uVar6;
  undefined1 local_res8 [8];
  undefined *local_res10;
  
  hThread = GetCurrentThread();
  SetThreadPriorityBoost(hThread,0);
  FUN_1401ae8b0(local_res8);
  cVar2 = *(char *)(param_1 + 0x140);
  while (cVar2 == '\0') {
    FUN_1401ac690(param_1 + 0x150,100);
    uVar6 = FUN_14018af40(*(longlong *)(param_1 + 0x148) + 0x760);
    *(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x1c0) = uVar6;
    uVar6 = FUN_14018aee0(*(longlong *)(param_1 + 0x148) + 0x760);
    *(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x200) = uVar6;
    _Var4 = _time64((__time64_t *)0x0);
    *(__time64_t *)(*(longlong *)(param_1 + 0x148) + 0x208) = _Var4;
    FUN_14018c780(param_1);
    cVar2 = *(char *)(param_1 + 0x140);
  }
  FUN_14016a860(*(undefined8 *)(param_1 + 0x148));
  if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x17f0) != 0) {
    FUN_1401568c0();
    local_res10 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_res10,&DAT_140265b10,L"Proud::CNetThreads_S::Heartbeat_Main");
    puVar3 = local_res10;
    puVar5 = local_res10;
    if (local_res10 == (undefined *)0x0) {
      puVar5 = PTR_DAT_1403200a0;
    }
    FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x17f0),0,puVar5);
    if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_1403200a0)) &&
       (puVar3 + -8 != (undefined *)0x0)) {
      uVar6 = FUN_1401568c0();
      FUN_140156b50(uVar6);
      piVar1 = (int *)(puVar3 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar3 + -8);
      }
      FUN_140156be0(uVar6);
    }
  }
  FUN_1401ae8e0(local_res8);
  return;
}



void FUN_14018dd20(longlong param_1,longlong param_2,longlong param_3)

{
  int *piVar1;
  bool bVar2;
  undefined *puVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  undefined *puVar7;
  longlong lVar8;
  undefined *local_res10;
  undefined1 local_res18 [16];
  undefined8 in_stack_ffffffffffffff10;
  undefined4 uVar9;
  undefined **local_c8;
  undefined8 local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined8 local_a8;
  undefined **local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined1 local_70;
  undefined8 local_68;
  undefined1 local_60;
  undefined8 local_58;
  undefined1 local_50;
  undefined8 local_48;
  
  uVar9 = (undefined4)((ulonglong)in_stack_ffffffffffffff10 >> 0x20);
  local_48 = 0xfffffffffffffffe;
  lVar8 = param_3 + 0xc0;
  if (param_3 == 0) {
    lVar8 = 0;
  }
  FUN_1401a37e0(local_res18,lVar8);
  uVar5 = (**(code **)(*(longlong *)(param_3 + 0x108) + 0x10))();
  FUN_140156b50(uVar5);
  bVar2 = true;
  **(undefined1 **)(param_3 + 0x748) = 0;
  if (*(int *)(param_2 + 8) < 0) {
    FUN_140156be0(uVar5);
    bVar2 = false;
    FUN_1401568c0();
    local_res10 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_res10,L"%s:%d",
                  L"Proud::CNetThreads_S::NetWorkerThread_TcpSendCompletionCase",
                  *(undefined4 *)(param_2 + 0xc));
    local_68 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
    FUN_140156b50(local_68);
    local_60 = 1;
    if (DAT_1403288ef != '\0') {
      (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                (*(longlong **)(param_1 + 0x148),
                 L"Proud::CNetThreads_S::NetWorkerThread_TcpSendCompletionCase");
    }
    puVar3 = local_res10;
    local_98 = 0;
    local_90 = 0;
    local_88 = 0;
    local_80 = 0;
    local_a0 = Proud::ByteArray::vftable;
    puVar7 = local_res10;
    if (local_res10 == (undefined *)0x0) {
      puVar7 = PTR_DAT_1403200a0;
    }
    FUN_14017f200(*(undefined8 *)(param_1 + 0x148),param_3,0xb,3,&local_a0,puVar7,
                  *(undefined4 *)(param_2 + 0xc));
    FUN_1401858d0(&local_a0);
    FUN_140156be0(local_68);
    if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_1403200a0)) &&
       (puVar3 + -8 != (undefined *)0x0)) {
      uVar6 = FUN_1401568c0();
      local_58 = uVar6;
      FUN_140156b50(uVar6);
      local_50 = 1;
      piVar1 = (int *)(puVar3 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar3 + -8);
      }
      FUN_140156be0(uVar6);
    }
  }
  else {
    FUN_1401a7fb0(*(longlong *)(param_3 + 0x748) + 0x48);
    iVar4 = FUN_1401a3490(*(undefined8 *)(param_3 + 0x748));
    if (iVar4 != 0) {
      FUN_140156be0(uVar5);
      bVar2 = false;
      uVar6 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
      local_78 = uVar6;
      FUN_140156b50(uVar6);
      local_70 = 1;
      if (DAT_1403288ef != '\0') {
        (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                  (*(longlong **)(param_1 + 0x148),
                   L"Proud::CNetThreads_S::NetWorkerThread_TcpSendCompletionCase");
      }
      local_c0 = 0;
      local_b8 = 0;
      local_b0 = 0;
      local_a8 = 0;
      local_c8 = Proud::ByteArray::vftable;
      (**(code **)(*(longlong *)(param_3 + 0xa0) + 0x38))
                (param_3 + 0xa0,0xb,3,&local_c8,
                 L"Proud::CNetThreads_S::NetWorkerThread_TcpSendCompletionCase",
                 CONCAT44(uVar9,iVar4));
      FUN_1401858d0(&local_c8);
      (**(code **)(*(longlong *)(param_3 + 0xa0) + 0x40))
                (param_3 + 0xa0,L"Proud::CNetThreads_S::NetWorkerThread_TcpSendCompletionCase");
      FUN_140156be0(uVar6);
      local_70 = 0;
    }
    *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x580) =
         *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x580) + 1;
    *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x5c0) =
         *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x5c0) + (longlong)*(int *)(param_2 + 8);
  }
  if (bVar2) {
    FUN_140156be0(uVar5);
  }
  FUN_1401a37f0(local_res18);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14018e040(longlong param_1,undefined8 param_2,longlong param_3)

{
  int *piVar1;
  undefined **ppuVar2;
  ulonglong uVar3;
  undefined **ppuVar4;
  char cVar5;
  int iVar6;
  undefined8 uVar7;
  undefined *puVar8;
  undefined8 uVar9;
  longlong *plVar10;
  longlong *plVar11;
  undefined *puVar12;
  bool bVar13;
  undefined1 auStack_da8 [32];
  undefined *local_d88;
  undefined **local_d78;
  undefined4 local_d70;
  undefined2 local_d6c;
  undefined **local_d68;
  undefined4 local_d60;
  undefined2 local_d5c;
  undefined8 local_d58;
  undefined1 local_d50;
  undefined *local_d48;
  undefined *local_d40;
  undefined1 local_d38;
  undefined1 local_d30 [8];
  undefined *local_d28;
  longlong local_d20;
  int local_d14;
  undefined8 local_d08;
  undefined8 local_d00;
  undefined1 local_cf8;
  undefined **local_ce8;
  undefined4 uStack_ce0;
  undefined2 uStack_cdc;
  undefined2 uStack_cda;
  undefined1 local_cd8 [3216];
  ulonglong local_48;
  
  local_d08 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_da8;
  FUN_1401c5a30(param_3 + 0xc0);
  local_d68 = Proud::AddrPort::vftable;
  local_d60 = 0;
  local_d5c = 0;
  local_d78 = Proud::AddrPort::vftable;
  local_d70 = 0;
  local_d6c = 0;
  local_ce8 = (undefined **)0x0;
  uStack_ce0 = 0;
  uStack_cdc = 0;
  uStack_cda = 0;
  cVar5 = FUN_1401543d0(param_2,&local_ce8,0x10);
  if (cVar5 == '\0') {
    return;
  }
  cVar5 = FUN_140154e00(param_2,&local_d68);
  if (cVar5 != '\0') {
    cVar5 = FUN_140154e00(param_2,&local_d78);
    if (cVar5 == '\0') {
      return;
    }
    uVar7 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
    local_d00 = uVar7;
    FUN_140156b50(uVar7);
    local_cf8 = 1;
    if (DAT_1403288ef != '\0') {
      (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                (*(longlong **)(param_1 + 0x148),
                 L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_NotifyHolepunchSuccess");
    }
    bVar13 = *(undefined ***)(param_3 + 0x728) < local_ce8;
    if ((*(undefined ***)(param_3 + 0x728) == local_ce8) &&
       (uVar3 = CONCAT26(uStack_cda,CONCAT24(uStack_cdc,uStack_ce0)),
       bVar13 = *(ulonglong *)(param_3 + 0x730) < uVar3, *(ulonglong *)(param_3 + 0x730) == uVar3))
    {
      iVar6 = 0;
    }
    else {
      iVar6 = (1 - (uint)bVar13) - (uint)(bVar13 != 0);
    }
    if ((iVar6 == 0) && (*(char *)(param_3 + 0x700) == '\0')) {
      *(undefined1 *)(param_3 + 0x700) = 1;
      uVar9 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
      *(undefined8 *)(param_3 + 0x198) = uVar9;
      uVar9 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
      *(undefined8 *)(param_3 + 0x1b8) = uVar9;
      local_ce8 = Proud::AddrPort::vftable;
      uStack_ce0 = local_d70;
      uStack_cdc = local_d6c;
      FUN_1401a4ea0(param_3 + 0x700,&local_ce8);
      *(undefined4 *)(param_3 + 0x720) = local_d60;
      *(undefined2 *)(param_3 + 0x724) = local_d5c;
      FUN_14016a750(*(undefined8 *)(param_1 + 0x148),param_3);
      FUN_1401544a0(local_d30);
      FUN_140153d90(local_d30);
      FUN_140154600(local_d30,0x800);
      FUN_140154600(local_d30,0);
      FUN_14004fd90(local_d30,0xf);
      local_ce8 = *(undefined ***)(param_3 + 0x728);
      uStack_ce0 = *(undefined4 *)(param_3 + 0x730);
      uStack_cdc = (undefined2)*(undefined4 *)(param_3 + 0x734);
      uStack_cda = (undefined2)((uint)*(undefined4 *)(param_3 + 0x734) >> 0x10);
      FUN_14013b2a0(local_d30,&local_ce8);
      puVar8 = (undefined *)(**(code **)(*(longlong *)(param_3 + 0x108) + 0x10))();
      local_d40 = puVar8;
      FUN_140156b50(puVar8);
      local_d38 = 1;
      uVar9 = FUN_1401570d0(local_cd8,local_d30);
      local_ce8 = (undefined **)0x0;
      uStack_ce0 = CONCAT31(uStack_ce0._1_3_,1);
      FUN_1401a3610(*(undefined8 *)(param_3 + 0x748),uVar9,&local_ce8);
      FUN_140156dc0(local_cd8);
      FUN_140156be0(puVar8);
      if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x17f0) != 0) {
        FUN_1401568c0();
        local_d40 = PTR_DAT_1403200a0;
        plVar10 = (longlong *)FUN_140159580(&local_d78,&local_ce8);
        plVar11 = (longlong *)FUN_140159580(&local_d68,&local_d48);
        local_d88 = (undefined *)*plVar10;
        if ((undefined *)*plVar10 == (undefined *)0x0) {
          local_d88 = PTR_DAT_1403200a0;
        }
        puVar8 = (undefined *)*plVar11;
        if ((undefined *)*plVar11 == (undefined *)0x0) {
          puVar8 = PTR_DAT_1403200a0;
        }
        FUN_14004ce50(&local_d40,&DAT_140265c60,*(undefined4 *)(param_3 + 0x6f8),puVar8);
        if (((local_d48 != (undefined *)0x0) && (local_d48 != PTR_DAT_1403200a0)) &&
           (local_d48 + -8 != (undefined *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_d58 = uVar9;
          FUN_140156b50(uVar9);
          local_d50 = 1;
          piVar1 = (int *)(local_d48 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(local_d48 + -8);
          }
          FUN_140156be0(uVar9);
        }
        ppuVar4 = local_ce8;
        local_d48 = PTR_DAT_1403200a0;
        if (((local_ce8 != (undefined **)0x0) && (local_ce8 != (undefined **)PTR_DAT_1403200a0)) &&
           (ppuVar2 = local_ce8 + -1, ppuVar2 != (undefined **)0x0)) {
          uVar9 = FUN_1401568c0();
          local_d58 = uVar9;
          FUN_140156b50(uVar9);
          local_d50 = 1;
          piVar1 = (int *)((longlong)ppuVar4 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(ppuVar2);
          }
          FUN_140156be0(uVar9);
        }
        puVar8 = local_d40;
        puVar12 = local_d40;
        if (local_d40 == (undefined *)0x0) {
          puVar12 = PTR_DAT_1403200a0;
        }
        FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x17f0),1,puVar12);
        if (((puVar8 != (undefined *)0x0) && (puVar8 != PTR_DAT_1403200a0)) &&
           (puVar8 + -8 != (undefined *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_d58 = uVar9;
          FUN_140156b50(uVar9);
          local_d50 = 1;
          piVar1 = (int *)(puVar8 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(puVar8 + -8);
          }
          FUN_140156be0(uVar9);
        }
      }
      local_ce8 = &local_d28;
      FUN_1401560e0(&local_d28);
      if ((local_d20 != 0) && (local_d14 < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
    }
    FUN_140156be0(uVar7);
    return;
  }
  return;
}



void FUN_14018e4c0(longlong param_1,undefined8 param_2,longlong param_3)

{
  int *piVar1;
  void *pvVar2;
  longlong lVar3;
  char cVar4;
  int iVar5;
  int iVar6;
  undefined8 uVar7;
  longlong lVar8;
  longlong *plVar9;
  undefined8 uVar10;
  undefined8 uVar11;
  undefined8 *puVar12;
  undefined8 *puVar13;
  longlong *plVar14;
  undefined *puVar15;
  longlong lVar16;
  undefined *puVar17;
  undefined4 local_res18 [2];
  undefined8 *local_res20;
  undefined4 uVar18;
  undefined *local_138;
  undefined **local_130;
  undefined4 local_128;
  undefined2 local_124;
  undefined *local_120;
  undefined **local_118;
  undefined4 local_110;
  undefined2 local_10c;
  undefined **local_108;
  undefined4 local_100;
  undefined2 local_fc;
  undefined8 local_f8;
  undefined1 local_f0;
  undefined *local_e8;
  undefined **local_e0;
  undefined4 local_d8;
  undefined2 local_d4;
  undefined8 local_d0;
  undefined1 local_c8;
  undefined8 local_c0;
  undefined1 local_b8;
  undefined8 local_b0;
  undefined1 local_a8;
  undefined8 local_a0;
  undefined1 local_98 [16];
  undefined1 local_88 [16];
  undefined1 local_78 [16];
  undefined1 local_68 [16];
  undefined1 local_58 [16];
  undefined1 local_48 [16];
  
  local_a0 = 0xfffffffffffffffe;
  FUN_1401c5a30(param_3 + 0xc0);
  local_118 = Proud::AddrPort::vftable;
  lVar16 = 0;
  local_110 = 0;
  local_10c = 0;
  local_130 = Proud::AddrPort::vftable;
  local_128 = 0;
  local_124 = 0;
  cVar4 = FUN_140154e00(param_2,&local_118);
  if (((cVar4 != '\0') && (cVar4 = FUN_140154e00(param_2,&local_130), cVar4 != '\0')) &&
     (cVar4 = FUN_140154e60(param_2,local_res18), cVar4 != '\0')) {
    uVar7 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
    local_f8 = uVar7;
    FUN_140156b50(uVar7);
    local_f0 = 1;
    if (DAT_1403288ef != '\0') {
      (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                (*(longlong **)(param_1 + 0x148),
                 L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_PeerUdp_NotifyHolepunchSuccess"
                );
    }
    lVar8 = FUN_14015f740(*(undefined8 *)(param_1 + 0x148),local_res18[0]);
    if (lVar8 != 0) {
      plVar9 = (longlong *)
               FUN_14016da80(*(longlong *)(param_1 + 0x148) + 0x2d8,&local_res20,local_res18[0],
                             *(undefined4 *)(param_3 + 0x6f8));
      if ((longlong *)*plVar9 != (longlong *)0x0) {
        lVar16 = *(longlong *)*plVar9;
      }
      if ((local_res20 != (undefined8 *)0x0) &&
         (local_res20[1] = local_res20[1] + -1, uVar7 = local_f8, local_res20[1] == 0)) {
        pvVar2 = (void *)*local_res20;
        if (pvVar2 != (void *)0x0) {
          FUN_14015aa60(pvVar2);
          operator_delete(pvVar2);
        }
        FUN_140156970(local_res20);
        uVar7 = local_f8;
      }
      if (((lVar16 != 0) && (*(char *)(lVar16 + 0x1a0) == '\0')) &&
         (cVar4 = FUN_14015aaa0(lVar16), cVar4 != '\0')) {
        iVar5 = FUN_14015aa20(lVar16);
        local_e0 = Proud::AddrPort::vftable;
        local_d8 = local_128;
        local_d4 = local_124;
        local_108 = Proud::AddrPort::vftable;
        local_100 = local_110;
        local_fc = local_10c;
        FUN_14015a7c0(lVar16,*(undefined4 *)(param_3 + 0x6f8),&local_108,&local_e0);
        iVar6 = FUN_14015aa20(lVar16);
        if ((iVar6 == 2) && (iVar5 == 1)) {
          lVar3 = *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x4a8);
          uVar10 = FUN_14015a9a0(lVar16,local_78,*(undefined4 *)(lVar8 + 0x6f8));
          uVar11 = FUN_14015a8a0(lVar16,local_98,*(undefined4 *)(lVar8 + 0x6f8));
          (**(code **)(lVar3 + 0x60))
                    (*(longlong *)(param_1 + 0x148) + 0x4a8,*(undefined4 *)(param_3 + 0x6f8),
                     &DAT_140328530,lVar8 + 0x6f8,uVar11,uVar10);
          lVar3 = *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x4a8);
          uVar10 = FUN_14015a9a0(lVar16,local_58,*(undefined4 *)(param_3 + 0x6f8));
          uVar11 = FUN_14015a8a0(lVar16,local_88,*(undefined4 *)(param_3 + 0x6f8));
          (**(code **)(lVar3 + 0x60))
                    (*(longlong *)(param_1 + 0x148) + 0x4a8,*(undefined4 *)(lVar8 + 0x6f8),
                     &DAT_140328530,param_3 + 0x6f8,uVar11,uVar10);
          uVar18 = (undefined4)((ulonglong)uVar11 >> 0x20);
          if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x17f0) != 0) {
            FUN_1401568c0();
            local_138 = PTR_DAT_1403200a0;
            puVar12 = (undefined8 *)FUN_14015a9a0(lVar16,local_68,*(undefined4 *)(lVar8 + 0x6f8));
            puVar13 = (undefined8 *)FUN_14015a9a0(lVar16,local_48,*(undefined4 *)(param_3 + 0x6f8));
            plVar9 = (longlong *)(**(code **)*puVar12)(puVar12,&local_e8);
            plVar14 = (longlong *)(**(code **)*puVar13)(puVar13,&local_120);
            puVar17 = (undefined *)*plVar9;
            if ((undefined *)*plVar9 == (undefined *)0x0) {
              puVar17 = PTR_DAT_1403200a0;
            }
            puVar15 = (undefined *)*plVar14;
            if ((undefined *)*plVar14 == (undefined *)0x0) {
              puVar15 = PTR_DAT_1403200a0;
            }
            FUN_14004ce50(&local_138,&DAT_140265dc0,*(undefined4 *)(param_3 + 0x6f8),
                          *(undefined4 *)(lVar8 + 0x6f8),
                          CONCAT44(uVar18,*(undefined4 *)(param_3 + 0x6f8)),puVar15,
                          *(undefined4 *)(lVar8 + 0x6f8),puVar17);
            if (((local_120 != (undefined *)0x0) && (local_120 != PTR_DAT_1403200a0)) &&
               (local_120 + -8 != (undefined *)0x0)) {
              uVar10 = FUN_1401568c0();
              local_b0 = uVar10;
              FUN_140156b50(uVar10);
              local_a8 = 1;
              piVar1 = (int *)(local_120 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(local_120 + -8);
              }
              FUN_140156be0(uVar10);
            }
            local_120 = PTR_DAT_1403200a0;
            if (((local_e8 != (undefined *)0x0) && (local_e8 != PTR_DAT_1403200a0)) &&
               (local_e8 + -8 != (undefined *)0x0)) {
              uVar10 = FUN_1401568c0();
              local_c0 = uVar10;
              FUN_140156b50(uVar10);
              local_b8 = 1;
              piVar1 = (int *)(local_e8 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(local_e8 + -8);
              }
              FUN_140156be0(uVar10);
            }
            puVar17 = local_138;
            puVar15 = local_138;
            if (local_138 == (undefined *)0x0) {
              puVar15 = PTR_DAT_1403200a0;
            }
            FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x17f0),1,puVar15);
            if (((puVar17 != (undefined *)0x0) && (puVar17 != PTR_DAT_1403200a0)) &&
               (puVar17 + -8 != (undefined *)0x0)) {
              uVar10 = FUN_1401568c0();
              local_d0 = uVar10;
              FUN_140156b50(uVar10);
              local_c8 = 1;
              piVar1 = (int *)(puVar17 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(puVar17 + -8);
              }
              FUN_140156be0(uVar10);
            }
          }
        }
      }
    }
    FUN_140156be0(uVar7);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14018e9a0(longlong param_1,undefined8 param_2,longlong param_3,longlong param_4)

{
  undefined **ppuVar1;
  int *piVar2;
  undefined **ppuVar3;
  char cVar4;
  undefined2 uVar5;
  undefined8 uVar6;
  longlong *plVar7;
  undefined8 uVar8;
  longlong lVar9;
  undefined *puVar10;
  undefined *puVar11;
  undefined1 auStack_db8 [32];
  undefined4 *local_d98;
  undefined8 *local_d90;
  undefined *local_d88;
  undefined1 local_d80 [8];
  longlong local_d78;
  longlong local_d70;
  undefined4 local_d68;
  int local_d64;
  undefined8 local_d58;
  undefined8 local_d50;
  undefined1 local_d48;
  undefined4 local_d44;
  undefined1 local_d40;
  undefined1 local_d3f;
  undefined8 local_d38;
  undefined1 local_d30;
  undefined8 local_d28;
  undefined1 local_d20 [72];
  undefined8 local_cd8;
  undefined8 uStack_cd0;
  undefined4 local_cc8;
  undefined4 uStack_cc4;
  undefined4 uStack_cc0;
  undefined4 uStack_cbc;
  undefined4 *local_48;
  undefined4 local_40;
  int local_3c;
  ulonglong local_38;
  
  local_d28 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_db8;
  FUN_1401c5a30(param_4 + 0x40);
  local_cd8 = (undefined **)0x0;
  uStack_cd0 = 0;
  cVar4 = FUN_1401543d0(param_2,&local_cd8);
  if (cVar4 != '\0') {
    FUN_1401544a0(local_d80);
    FUN_140153d90(local_d80);
    FUN_140154600(local_d80,0x800);
    FUN_140154600(local_d80,0);
    FUN_14004fd90(local_d80,0xd);
    FUN_14013b2a0(local_d80,&local_cd8);
    FUN_140155350(local_d80,param_3);
    local_3c = 200;
    local_40 = 0;
    local_48 = &local_cc8;
    if (local_d78 == 0) {
      if (local_d70 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
    }
    else {
      local_d68 = *(undefined4 *)(local_d78 + 0x18);
    }
    lVar9 = local_d70;
    if (local_d70 == 0) {
      if (local_d78 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      lVar9 = 0;
      if (*(int *)(local_d78 + 0x18) != 0) {
        lVar9 = *(longlong *)(local_d78 + 0x10);
      }
    }
    local_40 = 1;
    local_cd8._0_4_ = (undefined4)lVar9;
    local_cd8._4_4_ = (undefined4)((ulonglong)lVar9 >> 0x20);
    local_cc8 = (undefined4)local_cd8;
    uStack_cc4 = local_cd8._4_4_;
    uStack_cbc = uStack_cd0._4_4_;
    local_d58 = CONCAT44(local_d58._4_4_,5);
    local_d50 = 0;
    local_d48 = 1;
    local_d44 = 0xffffffff;
    local_d40 = 1;
    local_d3f = DAT_140320dfc;
    local_cd8 = Proud::AddrPort::vftable;
    uStack_cd0 = CONCAT26(uStack_cd0._6_2_,*(undefined6 *)(param_3 + 8));
    uStack_cc0 = local_d68;
    uVar5 = FUN_14019e480(1);
    local_d90 = &local_d58;
    local_d98 = &local_cc8;
    FUN_1401a3cc0(param_4,0,uVar5,&local_cd8);
    if (local_48 == (undefined4 *)0x0) {
      FUN_140156300(local_d20,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_d20,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_3c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    uVar6 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
    local_d38 = uVar6;
    FUN_140156b50(uVar6);
    local_d30 = 1;
    if (DAT_1403288ef != '\0') {
      (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                (*(longlong **)(param_1 + 0x148),
                 L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_ServerHolepunch");
    }
    if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x17f0) != 0) {
      FUN_1401568c0();
      local_d88 = PTR_DAT_1403200a0;
      plVar7 = (longlong *)FUN_140159580(param_3,&local_cd8);
      puVar10 = (undefined *)*plVar7;
      if ((undefined *)*plVar7 == (undefined *)0x0) {
        puVar10 = PTR_DAT_1403200a0;
      }
      FUN_14004ce50(&local_d88,L"MessageType_ServerHolepunch from %s",puVar10);
      ppuVar3 = local_cd8;
      if (((local_cd8 != (undefined **)0x0) && (local_cd8 != (undefined **)PTR_DAT_1403200a0)) &&
         (ppuVar1 = local_cd8 + -1, ppuVar1 != (undefined **)0x0)) {
        uVar8 = FUN_1401568c0();
        local_d58 = uVar8;
        FUN_140156b50(uVar8);
        local_d50 = CONCAT71(local_d50._1_7_,1);
        piVar2 = (int *)((longlong)ppuVar3 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(ppuVar1);
        }
        FUN_140156be0(uVar8);
      }
      puVar10 = local_d88;
      puVar11 = local_d88;
      if (local_d88 == (undefined *)0x0) {
        puVar11 = PTR_DAT_1403200a0;
      }
      FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x17f0),1,puVar11);
      if (((puVar10 != (undefined *)0x0) && (puVar10 != PTR_DAT_1403200a0)) &&
         (puVar10 + -8 != (undefined *)0x0)) {
        uVar8 = FUN_1401568c0();
        local_d58 = uVar8;
        FUN_140156b50(uVar8);
        local_d50 = CONCAT71(local_d50._1_7_,1);
        piVar2 = (int *)(puVar10 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(puVar10 + -8);
        }
        FUN_140156be0(uVar8);
      }
    }
    FUN_140156be0(uVar6);
    local_cd8 = (undefined **)&local_d78;
    FUN_1401560e0(&local_d78);
    if ((local_d70 != 0) && (local_d64 < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14018ed40(longlong param_1,undefined8 param_2,longlong param_3,longlong param_4)

{
  undefined **ppuVar1;
  int *piVar2;
  undefined **ppuVar3;
  char cVar4;
  undefined2 uVar5;
  longlong lVar6;
  undefined8 uVar7;
  longlong *plVar8;
  undefined8 uVar9;
  undefined *puVar10;
  undefined *puVar11;
  undefined1 auStack_dc8 [32];
  undefined4 *local_da8;
  undefined8 *local_da0;
  undefined4 local_d98 [2];
  undefined *local_d90;
  undefined1 local_d88 [8];
  longlong local_d80;
  longlong local_d78;
  undefined4 local_d70;
  int local_d6c;
  undefined8 local_d60;
  undefined8 local_d58;
  undefined1 local_d50;
  undefined4 local_d4c;
  undefined1 local_d48;
  undefined1 local_d47;
  undefined8 local_d40;
  undefined1 local_d38;
  undefined8 local_d30;
  undefined1 local_d28 [80];
  undefined8 local_cd8;
  undefined8 uStack_cd0;
  undefined4 local_cc8;
  undefined4 uStack_cc4;
  undefined4 uStack_cc0;
  undefined4 uStack_cbc;
  undefined4 *local_48;
  undefined4 local_40;
  int local_3c;
  ulonglong local_38;
  
  local_d30 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_dc8;
  FUN_1401c5a30(param_4 + 0x40);
  local_cd8 = (undefined **)0x0;
  uStack_cd0 = 0;
  cVar4 = FUN_1401543d0(param_2,&local_cd8);
  if ((cVar4 != '\0') && (cVar4 = FUN_140154e60(param_2,local_d98), cVar4 != '\0')) {
    FUN_1401544a0(local_d88);
    FUN_140153d90(local_d88);
    FUN_140154600(local_d88,0x800);
    FUN_140154600(local_d88,0);
    FUN_14004fd90(local_d88,0x11);
    FUN_14013b2a0(local_d88,&local_cd8);
    FUN_140155350(local_d88,param_3);
    FUN_14004fe70(local_d88,local_d98[0]);
    local_3c = 200;
    local_40 = 0;
    local_48 = &local_cc8;
    if (local_d80 == 0) {
      if (local_d78 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
    }
    else {
      local_d70 = *(undefined4 *)(local_d80 + 0x18);
    }
    lVar6 = local_d78;
    if (local_d78 == 0) {
      if (local_d80 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      lVar6 = 0;
      if (*(int *)(local_d80 + 0x18) != 0) {
        lVar6 = *(longlong *)(local_d80 + 0x10);
      }
    }
    local_40 = 1;
    local_cd8._0_4_ = (undefined4)lVar6;
    local_cd8._4_4_ = (undefined4)((ulonglong)lVar6 >> 0x20);
    local_cc8 = (undefined4)local_cd8;
    uStack_cc4 = local_cd8._4_4_;
    uStack_cbc = uStack_cd0._4_4_;
    local_d60 = CONCAT44(local_d60._4_4_,5);
    local_d58 = 0;
    local_d50 = 1;
    local_d4c = 0xffffffff;
    local_d48 = 1;
    local_d47 = DAT_140320dfc;
    local_cd8 = Proud::AddrPort::vftable;
    uStack_cd0 = CONCAT26(uStack_cd0._6_2_,*(undefined6 *)(param_3 + 8));
    uStack_cc0 = local_d70;
    uVar5 = FUN_14019e480(1);
    local_da0 = &local_d60;
    local_da8 = &local_cc8;
    FUN_1401a3cc0(param_4,0,uVar5,&local_cd8);
    if (local_48 == (undefined4 *)0x0) {
      FUN_140156300(local_d28,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_d28,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_3c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    uVar7 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
    local_d40 = uVar7;
    FUN_140156b50(uVar7);
    local_d38 = 1;
    if (DAT_1403288ef != '\0') {
      (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                (*(longlong **)(param_1 + 0x148),
                 L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_PeerUdp_ServerHolepunch");
    }
    if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x17f0) != 0) {
      FUN_1401568c0();
      local_d90 = PTR_DAT_1403200a0;
      plVar8 = (longlong *)FUN_140159580(param_3,&local_cd8);
      puVar10 = (undefined *)*plVar8;
      if ((undefined *)*plVar8 == (undefined *)0x0) {
        puVar10 = PTR_DAT_1403200a0;
      }
      FUN_14004ce50(&local_d90,L"MessageType_PeerUdp_ServerHolepunch from %s",puVar10);
      ppuVar3 = local_cd8;
      if (((local_cd8 != (undefined **)0x0) && (local_cd8 != (undefined **)PTR_DAT_1403200a0)) &&
         (ppuVar1 = local_cd8 + -1, ppuVar1 != (undefined **)0x0)) {
        uVar9 = FUN_1401568c0();
        local_d60 = uVar9;
        FUN_140156b50(uVar9);
        local_d58 = CONCAT71(local_d58._1_7_,1);
        piVar2 = (int *)((longlong)ppuVar3 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(ppuVar1);
        }
        FUN_140156be0(uVar9);
      }
      puVar10 = local_d90;
      puVar11 = local_d90;
      if (local_d90 == (undefined *)0x0) {
        puVar11 = PTR_DAT_1403200a0;
      }
      FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x17f0),1,puVar11);
      if (((puVar10 != (undefined *)0x0) && (puVar10 != PTR_DAT_1403200a0)) &&
         (puVar10 + -8 != (undefined *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_d60 = uVar9;
        FUN_140156b50(uVar9);
        local_d58 = CONCAT71(local_d58._1_7_,1);
        piVar2 = (int *)(puVar10 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(puVar10 + -8);
        }
        FUN_140156be0(uVar9);
      }
    }
    FUN_140156be0(uVar7);
    local_cd8 = (undefined **)&local_d80;
    FUN_1401560e0(&local_d80);
    if ((local_d78 != 0) && (local_d6c < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  return;
}



void FUN_14018f100(undefined8 param_1)

{
  DWORD DVar1;
  
  DVar1 = GetCurrentThreadId();
  FUN_1401ac7d0(DVar1,"PNSrv Heartbeat");
  FUN_14018db90(param_1);
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x00014018f7dc)

void FUN_14018f130(longlong param_1,int *param_2,longlong *param_3)

{
  int iVar1;
  undefined4 uVar2;
  longlong *plVar3;
  undefined8 uVar4;
  code *pcVar5;
  char cVar6;
  int iVar7;
  longlong lVar8;
  ulonglong uVar9;
  undefined4 *puVar10;
  undefined8 uVar11;
  longlong lVar12;
  longlong lVar13;
  ulonglong uVar14;
  undefined1 *puVar15;
  undefined1 *puVar16;
  undefined1 *puVar17;
  int iVar18;
  undefined8 *puVar19;
  longlong lVar20;
  undefined8 *puVar21;
  ulonglong uVar22;
  undefined1 auStack_1b88 [32];
  int local_1b68 [2];
  longlong *local_1b60;
  longlong *local_1b58;
  undefined **local_1b50;
  longlong *local_1b48;
  longlong local_1b40;
  undefined8 local_1b38;
  undefined8 local_1b30;
  undefined4 local_1b28;
  undefined1 local_1b20 [8];
  longlong local_1b18;
  longlong local_1b10;
  undefined4 local_1b08;
  int local_1b04;
  undefined8 local_1af8;
  char local_1af0;
  undefined4 local_1ae8;
  undefined4 uStack_1ae4;
  undefined4 local_1ad8;
  undefined4 uStack_1ad4;
  undefined8 local_1ad0;
  undefined1 local_1ac8;
  undefined8 local_1ac0;
  undefined1 local_1ab8;
  undefined8 local_1ab0;
  undefined4 uStack_1aa8;
  undefined4 uStack_1aa4;
  undefined8 local_1aa0;
  undefined1 local_1a98;
  undefined8 local_1a90;
  undefined4 uStack_1a88;
  undefined4 uStack_1a84;
  undefined8 local_1a80;
  undefined1 local_1a78 [88];
  undefined8 local_1a20;
  undefined1 local_1a18 [8];
  longlong local_1a10;
  longlong local_1a08;
  undefined4 local_1a00;
  int local_19fc;
  undefined1 local_19f0 [136];
  undefined4 local_1968;
  undefined4 uStack_1964;
  undefined4 uStack_1960;
  undefined4 uStack_195c;
  undefined4 *local_ce8;
  undefined4 local_ce0;
  int local_cdc;
  undefined1 local_cd8 [3200];
  undefined1 *local_58;
  undefined4 local_50;
  int local_4c;
  ulonglong local_48;
  undefined8 uStack_40;
  
  uStack_40 = 0x14018f146;
  puVar15 = auStack_1b88;
  puVar17 = auStack_1b88;
  local_1a80 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)local_1b68;
  uVar14 = 0;
  local_1b48 = (longlong *)0x0;
  local_1b40 = 0;
  local_1b38 = 0;
  local_1b30 = 0;
  local_1b50 = Proud::BypassDestList::vftable;
  cVar6 = thunk_FUN_1401552c0(param_2,&local_1b50);
  puVar16 = auStack_1b88;
  if ((cVar6 == '\0') ||
     (cVar6 = FUN_140154a70(param_2,&local_1b58), plVar3 = local_1b58, puVar16 = auStack_1b88,
     cVar6 == '\0')) {
LAB_14018f92b:
    lVar8 = local_1b40;
    plVar3 = local_1b48;
    local_1b50 = Proud::CFastArray<>::vftable;
    if (local_1b40 == 0) goto LAB_14018f95b;
    puVar17 = puVar16;
    if (local_1b48 != (longlong *)0x0) {
      pcVar5 = *(code **)(*local_1b48 + 0x18);
      *(undefined8 *)(puVar16 + -8) = 0x14018f954;
      (*pcVar5)(plVar3,lVar8);
      goto LAB_14018f95b;
    }
  }
  else {
    iVar18 = (int)local_1b58;
    if ((-1 < iVar18) && (iVar18 < DAT_140320d70)) {
      iVar1 = *param_2;
      iVar7 = FUN_140154030(param_2);
      if (((int)((iVar1 >> 0x1f & 7U) + iVar1) >> 3) + iVar18 != iVar7) {
        FUN_14017c710(*(undefined8 *)(param_1 + 0x148),param_3,
                      "msg.GetReadOffset() + payloadLength == msg.GetLength()",2);
      }
      FUN_1401544a0(local_1b20);
      cVar6 = FUN_140154700(param_2,local_1b20,(ulonglong)plVar3 & 0xffffffff);
      if (cVar6 == '\0') {
        FUN_14017c710(*(undefined8 *)(param_1 + 0x148),param_3,&DAT_140266228,2);
        local_1b58 = &local_1b18;
        FUN_1401560e0(&local_1b18);
        puVar16 = auStack_1b88;
        if (local_1b10 != 0) {
          if (local_1b04 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          local_1b08 = 0;
          puVar16 = auStack_1b88;
        }
      }
      else {
        lVar8 = (longlong)(int)local_1b38;
        local_1b60 = (longlong *)CONCAT44(local_1b60._4_4_,(int)local_1b38);
        if ((int)local_1b38 < 1) {
          local_1b58 = &local_1b18;
          FUN_1401560e0(&local_1b18);
          puVar16 = auStack_1b88;
          if (local_1b10 != 0) {
            if (local_1b04 < 0) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            local_1b08 = 0;
            puVar16 = auStack_1b88;
          }
        }
        else {
          lVar12 = lVar8 * 0x18;
          uVar22 = lVar12 + 0x10;
          if (uVar22 < 0x401) {
            uVar9 = lVar12 + 0x1f;
            if (uVar9 <= uVar22) {
              uVar9 = 0xffffffffffffff0;
            }
            lVar12 = -(uVar9 & 0xfffffffffffffff0);
            puVar15 = auStack_1b88 + lVar12;
            puVar10 = (undefined4 *)((longlong)local_1b68 + lVar12);
            puVar21 = (undefined8 *)0x0;
            if (puVar10 != (undefined4 *)0x0) {
              *puVar10 = 0xcccc;
              puVar15 = auStack_1b88 + lVar12;
LAB_14018f30b:
              puVar21 = (undefined8 *)(puVar10 + 4);
            }
          }
          else {
            puVar10 = malloc(uVar22);
            puVar21 = (undefined8 *)0x0;
            if (puVar10 != (undefined4 *)0x0) {
              *puVar10 = 0xdddd;
              puVar15 = auStack_1b88;
              goto LAB_14018f30b;
            }
          }
          pcVar5 = *(code **)(**(longlong **)(param_1 + 0x148) + 0x58);
          *(undefined8 *)(puVar15 + -8) = 0x14018f31c;
          uVar11 = (*pcVar5)();
          local_1ad0 = uVar11;
          *(undefined8 *)(puVar15 + -8) = 0x14018f32b;
          FUN_140156b50(uVar11);
          local_1ac8 = 1;
          plVar3 = *(longlong **)(param_1 + 0x148);
          if (DAT_1403288ef != '\0') {
            pcVar5 = *(code **)(*plVar3 + 200);
            *(undefined8 *)(puVar15 + -8) = 0x14018f353;
            (*pcVar5)(plVar3,L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_ReliableRelay1")
            ;
          }
          pcVar5 = *(code **)(*param_3 + 0x10);
          *(undefined8 *)(puVar15 + -8) = 0x14018f35d;
          local_1b28 = (*pcVar5)(param_3);
          local_1b68[0] = 0;
          puVar19 = puVar21;
          uVar22 = uVar14;
          if (0 < lVar8) {
            do {
              lVar8 = local_1b40;
              if ((longlong)uVar14 < 0) {
LAB_14018f3fe:
                    // WARNING: Subroutine does not return
                *(undefined **)(puVar15 + -8) = &UNK_14018f403;
                FUN_1401566e0();
              }
              if ((int)local_1b38 <= (int)uVar22) goto LAB_14018f3fe;
              uVar2 = *(undefined4 *)(local_1b40 + uVar14 * 8);
              uVar11 = *(undefined8 *)(param_1 + 0x148);
              *(undefined8 *)(puVar15 + -8) = 0x14018f39f;
              lVar12 = FUN_14015f740(uVar11,uVar2);
              if (lVar12 != 0) {
                *(undefined8 *)(puVar15 + -8) = 0x14018f3b3;
                FUN_1401a37c0(lVar12 + 0xc0);
                local_1ae8 = *(undefined4 *)(lVar8 + 4 + uVar14 * 8);
                local_1ad8 = *(undefined4 *)(lVar8 + uVar14 * 8);
                *puVar19 = CONCAT44(uStack_1ae4,local_1ae8);
                puVar19[1] = lVar12;
                puVar19[2] = CONCAT44(uStack_1ad4,local_1ad8);
                local_1b68[0] = local_1b68[0] + 1;
                puVar19 = puVar19 + 3;
              }
              uVar14 = uVar14 + 1;
              uVar22 = (ulonglong)((int)uVar22 + 1);
            } while ((longlong)uVar14 < (longlong)(int)local_1b60);
          }
          uVar11 = local_1ad0;
          iVar18 = local_1b68[0];
          *(undefined8 *)(puVar15 + -8) = 0x14018f410;
          FUN_140156be0(uVar11);
          local_1ac8 = 0;
          lVar8 = (longlong)iVar18;
          while ((0 < lVar8 && (lVar12 = 0, 0 < lVar8))) {
            lVar20 = lVar8 * 0x18 + -0x18;
            do {
              uVar14 = puVar21[lVar12 * 3];
              local_1b60 = (longlong *)puVar21[lVar12 * 3 + 1];
              local_1a20 = puVar21[lVar12 * 3 + 2];
              pcVar5 = *(code **)(*(longlong *)(puVar21[lVar12 * 3 + 1] + 0x108) + 0x10);
              *(undefined8 *)(puVar15 + -8) = 0x14018f46b;
              uVar11 = (*pcVar5)();
              local_1af0 = 0;
              local_1af8 = uVar11;
              *(undefined8 *)(puVar15 + -8) = 0x14018f482;
              FUN_1401544a0(local_1a18);
              *(undefined8 *)(puVar15 + -8) = 0x14018f49c;
              FUN_140154120(local_1a18,local_19f0,0x80);
              *(undefined8 *)(puVar15 + -8) = 0x14018f4ab;
              FUN_14004fd90(local_1a18,0x17);
              uVar2 = local_1b28;
              *(undefined8 *)(puVar15 + -8) = 0x14018f4ba;
              FUN_14004fe70(local_1a18,uVar2);
              *(undefined8 *)(puVar15 + -8) = 0x14018f4c8;
              FUN_14004fe70(local_1a18,uVar14 & 0xffffffff);
              *(undefined8 *)(puVar15 + -8) = 0x14018f4db;
              FUN_140153c60(&local_1ae8,local_1a18);
              lVar13 = (longlong)(int)local_1b58;
              *(undefined8 *)(puVar15 + -8) = 0x14018f4ec;
              FUN_140155b20(local_1a18,lVar13);
              local_4c = 200;
              local_50 = 0;
              local_58 = local_cd8;
              local_cdc = 200;
              local_ce0 = 0;
              local_ce8 = &local_1968;
              if (local_1a10 == 0) {
                uVar2 = local_1a00;
                if (local_1a08 == 0) {
                    // WARNING: Subroutine does not return
                  *(undefined8 *)(puVar15 + -8) = 0x14018f89d;
                  FUN_1401561e0();
                }
              }
              else {
                uVar2 = *(undefined4 *)(local_1a10 + 0x18);
              }
              lVar13 = local_1a08;
              if (local_1a08 == 0) {
                if (local_1a10 == 0) {
                    // WARNING: Subroutine does not return
                  *(undefined **)(puVar15 + -8) = &UNK_14018f897;
                  FUN_1401561e0();
                }
                lVar13 = 0;
                if (*(int *)(local_1a10 + 0x18) != 0) {
                  lVar13 = *(longlong *)(local_1a10 + 0x10);
                }
              }
              local_ce0 = 1;
              local_1ab0._0_4_ = (undefined4)lVar13;
              local_1ab0._4_4_ = (undefined4)((ulonglong)lVar13 >> 0x20);
              local_1968 = (undefined4)local_1ab0;
              uStack_1964 = local_1ab0._4_4_;
              uStack_195c = uStack_1aa4;
              local_1ab0 = lVar13;
              uStack_1aa8 = uVar2;
              uStack_1960 = uVar2;
              *(undefined8 *)(puVar15 + -8) = 0x14018f5a3;
              FUN_140156ed0(local_cd8,&local_1968);
              if (local_ce8 == (undefined4 *)0x0) {
                *(undefined8 *)(puVar15 + -8) = 0x14018f87e;
                FUN_140156300(local_1a78,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
                *(undefined8 *)(puVar15 + -8) = 0x14018f891;
                _CxxThrowException(local_1a78,(ThrowInfo *)&DAT_14031d928);
              }
              if (local_cdc < 0) {
                    // WARNING: Subroutine does not return
                *(undefined **)(puVar15 + -8) = &UNK_14018f86a;
                FUN_1401566b0();
              }
              local_cdc = 200;
              local_ce0 = 0;
              local_ce8 = &local_1968;
              if (local_1b18 == 0) {
                uVar2 = local_1b08;
                if (local_1b10 == 0) {
                    // WARNING: Subroutine does not return
                  *(undefined8 *)(puVar15 + -8) = 0x14018f864;
                  FUN_1401561e0();
                }
              }
              else {
                uVar2 = *(undefined4 *)(local_1b18 + 0x18);
              }
              lVar13 = local_1b10;
              if (local_1b10 == 0) {
                if (local_1b18 == 0) {
                    // WARNING: Subroutine does not return
                  *(undefined **)(puVar15 + -8) = &UNK_14018f85e;
                  FUN_1401561e0();
                }
                lVar13 = 0;
                if (*(int *)(local_1b18 + 0x18) != 0) {
                  lVar13 = *(longlong *)(local_1b18 + 0x10);
                }
              }
              local_ce0 = 1;
              local_1a90._0_4_ = (undefined4)lVar13;
              local_1a90._4_4_ = (undefined4)((ulonglong)lVar13 >> 0x20);
              local_1968 = (undefined4)local_1a90;
              uStack_1964 = local_1a90._4_4_;
              uStack_195c = uStack_1a84;
              local_1a90 = lVar13;
              uStack_1a88 = uVar2;
              uStack_1960 = uVar2;
              *(undefined8 *)(puVar15 + -8) = 0x14018f64d;
              FUN_140156ed0(local_cd8,&local_1968);
              if (local_ce8 == (undefined4 *)0x0) {
                *(undefined8 *)(puVar15 + -8) = 0x14018f845;
                FUN_140156300(local_1a78,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
                *(undefined8 *)(puVar15 + -8) = 0x14018f858;
                _CxxThrowException(local_1a78,(ThrowInfo *)&DAT_14031d928);
              }
              if (local_cdc < 0) {
                    // WARNING: Subroutine does not return
                *(undefined **)(puVar15 + -8) = &UNK_14018f831;
                FUN_1401566b0();
              }
              if (lVar12 == 0) {
                local_1af0 = 1;
                *(undefined8 *)(puVar15 + -8) = 0x14018f705;
                FUN_140156b50(uVar11);
                plVar3 = local_1b60;
                local_1aa0 = 0;
                local_1a98 = 1;
                uVar4 = *(undefined8 *)((longlong)local_1b60 + 0x748);
                *(undefined8 *)(puVar15 + -8) = 0x14018f731;
                FUN_1401a3610(uVar4,local_cd8,&local_1aa0);
                *(undefined8 *)(puVar15 + -8) = 0x14018f739;
                FUN_140156be0(uVar11);
                local_1af0 = '\0';
                *(undefined8 *)(puVar15 + -8) = 0x14018f74a;
                FUN_1401a37d0((longlong)plVar3 + 0xc0);
                puVar21[1] = 0;
                *puVar21 = *(undefined8 *)(lVar20 + (longlong)puVar21);
                puVar21[1] = *(undefined8 *)(lVar20 + 8 + (longlong)puVar21);
                puVar21[2] = *(undefined8 *)(lVar20 + 0x10 + (longlong)puVar21);
LAB_14018f76b:
                local_1b68[0] = local_1b68[0] + -1;
                lVar8 = lVar8 + -1;
                lVar20 = lVar20 + -0x18;
              }
              else {
                *(undefined8 *)(puVar15 + -8) = 0x14018f67a;
                local_1af0 = FUN_140156ba0();
                if (local_1af0 != '\0') {
                  local_1ac0 = 0;
                  local_1ab8 = 1;
                  uVar4 = *(undefined8 *)((longlong)local_1b60 + 0x748);
                  *(undefined8 *)(puVar15 + -8) = 0x14018f6b8;
                  FUN_1401a3610(uVar4,local_cd8,&local_1ac0);
                  *(undefined8 *)(puVar15 + -8) = 0x14018f6c0;
                  FUN_140156be0(uVar11);
                  local_1af0 = '\0';
                  lVar13 = (longlong)local_1b60 + 0xc0;
                  *(undefined8 *)(puVar15 + -8) = 0x14018f6d5;
                  FUN_1401a37d0(lVar13);
                  puVar21[lVar12 * 3 + 1] = 0;
                  puVar21[lVar12 * 3] = *(undefined8 *)(lVar20 + (longlong)puVar21);
                  puVar21[lVar12 * 3 + 1] = *(undefined8 *)(lVar20 + 8 + (longlong)puVar21);
                  puVar21[lVar12 * 3 + 2] = *(undefined8 *)(lVar20 + 0x10 + (longlong)puVar21);
                  goto LAB_14018f76b;
                }
              }
              if (local_58 == (undefined1 *)0x0) {
                *(undefined8 *)(puVar15 + -8) = 0x14018f818;
                FUN_140156300(local_1a78,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
                *(undefined8 *)(puVar15 + -8) = 0x14018f82b;
                _CxxThrowException(local_1a78,(ThrowInfo *)&DAT_14031d928);
              }
              if (local_4c < 0) {
                    // WARNING: Subroutine does not return
                *(undefined **)(puVar15 + -8) = &UNK_14018f804;
                FUN_1401566b0();
              }
              local_50 = 0;
              *(undefined8 *)(puVar15 + -8) = 0x14018f7a2;
              FUN_140153c80(&local_1ae8);
              local_1b60 = &local_1a10;
              *(undefined8 *)(puVar15 + -8) = 0x14018f7ba;
              FUN_1401560e0(&local_1a10);
              if (local_1a08 != 0) {
                if (local_19fc < 0) {
                    // WARNING: Subroutine does not return
                  *(undefined8 *)(puVar15 + -8) = 0x14018f7fe;
                  FUN_1401566b0();
                }
                local_1a00 = 0;
              }
              lVar12 = lVar12 + 1;
            } while (lVar12 < lVar8);
          }
          if ((puVar21 != (undefined8 *)0x0) && (*(int *)(puVar21 + -2) == 0xdddd)) {
            *(undefined8 *)(puVar15 + -8) = 0x14018f8b5;
            free(puVar21 + -2);
          }
          local_1b58 = &local_1b18;
          *(undefined8 *)(puVar15 + -8) = 0x14018f8c7;
          FUN_1401560e0(&local_1b18);
          puVar16 = puVar15;
          if (local_1b10 != 0) {
            if (local_1b04 < 0) {
                    // WARNING: Subroutine does not return
              *(undefined **)(puVar15 + -8) = &UNK_14018f8da;
              FUN_1401566b0();
            }
            local_1b08 = 0;
          }
        }
      }
      goto LAB_14018f92b;
    }
    FUN_14017c710(*(undefined8 *)(param_1 + 0x148),param_3,&DAT_140266228,2);
    local_1b50 = Proud::CFastArray<>::vftable;
    puVar16 = auStack_1b88;
    if (local_1b40 == 0) goto LAB_14018f95b;
    if (local_1b48 != (longlong *)0x0) {
      (**(code **)(*local_1b48 + 0x18))();
      puVar16 = auStack_1b88;
      goto LAB_14018f95b;
    }
  }
  lVar8 = local_1b40;
  local_1b50 = Proud::CFastArray<>::vftable;
  *(undefined8 *)(puVar17 + -8) = 0x14018f95b;
  FUN_140156970(lVar8);
  puVar16 = puVar17;
LAB_14018f95b:
  *(undefined8 *)(puVar16 + -8) = 0x14018f96a;
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x00014018ffbe)

void FUN_14018f990(longlong param_1,int *param_2,longlong *param_3)

{
  int iVar1;
  undefined4 uVar2;
  code *pcVar3;
  longlong *plVar4;
  char cVar5;
  int iVar6;
  ulonglong uVar7;
  undefined4 *puVar8;
  undefined8 uVar9;
  longlong lVar10;
  ulonglong uVar11;
  longlong lVar12;
  longlong *plVar13;
  int iVar14;
  ulonglong uVar15;
  undefined1 *puVar16;
  undefined1 *puVar17;
  longlong lVar18;
  longlong *plVar19;
  longlong lVar20;
  longlong *plVar21;
  longlong *plVar22;
  undefined1 auStack_1b18 [32];
  undefined4 local_1af8;
  undefined4 local_1af4;
  undefined8 local_1af0;
  ulonglong local_1ae8;
  undefined1 *local_1ae0;
  char local_1ad8;
  undefined4 local_1ad0 [2];
  longlong local_1ac8;
  undefined1 local_1ac0;
  undefined4 local_1abc;
  undefined1 local_1ab8;
  undefined1 local_1ab7;
  undefined4 local_1ab0 [2];
  undefined **local_1aa8;
  longlong *local_1aa0;
  longlong *local_1a98;
  ulonglong local_1a90;
  undefined8 local_1a88;
  undefined1 local_1a80 [8];
  undefined1 local_1a78 [8];
  longlong local_1a70;
  undefined4 local_1a68;
  int local_1a64;
  longlong local_1a58;
  longlong *local_1a50;
  longlong local_1a48;
  undefined8 local_1a40;
  undefined1 local_1a38;
  undefined8 local_1a30;
  undefined1 local_1a28 [16];
  undefined1 local_1a18 [8];
  undefined1 local_1a10 [8];
  longlong local_1a08;
  undefined4 local_1a00;
  int local_19fc;
  undefined1 local_19f0 [136];
  undefined1 local_1968 [3200];
  undefined1 *local_ce8;
  undefined4 local_ce0;
  undefined4 local_cdc;
  undefined1 local_cd8 [3216];
  ulonglong local_48;
  undefined8 uStack_40;
  
  uStack_40 = 0x14018f9a6;
  puVar17 = auStack_1b18;
  local_1a30 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)&local_1af8;
  local_1a58 = param_1;
  cVar5 = FUN_140154c80(param_2,local_1ab0);
  puVar16 = auStack_1b18;
  if ((cVar5 == '\0') ||
     (cVar5 = FUN_140154a70(param_2,&local_1a48), puVar16 = auStack_1b18, cVar5 == '\0'))
  goto LAB_1401900cf;
  plVar19 = (longlong *)0x0;
  local_1aa0 = (longlong *)0x0;
  local_1a98 = (longlong *)0x0;
  local_1a90 = 0;
  local_1a88 = 0;
  local_1aa8 = Proud::HostIDArray::vftable;
  cVar5 = FUN_140154a70(param_2,&local_1ae8);
  plVar13 = plVar19;
  plVar21 = plVar19;
  if ((cVar5 == '\0') ||
     ((iVar14 = (int)local_1ae8, plVar21 = (longlong *)0x0, iVar14 < 0 || (DAT_140320d70 < iVar14)))
     ) {
LAB_1401900af:
    puVar16 = auStack_1b18;
    if (plVar21 == (longlong *)0x0) goto LAB_1401900cf;
    puVar16 = auStack_1b18;
    if (plVar13 == (longlong *)0x0) {
LAB_1401900c7:
      *(undefined8 *)(puVar16 + -8) = 0x1401900cf;
      FUN_140156970(plVar21);
      goto LAB_1401900cf;
    }
    lVar10 = *plVar13;
    puVar16 = auStack_1b18;
  }
  else {
    FUN_14015cb30(&local_1aa8,local_1ae8 & 0xffffffff);
    plVar21 = local_1a98;
    plVar13 = local_1a98;
    if ((int)local_1a90 == 0) {
      plVar13 = plVar19;
    }
    cVar5 = FUN_1401543d0(param_2,plVar13,iVar14 * 4);
    plVar13 = local_1aa0;
    if (cVar5 == '\0') goto LAB_1401900af;
    cVar5 = FUN_140154a70(param_2,&local_1ae8);
    uVar15 = local_1ae8;
    puVar16 = auStack_1b18;
    if (cVar5 != '\0') {
      iVar14 = (int)local_1ae8;
      if ((iVar14 < 0) || (DAT_140320d70 <= iVar14)) {
        FUN_14017c710(*(undefined8 *)(param_1 + 0x148),param_3,
                      "Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_UnreliableRelay1",2);
        puVar16 = auStack_1b18;
      }
      else {
        iVar1 = *param_2;
        iVar6 = FUN_140154030(param_2);
        if (((int)((iVar1 >> 0x1f & 7U) + iVar1) >> 3) + iVar14 != iVar6) {
          FUN_14017c710(*(undefined8 *)(param_1 + 0x148),param_3,
                        "msg.GetReadOffset() + payloadLength == msg.GetLength()",2);
        }
        FUN_1401544a0(local_1a80);
        cVar5 = FUN_140154700(param_2,local_1a80,uVar15 & 0xffffffff);
        if (cVar5 == '\0') {
          FUN_14017c710(*(undefined8 *)(param_1 + 0x148),param_3,
                        "Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_UnreliableRelay1",2);
          local_1ae0 = local_1a78;
          FUN_1401560e0(local_1a78);
          puVar16 = auStack_1b18;
          if (local_1a70 != 0) {
            if (local_1a64 < 0) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            local_1a68 = 0;
            puVar16 = auStack_1b18;
          }
        }
        else {
          iVar14 = (int)local_1a90;
          uVar15 = (ulonglong)(int)local_1a90;
          if ((int)local_1a90 < 1) {
            local_1ae0 = local_1a78;
            FUN_1401560e0(local_1a78);
            puVar16 = auStack_1b18;
            if (local_1a70 != 0) {
              if (local_1a64 < 0) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              local_1a68 = 0;
              puVar16 = auStack_1b18;
            }
          }
          else {
            uVar11 = (uVar15 + 1) * 0x10;
            local_1ae0 = (undefined1 *)uVar15;
            if (uVar11 < 0x401) {
              uVar7 = uVar11 + 0xf;
              if (uVar7 <= uVar11) {
                uVar7 = 0xffffffffffffff0;
              }
              lVar10 = -(uVar7 & 0xfffffffffffffff0);
              puVar17 = auStack_1b18 + lVar10;
              puVar8 = (undefined4 *)((longlong)&local_1af8 + lVar10);
              plVar13 = (longlong *)0x0;
              if (puVar8 != (undefined4 *)0x0) {
                *puVar8 = 0xcccc;
                puVar17 = auStack_1b18 + lVar10;
LAB_14018fc22:
                plVar13 = (longlong *)(puVar8 + 4);
              }
            }
            else {
              puVar8 = malloc(uVar11);
              plVar13 = (longlong *)0x0;
              if (puVar8 != (undefined4 *)0x0) {
                *puVar8 = 0xdddd;
                puVar17 = auStack_1b18;
                goto LAB_14018fc22;
              }
            }
            pcVar3 = *(code **)(**(longlong **)(param_1 + 0x148) + 0x58);
            *(undefined8 *)(puVar17 + -8) = 0x14018fc33;
            uVar9 = (*pcVar3)();
            local_1a40 = uVar9;
            *(undefined8 *)(puVar17 + -8) = 0x14018fc42;
            FUN_140156b50(uVar9);
            local_1a38 = 1;
            plVar22 = *(longlong **)(param_1 + 0x148);
            if (DAT_1403288ef != '\0') {
              pcVar3 = *(code **)(*plVar22 + 200);
              *(undefined8 *)(puVar17 + -8) = 0x14018fc6a;
              (*pcVar3)(plVar22,
                        L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_UnreliableRelay1");
            }
            pcVar3 = *(code **)(*param_3 + 0x10);
            *(undefined8 *)(puVar17 + -8) = 0x14018fc74;
            local_1af4 = (*pcVar3)(param_3);
            local_1af0 = (ulonglong)local_1af0._4_4_ << 0x20;
            plVar22 = plVar19;
            plVar4 = plVar13;
            if (0 < iVar14) {
              do {
                local_1a50 = plVar4;
                if (((longlong)plVar19 < 0) || ((int)uVar15 <= (int)plVar22)) {
                    // WARNING: Subroutine does not return
                  *(undefined **)(puVar17 + -8) = &UNK_14018fd17;
                  FUN_1401566e0();
                }
                uVar2 = *(undefined4 *)((longlong)plVar21 + (longlong)plVar19 * 4);
                uVar9 = *(undefined8 *)(param_1 + 0x148);
                *(undefined8 *)(puVar17 + -8) = 0x14018fcad;
                lVar10 = FUN_14015f740(uVar9,uVar2);
                local_1ac8 = CONCAT44(local_1ac8._4_4_,uVar2);
                if (lVar10 != 0) {
                  *(undefined8 *)(puVar17 + -8) = 0x14018fcc4;
                  FUN_1401a37c0(lVar10 + 0xc0);
                  uVar9 = *(undefined8 *)(local_1a58 + 0x148);
                  *(undefined8 *)(puVar17 + -8) = 0x14018fcda;
                  FUN_140172910(uVar9,lVar10);
                  *local_1a50 = lVar10;
                  local_1a50[1] = local_1ac8;
                  local_1af0 = CONCAT44(local_1af0._4_4_,(int)local_1af0 + 1);
                  local_1a50 = local_1a50 + 2;
                }
                plVar19 = (longlong *)((longlong)plVar19 + 1);
                uVar15 = local_1a90 & 0xffffffff;
                param_1 = local_1a58;
                plVar22 = (longlong *)(ulonglong)((int)plVar22 + 1);
                plVar4 = local_1a50;
              } while ((longlong)plVar19 < (longlong)local_1ae0);
            }
            uVar9 = local_1a40;
            *(undefined8 *)(puVar17 + -8) = 0x14018fd24;
            FUN_140156be0(uVar9);
            local_1a38 = 0;
            *(undefined8 *)(puVar17 + -8) = 0x14018fd37;
            FUN_1401544a0(local_1a18);
            *(undefined8 *)(puVar17 + -8) = 0x14018fd51;
            FUN_140154120(local_1a18,local_19f0,0x80);
            *(undefined8 *)(puVar17 + -8) = 0x14018fd60;
            FUN_14004fd90(local_1a18,0x18);
            uVar2 = local_1af4;
            *(undefined8 *)(puVar17 + -8) = 0x14018fd6f;
            FUN_14004fe70(local_1a18,uVar2);
            *(undefined8 *)(puVar17 + -8) = 0x14018fd82;
            FUN_140153c60(local_1a28,local_1a18);
            lVar10 = (longlong)(int)local_1ae8;
            *(undefined8 *)(puVar17 + -8) = 0x14018fd93;
            FUN_140155b20(local_1a18,lVar10);
            local_cdc = 200;
            local_ce0 = 0;
            local_ce8 = local_1968;
            *(undefined8 *)(puVar17 + -8) = 0x14018fdc4;
            FUN_1401570d0(local_cd8,local_1a18);
            *(undefined8 *)(puVar17 + -8) = 0x14018fdd8;
            FUN_140156ed0(local_1968,local_cd8);
            *(undefined8 *)(puVar17 + -8) = 0x14018fde5;
            FUN_140156dc0(local_cd8);
            *(undefined8 *)(puVar17 + -8) = 0x14018fdf5;
            FUN_1401570d0(local_cd8,local_1a80);
            *(undefined8 *)(puVar17 + -8) = 0x14018fe09;
            FUN_140156ed0(local_1968,local_cd8);
            *(undefined8 *)(puVar17 + -8) = 0x14018fe16;
            FUN_140156dc0(local_cd8);
            local_1af8._1_1_ = DAT_1403285c0;
            local_1af8._0_1_ = DAT_1403285e0;
            local_1af4 = local_1ab0[0];
            lVar10 = (longlong)(int)local_1af0;
            while ((0 < lVar10 && (lVar20 = 0, plVar21 = local_1a98, 0 < lVar10))) {
              lVar18 = lVar10 * 0x10 + -0x10;
              do {
                lVar12 = plVar13[lVar20 * 2];
                local_1af0 = lVar12;
                local_1ae8 = plVar13[lVar20 * 2 + 1];
                pcVar3 = *(code **)(*(longlong *)(lVar12 + 0x108) + 0x10);
                *(undefined8 *)(puVar17 + -8) = 0x14018fe84;
                uVar15 = (*pcVar3)();
                local_1ad8 = 0;
                local_1ae0 = (undefined1 *)uVar15;
                if (lVar20 == 0) {
                  local_1ad8 = 1;
                  *(undefined8 *)(puVar17 + -8) = 0x14018ff3b;
                  FUN_140156b50(uVar15);
                  local_1ad0[0] = local_1af4;
                  local_1ac8 = local_1a48;
                  local_1ac0 = local_1af8._1_1_;
                  local_1abc = 0xffffffff;
                  local_1ab8 = (undefined1)local_1af8;
                  local_1ab7 = 0;
                  uVar11 = local_1ae8 & 0xffffffff;
                  *(undefined8 *)(puVar17 + -8) = 0x14018ff7f;
                  FUN_1401a4be0(lVar12 + 0x700,uVar11,local_1968,local_1ad0);
                  *(undefined8 *)(puVar17 + -8) = 0x14018ff87;
                  FUN_140156be0(uVar15);
                  local_1ad8 = '\0';
                  lVar12 = local_1af0 + 0xc0;
                  *(undefined8 *)(puVar17 + -8) = 0x14018ff9c;
                  FUN_1401a37d0(lVar12);
                  *plVar13 = 0;
                  *plVar13 = *(longlong *)(lVar18 + (longlong)plVar13);
                  plVar13[1] = *(longlong *)(lVar18 + 8 + (longlong)plVar13);
LAB_14018ffb3:
                  lVar10 = lVar10 + -1;
                  lVar18 = lVar18 + -0x10;
                }
                else {
                  *(undefined8 *)(puVar17 + -8) = 0x14018fea0;
                  local_1ad8 = FUN_140156ba0();
                  if (local_1ad8 != '\0') {
                    local_1ad0[0] = local_1af4;
                    local_1ac8 = local_1a48;
                    local_1ac0 = local_1af8._1_1_;
                    local_1abc = 0xffffffff;
                    local_1ab8 = (undefined1)local_1af8;
                    local_1ab7 = 0;
                    lVar12 = local_1af0 + 0x700;
                    uVar11 = local_1ae8 & 0xffffffff;
                    *(undefined8 *)(puVar17 + -8) = 0x14018fef6;
                    FUN_1401a4be0(lVar12,uVar11,local_1968,local_1ad0);
                    *(undefined8 *)(puVar17 + -8) = 0x14018fefe;
                    FUN_140156be0(uVar15);
                    local_1ad8 = '\0';
                    lVar12 = local_1af0 + 0xc0;
                    *(undefined8 *)(puVar17 + -8) = 0x14018ff13;
                    FUN_1401a37d0(lVar12);
                    plVar13[lVar20 * 2] = 0;
                    plVar13[lVar20 * 2] = *(longlong *)(lVar18 + (longlong)plVar13);
                    plVar13[lVar20 * 2 + 1] = *(longlong *)(lVar18 + 8 + (longlong)plVar13);
                    goto LAB_14018ffb3;
                  }
                }
                lVar20 = lVar20 + 1;
                plVar21 = local_1a98;
              } while (lVar20 < lVar10);
            }
            if ((plVar13 != (longlong *)0x0) && ((int)plVar13[-2] == 0xdddd)) {
              *(undefined8 *)(puVar17 + -8) = 0x14018ffff;
              free(plVar13 + -2);
            }
            *(undefined8 *)(puVar17 + -8) = 0x14019000c;
            FUN_140156dc0(local_1968);
            *(undefined8 *)(puVar17 + -8) = 0x140190019;
            FUN_140153c80(local_1a28);
            local_1ae0 = local_1a10;
            *(undefined8 *)(puVar17 + -8) = 0x140190031;
            FUN_1401560e0(local_1a10);
            if (local_1a08 != 0) {
              if (local_19fc < 0) {
                    // WARNING: Subroutine does not return
                *(undefined **)(puVar17 + -8) = &UNK_14019004a;
                FUN_1401566b0();
              }
              local_1a00 = 0;
            }
            local_1ae0 = local_1a78;
            *(undefined8 *)(puVar17 + -8) = 0x140190068;
            FUN_1401560e0(local_1a78);
            puVar16 = puVar17;
            if (local_1a70 != 0) {
              if (local_1a64 < 0) {
                    // WARNING: Subroutine does not return
                *(undefined **)(puVar17 + -8) = &UNK_140190081;
                FUN_1401566b0();
              }
              local_1a68 = 0;
            }
          }
        }
      }
    }
    if (plVar21 == (longlong *)0x0) goto LAB_1401900cf;
    if (local_1aa0 == (longlong *)0x0) goto LAB_1401900c7;
    lVar10 = *local_1aa0;
    plVar13 = local_1aa0;
  }
  pcVar3 = *(code **)(lVar10 + 0x18);
  *(undefined8 *)(puVar16 + -8) = 0x1401900c5;
  (*pcVar3)(plVar13,plVar21);
LAB_1401900cf:
  *(undefined8 *)(puVar16 + -8) = 0x1401900de;
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140190100(longlong param_1,int *param_2,longlong *param_3)

{
  int iVar1;
  char cVar2;
  int iVar3;
  undefined4 uVar4;
  undefined8 uVar5;
  longlong lVar6;
  int iVar7;
  undefined1 auStack_1aa8 [32];
  undefined1 *local_1a88;
  undefined1 local_1a80;
  undefined4 local_1a78;
  undefined4 local_1a74;
  undefined1 local_1a70 [8];
  undefined1 local_1a68 [8];
  longlong local_1a60;
  int local_1a54;
  undefined8 local_1a48;
  undefined1 local_1a40;
  undefined8 local_1a38;
  undefined1 local_1a30;
  undefined1 local_1a28 [16];
  undefined8 local_1a18;
  undefined1 local_1a08 [8];
  undefined1 local_1a00 [8];
  longlong local_19f8;
  undefined4 local_19f0;
  int local_19ec;
  undefined1 local_19e0 [136];
  undefined1 local_1958 [3200];
  undefined1 *local_cd8;
  undefined4 local_cd0;
  undefined4 local_ccc;
  undefined1 local_cc8 [3216];
  ulonglong local_38;
  undefined8 uStack_30;
  
  uStack_30 = 0x14019011a;
  local_1a18 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_1aa8;
  FUN_1401c5a30(param_3 + 0x18);
  cVar2 = FUN_140154e60(param_2,&local_1a78);
  if (cVar2 != '\0') {
    cVar2 = FUN_1401543d0(param_2,&local_1a74,4);
    if (cVar2 != '\0') {
      cVar2 = FUN_140154a70(param_2,&local_1a88);
      if (cVar2 != '\0') {
        iVar7 = (int)local_1a88;
        if ((iVar7 < 0) || (DAT_140320d70 <= iVar7)) {
          FUN_14017c710(*(undefined8 *)(param_1 + 0x148),param_3,
                        "Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_LingerDataFrame1",2);
        }
        else {
          iVar1 = *param_2;
          iVar3 = FUN_140154030(param_2);
          if (((int)((iVar1 >> 0x1f & 7U) + iVar1) >> 3) + iVar7 != iVar3) {
            FUN_14017c710(*(undefined8 *)(param_1 + 0x148),param_3,
                          "msg.GetReadOffset() + frameLength == msg.GetLength()",2);
          }
          FUN_1401544a0(local_1a70);
          cVar2 = FUN_140154700(param_2,local_1a70,(ulonglong)local_1a88 & 0xffffffff);
          if (cVar2 == '\0') {
            FUN_14017c710(*(longlong **)(param_1 + 0x148),param_3,
                          "Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_LingerDataFrame1",2)
            ;
            local_1a88 = local_1a68;
            FUN_1401560e0(local_1a68);
            if ((local_1a60 != 0) && (local_1a54 < 0)) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
          }
          else {
            uVar5 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
            local_1a48 = uVar5;
            FUN_140156b50(uVar5);
            local_1a40 = 1;
            if (DAT_1403288ef != '\0') {
              (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                        (*(longlong **)(param_1 + 0x148),
                         L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_LingerDataFrame1");
            }
            uVar4 = (**(code **)(*param_3 + 0x10))(param_3);
            lVar6 = FUN_14015f740(*(undefined8 *)(param_1 + 0x148),local_1a78);
            if (lVar6 == 0) {
              FUN_140156be0(uVar5);
              local_1a88 = local_1a68;
              FUN_1401560e0(local_1a68);
              if ((local_1a60 != 0) && (local_1a54 < 0)) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
            }
            else {
              FUN_140156be0(uVar5);
              local_1a40 = 0;
              FUN_1401544a0(local_1a08);
              FUN_140154120(local_1a08,local_19e0,0x80);
              FUN_14004fd90(local_1a08,0x19);
              FUN_14004fe70(local_1a08,uVar4);
              FUN_14004fe70(local_1a08,local_1a74);
              FUN_140153c60(local_1a28,local_1a08);
              FUN_140155b20(local_1a08,(longlong)iVar7);
              local_ccc = 200;
              local_cd0 = 0;
              local_cd8 = local_1958;
              FUN_1401570d0(local_cc8,local_1a08);
              FUN_140156ed0(local_1958,local_cc8);
              FUN_140156dc0(local_cc8);
              FUN_1401570d0(local_cc8,local_1a70);
              FUN_140156ed0(local_1958,local_cc8);
              FUN_140156dc0(local_cc8);
              uVar5 = (**(code **)(*(longlong *)(lVar6 + 0x108) + 0x10))();
              local_1a38 = uVar5;
              FUN_140156b50(uVar5);
              local_1a30 = 1;
              local_1a88 = (undefined1 *)0x0;
              local_1a80 = 1;
              FUN_1401a3610(*(undefined8 *)(lVar6 + 0x748),local_1958,&local_1a88);
              FUN_140156be0(uVar5);
              FUN_140156dc0(local_1958);
              FUN_140153c80(local_1a28);
              local_1a88 = local_1a00;
              FUN_1401560e0(local_1a00);
              if (local_19f8 != 0) {
                if (local_19ec < 0) {
                    // WARNING: Subroutine does not return
                  FUN_1401566b0();
                }
                local_19f0 = 0;
              }
              local_1a88 = local_1a68;
              FUN_1401560e0(local_1a68);
              if ((local_1a60 != 0) && (local_1a54 < 0)) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
            }
          }
        }
      }
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401904d0(longlong param_1,undefined8 param_2,longlong *param_3)

{
  undefined8 uVar1;
  char cVar2;
  undefined4 uVar3;
  undefined8 uVar4;
  double dVar5;
  longlong lVar6;
  undefined1 auStack_da8 [32];
  undefined8 local_d88;
  undefined8 uStack_d80;
  undefined1 local_d78;
  undefined4 local_d74;
  undefined1 local_d70;
  undefined1 local_d6f;
  undefined1 local_d68 [8];
  longlong local_d60;
  longlong local_d58;
  undefined4 local_d50;
  int local_d4c;
  double local_d40;
  undefined1 local_d38;
  undefined8 local_d30;
  undefined1 local_d28;
  undefined8 local_d20;
  undefined1 local_d18 [80];
  undefined4 local_cc8;
  uint uStack_cc4;
  undefined4 uStack_cc0;
  undefined4 uStack_cbc;
  undefined4 *local_48;
  undefined4 local_40;
  int local_3c;
  ulonglong local_38;
  
  local_d20 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_da8;
  FUN_1401c5a30(param_3 + 0x18);
  cVar2 = FUN_1401543d0(param_2,&local_d88,8);
  if (cVar2 != '\0') {
    cVar2 = FUN_1401543d0(param_2,&local_d40,8);
    if (cVar2 != '\0') {
      uVar4 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
      local_d30 = uVar4;
      FUN_140156b50(uVar4);
      local_d28 = 1;
      if (DAT_1403288ef != '\0') {
        (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                  (*(longlong **)(param_1 + 0x148),
                   L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_RequestServerTimeAndKeepAlive"
                  );
      }
      lVar6 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
      param_3[0x33] = lVar6;
      lVar6 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
      param_3[0x37] = lVar6;
      param_3[0x38] = (longlong)local_d40;
      param_3[0x39] = (longlong)((local_d40 - (double)param_3[0x39]) * 0.5 + (double)param_3[0x39]);
      FUN_1401544a0(local_d68);
      FUN_140153d90(local_d68);
      FUN_14004fd90(local_d68,0x1c);
      FUN_14004fbc0(local_d68,local_d88);
      uVar1 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
      FUN_14004fbc0(local_d68,uVar1);
      dVar5 = (double)(**(code **)(param_3[0x21] + 0x10))();
      local_d40 = dVar5;
      FUN_140156b50(dVar5);
      local_d38 = 1;
      local_3c = 200;
      local_40 = 0;
      local_48 = &local_cc8;
      if (local_d60 == 0) {
        uStack_cc0 = local_d50;
        if (local_d58 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
      }
      else {
        uStack_cc0 = *(undefined4 *)(local_d60 + 0x18);
      }
      lVar6 = local_d58;
      if (local_d58 == 0) {
        if (local_d60 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        lVar6 = 0;
        if (*(int *)(local_d60 + 0x18) != 0) {
          lVar6 = *(longlong *)(local_d60 + 0x10);
        }
      }
      local_40 = 1;
      local_d88._0_4_ = (undefined4)lVar6;
      local_d88._4_4_ = (uint)((ulonglong)lVar6 >> 0x20);
      local_cc8 = (undefined4)local_d88;
      uStack_cc4 = local_d88._4_4_;
      uStack_cbc = uStack_d80._4_4_;
      local_d88 = (longlong *)((ulonglong)local_d88._4_4_ << 0x20);
      uStack_d80 = 0;
      local_d78 = 1;
      local_d74 = 0xffffffff;
      local_d70 = 1;
      local_d6f = DAT_140320dfc;
      uVar3 = (**(code **)(*param_3 + 0x10))(param_3);
      FUN_1401a4be0(param_3 + 0xe0,uVar3,&local_cc8,&local_d88);
      if (local_48 == (undefined4 *)0x0) {
        FUN_140156300(local_d18,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_d18,(ThrowInfo *)&DAT_14031d928);
      }
      if (local_3c < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      FUN_140156be0(dVar5);
      local_d88 = &local_d60;
      FUN_1401560e0(&local_d60);
      if (local_d58 != 0) {
        if (local_d4c < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_d50 = 0;
      }
      FUN_140156be0(uVar4);
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401907d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  longlong lVar2;
  undefined1 auStack_d68 [32];
  undefined8 local_d48;
  undefined1 uStack_d40;
  undefined3 uStack_d3f;
  undefined4 uStack_d3c;
  undefined1 local_d38 [8];
  longlong local_d30;
  longlong local_d28;
  undefined4 local_d20;
  int local_d1c;
  undefined8 local_d10;
  undefined1 local_d08;
  undefined8 local_d00;
  undefined1 local_cf8 [80];
  undefined4 local_ca8;
  undefined4 uStack_ca4;
  undefined4 uStack_ca0;
  undefined4 uStack_c9c;
  undefined4 *local_28;
  undefined4 local_20;
  int local_1c;
  ulonglong local_18;
  
  local_d00 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_d68;
  FUN_1401544a0(local_d38);
  FUN_140153d90(local_d38);
  FUN_140154600(local_d38,0x800);
  FUN_140154600(local_d38,0);
  FUN_14004fd90(local_d38,8);
  uVar1 = (**(code **)(*(longlong *)(param_2 + 0x108) + 0x10))();
  local_d10 = uVar1;
  FUN_140156b50(uVar1);
  local_d08 = 1;
  local_1c = 200;
  local_20 = 0;
  local_28 = &local_ca8;
  if (local_d30 == 0) {
    if (local_d28 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else {
    local_d20 = *(undefined4 *)(local_d30 + 0x18);
  }
  lVar2 = local_d28;
  if (local_d28 == 0) {
    if (local_d30 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    lVar2 = 0;
    if (*(int *)(local_d30 + 0x18) != 0) {
      lVar2 = *(longlong *)(local_d30 + 0x10);
    }
  }
  local_20 = 1;
  local_d48._0_4_ = (undefined4)lVar2;
  local_d48._4_4_ = (undefined4)((ulonglong)lVar2 >> 0x20);
  local_ca8 = (undefined4)local_d48;
  uStack_ca4 = local_d48._4_4_;
  uStack_c9c = uStack_d3c;
  local_d48 = (longlong *)0x0;
  _uStack_d40 = CONCAT31((int3)((uint)local_d20 >> 8),1);
  uStack_ca0 = local_d20;
  FUN_1401a3610(*(undefined8 *)(param_2 + 0x748),&local_ca8,&local_d48);
  if (local_28 == (undefined4 *)0x0) {
    FUN_140156300(local_cf8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_cf8,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_1c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_140156be0(uVar1);
  local_d48 = &local_d30;
  FUN_1401560e0(&local_d30);
  if ((local_d28 != 0) && (local_d1c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401909a0(longlong param_1,undefined8 param_2,longlong *param_3)

{
  longlong *plVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  longlong lVar5;
  double dVar6;
  undefined1 auStack_da8 [32];
  undefined8 local_d88;
  undefined8 uStack_d80;
  undefined1 local_d78;
  undefined4 local_d74;
  undefined1 local_d70;
  undefined1 local_d6f;
  undefined1 local_d68 [8];
  undefined *local_d60;
  longlong local_d58;
  undefined4 local_d50;
  int local_d4c;
  undefined8 local_d40;
  undefined1 local_d38;
  undefined8 local_d30;
  undefined1 local_d28;
  undefined8 local_d20;
  undefined1 local_d18 [80];
  undefined4 local_cc8;
  undefined4 uStack_cc4;
  undefined4 uStack_cc0;
  undefined4 uStack_cbc;
  undefined4 *local_48;
  undefined4 local_40;
  int local_3c;
  ulonglong local_38;
  
  local_d20 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_da8;
  FUN_1401c5a30(param_3 + 0x18);
  uVar3 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
  local_d30 = uVar3;
  FUN_140156b50(uVar3);
  local_d28 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
              (*(longlong **)(param_1 + 0x148),
               L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_RequestReceiveSpeedAtReceiverSide_NoBypass"
              );
  }
  if (((param_3 != (longlong *)0x0) &&
      (plVar1 = (longlong *)param_3[0xe8], plVar1 != (longlong *)0x0)) && (*plVar1 != 0)) {
    local_d88 = Proud::AddrPort::vftable;
    uStack_d80 = CONCAT26(uStack_d80._6_2_,(int6)param_3[0xe2]);
    dVar6 = (double)FUN_14019ef20(*(undefined8 *)(*plVar1 + 0x178),&local_d88);
    if (0.0 < dVar6) {
      FUN_1401544a0(local_d68);
      FUN_140153d90(local_d68);
      FUN_140154600(local_d68,0x800);
      FUN_140154600(local_d68,0);
      FUN_14004fd90(local_d68,0x28);
      FUN_14004fbc0(local_d68,dVar6);
      uVar4 = (**(code **)(param_3[0x21] + 0x10))();
      local_d40 = uVar4;
      FUN_140156b50(uVar4);
      local_d38 = 1;
      local_3c = 200;
      local_40 = 0;
      local_48 = &local_cc8;
      if (local_d60 == (undefined *)0x0) {
        if (local_d58 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
      }
      else {
        local_d50 = *(undefined4 *)(local_d60 + 0x18);
      }
      lVar5 = local_d58;
      if (local_d58 == 0) {
        if (local_d60 == (undefined *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        lVar5 = 0;
        if (*(int *)(local_d60 + 0x18) != 0) {
          lVar5 = *(longlong *)(local_d60 + 0x10);
        }
      }
      local_40 = 1;
      local_d88._0_4_ = (undefined4)lVar5;
      local_d88._4_4_ = (undefined4)((ulonglong)lVar5 >> 0x20);
      local_cc8 = (undefined4)local_d88;
      uStack_cc4 = local_d88._4_4_;
      uStack_cbc = uStack_d80._4_4_;
      local_d88 = (undefined **)CONCAT44(local_d88._4_4_,1);
      uStack_d80 = 0;
      local_d78 = 1;
      local_d74 = 0xffffffff;
      local_d70 = 1;
      local_d6f = DAT_140320dfc;
      uStack_cc0 = local_d50;
      uVar2 = (**(code **)(*param_3 + 0x10))(param_3);
      FUN_1401a4be0(param_3 + 0xe0,uVar2,&local_cc8,&local_d88);
      if (local_48 == (undefined4 *)0x0) {
        FUN_140156300(local_d18,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_d18,(ThrowInfo *)&DAT_14031d928);
      }
      if (local_3c < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      FUN_140156be0(uVar4);
      local_d88 = &local_d60;
      FUN_1401560e0(&local_d60);
      if ((local_d58 != 0) && (local_d4c < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
    }
  }
  FUN_140156be0(uVar3);
  return;
}



undefined8 * FUN_140190c70(undefined8 *param_1,uint param_2)

{
  longlong *plVar1;
  
  *param_1 = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 3)) {
    FUN_14018db20(param_1[2],(longlong)*(int *)(param_1 + 3));
  }
  if (param_1[2] != 0) {
    plVar1 = (longlong *)param_1[1];
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,param_1[2]);
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



longlong FUN_140190ce0(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  longlong lVar2;
  uint uVar3;
  
  uVar3 = (uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8);
  uVar1 = (ulonglong)uVar3 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + uVar1 * 8);
        (lVar2 != 0 && ((uint)uVar1 == *(uint *)(lVar2 + 0x28) % *(uint *)(param_1 + 0x28)));
        lVar2 = *(longlong *)(lVar2 + 0x18)) {
      if ((*(uint *)(lVar2 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar2 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        return lVar2 + 0x10;
      }
    }
  }
  lVar2 = FUN_1401a03d0(param_1,param_2,uVar1,uVar3);
  return lVar2 + 0x10;
}



void FUN_140190d90(longlong param_1,int param_2)

{
  longlong *plVar1;
  int iVar2;
  undefined8 uVar3;
  longlong lVar4;
  undefined1 local_58 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  iVar2 = *(int *)(param_1 + 0x18);
  if (param_2 != iVar2) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar2 = FUN_14018c670(param_1,param_2);
      plVar1 = *(longlong **)(param_1 + 8);
      lVar4 = (longlong)iVar2;
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar1 == (longlong *)0x0) {
          uVar3 = FUN_140156940(lVar4 * 0x48);
        }
        else {
          uVar3 = (**(code **)(*plVar1 + 8))(plVar1,lVar4 * 0x48);
        }
        *(undefined8 *)(param_1 + 0x10) = uVar3;
        FUN_14018d8a0(uVar3,(longlong)param_2);
      }
      else {
        uVar3 = *(undefined8 *)(param_1 + 0x10);
        if (plVar1 == (longlong *)0x0) {
          lVar4 = FUN_140156940(lVar4 * 0x48);
        }
        else {
          lVar4 = (**(code **)(*plVar1 + 8))(plVar1,lVar4 * 0x48);
        }
        FUN_14018d940(lVar4,uVar3,(longlong)*(int *)(param_1 + 0x18));
        FUN_14018d8a0(lVar4 + (longlong)*(int *)(param_1 + 0x18) * 0x48,
                      (longlong)(param_2 - *(int *)(param_1 + 0x18)));
        if (lVar4 == 0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
        FUN_14018db20(uVar3,(longlong)*(int *)(param_1 + 0x18));
        plVar1 = *(longlong **)(param_1 + 8);
        if (plVar1 == (longlong *)0x0) {
          FUN_140156970(uVar3);
        }
        else {
          (**(code **)(*plVar1 + 0x18))(plVar1,uVar3);
        }
        *(longlong *)(param_1 + 0x10) = lVar4;
      }
      *(int *)(param_1 + 0x1c) = iVar2;
    }
    else if (iVar2 - param_2 < 1) {
      if (0 < param_2 - iVar2) {
        FUN_14018d8a0(*(longlong *)(param_1 + 0x10) + (longlong)iVar2 * 0x48,
                      (longlong)(param_2 - iVar2));
      }
    }
    else {
      FUN_14018db20(*(longlong *)(param_1 + 0x10) + (longlong)param_2 * 0x48,
                    (longlong)(iVar2 - param_2));
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_140190f40(undefined8 *param_1)

{
  longlong *plVar1;
  
  *param_1 = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 3)) {
    FUN_14018db20(param_1[2],(longlong)*(int *)(param_1 + 3));
  }
  if (param_1[2] != 0) {
    plVar1 = (longlong *)param_1[1];
    if (plVar1 != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x000140190f87. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*plVar1 + 0x18))(plVar1,param_1[2]);
      return;
    }
    FUN_140156970();
  }
  return;
}



undefined8 FUN_140190fa0(undefined8 param_1,longlong param_2,int *param_3,undefined8 param_4)

{
  int iVar1;
  char cVar2;
  undefined8 uVar3;
  int local_res18 [4];
  undefined **local_38;
  undefined4 local_30;
  undefined2 local_2c;
  undefined **local_28;
  undefined4 local_20;
  undefined2 local_1c;
  
  iVar1 = *param_3;
  cVar2 = FUN_140154c00(param_3,local_res18);
  if (cVar2 == '\0') {
LAB_140190fdc:
    FUN_1401540a0(param_3,(int)((iVar1 >> 0x1f & 7U) + iVar1) >> 3);
    uVar3 = 0;
  }
  else {
    if (local_res18[0] == 0xc) {
      local_28 = Proud::AddrPort::vftable;
      local_20 = *(undefined4 *)(param_2 + 8);
      local_1c = *(undefined2 *)(param_2 + 0xc);
      FUN_14018e9a0(param_1,param_3,&local_28,param_4);
    }
    else {
      if (local_res18[0] != 0x10) goto LAB_140190fdc;
      local_38 = Proud::AddrPort::vftable;
      local_30 = *(undefined4 *)(param_2 + 8);
      local_2c = *(undefined2 *)(param_2 + 0xc);
      FUN_14018ed40(param_1,param_3,&local_38,param_4);
    }
    uVar3 = 1;
  }
  return uVar3;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140191070(longlong param_1,undefined8 param_2,longlong param_3)

{
  char cVar1;
  int iVar2;
  undefined8 uVar3;
  longlong lVar4;
  undefined **ppuVar5;
  undefined8 uVar6;
  bool bVar7;
  undefined1 auStack_da8 [32];
  undefined **local_d88;
  undefined *local_d80;
  longlong local_d78;
  ulonglong local_d70;
  undefined8 local_d68;
  undefined **local_d60;
  undefined8 local_d58;
  longlong local_d50;
  undefined8 local_d48;
  undefined8 local_d40;
  undefined **local_d38;
  undefined8 local_d30;
  undefined8 local_d28;
  undefined8 local_d20;
  undefined8 local_d18;
  undefined8 local_d10;
  undefined1 local_d08;
  undefined8 local_d00;
  undefined **local_cf8;
  undefined4 uStack_cf0;
  undefined4 uStack_cec;
  undefined **local_ce8;
  undefined4 uStack_ce0;
  undefined4 uStack_cdc;
  undefined1 local_cd8 [3216];
  ulonglong local_48;
  
  local_d00 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_da8;
  FUN_1401c5a30(param_3 + 0xc0);
  uVar3 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
  local_d10 = uVar3;
  FUN_140156b50(uVar3);
  local_d08 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
              (*(longlong **)(param_1 + 0x148),
               L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_NotifyServerConnectionRequestData"
              );
  }
  iVar2 = 0;
  lVar4 = 0;
  if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x1708) != 0) {
    lVar4 = *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x16f8);
  }
  do {
    if (lVar4 == 0) {
      FUN_1401907d0(param_1,param_3);
LAB_14019144f:
      FUN_140156be0(uVar3);
      return;
    }
    if (param_3 == *(longlong *)(lVar4 + 0x10)) {
      local_d58 = 0;
      local_d50 = 0;
      local_d48 = 0;
      local_d40 = 0;
      local_d60 = Proud::ByteArray::vftable;
      cVar1 = FUN_140154a70(param_2,&local_cf8);
      ppuVar5 = local_cf8;
      if (((cVar1 != '\0') && (-1 < (int)local_cf8)) && ((int)local_cf8 <= DAT_140320d70)) {
        FUN_140050060(&local_d60,(ulonglong)local_cf8 & 0xffffffff);
        lVar4 = local_d50;
        if ((int)local_d48 == 0) {
          lVar4 = 0;
        }
        cVar1 = FUN_1401543d0(param_2,lVar4,(ulonglong)ppuVar5 & 0xffffffff);
        if (cVar1 != '\0') {
          local_cf8 = (undefined **)0x0;
          uStack_cf0 = 0;
          uStack_cec = 0;
          cVar1 = FUN_1401543d0(param_2,&local_cf8,0x10);
          if (cVar1 == '\0') {
            FUN_1401907d0(param_1,param_3);
            FUN_1401858d0(&local_d60);
          }
          else {
            local_ce8 = local_cf8;
            uStack_ce0 = uStack_cf0;
            uStack_cdc = uStack_cec;
            cVar1 = FUN_1401543d0(param_2,&local_cf8,4);
            if (cVar1 == '\0') {
              FUN_1401907d0(param_1,param_3);
              FUN_1401858d0(&local_d60);
            }
            else {
              lVar4 = *(longlong *)(param_1 + 0x148);
              bVar7 = local_ce8 < *(undefined ***)(lVar4 + 1000);
              if ((local_ce8 != *(undefined ***)(lVar4 + 1000)) ||
                 (bVar7 = CONCAT44(uStack_cdc,uStack_ce0) < *(ulonglong *)(lVar4 + 0x3f0),
                 CONCAT44(uStack_cdc,uStack_ce0) != *(ulonglong *)(lVar4 + 0x3f0))) {
                iVar2 = (1 - (uint)bVar7) - (uint)(bVar7 != 0);
              }
              if ((iVar2 == 0) && ((int)local_cf8 == *(int *)(lVar4 + 0x220))) {
                cVar1 = FUN_14015b5e0(param_3 + 0x288);
                if (cVar1 == '\x01') {
                  lVar4 = *(longlong *)(param_1 + 0x148);
                  if (*(longlong *)(lVar4 + 0x758) == 0) {
                    local_d80 = (undefined *)0x0;
                    local_d78 = 0;
                    local_d70 = 0;
                    local_d68 = 0;
                    local_d88 = Proud::ByteArray::vftable;
                    FUN_1401768f0(lVar4,param_3,&local_d88);
                    FUN_1401858d0(&local_d88);
                  }
                  else {
                    local_cf8 = Proud::AddrPort::vftable;
                    uStack_cf0 = *(undefined4 *)(*(longlong *)(param_3 + 0x748) + 0x130);
                    uStack_cec = CONCAT22(uStack_cec._2_2_,
                                          *(undefined2 *)(*(longlong *)(param_3 + 0x748) + 0x134));
                    FUN_14017e1c0(lVar4,&local_cf8,&local_d60);
                  }
                  FUN_1401858d0(&local_d60);
                }
                else {
                  FUN_1401544a0(&local_d88);
                  FUN_140153d90(&local_d88);
                  FUN_140154600(&local_d88,0x800);
                  FUN_140154600(&local_d88,0);
                  FUN_14004fd90(&local_d88,9);
                  local_d30 = 0;
                  local_d28 = 0;
                  local_d20 = 0;
                  local_d18 = 0;
                  local_d38 = Proud::ByteArray::vftable;
                  FUN_140155b20(&local_d88,0);
                  FUN_1401858d0(&local_d38);
                  ppuVar5 = (undefined **)(**(code **)(*(longlong *)(param_3 + 0x108) + 0x10))();
                  local_ce8 = ppuVar5;
                  FUN_140156b50(ppuVar5);
                  uStack_ce0 = CONCAT31(uStack_ce0._1_3_,1);
                  uVar6 = FUN_1401570d0(local_cd8,&local_d88);
                  local_cf8 = (undefined **)0x0;
                  uStack_cf0 = CONCAT31(uStack_cf0._1_3_,1);
                  FUN_1401a3610(*(undefined8 *)(param_3 + 0x748),uVar6,&local_cf8);
                  FUN_140156dc0(local_cd8);
                  FUN_140156be0(ppuVar5);
                  local_cf8 = &local_d80;
                  FUN_1401560e0(&local_d80);
                  if (local_d78 != 0) {
                    if ((longlong)local_d70 < 0) {
                    // WARNING: Subroutine does not return
                      FUN_1401566b0();
                    }
                    local_d70 = local_d70 & 0xffffffff00000000;
                  }
                  FUN_1401858d0(&local_d60);
                }
              }
              else {
                FUN_1401907d0(param_1,param_3);
                FUN_1401858d0(&local_d60);
              }
            }
          }
          goto LAB_14019144f;
        }
      }
      FUN_1401907d0(param_1,param_3);
      FUN_1401858d0(&local_d60);
      goto LAB_14019144f;
    }
    lVar4 = *(longlong *)(lVar4 + 0x18);
  } while( true );
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140191490(longlong param_1,longlong param_2)

{
  int iVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong lVar5;
  undefined1 auStack_db8 [32];
  wchar_t *local_d98;
  int local_d90;
  undefined1 local_d88 [4];
  undefined4 local_d84;
  longlong local_d80;
  longlong local_d78;
  undefined4 local_d70;
  int local_d6c;
  undefined8 local_d60;
  undefined1 uStack_d58;
  undefined3 uStack_d57;
  undefined4 uStack_d54;
  longlong *local_d50;
  undefined1 local_d48;
  undefined8 local_d40;
  undefined1 local_d38;
  undefined **local_d30;
  undefined8 local_d28;
  undefined8 local_d20;
  undefined8 local_d18;
  undefined8 local_d10;
  undefined8 local_ce8;
  undefined4 local_cd8;
  undefined4 uStack_cd4;
  undefined4 uStack_cd0;
  undefined4 uStack_ccc;
  undefined4 *local_58;
  undefined4 local_50;
  int local_4c;
  ulonglong local_48;
  
  local_ce8 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_db8;
  FUN_1401c5a30(param_2 + 0xc0);
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
  local_d40 = uVar2;
  FUN_140156b50(uVar2);
  local_d38 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
              (*(longlong **)(param_1 + 0x148),
               L"Proud::CNetThreads_S::NetWorkerThread_NewClientCase");
  }
  FUN_14018c430(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x788),
                *(undefined8 *)(*(longlong *)(param_2 + 0x748) + 0x110));
  FUN_1401544a0(local_d88);
  FUN_140153d90(local_d88);
  FUN_140154600(local_d88,0x800);
  FUN_140154600(local_d88,0);
  FUN_14004fd90(local_d88,4);
  FUN_14004fd90(local_d88,*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x17f0) != 0);
  FUN_140155390(local_d88,*(longlong *)(param_1 + 0x148) + 0x228);
  lVar4 = *(longlong *)(param_1 + 0x148);
  iVar1 = *(int *)(lVar4 + 0xc68);
  FUN_140155b20(local_d88,(longlong)iVar1);
  lVar5 = 0;
  if (*(int *)(lVar4 + 0xc68) != 0) {
    lVar5 = *(longlong *)(lVar4 + 0xc60);
  }
  if (iVar1 == 0) goto LAB_14019163c;
  local_d84 = 0;
  if (local_d80 == 0) {
    if (local_d78 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0(0,lVar5);
    }
LAB_14019160e:
    FUN_14004ff50(&local_d78,lVar5,iVar1);
  }
  else {
    if (local_d78 != 0) goto LAB_14019160e;
    if (local_d80 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0(0,lVar5);
    }
    FUN_140050180(local_d80,lVar5,iVar1);
  }
  FUN_1400501f0(local_d88);
LAB_14019163c:
  FUN_140156be0(uVar2);
  local_d38 = 0;
  uVar3 = (**(code **)(*(longlong *)(param_2 + 0x108) + 0x10))();
  local_d50 = (longlong *)uVar3;
  FUN_140156b50(uVar3);
  local_d48 = 1;
  local_4c = 200;
  local_50 = 0;
  local_58 = &local_cd8;
  if (local_d80 == 0) {
    uStack_cd0 = local_d70;
    if (local_d78 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else {
    uStack_cd0 = *(undefined4 *)(local_d80 + 0x18);
  }
  lVar4 = local_d78;
  if (local_d78 == 0) {
    if (local_d80 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    lVar4 = 0;
    if (*(int *)(local_d80 + 0x18) != 0) {
      lVar4 = *(longlong *)(local_d80 + 0x10);
    }
  }
  local_50 = 1;
  local_d60._0_4_ = (undefined4)lVar4;
  local_d60._4_4_ = (undefined4)((ulonglong)lVar4 >> 0x20);
  local_cd8 = (undefined4)local_d60;
  uStack_cd4 = local_d60._4_4_;
  uStack_ccc = uStack_d54;
  local_d60 = 0;
  _uStack_d58 = CONCAT31((int3)((uint)uStack_cd0 >> 8),1);
  FUN_1401a3610(*(undefined8 *)(param_2 + 0x748),&local_cd8,&local_d60);
  if (local_58 != (undefined4 *)0x0) {
    if (local_4c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    iVar1 = FUN_1401a3280(*(undefined8 *)(param_2 + 0x748));
    if (iVar1 == 0) {
      FUN_140156be0(uVar3);
      local_d48 = 0;
    }
    else {
      FUN_140156be0(uVar3);
      local_d48 = 0;
      local_d38 = 1;
      FUN_140156b50(uVar2);
      local_d28 = 0;
      local_d20 = 0;
      local_d18 = 0;
      local_d10 = 0;
      local_d30 = Proud::ByteArray::vftable;
      local_d98 = L"Proud::CNetThreads_S::NetWorkerThread_NewClientCase";
      local_d90 = iVar1;
      (**(code **)(*(longlong *)(param_2 + 0xa0) + 0x38))(param_2 + 0xa0,0xb,3,&local_d30);
      FUN_1401858d0(&local_d30);
      (**(code **)(*(longlong *)(param_2 + 0xa0) + 0x40))
                (param_2 + 0xa0,L"Proud::CNetThreads_S::NetWorkerThread_NewClientCase");
    }
    FUN_1401a37d0(param_2 + 0xc0);
    local_d50 = &local_d80;
    FUN_1401560e0(&local_d80);
    if (local_d78 != 0) {
      if (local_d6c < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_d70 = 0;
    }
    if (iVar1 != 0) {
      FUN_140156be0(uVar2);
    }
    return;
  }
  FUN_140156300(&local_d30,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
  _CxxThrowException(&local_d30,(ThrowInfo *)&DAT_14031d928);
}



void FUN_140191870(longlong param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  ulonglong uVar3;
  int iVar4;
  int iVar5;
  undefined8 *puVar6;
  ulonglong uVar7;
  uint uVar8;
  ulonglong uVar9;
  longlong lVar10;
  longlong lVar11;
  undefined1 local_c8 [144];
  
  lVar11 = (longlong)param_2;
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  iVar5 = *(int *)(param_1 + 0x18);
  if (param_2 != iVar5) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar5 = FUN_1401abc90(param_1,param_2,param_3,param_4,0xfffffffffffffffe);
      lVar10 = (longlong)iVar5;
      plVar1 = *(longlong **)(param_1 + 8);
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar1 == (longlong *)0x0) {
          puVar2 = (undefined8 *)FUN_140156940(lVar10 << 3);
        }
        else {
          puVar2 = (undefined8 *)(**(code **)(*plVar1 + 8))(plVar1,lVar10 << 3);
        }
        *(undefined8 **)(param_1 + 0x10) = puVar2;
        if (0 < param_2) {
          do {
            if (puVar2 != (undefined8 *)0x0) {
              *puVar2 = 0;
            }
            puVar2 = puVar2 + 1;
            lVar11 = lVar11 + -1;
          } while (lVar11 != 0);
        }
      }
      else {
        lVar11 = *(longlong *)(param_1 + 0x10);
        if (plVar1 == (longlong *)0x0) {
          puVar2 = (undefined8 *)FUN_140156940(lVar10 << 3);
        }
        else {
          puVar2 = (undefined8 *)(**(code **)(*plVar1 + 8))(plVar1,lVar10 << 3);
        }
        iVar4 = *(int *)(param_1 + 0x18);
        uVar7 = 0;
        uVar3 = uVar7;
        uVar9 = uVar7;
        puVar6 = puVar2;
        if (0 < (longlong)iVar4) {
          do {
            if (puVar6 != (undefined8 *)0x0) {
              *puVar6 = 0;
              FUN_14018da90(puVar6,lVar11 + uVar3 * 8);
            }
            uVar8 = (int)uVar9 + 1;
            uVar3 = (longlong)(int)uVar8;
            uVar9 = (ulonglong)uVar8;
            puVar6 = puVar6 + 1;
          } while ((longlong)(int)uVar8 < (longlong)iVar4);
        }
        iVar4 = param_2 - *(int *)(param_1 + 0x18);
        puVar6 = puVar2 + *(int *)(param_1 + 0x18);
        if (0 < iVar4) {
          do {
            if (puVar6 != (undefined8 *)0x0) {
              *puVar6 = 0;
            }
            uVar8 = (int)uVar7 + 1;
            uVar7 = (ulonglong)uVar8;
            puVar6 = puVar6 + 1;
          } while ((int)uVar8 < iVar4);
        }
        if (puVar2 == (undefined8 *)0x0) {
          FUN_140156300(local_c8,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_c8,(ThrowInfo *)&DAT_14031d928);
        }
        FUN_14016d0f0(lVar11,(longlong)*(int *)(param_1 + 0x18));
        plVar1 = *(longlong **)(param_1 + 8);
        if (plVar1 == (longlong *)0x0) {
          FUN_140156970(lVar11);
        }
        else {
          (**(code **)(*plVar1 + 0x18))(plVar1,lVar11);
        }
        *(undefined8 **)(param_1 + 0x10) = puVar2;
      }
      *(int *)(param_1 + 0x1c) = iVar5;
    }
    else if (iVar5 - param_2 < 1) {
      iVar4 = param_2 - iVar5;
      if (0 < iVar4) {
        puVar2 = (undefined8 *)(*(longlong *)(param_1 + 0x10) + (longlong)iVar5 * 8);
        iVar5 = 0;
        if (0 < iVar4) {
          do {
            if (puVar2 != (undefined8 *)0x0) {
              *puVar2 = 0;
            }
            iVar5 = iVar5 + 1;
            puVar2 = puVar2 + 1;
          } while (iVar5 < iVar4);
        }
      }
    }
    else {
      FUN_14016d0f0(*(longlong *)(param_1 + 0x10) + lVar11 * 8,(longlong)(iVar5 - param_2));
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



undefined8 * FUN_140191ab0(undefined8 *param_1,uint param_2)

{
  longlong *plVar1;
  
  *param_1 = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 3)) {
    FUN_14018db20(param_1[2],(longlong)*(int *)(param_1 + 3));
  }
  if (param_1[2] != 0) {
    plVar1 = (longlong *)param_1[1];
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,param_1[2]);
    }
  }
  if ((param_2 & 1) != 0) {
    FUN_140156970(param_1);
  }
  return param_1;
}



longlong FUN_140191b20(longlong param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  
  FUN_140156a70(param_1,0,1,param_4,0xfffffffffffffffe);
  *(undefined ***)(param_1 + 0x38) = Proud::CFastArray<>::vftable;
  *(undefined8 *)(param_1 + 0x40) = 0;
  *(undefined8 *)(param_1 + 0x48) = 0;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined8 *)(param_1 + 0x58) = 0;
  *(undefined ***)(param_1 + 0x60) = Proud::CFastArray<>::vftable;
  *(undefined8 *)(param_1 + 0x68) = 0;
  *(undefined8 *)(param_1 + 0x70) = 0;
  *(undefined8 *)(param_1 + 0x78) = 0;
  *(undefined8 *)(param_1 + 0x80) = 0;
  *(undefined8 *)(param_1 + 0x88) = 0;
  *(undefined8 *)(param_1 + 0x90) = 0;
  FUN_1401ae890(param_1 + 0xa0,DAT_140320db0);
  FUN_1401ae890(param_1 + 0xb8,DAT_140320d28);
  FUN_1401ac770(param_1 + 0x150);
  FUN_1401827c0(param_1 + 0x158,*(undefined8 *)(param_1 + 0x150),DAT_140320c9c);
  lVar1 = param_2 + 0x120;
  if (param_2 == 0) {
    lVar1 = 0;
  }
  FUN_1401ab830(param_1 + 0x160,lVar1);
  FUN_1401ae890(param_1 + 0x188,DAT_140320cd8);
  FUN_1401ae890(param_1 + 0x1a0,DAT_140320cd8);
  FUN_1401ae890(param_1 + 0x1b8,DAT_140320ce0);
  FUN_1401ae890(param_1 + 0x1d0,DAT_140320d80);
  FUN_1401ae890(param_1 + 0x1e8,0x3ff0000000000000);
  *(undefined4 *)(param_1 + 0x200) = 0;
  *(undefined4 *)(param_1 + 0x240) = 0;
  FUN_1401ae890(param_1 + 0x248,DAT_140320d08);
  *(undefined8 *)(param_1 + 0x100) = 0;
  *(longlong *)(param_1 + 0x148) = param_2;
  *(undefined1 *)(param_1 + 0x140) = 0;
  return param_1;
}



void FUN_140191cc0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  void *pvVar2;
  longlong *plVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  int iVar6;
  longlong lVar7;
  undefined8 uVar8;
  
  uVar8 = 0xfffffffffffffffe;
  uVar4 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
  uVar5 = uVar4;
  FUN_140156b50(uVar4);
  if (DAT_1403288ef != '\0') {
    lVar7 = **(longlong **)(param_1 + 0x148);
    (**(code **)(lVar7 + 200))
              (*(longlong **)(param_1 + 0x148),L"Proud::CNetThreads_S::~CNetThreads_S",lVar7,param_4
               ,uVar8,uVar5,1);
  }
  *(undefined1 *)(param_1 + 0x140) = 1;
  FUN_140156be0(uVar4);
  uVar5 = 0;
  if (*(undefined8 **)(param_1 + 0x88) != (undefined8 *)0x0) {
    uVar5 = **(undefined8 **)(param_1 + 0x88);
  }
  FUN_140182710(uVar5);
  if (*(undefined8 **)(param_1 + 0x90) == (undefined8 *)0x0) {
    uVar5 = 0;
  }
  else {
    uVar5 = **(undefined8 **)(param_1 + 0x90);
  }
  FUN_140182710(uVar5);
  FUN_140156b50(param_1);
  iVar6 = 0;
  lVar7 = 0;
  if (0 < *(int *)(param_1 + 0x78)) {
    do {
      if ((lVar7 < 0) || (*(int *)(param_1 + 0x78) <= iVar6)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      puVar1 = *(undefined8 **)(*(longlong *)(param_1 + 0x70) + lVar7 * 8);
      uVar5 = 0;
      if (puVar1 != (undefined8 *)0x0) {
        uVar5 = *puVar1;
      }
      FUN_140182710(uVar5);
      iVar6 = iVar6 + 1;
      lVar7 = lVar7 + 1;
    } while (iVar6 < *(int *)(param_1 + 0x78));
  }
  FUN_140156be0(param_1);
  iVar6 = 0;
  lVar7 = 0;
  if (0 < *(int *)(param_1 + 0x50)) {
    do {
      if ((lVar7 < 0) || (*(int *)(param_1 + 0x50) <= iVar6)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      puVar1 = *(undefined8 **)(*(longlong *)(param_1 + 0x48) + lVar7 * 8);
      uVar5 = 0;
      if (puVar1 != (undefined8 *)0x0) {
        uVar5 = *puVar1;
      }
      FUN_140182710(uVar5);
      iVar6 = iVar6 + 1;
      lVar7 = lVar7 + 1;
    } while (iVar6 < *(int *)(param_1 + 0x50));
  }
  CloseHandle(*(HANDLE *)(param_1 + 0x180));
  FUN_14018ce90(param_1 + 0x168);
  FUN_140182800(param_1 + 0x158);
  FUN_1401ac760(param_1 + 0x150);
  if ((*(longlong *)(param_1 + 0x90) != 0) &&
     (*(longlong *)(*(longlong *)(param_1 + 0x90) + 8) =
           *(longlong *)(*(longlong *)(param_1 + 0x90) + 8) + -1,
     *(longlong *)(*(longlong *)(param_1 + 0x90) + 8) == 0)) {
    puVar1 = *(undefined8 **)(param_1 + 0x90);
    pvVar2 = (void *)*puVar1;
    if (pvVar2 != (void *)0x0) {
      FUN_140182790(pvVar2);
      operator_delete(pvVar2);
    }
    FUN_140156970(puVar1);
  }
  if ((*(longlong *)(param_1 + 0x88) != 0) &&
     (*(longlong *)(*(longlong *)(param_1 + 0x88) + 8) =
           *(longlong *)(*(longlong *)(param_1 + 0x88) + 8) + -1,
     *(longlong *)(*(longlong *)(param_1 + 0x88) + 8) == 0)) {
    puVar1 = *(undefined8 **)(param_1 + 0x88);
    pvVar2 = (void *)*puVar1;
    if (pvVar2 != (void *)0x0) {
      FUN_140182790(pvVar2);
      operator_delete(pvVar2);
    }
    FUN_140156970(puVar1);
  }
  *(undefined ***)(param_1 + 0x60) = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 0x78)) {
    FUN_14016d0f0(*(undefined8 *)(param_1 + 0x70),(longlong)*(int *)(param_1 + 0x78));
  }
  if (*(longlong *)(param_1 + 0x70) != 0) {
    plVar3 = *(longlong **)(param_1 + 0x68);
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar3 + 0x18))(plVar3,*(longlong *)(param_1 + 0x70));
    }
  }
  *(undefined ***)(param_1 + 0x38) = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 0x50)) {
    FUN_14016d0f0(*(undefined8 *)(param_1 + 0x48),(longlong)*(int *)(param_1 + 0x50));
  }
  if (*(longlong *)(param_1 + 0x48) != 0) {
    plVar3 = *(longlong **)(param_1 + 0x40);
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar3 + 0x18))(plVar3,*(longlong *)(param_1 + 0x48));
    }
  }
  FUN_140156c00(param_1);
  return;
}



undefined8 FUN_140191f80(longlong param_1,undefined8 param_2,longlong param_3)

{
  int *piVar1;
  uint uVar2;
  longlong lVar3;
  ulonglong uVar4;
  char cVar5;
  undefined8 uVar6;
  undefined *puVar7;
  longlong *plVar8;
  undefined8 *puVar9;
  undefined **ppuVar10;
  longlong lVar11;
  undefined *puVar12;
  undefined *local_res8;
  undefined *local_res20;
  undefined **local_60;
  undefined4 local_58;
  undefined2 local_54;
  undefined8 local_50;
  undefined1 local_48;
  
  uVar6 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
  local_50 = uVar6;
  FUN_140156b50(uVar6);
  local_48 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x148) + 200))();
  }
  FUN_14018aee0(*(longlong *)(param_1 + 0x148) + 0x760);
  local_res8 = (undefined *)FUN_140156940(0x780);
  puVar12 = (undefined *)0x0;
  puVar7 = puVar12;
  if (local_res8 != (undefined *)0x0) {
    local_60 = Proud::AddrPort::vftable;
    local_58 = *(undefined4 *)(param_3 + 8);
    local_54 = *(undefined2 *)(param_3 + 0xc);
    puVar7 = (undefined *)
             FUN_14019dbc0(local_res8,*(undefined8 *)(param_1 + 0x148),param_2,&local_60);
  }
  lVar3 = *(longlong *)(param_1 + 0x148);
  lVar11 = lVar3 + 0x1740;
  uVar2 = *(uint *)(lVar3 + 0x1768);
  uVar4 = ((ulonglong)puVar7 & 0xffffffff) % (ulonglong)uVar2;
  lVar3 = *(longlong *)(lVar3 + 0x1748);
  local_res8 = puVar7;
  if (lVar3 != 0) {
    for (plVar8 = *(longlong **)(lVar3 + uVar4 * 8);
        (plVar8 != (longlong *)0x0 && ((uint)uVar4 == *(uint *)(plVar8 + 4) % uVar2));
        plVar8 = (longlong *)plVar8[2]) {
      if ((undefined *)*plVar8 == puVar7) goto LAB_140192129;
    }
    if (lVar3 != 0) {
      for (plVar8 = *(longlong **)(lVar3 + uVar4 * 8);
          (plVar8 != (longlong *)0x0 && ((uint)uVar4 == *(uint *)(plVar8 + 4) % uVar2));
          plVar8 = (longlong *)plVar8[2]) {
        if ((undefined *)*plVar8 == puVar7) goto LAB_140192125;
      }
      if (lVar3 != 0) goto LAB_1401920fc;
    }
  }
  cVar5 = FUN_1401a8bb0(lVar11,(ulonglong)uVar2,CONCAT71((int7)((ulonglong)lVar3 >> 8),1));
  if (cVar5 == '\0') {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x8007000e);
  }
LAB_1401920fc:
  FUN_14015b3b0(lVar11);
  plVar8 = (longlong *)FUN_14015eee0(lVar11,&local_res8,uVar4,(ulonglong)puVar7 & 0xffffffff);
  FUN_14015b3b0(lVar11);
LAB_140192125:
  *(undefined1 *)(plVar8 + 1) = 0;
LAB_140192129:
  if (puVar7 != (undefined *)0x0) {
    puVar12 = puVar7 + 0x38;
  }
  FUN_140184cc0(*(undefined8 *)(*(longlong *)(puVar7 + 0x748) + 0x110),puVar12);
  FUN_1401a37c0(puVar7 + 0xc0);
  FUN_14018be40(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x788),
                *(undefined8 *)(*(longlong *)(puVar7 + 0x748) + 0x110),0xffffffffffffffff);
  lVar3 = *(longlong *)(param_1 + 0x148);
  uVar4 = (ulonglong)((uint)*(ushort *)(param_3 + 0xc) ^ *(uint *)(param_3 + 8)) %
          (ulonglong)*(uint *)(lVar3 + 0x1710);
  if (*(longlong *)(lVar3 + 0x16f0) != 0) {
    for (lVar11 = *(longlong *)(*(longlong *)(lVar3 + 0x16f0) + uVar4 * 8);
        (lVar11 != 0 && ((uint)uVar4 == *(uint *)(lVar11 + 0x28) % *(uint *)(lVar3 + 0x1710)));
        lVar11 = *(longlong *)(lVar11 + 0x18)) {
      if ((*(uint *)(lVar11 + 8) == *(uint *)(param_3 + 8)) &&
         (*(ushort *)(lVar11 + 0xc) == *(ushort *)(param_3 + 0xc))) goto LAB_1401921e8;
    }
  }
  puVar9 = (undefined8 *)FUN_140190ce0(lVar3 + 0x16e8,param_3);
  *puVar9 = puVar7;
LAB_1401921e8:
  if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x17f0) != 0) {
    FUN_1401568c0();
    local_res8 = PTR_DAT_1403200a0;
    plVar8 = (longlong *)FUN_140159580(param_3,&local_res20);
    puVar12 = (undefined *)*plVar8;
    if ((undefined *)*plVar8 == (undefined *)0x0) {
      puVar12 = PTR_DAT_1403200a0;
    }
    FUN_14004ce50(&local_res8,L"new TCP socket is accepted. RemoteClient_S=%p,TCP socket=%s",puVar7,
                  puVar12);
    if (((local_res20 != (undefined *)0x0) && (local_res20 != PTR_DAT_1403200a0)) &&
       (local_res20 + -8 != (undefined *)0x0)) {
      ppuVar10 = (undefined **)FUN_1401568c0();
      local_60 = ppuVar10;
      FUN_140156b50(ppuVar10);
      local_58 = CONCAT31(local_58._1_3_,1);
      piVar1 = (int *)(local_res20 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_res20 + -8);
      }
      FUN_140156be0(ppuVar10);
    }
    puVar12 = local_res8;
    puVar7 = local_res8;
    if (local_res8 == (undefined *)0x0) {
      puVar7 = PTR_DAT_1403200a0;
    }
    FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x17f0),0,puVar7);
    if (((puVar12 != (undefined *)0x0) && (puVar12 != PTR_DAT_1403200a0)) &&
       (puVar12 + -8 != (undefined *)0x0)) {
      ppuVar10 = (undefined **)FUN_1401568c0();
      local_60 = ppuVar10;
      FUN_140156b50(ppuVar10);
      local_58 = CONCAT31(local_58._1_3_,1);
      piVar1 = (int *)(puVar12 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar12 + -8);
      }
      FUN_140156be0(ppuVar10);
    }
  }
  FUN_140156be0(uVar6);
  return 1;
}



longlong FUN_140192330(longlong param_1)

{
  undefined *puVar1;
  int *piVar2;
  ulonglong *puVar3;
  undefined *puVar4;
  int iVar5;
  uint uVar6;
  uint uVar7;
  uint uVar8;
  longlong lVar9;
  undefined8 uVar10;
  uint *puVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  uint *puVar14;
  uint uVar15;
  uint uVar16;
  ulonglong uVar17;
  uint *local_res8;
  undefined *local_res10;
  undefined1 local_res18 [8];
  undefined1 local_res20 [8];
  undefined **local_b8;
  undefined8 local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined **local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 local_70;
  undefined8 local_68;
  undefined1 local_60;
  undefined8 local_58;
  undefined1 local_50;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  uVar17 = 0;
  do {
    lVar9 = *(longlong *)(param_1 + 0x148);
    uVar13 = lVar9 + 0x60;
    if (lVar9 == 0) {
      uVar13 = uVar17;
    }
    uVar12 = uVar17;
    if (*(longlong *)(lVar9 + 0x750) != 0) {
      uVar12 = *(ulonglong *)(*(longlong *)(lVar9 + 0x750) + 0x38);
    }
    lVar9 = FUN_140197dc0(uVar12,uVar13);
    if (lVar9 == 0) {
      FUN_1401568c0();
      local_res8 = (uint *)PTR_DAT_1403200a0;
      uVar6 = FUN_140156740(L"FATAL: Cannot create TCP socket for AcceptEx!");
      uVar8 = 0;
      if ((local_res8 != (uint *)0x0) && (uVar17 = 0, local_res8 != (uint *)PTR_DAT_1403200a0)) {
        uVar17 = (ulonglong)local_res8[-2];
      }
      uVar7 = uVar6;
      if ((((int)uVar6 <= (int)uVar17) && (uVar7 = uVar8, local_res8 != (uint *)0x0)) &&
         (local_res8 != (uint *)PTR_DAT_1403200a0)) {
        uVar7 = local_res8[-2];
      }
      uVar15 = 1;
      if (1 < (int)uVar7) {
        uVar15 = uVar7;
      }
      uVar7 = uVar8;
      if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
        uVar7 = local_res8[-2];
      }
      uVar16 = 0;
      if ((int)uVar7 < (int)uVar15) {
        if (local_res8 == (uint *)0x0) {
          local_res8 = (uint *)PTR_DAT_1403200a0;
        }
        if ((int)uVar15 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        if (uVar15 == 0) {
          FUN_14004f990(&local_res8);
        }
        else {
          uVar7 = uVar8;
          if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
            uVar7 = local_res8[-2];
          }
          if (uVar15 != uVar7) {
            puVar11 = (uint *)FUN_140156940((longlong)(int)uVar15 * 2 + 10);
            if (puVar11 != (uint *)0x0) {
              *puVar11 = 0;
              puVar11[1] = 1;
            }
            *puVar11 = uVar15;
            uVar7 = uVar16;
            if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
              uVar7 = local_res8[-2];
            }
            puVar14 = (uint *)PTR_DAT_1403200a0;
            if ((int)uVar15 < (int)uVar7) {
LAB_1401925d7:
              if (local_res8 != (uint *)0x0) {
                puVar14 = local_res8;
              }
            }
            else {
              uVar15 = uVar8;
              if (local_res8 != (uint *)0x0) {
                if (local_res8 != (uint *)PTR_DAT_1403200a0) {
                  uVar15 = local_res8[-2];
                }
                goto LAB_1401925d7;
              }
            }
            FUN_140156770(puVar11 + 2,puVar14,uVar15);
            FUN_14004f990(&local_res8);
            local_res8 = puVar11 + 2;
          }
        }
      }
      FUN_14004f670(&local_res8);
      puVar11 = local_res8;
      if (local_res8 == (uint *)0x0) {
        puVar11 = (uint *)PTR_DAT_1403200a0;
      }
      FUN_140156770(puVar11,L"FATAL: Cannot create TCP socket for AcceptEx!",uVar6);
      puVar11 = local_res8;
      if (local_res8 == (uint *)0x0) {
        puVar11 = (uint *)PTR_DAT_1403200a0;
      }
      uVar8 = FUN_140156740(puVar11);
      uVar6 = 0;
      if (0 < (int)uVar8) {
        uVar6 = uVar8;
      }
      uVar8 = uVar16;
      if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
        uVar8 = local_res8[-2];
      }
      if (((int)uVar8 <= (int)uVar6) && (uVar6 = uVar16, local_res8 != (uint *)0x0)) {
        if (local_res8 == (uint *)PTR_DAT_1403200a0) goto LAB_14019268b;
        uVar6 = local_res8[-2];
      }
      if (((local_res8 != (uint *)PTR_DAT_1403200a0) && (local_res8 != (uint *)0x0)) &&
         (local_res8 + -2 != (uint *)0x0)) {
        local_res8[-2] = uVar6;
        *(undefined2 *)((longlong)local_res8 + (longlong)(int)uVar6 * 2) = 0;
      }
LAB_14019268b:
      local_b0 = 0;
      local_a8 = 0;
      local_a0 = 0;
      local_98 = 0;
      local_b8 = Proud::ByteArray::vftable;
      uVar10 = FUN_140181f50(local_res20,1,1,&local_res8,&local_b8);
      (**(code **)(**(longlong **)(param_1 + 0x148) + 0x80))(*(longlong **)(param_1 + 0x148),uVar10)
      ;
      FUN_1401858d0(&local_b8);
      puVar11 = local_res8;
      if (local_res8 == (uint *)0x0) {
        return 0;
      }
      if (local_res8 == (uint *)PTR_DAT_1403200a0) {
        return 0;
      }
      puVar14 = local_res8 + -2;
      if (puVar14 == (uint *)0x0) {
        return 0;
      }
      uVar10 = FUN_1401568c0();
      local_68 = uVar10;
      FUN_140156b50(uVar10);
      local_60 = 1;
      puVar11 = puVar11 + -1;
      *puVar11 = *puVar11 - 1;
      if (*puVar11 == 0) {
        FUN_140156970(puVar14);
      }
      FUN_140156be0(uVar10);
      return 0;
    }
    puVar3 = *(ulonglong **)(*(longlong *)(param_1 + 0x148) + 0x748);
    uVar13 = uVar17;
    if (puVar3 != (ulonglong *)0x0) {
      uVar13 = *puVar3;
    }
    iVar5 = FUN_140186c10(uVar13,lVar9);
    if (iVar5 == 0) {
      return lVar9;
    }
    if (iVar5 != 0x2746) {
      if (iVar5 != 0x2736) {
        FUN_1401568c0();
        local_res10 = PTR_DAT_1403200a0;
        FUN_14004ce50(&local_res10,
                      L"FATAL: AcceptEx failed with error code %d! No more accept will be possible."
                      ,iVar5);
        local_88 = 0;
        local_80 = 0;
        local_78 = 0;
        local_70 = 0;
        local_90 = Proud::ByteArray::vftable;
        uVar10 = FUN_140181f50(local_res18,1,1,&local_res10,&local_90);
        (**(code **)(**(longlong **)(param_1 + 0x148) + 0x80))
                  (*(longlong **)(param_1 + 0x148),uVar10);
        FUN_1401858d0(&local_90);
        puVar4 = local_res10;
        if (((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) &&
           (puVar1 = local_res10 + -8, puVar1 != (undefined *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_58 = uVar10;
          FUN_140156b50(uVar10);
          local_50 = 1;
          piVar2 = (int *)(puVar4 + -4);
          *piVar2 = *piVar2 + -1;
          if (*piVar2 == 0) {
            FUN_140156970(puVar1);
          }
          FUN_140156be0(uVar10);
        }
      }
LAB_1401924c3:
      FUN_1401859b0(lVar9);
      FUN_140156970(lVar9);
      return 0;
    }
    if (*(char *)(param_1 + 0x140) != '\0') goto LAB_1401924c3;
    FUN_1401859b0(lVar9);
    FUN_140156970(lVar9);
  } while( true );
}



void FUN_140192740(longlong param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  undefined *local_res8;
  undefined8 in_stack_ffffffffffffff68;
  undefined4 uVar6;
  undefined8 local_70;
  undefined1 local_68;
  undefined8 local_60;
  undefined1 local_58;
  undefined **local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_30;
  
  uVar6 = (undefined4)((ulonglong)in_stack_ffffffffffffff68 >> 0x20);
  if (*(longlong *)(param_1 + 0x148) != 0) {
    uVar4 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
    local_60 = uVar4;
    FUN_140156b50(uVar4);
    local_58 = 1;
    if (DAT_1403288ef != '\0') {
      (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                (*(longlong **)(param_1 + 0x148),
                 L"Proud::CNetThreads_S::ShowThreadExceptionAndPurgeClient");
    }
    if (param_2 == 0) {
      if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
        FUN_1401568c0();
        local_res8 = PTR_DAT_1403200a0;
        FUN_14004ce50(&local_res8,&DAT_140266b50,param_3,param_4);
        local_48 = 0;
        local_40 = 0;
        local_38 = 0;
        local_30 = 0;
        local_50 = Proud::ByteArray::vftable;
        uVar5 = FUN_140181f50(&local_70,1,0,&local_res8,&local_50);
        (**(code **)(**(longlong **)(param_1 + 0x148) + 0x80))
                  (*(longlong **)(param_1 + 0x148),uVar5);
        FUN_1401858d0(&local_50);
        puVar3 = local_res8;
        if (((local_res8 != (undefined *)0x0) && (local_res8 != PTR_DAT_1403200a0)) &&
           (puVar1 = local_res8 + -8, puVar1 != (undefined *)0x0)) {
          uVar5 = FUN_1401568c0();
          local_70 = uVar5;
          FUN_140156b50(uVar5);
          local_68 = 1;
          piVar2 = (int *)(puVar3 + -4);
          *piVar2 = *piVar2 + -1;
          if (*piVar2 == 0) {
            FUN_140156970(puVar1);
          }
          FUN_140156be0(uVar5);
        }
      }
    }
    else {
      if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
        FUN_1401568c0();
        local_res8 = PTR_DAT_1403200a0;
        FUN_14004ce50(&local_res8,&DAT_140266b90,param_3,param_4,
                      CONCAT44(uVar6,*(undefined4 *)(param_2 + 0x6f8)));
        local_48 = 0;
        local_40 = 0;
        local_38 = 0;
        local_30 = 0;
        local_50 = Proud::ByteArray::vftable;
        uVar5 = FUN_140181f50(&local_70,1,*(undefined4 *)(param_2 + 0x6f8),&local_res8,&local_50);
        (**(code **)(**(longlong **)(param_1 + 0x148) + 0x80))
                  (*(longlong **)(param_1 + 0x148),uVar5);
        FUN_1401858d0(&local_50);
        puVar3 = local_res8;
        if (((local_res8 != (undefined *)0x0) && (local_res8 != PTR_DAT_1403200a0)) &&
           (puVar1 = local_res8 + -8, puVar1 != (undefined *)0x0)) {
          uVar5 = FUN_1401568c0();
          local_70 = uVar5;
          FUN_140156b50(uVar5);
          local_68 = 1;
          piVar2 = (int *)(puVar3 + -4);
          *piVar2 = *piVar2 + -1;
          if (*piVar2 == 0) {
            FUN_140156970(puVar1);
          }
          FUN_140156be0(uVar5);
        }
      }
      local_48 = 0;
      local_40 = 0;
      local_38 = 0;
      local_30 = 0;
      local_50 = Proud::ByteArray::vftable;
      FUN_14017f200(*(undefined8 *)(param_1 + 0x148),param_2,1,3,&local_50,
                    L"Proud::CNetThreads_S::ShowThreadExceptionAndPurgeClient",0);
      FUN_1401858d0(&local_50);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140192a10(longlong param_1,undefined8 param_2,undefined1 *param_3)

{
  char cVar1;
  ulonglong uVar2;
  longlong lVar3;
  longlong lVar4;
  undefined8 uVar5;
  undefined1 auStack_e68 [32];
  ulonglong local_e48;
  undefined1 local_e40;
  undefined1 *local_e38;
  undefined1 local_e30;
  undefined **local_e28;
  undefined8 local_e20;
  longlong local_e18;
  undefined8 local_e10;
  undefined8 local_e08;
  undefined **local_e00;
  undefined8 local_df8;
  longlong local_df0;
  undefined8 local_de8;
  undefined8 local_de0;
  undefined **local_dd8;
  undefined8 local_dd0;
  longlong local_dc8;
  undefined8 local_dc0;
  undefined8 local_db8;
  longlong local_db0;
  undefined1 local_da8;
  undefined **local_da0;
  undefined8 local_d98;
  longlong local_d90;
  undefined8 local_d88;
  undefined8 local_d80;
  undefined1 local_d78 [8];
  undefined1 local_d70 [8];
  longlong local_d68;
  undefined4 local_d60;
  int local_d5c;
  undefined8 local_d20;
  undefined1 local_d18 [80];
  undefined1 local_cc8 [3216];
  ulonglong local_38;
  
  local_d20 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_e68;
  local_e38 = param_3;
  local_db0 = param_1;
  FUN_1401c5a30(param_3 + 0xc0);
  lVar4 = 0;
  local_df8 = 0;
  local_df0 = 0;
  local_de8 = 0;
  local_de0 = 0;
  local_e00 = Proud::ByteArray::vftable;
  cVar1 = FUN_140154a70(param_2,&local_e48);
  uVar2 = local_e48;
  if (((cVar1 != '\0') && (-1 < (int)local_e48)) && ((int)local_e48 <= DAT_140320d70)) {
    FUN_140050060(&local_e00,local_e48 & 0xffffffff);
    lVar3 = local_df0;
    if ((int)local_de8 == 0) {
      lVar3 = lVar4;
    }
    cVar1 = FUN_1401543d0(param_2,lVar3,uVar2 & 0xffffffff);
    if (cVar1 != '\0') {
      local_dd0 = 0;
      local_dc8 = 0;
      local_dc0 = 0;
      local_db8 = 0;
      local_dd8 = Proud::ByteArray::vftable;
      cVar1 = FUN_140154a70(param_2,&local_e48);
      uVar2 = local_e48;
      if (((cVar1 != '\0') && (-1 < (int)local_e48)) && ((int)local_e48 <= DAT_140320d70)) {
        FUN_140050060(&local_dd8,local_e48 & 0xffffffff);
        lVar3 = local_dc8;
        if ((int)local_dc0 == 0) {
          lVar3 = lVar4;
        }
        cVar1 = FUN_1401543d0(param_2,lVar3,uVar2 & 0xffffffff);
        if (cVar1 != '\0') {
          local_d98 = 0;
          local_d90 = 0;
          local_d88 = 0;
          local_d80 = 0;
          local_da0 = Proud::ByteArray::vftable;
          FUN_1401aa730(&local_e48,&local_da0,&local_e00,*(longlong *)(param_1 + 0x148) + 0xc48);
          if ((local_e48 == 0) || (*(longlong *)(local_e48 + 0x38) == 0)) {
            FUN_14013c530(&local_e48);
            uVar2 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
            local_e48 = uVar2;
            FUN_140156b50(uVar2);
            local_e40 = 1;
            if (DAT_1403288ef != '\0') {
              (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                        (*(longlong **)(param_1 + 0x148),
                         L"Proud::CNetThreads_S::NetworkerThread_ProcessMessage_NotifyCSEncryptedSessionKey"
                        );
            }
            lVar3 = lVar4;
            if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x1708) != 0) {
              lVar3 = *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x16f8);
            }
            for (; lVar3 != 0; lVar3 = *(longlong *)(lVar3 + 0x18)) {
              if (param_3 == *(undefined1 **)(lVar3 + 0x10)) {
                lVar3 = local_d90;
                if ((int)local_d88 == 0) {
                  lVar3 = lVar4;
                }
                FUN_140198270(param_3 + 0x288,lVar3,
                              *(uint *)(*(longlong *)(param_1 + 0x148) + 0x244) >> 3,0x10);
                local_e20 = 0;
                local_e18 = 0;
                local_e10 = 0;
                local_e08 = 0;
                local_e28 = Proud::ByteArray::vftable;
                cVar1 = FUN_140199ce0(&local_dd8,&local_e28,param_3 + 0x288);
                if (cVar1 == '\0') {
                  FUN_140156300(local_d18,L"Decrypt Fast EncryptKey Error");
                    // WARNING: Subroutine does not return
                  _CxxThrowException(local_d18,(ThrowInfo *)&DAT_14031d928);
                }
                lVar3 = local_e18;
                if ((int)local_e10 == 0) {
                  lVar3 = lVar4;
                }
                FUN_1401a9a60(param_3 + 0x658,lVar3,
                              *(uint *)(*(longlong *)(param_1 + 0x148) + 0x248) >> 3);
                FUN_1401858d0(&local_e28);
                param_3[0x688] = 1;
                FUN_140156be0(uVar2);
                local_e40 = 0;
                FUN_1401544a0(local_d78);
                FUN_140153d90(local_d78);
                FUN_140154600(local_d78,0x800);
                FUN_140154600(local_d78,0);
                FUN_14004fd90(local_d78,6);
                lVar4 = (**(code **)(*(longlong *)(param_3 + 0x108) + 0x10))();
                local_db0 = lVar4;
                FUN_140156b50(lVar4);
                local_da8 = 1;
                uVar5 = FUN_1401570d0(local_cc8,local_d78);
                local_e38 = (undefined1 *)0x0;
                local_e30 = 1;
                FUN_1401a3610(*(undefined8 *)(param_3 + 0x748),uVar5,&local_e38);
                FUN_140156dc0(local_cc8);
                FUN_140156be0(lVar4);
                local_e38 = local_d70;
                FUN_1401560e0(local_d70);
                if (local_d68 != 0) {
                  if (local_d5c < 0) {
                    // WARNING: Subroutine does not return
                    FUN_1401566b0();
                  }
                  local_d60 = 0;
                }
                FUN_1401858d0(&local_da0);
                FUN_1401858d0(&local_dd8);
                goto LAB_140192ee3;
              }
            }
            FUN_140156be0(uVar2);
            FUN_1401858d0(&local_da0);
            FUN_1401858d0(&local_dd8);
          }
          else {
            FUN_14013c530(&local_e48);
            FUN_1401858d0(&local_da0);
            FUN_1401858d0(&local_dd8);
          }
          goto LAB_140192ee3;
        }
      }
      FUN_1401858d0(&local_dd8);
    }
  }
LAB_140192ee3:
  FUN_1401858d0(&local_e00);
  return;
}



void FUN_140192f20(longlong param_1,undefined8 param_2,undefined8 param_3,char param_4)

{
  undefined *puVar1;
  int *piVar2;
  longlong *plVar3;
  undefined8 uVar4;
  undefined *puVar5;
  undefined *local_res8;
  undefined *local_78;
  undefined *local_70;
  undefined1 local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined1 local_50;
  undefined **local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  
  local_60 = 0xfffffffffffffffe;
  if ((*(longlong *)(param_1 + 0x148) != 0) &&
     (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0)) {
    FUN_1401568c0();
    local_78 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_78,L"(%s): unexpected thread exit with (%s)",param_2,param_3);
    uVar4 = 0;
    local_40 = 0;
    local_38 = 0;
    local_30 = 0;
    local_28 = 0;
    local_48 = Proud::ByteArray::vftable;
    FUN_140181f50(&local_res8,1,1,&local_78,&local_48);
    FUN_1401858d0(&local_48);
    local_70 = (undefined *)0x0;
    FUN_14016dca0(&local_70,&local_res8);
    (**(code **)(**(longlong **)(param_1 + 0x148) + 0x38))
              (*(longlong **)(param_1 + 0x148),&local_70);
    if (param_4 != '\0') {
      if (local_res8 != (undefined *)0x0) {
        uVar4 = *(undefined8 *)(local_res8 + 0x38);
      }
      plVar3 = (longlong *)FUN_140182070(uVar4,&local_70);
      puVar5 = (undefined *)*plVar3;
      if ((undefined *)*plVar3 == (undefined *)0x0) {
        puVar5 = PTR_DAT_1403200a0;
      }
      FUN_1401580e0(puVar5);
      puVar5 = local_70;
      if (((local_70 != (undefined *)0x0) && (local_70 != PTR_DAT_1403200a0)) &&
         (puVar1 = local_70 + -8, puVar1 != (undefined *)0x0)) {
        uVar4 = FUN_1401568c0();
        local_58 = uVar4;
        FUN_140156b50(uVar4);
        local_50 = 1;
        piVar2 = (int *)(puVar5 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(puVar1);
        }
        FUN_140156be0(uVar4);
      }
    }
    puVar5 = local_res8;
    if (local_res8 != (undefined *)0x0) {
      local_70 = local_res8;
      FUN_140156b50(local_res8);
      local_68 = 1;
      *(longlong *)(local_res8 + 0x40) = *(longlong *)(local_res8 + 0x40) + -1;
      if (*(longlong *)(local_res8 + 0x40) == 0) {
        FUN_140156be0(puVar5);
        local_68 = 0;
        FUN_14013c4c0(local_res8);
      }
      else {
        FUN_140156be0(puVar5);
      }
    }
    puVar5 = local_78;
    if (((local_78 != (undefined *)0x0) && (local_78 != PTR_DAT_1403200a0)) &&
       (puVar1 = local_78 + -8, puVar1 != (undefined *)0x0)) {
      uVar4 = FUN_1401568c0();
      local_58 = uVar4;
      FUN_140156b50(uVar4);
      local_50 = 1;
      piVar2 = (int *)(puVar5 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar4);
    }
  }
  return;
}



void FUN_140193130(longlong param_1,longlong param_2,undefined8 param_3)

{
  longlong *plVar1;
  char cVar2;
  int iVar3;
  undefined4 uVar4;
  longlong lVar5;
  undefined4 *puVar6;
  undefined4 *puVar7;
  undefined4 *puVar8;
  int iVar9;
  undefined4 *local_res20;
  undefined4 *local_198;
  undefined1 local_190;
  undefined8 local_120;
  undefined1 local_118 [4];
  undefined4 local_114;
  undefined8 local_e0;
  undefined1 local_70 [72];
  
  local_120 = 0xfffffffffffffffe;
  if ((int)(*(int *)(param_2 + 8) + (*(int *)(param_2 + 8) >> 0x1f & 7U)) >> 3 != 0) {
    FUN_14017c710(*(undefined8 *)(param_1 + 0x148),0,
                  "Proud::CNetThreads_S::UserWorkerThread_FinalReceiveUserMessage",2);
  }
  if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
    FUN_140157c90(local_118);
    local_114 = *(undefined4 *)(param_2 + 0x30);
    local_118[0] = *(undefined1 *)(param_2 + 0x48);
    local_e0 = param_3;
    cVar2 = FUN_140154a70(param_2 + 8,&local_res20);
    if (cVar2 != '\0') {
      lVar5 = *(longlong *)(param_2 + 0x10);
      if (lVar5 == 0) {
        if (*(longlong *)(param_2 + 0x18) == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        iVar9 = *(int *)(param_2 + 0x20);
      }
      else {
        iVar9 = *(int *)(lVar5 + 0x18);
      }
      iVar3 = (int)(*(int *)(param_2 + 8) + (*(int *)(param_2 + 8) >> 0x1f & 7U)) >> 3;
      if ((int)local_res20 == iVar9 - iVar3) {
        if (*(longlong *)(param_2 + 0x18) == 0) {
          if (lVar5 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0();
          }
          if (*(int *)(lVar5 + 0x18) == 0) {
            lVar5 = 0;
          }
          else {
            lVar5 = *(longlong *)(lVar5 + 0x10);
          }
        }
        else {
          lVar5 = *(longlong *)(param_2 + 0x18);
          if (lVar5 == 0) {
            FUN_140156300(local_70,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
            _CxxThrowException(local_70,(ThrowInfo *)&DAT_14031d928);
          }
        }
        plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x148) + 0x758);
        (**(code **)(*plVar1 + 0x30))
                  (plVar1,*(undefined4 *)(param_2 + 0x30),local_118,lVar5 + iVar3,(int)local_res20);
        goto LAB_1401933f7;
      }
    }
    local_res20 = (undefined4 *)FUN_140156940(0x60);
    if (local_res20 == (undefined4 *)0x0) {
      lVar5 = 0;
    }
    else {
      lVar5 = FUN_140181eb0(local_res20);
    }
    puVar8 = (undefined4 *)0x0;
    if (lVar5 == 0) {
      local_res20 = (undefined4 *)0x0;
      puVar6 = puVar8;
    }
    else {
      puVar6 = (undefined4 *)FUN_140156940(0x48);
      local_198 = puVar6;
      if (puVar6 != (undefined4 *)0x0) {
        local_res20 = puVar6;
        uVar4 = FUN_14015a430();
        FUN_140156a70(puVar6,uVar4,1);
      }
      local_res20 = puVar6;
      FUN_140156b50(puVar6);
      *(undefined8 *)(puVar6 + 0x10) = 1;
      *(longlong *)(puVar6 + 0xe) = lVar5;
      FUN_140156be0(puVar6);
    }
    puVar7 = puVar8;
    if (puVar6 != (undefined4 *)0x0) {
      puVar7 = *(undefined4 **)(puVar6 + 0xe);
    }
    *puVar7 = 0x1f;
    if (puVar6 != (undefined4 *)0x0) {
      puVar8 = *(undefined4 **)(puVar6 + 0xe);
    }
    FUN_14004ce80(puVar8 + 4,L"Invalid payload size in User Message!");
    local_198 = (undefined4 *)0x0;
    FUN_14016dca0(&local_198,&local_res20);
    (**(code **)(**(longlong **)(param_1 + 0x148) + 0x80))
              (*(longlong **)(param_1 + 0x148),&local_198);
    if (puVar6 != (undefined4 *)0x0) {
      local_190 = 0;
      local_198 = puVar6;
      FUN_140156b50(puVar6);
      local_190 = 1;
      plVar1 = (longlong *)(puVar6 + 0x10);
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_140156be0(puVar6);
        local_190 = 0;
        FUN_14013c4c0(puVar6);
      }
      else {
        FUN_140156be0(puVar6);
      }
    }
  }
LAB_1401933f7:
  FUN_1401ab750(param_1 + 0x160,*(undefined4 *)(param_2 + 0x30),0);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140193420(longlong param_1)

{
  ulonglong *puVar1;
  longlong lVar2;
  undefined *puVar3;
  char cVar4;
  int iVar5;
  int iVar6;
  int *piVar7;
  undefined8 uVar8;
  int iVar9;
  int iVar10;
  ulonglong uVar11;
  int *piVar12;
  undefined *puVar13;
  ulonglong uVar14;
  int iVar15;
  ulonglong uVar16;
  undefined1 auStack_2a8 [32];
  undefined ***local_288;
  undefined1 local_278 [8];
  int *local_270;
  longlong local_268;
  longlong local_260;
  undefined **local_258;
  undefined4 local_250;
  undefined2 local_24c;
  undefined *local_238 [2];
  undefined **local_228;
  undefined4 local_220;
  undefined2 local_21c;
  undefined8 local_218;
  undefined1 local_210;
  undefined **local_208;
  undefined4 local_200;
  undefined2 local_1fc;
  undefined **local_1f8;
  undefined8 local_1f0;
  undefined8 local_1e8;
  undefined8 local_1e0;
  undefined8 local_1d8;
  undefined8 local_1d0;
  undefined1 local_1c8;
  undefined8 local_1c0;
  undefined8 local_1b8;
  undefined4 local_1b0;
  undefined8 local_1a8;
  undefined4 local_1a0;
  undefined **local_198;
  undefined4 local_190;
  undefined2 local_18c;
  undefined1 local_158 [8];
  undefined8 local_150;
  ulonglong local_38;
  
  local_150 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_2a8;
  local_260 = param_1;
  FUN_1401ae8b0(local_278);
  uVar16 = 0;
  local_268 = 0;
  uVar14 = 1;
  do {
    while( true ) {
      while( true ) {
        if (*(char *)(param_1 + 0x140) != '\0') {
          if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x17f0) != 0) {
            FUN_1401568c0();
            local_238[0] = PTR_DAT_1403200a0;
            FUN_14004ce50(local_238,&DAT_140266f10,L"Proud::CNetThreads_S::TcpListenerProc");
            puVar3 = local_238[0];
            puVar13 = local_238[0];
            if (local_238[0] == (undefined *)0x0) {
              puVar13 = PTR_DAT_1403200a0;
            }
            FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x17f0),0,puVar13);
            if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_1403200a0)) &&
               (puVar3 + -8 != (undefined *)0x0)) {
              uVar8 = FUN_1401568c0();
              local_1c8 = 0;
              local_1d0 = uVar8;
              FUN_140156b50(uVar8);
              local_1c8 = 1;
              piVar7 = (int *)(puVar3 + -4);
              *piVar7 = *piVar7 + -1;
              if (*piVar7 == 0) {
                FUN_140156970(puVar3 + -8);
              }
              FUN_140156be0(uVar8);
            }
          }
          lVar2 = local_268;
          if (local_268 != 0) {
            FUN_1401859b0(local_268);
            FUN_140156970(lVar2);
          }
          FUN_1401ae8e0(local_278);
          return;
        }
        iVar15 = 0;
        if (((local_268 == 0) && ((char)uVar14 != '\0')) &&
           (local_268 = FUN_140192330(param_1), local_268 == 0)) {
          uVar14 = uVar16;
        }
        lVar2 = local_268;
        local_198 = Proud::AddrPort::vftable;
        local_1c0 = 0;
        local_1a8 = 0;
        local_1b8 = 0;
        local_1b0 = 5;
        local_1a0 = 0;
        local_190 = DAT_140320450;
        local_18c = DAT_140320454;
        cVar4 = FUN_14018b2f0(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x790),&local_1c0,
                              DAT_140320c98);
        if (cVar4 == '\x01') break;
        puVar1 = *(ulonglong **)(*(longlong *)(param_1 + 0x148) + 0x748);
        uVar11 = uVar16;
        if (puVar1 != (ulonglong *)0x0) {
          uVar11 = *puVar1;
        }
        FUN_140185860(uVar11);
      }
      if (lVar2 == 0) break;
      local_208 = Proud::AddrPort::vftable;
      local_200 = 0;
      local_1fc = 0;
      local_258 = Proud::AddrPort::vftable;
      local_250 = 0;
      local_24c = 0;
      puVar1 = *(ulonglong **)(*(longlong *)(param_1 + 0x148) + 0x748);
      uVar11 = uVar16;
      if (puVar1 != (ulonglong *)0x0) {
        uVar11 = *puVar1;
      }
      FUN_1401856b0(lVar2,uVar11,&local_208,&local_258);
      cVar4 = FUN_1401588c0(&local_258);
      if (cVar4 == '\0') {
LAB_1401935e2:
        FUN_1401859b0(lVar2);
        FUN_140156970(lVar2);
      }
      else {
        local_228 = Proud::AddrPort::vftable;
        local_220 = local_250;
        local_21c = local_24c;
        cVar4 = FUN_140191f80(param_1,lVar2,&local_228);
        if (cVar4 == '\0') goto LAB_1401935e2;
      }
      local_268 = 0;
    }
    FUN_1401568c0();
    local_270 = (int *)PTR_DAT_1403200a0;
    iVar5 = FUN_140156740(L"acceptex getqueued but socket null");
    iVar6 = iVar15;
    if ((local_270 != (int *)0x0) && (local_270 != (int *)PTR_DAT_1403200a0)) {
      iVar6 = local_270[-2];
    }
    iVar9 = 0;
    iVar10 = iVar5;
    if (((iVar5 <= iVar6) && (iVar10 = iVar9, local_270 != (int *)0x0)) &&
       (local_270 != (int *)PTR_DAT_1403200a0)) {
      iVar10 = local_270[-2];
    }
    iVar6 = 1;
    if (1 < iVar10) {
      iVar6 = iVar10;
    }
    uVar11 = uVar16;
    if ((local_270 != (int *)0x0) && (uVar11 = 0, local_270 != (int *)PTR_DAT_1403200a0)) {
      uVar11 = (ulonglong)(uint)local_270[-2];
    }
    if ((int)uVar11 < iVar6) {
      if (local_270 == (int *)0x0) {
        local_270 = (int *)PTR_DAT_1403200a0;
      }
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (iVar6 == 0) {
        FUN_14004f990(&local_270);
      }
      else {
        iVar10 = iVar9;
        if ((local_270 != (int *)0x0) && (local_270 != (int *)PTR_DAT_1403200a0)) {
          iVar10 = local_270[-2];
        }
        if (iVar6 != iVar10) {
          piVar7 = (int *)FUN_140156940((longlong)iVar6 * 2 + 10);
          if (piVar7 != (int *)0x0) {
            *piVar7 = 0;
            piVar7[1] = 1;
          }
          *piVar7 = iVar6;
          iVar10 = iVar9;
          if ((local_270 != (int *)0x0) && (local_270 != (int *)PTR_DAT_1403200a0)) {
            iVar10 = local_270[-2];
          }
          piVar12 = (int *)PTR_DAT_1403200a0;
          if (iVar6 < iVar10) {
LAB_140193707:
            if (local_270 != (int *)0x0) {
              piVar12 = local_270;
            }
          }
          else {
            iVar6 = iVar15;
            if (local_270 != (int *)0x0) {
              if (local_270 != (int *)PTR_DAT_1403200a0) {
                iVar6 = local_270[-2];
              }
              goto LAB_140193707;
            }
          }
          FUN_140156770(piVar7 + 2,piVar12,iVar6);
          FUN_14004f990(&local_270);
          local_270 = piVar7 + 2;
        }
      }
    }
    FUN_14004f670(&local_270);
    piVar7 = local_270;
    if (local_270 == (int *)0x0) {
      piVar7 = (int *)PTR_DAT_1403200a0;
    }
    FUN_140156770(piVar7,L"acceptex getqueued but socket null",iVar5);
    piVar7 = local_270;
    if (local_270 == (int *)0x0) {
      piVar7 = (int *)PTR_DAT_1403200a0;
    }
    iVar6 = FUN_140156740(piVar7);
    iVar15 = 0;
    if (0 < iVar6) {
      iVar15 = iVar6;
    }
    iVar6 = iVar9;
    if ((local_270 != (int *)0x0) && (local_270 != (int *)PTR_DAT_1403200a0)) {
      iVar6 = local_270[-2];
    }
    if ((iVar15 < iVar6) || (iVar15 = iVar9, local_270 == (int *)0x0)) {
LAB_1401937aa:
      if (((local_270 != (int *)PTR_DAT_1403200a0) && (local_270 != (int *)0x0)) &&
         (local_270 + -2 != (int *)0x0)) {
        local_270[-2] = iVar15;
        *(undefined2 *)((longlong)local_270 + (longlong)iVar15 * 2) = 0;
      }
    }
    else if (local_270 != (int *)PTR_DAT_1403200a0) {
      iVar15 = local_270[-2];
      goto LAB_1401937aa;
    }
    local_1f0 = 0;
    local_1e8 = 0;
    local_1e0 = 0;
    local_1d8 = 0;
    local_1f8 = Proud::ByteArray::vftable;
    local_288 = &local_1f8;
    uVar8 = FUN_140181f50(local_158,1,0,&local_270);
    (**(code **)(**(longlong **)(param_1 + 0x148) + 0x80))(*(longlong **)(param_1 + 0x148),uVar8);
    FUN_1401858d0(&local_1f8);
    piVar7 = local_270;
    if (((local_270 != (int *)0x0) && (local_270 != (int *)PTR_DAT_1403200a0)) &&
       (piVar12 = local_270 + -2, piVar12 != (int *)0x0)) {
      uVar8 = FUN_1401568c0();
      local_210 = 0;
      local_218 = uVar8;
      FUN_140156b50(uVar8);
      local_210 = 1;
      piVar7 = piVar7 + -1;
      *piVar7 = *piVar7 + -1;
      if (*piVar7 == 0) {
        FUN_140156970(piVar12);
      }
      FUN_140156be0(uVar8);
      local_210 = 0;
    }
    local_270 = (int *)PTR_DAT_1403200a0;
  } while( true );
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401939f0(longlong param_1)

{
  int *piVar1;
  longlong *plVar2;
  undefined *puVar3;
  char cVar4;
  undefined8 uVar5;
  undefined *puVar6;
  bool bVar7;
  undefined1 auStack_1d8 [32];
  undefined1 local_1b8;
  undefined1 local_1b7 [7];
  undefined8 local_1b0;
  undefined *local_1a8;
  undefined8 local_1a0;
  undefined1 local_198;
  undefined8 local_190;
  undefined1 local_188;
  undefined8 local_180;
  undefined1 local_178 [312];
  int *local_40;
  ulonglong local_28;
  
  local_180 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_1d8;
  FUN_1401ae8b0(&local_1b8);
  if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
    (**(code **)(**(longlong **)(*(longlong *)(param_1 + 0x148) + 0x758) + 0x58))();
  }
  uVar5 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
  FUN_1401ab470(local_178,uVar5);
  cVar4 = *(char *)(param_1 + 0x140);
  while (cVar4 == '\0') {
    local_1b0 = 0;
    uVar5 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
    local_1a0 = uVar5;
    FUN_140156b50(uVar5);
    local_198 = 1;
    if (DAT_1403288ef != '\0') {
      (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                (*(longlong **)(param_1 + 0x148),L"Proud::CNetThreads_S::UserWorkerThread_Main");
    }
    cVar4 = FUN_1401ab660(param_1 + 0x160,local_40,&local_1b0);
    FUN_140156be0(uVar5);
    local_198 = 0;
    if (cVar4 == '\x01') {
      if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
        plVar2 = *(longlong **)(*(longlong *)(param_1 + 0x148) + 0x758);
        (**(code **)(*plVar2 + 0x78))(plVar2,local_1b7);
      }
      piVar1 = local_40;
      if (*local_40 == 1) {
        FUN_14018d6a0(param_1,local_40,local_1b0);
      }
      else if (*local_40 == 2) {
        FUN_140193130(param_1,local_40,local_1b0);
      }
      else {
        FUN_140176e90(*(undefined8 *)(param_1 + 0x148),local_40 + 0x14);
        FUN_1401ab750(param_1 + 0x160,piVar1[0xc],0);
      }
      if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
        plVar2 = *(longlong **)(*(longlong *)(param_1 + 0x148) + 0x758);
        (**(code **)(*plVar2 + 0x80))(plVar2,local_1b7);
      }
    }
    if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
      LOCK();
      bVar7 = *(int *)(param_1 + 0x240) == 0;
      if (bVar7) {
        *(int *)(param_1 + 0x240) = 1;
      }
      UNLOCK();
      if (bVar7) {
        LOCK();
        bVar7 = *(int *)(param_1 + 0x200) == 1;
        if (bVar7) {
          *(int *)(param_1 + 0x200) = 0;
        }
        UNLOCK();
        if (bVar7) {
          cVar4 = '\x01';
          plVar2 = *(longlong **)(*(longlong *)(param_1 + 0x148) + 0x758);
          (**(code **)(*plVar2 + 0x88))
                    (plVar2,*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x260));
        }
        LOCK();
        *(undefined4 *)(param_1 + 0x240) = 0;
        UNLOCK();
      }
    }
    if (cVar4 == '\0') {
      FUN_1401ab5d0(param_1 + 0x160);
    }
    cVar4 = *(char *)(param_1 + 0x140);
  }
  if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x758) != 0) {
    (**(code **)(**(longlong **)(*(longlong *)(param_1 + 0x148) + 0x758) + 0x60))();
  }
  if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x17f0) != 0) {
    FUN_1401568c0();
    local_1a8 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_1a8,&DAT_140266f10,L"Proud::CNetThreads_S::UserWorkerThread_Main");
    puVar3 = local_1a8;
    puVar6 = local_1a8;
    if (local_1a8 == (undefined *)0x0) {
      puVar6 = PTR_DAT_1403200a0;
    }
    FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x17f0),0,puVar6);
    if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_1403200a0)) &&
       (puVar3 + -8 != (undefined *)0x0)) {
      uVar5 = FUN_1401568c0();
      local_190 = uVar5;
      FUN_140156b50(uVar5);
      local_188 = 1;
      piVar1 = (int *)(puVar3 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar3 + -8);
      }
      FUN_140156be0(uVar5);
    }
  }
  FUN_1401ab4b0(local_178);
  FUN_1401ae8e0(&local_1b8);
  return;
}



void FUN_140193d30(undefined8 param_1)

{
  DWORD DVar1;
  
  DVar1 = GetCurrentThreadId();
  FUN_1401ac7d0(DVar1,"PNSrv TcpListener");
  FUN_140193420(param_1);
  return;
}



void FUN_140193d60(undefined8 param_1)

{
  DWORD DVar1;
  
  DVar1 = GetCurrentThreadId();
  FUN_1401ac7d0(DVar1,"PNSrv UserWorker");
  FUN_1401939f0(param_1);
  return;
}



void FUN_140193d90(longlong param_1,longlong param_2,longlong param_3,undefined8 param_4,
                  char param_5)

{
  undefined8 uVar1;
  undefined4 local_170 [2];
  undefined1 local_168 [8];
  undefined1 local_160 [8];
  longlong local_158;
  int local_14c;
  undefined1 local_140 [232];
  undefined1 local_58 [80];
  
  if ((param_2 != 0) && (param_5 == '\x01')) {
    *(int *)(param_2 + 0x1dc) = *(int *)(param_2 + 0x1dc) + 1;
  }
  if (*(longlong *)(param_3 + 8) == 0) {
    FUN_140156300(local_58,PTR_u_exception_due_to_not_using_Inter_140320010);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  FUN_1401544d0(local_168,param_3,param_3,param_4,0xfffffffffffffffe);
  FUN_140174a70(local_140);
  local_170[0] = (undefined4)param_4;
  uVar1 = FUN_140177bf0(param_2 + 0x268,local_170,*(undefined8 *)(param_2 + 0x278),0);
  if (*(undefined8 **)(param_2 + 0x278) == (undefined8 *)0x0) {
    *(undefined8 *)(param_2 + 0x270) = uVar1;
  }
  else {
    **(undefined8 **)(param_2 + 0x278) = uVar1;
  }
  *(undefined8 *)(param_2 + 0x278) = uVar1;
  FUN_140174b20(local_140);
  FUN_1401560e0(local_160);
  if ((local_158 != 0) && (local_14c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 == 0) {
    param_2 = 0;
  }
  else {
    param_2 = param_2 + 8;
  }
  FUN_1401ab5e0(param_1 + 0x160,param_2);
  return;
}



void FUN_140193ec0(longlong param_1,int *param_2,byte param_3,longlong param_4,undefined1 param_5)

{
  int iVar1;
  longlong lVar2;
  byte bVar3;
  int iVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  undefined1 local_68 [8];
  undefined1 local_60 [8];
  longlong local_58;
  int local_4c;
  int local_40;
  undefined **local_38;
  int local_30;
  undefined2 local_2c;
  byte local_28;
  
  iVar1 = *param_2;
  FUN_1401c5a30(param_4 + 0xc0);
  uVar5 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
  FUN_140156b50(uVar5);
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
              (*(longlong **)(param_1 + 0x148),
               L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_Rmi");
  }
  plVar6 = (longlong *)(*(longlong *)(param_1 + 0x148) + 0x480);
  bVar3 = (**(code **)(*plVar6 + 0x10))(plVar6,param_2,*(undefined8 *)(param_4 + 0x30));
  if ((param_3 | bVar3) == 0) {
    FUN_1401540a0(param_2,(int)((iVar1 >> 0x1f & 7U) + iVar1) >> 3);
    FUN_1401544a0(local_68);
    local_38 = Proud::AddrPort::vftable;
    local_40 = 0;
    local_30 = DAT_140320450;
    local_2c = DAT_140320454;
    local_28 = param_3 | bVar3;
    FUN_140153d90(local_68);
    if (*(longlong *)(param_2 + 2) == 0) {
      if (*(longlong *)(param_2 + 4) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      iVar1 = param_2[6];
    }
    else {
      iVar1 = *(int *)(*(longlong *)(param_2 + 2) + 0x18);
    }
    iVar4 = (int)(*param_2 + (*param_2 >> 0x1f & 7U)) >> 3;
    lVar7 = *(longlong *)(param_2 + 4);
    if (lVar7 == 0) {
      lVar2 = *(longlong *)(param_2 + 2);
      if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(int *)(lVar2 + 0x18) != 0) {
        lVar7 = *(longlong *)(lVar2 + 0x10);
      }
    }
    FUN_140154a40(local_68,iVar4 + lVar7,iVar1 - iVar4);
    local_28 = (byte)param_2[0x10];
    local_30 = param_2[0xe];
    local_2c = (undefined2)param_2[0xf];
    local_40 = param_2[10];
    FUN_140193d90(param_1,param_4,local_68,1,param_5);
    FUN_1401560e0(local_60);
    if ((local_58 != 0) && (local_4c < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  FUN_140156be0(uVar5);
  return;
}



void FUN_1401940e0(longlong param_1,int *param_2,undefined8 param_3,longlong param_4,
                  undefined1 param_5)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  undefined8 uVar4;
  longlong lVar5;
  undefined1 local_58 [8];
  undefined1 local_50 [8];
  longlong local_48;
  int local_3c;
  int local_30;
  undefined **local_28;
  int local_20;
  undefined2 local_1c;
  undefined1 local_18;
  
  FUN_1401544a0(local_58);
  local_28 = Proud::AddrPort::vftable;
  local_18 = 0;
  local_30 = 0;
  local_20 = DAT_140320450;
  local_1c = DAT_140320454;
  FUN_140153d90(local_58);
  if (*(longlong *)(param_2 + 2) == 0) {
    if (*(longlong *)(param_2 + 4) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = param_2[6];
  }
  else {
    iVar1 = *(int *)(*(longlong *)(param_2 + 2) + 0x18);
  }
  iVar3 = (int)(*param_2 + (*param_2 >> 0x1f & 7U)) >> 3;
  lVar5 = *(longlong *)(param_2 + 4);
  if (lVar5 == 0) {
    lVar2 = *(longlong *)(param_2 + 2);
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(int *)(lVar2 + 0x18) != 0) {
      lVar5 = *(longlong *)(lVar2 + 0x10);
    }
  }
  FUN_140154a40(local_58,iVar3 + lVar5,iVar1 - iVar3);
  local_18 = (undefined1)param_2[0x10];
  local_20 = param_2[0xe];
  local_1c = (undefined2)param_2[0xf];
  local_30 = param_2[10];
  FUN_1401c5a30(param_4 + 0xc0);
  uVar4 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
  FUN_140156b50(uVar4);
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
              (*(longlong **)(param_1 + 0x148),
               L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_UserMessage");
  }
  FUN_140193d90(param_1,param_4,local_58,2,param_5);
  FUN_140156be0(uVar4);
  FUN_1401560e0(local_50);
  if ((local_48 != 0) && (local_3c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



undefined8 FUN_1401942b0(longlong param_1,int *param_2,undefined8 param_3,longlong param_4)

{
  char cVar1;
  undefined1 uVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int *piVar6;
  undefined8 uVar7;
  undefined **ppuVar8;
  longlong lVar9;
  int *piVar10;
  ulonglong local_res10 [2];
  longlong local_res20;
  int *local_c8;
  int local_c0;
  uint local_bc;
  undefined **local_b8;
  int local_b0 [2];
  longlong local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  int local_90;
  undefined **local_88;
  int local_80;
  undefined2 local_7c;
  undefined1 local_78;
  undefined **local_68;
  int local_60;
  undefined2 local_5c;
  undefined **local_58;
  int local_50;
  undefined2 local_4c;
  undefined **local_48;
  int local_40;
  undefined2 local_3c;
  undefined **local_38;
  int local_30;
  undefined2 local_2c;
  undefined8 local_28;
  
  local_28 = 0xfffffffffffffffe;
  local_c0 = (int)(*param_2 + (*param_2 >> 0x1f & 7U)) >> 3;
  local_res20 = param_4;
  cVar1 = FUN_140154c00(param_2,&local_bc);
  if (cVar1 == '\0') goto switchD_140194337_caseD_3;
  local_res10[0] = local_res10[0] & 0xffffffffffffff00;
  switch(local_bc) {
  case 1:
    FUN_140193ec0(param_1,param_2,0,param_3,local_res20 != 0);
  default:
switchD_140194337_caseD_3:
    FUN_1401540a0(param_2,local_c0);
    return 0;
  case 2:
    FUN_1401940e0(param_1,param_2,0,param_3,local_res20 != 0);
    goto switchD_140194337_caseD_3;
  case 5:
    FUN_140192a10(param_1,param_2,param_3);
    break;
  case 7:
    FUN_140191070(param_1,param_2,param_3);
    break;
  case 0xc:
    local_58 = Proud::AddrPort::vftable;
    local_50 = param_2[0xe];
    local_4c = (undefined2)param_2[0xf];
    cVar1 = FUN_1401588c0(&local_58);
    if (cVar1 == '\0') {
      FUN_14017c710(*(undefined8 *)(param_1 + 0x148),param_3,
                    "receivedInfo.GetRemoteAddr().IsUnicastEndpoint()",2);
    }
    local_48 = Proud::AddrPort::vftable;
    local_40 = param_2[0xe];
    local_3c = (undefined2)param_2[0xf];
    FUN_14018e9a0(param_1,param_2,&local_48);
    break;
  case 0xe:
    FUN_14018e040(param_1,param_2,param_3);
    break;
  case 0x10:
    local_38 = Proud::AddrPort::vftable;
    local_30 = param_2[0xe];
    local_2c = (undefined2)param_2[0xf];
    cVar1 = FUN_1401588c0(&local_38);
    if (cVar1 == '\0') {
      FUN_14017c710(*(undefined8 *)(param_1 + 0x148),param_3,
                    "receivedInfo.GetRemoteAddr().IsUnicastEndpoint()",2);
    }
    local_68 = Proud::AddrPort::vftable;
    local_60 = param_2[0xe];
    local_5c = (undefined2)param_2[0xf];
    FUN_14018ed40(param_1,param_2,&local_68);
    break;
  case 0x12:
    FUN_14018e4c0(param_1,param_2,param_3);
    break;
  case 0x14:
    FUN_14018f130(param_1,param_2,param_3);
    break;
  case 0x15:
    FUN_14018f990(param_1,param_2,param_3);
    break;
  case 0x16:
    FUN_140190100(param_1,param_2,param_3);
    break;
  case 0x1a:
    FUN_1401904d0(param_1,param_2,param_3);
    break;
  case 0x1b:
    FUN_14018caa0(param_1,param_2,param_3);
    break;
  case 0x24:
  case 0x25:
    FUN_1401544a0(&local_b8);
    local_88 = Proud::AddrPort::vftable;
    local_78 = 0;
    local_90 = 0;
    local_80 = DAT_140320450;
    local_7c = DAT_140320454;
    cVar1 = FUN_140189e50(*(undefined8 *)(param_1 + 0x148),local_bc,param_2);
    if (cVar1 != '\0') {
      local_78 = (undefined1)param_2[0x10];
      local_80 = param_2[0xe];
      local_7c = (undefined2)param_2[0xf];
      local_90 = param_2[10];
      uVar2 = FUN_1401942b0(param_1,&local_b8,param_3);
      local_res10[0] = CONCAT71(local_res10[0]._1_7_,uVar2);
    }
    local_c8 = local_b0;
    FUN_1401560e0(local_b0);
    if ((local_a8 != 0) && (local_a0._4_4_ < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    goto LAB_140194645;
  case 0x26:
    FUN_1401544a0(&local_b8);
    local_88 = Proud::AddrPort::vftable;
    local_78 = 0;
    local_90 = 0;
    local_80 = DAT_140320450;
    local_7c = DAT_140320454;
    cVar1 = FUN_140188280(*(undefined8 *)(param_1 + 0x148),param_2,&local_b8);
    if (cVar1 != '\0') {
      local_78 = (undefined1)param_2[0x10];
      local_80 = param_2[0xe];
      local_7c = (undefined2)param_2[0xf];
      local_90 = param_2[10];
      uVar2 = FUN_1401942b0(param_1,&local_b8,param_3);
      local_res10[0] = CONCAT71(local_res10[0]._1_7_,uVar2);
    }
    local_c8 = local_b0;
    FUN_1401560e0(local_b0);
    if ((local_a8 != 0) && (local_a0._4_4_ < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
LAB_140194645:
    if ((char)local_res10[0] != '\x01') {
      if ((char)local_res10[0] != '\0') {
        return 1;
      }
      goto switchD_140194337_caseD_3;
    }
    break;
  case 0x27:
    FUN_1401909a0(param_1,param_2,param_3);
    break;
  case 0x28:
    FUN_14018cb30(param_1,param_2,param_3);
  }
  if (*(longlong *)(param_2 + 2) == 0) {
    if (*(longlong *)(param_2 + 4) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar5 = param_2[6];
  }
  else {
    iVar5 = *(int *)(*(longlong *)(param_2 + 2) + 0x18);
  }
  if (iVar5 == (int)(*param_2 + (*param_2 >> 0x1f & 7U)) >> 3) {
    return 1;
  }
  if (local_bc == 0x24) {
    return 1;
  }
  if (local_bc == 0x25) {
    return 1;
  }
  FUN_1401568c0();
  local_c8 = (int *)PTR_DAT_1403200a0;
  local_c0 = FUN_140156740(L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_ProudNetLayer");
  iVar5 = 0;
  if ((local_c8 != (int *)0x0) && (iVar5 = 0, local_c8 != (int *)PTR_DAT_1403200a0)) {
    iVar5 = local_c8[-2];
  }
  iVar4 = local_c0;
  if (((local_c0 <= iVar5) && (iVar4 = 0, local_c8 != (int *)0x0)) &&
     (local_c8 != (int *)PTR_DAT_1403200a0)) {
    iVar4 = local_c8[-2];
  }
  iVar5 = 1;
  if (1 < iVar4) {
    iVar5 = iVar4;
  }
  iVar3 = 0;
  iVar4 = iVar3;
  if ((local_c8 != (int *)0x0) && (local_c8 != (int *)PTR_DAT_1403200a0)) {
    iVar4 = local_c8[-2];
  }
  if (iVar4 < iVar5) {
    if (local_c8 == (int *)0x0) {
      local_c8 = (int *)PTR_DAT_1403200a0;
    }
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (iVar5 == 0) {
      FUN_14004f990(&local_c8);
    }
    else {
      if ((local_c8 != (int *)0x0) && (local_c8 != (int *)PTR_DAT_1403200a0)) {
        iVar3 = local_c8[-2];
      }
      if (iVar5 != iVar3) {
        piVar6 = (int *)FUN_140156940((longlong)iVar5 * 2 + 10);
        iVar3 = 0;
        iVar4 = 0;
        if (piVar6 != (int *)0x0) {
          *piVar6 = 0;
          piVar6[1] = 1;
        }
        *piVar6 = iVar5;
        if ((local_c8 != (int *)0x0) && (local_c8 != (int *)PTR_DAT_1403200a0)) {
          iVar4 = local_c8[-2];
        }
        piVar10 = (int *)PTR_DAT_1403200a0;
        if (iVar5 < iVar4) {
LAB_1401947c2:
          iVar3 = iVar5;
          if (local_c8 != (int *)0x0) {
            piVar10 = local_c8;
          }
        }
        else if (local_c8 != (int *)0x0) {
          iVar5 = iVar3;
          if (local_c8 != (int *)PTR_DAT_1403200a0) {
            iVar5 = local_c8[-2];
          }
          goto LAB_1401947c2;
        }
        FUN_140156770(piVar6 + 2,piVar10,iVar3);
        FUN_14004f990(&local_c8);
        local_c8 = piVar6 + 2;
      }
    }
  }
  FUN_14004f670(&local_c8);
  piVar6 = local_c8;
  if (local_c8 == (int *)0x0) {
    piVar6 = (int *)PTR_DAT_1403200a0;
  }
  FUN_140156770(piVar6,L"Proud::CNetThreads_S::NetWorkerThread_ProcessMessage_ProudNetLayer",
                local_c0);
  piVar6 = local_c8;
  if (local_c8 == (int *)0x0) {
    piVar6 = (int *)PTR_DAT_1403200a0;
  }
  iVar4 = FUN_140156740(piVar6);
  iVar5 = 0;
  if (0 < iVar4) {
    iVar5 = iVar4;
  }
  iVar4 = 0;
  if ((local_c8 != (int *)0x0) && (iVar4 = 0, local_c8 != (int *)PTR_DAT_1403200a0)) {
    iVar4 = local_c8[-2];
  }
  if ((iVar4 <= iVar5) && (iVar5 = 0, local_c8 != (int *)0x0)) {
    if (local_c8 == (int *)PTR_DAT_1403200a0) goto LAB_140194877;
    iVar5 = local_c8[-2];
  }
  if (((local_c8 != (int *)PTR_DAT_1403200a0) && (local_c8 != (int *)0x0)) &&
     (local_c8 + -2 != (int *)0x0)) {
    local_c8[-2] = iVar5;
    *(undefined2 *)((longlong)local_c8 + (longlong)iVar5 * 2) = 0;
  }
LAB_140194877:
  iVar5 = FUN_140154030(param_2);
  local_res10[0] = FUN_140154060(param_2);
  local_b8 = Proud::CFastArray<>::vftable;
  local_b0[0] = 0;
  local_b0[1] = 0;
  local_a8 = 0;
  local_a0 = 0;
  local_98 = 0;
  if (-1 < iVar5) {
    FUN_140050060(&local_b8,iVar5);
    lVar9 = local_a8;
    if ((int)local_a0 == 0) {
      lVar9 = 0;
    }
    FUN_140050120(lVar9,local_res10[0],(longlong)iVar5);
    local_b8 = Proud::ByteArray::vftable;
    uVar7 = FUN_140181f50(local_res10,0x1f,param_2[10],&local_c8,&local_b8);
    (**(code **)(**(longlong **)(param_1 + 0x148) + 0x80))(*(longlong **)(param_1 + 0x148),uVar7);
    FUN_1401858d0(&local_b8);
    piVar6 = local_c8;
    if (((local_c8 != (int *)0x0) && (local_c8 != (int *)PTR_DAT_1403200a0)) &&
       (piVar10 = local_c8 + -2, piVar10 != (int *)0x0)) {
      ppuVar8 = (undefined **)FUN_1401568c0();
      local_68 = ppuVar8;
      FUN_140156b50(ppuVar8);
      local_60 = CONCAT31(local_60._1_3_,1);
      piVar6 = piVar6 + -1;
      *piVar6 = *piVar6 + -1;
      if (*piVar6 == 0) {
        FUN_140156970(piVar10);
      }
      FUN_140156be0(ppuVar8);
    }
    return 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_140194a10(longlong param_1,undefined8 param_2,longlong param_3,undefined8 param_4)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  
  iVar3 = 0;
  while( true ) {
    if (iVar3 == *(int *)(param_3 + 0x18)) {
      return;
    }
    if ((iVar3 < 0) || (*(int *)(param_3 + 0x18) <= iVar3)) break;
    lVar2 = *(longlong *)(param_3 + 0x10);
    iVar1 = *(int *)(lVar2 + (longlong)iVar3 * 0x48);
    if ((int)(iVar1 + (iVar1 >> 0x1f & 7U)) >> 3 != 0) {
      FUN_14017c710(*(undefined8 *)(param_1 + 0x148),param_2,
                    "ri.m_unsafeMessage.GetReadOffset() == 0",2);
    }
    FUN_1401942b0(param_1,lVar2 + (longlong)iVar3 * 0x48,param_2,param_4);
    if (*(int *)(param_3 + 0x18) <= iVar3) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    iVar3 = iVar3 + 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566e0();
}



void FUN_140194ac0(longlong param_1,longlong param_2,longlong param_3,longlong param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined4 uVar3;
  int iVar4;
  undefined8 uVar5;
  longlong lVar6;
  undefined8 uVar7;
  ulonglong uVar8;
  int iVar9;
  ulonglong uVar10;
  undefined *puVar11;
  undefined8 uVar12;
  undefined4 local_170 [2];
  undefined *local_168;
  longlong local_160;
  undefined **local_158;
  undefined4 local_150;
  undefined2 local_14c;
  undefined **local_148;
  undefined4 local_140;
  undefined2 local_13c;
  undefined **local_138;
  undefined4 local_130;
  undefined2 local_12c;
  undefined **local_128;
  undefined4 local_120;
  undefined2 local_11c;
  undefined1 local_118 [8];
  undefined **local_110;
  undefined4 local_108;
  undefined2 local_104;
  undefined **local_100;
  undefined4 local_f8;
  undefined2 local_f4;
  undefined **local_f0;
  undefined4 local_e8;
  undefined2 local_e4;
  longlong local_e0;
  undefined1 local_d8;
  undefined8 local_d0;
  undefined1 local_c8;
  undefined8 local_c0;
  undefined1 local_b8;
  ulonglong local_b0;
  undefined4 local_a8;
  longlong local_a0;
  undefined4 local_98;
  undefined4 local_94;
  undefined8 local_88;
  undefined1 local_80;
  longlong local_78;
  undefined1 local_70;
  longlong local_68;
  undefined1 local_60;
  undefined8 local_58;
  
  local_58 = 0xfffffffffffffffe;
  uVar10 = 0;
  uVar8 = param_3 + 0x40;
  if (param_3 == 0) {
    uVar8 = uVar10;
  }
  FUN_1401a37e0(local_118,uVar8);
  if (*(int *)(param_2 + 8) < 1) {
    lVar6 = param_3 + 0xa8;
    local_68 = lVar6;
    FUN_140156b50(lVar6);
    local_60 = 1;
    *(undefined1 *)(param_3 + 0x140) = 0;
    FUN_1401a3ac0(param_3);
    FUN_140156be0(lVar6);
    goto LAB_1401950cd;
  }
  local_158 = Proud::AddrPort::vftable;
  local_150 = 0;
  local_14c = 0;
  local_160 = 0;
  local_148 = Proud::AddrPort::vftable;
  local_140 = 0;
  local_13c = 0;
  FUN_1401568c0();
  local_168 = PTR_DAT_1403200a0;
  uVar5 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
  local_c0 = uVar5;
  FUN_140156b50(uVar5);
  local_b8 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
              (*(longlong **)(param_1 + 0x148),
               L"Proud::CNetThreads_S::NetWorkerThread_UdpRecvCompletionCase");
  }
  uVar12 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
  local_f0 = Proud::AddrPort::vftable;
  local_e8 = *(undefined4 *)(param_2 + 0x30);
  local_e4 = *(undefined2 *)(param_2 + 0x34);
  lVar6 = FUN_14015dc50(*(undefined8 *)(param_1 + 0x148),&local_f0);
  local_100 = Proud::AddrPort::vftable;
  local_f8 = *(undefined4 *)(param_2 + 0x30);
  local_f4 = *(undefined2 *)(param_2 + 0x34);
  local_170[0] = FUN_14015e600(*(undefined8 *)(param_1 + 0x148),&local_100);
  uVar3 = *(undefined4 *)(*(longlong *)(param_1 + 0x148) + 0x22c);
  if (lVar6 != 0) {
    FUN_1401a37c0(lVar6 + 0xc0);
    local_140 = *(undefined4 *)(lVar6 + 0x710);
    local_13c = *(undefined2 *)(lVar6 + 0x714);
  }
  FUN_140156be0(uVar5);
  local_b8 = 0;
  local_e0 = param_3 + 0xa8;
  FUN_140156b50(local_e0);
  local_d8 = 1;
  local_128 = Proud::AddrPort::vftable;
  local_120 = *(undefined4 *)(param_2 + 0x30);
  local_11c = *(undefined2 *)(param_2 + 0x34);
  uVar8 = uVar10;
  if (*(ulonglong **)(param_3 + 0x150) != (ulonglong *)0x0) {
    uVar8 = **(ulonglong **)(param_3 + 0x150);
  }
  uVar5 = *(undefined8 *)(param_3 + 0x178);
  uVar7 = FUN_140185840(uVar8);
  iVar4 = FUN_1401a18b0(uVar5,uVar7,*(undefined4 *)(param_2 + 8),&local_128,local_170[0],uVar12,
                        &local_160,&local_168);
  FUN_140156be0(param_3 + 0xa8);
  local_d8 = 0;
  if (iVar4 == 0) {
    if (lVar6 != 0) {
      *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x600) =
           *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x600) + 1;
      *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x640) =
           *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x640) +
           (longlong)*(int *)(local_160 + 0x40);
      uVar5 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
      *(undefined8 *)(lVar6 + 0x198) = uVar5;
      uVar5 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
      *(undefined8 *)(lVar6 + 0x1b8) = uVar5;
      FUN_140190d90(param_4,0);
      if (*(int *)(local_160 + 0x40) != 0) {
        uVar10 = *(ulonglong *)(local_160 + 0x38);
      }
      FUN_14019cfe0(lVar6,uVar10,*(int *)(local_160 + 0x40),&local_148,uVar3,param_4);
      FUN_140194a10(param_1,lVar6,param_4,param_3);
      goto LAB_140194fdc;
    }
    FUN_140190d90(param_4,0);
    FUN_1401a7ac0(&local_b0);
    local_b0 = uVar10;
    if (*(int *)(local_160 + 0x40) != 0) {
      local_b0 = *(ulonglong *)(local_160 + 0x38);
    }
    local_a8 = *(undefined4 *)(local_160 + 0x40);
    local_98 = 0;
    local_a0 = param_4;
    local_94 = uVar3;
    iVar4 = FUN_1401a84e0(&local_b0,local_170);
    if (-1 < iVar4) {
      iVar4 = *(int *)(param_4 + 0x18);
      while (iVar9 = (int)uVar10, iVar9 != iVar4) {
        if ((iVar9 < 0) || (iVar4 <= iVar9)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        lVar6 = *(longlong *)(param_4 + 0x10) + (longlong)iVar9 * 0x48;
        FUN_1401540a0(lVar6,0);
        local_138 = Proud::AddrPort::vftable;
        local_130 = local_150;
        local_12c = local_14c;
        FUN_140190fa0(param_1,&local_138,lVar6,param_3);
        iVar4 = *(int *)(param_4 + 0x18);
        if (iVar4 <= iVar9) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        uVar10 = (ulonglong)(iVar9 + 1);
      }
    }
  }
  else {
    if (iVar4 == 2) {
      uVar5 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
      local_d0 = uVar5;
      FUN_140156b50(uVar5);
      local_c8 = 1;
      if (DAT_1403288ef != '\0') {
        (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                  (*(longlong **)(param_1 + 0x148),
                   L"Proud::CNetThreads_S::NetWorkerThread_UdpRecvCompletionCase");
      }
      puVar11 = local_168;
      if (local_168 == (undefined *)0x0) {
        puVar11 = PTR_DAT_1403200a0;
      }
      local_110 = Proud::AddrPort::vftable;
      local_108 = *(undefined4 *)(param_2 + 0x30);
      local_104 = *(undefined2 *)(param_2 + 0x34);
      FUN_14016fe70(*(undefined8 *)(param_1 + 0x148),&local_110,puVar11);
      FUN_140156be0(uVar5);
      local_c8 = 0;
    }
LAB_140194fdc:
    if (lVar6 != 0) {
      FUN_1401a37d0(lVar6 + 0xc0);
    }
  }
  lVar6 = param_3 + 0xa8;
  local_78 = lVar6;
  FUN_140156b50(lVar6);
  local_70 = 1;
  *(undefined1 *)(param_3 + 0x140) = 0;
  FUN_1401a3ac0(param_3);
  FUN_140156be0(lVar6);
  puVar11 = local_168;
  if (((local_168 != (undefined *)0x0) && (local_168 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_168 + -8, puVar1 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    local_88 = uVar5;
    FUN_140156b50(uVar5);
    local_80 = 1;
    piVar2 = (int *)(puVar11 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar5);
  }
  local_168 = PTR_DAT_1403200a0;
  if (local_160 != 0) {
    FUN_14018d9e0();
  }
LAB_1401950cd:
  FUN_1401a37f0(local_118);
  return;
}



void FUN_140195100(longlong param_1,longlong param_2,longlong param_3,undefined8 param_4)

{
  int *piVar1;
  bool bVar2;
  int iVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  longlong *plVar6;
  undefined8 uVar7;
  undefined8 *puVar8;
  longlong lVar9;
  undefined *puVar10;
  undefined *puVar11;
  undefined *local_res10;
  undefined1 local_res18 [16];
  undefined ***pppuVar12;
  undefined8 in_stack_fffffffffffffec0;
  undefined4 uVar13;
  undefined *local_118;
  undefined **local_110;
  undefined8 local_108;
  undefined8 local_100;
  undefined8 local_f8;
  undefined8 local_f0;
  undefined **local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined **local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined1 local_90;
  undefined8 local_88;
  undefined1 local_80;
  undefined8 local_78;
  undefined1 local_70;
  undefined8 local_68;
  undefined1 local_60;
  undefined8 local_58;
  undefined1 local_50;
  undefined8 local_48;
  
  uVar13 = (undefined4)((ulonglong)in_stack_fffffffffffffec0 >> 0x20);
  local_48 = 0xfffffffffffffffe;
  if (param_3 == 0) {
    lVar9 = 0;
  }
  else {
    lVar9 = param_3 + 0xc0;
  }
  FUN_1401a37e0(local_res18,lVar9);
  uVar4 = (**(code **)(*(longlong *)(param_3 + 0x108) + 0x10))();
  FUN_140156b50(uVar4);
  iVar3 = *(int *)(param_2 + 8);
  if (iVar3 < 1) {
    *(undefined1 *)(*(longlong *)(param_3 + 0x748) + 0x40) = 0;
    FUN_140156be0(uVar4);
    uVar5 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
    local_88 = uVar5;
    FUN_140156b50(uVar5);
    local_80 = 1;
    if (DAT_1403288ef != '\0') {
      (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                (*(longlong **)(param_1 + 0x148),
                 L"Proud::CNetThreads_S::NetWorkerThread_TcpRecvCompletionCase");
    }
    local_108 = 0;
    local_100 = 0;
    local_f8 = 0;
    local_f0 = 0;
    local_110 = Proud::ByteArray::vftable;
    pppuVar12 = &local_110;
    FUN_14017f200(*(undefined8 *)(param_1 + 0x148),param_3,0xb,3,pppuVar12,
                  L"Proud::CNetThreads_S::NetWorkerThread_TcpRecvCompletionCase",
                  *(undefined4 *)(param_2 + 0xc));
    uVar13 = (undefined4)((ulonglong)pppuVar12 >> 0x20);
    FUN_1401858d0(&local_110);
    (**(code **)(*(longlong *)(param_3 + 0xa0) + 0x40))
              ((longlong *)(param_3 + 0xa0),
               L"Proud::CNetThreads_S::NetWorkerThread_TcpRecvCompletionCase");
    if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x17f0) != 0) {
      FUN_1401568c0();
      local_res10 = PTR_DAT_1403200a0;
      puVar8 = (undefined8 *)(*(longlong *)(param_3 + 0x748) + 0x128);
      plVar6 = (longlong *)(**(code **)*puVar8)(puVar8,&local_118);
      puVar11 = (undefined *)*plVar6;
      if ((undefined *)*plVar6 == (undefined *)0x0) {
        puVar11 = PTR_DAT_1403200a0;
      }
      FUN_14004ce50(&local_res10,&DAT_140267410,*(undefined4 *)(param_3 + 0x6f8),puVar11,
                    CONCAT44(uVar13,*(undefined4 *)(param_2 + 0xc)));
      if (((local_118 != (undefined *)0x0) && (local_118 != PTR_DAT_1403200a0)) &&
         (local_118 + -8 != (undefined *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_68 = uVar7;
        FUN_140156b50(uVar7);
        local_60 = 1;
        piVar1 = (int *)(local_118 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_118 + -8);
        }
        FUN_140156be0(uVar7);
      }
      puVar11 = local_res10;
      puVar10 = local_res10;
      if (local_res10 == (undefined *)0x0) {
        puVar10 = PTR_DAT_1403200a0;
      }
      FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x17f0),0,puVar10);
      if (((puVar11 != (undefined *)0x0) && (puVar11 != PTR_DAT_1403200a0)) &&
         (puVar11 + -8 != (undefined *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_98 = uVar7;
        FUN_140156b50(uVar7);
        local_90 = 1;
        piVar1 = (int *)(puVar11 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar11 + -8);
        }
        FUN_140156be0(uVar7);
      }
    }
LAB_1401955e4:
    bVar2 = false;
    FUN_140156be0(uVar5);
  }
  else {
    uVar5 = FUN_140185840(*(undefined8 *)(*(longlong *)(param_3 + 0x748) + 0x110));
    FUN_1401aea00(*(longlong *)(param_3 + 0x748) + 200,uVar5,iVar3);
    FUN_140190d90(param_4,0);
    iVar3 = FUN_14019cf70(param_3,param_4);
    if (iVar3 != 0) {
      *(undefined1 *)(*(longlong *)(param_3 + 0x748) + 0x40) = 0;
      FUN_140156be0(uVar4);
      uVar4 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
      local_78 = uVar4;
      FUN_140156b50(uVar4);
      local_70 = 1;
      if (DAT_1403288ef != '\0') {
        (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                  (*(longlong **)(param_1 + 0x148),
                   L"Proud::CNetThreads_S::NetWorkerThread_TcpRecvCompletionCase");
      }
      local_b8 = 0;
      local_b0 = 0;
      local_a8 = 0;
      local_a0 = 0;
      local_c0 = Proud::ByteArray::vftable;
      FUN_14017f200(*(undefined8 *)(param_1 + 0x148),param_3,iVar3,3,&local_c0,
                    L"Proud::CNetThreads_S::NetWorkerThread_TcpRecvCompletionCase",0);
      FUN_1401858d0(&local_c0);
      FUN_140156be0(uVar4);
      goto LAB_1401955fb;
    }
    FUN_140156be0(uVar4);
    uVar5 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
    *(undefined8 *)(param_3 + 0x180) = uVar5;
    *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x500) =
         *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x500) + 1;
    *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x540) =
         *(longlong *)(*(longlong *)(param_1 + 0x148) + 0x540) + (longlong)*(int *)(param_2 + 8);
    FUN_140194a10(param_1,param_3,param_4,0);
    bVar2 = true;
    FUN_140156b50(uVar4);
    *(undefined1 *)(*(longlong *)(param_3 + 0x748) + 0x40) = 0;
    iVar3 = FUN_1401a3280(*(undefined8 *)(param_3 + 0x748));
    if (iVar3 != 0) {
      FUN_140156be0(uVar4);
      uVar5 = (**(code **)(**(longlong **)(param_1 + 0x148) + 0x58))();
      local_58 = uVar5;
      FUN_140156b50(uVar5);
      local_50 = 1;
      if (DAT_1403288ef != '\0') {
        (**(code **)(**(longlong **)(param_1 + 0x148) + 200))
                  (*(longlong **)(param_1 + 0x148),
                   L"Proud::CNetThreads_S::NetWorkerThread_TcpRecvCompletionCase");
      }
      local_e0 = 0;
      local_d8 = 0;
      local_d0 = 0;
      local_c8 = 0;
      local_e8 = Proud::ByteArray::vftable;
      (**(code **)(*(longlong *)(param_3 + 0xa0) + 0x38))
                (param_3 + 0xa0,0xb,3,&local_e8,
                 L"Proud::CNetThreads_S::NetWorkerThread_TcpRecvCompletionCase",
                 CONCAT44(uVar13,iVar3));
      FUN_1401858d0(&local_e8);
      (**(code **)(*(longlong *)(param_3 + 0xa0) + 0x40))
                (param_3 + 0xa0,L"Proud::CNetThreads_S::NetWorkerThread_TcpRecvCompletionCase");
      goto LAB_1401955e4;
    }
  }
  if (bVar2) {
    FUN_140156be0(uVar4);
  }
LAB_1401955fb:
  FUN_1401a37f0(local_res18);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140195630(longlong param_1,undefined8 *param_2,undefined8 param_3)

{
  int iVar1;
  undefined1 auStack_188 [32];
  longlong local_168;
  longlong local_160;
  undefined8 local_150;
  ulonglong local_28;
  
  local_150 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_188;
  local_168 = 0;
  local_160 = param_1;
  local_168 = FUN_1401ab5a0(*param_2);
  if (local_168 != 0) {
    iVar1 = *(int *)(param_2 + 2);
    if (iVar1 == 2) {
      FUN_140195100(param_1,param_2,local_168,param_3);
    }
    else if (iVar1 == 1) {
      FUN_14018dd20(param_1,param_2,local_168);
    }
    else if (((iVar1 == 0) && (*(int *)(param_2 + 3) == -1)) &&
            (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x788) != 0)) {
      FUN_140191490(param_1);
    }
  }
  return;
}



void FUN_140195700(longlong param_1)

{
  int *piVar1;
  double *pdVar2;
  undefined8 *puVar3;
  undefined *puVar4;
  char cVar5;
  HANDLE hThread;
  longlong lVar6;
  undefined8 uVar7;
  int iVar8;
  undefined4 *puVar10;
  ulonglong uVar11;
  undefined *puVar12;
  ulonglong uVar13;
  double dVar14;
  double dVar15;
  undefined1 local_res10 [8];
  undefined4 *local_res18;
  undefined *local_res20;
  undefined **local_108;
  longlong *local_100;
  longlong local_f8;
  undefined8 local_f0;
  undefined8 local_e8;
  undefined **local_e0;
  longlong *local_d8;
  longlong local_d0;
  undefined8 local_c8;
  undefined4 local_c0;
  undefined4 local_bc;
  undefined **local_b8;
  longlong *local_b0;
  longlong local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  int local_80;
  undefined8 local_78;
  undefined4 local_70;
  undefined **local_68;
  undefined4 local_60;
  undefined2 local_5c;
  undefined8 local_58;
  undefined1 local_50;
  undefined8 local_48;
  ulonglong uVar9;
  
  local_48 = 0xfffffffffffffffe;
  hThread = GetCurrentThread();
  SetThreadPriorityBoost(hThread,0);
  FUN_1401ae8b0(local_res10);
  local_b8 = Proud::CFastArray<>::vftable;
  uVar11 = 0;
  local_b0 = (longlong *)0x0;
  local_a8 = 0;
  local_a0 = 0;
  local_98 = 0;
  local_d8 = (longlong *)0x0;
  local_d0 = 0;
  local_c8 = 0;
  local_e0 = Proud::CReceivedMessageList::vftable;
  local_c0 = 1000;
  local_bc = 1;
  cVar5 = FUN_140158270();
  if (cVar5 == '\0') {
    cVar5 = *(char *)(param_1 + 0x140);
    while (cVar5 == '\0') {
      local_68 = Proud::AddrPort::vftable;
      local_90 = 0;
      local_78 = 0;
      local_88 = 0;
      local_80 = 5;
      local_70 = 0;
      local_60 = DAT_140320450;
      local_5c = DAT_140320454;
      cVar5 = FUN_14018b2f0(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x788),&local_90,
                            DAT_140320c98);
      dVar14 = (double)(**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
      dVar15 = dVar14 - *(double *)(param_1 + 0x100);
      pdVar2 = (double *)(*(longlong *)(param_1 + 0x148) + 0x820);
      if (*pdVar2 <= dVar15 && dVar15 != *pdVar2) {
        *(double *)(param_1 + 0x100) = dVar14;
        FUN_14018d140(param_1,&local_b8);
      }
      if (cVar5 != '\0') {
        FUN_140195630(param_1,&local_90,&local_e0);
        lVar6 = FUN_1401ab540(local_90);
        if (lVar6 != 0) {
          if (local_80 == 2) {
            FUN_140194ac0(param_1,&local_90,lVar6,&local_e0);
          }
          else if (local_80 == 1) {
            FUN_14018c9a0(param_1,&local_90,lVar6);
          }
        }
      }
      cVar5 = *(char *)(param_1 + 0x140);
    }
  }
  else {
    local_108 = Proud::CFastArray<>::vftable;
    local_100 = (longlong *)0x0;
    local_f8 = 0;
    local_f0 = 0;
    local_e8 = 0;
    FUN_14018d4e0(&local_108,10);
    local_res18 = (undefined4 *)((ulonglong)local_res18 & 0xffffffff00000000);
    while (*(char *)(param_1 + 0x140) == '\0') {
      cVar5 = FUN_14018b740(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x788),&local_108,
                            &local_res18,DAT_140320c98);
      dVar14 = (double)(**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
      dVar15 = dVar14 - *(double *)(param_1 + 0x100);
      pdVar2 = (double *)(*(longlong *)(param_1 + 0x148) + 0x820);
      if (*pdVar2 <= dVar15 && dVar15 != *pdVar2) {
        *(double *)(param_1 + 0x100) = dVar14;
        FUN_14018d140(param_1,&local_b8);
      }
      if ((cVar5 != '\0') && (uVar9 = uVar11, uVar13 = uVar11, (uint)local_res18 != 0)) {
        do {
          iVar8 = (int)uVar9;
          if ((iVar8 < 0) || ((int)local_f0 <= iVar8)) {
                    // WARNING: Subroutine does not return
            FUN_1401566e0();
          }
          FUN_140195630(param_1,(longlong)iVar8 * 0x38 + local_f8,&local_e0);
          if ((int)local_f0 <= iVar8) {
                    // WARNING: Subroutine does not return
            FUN_1401566e0();
          }
          puVar3 = (undefined8 *)(uVar13 + local_f8);
          lVar6 = FUN_1401ab540(*puVar3);
          if (lVar6 != 0) {
            if (*(int *)(puVar3 + 2) == 2) {
              FUN_140194ac0(param_1,puVar3,lVar6,&local_e0);
            }
            else if (*(int *)(puVar3 + 2) == 1) {
              FUN_14018c9a0(param_1,puVar3,lVar6);
            }
          }
          uVar9 = (ulonglong)(iVar8 + 1U);
          uVar13 = uVar13 + 0x38;
        } while (iVar8 + 1U < (uint)local_res18);
      }
    }
    local_108 = Proud::CFastArray<>::vftable;
    if (local_f8 != 0) {
      if (local_100 == (longlong *)0x0) {
        FUN_140156970();
      }
      else {
        (**(code **)(*local_100 + 0x18))(local_100,local_f8);
      }
    }
  }
  if (*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x17f0) != 0) {
    FUN_1401568c0();
    local_res20 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_res20,&DAT_140266f10,L"Proud::CNetThreads_S::NetWorkerThread_Main");
    puVar4 = local_res20;
    puVar12 = local_res20;
    if (local_res20 == (undefined *)0x0) {
      puVar12 = PTR_DAT_1403200a0;
    }
    FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x148) + 0x17f0),0,puVar12);
    if (((puVar4 != (undefined *)0x0) && (puVar4 != PTR_DAT_1403200a0)) &&
       (puVar4 + -8 != (undefined *)0x0)) {
      uVar7 = FUN_1401568c0();
      local_58 = uVar7;
      FUN_140156b50(uVar7);
      local_50 = 1;
      piVar1 = (int *)(puVar4 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar4 + -8);
      }
      FUN_140156be0(uVar7);
    }
  }
  local_e0 = Proud::CFastArray<>::vftable;
  lVar6 = (longlong)(int)local_c8;
  if (0 < (int)local_c8) {
    puVar10 = (undefined4 *)(local_d0 + 0x18);
    do {
      local_res18 = puVar10 + -4;
      FUN_1401560e0();
      if (*(longlong *)(puVar10 + -2) != 0) {
        if ((int)puVar10[1] < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        *puVar10 = 0;
      }
      uVar11 = uVar11 + 1;
      puVar10 = puVar10 + 0x12;
    } while ((longlong)uVar11 < lVar6);
  }
  if (local_d0 != 0) {
    if (local_d8 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*local_d8 + 0x18))(local_d8,local_d0);
    }
  }
  if (local_a8 != 0) {
    if (local_b0 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*local_b0 + 0x18))(local_b0,local_a8);
    }
  }
  FUN_1401ae8e0(local_res10);
  return;
}



void FUN_140195bb0(undefined8 param_1)

{
  DWORD DVar1;
  
  DVar1 = GetCurrentThreadId();
  FUN_1401ac7d0(DVar1,"PNSrv NetWorker");
  FUN_140195700(param_1);
  return;
}



void FUN_140195be0(longlong param_1,int param_2,int param_3)

{
  longlong *plVar1;
  uint uVar2;
  longlong *plVar3;
  void *pvVar4;
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lVar8;
  undefined8 uVar9;
  undefined8 *puVar10;
  int iVar11;
  int iVar12;
  int iVar13;
  longlong lVar14;
  int local_res18;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong *local_70;
  undefined8 local_68;
  longlong local_60;
  undefined1 local_58;
  
  local_68 = 0xfffffffffffffffe;
  uVar2 = *(uint *)(*(longlong *)(param_1 + 0x148) + 600);
  if (uVar2 != 0) {
    FUN_1401ae840(param_1 + 0x1e8,(double)uVar2 * 0.001);
  }
  pvVar4 = operator_new(0x28);
  if (pvVar4 == (void *)0x0) {
    lVar5 = 0;
  }
  else {
    lVar5 = FUN_140182680(pvVar4,FUN_140193d30,param_1);
  }
  if (lVar5 == 0) {
    local_80 = (longlong *)0x0;
  }
  else {
    local_80 = (longlong *)FUN_140156940(0x10);
    local_80[1] = 1;
    *local_80 = lVar5;
  }
  plVar1 = local_80;
  FUN_14018da90(param_1 + 0x88,&local_80);
  plVar3 = local_80;
  if (plVar1 != (longlong *)0x0) {
    plVar1 = plVar1 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      pvVar4 = (void *)*local_80;
      if (pvVar4 != (void *)0x0) {
        FUN_140182790(pvVar4);
        operator_delete(pvVar4);
      }
      FUN_140156970(plVar3);
    }
  }
  pvVar4 = operator_new(0x28);
  if (pvVar4 == (void *)0x0) {
    lVar5 = 0;
  }
  else {
    lVar5 = FUN_140182680(pvVar4,FUN_14018f100,param_1);
  }
  if (lVar5 == 0) {
    local_78 = (longlong *)0x0;
  }
  else {
    local_78 = (longlong *)FUN_140156940(0x10);
    local_78[1] = 1;
    *local_78 = lVar5;
  }
  plVar1 = local_78;
  FUN_14018da90(param_1 + 0x90,&local_78);
  plVar3 = local_78;
  if (plVar1 != (longlong *)0x0) {
    plVar1 = plVar1 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      pvVar4 = (void *)*local_78;
      if (pvVar4 != (void *)0x0) {
        FUN_140182790(pvVar4);
        operator_delete(pvVar4);
      }
      FUN_140156970(plVar3);
    }
  }
  iVar13 = 0;
  if (0 < param_3) {
    lVar5 = param_1 + 0x38;
    do {
      local_70 = operator_new(0x28);
      if (local_70 == (longlong *)0x0) {
        lVar6 = 0;
      }
      else {
        lVar6 = FUN_140182680(local_70,FUN_140195bb0,param_1);
      }
      if (lVar6 == 0) {
        local_70 = (longlong *)0x0;
      }
      else {
        local_70 = (longlong *)FUN_140156940(0x10);
        local_70[1] = 1;
        *local_70 = lVar6;
      }
      plVar1 = local_70;
      iVar11 = *(int *)(param_1 + 0x50);
      if (iVar11 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      iVar12 = *(int *)(param_1 + 0x50);
      FUN_140191870(lVar5,iVar12 + 1);
      iVar12 = iVar12 - iVar11;
      if ((0 < iVar12) && (iVar12 = iVar12 + -1, -1 < iVar12)) {
        lVar6 = (longlong)(iVar12 + iVar11 + 1) << 3;
        lVar14 = (longlong)(iVar12 + iVar11) << 3;
        do {
          lVar7 = FUN_1401a7bb0(lVar5);
          lVar8 = FUN_1401a7bb0(lVar5);
          FUN_14018da90(lVar6 + lVar8,lVar14 + lVar7);
          lVar14 = lVar14 + -8;
          lVar6 = lVar6 + -8;
          iVar12 = iVar12 + -1;
        } while (-1 < iVar12);
      }
      lVar6 = FUN_1401a7bb0(lVar5);
      FUN_14018da90(lVar6 + (longlong)iVar11 * 8,&local_70);
      plVar3 = local_70;
      if (plVar1 != (longlong *)0x0) {
        plVar1 = plVar1 + 1;
        *plVar1 = *plVar1 + -1;
        if (*plVar1 == 0) {
          pvVar4 = (void *)*local_70;
          if (pvVar4 != (void *)0x0) {
            FUN_140182790(pvVar4);
            operator_delete(pvVar4);
          }
          FUN_140156970(plVar3);
        }
      }
      iVar13 = iVar13 + 1;
    } while (iVar13 < param_3);
  }
  local_60 = param_1;
  FUN_140156b50(param_1);
  local_58 = 1;
  local_res18 = 0;
  if (0 < param_2) {
    do {
      pvVar4 = operator_new(0x28);
      if (pvVar4 == (void *)0x0) {
        lVar5 = 0;
      }
      else {
        lVar5 = FUN_140182680(pvVar4,FUN_140193d60,param_1);
      }
      if (lVar5 == 0) {
        local_88 = (longlong *)0x0;
      }
      else {
        local_88 = (longlong *)FUN_140156940(0x10);
        local_88[1] = 1;
        *local_88 = lVar5;
      }
      iVar13 = *(int *)(param_1 + 0x78);
      lVar5 = (longlong)iVar13;
      if (iVar13 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      iVar11 = *(int *)(param_1 + 0x78);
      FUN_140191870(param_1 + 0x60,iVar11 + 1);
      iVar11 = iVar11 - iVar13;
      if ((0 < iVar11) && (iVar11 = iVar11 + -1, lVar6 = (longlong)iVar11, -1 < iVar11)) {
        lVar14 = (lVar6 + lVar5) * 8 + 8;
        do {
          lVar8 = FUN_1401a7bb0(param_1 + 0x60);
          lVar7 = FUN_1401a7bb0(param_1 + 0x60);
          plVar1 = (longlong *)(lVar14 + lVar7);
          lVar7 = *(longlong *)(lVar8 + -8 + lVar14);
          if (lVar7 != *plVar1) {
            if (lVar7 != 0) {
              *(longlong *)(*(longlong *)(lVar8 + -8 + lVar14) + 8) = *(longlong *)(lVar7 + 8) + 1;
            }
            puVar10 = (undefined8 *)0x0;
            if ((*plVar1 != 0) &&
               (*(longlong *)(*plVar1 + 8) = *(longlong *)(*plVar1 + 8) + -1,
               *(longlong *)(*plVar1 + 8) == 0)) {
              puVar10 = (undefined8 *)*plVar1;
            }
            *plVar1 = *(longlong *)(lVar8 + -8 + lVar14);
            if (puVar10 != (undefined8 *)0x0) {
              pvVar4 = (void *)*puVar10;
              if (pvVar4 != (void *)0x0) {
                FUN_140182790(pvVar4);
                operator_delete(pvVar4);
              }
              FUN_140156970(puVar10);
            }
          }
          lVar14 = lVar14 + -8;
          lVar6 = lVar6 + -1;
        } while (-1 < lVar6);
      }
      lVar6 = FUN_1401a7bb0(param_1 + 0x60);
      if (local_88 != *(longlong **)(lVar6 + lVar5 * 8)) {
        if (local_88 != (longlong *)0x0) {
          local_88[1] = local_88[1] + 1;
        }
        puVar10 = (undefined8 *)0x0;
        lVar14 = *(longlong *)(lVar6 + lVar5 * 8);
        if ((lVar14 != 0) &&
           (*(longlong *)(*(longlong *)(lVar6 + lVar5 * 8) + 8) = *(longlong *)(lVar14 + 8) + -1,
           *(longlong *)(*(longlong *)(lVar6 + lVar5 * 8) + 8) == 0)) {
          puVar10 = *(undefined8 **)(lVar6 + lVar5 * 8);
        }
        *(longlong **)(lVar6 + lVar5 * 8) = local_88;
        if (puVar10 != (undefined8 *)0x0) {
          pvVar4 = (void *)*puVar10;
          if (pvVar4 != (void *)0x0) {
            FUN_140182790(pvVar4);
            operator_delete(pvVar4);
          }
          FUN_140156970(puVar10);
        }
      }
      if (local_88 != (longlong *)0x0) {
        plVar1 = local_88 + 1;
        *plVar1 = *plVar1 + -1;
        if (*plVar1 == 0) {
          pvVar4 = (void *)*local_88;
          if (pvVar4 != (void *)0x0) {
            FUN_140182790(pvVar4);
            operator_delete(pvVar4);
          }
          FUN_140156970(local_88);
        }
      }
      local_res18 = local_res18 + 1;
    } while (local_res18 < param_2);
  }
  FUN_140156be0(param_1);
  uVar9 = 0;
  if (*(undefined8 **)(param_1 + 0x88) != (undefined8 *)0x0) {
    uVar9 = **(undefined8 **)(param_1 + 0x88);
  }
  FUN_140182870(uVar9);
  uVar9 = 0;
  if (*(undefined8 **)(param_1 + 0x90) != (undefined8 *)0x0) {
    uVar9 = **(undefined8 **)(param_1 + 0x90);
  }
  FUN_140182870(uVar9);
  iVar13 = 0;
  lVar5 = 0;
  if (0 < *(int *)(param_1 + 0x50)) {
    do {
      if ((lVar5 < 0) || (*(int *)(param_1 + 0x50) <= iVar13)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      puVar10 = *(undefined8 **)(*(longlong *)(param_1 + 0x48) + lVar5 * 8);
      uVar9 = 0;
      if (puVar10 != (undefined8 *)0x0) {
        uVar9 = *puVar10;
      }
      FUN_140182870(uVar9);
      iVar13 = iVar13 + 1;
      lVar5 = lVar5 + 1;
    } while (iVar13 < *(int *)(param_1 + 0x50));
  }
  iVar13 = 0;
  lVar5 = 0;
  if (0 < *(int *)(param_1 + 0x78)) {
    do {
      if ((lVar5 < 0) || (*(int *)(param_1 + 0x78) <= iVar13)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      puVar10 = *(undefined8 **)(*(longlong *)(param_1 + 0x70) + lVar5 * 8);
      uVar9 = 0;
      if (puVar10 != (undefined8 *)0x0) {
        uVar9 = *puVar10;
      }
      FUN_140182870(uVar9);
      iVar13 = iVar13 + 1;
      lVar5 = lVar5 + 1;
    } while (iVar13 < *(int *)(param_1 + 0x78));
  }
  return;
}



DWORD FUN_1401961b0(void)

{
  DWORD DVar1;
  
  DVar1 = GetLastError();
  if (0 < (int)DVar1) {
    DVar1 = DVar1 & 0xffff | 0x80070000;
  }
  return DVar1;
}



HANDLE FUN_1401961d0(longlong *param_1,LPCWSTR param_2,uint param_3,uint param_4,
                    LPSECURITY_ATTRIBUTES param_5,DWORD param_6,DWORD param_7,undefined8 param_8)

{
  HMODULE hModule;
  FARPROC pFVar1;
  HANDLE pvVar2;
  
  if (*param_1 == 0) {
    if ((int)param_1[1] != 0) {
      pvVar2 = CreateFileW(param_2,param_3,param_4,param_5,param_6,param_7,(HANDLE)0x0);
      return pvVar2;
    }
  }
  else {
    hModule = GetModuleHandleW(L"kernel32.dll");
    if ((hModule != (HMODULE)0x0) &&
       (pFVar1 = GetProcAddress(hModule,"CreateFileTransactedW"), pFVar1 != (FARPROC)0x0)) {
      pvVar2 = (HANDLE)(*pFVar1)(param_2,(ulonglong)param_3,(ulonglong)param_4,param_5,param_6,
                                 param_7,param_8,*param_1,0,0);
      return pvVar2;
    }
  }
  return (HANDLE)0xffffffffffffffff;
}



void FUN_1401962d0(undefined8 *param_1)

{
  if ((undefined8 *)*param_1 != param_1 + 1) {
    free((undefined8 *)*param_1);
  }
  return;
}



void FUN_1401962f0(undefined8 *param_1)

{
  if ((HANDLE)*param_1 != (HANDLE)0x0) {
    CloseHandle((HANDLE)*param_1);
    *param_1 = 0;
  }
  return;
}



ulonglong FUN_140196320(longlong *param_1,wchar_t *param_2,void *param_3)

{
  undefined *puVar1;
  rsize_t _DstSize;
  int iVar2;
  int iVar3;
  uint uVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  ulonglong uVar8;
  wchar_t *pwVar9;
  longlong lVar10;
  uint uVar11;
  int iVar12;
  int iVar13;
  int iVar14;
  wchar_t *pwVar15;
  longlong lVar16;
  longlong lVar17;
  wchar_t *pwVar18;
  uint local_58;
  
  uVar8 = FUN_140156740(param_2);
  iVar2 = (int)uVar8;
  if (iVar2 != 0) {
    iVar3 = FUN_140156740(param_3);
    pwVar18 = (wchar_t *)*param_1;
    uVar4 = 0;
    local_58 = 0;
    uVar11 = uVar4;
    pwVar15 = (wchar_t *)PTR_DAT_1403200a0;
    if ((pwVar18 != (wchar_t *)0x0) && (pwVar15 = pwVar18, pwVar18 != (wchar_t *)PTR_DAT_1403200a0))
    {
      uVar11 = *(uint *)(pwVar18 + -4);
    }
    pwVar18 = pwVar15 + (int)uVar11;
    if (pwVar15 < pwVar18) {
      do {
        pwVar9 = wcsstr(pwVar15,param_2);
        while (pwVar9 != (wchar_t *)0x0) {
          pwVar15 = pwVar9 + iVar2;
          uVar4 = uVar4 + 1;
          pwVar9 = wcsstr(pwVar15,param_2);
          local_58 = uVar4;
        }
        iVar5 = FUN_140156740(pwVar15);
        pwVar15 = pwVar15 + (iVar5 + 1);
      } while (pwVar15 < pwVar18);
      if (0 < (int)uVar4) {
        puVar1 = (undefined *)*param_1;
        iVar5 = 0;
        if ((puVar1 != (undefined *)0x0) && (iVar5 = 0, puVar1 != PTR_DAT_1403200a0)) {
          iVar5 = *(int *)(puVar1 + -8);
        }
        lVar16 = (longlong)iVar3;
        iVar12 = (iVar3 - iVar2) * uVar4 + iVar5;
        iVar7 = iVar5;
        if (iVar5 < iVar12) {
          iVar7 = iVar12;
        }
        iVar13 = 0;
        iVar14 = iVar13;
        if ((puVar1 != (undefined *)0x0) && (puVar1 != PTR_DAT_1403200a0)) {
          iVar14 = *(int *)(puVar1 + -8);
        }
        iVar6 = 0;
        if (((iVar7 <= iVar14) && (iVar7 = iVar13, puVar1 != (undefined *)0x0)) &&
           (iVar7 = iVar6, puVar1 != PTR_DAT_1403200a0)) {
          iVar7 = *(int *)(puVar1 + -8);
        }
        iVar14 = 1;
        if (1 < iVar7) {
          iVar14 = iVar7;
        }
        if ((puVar1 != (undefined *)0x0) && (puVar1 != PTR_DAT_1403200a0)) {
          iVar6 = *(int *)(puVar1 + -8);
        }
        if (iVar6 < iVar14) {
          FUN_14004f590(param_1);
        }
        FUN_14004f670(param_1);
        lVar10 = (longlong)iVar5;
        pwVar15 = (wchar_t *)*param_1;
        if ((wchar_t *)*param_1 == (wchar_t *)0x0) {
          pwVar15 = (wchar_t *)PTR_DAT_1403200a0;
        }
        for (pwVar18 = pwVar15; pwVar18 < pwVar15 + lVar10; pwVar18 = pwVar18 + (iVar7 + 1)) {
          pwVar9 = wcsstr(pwVar18,param_2);
          if (pwVar9 != (wchar_t *)0x0) {
            do {
              pwVar18 = pwVar9 + lVar16;
              lVar17 = (longlong)
                       ((iVar5 - (int)((longlong)pwVar9 - (longlong)pwVar15 >> 1)) - iVar2);
              _DstSize = lVar17 * 2;
              memmove_s(pwVar18,_DstSize,pwVar9 + iVar2,_DstSize);
              memcpy_s(pwVar9,lVar16 * 2,param_3,lVar16 * 2);
              pwVar9[lVar16 + lVar17] = L'\0';
              iVar5 = iVar5 + (iVar3 - iVar2);
              pwVar9 = wcsstr(pwVar18,param_2);
            } while (pwVar9 != (wchar_t *)0x0);
          }
          iVar7 = FUN_140156740(pwVar18);
          uVar4 = local_58;
        }
        FUN_14004f7e0(param_1,iVar12);
      }
    }
    return (ulonglong)uVar4;
  }
  return uVar8;
}



void FUN_1401965d0(void)

{
  FUN_14015e850();
  return;
}



// WARNING: Removing unreachable block (ram,0x00014019665f)
// WARNING: Removing unreachable block (ram,0x000140196668)
// WARNING: Removing unreachable block (ram,0x000140196686)
// WARNING: Removing unreachable block (ram,0x00014019668f)

undefined1 *
FUN_1401965f0(undefined1 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  *param_1 = 0;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  *(undefined4 *)(param_1 + 0x28) = 0x11;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined4 *)(param_1 + 0x48) = 0;
  *(undefined4 *)(param_1 + 0x2c) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x30) = 0x3e800000;
  *(undefined4 *)(param_1 + 0x34) = 0x40100000;
  *(undefined8 *)(param_1 + 0x38) = 0x26;
  *(undefined8 *)(param_1 + 0x40) = 0;
  uVar1 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x58,uVar1,1,param_4,uVar2);
  param_1[0x88] = 1;
  return param_1;
}



void FUN_1401966d0(longlong param_1)

{
  FUN_140156c00(param_1 + 0x58);
  FUN_1401965d0(param_1);
  return;
}



void FUN_140196700(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  void *pvVar2;
  undefined8 *puVar3;
  
  lVar1 = *param_2;
  if (lVar1 != *param_1) {
    if (lVar1 != 0) {
      *(longlong *)(*param_2 + 8) = *(longlong *)(lVar1 + 8) + 1;
    }
    puVar3 = (undefined8 *)0x0;
    if ((*param_1 != 0) &&
       (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
       *(longlong *)(*param_1 + 8) == 0)) {
      puVar3 = (undefined8 *)*param_1;
    }
    *param_1 = *param_2;
    if (puVar3 != (undefined8 *)0x0) {
      pvVar2 = (void *)*puVar3;
      if (pvVar2 != (void *)0x0) {
        FUN_14004f990((longlong)pvVar2 + 8);
        operator_delete(pvVar2);
      }
      FUN_140156970(puVar3);
    }
  }
  return;
}



void FUN_140196790(longlong *param_1)

{
  undefined8 *puVar1;
  void *pvVar2;
  
  if (*param_1 != 0) {
    *(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1;
    if (*(longlong *)(*param_1 + 8) == 0) {
      puVar1 = (undefined8 *)*param_1;
      pvVar2 = (void *)*puVar1;
      if (pvVar2 != (void *)0x0) {
        FUN_14004f990((longlong)pvVar2 + 8);
        operator_delete(pvVar2);
      }
      FUN_140156970(puVar1);
    }
  }
  return;
}



void FUN_140196800(longlong param_1)

{
  undefined8 *puVar1;
  void *pvVar2;
  
  if (*(longlong *)(param_1 + 0x10) != 0) {
    *(longlong *)(*(longlong *)(param_1 + 0x10) + 8) =
         *(longlong *)(*(longlong *)(param_1 + 0x10) + 8) + -1;
    if (*(longlong *)(*(longlong *)(param_1 + 0x10) + 8) == 0) {
      puVar1 = *(undefined8 **)(param_1 + 0x10);
      pvVar2 = (void *)*puVar1;
      if (pvVar2 != (void *)0x0) {
        FUN_14004f990((longlong)pvVar2 + 8);
        operator_delete(pvVar2);
      }
      FUN_140156970(puVar1);
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_140196870(__time64_t *param_1,undefined8 param_2,wchar_t *param_3)

{
  errno_t eVar1;
  size_t sVar2;
  wchar_t *pwVar3;
  undefined1 auStack_178 [32];
  undefined4 local_158;
  tm local_150;
  wchar_t local_128 [128];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_178;
  local_158 = 0;
  if (param_3 == (wchar_t *)0x0) {
    pwVar3 = (wchar_t *)0x0;
  }
  else {
    eVar1 = _localtime64_s(&local_150,param_1);
    if (eVar1 != 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    sVar2 = wcsftime(local_128,0x80,param_3,&local_150);
    if (sVar2 == 0) {
      local_128[0] = L'\0';
    }
    pwVar3 = local_128;
  }
  FUN_1401587a0(param_2,pwVar3);
  return param_2;
}



undefined8 * FUN_140196910(longlong *param_1,undefined8 *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  
  plVar1 = (longlong *)param_1[1];
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  *param_2 = 0;
  FUN_140196700(param_2,plVar1 + 2);
  lVar2 = *plVar1;
  param_1[1] = lVar2;
  if (lVar2 == 0) {
    param_1[2] = 0;
  }
  else {
    *(undefined8 *)(lVar2 + 8) = 0;
  }
  FUN_140196800(plVar1);
  plVar3 = (longlong *)*param_1;
  if (plVar3 == (longlong *)0x0) {
    FUN_140156970(plVar1);
  }
  else {
    (**(code **)(*plVar3 + 0x10))(plVar3,plVar1);
  }
  param_1[3] = param_1[3] + -1;
  return param_2;
}



void FUN_1401969b0(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined8 *puVar3;
  void *pvVar4;
  longlong *plVar5;
  
  lVar1 = param_1[3];
  while( true ) {
    if (lVar1 == 0) {
      param_1[1] = 0;
      param_1[2] = 0;
      return;
    }
    plVar2 = (longlong *)param_1[1];
    if (plVar2 == (longlong *)0x0) break;
    param_1[1] = *plVar2;
    if ((plVar2[2] != 0) &&
       (*(longlong *)(plVar2[2] + 8) = *(longlong *)(plVar2[2] + 8) + -1,
       *(longlong *)(plVar2[2] + 8) == 0)) {
      puVar3 = (undefined8 *)plVar2[2];
      pvVar4 = (void *)*puVar3;
      if (pvVar4 != (void *)0x0) {
        FUN_14004f990((longlong)pvVar4 + 8);
        operator_delete(pvVar4);
      }
      FUN_140156970(puVar3);
    }
    plVar5 = (longlong *)*param_1;
    if (plVar5 == (longlong *)0x0) {
      FUN_140156970(plVar2);
    }
    else {
      (**(code **)(*plVar5 + 0x10))(plVar5,plVar2);
    }
    param_1[3] = param_1[3] + -1;
    lVar1 = param_1[3];
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



void FUN_140196a90(longlong param_1,undefined4 param_2,undefined8 param_3)

{
  undefined8 uVar1;
  longlong *plVar2;
  void *pvVar3;
  undefined4 *puVar4;
  longlong lVar5;
  __time64_t _Var6;
  undefined8 *puVar7;
  undefined8 *puVar8;
  longlong *local_res8;
  undefined1 local_78 [80];
  
  FUN_140156b50();
  if (*(char *)(param_1 + 0x50) != '\0') {
    FUN_140156300(local_78,L"LogFile Creation Failed");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
  }
  pvVar3 = operator_new(0x20);
  if (pvVar3 == (void *)0x0) {
    pvVar3 = (void *)0x0;
  }
  else {
    FUN_1401568c0();
    *(undefined **)((longlong)pvVar3 + 8) = PTR_DAT_1403200a0;
  }
  if (pvVar3 == (void *)0x0) {
    local_res8 = (longlong *)0x0;
  }
  else {
    local_res8 = (longlong *)FUN_140156940();
    local_res8[1] = 1;
    *local_res8 = (longlong)pvVar3;
  }
  if (local_res8 == (longlong *)0x0) {
    puVar4 = (undefined4 *)0x0;
  }
  else {
    puVar4 = (undefined4 *)*local_res8;
  }
  *puVar4 = 1;
  if (local_res8 == (longlong *)0x0) {
    lVar5 = 0;
  }
  else {
    lVar5 = *local_res8;
  }
  FUN_14004ce80(lVar5 + 8,param_3);
  if (local_res8 == (longlong *)0x0) {
    lVar5 = 0;
  }
  else {
    lVar5 = *local_res8;
  }
  FUN_140196320(lVar5 + 8,&DAT_140294c8c,&DAT_140288b80);
  if (local_res8 == (longlong *)0x0) {
    lVar5 = 0;
  }
  else {
    lVar5 = *local_res8;
  }
  *(undefined4 *)(lVar5 + 0x10) = param_2;
  _Var6 = _time64((__time64_t *)0x0);
  if (local_res8 == (longlong *)0x0) {
    lVar5 = 0;
  }
  else {
    lVar5 = *local_res8;
  }
  *(__time64_t *)(lVar5 + 0x18) = _Var6;
  uVar1 = *(undefined8 *)(param_1 + 0x98);
  plVar2 = *(longlong **)(param_1 + 0x88);
  if (plVar2 == (longlong *)0x0) {
    puVar7 = (undefined8 *)FUN_140156940(0x18);
  }
  else {
    puVar7 = (undefined8 *)(**(code **)(*plVar2 + 8))(plVar2,0x18);
  }
  if ((puVar7 != (undefined8 *)0x0) && (puVar7[2] = 0, local_res8 != (longlong *)0x0)) {
    local_res8[1] = local_res8[1] + 1;
    puVar8 = (undefined8 *)0x0;
    if ((puVar7[2] != 0) &&
       (*(longlong *)(puVar7[2] + 8) = *(longlong *)(puVar7[2] + 8) + -1,
       *(longlong *)(puVar7[2] + 8) == 0)) {
      puVar8 = (undefined8 *)puVar7[2];
    }
    puVar7[2] = local_res8;
    if (puVar8 != (undefined8 *)0x0) {
      pvVar3 = (void *)*puVar8;
      if (pvVar3 != (void *)0x0) {
        FUN_14004f990((longlong)pvVar3 + 8);
        operator_delete(pvVar3);
      }
      FUN_140156970(puVar8);
    }
  }
  puVar7[1] = uVar1;
  *puVar7 = 0;
  *(longlong *)(param_1 + 0xa0) = *(longlong *)(param_1 + 0xa0) + 1;
  if (*(undefined8 **)(param_1 + 0x98) == (undefined8 *)0x0) {
    *(undefined8 **)(param_1 + 0x90) = puVar7;
  }
  else {
    **(undefined8 **)(param_1 + 0x98) = puVar7;
  }
  *(undefined8 **)(param_1 + 0x98) = puVar7;
  FUN_1401aec50(param_1 + 0x10,1);
  if (local_res8 != (longlong *)0x0) {
    plVar2 = local_res8 + 1;
    *plVar2 = *plVar2 + -1;
    if (*plVar2 == 0) {
      pvVar3 = (void *)*local_res8;
      if (pvVar3 != (void *)0x0) {
        FUN_14004f990((longlong)pvVar3 + 8);
        operator_delete(pvVar3);
      }
      FUN_140156970(local_res8);
    }
  }
  FUN_140156be0(param_1 + 0x18);
  return;
}



void FUN_140196d20(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  longlong *plVar2;
  void *pvVar3;
  undefined4 *puVar4;
  undefined8 *puVar5;
  longlong lVar6;
  undefined8 *puVar7;
  undefined8 local_res18;
  undefined8 local_res20;
  longlong *local_b8;
  undefined1 local_80 [80];
  
  local_res18 = param_3;
  local_res20 = param_4;
  FUN_140156b50();
  if (*(char *)(param_1 + 0x50) != '\0') {
    FUN_140156300(local_80,L"LogFile Creation Failed");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_80,(ThrowInfo *)&DAT_14031d928);
  }
  pvVar3 = operator_new(0x20);
  if (pvVar3 == (void *)0x0) {
    pvVar3 = (void *)0x0;
  }
  else {
    FUN_1401568c0();
    *(undefined **)((longlong)pvVar3 + 8) = PTR_DAT_1403200a0;
  }
  if (pvVar3 == (void *)0x0) {
    local_b8 = (longlong *)0x0;
  }
  else {
    local_b8 = (longlong *)FUN_140156940(0x10);
    local_b8[1] = 1;
    *local_b8 = (longlong)pvVar3;
  }
  if (local_b8 == (longlong *)0x0) {
    puVar4 = (undefined4 *)0x0;
  }
  else {
    puVar4 = (undefined4 *)*local_b8;
  }
  *puVar4 = 2;
  if (local_b8 == (longlong *)0x0) {
    lVar6 = 0;
  }
  else {
    lVar6 = *local_b8;
  }
  FUN_14004cdc0(lVar6 + 8,param_2,&local_res18);
  if (local_b8 == (longlong *)0x0) {
    lVar6 = 0;
  }
  else {
    lVar6 = *local_b8;
  }
  FUN_140196320(lVar6 + 8,&DAT_140294c8c,&DAT_140288b80);
  if (local_b8 == (longlong *)0x0) {
    lVar6 = 0;
  }
  else {
    lVar6 = *local_b8;
  }
  FUN_14004f840(lVar6 + 8,&DAT_140267788);
  uVar1 = *(undefined8 *)(param_1 + 0x98);
  plVar2 = *(longlong **)(param_1 + 0x88);
  if (plVar2 == (longlong *)0x0) {
    puVar5 = (undefined8 *)FUN_140156940(0x18);
  }
  else {
    puVar5 = (undefined8 *)(**(code **)(*plVar2 + 8))(plVar2,0x18);
  }
  if ((puVar5 != (undefined8 *)0x0) && (puVar5[2] = 0, local_b8 != (longlong *)0x0)) {
    local_b8[1] = local_b8[1] + 1;
    puVar7 = (undefined8 *)0x0;
    if ((puVar5[2] != 0) &&
       (*(longlong *)(puVar5[2] + 8) = *(longlong *)(puVar5[2] + 8) + -1,
       *(longlong *)(puVar5[2] + 8) == 0)) {
      puVar7 = (undefined8 *)puVar5[2];
    }
    puVar5[2] = local_b8;
    if (puVar7 != (undefined8 *)0x0) {
      pvVar3 = (void *)*puVar7;
      if (pvVar3 != (void *)0x0) {
        FUN_14004f990((longlong)pvVar3 + 8);
        operator_delete(pvVar3);
      }
      FUN_140156970(puVar7);
    }
  }
  puVar5[1] = uVar1;
  *puVar5 = 0;
  *(longlong *)(param_1 + 0xa0) = *(longlong *)(param_1 + 0xa0) + 1;
  if (*(undefined8 **)(param_1 + 0x98) == (undefined8 *)0x0) {
    *(undefined8 **)(param_1 + 0x90) = puVar5;
  }
  else {
    **(undefined8 **)(param_1 + 0x98) = puVar5;
  }
  *(undefined8 **)(param_1 + 0x98) = puVar5;
  FUN_1401aec50(param_1 + 0x10,1);
  if (local_b8 != (longlong *)0x0) {
    plVar2 = local_b8 + 1;
    *plVar2 = *plVar2 + -1;
    if (*plVar2 == 0) {
      pvVar3 = (void *)*local_b8;
      if (pvVar3 != (void *)0x0) {
        FUN_14004f990((longlong)pvVar3 + 8);
        operator_delete(pvVar3);
      }
      FUN_140156970(local_b8);
    }
  }
  FUN_140156be0(param_1 + 0x18);
  return;
}



void FUN_140196fa0(longlong *param_1)

{
  undefined8 *puVar1;
  
  FUN_1401969b0();
  puVar1 = (undefined8 *)*param_1;
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140196fd0(undefined8 *param_1)

{
  longlong lVar1;
  void *pvVar2;
  undefined8 *puVar3;
  char cVar4;
  int iVar5;
  DWORD DVar6;
  BOOL BVar7;
  errno_t eVar8;
  undefined8 *puVar9;
  undefined8 uVar10;
  longlong *plVar11;
  undefined8 *puVar12;
  int *piVar13;
  undefined8 uVar14;
  HANDLE pvVar15;
  undefined1 *puVar16;
  LPCWSTR pWVar17;
  undefined *puVar18;
  int *piVar19;
  undefined *puVar20;
  int iVar21;
  longlong lVar22;
  undefined1 auStackY_3b8 [32];
  undefined2 local_378 [4];
  undefined *local_370;
  undefined8 *local_368;
  undefined8 *local_360;
  undefined *local_358;
  undefined *local_350;
  longlong local_348;
  undefined8 *local_340;
  undefined8 *local_338;
  undefined8 *local_330;
  longlong local_328;
  DWORD local_320;
  DWORD DStack_31c;
  DWORD local_318;
  DWORD DStack_314;
  longlong local_310;
  DWORD local_308 [2];
  undefined8 local_300;
  __time64_t local_2f8;
  undefined8 local_2f0;
  DWORD local_2e8;
  DWORD local_2e4;
  DWORD local_2e0 [2];
  longlong local_2d8;
  undefined8 *local_2d0;
  undefined1 local_2c8;
  __time64_t local_2c0;
  DWORD local_2b8 [2];
  undefined8 local_2b0;
  undefined8 local_2a8;
  undefined1 local_2a0;
  undefined8 local_298;
  undefined1 local_290;
  undefined8 local_288;
  undefined1 local_280;
  undefined8 local_278;
  undefined8 *local_270;
  undefined8 *local_268;
  undefined1 *local_258;
  undefined1 local_250 [264];
  undefined1 *local_148;
  undefined1 local_140 [264];
  ulonglong local_38;
  
  local_278 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStackY_3b8;
  local_320 = GetFileSize((HANDLE)*param_1,&DStack_31c);
  if ((local_320 != 0xffffffff) || (iVar5 = FUN_1401961b0(), local_2f0 = local_348, -1 < iVar5)) {
    local_2f0 = CONCAT44(DStack_31c,local_320);
  }
  DVar6 = SetFilePointer((HANDLE)*param_1,(LONG)local_2f0,(PLONG)((longlong)&local_2f0 + 4),0);
  if (DVar6 == 0xffffffff) {
    FUN_1401961b0();
  }
  FUN_1401568c0();
  local_350 = PTR_DAT_1403200a0;
  local_2c0 = _time64((__time64_t *)0x0);
  puVar9 = (undefined8 *)FUN_140196870(&local_2c0,&local_310,&DAT_140267828);
  pWVar17 = (LPCWSTR)*puVar9;
  local_258 = local_250;
  if (pWVar17 == (LPCWSTR)0x0) {
    local_258 = (undefined1 *)0x0;
    goto LAB_14019718f;
  }
  iVar5 = lstrlenW(pWVar17);
  iVar5 = iVar5 + 1;
  if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  if (local_258 == local_250) {
    if (0x80 < iVar5) {
      puVar16 = calloc((longlong)iVar5,2);
      goto LAB_140197121;
    }
LAB_140197135:
    puVar16 = local_250;
  }
  else {
    if (iVar5 < 0x81) {
      free(local_258);
      goto LAB_140197135;
    }
    puVar16 = _recalloc(local_258,(longlong)iVar5,2);
    if (puVar16 == (undefined1 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
LAB_140197121:
    if (puVar16 == (undefined1 *)0x0) {
      local_258 = puVar16;
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  local_258 = puVar16;
  eVar8 = memcpy_s(puVar16,(longlong)iVar5 * 2,pWVar17,(longlong)iVar5 * 2);
  if (eVar8 != 0) {
    if (eVar8 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar8 == 0x16) || (eVar8 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar8 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
LAB_14019718f:
  piVar19 = (int *)0x0;
  FUN_14004ce50(&local_350,L"-------- Log start at %s --------\r\n",local_258);
  if (local_258 != local_250) {
    free(local_258);
  }
  LOCK();
  piVar13 = (int *)(local_310 + -8);
  iVar5 = *piVar13;
  *piVar13 = *piVar13 + -1;
  UNLOCK();
  if (iVar5 + -1 < 1) {
    (**(code **)(**(longlong **)(local_310 + -0x18) + 8))();
  }
  puVar20 = local_350;
  puVar18 = PTR_DAT_1403200a0;
  iVar5 = 0;
  if (local_350 != (undefined *)0x0) {
    piVar13 = piVar19;
    if (local_350 != PTR_DAT_1403200a0) {
      piVar13 = (int *)(ulonglong)*(uint *)(local_350 + -8);
    }
    puVar18 = local_350;
    iVar5 = (int)piVar13;
  }
  BVar7 = WriteFile((HANDLE)*param_1,puVar18,iVar5 * 2,&local_2e8,(LPOVERLAPPED)0x0);
  if (BVar7 == 0) {
    FUN_1401961b0();
  }
  if (((puVar20 != (undefined *)0x0) && (puVar20 != PTR_DAT_1403200a0)) &&
     (puVar20 + -8 != (undefined *)0x0)) {
    uVar10 = FUN_1401568c0();
    local_2a8 = uVar10;
    FUN_140156b50(uVar10);
    local_2a0 = 1;
    piVar13 = (int *)(puVar20 + -4);
    *piVar13 = *piVar13 + -1;
    if (*piVar13 == 0) {
      FUN_140156970(puVar20 + -8);
    }
    FUN_140156be0(uVar10);
    local_2a0 = 0;
  }
  cVar4 = *(char *)(param_1 + 0x10);
  local_350 = PTR_DAT_1403200a0;
  lVar22 = local_348;
  do {
    if (cVar4 != '\0') {
      return;
    }
    cVar4 = FUN_1401ac690(param_1 + 2,300);
    if (cVar4 != '\0') {
      local_340 = (undefined8 *)0x0;
      local_328 = 0;
      local_338 = (undefined8 *)0x0;
      local_330 = (undefined8 *)0x0;
      puVar9 = param_1 + 3;
      local_2d0 = puVar9;
      FUN_140156b50(puVar9);
      local_2c8 = 1;
      if (*(char *)(param_1 + 10) == '\0') {
        lVar1 = param_1[0x14];
        while (lVar1 != 0) {
          plVar11 = (longlong *)FUN_140196910(param_1 + 0x11,&local_360);
          puVar9 = (undefined8 *)FUN_140156940(0x18);
          local_270 = puVar9;
          local_268 = puVar9;
          if (puVar9 != (undefined8 *)0x0) {
            puVar9[2] = 0;
            if (*plVar11 != 0) {
              *(longlong *)(*plVar11 + 8) = *(longlong *)(*plVar11 + 8) + 1;
              piVar13 = piVar19;
              if ((puVar9[2] != 0) &&
                 (*(longlong *)(puVar9[2] + 8) = *(longlong *)(puVar9[2] + 8) + -1,
                 *(longlong *)(puVar9[2] + 8) == 0)) {
                piVar13 = (int *)puVar9[2];
              }
              puVar9[2] = *plVar11;
              if (piVar13 != (int *)0x0) {
                pvVar2 = *(void **)piVar13;
                if (pvVar2 != (void *)0x0) {
                  FUN_14004f990((longlong)pvVar2 + 8);
                  operator_delete(pvVar2);
                }
                FUN_140156970(piVar13);
              }
            }
          }
          puVar12 = local_360;
          puVar9[1] = local_330;
          *puVar9 = 0;
          local_328 = local_328 + 1;
          puVar3 = puVar9;
          if (local_330 != (undefined8 *)0x0) {
            *local_330 = puVar9;
            puVar3 = local_338;
          }
          local_338 = puVar3;
          local_330 = puVar9;
          if ((local_360 != (undefined8 *)0x0) &&
             (local_360[1] = local_360[1] + -1, local_360[1] == 0)) {
            pvVar2 = (void *)*local_360;
            if (pvVar2 != (void *)0x0) {
              FUN_14004f990((longlong)pvVar2 + 8);
              operator_delete(pvVar2);
            }
            FUN_140156970(puVar12);
          }
          puVar9 = local_2d0;
          lVar1 = param_1[0x14];
        }
      }
      FUN_140156be0(puVar9);
      local_2c8 = 0;
      FUN_1401568c0();
      local_370 = PTR_DAT_1403200a0;
      puVar20 = PTR_DAT_1403200a0;
      while (local_328 != 0) {
        FUN_140196910(&local_340,&local_368);
        puVar9 = local_368;
        piVar13 = piVar19;
        if (local_368 != (undefined8 *)0x0) {
          piVar13 = (int *)*local_368;
        }
        iVar5 = *piVar13;
        iVar21 = 0;
        if (iVar5 == 0) {
          if ((HANDLE)*param_1 != (HANDLE)0x0) {
            CloseHandle((HANDLE)*param_1);
            *param_1 = 0;
          }
          piVar13 = piVar19;
          if (puVar9 != (undefined8 *)0x0) {
            piVar13 = (int *)*puVar9;
          }
          pWVar17 = *(LPCWSTR *)(piVar13 + 2);
          if (*(LPCWSTR *)(piVar13 + 2) == (LPCWSTR)0x0) {
            pWVar17 = (LPCWSTR)PTR_DAT_1403200a0;
          }
          if (param_1[1] == 0) {
            pvVar15 = CreateFileW(pWVar17,0x40000000,1,(LPSECURITY_ATTRIBUTES)0x0,4,0x80,(HANDLE)0x0
                                 );
          }
          else {
            pvVar15 = (HANDLE)FUN_1401961d0(param_1[1],pWVar17,0x40000000);
          }
          if (pvVar15 == (HANDLE)0xffffffffffffffff) {
            iVar5 = FUN_1401961b0();
            if (iVar5 < 0) {
              *(undefined1 *)(param_1 + 10) = 1;
              goto LAB_1401978e9;
            }
          }
          else {
            *param_1 = pvVar15;
          }
          local_378[0] = 0xfeff;
          BVar7 = WriteFile((HANDLE)*param_1,local_378,2,local_308,(LPOVERLAPPED)0x0);
          if (BVar7 == 0) {
            FUN_1401961b0();
          }
          local_318 = GetFileSize((HANDLE)*param_1,&DStack_314);
          if ((local_318 != 0xffffffff) || (iVar5 = FUN_1401961b0(), -1 < iVar5)) {
            lVar22 = CONCAT44(DStack_314,local_318);
          }
          local_300 = lVar22;
          DVar6 = SetFilePointer((HANDLE)*param_1,(LONG)lVar22,(PLONG)((longlong)&local_300 + 4),0);
          if (DVar6 == 0xffffffff) {
            FUN_1401961b0();
          }
          FUN_1401568c0();
          local_358 = PTR_DAT_1403200a0;
          local_2f8 = _time64((__time64_t *)0x0);
          puVar9 = (undefined8 *)FUN_140196870(&local_2f8,&local_348,&DAT_140267828);
          pWVar17 = (LPCWSTR)*puVar9;
          local_148 = local_140;
          if (pWVar17 == (LPCWSTR)0x0) {
            local_148 = (undefined1 *)0x0;
          }
          else {
            iVar5 = lstrlenW(pWVar17);
            iVar5 = iVar5 + 1;
            if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
              FUN_14004ea80(0x80070057);
            }
            if (local_148 == local_140) {
              if (0x80 < iVar5) {
                puVar16 = calloc((longlong)iVar5,2);
                goto LAB_140197798;
              }
LAB_1401977aa:
              puVar16 = local_140;
            }
            else {
              if (iVar5 < 0x81) {
                free(local_148);
                goto LAB_1401977aa;
              }
              puVar16 = _recalloc(local_148,(longlong)iVar5,2);
              if (puVar16 == (undefined1 *)0x0) {
                    // WARNING: Subroutine does not return
                FUN_14004ea80(0x8007000e);
              }
LAB_140197798:
              if (puVar16 == (undefined1 *)0x0) {
                local_148 = puVar16;
                    // WARNING: Subroutine does not return
                FUN_14004ea80(0x8007000e);
              }
            }
            local_148 = puVar16;
            eVar8 = memcpy_s(puVar16,(longlong)iVar5 * 2,pWVar17,(longlong)iVar5 * 2);
            if (eVar8 != 0) {
              if (eVar8 == 0xc) {
                    // WARNING: Subroutine does not return
                FUN_14004ea80(0x8007000e);
              }
              if ((eVar8 == 0x16) || (eVar8 == 0x22)) {
                    // WARNING: Subroutine does not return
                FUN_14004ea80(0x80070057);
              }
              if (eVar8 != 0x50) {
                    // WARNING: Subroutine does not return
                FUN_14004ea80(0x80004005);
              }
            }
          }
          FUN_14004ce50(&local_358,L"-------- Log start at %s --------\r\n",local_148);
          if (local_148 != local_140) {
            free(local_148);
          }
          LOCK();
          piVar13 = (int *)(local_348 + -8);
          iVar5 = *piVar13;
          *piVar13 = *piVar13 + -1;
          UNLOCK();
          if (iVar5 + -1 < 1) {
            (**(code **)(**(longlong **)(local_348 + -0x18) + 8))();
          }
          puVar20 = local_358;
          puVar18 = PTR_DAT_1403200a0;
          if (local_358 != (undefined *)0x0) {
            piVar13 = piVar19;
            if (local_358 != PTR_DAT_1403200a0) {
              piVar13 = (int *)(ulonglong)*(uint *)(local_358 + -8);
            }
            iVar21 = (int)piVar13;
            puVar18 = local_358;
          }
          BVar7 = WriteFile((HANDLE)*param_1,puVar18,iVar21 * 2,local_2b8,(LPOVERLAPPED)0x0);
          if (BVar7 == 0) {
            FUN_1401961b0();
          }
          if (((puVar20 != (undefined *)0x0) && (puVar20 != PTR_DAT_1403200a0)) &&
             (puVar20 + -8 != (undefined *)0x0)) {
            uVar10 = FUN_1401568c0();
            local_298 = uVar10;
            FUN_140156b50(uVar10);
            local_290 = 1;
            piVar13 = (int *)(puVar20 + -4);
            *piVar13 = *piVar13 + -1;
            if (*piVar13 == 0) {
              FUN_140156970(puVar20 + -8);
            }
            FUN_140156be0(uVar10);
            local_290 = 0;
          }
          local_358 = PTR_DAT_1403200a0;
          puVar9 = local_368;
          puVar20 = local_370;
        }
        else if (iVar5 == 1) {
          piVar13 = piVar19;
          if (local_368 != (undefined8 *)0x0) {
            piVar13 = (int *)*local_368;
          }
          local_2b0 = *(undefined8 *)(piVar13 + 6);
          puVar12 = (undefined8 *)FUN_140196870(&local_2b0,&local_2d8,&DAT_140267828);
          uVar10 = *puVar12;
          piVar13 = piVar19;
          if (puVar9 != (undefined8 *)0x0) {
            piVar13 = (int *)*puVar9;
          }
          uVar14 = FUN_1401a4a50(piVar13[4]);
          FUN_14004ce50(&local_370,L"[%s] [%s] %s\r\n",uVar14,uVar10);
          LOCK();
          piVar13 = (int *)(local_2d8 + -8);
          iVar5 = *piVar13;
          *piVar13 = *piVar13 + -1;
          UNLOCK();
          if (iVar5 + -1 < 1) {
            (**(code **)(**(longlong **)(local_2d8 + -0x18) + 8))();
          }
          puVar20 = local_370;
          puVar18 = PTR_DAT_1403200a0;
          if (local_370 != (undefined *)0x0) {
            piVar13 = piVar19;
            if (local_370 != PTR_DAT_1403200a0) {
              piVar13 = (int *)(ulonglong)*(uint *)(local_370 + -8);
            }
            iVar21 = (int)piVar13;
            puVar18 = local_370;
          }
          BVar7 = WriteFile((HANDLE)*param_1,puVar18,iVar21 * 2,&local_2e4,(LPOVERLAPPED)0x0);
          puVar9 = local_368;
          if (BVar7 == 0) {
            FUN_1401961b0();
            puVar9 = local_368;
          }
        }
        else if (iVar5 == 2) {
          piVar13 = piVar19;
          if (local_368 != (undefined8 *)0x0) {
            piVar13 = (int *)*local_368;
          }
          puVar18 = *(undefined **)(piVar13 + 2);
          iVar5 = 0;
          if ((puVar18 != (undefined *)0x0) && (iVar5 = iVar21, puVar18 != PTR_DAT_1403200a0)) {
            iVar5 = *(int *)(puVar18 + -8);
          }
          piVar13 = piVar19;
          if (local_368 != (undefined8 *)0x0) {
            piVar13 = (int *)*local_368;
          }
          puVar18 = *(undefined **)(piVar13 + 2);
          if (*(undefined **)(piVar13 + 2) == (undefined *)0x0) {
            puVar18 = PTR_DAT_1403200a0;
          }
          BVar7 = WriteFile((HANDLE)*param_1,puVar18,iVar5 * 2,local_2e0,(LPOVERLAPPED)0x0);
          if (BVar7 == 0) {
            FUN_1401961b0();
          }
        }
LAB_1401978e9:
        puVar12 = local_368;
        if (puVar9 != (undefined8 *)0x0) {
          plVar11 = puVar9 + 1;
          *plVar11 = *plVar11 + -1;
          puVar20 = local_370;
          if (*plVar11 == 0) {
            pvVar2 = (void *)*local_368;
            if (pvVar2 != (void *)0x0) {
              FUN_14004f990((longlong)pvVar2 + 8);
              operator_delete(pvVar2);
            }
            FUN_140156970(puVar12);
            puVar20 = local_370;
          }
        }
      }
      if (((puVar20 != (undefined *)0x0) && (puVar20 != PTR_DAT_1403200a0)) &&
         (puVar20 + -8 != (undefined *)0x0)) {
        uVar10 = FUN_1401568c0();
        local_288 = uVar10;
        FUN_140156b50(uVar10);
        local_280 = 1;
        piVar13 = (int *)(puVar20 + -4);
        *piVar13 = *piVar13 + -1;
        if (*piVar13 == 0) {
          FUN_140156970(puVar20 + -8);
        }
        FUN_140156be0(uVar10);
        local_280 = 0;
      }
      local_370 = PTR_DAT_1403200a0;
      FUN_1401969b0(&local_340);
      if (local_340 != (undefined8 *)0x0) {
        (**(code **)*local_340)(local_340,1);
      }
    }
    cVar4 = *(char *)(param_1 + 0x10);
  } while( true );
}



void FUN_140197a30(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  *(undefined1 *)(param_1 + 0x10) = 1;
  FUN_140182710(param_1 + 0xb);
  FUN_1401969b0(param_1 + 0x11);
  puVar1 = (undefined8 *)param_1[0x11];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1,param_3,param_4,uVar2);
  }
  FUN_140182790(param_1 + 0xb);
  FUN_140156c00(param_1 + 3);
  CloseHandle((HANDLE)param_1[2]);
  if ((HANDLE)*param_1 != (HANDLE)0x0) {
    CloseHandle((HANDLE)*param_1);
    *param_1 = 0;
  }
  return;
}



undefined8 *
FUN_140197ae0(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  
  *param_1 = 0;
  param_1[1] = 0;
  FUN_1401aec30(param_1 + 2,0,0x7fffffff,param_4,0xfffffffffffffffe);
  uVar1 = FUN_14015a430();
  FUN_140156a70(param_1 + 3,uVar1,1);
  *(undefined1 *)(param_1 + 10) = 0;
  FUN_140182680(param_1 + 0xb,&LAB_140197ad0,param_1);
  param_1[0x11] = 0;
  param_1[0x14] = 0;
  param_1[0x12] = 0;
  param_1[0x13] = 0;
  *(undefined1 *)(param_1 + 0x10) = 0;
  return param_1;
}



undefined8 * FUN_140197b80(LPCWSTR param_1)

{
  int iVar1;
  BOOL BVar2;
  undefined8 *hFile;
  undefined8 *puVar3;
  undefined2 local_res10 [4];
  void *local_res18 [2];
  
  puVar3 = (undefined8 *)0x0;
  hFile = CreateFileW(param_1,0x40000000,1,(LPSECURITY_ATTRIBUTES)0x0,4,0x80,(HANDLE)0x0);
  if ((hFile == (undefined8 *)0xffffffffffffffff) &&
     (iVar1 = FUN_1401961b0(), hFile = puVar3, iVar1 < 0)) {
    puVar3 = (undefined8 *)0x0;
  }
  else {
    local_res10[0] = 0xfeff;
    BVar2 = WriteFile(hFile,local_res10,2,(LPDWORD)local_res18,(LPOVERLAPPED)0x0);
    if (BVar2 == 0) {
      FUN_1401961b0();
    }
    local_res18[0] = operator_new(0xc0);
    if (local_res18[0] != (void *)0x0) {
      puVar3 = (undefined8 *)FUN_140197ae0(local_res18[0]);
    }
    *puVar3 = hFile;
    FUN_140182870(puVar3 + 0xb);
    CloseHandle((HANDLE)0xffffffffffffffff);
  }
  return puVar3;
}



void FUN_140197c70(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x000140197c97. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



undefined8 * FUN_140197cb0(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_140197d10(longlong param_1,int param_2,int param_3)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  longlong lVar5;
  
  if ((-1 < param_2) && (-1 < param_3)) {
    iVar1 = *(int *)(param_1 + 0x18) - param_2;
    if (iVar1 <= param_3) {
      param_3 = iVar1;
    }
    if (0 < iVar1 - param_3) {
      lVar4 = (longlong)param_2 << 3;
      lVar5 = (longlong)(iVar1 - param_3);
      do {
        lVar2 = FUN_1401a7bb0(param_1);
        lVar3 = FUN_1401a7bb0(param_1);
        *(undefined8 *)(lVar3 + lVar4) = *(undefined8 *)((longlong)param_3 * 8 + lVar2 + lVar4);
        lVar4 = lVar4 + 8;
        lVar5 = lVar5 + -1;
      } while (lVar5 != 0);
    }
    FUN_14015d550(param_1,*(int *)(param_1 + 0x18) - param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



undefined8 FUN_140197dc0(char *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  char *pcVar1;
  DWORD DVar2;
  DWORD DVar3;
  longlong lVar4;
  longlong lVar5;
  int iVar6;
  undefined8 uVar7;
  char *pcVar8;
  undefined1 local_50 [72];
  
  uVar7 = 0xfffffffffffffffe;
  if (*param_1 != '\0') {
    FUN_140156300(local_50,L"ServerSocketPool is already destructed!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
  }
  DVar2 = GetTickCount();
  DVar3 = GetTickCount();
  if (DVar3 - DVar2 < 10000) {
    pcVar1 = param_1 + 0x30;
    do {
      pcVar8 = pcVar1;
      FUN_140156b50(pcVar1);
      if (0 < *(int *)(param_1 + 0x80)) {
        lVar4 = FUN_140156940(0x400);
        if (lVar4 == 0) {
          uVar7 = 0;
        }
        else {
          iVar6 = *(int *)(param_1 + 0x80) + -1;
          if ((iVar6 < 0) || (*(int *)(param_1 + 0x80) <= iVar6)) {
                    // WARNING: Subroutine does not return
            FUN_1401566e0();
          }
          uVar7 = FUN_140185d20(lVar4,*(undefined8 *)
                                       (*(longlong *)(param_1 + 0x78) + (longlong)iVar6 * 8),param_2
                                ,param_4,uVar7,pcVar8);
        }
        FUN_140197d10(param_1 + 0x68,*(int *)(param_1 + 0x80) + -1,1);
        FUN_140156be0(pcVar1);
        return uVar7;
      }
      FUN_140156be0(pcVar1);
      Sleep(1);
      DVar3 = GetTickCount();
    } while (DVar3 - DVar2 < 10000);
  }
  lVar4 = Ordinal_23(2,1,6);
  if (lVar4 == -1) {
    uVar7 = 0;
  }
  else {
    lVar5 = FUN_140156940(0x400);
    if (lVar5 == 0) {
      uVar7 = 0;
    }
    else {
      uVar7 = FUN_140185d20(lVar5,lVar4,param_2);
    }
  }
  return uVar7;
}



void FUN_140197f50(undefined1 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined1 *puVar1;
  ulonglong uVar2;
  int iVar3;
  ulonglong uVar4;
  undefined8 uVar5;
  undefined1 *puVar6;
  undefined1 uVar7;
  
  uVar5 = 0xfffffffffffffffe;
  *param_1 = 1;
  FUN_140182710(param_1 + 8);
  puVar1 = param_1 + 0x30;
  puVar6 = puVar1;
  FUN_140156b50(puVar1);
  uVar7 = 1;
  uVar2 = 0;
  uVar4 = uVar2;
  if (0 < *(int *)(param_1 + 0x80)) {
    do {
      if (((longlong)uVar2 < 0) || (iVar3 = (int)uVar4, *(int *)(param_1 + 0x80) <= iVar3)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      FUN_140187a00(*(undefined8 *)(*(longlong *)(param_1 + 0x78) + uVar2 * 8));
      if (*(int *)(param_1 + 0x80) <= iVar3) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      Ordinal_3(*(undefined8 *)(*(longlong *)(param_1 + 0x78) + uVar2 * 8));
      uVar4 = (ulonglong)(iVar3 + 1U);
      uVar2 = uVar2 + 1;
    } while ((int)(iVar3 + 1U) < *(int *)(param_1 + 0x80));
  }
  FUN_14015d550(param_1 + 0x68,0,param_3,param_4,uVar5,puVar6,uVar7);
  FUN_140156be0(puVar1);
  *(undefined ***)(param_1 + 0x68) = Proud::CFastArray<>::vftable;
  if (*(longlong *)(param_1 + 0x78) != 0) {
    if (*(longlong **)(param_1 + 0x70) == (longlong *)0x0) {
      FUN_140156970(*(longlong *)(param_1 + 0x78));
    }
    else {
      (**(code **)(**(longlong **)(param_1 + 0x70) + 0x18))();
    }
  }
  FUN_140156c00(puVar1);
  FUN_140182790(param_1 + 8);
  return;
}



void FUN_140198060(char *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  char *pcVar1;
  int iVar2;
  bool bVar3;
  longlong lVar4;
  longlong lVar5;
  longlong lVar6;
  int iVar7;
  longlong lVar8;
  longlong lVar9;
  undefined8 uVar10;
  char *pcVar11;
  
  uVar10 = 0xfffffffffffffffe;
  if (*param_1 == '\0') {
    pcVar1 = param_1 + 0x30;
    do {
      pcVar11 = pcVar1;
      FUN_140156b50(pcVar1);
      if (*(int *)(param_1 + 0x80) < 100) {
        FUN_140156be0(pcVar1);
        bVar3 = false;
        lVar4 = Ordinal_23(2,1,6,param_4,uVar10,pcVar11);
        if (lVar4 != -1) {
          bVar3 = true;
          FUN_140156b50(pcVar1);
          iVar2 = *(int *)(param_1 + 0x80);
          if (iVar2 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          iVar7 = *(int *)(param_1 + 0x80);
          FUN_14015d550(param_1 + 0x68,iVar7 + 1);
          iVar7 = iVar7 - iVar2;
          if ((0 < iVar7) && (iVar7 = iVar7 + -1, lVar8 = (longlong)iVar7, -1 < iVar7)) {
            lVar9 = (lVar8 + iVar2) * 8 + 8;
            do {
              lVar5 = FUN_1401a7bb0(param_1 + 0x68);
              lVar6 = FUN_1401a7bb0(param_1 + 0x68);
              *(undefined8 *)(lVar6 + lVar9) = *(undefined8 *)(lVar5 + -8 + lVar9);
              lVar9 = lVar9 + -8;
              lVar8 = lVar8 + -1;
            } while (-1 < lVar8);
          }
          lVar8 = FUN_1401a7bb0(param_1 + 0x68);
          *(longlong *)(lVar8 + (longlong)iVar2 * 8) = lVar4;
        }
      }
      else {
        FUN_140156be0(pcVar1);
        bVar3 = false;
        Sleep(10);
      }
      if (bVar3) {
        FUN_140156be0(pcVar1);
      }
    } while (*param_1 == '\0');
  }
  return;
}



undefined1 *
FUN_1401981f0(undefined1 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  
  FUN_140182680(param_1 + 8,&LAB_1401981e0,param_1,param_4,0xfffffffffffffffe);
  uVar1 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x30,uVar1,1);
  *(undefined ***)(param_1 + 0x68) = Proud::CFastArray<>::vftable;
  *(undefined8 *)(param_1 + 0x70) = 0;
  *(undefined8 *)(param_1 + 0x78) = 0;
  *(undefined8 *)(param_1 + 0x80) = 0;
  *(undefined8 *)(param_1 + 0x88) = 0;
  *param_1 = 0;
  FUN_140182870(param_1 + 8);
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140198270(void *param_1,byte *param_2,int param_3,int param_4)

{
  byte bVar1;
  uint uVar2;
  undefined4 uVar3;
  int iVar4;
  uint uVar5;
  uint *puVar6;
  int iVar7;
  void *pvVar8;
  int iVar9;
  longlong lVar10;
  ulonglong uVar11;
  int iVar12;
  int iVar13;
  uint *puVar14;
  longlong lVar15;
  byte *pbVar16;
  longlong lVar17;
  undefined1 auStack_d8 [32];
  int local_b8;
  undefined1 local_a8 [68];
  uint auStack_64 [9];
  ulonglong local_40;
  
  local_40 = DAT_1403223c0 ^ (ulonglong)auStack_d8;
  local_b8 = param_3;
  if (((param_3 != 0x10) && (param_3 != 0x18)) && (param_3 != 0x20)) {
    FUN_1401562a0(local_a8,"Incorrect key length");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_a8,(ThrowInfo *)&DAT_14031d928);
  }
  if (((param_4 != 0x10) && (param_4 != 0x18)) && (param_4 != 0x20)) {
    FUN_1401562a0(local_a8,"Incorrect block length");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_a8,(ThrowInfo *)&DAT_14031d928);
  }
  *(int *)((longlong)param_1 + 0x3c4) = param_4;
  if (param_3 == 0x10) {
    if (param_4 == 0x10) {
      uVar3 = 10;
    }
    else {
      uVar3 = 0xe;
      if (param_4 == 0x18) {
        uVar3 = 0xc;
      }
    }
  }
  else {
    if (param_3 != 0x18) {
      *(undefined4 *)((longlong)param_1 + 0x3c8) = 0xe;
      goto LAB_14019837f;
    }
    uVar3 = 0xe;
    if (param_4 != 0x20) {
      uVar3 = 0xc;
    }
  }
  *(undefined4 *)((longlong)param_1 + 0x3c8) = uVar3;
LAB_14019837f:
  iVar9 = 0;
  iVar4 = (int)(param_4 + (param_4 >> 0x1f & 3U)) >> 2;
  lVar15 = (longlong)iVar4;
  pvVar8 = param_1;
  if (-1 < *(int *)((longlong)param_1 + 0x3c8)) {
    do {
      if (0 < iVar4) {
        memset(pvVar8,0,lVar15 << 2);
      }
      iVar9 = iVar9 + 1;
      pvVar8 = (void *)((longlong)pvVar8 + 0x20);
    } while (iVar9 <= *(int *)((longlong)param_1 + 0x3c8));
  }
  iVar9 = 0;
  if (-1 < *(int *)((longlong)param_1 + 0x3c8)) {
    pvVar8 = (void *)((longlong)param_1 + 0x1e0);
    do {
      if (0 < iVar4) {
        memset(pvVar8,0,lVar15 << 2);
      }
      iVar9 = iVar9 + 1;
      pvVar8 = (void *)((longlong)pvVar8 + 0x20);
    } while (iVar9 <= *(int *)((longlong)param_1 + 0x3c8));
  }
  puVar6 = auStack_64;
  iVar9 = (*(int *)((longlong)param_1 + 0x3c8) + 1) * iVar4;
  uVar5 = (int)(param_3 + (param_3 >> 0x1f & 3U)) >> 2;
  lVar17 = (longlong)(int)uVar5;
  if (0 < (int)uVar5) {
    uVar11 = (ulonglong)uVar5;
    do {
      puVar6 = puVar6 + 1;
      bVar1 = param_2[2];
      *puVar6 = (uint)*param_2 << 0x18;
      *puVar6 = *puVar6 | (uint)param_2[1] << 0x10;
      *puVar6 = *puVar6 | (uint)bVar1 << 8;
      *puVar6 = *puVar6 | (uint)param_2[3];
      uVar11 = uVar11 - 1;
      param_2 = param_2 + 4;
    } while (uVar11 != 0);
  }
  iVar7 = 0;
  lVar10 = 0;
  iVar12 = iVar7;
  if (0 < (int)uVar5) {
    do {
      iVar12 = iVar7;
      if (iVar9 <= iVar7) break;
      uVar2 = auStack_64[lVar10 + 1];
      lVar10 = lVar10 + 1;
      iVar12 = iVar7 + 1;
      *(uint *)((longlong)param_1 + ((longlong)(iVar7 % iVar4) + (longlong)(iVar7 / iVar4) * 8) * 4)
           = uVar2;
      *(uint *)((longlong)param_1 +
               ((longlong)(iVar7 % iVar4) + 0x78 +
               ((longlong)*(int *)((longlong)param_1 + 0x3c8) - (longlong)(iVar7 / iVar4)) * 8) * 4)
           = uVar2;
      iVar7 = iVar12;
    } while (lVar10 < lVar17);
  }
  iVar7 = 1;
  if (iVar12 < iVar9) {
    pbVar16 = &DAT_14026b440;
    do {
      uVar11 = (ulonglong)(int)auStack_64[lVar17];
      auStack_64[1] =
           auStack_64[1] ^
           CONCAT31(CONCAT21(CONCAT11((&DAT_140268240)[(longlong)uVar11 >> 0x10 & 0xff] ^ *pbVar16,
                                      (&DAT_140268240)[(longlong)uVar11 >> 8 & 0xff]),
                             (&DAT_140268240)[uVar11 & 0xff]),
                    (&DAT_140268240)[auStack_64[lVar17] >> 0x18]);
      if (uVar5 == 8) {
        lVar10 = 3;
        puVar6 = auStack_64 + 2;
        do {
          *puVar6 = *puVar6 ^ puVar6[-1];
          lVar10 = lVar10 + -1;
          puVar6 = puVar6 + 1;
        } while (lVar10 != 0);
        uVar11 = (ulonglong)(int)auStack_64[4];
        lVar10 = 5;
        auStack_64[5] =
             auStack_64[5] ^
             CONCAT31(CONCAT21(CONCAT11((&DAT_140268240)[auStack_64[4] >> 0x18],
                                        (&DAT_140268240)[(longlong)uVar11 >> 0x10 & 0xff]),
                               (&DAT_140268240)[(longlong)uVar11 >> 8 & 0xff]),
                      (&DAT_140268240)[uVar11 & 0xff]);
        do {
          puVar6 = auStack_64 + lVar10;
          lVar10 = lVar10 + 1;
          auStack_64[lVar10] = auStack_64[lVar10] ^ *puVar6;
        } while (lVar10 < 8);
      }
      else {
        lVar10 = 1;
        if (1 < lVar17) {
          do {
            puVar6 = auStack_64 + lVar10;
            lVar10 = lVar10 + 1;
            auStack_64[lVar10] = auStack_64[lVar10] ^ *puVar6;
          } while (lVar10 < lVar17);
        }
      }
      lVar10 = 0;
      iVar13 = iVar12;
      param_3 = local_b8;
      if (0 < (int)uVar5) {
        do {
          if (iVar9 <= iVar13) goto LAB_140198665;
          uVar2 = auStack_64[lVar10 + 1];
          lVar10 = lVar10 + 1;
          iVar12 = iVar13 + 1;
          *(uint *)((longlong)param_1 +
                   ((longlong)(iVar13 % iVar4) + (longlong)(iVar13 / iVar4) * 8) * 4) = uVar2;
          *(uint *)((longlong)param_1 +
                   ((longlong)(iVar13 % iVar4) + 0x78 +
                   ((longlong)*(int *)((longlong)param_1 + 0x3c8) - (longlong)(iVar13 / iVar4)) * 8)
                   * 4) = uVar2;
          iVar13 = iVar12;
        } while (lVar10 < lVar17);
      }
      pbVar16 = pbVar16 + 1;
    } while (iVar12 < iVar9);
  }
LAB_140198665:
  if (1 < *(int *)((longlong)param_1 + 0x3c8)) {
    puVar6 = (uint *)((longlong)param_1 + 0x200);
    do {
      puVar14 = puVar6;
      lVar17 = lVar15;
      if (0 < lVar15) {
        do {
          uVar11 = (ulonglong)(int)*puVar14;
          lVar17 = lVar17 + -1;
          *puVar14 = *(uint *)(&DAT_14026a440 + (ulonglong)(*puVar14 >> 0x18) * 4) ^
                     *(uint *)(&DAT_14026a840 + ((longlong)uVar11 >> 0x10 & 0xffU) * 4) ^
                     *(uint *)(&DAT_14026ac40 + ((longlong)uVar11 >> 8 & 0xffU) * 4) ^
                     *(uint *)(&DAT_14026b040 + (uVar11 & 0xff) * 4);
          puVar14 = puVar14 + 1;
        } while (lVar17 != 0);
      }
      iVar7 = iVar7 + 1;
      puVar6 = puVar6 + 8;
    } while (iVar7 < *(int *)((longlong)param_1 + 0x3c8));
  }
  *(int *)((longlong)param_1 + 0x3c0) = param_3;
  return;
}



bool FUN_140198740(longlong param_1)

{
  return 0 < *(int *)(param_1 + 0x3c0);
}



void FUN_140198750(longlong param_1)

{
  *(undefined4 *)(param_1 + 0x3c0) = 0;
  return;
}



void FUN_140198760(byte *param_1,byte *param_2,uint *param_3)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  uint uVar8;
  uint *puVar9;
  uint uVar10;
  ulonglong uVar11;
  undefined1 local_78 [80];
  
  if ((int)param_3[0xf0] < 1) {
    FUN_140156300(local_78,L"aes key is not initialized");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
  }
  uVar1 = ((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[2] << 8 |
          (uint)param_1[3]) ^ *param_3;
  uVar10 = param_3[0xf2];
  uVar3 = ((uint)param_1[4] << 0x18 | (uint)param_1[5] << 0x10 | (uint)param_1[6] << 8 |
          (uint)param_1[7]) ^ param_3[1];
  uVar2 = ((uint)param_1[8] << 0x18 | (uint)param_1[9] << 0x10 | (uint)param_1[10] << 8 |
          (uint)param_1[0xb]) ^ param_3[2];
  uVar8 = ((uint)CONCAT11(param_1[0xe],param_1[0xf]) |
          (uint)param_1[0xc] << 0x18 | (uint)param_1[0xd] << 0x10) ^ param_3[3];
  if (1 < (int)uVar10) {
    uVar11 = (ulonglong)(uVar10 - 1);
    puVar9 = param_3 + 10;
    do {
      uVar5 = (ulonglong)(int)uVar3;
      uVar6 = (ulonglong)(int)uVar2;
      uVar7 = (ulonglong)(int)uVar8;
      uVar4 = (ulonglong)(int)uVar1;
      uVar3 = *(uint *)(&DAT_140268440 + ((longlong)uVar5 >> 0x18 & 0xffU) * 4) ^
              *(uint *)(&DAT_140268840 + ((longlong)uVar6 >> 0x10 & 0xffU) * 4) ^
              *(uint *)(&DAT_140268c40 + ((longlong)uVar7 >> 8 & 0xffU) * 4) ^
              *(uint *)(&DAT_140269040 + (uVar4 & 0xff) * 4) ^ puVar9[-1];
      uVar2 = *(uint *)(&DAT_140268c40 + ((longlong)uVar4 >> 8 & 0xffU) * 4) ^
              *(uint *)(&DAT_140268440 + ((longlong)uVar6 >> 0x18 & 0xffU) * 4) ^
              *(uint *)(&DAT_140268840 + ((longlong)uVar7 >> 0x10 & 0xffU) * 4) ^
              *(uint *)(&DAT_140269040 + (uVar5 & 0xff) * 4) ^ *puVar9;
      uVar8 = *(uint *)(&DAT_140268840 + ((longlong)uVar4 >> 0x10 & 0xffU) * 4) ^
              *(uint *)(&DAT_140268c40 + ((longlong)uVar5 >> 8 & 0xffU) * 4) ^
              *(uint *)(&DAT_140268440 + ((longlong)uVar7 >> 0x18 & 0xffU) * 4) ^
              *(uint *)(&DAT_140269040 + (uVar6 & 0xff) * 4) ^ puVar9[1];
      uVar1 = *(uint *)(&DAT_140268440 + (ulonglong)(uVar1 >> 0x18) * 4) ^
              *(uint *)(&DAT_140268840 + ((longlong)uVar5 >> 0x10 & 0xffU) * 4) ^
              *(uint *)(&DAT_140268c40 + ((longlong)uVar6 >> 8 & 0xffU) * 4) ^
              *(uint *)(&DAT_140269040 + (uVar7 & 0xff) * 4) ^ puVar9[-2];
      uVar11 = uVar11 - 1;
      puVar9 = puVar9 + 8;
    } while (uVar11 != 0);
    uVar10 = param_3[0xf2];
  }
  uVar6 = (ulonglong)(int)uVar2;
  uVar5 = (ulonglong)(int)uVar8;
  param_3 = param_3 + (longlong)(int)uVar10 * 8;
  uVar4 = (ulonglong)(int)uVar1;
  uVar11 = (ulonglong)(int)uVar3;
  uVar10 = *param_3;
  *param_2 = (&DAT_140268240)[(longlong)uVar4 >> 0x18 & 0xff] ^ (byte)(uVar10 >> 0x18);
  param_2[1] = (&DAT_140268240)[(longlong)uVar11 >> 0x10 & 0xff] ^ (byte)(uVar10 >> 0x10);
  param_2[2] = (&DAT_140268240)[(longlong)uVar6 >> 8 & 0xff] ^ (byte)(uVar10 >> 8);
  param_2[3] = (&DAT_140268240)[uVar5 & 0xff] ^ (byte)uVar10;
  uVar10 = param_3[1];
  param_2[4] = (&DAT_140268240)[(longlong)uVar11 >> 0x18 & 0xff] ^ (byte)(uVar10 >> 0x18);
  param_2[5] = (&DAT_140268240)[(longlong)uVar6 >> 0x10 & 0xff] ^ (byte)(uVar10 >> 0x10);
  param_2[6] = (&DAT_140268240)[(longlong)uVar5 >> 8 & 0xff] ^ (byte)(uVar10 >> 8);
  param_2[7] = (&DAT_140268240)[uVar4 & 0xff] ^ (byte)uVar10;
  uVar10 = param_3[2];
  param_2[8] = (&DAT_140268240)[(longlong)uVar6 >> 0x18 & 0xff] ^ (byte)(uVar10 >> 0x18);
  param_2[9] = (&DAT_140268240)[(longlong)uVar5 >> 0x10 & 0xff] ^ (byte)(uVar10 >> 0x10);
  param_2[10] = (&DAT_140268240)[(longlong)uVar4 >> 8 & 0xff] ^ (byte)(uVar10 >> 8);
  param_2[0xb] = (&DAT_140268240)[uVar11 & 0xff] ^ (byte)uVar10;
  uVar10 = param_3[3];
  param_2[0xc] = (&DAT_140268240)[(longlong)uVar5 >> 0x18 & 0xff] ^ (byte)(uVar10 >> 0x18);
  param_2[0xd] = (&DAT_140268240)[(longlong)uVar4 >> 0x10 & 0xff] ^ (byte)(uVar10 >> 0x10);
  param_2[0xe] = (&DAT_140268240)[(longlong)uVar11 >> 8 & 0xff] ^ (byte)(uVar10 >> 8);
  param_2[0xf] = (&DAT_140268240)[uVar6 & 0xff] ^ (byte)uVar10;
  return;
}



void FUN_140198be0(byte *param_1,byte *param_2,longlong param_3)

{
  undefined4 uVar1;
  uint *puVar2;
  undefined4 *puVar3;
  uint uVar4;
  uint uVar5;
  uint uVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  uint uVar11;
  int iVar12;
  ulonglong uVar13;
  undefined1 local_78 [80];
  
  if (*(int *)(param_3 + 0x3c0) < 1) {
    FUN_140156300(local_78,L"aes key is not initialized");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_78,(ThrowInfo *)&DAT_14031d928);
  }
  iVar12 = *(int *)(param_3 + 0x3c8);
  uVar6 = ((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[2] << 8 |
          (uint)param_1[3]) ^ *(uint *)(param_3 + 0x1e0);
  uVar5 = ((uint)param_1[4] << 0x18 | (uint)param_1[5] << 0x10 | (uint)param_1[6] << 8 |
          (uint)param_1[7]) ^ *(uint *)(param_3 + 0x1e4);
  uVar4 = ((uint)param_1[8] << 0x18 | (uint)param_1[9] << 0x10 | (uint)param_1[10] << 8 |
          (uint)param_1[0xb]) ^ *(uint *)(param_3 + 0x1e8);
  uVar11 = ((uint)CONCAT11(param_1[0xe],param_1[0xf]) |
           (uint)param_1[0xc] << 0x18 | (uint)param_1[0xd] << 0x10) ^ *(uint *)(param_3 + 0x1ec);
  if (1 < iVar12) {
    uVar13 = (ulonglong)(iVar12 - 1);
    puVar2 = (uint *)(param_3 + 0x208);
    do {
      uVar10 = (ulonglong)(int)uVar5;
      uVar9 = (ulonglong)(int)uVar11;
      uVar8 = (ulonglong)(int)uVar4;
      uVar7 = (ulonglong)(int)uVar6;
      uVar5 = *(uint *)(&DAT_140269840 + ((longlong)uVar7 >> 0x10 & 0xffU) * 4) ^
              *(uint *)(&DAT_140269440 + ((longlong)uVar10 >> 0x18 & 0xffU) * 4) ^
              *(uint *)(&DAT_140269c40 + ((longlong)uVar9 >> 8 & 0xffU) * 4) ^
              *(uint *)(&DAT_14026a040 + (uVar8 & 0xff) * 4) ^ puVar2[-1];
      uVar4 = *(uint *)(&DAT_140269440 + ((longlong)uVar8 >> 0x18 & 0xffU) * 4) ^
              *(uint *)(&DAT_140269c40 + ((longlong)uVar7 >> 8 & 0xffU) * 4) ^
              *(uint *)(&DAT_140269840 + ((longlong)uVar10 >> 0x10 & 0xffU) * 4) ^
              *(uint *)(&DAT_14026a040 + (uVar9 & 0xff) * 4) ^ *puVar2;
      uVar11 = *(uint *)(&DAT_140269840 + ((longlong)uVar8 >> 0x10 & 0xffU) * 4) ^
               *(uint *)(&DAT_140269c40 + ((longlong)uVar10 >> 8 & 0xffU) * 4) ^
               *(uint *)(&DAT_140269440 + ((longlong)uVar9 >> 0x18 & 0xffU) * 4) ^
               *(uint *)(&DAT_14026a040 + (uVar7 & 0xff) * 4) ^ puVar2[1];
      uVar6 = *(uint *)(&DAT_140269440 + (ulonglong)(uVar6 >> 0x18) * 4) ^
              *(uint *)(&DAT_140269c40 + ((longlong)uVar8 >> 8 & 0xffU) * 4) ^
              *(uint *)(&DAT_140269840 + ((longlong)uVar9 >> 0x10 & 0xffU) * 4) ^
              *(uint *)(&DAT_14026a040 + (uVar10 & 0xff) * 4) ^ puVar2[-2];
      uVar13 = uVar13 - 1;
      puVar2 = puVar2 + 8;
    } while (uVar13 != 0);
    iVar12 = *(int *)(param_3 + 0x3c8);
  }
  uVar13 = (ulonglong)(int)uVar6;
  uVar8 = (ulonglong)(int)uVar4;
  uVar9 = (ulonglong)(int)uVar11;
  uVar7 = (ulonglong)(int)uVar5;
  puVar3 = (undefined4 *)(((longlong)iVar12 + 0xf) * 0x20 + param_3);
  uVar1 = *puVar3;
  *param_2 = (&DAT_140268340)[(longlong)uVar13 >> 0x18 & 0xff] ^ (byte)((uint)uVar1 >> 0x18);
  param_2[1] = (&DAT_140268340)[(longlong)uVar9 >> 0x10 & 0xff] ^ (byte)((uint)uVar1 >> 0x10);
  param_2[2] = (&DAT_140268340)[(longlong)uVar8 >> 8 & 0xff] ^ (byte)((uint)uVar1 >> 8);
  param_2[3] = (&DAT_140268340)[uVar7 & 0xff] ^ (byte)uVar1;
  uVar1 = puVar3[1];
  param_2[4] = (&DAT_140268340)[(longlong)uVar7 >> 0x18 & 0xff] ^ (byte)((uint)uVar1 >> 0x18);
  param_2[5] = (&DAT_140268340)[(longlong)uVar13 >> 0x10 & 0xff] ^ (byte)((uint)uVar1 >> 0x10);
  param_2[6] = (&DAT_140268340)[(longlong)uVar9 >> 8 & 0xff] ^ (byte)((uint)uVar1 >> 8);
  param_2[7] = (&DAT_140268340)[uVar8 & 0xff] ^ (byte)uVar1;
  uVar1 = puVar3[2];
  param_2[8] = (&DAT_140268340)[(longlong)uVar8 >> 0x18 & 0xff] ^ (byte)((uint)uVar1 >> 0x18);
  param_2[9] = (&DAT_140268340)[(longlong)uVar7 >> 0x10 & 0xff] ^ (byte)((uint)uVar1 >> 0x10);
  param_2[10] = (&DAT_140268340)[(longlong)uVar13 >> 8 & 0xff] ^ (byte)((uint)uVar1 >> 8);
  param_2[0xb] = (&DAT_140268340)[uVar9 & 0xff] ^ (byte)uVar1;
  uVar1 = puVar3[3];
  param_2[0xc] = (&DAT_140268340)[(longlong)uVar9 >> 0x18 & 0xff] ^ (byte)((uint)uVar1 >> 0x18);
  param_2[0xd] = (&DAT_140268340)[(longlong)uVar8 >> 0x10 & 0xff] ^ (byte)((uint)uVar1 >> 0x10);
  param_2[0xe] = (&DAT_140268340)[(longlong)uVar7 >> 8 & 0xff] ^ (byte)((uint)uVar1 >> 8);
  param_2[0xf] = (&DAT_140268340)[uVar13 & 0xff] ^ (byte)uVar1;
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

void FUN_140199070(byte *param_1,byte *param_2,longlong param_3)

{
  int iVar1;
  longlong lVar2;
  undefined4 uVar3;
  int iVar4;
  longlong lVar5;
  int iVar6;
  uint *puVar7;
  int iVar8;
  int iVar9;
  int iVar10;
  longlong lVar11;
  longlong lVar12;
  longlong lVar13;
  undefined1 auStack_118 [32];
  int local_f8;
  int local_f4;
  int local_f0;
  ulonglong local_e8;
  size_t local_e0;
  byte *local_d8;
  longlong local_d0;
  undefined1 local_c8 [72];
  undefined4 local_80;
  uint auStack_64 [9];
  ulonglong local_40;
  
  local_40 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  local_d8 = param_2;
  local_d0 = param_3;
  if (0 < *(int *)(param_3 + 0x3c0)) {
    iVar4 = *(int *)(param_3 + 0x3c4);
    if (iVar4 == 0x10) {
      FUN_140198760();
    }
    else {
      lVar11 = 0;
      iVar4 = (int)(iVar4 + (iVar4 >> 0x1f & 3U)) >> 2;
      iVar6 = 0;
      lVar12 = (longlong)iVar4;
      if (iVar4 != 4) {
        iVar6 = (iVar4 != 6) + 1;
      }
      lVar5 = (longlong)iVar6 * 0x20;
      iVar6 = *(int *)(&DAT_14026b468 + lVar5);
      local_f8 = *(int *)(&DAT_14026b470 + lVar5);
      iVar9 = *(int *)(&DAT_14026b478 + lVar5);
      puVar7 = &local_80;
      lVar5 = lVar11;
      if (0 < iVar4) {
        do {
          lVar5 = lVar5 + 1;
          *puVar7 = (uint)*param_1 << 0x18;
          *puVar7 = *puVar7 | (uint)param_1[1] << 0x10;
          *puVar7 = *puVar7 | (uint)param_1[2] << 8;
          *puVar7 = *puVar7 | (uint)param_1[3];
          *puVar7 = *puVar7 ^ *(uint *)(param_3 + -4 + lVar5 * 4);
          puVar7 = puVar7 + 1;
          param_1 = param_1 + 4;
        } while (lVar5 < lVar12);
      }
      if (1 < *(int *)(param_3 + 0x3c8)) {
        lVar5 = param_3 - (longlong)&local_80;
        local_e0 = (size_t)(iVar4 * 4);
        local_e8 = (ulonglong)(*(int *)(param_3 + 0x3c8) - 1);
        local_f4 = iVar6;
        local_f0 = iVar9;
        do {
          lVar5 = lVar5 + 0x20;
          if (0 < iVar4) {
            iVar10 = local_f8 - iVar6;
            iVar8 = iVar9 - iVar6;
            lVar13 = lVar11;
            iVar1 = iVar6;
            do {
              lVar2 = lVar13 * 4;
              lVar13 = lVar13 + 1;
              auStack_64[lVar13] =
                   *(uint *)(&DAT_140268c40 +
                            ((longlong)(ulonglong)(uint)(&local_80)[(iVar10 + iVar1) % iVar4] >> 8 &
                            0xffU) * 4) ^
                   *(uint *)(&DAT_140269040 +
                            (ulonglong)*(byte *)(&local_80 + (iVar8 + iVar1) % iVar4) * 4) ^
                   *(uint *)(&DAT_140268840 +
                            ((longlong)(ulonglong)(uint)(&local_80)[iVar1 % iVar4] >> 0x10 & 0xffU)
                            * 4) ^
                   *(uint *)(&DAT_140268440 +
                            (ulonglong)*(byte *)((longlong)&local_80 + lVar2 + 3) * 4) ^
                   *(uint *)((longlong)auStack_64 + lVar5 + lVar2 + 0xffffffffffffffe4U);
              iVar6 = local_f4;
              iVar9 = local_f0;
              iVar1 = iVar1 + 1;
            } while (lVar13 < lVar12);
          }
          memcpy(&local_80,auStack_64 + 1,local_e0);
          local_e8 = local_e8 - 1;
          param_2 = local_d8;
          param_3 = local_d0;
        } while (local_e8 != 0);
      }
      if (0 < iVar4) {
        iVar6 = iVar6 - local_f8;
        iVar9 = iVar9 - local_f8;
        do {
          lVar5 = lVar11 + (longlong)*(int *)(param_3 + 0x3c8) * 8;
          lVar13 = lVar11 * 4;
          lVar11 = lVar11 + 1;
          uVar3 = *(undefined4 *)(param_3 + lVar5 * 4);
          *param_2 = (&DAT_140268240)[*(byte *)((longlong)&local_80 + lVar13 + 3)] ^
                     (byte)((uint)uVar3 >> 0x18);
          param_2[1] = (&DAT_140268240)
                       [(longlong)(ulonglong)(uint)(&local_80)[(local_f8 + iVar6) % iVar4] >> 0x10 &
                        0xff] ^ (byte)((uint)uVar3 >> 0x10);
          param_2[2] = (&DAT_140268240)
                       [(longlong)(ulonglong)(uint)(&local_80)[local_f8 % iVar4] >> 8 & 0xff] ^
                       (byte)((uint)uVar3 >> 8);
          iVar1 = local_f8 + iVar9;
          local_f8 = local_f8 + 1;
          param_2[3] = (&DAT_140268240)[*(byte *)(&local_80 + iVar1 % iVar4)] ^ (byte)uVar3;
          param_2 = param_2 + 4;
        } while (lVar11 < lVar12);
      }
    }
    return;
  }
  FUN_140156300(local_c8,L"aes key is not initialized");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_c8,(ThrowInfo *)&DAT_14031d928);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

void FUN_140199420(byte *param_1,byte *param_2,longlong param_3)

{
  longlong lVar1;
  undefined4 uVar2;
  int iVar3;
  longlong lVar4;
  int iVar5;
  uint *puVar6;
  int iVar7;
  int iVar8;
  uint *puVar9;
  int iVar10;
  longlong lVar11;
  longlong lVar12;
  ulonglong uVar13;
  undefined1 auStack_118 [32];
  int local_f8;
  int local_f4;
  int local_ec;
  size_t local_e8;
  byte *local_e0;
  longlong local_d8;
  undefined1 local_d0 [72];
  undefined4 local_88;
  uint auStack_6c [9];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  local_e0 = param_2;
  local_d8 = param_3;
  if (0 < *(int *)(param_3 + 0x3c0)) {
    iVar3 = *(int *)(param_3 + 0x3c4);
    if (iVar3 == 0x10) {
      FUN_140198be0();
    }
    else {
      iVar5 = 0;
      iVar3 = (int)(iVar3 + (iVar3 >> 0x1f & 3U)) >> 2;
      lVar11 = (longlong)iVar3;
      if (iVar3 != 4) {
        iVar5 = (iVar3 != 6) + 1;
      }
      lVar4 = (longlong)iVar5 * 0x20;
      iVar5 = *(int *)(&DAT_14026b46c + lVar4);
      local_f4 = *(int *)(&DAT_14026b474 + lVar4);
      local_f8 = *(int *)(&DAT_14026b47c + lVar4);
      if (0 < iVar3) {
        puVar6 = &local_88;
        puVar9 = (uint *)(param_3 + 0x1e0);
        lVar4 = lVar11;
        do {
          *puVar6 = (uint)*param_1 << 0x18;
          *puVar6 = *puVar6 | (uint)param_1[1] << 0x10;
          *puVar6 = *puVar6 | (uint)param_1[2] << 8;
          *puVar6 = *puVar6 | (uint)param_1[3];
          *puVar6 = *puVar6 ^ *puVar9;
          lVar4 = lVar4 + -1;
          puVar6 = puVar6 + 1;
          puVar9 = puVar9 + 1;
          param_1 = param_1 + 4;
        } while (lVar4 != 0);
      }
      if (1 < *(int *)(param_3 + 0x3c8)) {
        uVar13 = (ulonglong)(*(int *)(param_3 + 0x3c8) - 1);
        local_e8 = (size_t)(iVar3 * 4);
        lVar4 = (param_3 - (longlong)&local_88) + 0x200;
        local_ec = iVar5;
        do {
          lVar12 = 0;
          if (0 < iVar3) {
            iVar10 = local_f4 - iVar5;
            iVar8 = local_f8 - iVar5;
            iVar7 = iVar5;
            do {
              lVar1 = lVar12 * 4;
              lVar12 = lVar12 + 1;
              auStack_6c[lVar12] =
                   *(uint *)(&DAT_140269c40 +
                            ((longlong)(ulonglong)(uint)(&local_88)[(iVar10 + iVar7) % iVar3] >> 8 &
                            0xffU) * 4) ^
                   *(uint *)(&DAT_14026a040 +
                            (ulonglong)*(byte *)(&local_88 + (iVar8 + iVar7) % iVar3) * 4) ^
                   *(uint *)(&DAT_140269840 +
                            ((longlong)(ulonglong)(uint)(&local_88)[iVar7 % iVar3] >> 0x10 & 0xffU)
                            * 4) ^
                   *(uint *)(&DAT_140269440 +
                            (ulonglong)*(byte *)((longlong)&local_88 + lVar1 + 3) * 4) ^
                   *(uint *)((longlong)&local_88 + lVar4 + lVar1);
              iVar7 = iVar7 + 1;
              iVar5 = local_ec;
            } while (lVar12 < lVar11);
          }
          memcpy(&local_88,auStack_6c + 1,local_e8);
          lVar4 = lVar4 + 0x20;
          uVar13 = uVar13 - 1;
          param_3 = local_d8;
          param_2 = local_e0;
        } while (uVar13 != 0);
      }
      lVar4 = 0;
      if (0 < iVar3) {
        iVar5 = iVar5 - local_f4;
        local_f8 = local_f8 - local_f4;
        do {
          lVar12 = lVar4 + 0x78;
          lVar1 = lVar4 * 4;
          lVar4 = lVar4 + 1;
          uVar2 = *(undefined4 *)(param_3 + (lVar12 + (longlong)*(int *)(param_3 + 0x3c8) * 8) * 4);
          *param_2 = (&DAT_140268340)[*(byte *)((longlong)&local_88 + lVar1 + 3)] ^
                     (byte)((uint)uVar2 >> 0x18);
          param_2[1] = (&DAT_140268340)
                       [(longlong)(ulonglong)(uint)(&local_88)[(local_f4 + iVar5) % iVar3] >> 0x10 &
                        0xff] ^ (byte)((uint)uVar2 >> 0x10);
          param_2[2] = (&DAT_140268340)
                       [(longlong)(ulonglong)(uint)(&local_88)[local_f4 % iVar3] >> 8 & 0xff] ^
                       (byte)((uint)uVar2 >> 8);
          iVar7 = local_f4 + local_f8;
          local_f4 = local_f4 + 1;
          param_2[3] = (&DAT_140268340)[*(byte *)(&local_88 + iVar7 % iVar3)] ^ (byte)uVar2;
          param_2 = param_2 + 4;
        } while (lVar4 < lVar11);
      }
    }
    return;
  }
  FUN_140156300(local_d0,L"aes key is not initialized");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_d0,(ThrowInfo *)&DAT_14031d928);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401997d0(longlong param_1,longlong param_2,byte *param_3,ulonglong param_4,int param_5)

{
  int iVar1;
  undefined1 auVar2 [16];
  undefined1 auVar3 [16];
  ulonglong uVar4;
  byte *pbVar5;
  ulonglong uVar6;
  uint uVar7;
  undefined1 auStack_c8 [32];
  undefined1 local_a8 [72];
  byte local_60 [32];
  ulonglong local_40;
  
  local_40 = DAT_1403223c0 ^ (ulonglong)auStack_c8;
  if (*(int *)(param_1 + 0x3c0) < 1) {
    FUN_140156300(local_a8,L"aes key is not initialized");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_a8,(ThrowInfo *)&DAT_14031d928);
  }
  if (param_4 != 0) {
    uVar6 = (ulonglong)*(int *)(param_1 + 0x3c4);
    auVar2._8_8_ = 0;
    auVar2._0_8_ = uVar6;
    auVar3._8_8_ = 0;
    auVar3._0_8_ = param_4;
    uVar4 = param_4 / uVar6;
    if (SUB168(auVar3 % auVar2,0) == 0) {
      local_60[1] = 0;
      local_60[2] = 0;
      local_60[3] = 0;
      local_60[4] = 0;
      local_60[5] = 0;
      local_60[6] = 0;
      local_60[7] = 0;
      local_60[8] = 0;
      local_60[9] = 0;
      local_60[10] = 0;
      local_60[0xb] = 0;
      local_60[0xc] = 0;
      local_60[0xd] = 0;
      local_60[0xe] = 0;
      local_60[0xf] = 0;
      local_60[0x10] = 0;
      local_60[0x11] = 0;
      local_60[0x12] = 0;
      local_60[0x13] = 0;
      local_60[0x14] = 0;
      local_60[0x15] = 0;
      local_60[0x16] = 0;
      local_60[0x17] = 0;
      local_60[0x18] = 0;
      local_60[0x19] = 0;
      local_60[0x1a] = 0;
      local_60[0x1b] = 0;
      local_60[0x1c] = 0;
      local_60[0x1d] = 0;
      local_60[0x1e] = 0;
      local_60[0x1f] = 0;
      uVar7 = 0;
      local_60[0] = SUB161(auVar3 % auVar2,0);
      if (param_5 == 1) {
        if (uVar4 != 0) {
          do {
            if (0 < (int)uVar6) {
              uVar6 = uVar6 & 0xffffffff;
              pbVar5 = local_60;
              do {
                *pbVar5 = *pbVar5 ^ pbVar5[param_2 - (longlong)local_60];
                uVar6 = uVar6 - 1;
                pbVar5 = pbVar5 + 1;
              } while (uVar6 != 0);
            }
            FUN_140199070(local_60,param_3,param_1);
            uVar6 = (ulonglong)*(int *)(param_1 + 0x3c4);
            memcpy(local_60,param_3,uVar6);
            uVar7 = uVar7 + 1;
            param_2 = param_2 + *(int *)(param_1 + 0x3c4);
            param_3 = param_3 + *(int *)(param_1 + 0x3c4);
          } while ((ulonglong)uVar7 < param_4 / uVar6);
        }
      }
      else if (param_5 == 2) {
        if (uVar4 != 0) {
          do {
            FUN_140199070(local_60,param_3,param_1);
            if (0 < (int)*(uint *)(param_1 + 0x3c4)) {
              uVar4 = (ulonglong)*(uint *)(param_1 + 0x3c4);
              pbVar5 = param_3;
              do {
                *pbVar5 = *pbVar5 ^ pbVar5[param_2 - (longlong)param_3];
                uVar4 = uVar4 - 1;
                pbVar5 = pbVar5 + 1;
              } while (uVar4 != 0);
            }
            iVar1 = *(int *)(param_1 + 0x3c4);
            memcpy(local_60,param_3,(longlong)iVar1);
            uVar7 = uVar7 + 1;
            param_2 = param_2 + *(int *)(param_1 + 0x3c4);
            param_3 = param_3 + *(int *)(param_1 + 0x3c4);
          } while ((ulonglong)uVar7 < param_4 / (ulonglong)(longlong)iVar1);
        }
      }
      else if (uVar4 != 0) {
        do {
          FUN_140199070(param_2,param_3,param_1);
          uVar7 = uVar7 + 1;
          param_2 = param_2 + *(int *)(param_1 + 0x3c4);
          param_3 = param_3 + *(int *)(param_1 + 0x3c4);
        } while ((ulonglong)uVar7 < param_4 / (ulonglong)(longlong)*(int *)(param_1 + 0x3c4));
      }
      return;
    }
  }
  FUN_140156300(local_a8,L"block size is not 16byte or 24byte or 32byte");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_a8,(ThrowInfo *)&DAT_14031d928);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140199a60(longlong param_1,void *param_2,byte *param_3,ulonglong param_4,int param_5)

{
  int iVar1;
  undefined1 auVar2 [16];
  undefined1 auVar3 [16];
  ulonglong uVar4;
  byte *pbVar5;
  uint uVar6;
  undefined1 auStack_b8 [32];
  undefined1 local_98 [72];
  byte local_50 [32];
  ulonglong local_30;
  
  local_30 = DAT_1403223c0 ^ (ulonglong)auStack_b8;
  if (*(int *)(param_1 + 0x3c0) < 1) {
    FUN_140156300(local_98,L"aes key is not initialized");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_98,(ThrowInfo *)&DAT_14031d928);
  }
  if (param_4 != 0) {
    auVar2._8_8_ = 0;
    auVar2._0_8_ = (longlong)*(int *)(param_1 + 0x3c4);
    auVar3._8_8_ = 0;
    auVar3._0_8_ = param_4;
    uVar4 = param_4 / (ulonglong)(longlong)*(int *)(param_1 + 0x3c4);
    if (SUB168(auVar3 % auVar2,0) == 0) {
      local_50[1] = 0;
      local_50[2] = 0;
      local_50[3] = 0;
      local_50[4] = 0;
      local_50[5] = 0;
      local_50[6] = 0;
      local_50[7] = 0;
      local_50[8] = 0;
      local_50[9] = 0;
      local_50[10] = 0;
      local_50[0xb] = 0;
      local_50[0xc] = 0;
      local_50[0xd] = 0;
      local_50[0xe] = 0;
      local_50[0xf] = 0;
      local_50[0x10] = 0;
      local_50[0x11] = 0;
      local_50[0x12] = 0;
      local_50[0x13] = 0;
      local_50[0x14] = 0;
      local_50[0x15] = 0;
      local_50[0x16] = 0;
      local_50[0x17] = 0;
      local_50[0x18] = 0;
      local_50[0x19] = 0;
      local_50[0x1a] = 0;
      local_50[0x1b] = 0;
      local_50[0x1c] = 0;
      local_50[0x1d] = 0;
      local_50[0x1e] = 0;
      local_50[0x1f] = 0;
      uVar6 = 0;
      local_50[0] = SUB161(auVar3 % auVar2,0);
      if (param_5 == 1) {
        if (uVar4 != 0) {
          do {
            FUN_140199420(param_2,param_3,param_1);
            if (0 < (int)*(uint *)(param_1 + 0x3c4)) {
              uVar4 = (ulonglong)*(uint *)(param_1 + 0x3c4);
              pbVar5 = param_3;
              do {
                *pbVar5 = *pbVar5 ^ pbVar5[(longlong)(local_50 + -(longlong)param_3)];
                uVar4 = uVar4 - 1;
                pbVar5 = pbVar5 + 1;
              } while (uVar4 != 0);
            }
            iVar1 = *(int *)(param_1 + 0x3c4);
            memcpy(local_50,param_2,(longlong)iVar1);
            uVar6 = uVar6 + 1;
            param_2 = (void *)((longlong)param_2 + (longlong)*(int *)(param_1 + 0x3c4));
            param_3 = param_3 + *(int *)(param_1 + 0x3c4);
          } while ((ulonglong)uVar6 < param_4 / (ulonglong)(longlong)iVar1);
        }
      }
      else if (param_5 == 2) {
        if (uVar4 != 0) {
          do {
            FUN_140199070(local_50,param_3,param_1);
            if (0 < (int)*(uint *)(param_1 + 0x3c4)) {
              uVar4 = (ulonglong)*(uint *)(param_1 + 0x3c4);
              pbVar5 = param_3;
              do {
                *pbVar5 = *pbVar5 ^ pbVar5[(longlong)param_2 - (longlong)param_3];
                uVar4 = uVar4 - 1;
                pbVar5 = pbVar5 + 1;
              } while (uVar4 != 0);
            }
            iVar1 = *(int *)(param_1 + 0x3c4);
            memcpy(local_50,param_2,(longlong)iVar1);
            uVar6 = uVar6 + 1;
            param_2 = (void *)((longlong)param_2 + (longlong)*(int *)(param_1 + 0x3c4));
            param_3 = param_3 + *(int *)(param_1 + 0x3c4);
          } while ((ulonglong)uVar6 < param_4 / (ulonglong)(longlong)iVar1);
        }
      }
      else if (uVar4 != 0) {
        do {
          FUN_140199420(param_2,param_3,param_1);
          uVar6 = uVar6 + 1;
          param_2 = (void *)((longlong)param_2 + (longlong)*(int *)(param_1 + 0x3c4));
          param_3 = param_3 + *(int *)(param_1 + 0x3c4);
        } while ((ulonglong)uVar6 < param_4 / (ulonglong)(longlong)*(int *)(param_1 + 0x3c4));
      }
      return;
    }
  }
  FUN_140156300(local_98,L"block size is not 16byte or 24byte or 32byte");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_98,(ThrowInfo *)&DAT_14031d928);
}



undefined8 FUN_140199ce0(longlong param_1,longlong param_2,longlong param_3)

{
  byte bVar1;
  int iVar2;
  int iVar3;
  byte *pbVar4;
  byte *_Dst;
  byte *pbVar5;
  undefined **local_138;
  undefined8 local_130;
  byte *local_128;
  undefined8 local_120;
  undefined8 local_118;
  undefined8 local_110;
  longlong local_108;
  ulonglong local_100;
  undefined8 local_f8;
  undefined1 local_e8 [72];
  undefined1 local_a0 [72];
  undefined1 local_58 [80];
  
  local_f8 = 0xfffffffffffffffe;
  if (*(int *)(param_3 + 0x3c0) < 1) {
    FUN_1401562a0(local_e8,&DAT_14026b620);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_e8,(ThrowInfo *)&DAT_14031d928);
  }
  if (*(int *)(param_1 + 0x18) != 0) {
    _Dst = (byte *)0x0;
    local_130 = 0;
    local_128 = (byte *)0x0;
    local_120 = 0;
    local_118 = 0;
    local_138 = Proud::ByteArray::vftable;
    FUN_140050060(&local_138);
    pbVar4 = local_128;
    if ((int)local_120 == 0) {
      pbVar4 = _Dst;
    }
    pbVar5 = _Dst;
    if (*(int *)(param_1 + 0x18) != 0) {
      pbVar5 = *(byte **)(param_1 + 0x10);
    }
    FUN_140199a60(param_3,pbVar5,pbVar4,(longlong)*(int *)(param_1 + 0x18),0);
    if ((int)local_120 < 1) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    bVar1 = *local_128;
    if ((int)local_120 < (int)(bVar1 + 5)) {
      FUN_1401562a0(local_a0,&DAT_14026b5f0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_a0,(ThrowInfo *)&DAT_14031d928);
    }
    pbVar4 = local_128;
    if ((int)local_120 == 0) {
      pbVar4 = _Dst;
    }
    iVar2 = *(int *)(pbVar4 + 1);
    local_100 = 0;
    local_108 = 0;
    local_110 = 0;
    pbVar4 = local_128;
    if ((int)local_120 == 0) {
      pbVar4 = _Dst;
    }
    iVar3 = FUN_1401aec80(pbVar4 + 5,((int)local_120 - (uint)bVar1) + -5);
    if (iVar2 != iVar3) {
      FUN_1401562a0(local_58,&DAT_14026b5b8);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    FUN_140050060(param_2,((int)local_120 - (uint)bVar1) + -5);
    pbVar4 = local_128;
    if ((int)local_120 == 0) {
      pbVar4 = _Dst;
    }
    if (*(int *)(param_2 + 0x18) != 0) {
      _Dst = *(byte **)(param_2 + 0x10);
    }
    memcpy(_Dst,pbVar4 + 5,(longlong)(int)(((int)local_120 - (uint)bVar1) + -5));
    FUN_1401560e0(&local_110);
    if (local_108 != 0) {
      if ((longlong)local_100 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_100 = local_100 & 0xffffffff00000000;
    }
    FUN_1401858d0(&local_138);
  }
  return 1;
}



undefined8 FUN_140199ed0(longlong param_1,undefined8 param_2,longlong param_3,int param_4)

{
  byte bVar1;
  int iVar2;
  undefined7 uVar6;
  longlong lVar3;
  byte *pbVar4;
  void *_Dst;
  undefined8 uVar5;
  byte *pbVar7;
  int iVar8;
  undefined **local_258;
  undefined8 local_250;
  byte *local_248;
  undefined8 local_240;
  undefined8 local_238;
  undefined8 local_230;
  longlong local_228;
  ulonglong local_220;
  undefined8 local_210;
  undefined1 local_178 [144];
  undefined1 local_e8 [72];
  undefined1 local_a0 [72];
  undefined1 local_58 [80];
  
  local_210 = 0xfffffffffffffffe;
  if (*(int *)(param_3 + 0x3c0) < 1) {
    FUN_1401562a0(local_a0,&DAT_14026b620);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_a0,(ThrowInfo *)&DAT_14031d928);
  }
  lVar3 = *(longlong *)(param_1 + 8);
  if (lVar3 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar8 = *(int *)(param_1 + 0x18);
  }
  else {
    iVar8 = *(int *)(lVar3 + 0x18);
  }
  if (iVar8 <= param_4) {
    if (lVar3 == 0) {
      if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      param_4 = *(int *)(param_1 + 0x18);
    }
    else {
      param_4 = *(int *)(lVar3 + 0x18);
    }
  }
  if (lVar3 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar8 = *(int *)(param_1 + 0x18);
  }
  else {
    iVar8 = *(int *)(lVar3 + 0x18);
  }
  iVar8 = iVar8 - param_4;
  if (iVar8 == 0) {
    uVar6 = (undefined7)((ulonglong)lVar3 >> 8);
  }
  else {
    if (*(longlong *)(param_1 + 0x10) == 0) {
      if (lVar3 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(int *)(lVar3 + 0x18) == 0) {
        lVar3 = 0;
      }
      else {
        lVar3 = *(longlong *)(lVar3 + 0x10);
      }
    }
    else {
      lVar3 = *(longlong *)(param_1 + 0x10);
      if (lVar3 == 0) {
        FUN_140156300(local_178,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_178,(ThrowInfo *)&DAT_14031d928);
      }
    }
    pbVar7 = (byte *)0x0;
    local_250 = 0;
    local_248 = (byte *)0x0;
    local_240 = 0;
    local_238 = 0;
    local_258 = Proud::ByteArray::vftable;
    FUN_140050060(&local_258,iVar8);
    pbVar4 = local_248;
    if ((int)local_240 == 0) {
      pbVar4 = pbVar7;
    }
    FUN_140199a60(param_3,param_4 + lVar3,pbVar4,iVar8,0);
    if ((int)local_240 < 1) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    bVar1 = *local_248;
    if ((int)local_240 < (int)(bVar1 + 5)) {
      FUN_1401562a0(local_e8,&DAT_14026b5f0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_e8,(ThrowInfo *)&DAT_14031d928);
    }
    pbVar4 = local_248;
    if ((int)local_240 == 0) {
      pbVar4 = pbVar7;
    }
    iVar8 = *(int *)(pbVar4 + 1);
    local_220 = 0;
    local_228 = 0;
    local_230 = 0;
    pbVar4 = local_248;
    if ((int)local_240 == 0) {
      pbVar4 = pbVar7;
    }
    iVar2 = FUN_1401aec80(pbVar4 + 5,((int)local_240 - (uint)bVar1) + -5);
    if (iVar8 != iVar2) {
      FUN_1401562a0(local_58,&DAT_14026b5b8);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    FUN_140153d90(param_2);
    FUN_140154600(param_2,((int)local_240 - (uint)bVar1) + -5);
    iVar8 = (int)local_240;
    pbVar4 = local_248;
    if ((int)local_240 == 0) {
      pbVar4 = pbVar7;
    }
    _Dst = (void *)FUN_140154060(param_2);
    memcpy(_Dst,pbVar4 + 5,(longlong)(int)((iVar8 - (uint)bVar1) + -5));
    FUN_1401560e0(&local_230);
    if (local_228 != 0) {
      if ((longlong)local_220 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_220 = local_220 & 0xffffffff00000000;
    }
    uVar5 = FUN_1401858d0(&local_258);
    uVar6 = (undefined7)((ulonglong)uVar5 >> 8);
  }
  return CONCAT71(uVar6,1);
}



// WARNING: Removing unreachable block (ram,0x00014019a295)
// WARNING: Removing unreachable block (ram,0x00014019a2a3)
// WARNING: Removing unreachable block (ram,0x00014019a29b)
// WARNING: Removing unreachable block (ram,0x00014019a2aa)

void FUN_14019a190(undefined8 param_1,int param_2,undefined8 param_3,longlong param_4,
                  undefined8 param_5)

{
  byte *pbVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  longlong lVar4;
  uint uVar5;
  ulonglong uVar6;
  undefined **local_50;
  undefined8 local_48;
  ulonglong local_40;
  undefined8 local_38;
  undefined8 local_30;
  
  uVar6 = 0;
  local_48 = 0;
  local_40 = 0;
  local_38 = 0;
  local_30 = 0;
  local_50 = Proud::ByteArray::vftable;
  pbVar1 = (byte *)(param_4 + 4);
  FUN_140050060(&local_50,1);
  uVar2 = local_40;
  if ((int)local_38 == 0) {
    uVar2 = uVar6;
  }
  FUN_140050120(uVar2,pbVar1,1);
  lVar4 = (longlong)(int)local_38;
  FUN_140050060(&local_50,(int)local_38 + 4);
  uVar2 = local_40;
  if ((int)local_38 == 0) {
    uVar2 = uVar6;
  }
  FUN_140050120(uVar2 + lVar4,param_4 + 0xc,4);
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 != 0) {
    lVar4 = (longlong)(int)local_38;
    FUN_140050060(&local_50,(int)local_38 + param_2);
    uVar2 = local_40;
    if ((int)local_38 == 0) {
      uVar2 = uVar6;
    }
    FUN_140050120(uVar2 + lVar4,param_1,(longlong)param_2);
  }
  uVar2 = uVar6;
  if (*pbVar1 != 0) {
    do {
      lVar4 = (longlong)(int)local_38;
      if ((int)local_38 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      FUN_140050060(&local_50,(int)local_38 + 1);
      uVar3 = local_40;
      if ((int)local_38 == 0) {
        uVar3 = uVar6;
      }
      *(undefined1 *)(lVar4 + uVar3) = 0;
      uVar5 = (int)uVar2 + 1;
      uVar2 = (ulonglong)uVar5;
    } while ((int)uVar5 < (int)(uint)*pbVar1);
  }
  uVar2 = local_40;
  if ((int)local_38 == 0) {
    uVar2 = uVar6;
  }
  FUN_1401997d0(param_5,uVar2,param_3,(longlong)(int)local_38,0);
  FUN_1401858d0(&local_50);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_14019a330(longlong param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  char cVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined1 auStack_118 [32];
  longlong local_f8;
  undefined8 local_e0;
  undefined1 local_d8 [72];
  undefined1 local_90 [72];
  int local_48;
  byte local_44;
  undefined4 local_40;
  undefined4 local_3c;
  ulonglong local_38;
  
  local_e0 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_118;
  if (*(int *)(param_3 + 0x3c0) < 1) {
    FUN_1401562a0(local_90,&DAT_14026b620);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_90,(ThrowInfo *)&DAT_14031d928);
  }
  iVar1 = *(int *)(param_1 + 0x18);
  uVar4 = 0;
  uVar3 = uVar4;
  if (iVar1 != 0) {
    uVar3 = *(undefined8 *)(param_1 + 0x10);
  }
  local_3c = FUN_1401aec80(uVar3,iVar1);
  if (0 < *(int *)(param_3 + 0x3c0)) {
    local_40 = 5;
    cVar2 = (char)((iVar1 + 5) % *(int *)(param_3 + 0x3c4));
    local_44 = 0;
    if (cVar2 != '\0') {
      local_44 = (char)*(int *)(param_3 + 0x3c4) - cVar2;
    }
    local_48 = local_44 + 5 + iVar1;
    FUN_140050060(param_2);
    uVar3 = uVar4;
    if (*(int *)(param_2 + 0x18) != 0) {
      uVar3 = *(undefined8 *)(param_2 + 0x10);
    }
    if (*(int *)(param_1 + 0x18) != 0) {
      uVar4 = *(undefined8 *)(param_1 + 0x10);
    }
    local_f8 = param_3;
    FUN_14019a190(uVar4,*(int *)(param_1 + 0x18),uVar3,&local_48);
    return 1;
  }
  FUN_140156300(local_d8,L"aes key is not initialized");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_d8,(ThrowInfo *)&DAT_14031d928);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_14019a480(longlong param_1,longlong param_2,longlong param_3,int param_4)

{
  int iVar1;
  undefined7 uVar4;
  longlong lVar2;
  undefined8 uVar3;
  int iVar5;
  longlong lVar6;
  undefined1 auStack_238 [32];
  longlong local_218;
  undefined8 local_208;
  undefined1 local_120 [72];
  undefined1 local_d8 [72];
  undefined1 local_90 [72];
  int local_48;
  byte local_44;
  undefined4 local_40;
  undefined4 local_3c;
  ulonglong local_38;
  
  local_208 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_238;
  if (*(int *)(param_3 + 0x3c0) < 1) {
    FUN_1401562a0(local_120,&DAT_14026b620);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_120,(ThrowInfo *)&DAT_14031d928);
  }
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar5 = *(int *)(param_1 + 0x18);
  }
  else {
    iVar5 = *(int *)(lVar2 + 0x18);
  }
  if (iVar5 <= param_4) {
    if (lVar2 == 0) {
      if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      param_4 = *(int *)(param_1 + 0x18);
    }
    else {
      param_4 = *(int *)(lVar2 + 0x18);
    }
  }
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar5 = *(int *)(param_1 + 0x18);
  }
  else {
    iVar5 = *(int *)(lVar2 + 0x18);
  }
  iVar5 = iVar5 - param_4;
  if (iVar5 == 0) {
    uVar4 = (undefined7)((ulonglong)lVar2 >> 8);
  }
  else {
    if (*(longlong *)(param_1 + 0x10) == 0) {
      if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(int *)(lVar2 + 0x18) == 0) {
        lVar2 = 0;
      }
      else {
        lVar2 = *(longlong *)(lVar2 + 0x10);
      }
    }
    else {
      lVar2 = *(longlong *)(param_1 + 0x10);
      if (lVar2 == 0) {
        FUN_140156300(local_90,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_90,(ThrowInfo *)&DAT_14031d928);
      }
    }
    local_3c = FUN_1401aec80(param_4 + lVar2,iVar5);
    if (*(int *)(param_3 + 0x3c0) < 1) {
      FUN_140156300(local_d8,L"aes key is not initialized");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_d8,(ThrowInfo *)&DAT_14031d928);
    }
    local_40 = 5;
    local_44 = (byte)((iVar5 + 5) % *(int *)(param_3 + 0x3c4));
    if (local_44 != 0) {
      local_44 = (char)*(int *)(param_3 + 0x3c4) - local_44;
    }
    iVar1 = local_44 + 5 + iVar5;
    local_48 = iVar1;
    FUN_140153d90(param_2);
    FUN_140154600(param_2,iVar1);
    lVar6 = *(longlong *)(param_2 + 0x10);
    if (lVar6 == 0) {
      lVar6 = *(longlong *)(param_2 + 8);
      if (lVar6 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(int *)(lVar6 + 0x18) == 0) {
        lVar6 = 0;
      }
      else {
        lVar6 = *(longlong *)(lVar6 + 0x10);
      }
    }
    local_218 = param_3;
    uVar3 = FUN_14019a190(param_4 + lVar2,iVar5,lVar6,&local_48);
    uVar4 = (undefined7)((ulonglong)uVar3 >> 8);
  }
  return CONCAT71(uVar4,1);
}



undefined8 FUN_14019a6b0(void)

{
  return 1000;
}



undefined8 FUN_14019a6c0(void)

{
  return 0x3f2;
}



void FUN_14019a6d0(undefined8 *param_1)

{
  *param_1 = Proud::IHeartbeatWork::vftable;
  return;
}



undefined8 * FUN_14019a6e0(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::IHeartbeatWork::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined1 FUN_14019a710(void)

{
  return 0;
}



undefined8 FUN_14019a720(void)

{
  return 2000;
}



undefined8 FUN_14019a730(void)

{
  return 0x7d3;
}



void FUN_14019a740(longlong param_1,int *param_2)

{
  longlong lVar1;
  uint local_res8 [2];
  
  FUN_140156b50();
  if (*param_2 == 0) {
    *(undefined4 *)(param_1 + 0x88) = 2;
    lVar1 = (**(code **)(**(longlong **)(param_1 + 0x40) + 0x10))();
    if (lVar1 == 0) {
      lVar1 = (**(code **)(**(longlong **)(param_1 + 0x40) + 0x18))();
      local_res8[0] = (uint)(lVar1 != 0);
    }
    else {
      lVar1 = (**(code **)(**(longlong **)(param_1 + 0x40) + 0x10))();
      local_res8[0] = *(uint *)(lVar1 + 0x1578);
    }
    (**(code **)(*(longlong *)(param_1 + 0x68) + 0x30))
              ((longlong *)(param_1 + 0x68),1,&DAT_1403285f0,param_1 + 0x60,local_res8);
  }
  else {
    *(undefined4 *)(param_1 + 0x88) = 0;
  }
  FUN_140156be0(param_1 + 0x98);
  return;
}



void FUN_14019a800(longlong param_1)

{
  FUN_140156b50(param_1 + 0x98);
  *(undefined4 *)(param_1 + 0x88) = 0;
  FUN_140156be0(param_1 + 0x98);
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

undefined8 FUN_14019a840(longlong param_1)

{
  double dVar1;
  
  FUN_140156b50(param_1 + 0x88);
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x38) + 0x70) + 0x88))();
  *(undefined4 *)(param_1 + 0x78) = 0;
  dVar1 = (double)(**(code **)(**(longlong **)(param_1 + 0x30) + 8))();
  *(double *)(param_1 + 0x80) = dVar1 + _DAT_140328938;
  FUN_140156be0(param_1 + 0x88);
  return 1;
}



undefined * FUN_14019a8c0(void)

{
  bool bVar1;
  char cVar2;
  
  bVar1 = false;
  cVar2 = FUN_140156bf0(&DAT_140329fc8);
  if (cVar2 != '\0') {
    if (DAT_140321440 == '\0') {
      bVar1 = false;
    }
    else {
      bVar1 = true;
      FUN_140156b50(&DAT_140329fc8);
    }
  }
  if ((DAT_140329fc0 & 1) == 0) {
    DAT_140329fc0 = DAT_140329fc0 | 1;
    FUN_1401af290(&DAT_140329f00);
    atexit((_func_5014 *)&LAB_140258040);
  }
  DAT_140321440 = 0;
  if (bVar1) {
    FUN_140156be0(&DAT_140329fc8);
  }
  return &DAT_140329f00;
}



void FUN_14019a980(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  *param_1 = Proud::CVizAgent::vftable;
  param_1[2] = Proud::CVizAgent::vftable;
  param_1[6] = Proud::CVizAgent::vftable;
  uVar2 = FUN_14019a8c0();
  FUN_1401af0b0(uVar2,param_1 + 6,param_3,param_4,uVar3);
  puVar1 = (undefined8 *)param_1[9];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  param_1[9] = 0;
  FUN_140156c00(param_1 + 0x13);
  FUN_140156cd0(param_1 + 0xd);
  FUN_14004f990(param_1 + 0xc);
  FUN_14004f990(param_1 + 10);
  puVar1 = (undefined8 *)param_1[9];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  param_1[6] = Proud::IHeartbeatWork::vftable;
  FUN_140157bd0(param_1 + 2);
  *param_1 = Proud::INetClientEvent::vftable;
  FUN_140157ce0(param_1);
  return;
}



void FUN_14019aa70(longlong param_1)

{
  FUN_14019aa90(param_1 + -0x10);
  return;
}



void FUN_14019aa80(longlong param_1)

{
  FUN_14019aa90(param_1 + -0x30);
  return;
}



void * FUN_14019aa90(void *param_1,uint param_2)

{
  FUN_14019a980();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_14019aac0(longlong param_1)

{
  int *piVar1;
  undefined *puVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  longlong *plVar5;
  undefined *puVar6;
  double dVar7;
  undefined1 auStack_b8 [32];
  undefined8 local_98;
  undefined1 local_90;
  undefined8 local_88;
  undefined1 local_80;
  undefined8 local_78;
  undefined *local_68;
  undefined2 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_50;
  undefined1 local_48 [48];
  ulonglong local_18;
  
  local_78 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_b8;
  dVar7 = (double)(**(code **)(**(longlong **)(param_1 + 0x40) + 8))();
  if (*(double *)(param_1 + 0x90) <= dVar7 && dVar7 != *(double *)(param_1 + 0x90)) {
    FUN_1401a48f0(&local_68);
    if (local_68 == (undefined *)0x0) {
      local_68 = PTR_DAT_1403200a0;
    }
    if (*(undefined **)(param_1 + 0x50) != local_68) {
      uVar3 = FUN_1401568c0();
      local_88 = uVar3;
      FUN_140156b50(uVar3);
      puVar2 = local_68;
      local_80 = 1;
      if (((local_68 != (undefined *)0x0) && (local_68 != PTR_DAT_1403200a0)) &&
         (puVar6 = local_68 + -8, puVar6 != (undefined *)0x0)) {
        uVar4 = FUN_1401568c0();
        local_98 = uVar4;
        FUN_140156b50(uVar4);
        local_90 = 1;
        piVar1 = (int *)(puVar2 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar6);
        }
        FUN_140156be0(uVar4);
      }
      local_68 = *(undefined **)(param_1 + 0x50);
      if (((local_68 != PTR_DAT_1403200a0) && (local_68 != (undefined *)0x0)) &&
         (local_68 != (undefined *)0x8)) {
        *(int *)(local_68 + -4) = *(int *)(local_68 + -4) + 1;
      }
      FUN_140156be0(uVar3);
    }
    local_60 = *(undefined2 *)(param_1 + 0x58);
    local_5c = DAT_1403213a8;
    local_58 = DAT_1403213ac;
    local_54 = DAT_1403213b0;
    local_50 = DAT_1403213b4;
    plVar5 = (longlong *)(*(longlong *)(param_1 + 0x48) + 0x70);
    (**(code **)(*plVar5 + 0x78))(plVar5,&local_68);
    dVar7 = (double)(**(code **)(**(longlong **)(param_1 + 0x40) + 8))();
    *(double *)(param_1 + 0x90) = dVar7 + _DAT_140328938;
    *(undefined4 *)(param_1 + 0x88) = 1;
    FUN_1401858d0(local_48);
    puVar2 = local_68;
    if (((local_68 != (undefined *)0x0) && (local_68 != PTR_DAT_1403200a0)) &&
       (puVar6 = local_68 + -8, puVar6 != (undefined *)0x0)) {
      uVar3 = FUN_1401568c0();
      local_98 = uVar3;
      FUN_140156b50(uVar3);
      local_90 = 1;
      piVar1 = (int *)(puVar2 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar6);
      }
      FUN_140156be0(uVar3);
    }
  }
  return;
}



void FUN_14019acb0(longlong param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  undefined1 local_res8 [8];
  undefined4 local_res10 [2];
  undefined8 uVar5;
  undefined1 uVar6;
  
  uVar5 = 0xfffffffffffffffe;
  lVar2 = param_1 + 0x98;
  lVar4 = lVar2;
  FUN_140156b50(lVar2);
  uVar6 = 1;
  lVar3 = (**(code **)(**(longlong **)(param_1 + 0x40) + 0x10))();
  if (lVar3 == 0) {
    lVar3 = (**(code **)(**(longlong **)(param_1 + 0x40) + 0x18))();
    if (lVar3 != 0) {
      (**(code **)(*(longlong *)(param_1 + 0x68) + 0x90))
                (param_1 + 0x68,1,&DAT_140328530,*(longlong *)(param_1 + 0x68),uVar5,lVar4,uVar6);
      if (*(longlong *)(lVar3 + 0xc98) == 0) {
        lVar4 = 0;
      }
      else {
        lVar4 = *(longlong *)(lVar3 + 0xc88);
      }
      for (; lVar4 != 0; lVar4 = *(longlong *)(lVar4 + 0x10)) {
        (**(code **)(*(longlong *)(param_1 + 0x68) + 0xa0))
                  (param_1 + 0x68,1,&DAT_140328530,*(longlong *)(lVar4 + 8) + 0x6f8);
      }
    }
  }
  else {
    local_res8[0] = 0;
    local_res10[0] =
         (**(code **)(*(longlong *)(lVar3 + 0x70) + 0x108))((longlong *)(lVar3 + 0x70),local_res8);
    plVar1 = (longlong *)(param_1 + 0x68);
    (**(code **)(*plVar1 + 0x60))(plVar1,1,&DAT_140328530,local_res10);
    (**(code **)(*plVar1 + 0x70))(plVar1,1,&DAT_140328530);
    lVar4 = 0;
    if (*(longlong *)(lVar3 + 0x1670) != 0) {
      lVar4 = *(longlong *)(lVar3 + 0x1660);
    }
    for (; lVar4 != 0; lVar4 = *(longlong *)(lVar4 + 0x10)) {
      lVar3 = 0;
      if (*(longlong **)(lVar4 + 8) != (longlong *)0x0) {
        lVar3 = **(longlong **)(lVar4 + 8);
      }
      (**(code **)(*plVar1 + 0x80))(plVar1,1,&DAT_140328530,lVar3 + 0x56c);
    }
  }
  FUN_140156be0(lVar2);
  return;
}



undefined1
FUN_14019ae30(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3e9);
  FUN_140155f20(local_30,param_4);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_u_RequestLogin_1403212f8,0x3e9);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14019af20(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3e9);
  FUN_140155f20(local_30,param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_u_RequestLogin_1403212f8,0x3e9);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14019b010(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3eb);
  FUN_14004fe70(local_30,*param_4);
  FUN_140155f20(local_30,param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_u_NotifyCommon_ReceiveRmi_140321308,
                     0x3eb);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14019b110(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3eb);
  FUN_14004fe70(local_30,*param_5);
  FUN_140155f20(local_30,param_6);
  FUN_14004fe70(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,
                     PTR_u_NotifyCommon_ReceiveRmi_140321308,0x3eb);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14019b220(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3ec);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,
                     PTR_u_NotifyCli_ConnectionState_140321310,0x3ec);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14019b300(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3ec);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,
                     PTR_u_NotifyCli_ConnectionState_140321310,0x3ec);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_14019b3e0(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3ed);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_u_NotifyCli_Peers_Clear_140321318,
                     0x3ed);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_14019b4a0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3ed);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_u_NotifyCli_Peers_Clear_140321318,
                     0x3ed);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14019b570(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3ee);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,
                     PTR_u_NotifyCli_Peers_AddOrEdit_140321320,0x3ee);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14019b650(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3ee);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,
                     PTR_u_NotifyCli_Peers_AddOrEdit_140321320,0x3ee);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_14019b730(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3ef);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_u_NotifySrv_ClientEmpty_140321328,
                     0x3ef);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_14019b7f0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3ef);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_u_NotifySrv_ClientEmpty_140321328,
                     0x3ef);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14019b8c0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3f0);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,
                     PTR_u_NotifySrv_Clients_AddOrEdit_140321330,0x3f0);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14019b9a0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3f0);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,
                     PTR_u_NotifySrv_Clients_AddOrEdit_140321330,0x3f0);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14019ba80(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3f1);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_u_NotifySrv_Clients_Remove_140321338
                     ,0x3f1);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14019bb60(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0x3f1);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,
                     PTR_u_NotifySrv_Clients_Remove_140321338,0x3f1);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined8 FUN_14019bc40(longlong *param_1,int *param_2,undefined8 param_3)

{
  int *piVar1;
  int iVar2;
  char cVar3;
  undefined4 uVar4;
  DWORD DVar5;
  DWORD DVar6;
  undefined8 uVar7;
  longlong *plVar8;
  undefined **ppuVar9;
  undefined *puVar10;
  int iVar11;
  undefined *puVar12;
  undefined *local_res10;
  undefined8 local_res18;
  int local_res20 [2];
  undefined *local_118;
  undefined8 local_110;
  undefined *local_108;
  int local_100;
  undefined8 local_f8;
  int local_f0;
  undefined *local_e8;
  undefined *local_e0;
  undefined *local_d8;
  undefined *local_d0;
  undefined *local_c8;
  undefined **local_c0;
  undefined1 local_b8;
  undefined *local_b0;
  undefined8 local_a8;
  undefined1 local_98 [4];
  int local_94;
  undefined8 local_60;
  
  local_a8 = 0xfffffffffffffffe;
  iVar2 = param_2[10];
  local_res18 = param_3;
  if (iVar2 == 0) {
    FUN_1401c5a30(param_1,0);
  }
  iVar11 = *param_2;
  cVar3 = FUN_140154d80(param_2,local_res20);
  if (cVar3 == '\0') {
LAB_14019c442:
    FUN_1401540a0(param_2,(int)((iVar11 >> 0x1f & 7U) + iVar11) >> 3);
    uVar7 = 0;
  }
  else {
    local_60 = param_3;
    if (local_res20[0] == 0x7d1) {
      FUN_140157c90(local_98);
      local_94 = param_2[10];
      local_98[0] = (undefined1)param_2[0x10];
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_u_NotifyLoginOk_140321398);
      DVar5 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0x7d1,PTR_u_NotifyLoginOk_140321398,&DAT_140288b80
                    );
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        puVar10 = PTR_DAT_1403200a0;
        local_res10 = PTR_DAT_1403200a0;
        plVar8 = (longlong *)FUN_1400457d0(&local_res10,&local_b0,0xfffffffe);
        if (puVar10 == (undefined *)0x0) {
          puVar10 = PTR_DAT_1403200a0;
        }
        local_res10 = puVar10;
        if ((undefined *)*plVar8 != puVar10) {
          uVar7 = FUN_1401568c0();
          local_110 = uVar7;
          FUN_140156b50(uVar7);
          local_108 = (undefined *)CONCAT71(local_108._1_7_,1);
          if (((puVar10 != (undefined *)0x0) && (puVar10 != PTR_DAT_1403200a0)) &&
             (puVar10 + -8 != (undefined *)0x0)) {
            ppuVar9 = (undefined **)FUN_1401568c0();
            local_c0 = ppuVar9;
            FUN_140156b50(ppuVar9);
            local_b8 = 1;
            piVar1 = (int *)(puVar10 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(puVar10 + -8);
            }
            FUN_140156be0(ppuVar9);
          }
          puVar10 = (undefined *)*plVar8;
          if (((puVar10 != PTR_DAT_1403200a0) && (puVar10 != (undefined *)0x0)) &&
             (puVar10 != (undefined *)0x8)) {
            *(int *)(puVar10 + -4) = *(int *)(puVar10 + -4) + 1;
          }
          local_res10 = puVar10;
          FUN_140156be0(uVar7);
        }
        if (((local_b0 != (undefined *)0x0) && (local_b0 != PTR_DAT_1403200a0)) &&
           (local_b0 + -8 != (undefined *)0x0)) {
          uVar7 = FUN_1401568c0();
          local_110 = uVar7;
          FUN_140156b50(uVar7);
          local_108 = (undefined *)CONCAT71(local_108._1_7_,1);
          piVar1 = (int *)(local_b0 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(local_b0 + -8);
          }
          FUN_140156be0(uVar7);
        }
        local_c0 = &local_e8;
        local_b0 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_e8 = PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_e8 = (undefined *)0x0;
        }
        if (puVar10 != PTR_DAT_1403200a0) {
          uVar7 = FUN_1401568c0();
          local_110 = uVar7;
          FUN_140156b50(uVar7);
          local_108 = (undefined *)CONCAT71(local_108._1_7_,1);
          FUN_14004f990(&local_e8);
          if (((puVar10 != PTR_DAT_1403200a0) && (puVar10 != (undefined *)0x0)) &&
             (puVar10 != (undefined *)0x8)) {
            *(int *)(puVar10 + -4) = *(int *)(puVar10 + -4) + 1;
          }
          local_e8 = puVar10;
          FUN_140156be0(uVar7);
        }
        puVar12 = PTR_u_NotifyLoginOk_140321398;
        FUN_1401568c0();
        local_d8 = PTR_DAT_1403200a0;
        uVar4 = FUN_140156740(puVar12);
        uVar7 = FUN_14004f760(&local_d8,uVar4);
        FUN_140156770(uVar7,puVar12,uVar4);
        FUN_14004f380(&local_d8);
        (**(code **)(*param_1 + 0x28))(param_1,0x7d1,&local_d8,&local_e8);
        puVar12 = puVar10;
        if (puVar10 == (undefined *)0x0) {
          puVar12 = PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0x7d1,PTR_u_NotifyLoginOk_140321398,puVar12);
        param_3 = local_res18;
        if (((puVar10 != (undefined *)0x0) && (puVar10 != PTR_DAT_1403200a0)) &&
           (puVar10 + -8 != (undefined *)0x0)) {
          uVar7 = FUN_1401568c0();
          local_110 = uVar7;
          FUN_140156b50(uVar7);
          local_108 = (undefined *)CONCAT71(local_108._1_7_,1);
          piVar1 = (int *)(puVar10 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(puVar10 + -8);
          }
          FUN_140156be0(uVar7);
          param_3 = local_res18;
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_110 = CONCAT44(local_110._4_4_,0x7d1);
        local_108 = PTR_u_NotifyLoginOk_140321398;
        local_100 = iVar2;
        local_f8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_110);
        DVar5 = GetTickCount();
      }
      cVar3 = (**(code **)(*param_1 + 0x38))(param_1,iVar2,local_98);
      if (cVar3 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))
                  ((longlong *)param_1[2],PTR_u_NotifyLoginOk_140321398);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_110 = CONCAT44(local_110._4_4_,0x7d1);
        local_108 = PTR_u_NotifyLoginOk_140321398;
LAB_14019c413:
        local_100 = iVar2;
        local_f8 = param_3;
        DVar6 = GetTickCount();
        local_f0 = DVar6 - DVar5;
        (**(code **)(*param_1 + 0x18))(param_1,&local_110);
      }
    }
    else {
      if (local_res20[0] != 0x7d2) goto LAB_14019c442;
      FUN_140157c90(local_98);
      local_94 = param_2[10];
      local_98[0] = (undefined1)param_2[0x10];
      cVar3 = FUN_1401543d0(param_2,&local_118,4);
      uVar4 = local_res10._0_4_;
      if (cVar3 != '\0') {
        uVar4 = local_118._0_4_;
      }
      local_res10 = (undefined *)CONCAT44(local_res10._4_4_,uVar4);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_u_NotifyLoginFailed_1403213a0);
      DVar5 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0x7d2,PTR_u_NotifyLoginFailed_1403213a0,
                     &DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_118 = PTR_DAT_1403200a0;
        uVar7 = FUN_140181e70((ulonglong)local_res10 & 0xffffffff);
        FUN_14004f840(&local_118,uVar7);
        FUN_14004f840(&local_118,&DAT_140286e98);
        puVar10 = local_118;
        iVar11 = 0;
        if ((local_118 != (undefined *)0x0) && (local_118 != PTR_DAT_1403200a0)) {
          iVar11 = *(int *)(local_118 + -8);
        }
        plVar8 = (longlong *)FUN_1400457d0(&local_118,&local_c8,iVar11 + -2);
        if (puVar10 == (undefined *)0x0) {
          puVar10 = PTR_DAT_1403200a0;
        }
        local_118 = puVar10;
        if ((undefined *)*plVar8 != puVar10) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_c0 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_b8 = 1;
          if (((puVar10 != (undefined *)0x0) && (puVar10 != PTR_DAT_1403200a0)) &&
             (puVar10 + -8 != (undefined *)0x0)) {
            uVar7 = FUN_1401568c0();
            local_110 = uVar7;
            FUN_140156b50(uVar7);
            local_108 = (undefined *)CONCAT71(local_108._1_7_,1);
            piVar1 = (int *)(puVar10 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(puVar10 + -8);
            }
            FUN_140156be0(uVar7);
          }
          puVar10 = (undefined *)*plVar8;
          if (((puVar10 != PTR_DAT_1403200a0) && (puVar10 != (undefined *)0x0)) &&
             (puVar10 != (undefined *)0x8)) {
            *(int *)(puVar10 + -4) = *(int *)(puVar10 + -4) + 1;
          }
          local_118 = puVar10;
          FUN_140156be0(ppuVar9);
        }
        if (((local_c8 != (undefined *)0x0) && (local_c8 != PTR_DAT_1403200a0)) &&
           (local_c8 + -8 != (undefined *)0x0)) {
          uVar7 = FUN_1401568c0();
          local_110 = uVar7;
          FUN_140156b50(uVar7);
          local_108 = (undefined *)CONCAT71(local_108._1_7_,1);
          piVar1 = (int *)(local_c8 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(local_c8 + -8);
          }
          FUN_140156be0(uVar7);
        }
        local_c0 = &local_e0;
        local_c8 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_e0 = PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_e0 = (undefined *)0x0;
        }
        if (puVar10 != PTR_DAT_1403200a0) {
          uVar7 = FUN_1401568c0();
          local_110 = uVar7;
          FUN_140156b50(uVar7);
          local_108 = (undefined *)CONCAT71(local_108._1_7_,1);
          FUN_14004f990(&local_e0);
          if (((puVar10 != PTR_DAT_1403200a0) && (puVar10 != (undefined *)0x0)) &&
             (puVar10 != (undefined *)0x8)) {
            *(int *)(puVar10 + -4) = *(int *)(puVar10 + -4) + 1;
          }
          local_e0 = puVar10;
          FUN_140156be0(uVar7);
        }
        puVar12 = PTR_u_NotifyLoginFailed_1403213a0;
        FUN_1401568c0();
        local_d0 = PTR_DAT_1403200a0;
        uVar4 = FUN_140156740(puVar12);
        uVar7 = FUN_14004f760(&local_d0,uVar4);
        FUN_140156770(uVar7,puVar12,uVar4);
        FUN_14004f380(&local_d0);
        (**(code **)(*param_1 + 0x28))(param_1,0x7d2,&local_d0,&local_e0);
        puVar12 = puVar10;
        if (puVar10 == (undefined *)0x0) {
          puVar12 = PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0x7d2,PTR_u_NotifyLoginFailed_1403213a0,puVar12);
        param_3 = local_res18;
        if (((puVar10 != (undefined *)0x0) && (puVar10 != PTR_DAT_1403200a0)) &&
           (puVar10 + -8 != (undefined *)0x0)) {
          uVar7 = FUN_1401568c0();
          local_110 = uVar7;
          FUN_140156b50(uVar7);
          local_108 = (undefined *)CONCAT71(local_108._1_7_,1);
          piVar1 = (int *)(puVar10 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(puVar10 + -8);
          }
          FUN_140156be0(uVar7);
          param_3 = local_res18;
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_110 = CONCAT44(local_110._4_4_,0x7d2);
        local_108 = PTR_u_NotifyLoginFailed_1403213a0;
        local_100 = iVar2;
        local_f8 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_110);
        DVar5 = GetTickCount();
      }
      cVar3 = (**(code **)(*param_1 + 0x40))(param_1,iVar2,local_98,&local_res10);
      if (cVar3 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))
                  ((longlong *)param_1[2],PTR_u_NotifyLoginFailed_1403213a0);
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_110 = CONCAT44(local_110._4_4_,0x7d2);
        local_108 = PTR_u_NotifyLoginFailed_1403213a0;
        goto LAB_14019c413;
      }
    }
    uVar7 = 1;
  }
  return uVar7;
}



undefined8 *
FUN_14019c470(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined4 param_4,
             undefined8 param_5)

{
  undefined8 *puVar1;
  undefined4 uVar2;
  void *pvVar3;
  longlong lVar4;
  undefined8 uVar5;
  
  *param_1 = Proud::INetClientEvent::vftable;
  *(undefined2 *)(param_1 + 1) = 0;
  FUN_140157ba0(param_1 + 2);
  param_1[2] = VizS2C::Stub::vftable;
  FUN_1401aecd0(param_1 + 6);
  *param_1 = Proud::CVizAgent::vftable;
  param_1[2] = Proud::CVizAgent::vftable;
  param_1[6] = Proud::CVizAgent::vftable;
  param_1[9] = 0;
  FUN_1401568c0();
  param_1[10] = PTR_DAT_1403200a0;
  FUN_1401568c0();
  param_1[0xc] = PTR_DAT_1403200a0;
  puVar1 = param_1 + 0xd;
  FUN_140156ca0(puVar1);
  *puVar1 = VizC2S::Proxy::vftable;
  if (*(int *)((longlong)param_1 + 0x7c) != 1) {
    FUN_1401580e0(PTR_u_PIDL_compiler_is_incompatible_to_1403200e0);
  }
  uVar2 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x13,uVar2,1);
  param_1[8] = param_2;
  FUN_14004ce80(param_1 + 10,param_3);
  *(undefined4 *)(param_1 + 0xb) = param_4;
  FUN_14004f4f0(param_1 + 0xc,param_5);
  pvVar3 = operator_new(0x1900);
  lVar4 = 0;
  if (pvVar3 != (void *)0x0) {
    lVar4 = FUN_1401c81e0(pvVar3);
  }
  param_1[9] = lVar4;
  (**(code **)(*(longlong *)(lVar4 + 0x70) + 0x118))((longlong *)(lVar4 + 0x70),param_1);
  (**(code **)(*(longlong *)param_1[9] + 8))((longlong *)param_1[9],puVar1);
  (**(code **)(*(longlong *)param_1[9] + 0x10))((longlong *)param_1[9],param_1 + 2);
  param_1[0x12] = 0;
  *(undefined4 *)(param_1 + 0x11) = 0;
  *(undefined1 *)(param_1 + 0xf) = 1;
  *(undefined1 *)(param_1 + 5) = 1;
  uVar5 = FUN_14019a8c0();
  FUN_1401aefd0(uVar5,param_1 + 6,10);
  return param_1;
}



void FUN_14019c620(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  
  plVar1 = (longlong *)(*(longlong *)(param_1 + 0x18) + 0x70);
  (**(code **)(*plVar1 + 0x98))(plVar1,0,param_3,param_4,0xfffffffffffffffe);
  FUN_140156b50(param_1 + 0x68);
  if (*(int *)(param_1 + 0x58) == 0) {
    FUN_14019aac0(param_1 + -0x30);
  }
  FUN_140156be0(param_1 + 0x68);
  return;
}



undefined1 FUN_14019c690(longlong param_1)

{
  FUN_140156b50(param_1 + 0x88);
  FUN_14019acb0(param_1 + -0x10);
  FUN_140156be0(param_1 + 0x88);
  return 1;
}



undefined1
FUN_14019c6e0(longlong *param_1,undefined4 param_2,undefined8 param_3,longlong param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  int iVar2;
  ulonglong uVar3;
  uint uVar4;
  undefined4 local_res10 [2];
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  ulonglong uVar5;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x3ea);
  FUN_14004fe70(local_40,*(undefined4 *)(param_4 + 0x18));
  uVar3 = 0;
  iVar2 = *(int *)(param_4 + 0x18);
  uVar5 = uVar3;
  if (0 < iVar2) {
    do {
      if (((longlong)uVar3 < 0) || (iVar2 <= (int)uVar5)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      FUN_14004fe70(local_40,*(undefined4 *)(*(longlong *)(param_4 + 0x10) + uVar3 * 4));
      uVar4 = (int)uVar5 + 1;
      uVar5 = (ulonglong)uVar4;
      uVar3 = uVar3 + 1;
      iVar2 = *(int *)(param_4 + 0x18);
    } while ((int)uVar4 < iVar2);
  }
  FUN_1401af4e0(local_40,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_40,PTR_u_NotifyCommon_SendRmi_140321300,
                     0x3ea);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_14019c810(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             longlong param_5,undefined8 param_6)

{
  undefined1 uVar1;
  int iVar2;
  ulonglong uVar3;
  uint uVar4;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  ulonglong uVar5;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0x3ea);
  FUN_14004fe70(local_40,*(undefined4 *)(param_5 + 0x18));
  uVar3 = 0;
  iVar2 = *(int *)(param_5 + 0x18);
  uVar5 = uVar3;
  if (0 < iVar2) {
    do {
      if (((longlong)uVar3 < 0) || (iVar2 <= (int)uVar5)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      FUN_14004fe70(local_40,*(undefined4 *)(*(longlong *)(param_5 + 0x10) + uVar3 * 4));
      uVar4 = (int)uVar5 + 1;
      uVar5 = (ulonglong)uVar4;
      uVar3 = uVar3 + 1;
      iVar2 = *(int *)(param_5 + 0x18);
    } while ((int)uVar4 < iVar2);
  }
  FUN_1401af4e0(local_40,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,PTR_u_NotifyCommon_SendRmi_140321300,
                     0x3ea);
  FUN_1401560e0(local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined8
FUN_14019c950(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  lVar1 = FUN_140156940(0x80);
  if (lVar1 == 0) {
    uVar2 = 0;
  }
  else {
    uVar2 = FUN_1401cb440(lVar1,param_1,param_3,param_4,uVar2);
  }
  return uVar2;
}



void FUN_14019c990(undefined8 *param_1)

{
  *param_1 = Proud::CLookasideAllocator::vftable;
  return;
}



undefined8 * FUN_14019c9a0(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::CLookasideAllocator::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14019c9d0(undefined8 *param_1)

{
  *param_1 = Proud::CLookasideAllocator::vftable;
  return param_1;
}



undefined8 * FUN_14019c9e0(undefined8 *param_1)

{
  *(undefined1 *)(param_1 + 1) = 0;
  *(undefined4 *)((longlong)param_1 + 0xc) = 1;
  *param_1 = 0;
  param_1[2] = 0;
  return param_1;
}



void FUN_14019ca00(undefined8 *param_1)

{
  *param_1 = Proud::ISendIssueObject::vftable;
  return;
}



undefined8 * FUN_14019ca10(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::ISendIssueObject::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



bool FUN_14019ca40(longlong param_1)

{
  return *(int *)(param_1 + 0x710) != *(int *)(param_1 + 0x720);
}



undefined1 FUN_14019ca50(longlong param_1)

{
  return *(undefined1 *)(param_1 + 0x228);
}



void FUN_14019ca60(longlong param_1,undefined1 param_2)

{
  *(undefined1 *)(param_1 + 0x228) = param_2;
  return;
}



void FUN_14019ca70(longlong param_1)

{
                    // WARNING: Could not recover jumptable at 0x00014019ca81. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x198) + 0x118) + 8))();
  return;
}



void FUN_14019ca90(longlong param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4,
                  undefined8 param_5,undefined4 param_6)

{
  FUN_14017f200(*(undefined8 *)(param_1 + 0x198),param_1 + -0xa0,param_2,param_3,param_4,param_5,
                param_6);
  return;
}



void FUN_14019cad0(longlong param_1)

{
  FUN_1401a3490(*(undefined8 *)(param_1 + 0x640));
  return;
}



void FUN_14019cae0(longlong param_1)

{
  FUN_1401a37d0(param_1 + -0x48);
  return;
}



void FUN_14019caf0(undefined8 *param_1)

{
  if ((void *)*param_1 != (void *)0x0) {
    operator_delete((void *)*param_1);
  }
  return;
}



bool FUN_14019cb10(longlong param_1)

{
  return *(longlong *)(param_1 + 0x278) == 0;
}



void FUN_14019cb20(longlong param_1)

{
  double dVar1;
  char *pcVar2;
  undefined1 *puVar3;
  double dVar4;
  double dVar5;
  double dVar6;
  
  if (*(longlong *)(param_1 + 0x750) != 0) {
    dVar5 = *(double *)(*(longlong *)(param_1 + 0x750) + 8);
    dVar4 = (double)(**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x238) + 0x118) + 8))();
    pcVar2 = *(char **)(param_1 + 0x750);
    if (*(double *)(pcVar2 + 0x10) == 0.0) {
      *(double *)(pcVar2 + 0x10) = dVar4;
      *(double *)(*(longlong *)(param_1 + 0x750) + 8) = dVar4;
      return;
    }
    if (*pcVar2 == '\0') {
      dVar1 = *(double *)(*(longlong *)(param_1 + 0x238) + 0x17f8);
      dVar6 = 0.9;
      if ((dVar1 <= 0.9) && (dVar6 = dVar1, dVar1 < 0.2)) {
        dVar6 = 0.2;
      }
      dVar5 = dVar4 - dVar5;
      *(double *)(*(longlong *)(param_1 + 0x750) + 0x18) =
           (*(double *)(*(longlong *)(param_1 + 0x750) + 0x18) - dVar5) * dVar6 + dVar5;
      puVar3 = *(undefined1 **)(param_1 + 0x750);
      if ((5.8999999999999995 < dVar4 - *(double *)(puVar3 + 0x10)) &&
         (*(double *)(puVar3 + 0x18) <= 0.413 && *(double *)(puVar3 + 0x18) != 0.413)) {
        *puVar3 = 1;
      }
      if (**(char **)(param_1 + 0x750) != '\0') {
        FUN_14017c710(*(undefined8 *)(param_1 + 0x238),param_1,"Speedhack",1);
      }
      *(double *)(*(longlong *)(param_1 + 0x750) + 8) = dVar4;
    }
  }
  return;
}



bool FUN_14019cc80(longlong param_1)

{
  return *(longlong *)(param_1 + 0x188) != 0;
}



bool FUN_14019cc90(longlong param_1)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x198) + 0x748);
  if (plVar1 != (longlong *)0x0) {
    return *plVar1 == 0;
  }
  return true;
}



void FUN_14019ccc0(longlong param_1)

{
  if (*(longlong *)(param_1 + 0x10) != 0) {
    FUN_14015af20(*(longlong *)(param_1 + 0x10),param_1 + -0x110);
  }
  return;
}



void FUN_14019ccf0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  longlong lVar2;
  longlong *plVar3;
  longlong lVar4;
  undefined8 uVar5;
  longlong lVar6;
  
  uVar5 = 0xfffffffffffffffe;
  lVar4 = *(longlong *)(param_1 + 0x198) + 0x798;
  lVar6 = lVar4;
  FUN_140156b50(lVar4);
  if (*(longlong *)(param_1 + 0x80) == 0) {
    lVar1 = param_1 + -0xa0;
    lVar2 = *(longlong *)(param_1 + 0x198);
    plVar3 = (longlong *)(lVar2 + 0x808);
    if (*(longlong *)(param_1 + 0x80) != 0) {
      FUN_14015af20(plVar3,lVar1,param_3,param_4,uVar5,lVar6,1);
    }
    if (*(longlong *)(lVar2 + 0x810) == 0) {
      *plVar3 = lVar1;
    }
    else {
      *(longlong *)(*(longlong *)(lVar2 + 0x810) + 0x118) = lVar1;
      *(undefined8 *)(param_1 + 0x70) = *(undefined8 *)(lVar2 + 0x810);
    }
    *(longlong *)(lVar2 + 0x810) = lVar1;
    *(longlong **)(param_1 + 0x80) = plVar3;
    *(int *)(lVar2 + 0x818) = *(int *)(lVar2 + 0x818) + 1;
  }
  FUN_140156be0(lVar4);
  return;
}



void FUN_14019cdb0(longlong param_1,undefined8 param_2,undefined4 param_3)

{
  longlong *plVar1;
  undefined **local_30;
  undefined8 local_28;
  undefined8 local_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_28 = 0;
  local_20 = 0;
  local_18 = 0;
  local_10 = 0;
  local_30 = Proud::ByteArray::vftable;
  plVar1 = (longlong *)(param_1 + -0x68);
  (**(code **)(*plVar1 + 0x38))(plVar1,0xb,3,&local_30,param_2,param_3,0xfffffffffffffffe);
  FUN_1401858d0(&local_30);
                    // WARNING: Could not recover jumptable at 0x00014019ce25. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*plVar1 + 0x40))(plVar1,param_2);
  return;
}



void FUN_14019ce30(undefined8 *param_1)

{
  void *pvVar1;
  
  pvVar1 = (void *)*param_1;
  if (pvVar1 != (void *)0x0) {
    FUN_1401858d0((longlong)pvVar1 + 8);
    operator_delete(pvVar1);
  }
  return;
}



void FUN_14019ce60(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  undefined *puVar2;
  undefined8 uVar3;
  longlong *plVar4;
  undefined *puVar5;
  double dVar6;
  undefined *local_res8;
  
  if (*(longlong *)(param_1 + 0xc0) == 0) {
    *(undefined8 *)(param_1 + 0xc0) = param_2;
    plVar4 = (longlong *)(*(longlong *)(param_1 + 0x198) + 0x118);
    dVar6 = (double)(**(code **)(*plVar4 + 8))(plVar4,param_2,param_3,param_4,0xfffffffffffffffe);
    if ((dVar6 - *(double *)(param_1 + 0x5f0) < 0.3) &&
       (*(longlong *)(*(longlong *)(param_1 + 0x198) + 0x17f0) != 0)) {
      FUN_1401568c0();
      local_res8 = PTR_DAT_1403200a0;
      FUN_14004ce50(&local_res8,&DAT_14026c2a0,param_2);
      puVar2 = local_res8;
      puVar5 = local_res8;
      if (local_res8 == (undefined *)0x0) {
        puVar5 = PTR_DAT_1403200a0;
      }
      FUN_140196a90(*(undefined8 *)(*(longlong *)(param_1 + 0x198) + 0x17f0),0,puVar5);
      if (((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) &&
         (puVar2 + -8 != (undefined *)0x0)) {
        uVar3 = FUN_1401568c0();
        FUN_140156b50(uVar3);
        piVar1 = (int *)(puVar2 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar2 + -8);
        }
        FUN_140156be0(uVar3);
      }
    }
  }
  return;
}



undefined4 FUN_14019cf70(longlong param_1,undefined8 param_2)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 local_res8 [2];
  
  FUN_140190d90(param_2,0);
  iVar1 = FUN_1401a8ac0(*(longlong *)(param_1 + 0x748) + 200,param_2,
                        *(undefined4 *)(param_1 + 0x6f8),
                        *(undefined4 *)(*(longlong *)(param_1 + 0x238) + 0x22c),local_res8);
  uVar2 = 0;
  if (iVar1 < 0) {
    uVar2 = local_res8[0];
  }
  return uVar2;
}



void FUN_14019cfe0(longlong param_1,undefined8 param_2,undefined4 param_3,longlong param_4,
                  undefined4 param_5,longlong param_6)

{
  longlong lVar1;
  int iVar2;
  longlong lVar3;
  longlong lVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  undefined1 local_res18 [8];
  undefined8 local_48;
  undefined4 local_40;
  longlong local_38;
  undefined4 local_30;
  undefined4 local_2c;
  
  FUN_140190d90(param_6,0);
  uVar5 = (ulonglong)*(int *)(param_6 + 0x18);
  FUN_1401a7ac0(&local_48);
  lVar4 = 0;
  local_2c = param_5;
  local_38 = param_6;
  local_30 = 0;
  local_48 = param_2;
  local_40 = param_3;
  iVar2 = FUN_1401a84e0(&local_48,local_res18);
  if ((-1 < iVar2) && (0 < iVar2)) {
    lVar3 = uVar5 * 0x48;
    uVar6 = uVar5;
    do {
      if (((longlong)(lVar4 + uVar5) < 0) || (*(int *)(param_6 + 0x18) <= (int)uVar6)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      lVar1 = *(longlong *)(param_6 + 0x10);
      lVar4 = lVar4 + 1;
      *(undefined4 *)(lVar3 + 0x38 + lVar1) = *(undefined4 *)(param_4 + 8);
      *(undefined2 *)(lVar3 + 0x3c + lVar1) = *(undefined2 *)(param_4 + 0xc);
      uVar6 = (ulonglong)((int)uVar6 + 1);
      *(undefined4 *)(lVar3 + 0x28 + lVar1) = *(undefined4 *)(param_1 + 0x6f8);
      lVar3 = lVar3 + 0x48;
    } while (lVar4 < iVar2);
  }
  return;
}



void FUN_14019d0e0(longlong param_1,longlong param_2)

{
  undefined2 uVar1;
  uint uVar2;
  longlong lVar3;
  longlong lVar4;
  longlong *plVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  char cVar8;
  undefined4 uVar9;
  uint *puVar10;
  uint *puVar11;
  undefined *puVar12;
  uint *puVar13;
  uint *puVar14;
  ulonglong uVar15;
  uint uVar16;
  undefined8 uVar17;
  
  uVar17 = 0xfffffffffffffffe;
  *(undefined4 *)(param_2 + 0x30) = *(undefined4 *)(param_1 + 0x6f8);
  uVar1 = *(undefined2 *)(param_1 + 0x714);
  *(undefined4 *)(param_2 + 0x18) = *(undefined4 *)(param_1 + 0x710);
  *(undefined2 *)(param_2 + 0x1c) = uVar1;
  lVar3 = *(longlong *)(param_1 + 0x748);
  *(undefined4 *)(param_2 + 8) = *(undefined4 *)(lVar3 + 0x130);
  *(undefined2 *)(param_2 + 0xc) = *(undefined2 *)(lVar3 + 0x134);
  *(undefined4 *)(param_2 + 0x28) = *(undefined4 *)(param_1 + 0x720);
  *(undefined2 *)(param_2 + 0x2c) = *(undefined2 *)(param_1 + 0x724);
  *(undefined8 *)(param_2 + 0xa0) = *(undefined8 *)(param_1 + 0x1c8);
  *(undefined4 *)(param_2 + 0xa8) = *(undefined4 *)(param_1 + 0x1e8);
  *(undefined1 *)(param_2 + 0x91) = *(undefined1 *)(param_1 + 0x700);
  puVar14 = (uint *)0x0;
  puVar13 = puVar14;
  if (*(longlong *)(param_1 + 0x68) != 0) {
    puVar13 = *(uint **)(param_1 + 0x58);
  }
  for (; puVar13 != (uint *)0x0; puVar13 = *(uint **)(puVar13 + 4)) {
    uVar16 = *(uint *)(param_2 + 0x60);
    uVar2 = *puVar13;
    uVar6 = (ulonglong)uVar2 % (ulonglong)uVar16;
    lVar3 = *(longlong *)(param_2 + 0x40);
    if (lVar3 != 0) {
      for (puVar10 = *(uint **)(lVar3 + uVar6 * 8);
          (puVar10 != (uint *)0x0 && ((uint)uVar6 == puVar10[6] % uVar16));
          puVar10 = *(uint **)(puVar10 + 2)) {
        if (*puVar10 == uVar2) goto LAB_14019d231;
      }
    }
    uVar6 = (ulonglong)uVar2 % (ulonglong)uVar16;
    if (lVar3 != 0) {
      for (puVar10 = *(uint **)(lVar3 + uVar6 * 8);
          (puVar10 != (uint *)0x0 && ((uint)uVar6 == puVar10[6] % uVar16));
          puVar10 = *(uint **)(puVar10 + 2)) {
        if (*puVar10 == uVar2) goto LAB_14019d22d;
      }
    }
    puVar10 = (uint *)FUN_140161c90(param_2 + 0x38,puVar13,uVar6);
LAB_14019d22d:
    *(undefined1 *)(puVar10 + 1) = 0;
LAB_14019d231:
  }
  puVar13 = puVar14;
  if (0 < *(int *)(param_1 + 600)) {
    do {
      if (((longlong)puVar14 < 0) || (*(int *)(param_1 + 600) <= (int)puVar13)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      puVar10 = (uint *)(*(longlong *)(param_1 + 0x250) + (longlong)puVar14 * 4);
      lVar3 = param_2 + 0x38;
      uVar16 = *puVar10;
      uVar2 = *(uint *)(param_2 + 0x60);
      uVar15 = (ulonglong)uVar2;
      uVar6 = (ulonglong)uVar16 % uVar15;
      lVar4 = *(longlong *)(param_2 + 0x40);
      if (lVar4 != 0) {
        for (puVar11 = *(uint **)(lVar4 + uVar6 * 8);
            (puVar11 != (uint *)0x0 && ((uint)uVar6 == puVar11[6] % uVar2));
            puVar11 = *(uint **)(puVar11 + 2)) {
          if (*puVar11 == uVar16) goto LAB_14019d32e;
        }
      }
      uVar7 = (ulonglong)uVar16 % uVar15;
      if (lVar4 == 0) {
LAB_14019d2ef:
        cVar8 = FUN_1401a8bb0(lVar3,uVar15,CONCAT71((int7)(uVar6 >> 8),1),uVar15,uVar17);
        if (cVar8 == '\0') {
                    // WARNING: Subroutine does not return
          FUN_14004ea80(0x8007000e);
        }
      }
      else {
        for (puVar11 = *(uint **)(lVar4 + uVar7 * 8);
            (puVar11 != (uint *)0x0 && ((uint)uVar7 == puVar11[6] % uVar2));
            puVar11 = *(uint **)(puVar11 + 2)) {
          if (*puVar11 == uVar16) goto LAB_14019d325;
        }
        if (lVar4 == 0) goto LAB_14019d2ef;
      }
      FUN_14015ce40(lVar3);
      puVar11 = (uint *)FUN_14015ec60(lVar3,puVar10,uVar7,uVar16);
      FUN_14015ce40(lVar3);
LAB_14019d325:
      *(undefined1 *)(puVar11 + 1) = 0;
LAB_14019d32e:
      uVar16 = (int)puVar13 + 1;
      puVar13 = (uint *)(ulonglong)uVar16;
      puVar14 = (uint *)((longlong)puVar14 + 1);
    } while ((int)uVar16 < *(int *)(param_1 + 600));
  }
  *(undefined1 *)(param_2 + 0x34) = 0;
  *(bool *)(param_2 + 0x90) = *(int *)(param_1 + 0x710) != *(int *)(param_1 + 0x720);
  puVar12 = *(undefined **)(param_2 + 0x98);
  if (*(undefined **)(param_2 + 0x98) == (undefined *)0x0) {
    puVar12 = PTR_DAT_1403200a0;
  }
  *(undefined **)(param_2 + 0x98) = puVar12;
  if (*(undefined **)(param_1 + 0x1f0) != puVar12) {
    uVar17 = FUN_1401568c0();
    FUN_140156b50(uVar17);
    FUN_14004f990(param_2 + 0x98);
    puVar12 = *(undefined **)(param_1 + 0x1f0);
    *(undefined **)(param_2 + 0x98) = puVar12;
    if (((puVar12 != PTR_DAT_1403200a0) && (puVar12 != (undefined *)0x0)) &&
       (puVar12 != (undefined *)0x8)) {
      *(int *)(puVar12 + -4) = *(int *)(puVar12 + -4) + 1;
    }
    FUN_140156be0(uVar17);
  }
  *(undefined8 *)(param_2 + 0xb0) = *(undefined8 *)(param_1 + 0x30);
  *(undefined8 *)(param_2 + 0xb8) = *(undefined8 *)(param_1 + 0x1e0);
  plVar5 = *(longlong **)(*(longlong *)(param_1 + 0x238) + 0x478);
  uVar9 = (**(code **)(*plVar5 + 0x18))(plVar5,*(undefined4 *)(param_1 + 0x6f8));
  *(undefined4 *)(param_2 + 200) = uVar9;
  *(undefined4 *)(param_2 + 0xc0) = *(undefined4 *)(param_1 + 0x1d8);
  *(undefined4 *)(param_2 + 0xc4) = *(undefined4 *)(param_1 + 0x1dc);
  return;
}



void FUN_14019d460(longlong param_1,longlong param_2,undefined1 param_3)

{
  uint uVar1;
  ulonglong uVar2;
  uint uVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar1 = *(uint *)(param_1 + 0x28);
  uVar2 = (ulonglong)*(uint *)(param_2 + 0x28) % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x20) == 1) {
    *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    *(undefined8 *)(param_1 + 0x10) = 0;
    *(undefined8 *)(param_1 + 0x18) = 0;
  }
  else {
    uVar3 = (uint)uVar2;
    if (((*(longlong *)(param_2 + 0x20) == 0) ||
        (*(uint *)(*(longlong *)(param_2 + 0x20) + 0x28) % uVar1 != uVar3)) &&
       ((*(longlong *)(param_2 + 0x18) == 0 ||
        (*(uint *)(*(longlong *)(param_2 + 0x18) + 0x28) % uVar1 != uVar3)))) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    }
    else if (param_2 == *(longlong *)(*(longlong *)(param_1 + 8) + (longlong)(int)uVar3 * 8)) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = *(undefined8 *)(param_2 + 0x18);
    }
    if (param_2 == *(longlong *)(param_1 + 0x10)) {
      *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_2 + 0x18);
      *(undefined8 *)(param_2 + 0x20) = 0;
    }
    if (param_2 == *(longlong *)(param_1 + 0x18)) {
      *(undefined8 *)(param_1 + 0x18) = *(undefined8 *)(param_2 + 0x20);
      *(undefined8 *)(param_2 + 0x18) = 0;
    }
    if (*(longlong *)(param_2 + 0x20) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x20) + 0x18) = *(undefined8 *)(param_2 + 0x18);
    }
    if (*(longlong *)(param_2 + 0x18) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x18) + 0x20) = *(undefined8 *)(param_2 + 0x20);
    }
  }
  FUN_14016cec0(param_1,param_2,param_3);
  FUN_14015b050(param_1);
  return;
}



undefined8 FUN_14019d560(longlong param_1,longlong param_2,undefined1 param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  
  uVar2 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8)) %
          (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (lVar1 = *(longlong *)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (lVar1 != 0 && ((uint)uVar2 == *(uint *)(lVar1 + 0x28) % *(uint *)(param_1 + 0x28)));
        lVar1 = *(longlong *)(lVar1 + 0x18)) {
      if ((*(uint *)(lVar1 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar1 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        FUN_14019d460(param_1,lVar1,param_3);
        return 1;
      }
    }
  }
  return 0;
}



void FUN_14019d5f0(longlong param_1)

{
  longlong *plVar1;
  undefined8 *puVar2;
  void *pvVar3;
  longlong *plVar4;
  longlong *plVar5;
  uint uVar6;
  ulonglong uVar7;
  longlong lVar8;
  longlong lVar9;
  float fVar10;
  float fVar11;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_14015b3b0();
  plVar5 = *(longlong **)(param_1 + 0x10);
  while (plVar5 != (longlong *)0x0) {
    plVar1 = (longlong *)plVar5[2];
    if ((*plVar5 != 0) &&
       (*(longlong *)(*plVar5 + 8) = *(longlong *)(*plVar5 + 8) + -1,
       *(longlong *)(*plVar5 + 8) == 0)) {
      puVar2 = (undefined8 *)*plVar5;
      pvVar3 = (void *)*puVar2;
      if (pvVar3 != (void *)0x0) {
        FUN_14015aa60(pvVar3);
        operator_delete(pvVar3);
      }
      FUN_140156970(puVar2);
    }
    plVar4 = *(longlong **)(param_1 + 0x50);
    if (plVar4 == (longlong *)0x0) {
      FUN_140156970(plVar5);
    }
    else {
      (**(code **)(*plVar4 + 0x18))(plVar4,plVar5);
    }
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    plVar5 = plVar1;
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_14015b3b0(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar6 = FUN_14019e650(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    lVar8 = 0;
    *(uint *)(param_1 + 0x28) = uVar6;
    fVar11 = (float)uVar6 * *(float *)(param_1 + 0x34);
    if ((9.223372e+18 < fVar11) && (fVar11 = fVar11 - 9.223372e+18, fVar11 < 9.223372e+18)) {
      lVar8 = -0x8000000000000000;
    }
    fVar10 = (float)uVar6 * *(float *)(param_1 + 0x30);
    lVar9 = 0;
    *(longlong *)(param_1 + 0x38) = (longlong)fVar11 + lVar8;
    if ((9.223372e+18 < fVar10) && (fVar10 = fVar10 - 9.223372e+18, fVar10 < 9.223372e+18)) {
      lVar9 = -0x8000000000000000;
    }
    uVar7 = (longlong)fVar10 + lVar9;
    if ((ulonglong)((longlong)fVar10 + lVar9) < 0x11) {
      uVar7 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar7;
  }
  FUN_14015b3b0(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



void FUN_14019d780(void)

{
  FUN_14019d5f0();
  return;
}



// WARNING: Removing unreachable block (ram,0x00014019d7fb)
// WARNING: Removing unreachable block (ram,0x00014019d804)
// WARNING: Removing unreachable block (ram,0x00014019d822)
// WARNING: Removing unreachable block (ram,0x00014019d82b)

undefined1 * FUN_14019d7a0(undefined1 *param_1)

{
  *param_1 = 0;
  *(undefined4 *)(param_1 + 0x28) = 0x11;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined4 *)(param_1 + 0x48) = 0;
  *(undefined4 *)(param_1 + 0x2c) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x30) = 0x3e800000;
  *(undefined4 *)(param_1 + 0x34) = 0x40100000;
  *(undefined8 *)(param_1 + 0x38) = 0x26;
  *(undefined8 *)(param_1 + 0x40) = 0;
  return param_1;
}



void thunk_FUN_14019d780(void)

{
  FUN_14019d780();
  return;
}



void FUN_14019d860(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  double dVar2;
  undefined8 uVar3;
  undefined4 *puVar4;
  longlong *plVar5;
  undefined4 *puVar6;
  double dVar7;
  longlong *local_res8;
  undefined8 uVar8;
  undefined1 uVar9;
  
  uVar8 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(**(longlong **)(param_1 + 0x238) + 0x58))();
  FUN_140156b50(uVar3);
  uVar9 = 1;
  if (DAT_1403288ef != '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x238) + 200))
              (*(longlong **)(param_1 + 0x238),L"Proud::CRemoteClient_S::GetP2PGroupTotalRecentPing"
              );
  }
  FUN_140174d90(*(undefined8 *)(param_1 + 0x238),&local_res8,param_2,param_4,uVar8,uVar3,uVar9);
  if ((local_res8 != (longlong *)0x0) && (lVar1 = *local_res8, lVar1 != 0)) {
    dVar2 = 0.0;
    puVar6 = (undefined4 *)0x0;
    if (*(longlong *)(lVar1 + 0x28) != 0) {
      puVar6 = *(undefined4 **)(lVar1 + 0x18);
    }
    while( true ) {
      puVar4 = (undefined4 *)0x0;
      if (local_res8 != (longlong *)0x0) {
        puVar4 = (undefined4 *)*local_res8;
      }
      if (puVar6 == (undefined4 *)0x0) break;
      plVar5 = (longlong *)(*(longlong *)(param_1 + 0x238) + 0xa8);
      dVar7 = (double)(**(code **)(*plVar5 + 0xd0))(plVar5,*puVar6);
      if (0.0 <= dVar7) {
        dVar2 = dVar2 + 1.0;
      }
      puVar6 = *(undefined4 **)(puVar6 + 6);
    }
    if ((undefined4 *)(lVar1 + 8) != puVar4 + 2) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    if (0.0 < dVar2) {
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        lVar1 = *local_res8;
        if (lVar1 != 0) {
          FUN_140162160(lVar1);
          FUN_140156970(lVar1);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar3);
      return;
    }
  }
  if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
    lVar1 = *local_res8;
    if (lVar1 != 0) {
      FUN_140162160(lVar1);
      FUN_140156970(lVar1);
    }
    FUN_140156970(local_res8);
  }
  FUN_140156be0(uVar3);
  return;
}



longlong * FUN_14019daa0(undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  uVar3 = 0;
  lVar1 = FUN_140156940(0xd0);
  uVar2 = uVar3;
  if (lVar1 != 0) {
    uVar2 = FUN_1401cb6a0(lVar1);
  }
  FUN_14015f1f0(param_2,uVar2,param_3,param_4,uVar4);
  if (*param_2 != 0) {
    uVar3 = *(undefined8 *)(*param_2 + 0x38);
  }
  FUN_14019d0e0(param_1,uVar3);
  return param_2;
}



undefined8 FUN_14019db20(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined1 local_120 [16];
  undefined1 local_110 [8];
  longlong local_108;
  int local_fc;
  undefined1 local_f0 [232];
  
  if (*(longlong *)(param_1 + 0x278) == 0) {
    uVar1 = 0;
  }
  else {
    uVar1 = FUN_1401778b0(param_1 + 0x260,local_120,param_3,param_4,0xfffffffffffffffe);
    FUN_1401ab440(param_2,uVar1,*(undefined4 *)(param_1 + 0x6f0));
    FUN_140174b20(local_f0);
    FUN_1401560e0(local_110);
    if ((local_108 != 0) && (local_fc < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    uVar1 = 1;
  }
  return uVar1;
}



undefined8 * FUN_14019dbc0(undefined8 *param_1,longlong param_2,undefined8 param_3,longlong param_4)

{
  undefined4 uVar1;
  void *pvVar2;
  undefined1 *puVar3;
  undefined1 *puVar4;
  undefined8 uVar5;
  undefined **local_50;
  undefined4 local_48;
  undefined2 local_44;
  
  *param_1 = Proud::ISendDest_S::vftable;
  FUN_1401ab880(param_1 + 1,param_2,param_3,param_4,0xfffffffffffffffe);
  param_1[7] = Proud::ICompletionContext::vftable;
  param_1[0x22] = 0;
  param_1[0x23] = 0;
  param_1[0x24] = 0;
  FUN_140177d80(param_1 + 8);
  param_1[0x14] = Proud::ITcpLayerOwner_S::vftable;
  param_1[0x15] = 0;
  FUN_1401a3780(param_1 + 0x18);
  *param_1 = Proud::CRemoteClient_S::vftable;
  param_1[1] = Proud::CRemoteClient_S::vftable;
  param_1[7] = Proud::CRemoteClient_S::vftable;
  param_1[8] = Proud::CRemoteClient_S::vftable;
  param_1[0x14] = Proud::CRemoteClient_S::vftable;
  param_1[0x18] = Proud::CRemoteClient_S::vftable;
  param_1[0x21] = Proud::CRemoteClient_S::vftable;
  uVar1 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x25,uVar1,1);
  puVar4 = (undefined1 *)0x0;
  param_1[0x3c] = 0;
  FUN_1401568c0();
  param_1[0x3e] = PTR_DAT_1403200a0;
  param_1[0x40] = 0;
  param_1[0x41] = 0;
  param_1[0x42] = 0;
  param_1[0x43] = 0;
  param_1[0x3f] = Proud::ByteArray::vftable;
  param_1[0x45] = 0;
  param_1[0x48] = Proud::CFastArray<>::vftable;
  param_1[0x49] = 0;
  param_1[0x4a] = 0;
  param_1[0x4b] = 0;
  param_1[0x4c] = 0;
  param_1[0x4d] = 0;
  param_1[0x50] = 0;
  param_1[0x4e] = 0;
  param_1[0x4f] = 0;
  *(undefined4 *)(param_1 + 0xc9) = 0;
  param_1[0xcc] = 0;
  param_1[0xcd] = 0;
  param_1[0xce] = 0;
  param_1[0xcf] = 0;
  param_1[0xcb] = Proud::ByteArray::vftable;
  *(undefined1 *)(param_1 + 0xd0) = 0;
  FUN_14019d7a0(param_1 + 0xd4);
  FUN_1401a4d90(param_1 + 0xe0,param_1);
  param_1[0xea] = 0;
  param_1[0xec] = 0;
  pvVar2 = operator_new(0x140);
  puVar3 = puVar4;
  if (pvVar2 != (void *)0x0) {
    local_50 = Proud::AddrPort::vftable;
    local_48 = *(undefined4 *)(param_4 + 8);
    local_44 = *(undefined2 *)(param_4 + 0xc);
    puVar3 = (undefined1 *)FUN_1401a3340(pvVar2,param_1 + 0x14,param_3,&local_50);
  }
  param_1[0xe9] = puVar3;
  *(undefined4 *)(param_1 + 0xed) = 0;
  param_1[0x31] = 0;
  param_1[0x32] = 0;
  param_1[0x2c] = 0;
  uVar5 = (**(code **)(*(longlong *)(param_2 + 0x118) + 8))();
  param_1[0x35] = (double)DAT_140320d78;
  *(undefined4 *)(param_1 + 0xdf) = 0;
  *(undefined1 *)(param_1 + 0xd3) = 0;
  *(undefined1 *)(param_1 + 0x46) = 0;
  param_1[0x38] = 0;
  param_1[0x39] = 0;
  *(undefined4 *)(param_1 + 0x3d) = 0;
  param_1[0x47] = param_2;
  param_1[0xd2] = uVar5;
  param_1[0x30] = uVar5;
  param_1[0x33] = uVar5;
  param_1[0x34] = uVar5;
  param_1[0x37] = uVar5;
  *(undefined4 *)((longlong)param_1 + 0x68a) = 0;
  *(undefined1 *)(param_1 + 0xd1) = 0;
  param_1[0x36] = 0;
  param_1[0x3c] = 0;
  param_1[0xeb] = 0;
  param_1[0x3a] = 0;
  param_1[0x3b] = 0;
  param_1[0x44] = 0;
  puVar3 = operator_new(0x20);
  if (puVar3 != (undefined1 *)0x0) {
    *(undefined8 *)(puVar3 + 0x18) = 0x3fe2e147ae147ae1;
    *(undefined8 *)(puVar3 + 0x10) = 0;
    *(undefined8 *)(puVar3 + 8) = 0;
    *puVar3 = 0;
    puVar4 = puVar3;
  }
  param_1[0xea] = puVar4;
  FUN_1401f0c30(param_1 + 0x4d);
  FUN_1401a3330(param_1[0xe9],*(undefined1 *)(param_2 + 0x240));
  return param_1;
}



longlong FUN_14019df50(longlong param_1)

{
  return param_1 + 0x20;
}



undefined4 FUN_14019df60(longlong param_1)

{
  return *(undefined4 *)(param_1 + 0x6f8);
}



void FUN_14019df70(longlong param_1)

{
  FUN_14019df60(param_1 + -8);
  return;
}



void FUN_14019df80(longlong param_1)

{
  FUN_14019e450(param_1 + -0x38);
  return;
}



void FUN_14019df90(longlong param_1)

{
  FUN_14019e450(param_1 + -0x40);
  return;
}



void FUN_14019dfa0(longlong param_1)

{
  FUN_14019e450(param_1 + -0xc0);
  return;
}



void FUN_14019dfb0(longlong param_1)

{
  FUN_1401792a0(param_1 + -0x38);
  return;
}



void FUN_14019dfc0(longlong param_1)

{
  FUN_14019e450(param_1 + -8);
  return;
}



void FUN_14019dfd0(longlong param_1)

{
  FUN_14019e450(param_1 + -0x108);
  return;
}



void FUN_14019dfe0(longlong param_1)

{
  FUN_14019df60(param_1 + -0x40);
  return;
}



void FUN_14019dff0(undefined8 *param_1)

{
  longlong *plVar1;
  void *pvVar2;
  undefined8 *puVar3;
  longlong lVar4;
  undefined8 local_res10;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  *param_1 = Proud::CRemoteClient_S::vftable;
  param_1[1] = Proud::CRemoteClient_S::vftable;
  param_1[7] = Proud::CRemoteClient_S::vftable;
  param_1[8] = Proud::CRemoteClient_S::vftable;
  param_1[0x14] = Proud::CRemoteClient_S::vftable;
  param_1[0x18] = Proud::CRemoteClient_S::vftable;
  param_1[0x21] = Proud::CRemoteClient_S::vftable;
  FUN_14019d5f0(param_1 + 0xd4);
  if (param_1[0x24] != 0) {
    FUN_14015af20(param_1[0x24],param_1);
  }
  if (param_1[4] != 0) {
    FUN_14018c590();
  }
  plVar1 = (longlong *)param_1[0xec];
  if ((plVar1 != (longlong *)0x0) && (*plVar1 != 0)) {
    if (plVar1 == (longlong *)0x0) {
      lVar4 = 0;
    }
    else {
      lVar4 = *plVar1;
    }
    FUN_14019d560(param_1[0x47] + 0x6f0,lVar4 + 0x158,0);
    if (0 < *(int *)(param_1 + 0xed)) {
      FUN_14013c1d0(param_1[0x47] + 0x1848,*(undefined4 *)(param_1[0x47] + 0x1860),param_1 + 0xed,1,
                    uVar5);
    }
    local_res10 = 0;
    FUN_1401d43e0(param_1 + 0xec,&local_res10);
  }
  pvVar2 = (void *)param_1[0xe9];
  if (pvVar2 != (void *)0x0) {
    FUN_1401a3410(pvVar2);
    operator_delete(pvVar2);
  }
  FUN_140177b40(param_1 + 0x4d);
  if ((param_1[0xec] != 0) &&
     (*(longlong *)(param_1[0xec] + 8) = *(longlong *)(param_1[0xec] + 8) + -1,
     *(longlong *)(param_1[0xec] + 8) == 0)) {
    plVar1 = (longlong *)param_1[0xec];
    puVar3 = (undefined8 *)*plVar1;
    if (puVar3 != (undefined8 *)0x0) {
      (**(code **)*puVar3)(puVar3,1);
    }
    FUN_140156970(plVar1);
  }
  if ((void *)param_1[0xea] != (void *)0x0) {
    operator_delete((void *)param_1[0xea]);
  }
  FUN_1401a4e40(param_1 + 0xe0);
  FUN_14019d780(param_1 + 0xd4);
  FUN_1401858d0(param_1 + 0xcb);
  FUN_140177b40(param_1 + 0x4d);
  puVar3 = (undefined8 *)param_1[0x4d];
  if (puVar3 != (undefined8 *)0x0) {
    (**(code **)*puVar3)(puVar3,1);
  }
  param_1[0x48] = Proud::CFastArray<>::vftable;
  if (param_1[0x4a] != 0) {
    plVar1 = (longlong *)param_1[0x49];
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,param_1[0x4a]);
    }
  }
  pvVar2 = (void *)param_1[0x45];
  if (pvVar2 != (void *)0x0) {
    FUN_1401858d0((longlong)pvVar2 + 8);
    operator_delete(pvVar2);
  }
  FUN_1401858d0(param_1 + 0x3f);
  FUN_14004f990(param_1 + 0x3e);
  FUN_140156c00(param_1 + 0x25);
  param_1[0x21] = Proud::ISendIssueObject::vftable;
  FUN_1401a37a0(param_1 + 0x18);
  param_1[8] = Proud::CP2PGroupMemberBase_S::vftable;
  FUN_140177890(param_1 + 9);
  if (param_1[0x24] != 0) {
    FUN_14015af20(param_1[0x24],param_1);
  }
  param_1[7] = Proud::ICompletionContext::vftable;
  FUN_1401ab800(param_1 + 1);
  *param_1 = Proud::ISendDest_S::vftable;
  return;
}



void FUN_14019e2e0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  undefined1 local_128 [8];
  undefined1 local_120 [8];
  longlong local_118;
  int local_10c;
  undefined1 local_100 [232];
  
  uVar3 = 0xfffffffffffffffe;
  if ((*(longlong *)(param_1 + 0x238) != 0) &&
     (*(longlong *)(*(longlong *)(param_1 + 0x238) + 0x3e0) != 0)) {
    FUN_1401544a0(local_128);
    FUN_140176480(local_100,param_2,param_3,param_4,uVar3);
    uVar3 = *(undefined8 *)(param_1 + 0x278);
    plVar1 = *(longlong **)(param_1 + 0x268);
    if (plVar1 == (longlong *)0x0) {
      puVar2 = (undefined8 *)FUN_140156940(0x128);
    }
    else {
      puVar2 = (undefined8 *)(**(code **)(*plVar1 + 8))(plVar1,0x128);
    }
    if (puVar2 != (undefined8 *)0x0) {
      *(undefined4 *)(puVar2 + 2) = 0;
      FUN_1401544d0(puVar2 + 3,local_128);
      FUN_140176480(puVar2 + 8,local_100);
    }
    puVar2[1] = uVar3;
    *puVar2 = 0;
    *(longlong *)(param_1 + 0x280) = *(longlong *)(param_1 + 0x280) + 1;
    if (*(undefined8 **)(param_1 + 0x278) == (undefined8 *)0x0) {
      *(undefined8 **)(param_1 + 0x270) = puVar2;
    }
    else {
      **(undefined8 **)(param_1 + 0x278) = puVar2;
    }
    *(undefined8 **)(param_1 + 0x278) = puVar2;
    FUN_140174b20(local_100);
    FUN_1401560e0(local_120);
    if ((local_118 != 0) && (local_10c < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_1401ab5e0(*(longlong *)(*(longlong *)(param_1 + 0x238) + 0x3e0) + 0x160,param_1 + 8);
  }
  return;
}



undefined8 FUN_14019e450(undefined8 param_1,uint param_2)

{
  FUN_14019dff0();
  if ((param_2 & 1) != 0) {
    FUN_140156970(param_1);
  }
  return param_1;
}



undefined2 FUN_14019e480(undefined1 param_1,undefined1 param_2)

{
  return CONCAT11(param_1,param_2);
}



void FUN_14019e490(longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined1 local_58 [88];
  
  if ((longlong *)param_2[2] != param_1) {
    FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                  L"Proud::CListNode<class Proud::UdpPacketCtx>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  plVar1 = (longlong *)param_2[1];
  lVar2 = *param_2;
  if (plVar1 != (longlong *)0x0) {
    *plVar1 = lVar2;
  }
  if (lVar2 != 0) {
    *(longlong **)(lVar2 + 8) = plVar1;
  }
  if (plVar1 == (longlong *)0x0) {
    if ((longlong *)param_1[1] != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::UdpPacketCtx>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    param_1[1] = lVar2;
  }
  if (lVar2 == 0) {
    if ((longlong *)*param_1 != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::UdpPacketCtx>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    *param_1 = (longlong)plVar1;
  }
  *param_2 = 0;
  param_2[1] = 0;
  param_2[2] = 0;
  *(int *)(param_1 + 2) = (int)param_1[2] + -1;
  return;
}



void FUN_14019e570(longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined1 local_58 [88];
  
  if ((longlong *)param_2[2] != param_1) {
    FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                  L"Proud::CListNode<class Proud::CUdpPacketFragBoard::CPacketQueue>::CListOwner::Erase"
                 );
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  plVar1 = (longlong *)param_2[1];
  lVar2 = *param_2;
  if (plVar1 != (longlong *)0x0) {
    *plVar1 = lVar2;
  }
  if (lVar2 != 0) {
    *(longlong **)(lVar2 + 8) = plVar1;
  }
  if (plVar1 == (longlong *)0x0) {
    if ((longlong *)param_1[1] != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CUdpPacketFragBoard::CPacketQueue>::CListOwner::Erase"
                   );
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    param_1[1] = lVar2;
  }
  if (lVar2 == 0) {
    if ((longlong *)*param_1 != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CUdpPacketFragBoard::CPacketQueue>::CListOwner::Erase"
                   );
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    *param_1 = (longlong)plVar1;
  }
  *param_2 = 0;
  param_2[1] = 0;
  param_2[2] = 0;
  *(int *)(param_1 + 2) = (int)param_1[2] + -1;
  return;
}



uint FUN_14019e650(longlong param_1,longlong param_2)

{
  uint uVar1;
  longlong lVar2;
  uint *puVar3;
  int iVar4;
  uint uVar5;
  float fVar6;
  
  fVar6 = (float)param_2;
  if (param_2 < 0) {
    fVar6 = fVar6 + 1.8446744e+19;
  }
  fVar6 = fVar6 / *(float *)(param_1 + 0x2c);
  lVar2 = 0;
  if ((9.223372e+18 < fVar6) && (fVar6 = fVar6 - 9.223372e+18, fVar6 < 9.223372e+18)) {
    lVar2 = -0x8000000000000000;
  }
  uVar5 = (uint)((longlong)fVar6 + lVar2);
  if (0xffffffff < (ulonglong)((longlong)fVar6 + lVar2)) {
    uVar5 = 0xffffffff;
  }
  iVar4 = 0;
  if (0x11 < uVar5) {
    puVar3 = &DAT_1402877f0;
    do {
      puVar3 = puVar3 + 1;
      iVar4 = iVar4 + 1;
    } while (*puVar3 < uVar5);
  }
  uVar1 = (&DAT_1402877f0)[iVar4];
  if ((&DAT_1402877f0)[iVar4] == 0xffffffff) {
    uVar1 = uVar5;
  }
  return uVar1;
}



bool FUN_14019e6d0(longlong param_1,undefined8 param_2)

{
  char cVar1;
  
  if (*(int *)(param_1 + 0x158) + *(int *)(param_1 + 0x140) + *(int *)(param_1 + 0x120) +
      *(int *)(param_1 + 0x108) + *(int *)(param_1 + 0xe8) + *(int *)(param_1 + 0xd0) +
      *(int *)(param_1 + 0xb0) + *(int *)(param_1 + 0x98) + *(int *)(param_1 + 0x78) +
      *(int *)(param_1 + 0x60) + *(int *)(param_1 + 0x40) + *(int *)(param_1 + 0x28) +
      *(int *)(param_1 + 0x1b0) == 0) {
    return false;
  }
  if (*(char *)(*(longlong *)(param_1 + 400) + 0x88) == '\0') {
    return true;
  }
  cVar1 = FUN_1401cb790(param_1 + 0x1d8,param_2,*(undefined8 *)(param_1 + 0x208));
  return cVar1 == '\0';
}



void FUN_14019e770(longlong param_1)

{
  if (*(longlong *)(param_1 + 0x10) != 0) {
    FUN_14019e490(*(longlong *)(param_1 + 0x10),param_1);
  }
  return;
}



void FUN_14019e790(longlong param_1)

{
  if (*(longlong *)(param_1 + 0x10) != 0) {
    FUN_14019e570(*(longlong *)(param_1 + 0x10),param_1);
  }
  return;
}



void FUN_14019e7b0(undefined8 *param_1,undefined8 *param_2)

{
  if (param_2[2] != 0) {
    FUN_14019e490();
  }
  if (param_1[1] == 0) {
    *param_1 = param_2;
  }
  else {
    *(undefined8 **)(param_1[1] + 8) = param_2;
    *param_2 = param_1[1];
  }
  param_1[1] = param_2;
  param_2[2] = param_1;
  *(int *)(param_1 + 2) = *(int *)(param_1 + 2) + 1;
  return;
}



void FUN_14019e800(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014019e827. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



void FUN_14019e840(undefined8 *param_1,undefined8 *param_2)

{
  if (param_2[2] != 0) {
    FUN_14019e570();
  }
  if (param_1[1] == 0) {
    *param_1 = param_2;
  }
  else {
    *(undefined8 **)(param_1[1] + 8) = param_2;
    *param_2 = param_1[1];
  }
  param_1[1] = param_2;
  param_2[2] = param_1;
  *(int *)(param_1 + 2) = *(int *)(param_1 + 2) + 1;
  return;
}



void FUN_14019e890(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<bool,1>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014019e8b7. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



longlong FUN_14019e8d0(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  longlong lVar2;
  
  uVar1 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8)) %
          (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + uVar1 * 8);
        (lVar2 != 0 && ((uint)uVar1 == *(uint *)(lVar2 + 0x28) % *(uint *)(param_1 + 0x28)));
        lVar2 = *(longlong *)(lVar2 + 0x18)) {
      if ((*(uint *)(lVar2 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar2 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        return lVar2;
      }
    }
  }
  return 0;
}



undefined8 * FUN_14019e930(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_14019e990(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<bool,1>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_14019e9f0(undefined8 *param_1,longlong param_2,longlong param_3)

{
  longlong lVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  longlong lVar4;
  undefined8 *puVar5;
  longlong lVar6;
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (-1 < param_3) {
    param_1[3] = param_3;
  }
  if (param_2 == 0) {
    if ((100 < (ulonglong)param_1[2]) && ((void *)*param_1 != (void *)0x0)) {
      operator_delete__((void *)*param_1);
      *param_1 = 0;
    }
    param_1[2] = 100;
    param_1[1] = 0;
    return;
  }
  lVar4 = param_1[2];
  if (param_2 <= lVar4) {
    param_1[1] = param_2;
    return;
  }
  lVar1 = param_1[3];
  if (lVar1 == 0) {
    lVar1 = (longlong)(param_1[1] + (ulonglong)((uint)((longlong)param_1[1] >> 0x3f) & 7)) >> 3;
    if (lVar1 < 4) {
      lVar1 = 4;
    }
    else if (0x400 < lVar1) {
      lVar1 = 0x400;
    }
  }
  lVar6 = param_2;
  if (param_2 < lVar1 + lVar4) {
    lVar6 = lVar1 + lVar4;
  }
  if (lVar6 < lVar4) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  puVar2 = operator_new(lVar6 << 4);
  puVar5 = param_1 + 4;
  if (100 < (ulonglong)param_1[2]) {
    puVar5 = (undefined8 *)*param_1;
  }
  lVar4 = param_1[1];
  if (0 < lVar4) {
    puVar3 = puVar2;
    do {
      lVar4 = lVar4 + -1;
      *puVar3 = *(undefined8 *)(((longlong)puVar5 - (longlong)puVar2) + (longlong)puVar3);
      puVar3[1] = *(undefined8 *)
                   (((longlong)puVar5 - (longlong)puVar2) + -8 + (longlong)(puVar3 + 2));
      puVar3 = puVar3 + 2;
    } while (lVar4 != 0);
  }
  memset(puVar2 + param_1[1] * 2,0,(param_2 - param_1[1]) * 0x10);
  if (100 < (ulonglong)param_1[2]) {
    operator_delete__(puVar5);
  }
  *param_1 = puVar2;
  param_1[2] = lVar6;
  param_1[1] = param_2;
  return;
}



void FUN_14019eb60(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  undefined1 local_58 [88];
  
  lVar1 = *param_1;
  while( true ) {
    if (lVar1 == 0) {
      return;
    }
    plVar2 = (longlong *)*param_1;
    if ((longlong *)plVar2[2] != param_1) break;
    plVar3 = (longlong *)plVar2[1];
    lVar1 = *plVar2;
    if (plVar3 != (longlong *)0x0) {
      *plVar3 = lVar1;
    }
    if (lVar1 != 0) {
      *(longlong **)(lVar1 + 8) = plVar3;
    }
    if (plVar3 == (longlong *)0x0) {
      if ((longlong *)param_1[1] != plVar2) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::UdpPacketCtx>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      param_1[1] = lVar1;
    }
    if (lVar1 == 0) {
      if ((longlong *)*param_1 != plVar2) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::UdpPacketCtx>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      *param_1 = (longlong)plVar3;
    }
    *plVar2 = 0;
    plVar2[1] = 0;
    plVar2[2] = 0;
    *(int *)(param_1 + 2) = (int)param_1[2] + -1;
    lVar1 = *param_1;
  }
  FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                L"Proud::CListNode<class Proud::UdpPacketCtx>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



void FUN_14019ec50(longlong param_1,int param_2)

{
  longlong *plVar1;
  int iVar2;
  longlong lVar3;
  undefined1 local_58 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 != *(int *)(param_1 + 0x18)) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar2 = FUN_1401abc90();
      plVar1 = *(longlong **)(param_1 + 8);
      lVar3 = (longlong)iVar2;
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar1 == (longlong *)0x0) {
          lVar3 = FUN_140156940(lVar3 << 3);
        }
        else {
          lVar3 = (**(code **)(*plVar1 + 8))(plVar1,lVar3 << 3);
        }
      }
      else {
        if (plVar1 == (longlong *)0x0) {
          lVar3 = FUN_1401569a0(*(undefined8 *)(param_1 + 0x10),lVar3 << 3);
        }
        else {
          lVar3 = (**(code **)(*plVar1 + 0x10))(plVar1,*(undefined8 *)(param_1 + 0x10),lVar3 << 3);
        }
        if (lVar3 == 0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
      }
      *(longlong *)(param_1 + 0x10) = lVar3;
      *(int *)(param_1 + 0x1c) = iVar2;
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_14019ed20(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  undefined1 local_58 [88];
  
  lVar1 = *param_1;
  while( true ) {
    if (lVar1 == 0) {
      return;
    }
    plVar2 = (longlong *)*param_1;
    if ((longlong *)plVar2[2] != param_1) break;
    plVar3 = (longlong *)plVar2[1];
    lVar1 = *plVar2;
    if (plVar3 != (longlong *)0x0) {
      *plVar3 = lVar1;
    }
    if (lVar1 != 0) {
      *(longlong **)(lVar1 + 8) = plVar3;
    }
    if (plVar3 == (longlong *)0x0) {
      if ((longlong *)param_1[1] != plVar2) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::CUdpPacketFragBoard::CPacketQueue>::CListOwner::Erase"
                     );
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      param_1[1] = lVar1;
    }
    if (lVar1 == 0) {
      if ((longlong *)*param_1 != plVar2) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::CUdpPacketFragBoard::CPacketQueue>::CListOwner::Erase"
                     );
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      *param_1 = (longlong)plVar3;
    }
    *plVar2 = 0;
    plVar2[1] = 0;
    plVar2[2] = 0;
    *(int *)(param_1 + 2) = (int)param_1[2] + -1;
    lVar1 = *param_1;
  }
  FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                L"Proud::CListNode<class Proud::CUdpPacketFragBoard::CPacketQueue>::CListOwner::Erase"
               );
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



void FUN_14019ee10(longlong param_1)

{
  FUN_1401a8bb0(param_1 + 0x20,3,1);
  return;
}



void FUN_14019ee30(undefined8 *param_1,undefined8 *param_2,undefined8 param_3)

{
  char cVar1;
  
  if (param_2[2] == 0) {
    cVar1 = FUN_14019e6d0(param_2,param_3);
    if (cVar1 != '\0') {
      if (param_2[2] != 0) {
        FUN_14019e570(param_1,param_2);
      }
      if (param_1[1] == 0) {
        *param_1 = param_2;
      }
      else {
        *(undefined8 **)(param_1[1] + 8) = param_2;
        *param_2 = param_1[1];
      }
      param_1[1] = param_2;
      param_2[2] = param_1;
      *(int *)(param_1 + 2) = *(int *)(param_1 + 2) + 1;
    }
  }
  return;
}



int FUN_14019eea0(longlong param_1)

{
  longlong lVar1;
  int iVar2;
  ulonglong uVar3;
  longlong *plVar4;
  int iVar5;
  
  iVar5 = 0;
  plVar4 = (longlong *)(param_1 + 0x18);
  uVar3 = 0;
  do {
    if (5 < uVar3) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    iVar2 = 0;
    for (lVar1 = *plVar4; lVar1 != 0; lVar1 = *(longlong *)(lVar1 + 8)) {
      iVar2 = iVar2 + *(int *)(lVar1 + 0x30);
    }
    for (lVar1 = plVar4[3]; lVar1 != 0; lVar1 = *(longlong *)(lVar1 + 8)) {
      iVar2 = iVar2 + *(int *)(lVar1 + 0x30);
    }
    uVar3 = uVar3 + 1;
    iVar5 = iVar5 + iVar2;
    plVar4 = plVar4 + 7;
  } while ((longlong)uVar3 < 6);
  if (0 < *(int *)(param_1 + 0x1c0)) {
    iVar5 = iVar5 + (*(int *)(param_1 + 0x1c0) - *(int *)(param_1 + 0x1c8));
  }
  return iVar5;
}



ulonglong FUN_14019ef20(longlong param_1,longlong param_2)

{
  uint uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  longlong lVar4;
  
  uVar1 = *(uint *)(param_1 + 0x30);
  uVar2 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8));
  uVar3 = uVar2 / uVar1;
  uVar2 = uVar2 % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x10) != 0) {
    for (lVar4 = *(longlong *)(*(longlong *)(param_1 + 0x10) + uVar2 * 8);
        (lVar4 != 0 &&
        (uVar3 = (ulonglong)*(uint *)(lVar4 + 0x28) / (ulonglong)uVar1,
        (uint)uVar2 == *(uint *)(lVar4 + 0x28) % uVar1)); lVar4 = *(longlong *)(lVar4 + 0x18)) {
      if ((*(uint *)(lVar4 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar4 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        return *(ulonglong *)(lVar4 + 0x10);
      }
    }
  }
  return uVar3;
}



void thunk_FUN_14019eb60(void)

{
  FUN_14019eb60();
  return;
}



void thunk_FUN_14019ed20(void)

{
  FUN_14019ed20();
  return;
}



int FUN_14019efa0(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  longlong lVar2;
  
  uVar1 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8)) %
          (ulonglong)*(uint *)(param_1 + 0x48);
  if (*(longlong *)(param_1 + 0x28) != 0) {
    for (lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x28) + uVar1 * 8);
        (lVar2 != 0 && ((uint)uVar1 == *(uint *)(lVar2 + 0x28) % *(uint *)(param_1 + 0x48)));
        lVar2 = *(longlong *)(lVar2 + 0x18)) {
      if ((*(uint *)(lVar2 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar2 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        lVar2 = *(longlong *)(lVar2 + 0x10);
        return *(int *)(lVar2 + 0x1b0) +
               *(int *)(lVar2 + 0x158) + *(int *)(lVar2 + 0x140) + *(int *)(lVar2 + 0x120) +
               *(int *)(lVar2 + 0x108) + *(int *)(lVar2 + 0xe8) + *(int *)(lVar2 + 0xd0) +
               *(int *)(lVar2 + 0xb0) + *(int *)(lVar2 + 0x98) + *(int *)(lVar2 + 0x78) +
               *(int *)(lVar2 + 0x60) + *(int *)(lVar2 + 0x40) + *(int *)(lVar2 + 0x28);
      }
    }
  }
  return 0;
}



ulonglong FUN_14019f040(longlong param_1,longlong param_2,undefined8 param_3)

{
  uint uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  longlong lVar4;
  
  uVar1 = *(uint *)(param_1 + 0x48);
  uVar2 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8));
  uVar3 = uVar2 / uVar1;
  uVar2 = uVar2 % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x28) != 0) {
    lVar4 = *(longlong *)(*(longlong *)(param_1 + 0x28) + uVar2 * 8);
    while( true ) {
      if (lVar4 == 0) {
        return uVar3;
      }
      uVar3 = (ulonglong)*(uint *)(lVar4 + 0x28) / (ulonglong)uVar1;
      if ((uint)uVar2 != *(uint *)(lVar4 + 0x28) % uVar1) {
        return uVar3;
      }
      if ((*(uint *)(lVar4 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar4 + 0xc) == *(ushort *)(param_2 + 0xc))) break;
      lVar4 = *(longlong *)(lVar4 + 0x18);
    }
    uVar3 = *(ulonglong *)(lVar4 + 0x10);
    *(undefined8 *)(uVar3 + 0x210) = param_3;
  }
  return uVar3;
}



undefined8 FUN_14019f0a0(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  uVar1 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8)) %
          (ulonglong)*(uint *)(param_1 + 0x48);
  if (*(longlong *)(param_1 + 0x28) != 0) {
    for (lVar3 = *(longlong *)(*(longlong *)(param_1 + 0x28) + uVar1 * 8);
        (lVar3 != 0 && ((uint)uVar1 == *(uint *)(lVar3 + 0x28) % *(uint *)(param_1 + 0x48)));
        lVar3 = *(longlong *)(lVar3 + 0x18)) {
      if ((*(uint *)(lVar3 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar3 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        uVar2 = FUN_14019eea0(*(undefined8 *)(lVar3 + 0x10));
        return uVar2;
      }
    }
  }
  return 0;
}



void FUN_14019f120(longlong param_1)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  
  iVar1 = *(int *)(param_1 + 0x1b0);
  uVar4 = 0;
  uVar5 = uVar4;
  if (0 < (longlong)iVar1) {
    do {
      if (((longlong)uVar4 < 0) || (*(int *)(param_1 + 0x1b0) <= (int)uVar5)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      lVar2 = *(longlong *)(param_1 + 400);
      lVar3 = *(longlong *)(*(longlong *)(param_1 + 0x1a8) + uVar4 * 8);
      if ((*(short *)(lVar3 + -8) != 0x1de6) || (*(longlong *)(lVar3 + 0x50) != 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      uVar4 = uVar4 + 1;
      *(undefined8 *)(lVar3 + 0x50) = *(undefined8 *)(lVar2 + 0x80);
      *(short **)(lVar2 + 0x80) = (short *)(lVar3 + -8);
      uVar5 = (ulonglong)((int)uVar5 + 1);
    } while ((longlong)uVar4 < (longlong)iVar1);
  }
  FUN_14019ec50(param_1 + 0x198,0);
  return;
}



void FUN_14019f1b0(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  longlong lVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  lVar2 = *param_1;
  while( true ) {
    if (lVar2 == 0) {
      while( true ) {
        lVar2 = param_1[3];
        if (lVar2 == 0) {
          FUN_14019eb60(param_1 + 3);
          FUN_14019eb60(param_1);
          return;
        }
        if (*(longlong *)(lVar2 + 0x10) != 0) {
          FUN_14019e490(*(longlong *)(lVar2 + 0x10),lVar2,param_3,param_4,uVar3);
        }
        lVar1 = *(longlong *)(param_1[6] + 400);
        if ((*(short *)(lVar2 + -8) != 0x1de6) || (*(longlong *)(lVar2 + 0x50) != 0)) break;
        *(undefined8 *)(lVar2 + 0x50) = *(undefined8 *)(lVar1 + 0x80);
        *(short **)(lVar1 + 0x80) = (short *)(lVar2 + -8);
      }
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (*(longlong *)(lVar2 + 0x10) != 0) {
      FUN_14019e490(*(longlong *)(lVar2 + 0x10),lVar2,param_3,param_4,uVar3);
    }
    lVar1 = *(longlong *)(param_1[6] + 400);
    if ((*(short *)(lVar2 + -8) != 0x1de6) || (*(longlong *)(lVar2 + 0x50) != 0)) break;
    *(undefined8 *)(lVar2 + 0x50) = *(undefined8 *)(lVar1 + 0x80);
    *(short **)(lVar1 + 0x80) = (short *)(lVar2 + -8);
    lVar2 = *param_1;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_14019f2a0(undefined8 *param_1)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  
  if (param_1[0xce] != 0) {
    iVar1 = *(int *)(param_1 + 0xd2);
    lVar4 = 0;
    if (0 < (longlong)iVar1) {
      do {
        if (*(int *)(param_1 + 0xd2) == 0) {
          lVar3 = 0;
        }
        else {
          lVar3 = param_1[0xd1];
        }
        lVar3 = *(longlong *)(lVar3 + lVar4 * 8);
        lVar2 = param_1[0xce];
        if ((*(short *)(lVar3 + -8) != 0x1de6) || (*(longlong *)(lVar3 + 0x50) != 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        lVar4 = lVar4 + 1;
        *(undefined8 *)(lVar3 + 0x50) = *(undefined8 *)(lVar2 + 0x80);
        *(short **)(lVar2 + 0x80) = (short *)(lVar3 + -8);
      } while (lVar4 < iVar1);
    }
  }
  FUN_14019ec50(param_1 + 0xcf,0);
  if ((100 < (ulonglong)param_1[2]) && ((void *)*param_1 != (void *)0x0)) {
    operator_delete__((void *)*param_1);
    *param_1 = 0;
  }
  param_1[1] = 0;
  param_1[2] = 100;
  *(undefined4 *)(param_1 + 0xd5) = DAT_140320450;
  *(undefined2 *)((longlong)param_1 + 0x6ac) = DAT_140320454;
  param_1[0xce] = 0;
  *(undefined4 *)(param_1 + 0xd6) = 0xffffffff;
  return;
}



undefined2 * FUN_14019f3a0(longlong *param_1)

{
  longlong lVar1;
  undefined2 *puVar2;
  
  lVar1 = *param_1;
  if (lVar1 != 0) {
    *param_1 = *(longlong *)(lVar1 + 0x58);
    *(undefined8 *)(lVar1 + 0x58) = 0;
    return (undefined2 *)(lVar1 + 8);
  }
  puVar2 = (undefined2 *)FUN_140156940();
  if (puVar2 != (undefined2 *)0x0) {
    *(undefined8 *)(puVar2 + 4) = 0;
    *(undefined8 *)(puVar2 + 8) = 0;
    *(undefined8 *)(puVar2 + 0xc) = 0;
    *(undefined8 *)(puVar2 + 0x14) = 0;
    *(undefined8 *)(puVar2 + 0x18) = 0;
    *(undefined8 *)(puVar2 + 0x1c) = 0;
    *(undefined8 *)(puVar2 + 0x20) = 0;
    *(undefined ***)(puVar2 + 0x10) = Proud::ByteArray::vftable;
    *(undefined4 *)(puVar2 + 0x28) = 0xffffffff;
    *(undefined4 *)(puVar2 + 0x2a) = 0;
    *(undefined8 *)(puVar2 + 0x2c) = 0;
    *puVar2 = 0x1de6;
    return puVar2 + 4;
  }
  return (undefined2 *)0x8;
}



undefined2 * FUN_14019f430(longlong *param_1)

{
  longlong lVar1;
  undefined2 *puVar2;
  
  lVar1 = *param_1;
  if (lVar1 != 0) {
    *param_1 = *(longlong *)(lVar1 + 0x68);
    *(undefined8 *)(lVar1 + 0x68) = 0;
    return (undefined2 *)(lVar1 + 8);
  }
  puVar2 = (undefined2 *)FUN_140156940(0x70);
  if (puVar2 != (undefined2 *)0x0) {
    *(undefined ***)(puVar2 + 4) = Proud::CFastArray<bool,1>::vftable;
    *(undefined8 *)(puVar2 + 8) = 0;
    *(undefined8 *)(puVar2 + 0xc) = 0;
    *(undefined8 *)(puVar2 + 0x10) = 0;
    *(undefined8 *)(puVar2 + 0x14) = 0;
    *(undefined ***)(puVar2 + 0x18) = Proud::CFastArray<>::vftable;
    *(undefined8 *)(puVar2 + 0x1c) = 0;
    *(undefined8 *)(puVar2 + 0x20) = 0;
    *(undefined8 *)(puVar2 + 0x24) = 0;
    *(undefined8 *)(puVar2 + 0x28) = 0;
    *(undefined4 *)(puVar2 + 0x2c) = 0;
    *(undefined8 *)(puVar2 + 0x30) = 0;
    *puVar2 = 0x1de6;
    *(undefined8 *)(puVar2 + 0x34) = 0;
    return puVar2 + 4;
  }
  return (undefined2 *)0x8;
}



void FUN_14019f4d0(longlong param_1)

{
  longlong *plVar1;
  uint uVar2;
  ulonglong uVar3;
  longlong lVar4;
  longlong lVar5;
  float fVar6;
  float fVar7;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_14015b3b0();
  lVar4 = *(longlong *)(param_1 + 0x10);
  while (lVar4 != 0) {
    plVar1 = *(longlong **)(param_1 + 0x50);
    lVar5 = *(longlong *)(lVar4 + 0x10);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,lVar4);
    }
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    lVar4 = lVar5;
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_14015b3b0(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar2 = FUN_14019e650(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    lVar4 = 0;
    *(uint *)(param_1 + 0x28) = uVar2;
    fVar7 = (float)uVar2 * *(float *)(param_1 + 0x34);
    if ((9.223372e+18 < fVar7) && (fVar7 = fVar7 - 9.223372e+18, fVar7 < 9.223372e+18)) {
      lVar4 = -0x8000000000000000;
    }
    fVar6 = (float)uVar2 * *(float *)(param_1 + 0x30);
    lVar5 = 0;
    *(longlong *)(param_1 + 0x38) = (longlong)fVar7 + lVar4;
    if ((9.223372e+18 < fVar6) && (fVar6 = fVar6 - 9.223372e+18, fVar6 < 9.223372e+18)) {
      lVar5 = -0x8000000000000000;
    }
    uVar3 = (longlong)fVar6 + lVar5;
    if ((ulonglong)((longlong)fVar6 + lVar5) < 0x11) {
      uVar3 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar3;
  }
  FUN_14015b3b0(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



undefined8 * FUN_14019f600(longlong param_1,longlong param_2,uint param_3,undefined4 param_4)

{
  undefined2 uVar1;
  longlong *plVar2;
  longlong lVar3;
  undefined8 uVar4;
  undefined4 uVar5;
  undefined8 *puVar6;
  
  plVar2 = *(longlong **)(param_1 + 0x50);
  if (plVar2 == (longlong *)0x0) {
    puVar6 = (undefined8 *)FUN_140156940(0x30);
  }
  else {
    puVar6 = (undefined8 *)(**(code **)(*plVar2 + 8))(plVar2,0x30);
  }
  if (puVar6 != (undefined8 *)0x0) {
    *puVar6 = Proud::AddrPort::vftable;
    *(undefined4 *)(puVar6 + 1) = *(undefined4 *)(param_2 + 8);
    uVar1 = *(undefined2 *)(param_2 + 0xc);
    *(undefined4 *)(puVar6 + 5) = param_4;
    *(undefined2 *)((longlong)puVar6 + 0xc) = uVar1;
  }
  lVar3 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015b050(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined8 **)(param_1 + 0x10) = puVar6;
    *(undefined8 **)(param_1 + 0x18) = puVar6;
    puVar6[4] = 0;
    puVar6[3] = 0;
  }
  else {
    FUN_14015b050(param_1);
    FUN_14015b050(param_1);
    if (lVar3 == 0) {
      lVar3 = *(longlong *)(param_1 + 0x10);
      puVar6[4] = 0;
      puVar6[3] = lVar3;
      if (lVar3 != 0) {
        *(undefined8 **)(lVar3 + 0x20) = puVar6;
      }
      *(undefined8 **)(param_1 + 0x10) = puVar6;
    }
    else {
      if (*(longlong *)(lVar3 + 0x20) == 0) {
        *(undefined8 **)(param_1 + 0x10) = puVar6;
      }
      else {
        *(undefined8 **)(*(longlong *)(lVar3 + 0x20) + 0x18) = puVar6;
      }
      uVar4 = *(undefined8 *)(lVar3 + 0x20);
      puVar6[3] = lVar3;
      puVar6[4] = uVar4;
      *(undefined8 **)(lVar3 + 0x20) = puVar6;
    }
  }
  *(undefined8 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar6;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b050(param_1);
  FUN_14015b050(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar5 = FUN_14019e650(param_1);
    FUN_1401a8ca0(param_1,uVar5);
  }
  FUN_14015b050(param_1);
  return puVar6;
}



void FUN_14019f750(longlong *param_1,longlong param_2,undefined4 param_3)

{
  longlong lVar1;
  undefined4 uStack_14;
  
  lVar1 = param_1[1];
  if (lVar1 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_14019e9f0(param_1,lVar1 + 1,0xffffffffffffffff);
  if (lVar1 < param_1[1]) {
    if ((ulonglong)param_1[2] < 0x65) {
      param_1 = param_1 + (lVar1 + 2) * 2;
    }
    else {
      param_1 = (longlong *)(lVar1 * 0x10 + *param_1);
    }
    *param_1 = CONCAT44(uStack_14,param_3);
    param_1[1] = param_2;
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



undefined8 FUN_14019f7d0(void)

{
  undefined8 uVar1;
  
  FUN_140156b50(&DAT_14032a038);
  uVar1 = FUN_14019f430(DAT_14032a030);
  FUN_140156be0(&DAT_14032a038);
  return uVar1;
}



void FUN_14019f830(longlong *param_1,undefined8 param_2)

{
  longlong *plVar1;
  char cVar2;
  longlong lVar3;
  
  if (param_1[8] == 0) {
    lVar3 = 0;
  }
  else {
    lVar3 = param_1[6];
  }
  do {
    while( true ) {
      if (lVar3 == 0) {
        return;
      }
      plVar1 = *(longlong **)(lVar3 + 0x10);
      if ((plVar1[2] == 0) && (cVar2 = FUN_14019e6d0(plVar1,param_2), cVar2 != '\0')) break;
LAB_14019f8c5:
      lVar3 = *(longlong *)(lVar3 + 0x18);
    }
    if (plVar1[2] != 0) {
      FUN_14019e570(param_1,plVar1);
    }
    if (param_1[1] != 0) {
      *(longlong **)(param_1[1] + 8) = plVar1;
      *plVar1 = param_1[1];
      param_1[1] = (longlong)plVar1;
      plVar1[2] = (longlong)param_1;
      *(int *)(param_1 + 2) = (int)param_1[2] + 1;
      goto LAB_14019f8c5;
    }
    *param_1 = (longlong)plVar1;
    param_1[1] = (longlong)plVar1;
    plVar1[2] = (longlong)param_1;
    *(int *)(param_1 + 2) = (int)param_1[2] + 1;
    lVar3 = *(longlong *)(lVar3 + 0x18);
  } while( true );
}



// WARNING: Removing unreachable block (ram,0x00014019fe49)
// WARNING: Removing unreachable block (ram,0x00014019fe50)
// WARNING: Removing unreachable block (ram,0x00014019fe5f)

void FUN_14019f8e0(longlong param_1,undefined8 param_2,longlong *param_3)

{
  undefined4 uVar1;
  longlong lVar2;
  longlong lVar3;
  undefined8 uVar4;
  undefined8 *puVar5;
  undefined8 *puVar6;
  int iVar7;
  uint uVar8;
  longlong *plVar9;
  undefined8 *puVar10;
  int iVar11;
  size_t _Size;
  ulonglong uVar12;
  int iVar13;
  int iVar14;
  longlong local_res20;
  undefined8 local_a8;
  undefined1 local_98 [96];
  
  puVar6 = (undefined8 *)0x0;
  plVar9 = (longlong *)(param_1 + 0x30);
  puVar5 = puVar6;
  do {
    if (((longlong)puVar5 < 0) || (5 < (longlong)puVar5)) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    lVar2 = *plVar9;
    if (lVar2 != 0) {
      FUN_14019f2a0(param_3);
      *(undefined4 *)(param_3 + 0xd5) = *(undefined4 *)(param_1 + 0x178);
      local_a8 = (int *)CONCAT44(local_a8._4_4_,0x10);
      *(undefined2 *)((longlong)param_3 + 0x6ac) = *(undefined2 *)(param_1 + 0x17c);
      param_3[0xce] = *(longlong *)(param_1 + 400);
      *(undefined2 *)(param_3 + 0xcc) = 0xabce;
      *(undefined2 *)((longlong)param_3 + 0x662) = *(undefined2 *)(param_1 + 0x180);
      uVar1 = *(undefined4 *)(lVar2 + 0x30);
      param_3[0xcd] = 0;
      *(undefined4 *)((longlong)param_3 + 0x664) = uVar1;
      lVar3 = param_3[1];
      if (lVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      FUN_14019e9f0(param_3,lVar3 + 1,0xffffffffffffffff);
      if (param_3[1] <= lVar3) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_3[2] < 0x65) {
        plVar9 = param_3 + (lVar3 + 2) * 2;
      }
      else {
        plVar9 = (longlong *)(lVar3 * 0x10 + *param_3);
      }
      *plVar9 = (longlong)local_a8;
      plVar9[1] = (longlong)(param_3 + 0xcc);
      puVar5 = puVar6;
      if (*(int *)(lVar2 + 0x30) != 0) {
        puVar5 = *(undefined8 **)(lVar2 + 0x28);
      }
      lVar3 = param_3[1];
      local_a8 = (int *)CONCAT44(local_a8._4_4_,*(int *)(lVar2 + 0x30));
      if (lVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      FUN_14019e9f0(param_3,lVar3 + 1,0xffffffffffffffff);
      if (param_3[1] <= lVar3) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_3[2] < 0x65) {
        plVar9 = param_3 + (lVar3 + 2) * 2;
      }
      else {
        plVar9 = (longlong *)(lVar3 * 0x10 + *param_3);
      }
      *plVar9 = (longlong)local_a8;
      plVar9[1] = (longlong)puVar5;
      *(undefined4 *)(param_3 + 0xd6) = *(undefined4 *)(lVar2 + 0x48);
      iVar14 = (int)param_3[0xd2];
      if (-1 < iVar14) {
        lVar3 = param_3[0xd2];
        FUN_14019ec50(param_3 + 0xcf,(int)lVar3 + 1);
        iVar13 = (int)lVar3 - iVar14;
        if (0 < iVar13) {
          puVar5 = puVar6;
          if ((int)param_3[0xd2] != 0) {
            puVar5 = (undefined8 *)param_3[0xd1];
          }
          memmove(puVar5 + (longlong)iVar14 + 1,puVar5 + iVar14,(longlong)iVar13 << 3);
        }
        if ((int)param_3[0xd2] != 0) {
          puVar6 = (undefined8 *)param_3[0xd1];
        }
        puVar6[iVar14] = lVar2;
        if (*(longlong *)(lVar2 + 0x10) == 0) {
          return;
        }
        FUN_14019e490(*(longlong *)(lVar2 + 0x10),lVar2);
        return;
      }
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    puVar5 = (undefined8 *)((longlong)puVar5 + 1);
    plVar9 = plVar9 + 7;
  } while ((longlong)puVar5 < 6);
  iVar14 = -1;
  if (*(int *)(param_1 + 0x1b0) == 0) {
    *(int *)(param_1 + 0x1d4) = *(int *)(param_1 + 0x1d4) + 1;
    local_a8 = (int *)(param_1 + 0x28);
    *(undefined8 *)(param_1 + 0x1c0) = 0;
    *(undefined8 *)(param_1 + 0x1c8) = 0;
    *(undefined4 *)(param_1 + 0x1d0) = 0;
    local_res20 = 0;
    puVar5 = puVar6;
    do {
      if ((local_res20 < 0) || (5 < local_res20)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      iVar13 = *local_a8;
      while (0 < iVar13) {
        lVar2 = *(longlong *)(local_a8 + -4);
        if ((int)puVar5 == 0) {
          iVar14 = *(int *)(param_1 + 0x1b0);
          if (iVar14 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          iVar13 = *(int *)(param_1 + 0x1b0);
          FUN_14019ec50(param_1 + 0x198,iVar13 + 1);
          iVar13 = iVar13 - iVar14;
          if (0 < iVar13) {
            puVar10 = puVar6;
            if (*(int *)(param_1 + 0x1b0) != 0) {
              puVar10 = *(undefined8 **)(param_1 + 0x1a8);
            }
            memmove(puVar10 + (longlong)iVar14 + 1,puVar10 + iVar14,(longlong)iVar13 << 3);
          }
          puVar10 = puVar6;
          if (*(int *)(param_1 + 0x1b0) != 0) {
            puVar10 = *(undefined8 **)(param_1 + 0x1a8);
          }
          puVar10[iVar14] = lVar2;
          *(int *)(param_1 + 0x1c0) = *(int *)(param_1 + 0x1c0) + *(int *)(lVar2 + 0x30);
          iVar14 = *(int *)(lVar2 + 0x48);
        }
        else {
          if ((DAT_140320d48 <= *(int *)(lVar2 + 0x30) + *(int *)(param_1 + 0x1c0)) ||
             (iVar14 != *(int *)(lVar2 + 0x48))) goto LAB_14019fb2d;
          iVar13 = *(int *)(param_1 + 0x1b0);
          if (iVar13 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          iVar11 = *(int *)(param_1 + 0x1b0);
          FUN_14019ec50(param_1 + 0x198,iVar11 + 1);
          iVar11 = iVar11 - iVar13;
          if (0 < iVar11) {
            puVar10 = puVar6;
            if (*(int *)(param_1 + 0x1b0) != 0) {
              puVar10 = *(undefined8 **)(param_1 + 0x1a8);
            }
            memmove(puVar10 + (longlong)iVar13 + 1,puVar10 + iVar13,(longlong)iVar11 << 3);
          }
          puVar10 = puVar6;
          if (*(int *)(param_1 + 0x1b0) != 0) {
            puVar10 = *(undefined8 **)(param_1 + 0x1a8);
          }
          puVar10[iVar13] = lVar2;
          *(int *)(param_1 + 0x1c0) = *(int *)(param_1 + 0x1c0) + *(int *)(lVar2 + 0x30);
        }
        if (*(longlong *)(lVar2 + 0x10) != 0) {
          FUN_14019e490(*(longlong *)(lVar2 + 0x10),lVar2);
        }
        puVar5 = (undefined8 *)(ulonglong)((int)puVar5 + 1);
        iVar13 = *local_a8;
      }
      local_res20 = local_res20 + 1;
      local_a8 = local_a8 + 0xe;
    } while (local_res20 < 6);
LAB_14019fb2d:
  }
  if (*(int *)(param_1 + 0x1c0) < 1) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_14019f2a0(param_3);
  *(undefined4 *)(param_3 + 0xd5) = *(undefined4 *)(param_1 + 0x178);
  local_a8 = (int *)CONCAT44(local_a8._4_4_,0x10);
  *(undefined2 *)((longlong)param_3 + 0x6ac) = *(undefined2 *)(param_1 + 0x17c);
  iVar13 = *(int *)(param_1 + 0x1c0) - *(int *)(param_1 + 0x1c8);
  if (DAT_140320d48 < iVar13) {
    iVar13 = DAT_140320d48;
  }
  param_3[0xce] = *(longlong *)(param_1 + 400);
  *(undefined2 *)(param_3 + 0xcc) = 0xabcd;
  *(undefined2 *)((longlong)param_3 + 0x662) = *(undefined2 *)(param_1 + 0x180);
  *(undefined4 *)((longlong)param_3 + 0x664) = *(undefined4 *)(param_1 + 0x1c0);
  *(undefined4 *)(param_3 + 0xcd) = *(undefined4 *)(param_1 + 0x1d4);
  *(undefined4 *)((longlong)param_3 + 0x66c) = *(undefined4 *)(param_1 + 0x1c4);
  lVar2 = param_3[1];
  if (-1 < lVar2) {
    FUN_14019e9f0(param_3,lVar2 + 1,0xffffffffffffffff);
    if (param_3[1] <= lVar2) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if ((ulonglong)param_3[2] < 0x65) {
      plVar9 = param_3 + (lVar2 + 2) * 2;
    }
    else {
      plVar9 = (longlong *)(lVar2 * 0x10 + *param_3);
    }
    *plVar9 = (longlong)local_a8;
    plVar9[1] = (longlong)(param_3 + 0xcc);
    *(int *)(param_3 + 0xd6) = iVar14;
    iVar14 = *(int *)(param_1 + 0x1c8);
    iVar11 = iVar14;
    while( true ) {
      if (iVar14 + iVar13 <= iVar11) {
        *(int *)(param_1 + 0x1c4) = *(int *)(param_1 + 0x1c4) + 1;
        if (*(int *)(param_1 + 0x1c8) == *(int *)(param_1 + 0x1c0)) {
          iVar14 = *(int *)(param_1 + 0x1b0);
          puVar5 = puVar6;
          if (*(int *)(param_1 + 0x1b0) != 0) {
            puVar5 = *(undefined8 **)(param_1 + 0x1a8);
          }
          if (iVar14 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          if (iVar14 != 0) {
            lVar2 = param_3[0xd2];
            FUN_14019ec50(param_3 + 0xcf,(int)lVar2 + iVar14);
            puVar10 = puVar6;
            if ((int)param_3[0xd2] != 0) {
              puVar10 = (undefined8 *)param_3[0xd1];
            }
            _Size = (longlong)iVar14 << 3;
            if (_Size < 0x21) {
              puVar10 = puVar10 + (int)lVar2;
              for (uVar12 = (longlong)iVar14 & 0x1fffffffffffffff; uVar12 != 0; uVar12 = uVar12 - 1)
              {
                uVar4 = *puVar5;
                puVar5 = puVar5 + 1;
                *puVar10 = uVar4;
                puVar10 = puVar10 + 1;
              }
            }
            else {
              memcpy(puVar10 + (int)lVar2,puVar5,_Size);
            }
          }
          FUN_14019ec50(param_1 + 0x198,0);
        }
        lVar2 = param_3[1];
        puVar5 = puVar6;
        puVar10 = puVar6;
        if (0 < lVar2) {
          do {
            if (((longlong)puVar6 < 0) || (lVar2 <= (longlong)puVar6)) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            if ((ulonglong)param_3[2] < 0x65) {
              plVar9 = param_3 + ((longlong)puVar6 + 2) * 2;
            }
            else {
              plVar9 = (longlong *)((longlong)puVar6 * 0x10 + *param_3);
            }
            puVar10 = (undefined8 *)(ulonglong)(uint)((int)puVar10 + (int)*plVar9);
            uVar8 = (int)puVar5 + 1;
            puVar6 = (undefined8 *)(longlong)(int)uVar8;
            puVar5 = (undefined8 *)(ulonglong)uVar8;
          } while ((longlong)puVar6 < lVar2);
        }
        FUN_1401cb7d0(param_1 + 0x1d8,puVar10);
        *(undefined8 *)(param_1 + 0x200) = param_2;
        *(double *)(param_1 + 0x1f0) = (double)(int)puVar10 + *(double *)(param_1 + 0x1f0);
        return;
      }
      iVar11 = *(int *)(param_1 + 0x1d0);
      if ((iVar11 < 0) || (*(int *)(param_1 + 0x1b0) <= iVar11)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x1a8) + (longlong)iVar11 * 8);
      iVar11 = *(int *)(lVar2 + 0x30) - *(int *)(param_1 + 0x1cc);
      iVar7 = (iVar14 - *(int *)(param_1 + 0x1c8)) + iVar13;
      if (iVar7 < iVar11) {
        iVar11 = iVar7;
      }
      if (iVar11 < 1) break;
      puVar5 = puVar6;
      if (*(int *)(lVar2 + 0x30) != 0) {
        puVar5 = *(undefined8 **)(lVar2 + 0x28);
      }
      iVar7 = *(int *)(param_1 + 0x1cc);
      lVar3 = param_3[1];
      local_a8._4_4_ = (undefined4)((ulonglong)local_a8 >> 0x20);
      local_a8 = (int *)CONCAT44(local_a8._4_4_,iVar11);
      if (lVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      FUN_14019e9f0(param_3,lVar3 + 1,0xffffffffffffffff);
      if (param_3[1] <= lVar3) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_3[2] < 0x65) {
        plVar9 = param_3 + (lVar3 + 2) * 2;
      }
      else {
        plVar9 = (longlong *)(lVar3 * 0x10 + *param_3);
      }
      *plVar9 = (longlong)local_a8;
      plVar9[1] = (longlong)iVar7 + (longlong)puVar5;
      *(int *)(param_1 + 0x1cc) = *(int *)(param_1 + 0x1cc) + iVar11;
      *(int *)(param_1 + 0x1c8) = *(int *)(param_1 + 0x1c8) + iVar11;
      if (*(int *)(param_1 + 0x1cc) == *(int *)(lVar2 + 0x30)) {
        *(int *)(param_1 + 0x1d0) = *(int *)(param_1 + 0x1d0) + 1;
        *(undefined4 *)(param_1 + 0x1cc) = 0;
      }
      iVar11 = *(int *)(param_1 + 0x1c8);
    }
    FUN_14019f120(param_1);
    FUN_140156300(local_98,L"Unexpected at PacketQueue Pop!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_98,(ThrowInfo *)&DAT_14031d928);
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_1401a0110(void *param_1)

{
  _eh_vector_destructor_iterator_(param_1,0x38,6,FUN_14019f1b0);
  return;
}



void FUN_1401a0130(longlong param_1)

{
  FUN_14019f120();
  *(undefined ***)(param_1 + 0x198) = Proud::CFastArray<>::vftable;
  if (*(longlong *)(param_1 + 0x1a8) != 0) {
    if (*(longlong **)(param_1 + 0x1a0) == (longlong *)0x0) {
      FUN_140156970(*(longlong *)(param_1 + 0x1a8));
    }
    else {
      (**(code **)(**(longlong **)(param_1 + 0x1a0) + 0x18))();
    }
  }
  _eh_vector_destructor_iterator_((void *)(param_1 + 0x18),0x38,6,FUN_14019f1b0);
  if (*(longlong *)(param_1 + 0x10) != 0) {
    FUN_14019e570(*(longlong *)(param_1 + 0x10),param_1);
  }
  return;
}



void FUN_1401a01c0(undefined8 *param_1)

{
  FUN_14019f2a0();
  param_1[0xcf] = Proud::CFastArray<>::vftable;
  if (param_1[0xd1] != 0) {
    if ((longlong *)param_1[0xd0] == (longlong *)0x0) {
      FUN_140156970(param_1[0xd1]);
    }
    else {
      (**(code **)(*(longlong *)param_1[0xd0] + 0x18))();
    }
  }
  if (100 < (ulonglong)param_1[2]) {
    operator_delete__((void *)*param_1);
  }
  return;
}



void FUN_1401a0230(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  lVar1 = *param_1;
  while (lVar1 != 0) {
    lVar1 = *param_1;
    *param_1 = *(longlong *)(lVar1 + 0x58);
    *(undefined8 *)(lVar1 + 0x58) = 0;
    FUN_1401858d0(lVar1 + 0x20);
    if (*(longlong *)(lVar1 + 0x18) != 0) {
      FUN_14019e490(*(longlong *)(lVar1 + 0x18),lVar1 + 8,param_3,param_4,uVar2);
    }
    FUN_140156970(lVar1);
    lVar1 = *param_1;
  }
  return;
}



void FUN_1401a02c0(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  longlong *plVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  lVar1 = *param_1;
  while (lVar1 != 0) {
    lVar1 = *param_1;
    *param_1 = *(longlong *)(lVar1 + 0x68);
    *(undefined8 *)(lVar1 + 0x68) = 0;
    *(undefined ***)(lVar1 + 0x30) = Proud::CFastArray<>::vftable;
    if (*(longlong *)(lVar1 + 0x40) != 0) {
      if (*(longlong **)(lVar1 + 0x38) == (longlong *)0x0) {
        FUN_140156970(*(longlong *)(lVar1 + 0x40));
      }
      else {
        (**(code **)(**(longlong **)(lVar1 + 0x38) + 0x18))();
      }
    }
    *(undefined ***)(lVar1 + 8) = Proud::CFastArray<bool,1>::vftable;
    if (*(longlong *)(lVar1 + 0x18) != 0) {
      plVar2 = *(longlong **)(lVar1 + 0x10);
      if (plVar2 == (longlong *)0x0) {
        FUN_140156970();
      }
      else {
        (**(code **)(*plVar2 + 0x18))(plVar2,*(longlong *)(lVar1 + 0x18),plVar2,param_4,uVar3);
      }
    }
    FUN_140156970(lVar1);
    lVar1 = *param_1;
  }
  return;
}



void FUN_1401a0390(void)

{
  FUN_14019f4d0();
  return;
}



void FUN_1401a03b0(void)

{
  FUN_14015e980();
  return;
}



undefined8 FUN_1401a03d0(longlong param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4)

{
  char cVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 8) == 0) {
    cVar1 = FUN_1401a8bb0(param_1,*(undefined4 *)(param_1 + 0x28),1);
    if (cVar1 == '\0') {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  FUN_14015b050(param_1);
  uVar2 = FUN_14019f600(param_1,param_2,param_3,param_4);
  FUN_14015b050(param_1);
  return uVar2;
}



// WARNING: Removing unreachable block (ram,0x0001401a04ab)
// WARNING: Removing unreachable block (ram,0x0001401a04b4)
// WARNING: Removing unreachable block (ram,0x0001401a04d2)
// WARNING: Removing unreachable block (ram,0x0001401a04db)

undefined1 * FUN_1401a0450(undefined1 *param_1)

{
  *param_1 = 0;
  *(undefined4 *)(param_1 + 0x28) = 0x11;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined4 *)(param_1 + 0x48) = 0;
  *(undefined4 *)(param_1 + 0x2c) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x30) = 0x3e800000;
  *(undefined4 *)(param_1 + 0x34) = 0x40100000;
  *(undefined8 *)(param_1 + 0x38) = 0x26;
  *(undefined8 *)(param_1 + 0x40) = 0;
  *(undefined8 *)(param_1 + 0x60) = 0;
  *(undefined8 *)(param_1 + 0x68) = 0;
  *(undefined8 *)(param_1 + 0x58) = 0;
  *(undefined8 *)(param_1 + 0x70) = 0;
  return param_1;
}



// WARNING: Removing unreachable block (ram,0x0001401a0580)
// WARNING: Removing unreachable block (ram,0x0001401a0589)
// WARNING: Removing unreachable block (ram,0x0001401a05a7)
// WARNING: Removing unreachable block (ram,0x0001401a05b0)
// WARNING: Removing unreachable block (ram,0x0001401a05eb)
// WARNING: Removing unreachable block (ram,0x0001401a05f4)
// WARNING: Removing unreachable block (ram,0x0001401a0612)
// WARNING: Removing unreachable block (ram,0x0001401a061b)

undefined1 * FUN_1401a0510(undefined1 *param_1,longlong param_2)

{
  *param_1 = 0;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  *(undefined4 *)(param_1 + 0x28) = 0x11;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined4 *)(param_1 + 0x48) = 0;
  *(undefined4 *)(param_1 + 0x2c) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x30) = 0x3e800000;
  *(undefined4 *)(param_1 + 0x34) = 0x40100000;
  *(undefined8 *)(param_1 + 0x38) = 0x26;
  *(undefined8 *)(param_1 + 0x40) = 0;
  *(undefined4 *)(param_1 + 0x2c) = 0x3dcccccd;
  *(undefined4 *)(param_1 + 0x30) = 0x33d6bf95;
  *(undefined4 *)(param_1 + 0x34) = 0x40066666;
  *(undefined8 *)(param_1 + 0x38) = 0x23;
  *(undefined8 *)(param_1 + 0x40) = 0;
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(longlong *)(param_1 + 0x50) = param_2;
  return param_1;
}



// WARNING: Removing unreachable block (ram,0x0001401a06b7)
// WARNING: Removing unreachable block (ram,0x0001401a06c0)
// WARNING: Removing unreachable block (ram,0x0001401a06de)
// WARNING: Removing unreachable block (ram,0x0001401a06e7)
// WARNING: Removing unreachable block (ram,0x0001401a0722)
// WARNING: Removing unreachable block (ram,0x0001401a072b)
// WARNING: Removing unreachable block (ram,0x0001401a0749)
// WARNING: Removing unreachable block (ram,0x0001401a0752)

undefined1 * FUN_1401a0650(undefined1 *param_1)

{
  *param_1 = 0;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  *(undefined4 *)(param_1 + 0x28) = 0x11;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined4 *)(param_1 + 0x48) = 0;
  *(undefined4 *)(param_1 + 0x2c) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x30) = 0x3e800000;
  *(undefined4 *)(param_1 + 0x34) = 0x40100000;
  *(undefined8 *)(param_1 + 0x38) = 0x26;
  *(undefined8 *)(param_1 + 0x40) = 0;
  *(undefined4 *)(param_1 + 0x2c) = 0x3dcccccd;
  *(undefined4 *)(param_1 + 0x30) = 0x33d6bf95;
  *(undefined4 *)(param_1 + 0x34) = 0x40066666;
  *(undefined8 *)(param_1 + 0x38) = 0x23;
  *(undefined8 *)(param_1 + 0x40) = 0;
  return param_1;
}



undefined8 FUN_1401a0780(longlong *param_1,longlong param_2,undefined8 param_3)

{
  longlong lVar1;
  char cVar2;
  undefined8 uVar3;
  undefined1 local_68 [96];
  
  lVar1 = *param_1;
  if (lVar1 == 0) {
    uVar3 = 0;
  }
  else {
    if (*(int *)(lVar1 + 0x158) + *(int *)(lVar1 + 0x140) + *(int *)(lVar1 + 0x120) +
        *(int *)(lVar1 + 0x108) + *(int *)(lVar1 + 0xe8) + *(int *)(lVar1 + 0xd0) +
        *(int *)(lVar1 + 0xb0) + *(int *)(lVar1 + 0x98) + *(int *)(lVar1 + 0x78) +
        *(int *)(lVar1 + 0x60) + *(int *)(lVar1 + 0x40) + *(int *)(lVar1 + 0x28) +
        *(int *)(lVar1 + 0x1b0) == 0) {
      FUN_140156300(local_68,L"Unexpected state in RemoteToPacketSendMap!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_68,(ThrowInfo *)&DAT_14031d928);
    }
    uVar3 = (**(code **)(*(longlong *)param_1[3] + 8))();
    FUN_14019f8e0(lVar1,uVar3,param_2);
    if (*(longlong *)(param_2 + 8) == 0) {
      FUN_140156300(local_68,L"Unexpected state in RemoteToPacketSendMap #2!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_68,(ThrowInfo *)&DAT_14031d928);
    }
    cVar2 = FUN_14019e6d0(lVar1,param_3);
    if ((cVar2 == '\0') && (*(longlong *)(lVar1 + 0x10) != 0)) {
      FUN_14019e570(*(longlong *)(lVar1 + 0x10),lVar1);
    }
    else {
      if (*(longlong *)(lVar1 + 0x10) != 0) {
        FUN_14019e570(*(longlong *)(lVar1 + 0x10),lVar1);
      }
      FUN_14019e840(param_1,lVar1);
    }
    *(undefined8 *)(lVar1 + 0x168) = param_3;
    uVar3 = 1;
  }
  return uVar3;
}



undefined8 * FUN_1401a08c0(undefined8 *param_1)

{
  ulonglong uVar1;
  undefined8 *puVar2;
  
  uVar1 = 0;
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  _eh_vector_constructor_iterator_
            (param_1 + 3,0x38,6,(_func_void_void_ptr *)&LAB_14019f100,FUN_14019f1b0);
  param_1[0x2e] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0x2f) = 0;
  *(undefined2 *)((longlong)param_1 + 0x17c) = 0;
  param_1[0x33] = Proud::CFastArray<>::vftable;
  param_1[0x34] = 0;
  param_1[0x35] = 0;
  param_1[0x36] = 0;
  param_1[0x37] = 0;
  FUN_1401cb800(param_1 + 0x3b);
  param_1[0x3e] = 0;
  param_1[0x3f] = 0;
  param_1[0x3d] = 0;
  param_1[0x40] = 0;
  FUN_1401cb8e0(param_1 + 0x41);
  param_1[0x42] = 0;
  param_1[0x43] = 0;
  puVar2 = param_1 + 9;
  do {
    if (5 < uVar1) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    *puVar2 = param_1;
    uVar1 = uVar1 + 1;
    puVar2 = puVar2 + 7;
  } while ((longlong)uVar1 < 6);
  param_1[0x31] = 0xffffffffffffffff;
  param_1[0x32] = 0;
  param_1[0x2d] = 0;
  *(undefined4 *)(param_1 + 0x2f) = DAT_140320450;
  *(undefined2 *)((longlong)param_1 + 0x17c) = DAT_140320454;
  *(undefined2 *)(param_1 + 0x30) = 0;
  param_1[0x38] = 0;
  param_1[0x39] = 0;
  *(undefined4 *)(param_1 + 0x3a) = 0;
  *(int *)((longlong)param_1 + 0x1d4) = (int)param_1;
  return param_1;
}



uint * FUN_1401a0a20(longlong param_1,uint *param_2,undefined8 *param_3)

{
  uint uVar1;
  ulonglong uVar2;
  uint *puVar3;
  
  uVar1 = *param_2;
  uVar2 = (ulonglong)uVar1 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (puVar3 = *(uint **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (puVar3 != (uint *)0x0 && ((uint)uVar2 == puVar3[8] % *(uint *)(param_1 + 0x28)));
        puVar3 = *(uint **)(puVar3 + 4)) {
      if (*puVar3 == uVar1) {
        *(undefined8 *)(puVar3 + 2) = *param_3;
        return puVar3;
      }
    }
  }
  puVar3 = (uint *)FUN_1401b25c0(param_1,param_2,uVar2,(ulonglong)uVar1,0xfffffffffffffffe);
  *(undefined8 *)(puVar3 + 2) = *param_3;
  return puVar3;
}



longlong FUN_1401a0ac0(longlong param_1,longlong param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  longlong lVar2;
  uint uVar3;
  
  uVar3 = (uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8);
  uVar1 = (ulonglong)uVar3 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + uVar1 * 8);
        (lVar2 != 0 && ((uint)uVar1 == *(uint *)(lVar2 + 0x28) % *(uint *)(param_1 + 0x28)));
        lVar2 = *(longlong *)(lVar2 + 0x18)) {
      if ((*(uint *)(lVar2 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar2 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        *(undefined8 *)(lVar2 + 0x10) = *param_3;
        return lVar2;
      }
    }
  }
  lVar2 = FUN_1401a03d0(param_1,param_2,uVar1,uVar3,0xfffffffffffffffe);
  *(undefined8 *)(lVar2 + 0x10) = *param_3;
  return lVar2;
}



// WARNING: Removing unreachable block (ram,0x0001401a0d98)
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401a0b70(longlong param_1,double param_2)

{
  longlong lVar1;
  double dVar2;
  longlong lVar3;
  longlong *plVar4;
  int iVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lStack_70;
  undefined **local_68;
  undefined4 local_60;
  undefined2 local_5c;
  longlong local_58;
  longlong lStack_50;
  
  lVar1 = param_1 + 0x20;
  lVar7 = lVar1;
  lStack_70 = lVar1;
  if (*(longlong *)(param_1 + 0x40) == 0) {
    lVar6 = 0;
  }
  else {
    lVar6 = *(longlong *)(param_1 + 0x30);
  }
  while( true ) {
    while( true ) {
      if ((lVar6 == 0) && (lVar7 == lVar1)) {
        return;
      }
      if (lVar6 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      lVar3 = *(longlong *)(lVar6 + 0x10);
      FUN_1401cb7e0(lVar3 + 0x1d8,param_2);
      FUN_1401cb950(lVar3 + 0x1e8,param_2);
      FUN_1401cb900(lVar3 + 0x210,param_2);
      dVar2 = *(double *)(lVar3 + 0x1e8);
      iVar5 = (**(code **)(**(longlong **)(param_1 + 0x18) + 0x18))();
      if ((double)iVar5 < dVar2) {
        local_68 = Proud::AddrPort::vftable;
        local_60 = *(undefined4 *)(lVar6 + 8);
        local_5c = *(undefined2 *)(lVar6 + 0xc);
        (**(code **)(**(longlong **)(param_1 + 0x18) + 0x10))
                  (*(longlong **)(param_1 + 0x18),&local_68);
      }
      FUN_1401cb860(lVar3 + 0x208,*(undefined8 *)(lVar3 + 0x1e8),*(undefined8 *)(lVar3 + 0x210));
      if (_DAT_140320d50 < param_2 - *(double *)(lVar3 + 0x168)) break;
      if (lVar6 != 0) {
        lVar6 = *(longlong *)(lVar6 + 0x18);
      }
    }
    if (*(longlong *)(lVar3 + 0x10) != 0) {
      FUN_14019e570(*(longlong *)(lVar3 + 0x10),lVar3);
    }
    plVar4 = *(longlong **)(param_1 + 0x78);
    FUN_14019f120(lVar3);
    *(undefined ***)(lVar3 + 0x198) = Proud::CFastArray<>::vftable;
    if (*(longlong *)(lVar3 + 0x1a8) != 0) {
      if (*(longlong **)(lVar3 + 0x1a0) == (longlong *)0x0) {
        FUN_140156970(*(longlong *)(lVar3 + 0x1a8));
      }
      else {
        (**(code **)(**(longlong **)(lVar3 + 0x1a0) + 0x18))();
      }
    }
    _eh_vector_destructor_iterator_((void *)(lVar3 + 0x18),0x38,6,FUN_14019f1b0);
    if (*(longlong *)(lVar3 + 0x10) != 0) {
      FUN_14019e570(*(longlong *)(lVar3 + 0x10),lVar3);
    }
    (**(code **)(*plVar4 + 0x18))(plVar4,lVar3);
    if (lVar7 != lVar1) break;
    lStack_50 = lStack_70;
    if (lVar6 == 0) {
      local_58 = 0;
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    local_58 = *(longlong *)(lVar6 + 0x18);
    FUN_14015eab0(lVar1,lVar6,0);
    lVar6 = local_58;
    lVar7 = lStack_50;
    lStack_70 = lStack_50;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



ulonglong FUN_1401a0df0(longlong param_1,longlong param_2)

{
  uint uVar1;
  undefined8 uVar2;
  longlong *plVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  longlong lVar6;
  
  uVar1 = *(uint *)(param_1 + 0x48);
  uVar4 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8));
  uVar5 = uVar4 / uVar1;
  uVar4 = uVar4 % (ulonglong)uVar1;
  if ((*(longlong *)(param_1 + 0x28) != 0) &&
     (lVar6 = *(longlong *)(*(longlong *)(param_1 + 0x28) + uVar4 * 8), lVar6 != 0)) {
    while( true ) {
      uVar5 = (ulonglong)*(uint *)(lVar6 + 0x28) / (ulonglong)uVar1;
      if ((uint)uVar4 != *(uint *)(lVar6 + 0x28) % uVar1) break;
      if ((*(uint *)(lVar6 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar6 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        if (lVar6 == 0) {
          return uVar5;
        }
        if (*(longlong *)(*(longlong *)(lVar6 + 0x10) + 0x10) != 0) {
          FUN_14019e570();
        }
        uVar2 = *(undefined8 *)(lVar6 + 0x10);
        plVar3 = *(longlong **)(param_1 + 0x78);
        FUN_1401a0130(uVar2);
        (**(code **)(*plVar3 + 0x18))(plVar3,uVar2);
        uVar4 = FUN_14015eab0(param_1 + 0x20,lVar6,0);
        return uVar4;
      }
      lVar6 = *(longlong *)(lVar6 + 0x18);
      if (lVar6 == 0) {
        return uVar5;
      }
    }
  }
  return uVar5;
}



// WARNING: Removing unreachable block (ram,0x0001401a1027)

void FUN_1401a0ed0(longlong param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong lVar3;
  
  if (*(longlong *)(param_1 + 0x40) == 0) {
    lVar3 = 0;
  }
  else {
    lVar3 = *(longlong *)(param_1 + 0x30);
  }
  while( true ) {
    if (lVar3 == 0) {
      return;
    }
    if (lVar3 == 0) break;
    lVar1 = *(longlong *)(lVar3 + 0x10);
    if (*(longlong *)(lVar1 + 0x10) != 0) {
      FUN_14019e570(*(longlong *)(lVar1 + 0x10),lVar1);
    }
    plVar2 = *(longlong **)(param_1 + 0x78);
    FUN_14019f120(lVar1);
    *(undefined ***)(lVar1 + 0x198) = Proud::CFastArray<>::vftable;
    if (*(longlong *)(lVar1 + 0x1a8) != 0) {
      if (*(longlong **)(lVar1 + 0x1a0) == (longlong *)0x0) {
        FUN_140156970(*(longlong *)(lVar1 + 0x1a8));
      }
      else {
        (**(code **)(**(longlong **)(lVar1 + 0x1a0) + 0x18))();
      }
    }
    _eh_vector_destructor_iterator_((void *)(lVar1 + 0x18),0x38,6,FUN_14019f1b0);
    if (*(longlong *)(lVar1 + 0x10) != 0) {
      FUN_14019e570(*(longlong *)(lVar1 + 0x10),lVar1);
    }
    (**(code **)(*plVar2 + 0x18))(plVar2,lVar1);
    if (lVar3 == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    lVar1 = *(longlong *)(lVar3 + 0x18);
    FUN_14015eab0(param_1 + 0x20,lVar3,0);
    lVar3 = lVar1;
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



void FUN_1401a1060(longlong param_1)

{
  longlong *plVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    lVar3 = 0;
  }
  else {
    lVar3 = *(longlong *)(param_1 + 0x10);
  }
  for (; lVar3 != 0; lVar3 = *(longlong *)(lVar3 + 0x18)) {
    if (*(longlong *)(lVar3 + 0x10) != 0) {
      uVar2 = *(undefined8 *)(lVar3 + 0x10);
      FUN_1401a0130(uVar2);
      (**(code **)(*plVar1 + 0x18))(plVar1,uVar2);
    }
  }
  FUN_14015e980(param_1);
  return;
}



undefined8 FUN_1401a10e0(longlong param_1,longlong param_2,undefined8 *param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined8 *puVar3;
  
  uVar2 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8)) %
          (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (lVar1 = *(longlong *)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (lVar1 != 0 && ((uint)uVar2 == *(uint *)(lVar1 + 0x28) % *(uint *)(param_1 + 0x28)));
        lVar1 = *(longlong *)(lVar1 + 0x18)) {
      if ((*(uint *)(lVar1 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar1 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        return 0;
      }
    }
  }
  puVar3 = (undefined8 *)FUN_140190ce0(param_1,param_2);
  *puVar3 = *param_3;
  return 1;
}



longlong FUN_1401a1190(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  
  lVar1 = (**(code **)(*param_1 + 8))(param_1,0x220,param_3,param_4,0xfffffffffffffffe);
  if (lVar1 != 0) {
    FUN_1401a08c0(lVar1);
  }
  return lVar1;
}



void FUN_1401a11d0(longlong *param_1,longlong param_2)

{
  longlong lVar1;
  
  if (*(longlong *)(param_2 + 0x20) == 0) {
    lVar1 = 0;
  }
  else {
    lVar1 = *(longlong *)(param_2 + 0x10);
  }
  for (; lVar1 != 0; lVar1 = *(longlong *)(lVar1 + 0x10)) {
    FUN_14018d9e0(*(undefined8 *)(lVar1 + 8));
  }
  FUN_1401a0390(param_2);
                    // WARNING: Could not recover jumptable at 0x0001401a1236. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x18))(param_1,param_2);
  return;
}



void FUN_1401a1240(longlong param_1,longlong *param_2)

{
  longlong lVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined8 uVar4;
  undefined8 *puVar5;
  int iVar6;
  longlong lVar7;
  longlong lVar8;
  longlong lVar9;
  undefined8 uVar10;
  undefined *puVar11;
  undefined1 local_70 [72];
  
  uVar10 = 0xfffffffffffffffe;
  lVar9 = 0;
  if (*(longlong *)(param_1 + 0x20) != 0) {
    lVar9 = *(longlong *)(param_1 + 0x10);
  }
  do {
    if (lVar9 == 0) {
      return;
    }
    if (*(longlong *)(lVar9 + 0x10) != 0) {
      lVar1 = *(longlong *)(lVar9 + 0x10);
      lVar8 = 0;
      if (*(longlong *)(lVar1 + 0x20) != 0) {
        lVar8 = *(longlong *)(lVar1 + 0x10);
      }
      for (; lVar8 != 0; lVar8 = *(longlong *)(lVar8 + 0x10)) {
        lVar2 = *(longlong *)(lVar8 + 8);
        puVar11 = &DAT_14032a038;
        FUN_140156b50(&DAT_14032a038);
        *(undefined4 *)(lVar2 + 0x50) = 0;
        *(undefined8 *)(lVar2 + 0x58) = 0;
        if (*(int *)(lVar2 + 0x18) != 0) {
          if (*(int *)(lVar2 + 0x1c) < 0) {
            iVar6 = FUN_1401dcff0(lVar2,0);
            plVar3 = *(longlong **)(lVar2 + 8);
            if (*(int *)(lVar2 + 0x1c) == 0) {
              if (plVar3 == (longlong *)0x0) {
                lVar7 = FUN_140156940((longlong)iVar6);
              }
              else {
                lVar7 = (**(code **)(*plVar3 + 8))();
              }
            }
            else {
              uVar4 = *(undefined8 *)(lVar2 + 0x10);
              if (plVar3 == (longlong *)0x0) {
                lVar7 = FUN_1401569a0(uVar4);
              }
              else {
                lVar7 = (**(code **)(*plVar3 + 0x10))
                                  (plVar3,uVar4,(longlong)iVar6,uVar4,uVar10,puVar11);
              }
              if (lVar7 == 0) {
                FUN_140156300(local_70,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
                _CxxThrowException(local_70,(ThrowInfo *)&DAT_14031d928);
              }
            }
            *(longlong *)(lVar2 + 0x10) = lVar7;
            *(int *)(lVar2 + 0x1c) = iVar6;
          }
          *(undefined4 *)(lVar2 + 0x18) = 0;
        }
        if (*(int *)(lVar2 + 0x40) != 0) {
          if (*(int *)(lVar2 + 0x44) < 0) {
            iVar6 = FUN_14004ffc0(lVar2 + 0x28);
            plVar3 = *(longlong **)(lVar2 + 0x30);
            if (*(int *)(lVar2 + 0x44) == 0) {
              if (plVar3 == (longlong *)0x0) {
                lVar7 = FUN_140156940((longlong)iVar6);
              }
              else {
                lVar7 = (**(code **)(*plVar3 + 8))();
              }
            }
            else {
              if (plVar3 == (longlong *)0x0) {
                lVar7 = FUN_1401569a0(*(undefined8 *)(lVar2 + 0x38));
              }
              else {
                lVar7 = (**(code **)(*plVar3 + 0x10))
                                  (plVar3,*(undefined8 *)(lVar2 + 0x38),(longlong)iVar6);
              }
              if (lVar7 == 0) {
                FUN_140156300(local_70,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
                _CxxThrowException(local_70,(ThrowInfo *)&DAT_14031d928);
              }
            }
            *(longlong *)(lVar2 + 0x38) = lVar7;
            *(int *)(lVar2 + 0x44) = iVar6;
          }
          *(undefined4 *)(lVar2 + 0x40) = 0;
        }
        puVar5 = DAT_14032a030;
        if ((*(short *)(lVar2 + -8) != 0x1de6) || (*(longlong *)(lVar2 + 0x60) != 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        *(undefined8 *)(lVar2 + 0x60) = *DAT_14032a030;
        *puVar5 = (short *)(lVar2 + -8);
        FUN_140156be0(&DAT_14032a038);
      }
      FUN_1401a0390(lVar1);
      (**(code **)(*param_2 + 0x18))(param_2,lVar1);
    }
    lVar9 = *(longlong *)(lVar9 + 0x18);
  } while( true );
}



longlong FUN_1401a14a0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  longlong lVar1;
  ulonglong uVar2;
  longlong lVar3;
  float fVar4;
  undefined1 local_50 [72];
  
  lVar1 = (**(code **)(*param_1 + 8))(param_1,0x78,param_3,param_4,0xfffffffffffffffe);
  if (lVar1 != 0) {
    FUN_1401a0450();
  }
  *(undefined4 *)(lVar1 + 0x2c) = 0x3dcccccd;
  *(undefined4 *)(lVar1 + 0x30) = 0x33d6bf95;
  *(undefined4 *)(lVar1 + 0x34) = 0x40066666;
  fVar4 = (float)*(uint *)(lVar1 + 0x28) * 2.1;
  lVar3 = 0;
  if ((9.223372e+18 < fVar4) && (fVar4 = fVar4 - 9.223372e+18, fVar4 < 9.223372e+18)) {
    lVar3 = -0x8000000000000000;
  }
  *(longlong *)(lVar1 + 0x38) = (longlong)fVar4 + lVar3;
  fVar4 = (float)*(uint *)(lVar1 + 0x28) * 1e-07;
  lVar3 = 0;
  if ((9.223372e+18 < fVar4) && (fVar4 = fVar4 - 9.223372e+18, fVar4 < 9.223372e+18)) {
    lVar3 = -0x8000000000000000;
  }
  uVar2 = (longlong)fVar4 + lVar3;
  if ((ulonglong)((longlong)fVar4 + lVar3) < 0x11) {
    uVar2 = 0;
  }
  *(ulonglong *)(lVar1 + 0x40) = uVar2;
  if (*(longlong *)(lVar1 + 0x20) != 0) {
    FUN_140156300(local_50,PTR_u_Collection_object_can_use_fast_h_140320e48);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
  }
  *(longlong **)(lVar1 + 0x50) = param_1;
  return lVar1;
}



void FUN_1401a15c0(longlong param_1,int param_2,undefined2 param_3,longlong param_4,
                  undefined8 param_5,undefined8 param_6,uint *param_7)

{
  ulonglong uVar1;
  char cVar2;
  int iVar3;
  uint uVar4;
  longlong lVar5;
  longlong lVar6;
  longlong *plVar7;
  longlong local_78;
  undefined1 local_70 [88];
  
  cVar2 = FUN_1401588c0(param_4);
  if ((cVar2 != '\0') && (iVar3 = FUN_1401843d0(param_5), 0 < iVar3)) {
    uVar1 = (ulonglong)((uint)*(ushort *)(param_4 + 0xc) ^ *(uint *)(param_4 + 8)) %
            (ulonglong)*(uint *)(param_1 + 0x48);
    if (*(longlong *)(param_1 + 0x28) != 0) {
      for (lVar5 = *(longlong *)(*(longlong *)(param_1 + 0x28) + uVar1 * 8);
          (lVar5 != 0 && ((uint)uVar1 == *(uint *)(lVar5 + 0x28) % *(uint *)(param_1 + 0x48)));
          lVar5 = *(longlong *)(lVar5 + 0x18)) {
        if ((*(uint *)(lVar5 + 8) == *(uint *)(param_4 + 8)) &&
           (*(ushort *)(lVar5 + 0xc) == *(ushort *)(param_4 + 0xc))) {
          lVar5 = *(longlong *)(lVar5 + 0x10);
          goto LAB_1401a16d8;
        }
      }
    }
    lVar5 = FUN_1401a1190(*(undefined8 *)(param_1 + 0x78));
    *(undefined8 *)(lVar5 + 0x188) = *(undefined8 *)(param_1 + 0x78);
    *(undefined4 *)(lVar5 + 0x1bc) = 1;
    *(longlong *)(lVar5 + 400) = param_1;
    *(undefined4 *)(lVar5 + 0x178) = *(undefined4 *)(param_4 + 8);
    *(undefined2 *)(lVar5 + 0x17c) = *(undefined2 *)(param_4 + 0xc);
    *(undefined2 *)(lVar5 + 0x180) = param_3;
    *(undefined8 *)(lVar5 + 0x168) = param_6;
    local_78 = lVar5;
    FUN_1401a10e0(param_1 + 0x20,param_4,&local_78);
LAB_1401a16d8:
    if ((*(int *)(lVar5 + 0x178) != *(int *)(param_4 + 8)) ||
       (*(short *)(lVar5 + 0x17c) != *(short *)(param_4 + 0xc))) {
      FUN_140156300(local_70,L"PacketQueue consistency failed!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_70,(ThrowInfo *)&DAT_14031d928);
    }
    uVar4 = *param_7;
    if (((int)uVar4 < 0) || (5 < (int)uVar4)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (DAT_140320d74 == '\0') {
      uVar4 = 0;
    }
    *param_7 = uVar4;
    if (5 < uVar4) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    plVar7 = (longlong *)((longlong)(int)uVar4 * 0x38 + 0x18 + lVar5);
    if ((*(longlong *)(param_7 + 2) != 0) && (param_2 != 0)) {
      if (*(char *)((longlong)param_7 + 0x19) == '\0') {
        lVar6 = plVar7[3];
      }
      else {
        lVar6 = *plVar7;
      }
      for (; lVar6 != 0; lVar6 = *(longlong *)(lVar6 + 8)) {
        if (((*(longlong *)(lVar6 + 0x40) != 0) &&
            (*(longlong *)(param_7 + 2) == *(longlong *)(lVar6 + 0x40))) &&
           (param_2 == *(int *)(lVar6 + 0x4c))) goto LAB_1401a17bb;
      }
    }
    lVar6 = FUN_14019f3a0(param_1 + 0x80);
    if (*(char *)((longlong)param_7 + 0x19) == '\0') {
      plVar7 = plVar7 + 3;
    }
    FUN_14019e7b0(plVar7,lVar6);
    *(undefined8 *)(lVar6 + 0x40) = *(undefined8 *)(param_7 + 2);
    uVar4 = param_7[5];
    *(int *)(lVar6 + 0x4c) = param_2;
    *(uint *)(lVar6 + 0x48) = uVar4;
LAB_1401a17bb:
    thunk_FUN_140184540(param_5,lVar6 + 0x18);
    if (*(int *)(lVar5 + 0x158) + *(int *)(lVar5 + 0x140) + *(int *)(lVar5 + 0x120) +
        *(int *)(lVar5 + 0x108) + *(int *)(lVar5 + 0xe8) + *(int *)(lVar5 + 0xd0) +
        *(int *)(lVar5 + 0xb0) + *(int *)(lVar5 + 0x98) + *(int *)(lVar5 + 0x78) +
        *(int *)(lVar5 + 0x60) + *(int *)(lVar5 + 0x40) + *(int *)(lVar5 + 0x28) +
        *(int *)(lVar5 + 0x1b0) < 1) {
      FUN_140156300(local_70,L"PacketQueue consistency 2 failed!");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_70,(ThrowInfo *)&DAT_14031d928);
    }
    *(undefined8 *)(lVar5 + 0x168) = param_6;
    FUN_14019ee30(param_1,lVar5,param_6);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8
FUN_1401a18b0(undefined8 *param_1,undefined8 param_2,int param_3,longlong param_4,char param_5,
             longlong param_6,longlong *param_7,undefined8 param_8)

{
  ulonglong uVar1;
  int iVar2;
  char cVar3;
  int iVar4;
  undefined4 uVar5;
  longlong lVar6;
  undefined8 uVar7;
  longlong *plVar8;
  uint *puVar9;
  longlong lVar10;
  char cVar11;
  uint *puVar12;
  uint *puVar13;
  int iVar14;
  undefined1 auStack_108 [32];
  int local_e8;
  longlong *local_d8;
  int local_d0 [2];
  longlong local_c8;
  uint *local_c0;
  int local_b8;
  int local_b4;
  int local_a8;
  longlong local_a0;
  int local_98;
  longlong *local_90;
  longlong local_88 [2];
  short local_78 [2];
  int local_74;
  uint local_70;
  int local_6c;
  ulonglong local_68;
  
  local_88[1] = 0xfffffffffffffffe;
  local_68 = DAT_1403223c0 ^ (ulonglong)auStack_108;
  local_90 = param_7;
  local_a8 = param_3;
  local_a0 = param_4;
  FUN_1401544a0(local_d0);
  FUN_140154120(local_d0,param_2,param_3);
  FUN_140154600(local_d0,param_3);
  FUN_1401540a0(local_d0,0);
  cVar3 = FUN_1401543d0(local_d0,local_78,0x10);
  if (cVar3 == '\0') {
    FUN_14004ce80(param_8,L"UDP frag header missing!");
    local_d8 = &local_c8;
    FUN_1401560e0(&local_c8);
    if (local_c0 == (uint *)0x0) {
      return 2;
    }
    if (-1 < local_b4) {
      return 2;
    }
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (local_78[0] == -0x5433) {
    if ((((local_74 < 1) || (iVar4 = (**(code **)(*(longlong *)*param_1 + 8))(), iVar4 < local_74))
        || (local_6c < 0)) || (local_74 / DAT_140320d48 < local_6c)) {
      uVar5 = (**(code **)(*(longlong *)*param_1 + 8))();
      local_e8 = local_6c;
      FUN_14004ce50(param_8,L"UDP frag length is wrong #1! packetlength=%d, maxlength=%d, fragID=%d"
                    ,local_74,uVar5);
      local_d8 = &local_c8;
      FUN_1401560e0(&local_c8);
      if (local_c0 == (uint *)0x0) {
        return 2;
      }
      if (-1 < local_b4) {
        return 2;
      }
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (local_78[0] != -0x5432) goto LAB_1401a1a8f;
  }
  else if (local_78[0] != -0x5432) {
    FUN_14004ce50(param_8,L"Cannot identify UDP fragment nor full packet! fragheaderSplitter=%u",
                  local_78[0]);
    local_d8 = &local_c8;
    FUN_1401560e0(&local_c8);
    if (local_c0 == (uint *)0x0) {
      return 2;
    }
    if (-1 < local_b4) {
      return 2;
    }
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if ((local_74 < 1) || (iVar4 = (**(code **)(*(longlong *)*param_1 + 8))(), iVar4 < local_74)) {
    FUN_14004ce80(param_8,L"UDP full packet length is wrong!");
    local_d8 = &local_c8;
    FUN_1401560e0(&local_c8);
    if (local_c0 == (uint *)0x0) {
      return 2;
    }
    if (-1 < local_b4) {
      return 2;
    }
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
LAB_1401a1a8f:
  cVar3 = (**(code **)(*(longlong *)*param_1 + 0x20))();
  iVar4 = local_6c;
  puVar13 = local_c0;
  lVar10 = local_c8;
  cVar11 = (char)((ushort)local_78[1] >> 8);
  if ((((cVar11 == '\0') || (param_5 == '\0')) || (cVar11 == param_5)) &&
     ((((char)local_78[1] == '\0' || (cVar3 == '\0')) || ((char)local_78[1] == cVar3)))) {
    local_98 = DAT_140320d48 * local_6c;
    iVar2 = local_74 - local_98;
    if (DAT_140320d48 < local_74 - local_98) {
      iVar2 = DAT_140320d48;
    }
    if (local_c8 == 0) {
      if (local_c0 == (uint *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
    }
    else {
      local_b8 = *(int *)(local_c8 + 0x18);
    }
    iVar14 = local_b8 - ((int)(local_d0[0] + (local_d0[0] >> 0x1f & 7U)) >> 3);
    if ((local_78[0] == -0x5433) && (iVar2 != iVar14)) {
      FUN_14004ce50(param_8,
                    L"UDP frag length is wrong #2! desiredFragLength=%d, fragPayloadLength=%d",iVar2
                    ,iVar14);
      local_d8 = &local_c8;
      FUN_1401560e0(&local_c8);
      if (local_c0 == (uint *)0x0) {
        return 2;
      }
      if (-1 < local_b4) {
        return 2;
      }
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_d8 = param_1 + 1;
    lVar6 = FUN_14019e8d0(local_d8);
    if (lVar6 == 0) {
      uVar7 = (**(code **)(*(longlong *)*param_1 + 0x18))();
      lVar6 = FUN_1401a14a0(uVar7);
      *(longlong *)(lVar6 + 0x70) = param_6;
      local_88[0] = lVar6;
      FUN_1401a0ac0(local_d8,local_a0,local_88);
      lVar10 = local_c8;
      puVar13 = local_c0;
      iVar4 = local_6c;
    }
    else {
      lVar6 = *(longlong *)(lVar6 + 0x10);
    }
    plVar8 = local_90;
    if (local_78[0] == -0x5433) {
      uVar1 = (ulonglong)local_70 % (ulonglong)*(uint *)(lVar6 + 0x28);
      puVar13 = (uint *)0x0;
      puVar9 = puVar13;
      if ((*(longlong *)(lVar6 + 8) != 0) &&
         (puVar12 = *(uint **)(*(longlong *)(lVar6 + 8) + uVar1 * 8), puVar12 != (uint *)0x0)) {
        while (puVar9 = puVar13, (uint)uVar1 == puVar12[8] % *(uint *)(lVar6 + 0x28)) {
          puVar9 = puVar12;
          if ((*puVar12 == local_70) ||
             (puVar12 = *(uint **)(puVar12 + 4), puVar9 = puVar13, puVar12 == (uint *)0x0)) break;
        }
      }
      if (puVar9 == (uint *)0x0) {
        plVar8 = (longlong *)FUN_14019f7d0();
        local_d8 = plVar8;
        FUN_140050060(plVar8 + 5,local_74);
        FUN_14018cf80(plVar8);
        plVar8[0xb] = param_6;
        puVar9 = puVar13;
        if ((int)plVar8[3] != 0) {
          puVar9 = (uint *)plVar8[2];
        }
        memset(puVar9,0,(longlong)(int)plVar8[3]);
        puVar9 = (uint *)FUN_1401a0a20(lVar6,&local_70,&local_d8);
        iVar4 = local_6c;
      }
      else {
        plVar8 = *(longlong **)(puVar9 + 2);
        if ((int)plVar8[8] != local_74) {
          FUN_14004ce50(param_8,
                        L"UDP frag length is wrong #3! assembledDataCount=%d, packetLength=%d",
                        (int)plVar8[8],local_74);
          FUN_1401b0d90(lVar6,puVar9,0);
          FUN_14018d9e0(plVar8);
          local_d8 = &local_c8;
          FUN_1401560e0(&local_c8);
          if (local_c0 == (uint *)0x0) {
            return 2;
          }
          if (-1 < local_b4) {
            return 2;
          }
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
      }
      iVar2 = (int)plVar8[3];
      if (iVar2 <= iVar4) {
        FUN_14004ce80(param_8,L"UDP FragID is wrong!");
        local_d8 = &local_c8;
        FUN_1401560e0(&local_c8);
        if ((local_c0 != (uint *)0x0) && (local_b4 < 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        return 2;
      }
      if ((int)plVar8[8] < iVar14 + local_98) {
        FUN_14004ce80(param_8,L"UDP Frag Payload Length is wrong!");
        local_d8 = &local_c8;
        FUN_1401560e0(&local_c8);
        if (local_c0 == (uint *)0x0) {
          return 2;
        }
        if (-1 < local_b4) {
          return 2;
        }
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((iVar4 < 0) || (iVar2 <= iVar4)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      if (*(char *)(plVar8[2] + (longlong)iVar4) == '\0') {
        if (iVar2 <= iVar4) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        *(undefined1 *)(plVar8[2] + (longlong)iVar4) = 1;
        *(int *)(plVar8 + 10) = (int)plVar8[10] + 1;
        *(double *)(lVar6 + 0x60) = (double)local_a8 + *(double *)(lVar6 + 0x60);
        *(longlong *)(lVar6 + 0x70) = param_6;
        puVar12 = local_c0;
        if (local_c0 == (uint *)0x0) {
          if (local_c8 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0();
          }
          puVar12 = puVar13;
          if (*(int *)(local_c8 + 0x18) != 0) {
            puVar12 = *(uint **)(local_c8 + 0x10);
          }
        }
        if ((int)plVar8[8] != 0) {
          puVar13 = (uint *)plVar8[7];
        }
        FUN_140050120((longlong)puVar13 + (longlong)local_98,
                      (longlong)((int)(local_d0[0] + (local_d0[0] >> 0x1f & 7U)) >> 3) +
                      (longlong)puVar12,(longlong)iVar14);
      }
      if ((int)plVar8[3] == (int)plVar8[10]) {
        *(undefined4 *)(local_90 + 2) = *(undefined4 *)(local_a0 + 8);
        *(undefined2 *)((longlong)local_90 + 0x14) = *(undefined2 *)(local_a0 + 0xc);
        *local_90 = (longlong)plVar8;
        if (puVar9 == (uint *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_14004ea80(0x80004005);
        }
        FUN_1401b0d90(lVar6,puVar9,0);
        local_d8 = &local_c8;
        FUN_1401560e0(&local_c8);
        if (local_c0 == (uint *)0x0) {
          return 0;
        }
        if (-1 < local_b4) {
          return 0;
        }
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
    }
    else if ((local_78[0] == -0x5432) && (0 < iVar14)) {
      puVar9 = (uint *)0x0;
      if (puVar13 == (uint *)0x0) {
        if (lVar10 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        puVar13 = puVar9;
        if (*(int *)(lVar10 + 0x18) != 0) {
          puVar13 = *(uint **)(lVar10 + 0x10);
        }
      }
      *(double *)(lVar6 + 0x60) = (double)local_a8 + *(double *)(lVar6 + 0x60);
      *(longlong *)(lVar6 + 0x70) = param_6;
      *(undefined4 *)(local_90 + 2) = *(undefined4 *)(local_a0 + 8);
      *(undefined2 *)((longlong)local_90 + 0x14) = *(undefined2 *)(local_a0 + 0xc);
      lVar10 = FUN_14019f7d0();
      FUN_140050060(lVar10 + 0x28,iVar14);
      if (*(int *)(lVar10 + 0x40) != 0) {
        puVar9 = *(uint **)(lVar10 + 0x38);
      }
      FUN_140050120(puVar9,(longlong)((int)(local_d0[0] + (local_d0[0] >> 0x1f & 7U)) >> 3) +
                           (longlong)puVar13,(longlong)iVar14);
      *plVar8 = lVar10;
      local_d8 = &local_c8;
      FUN_1401560e0(&local_c8);
      if ((local_c0 != (uint *)0x0) && (local_b4 < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      return 0;
    }
    local_d8 = &local_c8;
    FUN_1401560e0(&local_c8);
    if ((local_c0 != (uint *)0x0) && (local_b4 < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  else {
    local_d8 = &local_c8;
    FUN_1401560e0(&local_c8);
    if ((local_c0 != (uint *)0x0) && (local_b4 < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  return 1;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401a2080(undefined8 *param_1)

{
  undefined8 *puVar1;
  int iVar2;
  int iVar3;
  undefined8 uVar4;
  longlong *plVar5;
  uint uVar6;
  undefined8 *puVar7;
  char cVar8;
  uint uVar9;
  uint uVar10;
  int iVar11;
  longlong lVar12;
  longlong *plVar13;
  longlong lVar14;
  int iVar15;
  ulonglong uVar16;
  longlong lVar17;
  bool bVar18;
  bool bVar19;
  double dVar20;
  ulonglong uVar21;
  ulonglong uVar22;
  undefined8 *puVar23;
  ulonglong uVar24;
  ulonglong uVar25;
  longlong lVar26;
  undefined *puVar27;
  undefined1 local_90 [88];
  
  dVar20 = (double)(**(code **)(*(longlong *)*param_1 + 0x10))();
  puVar1 = param_1 + 1;
  puVar23 = puVar1;
  if (param_1[5] == 0) {
    uVar16 = 0;
  }
  else {
    uVar16 = param_1[3];
  }
  do {
    uVar21 = uVar16;
    if ((uVar21 == 0) && (puVar23 == puVar1)) {
      return;
    }
    if (uVar21 == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    lVar17 = *(longlong *)(uVar21 + 0x10);
    uVar22 = uVar21;
    uVar16 = 0;
    lVar26 = lVar17;
    if (*(longlong *)(lVar17 + 0x20) != 0) {
      uVar16 = *(ulonglong *)(lVar17 + 0x10);
    }
    while ((uVar24 = uVar16, uVar16 = 0, uVar24 != 0 || (lVar17 != *(longlong *)(uVar21 + 0x10)))) {
      if (uVar24 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      lVar14 = *(longlong *)(uVar24 + 8);
      if (dVar20 - *(double *)(lVar14 + 0x58) <= _DAT_140320d58) {
        if (uVar24 != 0) {
          uVar16 = *(ulonglong *)(uVar24 + 0x10);
        }
      }
      else {
        puVar27 = &DAT_14032a038;
        uVar25 = uVar24;
        FUN_140156b50(&DAT_14032a038);
        *(undefined4 *)(lVar14 + 0x50) = 0;
        *(undefined8 *)(lVar14 + 0x58) = 0;
        iVar11 = *(int *)(lVar14 + 0x18);
        if (iVar11 != 0) {
          iVar2 = *(int *)(lVar14 + 0x1c);
          if (iVar2 < 0) {
            iVar3 = *(int *)(lVar14 + 0x24);
            if (iVar3 == 0) {
              uVar9 = (int)(iVar11 + (iVar11 >> 0x1f & 7U)) >> 3;
              uVar10 = 0x400;
              if ((int)uVar9 < 0x400) {
                uVar10 = uVar9;
              }
              uVar16 = 4;
              if (4 < (int)uVar10) {
                uVar16 = (ulonglong)uVar10;
              }
LAB_1401a21f3:
              iVar11 = *(int *)(lVar14 + 0x20);
              iVar15 = (int)uVar16;
              bVar19 = SBORROW4(iVar11,iVar15);
              iVar3 = iVar11 - iVar15;
              bVar18 = iVar11 == iVar15;
            }
            else {
              if (iVar3 == 1) {
                uVar9 = (int)(iVar11 + (iVar11 >> 0x1f & 7U)) >> 3;
                uVar10 = 0x10;
                if (0x10 < (int)uVar9) {
                  uVar10 = uVar9;
                }
                uVar16 = (ulonglong)uVar10;
                if (uVar10 < 0x41) {
                  uVar16 = 0x40;
                }
                goto LAB_1401a21f3;
              }
              if (iVar3 != 2) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              iVar11 = *(int *)(lVar14 + 0x20);
              bVar19 = false;
              bVar18 = iVar11 == 0;
              iVar3 = iVar11;
            }
            iVar15 = (int)uVar16;
            if (!bVar18 && bVar19 == iVar3 < 0) {
              iVar15 = iVar11;
            }
            plVar13 = *(longlong **)(lVar14 + 8);
            if (iVar2 == 0) {
              if (plVar13 == (longlong *)0x0) {
                lVar12 = FUN_140156940((longlong)iVar15);
              }
              else {
                lVar12 = (**(code **)(*plVar13 + 8))(plVar13,(longlong)iVar15);
              }
            }
            else {
              uVar4 = *(undefined8 *)(lVar14 + 0x10);
              if (plVar13 == (longlong *)0x0) {
                lVar12 = FUN_1401569a0(uVar4,(longlong)iVar15,iVar2,uVar4,uVar22,puVar23,uVar25,
                                       lVar26,puVar27,1);
              }
              else {
                lVar12 = (**(code **)(*plVar13 + 0x10))(plVar13,uVar4);
              }
              if (lVar12 == 0) {
                FUN_140156300(local_90,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
                _CxxThrowException(local_90,(ThrowInfo *)&DAT_14031d928);
              }
            }
            *(longlong *)(lVar14 + 0x10) = lVar12;
            *(int *)(lVar14 + 0x1c) = iVar15;
          }
          *(undefined4 *)(lVar14 + 0x18) = 0;
        }
        uVar10 = 0;
        iVar11 = *(int *)(lVar14 + 0x40);
        if (iVar11 != 0) {
          if (*(int *)(lVar14 + 0x44) < 0) {
            iVar2 = *(int *)(lVar14 + 0x4c);
            if (iVar2 == 0) {
              uVar10 = (int)(iVar11 + (iVar11 >> 0x1f & 7U)) >> 3;
              uVar9 = 0x400;
              if ((int)uVar10 < 0x400) {
                uVar9 = uVar10;
              }
              uVar10 = 4;
              if (4 < (int)uVar9) {
                uVar10 = uVar9;
              }
LAB_1401a22c7:
              uVar9 = *(uint *)(lVar14 + 0x48);
              bVar19 = SBORROW4(uVar9,uVar10);
              uVar6 = uVar9 - uVar10;
              bVar18 = uVar9 == uVar10;
            }
            else {
              if (iVar2 == 1) {
                uVar9 = (int)(iVar11 + (iVar11 >> 0x1f & 7U)) >> 3;
                uVar10 = 0x10;
                if (0x10 < (int)uVar9) {
                  uVar10 = uVar9;
                }
                if (uVar10 < 0x41) {
                  uVar10 = 0x40;
                }
                goto LAB_1401a22c7;
              }
              if (iVar2 != 2) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              uVar9 = *(uint *)(lVar14 + 0x48);
              bVar19 = false;
              bVar18 = uVar9 == 0;
              uVar6 = uVar9;
            }
            if (!bVar18 && bVar19 == (int)uVar6 < 0) {
              uVar10 = uVar9;
            }
            plVar13 = *(longlong **)(lVar14 + 0x30);
            if (*(int *)(lVar14 + 0x44) == 0) {
              if (plVar13 == (longlong *)0x0) {
                lVar12 = FUN_140156940((longlong)(int)uVar10);
              }
              else {
                lVar12 = (**(code **)(*plVar13 + 8))(plVar13,(longlong)(int)uVar10);
              }
            }
            else {
              if (plVar13 == (longlong *)0x0) {
                lVar12 = FUN_1401569a0(*(undefined8 *)(lVar14 + 0x38),(longlong)(int)uVar10);
              }
              else {
                lVar12 = (**(code **)(*plVar13 + 0x10))(plVar13,*(undefined8 *)(lVar14 + 0x38));
              }
              if (lVar12 == 0) {
                FUN_140156300(local_90,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
                _CxxThrowException(local_90,(ThrowInfo *)&DAT_14031d928);
              }
            }
            *(longlong *)(lVar14 + 0x38) = lVar12;
            *(uint *)(lVar14 + 0x44) = uVar10;
          }
          *(undefined4 *)(lVar14 + 0x40) = 0;
        }
        puVar7 = DAT_14032a030;
        if ((*(short *)(lVar14 + -8) != 0x1de6) || (*(longlong *)(lVar14 + 0x60) != 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        *(undefined8 *)(lVar14 + 0x60) = *DAT_14032a030;
        *puVar7 = (short *)(lVar14 + -8);
        FUN_140156be0(&DAT_14032a038);
        if (lVar17 != *(longlong *)(uVar21 + 0x10)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        if (uVar24 == 0) {
                    // WARNING: Subroutine does not return
          FUN_14004ea80(0x80004005);
        }
        uVar16 = *(ulonglong *)(uVar24 + 0x10);
        FUN_1401b0d90();
        lVar17 = lVar26;
      }
    }
    if ((*(longlong *)(*(longlong *)(uVar21 + 0x10) + 0x20) == 0) &&
       (cVar8 = FUN_1401cb830(*(longlong *)(uVar21 + 0x10) + 0x58,dVar20), cVar8 != '\0')) {
      lVar17 = *(longlong *)(uVar21 + 0x10);
      plVar13 = (longlong *)(**(code **)(*(longlong *)*param_1 + 0x18))();
      if (*(longlong *)(lVar17 + 0x20) != 0) {
        uVar16 = *(ulonglong *)(lVar17 + 0x10);
      }
      for (; uVar16 != 0; uVar16 = *(ulonglong *)(uVar16 + 0x10)) {
        lVar26 = *(longlong *)(uVar16 + 8);
        FUN_140156b50(&DAT_14032a038);
        *(undefined4 *)(lVar26 + 0x50) = 0;
        *(undefined8 *)(lVar26 + 0x58) = 0;
        if (*(int *)(lVar26 + 0x18) != 0) {
          if (*(int *)(lVar26 + 0x1c) < 0) {
            iVar11 = FUN_1401dcff0(lVar26,0);
            plVar5 = *(longlong **)(lVar26 + 8);
            if (*(int *)(lVar26 + 0x1c) == 0) {
              if (plVar5 == (longlong *)0x0) {
                lVar14 = FUN_140156940((longlong)iVar11);
              }
              else {
                lVar14 = (**(code **)(*plVar5 + 8))();
              }
            }
            else {
              if (plVar5 == (longlong *)0x0) {
                lVar14 = FUN_1401569a0(*(undefined8 *)(lVar26 + 0x10));
              }
              else {
                lVar14 = (**(code **)(*plVar5 + 0x10))();
              }
              if (lVar14 == 0) {
                FUN_140156300(local_90,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
                _CxxThrowException(local_90,(ThrowInfo *)&DAT_14031d928);
              }
            }
            *(longlong *)(lVar26 + 0x10) = lVar14;
            *(int *)(lVar26 + 0x1c) = iVar11;
          }
          *(undefined4 *)(lVar26 + 0x18) = 0;
        }
        if (*(int *)(lVar26 + 0x40) != 0) {
          if (*(int *)(lVar26 + 0x44) < 0) {
            iVar11 = FUN_14004ffc0(lVar26 + 0x28);
            plVar5 = *(longlong **)(lVar26 + 0x30);
            if (*(int *)(lVar26 + 0x44) == 0) {
              if (plVar5 == (longlong *)0x0) {
                lVar14 = FUN_140156940((longlong)iVar11);
              }
              else {
                lVar14 = (**(code **)(*plVar5 + 8))();
              }
            }
            else {
              if (plVar5 == (longlong *)0x0) {
                lVar14 = FUN_1401569a0(*(undefined8 *)(lVar26 + 0x38));
              }
              else {
                lVar14 = (**(code **)(*plVar5 + 0x10))();
              }
              if (lVar14 == 0) {
                FUN_140156300(local_90,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
                _CxxThrowException(local_90,(ThrowInfo *)&DAT_14031d928);
              }
            }
            *(longlong *)(lVar26 + 0x38) = lVar14;
            *(int *)(lVar26 + 0x44) = iVar11;
          }
          *(undefined4 *)(lVar26 + 0x40) = 0;
        }
        puVar7 = DAT_14032a030;
        if ((*(short *)(lVar26 + -8) != 0x1de6) || (*(longlong *)(lVar26 + 0x60) != 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        *(undefined8 *)(lVar26 + 0x60) = *DAT_14032a030;
        *puVar7 = (short *)(lVar26 + -8);
        FUN_140156be0(&DAT_14032a038);
      }
      FUN_1401a0390(lVar17);
      (**(code **)(*plVar13 + 0x18))(plVar13,lVar17);
      if (puVar23 != puVar1) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (uVar21 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      uVar16 = *(ulonglong *)(uVar21 + 0x18);
      FUN_14015eab0(puVar1,uVar21,0);
    }
    else if (uVar21 != 0) {
      uVar16 = *(ulonglong *)(uVar21 + 0x18);
    }
  } while( true );
}



void FUN_1401a2710(longlong param_1,undefined8 param_2)

{
  longlong lVar1;
  
  if (*(longlong *)(param_1 + 0x28) == 0) {
    lVar1 = 0;
  }
  else {
    lVar1 = *(longlong *)(param_1 + 0x18);
  }
  for (; lVar1 != 0; lVar1 = *(longlong *)(lVar1 + 0x18)) {
    FUN_1401cb950(*(longlong *)(lVar1 + 0x10) + 0x58,param_2);
  }
  FUN_1401a2080(param_1);
  return;
}



ulonglong FUN_1401a2770(undefined8 *param_1,longlong param_2)

{
  uint uVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  longlong lVar5;
  
  uVar1 = *(uint *)(param_1 + 6);
  uVar3 = (ulonglong)((uint)*(ushort *)(param_2 + 0xc) ^ *(uint *)(param_2 + 8));
  uVar4 = uVar3 / uVar1;
  uVar3 = uVar3 % (ulonglong)uVar1;
  if ((param_1[2] != 0) && (lVar5 = *(longlong *)(param_1[2] + uVar3 * 8), lVar5 != 0)) {
    while( true ) {
      uVar4 = (ulonglong)*(uint *)(lVar5 + 0x28) / (ulonglong)uVar1;
      if ((uint)uVar3 != *(uint *)(lVar5 + 0x28) % uVar1) break;
      if ((*(uint *)(lVar5 + 8) == *(uint *)(param_2 + 8)) &&
         (*(ushort *)(lVar5 + 0xc) == *(ushort *)(param_2 + 0xc))) {
        if (lVar5 == 0) {
          return uVar4;
        }
        uVar2 = (**(code **)(*(longlong *)*param_1 + 0x18))();
        FUN_1401a11d0(uVar2,*(undefined8 *)(lVar5 + 0x10));
        uVar3 = FUN_14015eab0(param_1 + 1,lVar5,0);
        return uVar3;
      }
      lVar5 = *(longlong *)(lVar5 + 0x18);
      if (lVar5 == 0) {
        return uVar4;
      }
    }
  }
  return uVar4;
}



void FUN_1401a2820(undefined8 *param_1)

{
  undefined8 *puVar1;
  int iVar2;
  int iVar3;
  longlong lVar4;
  longlong lVar5;
  undefined8 uVar6;
  longlong *plVar7;
  uint uVar8;
  undefined8 *puVar9;
  int iVar10;
  uint uVar11;
  uint uVar12;
  longlong lVar13;
  longlong lVar14;
  longlong *plVar15;
  longlong lVar16;
  int iVar17;
  longlong lVar18;
  longlong lVar19;
  ulonglong uVar20;
  bool bVar21;
  bool bVar22;
  undefined8 *puVar23;
  longlong lVar24;
  undefined *puVar25;
  undefined1 uVar26;
  undefined1 local_a0 [104];
  
  puVar1 = param_1 + 1;
  lVar18 = 0;
  if (param_1[5] != 0) {
    lVar18 = param_1[3];
  }
  do {
    lVar19 = 0;
    if (lVar18 == 0) {
      return;
    }
    if (lVar18 == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    lVar4 = *(longlong *)(lVar18 + 0x10);
    lVar16 = lVar18;
    puVar23 = puVar1;
    if (*(longlong *)(lVar4 + 0x20) != 0) {
      lVar19 = *(longlong *)(lVar4 + 0x10);
    }
    while ((uVar20 = 0, lVar19 != 0 || (lVar4 != *(longlong *)(lVar18 + 0x10)))) {
      if (lVar19 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      lVar5 = *(longlong *)(lVar19 + 8);
      puVar25 = &DAT_14032a038;
      lVar14 = lVar19;
      lVar24 = lVar4;
      FUN_140156b50(&DAT_14032a038);
      uVar26 = 1;
      *(undefined4 *)(lVar5 + 0x50) = 0;
      *(undefined8 *)(lVar5 + 0x58) = 0;
      iVar10 = *(int *)(lVar5 + 0x18);
      if (iVar10 != 0) {
        iVar2 = *(int *)(lVar5 + 0x1c);
        if (iVar2 < 0) {
          iVar3 = *(int *)(lVar5 + 0x24);
          if (iVar3 == 0) {
            uVar11 = (int)(iVar10 + (iVar10 >> 0x1f & 7U)) >> 3;
            uVar12 = 0x400;
            if ((int)uVar11 < 0x400) {
              uVar12 = uVar11;
            }
            uVar20 = 4;
            if (4 < (int)uVar12) {
              uVar20 = (ulonglong)uVar12;
            }
LAB_1401a296e:
            iVar10 = *(int *)(lVar5 + 0x20);
            iVar17 = (int)uVar20;
            bVar22 = SBORROW4(iVar10,iVar17);
            iVar3 = iVar10 - iVar17;
            bVar21 = iVar10 == iVar17;
          }
          else {
            if (iVar3 == 1) {
              uVar11 = (int)(iVar10 + (iVar10 >> 0x1f & 7U)) >> 3;
              uVar12 = 0x10;
              if (0x10 < (int)uVar11) {
                uVar12 = uVar11;
              }
              uVar20 = (ulonglong)uVar12;
              if (uVar12 < 0x41) {
                uVar20 = 0x40;
              }
              goto LAB_1401a296e;
            }
            if (iVar3 != 2) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            iVar10 = *(int *)(lVar5 + 0x20);
            bVar22 = false;
            bVar21 = iVar10 == 0;
            iVar3 = iVar10;
          }
          iVar17 = (int)uVar20;
          if (!bVar21 && bVar22 == iVar3 < 0) {
            iVar17 = iVar10;
          }
          plVar15 = *(longlong **)(lVar5 + 8);
          if (iVar2 == 0) {
            if (plVar15 == (longlong *)0x0) {
              lVar13 = FUN_140156940((longlong)iVar17);
            }
            else {
              lVar13 = (**(code **)(*plVar15 + 8))(plVar15,(longlong)iVar17);
            }
          }
          else {
            uVar6 = *(undefined8 *)(lVar5 + 0x10);
            if (plVar15 == (longlong *)0x0) {
              lVar13 = FUN_1401569a0(uVar6,(longlong)iVar17,iVar2,uVar6,lVar16,puVar23,lVar14,lVar24
                                     ,puVar25,1);
            }
            else {
              lVar13 = (**(code **)(*plVar15 + 0x10))(plVar15,uVar6);
            }
            if (lVar13 == 0) {
              FUN_140156300(local_a0,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
              _CxxThrowException(local_a0,(ThrowInfo *)&DAT_14031d928);
            }
          }
          *(longlong *)(lVar5 + 0x10) = lVar13;
          *(int *)(lVar5 + 0x1c) = iVar17;
        }
        *(undefined4 *)(lVar5 + 0x18) = 0;
      }
      uVar12 = 0;
      iVar10 = *(int *)(lVar5 + 0x40);
      if (iVar10 != 0) {
        iVar2 = *(int *)(lVar5 + 0x44);
        if (iVar2 < 0) {
          iVar3 = *(int *)(lVar5 + 0x4c);
          if (iVar3 == 0) {
            uVar12 = (int)(iVar10 + (iVar10 >> 0x1f & 7U)) >> 3;
            uVar11 = 0x400;
            if ((int)uVar12 < 0x400) {
              uVar11 = uVar12;
            }
            uVar12 = 4;
            if (4 < (int)uVar11) {
              uVar12 = uVar11;
            }
LAB_1401a2a42:
            uVar11 = *(uint *)(lVar5 + 0x48);
            bVar22 = SBORROW4(uVar11,uVar12);
            uVar8 = uVar11 - uVar12;
            bVar21 = uVar11 == uVar12;
          }
          else {
            if (iVar3 == 1) {
              uVar11 = (int)(iVar10 + (iVar10 >> 0x1f & 7U)) >> 3;
              uVar12 = 0x10;
              if (0x10 < (int)uVar11) {
                uVar12 = uVar11;
              }
              if (uVar12 < 0x41) {
                uVar12 = 0x40;
              }
              goto LAB_1401a2a42;
            }
            if (iVar3 != 2) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            uVar11 = *(uint *)(lVar5 + 0x48);
            bVar22 = false;
            bVar21 = uVar11 == 0;
            uVar8 = uVar11;
          }
          if (!bVar21 && bVar22 == (int)uVar8 < 0) {
            uVar12 = uVar11;
          }
          plVar15 = *(longlong **)(lVar5 + 0x30);
          if (iVar2 == 0) {
            if (plVar15 == (longlong *)0x0) {
              lVar14 = FUN_140156940((longlong)(int)uVar12);
            }
            else {
              lVar14 = (**(code **)(*plVar15 + 8))(plVar15,(longlong)(int)uVar12);
            }
          }
          else {
            uVar6 = *(undefined8 *)(lVar5 + 0x38);
            if (plVar15 == (longlong *)0x0) {
              lVar14 = FUN_1401569a0(uVar6,(longlong)(int)uVar12,iVar2,uVar6,lVar16,puVar23,lVar14,
                                     lVar24,puVar25,uVar26);
            }
            else {
              lVar14 = (**(code **)(*plVar15 + 0x10))(plVar15,uVar6);
            }
            if (lVar14 == 0) {
              FUN_140156300(local_a0,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
              _CxxThrowException(local_a0,(ThrowInfo *)&DAT_14031d928);
            }
          }
          *(longlong *)(lVar5 + 0x38) = lVar14;
          *(uint *)(lVar5 + 0x44) = uVar12;
        }
        *(undefined4 *)(lVar5 + 0x40) = 0;
      }
      puVar9 = DAT_14032a030;
      if ((*(short *)(lVar5 + -8) != 0x1de6) || (*(longlong *)(lVar5 + 0x60) != 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      *(undefined8 *)(lVar5 + 0x60) = *DAT_14032a030;
      *puVar9 = (short *)(lVar5 + -8);
      FUN_140156be0(&DAT_14032a038);
      if (lVar4 != *(longlong *)(lVar18 + 0x10)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (lVar19 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      lVar5 = *(longlong *)(lVar19 + 0x10);
      FUN_1401b0d90(*(longlong *)(lVar18 + 0x10),lVar19);
      lVar19 = lVar5;
    }
    lVar19 = *(longlong *)(lVar18 + 0x10);
    plVar15 = (longlong *)(**(code **)(*(longlong *)*param_1 + 0x18))();
    if (*(longlong *)(lVar19 + 0x20) != 0) {
      uVar20 = *(ulonglong *)(lVar19 + 0x10);
    }
    for (; uVar12 = 0, uVar20 != 0; uVar20 = *(ulonglong *)(uVar20 + 0x10)) {
      lVar4 = *(longlong *)(uVar20 + 8);
      FUN_140156b50(&DAT_14032a038);
      *(undefined4 *)(lVar4 + 0x50) = 0;
      *(undefined8 *)(lVar4 + 0x58) = 0;
      iVar10 = *(int *)(lVar4 + 0x18);
      if (iVar10 != 0) {
        if (*(int *)(lVar4 + 0x1c) < 0) {
          iVar2 = *(int *)(lVar4 + 0x24);
          if (iVar2 == 0) {
            uVar12 = (int)(iVar10 + (iVar10 >> 0x1f & 7U)) >> 3;
            uVar11 = 0x400;
            if ((int)uVar12 < 0x400) {
              uVar11 = uVar12;
            }
            uVar12 = 4;
            if (4 < (int)uVar11) {
              uVar12 = uVar11;
            }
LAB_1401a2bf2:
            uVar11 = *(uint *)(lVar4 + 0x20);
            bVar22 = SBORROW4(uVar11,uVar12);
            uVar8 = uVar11 - uVar12;
            bVar21 = uVar11 == uVar12;
          }
          else {
            if (iVar2 == 1) {
              uVar11 = (int)(iVar10 + (iVar10 >> 0x1f & 7U)) >> 3;
              uVar12 = 0x10;
              if (0x10 < (int)uVar11) {
                uVar12 = uVar11;
              }
              if (uVar12 < 0x41) {
                uVar12 = 0x40;
              }
              goto LAB_1401a2bf2;
            }
            if (iVar2 != 2) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            uVar11 = *(uint *)(lVar4 + 0x20);
            bVar22 = false;
            bVar21 = uVar11 == 0;
            uVar8 = uVar11;
          }
          if (!bVar21 && bVar22 == (int)uVar8 < 0) {
            uVar12 = uVar11;
          }
          plVar7 = *(longlong **)(lVar4 + 8);
          if (*(int *)(lVar4 + 0x1c) == 0) {
            if (plVar7 == (longlong *)0x0) {
              lVar16 = FUN_140156940((longlong)(int)uVar12);
            }
            else {
              lVar16 = (**(code **)(*plVar7 + 8))(plVar7,(longlong)(int)uVar12);
            }
          }
          else {
            if (plVar7 == (longlong *)0x0) {
              lVar16 = FUN_1401569a0(*(undefined8 *)(lVar4 + 0x10),(longlong)(int)uVar12);
            }
            else {
              lVar16 = (**(code **)(*plVar7 + 0x10))(plVar7,*(undefined8 *)(lVar4 + 0x10));
            }
            if (lVar16 == 0) {
              FUN_140156300(local_a0,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
              _CxxThrowException(local_a0,(ThrowInfo *)&DAT_14031d928);
            }
          }
          *(longlong *)(lVar4 + 0x10) = lVar16;
          *(uint *)(lVar4 + 0x1c) = uVar12;
        }
        *(undefined4 *)(lVar4 + 0x18) = 0;
      }
      uVar12 = 0;
      iVar10 = *(int *)(lVar4 + 0x40);
      if (iVar10 != 0) {
        if (*(int *)(lVar4 + 0x44) < 0) {
          iVar2 = *(int *)(lVar4 + 0x4c);
          if (iVar2 == 0) {
            uVar12 = (int)(iVar10 + (iVar10 >> 0x1f & 7U)) >> 3;
            uVar11 = 0x400;
            if ((int)uVar12 < 0x400) {
              uVar11 = uVar12;
            }
            uVar12 = 4;
            if (4 < (int)uVar11) {
              uVar12 = uVar11;
            }
LAB_1401a2cc6:
            uVar11 = *(uint *)(lVar4 + 0x48);
            bVar22 = SBORROW4(uVar11,uVar12);
            uVar8 = uVar11 - uVar12;
            bVar21 = uVar11 == uVar12;
          }
          else {
            if (iVar2 == 1) {
              uVar11 = (int)(iVar10 + (iVar10 >> 0x1f & 7U)) >> 3;
              uVar12 = 0x10;
              if (0x10 < (int)uVar11) {
                uVar12 = uVar11;
              }
              if (uVar12 < 0x41) {
                uVar12 = 0x40;
              }
              goto LAB_1401a2cc6;
            }
            if (iVar2 != 2) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            uVar11 = *(uint *)(lVar4 + 0x48);
            bVar22 = false;
            bVar21 = uVar11 == 0;
            uVar8 = uVar11;
          }
          if (!bVar21 && bVar22 == (int)uVar8 < 0) {
            uVar12 = uVar11;
          }
          plVar7 = *(longlong **)(lVar4 + 0x30);
          if (*(int *)(lVar4 + 0x44) == 0) {
            if (plVar7 == (longlong *)0x0) {
              lVar16 = FUN_140156940((longlong)(int)uVar12);
            }
            else {
              lVar16 = (**(code **)(*plVar7 + 8))(plVar7,(longlong)(int)uVar12);
            }
          }
          else {
            if (plVar7 == (longlong *)0x0) {
              lVar16 = FUN_1401569a0(*(undefined8 *)(lVar4 + 0x38),(longlong)(int)uVar12);
            }
            else {
              lVar16 = (**(code **)(*plVar7 + 0x10))(plVar7,*(undefined8 *)(lVar4 + 0x38));
            }
            if (lVar16 == 0) {
              FUN_140156300(local_a0,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
              _CxxThrowException(local_a0,(ThrowInfo *)&DAT_14031d928);
            }
          }
          *(longlong *)(lVar4 + 0x38) = lVar16;
          *(uint *)(lVar4 + 0x44) = uVar12;
        }
        *(undefined4 *)(lVar4 + 0x40) = 0;
      }
      puVar9 = DAT_14032a030;
      if ((*(short *)(lVar4 + -8) != 0x1de6) || (*(longlong *)(lVar4 + 0x60) != 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      *(undefined8 *)(lVar4 + 0x60) = *DAT_14032a030;
      *puVar9 = (short *)(lVar4 + -8);
      FUN_140156be0(&DAT_14032a038);
    }
    FUN_1401a0390(lVar19);
    (**(code **)(*plVar15 + 0x18))(plVar15,lVar19);
    if (puVar23 != puVar1) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (lVar18 == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    lVar19 = *(longlong *)(lVar18 + 0x18);
    FUN_14015eab0(puVar1,lVar18,0);
    lVar18 = lVar19;
  } while( true );
}



void FUN_1401a2ee0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  FUN_1401a1240(param_1,*(undefined8 *)(param_1 + 0x50),param_3,param_4,0xfffffffffffffffe);
  FUN_1401a03b0(param_1);
  return;
}



void FUN_1401a2f10(undefined8 param_1)

{
  FUN_1401a1060();
  FUN_1401a03b0(param_1);
  return;
}



undefined8 *
FUN_1401a2f40(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  float fVar2;
  
  *param_1 = 0;
  param_1[1] = 0;
  *(undefined4 *)(param_1 + 2) = 0;
  param_1[3] = param_3;
  FUN_1401a0510(param_1 + 4,param_2,param_3,param_4,0xfffffffffffffffe);
  param_1[0x10] = 0;
  *(undefined1 *)(param_1 + 0x11) = 1;
  param_1[0xf] = param_2;
  *(undefined8 *)((longlong)param_1 + 0x4c) = 0x3dcccccd;
  *(undefined4 *)((longlong)param_1 + 0x54) = 0x40000000;
  fVar2 = (float)*(uint *)(param_1 + 9) * 2.0;
  lVar1 = 0;
  if ((9.223372e+18 < fVar2) && (fVar2 = fVar2 - 9.223372e+18, fVar2 < 9.223372e+18)) {
    lVar1 = -0x8000000000000000;
  }
  param_1[0xb] = (longlong)fVar2 + lVar1;
  fVar2 = (float)*(uint *)(param_1 + 9) * 0.0;
  lVar1 = 0;
  if ((9.223372e+18 < fVar2) && (fVar2 = fVar2 - 9.223372e+18, fVar2 < 9.223372e+18)) {
    lVar1 = -0x8000000000000000;
  }
  param_1[0xc] = (longlong)fVar2 + lVar1;
  if ((ulonglong)((longlong)fVar2 + lVar1) < 0x11) {
    param_1[0xc] = 0;
  }
  return param_1;
}



void FUN_1401a3040(longlong param_1)

{
  longlong lVar1;
  
  lVar1 = param_1 + 0x20;
  FUN_1401a1060(lVar1);
  FUN_1401a0230(param_1 + 0x80);
  FUN_1401a1060(lVar1);
  FUN_1401a03b0(lVar1);
  FUN_14019ed20(param_1);
  return;
}



undefined8 *
FUN_1401a30a0(undefined8 *param_1,longlong *param_2,undefined4 param_3,undefined8 param_4)

{
  longlong lVar1;
  float fVar2;
  undefined1 local_50 [72];
  
  FUN_1401a0650(param_1 + 1,param_2,param_3,param_4,0xfffffffffffffffe);
  *param_1 = param_2;
  *(undefined4 *)((longlong)param_1 + 0x34) = 0x3e99999a;
  *(undefined4 *)(param_1 + 7) = 0x3d4ccccd;
  *(undefined4 *)((longlong)param_1 + 0x3c) = 0x41000000;
  fVar2 = (float)*(uint *)(param_1 + 6) * 8.0;
  lVar1 = 0;
  if ((9.223372e+18 < fVar2) && (fVar2 = fVar2 - 9.223372e+18, fVar2 < 9.223372e+18)) {
    lVar1 = -0x8000000000000000;
  }
  param_1[8] = (longlong)fVar2 + lVar1;
  fVar2 = (float)*(uint *)(param_1 + 6) * 0.05;
  lVar1 = 0;
  if ((9.223372e+18 < fVar2) && (fVar2 = fVar2 - 9.223372e+18, fVar2 < 9.223372e+18)) {
    lVar1 = -0x8000000000000000;
  }
  param_1[9] = (longlong)fVar2 + lVar1;
  if ((ulonglong)((longlong)fVar2 + lVar1) < 0x11) {
    param_1[9] = 0;
  }
  lVar1 = (**(code **)(*param_2 + 0x18))(param_2);
  if (lVar1 == 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_1[5] != 0) {
    FUN_140156300(local_50,PTR_u_Collection_object_can_use_fast_h_140320e48);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
  }
  param_1[0xb] = lVar1;
  return param_1;
}



ulonglong FUN_1401a31c0(longlong param_1,undefined8 param_2)

{
  uint uVar1;
  int iVar2;
  ulonglong uVar3;
  
  (**(code **)(**(longlong **)(param_1 + 0x108) + 0x10))();
  uVar1 = *(uint *)(param_1 + 0x7c);
  iVar2 = FUN_1401cb810(param_1 + 0x90,param_2,*(undefined8 *)(param_1 + 0xa0));
  if (iVar2 < (int)uVar1) {
    uVar3 = FUN_1401cb810(param_1 + 0x90,param_2,*(undefined8 *)(param_1 + 0xa0));
  }
  else {
    uVar3 = (ulonglong)uVar1;
  }
  return uVar3;
}



void FUN_1401a3240(longlong param_1,undefined8 param_2)

{
  (**(code **)(**(longlong **)(param_1 + 0x108) + 0x10))();
  FUN_1401a7ae0(param_1 + 0x48,param_2);
  return;
}



int FUN_1401a3280(longlong param_1)

{
  char cVar1;
  int iVar2;
  
  (**(code **)(**(longlong **)(param_1 + 0x108) + 8))();
  (**(code **)(**(longlong **)(param_1 + 0x108) + 0x10))();
  if ((*(char *)(param_1 + 0x40) == '\0') &&
     (*(char *)(*(longlong *)(param_1 + 0x110) + 0x80) == '\0')) {
    cVar1 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x28))();
    if (cVar1 == '\0') {
      *(undefined1 *)(param_1 + 0x40) = 1;
      iVar2 = FUN_140186430(*(undefined8 *)(param_1 + 0x110),DAT_140320c78);
      if (iVar2 != 0) {
        *(undefined1 *)(param_1 + 0x40) = 0;
        FUN_1401855c0(*(undefined8 *)(param_1 + 0x110));
        return iVar2;
      }
      *(undefined8 *)(param_1 + 0x118) = 0;
    }
  }
  return 0;
}



void FUN_1401a3330(longlong param_1)

{
  FUN_140184dd0(*(undefined8 *)(param_1 + 0x110));
  return;
}



undefined1 * FUN_1401a3340(undefined1 *param_1,undefined8 param_2,longlong param_3,longlong param_4)

{
  FUN_1401a81d0(param_1 + 0x48);
  FUN_1401ae900(param_1 + 200,(longlong)DAT_140320d1c);
  *(undefined8 *)(param_1 + 0x110) = 0;
  *(undefined ***)(param_1 + 0x128) = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0x130) = 0;
  *(undefined2 *)(param_1 + 0x134) = 0;
  *(undefined4 *)(param_1 + 0x130) = *(undefined4 *)(param_4 + 8);
  *(undefined2 *)(param_1 + 0x134) = *(undefined2 *)(param_4 + 0xc);
  *param_1 = 0;
  param_1[0x40] = 0;
  *(undefined8 *)(param_1 + 0x108) = param_2;
  if (param_3 != 0) {
    *(longlong *)(param_1 + 0x110) = param_3;
    FUN_1401a7b50(param_3);
  }
  *(undefined8 *)(param_1 + 0x118) = 0;
  *(undefined8 *)(param_1 + 0x120) = 0;
  return param_1;
}



void FUN_1401a3410(longlong param_1)

{
  longlong lVar1;
  
  (**(code **)**(undefined8 **)(param_1 + 0x108))();
  (**(code **)(**(longlong **)(param_1 + 0x108) + 0x48))();
  lVar1 = *(longlong *)(param_1 + 0x110);
  if (lVar1 != 0) {
    FUN_1401859b0(lVar1);
    FUN_140156970(lVar1);
  }
  FUN_1401ae940(param_1 + 200);
  FUN_1401a8260(param_1 + 0x48);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401a3490(char *param_1)

{
  char cVar1;
  int iVar2;
  int iVar3;
  undefined8 uVar4;
  undefined1 auStack_6a8 [32];
  undefined8 local_688;
  void *local_678;
  undefined8 local_670;
  ulonglong local_668;
  undefined8 local_660;
  ulonglong local_18;
  
  local_688 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_6a8;
  (**(code **)(**(longlong **)(param_1 + 0x108) + 8))();
  (**(code **)(**(longlong **)(param_1 + 0x108) + 0x10))();
  if (((*(char *)(*(longlong *)(param_1 + 0x110) + 0x80) == '\0') && (*param_1 == '\0')) &&
     (cVar1 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x28))(), cVar1 == '\0')) {
    uVar4 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x30))();
    iVar2 = FUN_1401a31c0(param_1,uVar4);
    if (0 < iVar2) {
      *param_1 = '\x01';
      local_678 = (void *)0x0;
      local_660 = 0;
      local_670 = 0;
      local_668 = 100;
      FUN_1401a7e60(param_1 + 0x48,&local_678,iVar2);
      iVar3 = FUN_140186940(*(undefined8 *)(param_1 + 0x110),&local_678);
      FUN_1401cb7d0(param_1 + 0x90,iVar2);
      uVar4 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x30))();
      *(double *)(param_1 + 0xb0) = (double)iVar2 + *(double *)(param_1 + 0xb0);
      *(undefined8 *)(param_1 + 0xc0) = uVar4;
      if (iVar3 == 0) {
        param_1[0x120] = '\0';
        param_1[0x121] = '\0';
        param_1[0x122] = '\0';
        param_1[0x123] = '\0';
        param_1[0x124] = '\0';
        param_1[0x125] = '\0';
        param_1[0x126] = '\0';
        param_1[0x127] = '\0';
      }
      else {
        *param_1 = '\0';
      }
      if (local_668 < 0x65) {
        return iVar3;
      }
      operator_delete__(local_678);
      return iVar3;
    }
  }
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401a3610(char *param_1,undefined8 param_2,undefined8 param_3)

{
  undefined1 auStack_de8 [32];
  undefined8 local_dc8;
  undefined1 *local_dc0;
  undefined1 local_db8 [80];
  undefined1 local_d68 [8];
  undefined1 local_d60 [8];
  longlong local_d58;
  undefined4 local_d50;
  int local_d4c;
  undefined1 local_d40 [136];
  undefined1 local_cb8 [3200];
  undefined1 *local_38;
  undefined4 local_30;
  int local_2c;
  ulonglong local_28;
  
  local_dc8 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_de8;
  (**(code **)(**(longlong **)(param_1 + 0x108) + 0x10))();
  local_2c = 200;
  local_30 = 0;
  local_38 = local_cb8;
  FUN_1401544a0(local_d68);
  FUN_140154120(local_d68,local_d40,0x80);
  FUN_1401a80b0(param_2,local_cb8,local_d68);
  FUN_1401a7db0(param_1 + 0x48,local_cb8,param_3);
  if (*param_1 == '\0') {
    (**(code **)(**(longlong **)(param_1 + 0x108) + 0x20))();
  }
  local_dc0 = local_d60;
  FUN_1401560e0(local_d60);
  if (local_d58 != 0) {
    if (local_d4c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_d50 = 0;
  }
  if (local_38 == (undefined1 *)0x0) {
    FUN_140156300(local_db8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_db8,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_2c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



undefined8 * FUN_1401a3780(undefined8 *param_1)

{
  *param_1 = Proud::CUseCount::vftable;
  *(undefined4 *)(param_1 + 8) = 0;
  return param_1;
}



void FUN_1401a37a0(undefined8 *param_1)

{
  *param_1 = Proud::CUseCount::vftable;
  return;
}



undefined4 FUN_1401a37b0(longlong param_1)

{
  return *(undefined4 *)(param_1 + 0x40);
}



void FUN_1401a37c0(longlong param_1)

{
  LOCK();
  *(int *)(param_1 + 0x40) = *(int *)(param_1 + 0x40) + 1;
  UNLOCK();
  return;
}



void FUN_1401a37d0(longlong param_1)

{
  LOCK();
  *(int *)(param_1 + 0x40) = *(int *)(param_1 + 0x40) + -1;
  UNLOCK();
  return;
}



longlong * FUN_1401a37e0(longlong *param_1,longlong param_2)

{
  *param_1 = param_2;
  LOCK();
  *(int *)(param_2 + 0x40) = *(int *)(param_2 + 0x40) + 1;
  UNLOCK();
  return param_1;
}



void FUN_1401a37f0(longlong *param_1)

{
  LOCK();
  *(int *)(*param_1 + 0x40) = *(int *)(*param_1 + 0x40) + -1;
  UNLOCK();
  return;
}



undefined8 * FUN_1401a3800(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::CUseCount::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401a3830(undefined8 *param_1)

{
  *param_1 = Proud::IUdpPacketFragBoardDg::vftable;
  return;
}



undefined8 * FUN_1401a3840(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::IUdpPacketFragBoardDg::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401a3870(undefined8 *param_1)

{
  *param_1 = Proud::IUdpPacketDefragBoardDg::vftable;
  return;
}



undefined8 * FUN_1401a3880(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::IUdpPacketDefragBoardDg::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401a38b0(longlong param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001401a38c1. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x140) + 0x118) + 8))();
  return;
}



undefined4 FUN_1401a38d0(longlong param_1)

{
  return *(undefined4 *)(*(longlong *)(param_1 + 0x140) + 0x23c);
}



void FUN_1401a38e0(longlong param_1,longlong param_2)

{
  undefined **local_18;
  undefined4 local_10;
  undefined2 local_c;
  
  local_18 = Proud::AddrPort::vftable;
  local_10 = *(undefined4 *)(param_2 + 8);
  local_c = *(undefined2 *)(param_2 + 0xc);
  FUN_14016fe70(*(undefined8 *)(param_1 + 0x138),&local_18);
  return;
}



void FUN_1401a3920(longlong param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001401a392a. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(**(longlong **)(param_1 + 0x138) + 0xd0))();
  return;
}



void FUN_1401a3940(longlong param_1,longlong param_2)

{
  undefined **local_18;
  undefined4 local_10;
  undefined2 local_c;
  
  local_18 = Proud::AddrPort::vftable;
  local_10 = *(undefined4 *)(param_2 + 8);
  local_c = *(undefined2 *)(param_2 + 0xc);
  FUN_14015e600(*(undefined8 *)(param_1 + 0x148),&local_18);
  return;
}



void FUN_1401a3980(longlong param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001401a398a. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(**(longlong **)(param_1 + 0x138) + 0x30))();
  return;
}



void FUN_1401a3990(longlong param_1)

{
  undefined8 uVar1;
  undefined8 uVar2;
  char cVar3;
  int iVar4;
  longlong lVar5;
  longlong lVar6;
  undefined8 uVar7;
  undefined **local_18;
  undefined4 local_10;
  undefined2 local_c;
  
  FUN_1401c5a30(param_1 + 0x40);
  if (*(char *)(param_1 + 0x100) == '\0') {
    lVar6 = 0;
    lVar5 = lVar6;
    if (*(longlong **)(param_1 + 0x150) != (longlong *)0x0) {
      lVar5 = **(longlong **)(param_1 + 0x150);
    }
    if (*(char *)(lVar5 + 0x80) == '\0') {
      uVar1 = *(undefined8 *)(param_1 + 0x170);
      uVar2 = *(undefined8 *)(param_1 + 0x168);
      uVar7 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
      cVar3 = FUN_1401a0780(uVar2,uVar1,uVar7);
      if ((cVar3 != '\0') && (0 < *(longlong *)(*(longlong *)(param_1 + 0x170) + 8))) {
        lVar5 = *(longlong *)(param_1 + 0x170);
        *(undefined1 *)(param_1 + 0x100) = 1;
        local_18 = Proud::AddrPort::vftable;
        local_10 = *(undefined4 *)(lVar5 + 0x6a8);
        local_c = *(undefined2 *)(lVar5 + 0x6ac);
        if (*(longlong **)(param_1 + 0x150) != (longlong *)0x0) {
          lVar6 = **(longlong **)(param_1 + 0x150);
        }
        iVar4 = FUN_140187200(lVar6,lVar5,&local_18,*(undefined4 *)(lVar5 + 0x6b0));
        if (iVar4 != 0) {
          *(undefined1 *)(param_1 + 0x100) = 0;
        }
      }
    }
  }
  return;
}



undefined8 FUN_1401a3aa0(longlong param_1)

{
  FUN_1401a3990(param_1 + -0x88);
  return 0;
}



void FUN_1401a3ac0(longlong param_1)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  
  FUN_1401c5a30();
  if (*(char *)(param_1 + 0x140) == '\0') {
    lVar3 = 0;
    lVar2 = lVar3;
    if (*(longlong **)(param_1 + 0x150) != (longlong *)0x0) {
      lVar2 = **(longlong **)(param_1 + 0x150);
    }
    if (*(char *)(lVar2 + 0x80) == '\0') {
      *(undefined1 *)(param_1 + 0x140) = 1;
      if (*(longlong **)(param_1 + 0x150) != (longlong *)0x0) {
        lVar3 = **(longlong **)(param_1 + 0x150);
      }
      iVar1 = FUN_1401865a0(lVar3,DAT_140320c7c);
      if (iVar1 != 0) {
        *(undefined1 *)(param_1 + 0x140) = 0;
      }
    }
  }
  return;
}



void FUN_1401a3b30(longlong param_1)

{
  longlong lVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  uVar3 = *(undefined8 *)(param_1 + 0x168);
  uVar2 = (**(code **)(*(longlong *)(param_1 + 8) + 8))(param_1 + 8);
  FUN_1401a0b70(uVar3,uVar2);
  lVar1 = *(longlong *)(param_1 + 0x178);
  if (lVar1 != 0) {
    uVar3 = (**(code **)(*(longlong *)(param_1 + 8) + 8))(param_1 + 8);
    FUN_1401a2710(lVar1,uVar3);
  }
  return;
}



void FUN_1401a3ba0(longlong param_1)

{
  if (*(longlong *)(param_1 + 0x10) != 0) {
    FUN_14015b180(*(longlong *)(param_1 + 0x10),param_1 + -0x90);
  }
  return;
}



void FUN_1401a3bd0(undefined8 *param_1)

{
  void *pvVar1;
  
  pvVar1 = (void *)*param_1;
  if (pvVar1 != (void *)0x0) {
    FUN_1401a3040(pvVar1);
    operator_delete(pvVar1);
  }
  return;
}



void FUN_1401a3c00(undefined8 *param_1)

{
  void *pvVar1;
  
  pvVar1 = (void *)*param_1;
  if (pvVar1 != (void *)0x0) {
    FUN_1401a01c0(pvVar1);
    operator_delete(pvVar1);
  }
  return;
}



void FUN_1401a3c30(longlong *param_1,longlong param_2)

{
  if (*(longlong *)(param_2 + 0xa0) != 0) {
    FUN_14015b180();
  }
  if (param_1[1] == 0) {
    *param_1 = param_2;
  }
  else {
    *(longlong *)(param_1[1] + 0x98) = param_2;
    *(longlong *)(param_2 + 0x90) = param_1[1];
  }
  param_1[1] = param_2;
  *(longlong **)(param_2 + 0xa0) = param_1;
  *(int *)(param_1 + 2) = (int)param_1[2] + 1;
  return;
}



void FUN_1401a3c90(undefined8 *param_1)

{
  void *pvVar1;
  
  pvVar1 = (void *)*param_1;
  if (pvVar1 != (void *)0x0) {
    FUN_1401a2ee0((longlong)pvVar1 + 8);
    operator_delete(pvVar1);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401a3cc0(longlong param_1,undefined4 param_2,undefined2 param_3,longlong param_4,
                  undefined8 param_5,undefined4 *param_6)

{
  undefined8 uVar1;
  longlong lVar2;
  undefined1 auStack_e78 [32];
  undefined1 *local_e58;
  undefined8 local_e50;
  undefined4 *local_e48;
  undefined **local_e38;
  undefined4 local_e30;
  undefined2 local_e2c;
  longlong local_e28;
  undefined1 local_e20;
  longlong local_e18;
  undefined1 local_e10;
  undefined8 local_e08;
  undefined4 local_df8;
  undefined4 uStack_df4;
  undefined4 uStack_df0;
  undefined4 uStack_dec;
  undefined4 local_de8;
  undefined4 uStack_de4;
  undefined4 uStack_de0;
  undefined4 uStack_ddc;
  undefined1 local_dd8 [80];
  undefined1 local_d88 [8];
  undefined *local_d80;
  longlong local_d78;
  undefined4 local_d70;
  int local_d6c;
  undefined1 local_d60 [136];
  undefined1 local_cd8 [3200];
  undefined1 *local_58;
  undefined4 local_50;
  int local_4c;
  ulonglong local_48;
  
  local_e08 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_e78;
  FUN_1401c5a30(param_1 + 0x40);
  local_4c = 200;
  local_50 = 0;
  local_58 = local_cd8;
  FUN_1401544a0(local_d88);
  FUN_140154120(local_d88,local_d60,0x80);
  FUN_1401a80b0(param_5,local_cd8,local_d88);
  local_e28 = param_1 + 0xa8;
  FUN_140156b50();
  local_e20 = 1;
  local_df8 = *param_6;
  uStack_df4 = param_6[1];
  uStack_df0 = param_6[2];
  uStack_dec = param_6[3];
  local_de8 = param_6[4];
  uStack_de4 = param_6[5];
  uStack_de0 = param_6[6];
  uStack_ddc = param_6[7];
  local_e38 = Proud::AddrPort::vftable;
  local_e30 = *(undefined4 *)(param_4 + 8);
  local_e2c = *(undefined2 *)(param_4 + 0xc);
  uVar1 = *(undefined8 *)(param_1 + 0x168);
  local_e50 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x148) + 0x118) + 8))();
  local_e48 = &local_df8;
  local_e58 = local_cd8;
  FUN_1401a15c0(uVar1,param_2,param_3,&local_e38);
  if (*(char *)(param_1 + 0x100) == '\0') {
    lVar2 = *(longlong *)(param_1 + 0x148) + 2000;
    local_e18 = lVar2;
    FUN_140156b50(lVar2);
    local_e10 = 1;
    if (*(longlong *)(param_1 + 0xa0) == 0) {
      FUN_1401a3c30(*(longlong *)(param_1 + 0x148) + 0x828,param_1);
    }
    FUN_140156be0(lVar2);
  }
  FUN_140156be0(local_e28);
  local_e38 = &local_d80;
  FUN_1401560e0(&local_d80);
  if (local_d78 != 0) {
    if (local_d6c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_d70 = 0;
  }
  if (local_58 == (undefined1 *)0x0) {
    FUN_140156300(local_dd8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_dd8,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_4c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401a3ee0(longlong param_1,undefined8 param_2,longlong param_3)

{
  undefined *puVar1;
  int *piVar2;
  char cVar3;
  undefined8 uVar4;
  longlong *plVar5;
  undefined *puVar6;
  undefined1 auStack_128 [32];
  undefined *local_108;
  undefined4 local_100;
  undefined8 local_f8;
  undefined1 local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined1 local_d8 [16];
  undefined1 local_c8 [16];
  undefined1 *local_b8;
  undefined1 local_b0 [136];
  ulonglong local_28;
  
  local_e0 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_128;
  uVar4 = 0;
  local_100 = 0;
  if (*(undefined8 **)(param_1 + 0x150) != (undefined8 *)0x0) {
    uVar4 = **(undefined8 **)(param_1 + 0x150);
  }
  local_e8 = param_2;
  uVar4 = FUN_140184b60(uVar4,local_d8);
  FUN_140159940(param_2,uVar4);
  local_100 = 1;
  uVar4 = FUN_140184b60(*(undefined8 *)(*(longlong *)(param_3 + 0x748) + 0x110),local_c8);
  plVar5 = (longlong *)FUN_140159850(uVar4,&local_108);
  puVar6 = (undefined *)*plVar5;
  if ((undefined *)*plVar5 == (undefined *)0x0) {
    puVar6 = PTR_DAT_140320098;
  }
  FUN_140159b70(param_2,puVar6);
  puVar6 = local_108;
  if (((local_108 != (undefined *)0x0) && (local_108 != PTR_DAT_140320098)) &&
     (puVar1 = local_108 + -8, puVar1 != (undefined *)0x0)) {
    uVar4 = FUN_1401568c0();
    local_f8 = uVar4;
    FUN_140156b50(uVar4);
    local_f0 = 1;
    piVar2 = (int *)(puVar6 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar4);
  }
  puVar6 = *(undefined **)(*(longlong *)(param_1 + 0x148) + 0x218);
  if (puVar6 == (undefined *)0x0) {
    puVar6 = PTR_DAT_140320098;
  }
  FUN_140159b70(param_2,puVar6);
  puVar6 = *(undefined **)(*(longlong *)(param_1 + 0x148) + 0x210);
  if (puVar6 == (undefined *)0x0) {
    puVar6 = PTR_DAT_140320098;
  }
  FUN_140159b70(param_2,puVar6);
  cVar3 = FUN_140159f90(param_2);
  if (cVar3 == '\0') {
    plVar5 = (longlong *)FUN_140159bb0(&local_108);
    puVar6 = (undefined *)*plVar5;
    if ((undefined *)*plVar5 == (undefined *)0x0) {
      puVar6 = PTR_DAT_1403200a0;
    }
    local_b8 = local_b0;
    FUN_140153e40(&local_b8,puVar6,3);
    FUN_140155010(param_2,local_b8);
    if (local_b8 != local_b0) {
      free(local_b8);
    }
    if (((local_108 != (undefined *)0x0) && (local_108 != PTR_DAT_1403200a0)) &&
       (local_108 + -8 != (undefined *)0x0)) {
      uVar4 = FUN_1401568c0();
      local_f8 = uVar4;
      FUN_140156b50(uVar4);
      local_f0 = 1;
      piVar2 = (int *)(local_108 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(local_108 + -8);
      }
      FUN_140156be0(uVar4);
    }
  }
  return param_2;
}



void FUN_1401a4100(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong *plVar2;
  longlong lVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  *param_1 = Proud::CUdpSocket_S::vftable;
  param_1[1] = Proud::CUdpSocket_S::vftable;
  param_1[2] = Proud::CUdpSocket_S::vftable;
  param_1[8] = Proud::CUdpSocket_S::vftable;
  param_1[0x11] = Proud::CUdpSocket_S::vftable;
  pvVar1 = (void *)param_1[0x2f];
  if (pvVar1 != (void *)0x0) {
    FUN_1401a2ee0((longlong)pvVar1 + 8);
    operator_delete(pvVar1);
  }
  param_1[0x2f] = 0;
  pvVar1 = (void *)param_1[0x2e];
  if (pvVar1 != (void *)0x0) {
    FUN_1401a01c0(pvVar1);
    operator_delete(pvVar1);
  }
  param_1[0x2e] = 0;
  pvVar1 = (void *)param_1[0x2d];
  if (pvVar1 != (void *)0x0) {
    FUN_1401a3040(pvVar1);
    operator_delete(pvVar1);
  }
  param_1[0x2d] = 0;
  if (param_1[0x14] != 0) {
    FUN_14015b180(param_1[0x14],param_1,param_3,param_4,uVar5);
  }
  pvVar1 = (void *)param_1[0x2f];
  if (pvVar1 != (void *)0x0) {
    FUN_1401a2ee0((longlong)pvVar1 + 8);
    operator_delete(pvVar1);
  }
  pvVar1 = (void *)param_1[0x2e];
  if (pvVar1 != (void *)0x0) {
    FUN_1401a01c0(pvVar1);
    operator_delete(pvVar1);
  }
  pvVar1 = (void *)param_1[0x2d];
  if (pvVar1 != (void *)0x0) {
    FUN_1401a3040(pvVar1);
    operator_delete(pvVar1);
  }
  if ((param_1[0x2a] != 0) &&
     (*(longlong *)(param_1[0x2a] + 8) = *(longlong *)(param_1[0x2a] + 8) + -1,
     *(longlong *)(param_1[0x2a] + 8) == 0)) {
    plVar2 = (longlong *)param_1[0x2a];
    lVar3 = *plVar2;
    if (lVar3 != 0) {
      FUN_1401859b0(lVar3);
      FUN_140156970(lVar3);
    }
    FUN_140156970(plVar2);
  }
  puVar4 = (undefined8 *)param_1[0x1c];
  if (puVar4 != (undefined8 *)0x0) {
    (**(code **)*puVar4)(puVar4,1);
  }
  FUN_140156c00(param_1 + 0x15);
  param_1[0x11] = Proud::ISendIssueObject::vftable;
  FUN_1401a37a0(param_1 + 8);
  param_1[2] = Proud::IUdpPacketDefragBoardDg::vftable;
  param_1[1] = Proud::IUdpPacketFragBoardDg::vftable;
  if (param_1[0x14] != 0) {
    FUN_14015b180(param_1[0x14],param_1);
  }
  *param_1 = Proud::ICompletionContext::vftable;
  return;
}



undefined8 FUN_1401a4320(void)

{
  return 4;
}



void FUN_1401a4330(longlong param_1)

{
  undefined8 uVar1;
  
  uVar1 = (**(code **)(*(longlong *)(param_1 + 0x48) + 0x10))(param_1 + 0x48);
  FUN_140156c80(uVar1);
  return;
}



void FUN_1401a4350(longlong param_1)

{
  FUN_1401a48c0(param_1 + -0x40);
  return;
}



void FUN_1401a4360(longlong param_1)

{
  FUN_1401a48c0(param_1 + -8);
  return;
}



void FUN_1401a4370(longlong param_1)

{
  FUN_1401a48c0(param_1 + -0x88);
  return;
}



void FUN_1401a4380(longlong param_1)

{
  FUN_1401a48c0(param_1 + -0x10);
  return;
}



void FUN_1401a4390(longlong param_1)

{
  FUN_1401a38b0(param_1 + -8);
  return;
}



undefined8 FUN_1401a43a0(longlong param_1)

{
  return *(undefined8 *)(param_1 + 0xd0);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401a43b0(longlong param_1,longlong param_2)

{
  undefined2 uVar1;
  longlong lVar2;
  undefined1 auStack_d88 [32];
  undefined4 *local_d68;
  undefined4 *local_d60;
  undefined8 local_d58;
  undefined4 uStack_d50;
  undefined4 uStack_d4c;
  undefined1 local_d48 [8];
  longlong local_d40;
  longlong local_d38;
  undefined4 local_d30;
  int local_d2c;
  undefined4 local_d20 [2];
  undefined8 local_d18;
  undefined1 local_d10;
  undefined4 local_d0c;
  undefined1 local_d08;
  undefined1 local_d07;
  undefined8 local_d00;
  undefined1 local_cf8 [80];
  undefined4 local_ca8;
  undefined4 uStack_ca4;
  undefined4 uStack_ca0;
  undefined4 uStack_c9c;
  undefined4 *local_28;
  undefined4 local_20;
  int local_1c;
  ulonglong local_18;
  
  local_d00 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_d88;
  FUN_1401544a0(local_d48);
  FUN_140153d90(local_d48);
  FUN_140154600(local_d48,0x800);
  FUN_140154600(local_d48,0);
  FUN_14004fd90(local_d48,0x27);
  local_1c = 200;
  local_20 = 0;
  local_28 = &local_ca8;
  if (local_d40 == 0) {
    if (local_d38 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else {
    local_d30 = *(undefined4 *)(local_d40 + 0x18);
  }
  lVar2 = local_d38;
  if (local_d38 == 0) {
    if (local_d40 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    lVar2 = 0;
    if (*(int *)(local_d40 + 0x18) != 0) {
      lVar2 = *(longlong *)(local_d40 + 0x10);
    }
  }
  local_20 = 1;
  local_d58._0_4_ = (undefined4)lVar2;
  local_d58._4_4_ = (undefined4)((ulonglong)lVar2 >> 0x20);
  local_ca8 = (undefined4)local_d58;
  uStack_ca4 = local_d58._4_4_;
  uStack_c9c = uStack_d4c;
  local_d20[0] = 1;
  local_d18 = 0;
  local_d10 = 1;
  local_d0c = 0xffffffff;
  local_d08 = 1;
  local_d07 = DAT_140320dfc;
  local_d58 = Proud::AddrPort::vftable;
  uStack_d50 = *(undefined4 *)(param_2 + 8);
  uStack_d4c = CONCAT22(uStack_d4c._2_2_,*(undefined2 *)(param_2 + 0xc));
  uStack_ca0 = local_d30;
  uVar1 = FUN_14019e480(1);
  local_d60 = local_d20;
  local_d68 = &local_ca8;
  FUN_1401a3cc0(param_1 + -8,0,uVar1,&local_d58);
  if (local_28 == (undefined4 *)0x0) {
    FUN_140156300(local_cf8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_cf8,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_1c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  local_d58 = (undefined **)&local_d40;
  FUN_1401560e0(&local_d40);
  if ((local_d38 != 0) && (local_d2c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



undefined8 *
FUN_1401a45b0(undefined8 *param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined4 uVar4;
  undefined8 *puVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  longlong *local_res10;
  undefined8 uVar8;
  undefined8 local_50;
  undefined4 local_44;
  undefined8 *local_40;
  
  uVar8 = 0xfffffffffffffffe;
  *param_1 = Proud::ICompletionContext::vftable;
  puVar7 = (undefined8 *)0x0;
  param_1[0x12] = 0;
  param_1[0x13] = 0;
  param_1[0x14] = 0;
  param_1[1] = Proud::IUdpPacketFragBoardDg::vftable;
  param_1[2] = Proud::IUdpPacketDefragBoardDg::vftable;
  FUN_1401a3780(param_1 + 8);
  *param_1 = Proud::CUdpSocket_S::vftable;
  param_1[1] = Proud::CUdpSocket_S::vftable;
  param_1[2] = Proud::CUdpSocket_S::vftable;
  param_1[8] = Proud::CUdpSocket_S::vftable;
  param_1[0x11] = Proud::CUdpSocket_S::vftable;
  uVar4 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x15,uVar4,1,param_4,uVar8);
  param_1[0x1c] = 0;
  param_1[0x2a] = 0;
  param_1[0x2b] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0x2c) = 0;
  *(undefined2 *)((longlong)param_1 + 0x164) = 0;
  param_1[0x2d] = 0;
  param_1[0x2e] = 0;
  param_1[0x2f] = 0;
  FUN_14019c9e0(&local_50);
  local_50 = 0;
  local_44 = 1;
  local_40 = param_1 + 0x15;
  uVar8 = FUN_140156a10(0x800,&local_50);
  param_1[0x1c] = uVar8;
  local_res10 = operator_new(0x90);
  puVar5 = puVar7;
  if (local_res10 != (longlong *)0x0) {
    puVar5 = (undefined8 *)FUN_1401a2f40(local_res10,param_1[0x1c],param_1 + 1);
  }
  param_1[0x2d] = puVar5;
  *(undefined1 *)(puVar5 + 0x11) = 0;
  puVar6 = operator_new(0x6b8);
  puVar5 = puVar7;
  if (puVar6 != (undefined8 *)0x0) {
    *puVar6 = 0;
    puVar6[3] = 0;
    puVar6[1] = 0;
    puVar6[2] = 100;
    puVar6[0xcf] = Proud::CFastArray<>::vftable;
    puVar6[0xd0] = 0;
    puVar6[0xd1] = 0;
    puVar6[0xd2] = 0;
    puVar6[0xd3] = 0;
    puVar6[0xd4] = Proud::AddrPort::vftable;
    *(undefined4 *)(puVar6 + 0xd5) = 0;
    *(undefined2 *)((longlong)puVar6 + 0x6ac) = 0;
    puVar5 = puVar6;
  }
  param_1[0x2e] = puVar5;
  *(undefined1 *)(param_1 + 0x20) = 0;
  *(undefined1 *)(param_1 + 0x28) = 0;
  local_res10 = (longlong *)FUN_140156940(0x400);
  puVar5 = puVar7;
  if (local_res10 != (longlong *)0x0) {
    puVar5 = (undefined8 *)(param_2 + 0x60);
    if (param_2 == 0) {
      puVar5 = puVar7;
    }
    puVar5 = (undefined8 *)FUN_140185b00(local_res10,1,puVar5);
  }
  if (puVar5 == (undefined8 *)0x0) {
    local_res10 = (longlong *)0x0;
  }
  else {
    local_res10 = (longlong *)FUN_140156940(0x10);
    local_res10[1] = 1;
    *local_res10 = (longlong)puVar5;
  }
  plVar1 = local_res10;
  FUN_140161a50(param_1 + 0x2a,&local_res10);
  plVar3 = local_res10;
  if (plVar1 != (longlong *)0x0) {
    plVar1 = plVar1 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      lVar2 = *local_res10;
      if (lVar2 != 0) {
        FUN_1401859b0(lVar2);
        FUN_140156970(lVar2);
      }
      FUN_140156970(plVar3);
    }
  }
  param_1[0x29] = param_2;
  *(undefined4 *)(param_1 + 0x2c) = DAT_140320450;
  *(undefined2 *)((longlong)param_1 + 0x164) = DAT_140320454;
  local_res10 = operator_new(0x60);
  if (local_res10 != (longlong *)0x0) {
    puVar7 = (undefined8 *)FUN_1401a30a0(local_res10,param_1 + 2);
  }
  param_1[0x2f] = puVar7;
  return param_1;
}



undefined8 FUN_1401a48c0(undefined8 param_1,uint param_2)

{
  FUN_1401a4100();
  if ((param_2 & 1) != 0) {
    FUN_140156970(param_1);
  }
  return param_1;
}



undefined8 * FUN_1401a48f0(undefined8 *param_1)

{
  FUN_1401568c0();
  *param_1 = PTR_DAT_1403200a0;
  *(undefined4 *)((longlong)param_1 + 0xc) = 0;
  *(undefined4 *)(param_1 + 2) = 0;
  *(undefined4 *)((longlong)param_1 + 0x14) = 0;
  *(undefined4 *)(param_1 + 3) = 0;
  param_1[5] = 0;
  param_1[4] = Proud::ByteArray::vftable;
  param_1[6] = 0;
  param_1[7] = 0;
  param_1[8] = 0;
  param_1[9] = 0;
  *(undefined2 *)(param_1 + 1) = 0;
  return param_1;
}



undefined8 *
FUN_1401a4960(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  
  uVar1 = 0xfffffffffffffffe;
  FUN_1401568c0();
  *param_1 = PTR_DAT_1403200a0;
  FUN_1401568c0();
  param_1[1] = PTR_DAT_1403200a0;
  param_1[3] = Proud::CFastArray<int,0>::vftable;
  param_1[4] = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[7] = 0;
  *(undefined4 *)((longlong)param_1 + 0x44) = 0;
  *(undefined4 *)(param_1 + 9) = 0;
  *(undefined4 *)((longlong)param_1 + 0x4c) = 0;
  *(undefined4 *)(param_1 + 10) = 0;
  param_1[0x11] = Proud::CFastArray<int,0>::vftable;
  param_1[0x12] = 0;
  param_1[0x13] = 0;
  param_1[0x14] = 0;
  param_1[0x15] = 0;
  *(undefined8 *)((longlong)param_1 + 0x5c) = 0x80;
  *(undefined4 *)(param_1 + 2) = 0;
  *(undefined4 *)(param_1 + 8) = 0;
  *(undefined8 *)((longlong)param_1 + 0x54) = 0;
  *(undefined2 *)((longlong)param_1 + 0x65) = 0x100;
  *(undefined1 *)((longlong)param_1 + 100) = 0;
  *(undefined1 *)((longlong)param_1 + 0x67) = DAT_140320d75;
  *(undefined1 *)(param_1 + 0xd) = 0;
  *(undefined4 *)((longlong)param_1 + 0x6c) = 0;
  param_1[0xe] = 0;
  *(undefined1 *)(param_1 + 0xf) = 1;
  *(undefined8 *)((longlong)param_1 + 0x7c) = 0;
  *(undefined2 *)((longlong)param_1 + 0x84) = 0;
  param_1[0x16] = 0;
  FUN_14013c2c0(param_1 + 0x11,0,0,param_4,uVar1);
  return param_1;
}



wchar_t * FUN_1401a4a50(int param_1)

{
  if (param_1 == 0) {
    return L"System";
  }
  if (param_1 != 1) {
    if (param_1 != 2) {
      return L"";
    }
    return L"HolepunchFreqFail";
  }
  return L"Holepunch";
}



wchar_t * FUN_1401a4a80(int param_1)

{
  if (param_1 == 0) {
    return L"Disconnected";
  }
  if (param_1 == 1) {
    return L"Connecting";
  }
  if (param_1 == 2) {
    return L"Connected";
  }
  if (param_1 != 3) {
    return L"<undefined ConnectionState>";
  }
  return L"Disconnecting";
}



void FUN_1401a4ac0(void)

{
  FUN_140187e40();
  return;
}



int FUN_1401a4af0(undefined8 param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  double dVar3;
  
  uVar1 = FUN_140187e40();
  dVar3 = (double)uVar1 / 4294967295.0;
  if (dVar3 <= 0.0) {
    dVar3 = 0.0;
  }
  iVar2 = (int)((double)(param_2 + 1) * dVar3);
  if (iVar2 < param_2) {
    param_2 = iVar2;
  }
  return param_2;
}



undefined4 * FUN_1401a4b40(undefined8 param_1,undefined4 *param_2)

{
  uint uVar1;
  longlong lVar2;
  double dVar3;
  
  *param_2 = 0;
  param_2[1] = 0;
  param_2[2] = 0;
  param_2[3] = 0;
  lVar2 = 0;
  do {
    uVar1 = FUN_140187e40(param_1);
    dVar3 = (double)uVar1 / 4294967295.0;
    if (dVar3 <= 0.0) {
      dVar3 = 0.0;
    }
    *(double *)(param_2 + lVar2 * 2) = dVar3;
    lVar2 = lVar2 + 1;
  } while (lVar2 < 2);
  return param_2;
}



void FUN_1401a4be0(char *param_1,undefined4 param_2,undefined8 param_3,longlong param_4)

{
  undefined2 uVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  undefined **local_18;
  undefined4 local_10;
  undefined2 local_c;
  
  if (*param_1 != '\0') {
    local_18 = Proud::AddrPort::vftable;
    local_10 = *(undefined4 *)(param_1 + 0x10);
    local_c = *(undefined2 *)(param_1 + 0x14);
    if (*(undefined8 **)(param_1 + 0x40) == (undefined8 *)0x0) {
      uVar3 = 0;
    }
    else {
      uVar3 = **(undefined8 **)(param_1 + 0x40);
    }
    uVar2 = (**(code **)(**(longlong **)(param_1 + 0x38) + 0x10))();
    uVar1 = FUN_14019e480(1,uVar2);
    FUN_1401a3cc0(uVar3,param_2,uVar1,&local_18,param_3,param_4);
    return;
  }
  local_18 = *(undefined ***)(param_4 + 8);
  local_10 = CONCAT31(local_10._1_3_,*(undefined1 *)(param_4 + 0x10));
  FUN_1401a3610(*(undefined8 *)(*(longlong *)(param_1 + 0x38) + 0x748),param_3,&local_18);
  return;
}



void FUN_1401a4cb0(longlong param_1)

{
  longlong *plVar1;
  char cVar2;
  longlong lVar3;
  longlong lVar4;
  undefined **local_18;
  undefined4 local_10;
  undefined2 local_c;
  
  if (((*(longlong **)(param_1 + 0x40) != (longlong *)0x0) && (**(longlong **)(param_1 + 0x40) != 0)
      ) && (cVar2 = FUN_1401588c0(param_1 + 8), cVar2 != '\0')) {
    local_10 = *(undefined4 *)(param_1 + 0x10);
    local_c = *(undefined2 *)(param_1 + 0x14);
    lVar4 = 0;
    local_18 = Proud::AddrPort::vftable;
    lVar3 = lVar4;
    if (*(longlong **)(param_1 + 0x40) != (longlong *)0x0) {
      lVar3 = **(longlong **)(param_1 + 0x40);
    }
    FUN_1401a0df0(*(undefined8 *)(lVar3 + 0x168),&local_18);
    plVar1 = *(longlong **)(param_1 + 0x40);
    lVar3 = lVar4;
    if (plVar1 != (longlong *)0x0) {
      lVar3 = *plVar1;
    }
    if (*(longlong *)(lVar3 + 0x178) != 0) {
      local_10 = *(undefined4 *)(param_1 + 0x10);
      local_18 = Proud::AddrPort::vftable;
      local_c = *(undefined2 *)(param_1 + 0x14);
      if (plVar1 != (longlong *)0x0) {
        lVar4 = *plVar1;
      }
      FUN_1401a2770(*(undefined8 *)(lVar4 + 0x178),&local_18);
    }
  }
  return;
}



undefined2 * FUN_1401a4d90(undefined2 *param_1,undefined8 param_2)

{
  *(undefined ***)(param_1 + 4) = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 8) = 0;
  param_1[10] = 0;
  *(undefined ***)(param_1 + 0xc) = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0x10) = 0;
  param_1[0x12] = 0;
  *(undefined4 *)(param_1 + 0x14) = 0;
  *(undefined4 *)(param_1 + 0x16) = 0;
  *(undefined4 *)(param_1 + 0x18) = 0;
  *(undefined4 *)(param_1 + 0x1a) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *param_1 = 0;
  *(undefined1 *)(param_1 + 1) = 0;
  *(undefined4 *)(param_1 + 8) = DAT_140320450;
  param_1[10] = DAT_140320454;
  *(undefined4 *)(param_1 + 0x10) = DAT_140320450;
  param_1[0x12] = DAT_140320454;
  *(undefined8 *)(param_1 + 0x1c) = param_2;
  *(undefined4 *)(param_1 + 0x14) = 0;
  *(undefined4 *)(param_1 + 0x16) = 0;
  *(undefined4 *)(param_1 + 0x18) = 0;
  *(undefined4 *)(param_1 + 0x1a) = 0;
  return param_1;
}



void FUN_1401a4e40(longlong param_1)

{
  longlong *plVar1;
  undefined8 *puVar2;
  
  if ((*(longlong *)(param_1 + 0x40) != 0) &&
     (*(longlong *)(*(longlong *)(param_1 + 0x40) + 8) =
           *(longlong *)(*(longlong *)(param_1 + 0x40) + 8) + -1,
     *(longlong *)(*(longlong *)(param_1 + 0x40) + 8) == 0)) {
    plVar1 = *(longlong **)(param_1 + 0x40);
    puVar2 = (undefined8 *)*plVar1;
    if (puVar2 != (undefined8 *)0x0) {
      (**(code **)*puVar2)(puVar2,1);
    }
    FUN_140156970(plVar1);
  }
  return;
}



void FUN_1401a4ea0(longlong param_1,longlong param_2)

{
  short sVar1;
  int iVar2;
  undefined8 *puVar3;
  
  if ((*(int *)(param_1 + 0x10) != *(int *)(param_2 + 8)) ||
     (*(short *)(param_1 + 0x14) != *(short *)(param_2 + 0xc))) {
    FUN_1401619a0(*(longlong *)(*(longlong *)(param_1 + 0x38) + 0x238) + 0x388,param_1 + 8,0);
    iVar2 = *(int *)(param_2 + 8);
    *(int *)(param_1 + 0x10) = iVar2;
    sVar1 = *(short *)(param_2 + 0xc);
    *(short *)(param_1 + 0x14) = sVar1;
    if ((iVar2 != DAT_140320450) || (sVar1 != DAT_140320454)) {
      puVar3 = (undefined8 *)
               FUN_140190ce0(*(longlong *)(*(longlong *)(param_1 + 0x38) + 0x238) + 0x388,
                             param_1 + 8);
      *puVar3 = *(undefined8 *)(param_1 + 0x38);
    }
  }
  return;
}



void FUN_1401a4f40(char *param_1,size_t param_2)

{
  errno_t eVar1;
  
  eVar1 = _strlwr_s(param_1,param_2);
  if (eVar1 != 0) {
    if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  return;
}



void FUN_1401a4f90(ulong param_1,char *param_2,size_t param_3,int param_4)

{
  errno_t eVar1;
  
  eVar1 = _ultoa_s(param_1,param_2,param_3,param_4);
  if (eVar1 != 0) {
    if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  return;
}



void FUN_1401a4fe0(LPCWSTR param_1,int param_2,LPSTR param_3,int param_4)

{
  WideCharToMultiByte(0xfde9,0,param_1,param_2,param_3,param_4,(LPCSTR)0x0,(LPBOOL)0x0);
  return;
}



undefined8 FUN_1401a5020(byte param_1)

{
  switch(param_1) {
  case 0x20:
  case 0x22:
  case 0x23:
  case 0x24:
  case 0x25:
  case 0x26:
  case 0x2b:
  case 0x2c:
  case 0x3b:
  case 0x3c:
  case 0x3d:
  case 0x3e:
  case 0x3f:
  case 0x40:
  case 0x5b:
  case 0x5c:
  case 0x5d:
  case 0x5e:
  case 0x60:
  case 0x7b:
  case 0x7c:
  case 0x7d:
    break;
  default:
    if ((0x1f < param_1) && (param_1 < 0x7f)) {
      return 0;
    }
  }
  return 1;
}



undefined8
FUN_1401a50d0(longlong *param_1,char *param_2,uint param_3,undefined8 *param_4,uint *param_5,
             uint param_6,int param_7)

{
  char cVar1;
  longlong lVar2;
  uint uVar3;
  char *pcVar4;
  longlong lVar5;
  uint uVar6;
  uint uVar7;
  char *pcVar8;
  longlong lVar9;
  undefined8 uVar10;
  
  if (param_1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if (param_2 == (char *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if (param_4 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if (param_5 == (uint *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  lVar9 = *param_1;
  pcVar8 = (char *)*param_4;
  uVar10 = 0;
  if ((*param_2 != '/') && (*param_2 != '\\')) goto LAB_1401a51d9;
  cVar1 = *pcVar8;
  if ((cVar1 == '/') || (cVar1 == '\\')) {
    pcVar4 = pcVar8 + 1;
  }
  else {
    if ((cVar1 != '.') ||
       (((cVar1 = pcVar8[1], cVar1 != '/' && (cVar1 != '\\')) && (cVar1 != '\0'))))
    goto LAB_1401a51d9;
    lVar9 = lVar9 + -1;
    uVar7 = 0;
    lVar5 = lVar9;
    uVar6 = param_3 - 1;
    do {
      uVar3 = uVar6;
      lVar2 = lVar5;
      if (uVar3 == 0) goto LAB_1401a51c0;
      uVar7 = uVar3 - 1;
    } while ((*(char *)(lVar2 + -1) != '/') &&
            (lVar5 = lVar2 + -1, uVar6 = uVar7, *(char *)(lVar2 + -1) != '\\'));
    if (((-1 < (char)param_6) || (((param_6 >> 8 & 1) != 0 || (param_7 == 0)))) ||
       (param_7 + 1U < uVar7)) {
      uVar10 = 1;
      lVar9 = lVar2;
      param_3 = uVar3;
    }
LAB_1401a51c0:
    pcVar4 = pcVar8 + 2;
    if (param_3 != uVar7 + 1) {
      lVar9 = lVar9 + 1;
      goto LAB_1401a51d9;
    }
  }
  pcVar8 = pcVar4;
  uVar10 = 1;
LAB_1401a51d9:
  *param_1 = lVar9;
  *param_4 = pcVar8;
  *param_5 = param_3;
  return uVar10;
}



int FUN_1401a5200(byte *param_1,byte *param_2,int *param_3,uint param_4,uint param_5)

{
  short sVar1;
  int iVar2;
  byte *pbVar3;
  byte bVar4;
  short sVar5;
  uint uVar6;
  size_t _MaxCount;
  uint uVar7;
  size_t sVar8;
  byte *pbVar9;
  int iVar10;
  size_t sVar11;
  byte *local_res8;
  byte *local_res10;
  int *local_res18;
  uint local_58;
  uint local_54;
  byte *local_50;
  byte *local_48;
  
  local_res10 = param_2;
  local_res18 = param_3;
  if (param_1 == (byte *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if (param_2 == (byte *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if (param_1 == param_2) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  _MaxCount = 0;
  bVar4 = *param_1;
  local_50 = param_2 + param_4;
  uVar6 = 0;
  local_58 = 0;
  iVar2 = 1;
  iVar10 = 1;
  local_54 = 0;
  sVar8 = _MaxCount;
  sVar11 = _MaxCount;
  local_48 = param_2;
  if (bVar4 != 0) {
    do {
      uVar7 = (uint)sVar8;
      pbVar9 = param_1 + 1;
      uVar6 = (uint)_MaxCount;
      iVar2 = 0;
      if (uVar6 == param_4) {
        iVar10 = iVar2;
      }
      local_res8 = pbVar9;
      if (bVar4 == 0x3a) {
        if ((char)param_5 < '\0') {
          if ((int)sVar11 == 0) {
            if (iVar10 != 0) {
              *param_2 = (byte)sVar11;
              pbVar3 = param_2 + -_MaxCount;
              if ((pbVar3 < local_48) || (local_50 < pbVar3)) {
                    // WARNING: Subroutine does not return
                FUN_14004ea80(0x80004005);
              }
              FUN_1401a4f40(pbVar3,local_50 + (1 - (longlong)pbVar3));
              uVar7 = local_54;
              if (uVar6 == 4) {
                iVar2 = strncmp("file",(char *)(param_2 + -4),_MaxCount);
                sVar11 = 5;
                uVar7 = local_54;
                if (iVar2 == 0) {
                  local_54 = 1;
                  uVar7 = 1;
                }
                goto LAB_1401a5419;
              }
            }
            sVar11 = (size_t)(uVar6 + 1);
          }
          goto LAB_1401a5419;
        }
LAB_1401a54a5:
        iVar2 = FUN_1401a5020(bVar4);
        if ((((iVar2 == 0) || ((param_5 & 2) != 0)) ||
            ((((param_5 & 0x10) != 0 && (bVar4 != 0x20)) ||
             (((param_5 & 8) != 0 && (bVar4 == 0x2e)))))) ||
           (((param_5 & 0x40) == 0 && (bVar4 == 0x25)))) {
          if (iVar10 != 0) {
            *param_2 = bVar4;
            param_2 = param_2 + 1;
            local_res10 = param_2;
          }
        }
        else if (uVar6 < param_4 - 3) {
          if (iVar10 != 0) {
            *param_2 = 0x25;
            pbVar3 = param_2 + 1;
            if (bVar4 < 0x10) {
              *pbVar3 = 0x30;
              pbVar3 = param_2 + 2;
            }
            FUN_1401a4f90(bVar4,pbVar3,(longlong)local_50 - (longlong)pbVar3,0x10);
            param_2 = param_2 + 3;
            local_res10 = param_2;
          }
          uVar6 = uVar6 + 2;
        }
        else {
          iVar10 = 0;
          uVar6 = uVar6 + 2;
        }
        local_58 = uVar6 + 1;
        local_res8 = pbVar9;
      }
      else {
        if (bVar4 == 0x25) {
          if ((param_5 & 4) != 0) {
            bVar4 = *pbVar9;
            if (bVar4 == 0) goto LAB_1401a55b5;
            param_3 = local_res18;
            if ((byte)(bVar4 - 0x30) < 10) {
              sVar5 = bVar4 - 0x30;
            }
            else if ((byte)(bVar4 + 0xbf) < 6) {
              sVar5 = bVar4 - 0x37;
            }
            else {
              if (5 < (byte)(bVar4 + 0x9f)) goto LAB_1401a5574;
              sVar5 = bVar4 - 0x57;
            }
            if (sVar5 < 0) goto LAB_1401a5574;
            bVar4 = param_1[2];
            if (bVar4 == 0) goto LAB_1401a55b5;
            pbVar9 = param_1 + 3;
            if ((byte)(bVar4 - 0x30) < 10) {
              sVar1 = bVar4 - 0x30;
            }
            else if ((byte)(bVar4 + 0xbf) < 6) {
              sVar1 = bVar4 - 0x37;
            }
            else {
              if (5 < (byte)(bVar4 + 0x9f)) goto LAB_1401a5574;
              sVar1 = bVar4 - 0x57;
            }
            if (sVar1 < 0) goto LAB_1401a5574;
            bVar4 = (char)sVar5 * '\x10' + (char)sVar1;
            local_res8 = pbVar9;
          }
        }
        else if (((bVar4 == 0x3f) || (bVar4 == 0x23)) && ((param_5 & 0x20) != 0)) {
          param_5 = param_5 | 2;
        }
LAB_1401a5419:
        if ((-1 < (char)param_5) || ((param_5 & 2) != 0)) goto LAB_1401a54a5;
        if (bVar4 == 0x5c) {
          if ((((int)sVar11 != 0) || ((param_5 >> 8 & 1) != 0)) &&
             ((iVar10 != 0 && ((uVar7 == 0 || (uVar6 < 7)))))) {
            bVar4 = 0x2f;
          }
          goto LAB_1401a54a5;
        }
        if ((((bVar4 != 0x2e) || (uVar6 == 0)) || ((param_5 & 8) != 0)) ||
           (iVar2 = FUN_1401a50d0(&local_res10,param_2 + -1,_MaxCount,&local_res8,&local_58,param_5,
                                  (int)sVar11), param_2 = local_res10, pbVar9 = local_res8,
           uVar6 = local_58, iVar2 == 0)) goto LAB_1401a54a5;
      }
      _MaxCount = (size_t)local_58;
      bVar4 = *local_res8;
      uVar6 = local_58;
      if (bVar4 == 0) goto LAB_1401a55b5;
      sVar8 = (size_t)local_54;
      param_1 = local_res8;
    } while( true );
  }
LAB_1401a55c2:
  if (uVar6 < param_4) {
    *param_2 = 0;
  }
LAB_1401a5574:
  if (param_3 != (int *)0x0) {
    *param_3 = uVar6 + 1;
  }
  if (param_4 < uVar6 + 1) {
    iVar2 = 0;
  }
  return iVar2;
LAB_1401a55b5:
  iVar2 = iVar10;
  param_3 = local_res18;
  if (iVar2 == 0) goto LAB_1401a5574;
  goto LAB_1401a55c2;
}



undefined8 FUN_1401a55d0(longlong param_1,wchar_t *param_2)

{
  errno_t eVar1;
  size_t sVar2;
  
  sVar2 = wcsnlen(param_2,0x801);
  if (0x800 < (uint)sVar2) {
    return 0;
  }
  eVar1 = wcsncpy_s((wchar_t *)(param_1 + 0x448),0x801,param_2,sVar2 & 0xffffffff);
  if (eVar1 != 0) {
    if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  *(uint *)(param_1 + 0x2464) = (uint)sVar2;
  return 1;
}



void FUN_1401a5680(undefined2 *param_1)

{
  *(undefined4 *)(param_1 + 0x1228) = 0xffffffff;
  param_1[0x1226] = 0;
  *(undefined8 *)(param_1 + 0x122a) = 0;
  *(undefined4 *)(param_1 + 0x122e) = 0;
  *(undefined8 *)(param_1 + 0x1230) = 0;
  *(undefined4 *)(param_1 + 0x1234) = 0;
  *param_1 = 0;
  param_1[0x21] = 0;
  param_1[0x122] = 0;
  param_1[0x1a3] = 0;
  param_1[0x224] = 0;
  param_1[0xa25] = 0;
  return;
}



void FUN_1401a56e0(undefined8 *param_1)

{
  *param_1 = Proud::IFastSocketDelegate::vftable;
  return;
}



undefined8 * FUN_1401a56f0(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::IFastSocketDelegate::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401a5720(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  char cVar1;
  longlong lVar2;
  longlong lVar3;
  undefined8 uVar4;
  undefined1 uVar5;
  undefined8 local_30;
  undefined **local_28;
  undefined4 local_20;
  undefined2 local_1c;
  undefined4 local_18;
  
  uVar4 = 0xfffffffffffffffe;
  lVar3 = param_1 + 0x30;
  lVar2 = lVar3;
  FUN_140156b50(lVar3);
  uVar5 = 1;
  *(undefined1 *)(param_1 + 0x80) = 1;
  FUN_140182710(param_1 + 0x88);
  if ((*(longlong **)(param_1 + 0x10) != (longlong *)0x0) && (**(longlong **)(param_1 + 0x10) != 0))
  {
    FUN_1401855c0();
    lVar3 = lVar2;
    while( true ) {
      local_28 = Proud::AddrPort::vftable;
      local_18 = 0;
      local_30 = 0;
      local_20 = DAT_140320450;
      local_1c = DAT_140320454;
      lVar2 = 0;
      if (*(longlong **)(param_1 + 0x10) != (longlong *)0x0) {
        lVar2 = **(longlong **)(param_1 + 0x10);
      }
      if (*(char *)(lVar2 + 0x280) == '\0') break;
      lVar2 = 0;
      if (*(longlong **)(param_1 + 0x10) != (longlong *)0x0) {
        lVar2 = **(longlong **)(param_1 + 0x10);
      }
      cVar1 = FUN_1401854f0(lVar2,0,&local_30,param_4,uVar4,lVar3,uVar5);
      if ((cVar1 != '\0') || (DAT_140328940 != '\0')) break;
      Sleep(10);
    }
  }
  FUN_140156be0(lVar3);
  return;
}



void FUN_1401a5830(undefined8 *param_1)

{
  free((void *)*param_1);
  *param_1 = 0;
  return;
}



wchar_t * FUN_1401a5850(wchar_t *param_1)

{
  errno_t eVar1;
  
  FUN_1401a5680();
  param_1[0x1228] = L'\x02';
  param_1[0x1229] = L'\0';
  param_1[0x122a] = L'\x04';
  param_1[0x122b] = L'\0';
  param_1[0x1226] = L'P';
  eVar1 = wcsncpy_s(param_1,0x21,L"http",4);
  if (eVar1 != 0) {
    if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  return param_1;
}



void FUN_1401a58e0(longlong param_1)

{
  undefined8 uVar1;
  undefined *puVar2;
  int iVar3;
  
  puVar2 = *(undefined **)(param_1 + 0x20);
  uVar1 = 0;
  iVar3 = 0;
  if ((puVar2 != (undefined *)0x0) && (iVar3 = 0, puVar2 != PTR_DAT_140320098)) {
    iVar3 = *(int *)(puVar2 + -8);
  }
  if (puVar2 == (undefined *)0x0) {
    puVar2 = PTR_DAT_140320098;
  }
  if (*(undefined8 **)(param_1 + 0x10) != (undefined8 *)0x0) {
    uVar1 = **(undefined8 **)(param_1 + 0x10);
  }
  FUN_140186760(uVar1,puVar2 + *(int *)(param_1 + 0x28),(iVar3 - *(int *)(param_1 + 0x28)) + 1);
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401a5930(short *param_1,undefined2 *param_2,undefined4 *param_3,uint param_4,
                 undefined4 param_5)

{
  short sVar1;
  undefined1 *_Memory;
  undefined1 *_Memory_00;
  int iVar2;
  int iVar3;
  undefined1 *puVar4;
  undefined1 *puVar5;
  ulonglong uVar6;
  uint uVar7;
  short *psVar8;
  undefined1 auStack_1218 [32];
  undefined4 local_11f8;
  uint local_11e8;
  undefined4 local_11e4;
  undefined1 *local_11e0;
  undefined1 *local_11d8;
  undefined4 *local_11d0;
  undefined8 local_11c8;
  undefined1 *local_11b8;
  undefined1 local_11b0 [264];
  undefined1 local_10a8 [2096];
  undefined1 local_878 [2096];
  ulonglong local_48;
  undefined8 uStack_40;
  
  uStack_40 = 0x1401a5946;
  local_11c8 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_1218;
  iVar3 = 0;
  local_11e8 = param_4;
  local_11d0 = param_3;
  if (param_1 == (short *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if (param_2 == (undefined2 *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar6 = 0xffffffffffffffff;
  psVar8 = param_1;
  do {
    if (uVar6 == 0) break;
    uVar6 = uVar6 - 1;
    sVar1 = *psVar8;
    psVar8 = psVar8 + 1;
  } while (sVar1 != 0);
  local_11e0 = (undefined1 *)(~uVar6 - 1);
  if ((int)local_11e0 == 0) {
    if (param_3 != (undefined4 *)0x0) {
      *param_3 = 1;
    }
    *param_2 = 0;
    iVar3 = 1;
  }
  else {
    iVar2 = FUN_1401a4fe0(param_1,(ulonglong)local_11e0 & 0xffffffff,0,0);
    if (iVar2 != 0) {
      uVar7 = iVar2 + 1;
      local_11d8 = (undefined1 *)0x0;
      puVar4 = local_10a8;
      if ((int)uVar7 < 1) {
        free((void *)0x0);
        iVar3 = 0;
      }
      else if ((uVar7 < 0x825) ||
              (puVar4 = malloc((longlong)(int)uVar7), local_11d8 = puVar4,
              puVar4 != (undefined1 *)0x0)) {
        _Memory_00 = local_11d8;
        iVar3 = FUN_1401a4fe0(param_1,(ulonglong)local_11e0 & 0xffffffff,puVar4,uVar7);
        puVar4[iVar3] = 0;
        puVar5 = local_878;
        local_11e0 = (undefined1 *)0x0;
        if ((local_11e8 < 0x825) ||
           (puVar5 = malloc((ulonglong)local_11e8), local_11e0 = puVar5, puVar5 != (undefined1 *)0x0
           )) {
          _Memory = local_11e0;
          local_11e4 = 0;
          local_11f8 = param_5;
          iVar3 = FUN_1401a5200(puVar4,puVar5,&local_11e4,local_11e8);
          if (iVar3 != 0) {
            local_11b8 = local_11b0;
            FUN_140142dc0(&local_11b8,puVar5,3);
            FUN_140157cf0(param_2,local_11e8,local_11b8,local_11e4);
            if (local_11b8 != local_11b0) {
              free(local_11b8);
            }
          }
          if (param_3 != (undefined4 *)0x0) {
            *param_3 = local_11e4;
          }
          free(_Memory);
          free(_Memory_00);
        }
        else {
          free((void *)0x0);
          free(_Memory_00);
          iVar3 = 0;
        }
      }
      else {
        free((void *)0x0);
        iVar3 = 0;
      }
    }
  }
  return iVar3;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401a5b80(wchar_t *param_1,uint param_2)

{
  wchar_t *_Src;
  errno_t eVar1;
  int iVar2;
  undefined1 auStack_1098 [32];
  uint local_1078;
  wchar_t local_1068;
  undefined1 local_1066 [4174];
  ulonglong local_18;
  undefined8 uStack_10;
  
  uStack_10 = 0x1401a5b90;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_1098;
  eVar1 = _wcslwr_s(param_1,0x21);
  if (eVar1 != 0) {
    if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  eVar1 = wcscpy_s(&local_1068,0x824,param_1 + 0x122);
  if (eVar1 != 0) {
    if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  local_1078 = param_2;
  iVar2 = FUN_1401a5930(&local_1068,param_1 + 0x122,param_1 + 0x122e,0x80);
  if (iVar2 != 0) {
    *(int *)(param_1 + 0x122e) = *(int *)(param_1 + 0x122e) + -1;
    eVar1 = wcscpy_s(&local_1068,0x824,param_1 + 0x1a3);
    if (eVar1 != 0) {
      if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x8007000e);
      }
      if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80070057);
      }
      if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
    }
    local_1078 = param_2;
    iVar2 = FUN_1401a5930(&local_1068,param_1 + 0x1a3,param_1 + 0x1230,0x80);
    if (iVar2 != 0) {
      *(int *)(param_1 + 0x1230) = *(int *)(param_1 + 0x1230) + -1;
      eVar1 = wcscpy_s(&local_1068,0x824,param_1 + 0x21);
      if (eVar1 != 0) {
        if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
          FUN_14004ea80(0x8007000e);
        }
        if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
          FUN_14004ea80(0x80070057);
        }
        if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
          FUN_14004ea80(0x80004005);
        }
      }
      local_1078 = param_2;
      iVar2 = FUN_1401a5930(&local_1068,param_1 + 0x21,param_1 + 0x122c,0x100);
      if (iVar2 != 0) {
        *(int *)(param_1 + 0x122c) = *(int *)(param_1 + 0x122c) + -1;
        eVar1 = wcscpy_s(&local_1068,0x824,param_1 + 0x224);
        if (eVar1 != 0) {
          if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
            FUN_14004ea80(0x8007000e);
          }
          if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
            FUN_14004ea80(0x80070057);
          }
          if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
            FUN_14004ea80(0x80004005);
          }
        }
        local_1078 = param_2;
        iVar2 = FUN_1401a5930(&local_1068,param_1 + 0x224,param_1 + 0x1232,0x800);
        if ((((iVar2 != 0) &&
             (*(int *)(param_1 + 0x1232) = *(int *)(param_1 + 0x1232) + -1, (param_2 & 0x20) == 0))
            && (_Src = param_1 + 0xa25, _Src != (wchar_t *)0x0)) && (*_Src != L'\0')) {
          eVar1 = wcscpy_s(&local_1068,0x824,_Src);
          if (eVar1 != 0) {
            if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
              FUN_14004ea80(0x8007000e);
            }
            if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
              FUN_14004ea80(0x80070057);
            }
            if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
              FUN_14004ea80(0x80004005);
            }
          }
          local_1078 = param_2;
          FUN_1401a5930(local_1066,param_1 + 0xa26,param_1 + 0x1234,0x7ff);
        }
      }
    }
  }
  return;
}



undefined4 FUN_1401a5eb0(longlong param_1)

{
  undefined *puVar1;
  undefined4 uVar2;
  int iVar3;
  undefined8 uVar4;
  undefined *local_res8;
  
  puVar1 = PTR_u_www_nettention_co_kr_1403216d8;
  FUN_1401568c0();
  local_res8 = PTR_DAT_1403200a0;
  uVar2 = FUN_140156740(puVar1);
  uVar4 = FUN_14004f760(&local_res8,uVar2);
  FUN_140156770(uVar4,puVar1,uVar2);
  FUN_14004f380(&local_res8);
  uVar4 = 0;
  if (*(undefined8 **)(param_1 + 0x10) != (undefined8 *)0x0) {
    uVar4 = **(undefined8 **)(param_1 + 0x10);
  }
  iVar3 = FUN_140186000(uVar4,&local_res8,DAT_1403216e0);
  if ((iVar3 != 0) && (iVar3 != 0x2733)) {
    return 0;
  }
  return 1;
}



void FUN_1401a5f60(int *param_1,undefined8 param_2)

{
  int *piVar1;
  undefined *puVar2;
  char cVar3;
  DWORD DVar4;
  int iVar5;
  int iVar6;
  int *piVar7;
  undefined8 uVar8;
  LPCWSTR pWVar9;
  LPCWSTR pWVar10;
  int iVar11;
  LPCWSTR local_res8;
  
  piVar1 = param_1 + 0xc;
  cVar3 = FUN_140156bf0(piVar1);
  if (cVar3 == '\0') {
    return;
  }
  FUN_140156b50(piVar1);
  puVar2 = *(undefined **)(param_1 + 2);
  if ((((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) &&
      (*(int *)(puVar2 + -8) != 0)) ||
     ((*param_1 != 3 || (DVar4 = GetTickCount(), DVar4 - param_1[1] < 0x7531)))) goto LAB_1401a6221;
  FUN_14004f4f0(param_1 + 2,param_2);
  *param_1 = 0;
  DVar4 = GetTickCount();
  param_1[1] = DVar4;
  FUN_1401568c0();
  pWVar10 = (LPCWSTR)PTR_DAT_1403200a0;
  local_res8 = (LPCWSTR)PTR_DAT_1403200a0;
  iVar5 = FUN_140156740(L"**ErrorReport** ");
  iVar11 = 0;
  if ((pWVar10 != (LPCWSTR)0x0) && (pWVar10 != (LPCWSTR)PTR_DAT_1403200a0)) {
    iVar11 = *(int *)((longlong)pWVar10 + -8);
  }
  iVar6 = iVar5;
  if (iVar5 <= iVar11) {
    iVar6 = 0;
    if ((pWVar10 != (LPCWSTR)0x0) && (iVar6 = 0, pWVar10 != (LPCWSTR)PTR_DAT_1403200a0)) {
      iVar6 = *(int *)((longlong)pWVar10 + -8);
    }
  }
  iVar11 = 1;
  if (1 < iVar6) {
    iVar11 = iVar6;
  }
  iVar6 = 0;
  if ((pWVar10 != (LPCWSTR)0x0) && (pWVar10 != (LPCWSTR)PTR_DAT_1403200a0)) {
    iVar6 = *(int *)((longlong)pWVar10 + -8);
  }
  if (iVar6 < iVar11) {
    if (pWVar10 == (LPCWSTR)0x0) {
      pWVar10 = (LPCWSTR)PTR_DAT_1403200a0;
    }
    local_res8 = pWVar10;
    if (iVar11 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (iVar11 == 0) {
      FUN_14004f990(&local_res8);
    }
    else {
      iVar6 = 0;
      if ((pWVar10 != (LPCWSTR)0x0) && (iVar6 = 0, pWVar10 != (LPCWSTR)PTR_DAT_1403200a0)) {
        iVar6 = *(int *)(pWVar10 + -4);
      }
      if (iVar11 != iVar6) {
        piVar7 = (int *)FUN_140156940((longlong)iVar11 * 2 + 10);
        if (piVar7 != (int *)0x0) {
          *piVar7 = 0;
          piVar7[1] = 1;
        }
        *piVar7 = iVar11;
        iVar6 = 0;
        if ((pWVar10 != (LPCWSTR)0x0) && (iVar6 = 0, pWVar10 != (LPCWSTR)PTR_DAT_1403200a0)) {
          iVar6 = *(int *)(pWVar10 + -4);
        }
        pWVar9 = (LPCWSTR)PTR_DAT_1403200a0;
        if (iVar11 < iVar6) {
LAB_1401a60f1:
          if (pWVar10 != (LPCWSTR)0x0) {
            pWVar9 = pWVar10;
          }
        }
        else {
          iVar11 = 0;
          if (pWVar10 != (LPCWSTR)0x0) {
            if (pWVar10 != (LPCWSTR)PTR_DAT_1403200a0) {
              iVar11 = *(int *)(pWVar10 + -4);
            }
            goto LAB_1401a60f1;
          }
        }
        FUN_140156770(piVar7 + 2,pWVar9,iVar11);
        FUN_14004f990(&local_res8);
        local_res8 = (LPCWSTR)(piVar7 + 2);
      }
    }
  }
  FUN_14004f670(&local_res8);
  pWVar10 = local_res8;
  pWVar9 = local_res8;
  if (local_res8 == (LPCWSTR)0x0) {
    pWVar9 = (LPCWSTR)PTR_DAT_1403200a0;
  }
  FUN_140156770(pWVar9,L"**ErrorReport** ",iVar5);
  pWVar9 = pWVar10;
  if (pWVar10 == (LPCWSTR)0x0) {
    pWVar9 = (LPCWSTR)PTR_DAT_1403200a0;
  }
  iVar5 = FUN_140156740(pWVar9);
  iVar11 = 0;
  if (0 < iVar5) {
    iVar11 = iVar5;
  }
  iVar5 = 0;
  if ((pWVar10 != (LPCWSTR)0x0) && (pWVar10 != (LPCWSTR)PTR_DAT_1403200a0)) {
    iVar5 = *(int *)(pWVar10 + -4);
  }
  if ((iVar11 < iVar5) || (iVar11 = 0, pWVar10 == (LPCWSTR)0x0)) {
LAB_1401a6189:
    if (((pWVar10 != (LPCWSTR)PTR_DAT_1403200a0) && (pWVar10 != (LPCWSTR)0x0)) &&
       (pWVar10 + -4 != (LPCWSTR)0x0)) {
      *(int *)(pWVar10 + -4) = iVar11;
      pWVar10[iVar11] = L'\0';
    }
  }
  else if (pWVar10 != (LPCWSTR)PTR_DAT_1403200a0) {
    iVar11 = *(int *)(pWVar10 + -4);
    goto LAB_1401a6189;
  }
  FUN_14004cc50(&local_res8,param_2);
  FUN_14004f840(&local_res8,&DAT_140294c8c);
  pWVar10 = local_res8;
  pWVar9 = local_res8;
  if (local_res8 == (LPCWSTR)0x0) {
    pWVar9 = (LPCWSTR)PTR_DAT_1403200a0;
  }
  OutputDebugStringW(pWVar9);
  if (((pWVar10 != (LPCWSTR)0x0) && (pWVar10 != (LPCWSTR)PTR_DAT_1403200a0)) &&
     (pWVar10 + -4 != (LPCWSTR)0x0)) {
    uVar8 = FUN_1401568c0();
    FUN_140156b50(uVar8);
    pWVar9 = pWVar10 + -2;
    *(int *)pWVar9 = *(int *)pWVar9 + -1;
    if (*(int *)pWVar9 == 0) {
      FUN_140156970(pWVar10 + -4);
    }
    FUN_140156be0(uVar8);
  }
LAB_1401a6221:
  FUN_140156be0(piVar1);
  return;
}



void FUN_1401a6250(longlong param_1)

{
  longlong *plVar1;
  longlong lVar2;
  
  FUN_1401a5720();
  FUN_140182790(param_1 + 0x88);
  FUN_140156c00(param_1 + 0x30);
  FUN_140050520(param_1 + 0x20);
  *(undefined ***)(param_1 + 0x18) = Proud::IFastSocketDelegate::vftable;
  if ((*(longlong *)(param_1 + 0x10) != 0) &&
     (*(longlong *)(*(longlong *)(param_1 + 0x10) + 8) =
           *(longlong *)(*(longlong *)(param_1 + 0x10) + 8) + -1,
     *(longlong *)(*(longlong *)(param_1 + 0x10) + 8) == 0)) {
    plVar1 = *(longlong **)(param_1 + 0x10);
    lVar2 = *plVar1;
    if (lVar2 != 0) {
      FUN_1401859b0(lVar2);
      FUN_140156970(lVar2);
    }
    FUN_140156970(plVar1);
  }
  FUN_14004f990(param_1 + 8);
  return;
}



undefined8 * FUN_1401a6310(undefined8 *param_1,undefined8 param_2,undefined8 param_3)

{
  FUN_1401568c0();
  *param_1 = PTR_DAT_140320098;
  FUN_140050450(param_1,param_2);
  FUN_140158d30(param_1,param_3);
  return param_1;
}



void FUN_1401a6380(undefined4 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined *puVar2;
  longlong *plVar3;
  char cVar4;
  longlong lVar5;
  longlong *local_res8;
  undefined8 local_res10;
  undefined8 local_res18;
  undefined8 uVar6;
  
  uVar6 = 0xfffffffffffffffe;
  puVar2 = *(undefined **)(param_1 + 2);
  if (((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) &&
     (*(int *)(puVar2 + -8) != 0)) {
    local_res8 = (longlong *)FUN_140156940(0x400);
    if (local_res8 == (longlong *)0x0) {
      lVar5 = 0;
    }
    else {
      lVar5 = FUN_140185b00(local_res8,0,param_1 + 6,param_4,uVar6);
    }
    if (lVar5 == 0) {
      local_res8 = (longlong *)0x0;
    }
    else {
      local_res8 = (longlong *)FUN_140156940(0x10);
      local_res8[1] = 1;
      *local_res8 = lVar5;
    }
    plVar1 = local_res8;
    FUN_140161a50(param_1 + 4,&local_res8);
    plVar3 = local_res8;
    if (plVar1 != (longlong *)0x0) {
      plVar1 = plVar1 + 1;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        lVar5 = *local_res8;
        if (lVar5 != 0) {
          FUN_1401859b0(lVar5);
          FUN_140156970(lVar5);
        }
        FUN_140156970(plVar3);
      }
    }
    if (*(undefined8 **)(param_1 + 4) == (undefined8 *)0x0) {
      uVar6 = 0;
    }
    else {
      uVar6 = **(undefined8 **)(param_1 + 4);
    }
    cVar4 = FUN_140187680(uVar6);
    if (cVar4 == '\0') {
      local_res10 = 0;
      FUN_140161a50(param_1 + 4,&local_res10);
      *param_1 = 3;
    }
    else {
      if (*(undefined8 **)(param_1 + 4) == (undefined8 *)0x0) {
        uVar6 = 0;
      }
      else {
        uVar6 = **(undefined8 **)(param_1 + 4);
      }
      FUN_140184da0(uVar6,0);
      cVar4 = FUN_1401a5eb0(param_1);
      if (cVar4 == '\0') {
        local_res18 = 0;
        FUN_140161a50(param_1 + 4,&local_res18);
        *param_1 = 3;
      }
      else {
        *param_1 = 1;
      }
    }
  }
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401a64f0(undefined4 *param_1)

{
  longlong *plVar1;
  undefined *puVar2;
  int *piVar3;
  undefined4 *puVar4;
  undefined4 *puVar5;
  undefined1 *puVar6;
  char cVar7;
  errno_t eVar8;
  uint uVar9;
  uint uVar10;
  uint *puVar11;
  uint *puVar12;
  undefined8 uVar13;
  uint uVar14;
  ulonglong uVar15;
  undefined *puVar16;
  uint *puVar17;
  uint *puVar18;
  uint uVar19;
  ulonglong uVar20;
  uint uVar21;
  uint uVar22;
  undefined1 auStack_2c58 [32];
  uint *local_2c38;
  uint *local_2c30;
  undefined8 local_2c28;
  undefined1 local_2c20;
  undefined *local_2c18;
  undefined *local_2c10;
  int local_2c08 [2];
  undefined *local_2c00;
  undefined4 *local_2bf8;
  undefined8 local_2bf0;
  undefined1 *local_2be8;
  undefined1 local_2be0 [136];
  undefined1 *local_2b58;
  undefined1 local_2b50 [136];
  undefined1 local_2ac8 [1568];
  wchar_t local_24a8 [548];
  undefined1 local_2060 [8196];
  undefined2 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  ulonglong local_38;
  undefined8 local_30;
  
  local_30 = 0x1401a650c;
  local_2bf0 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_2c58;
  local_2bf8 = param_1;
  FUN_140184e20(local_2ac8);
  plVar1 = (longlong *)(param_1 + 4);
  uVar20 = 0;
  uVar22 = 0;
  uVar15 = uVar20;
  if ((ulonglong *)*plVar1 != (ulonglong *)0x0) {
    uVar15 = *(ulonglong *)*plVar1;
  }
  FUN_140184e40(local_2ac8,uVar15);
  uVar15 = uVar20;
  if ((ulonglong *)*plVar1 != (ulonglong *)0x0) {
    uVar15 = *(ulonglong *)*plVar1;
  }
  FUN_140184ea0(local_2ac8,uVar15);
  FUN_140184f00(local_2ac8,0);
  uVar15 = uVar20;
  if ((ulonglong *)*plVar1 != (ulonglong *)0x0) {
    uVar15 = *(ulonglong *)*plVar1;
  }
  cVar7 = FUN_140184f60(local_2ac8,uVar15,local_2c08);
  if (cVar7 == '\0') {
    return;
  }
  uVar19 = 0;
  if (local_2c08[0] != 0) {
    cVar7 = FUN_1401a5eb0(param_1);
    if (cVar7 != '\0') {
      return;
    }
    local_2c18 = (undefined *)0x0;
    FUN_140161a50(plVar1,&local_2c18);
    *param_1 = 3;
    return;
  }
  uVar15 = uVar20;
  if ((ulonglong *)*plVar1 != (ulonglong *)0x0) {
    uVar15 = *(ulonglong *)*plVar1;
  }
  FUN_140184da0(uVar15,1);
  param_1[10] = 0;
  FUN_1401a5680(local_24a8);
  local_58 = 2;
  local_54 = 4;
  local_5c = 0x50;
  eVar8 = wcsncpy_s(local_24a8,0x21,L"http",4);
  if (eVar8 != 0) {
    if (eVar8 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar8 == 0x16) || (eVar8 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar8 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  puVar16 = *(undefined **)(param_1 + 2);
  if (*(undefined **)(param_1 + 2) == (undefined *)0x0) {
    puVar16 = PTR_DAT_1403200a0;
  }
  FUN_1401a55d0(local_24a8,puVar16);
  FUN_1401a5b80(local_24a8,0);
  FUN_14004ce80(param_1 + 2,&DAT_140288b80);
  puVar16 = PTR_s_GET__PNReport_ReportError_php_Te_1403216e8;
  FUN_1401568c0();
  puVar18 = (uint *)PTR_DAT_140320098;
  local_2c30 = (uint *)PTR_DAT_140320098;
  uVar9 = FUN_1401567e0(puVar16);
  uVar15 = uVar20;
  if ((puVar18 != (uint *)0x0) && (uVar15 = 0, puVar18 != (uint *)PTR_DAT_140320098)) {
    uVar15 = (ulonglong)*(uint *)((longlong)puVar18 + -8);
  }
  uVar10 = uVar9;
  if ((((int)uVar9 <= (int)uVar15) && (uVar10 = uVar19, puVar18 != (uint *)0x0)) &&
     (puVar18 != (uint *)PTR_DAT_140320098)) {
    uVar10 = *(uint *)((longlong)puVar18 + -8);
  }
  uVar21 = 1;
  if (1 < (int)uVar10) {
    uVar21 = uVar10;
  }
  uVar10 = uVar19;
  if ((puVar18 != (uint *)0x0) && (puVar18 != (uint *)PTR_DAT_140320098)) {
    uVar10 = *(uint *)((longlong)puVar18 + -8);
  }
  uVar14 = 0;
  if ((int)uVar10 < (int)uVar21) {
    if (puVar18 == (uint *)0x0) {
      puVar18 = (uint *)PTR_DAT_140320098;
    }
    local_2c30 = puVar18;
    if ((int)uVar21 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar21 == 0) {
      FUN_140050520(&local_2c30);
    }
    else {
      uVar10 = uVar19;
      if ((puVar18 != (uint *)0x0) && (puVar18 != (uint *)PTR_DAT_140320098)) {
        uVar10 = puVar18[-2];
      }
      if (uVar21 != uVar10) {
        puVar11 = (uint *)FUN_140156940((longlong)(int)uVar21 + 9);
        if (puVar11 != (uint *)0x0) {
          *puVar11 = 0;
          puVar11[1] = 1;
        }
        *puVar11 = uVar21;
        uVar10 = uVar14;
        if ((puVar18 != (uint *)0x0) && (puVar18 != (uint *)PTR_DAT_140320098)) {
          uVar10 = puVar18[-2];
        }
        puVar12 = (uint *)PTR_DAT_140320098;
        if ((int)uVar21 < (int)uVar10) {
LAB_1401a6790:
          if (puVar18 != (uint *)0x0) {
            puVar12 = puVar18;
          }
        }
        else {
          uVar21 = uVar19;
          if (puVar18 != (uint *)0x0) {
            if (puVar18 != (uint *)PTR_DAT_140320098) {
              uVar21 = puVar18[-2];
            }
            goto LAB_1401a6790;
          }
        }
        FUN_140156810(puVar11 + 2,puVar12,uVar21);
        FUN_140050520(&local_2c30);
        local_2c30 = puVar11 + 2;
      }
    }
  }
  FUN_1401242e0(&local_2c30);
  puVar18 = local_2c30;
  puVar11 = local_2c30;
  if (local_2c30 == (uint *)0x0) {
    puVar11 = (uint *)PTR_DAT_140320098;
  }
  FUN_140156810(puVar11,puVar16,uVar9);
  puVar11 = puVar18;
  if (puVar18 == (uint *)0x0) {
    puVar11 = (uint *)PTR_DAT_140320098;
  }
  uVar10 = FUN_1401567e0(puVar11);
  uVar9 = uVar22;
  if (0 < (int)uVar10) {
    uVar9 = uVar10;
  }
  uVar10 = uVar14;
  if ((puVar18 != (uint *)0x0) && (puVar18 != (uint *)PTR_DAT_140320098)) {
    uVar10 = puVar18[-2];
  }
  if (((int)uVar9 < (int)uVar10) || (uVar9 = uVar14, puVar18 == (uint *)0x0)) {
LAB_1401a6821:
    if (((puVar18 != (uint *)PTR_DAT_140320098) && (puVar18 != (uint *)0x0)) &&
       (puVar11 = puVar18 + -2, puVar11 != (uint *)0x0)) {
      *puVar11 = uVar9;
      *(undefined1 *)((longlong)(int)uVar9 + 8 + (longlong)puVar11) = 0;
    }
  }
  else if (puVar18 != (uint *)PTR_DAT_140320098) {
    uVar9 = puVar18[-2];
    goto LAB_1401a6821;
  }
  local_2be8 = local_2be0;
  FUN_140153e40(&local_2be8,local_2060,3);
  puVar6 = local_2be8;
  FUN_1401568c0();
  puVar11 = (uint *)PTR_DAT_140320098;
  local_2c38 = (uint *)PTR_DAT_140320098;
  uVar9 = FUN_1401567e0(puVar6);
  uVar15 = uVar20;
  if ((puVar11 != (uint *)0x0) && (uVar15 = 0, puVar11 != (uint *)PTR_DAT_140320098)) {
    uVar15 = (ulonglong)*(uint *)((longlong)puVar11 + -8);
  }
  uVar10 = uVar9;
  if ((((int)uVar9 <= (int)uVar15) && (uVar10 = uVar14, puVar11 != (uint *)0x0)) &&
     (uVar10 = uVar22, puVar11 != (uint *)PTR_DAT_140320098)) {
    uVar10 = *(uint *)((longlong)puVar11 + -8);
  }
  uVar21 = 1;
  if (1 < (int)uVar10) {
    uVar21 = uVar10;
  }
  uVar10 = uVar22;
  if ((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_140320098)) {
    uVar10 = *(uint *)((longlong)puVar11 + -8);
  }
  if ((int)uVar10 < (int)uVar21) {
    if (puVar11 == (uint *)0x0) {
      puVar11 = (uint *)PTR_DAT_140320098;
    }
    local_2c38 = puVar11;
    if ((int)uVar21 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar21 == 0) {
      FUN_140050520(&local_2c38);
    }
    else {
      uVar10 = uVar14;
      if ((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_140320098)) {
        uVar10 = puVar11[-2];
      }
      if (uVar21 != uVar10) {
        puVar12 = (uint *)FUN_140156940((longlong)(int)uVar21 + 9);
        if (puVar12 != (uint *)0x0) {
          *puVar12 = 0;
          puVar12[1] = 1;
        }
        *puVar12 = uVar21;
        if ((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_140320098)) {
          uVar14 = puVar11[-2];
        }
        puVar17 = (uint *)PTR_DAT_140320098;
        if ((int)uVar21 < (int)uVar14) {
LAB_1401a6954:
          if (puVar11 != (uint *)0x0) {
            puVar17 = puVar11;
          }
        }
        else {
          uVar21 = uVar19;
          if (puVar11 != (uint *)0x0) {
            if (puVar11 != (uint *)PTR_DAT_140320098) {
              uVar21 = puVar11[-2];
            }
            goto LAB_1401a6954;
          }
        }
        FUN_140156810(puVar12 + 2,puVar17,uVar21);
        FUN_140050520(&local_2c38);
        local_2c38 = puVar12 + 2;
      }
    }
  }
  FUN_1401242e0(&local_2c38);
  puVar11 = local_2c38;
  puVar12 = local_2c38;
  if (local_2c38 == (uint *)0x0) {
    puVar12 = (uint *)PTR_DAT_140320098;
  }
  FUN_140156810(puVar12,puVar6,uVar9);
  puVar12 = puVar11;
  if (puVar11 == (uint *)0x0) {
    puVar12 = (uint *)PTR_DAT_140320098;
  }
  uVar9 = FUN_1401567e0(puVar12);
  uVar19 = uVar22;
  if (0 < (int)uVar9) {
    uVar19 = uVar9;
  }
  uVar9 = uVar22;
  if ((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_140320098)) {
    uVar9 = puVar11[-2];
  }
  if (((int)uVar9 <= (int)uVar19) && (uVar19 = uVar22, puVar11 != (uint *)0x0)) {
    if (puVar11 == (uint *)PTR_DAT_140320098) goto LAB_1401a6a02;
    uVar19 = puVar11[-2];
  }
  if (((puVar11 != (uint *)PTR_DAT_140320098) && (puVar11 != (uint *)0x0)) &&
     (puVar12 = puVar11 + -2, puVar12 != (uint *)0x0)) {
    *puVar12 = uVar19;
    *(undefined1 *)((longlong)(int)uVar19 + 8 + (longlong)puVar12) = 0;
  }
LAB_1401a6a02:
  if (local_2be8 != local_2be0) {
    free(local_2be8);
  }
  FUN_1401568c0();
  local_2c10 = PTR_DAT_140320098;
  local_2b58 = local_2b50;
  FUN_140153e40(&local_2b58,PTR_u_www_nettention_co_kr_1403216d8,3);
  FUN_1401592d0(&local_2c10,PTR_s_HTTP_1_1_User_Agent__Mozilla_5_0_1403216f0,local_2b58);
  if (local_2b58 != local_2b50) {
    free(local_2b58);
  }
  uVar13 = FUN_1401a6310(&local_2c18,&local_2c30,&local_2c38);
  uVar13 = FUN_1401a6310(&local_2c00,uVar13,&local_2c10);
  puVar4 = local_2bf8;
  FUN_140050450(local_2bf8 + 8,uVar13);
  if (((local_2c00 != (undefined *)0x0) && (local_2c00 != PTR_DAT_140320098)) &&
     (local_2c00 + -8 != (undefined *)0x0)) {
    uVar13 = FUN_1401568c0();
    local_2c28 = uVar13;
    FUN_140156b50(uVar13);
    local_2c20 = 1;
    piVar3 = (int *)(local_2c00 + -4);
    *piVar3 = *piVar3 + -1;
    if (*piVar3 == 0) {
      FUN_140156970(local_2c00 + -8);
    }
    FUN_140156be0(uVar13);
  }
  local_2c00 = PTR_DAT_140320098;
  if (((local_2c18 != (undefined *)0x0) && (local_2c18 != PTR_DAT_140320098)) &&
     (local_2c18 + -8 != (undefined *)0x0)) {
    uVar13 = FUN_1401568c0();
    local_2c28 = uVar13;
    FUN_140156b50(uVar13);
    local_2c20 = 1;
    piVar3 = (int *)(local_2c18 + -4);
    *piVar3 = *piVar3 + -1;
    if (*piVar3 == 0) {
      FUN_140156970(local_2c18 + -8);
    }
    FUN_140156be0(uVar13);
  }
  puVar5 = local_2bf8;
  puVar16 = *(undefined **)(puVar4 + 8);
  if ((puVar16 != (undefined *)0x0) && (puVar16 != PTR_DAT_140320098)) {
    uVar22 = *(uint *)(puVar16 + -8);
  }
  if (puVar16 == (undefined *)0x0) {
    puVar16 = PTR_DAT_140320098;
  }
  if ((ulonglong *)*plVar1 != (ulonglong *)0x0) {
    uVar20 = *(ulonglong *)*plVar1;
  }
  FUN_140186760(uVar20,puVar16 + (int)local_2bf8[10],(uVar22 - local_2bf8[10]) + 1);
  puVar16 = local_2c10;
  *puVar5 = 2;
  if (((local_2c10 != (undefined *)0x0) && (local_2c10 != PTR_DAT_140320098)) &&
     (puVar2 = local_2c10 + -8, puVar2 != (undefined *)0x0)) {
    uVar13 = FUN_1401568c0();
    local_2c28 = uVar13;
    FUN_140156b50(uVar13);
    local_2c20 = 1;
    piVar3 = (int *)(puVar16 + -4);
    *piVar3 = *piVar3 + -1;
    if (*piVar3 == 0) {
      FUN_140156970(puVar2);
    }
    FUN_140156be0(uVar13);
  }
  if (((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_140320098)) &&
     (puVar11 + -2 != (uint *)0x0)) {
    uVar13 = FUN_1401568c0();
    local_2c28 = uVar13;
    FUN_140156b50(uVar13);
    local_2c20 = 1;
    puVar12 = puVar11 + -1;
    *puVar12 = *puVar12 - 1;
    if (*puVar12 == 0) {
      FUN_140156970(puVar11 + -2);
    }
    FUN_140156be0(uVar13);
  }
  if (((puVar18 != (uint *)0x0) && (puVar18 != (uint *)PTR_DAT_140320098)) &&
     (puVar18 + -2 != (uint *)0x0)) {
    uVar13 = FUN_1401568c0();
    local_2c28 = uVar13;
    FUN_140156b50(uVar13);
    local_2c20 = 1;
    puVar11 = puVar18 + -1;
    *puVar11 = *puVar11 - 1;
    if (*puVar11 == 0) {
      FUN_140156970(puVar18 + -2);
    }
    FUN_140156be0(uVar13);
  }
  return;
}



void FUN_1401a6cd0(undefined4 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined *puVar1;
  char cVar2;
  undefined8 uVar3;
  int iVar4;
  undefined8 local_res8;
  undefined8 local_30;
  undefined **local_28;
  undefined4 local_20;
  undefined2 local_1c;
  int local_18;
  
  local_28 = Proud::AddrPort::vftable;
  uVar3 = 0;
  iVar4 = 0;
  local_18 = 0;
  local_30 = 0;
  local_20 = DAT_140320450;
  local_1c = DAT_140320454;
  if (*(undefined8 **)(param_1 + 4) != (undefined8 *)0x0) {
    uVar3 = **(undefined8 **)(param_1 + 4);
  }
  cVar2 = FUN_1401854f0(uVar3,0,&local_30,param_4,0xfffffffffffffffe);
  if (cVar2 != '\0') {
    if ((local_30._4_4_ == 0) && (local_18 != 0)) {
      param_1[10] = param_1[10] + local_18;
      puVar1 = *(undefined **)(param_1 + 8);
      if (puVar1 != (undefined *)0x0) {
        if (puVar1 == PTR_DAT_140320098) {
          iVar4 = 0;
        }
        else {
          iVar4 = *(int *)(puVar1 + -8);
        }
      }
      if ((int)param_1[10] < iVar4 + 1) {
        FUN_1401a58e0(param_1);
      }
      else {
        *param_1 = 3;
        local_res8 = 0;
        FUN_140161a50(param_1 + 4,&local_res8);
      }
    }
    else {
      *param_1 = 3;
      local_res8 = 0;
      FUN_140161a50(param_1 + 4,&local_res8);
    }
  }
  return;
}



void FUN_1401a6dc0(int *param_1)

{
  int iVar1;
  
  FUN_140156b50(param_1 + 0xc);
  iVar1 = *param_1;
  if (iVar1 == 0) {
    FUN_1401a6380(param_1);
  }
  else if (iVar1 == 1) {
    FUN_1401a64f0(param_1);
  }
  else if (iVar1 == 2) {
    FUN_1401a6cd0(param_1);
  }
  FUN_140156be0(param_1 + 0xc);
  return;
}



void FUN_1401a6e40(longlong param_1)

{
  char cVar1;
  DWORD DVar2;
  
  DVar2 = GetCurrentThreadId();
  FUN_1401ac7d0(DVar2,"ErrReporter");
  cVar1 = *(char *)(param_1 + 0x80);
  while (cVar1 == '\0') {
    FUN_1401a6dc0(param_1);
    Sleep(5);
    cVar1 = *(char *)(param_1 + 0x80);
  }
  return;
}



undefined8 *
FUN_1401a6e90(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  FUN_1401568c0();
  param_1[1] = PTR_DAT_1403200a0;
  param_1[2] = 0;
  param_1[3] = Proud::CReportSocketDg::vftable;
  FUN_1401568c0();
  param_1[4] = PTR_DAT_140320098;
  uVar1 = FUN_14015a430();
  FUN_140156a70(param_1 + 6,uVar1,1,param_4,uVar2);
  FUN_140182680(param_1 + 0x11,FUN_1401a6e40,param_1);
  *param_1 = 3;
  *(undefined1 *)(param_1 + 0x10) = 0;
  FUN_140182870(param_1 + 0x11);
  return param_1;
}



undefined * FUN_1401a6f40(void)

{
  bool bVar1;
  char cVar2;
  
  bVar1 = false;
  cVar2 = FUN_140156bf0(&DAT_14032a148);
  if (cVar2 != '\0') {
    if (DAT_140321740 == '\0') {
      bVar1 = false;
    }
    else {
      bVar1 = true;
      FUN_140156b50(&DAT_14032a148);
    }
  }
  if ((DAT_14032a140 & 1) == 0) {
    DAT_14032a140 = DAT_14032a140 | 1;
    FUN_1401a6e90(&DAT_14032a080);
    atexit((_func_5014 *)&LAB_1402580f0);
  }
  DAT_140321740 = 0;
  if (bVar1) {
    FUN_140156be0(&DAT_14032a148);
  }
  return &DAT_14032a080;
}



void FUN_1401a7000(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  uVar1 = FUN_1401a6f40();
  FUN_1401a5f60(uVar1,param_1,param_3,param_4,uVar2);
  FUN_14004f990(param_1);
  return;
}



longlong FUN_1401a7040(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  uVar1 = FUN_14015a430();
  FUN_140156a70(param_1,uVar1,1,param_4,uVar2);
  FUN_1401ac7a0(param_1 + 0x48,1);
  FUN_1401ac7a0(param_1 + 0x50,1);
  *(undefined8 *)(param_1 + 0x38) = 0;
  *(undefined4 *)(param_1 + 0x40) = 0;
  return param_1;
}



void FUN_1401a70a0(longlong param_1)

{
  FUN_1401ac760(param_1 + 0x50);
  FUN_1401ac760(param_1 + 0x48);
  FUN_140156c00(param_1);
  return;
}



undefined4 FUN_1401a70e0(longlong param_1)

{
  undefined4 uVar1;
  
  while( true ) {
    FUN_140156b50(param_1);
    if (*(int *)(param_1 + 0x3c) < 1) break;
    FUN_140156be0(param_1);
    FUN_1401ac6b0(param_1 + 0x50);
  }
  *(int *)(param_1 + 0x38) = *(int *)(param_1 + 0x38) + 1;
  ResetEvent(*(HANDLE *)(param_1 + 0x48));
  uVar1 = *(undefined4 *)(param_1 + 0x38);
  FUN_140156be0(param_1);
  return uVar1;
}



void FUN_1401a7160(longlong param_1)

{
  FUN_140156b50();
  *(int *)(param_1 + 0x38) = *(int *)(param_1 + 0x38) + -1;
  if (*(int *)(param_1 + 0x38) < 1) {
    SetEvent(*(HANDLE *)(param_1 + 0x48));
  }
  FUN_140156be0(param_1);
  return;
}



void FUN_1401a7190(longlong param_1)

{
  undefined8 uVar1;
  longlong lVar2;
  longlong local_20;
  longlong local_18;
  
  uVar1 = 0xfffffffffffffffe;
  while( true ) {
    lVar2 = param_1;
    FUN_140156b50(param_1);
    if ((*(int *)(param_1 + 0x3c) < 1) && (*(int *)(param_1 + 0x38) < 1)) break;
    local_20 = param_1 + 0x48;
    local_18 = param_1 + 0x50;
    FUN_140156be0(param_1);
    FUN_1401ac6d0(&local_20,2,0xffffffff,1,uVar1,lVar2,0);
  }
  *(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + 1;
  ResetEvent(*(HANDLE *)(param_1 + 0x50));
  FUN_140156be0(param_1);
  return;
}



void FUN_1401a7220(longlong param_1)

{
  FUN_140156b50();
  *(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + -1;
  if (*(int *)(param_1 + 0x3c) < 1) {
    SetEvent(*(HANDLE *)(param_1 + 0x50));
  }
  FUN_140156be0(param_1);
  return;
}



void FUN_1401a7250(undefined8 *param_1)

{
  if (*(char *)(param_1 + 1) != '\0') {
    FUN_1401a7160(*param_1);
    *(undefined1 *)(param_1 + 1) = 0;
  }
  return;
}



void FUN_1401a7280(undefined8 *param_1)

{
  if (*(char *)(param_1 + 1) != '\0') {
    FUN_1401a7220(*param_1);
    *(undefined1 *)(param_1 + 1) = 0;
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401a72b0(longlong param_1)

{
  longlong lVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  undefined *puVar6;
  int *piVar7;
  uint uVar8;
  ulonglong uVar9;
  int iVar10;
  double dVar11;
  undefined1 auStack_ab8 [32];
  undefined *local_a98;
  undefined *local_a90;
  longlong local_a88;
  undefined1 local_a80;
  int local_a7c;
  longlong local_a78;
  undefined1 local_a70;
  undefined8 local_a68;
  undefined1 local_a58 [2592];
  ulonglong local_38;
  
  local_a68 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_ab8;
  FUN_140187aa0(local_a58);
  FUN_140187bc0(local_a58);
  if (*(char *)(param_1 + 0x1040) == '\0') {
    do {
      dVar11 = (double)FUN_1401a4ac0(local_a58);
      lVar1 = param_1 + 0x28;
      iVar10 = 0;
      iVar5 = 0;
      if (dVar11 <= 0.9) {
        local_a88 = lVar1;
        local_a7c = FUN_1401a70e0(lVar1);
        local_a80 = 1;
        piVar7 = (int *)(param_1 + 0x80);
        iVar10 = *piVar7;
        uVar9 = 0;
        do {
          if (iVar10 != *piVar7) {
            FUN_1401568c0();
            local_a98 = PTR_DAT_1403200a0;
            iVar4 = FUN_140156740(&DAT_14026da70);
            iVar10 = iVar5;
            if ((local_a98 != (undefined *)0x0) && (local_a98 != PTR_DAT_1403200a0)) {
              iVar10 = *(int *)(local_a98 + -8);
            }
            iVar2 = iVar4;
            if (((iVar4 <= iVar10) && (iVar2 = iVar5, local_a98 != (undefined *)0x0)) &&
               (local_a98 != PTR_DAT_1403200a0)) {
              iVar2 = *(int *)(local_a98 + -8);
            }
            iVar10 = 1;
            if (1 < iVar2) {
              iVar10 = iVar2;
            }
            iVar2 = iVar5;
            if ((local_a98 != (undefined *)0x0) && (local_a98 != PTR_DAT_1403200a0)) {
              iVar2 = *(int *)(local_a98 + -8);
            }
            if (iVar2 < iVar10) {
              FUN_14004f590(&local_a98);
            }
            FUN_14004f670(&local_a98);
            puVar6 = local_a98;
            if (local_a98 == (undefined *)0x0) {
              puVar6 = PTR_DAT_1403200a0;
            }
            FUN_140156770(puVar6,&DAT_14026da70,iVar4);
            puVar6 = local_a98;
            if (local_a98 == (undefined *)0x0) {
              puVar6 = PTR_DAT_1403200a0;
            }
            iVar4 = FUN_140156740(puVar6);
            iVar10 = 0;
            if (0 < iVar4) {
              iVar10 = iVar4;
            }
            iVar4 = iVar5;
            if ((local_a98 != (undefined *)0x0) && (local_a98 != PTR_DAT_1403200a0)) {
              iVar4 = *(int *)(local_a98 + -8);
            }
            if ((iVar10 < iVar4) || (iVar10 = iVar5, local_a98 == (undefined *)0x0)) {
LAB_1401a761e:
              if (((local_a98 != PTR_DAT_1403200a0) && (local_a98 != (undefined *)0x0)) &&
                 ((int *)(local_a98 + -8) != (int *)0x0)) {
                *(int *)(local_a98 + -8) = iVar10;
                *(undefined2 *)(local_a98 + (longlong)iVar10 * 2) = 0;
              }
            }
            else if (local_a98 != PTR_DAT_1403200a0) {
              iVar10 = *(int *)(local_a98 + -8);
              goto LAB_1401a761e;
            }
            FUN_14017cb90(*(undefined8 *)(param_1 + 0x1088),&local_a98);
            *(undefined1 *)(param_1 + 0x1040) = 1;
            FUN_1401a7160(lVar1);
            goto LAB_1401a765f;
          }
          uVar9 = uVar9 + 1;
          piVar7 = piVar7 + 1;
        } while ((longlong)uVar9 < 1000);
        if (1 < local_a7c) {
          *(undefined1 *)(param_1 + 0x1080) = 1;
        }
        FUN_1401a7160(lVar1);
        local_a80 = 0;
      }
      else {
        local_a78 = lVar1;
        FUN_1401a7190();
        local_a70 = 1;
        piVar7 = (int *)(param_1 + 0x80);
        iVar4 = *piVar7;
        uVar9 = 0;
        do {
          iVar2 = *piVar7;
          *piVar7 = iVar2 + 1;
          if (iVar4 + 1 != iVar2 + 1) {
            FUN_1401568c0();
            local_a90 = PTR_DAT_1403200a0;
            iVar2 = FUN_140156740(&DAT_14026dae0);
            iVar4 = iVar10;
            if ((local_a90 != (undefined *)0x0) && (local_a90 != PTR_DAT_1403200a0)) {
              iVar4 = *(int *)(local_a90 + -8);
            }
            iVar3 = iVar2;
            if (((iVar2 <= iVar4) && (iVar3 = iVar10, local_a90 != (undefined *)0x0)) &&
               (local_a90 != PTR_DAT_1403200a0)) {
              iVar3 = *(int *)(local_a90 + -8);
            }
            iVar10 = 1;
            if (1 < iVar3) {
              iVar10 = iVar3;
            }
            iVar4 = iVar5;
            if ((local_a90 != (undefined *)0x0) && (local_a90 != PTR_DAT_1403200a0)) {
              iVar4 = *(int *)(local_a90 + -8);
            }
            if (iVar4 < iVar10) {
              FUN_14004f590(&local_a90);
            }
            FUN_14004f670(&local_a90);
            puVar6 = local_a90;
            if (local_a90 == (undefined *)0x0) {
              puVar6 = PTR_DAT_1403200a0;
            }
            FUN_140156770(puVar6,&DAT_14026dae0,iVar2);
            puVar6 = local_a90;
            if (local_a90 == (undefined *)0x0) {
              puVar6 = PTR_DAT_1403200a0;
            }
            iVar4 = FUN_140156740(puVar6);
            iVar10 = 0;
            if (0 < iVar4) {
              iVar10 = iVar4;
            }
            iVar4 = iVar5;
            if ((local_a90 != (undefined *)0x0) && (local_a90 != PTR_DAT_1403200a0)) {
              iVar4 = *(int *)(local_a90 + -8);
            }
            if ((iVar10 < iVar4) || (iVar10 = iVar5, local_a90 == (undefined *)0x0)) {
LAB_1401a74ed:
              if (((local_a90 != PTR_DAT_1403200a0) && (local_a90 != (undefined *)0x0)) &&
                 ((int *)(local_a90 + -8) != (int *)0x0)) {
                *(int *)(local_a90 + -8) = iVar10;
                *(undefined2 *)(local_a90 + (longlong)iVar10 * 2) = 0;
              }
            }
            else if (local_a90 != PTR_DAT_1403200a0) {
              iVar10 = *(int *)(local_a90 + -8);
              goto LAB_1401a74ed;
            }
            FUN_14017cb90(*(undefined8 *)(param_1 + 0x1088),&local_a90);
            *(undefined1 *)(param_1 + 0x1040) = 1;
            FUN_1401a7220(lVar1);
            goto LAB_1401a765f;
          }
          uVar8 = (int)uVar9 + 1;
          uVar9 = (ulonglong)uVar8;
          piVar7 = piVar7 + 1;
        } while ((int)uVar8 < 1000);
        FUN_1401a7220(lVar1);
        local_a70 = 0;
      }
      Sleep(0);
    } while (*(char *)(param_1 + 0x1040) == '\0');
  }
LAB_1401a765f:
  FUN_140187ae0(local_a58);
  return;
}



undefined8 * FUN_1401a76b0(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  FUN_1401a7040(param_1 + 5);
  *(undefined1 *)(param_1 + 0x210) = 0;
  *(undefined1 *)(param_1 + 0x208) = 0;
  memset(param_1 + 0x10,0,4000);
  return param_1;
}



// WARNING: Removing unreachable block (ram,0x0001401a77e0)
// WARNING: Removing unreachable block (ram,0x0001401a77e4)
// WARNING: Removing unreachable block (ram,0x0001401a7800)
// WARNING: Removing unreachable block (ram,0x0001401a782d)

void FUN_1401a7720(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  char cVar2;
  void *pvVar3;
  undefined8 *puVar4;
  longlong *plVar5;
  int iVar6;
  int iVar7;
  longlong lVar8;
  undefined *puVar9;
  int iVar10;
  longlong lVar11;
  int *piVar12;
  int iVar13;
  undefined *local_res10;
  longlong *local_res18 [2];
  undefined8 uVar14;
  
  uVar14 = 0xfffffffffffffffe;
  iVar13 = 0;
  do {
    lVar8 = 0;
    local_res18[0] = operator_new(0x28);
    if (local_res18[0] != (longlong *)0x0) {
      lVar8 = FUN_140182680(local_res18[0],&LAB_1401a76a0,param_1,param_4,uVar14);
    }
    if (lVar8 == 0) {
      local_res18[0] = (longlong *)0x0;
    }
    else {
      local_res18[0] = (longlong *)FUN_140156940(0x10);
      local_res18[0][1] = 1;
      *local_res18[0] = lVar8;
    }
    plVar1 = local_res18[0];
    iVar10 = *(int *)(param_1 + 0x18);
    if (iVar10 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_140191870(param_1,iVar10 + 1);
    lVar11 = 0;
    lVar8 = FUN_1401a7bb0(param_1);
    FUN_14018da90(lVar8 + (longlong)iVar10 * 8,local_res18);
    plVar5 = local_res18[0];
    if (plVar1 != (longlong *)0x0) {
      plVar1 = plVar1 + 1;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        pvVar3 = (void *)*local_res18[0];
        if (pvVar3 != (void *)0x0) {
          FUN_140182790(pvVar3);
          operator_delete(pvVar3);
        }
        FUN_140156970(plVar5);
      }
    }
    iVar13 = iVar13 + 1;
  } while (iVar13 < 10);
  iVar13 = 0;
  lVar8 = lVar11;
  do {
    if ((lVar8 < 0) || (*(int *)(param_1 + 0x18) <= iVar13)) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    puVar4 = *(undefined8 **)(*(longlong *)(param_1 + 0x10) + lVar8 * 8);
    if (puVar4 == (undefined8 *)0x0) {
      uVar14 = 0;
    }
    else {
      uVar14 = *puVar4;
    }
    FUN_140182870(uVar14);
    iVar13 = iVar13 + 1;
    lVar8 = lVar8 + 1;
  } while (lVar8 < 10);
  Sleep(1000);
  cVar2 = *(char *)(param_1 + 0x1080);
  while (cVar2 == '\0') {
    Sleep(0x32);
    cVar2 = *(char *)(param_1 + 0x1080);
  }
  *(undefined1 *)(param_1 + 0x1040) = 1;
  iVar13 = 0;
  do {
    if ((lVar11 < 0) || (*(int *)(param_1 + 0x18) <= iVar13)) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    puVar4 = *(undefined8 **)(*(longlong *)(param_1 + 0x10) + lVar11 * 8);
    if (puVar4 == (undefined8 *)0x0) {
      uVar14 = 0;
    }
    else {
      uVar14 = *puVar4;
    }
    FUN_140182710(uVar14);
    iVar13 = iVar13 + 1;
    lVar11 = lVar11 + 1;
  } while (lVar11 < 10);
  piVar12 = (int *)(param_1 + 0x80);
  lVar8 = 999;
  do {
    if ((*(int *)(param_1 + 0x80) == 0) || (*piVar12 != piVar12[1])) {
      FUN_1401568c0();
      local_res10 = PTR_DAT_1403200a0;
      iVar6 = FUN_140156740(&DAT_14026dba0);
      iVar10 = 0;
      iVar13 = iVar10;
      if ((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) {
        iVar13 = *(int *)(local_res10 + -8);
      }
      iVar7 = iVar6;
      if (((iVar6 <= iVar13) && (iVar7 = 0, local_res10 != (undefined *)0x0)) &&
         (iVar7 = iVar10, local_res10 != PTR_DAT_1403200a0)) {
        iVar7 = *(int *)(local_res10 + -8);
      }
      iVar13 = 1;
      if (1 < iVar7) {
        iVar13 = iVar7;
      }
      iVar7 = iVar10;
      if ((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) {
        iVar7 = *(int *)(local_res10 + -8);
      }
      if (iVar7 < iVar13) {
        FUN_14004f590(&local_res10);
      }
      FUN_14004f670(&local_res10);
      puVar9 = local_res10;
      if (local_res10 == (undefined *)0x0) {
        puVar9 = PTR_DAT_1403200a0;
      }
      FUN_140156770(puVar9,&DAT_14026dba0,iVar6);
      puVar9 = local_res10;
      if (local_res10 == (undefined *)0x0) {
        puVar9 = PTR_DAT_1403200a0;
      }
      iVar6 = FUN_140156740(puVar9);
      iVar13 = 0;
      if (0 < iVar6) {
        iVar13 = iVar6;
      }
      if ((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) {
        iVar10 = *(int *)(local_res10 + -8);
      }
      if ((iVar13 < iVar10) || (iVar13 = 0, local_res10 == (undefined *)0x0)) {
LAB_1401a7a51:
        if (((local_res10 != PTR_DAT_1403200a0) && (local_res10 != (undefined *)0x0)) &&
           ((int *)(local_res10 + -8) != (int *)0x0)) {
          *(int *)(local_res10 + -8) = iVar13;
          *(undefined2 *)(local_res10 + (longlong)iVar13 * 2) = 0;
        }
      }
      else if (local_res10 != PTR_DAT_1403200a0) {
        iVar13 = *(int *)(local_res10 + -8);
        goto LAB_1401a7a51;
      }
      FUN_14017cb90(*(undefined8 *)(param_1 + 0x1088),&local_res10);
    }
    piVar12 = piVar12 + 1;
    lVar8 = lVar8 + -1;
    if (lVar8 == 0) {
      return;
    }
  } while( true );
}



undefined8 * FUN_1401a7ac0(undefined8 *param_1)

{
  *param_1 = 0;
  *(undefined4 *)(param_1 + 1) = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  return param_1;
}



void FUN_1401a7ae0(longlong param_1,undefined8 param_2)

{
  FUN_1401cb7e0(param_1 + 0x48);
  FUN_1401cb950(param_1 + 0x60,param_2);
  FUN_1401cb900(param_1 + 0x38,param_2);
  FUN_1401cb860(param_1 + 0x58,*(undefined8 *)(param_1 + 0x60),*(undefined8 *)(param_1 + 0x38));
  return;
}



void FUN_1401a7b50(undefined8 param_1)

{
  FUN_140186bb0(param_1,DAT_140320c78);
  FUN_140186b50(param_1,DAT_140320c80);
  return;
}



void FUN_1401a7b80(undefined8 param_1)

{
  FUN_140186bb0(param_1,DAT_140320c7c);
  FUN_140186b50(param_1,DAT_140320c84);
  return;
}



undefined8 FUN_1401a7bb0(longlong param_1)

{
  if (*(int *)(param_1 + 0x18) == 0) {
    return 0;
  }
  return *(undefined8 *)(param_1 + 0x10);
}



undefined4 * FUN_1401a7bc0(undefined4 *param_1,undefined4 *param_2)

{
  longlong *plVar1;
  
  *param_1 = *param_2;
  param_1[1] = param_2[1];
  if (*(longlong *)(param_2 + 2) == *(longlong *)(param_1 + 2)) {
    param_1[7] = param_2[7];
    *(undefined8 *)(param_1 + 4) = *(undefined8 *)(param_2 + 4);
    param_1[6] = param_2[6];
  }
  else {
    FUN_1401560e0(param_1 + 2);
    if (*(longlong *)(param_2 + 2) != 0) {
      plVar1 = (longlong *)(*(longlong *)(param_2 + 2) + 0x28);
      *plVar1 = *plVar1 + 1;
      *(undefined8 *)(param_1 + 2) = *(undefined8 *)(param_2 + 2);
    }
  }
  *(undefined1 *)(param_1 + 8) = *(undefined1 *)(param_2 + 8);
  return param_1;
}



undefined2 * FUN_1401a7c40(longlong *param_1)

{
  longlong lVar1;
  undefined2 *puVar2;
  
  lVar1 = *param_1;
  if (lVar1 != 0) {
    *param_1 = *(longlong *)(lVar1 + 0x38);
    *(undefined8 *)(lVar1 + 0x38) = 0;
    return (undefined2 *)(lVar1 + 8);
  }
  puVar2 = (undefined2 *)FUN_140156940();
  if (puVar2 != (undefined2 *)0x0) {
    *(undefined8 *)(puVar2 + 8) = 0;
    *(undefined8 *)(puVar2 + 0xc) = 0;
    *(undefined8 *)(puVar2 + 0x10) = 0;
    *(undefined8 *)(puVar2 + 0x14) = 0;
    *(undefined8 *)(puVar2 + 0x18) = 0;
    *(undefined ***)(puVar2 + 4) = Proud::ByteArray::vftable;
    *(undefined8 *)(puVar2 + 0x1c) = 0;
    *puVar2 = 0x1de6;
    return puVar2 + 4;
  }
  return (undefined2 *)0x8;
}



void FUN_1401a7cc0(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  while (lVar1 != 0) {
    lVar1 = *param_1;
    *param_1 = *(longlong *)(lVar1 + 0x38);
    *(undefined8 *)(lVar1 + 0x38) = 0;
    FUN_1401858d0(lVar1 + 8);
    FUN_140156970(lVar1);
    lVar1 = *param_1;
  }
  return;
}



longlong FUN_1401a7d20(longlong *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong lVar3;
  longlong *plVar4;
  
  plVar1 = (longlong *)param_1[1];
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  lVar2 = *plVar1;
  lVar3 = plVar1[2];
  param_1[1] = lVar2;
  if (lVar2 == 0) {
    param_1[2] = 0;
  }
  else {
    *(undefined8 *)(lVar2 + 8) = 0;
  }
  plVar4 = (longlong *)*param_1;
  if (plVar4 != (longlong *)0x0) {
    (**(code **)(*plVar4 + 0x10))(plVar4,plVar1);
    param_1[3] = param_1[3] + -1;
    return lVar3;
  }
  FUN_140156970();
  param_1[3] = param_1[3] + -1;
  return lVar3;
}



void FUN_1401a7db0(longlong param_1,undefined8 param_2,undefined8 *param_3)

{
  longlong *plVar1;
  undefined8 uVar2;
  longlong lVar3;
  undefined8 *puVar4;
  
  lVar3 = FUN_1401a7c40();
  *(undefined8 *)(lVar3 + 0x28) = *param_3;
  thunk_FUN_140184540(param_2,lVar3);
  plVar1 = *(longlong **)(param_1 + 8);
  uVar2 = *(undefined8 *)(param_1 + 0x18);
  if (plVar1 == (longlong *)0x0) {
    puVar4 = (undefined8 *)FUN_140156940(0x18);
  }
  else {
    puVar4 = (undefined8 *)(**(code **)(*plVar1 + 8))(plVar1,0x18);
  }
  if (puVar4 != (undefined8 *)0x0) {
    puVar4[2] = lVar3;
  }
  puVar4[1] = uVar2;
  *puVar4 = 0;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  if (*(undefined8 **)(param_1 + 0x18) == (undefined8 *)0x0) {
    *(undefined8 **)(param_1 + 0x10) = puVar4;
  }
  else {
    **(undefined8 **)(param_1 + 0x18) = puVar4;
  }
  *(undefined8 **)(param_1 + 0x18) = puVar4;
  *(int *)(param_1 + 0x34) = *(int *)(param_1 + 0x34) + *(int *)(lVar3 + 0x18);
  return;
}



void FUN_1401a7e60(longlong param_1,longlong *param_2,int param_3)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  longlong *plVar4;
  undefined8 *puVar5;
  longlong lVar6;
  int iVar7;
  undefined4 uStack_24;
  
  if ((100 < (ulonglong)param_2[2]) && ((void *)*param_2 != (void *)0x0)) {
    operator_delete__((void *)*param_2);
    *param_2 = 0;
  }
  param_2[1] = 0;
  param_2[2] = 100;
  lVar2 = *(longlong *)(param_1 + 0x28);
  iVar7 = 0;
  if (lVar2 != 0) {
    if (*(int *)(lVar2 + 0x18) == 0) {
      lVar6 = 0;
    }
    else {
      lVar6 = *(longlong *)(lVar2 + 0x10);
    }
    iVar7 = *(int *)(lVar2 + 0x18) - *(int *)(param_1 + 0x30);
    FUN_14019f750(param_2,lVar6 + *(int *)(param_1 + 0x30),iVar7);
  }
  puVar5 = *(undefined8 **)(param_1 + 0x10);
  while( true ) {
    if ((puVar5 == (undefined8 *)0x0) || (param_3 <= iVar7)) {
      return;
    }
    if (puVar5 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    lVar2 = puVar5[2];
    iVar1 = *(int *)(lVar2 + 0x18);
    if (iVar1 == 0) {
      lVar6 = 0;
    }
    else {
      lVar6 = *(longlong *)(lVar2 + 0x10);
    }
    lVar3 = param_2[1];
    if (lVar3 < 0) break;
    FUN_14019e9f0(param_2,lVar3 + 1,0xffffffffffffffff);
    if (param_2[1] <= lVar3) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if ((ulonglong)param_2[2] < 0x65) {
      plVar4 = param_2 + (lVar3 + 2) * 2;
    }
    else {
      plVar4 = (longlong *)(lVar3 * 0x10 + *param_2);
    }
    *plVar4 = CONCAT44(uStack_24,iVar1);
    plVar4[1] = lVar6;
    iVar7 = iVar7 + *(int *)(lVar2 + 0x18);
    puVar5 = (undefined8 *)*puVar5;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_1401a7fb0(longlong *param_1,int param_2)

{
  longlong lVar1;
  int iVar2;
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 != 0) {
    lVar1 = param_1[5];
    if (lVar1 != 0) {
      iVar2 = (int)param_1[6] + param_2;
      if (iVar2 < *(int *)(lVar1 + 0x18)) {
        *(int *)((longlong)param_1 + 0x34) = *(int *)((longlong)param_1 + 0x34) - param_2;
        *(int *)(param_1 + 6) = iVar2;
        return;
      }
      iVar2 = *(int *)(lVar1 + 0x18) - (int)param_1[6];
      *(int *)((longlong)param_1 + 0x34) = *(int *)((longlong)param_1 + 0x34) - iVar2;
      param_2 = param_2 - iVar2;
      if ((*(short *)(lVar1 + -8) != 0x1de6) || (*(longlong *)(lVar1 + 0x30) != 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      *(longlong *)(lVar1 + 0x30) = *param_1;
      *param_1 = lVar1 + -8;
      param_1[5] = 0;
      *(undefined4 *)(param_1 + 6) = 0;
    }
    if (0 < param_2) {
      while (param_1[4] != 0) {
        lVar1 = FUN_1401a7d20(param_1 + 1);
        if (param_2 < *(int *)(lVar1 + 0x18)) {
          *(int *)((longlong)param_1 + 0x34) = *(int *)((longlong)param_1 + 0x34) - param_2;
          param_1[5] = lVar1;
          *(int *)(param_1 + 6) = param_2;
          return;
        }
        *(int *)((longlong)param_1 + 0x34) =
             *(int *)((longlong)param_1 + 0x34) - *(int *)(lVar1 + 0x18);
        param_2 = param_2 - *(int *)(lVar1 + 0x18);
        if ((*(short *)(lVar1 + -8) != 0x1de6) || (*(longlong *)(lVar1 + 0x30) != 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        *(longlong *)(lVar1 + 0x30) = *param_1;
        *param_1 = lVar1 + -8;
        if (param_2 < 1) {
          return;
        }
      }
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401a80b0(undefined8 param_1,longlong param_2,undefined8 param_3)

{
  int iVar1;
  undefined1 auStack_d28 [32];
  undefined8 local_d08;
  undefined1 local_d00 [72];
  undefined1 local_cb8 [3200];
  longlong local_38;
  int local_2c;
  ulonglong local_28;
  
  local_d08 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_d28;
  FUN_140050340(param_3,0x5713);
  iVar1 = FUN_1401843d0(param_1);
  FUN_140155b20(param_3,(longlong)iVar1);
  if (*(longlong *)(param_2 + 0xc80) == 0) {
    FUN_140156300(local_d00,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_d00,(ThrowInfo *)&DAT_14031d928);
  }
  if (*(int *)(param_2 + 0xc8c) < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  *(undefined4 *)(param_2 + 0xc88) = 0;
  FUN_1401570d0(local_cb8,param_3);
  FUN_140156ed0(param_2,local_cb8);
  if (local_38 == 0) {
    FUN_140156300(local_d00,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_d00,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_2c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_140156ed0(param_2,param_1);
  return;
}



undefined8 * FUN_1401a81d0(undefined8 *param_1)

{
  *param_1 = 0;
  param_1[1] = 0;
  param_1[4] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[7] = 0;
  param_1[8] = 0;
  FUN_1401cb800(param_1 + 9);
  FUN_1401cb8e0(param_1 + 0xb);
  param_1[0xd] = 0;
  param_1[0xe] = 0;
  param_1[0xc] = 0;
  param_1[0xf] = 0;
  param_1[6] = 0;
  FUN_1401f0c30(param_1 + 1);
  param_1[5] = 0;
  return param_1;
}



// WARNING: Removing unreachable block (ram,0x0001401a82c4)

void FUN_1401a8260(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  puVar4 = (undefined8 *)param_1[2];
  while( true ) {
    if (puVar4 == (undefined8 *)0x0) {
      lVar1 = param_1[4];
      while( true ) {
        if (lVar1 == 0) {
          param_1[2] = 0;
          param_1[3] = 0;
          puVar4 = (undefined8 *)param_1[1];
          if (puVar4 != (undefined8 *)0x0) {
            (**(code **)*puVar4)(puVar4,1);
          }
          lVar1 = *param_1;
          while (lVar1 != 0) {
            lVar1 = *param_1;
            *param_1 = *(longlong *)(lVar1 + 0x38);
            *(undefined8 *)(lVar1 + 0x38) = 0;
            FUN_1401858d0(lVar1 + 8);
            FUN_140156970(lVar1);
            lVar1 = *param_1;
          }
          return;
        }
        plVar2 = (longlong *)param_1[2];
        if (plVar2 == (longlong *)0x0) break;
        param_1[2] = *plVar2;
        plVar3 = (longlong *)param_1[1];
        if (plVar3 == (longlong *)0x0) {
          FUN_140156970();
        }
        else {
          (**(code **)(*plVar3 + 0x10))(plVar3,plVar2,plVar3,param_4,uVar5);
        }
        param_1[4] = param_1[4] + -1;
        lVar1 = param_1[4];
      }
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    lVar1 = puVar4[2];
    if ((*(short *)(lVar1 + -8) != 0x1de6) || (*(longlong *)(lVar1 + 0x30) != 0)) break;
    *(longlong *)(lVar1 + 0x30) = *param_1;
    *param_1 = lVar1 + -8;
    puVar4 = (undefined8 *)*puVar4;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_1401a8390(longlong param_1,int param_2,longlong param_3,int param_4)

{
  longlong lVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  undefined2 *puVar5;
  longlong lVar6;
  longlong lVar7;
  
  lVar2 = (longlong)param_4;
  if (((-1 < param_4) && (-1 < param_2)) && (param_2 <= *(int *)(param_1 + 0x18))) {
    iVar3 = *(int *)(param_1 + 0x18);
    FUN_140190d90(param_1,iVar3 + param_4);
    iVar3 = iVar3 - param_2;
    if ((0 < iVar3) && (iVar3 = iVar3 + -1, lVar6 = (longlong)iVar3, -1 < iVar3)) {
      lVar7 = (lVar6 + param_2 + lVar2) * 0x48;
      do {
        lVar1 = FUN_1401a7bb0(param_1);
        lVar4 = lVar2 * -0x48 + lVar1 + lVar7;
        lVar1 = FUN_1401a7bb0(param_1);
        lVar1 = lVar7 + lVar1;
        FUN_1401a7bc0(lVar1,lVar4);
        lVar7 = lVar7 + -0x48;
        lVar6 = lVar6 + -1;
        *(undefined4 *)(lVar1 + 0x28) = *(undefined4 *)(lVar4 + 0x28);
        *(undefined4 *)(lVar1 + 0x38) = *(undefined4 *)(lVar4 + 0x38);
        *(undefined2 *)(lVar1 + 0x3c) = *(undefined2 *)(lVar4 + 0x3c);
        *(undefined1 *)(lVar1 + 0x40) = *(undefined1 *)(lVar4 + 0x40);
      } while (-1 < lVar6);
    }
    if (0 < lVar2) {
      puVar5 = (undefined2 *)(param_3 + 0x3c);
      do {
        lVar6 = FUN_1401a7bb0(param_1);
        lVar6 = ((longlong)param_2 * 0x48 - param_3) + -0x3c + lVar6 + (longlong)puVar5;
        FUN_1401a7bc0(lVar6,puVar5 + -0x1e);
        lVar2 = lVar2 + -1;
        *(undefined4 *)(lVar6 + 0x28) = *(undefined4 *)(puVar5 + -10);
        *(undefined4 *)(lVar6 + 0x38) = *(undefined4 *)(puVar5 + -2);
        *(undefined2 *)(lVar6 + 0x3c) = *puVar5;
        *(undefined1 *)(lVar6 + 0x40) = *(undefined1 *)(puVar5 + 2);
        puVar5 = puVar5 + 0x24;
      } while (lVar2 != 0);
    }
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



ulonglong FUN_1401a84e0(undefined8 *param_1,undefined4 *param_2)

{
  char cVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  int iVar4;
  undefined4 uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  longlong *local_res8;
  ulonglong local_res10;
  undefined1 *local_res18;
  longlong local_138;
  ulonglong local_130;
  int local_128;
  int iStack_124;
  int local_120 [2];
  longlong local_118;
  longlong local_110;
  undefined4 local_108;
  int local_104;
  longlong local_f8;
  ulonglong local_f0;
  undefined8 local_e8;
  undefined1 local_d8 [8];
  undefined1 local_d0 [8];
  longlong local_c8;
  undefined4 local_c0;
  int local_bc;
  undefined4 local_b0;
  undefined **local_a8;
  undefined4 local_a0;
  undefined2 local_9c;
  undefined1 local_98;
  undefined8 local_88;
  undefined1 local_80 [72];
  
  local_88 = 0xfffffffffffffffe;
  uVar2 = 0;
  *param_2 = 0;
  if (*(int *)(param_1 + 1) == 0) {
    uVar2 = 0;
  }
  else {
    FUN_1401544a0(local_120);
    FUN_140154120(local_120,*param_1,*(undefined4 *)(param_1 + 1));
    FUN_140154600(local_120,*(undefined4 *)(param_1 + 1));
    FUN_1401540a0(local_120,0);
    uVar6 = uVar2;
    uVar7 = uVar2;
    while( true ) {
      local_128 = 0;
      iStack_124 = 0;
      local_130 = 0;
      local_138 = 0;
      cVar1 = FUN_1401543d0(local_120,&local_res8,2);
      uVar5 = (undefined4)uVar6;
      if (cVar1 == '\0') {
        *(undefined4 *)(param_1 + 4) = uVar5;
        FUN_1401560e0(&local_138);
        if (local_130 != 0) {
          if (iStack_124 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          local_128 = 0;
        }
        local_res8 = &local_118;
        FUN_1401560e0(&local_118);
        if (local_110 == 0) {
          return uVar7;
        }
        if (-1 < local_104) {
          return uVar7;
        }
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((short)local_res8 != 0x5713) break;
      cVar1 = FUN_140154a70(local_120,&local_res10);
      uVar6 = local_res10;
      if (cVar1 == '\0') {
        *(undefined4 *)(param_1 + 4) = uVar5;
        FUN_1401560e0(&local_138);
        if (local_130 != 0) {
          if (iStack_124 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          local_128 = 0;
        }
        local_res8 = &local_118;
        FUN_1401560e0(&local_118);
        if (local_110 == 0) {
          return uVar7;
        }
        if (-1 < local_104) {
          return uVar7;
        }
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      iVar4 = (int)local_res10;
      if (iVar4 < 0) {
        if (local_118 == 0) {
          if (local_110 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0();
          }
        }
        else {
          local_108 = *(undefined4 *)(local_118 + 0x18);
        }
        *(undefined4 *)(param_1 + 4) = local_108;
        *param_2 = 0x1f;
        FUN_1401560e0(&local_138);
        if (local_130 != 0) {
          if (iStack_124 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          local_128 = 0;
        }
        local_res8 = &local_118;
        FUN_1401560e0(&local_118);
        if ((local_110 != 0) && (local_104 < 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        goto LAB_1401a8a3b;
      }
      if (*(int *)((longlong)param_1 + 0x1c) < iVar4) {
        if (local_118 == 0) {
          if (local_110 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0();
          }
        }
        else {
          local_108 = *(undefined4 *)(local_118 + 0x18);
        }
        *(undefined4 *)(param_1 + 4) = local_108;
        *param_2 = 0x20;
        FUN_1401560e0(&local_138);
        if (local_130 != 0) {
          if (iStack_124 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          local_128 = 0;
        }
        local_res8 = &local_118;
        FUN_1401560e0(&local_118);
        if ((local_110 != 0) && (local_104 < 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        goto LAB_1401a8a3b;
      }
      cVar1 = FUN_140154430(local_120,local_res10 & 0xffffffff);
      if (cVar1 == '\0') {
        *(undefined4 *)(param_1 + 4) = uVar5;
        FUN_1401560e0(&local_138);
        if (local_130 != 0) {
          if (iStack_124 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          local_128 = 0;
        }
        local_res8 = &local_118;
        FUN_1401560e0(&local_118);
        if (local_110 == 0) {
          return uVar7;
        }
        if (-1 < local_104) {
          return uVar7;
        }
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (local_130 != 0) {
        FUN_140156300(local_80,PTR_u_Cannot_use_internal_buffer_becau_140320030);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_80,(ThrowInfo *)&DAT_14031d928);
      }
      if (local_138 == 0) {
        local_138 = FUN_140156120();
        *(undefined8 *)(local_138 + 0x28) = 1;
        if (local_130 == 0) goto LAB_1401a862c;
        if (iStack_124 < iVar4) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
      }
      else {
LAB_1401a862c:
        if (iVar4 < 1) {
          if (local_138 == 0) goto LAB_1401a87ea;
          uVar3 = 0;
        }
        else {
          if (local_138 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0();
          }
          uVar3 = uVar6 & 0xffffffff;
        }
        FUN_140050060(local_138,uVar3);
        iVar4 = local_128;
      }
      local_128 = iVar4;
      uVar3 = local_130;
      if (local_130 == 0) {
        if (local_138 == 0) {
LAB_1401a87ea:
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        uVar3 = uVar2;
        if (*(int *)(local_138 + 0x18) != 0) {
          uVar3 = *(ulonglong *)(local_138 + 0x10);
        }
      }
      cVar1 = FUN_1401543d0(local_120,uVar3,uVar6 & 0xffffffff);
      if (cVar1 == '\0') {
        *(undefined4 *)(param_1 + 4) = uVar5;
        FUN_1401560e0(&local_138);
        if (local_130 != 0) {
          if (iStack_124 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          local_128 = 0;
        }
        local_res8 = &local_118;
        FUN_1401560e0(&local_118);
        if (local_110 == 0) {
          return uVar7;
        }
        if (-1 < local_104) {
          return uVar7;
        }
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      FUN_1401544a0(local_d8);
      local_a8 = Proud::AddrPort::vftable;
      local_98 = 0;
      local_a0 = DAT_140320450;
      local_9c = DAT_140320454;
      local_b0 = *(undefined4 *)(param_1 + 3);
      local_e8 = 0;
      local_f0 = 0;
      if (local_138 == 0) {
        local_f8 = 0;
        local_f0 = local_130;
        local_e8 = CONCAT44(iStack_124,local_128);
      }
      else {
        *(longlong *)(local_138 + 0x28) = *(longlong *)(local_138 + 0x28) + 1;
        local_f8 = local_138;
      }
      FUN_140154570(local_d8,&local_f8);
      FUN_1401a8390(param_1[2],*(undefined4 *)(param_1[2] + 0x18),local_d8,1);
      uVar7 = (ulonglong)((int)uVar7 + 1);
      uVar6 = (ulonglong)(uint)((int)((local_120[0] >> 0x1f & 7U) + local_120[0]) >> 3);
      local_res18 = local_d0;
      FUN_1401560e0(local_d0);
      if (local_c8 != 0) {
        if (local_bc < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_c0 = 0;
      }
      FUN_1401560e0(&local_138);
      if ((local_130 != 0) && (iStack_124 < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
    }
    if (local_118 == 0) {
      if (local_110 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
    }
    else {
      local_108 = *(undefined4 *)(local_118 + 0x18);
    }
    *(undefined4 *)(param_1 + 4) = local_108;
    *param_2 = 0x1f;
    FUN_1401560e0(&local_138);
    if (local_130 != 0) {
      if (iStack_124 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_128 = 0;
    }
    local_res8 = &local_118;
    FUN_1401560e0(&local_118);
    if ((local_110 != 0) && (local_104 < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
LAB_1401a8a3b:
    uVar2 = 0xffffffff;
  }
  return uVar2;
}



undefined4
FUN_1401a8ac0(longlong param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4,
             undefined8 param_5)

{
  undefined4 uVar1;
  longlong local_38;
  undefined4 local_30;
  undefined8 local_28;
  undefined4 local_20;
  undefined4 local_1c;
  int local_18;
  
  local_38 = 0;
  local_18 = 0;
  if (*(int *)(param_1 + 0x20) != 0) {
    local_38 = *(longlong *)(param_1 + 0x18);
  }
  local_38 = local_38 + *(longlong *)(param_1 + 0x30);
  local_30 = *(undefined4 *)(param_1 + 0x38);
  local_28 = param_2;
  local_20 = param_3;
  local_1c = param_4;
  uVar1 = FUN_1401a84e0(&local_38,param_5);
  FUN_1401aebf0(param_1,(longlong)local_18);
  return uVar1;
}



void FUN_1401a8b30(undefined8 *param_1)

{
  *param_1 = Proud::IHostIDFactory::vftable;
  return;
}



undefined8 * FUN_1401a8b40(undefined8 *param_1)

{
  *(undefined4 *)(param_1 + 1) = 2;
  *param_1 = Proud::CHostIDFactory::vftable;
  return param_1;
}



void FUN_1401a8b60(longlong param_1)

{
  int *piVar1;
  undefined4 uVar2;
  
  piVar1 = (int *)(param_1 + 8);
  *piVar1 = *piVar1 + 1;
  uVar2 = *(undefined4 *)(param_1 + 8);
  if (*piVar1 == 0) {
    uVar2 = 3;
  }
  *(undefined4 *)(param_1 + 8) = uVar2;
  return;
}



undefined8 * FUN_1401a8b80(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::IHostIDFactory::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 FUN_1401a8bb0(longlong param_1,uint param_2,char param_3)

{
  void *_Dst;
  ulonglong uVar1;
  longlong lVar2;
  longlong lVar3;
  size_t _Size;
  float fVar4;
  float fVar5;
  
  if (*(longlong *)(param_1 + 8) != 0) {
    FUN_140156970();
    *(undefined8 *)(param_1 + 8) = 0;
  }
  if (param_3 != '\0') {
    _Size = (ulonglong)param_2 << 3;
    _Dst = (void *)FUN_140156940(_Size);
    *(void **)(param_1 + 8) = _Dst;
    if (_Dst == (void *)0x0) {
      return 0;
    }
    memset(_Dst,0,_Size);
  }
  lVar2 = 0;
  *(uint *)(param_1 + 0x28) = param_2;
  fVar4 = (float)param_2;
  fVar5 = fVar4 * *(float *)(param_1 + 0x34);
  if ((9.223372e+18 < fVar5) && (fVar5 = fVar5 - 9.223372e+18, fVar5 < 9.223372e+18)) {
    lVar2 = -0x8000000000000000;
  }
  fVar4 = fVar4 * *(float *)(param_1 + 0x30);
  lVar3 = 0;
  *(longlong *)(param_1 + 0x38) = (longlong)fVar5 + lVar2;
  if ((9.223372e+18 < fVar4) && (fVar4 = fVar4 - 9.223372e+18, fVar4 < 9.223372e+18)) {
    lVar3 = -0x8000000000000000;
  }
  uVar1 = (longlong)fVar4 + lVar3;
  if ((ulonglong)((longlong)fVar4 + lVar3) < 0x11) {
    uVar1 = 0;
  }
  *(ulonglong *)(param_1 + 0x40) = uVar1;
  return CONCAT71((int7)(uVar1 >> 8),1);
}



void FUN_1401a8ca0(longlong param_1,uint param_2)

{
  ulonglong uVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  void *_Dst;
  longlong lVar5;
  longlong lVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  int iVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  float fVar12;
  float fVar13;
  
  if (param_2 == 0) {
    param_2 = FUN_14019e650();
  }
  if (param_2 != *(uint *)(param_1 + 0x28)) {
    if (*(longlong *)(param_1 + 8) == 0) {
      lVar5 = 0;
      *(uint *)(param_1 + 0x28) = param_2;
      fVar13 = (float)param_2 * *(float *)(param_1 + 0x34);
      if ((9.223372e+18 < fVar13) && (fVar13 = fVar13 - 9.223372e+18, fVar13 < 9.223372e+18)) {
        lVar5 = -0x8000000000000000;
      }
      fVar12 = (float)param_2 * *(float *)(param_1 + 0x30);
      lVar6 = 0;
      *(longlong *)(param_1 + 0x38) = (longlong)fVar13 + lVar5;
      if ((9.223372e+18 < fVar12) && (fVar12 = fVar12 - 9.223372e+18, fVar12 < 9.223372e+18)) {
        lVar6 = -0x8000000000000000;
      }
      *(longlong *)(param_1 + 0x40) = (longlong)fVar12 + lVar6;
      if ((ulonglong)((longlong)fVar12 + lVar6) < 0x11) {
        *(undefined8 *)(param_1 + 0x40) = 0;
        return;
      }
    }
    else {
      _Dst = (void *)FUN_140156940((ulonglong)param_2 << 3);
      if (_Dst == (void *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x8007000e);
      }
      memset(_Dst,0,(ulonglong)param_2 << 3);
      uVar7 = 0;
      uVar4 = *(ulonglong *)(param_1 + 0x10);
      uVar10 = uVar7;
      uVar11 = uVar7;
      while (uVar4 != 0) {
        uVar1 = *(ulonglong *)(uVar4 + 0x18);
        uVar3 = (ulonglong)*(uint *)(uVar4 + 0x28) % (ulonglong)param_2;
        lVar5 = *(longlong *)((longlong)_Dst + uVar3 * 8);
        iVar9 = (int)uVar10;
        if (iVar9 == 0) {
          *(undefined8 *)(uVar4 + 0x20) = 0;
          *(undefined8 *)(uVar4 + 0x18) = 0;
          uVar10 = 1;
          uVar7 = uVar4;
          uVar11 = uVar4;
        }
        else if (lVar5 == 0) {
          *(undefined8 *)(uVar4 + 0x20) = 0;
          *(ulonglong *)(uVar4 + 0x18) = uVar7;
          if (uVar7 != 0) {
            *(ulonglong *)(uVar7 + 0x20) = uVar4;
          }
          uVar10 = (ulonglong)(iVar9 + 1);
          uVar7 = uVar4;
        }
        else {
          uVar8 = uVar4;
          if (*(longlong *)(lVar5 + 0x20) != 0) {
            *(ulonglong *)(*(longlong *)(lVar5 + 0x20) + 0x18) = uVar4;
            uVar8 = uVar7;
          }
          uVar2 = *(undefined8 *)(lVar5 + 0x20);
          *(longlong *)(uVar4 + 0x18) = lVar5;
          uVar10 = (ulonglong)(iVar9 + 1);
          *(undefined8 *)(uVar4 + 0x20) = uVar2;
          *(ulonglong *)(lVar5 + 0x20) = uVar4;
          uVar7 = uVar8;
        }
        *(ulonglong *)((longlong)_Dst + uVar3 * 8) = uVar4;
        uVar4 = uVar1;
      }
      FUN_140156970(*(undefined8 *)(param_1 + 8));
      *(void **)(param_1 + 8) = _Dst;
      *(uint *)(param_1 + 0x28) = param_2;
      *(ulonglong *)(param_1 + 0x10) = uVar7;
      *(ulonglong *)(param_1 + 0x18) = uVar11;
      FUN_14015b050(param_1);
      lVar5 = 0;
      fVar13 = (float)*(uint *)(param_1 + 0x28) * *(float *)(param_1 + 0x34);
      if ((9.223372e+18 < fVar13) && (fVar13 = fVar13 - 9.223372e+18, fVar13 < 9.223372e+18)) {
        lVar5 = -0x8000000000000000;
      }
      fVar12 = (float)*(uint *)(param_1 + 0x28) * *(float *)(param_1 + 0x30);
      lVar6 = 0;
      *(longlong *)(param_1 + 0x38) = (longlong)fVar13 + lVar5;
      if ((9.223372e+18 < fVar12) && (fVar12 = fVar12 - 9.223372e+18, fVar12 < 9.223372e+18)) {
        lVar6 = -0x8000000000000000;
      }
      *(longlong *)(param_1 + 0x40) = (longlong)fVar12 + lVar6;
      if ((ulonglong)((longlong)fVar12 + lVar6) < 0x11) {
        *(undefined8 *)(param_1 + 0x40) = 0;
      }
    }
  }
  return;
}



uint FUN_1401a8ef0(longlong param_1,uint param_2)

{
  ulonglong uVar1;
  uint *puVar2;
  
  uVar1 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0x40);
  if (*(longlong *)(param_1 + 0x20) != 0) {
    for (puVar2 = *(uint **)(*(longlong *)(param_1 + 0x20) + uVar1 * 8);
        (puVar2 != (uint *)0x0 && ((uint)uVar1 == puVar2[10] % *(uint *)(param_1 + 0x40)));
        puVar2 = *(uint **)(puVar2 + 6)) {
      if (*puVar2 == param_2) goto LAB_1401a8f3d;
    }
  }
  puVar2 = (uint *)0x0;
LAB_1401a8f3d:
  if (puVar2 != (uint *)0x0) {
    return puVar2[3];
  }
  return 0;
}



undefined4 FUN_1401a8f50(longlong *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  longlong lVar4;
  
  plVar1 = (longlong *)param_1[1];
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  lVar2 = *plVar1;
  lVar4 = plVar1[2];
  param_1[1] = lVar2;
  if (lVar2 == 0) {
    param_1[2] = 0;
  }
  else {
    *(undefined8 *)(lVar2 + 8) = 0;
  }
  plVar3 = (longlong *)*param_1;
  if (plVar3 != (longlong *)0x0) {
    (**(code **)(*plVar3 + 0x10))(plVar3,plVar1);
    param_1[3] = param_1[3] + -1;
    return (int)lVar4;
  }
  FUN_140156970();
  param_1[3] = param_1[3] + -1;
  return (int)lVar4;
}



undefined8 * FUN_1401a8fd0(longlong *param_1,undefined4 *param_2)

{
  longlong lVar1;
  longlong *plVar2;
  undefined8 *puVar3;
  
  lVar1 = param_1[2];
  plVar2 = (longlong *)*param_1;
  if (plVar2 == (longlong *)0x0) {
    puVar3 = (undefined8 *)FUN_140156940(0x18);
  }
  else {
    puVar3 = (undefined8 *)(**(code **)(*plVar2 + 8))(plVar2,0x18);
  }
  if (puVar3 != (undefined8 *)0x0) {
    *(undefined4 *)(puVar3 + 2) = *param_2;
  }
  puVar3[1] = lVar1;
  *puVar3 = 0;
  param_1[3] = param_1[3] + 1;
  if ((undefined8 *)param_1[2] == (undefined8 *)0x0) {
    param_1[1] = (longlong)puVar3;
  }
  else {
    *(undefined8 *)param_1[2] = puVar3;
  }
  param_1[2] = (longlong)puVar3;
  return puVar3;
}



undefined4 * FUN_1401a9050(longlong param_1,undefined4 *param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 uVar3;
  undefined4 uVar4;
  undefined4 *puVar5;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar5 = (undefined4 *)FUN_140156940(0x30);
  }
  else {
    puVar5 = (undefined4 *)(**(code **)(*plVar1 + 8))(plVar1,0x30);
  }
  if (puVar5 != (undefined4 *)0x0) {
    *puVar5 = *param_2;
    *(undefined8 *)(puVar5 + 2) = 0;
    *(undefined8 *)(puVar5 + 4) = 0;
    puVar5[10] = param_4;
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015b050(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined4 **)(param_1 + 0x10) = puVar5;
    *(undefined4 **)(param_1 + 0x18) = puVar5;
    *(undefined8 *)(puVar5 + 8) = 0;
    *(undefined8 *)(puVar5 + 6) = 0;
  }
  else {
    FUN_14015b050(param_1);
    FUN_14015b050(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      *(undefined8 *)(puVar5 + 8) = 0;
      *(longlong *)(puVar5 + 6) = lVar2;
      if (lVar2 != 0) {
        *(undefined4 **)(lVar2 + 0x20) = puVar5;
      }
      *(undefined4 **)(param_1 + 0x10) = puVar5;
    }
    else {
      if (*(longlong *)(lVar2 + 0x20) == 0) {
        *(undefined4 **)(param_1 + 0x10) = puVar5;
      }
      else {
        *(undefined4 **)(*(longlong *)(lVar2 + 0x20) + 0x18) = puVar5;
      }
      uVar3 = *(undefined8 *)(lVar2 + 0x20);
      *(longlong *)(puVar5 + 6) = lVar2;
      *(undefined8 *)(puVar5 + 8) = uVar3;
      *(undefined4 **)(lVar2 + 0x20) = puVar5;
    }
  }
  *(undefined4 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar5;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b050(param_1);
  FUN_14015b050(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar4 = FUN_14019e650(param_1);
    FUN_1401a8ca0(param_1,uVar4);
  }
  FUN_14015b050(param_1);
  return puVar5;
}



ulonglong FUN_1401a9190(longlong param_1,double param_2)

{
  int *piVar1;
  int iVar2;
  uint uVar3;
  undefined4 uVar4;
  ulonglong uVar5;
  uint *puVar6;
  
  if (*(longlong *)(param_1 + 0x88) == 0) {
    piVar1 = (int *)(param_1 + 0x10);
    *piVar1 = *piVar1 + 1;
    iVar2 = *piVar1;
    uVar4 = *(undefined4 *)(param_1 + 0x10);
  }
  else {
    if (*(longlong *)(param_1 + 0x78) == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    uVar3 = *(uint *)(*(longlong *)(param_1 + 0x78) + 0x10);
    uVar5 = (ulonglong)uVar3 % (ulonglong)*(uint *)(param_1 + 0x40);
    if (*(longlong *)(param_1 + 0x20) != 0) {
      for (puVar6 = *(uint **)(*(longlong *)(param_1 + 0x20) + uVar5 * 8);
          (puVar6 != (uint *)0x0 && ((uint)uVar5 == puVar6[10] % *(uint *)(param_1 + 0x40)));
          puVar6 = *(uint **)(puVar6 + 6)) {
        if (*puVar6 == uVar3) goto LAB_1401a920d;
      }
    }
    puVar6 = (uint *)0x0;
LAB_1401a920d:
    if (puVar6 == (uint *)0x0) {
      FUN_1401a8f50(param_1 + 0x70);
      piVar1 = (int *)(param_1 + 0x10);
      *piVar1 = *piVar1 + 1;
      if (*piVar1 == 0) {
        *(undefined4 *)(param_1 + 0x10) = 3;
        return 3;
      }
      goto LAB_1401a9266;
    }
    if (*(double *)(param_1 + 8) <= param_2 - *(double *)(puVar6 + 4) &&
        param_2 - *(double *)(puVar6 + 4) != *(double *)(param_1 + 8)) {
      puVar6[4] = 0;
      puVar6[5] = 0;
      puVar6[3] = puVar6[3] + 1;
      uVar5 = FUN_1401a8f50(param_1 + 0x70);
      return uVar5;
    }
    piVar1 = (int *)(param_1 + 0x10);
    *piVar1 = *piVar1 + 1;
    iVar2 = *piVar1;
    uVar4 = *(undefined4 *)(param_1 + 0x10);
  }
  if (iVar2 == 0) {
    uVar4 = 3;
  }
  *(undefined4 *)(param_1 + 0x10) = uVar4;
LAB_1401a9266:
  return (ulonglong)*(uint *)(param_1 + 0x10);
}



void FUN_1401a9270(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  undefined8 *puVar4;
  
  lVar1 = param_1[3];
  while( true ) {
    if (lVar1 == 0) {
      puVar4 = (undefined8 *)*param_1;
      param_1[1] = 0;
      param_1[2] = 0;
      if (puVar4 != (undefined8 *)0x0) {
        (**(code **)*puVar4)(puVar4,1);
      }
      return;
    }
    plVar2 = (longlong *)param_1[1];
    if (plVar2 == (longlong *)0x0) break;
    plVar3 = (longlong *)*param_1;
    param_1[1] = *plVar2;
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar3 + 0x10))(plVar3,plVar2);
    }
    param_1[3] = param_1[3] + -1;
    lVar1 = param_1[3];
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



// WARNING: Removing unreachable block (ram,0x0001401a9367)
// WARNING: Removing unreachable block (ram,0x0001401a9370)
// WARNING: Removing unreachable block (ram,0x0001401a938e)
// WARNING: Removing unreachable block (ram,0x0001401a9397)

undefined8 * FUN_1401a92f0(undefined8 *param_1,undefined8 param_2)

{
  *param_1 = Proud::CRecycleHostIDFactory::vftable;
  param_1[1] = param_2;
  *(undefined1 *)(param_1 + 3) = 0;
  param_1[0xd] = 0;
  param_1[4] = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  *(undefined4 *)(param_1 + 8) = 0x11;
  param_1[7] = 0;
  *(undefined4 *)(param_1 + 0xc) = 0;
  *(undefined4 *)((longlong)param_1 + 0x44) = 0x3f400000;
  *(undefined4 *)(param_1 + 9) = 0x3e800000;
  *(undefined4 *)((longlong)param_1 + 0x4c) = 0x40100000;
  param_1[10] = 0x26;
  param_1[0xb] = 0;
  param_1[0xe] = 0;
  param_1[0x11] = 0;
  param_1[0xf] = 0;
  param_1[0x10] = 0;
  *(undefined4 *)(param_1 + 2) = 2;
  return param_1;
}



void FUN_1401a93e0(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined8 *puVar2;
  longlong *plVar3;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  *param_1 = Proud::CRecycleHostIDFactory::vftable;
  *(undefined4 *)(param_1 + 2) = 2;
  FUN_14015e980(param_1 + 3);
  lVar1 = param_1[0x11];
  while( true ) {
    if (lVar1 == 0) {
      param_1[0xf] = 0;
      param_1[0x10] = 0;
      FUN_1401a9270(param_1 + 0xe);
      FUN_1401a03b0(param_1 + 3);
      *param_1 = Proud::IHostIDFactory::vftable;
      return;
    }
    puVar2 = (undefined8 *)param_1[0xf];
    if (puVar2 == (undefined8 *)0x0) break;
    param_1[0xf] = *puVar2;
    plVar3 = (longlong *)param_1[0xe];
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar3 + 0x10))(plVar3,puVar2,plVar3,param_4,uVar4);
    }
    param_1[0x11] = param_1[0x11] + -1;
    lVar1 = param_1[0x11];
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



void * FUN_1401a94d0(void *param_1,uint param_2)

{
  FUN_1401a93e0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_1401a9500(longlong param_1,undefined8 param_2,uint param_3)

{
  uint uVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined8 uVar4;
  ulonglong uVar5;
  char cVar6;
  undefined8 *puVar7;
  uint *puVar8;
  uint uVar9;
  ulonglong uVar10;
  uint local_res18 [4];
  
  uVar1 = *(uint *)(param_1 + 0x40);
  uVar10 = (ulonglong)uVar1;
  puVar7 = (undefined8 *)(param_3 / uVar10);
  uVar5 = (ulonglong)param_3 % uVar10;
  lVar2 = *(longlong *)(param_1 + 0x20);
  uVar9 = (uint)uVar5;
  if (lVar2 != 0) {
    for (puVar8 = *(uint **)(lVar2 + uVar5 * 8);
        (puVar8 != (uint *)0x0 &&
        (puVar7 = (undefined8 *)(puVar8[10] / uVar10), uVar9 == puVar8[10] % uVar1));
        puVar8 = *(uint **)(puVar8 + 6)) {
      if (*puVar8 == param_3) goto LAB_1401a955b;
    }
  }
  puVar8 = (uint *)0x0;
LAB_1401a955b:
  local_res18[0] = param_3;
  if (puVar8 != (uint *)0x0) {
    if (*(double *)(puVar8 + 4) != 0.0) {
      return puVar7;
    }
    *(undefined8 *)(puVar8 + 4) = param_2;
    puVar7 = (undefined8 *)FUN_1401a8fd0(param_1 + 0x70,local_res18);
    return puVar7;
  }
  if (lVar2 != 0) {
    for (puVar8 = *(uint **)(lVar2 + uVar5 * 8);
        (puVar8 != (uint *)0x0 && (uVar9 == puVar8[10] % uVar1)); puVar8 = *(uint **)(puVar8 + 6)) {
      if (*puVar8 == param_3) goto LAB_1401a9667;
    }
    if (lVar2 != 0) {
      for (puVar8 = *(uint **)(lVar2 + uVar5 * 8);
          (puVar8 != (uint *)0x0 && (uVar9 == puVar8[10] % uVar1)); puVar8 = *(uint **)(puVar8 + 6))
      {
        if (*puVar8 == param_3) goto LAB_1401a9655;
      }
      if (lVar2 != 0) goto LAB_1401a962c;
    }
  }
  cVar6 = FUN_1401a8bb0(param_1 + 0x18,uVar10,CONCAT71((int7)((ulonglong)lVar2 >> 8),1));
  if (cVar6 == '\0') {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x8007000e);
  }
LAB_1401a962c:
  FUN_14015b050(param_1 + 0x18);
  puVar8 = (uint *)FUN_1401a9050(param_1 + 0x18,local_res18,uVar5,param_3);
  FUN_14015b050(param_1 + 0x18);
LAB_1401a9655:
  *(ulonglong *)(puVar8 + 2) = (ulonglong)param_3;
  *(undefined8 *)(puVar8 + 4) = param_2;
LAB_1401a9667:
  plVar3 = *(longlong **)(param_1 + 0x70);
  uVar4 = *(undefined8 *)(param_1 + 0x80);
  if (plVar3 == (longlong *)0x0) {
    puVar7 = (undefined8 *)FUN_140156940(0x18);
  }
  else {
    puVar7 = (undefined8 *)(**(code **)(*plVar3 + 8))(plVar3,0x18);
  }
  if (puVar7 != (undefined8 *)0x0) {
    *(uint *)(puVar7 + 2) = param_3;
  }
  puVar7[1] = uVar4;
  *puVar7 = 0;
  *(longlong *)(param_1 + 0x88) = *(longlong *)(param_1 + 0x88) + 1;
  if (*(undefined8 **)(param_1 + 0x80) == (undefined8 *)0x0) {
    *(undefined8 **)(param_1 + 0x78) = puVar7;
  }
  else {
    **(undefined8 **)(param_1 + 0x80) = puVar7;
  }
  *(undefined8 **)(param_1 + 0x80) = puVar7;
  return puVar7;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x0001401a9794)

void FUN_1401a96e0(longlong param_1,byte *param_2,int param_3)

{
  byte bVar1;
  undefined1 uVar2;
  byte bVar3;
  uint uVar4;
  longlong lVar5;
  undefined8 *puVar6;
  longlong lVar7;
  undefined8 *puVar8;
  undefined8 local_58;
  undefined8 uStack_50;
  undefined8 local_48;
  undefined8 uStack_40;
  undefined8 local_38;
  undefined8 uStack_30;
  undefined8 local_28;
  undefined8 uStack_20;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)&local_58;
  puVar6 = (undefined8 *)0x0;
  lVar7 = (longlong)param_3;
  puVar8 = puVar6;
  if (*(int *)(param_1 + 0x18) != 0) {
    puVar8 = *(undefined8 **)(param_1 + 0x10);
  }
  local_58 = *puVar8;
  uStack_50 = puVar8[1];
  local_48 = puVar8[2];
  uStack_40 = puVar8[3];
  local_38 = puVar8[4];
  uStack_30 = puVar8[5];
  local_28 = puVar8[6];
  uStack_20 = puVar8[7];
  puVar8 = puVar6;
  if (0 < param_3) {
    do {
      uVar4 = (int)puVar8 + 1U & 0x8000003f;
      if ((int)uVar4 < 0) {
        uVar4 = (uVar4 - 1 | 0xffffffc0) + 1;
      }
      puVar8 = (undefined8 *)(longlong)(int)uVar4;
      bVar1 = *(byte *)((longlong)&local_58 + (longlong)puVar8);
      uVar4 = (int)puVar6 + (uint)bVar1 & 0x8000003f;
      if ((int)uVar4 < 0) {
        uVar4 = (uVar4 - 1 | 0xffffffc0) + 1;
      }
      puVar6 = (undefined8 *)(ulonglong)uVar4;
      uVar2 = *(undefined1 *)((longlong)&local_58 + (longlong)puVar8);
      lVar5 = (longlong)(int)uVar4;
      bVar3 = *(byte *)((longlong)&local_58 + lVar5);
      *(undefined1 *)((longlong)&local_58 + (longlong)puVar8) =
           *(undefined1 *)((longlong)&local_58 + lVar5);
      *(undefined1 *)((longlong)&local_58 + lVar5) = uVar2;
      *param_2 = *param_2 ^
                 *(byte *)((longlong)&local_58 +
                          (longlong)(int)((uint)bVar3 + (uint)bVar1 & 0x8000003f));
      lVar7 = lVar7 + -1;
      param_2 = param_2 + 1;
    } while (lVar7 != 0);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x0001401a98b4)

void FUN_1401a97d0(longlong param_1,byte *param_2,int param_3)

{
  byte bVar1;
  undefined1 uVar2;
  byte bVar3;
  uint uVar4;
  longlong lVar5;
  undefined8 *puVar6;
  longlong lVar7;
  undefined8 *puVar8;
  undefined8 local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  undefined8 uStack_70;
  undefined8 local_68;
  undefined8 uStack_60;
  undefined8 local_58;
  undefined8 uStack_50;
  undefined8 local_48;
  undefined8 uStack_40;
  undefined8 local_38;
  undefined8 uStack_30;
  undefined8 local_28;
  undefined8 uStack_20;
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)&local_98;
  puVar6 = (undefined8 *)0x0;
  lVar7 = (longlong)param_3;
  puVar8 = puVar6;
  if (*(int *)(param_1 + 0x18) != 0) {
    puVar8 = *(undefined8 **)(param_1 + 0x10);
  }
  local_98 = *puVar8;
  uStack_90 = puVar8[1];
  local_88 = puVar8[2];
  uStack_80 = puVar8[3];
  local_78 = puVar8[4];
  uStack_70 = puVar8[5];
  local_68 = puVar8[6];
  uStack_60 = puVar8[7];
  local_58 = puVar8[8];
  uStack_50 = puVar8[9];
  local_48 = puVar8[10];
  uStack_40 = puVar8[0xb];
  local_38 = puVar8[0xc];
  uStack_30 = puVar8[0xd];
  local_28 = puVar8[0xe];
  uStack_20 = puVar8[0xf];
  puVar8 = puVar6;
  if (0 < param_3) {
    do {
      uVar4 = (int)puVar8 + 1U & 0x8000007f;
      if ((int)uVar4 < 0) {
        uVar4 = (uVar4 - 1 | 0xffffff80) + 1;
      }
      puVar8 = (undefined8 *)(longlong)(int)uVar4;
      bVar1 = *(byte *)((longlong)&local_98 + (longlong)puVar8);
      uVar4 = (int)puVar6 + (uint)bVar1 & 0x8000007f;
      if ((int)uVar4 < 0) {
        uVar4 = (uVar4 - 1 | 0xffffff80) + 1;
      }
      puVar6 = (undefined8 *)(ulonglong)uVar4;
      uVar2 = *(undefined1 *)((longlong)&local_98 + (longlong)puVar8);
      lVar5 = (longlong)(int)uVar4;
      bVar3 = *(byte *)((longlong)&local_98 + lVar5);
      *(undefined1 *)((longlong)&local_98 + (longlong)puVar8) =
           *(undefined1 *)((longlong)&local_98 + lVar5);
      *(undefined1 *)((longlong)&local_98 + lVar5) = uVar2;
      *param_2 = *param_2 ^
                 *(byte *)((longlong)&local_98 +
                          (longlong)(int)((uint)bVar3 + (uint)bVar1 & 0x8000007f));
      lVar7 = lVar7 + -1;
      param_2 = param_2 + 1;
    } while (lVar7 != 0);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x0001401a99ac)

void FUN_1401a9900(longlong param_1,byte *param_2,int param_3)

{
  byte bVar1;
  byte bVar2;
  byte bVar3;
  uint uVar4;
  void *pvVar5;
  longlong lVar6;
  void *pvVar7;
  undefined1 auStack_138 [32];
  byte local_118 [256];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_138;
  pvVar7 = (void *)0x0;
  lVar6 = (longlong)param_3;
  pvVar5 = pvVar7;
  if (*(int *)(param_1 + 0x18) != 0) {
    pvVar5 = *(void **)(param_1 + 0x10);
  }
  memcpy(local_118,pvVar5,0x100);
  pvVar5 = pvVar7;
  if (0 < param_3) {
    do {
      uVar4 = (int)pvVar7 + 1U & 0x800000ff;
      if ((int)uVar4 < 0) {
        uVar4 = (uVar4 - 1 | 0xffffff00) + 1;
      }
      pvVar7 = (void *)(longlong)(int)uVar4;
      bVar1 = local_118[(longlong)pvVar7];
      uVar4 = (int)pvVar5 + (uint)bVar1 & 0x800000ff;
      if ((int)uVar4 < 0) {
        uVar4 = (uVar4 - 1 | 0xffffff00) + 1;
      }
      pvVar5 = (void *)(ulonglong)uVar4;
      bVar2 = local_118[(longlong)pvVar7];
      bVar3 = local_118[(int)uVar4];
      local_118[(longlong)pvVar7] = local_118[(int)uVar4];
      local_118[(int)uVar4] = bVar2;
      *param_2 = *param_2 ^ local_118[(int)((uint)bVar3 + (uint)bVar1 & 0x800000ff)];
      lVar6 = lVar6 + -1;
      param_2 = param_2 + 1;
    } while (lVar6 != 0);
  }
  return;
}



void FUN_1401a9a00(longlong param_1)

{
  int iVar1;
  undefined1 local_58 [88];
  
  iVar1 = *(int *)(param_1 + 0x18) << 3;
  if (iVar1 == 0x200) {
    FUN_1401a96e0();
    return;
  }
  if (iVar1 != 0x400) {
    if (iVar1 != 0x800) {
      FUN_140156300(local_58,L"RC4 Encrypt Error. FastEncryptLevel is correct");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    FUN_1401a9900();
    return;
  }
  FUN_1401a97d0();
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401a9a60(longlong param_1,longlong param_2,int param_3)

{
  undefined1 uVar1;
  longlong lVar2;
  ulonglong uVar3;
  int iVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  undefined1 auStack_198 [32];
  undefined1 local_178 [80];
  byte abStack_128 [256];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_198;
  if (param_3 == 0) {
    *(undefined1 *)(param_1 + 0x28) = 1;
  }
  else {
    if (param_2 == 0) {
      FUN_140156300(local_178,L"RC4 ExpandFrom Error. inputkey is NULL");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_178,(ThrowInfo *)&DAT_14031d928);
    }
    FUN_140050060(param_1,param_3);
    uVar5 = 0;
    uVar6 = uVar5;
    if (0 < param_3) {
      do {
        iVar4 = (int)uVar6;
        if ((iVar4 < 0) || (*(int *)(param_1 + 0x18) <= iVar4)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        *(char *)((longlong)iVar4 + *(longlong *)(param_1 + 0x10)) = (char)uVar6;
        uVar6 = (ulonglong)(iVar4 + 1U);
        abStack_128[iVar4] = *(byte *)(iVar4 % param_3 + param_2);
      } while ((int)(iVar4 + 1U) < param_3);
    }
    uVar6 = uVar5;
    uVar7 = uVar5;
    if (0 < param_3) {
      do {
        if ((longlong)uVar6 < 0) {
LAB_1401a9ba2:
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        if (*(int *)(param_1 + 0x18) <= (int)uVar7) goto LAB_1401a9ba2;
        lVar2 = *(longlong *)(param_1 + 0x10);
        uVar3 = (longlong)
                (int)((uint)*(byte *)(lVar2 + uVar6) + (uint)abStack_128[uVar6] + (int)uVar5) %
                (longlong)param_3;
        uVar5 = uVar3 & 0xffffffff;
        iVar4 = (int)((longlong)((ulonglong)(uint)((int)uVar3 >> 0x1f) << 0x20 | uVar3 & 0xffffffff)
                     % (longlong)param_3);
        if ((iVar4 < 0) || (*(int *)(param_1 + 0x18) <= iVar4)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        uVar1 = *(undefined1 *)(lVar2 + uVar6);
        uVar6 = uVar6 + 1;
        uVar7 = (ulonglong)((int)uVar7 + 1);
        *(undefined1 *)(lVar2 + -1 + uVar6) = *(undefined1 *)(iVar4 + lVar2);
        *(undefined1 *)(iVar4 + lVar2) = uVar1;
      } while ((longlong)uVar6 < (longlong)param_3);
    }
    *(undefined1 *)(param_1 + 0x28) = 1;
  }
  return;
}



undefined8 FUN_1401a9bb0(longlong param_1,longlong param_2,longlong param_3,ulonglong param_4)

{
  undefined4 uVar1;
  undefined7 uVar4;
  longlong lVar2;
  undefined8 uVar3;
  undefined4 *puVar5;
  uint uVar6;
  undefined4 *puVar8;
  void *_Src;
  undefined1 local_290 [72];
  undefined1 local_248 [72];
  undefined1 local_200 [72];
  undefined1 local_1b8 [72];
  undefined1 local_170 [288];
  undefined1 local_50 [72];
  int iVar7;
  
  if (*(char *)(param_3 + 0x28) == '\0') {
    if (*(int *)(param_3 + 0x18) == 0) {
      FUN_1401562a0(local_1b8,&DAT_14026df08);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_1b8,(ThrowInfo *)&DAT_14031d928);
    }
  }
  else if (*(int *)(param_3 + 0x18) == 0) {
    FUN_140156300(local_248,
                  L"FastEncrypt Key Length is 0, Check ServerStartParameters m_fastEncryptedMessageKeyLength"
                  ,param_3,param_4,0xfffffffffffffffe);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_248,(ThrowInfo *)&DAT_14031d928);
  }
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar7 = *(int *)(param_1 + 0x18);
  }
  else {
    iVar7 = *(int *)(lVar2 + 0x18);
  }
  if (iVar7 <= (int)param_4) {
    if (lVar2 == 0) {
      if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      param_4 = (ulonglong)*(uint *)(param_1 + 0x18);
    }
    else {
      param_4 = (ulonglong)*(uint *)(lVar2 + 0x18);
    }
  }
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar7 = *(int *)(param_1 + 0x18);
  }
  else {
    iVar7 = *(int *)(lVar2 + 0x18);
  }
  uVar6 = iVar7 - (int)param_4;
  if (uVar6 == 0) {
    uVar4 = (undefined7)((ulonglong)lVar2 >> 8);
  }
  else {
    if (*(longlong *)(param_1 + 0x10) == 0) {
      if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(int *)(lVar2 + 0x18) == 0) {
        lVar2 = 0;
      }
      else {
        lVar2 = *(longlong *)(lVar2 + 0x10);
      }
    }
    else {
      lVar2 = *(longlong *)(param_1 + 0x10);
      if (lVar2 == 0) {
        FUN_140156300(local_290,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0,param_3,param_4,
                      0xfffffffffffffffe);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_290,(ThrowInfo *)&DAT_14031d928);
      }
    }
    puVar8 = (undefined4 *)0x0;
    _Src = (void *)((int)param_4 + lVar2);
    FUN_140153d90(param_2);
    FUN_140154600(param_2,uVar6 + 4);
    uVar1 = FUN_1401aec80(_Src,uVar6);
    if (*(longlong *)(param_2 + 0x10) == 0) {
      lVar2 = *(longlong *)(param_2 + 8);
      if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      puVar5 = puVar8;
      if (*(int *)(lVar2 + 0x18) != 0) {
        puVar5 = *(undefined4 **)(lVar2 + 0x10);
      }
    }
    else {
      puVar5 = *(undefined4 **)(param_2 + 0x10);
      if (*(undefined4 **)(param_2 + 0x10) == (undefined4 *)0x0) {
        FUN_140156300(local_200,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_200,(ThrowInfo *)&DAT_14031d928);
      }
    }
    *puVar5 = uVar1;
    if (*(longlong *)(param_2 + 0x10) == 0) {
      lVar2 = *(longlong *)(param_2 + 8);
      if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      puVar5 = puVar8;
      if (*(int *)(lVar2 + 0x18) != 0) {
        puVar5 = *(undefined4 **)(lVar2 + 0x10);
      }
    }
    else {
      puVar5 = *(undefined4 **)(param_2 + 0x10);
      if (*(undefined4 **)(param_2 + 0x10) == (undefined4 *)0x0) {
        FUN_140156300(local_170,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_170,(ThrowInfo *)&DAT_14031d928);
      }
    }
    memcpy(puVar5 + 1,_Src,(ulonglong)uVar6);
    lVar2 = *(longlong *)(param_2 + 8);
    if ((lVar2 == 0) && (*(longlong *)(param_2 + 0x10) == 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(longlong *)(param_2 + 0x10) == 0) {
      if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(int *)(lVar2 + 0x18) != 0) {
        puVar8 = *(undefined4 **)(lVar2 + 0x10);
      }
    }
    else {
      puVar8 = *(undefined4 **)(param_2 + 0x10);
      if (puVar8 == (undefined4 *)0x0) {
        FUN_140156300(local_50,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
      }
    }
    uVar3 = FUN_1401a9a00(param_3,puVar8);
    uVar4 = (undefined7)((ulonglong)uVar3 >> 8);
  }
  return CONCAT71(uVar4,1);
}



undefined8 FUN_1401a9e90(longlong param_1,undefined8 param_2,longlong param_3,int param_4)

{
  int iVar1;
  undefined7 uVar5;
  longlong lVar2;
  int *piVar3;
  void *_Dst;
  undefined8 uVar4;
  int *piVar6;
  uint uVar7;
  undefined **local_238;
  undefined8 local_230;
  int *local_228;
  undefined8 local_220;
  undefined8 local_218;
  undefined8 local_208;
  undefined1 local_200 [288];
  undefined1 local_e0 [72];
  undefined1 local_98 [72];
  undefined1 local_50 [72];
  int iVar8;
  
  local_208 = 0xfffffffffffffffe;
  if (*(char *)(param_3 + 0x28) == '\0') {
    if (*(int *)(param_3 + 0x18) == 0) {
      FUN_1401562a0(local_98,&DAT_14026df88);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_98,(ThrowInfo *)&DAT_14031d928);
    }
  }
  else if (*(int *)(param_3 + 0x18) == 0) {
    FUN_140156300(local_200,
                  L"FastEncrypt Key Length is 0, Check ServerStartParameters m_fastEncryptedMessageKeyLength"
                 );
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_200,(ThrowInfo *)&DAT_14031d928);
  }
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar8 = *(int *)(param_1 + 0x18);
  }
  else {
    iVar8 = *(int *)(lVar2 + 0x18);
  }
  if (iVar8 <= param_4) {
    if (lVar2 == 0) {
      if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      param_4 = *(int *)(param_1 + 0x18);
    }
    else {
      param_4 = *(int *)(lVar2 + 0x18);
    }
  }
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar8 = *(int *)(param_1 + 0x18);
  }
  else {
    iVar8 = *(int *)(lVar2 + 0x18);
  }
  uVar7 = iVar8 - param_4;
  if (uVar7 == 0) {
    uVar5 = (undefined7)((ulonglong)lVar2 >> 8);
  }
  else {
    if (*(longlong *)(param_1 + 0x10) == 0) {
      if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(int *)(lVar2 + 0x18) == 0) {
        lVar2 = 0;
      }
      else {
        lVar2 = *(longlong *)(lVar2 + 0x10);
      }
    }
    else {
      lVar2 = *(longlong *)(param_1 + 0x10);
      if (lVar2 == 0) {
        FUN_140156300(local_e0,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_e0,(ThrowInfo *)&DAT_14031d928);
      }
    }
    piVar6 = (int *)0x0;
    FUN_140153d90(param_2);
    FUN_140154600(param_2,uVar7 - 4);
    local_230 = 0;
    local_228 = (int *)0x0;
    local_220 = 0;
    local_218 = 0;
    local_238 = Proud::ByteArray::vftable;
    FUN_140050060(&local_238,uVar7);
    piVar3 = local_228;
    if ((int)local_220 == 0) {
      piVar3 = piVar6;
    }
    memcpy(piVar3,(void *)(param_4 + lVar2),(ulonglong)uVar7);
    piVar3 = local_228;
    if ((int)local_220 == 0) {
      piVar3 = piVar6;
    }
    FUN_1401a9a00(param_3,piVar3);
    piVar3 = local_228;
    if ((int)local_220 == 0) {
      piVar3 = piVar6;
    }
    iVar8 = *piVar3;
    piVar3 = local_228;
    if ((int)local_220 == 0) {
      piVar3 = piVar6;
    }
    iVar1 = FUN_1401aec80(piVar3 + 1,uVar7 - 4);
    if (iVar8 != iVar1) {
      FUN_1401562a0(local_50,&DAT_14026df50);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
    }
    piVar3 = local_228;
    if ((int)local_220 == 0) {
      piVar3 = piVar6;
    }
    _Dst = (void *)FUN_140154060(param_2);
    memcpy(_Dst,piVar3 + 1,(ulonglong)(uVar7 - 4));
    uVar4 = FUN_1401858d0(&local_238);
    uVar5 = (undefined7)((ulonglong)uVar4 >> 8);
  }
  return CONCAT71(uVar5,1);
}



longlong FUN_1401aa110(longlong param_1)

{
  int iVar1;
  undefined4 uVar2;
  undefined1 local_58 [80];
  
  InitializeCriticalSection((LPCRITICAL_SECTION)&DAT_140379280);
  InitializeCriticalSection((LPCRITICAL_SECTION)&DAT_1403792c0);
  InitializeCriticalSection((LPCRITICAL_SECTION)&DAT_140379300);
  iVar1 = FUN_1401cd200(&PTR_s_fortuna_140275770);
  if (iVar1 == -1) {
    FUN_140156300(local_58,L"REGISTER PRNG ERROR : SPRNG");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  iVar1 = FUN_1401cc9b0(&PTR_DAT_1402756f0);
  if (iVar1 == -1) {
    FUN_140156300(local_58,L"REGISTER HASH ERROR : SHA1");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  memcpy(&DAT_140379340,&PTR_s_LibTomMath_140275560,0x188);
  uVar2 = FUN_1401cbb60("fortuna");
  *(undefined4 *)(param_1 + 0x1058) = uVar2;
  uVar2 = FUN_1401cbac0(&DAT_14026dfc8);
  *(undefined4 *)(param_1 + 0x105c) = uVar2;
  iVar1 = FUN_1401cb9c0(0x80,*(undefined4 *)(param_1 + 0x1058),param_1,0);
  if (iVar1 != 0) {
    FUN_140156300(local_58,L"PRNG MAKE ERROR");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  return param_1;
}



undefined8 * FUN_1401aa230(undefined8 *param_1)

{
  undefined8 *puVar1;
  
  puVar1 = operator_new(0x48);
  *param_1 = puVar1;
  *puVar1 = 0;
  puVar1[1] = 0;
  puVar1[2] = 0;
  puVar1[3] = 0;
  puVar1[4] = 0;
  puVar1[5] = 0;
  puVar1[6] = 0;
  puVar1[7] = 0;
  puVar1[8] = 0;
  return param_1;
}



void FUN_1401aa280(longlong *param_1)

{
  if (*param_1 != 0) {
    FUN_1401cdbd0();
    operator_delete((void *)*param_1);
  }
  *param_1 = 0;
  return;
}



undefined * FUN_1401aa2b0(void)

{
  bool bVar1;
  char cVar2;
  
  bVar1 = false;
  cVar2 = FUN_140156bf0(&DAT_14032b228);
  if (cVar2 != '\0') {
    if (DAT_140321800 == '\0') {
      bVar1 = false;
    }
    else {
      bVar1 = true;
      FUN_140156b50(&DAT_14032b228);
    }
  }
  if ((DAT_14032b220 & 1) == 0) {
    DAT_14032b220 = DAT_14032b220 | 1;
    FUN_1401aa110(&DAT_14032a1c0);
    atexit(FUN_140258110);
  }
  DAT_140321800 = 0;
  if (bVar1) {
    FUN_140156be0(&DAT_14032b228);
  }
  return &DAT_14032a1c0;
}



void FUN_1401aa370(longlong param_1,int param_2)

{
  undefined8 uVar1;
  int iVar2;
  undefined8 uVar3;
  undefined1 local_58 [80];
  
  FUN_140050060(param_1,param_2 >> 3);
  if (*(int *)(param_1 + 0x18) == 0) {
    uVar3 = 0;
  }
  else {
    uVar3 = *(undefined8 *)(param_1 + 0x10);
  }
  uVar1 = FUN_1401aa2b0();
  iVar2 = FUN_1401cd700(uVar3,param_2 >> 3,uVar1);
  if (iVar2 == 0) {
    FUN_140156300(local_58,L"Create Random Block Read Error");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  return;
}



void FUN_1401aa3e0(undefined8 *param_1,longlong param_2)

{
  int iVar1;
  undefined8 uVar2;
  uint local_res10 [6];
  undefined1 local_58 [80];
  
  FUN_140050060(param_2,0x400);
  local_res10[0] = *(uint *)(param_2 + 0x18);
  if (local_res10[0] == 0) {
    uVar2 = 0;
  }
  else {
    uVar2 = *(undefined8 *)(param_2 + 0x10);
  }
  iVar1 = FUN_1401ce100(uVar2,local_res10,0,*param_1);
  if (iVar1 != 0) {
    FUN_140156300(local_58,L"PUBLIC KEY EXPORT ERROR");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  if (*(uint *)(param_2 + 0x18) < local_res10[0]) {
    FUN_140156300(local_58,L"PublicKey To Blob result is larger! Memory corruption may occur!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  FUN_140050060(param_2);
  return;
}



void FUN_1401aa4a0(undefined8 *param_1,undefined8 param_2)

{
  longlong lVar1;
  undefined8 uVar2;
  int iVar3;
  undefined1 local_58 [80];
  
  lVar1 = FUN_1401aa2b0();
  uVar2 = FUN_1401aa2b0();
  iVar3 = FUN_1401ce2b0(uVar2,*(undefined4 *)(lVar1 + 0x1058),0x80,0x10001,*param_1);
  if (iVar3 != 0) {
    FUN_140156300(local_58,L"RSA MAKE KEY ERROR");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  FUN_1401aa3e0(param_1,param_2);
  return;
}



void FUN_1401aa530(longlong param_1,longlong param_2,longlong param_3)

{
  uint uVar1;
  int iVar2;
  undefined8 *puVar3;
  longlong lVar4;
  longlong lVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  undefined8 uVar8;
  uint local_res18 [2];
  undefined8 *local_res20;
  undefined1 local_80 [72];
  
  puVar3 = operator_new(0x48);
  *puVar3 = 0;
  puVar3[1] = 0;
  puVar3[2] = 0;
  puVar3[3] = 0;
  puVar3[4] = 0;
  puVar3[5] = 0;
  puVar3[6] = 0;
  puVar3[7] = 0;
  puVar3[8] = 0;
  uVar8 = 0;
  uVar7 = uVar8;
  if (*(int *)(param_3 + 0x18) != 0) {
    uVar7 = *(undefined8 *)(param_3 + 0x10);
  }
  local_res20 = puVar3;
  iVar2 = FUN_1401cdc20(uVar7,*(int *)(param_3 + 0x18),puVar3);
  if (iVar2 != 0) {
    FUN_140156300(local_80,L"%s fail: %d",L"Proud::CRsaKey::FromBlob");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_80,(ThrowInfo *)&DAT_14031d928);
  }
  uVar1 = *(uint *)(param_2 + 0x18);
  local_res18[0] = uVar1;
  local_res18[0] = (*DAT_1403793d0)(puVar3[3]);
  FUN_140050060(param_1,local_res18[0]);
  uVar7 = uVar8;
  if (*(int *)(param_1 + 0x18) != 0) {
    uVar7 = *(undefined8 *)(param_1 + 0x10);
  }
  if (*(int *)(param_2 + 0x18) != 0) {
    uVar8 = *(undefined8 *)(param_2 + 0x10);
  }
  lVar4 = FUN_1401aa2b0();
  lVar5 = FUN_1401aa2b0();
  uVar6 = FUN_1401aa2b0();
  iVar2 = FUN_1401ce690(uVar8,uVar1,uVar7,local_res18,0,0,uVar6,*(undefined4 *)(lVar5 + 0x1058),
                        *(undefined4 *)(lVar4 + 0x105c),2,puVar3);
  if (iVar2 != 0) {
    FUN_140156300(local_80,L"%s fail: %d",L"Proud::CRsa::EncryptSessionKeyByPublicKey",1);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_80,(ThrowInfo *)&DAT_14031d928);
  }
  if (*(uint *)(param_1 + 0x18) < local_res18[0]) {
    FUN_140156300(local_80,L"Encryption result is larger! Memory corruption may occur!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_80,(ThrowInfo *)&DAT_14031d928);
  }
  FUN_140050060(param_1);
  FUN_1401cdbd0(puVar3);
  operator_delete(puVar3);
  return;
}



undefined8 *
FUN_1401aa730(undefined8 *param_1,longlong param_2,longlong param_3,undefined8 *param_4)

{
  undefined *puVar1;
  int *piVar2;
  undefined *puVar3;
  int iVar4;
  longlong lVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  int local_res10 [2];
  uint local_res18 [4];
  longlong local_88;
  undefined *local_80;
  undefined8 local_78;
  longlong local_70;
  undefined1 local_68;
  undefined **local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  
  local_78 = 0xfffffffffffffffe;
  uVar7 = 0;
  local_res10[0] = 0;
  local_res18[0] = *(uint *)(param_3 + 0x18);
  FUN_140050060(param_2);
  uVar6 = uVar7;
  if (*(int *)(param_2 + 0x18) != 0) {
    uVar6 = *(undefined8 *)(param_2 + 0x10);
  }
  iVar4 = *(int *)(param_3 + 0x18);
  if (iVar4 != 0) {
    uVar7 = *(undefined8 *)(param_3 + 0x10);
  }
  lVar5 = FUN_1401aa2b0();
  iVar4 = FUN_1401ce850(uVar7,iVar4,uVar6,local_res18,0,0,*(undefined4 *)(lVar5 + 0x105c),2,
                        local_res10,*param_4);
  if (iVar4 == 0) {
    if (local_res10[0] == 1) {
      if (*(uint *)(param_3 + 0x18) < local_res18[0]) {
        FUN_1401568c0();
        local_80 = PTR_DAT_1403200a0;
        FUN_14004ce50(&local_80,L"Decryption result is larger! Memory corruption may occur!");
        local_58 = 0;
        local_50 = 0;
        local_48 = 0;
        local_40 = 0;
        local_60 = Proud::ByteArray::vftable;
        FUN_140181f50(&local_88,6,0,&local_80,&local_60);
        FUN_1401858d0(&local_60);
        *param_1 = 0;
        FUN_14016dca0(param_1,&local_88);
        FUN_14013c530(&local_88);
        puVar3 = local_80;
        if (((local_80 != (undefined *)0x0) && (local_80 != PTR_DAT_1403200a0)) &&
           (puVar1 = local_80 + -8, puVar1 != (undefined *)0x0)) {
          uVar6 = FUN_1401568c0();
          local_70 = uVar6;
          FUN_140156b50(uVar6);
          local_68 = 1;
          piVar2 = (int *)(puVar3 + -4);
          *piVar2 = *piVar2 + -1;
          if (*piVar2 == 0) {
            FUN_140156970(puVar1);
          }
          FUN_140156be0(uVar6);
        }
      }
      else {
        FUN_140050060(param_2);
        *param_1 = 0;
      }
    }
    else {
      FUN_1401568c0();
      local_80 = PTR_DAT_1403200a0;
      FUN_14004ce50(&local_80,L"Incorrect Packet");
      local_58 = 0;
      local_50 = 0;
      local_48 = 0;
      local_40 = 0;
      local_60 = Proud::ByteArray::vftable;
      FUN_140181f50(&local_88,6,0,&local_80,&local_60);
      FUN_1401858d0(&local_60);
      *param_1 = 0;
      FUN_14016dca0(param_1,&local_88);
      lVar5 = local_88;
      if (local_88 != 0) {
        local_70 = local_88;
        FUN_140156b50(local_88);
        local_68 = 1;
        *(longlong *)(local_88 + 0x40) = *(longlong *)(local_88 + 0x40) + -1;
        if (*(longlong *)(local_88 + 0x40) == 0) {
          FUN_140156be0(lVar5);
          local_68 = 0;
          FUN_14013c4c0(local_88);
        }
        else {
          FUN_140156be0(lVar5);
        }
      }
      puVar3 = local_80;
      if (((local_80 != (undefined *)0x0) && (local_80 != PTR_DAT_1403200a0)) &&
         (puVar1 = local_80 + -8, puVar1 != (undefined *)0x0)) {
        uVar6 = FUN_1401568c0();
        local_70 = uVar6;
        FUN_140156b50(uVar6);
        local_68 = 1;
        piVar2 = (int *)(puVar3 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(puVar1);
        }
        FUN_140156be0(uVar6);
      }
    }
  }
  else {
    FUN_1401568c0();
    local_80 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_80,L"Error");
    local_58 = 0;
    local_50 = 0;
    local_48 = 0;
    local_40 = 0;
    local_60 = Proud::ByteArray::vftable;
    FUN_140181f50(&local_88,6,0,&local_80,&local_60);
    FUN_1401858d0(&local_60);
    *param_1 = 0;
    FUN_14016dca0(param_1,&local_88);
    lVar5 = local_88;
    if (local_88 != 0) {
      local_70 = local_88;
      FUN_140156b50(local_88);
      local_68 = 1;
      *(longlong *)(local_88 + 0x40) = *(longlong *)(local_88 + 0x40) + -1;
      if (*(longlong *)(local_88 + 0x40) == 0) {
        FUN_140156be0(lVar5);
        local_68 = 0;
        FUN_14013c4c0(local_88);
      }
      else {
        FUN_140156be0(lVar5);
      }
    }
    puVar3 = local_80;
    if (((local_80 != (undefined *)0x0) && (local_80 != PTR_DAT_1403200a0)) &&
       (puVar1 = local_80 + -8, puVar1 != (undefined *)0x0)) {
      uVar6 = FUN_1401568c0();
      local_70 = uVar6;
      FUN_140156b50(uVar6);
      local_68 = 1;
      piVar2 = (int *)(puVar3 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar6);
    }
  }
  return param_1;
}



ulonglong FUN_1401aab30(longlong param_1,int param_2,int param_3)

{
  int iVar1;
  longlong lVar2;
  ulonglong in_RAX;
  uint uVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  
  uVar4 = 0;
  iVar1 = *(int *)(param_1 + 0x18);
  uVar5 = uVar4;
  uVar6 = uVar4;
  if (0 < iVar1) {
    do {
      if (((longlong)uVar5 < 0) || (iVar1 <= (int)uVar4)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      lVar2 = *(longlong *)(param_1 + 0x10);
      in_RAX = *(ulonglong *)(uVar6 + 0x10 + lVar2);
      if ((*(int *)(uVar6 + lVar2) == param_2) && (*(int *)(uVar6 + 8 + lVar2) == param_3)) {
        return CONCAT71((int7)(in_RAX >> 8),1);
      }
      uVar3 = (int)uVar4 + 1;
      uVar4 = (ulonglong)uVar3;
      uVar5 = uVar5 + 1;
      uVar6 = uVar6 + 0x18;
    } while ((int)uVar3 < iVar1);
  }
  return in_RAX & 0xffffffffffffff00;
}



ulonglong FUN_1401aabb0(longlong param_1,int param_2)

{
  int iVar1;
  ulonglong in_RAX;
  uint uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  
  iVar1 = *(int *)(param_1 + 0x18);
  uVar3 = 0;
  uVar4 = uVar3;
  uVar5 = uVar3;
  if (0 < iVar1) {
    do {
      if (((longlong)uVar4 < 0) || (iVar1 <= (int)uVar3)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      in_RAX = *(ulonglong *)(uVar5 + 0x10 + *(longlong *)(param_1 + 0x10));
      if (*(int *)(uVar5 + *(longlong *)(param_1 + 0x10)) == param_2) {
        return CONCAT71((int7)(in_RAX >> 8),1);
      }
      uVar2 = (int)uVar3 + 1;
      uVar3 = (ulonglong)uVar2;
      uVar4 = uVar4 + 1;
      uVar5 = uVar5 + 0x18;
    } while ((int)uVar2 < iVar1);
  }
  return in_RAX & 0xffffffffffffff00;
}



undefined8 FUN_1401aac20(longlong param_1,int param_2,int param_3,int param_4)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  int iVar4;
  longlong lVar5;
  
  iVar1 = *(int *)(param_1 + 0x18);
  iVar4 = 0;
  lVar5 = 0;
  if (0 < iVar1) {
    lVar3 = 0;
    do {
      if ((lVar5 < 0) || (iVar1 <= iVar4)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      lVar2 = *(longlong *)(param_1 + 0x10);
      if (((*(int *)(lVar3 + 4 + lVar2) == param_2) && (*(int *)(lVar3 + lVar2) == param_3)) &&
         (*(int *)(lVar3 + 8 + lVar2) == param_4)) {
        FUN_14015c4f0(param_1,iVar4,1);
        return 1;
      }
      iVar4 = iVar4 + 1;
      lVar5 = lVar5 + 1;
      lVar3 = lVar3 + 0x18;
    } while (iVar4 < iVar1);
  }
  return 0;
}



// WARNING: Removing unreachable block (ram,0x0001401aad1d)
// WARNING: Removing unreachable block (ram,0x0001401aad26)
// WARNING: Removing unreachable block (ram,0x0001401aad44)
// WARNING: Removing unreachable block (ram,0x0001401aad4d)

undefined4 *
FUN_1401aaca0(undefined4 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined1 local_40 [56];
  
  *(undefined1 *)(param_1 + 2) = 0;
  *(undefined8 *)(param_1 + 0x16) = 0;
  *(undefined8 *)(param_1 + 4) = 0;
  *(undefined8 *)(param_1 + 6) = 0;
  *(undefined8 *)(param_1 + 8) = 0;
  param_1[0xc] = 0x11;
  *(undefined8 *)(param_1 + 10) = 0;
  param_1[0x14] = 0;
  param_1[0xd] = 0x3f400000;
  param_1[0xe] = 0x3e800000;
  param_1[0xf] = 0x40100000;
  *(undefined8 *)(param_1 + 0x10) = 0x26;
  *(undefined8 *)(param_1 + 0x12) = 0;
  *(undefined ***)(param_1 + 0x18) = Proud::CFastArray<>::vftable;
  *(undefined8 *)(param_1 + 0x1a) = 0;
  *(undefined8 *)(param_1 + 0x1c) = 0;
  *(undefined8 *)(param_1 + 0x1e) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  FUN_14015ae10(param_1 + 0x24,0x8000000000000000,param_3,param_4,0xfffffffffffffffe);
  *(undefined8 *)(param_1 + 0x34) = 0;
  *(undefined8 *)(param_1 + 0x36) = 0;
  *(undefined8 *)(param_1 + 0x38) = 0;
  *(undefined8 *)(param_1 + 0x3a) = 0;
  *(undefined ***)(param_1 + 0x32) = Proud::CP2PGroup_S::CAddMemberAckWaiterList::vftable;
  FUN_14015ae40(param_1 + 0x3c);
  *param_1 = 0;
  puVar1 = (undefined8 *)FUN_14015ae10(local_40);
  *(undefined8 *)(param_1 + 0x24) = *puVar1;
  *(undefined8 *)(param_1 + 0x26) = puVar1[1];
  *(undefined8 *)(param_1 + 0x28) = puVar1[2];
  *(undefined8 *)(param_1 + 0x2a) = puVar1[3];
  *(undefined8 *)(param_1 + 0x2c) = puVar1[4];
  *(undefined8 *)(param_1 + 0x2e) = puVar1[5];
  *(undefined8 *)(param_1 + 0x30) = puVar1[6];
  *(undefined1 *)(param_1 + 0x22) = 0;
  return param_1;
}



void FUN_1401aae40(undefined4 *param_1,undefined4 *param_2)

{
  uint uVar1;
  uint uVar2;
  longlong lVar3;
  ulonglong uVar4;
  char cVar5;
  uint *puVar6;
  uint *puVar7;
  uint local_res8 [2];
  
  if (*(longlong *)(param_1 + 10) == 0) {
    puVar7 = (uint *)0x0;
  }
  else {
    puVar7 = *(uint **)(param_1 + 6);
  }
  do {
    if (puVar7 == (uint *)0x0) {
      *param_2 = *param_1;
      return;
    }
    if (puVar7 == (uint *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    uVar1 = *puVar7;
    uVar2 = param_2[0xc];
    lVar3 = *(longlong *)(param_2 + 4);
    uVar4 = (ulonglong)uVar1 % (ulonglong)uVar2;
    local_res8[0] = uVar1;
    if (lVar3 == 0) {
LAB_1401aaefe:
      cVar5 = FUN_1401a8bb0(param_2 + 2,(ulonglong)uVar2,CONCAT71((int7)((ulonglong)lVar3 >> 8),1));
      if (cVar5 == '\0') {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x8007000e);
      }
    }
    else {
      for (puVar6 = *(uint **)(lVar3 + uVar4 * 8);
          (puVar6 != (uint *)0x0 && ((uint)uVar4 == puVar6[6] % uVar2));
          puVar6 = *(uint **)(puVar6 + 2)) {
        if (*puVar6 == uVar1) goto LAB_1401aaf3e;
      }
      if (lVar3 == 0) goto LAB_1401aaefe;
      for (puVar6 = *(uint **)(lVar3 + uVar4 * 8);
          (puVar6 != (uint *)0x0 && ((uint)uVar4 == puVar6[6] % uVar2));
          puVar6 = *(uint **)(puVar6 + 2)) {
        if (*puVar6 == uVar1) goto LAB_1401aaf3a;
      }
      if (lVar3 == 0) goto LAB_1401aaefe;
    }
    FUN_14015ce40(param_2 + 2);
    puVar6 = (uint *)FUN_14015ec60(param_2 + 2,local_res8,uVar4,uVar1);
    FUN_14015ce40(param_2 + 2);
LAB_1401aaf3a:
    *(undefined1 *)(puVar6 + 1) = 0;
LAB_1401aaf3e:
    puVar7 = *(uint **)(puVar7 + 6);
  } while( true );
}



longlong * FUN_1401aaf90(undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  uVar3 = 0;
  lVar1 = FUN_140156940(0x60);
  uVar2 = uVar3;
  if (lVar1 != 0) {
    uVar2 = FUN_1401cea30(lVar1);
  }
  FUN_14015f1f0(param_2,uVar2,param_3,param_4,uVar4);
  if (*param_2 != 0) {
    uVar3 = *(undefined8 *)(*param_2 + 0x38);
  }
  FUN_1401aae40(param_1,uVar3);
  return param_2;
}



undefined8 FUN_1401ab010(longlong param_1)

{
  undefined4 uVar1;
  char cVar2;
  longlong lVar3;
  int local_res8 [2];
  undefined1 *local_res10;
  undefined1 local_c8 [8];
  undefined1 local_c0 [8];
  longlong local_b8;
  int local_ac;
  undefined8 local_a0;
  undefined1 local_98 [144];
  
  local_a0 = 0xfffffffffffffffe;
  FUN_1401544a0(local_c8);
  lVar3 = *(longlong *)(param_1 + 8);
  if ((lVar3 == 0) && (*(longlong *)(param_1 + 0x10) == 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401561e0();
  }
  if (*(longlong *)(param_1 + 0x10) == 0) {
    if (lVar3 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(int *)(lVar3 + 0x18) == 0) {
      lVar3 = 0;
    }
    else {
      lVar3 = *(longlong *)(lVar3 + 0x10);
    }
  }
  else {
    lVar3 = *(longlong *)(param_1 + 0x10);
    if (lVar3 == 0) {
      FUN_140156300(local_98,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_98,(ThrowInfo *)&DAT_14031d928);
    }
  }
  FUN_140154120(local_c8,lVar3);
  if (*(longlong *)(param_1 + 8) == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    uVar1 = *(undefined4 *)(param_1 + 0x18);
  }
  else {
    uVar1 = *(undefined4 *)(*(longlong *)(param_1 + 8) + 0x18);
  }
  FUN_140154600(local_c8,uVar1);
  cVar2 = FUN_140154c00(local_c8,local_res8);
  if (cVar2 != '\0') {
    if (local_res8[0] == 1) {
      local_res10 = local_c0;
      FUN_1401560e0(local_c0);
      if ((local_b8 != 0) && (local_ac < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      return 1;
    }
    if (local_res8[0] == 2) {
      local_res10 = local_c0;
      FUN_1401560e0(local_c0);
      if ((local_b8 != 0) && (local_ac < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      return 2;
    }
  }
  local_res10 = local_c0;
  FUN_1401560e0(local_c0);
  if ((local_b8 != 0) && (local_ac < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return 3;
}



void FUN_1401ab1a0(longlong param_1)

{
  FUN_140174b20(param_1 + 0x50);
  FUN_1401560e0(param_1 + 0x10);
  if (*(longlong *)(param_1 + 0x18) != 0) {
    if (*(int *)(param_1 + 0x24) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_1 + 0x20) = 0;
  }
  return;
}



undefined4 * FUN_1401ab200(undefined4 *param_1)

{
  FUN_1401544a0(param_1 + 2);
  *(undefined ***)(param_1 + 0xe) = Proud::AddrPort::vftable;
  param_1[0x10] = 0;
  *(undefined2 *)(param_1 + 0x11) = 0;
  *(undefined1 *)(param_1 + 0x12) = 0;
  param_1[0xc] = 0;
  param_1[0x10] = DAT_140320450;
  *(undefined2 *)(param_1 + 0x11) = DAT_140320454;
  FUN_140174a70(param_1 + 0x14);
  *param_1 = 3;
  return param_1;
}



undefined4 * FUN_1401ab270(undefined4 *param_1,undefined4 *param_2)

{
  longlong *plVar1;
  int iVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  
  *param_1 = *param_2;
  FUN_14016dca0(param_1 + 2,param_2 + 2);
  param_1[4] = param_2[4];
  FUN_140174810(param_1 + 6,param_2 + 6);
  FUN_140174940(param_1 + 8,param_2 + 8);
  iVar2 = param_2[0x10];
  if (iVar2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_140050060(param_1 + 10,iVar2);
  uVar5 = 0;
  uVar4 = uVar5;
  if (param_2[0x10] != 0) {
    uVar4 = *(undefined8 *)(param_2 + 0xe);
  }
  uVar3 = uVar5;
  if (param_1[0x10] != 0) {
    uVar3 = *(undefined8 *)(param_1 + 0xe);
  }
  FUN_140050120(uVar3,uVar4,(longlong)iVar2);
  if (*(longlong *)(param_2 + 0x14) == *(longlong *)(param_1 + 0x14)) {
    param_1[0x19] = param_2[0x19];
    *(undefined8 *)(param_1 + 0x16) = *(undefined8 *)(param_2 + 0x16);
    param_1[0x18] = param_2[0x18];
  }
  else {
    FUN_1401560e0(param_1 + 0x14);
    if (*(longlong *)(param_2 + 0x14) != 0) {
      plVar1 = (longlong *)(*(longlong *)(param_2 + 0x14) + 0x28);
      *plVar1 = *plVar1 + 1;
      *(undefined8 *)(param_1 + 0x14) = *(undefined8 *)(param_2 + 0x14);
    }
  }
  param_1[0x1a] = param_2[0x1a];
  param_1[0x1b] = param_2[0x1b];
  param_1[0x1c] = param_2[0x1c];
  iVar2 = param_2[0x24];
  if (-1 < iVar2) {
    FUN_140050060(param_1 + 0x1e,iVar2);
    uVar4 = uVar5;
    if (param_2[0x24] != 0) {
      uVar4 = *(undefined8 *)(param_2 + 0x22);
    }
    uVar3 = uVar5;
    if (param_1[0x24] != 0) {
      uVar3 = *(undefined8 *)(param_1 + 0x22);
    }
    FUN_140050120(uVar3,uVar4,(longlong)iVar2);
    param_1[0x28] = param_2[0x28];
    param_1[0x2c] = param_2[0x2c];
    *(undefined2 *)(param_1 + 0x2d) = *(undefined2 *)(param_2 + 0x2d);
    param_1[0x2e] = param_2[0x2e];
    iVar2 = param_2[0x36];
    if (-1 < iVar2) {
      FUN_140050060(param_1 + 0x30,iVar2);
      uVar4 = uVar5;
      if (param_2[0x36] != 0) {
        uVar4 = *(undefined8 *)(param_2 + 0x34);
      }
      if (param_1[0x36] != 0) {
        uVar5 = *(undefined8 *)(param_1 + 0x34);
      }
      FUN_140050120(uVar5,uVar4,(longlong)iVar2);
      return param_1;
    }
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_1401ab440(int *param_1,int *param_2,int param_3)

{
  int iVar1;
  
  iVar1 = *param_2;
  param_1[0xc] = param_3;
  *param_1 = iVar1;
  if (*param_2 == 0) {
    FUN_1401ab270(param_1 + 0x14,param_2 + 0xc);
    return;
  }
  FUN_1401a7bc0(param_1 + 2,param_2 + 2);
  return;
}



longlong FUN_1401ab470(longlong param_1,undefined8 param_2)

{
  *(undefined8 *)(param_1 + 0x140) = param_2;
  *(longlong *)(param_1 + 0x138) = param_1;
  FUN_1401ab200();
  return param_1;
}



void FUN_1401ab4b0(longlong param_1)

{
  undefined8 uVar1;
  longlong lVar2;
  
  uVar1 = *(undefined8 *)(param_1 + 0x140);
  FUN_140156b50(uVar1);
  lVar2 = *(longlong *)(param_1 + 0x138);
  FUN_140174b20(lVar2 + 0x50);
  FUN_1401560e0(lVar2 + 0x10);
  if (*(longlong *)(lVar2 + 0x18) != 0) {
    if (*(int *)(lVar2 + 0x24) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(lVar2 + 0x20) = 0;
  }
  FUN_140156be0(uVar1);
  return;
}



longlong * FUN_1401ab540(longlong *param_1)

{
  int iVar1;
  
  if (param_1 != (longlong *)0x0) {
    iVar1 = (**(code **)(*param_1 + 8))();
    if (iVar1 == 4) {
      return param_1;
    }
  }
  return (longlong *)0x0;
}



undefined8 * FUN_1401ab570(undefined8 *param_1)

{
  int iVar1;
  
  if (param_1 != (undefined8 *)0x0) {
    iVar1 = (**(code **)*param_1)();
    if (iVar1 == 1) {
      return param_1;
    }
  }
  return (undefined8 *)0x0;
}



longlong * FUN_1401ab5a0(longlong *param_1)

{
  int iVar1;
  
  if (param_1 != (longlong *)0x0) {
    iVar1 = (**(code **)(*param_1 + 8))();
    if (iVar1 == 1) {
      return param_1 + -7;
    }
  }
  return (longlong *)0x0;
}



void FUN_1401ab5d0(longlong param_1)

{
  FUN_1401ac690(param_1 + 0x20,DAT_140320ca0);
  return;
}



void FUN_1401ab5e0(longlong param_1,longlong param_2)

{
  undefined8 *puVar1;
  longlong *plVar2;
  
  if (*(longlong *)(param_2 + 0x18) == 0) {
    puVar1 = (undefined8 *)(param_2 + 8);
    plVar2 = (longlong *)(param_1 + 8);
    if (*(longlong *)(param_2 + 0x18) != 0) {
      FUN_14018c590(plVar2,puVar1);
    }
    if (*(longlong *)(param_1 + 0x10) == 0) {
      *plVar2 = (longlong)puVar1;
    }
    else {
      *(undefined8 **)(*(longlong *)(param_1 + 0x10) + 8) = puVar1;
      *puVar1 = *(undefined8 *)(param_1 + 0x10);
    }
    *(undefined8 **)(param_1 + 0x10) = puVar1;
    *(longlong **)(param_2 + 0x18) = plVar2;
    *(int *)(param_1 + 0x18) = *(int *)(param_1 + 0x18) + 1;
  }
  FUN_1401aec50(param_1 + 0x20,1);
  return;
}



undefined8 FUN_1401ab660(undefined8 *param_1,longlong param_2,longlong *param_3)

{
  longlong *plVar1;
  char cVar2;
  undefined8 uVar3;
  
  uVar3 = (**(code **)(*(longlong *)*param_1 + 8))();
  FUN_140156b50(uVar3);
  do {
    do {
      if (*(int *)(param_1 + 3) < 1) {
        FUN_140156be0(uVar3);
        return 0;
      }
      plVar1 = *(longlong **)(param_1[1] + 0x18);
      if (plVar1[3] != 0) {
        FUN_14018c590();
      }
      cVar2 = (**(code **)(*plVar1 + 0x10))(plVar1);
    } while (((cVar2 != '\0') || (cVar2 = (**(code **)(*plVar1 + 0x18))(plVar1), cVar2 != '\0')) ||
            (cVar2 = (**(code **)(*plVar1 + 0x28))(plVar1,param_2), cVar2 == '\0'));
    cVar2 = (**(code **)(*(longlong *)*param_1 + 0x18))
                      ((longlong *)*param_1,*(undefined4 *)(param_2 + 0x30));
  } while (cVar2 == '\0');
  (**(code **)(*plVar1 + 0x20))(plVar1,1);
  *param_3 = plVar1[5];
  FUN_140156be0(uVar3);
  return 1;
}



void FUN_1401ab750(undefined8 *param_1,undefined4 param_2,char param_3,undefined8 param_4)

{
  longlong lVar1;
  char cVar2;
  undefined8 uVar3;
  longlong *plVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  
  uVar5 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*(longlong *)*param_1 + 8))();
  uVar6 = uVar3;
  FUN_140156b50(uVar3);
  lVar1 = *(longlong *)*param_1;
  plVar4 = (longlong *)
           (**(code **)(lVar1 + 0x10))((longlong *)*param_1,param_2,lVar1,param_4,uVar5,uVar6,1);
  if (plVar4 != (longlong *)0x0) {
    (**(code **)(*plVar4 + 0x20))(plVar4,param_3);
    if (param_3 == '\0') {
      cVar2 = (**(code **)(*plVar4 + 0x10))(plVar4);
      if (cVar2 == '\0') {
        FUN_1401ab5e0(param_1,plVar4);
      }
    }
  }
  FUN_140156be0(uVar3);
  return;
}



void FUN_1401ab800(undefined8 *param_1)

{
  *param_1 = Proud::ITaskSubject::vftable;
  if (param_1[3] != 0) {
    FUN_14018c590();
  }
  return;
}



undefined8 *
FUN_1401ab830(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  param_1[1] = 0;
  param_1[2] = 0;
  *(undefined4 *)(param_1 + 3) = 0;
  FUN_1401aec30(param_1 + 4,0,0x7fffffff,param_4,0xfffffffffffffffe);
  *param_1 = param_2;
  return param_1;
}



undefined8 * FUN_1401ab880(undefined8 *param_1)

{
  *param_1 = Proud::ITaskSubject::vftable;
  param_1[4] = param_1;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[5] = 0;
  return param_1;
}



undefined8 * FUN_1401ab8b0(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::ITaskSubject::vftable;
  if (param_1[3] != 0) {
    FUN_14018c590();
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined4 * FUN_1401ab900(undefined4 *param_1)

{
  undefined4 uVar1;
  
  *(double *)(param_1 + 2) = DAT_140320d28 * 10.0 * 2.0;
  uVar1 = DAT_1403288e4;
  *param_1 = 0;
  param_1[4] = uVar1;
  param_1[1] = 0x10000;
  param_1[5] = DAT_140320dc0;
  *(undefined1 *)(param_1 + 6) = 1;
  *(undefined2 *)(param_1 + 9) = 0x100;
  *(undefined1 *)((longlong)param_1 + 0x27) = 1;
  *(undefined8 *)(param_1 + 7) = 0x80;
  *(undefined1 *)((longlong)param_1 + 0x26) = DAT_140320d75;
  param_1[10] = 0;
  *(undefined1 *)((longlong)param_1 + 0x2d) = 0;
  return param_1;
}



int FUN_1401ab970(undefined8 param_1)

{
  int iVar1;
  
  iVar1 = FUN_1401a4af0(param_1,0x7fffffff);
  if (iVar1 == 0) {
    iVar1 = 1;
  }
  return iVar1;
}



// WARNING: Removing unreachable block (ram,0x0001401ab9c0)

void FUN_1401ab990(undefined8 param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  longlong *plVar1;
  longlong lVar2;
  
  plVar1 = (longlong *)(param_4 + 2);
  *param_4 = 1;
  param_4[1] = param_2;
  FUN_1401560e0(plVar1);
  *(undefined8 *)(param_4 + 6) = 0;
  *(undefined8 *)(param_4 + 4) = 0;
  if (*plVar1 == 0) {
    lVar2 = FUN_140156120();
    *plVar1 = lVar2;
    *(undefined8 *)(lVar2 + 0x28) = 1;
  }
  thunk_FUN_1401848c0(param_3,plVar1);
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401aba10(int *param_1,longlong param_2,undefined8 param_3)

{
  longlong lVar1;
  int iVar2;
  longlong lVar3;
  undefined1 auStack_1a08 [32];
  undefined1 local_19e8 [72];
  undefined8 local_19a0;
  undefined1 local_1998 [80];
  undefined1 local_1948 [3200];
  longlong local_cc8;
  undefined4 local_cc0;
  int local_cbc;
  undefined1 local_cb8 [3200];
  longlong local_38;
  int local_2c;
  ulonglong local_28;
  undefined8 uStack_20;
  
  uStack_20 = 0x1401aba1e;
  local_19a0 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_1a08;
  if (*(longlong *)(param_2 + 0xc80) == 0) {
    FUN_140156300(local_19e8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_19e8,(ThrowInfo *)&DAT_14031d928);
  }
  if (*(int *)(param_2 + 0xc8c) < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  lVar3 = 0;
  *(undefined4 *)(param_2 + 0xc88) = 0;
  FUN_14004fd90(param_3,0x13);
  FUN_14004fd90(param_3,(char)*param_1);
  if (*param_1 == 1) {
    FUN_14004fe70(param_3,param_1[1]);
    if (*(longlong *)(param_1 + 2) == 0) {
      if (*(longlong *)(param_1 + 4) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      iVar2 = param_1[6];
    }
    else {
      iVar2 = *(int *)(*(longlong *)(param_1 + 2) + 0x18);
    }
    FUN_140155b20(param_3,(longlong)iVar2);
    FUN_1401570d0(local_1948,param_3);
    FUN_140156ed0(param_2,local_1948);
    if (local_cc8 == 0) {
      FUN_140156300(local_19e8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_19e8,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_cbc < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_cc0 = 0;
    lVar1 = *(longlong *)(param_1 + 2);
    if ((lVar1 == 0) && (*(longlong *)(param_1 + 4) == 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(longlong *)(param_1 + 4) == 0) {
      if (lVar1 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(int *)(lVar1 + 0x18) != 0) {
        lVar3 = *(longlong *)(lVar1 + 0x10);
      }
    }
    else {
      lVar3 = *(longlong *)(param_1 + 4);
      if (lVar3 == 0) {
        FUN_140156300(local_1998,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_1998,(ThrowInfo *)&DAT_14031d928);
      }
    }
    FUN_140156e40(param_2,lVar3);
  }
  else if (*param_1 == 2) {
    if ((*(longlong **)(param_1 + 8) == (longlong *)0x0) ||
       (lVar3 = **(longlong **)(param_1 + 8), lVar3 == 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_1401ac2f0(lVar3,param_3);
    FUN_14004fe70(param_3,param_1[0xd]);
    FUN_14004fe70(param_3,param_1[0xc]);
    FUN_1401570d0(local_cb8,param_3);
    FUN_140156ed0(param_2,local_cb8);
    if (local_38 == 0) {
      FUN_140156300(local_19e8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_19e8,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_2c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  return;
}



int FUN_1401abc90(longlong param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  int iVar4;
  
  iVar4 = *(int *)(param_1 + 0x24);
  if (iVar4 == 0) {
    iVar2 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
    iVar4 = 0x400;
    if (iVar2 < 0x400) {
      iVar4 = iVar2;
    }
    iVar2 = 4;
    if (4 < iVar4) {
      iVar2 = iVar4;
    }
    iVar4 = iVar2 + param_2;
    if (iVar2 + param_2 < *(int *)(param_1 + 0x20)) {
      iVar4 = *(int *)(param_1 + 0x20);
    }
    return iVar4;
  }
  if (iVar4 != 1) {
    if (iVar4 != 2) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (param_2 < *(int *)(param_1 + 0x20)) {
      param_2 = *(int *)(param_1 + 0x20);
    }
    return param_2;
  }
  uVar1 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
  uVar3 = 0x10;
  if (0x10 < (int)uVar1) {
    uVar3 = uVar1;
  }
  if (uVar3 < 9) {
    uVar3 = 8;
  }
  iVar4 = uVar3 + param_2;
  if ((int)(uVar3 + param_2) < *(int *)(param_1 + 0x20)) {
    iVar4 = *(int *)(param_1 + 0x20);
  }
  return iVar4;
}



void FUN_1401abd30(longlong *param_1,longlong *param_2,int param_3,int param_4)

{
  longlong lVar1;
  longlong lVar2;
  void *pvVar3;
  void *_Dst;
  int iVar4;
  
  lVar1 = *param_2;
  if (lVar1 == 0) {
    if (param_2[1] == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar4 = (int)param_2[2];
  }
  else {
    iVar4 = *(int *)(lVar1 + 0x18);
  }
  if (iVar4 < param_3 + param_4) {
                    // WARNING: Subroutine does not return
    FUN_1401566e0();
  }
  if ((0 < param_4) && (param_1[1] == 0)) {
    lVar2 = *param_1;
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(int *)(lVar2 + 0x18) == 0) {
      lVar2 = 0;
    }
    else {
      lVar2 = *(longlong *)(lVar2 + 0x10);
    }
    if (lVar2 == 0) goto LAB_1401abdbe;
  }
  _Dst = (void *)param_2[1];
  pvVar3 = _Dst;
  if (_Dst == (void *)0x0) {
    if (lVar1 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(int *)(lVar1 + 0x18) == 0) {
      pvVar3 = (void *)0x0;
    }
    else {
      pvVar3 = *(void **)(lVar1 + 0x10);
    }
  }
  if (pvVar3 != (void *)0x0) {
    lVar2 = param_1[1];
    if (lVar2 == 0) {
      lVar2 = *param_1;
      if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(int *)(lVar2 + 0x18) == 0) {
        lVar2 = 0;
      }
      else {
        lVar2 = *(longlong *)(lVar2 + 0x10);
      }
    }
    if (_Dst == (void *)0x0) {
      if (lVar1 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(int *)(lVar1 + 0x18) == 0) {
        memmove((void *)0x0,(void *)(lVar2 + param_3),(longlong)param_4);
        return;
      }
      _Dst = *(void **)(lVar1 + 0x10);
    }
    memmove(_Dst,(void *)(lVar2 + param_3),(longlong)param_4);
    return;
  }
LAB_1401abdbe:
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



ulonglong FUN_1401abe40(longlong param_1,undefined8 param_2)

{
  longlong lVar1;
  undefined4 uVar2;
  ulonglong uVar3;
  longlong lVar4;
  int iVar5;
  undefined4 local_res18 [2];
  undefined4 local_res20 [2];
  undefined4 local_28;
  undefined4 local_24 [3];
  
  uVar3 = FUN_140154a70(param_2,local_res18);
  if ((char)uVar3 == '\0') {
    return uVar3;
  }
  FUN_14019ec50(param_1,local_res18[0]);
  uVar3 = (ulonglong)*(uint *)(param_1 + 0x18);
  iVar5 = 0;
  lVar4 = 0;
  if (0 < (int)*(uint *)(param_1 + 0x18)) {
    do {
      if ((lVar4 < 0) || ((int)uVar3 <= iVar5)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      lVar1 = *(longlong *)(param_1 + 0x10);
      uVar3 = FUN_1401543d0(param_2,local_res18,1);
      if ((char)uVar3 == '\0') goto LAB_1401abf5d;
      if ((char)local_res18[0] == '\0') {
        uVar3 = FUN_1401543d0(param_2,local_res20,4);
        if ((char)uVar3 == '\0') {
LAB_1401abf56:
          *(undefined4 *)(lVar1 + lVar4 * 8) = 0;
LAB_1401abf5d:
          return uVar3 & 0xffffffffffffff00;
        }
        *(undefined4 *)(lVar1 + lVar4 * 8) = local_res20[0];
        uVar2 = local_res20[0];
      }
      else {
        uVar3 = FUN_1401543d0(param_2,&local_28,4);
        if ((char)uVar3 == '\0') goto LAB_1401abf56;
        *(undefined4 *)(lVar1 + lVar4 * 8) = local_28;
        uVar3 = FUN_1401543d0(param_2,local_24,4);
        uVar2 = local_24[0];
        if ((char)uVar3 == '\0') {
          *(undefined4 *)(lVar1 + 4 + lVar4 * 8) = 0;
          return uVar3 & 0xffffffffffffff00;
        }
      }
      *(undefined4 *)(lVar1 + 4 + lVar4 * 8) = uVar2;
      uVar3 = (ulonglong)*(uint *)(param_1 + 0x18);
      iVar5 = iVar5 + 1;
      lVar4 = lVar4 + 1;
    } while (iVar5 < (int)*(uint *)(param_1 + 0x18));
  }
  return CONCAT71((int7)(uVar3 >> 8),1);
}



longlong * FUN_1401abf70(longlong *param_1,longlong *param_2)

{
  undefined4 uVar1;
  longlong lVar2;
  int iVar3;
  undefined8 uVar4;
  undefined1 local_50 [72];
  
  uVar4 = 0xfffffffffffffffe;
  if (param_1[1] != 0) {
    FUN_140156300(local_50,PTR_u_exception_due_to_using_external_b_140320018);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
  }
  param_2[2] = 0;
  param_2[1] = 0;
  *param_2 = 0;
  if (*param_1 != 0) {
    FUN_140153d40(param_2);
    if (*param_1 == 0) {
      if (param_1[1] == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      iVar3 = (int)param_1[2];
    }
    else {
      iVar3 = *(int *)(*param_1 + 0x18);
    }
    if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (param_2[1] == 0) {
      lVar2 = *param_2;
      if (iVar3 < 1) {
        if (lVar2 == 0) goto LAB_1401ac038;
        iVar3 = 0;
      }
      else if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      FUN_140050060(lVar2,iVar3);
    }
    else {
      if (*(int *)((longlong)param_2 + 0x14) < iVar3) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      *(int *)(param_2 + 2) = iVar3;
    }
LAB_1401ac038:
    if (*param_1 != 0) {
      uVar1 = *(undefined4 *)(*param_1 + 0x18);
      goto LAB_1401ac057;
    }
  }
  if (param_1[1] == 0) {
                    // WARNING: Subroutine does not return
    FUN_1401561e0();
  }
  uVar1 = (undefined4)param_1[2];
LAB_1401ac057:
  FUN_1401abd30(param_1,param_2,0,uVar1,uVar4);
  return param_2;
}



void FUN_1401ac080(longlong param_1,int param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  longlong lVar4;
  undefined8 *_Src;
  longlong lVar5;
  undefined8 *puVar6;
  longlong lVar7;
  
  iVar1 = *(int *)(param_1 + 0x18);
  lVar5 = (longlong)iVar1;
  if (iVar1 == 0) {
    iVar1 = *(int *)(param_1 + 0x18);
    FUN_14019ec50(param_1,iVar1 + 1);
    puVar6 = (undefined8 *)0x0;
    if (0 < iVar1) {
      _Src = puVar6;
      if (*(int *)(param_1 + 0x18) != 0) {
        _Src = *(undefined8 **)(param_1 + 0x10);
      }
      memmove(_Src + 1,_Src,(longlong)iVar1 << 3);
    }
    if (*(int *)(param_1 + 0x18) != 0) {
      puVar6 = *(undefined8 **)(param_1 + 0x10);
    }
    *puVar6 = CONCAT44(param_2,param_2);
  }
  else {
    iVar3 = iVar1 + -1;
    if ((iVar3 < 0) || (iVar1 <= iVar3)) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    lVar7 = *(longlong *)(param_1 + 0x10);
    lVar4 = (longlong)iVar3;
    iVar3 = *(int *)(lVar7 + lVar4 * 8);
    if ((iVar3 != param_2) && (iVar2 = *(int *)(lVar7 + 4 + lVar4 * 8), iVar2 != param_2)) {
      if ((iVar2 + 1 != param_2) && (iVar3 + 1 != param_2)) {
        if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        iVar3 = *(int *)(param_1 + 0x18);
        FUN_14019ec50(param_1,iVar3 + 1);
        iVar3 = iVar3 - iVar1;
        lVar7 = 0;
        if (0 < iVar3) {
          lVar4 = lVar7;
          if (*(int *)(param_1 + 0x18) != 0) {
            lVar4 = *(longlong *)(param_1 + 0x10);
          }
          memmove((void *)(lVar4 + 8 + lVar5 * 8),(void *)(lVar4 + lVar5 * 8),(longlong)iVar3 << 3);
        }
        if (*(int *)(param_1 + 0x18) != 0) {
          lVar7 = *(longlong *)(param_1 + 0x10);
        }
        *(ulonglong *)(lVar7 + lVar5 * 8) = CONCAT44(param_2,param_2);
        return;
      }
      *(int *)(lVar7 + 4 + lVar4 * 8) = param_2;
      return;
    }
  }
  return;
}



void FUN_1401ac1d0(longlong param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  int iVar5;
  ulonglong uVar6;
  int iVar7;
  longlong lVar8;
  undefined4 uStackX_c;
  
  FUN_14015cb30(param_2,0);
  iVar5 = *(int *)(param_1 + 0x18);
  iVar7 = 0;
  lVar8 = 0;
  if (0 < iVar5) {
    do {
      if ((lVar8 < 0) || (iVar5 <= iVar7)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      uVar6 = *(ulonglong *)(*(longlong *)(param_1 + 0x10) + lVar8 * 8);
      uStackX_c = (int)(uVar6 >> 0x20);
      uVar6 = uVar6 & 0xffffffff;
      while( true ) {
        iVar5 = *(int *)(param_2 + 0x18);
        lVar4 = (longlong)iVar5;
        if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        iVar3 = *(int *)(param_2 + 0x18);
        FUN_14015cb30(param_2,iVar3 + 1);
        iVar3 = iVar3 - iVar5;
        if (0 < iVar3) {
          if (*(int *)(param_2 + 0x18) == 0) {
            lVar2 = 0;
            lVar1 = 0;
          }
          else {
            lVar2 = *(longlong *)(param_2 + 0x10);
            lVar1 = *(longlong *)(param_2 + 0x10);
          }
          memmove((void *)(lVar1 + 4 + lVar4 * 4),(void *)(lVar2 + lVar4 * 4),(longlong)iVar3 << 2);
        }
        if (*(int *)(param_2 + 0x18) == 0) {
          lVar2 = 0;
        }
        else {
          lVar2 = *(longlong *)(param_2 + 0x10);
        }
        iVar5 = (int)uVar6;
        *(int *)(lVar2 + lVar4 * 4) = iVar5;
        if (iVar5 == uStackX_c) break;
        uVar6 = (ulonglong)(iVar5 + 1);
      }
      iVar5 = *(int *)(param_1 + 0x18);
      iVar7 = iVar7 + 1;
      lVar8 = lVar8 + 1;
    } while (iVar7 < iVar5);
  }
  return;
}



void FUN_1401ac2f0(longlong param_1,undefined8 param_2)

{
  ulonglong uVar1;
  int iVar2;
  ulonglong uVar3;
  uint uVar4;
  ulonglong uVar5;
  
  FUN_140155b20(param_2,(longlong)*(int *)(param_1 + 0x18));
  iVar2 = *(int *)(param_1 + 0x18);
  uVar3 = 0;
  uVar5 = uVar3;
  if (0 < iVar2) {
    do {
      if (((longlong)uVar3 < 0) || (iVar2 <= (int)uVar5)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      uVar1 = *(ulonglong *)(*(longlong *)(param_1 + 0x10) + uVar3 * 8);
      if ((int)uVar1 == (int)(uVar1 >> 0x20)) {
        FUN_14004fd90(param_2,0);
      }
      else {
        FUN_14004fd90(param_2,1);
        FUN_14004fe70(param_2,uVar1 & 0xffffffff);
      }
      FUN_14004fe70(param_2);
      iVar2 = *(int *)(param_1 + 0x18);
      uVar4 = (int)uVar5 + 1;
      uVar3 = uVar3 + 1;
      uVar5 = (ulonglong)uVar4;
    } while ((int)uVar4 < iVar2);
  }
  return;
}



longlong * FUN_1401ac3a0(longlong param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  
  lVar4 = 0;
  FUN_14016b910(param_2,param_3,param_3,param_4,0xfffffffffffffffe);
  lVar3 = lVar4;
  if ((longlong *)*param_2 != (longlong *)0x0) {
    lVar3 = *(longlong *)*param_2;
  }
  iVar1 = *(int *)(param_1 + 0x18);
  if (-1 < iVar1) {
    FUN_14019ec50(lVar3,iVar1);
    lVar2 = lVar4;
    if (*(int *)(param_1 + 0x18) != 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
    }
    if (*(int *)(lVar3 + 0x18) != 0) {
      lVar4 = *(longlong *)(lVar3 + 0x10);
    }
    FUN_140050120(lVar4,lVar2,(longlong)iVar1 << 3);
    return param_2;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_1401ac450(undefined4 *param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 *puVar3;
  longlong *plVar4;
  longlong *plVar5;
  longlong lVar6;
  longlong *local_30;
  longlong *local_28;
  longlong local_20;
  
  param_2[1] = param_1[1];
  lVar6 = 0;
  if ((*(longlong *)(param_1 + 2) == 0) && (*(longlong *)(param_1 + 4) == 0)) {
    local_20 = 0;
    local_28 = (longlong *)0x0;
    local_30 = (longlong *)0x0;
    if (*(longlong *)(param_2 + 2) == 0) {
      *(undefined8 *)(param_2 + 4) = 0;
      *(undefined8 *)(param_2 + 6) = 0;
    }
    else {
      FUN_1401560e0(param_2 + 2);
      if (local_30 != (longlong *)0x0) {
        local_30[5] = local_30[5] + 1;
        *(longlong **)(param_2 + 2) = local_30;
      }
    }
    FUN_1401560e0(&local_30);
    if ((local_28 != (longlong *)0x0) && (local_20 < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  else {
    plVar5 = (longlong *)FUN_1401abf70(param_1 + 2,&local_30,param_3,param_4,0xfffffffffffffffe);
    if (*plVar5 == *(longlong *)(param_2 + 2)) {
      param_2[7] = *(undefined4 *)((longlong)plVar5 + 0x14);
      *(longlong *)(param_2 + 4) = plVar5[1];
      param_2[6] = (int)plVar5[2];
    }
    else {
      FUN_1401560e0(param_2 + 2);
      if (*plVar5 != 0) {
        plVar1 = (longlong *)(*plVar5 + 0x28);
        *plVar1 = *plVar1 + 1;
        *(longlong *)(param_2 + 2) = *plVar5;
      }
    }
    FUN_1401560e0(&local_30);
    if ((local_28 != (longlong *)0x0) && (local_20 < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  *param_2 = *param_1;
  plVar5 = *(longlong **)(param_1 + 8);
  if ((plVar5 == (longlong *)0x0) || (*plVar5 == 0)) {
    local_30 = (longlong *)0x0;
    if (*(longlong *)(param_2 + 8) != 0) {
      plVar5 = (longlong *)(*(longlong *)(param_2 + 8) + 8);
      *plVar5 = *plVar5 + -1;
      if (*plVar5 == 0) {
        local_28 = (longlong *)param_3;
        FUN_140161ae0(param_2 + 8,*(undefined8 *)(param_2 + 8));
      }
    }
    *(undefined8 *)(param_2 + 8) = 0;
    *(undefined8 *)(param_2 + 10) = param_3;
  }
  else {
    plVar5 = (longlong *)FUN_1401ac3a0(*plVar5,&local_30,param_3);
    lVar2 = *plVar5;
    if (lVar2 != 0) {
      *(longlong *)(lVar2 + 8) = *(longlong *)(lVar2 + 8) + 1;
      lVar6 = lVar2;
    }
    if (*(longlong *)(param_2 + 8) != 0) {
      plVar1 = (longlong *)(*(longlong *)(param_2 + 8) + 8);
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_140161ae0(param_2 + 8,*(undefined8 *)(param_2 + 8));
      }
    }
    plVar4 = local_28;
    plVar1 = local_30;
    *(longlong *)(param_2 + 8) = lVar6;
    *(longlong *)(param_2 + 10) = plVar5[1];
    if (local_30 != (longlong *)0x0) {
      plVar5 = local_30 + 1;
      *plVar5 = *plVar5 + -1;
      if (*plVar5 == 0) {
        puVar3 = (undefined8 *)*local_30;
        *puVar3 = Proud::CFastArray<>::vftable;
        if (puVar3[2] != 0) {
          plVar5 = (longlong *)puVar3[1];
          if (plVar5 == (longlong *)0x0) {
            FUN_140156970();
          }
          else {
            (**(code **)(*plVar5 + 0x18))(plVar5,puVar3[2]);
          }
        }
        (**(code **)(*plVar4 + 0x18))(plVar4,puVar3);
        (**(code **)(*local_28 + 0x18))(local_28,plVar1);
      }
    }
  }
  param_2[0xc] = param_1[0xc];
  param_2[0xd] = param_1[0xd];
  return;
}



bool FUN_1401ac690(undefined8 *param_1,DWORD param_2)

{
  DWORD DVar1;
  
  DVar1 = WaitForSingleObject((HANDLE)*param_1,param_2);
  return DVar1 == 0;
}



bool FUN_1401ac6b0(undefined8 *param_1)

{
  DWORD DVar1;
  
  DVar1 = WaitForSingleObject((HANDLE)*param_1,0xffffffff);
  return DVar1 == 0;
}



DWORD FUN_1401ac6d0(longlong param_1,uint param_2,DWORD param_3,BOOL param_4)

{
  longlong lVar1;
  DWORD DVar2;
  DWORD DVar3;
  longlong lVar4;
  undefined1 local_258 [72];
  HANDLE apvStack_210 [65];
  
  if ((int)param_2 < 0x41) {
    lVar4 = 0;
    if (0 < (int)param_2) {
      do {
        lVar1 = lVar4 * 8;
        lVar4 = lVar4 + 1;
        apvStack_210[lVar4] = (HANDLE)**(undefined8 **)(param_1 + lVar1);
      } while (lVar4 < (int)param_2);
    }
    DVar2 = WaitForMultipleObjects(param_2,apvStack_210 + 1,param_4,param_3);
    DVar3 = 0xffffffff;
    if (DVar2 < param_2) {
      DVar3 = DVar2;
    }
    return DVar3;
  }
  FUN_140156300(local_258,&DAT_14026e640);
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_258,(ThrowInfo *)&DAT_14031d928);
}



void FUN_1401ac760(undefined8 *param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001401ac763. Too many branches
                    // WARNING: Treating indirect jump as call
  CloseHandle((HANDLE)*param_1);
  return;
}



undefined8 * FUN_1401ac770(undefined8 *param_1)

{
  HANDLE pvVar1;
  
  pvVar1 = CreateEventW((LPSECURITY_ATTRIBUTES)0x0,0,0,(LPCWSTR)0x0);
  *param_1 = pvVar1;
  return param_1;
}



undefined8 * FUN_1401ac7a0(undefined8 *param_1,byte param_2,byte param_3)

{
  HANDLE pvVar1;
  
  pvVar1 = CreateEventW((LPSECURITY_ATTRIBUTES)0x0,(uint)param_2,(uint)param_3,(LPCWSTR)0x0);
  *param_1 = pvVar1;
  return param_1;
}



void FUN_1401ac7d0(undefined4 param_1,undefined8 param_2)

{
  undefined4 local_28 [2];
  undefined8 local_20;
  undefined4 local_18;
  undefined4 local_14;
  
  Sleep(10);
  local_28[0] = 0x1000;
  local_14 = 0;
  local_20 = param_2;
  local_18 = param_1;
  RaiseException(0x406d1388,0,3,(ULONG_PTR *)local_28);
  return;
}



ulonglong FUN_1401ac850(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined4 param_4
                       )

{
  uint uVar1;
  ulonglong uVar2;
  undefined8 local_68;
  undefined4 local_60;
  undefined8 local_58;
  undefined4 local_50;
  undefined4 local_4c;
  undefined1 *local_38;
  undefined1 *local_30;
  undefined8 local_28;
  
  local_50 = *param_2;
  local_38 = &LAB_1401ac830;
  local_30 = &LAB_1401ac840;
  local_28 = 0;
  local_68 = param_3;
  local_60 = param_4;
  local_58 = param_1;
  uVar2 = FUN_1401d1150(&local_68,0xffffffff,"1.2.5",0x58);
  if ((int)uVar2 == 0) {
    uVar1 = FUN_1401d05a0(&local_68,4);
    uVar2 = (ulonglong)uVar1;
    if (uVar1 != 1) {
      FUN_1401cedf0(&local_68);
      if (uVar1 == 0) {
        uVar2 = 0xfffffffb;
      }
      return uVar2;
    }
    *param_2 = local_4c;
    uVar2 = FUN_1401cedf0(&local_68);
  }
  return uVar2;
}



ulonglong FUN_1401ac910(undefined8 param_1,undefined4 *param_2,undefined8 param_3,int param_4)

{
  uint uVar1;
  ulonglong uVar2;
  undefined8 local_68;
  int local_60;
  undefined8 local_58;
  undefined4 local_50;
  undefined4 local_4c;
  undefined1 *local_38;
  undefined1 *local_30;
  
  local_50 = *param_2;
  local_38 = &LAB_1401ac830;
  local_30 = &LAB_1401ac840;
  local_68 = param_3;
  local_60 = param_4;
  local_58 = param_1;
  uVar2 = FUN_1401acc20(&local_68,"1.2.5",0x58);
  if ((int)uVar2 == 0) {
    uVar1 = FUN_1401ad0c0(&local_68,4);
    if (uVar1 != 1) {
      FUN_1401acd30(&local_68);
      if ((uVar1 != 2) && ((uVar1 != 0xfffffffb || (local_60 != 0)))) {
        return (ulonglong)uVar1;
      }
      return 0xfffffffd;
    }
    *param_2 = local_4c;
    uVar2 = FUN_1401acd30(&local_68);
  }
  return uVar2;
}



int FUN_1401ac9e0(uint param_1)

{
  return (param_1 >> 0xc) + 0xd + (param_1 >> 0xe) + param_1 + (param_1 >> 0x19);
}



undefined8 FUN_1401aca00(longlong param_1)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  if ((param_1 != 0) && (puVar2 = *(undefined8 **)(param_1 + 0x28), puVar2 != (undefined8 *)0x0)) {
    *(undefined4 *)((longlong)puVar2 + 0x1c) = 0;
    *(undefined4 *)(param_1 + 0x1c) = 0;
    *(undefined4 *)(param_1 + 0xc) = 0;
    *(undefined8 *)(param_1 + 0x20) = 0;
    *(undefined4 *)(param_1 + 0x4c) = 1;
    *puVar2 = 0;
    *(undefined4 *)((longlong)puVar2 + 0xc) = 0;
    puVar2[4] = 0;
    *(undefined8 *)((longlong)puVar2 + 0x2c) = 0;
    *(undefined4 *)((longlong)puVar2 + 0x34) = 0;
    puVar2[8] = 0;
    puVar1 = puVar2 + 0xa9;
    puVar2[0x10] = puVar1;
    puVar2[0xc] = puVar1;
    puVar2[0xb] = puVar1;
    *(undefined4 *)((longlong)puVar2 + 0x14) = 0x8000;
    *(undefined4 *)(puVar2 + 0x37b) = 1;
    *(undefined4 *)((longlong)puVar2 + 0x1bdc) = 0xffffffff;
    return 0;
  }
  return 0xfffffffe;
}



undefined8 FUN_1401aca80(longlong param_1,uint param_2)

{
  longlong lVar1;
  undefined8 uVar2;
  int iVar3;
  
  if ((param_1 != 0) && (lVar1 = *(longlong *)(param_1 + 0x28), lVar1 != 0)) {
    if ((int)param_2 < 0) {
      iVar3 = 0;
      param_2 = -param_2;
    }
    else {
      iVar3 = ((int)param_2 >> 4) + 1;
      if ((int)param_2 < 0x30) {
        param_2 = param_2 & 0xf;
      }
    }
    if ((param_2 == 0) || ((7 < (int)param_2 && ((int)param_2 < 0x10)))) {
      if ((*(longlong *)(lVar1 + 0x38) != 0) && (*(uint *)(lVar1 + 0x28) != param_2)) {
        (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40));
        *(undefined8 *)(lVar1 + 0x38) = 0;
      }
      *(int *)(lVar1 + 8) = iVar3;
      *(uint *)(lVar1 + 0x28) = param_2;
      uVar2 = FUN_1401aca00(param_1);
    }
    else {
      uVar2 = 0xfffffffe;
    }
    return uVar2;
  }
  return 0xfffffffe;
}



int FUN_1401acb30(longlong param_1,undefined4 param_2,char *param_3,int param_4)

{
  int iVar1;
  code *pcVar2;
  longlong lVar3;
  
  if (((param_3 != (char *)0x0) && (*param_3 == '1')) && (param_4 == 0x58)) {
    if (param_1 != 0) {
      *(undefined8 *)(param_1 + 0x20) = 0;
      if (*(longlong *)(param_1 + 0x30) == 0) {
        *(undefined8 *)(param_1 + 0x40) = 0;
        *(code **)(param_1 + 0x30) = FUN_1401d1190;
      }
      pcVar2 = *(code **)(param_1 + 0x38);
      if (pcVar2 == (code *)0x0) {
        pcVar2 = FUN_1401d11a0;
      }
      *(code **)(param_1 + 0x38) = pcVar2;
      lVar3 = (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x40),1,0x1be8);
      if (lVar3 == 0) {
        iVar1 = -4;
      }
      else {
        *(longlong *)(param_1 + 0x28) = lVar3;
        *(undefined8 *)(lVar3 + 0x38) = 0;
        iVar1 = FUN_1401aca80(param_1,param_2);
        if (iVar1 != 0) {
          (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40),lVar3);
          *(undefined8 *)(param_1 + 0x28) = 0;
        }
      }
      return iVar1;
    }
    return -2;
  }
  return -6;
}



void FUN_1401acc20(undefined8 param_1,undefined8 param_2,undefined4 param_3)

{
  FUN_1401acb30(param_1,0xf,param_2,param_3);
  return;
}



undefined8 FUN_1401acc30(longlong param_1,int param_2)

{
  longlong lVar1;
  int iVar2;
  longlong lVar3;
  uint uVar4;
  uint uVar5;
  
  lVar1 = *(longlong *)(param_1 + 0x28);
  if (*(longlong *)(lVar1 + 0x38) == 0) {
    lVar3 = (**(code **)(param_1 + 0x30))
                      (*(undefined8 *)(param_1 + 0x40),
                       1 << ((byte)*(undefined4 *)(lVar1 + 0x28) & 0x1f),1);
    *(longlong *)(lVar1 + 0x38) = lVar3;
    if (lVar3 == 0) {
      return 1;
    }
  }
  if (*(int *)(lVar1 + 0x2c) == 0) {
    *(undefined8 *)(lVar1 + 0x30) = 0;
    *(int *)(lVar1 + 0x2c) = 1 << ((byte)*(undefined4 *)(lVar1 + 0x28) & 0x1f);
  }
  uVar4 = param_2 - *(int *)(param_1 + 0x18);
  uVar5 = *(uint *)(lVar1 + 0x2c);
  if (uVar4 < uVar5) {
    uVar5 = uVar5 - *(int *)(lVar1 + 0x34);
    if (uVar4 < uVar5) {
      uVar5 = uVar4;
    }
    memcpy((void *)((ulonglong)*(uint *)(lVar1 + 0x34) + *(longlong *)(lVar1 + 0x38)),
           (void *)(*(longlong *)(param_1 + 0x10) - (ulonglong)uVar4),(ulonglong)uVar5);
    uVar4 = uVar4 - uVar5;
    if (uVar4 == 0) {
      *(int *)(lVar1 + 0x34) = *(int *)(lVar1 + 0x34) + uVar5;
      uVar4 = *(uint *)(lVar1 + 0x34);
      if (*(uint *)(lVar1 + 0x34) == *(uint *)(lVar1 + 0x2c)) {
        uVar4 = 0;
      }
      *(uint *)(lVar1 + 0x34) = uVar4;
      if (*(uint *)(lVar1 + 0x2c) <= *(uint *)(lVar1 + 0x30)) {
        return 0;
      }
      iVar2 = *(uint *)(lVar1 + 0x30) + uVar5;
    }
    else {
      memcpy(*(void **)(lVar1 + 0x38),(void *)(*(longlong *)(param_1 + 0x10) - (ulonglong)uVar4),
             (ulonglong)uVar4);
      iVar2 = *(int *)(lVar1 + 0x2c);
      *(uint *)(lVar1 + 0x34) = uVar4;
    }
  }
  else {
    memcpy(*(void **)(lVar1 + 0x38),(void *)(*(longlong *)(param_1 + 0x10) - (ulonglong)uVar5),
           (ulonglong)uVar5);
    iVar2 = *(int *)(lVar1 + 0x2c);
    *(undefined4 *)(lVar1 + 0x34) = 0;
  }
  *(int *)(lVar1 + 0x30) = iVar2;
  return 0;
}



undefined8 FUN_1401acd30(longlong param_1)

{
  if (((param_1 != 0) && (*(longlong *)(param_1 + 0x28) != 0)) &&
     (*(code **)(param_1 + 0x38) != (code *)0x0)) {
    if (*(longlong *)(*(longlong *)(param_1 + 0x28) + 0x38) != 0) {
      (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40));
    }
    (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40),*(undefined8 *)(param_1 + 0x28));
    *(undefined8 *)(param_1 + 0x28) = 0;
    return 0;
  }
  return 0xfffffffe;
}



uint FUN_1401acd90(uint param_1,uint *param_2,uint param_3)

{
  ulonglong uVar1;
  uint uVar2;
  uint *puVar3;
  
  param_1 = ~param_1;
  for (; (param_3 != 0 && (((ulonglong)param_2 & 3) != 0));
      param_2 = (uint *)((longlong)param_2 + 1)) {
    param_1 = *(uint *)(&DAT_14026ef40 + (ulonglong)(byte)((byte)*param_2 ^ (byte)param_1) * 4) ^
              param_1 >> 8;
    param_3 = param_3 - 1;
  }
  if (0x1f < param_3) {
    uVar1 = (ulonglong)(param_3 >> 5);
    puVar3 = param_2;
    do {
      param_1 = param_1 ^ *puVar3;
      uVar2 = *(uint *)(&DAT_14026f340 + (ulonglong)(byte)(param_1 >> 0x10) * 4) ^
              *(uint *)(&DAT_14026f740 + (ulonglong)(byte)(param_1 >> 8) * 4) ^
              *(uint *)(&DAT_14026ef40 + (ulonglong)(param_1 >> 0x18) * 4) ^
              *(uint *)(&DAT_14026fb40 + (ulonglong)(param_1 & 0xff) * 4) ^ puVar3[1];
      uVar2 = *(uint *)(&DAT_14026f340 + (ulonglong)(byte)(uVar2 >> 0x10) * 4) ^
              *(uint *)(&DAT_14026f740 + (ulonglong)(byte)(uVar2 >> 8) * 4) ^
              *(uint *)(&DAT_14026ef40 + (ulonglong)(uVar2 >> 0x18) * 4) ^
              *(uint *)(&DAT_14026fb40 + (ulonglong)(uVar2 & 0xff) * 4) ^ puVar3[2];
      uVar2 = *(uint *)(&DAT_14026f340 + (ulonglong)(byte)(uVar2 >> 0x10) * 4) ^
              *(uint *)(&DAT_14026f740 + (ulonglong)(byte)(uVar2 >> 8) * 4) ^
              *(uint *)(&DAT_14026ef40 + (ulonglong)(uVar2 >> 0x18) * 4) ^
              *(uint *)(&DAT_14026fb40 + (ulonglong)(uVar2 & 0xff) * 4) ^ puVar3[3];
      uVar2 = *(uint *)(&DAT_14026f340 + (ulonglong)(byte)(uVar2 >> 0x10) * 4) ^
              *(uint *)(&DAT_14026f740 + (ulonglong)(byte)(uVar2 >> 8) * 4) ^
              *(uint *)(&DAT_14026ef40 + (ulonglong)(uVar2 >> 0x18) * 4) ^
              *(uint *)(&DAT_14026fb40 + (ulonglong)(uVar2 & 0xff) * 4) ^ puVar3[4];
      uVar2 = *(uint *)(&DAT_14026f340 + (ulonglong)(byte)(uVar2 >> 0x10) * 4) ^
              *(uint *)(&DAT_14026f740 + (ulonglong)(byte)(uVar2 >> 8) * 4) ^
              *(uint *)(&DAT_14026ef40 + (ulonglong)(uVar2 >> 0x18) * 4) ^
              *(uint *)(&DAT_14026fb40 + (ulonglong)(uVar2 & 0xff) * 4) ^ puVar3[5];
      param_2 = puVar3 + 8;
      param_3 = param_3 - 0x20;
      uVar2 = *(uint *)(&DAT_14026f340 + (ulonglong)(byte)(uVar2 >> 0x10) * 4) ^
              *(uint *)(&DAT_14026f740 + (ulonglong)(byte)(uVar2 >> 8) * 4) ^
              *(uint *)(&DAT_14026ef40 + (ulonglong)(uVar2 >> 0x18) * 4) ^
              *(uint *)(&DAT_14026fb40 + (ulonglong)(uVar2 & 0xff) * 4) ^ puVar3[6];
      uVar2 = *(uint *)(&DAT_14026f340 + (ulonglong)(byte)(uVar2 >> 0x10) * 4) ^
              *(uint *)(&DAT_14026f740 + (ulonglong)(byte)(uVar2 >> 8) * 4) ^
              *(uint *)(&DAT_14026ef40 + (ulonglong)(uVar2 >> 0x18) * 4) ^
              *(uint *)(&DAT_14026fb40 + (ulonglong)(uVar2 & 0xff) * 4) ^ puVar3[7];
      param_1 = *(uint *)(&DAT_14026f340 + (ulonglong)(byte)(uVar2 >> 0x10) * 4) ^
                *(uint *)(&DAT_14026f740 + (ulonglong)(byte)(uVar2 >> 8) * 4) ^
                *(uint *)(&DAT_14026ef40 + (ulonglong)(uVar2 >> 0x18) * 4) ^
                *(uint *)(&DAT_14026fb40 + (ulonglong)(uVar2 & 0xff) * 4);
      uVar1 = uVar1 - 1;
      puVar3 = param_2;
    } while (uVar1 != 0);
  }
  if (3 < param_3) {
    uVar1 = (ulonglong)(param_3 >> 2);
    do {
      param_1 = param_1 ^ *param_2;
      param_2 = param_2 + 1;
      param_3 = param_3 - 4;
      param_1 = *(uint *)(&DAT_14026f340 + (ulonglong)(byte)(param_1 >> 0x10) * 4) ^
                *(uint *)(&DAT_14026f740 + (ulonglong)(byte)(param_1 >> 8) * 4) ^
                *(uint *)(&DAT_14026ef40 + (ulonglong)(param_1 >> 0x18) * 4) ^
                *(uint *)(&DAT_14026fb40 + (ulonglong)(param_1 & 0xff) * 4);
      uVar1 = uVar1 - 1;
    } while (uVar1 != 0);
  }
  for (; param_3 != 0; param_3 = param_3 - 1) {
    uVar2 = *param_2;
    param_2 = (uint *)((longlong)param_2 + 1);
    param_1 = *(uint *)(&DAT_14026ef40 + (ulonglong)(byte)((byte)uVar2 ^ (byte)param_1) * 4) ^
              param_1 >> 8;
  }
  return ~param_1;
}



undefined8 FUN_1401ad0b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  if (param_2 == 0) {
    return 0;
  }
  uVar1 = FUN_1401acd90();
  return uVar1;
}



int FUN_1401ad0c0(longlong *param_1,int param_2)

{
  byte bVar1;
  uint *puVar2;
  uint uVar3;
  char cVar4;
  int iVar5;
  int iVar6;
  uint uVar7;
  uint uVar8;
  byte bVar9;
  ushort uVar10;
  uint uVar11;
  uint uVar12;
  uint uVar13;
  longlong lVar14;
  uint uVar15;
  uint uVar16;
  byte *pbVar17;
  ulonglong uVar18;
  undefined1 *puVar19;
  undefined1 *puVar20;
  byte *_Src;
  uint uVar21;
  ulonglong uVar22;
  int local_res18;
  uint local_res20;
  undefined2 local_68;
  undefined1 local_66;
  undefined1 local_65;
  undefined4 local_64;
  uint local_60;
  uint local_5c;
  undefined1 *local_58;
  
  if ((((param_1 == (longlong *)0x0) || (puVar2 = (uint *)param_1[5], puVar2 == (uint *)0x0)) ||
      (param_1[2] == 0)) || ((*param_1 == 0 && ((int)param_1[1] != 0)))) {
    return -2;
  }
  uVar16 = *puVar2;
  uVar7 = puVar2[0x11];
  uVar8 = puVar2[0x10];
  if (uVar16 == 0xb) {
    uVar16 = 0xc;
  }
  *puVar2 = uVar16;
  uVar11 = *(uint *)(param_1 + 3);
  puVar19 = (undefined1 *)param_1[2];
  uVar15 = *(uint *)(param_1 + 1);
  _Src = (byte *)*param_1;
  local_res18 = 0;
  local_res20 = uVar11;
  local_60 = uVar11;
  local_58 = puVar19;
  local_5c = uVar15;
  do {
    if (0x1e < uVar16) {
      return -2;
    }
    uVar22 = 0;
    uVar21 = 0;
    uVar13 = uVar15;
    uVar12 = local_64;
    switch(uVar16) {
    case 0:
      if (puVar2[2] == 0) {
        *puVar2 = 0xc;
      }
      else {
        for (; uVar7 < 0x10; uVar7 = uVar7 + 8) {
          uVar13 = 0;
          if (uVar15 == 0) goto LAB_1401ad95e;
          bVar1 = *_Src;
          uVar15 = uVar15 - 1;
          _Src = _Src + 1;
          uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
        }
        if (((puVar2[2] & 2) == 0) || (uVar8 != 0x8b1f)) {
          puVar2[4] = 0;
          if (*(longlong *)(puVar2 + 8) != 0) {
            *(undefined4 *)(*(longlong *)(puVar2 + 8) + 0x40) = 0xffffffff;
          }
          if (((puVar2[2] & 1) == 0) ||
             (uVar16 = (uVar8 & 0xff) * 0x100 + (uVar8 >> 8), uVar16 != (uVar16 / 0x1f) * 0x1f)) {
            param_1[4] = (longlong)"incorrect header check";
            *puVar2 = 0x1d;
          }
          else {
            if (((byte)uVar8 & 0xf) != 8) goto LAB_1401ad25f;
            uVar7 = uVar7 - 4;
            uVar16 = (uVar8 >> 4 & 0xf) + 8;
            if (puVar2[10] == 0) {
              puVar2[10] = uVar16;
            }
            else if (puVar2[10] < uVar16) {
              param_1[4] = (longlong)"invalid window size";
              *puVar2 = 0x1d;
              uVar8 = uVar8 >> 4;
              break;
            }
            puVar2[5] = 1 << (sbyte)uVar16;
            uVar16 = FUN_1401cea60(0,0,0);
            puVar2[6] = uVar16;
            *(uint *)((longlong)param_1 + 0x4c) = uVar16;
            uVar7 = 0;
            *puVar2 = ~(uVar8 >> 0xc) & 2 | 9;
            uVar8 = 0;
            puVar19 = local_58;
            uVar11 = local_res20;
          }
        }
        else {
          uVar16 = FUN_1401ad0b0(0,0,0);
          puVar2[6] = uVar16;
          local_68 = 0x8b1f;
          uVar16 = FUN_1401acd90(uVar16,&local_68,2);
          uVar8 = 0;
          uVar7 = 0;
          puVar2[6] = uVar16;
          *puVar2 = 1;
          puVar19 = local_58;
          uVar11 = local_res20;
        }
      }
      break;
    case 1:
      for (; uVar7 < 0x10; uVar7 = uVar7 + 8) {
        uVar13 = 0;
        if (uVar15 == 0) goto LAB_1401ad95e;
        bVar1 = *_Src;
        uVar15 = uVar15 - 1;
        _Src = _Src + 1;
        uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
      }
      puVar2[4] = uVar8;
      if ((char)uVar8 == '\b') {
        if ((uVar8 & 0xe000) == 0) {
          if (*(uint **)(puVar2 + 8) != (uint *)0x0) {
            **(uint **)(puVar2 + 8) = uVar8 >> 8 & 1;
          }
          if ((puVar2[4] & 0x200) != 0) {
            local_68 = (undefined2)uVar8;
            uVar16 = FUN_1401acd90(puVar2[6],&local_68);
            puVar2[6] = uVar16;
          }
          *puVar2 = 2;
          uVar7 = uVar21;
          uVar8 = uVar21;
          do {
            uVar13 = 0;
            uVar12 = local_64;
            if (uVar15 == 0) goto LAB_1401ad95e;
            bVar1 = *_Src;
            uVar16 = uVar7 + 8;
            uVar15 = uVar15 - 1;
            _Src = _Src + 1;
            uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
joined_r0x0001401ad3a6:
            uVar7 = uVar16;
          } while (uVar16 < 0x20);
          if (*(longlong *)(puVar2 + 8) != 0) {
            *(uint *)(*(longlong *)(puVar2 + 8) + 4) = uVar8;
          }
          if ((puVar2[4] & 0x200) != 0) {
            local_68 = (undefined2)uVar8;
            local_65 = (undefined1)(uVar8 >> 0x18);
            local_66 = (undefined1)(uVar8 >> 0x10);
            uVar16 = FUN_1401acd90(puVar2[6],&local_68);
            puVar2[6] = uVar16;
          }
          *puVar2 = 3;
          uVar7 = uVar21;
          uVar8 = uVar21;
          do {
            uVar13 = 0;
            uVar12 = local_64;
            if (uVar15 == 0) goto LAB_1401ad95e;
            bVar1 = *_Src;
            uVar16 = uVar7 + 8;
            uVar15 = uVar15 - 1;
            _Src = _Src + 1;
            uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
joined_r0x0001401ad427:
            uVar7 = uVar16;
          } while (uVar16 < 0x10);
          if (*(longlong *)(puVar2 + 8) != 0) {
            *(uint *)(*(longlong *)(puVar2 + 8) + 8) = uVar8 & 0xff;
            *(uint *)(*(longlong *)(puVar2 + 8) + 0xc) = uVar8 >> 8;
          }
          if ((puVar2[4] & 0x200) != 0) {
            local_68 = (undefined2)uVar8;
            uVar16 = FUN_1401acd90(puVar2[6],&local_68);
            puVar2[6] = uVar16;
          }
          *puVar2 = 4;
          uVar7 = uVar21;
          uVar8 = uVar21;
          goto switchD_1401ad181_caseD_4;
        }
        param_1[4] = (longlong)"unknown header flags set";
        *puVar2 = 0x1d;
      }
      else {
LAB_1401ad25f:
        param_1[4] = (longlong)"unknown compression method";
        *puVar2 = 0x1d;
      }
      break;
    case 2:
      uVar16 = uVar7;
      goto joined_r0x0001401ad3a6;
    case 3:
      uVar16 = uVar7;
      goto joined_r0x0001401ad427;
    case 4:
switchD_1401ad181_caseD_4:
      if ((puVar2[4] & 0x400) == 0) {
        uVar16 = uVar8;
        if (*(longlong *)(puVar2 + 8) != 0) {
          *(undefined8 *)(*(longlong *)(puVar2 + 8) + 0x10) = 0;
        }
      }
      else {
        for (; uVar7 < 0x10; uVar7 = uVar7 + 8) {
          uVar13 = 0;
          uVar12 = local_64;
          if (uVar15 == 0) goto LAB_1401ad95e;
          bVar1 = *_Src;
          uVar15 = uVar15 - 1;
          _Src = _Src + 1;
          uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
        }
        puVar2[0x12] = uVar8;
        if (*(longlong *)(puVar2 + 8) != 0) {
          *(uint *)(*(longlong *)(puVar2 + 8) + 0x18) = uVar8;
        }
        uVar7 = uVar21;
        uVar16 = uVar21;
        if ((puVar2[4] & 0x200) != 0) {
          local_68 = (undefined2)uVar8;
          uVar8 = FUN_1401acd90(puVar2[6],&local_68);
          puVar2[6] = uVar8;
        }
      }
      uVar8 = uVar16;
      *puVar2 = 5;
    case 5:
      if ((puVar2[4] & 0x400) == 0) {
LAB_1401ad5c3:
        puVar2[0x12] = 0;
        *puVar2 = 6;
switchD_1401ad181_caseD_6:
        if ((puVar2[4] & 0x800) == 0) {
          if (*(longlong *)(puVar2 + 8) != 0) {
            *(undefined8 *)(*(longlong *)(puVar2 + 8) + 0x20) = 0;
          }
LAB_1401ad66e:
          puVar2[0x12] = 0;
          *puVar2 = 7;
switchD_1401ad181_caseD_7:
          uVar22 = 0;
          if ((puVar2[4] & 0x1000) == 0) {
            if (*(longlong *)(puVar2 + 8) != 0) {
              *(undefined8 *)(*(longlong *)(puVar2 + 8) + 0x30) = 0;
            }
LAB_1401ad70e:
            *puVar2 = 8;
            puVar19 = local_58;
            uVar11 = local_res20;
switchD_1401ad181_caseD_8:
            if ((puVar2[4] & 0x200) != 0) {
              for (; uVar7 < 0x10; uVar7 = uVar7 + 8) {
                uVar13 = 0;
                uVar12 = local_64;
                if (uVar15 == 0) goto LAB_1401ad95e;
                bVar1 = *_Src;
                uVar15 = uVar15 - 1;
                _Src = _Src + 1;
                uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
              }
              if (uVar8 != (ushort)puVar2[6]) {
                param_1[4] = (longlong)"header crc mismatch";
                *puVar2 = 0x1d;
                break;
              }
              uVar7 = 0;
              uVar8 = uVar7;
            }
            if (*(longlong *)(puVar2 + 8) != 0) {
              *(uint *)(*(longlong *)(puVar2 + 8) + 0x3c) = (int)puVar2[4] >> 9 & 1;
              *(undefined4 *)(*(longlong *)(puVar2 + 8) + 0x40) = 1;
            }
            uVar16 = FUN_1401ad0b0(0,0,0);
            puVar2[6] = uVar16;
            *(uint *)((longlong)param_1 + 0x4c) = uVar16;
LAB_1401ad7a9:
            *puVar2 = 0xb;
            puVar19 = local_58;
            uVar11 = local_res20;
            break;
          }
          pbVar17 = _Src;
          uVar13 = uVar15;
          uVar12 = local_64;
          if (uVar15 != 0) {
            do {
              lVar14 = *(longlong *)(puVar2 + 8);
              bVar1 = *pbVar17;
              uVar16 = (int)uVar22 + 1;
              uVar22 = (ulonglong)uVar16;
              if (((lVar14 != 0) && (*(longlong *)(lVar14 + 0x30) != 0)) &&
                 (puVar2[0x12] < *(uint *)(lVar14 + 0x38))) {
                *(byte *)((ulonglong)puVar2[0x12] + *(longlong *)(lVar14 + 0x30)) = bVar1;
                puVar2[0x12] = puVar2[0x12] + 1;
              }
            } while ((bVar1 != 0) && (pbVar17 = pbVar17 + 1, uVar16 < uVar15));
            if ((puVar2[4] & 0x200) != 0) {
              if (_Src == (byte *)0x0) {
                uVar11 = 0;
              }
              else {
                uVar11 = FUN_1401acd90(puVar2[6],_Src);
              }
              puVar2[6] = uVar11;
            }
            uVar15 = uVar15 - uVar16;
            _Src = _Src + uVar22;
            uVar13 = uVar15;
            uVar12 = local_64;
            if (bVar1 == 0) goto LAB_1401ad70e;
          }
        }
        else {
          pbVar17 = _Src;
          uVar13 = uVar15;
          uVar12 = local_64;
          if (uVar15 != 0) {
            do {
              lVar14 = *(longlong *)(puVar2 + 8);
              bVar1 = *pbVar17;
              uVar13 = (int)uVar22 + 1;
              uVar22 = (ulonglong)uVar13;
              if (((lVar14 != 0) && (*(longlong *)(lVar14 + 0x20) != 0)) &&
                 (puVar2[0x12] < *(uint *)(lVar14 + 0x28))) {
                *(byte *)((ulonglong)puVar2[0x12] + *(longlong *)(lVar14 + 0x20)) = bVar1;
                puVar2[0x12] = puVar2[0x12] + 1;
              }
            } while ((bVar1 != 0) && (pbVar17 = pbVar17 + 1, uVar13 < uVar15));
            if ((puVar2[4] & 0x200) != 0) {
              if (_Src == (byte *)0x0) {
                uVar16 = 0;
              }
              else {
                uVar16 = FUN_1401acd90(puVar2[6],_Src);
              }
              puVar2[6] = uVar16;
            }
            uVar13 = uVar15 - uVar13;
            _Src = _Src + uVar22;
            uVar15 = uVar13;
            uVar12 = local_64;
            if (bVar1 == 0) goto LAB_1401ad66e;
          }
        }
      }
      else {
        uVar16 = puVar2[0x12];
        uVar11 = uVar16;
        if (uVar15 < uVar16) {
          uVar11 = uVar15;
        }
        uVar13 = uVar15;
        if (uVar11 != 0) {
          lVar14 = *(longlong *)(puVar2 + 8);
          if ((lVar14 != 0) && (*(longlong *)(lVar14 + 0x10) != 0)) {
            uVar16 = *(int *)(lVar14 + 0x18) - uVar16;
            uVar12 = uVar11;
            if (*(uint *)(lVar14 + 0x1c) < uVar11 + uVar16) {
              uVar12 = *(uint *)(lVar14 + 0x1c) - uVar16;
            }
            memcpy((void *)((ulonglong)uVar16 + *(longlong *)(lVar14 + 0x10)),_Src,(ulonglong)uVar12
                  );
          }
          if ((puVar2[4] & 0x200) != 0) {
            if (_Src != (byte *)0x0) {
              uVar21 = FUN_1401acd90(puVar2[6],_Src);
            }
            puVar2[6] = uVar21;
          }
          uVar13 = uVar15 - uVar11;
          _Src = _Src + uVar11;
          puVar2[0x12] = puVar2[0x12] - uVar11;
        }
        uVar15 = uVar13;
        uVar12 = local_64;
        if (puVar2[0x12] == 0) goto LAB_1401ad5c3;
      }
LAB_1401ad95e:
      local_64 = uVar12;
      uVar16 = local_60;
      param_1[2] = (longlong)local_58;
      *param_1 = (longlong)_Src;
      *(uint *)(param_1 + 3) = local_res20;
      *(uint *)(param_1 + 1) = uVar13;
      puVar2[0x11] = uVar7;
      puVar2[0x10] = uVar8;
      if (((puVar2[0xb] == 0) && ((0x19 < (int)*puVar2 || (local_60 == *(uint *)(param_1 + 3))))) ||
         (iVar5 = FUN_1401acc30(param_1,local_60), iVar5 == 0)) {
        uVar16 = uVar16 - (int)param_1[3];
        local_5c = local_5c - (int)param_1[1];
        *(int *)((longlong)param_1 + 0x1c) = *(int *)((longlong)param_1 + 0x1c) + uVar16;
        *(int *)((longlong)param_1 + 0xc) = *(int *)((longlong)param_1 + 0xc) + local_5c;
        puVar2[7] = puVar2[7] + uVar16;
        if ((puVar2[2] != 0) && (uVar16 != 0)) {
          if (puVar2[4] == 0) {
            uVar8 = FUN_1401cea60(puVar2[6],param_1[2] - (ulonglong)uVar16);
          }
          else if (param_1[2] == (ulonglong)uVar16) {
            uVar8 = 0;
          }
          else {
            uVar8 = FUN_1401acd90();
          }
          puVar2[6] = uVar8;
          *(uint *)((longlong)param_1 + 0x4c) = uVar8;
        }
        uVar8 = *puVar2;
        if ((uVar8 == 0x13) || (uVar8 == 0xe)) {
          iVar5 = 0x100;
        }
        else {
          iVar5 = 0;
        }
        iVar6 = 0;
        if (uVar8 == 0xb) {
          iVar6 = 0x80;
        }
        *(uint *)(param_1 + 9) = iVar6 + iVar5 + (-(uint)(puVar2[1] != 0) & 0x40) + puVar2[0x11];
        if (((local_5c != 0) || (uVar16 != 0)) && (param_2 != 4)) {
          return local_res18;
        }
        if (local_res18 != 0) {
          return local_res18;
        }
        return -5;
      }
      *puVar2 = 0x1e;
LAB_1401ad9b9:
      return -4;
    case 6:
      goto switchD_1401ad181_caseD_6;
    case 7:
      goto switchD_1401ad181_caseD_7;
    case 8:
      goto switchD_1401ad181_caseD_8;
    case 9:
      for (; uVar7 < 0x20; uVar7 = uVar7 + 8) {
        uVar13 = 0;
        if (uVar15 == 0) goto LAB_1401ad95e;
        bVar1 = *_Src;
        uVar15 = uVar15 - 1;
        _Src = _Src + 1;
        uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
      }
      uVar16 = (uVar8 >> 8 & 0xff00) + ((uVar8 & 0xff00) + uVar8 * 0x10000) * 0x100 +
               (uVar8 >> 0x18);
      puVar2[6] = uVar16;
      *(uint *)((longlong)param_1 + 0x4c) = uVar16;
      *puVar2 = 10;
      uVar7 = uVar21;
      uVar8 = uVar21;
    case 10:
      if (puVar2[3] == 0) {
        param_1[2] = (longlong)puVar19;
        *(uint *)(param_1 + 3) = uVar11;
        *param_1 = (longlong)_Src;
        *(uint *)(param_1 + 1) = uVar15;
        puVar2[0x10] = uVar8;
        puVar2[0x11] = uVar7;
        return 2;
      }
      uVar16 = FUN_1401cea60(0,0);
      puVar2[6] = uVar16;
      *(uint *)((longlong)param_1 + 0x4c) = uVar16;
      *puVar2 = 0xb;
      puVar19 = local_58;
      uVar11 = local_res20;
switchD_1401ad181_caseD_b:
      uVar13 = uVar15;
      uVar12 = local_64;
      if ((param_2 != 5) && (param_2 != 6)) {
switchD_1401ad181_caseD_c:
        if (puVar2[1] == 0) {
          for (; uVar12 = local_64, uVar7 < 3; uVar7 = uVar7 + 8) {
            uVar13 = 0;
            if (uVar15 == 0) goto LAB_1401ad95e;
            bVar1 = *_Src;
            uVar15 = uVar15 - 1;
            _Src = _Src + 1;
            uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
          }
          puVar2[1] = uVar8 & 1;
          uVar16 = uVar8 >> 1 & 3;
          if (uVar16 == 0) {
            *puVar2 = 0xd;
          }
          else {
            if (uVar16 != 1) {
              if (uVar16 == 2) {
                *puVar2 = 0x10;
                uVar7 = uVar7 - 3;
                uVar8 = uVar8 >> 3;
              }
              else {
                if (uVar16 != 3) goto LAB_1401ad9e5;
                uVar7 = uVar7 - 3;
                param_1[4] = (longlong)"invalid block type";
                *puVar2 = 0x1d;
                uVar8 = uVar8 >> 3;
              }
              break;
            }
            puVar2[0x1a] = 9;
            puVar2[0x1b] = 5;
            *(undefined **)(puVar2 + 0x16) = &DAT_14026e690;
            *puVar2 = 0x13;
            *(undefined **)(puVar2 + 0x18) = &DAT_14026ee90;
            if (param_2 == 6) {
              uVar8 = uVar8 >> 3;
              uVar7 = uVar7 - 3;
              uVar13 = uVar15;
              goto LAB_1401ad95e;
            }
          }
LAB_1401ad9e5:
          uVar7 = uVar7 - 3;
          uVar8 = uVar8 >> 3;
        }
        else {
          *puVar2 = 0x1a;
          uVar16 = uVar7 & 7;
          uVar7 = uVar7 - uVar16;
          uVar8 = uVar8 >> (sbyte)uVar16;
        }
        break;
      }
      goto LAB_1401ad95e;
    case 0xb:
      goto switchD_1401ad181_caseD_b;
    case 0xc:
      goto switchD_1401ad181_caseD_c;
    case 0xd:
      uVar8 = uVar8 >> (sbyte)(uVar7 & 7);
      for (uVar7 = uVar7 - (uVar7 & 7); uVar7 < 0x20; uVar7 = uVar7 + 8) {
        uVar13 = 0;
        if (uVar15 == 0) goto LAB_1401ad95e;
        bVar1 = *_Src;
        uVar15 = uVar15 - 1;
        _Src = _Src + 1;
        uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
      }
      if ((uVar8 & 0xffff) == ~uVar8 >> 0x10) {
        puVar2[0x12] = uVar8 & 0xffff;
        *puVar2 = 0xe;
        uVar7 = uVar21;
        uVar8 = uVar21;
        uVar13 = uVar15;
        if (param_2 != 6) goto switchD_1401ad181_caseD_e;
        goto LAB_1401ad95e;
      }
      param_1[4] = (longlong)"invalid stored block lengths";
      *puVar2 = 0x1d;
      break;
    case 0xe:
switchD_1401ad181_caseD_e:
      *puVar2 = 0xf;
    case 0xf:
      uVar16 = puVar2[0x12];
      if (uVar16 == 0) {
        *puVar2 = 0xb;
        break;
      }
      if (uVar15 < uVar16) {
        uVar16 = uVar15;
      }
      if (uVar11 < uVar16) {
        uVar16 = uVar11;
      }
      uVar22 = (ulonglong)uVar16;
      uVar13 = uVar15;
      if (uVar16 != 0) {
        memcpy(puVar19,_Src,uVar22);
        local_res20 = local_res20 - uVar16;
        _Src = _Src + uVar22;
        local_58 = local_58 + uVar22;
        uVar15 = uVar15 - uVar16;
        puVar2[0x12] = puVar2[0x12] - uVar16;
        puVar19 = local_58;
        uVar11 = local_res20;
        break;
      }
      goto LAB_1401ad95e;
    case 0x10:
      for (; uVar7 < 0xe; uVar7 = uVar7 + 8) {
        uVar13 = 0;
        if (uVar15 == 0) goto LAB_1401ad95e;
        bVar1 = *_Src;
        uVar15 = uVar15 - 1;
        _Src = _Src + 1;
        uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
      }
      uVar7 = uVar7 - 0xe;
      uVar21 = uVar8 >> 10;
      uVar16 = (uVar8 & 0x1f) + 0x101;
      uVar13 = (uVar8 >> 5 & 0x1f) + 1;
      uVar8 = uVar8 >> 0xe;
      puVar2[0x1d] = uVar16;
      puVar2[0x1e] = uVar13;
      puVar2[0x1c] = (uVar21 & 0xf) + 4;
      if ((uVar16 < 0x11f) && (uVar13 < 0x1f)) {
        puVar2[0x1f] = 0;
        *puVar2 = 0x11;
        goto switchD_1401ad181_caseD_11;
      }
      param_1[4] = (longlong)"too many length or distance symbols";
      *puVar2 = 0x1d;
      break;
    case 0x11:
switchD_1401ad181_caseD_11:
      if (puVar2[0x1f] < puVar2[0x1c]) {
        do {
          for (; uVar7 < 3; uVar7 = uVar7 + 8) {
            uVar13 = 0;
            if (uVar15 == 0) goto LAB_1401ad95e;
            bVar1 = *_Src;
            uVar15 = uVar15 - 1;
            _Src = _Src + 1;
            uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
          }
          uVar7 = uVar7 - 3;
          uVar10 = (ushort)uVar8;
          uVar8 = uVar8 >> 3;
          *(ushort *)
           ((longlong)puVar2 +
           (ulonglong)*(ushort *)(&DAT_14026ef10 + (ulonglong)puVar2[0x1f] * 2) * 2 + 0x88) =
               uVar10 & 7;
          puVar2[0x1f] = puVar2[0x1f] + 1;
        } while (puVar2[0x1f] < puVar2[0x1c]);
      }
      uVar16 = puVar2[0x1f];
      while (uVar16 < 0x13) {
        *(undefined2 *)
         ((longlong)puVar2 +
         (ulonglong)*(ushort *)(&DAT_14026ef10 + (ulonglong)puVar2[0x1f] * 2) * 2 + 0x88) = 0;
        puVar2[0x1f] = puVar2[0x1f] + 1;
        uVar16 = puVar2[0x1f];
      }
      *(uint **)(puVar2 + 0x20) = puVar2 + 0x152;
      *(uint **)(puVar2 + 0x16) = puVar2 + 0x152;
      puVar2[0x1a] = 7;
      local_res18 = FUN_1401d2990(0,puVar2 + 0x22,0x13,puVar2 + 0x20,puVar2 + 0x1a,puVar2 + 0xc2);
      if (local_res18 == 0) {
        puVar2[0x1f] = 0;
        *puVar2 = 0x12;
        uVar11 = local_res20;
        goto switchD_1401ad181_caseD_12;
      }
      param_1[4] = (longlong)"invalid code lengths set";
      *puVar2 = 0x1d;
      puVar19 = local_58;
      uVar11 = local_res20;
      break;
    case 0x12:
switchD_1401ad181_caseD_12:
      puVar19 = local_58;
      if (puVar2[0x1f] < puVar2[0x1e] + puVar2[0x1d]) {
        do {
          uVar12 = *(uint *)(*(longlong *)(puVar2 + 0x16) +
                            (ulonglong)((1 << ((byte)puVar2[0x1a] & 0x1f)) - 1U & uVar8) * 4);
          uVar16 = uVar7;
          local_64 = uVar12;
          if (uVar7 < (uVar12 >> 8 & 0xff)) {
            do {
              uVar7 = uVar16;
              uVar13 = 0;
              uVar12 = local_64;
              if (uVar15 == 0) goto LAB_1401ad95e;
              uVar7 = uVar16 + 8;
              uVar15 = uVar15 - 1;
              uVar8 = uVar8 + ((uint)*_Src << ((byte)uVar16 & 0x1f));
              _Src = _Src + 1;
              uVar12 = *(uint *)(*(longlong *)(puVar2 + 0x16) +
                                (ulonglong)((1 << ((byte)puVar2[0x1a] & 0x1f)) - 1U & uVar8) * 4);
              uVar16 = uVar7;
              local_64 = uVar12;
            } while (uVar7 < (uVar12 >> 8 & 0xff));
          }
          uVar10 = (ushort)(uVar12 >> 0x10);
          local_64._1_1_ = (byte)(uVar12 >> 8);
          local_64 = uVar12;
          if (0xf < uVar10) {
            if (uVar10 == 0x10) {
              for (; uVar7 < local_64._1_1_ + 2; uVar7 = uVar7 + 8) {
                uVar13 = 0;
                if (uVar15 == 0) goto LAB_1401ad95e;
                bVar1 = *_Src;
                uVar15 = uVar15 - 1;
                _Src = _Src + 1;
                uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
              }
              uVar7 = uVar7 - local_64._1_1_;
              uVar8 = uVar8 >> (local_64._1_1_ & 0x1f);
              if (puVar2[0x1f] != 0) {
                iVar5 = (uVar8 & 3) + 3;
                uVar7 = uVar7 - 2;
                uVar18 = (ulonglong)
                         *(ushort *)((longlong)puVar2 + (ulonglong)(puVar2[0x1f] - 1) * 2 + 0x88);
                uVar8 = uVar8 >> 2;
                goto LAB_1401ade60;
              }
            }
            else {
              if (uVar10 == 0x11) {
                for (; uVar7 < local_64._1_1_ + 3; uVar7 = uVar7 + 8) {
                  uVar13 = 0;
                  if (uVar15 == 0) goto LAB_1401ad95e;
                  bVar1 = *_Src;
                  uVar15 = uVar15 - 1;
                  _Src = _Src + 1;
                  uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
                }
                iVar6 = -3;
                uVar8 = uVar8 >> (local_64._1_1_ & 0x1f);
                iVar5 = (uVar8 & 7) + 3;
                uVar8 = uVar8 >> 3;
              }
              else {
                for (; uVar7 < local_64._1_1_ + 7; uVar7 = uVar7 + 8) {
                  uVar13 = 0;
                  if (uVar15 == 0) goto LAB_1401ad95e;
                  bVar1 = *_Src;
                  uVar15 = uVar15 - 1;
                  _Src = _Src + 1;
                  uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
                }
                iVar6 = -7;
                uVar8 = uVar8 >> (local_64._1_1_ & 0x1f);
                iVar5 = (uVar8 & 0x7f) + 0xb;
                uVar8 = uVar8 >> 7;
              }
              uVar7 = uVar7 + (iVar6 - (uint)local_64._1_1_);
              uVar18 = uVar22;
LAB_1401ade60:
              if (iVar5 + puVar2[0x1f] <= puVar2[0x1e] + puVar2[0x1d]) {
                for (; iVar5 != 0; iVar5 = iVar5 + -1) {
                  *(short *)((longlong)puVar2 + (ulonglong)puVar2[0x1f] * 2 + 0x88) = (short)uVar18;
                  puVar2[0x1f] = puVar2[0x1f] + 1;
                }
                goto LAB_1401ade95;
              }
            }
            param_1[4] = (longlong)"invalid bit length repeat";
            *puVar2 = 0x1d;
            goto LAB_1401ad7b8;
          }
          uVar16 = uVar7;
          if (uVar7 < (uVar12 >> 8 & 0xff)) {
            do {
              uVar7 = uVar16;
              uVar13 = 0;
              if (uVar15 == 0) goto LAB_1401ad95e;
              bVar1 = *_Src;
              uVar7 = uVar16 + 8;
              uVar15 = uVar15 - 1;
              _Src = _Src + 1;
              uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar16 & 0x1f));
              uVar16 = uVar7;
            } while (uVar7 < local_64._1_1_);
          }
          uVar8 = uVar8 >> (local_64._1_1_ & 0x1f);
          uVar7 = uVar7 - local_64._1_1_;
          *(ushort *)((longlong)puVar2 + (ulonglong)puVar2[0x1f] * 2 + 0x88) = uVar10;
          puVar2[0x1f] = puVar2[0x1f] + 1;
LAB_1401ade95:
        } while (puVar2[0x1f] < puVar2[0x1e] + puVar2[0x1d]);
      }
      if (*puVar2 != 0x1d) {
        if ((short)puVar2[0xa2] == 0) {
          param_1[4] = (longlong)"invalid code -- missing end-of-block";
          *puVar2 = 0x1d;
        }
        else {
          *(uint **)(puVar2 + 0x20) = puVar2 + 0x152;
          *(uint **)(puVar2 + 0x16) = puVar2 + 0x152;
          puVar2[0x1a] = 9;
          local_res18 = FUN_1401d2990(1,puVar2 + 0x22,puVar2[0x1d],puVar2 + 0x20,puVar2 + 0x1a,
                                      puVar2 + 0xc2);
          if (local_res18 == 0) {
            *(undefined8 *)(puVar2 + 0x18) = *(undefined8 *)(puVar2 + 0x20);
            puVar2[0x1b] = 6;
            local_res18 = FUN_1401d2990(2,(longlong)puVar2 + (ulonglong)puVar2[0x1d] * 2 + 0x88,
                                        puVar2[0x1e],puVar2 + 0x20,puVar2 + 0x1b,puVar2 + 0xc2);
            puVar19 = local_58;
            if (local_res18 == 0) {
              *puVar2 = 0x13;
              uVar11 = local_res20;
              uVar13 = uVar15;
              uVar12 = local_64;
              if (param_2 != 6) goto switchD_1401ad181_caseD_13;
              goto LAB_1401ad95e;
            }
            param_1[4] = (longlong)"invalid distances set";
            *puVar2 = 0x1d;
            uVar11 = local_res20;
          }
          else {
            param_1[4] = (longlong)"invalid literal/lengths set";
            *puVar2 = 0x1d;
            puVar19 = local_58;
            uVar11 = local_res20;
          }
        }
      }
      break;
    case 0x13:
switchD_1401ad181_caseD_13:
      *puVar2 = 0x14;
    case 0x14:
      if ((5 < uVar15) && (0x101 < uVar11)) {
        param_1[2] = (longlong)puVar19;
        *(uint *)(param_1 + 3) = uVar11;
        *param_1 = (longlong)_Src;
        *(uint *)(param_1 + 1) = uVar15;
        puVar2[0x10] = uVar8;
        puVar2[0x11] = uVar7;
        FUN_1401d11b0(param_1,local_60);
        local_58 = (undefined1 *)param_1[2];
        local_res20 = *(uint *)(param_1 + 3);
        _Src = (byte *)*param_1;
        uVar15 = *(uint *)(param_1 + 1);
        uVar7 = puVar2[0x11];
        puVar19 = local_58;
        uVar8 = puVar2[0x10];
        uVar11 = local_res20;
        if (*puVar2 == 0xb) {
          puVar2[0x6f7] = 0xffffffff;
        }
        break;
      }
      puVar2[0x6f7] = 0;
      uVar12 = *(uint *)(*(longlong *)(puVar2 + 0x16) +
                        (ulonglong)((1 << ((byte)puVar2[0x1a] & 0x1f)) - 1U & uVar8) * 4);
      uVar16 = uVar7;
      if (uVar7 < (uVar12 >> 8 & 0xff)) {
        do {
          uVar7 = uVar16;
          uVar13 = 0;
          uVar12 = local_64;
          if (uVar15 == 0) goto LAB_1401ad95e;
          uVar7 = uVar16 + 8;
          uVar15 = uVar15 - 1;
          uVar8 = uVar8 + ((uint)*_Src << ((byte)uVar16 & 0x1f));
          _Src = _Src + 1;
          uVar12 = *(uint *)(*(longlong *)(puVar2 + 0x16) +
                            (ulonglong)((1 << ((byte)puVar2[0x1a] & 0x1f)) - 1U & uVar8) * 4);
          uVar16 = uVar7;
        } while (uVar7 < (uVar12 >> 8 & 0xff));
      }
      cVar4 = (char)uVar12;
      uVar16 = uVar12;
      if ((cVar4 != '\0') && ((uVar12 & 0xf0) == 0)) {
        bVar1 = (byte)(uVar12 >> 8);
        uVar16 = *(uint *)(*(longlong *)(puVar2 + 0x16) +
                          (ulonglong)
                          ((((1 << (cVar4 + bVar1 & 0x1f)) - 1U & uVar8) >> (bVar1 & 0x1f)) +
                          (uVar12 >> 0x10)) * 4);
        if (uVar7 < (uVar16 >> 8 & 0xff) + (uVar12 >> 8 & 0xff)) {
          do {
            uVar13 = 0;
            if (uVar15 == 0) goto LAB_1401ad95e;
            uVar8 = uVar8 + ((uint)*_Src << ((byte)uVar7 & 0x1f));
            uVar7 = uVar7 + 8;
            uVar15 = uVar15 - 1;
            _Src = _Src + 1;
            uVar16 = *(uint *)(*(longlong *)(puVar2 + 0x16) +
                              (ulonglong)
                              ((((1 << (cVar4 + bVar1 & 0x1f)) - 1U & uVar8) >> (bVar1 & 0x1f)) +
                              (uVar12 >> 0x10)) * 4);
          } while (uVar7 < (uVar16 >> 8 & 0xff) + (uint)bVar1);
        }
        uVar8 = uVar8 >> (bVar1 & 0x1f);
        uVar7 = uVar7 - bVar1;
        puVar2[0x6f7] = (uint)bVar1;
        local_64 = uVar12;
      }
      uVar11 = uVar16 >> 8 & 0xff;
      puVar2[0x6f7] = puVar2[0x6f7] + uVar11;
      uVar8 = uVar8 >> ((byte)(uVar16 >> 8) & 0x1f);
      uVar7 = uVar7 - uVar11;
      puVar2[0x12] = uVar16 >> 0x10;
      puVar19 = local_58;
      if ((char)uVar16 == '\0') {
        *puVar2 = 0x19;
        uVar11 = local_res20;
        break;
      }
      if ((uVar16 & 0x20) != 0) {
        puVar2[0x6f7] = 0xffffffff;
        goto LAB_1401ad7a9;
      }
      if ((uVar16 & 0x40) != 0) {
        param_1[4] = (longlong)"invalid literal/length code";
        *puVar2 = 0x1d;
        uVar11 = local_res20;
        break;
      }
      *puVar2 = 0x15;
      puVar2[0x14] = uVar16 & 0xf;
switchD_1401ad181_caseD_15:
      uVar16 = puVar2[0x14];
      if (uVar16 != 0) {
        uVar11 = uVar7;
        if (uVar7 < uVar16) {
          do {
            uVar13 = 0;
            uVar12 = local_64;
            if (uVar15 == 0) goto LAB_1401ad95e;
            bVar1 = *_Src;
            uVar11 = uVar7 + 8;
            uVar15 = uVar15 - 1;
            _Src = _Src + 1;
            uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar7 & 0x1f));
            uVar7 = uVar11;
          } while (uVar11 < puVar2[0x14]);
        }
        uVar7 = uVar11 - uVar16;
        uVar11 = (1 << ((byte)uVar16 & 0x1f)) - 1U & uVar8;
        uVar8 = uVar8 >> ((byte)uVar16 & 0x1f);
        puVar2[0x12] = puVar2[0x12] + uVar11;
        puVar2[0x6f7] = puVar2[0x6f7] + uVar16;
      }
      *puVar2 = 0x16;
      puVar2[0x6f8] = puVar2[0x12];
switchD_1401ad181_caseD_16:
      uVar12 = *(uint *)(*(longlong *)(puVar2 + 0x18) +
                        (ulonglong)((1 << ((byte)puVar2[0x1b] & 0x1f)) - 1U & uVar8) * 4);
      uVar16 = uVar7;
      if (uVar7 < (uVar12 >> 8 & 0xff)) {
        do {
          uVar7 = uVar16;
          uVar13 = 0;
          uVar12 = local_64;
          if (uVar15 == 0) goto LAB_1401ad95e;
          uVar7 = uVar16 + 8;
          uVar15 = uVar15 - 1;
          uVar8 = uVar8 + ((uint)*_Src << ((byte)uVar16 & 0x1f));
          _Src = _Src + 1;
          uVar12 = *(uint *)(*(longlong *)(puVar2 + 0x18) +
                            (ulonglong)((1 << ((byte)puVar2[0x1b] & 0x1f)) - 1U & uVar8) * 4);
          uVar16 = uVar7;
        } while (uVar7 < (uVar12 >> 8 & 0xff));
      }
      uVar16 = uVar12;
      if ((uVar12 & 0xf0) == 0) {
        bVar1 = (byte)(uVar12 >> 8);
        uVar16 = *(uint *)(*(longlong *)(puVar2 + 0x18) +
                          (ulonglong)
                          ((((1 << ((char)uVar12 + bVar1 & 0x1f)) - 1U & uVar8) >> (bVar1 & 0x1f)) +
                          (uVar12 >> 0x10)) * 4);
        if (uVar7 < (uVar16 >> 8 & 0xff) + (uVar12 >> 8 & 0xff)) {
          do {
            uVar13 = 0;
            if (uVar15 == 0) goto LAB_1401ad95e;
            uVar8 = uVar8 + ((uint)*_Src << ((byte)uVar7 & 0x1f));
            uVar7 = uVar7 + 8;
            uVar15 = uVar15 - 1;
            _Src = _Src + 1;
            uVar16 = *(uint *)(*(longlong *)(puVar2 + 0x18) +
                              (ulonglong)
                              ((((1 << ((char)uVar12 + bVar1 & 0x1f)) - 1U & uVar8) >>
                               (bVar1 & 0x1f)) + (uVar12 >> 0x10)) * 4);
          } while (uVar7 < (uVar16 >> 8 & 0xff) + (uint)bVar1);
        }
        uVar8 = uVar8 >> (bVar1 & 0x1f);
        uVar7 = uVar7 - bVar1;
        puVar2[0x6f7] = puVar2[0x6f7] + (uint)bVar1;
        local_64 = uVar12;
      }
      uVar11 = uVar16 >> 8 & 0xff;
      puVar2[0x6f7] = puVar2[0x6f7] + uVar11;
      uVar8 = uVar8 >> ((byte)(uVar16 >> 8) & 0x1f);
      uVar7 = uVar7 - uVar11;
      puVar19 = local_58;
      if ((uVar16 & 0x40) != 0) {
        param_1[4] = (longlong)"invalid distance code";
        *puVar2 = 0x1d;
        uVar11 = local_res20;
        break;
      }
      *puVar2 = 0x17;
      puVar2[0x13] = uVar16 >> 0x10;
      puVar2[0x14] = uVar16 & 0xf;
      uVar11 = local_res20;
switchD_1401ad181_caseD_17:
      uVar16 = puVar2[0x14];
      if (uVar16 != 0) {
        uVar21 = uVar7;
        if (uVar7 < uVar16) {
          do {
            uVar7 = uVar21;
            uVar13 = 0;
            uVar12 = local_64;
            if (uVar15 == 0) goto LAB_1401ad95e;
            bVar1 = *_Src;
            uVar7 = uVar21 + 8;
            uVar15 = uVar15 - 1;
            _Src = _Src + 1;
            uVar8 = uVar8 + ((uint)bVar1 << ((byte)uVar21 & 0x1f));
            uVar21 = uVar7;
          } while (uVar7 < puVar2[0x14]);
        }
        uVar7 = uVar7 - uVar16;
        uVar12 = (1 << ((byte)uVar16 & 0x1f)) - 1U & uVar8;
        uVar8 = uVar8 >> ((byte)uVar16 & 0x1f);
        puVar2[0x13] = puVar2[0x13] + uVar12;
        puVar2[0x6f7] = puVar2[0x6f7] + uVar16;
      }
      *puVar2 = 0x18;
switchD_1401ad181_caseD_18:
      uVar13 = uVar15;
      uVar12 = local_64;
      if (uVar11 != 0) {
        uVar16 = puVar2[0x13];
        if (local_60 - uVar11 < uVar16) {
          uVar16 = uVar16 - (local_60 - uVar11);
          if ((puVar2[0xc] < uVar16) && (puVar2[0x6f6] != 0)) {
            param_1[4] = (longlong)"invalid distance too far back";
            *puVar2 = 0x1d;
            break;
          }
          uVar13 = puVar2[0xd];
          if (uVar13 < uVar16) {
            uVar16 = uVar16 - uVar13;
            uVar13 = puVar2[0xb] - uVar16;
          }
          else {
            uVar13 = uVar13 - uVar16;
          }
          uVar12 = puVar2[0x12];
          lVar14 = (ulonglong)uVar13 + *(longlong *)(puVar2 + 0xe);
          if (uVar12 < uVar16) goto LAB_1401ae4b5;
        }
        else {
          lVar14 = (longlong)puVar19 - (ulonglong)uVar16;
          uVar12 = puVar2[0x12];
LAB_1401ae4b5:
          uVar16 = uVar12;
          uVar12 = uVar16;
        }
        if (uVar11 < uVar16) {
          uVar16 = uVar11;
        }
        local_res20 = uVar11 - uVar16;
        puVar2[0x12] = uVar12 - uVar16;
        puVar20 = puVar19;
        do {
          local_58 = puVar20 + 1;
          uVar16 = uVar16 - 1;
          *puVar20 = puVar20[lVar14 - (longlong)puVar19];
          puVar20 = local_58;
        } while (uVar16 != 0);
        puVar19 = local_58;
        uVar11 = local_res20;
        if (puVar2[0x12] == 0) {
          *puVar2 = 0x14;
        }
        break;
      }
      goto LAB_1401ad95e;
    case 0x15:
      goto switchD_1401ad181_caseD_15;
    case 0x16:
      goto switchD_1401ad181_caseD_16;
    case 0x17:
      goto switchD_1401ad181_caseD_17;
    case 0x18:
      goto switchD_1401ad181_caseD_18;
    case 0x19:
      if (uVar11 == 0) goto LAB_1401ad95e;
      local_58 = puVar19 + 1;
      local_res20 = uVar11 - 1;
      *puVar19 = (char)puVar2[0x12];
      *puVar2 = 0x14;
      puVar19 = local_58;
      uVar11 = local_res20;
      break;
    case 0x1a:
      uVar16 = uVar7;
      uVar3 = uVar8;
      if (puVar2[2] != 0) {
        for (; uVar16 < 0x20; uVar16 = uVar16 + 8) {
          uVar7 = uVar16;
          uVar8 = uVar3;
          uVar13 = 0;
          if (uVar15 == 0) goto LAB_1401ad95e;
          bVar1 = *_Src;
          bVar9 = (byte)uVar16;
          uVar15 = uVar15 - 1;
          _Src = _Src + 1;
          uVar3 = uVar3 + ((uint)bVar1 << (bVar9 & 0x1f));
        }
        uVar8 = local_60 - uVar11;
        *(int *)((longlong)param_1 + 0x1c) = *(int *)((longlong)param_1 + 0x1c) + uVar8;
        puVar2[7] = puVar2[7] + uVar8;
        if (uVar8 != 0) {
          if (puVar2[4] == 0) {
            uVar7 = FUN_1401cea60(puVar2[6],(longlong)puVar19 - (longlong)(ulonglong)uVar8);
            puVar19 = local_58;
            uVar11 = local_res20;
          }
          else {
            uVar7 = uVar21;
            if (puVar19 != (undefined1 *)(ulonglong)uVar8) {
              uVar7 = FUN_1401acd90(puVar2[6]);
              puVar19 = local_58;
              uVar11 = local_res20;
            }
          }
          puVar2[6] = uVar7;
          *(uint *)((longlong)param_1 + 0x4c) = uVar7;
        }
        uVar12 = uVar3;
        if (puVar2[4] == 0) {
          uVar12 = ((uVar3 & 0xff00) + uVar3 * 0x10000) * 0x100 + (uVar3 >> 8 & 0xff00) +
                   (uVar3 >> 0x18);
        }
        uVar7 = uVar21;
        uVar8 = uVar21;
        local_60 = uVar11;
        if (uVar12 != puVar2[6]) {
          param_1[4] = (longlong)"incorrect data check";
          *puVar2 = 0x1d;
          uVar7 = uVar16;
          uVar8 = uVar3;
          break;
        }
      }
      *puVar2 = 0x1b;
    case 0x1b:
      if ((puVar2[2] != 0) && (uVar16 = uVar7, uVar3 = uVar8, puVar2[4] != 0)) {
        for (; uVar16 < 0x20; uVar16 = uVar16 + 8) {
          uVar7 = uVar16;
          uVar8 = uVar3;
          uVar13 = 0;
          uVar12 = local_64;
          if (uVar15 == 0) goto LAB_1401ad95e;
          bVar1 = *_Src;
          bVar9 = (byte)uVar16;
          uVar15 = uVar15 - 1;
          _Src = _Src + 1;
          uVar3 = uVar3 + ((uint)bVar1 << (bVar9 & 0x1f));
        }
        uVar7 = uVar21;
        uVar8 = uVar21;
        if (uVar3 != puVar2[7]) {
          param_1[4] = (longlong)"incorrect length check";
          *puVar2 = 0x1d;
          uVar7 = uVar16;
          uVar8 = uVar3;
          break;
        }
      }
      *puVar2 = 0x1c;
switchD_1401ad181_caseD_1c:
      local_res18 = 1;
      uVar13 = uVar15;
      uVar12 = local_64;
      goto LAB_1401ad95e;
    case 0x1c:
      goto switchD_1401ad181_caseD_1c;
    case 0x1d:
      local_res18 = -3;
      goto LAB_1401ad95e;
    case 0x1e:
      goto LAB_1401ad9b9;
    }
LAB_1401ad7b8:
    uVar16 = *puVar2;
  } while( true );
}



void FUN_1401ae800(double *param_1,double param_2)

{
  param_2 = *param_1 - param_2;
  *param_1 = param_2;
  *(bool *)(param_1 + 2) = param_2 < 0.0;
  if (param_2 < 0.0) {
    *param_1 = param_1[1];
  }
  return;
}



void FUN_1401ae840(double *param_1,double param_2)

{
  double dVar1;
  
  if (param_2 <= 0.0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  dVar1 = param_1[1];
  param_1[1] = param_2;
  *param_1 = (param_2 / dVar1) * *param_1;
  return;
}



void FUN_1401ae870(double *param_1)

{
  *(undefined1 *)(param_1 + 2) = 0;
  *param_1 = param_1[1] * 0.3;
  return;
}



double * FUN_1401ae890(double *param_1,double param_2)

{
  param_1[1] = param_2;
  *(undefined1 *)(param_1 + 2) = 0;
  *param_1 = param_2 * 0.3;
  return param_1;
}



undefined8 FUN_1401ae8b0(undefined8 param_1)

{
  HRESULT HVar1;
  
  HVar1 = CoInitialize((LPVOID)0x0);
  *(bool *)param_1 = -1 < HVar1;
  return param_1;
}



void FUN_1401ae8e0(char *param_1)

{
  if (*param_1 != '\0') {
    CoUninitialize();
  }
  return;
}



undefined8 * FUN_1401ae900(undefined8 *param_1,undefined8 param_2)

{
  param_1[1] = Proud::CFastArray<>::vftable;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[7] = 0;
  *param_1 = param_2;
  *(undefined4 *)((longlong)param_1 + 0x2c) = 1;
  return param_1;
}



void FUN_1401ae940(longlong param_1)

{
  *(undefined ***)(param_1 + 8) = Proud::CFastArray<>::vftable;
  if (*(longlong *)(param_1 + 0x18) != 0) {
    if (*(longlong **)(param_1 + 0x10) != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x0001401ae968. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(**(longlong **)(param_1 + 0x10) + 0x18))();
      return;
    }
    FUN_140156970(*(longlong *)(param_1 + 0x18));
  }
  return;
}



void FUN_1401ae980(longlong param_1)

{
  int iVar1;
  
  if (0xffffffff < *(longlong *)(param_1 + 0x30) + 0x80000000U) {
                    // WARNING: Subroutine does not return
    FUN_140156710(L"Proud::CStreamQueue::Shrink");
  }
  if (0 < (longlong)*(size_t *)(param_1 + 0x38)) {
    iVar1 = *(int *)(param_1 + 0x30);
    if (-1 < iVar1) {
      if (iVar1 < *(int *)(param_1 + 0x20)) {
        if (*(int *)(param_1 + 0x20) < 1) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        memmove(*(void **)(param_1 + 0x18),
                (void *)((longlong)*(void **)(param_1 + 0x18) + (longlong)iVar1),
                *(size_t *)(param_1 + 0x38));
        goto LAB_1401ae9d2;
      }
    }
                    // WARNING: Subroutine does not return
    FUN_1401566e0();
  }
LAB_1401ae9d2:
  *(undefined8 *)(param_1 + 0x30) = 0;
  return;
}



void FUN_1401aea00(longlong *param_1,undefined8 *param_2,uint param_3)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined8 uVar3;
  int iVar4;
  undefined8 *_Dst;
  ulonglong uVar5;
  undefined8 *puVar6;
  ulonglong uVar7;
  ulonglong _Size;
  
  lVar2 = param_1[6];
  _Size = (ulonglong)(int)param_3;
  if ((longlong)(_Size + lVar2 + param_1[7]) < (longlong)(int)param_1[4]) {
    if (0xffffffff < lVar2 + param_1[7] + 0x80000000U) {
                    // WARNING: Subroutine does not return
      FUN_140156710(L"Proud::CStreamQueue::PushBack_Copy");
    }
    iVar4 = (int)lVar2 + (int)param_1[7];
    if ((iVar4 < 0) || ((int)param_1[4] <= iVar4)) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    _Dst = (undefined8 *)((longlong)iVar4 + param_1[3]);
    if (_Size < 0x21) {
      uVar5 = (ulonglong)(param_3 & 7);
      for (uVar7 = _Size >> 3; uVar7 != 0; uVar7 = uVar7 - 1) {
        uVar3 = *param_2;
        param_2 = param_2 + 1;
        *_Dst = uVar3;
        _Dst = _Dst + 1;
      }
      if (uVar5 != 0) {
        puVar6 = param_2;
        do {
          uVar1 = *(undefined1 *)puVar6;
          puVar6 = (undefined8 *)((longlong)puVar6 + 1);
          uVar5 = uVar5 - 1;
          *(undefined1 *)((longlong)_Dst + (-1 - (longlong)param_2) + (longlong)puVar6) = uVar1;
        } while (uVar5 != 0);
      }
      goto LAB_1401aeac9;
    }
  }
  else {
    if ((0 < lVar2) && (0 < (int)param_1[4])) {
      FUN_1401ae980(param_1);
    }
    if ((longlong)(int)param_1[4] < (longlong)(_Size + param_1[7])) {
      if (0xffffffff < *param_1 + _Size + param_1[7] + 0x80000000) {
                    // WARNING: Subroutine does not return
        FUN_140156710(L"Proud::CStreamQueue::PushBack_Copy");
      }
      FUN_140050060(param_1 + 1,(int)*param_1 + param_3 + (int)param_1[7]);
    }
    if (0xffffffff < param_1[7] + 0x80000000U) {
                    // WARNING: Subroutine does not return
      FUN_140156710(L"Proud::CStreamQueue::PushBack_Copy");
    }
    iVar4 = (int)param_1[7];
    if ((iVar4 < 0) || ((int)param_1[4] <= iVar4)) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    _Dst = (undefined8 *)((longlong)iVar4 + param_1[3]);
    if (_Size < 0x21) {
      uVar5 = (ulonglong)(param_3 & 7);
      for (uVar7 = _Size >> 3; uVar7 != 0; uVar7 = uVar7 - 1) {
        uVar3 = *param_2;
        param_2 = param_2 + 1;
        *_Dst = uVar3;
        _Dst = _Dst + 1;
      }
      if (uVar5 != 0) {
        puVar6 = param_2;
        do {
          uVar1 = *(undefined1 *)puVar6;
          puVar6 = (undefined8 *)((longlong)puVar6 + 1);
          uVar5 = uVar5 - 1;
          *(undefined1 *)((longlong)_Dst + (-1 - (longlong)param_2) + (longlong)puVar6) = uVar1;
        } while (uVar5 != 0);
      }
      goto LAB_1401aeac9;
    }
  }
  memcpy(_Dst,param_2,_Size);
LAB_1401aeac9:
  param_1[7] = param_1[7] + _Size;
  return;
}



longlong FUN_1401aebf0(longlong *param_1,longlong param_2)

{
  if (param_1[7] <= param_2) {
    param_2 = param_1[7];
  }
  param_1[6] = param_1[6] + param_2;
  param_1[7] = param_1[7] - param_2;
  if (param_1[7] <= (longlong)(*param_1 + (ulonglong)((uint)(*param_1 >> 0x3f) & 0x3f)) >> 6) {
    FUN_1401ae980();
  }
  return param_2;
}



undefined8 * FUN_1401aec30(undefined8 *param_1,LONG param_2,LONG param_3)

{
  HANDLE pvVar1;
  
  pvVar1 = CreateSemaphoreW((LPSECURITY_ATTRIBUTES)0x0,param_2,param_3,(LPCWSTR)0x0);
  *param_1 = pvVar1;
  return param_1;
}



long FUN_1401aec50(undefined8 *param_1,LONG param_2)

{
  long local_res18 [4];
  
  local_res18[0] = 0;
  ReleaseSemaphore((HANDLE)*param_1,param_2,local_res18);
  return local_res18[0];
}



uint FUN_1401aec80(byte *param_1,int param_2)

{
  byte bVar1;
  uint uVar2;
  
  uVar2 = 0xffffffff;
  for (; param_2 != 0; param_2 = param_2 + -1) {
    bVar1 = *param_1;
    param_1 = param_1 + 1;
    uVar2 = *(uint *)(&DAT_1402715e0 + (ulonglong)((bVar1 ^ uVar2) & 0xff) * 4) ^ uVar2 >> 8;
  }
  return ~uVar2;
}



undefined8 * FUN_1401aecd0(undefined8 *param_1)

{
  param_1[1] = 0;
  *param_1 = Proud::IHeartbeatWork::vftable;
  return param_1;
}



void FUN_1401aecf0(longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined1 local_58 [88];
  
  if ((longlong *)param_2[2] != param_1) {
    FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                  L"Proud::CListNode<class Proud::CHeartbeatWorkThread::WorkData>::CListOwner::Erase"
                 );
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  plVar1 = (longlong *)param_2[1];
  lVar2 = *param_2;
  if (plVar1 != (longlong *)0x0) {
    *plVar1 = lVar2;
  }
  if (lVar2 != 0) {
    *(longlong **)(lVar2 + 8) = plVar1;
  }
  if (plVar1 == (longlong *)0x0) {
    if ((longlong *)param_1[1] != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CHeartbeatWorkThread::WorkData>::CListOwner::Erase"
                   );
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    param_1[1] = lVar2;
  }
  if (lVar2 == 0) {
    if ((longlong *)*param_1 != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CHeartbeatWorkThread::WorkData>::CListOwner::Erase"
                   );
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    *param_1 = (longlong)plVar1;
  }
  *param_2 = 0;
  param_2[1] = 0;
  param_2[2] = 0;
  *(int *)(param_1 + 2) = (int)param_1[2] + -1;
  return;
}



void FUN_1401aedd0(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  undefined1 local_58 [88];
  
  lVar1 = *param_1;
  while( true ) {
    if (lVar1 == 0) {
      return;
    }
    plVar2 = (longlong *)*param_1;
    if ((longlong *)plVar2[2] != param_1) break;
    plVar3 = (longlong *)plVar2[1];
    lVar1 = *plVar2;
    if (plVar3 != (longlong *)0x0) {
      *plVar3 = lVar1;
    }
    if (lVar1 != 0) {
      *(longlong **)(lVar1 + 8) = plVar3;
    }
    if (plVar3 == (longlong *)0x0) {
      if ((longlong *)param_1[1] != plVar2) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::CHeartbeatWorkThread::WorkData>::CListOwner::Erase"
                     );
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      param_1[1] = lVar1;
    }
    if (lVar1 == 0) {
      if ((longlong *)*param_1 != plVar2) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::CHeartbeatWorkThread::WorkData>::CListOwner::Erase"
                     );
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      *param_1 = (longlong)plVar3;
    }
    *plVar2 = 0;
    plVar2[1] = 0;
    plVar2[2] = 0;
    *(int *)(param_1 + 2) = (int)param_1[2] + -1;
    lVar1 = *param_1;
  }
  FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                L"Proud::CListNode<class Proud::CHeartbeatWorkThread::WorkData>::CListOwner::Erase")
  ;
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



void FUN_1401aeec0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  DWORD DVar3;
  undefined8 uVar4;
  longlong lVar5;
  undefined1 uVar6;
  
  uVar4 = 0xfffffffffffffffe;
  if (*(char *)(param_1 + 0x80) != '\0') {
    plVar1 = (longlong *)(param_1 + 0x38);
    do {
      lVar5 = param_1;
      FUN_140156b50(param_1);
      uVar6 = 1;
      DVar3 = GetTickCount();
      puVar2 = (undefined8 *)*plVar1;
      if ((puVar2 == (undefined8 *)0x0) ||
         (DVar3 - *(int *)(puVar2 + 4) <= *(uint *)((longlong)puVar2 + 0x24))) {
        FUN_140156be0(param_1);
      }
      else {
        *(DWORD *)(puVar2 + 4) = DVar3;
        if (puVar2[2] != 0) {
          FUN_1401aecf0(puVar2[2],puVar2,param_3,param_4,uVar4,lVar5,uVar6);
        }
        if (puVar2[2] != 0) {
          FUN_1401aecf0(plVar1,puVar2,param_3,param_4,uVar4,lVar5,uVar6);
        }
        if (*(longlong *)(param_1 + 0x40) == 0) {
          *plVar1 = (longlong)puVar2;
        }
        else {
          *(undefined8 **)(*(longlong *)(param_1 + 0x40) + 8) = puVar2;
          *puVar2 = *(undefined8 *)(param_1 + 0x40);
        }
        *(undefined8 **)(param_1 + 0x40) = puVar2;
        puVar2[2] = plVar1;
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
        FUN_140156be0(param_1);
        *(undefined1 *)(puVar2 + 8) = 1;
        (**(code **)(*(longlong *)puVar2[3] + 8))();
        *(undefined1 *)(puVar2 + 8) = 0;
      }
      Sleep(10);
    } while (*(char *)(param_1 + 0x80) != '\0');
  }
  return;
}



void thunk_FUN_1401aedd0(void)

{
  FUN_1401aedd0();
  return;
}



void FUN_1401aefd0(longlong param_1,longlong param_2,undefined4 param_3)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  FUN_140156b50();
  if (*(longlong *)(param_2 + 8) == 0) {
    puVar2 = operator_new(0x80);
    if (puVar2 != (undefined8 *)0x0) {
      *puVar2 = 0;
      puVar2[1] = 0;
      puVar2[2] = 0;
      *(undefined4 *)(puVar2 + 4) = 0;
      *(undefined1 *)(puVar2 + 8) = 0;
    }
    puVar2[3] = param_2;
    *(undefined4 *)((longlong)puVar2 + 0x24) = param_3;
    *(longlong *)(param_2 + 8) = param_1;
    puVar1 = (undefined8 *)(param_1 + 0x38);
    if (puVar2[2] != 0) {
      FUN_1401aecf0(puVar1,puVar2);
    }
    if (*(longlong *)(param_1 + 0x40) == 0) {
      *puVar1 = puVar2;
    }
    else {
      *(undefined8 **)(*(longlong *)(param_1 + 0x40) + 8) = puVar2;
      *puVar2 = *(undefined8 *)(param_1 + 0x40);
    }
    *(undefined8 **)(param_1 + 0x40) = puVar2;
    puVar2[2] = puVar1;
    *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
    FUN_140156be0(param_1);
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_1401af0b0(longlong param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  char cVar1;
  void *pvVar2;
  undefined8 uVar3;
  longlong lVar4;
  undefined1 uVar5;
  
  uVar3 = 0xfffffffffffffffe;
  lVar4 = param_1;
  FUN_140156b50();
  if (*(longlong *)(param_2 + 8) != 0) {
    if (*(longlong *)(param_2 + 8) != param_1) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    for (pvVar2 = *(void **)(param_1 + 0x38); pvVar2 != (void *)0x0;
        pvVar2 = *(void **)((longlong)pvVar2 + 8)) {
      if (*(longlong *)((longlong)pvVar2 + 0x18) == param_2) {
        *(undefined8 *)(param_2 + 8) = 0;
        if (*(longlong *)((longlong)pvVar2 + 0x10) != 0) {
          FUN_1401aecf0(*(longlong *)((longlong)pvVar2 + 0x10),pvVar2,param_3,param_4,uVar3,lVar4,1)
          ;
        }
        FUN_140156be0(param_1);
        uVar5 = 0;
        cVar1 = *(char *)((longlong)pvVar2 + 0x40);
        while (cVar1 != '\0') {
          Sleep(10);
          cVar1 = *(char *)((longlong)pvVar2 + 0x40);
        }
        if (*(longlong *)((longlong)pvVar2 + 0x10) != 0) {
          FUN_1401aecf0(*(longlong *)((longlong)pvVar2 + 0x10),pvVar2,param_3,param_4,uVar3,lVar4,
                        uVar5);
        }
        operator_delete(pvVar2);
        return;
      }
    }
  }
  FUN_140156be0(param_1);
  return;
}



void FUN_1401af190(longlong param_1)

{
  undefined8 *puVar1;
  longlong *plVar2;
  undefined8 uVar3;
  int iVar4;
  longlong lVar5;
  
  FUN_140156b50();
  if (0 < *(int *)(param_1 + 0x48)) {
    FUN_1401580e0(
                 L"CHeartbeatWorkThread must be cleaned up only after every work items are unregistered!"
                 );
  }
  *(undefined1 *)(param_1 + 0x80) = 0;
  iVar4 = 0;
  lVar5 = 0;
  if (0 < *(int *)(param_1 + 0x68)) {
    do {
      if ((lVar5 < 0) || (*(int *)(param_1 + 0x68) <= iVar4)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      puVar1 = *(undefined8 **)(*(longlong *)(param_1 + 0x60) + lVar5 * 8);
      uVar3 = 0;
      if (puVar1 != (undefined8 *)0x0) {
        uVar3 = *puVar1;
      }
      FUN_140182710(uVar3);
      iVar4 = iVar4 + 1;
      lVar5 = lVar5 + 1;
    } while (iVar4 < *(int *)(param_1 + 0x68));
  }
  FUN_140156be0(param_1);
  *(undefined ***)(param_1 + 0x50) = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 0x68)) {
    FUN_14016d0f0(*(undefined8 *)(param_1 + 0x60),(longlong)*(int *)(param_1 + 0x68));
  }
  if (*(longlong *)(param_1 + 0x60) != 0) {
    plVar2 = *(longlong **)(param_1 + 0x58);
    if (plVar2 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar2 + 0x18))(plVar2,*(longlong *)(param_1 + 0x60));
    }
  }
  FUN_1401aedd0(param_1 + 0x38);
  FUN_140156c00(param_1);
  return;
}



longlong FUN_1401af290(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  int iVar3;
  void *pvVar4;
  ulonglong *puVar5;
  longlong *plVar6;
  undefined4 uVar7;
  int iVar8;
  longlong lVar9;
  longlong lVar10;
  longlong lVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  int iVar14;
  ulonglong uVar15;
  longlong lVar16;
  ulonglong uVar17;
  int iVar18;
  longlong *local_res18;
  undefined8 uVar19;
  
  uVar19 = 0xfffffffffffffffe;
  uVar7 = FUN_14015a430();
  FUN_140156a70(param_1,uVar7,1,param_4,uVar19);
  iVar18 = 0;
  *(undefined8 *)(param_1 + 0x38) = 0;
  *(undefined8 *)(param_1 + 0x40) = 0;
  *(undefined4 *)(param_1 + 0x48) = 0;
  puVar2 = (undefined8 *)(param_1 + 0x50);
  *puVar2 = Proud::CFastArray<>::vftable;
  *(undefined8 *)(param_1 + 0x58) = 0;
  *(undefined8 *)(param_1 + 0x60) = 0;
  *(undefined8 *)(param_1 + 0x68) = 0;
  *(undefined8 *)(param_1 + 0x70) = 0;
  *(undefined1 *)(param_1 + 0x80) = 1;
  iVar8 = FUN_140157f20();
  if (0 < iVar8) {
    do {
      lVar9 = 0;
      local_res18 = operator_new(0x28);
      if (local_res18 != (longlong *)0x0) {
        lVar9 = FUN_140182680(local_res18,&LAB_1401af0a0,param_1);
      }
      if (lVar9 == 0) {
        local_res18 = (longlong *)0x0;
      }
      else {
        local_res18 = (longlong *)FUN_140156940(0x10);
        local_res18[1] = 1;
        *local_res18 = lVar9;
      }
      plVar1 = local_res18;
      iVar3 = *(int *)(param_1 + 0x68);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      iVar14 = *(int *)(param_1 + 0x68);
      FUN_140191870(puVar2,iVar14 + 1);
      iVar14 = iVar14 - iVar3;
      if ((0 < iVar14) && (iVar14 = iVar14 + -1, -1 < iVar14)) {
        lVar9 = (longlong)(iVar14 + iVar3 + 1) << 3;
        lVar16 = (longlong)(iVar14 + iVar3) << 3;
        do {
          lVar10 = FUN_1401a7bb0(puVar2);
          lVar11 = FUN_1401a7bb0(puVar2);
          FUN_14018da90(lVar9 + lVar11,lVar16 + lVar10);
          lVar16 = lVar16 + -8;
          lVar9 = lVar9 + -8;
          iVar14 = iVar14 + -1;
        } while (-1 < iVar14);
      }
      lVar9 = FUN_1401a7bb0(puVar2);
      FUN_14018da90(lVar9 + (longlong)iVar3 * 8,&local_res18);
      plVar6 = local_res18;
      if (plVar1 != (longlong *)0x0) {
        plVar1 = plVar1 + 1;
        *plVar1 = *plVar1 + -1;
        if (*plVar1 == 0) {
          pvVar4 = (void *)*local_res18;
          if (pvVar4 != (void *)0x0) {
            FUN_140182790(pvVar4);
            operator_delete(pvVar4);
          }
          FUN_140156970(plVar6);
        }
      }
      iVar18 = iVar18 + 1;
    } while (iVar18 < iVar8);
  }
  uVar17 = 0;
  uVar13 = uVar17;
  uVar15 = uVar17;
  if (0 < iVar8) {
    do {
      if (((longlong)uVar13 < 0) || (*(int *)(param_1 + 0x68) <= (int)uVar15)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      puVar5 = *(ulonglong **)(*(longlong *)(param_1 + 0x60) + uVar13 * 8);
      uVar12 = uVar17;
      if (puVar5 != (ulonglong *)0x0) {
        uVar12 = *puVar5;
      }
      FUN_140182870(uVar12);
      uVar15 = (ulonglong)((int)uVar15 + 1);
      uVar13 = uVar13 + 1;
    } while ((longlong)uVar13 < (longlong)iVar8);
  }
  return param_1;
}



undefined8 FUN_1401af4e0(undefined8 param_1,undefined4 *param_2)

{
  FUN_14004fe70(param_1,*param_2);
  FUN_140050340(param_1,*(undefined2 *)(param_2 + 1));
  FUN_140155f20(param_1,param_2 + 2);
  FUN_14004fd90(param_1,*(undefined1 *)(param_2 + 4));
  return param_1;
}



void FUN_1401af530(undefined8 *param_1)

{
  *param_1 = Proud::IRmiHost::vftable;
  return;
}



void FUN_1401af540(undefined8 *param_1)

{
  *param_1 = Proud::ISendDest_C::vftable;
  return;
}



undefined8 * FUN_1401af550(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::ISendDest_C::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401af580(undefined8 *param_1)

{
  *param_1 = Proud::IP2PGroupMember::vftable;
  return;
}



undefined8 * FUN_1401af590(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::IP2PGroupMember::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401af5c0(undefined8 *param_1)

{
  *param_1 = Proud::CP2PConnectionTrialContext::StateBase::vftable;
  return;
}



undefined8 * FUN_1401af5d0(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::CP2PConnectionTrialContext::StateBase::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 FUN_1401af600(void)

{
  return 64000;
}



undefined8 FUN_1401af610(void)

{
  return 0xfa14;
}



undefined8 FUN_1401af620(void)

{
  return 65000;
}



undefined8 FUN_1401af630(void)

{
  return 0xfded;
}



void FUN_1401af640(undefined8 *param_1)

{
  param_1[2] = 0;
  param_1[1] = Proud::IP2PGroupMember::vftable;
  *param_1 = Proud::ISendDest_C::vftable;
  return;
}



void thunk_FUN_1401887e0(longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  char cVar2;
  short sVar3;
  ushort uVar4;
  ushort uVar5;
  int iVar6;
  ushort uVar7;
  ushort uVar8;
  ushort uVar9;
  int iVar10;
  longlong lVar11;
  longlong *plStackX_10;
  undefined1 auStack_78 [80];
  
  plStackX_10 = param_2;
  cVar2 = (**(code **)(*param_1 + 0x90))();
  if (cVar2 != '\0') {
    FUN_140156300(auStack_78,PTR_u_Already_async_callback_may_occur_140320fd8);
                    // WARNING: Subroutine does not return
    _CxxThrowException(auStack_78,(ThrowInfo *)&DAT_14031d928);
  }
  iVar10 = 0;
  lVar11 = 0;
  if (0 < (int)param_1[4]) {
    do {
      if ((lVar11 < 0) || ((int)param_1[4] <= iVar10)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      plVar1 = *(longlong **)(param_1[3] + lVar11 * 8);
      iVar6 = (**(code **)*plVar1)(plVar1);
      if (0xfff9 < iVar6) {
LAB_1401889ab:
        FUN_140156300(auStack_78,PTR_u_Wrong_RMI_ID_is_found__RMI_ID_sh_140320fd0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(auStack_78,(ThrowInfo *)&DAT_14031d928);
      }
      iVar6 = (**(code **)(*plVar1 + 8))(plVar1);
      if (iVar6 < 1) goto LAB_1401889ab;
      sVar3 = (**(code **)(*param_2 + 8))(param_2);
      uVar7 = sVar3 + 1;
      uVar4 = (**(code **)*param_2)(param_2);
      sVar3 = (**(code **)(*plVar1 + 8))(plVar1);
      uVar8 = sVar3 + 1;
      uVar5 = (**(code **)*plVar1)(plVar1);
      uVar9 = uVar8;
      if (uVar8 < uVar5) {
        uVar9 = uVar5;
        uVar5 = uVar8;
      }
      uVar8 = uVar7;
      if (uVar7 < uVar4) {
        uVar8 = uVar4;
        uVar4 = uVar7;
      }
      if (uVar5 < uVar4) {
LAB_140188904:
        if ((uVar8 <= uVar9) || ((uVar4 <= uVar9 && (uVar9 <= uVar8)))) goto LAB_140188988;
        if (uVar4 <= uVar5) goto LAB_140188919;
      }
      else {
        if (uVar9 <= uVar8) goto LAB_140188988;
        if (uVar5 <= uVar4) goto LAB_140188904;
LAB_140188919:
        if ((uVar5 <= uVar8) && (uVar8 <= uVar9)) {
LAB_140188988:
          FUN_140156300(auStack_78,PTR_u_Duplicated_RMI_ID_is_found__Revi_140320fc8);
                    // WARNING: Subroutine does not return
          _CxxThrowException(auStack_78,(ThrowInfo *)&DAT_14031d928);
        }
      }
      iVar10 = iVar10 + 1;
      lVar11 = lVar11 + 1;
    } while (iVar10 < (int)param_1[4]);
  }
  param_2[1] = (longlong)param_1;
  FUN_140188160(param_1 + 1,(int)param_1[4],&plStackX_10,1);
  return;
}



void thunk_FUN_140156cd0(void)

{
  FUN_140156cd0();
  return;
}



undefined8 FUN_1401af680(longlong param_1)

{
  return *(undefined8 *)(param_1 + 0x1580);
}



void FUN_1401af690(longlong param_1,double param_2)

{
  undefined1 local_58 [88];
  
  if (param_2 <= 0.0) {
    FUN_140156300(local_58,L"Invalid parameter!");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  *(double *)(param_1 + 0x1728) = param_2;
  return;
}



undefined4 FUN_1401af6d0(longlong param_1)

{
  return *(undefined4 *)(param_1 + 0x628);
}



void FUN_1401af6e0(longlong param_1,undefined8 param_2)

{
  char cVar1;
  undefined1 local_58 [80];
  
  cVar1 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x90))(param_1 + -0x70);
  if (cVar1 != '\0') {
    FUN_140156300(local_58,PTR_u_Already_async_callback_may_occur_140320fd8);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  (**(code **)(*(longlong *)(param_1 + 8) + 0x18))(param_1 + 8);
  *(undefined8 *)(param_1 + 0x1510) = param_2;
  return;
}



undefined4 FUN_1401af750(longlong param_1)

{
  return *(undefined4 *)(param_1 + 0x6a4);
}



undefined4 FUN_1401af760(longlong param_1)

{
  return *(undefined4 *)(param_1 + 0x624);
}



void FUN_1401af770(longlong param_1,undefined2 *param_2)

{
  *param_2 = *(undefined2 *)(param_1 + 0x1858);
  *(undefined1 *)(param_2 + 1) = *(undefined1 *)(param_1 + 0x185a);
  return;
}



void FUN_1401af790(longlong param_1,undefined8 *param_2)

{
  *(undefined8 *)(param_1 + 0x1800) = *param_2;
  return;
}



void FUN_1401af7a0(longlong param_1,undefined8 *param_2)

{
  *param_2 = *(undefined8 *)(param_1 + 0x1870);
  return;
}



void FUN_1401af7b0(longlong *param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  undefined1 local_58 [88];
  
  if (*(longlong **)(param_2 + 0xb0) != param_1) {
    FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                  L"Proud::CListNode<class Proud::CNetClientImpl>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  lVar1 = *(longlong *)(param_2 + 0xa8);
  lVar2 = *(longlong *)(param_2 + 0xa0);
  if (lVar1 != 0) {
    *(longlong *)(lVar1 + 0xa0) = lVar2;
  }
  if (lVar2 != 0) {
    *(longlong *)(lVar2 + 0xa8) = lVar1;
  }
  if (lVar1 == 0) {
    if (param_1[1] != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CNetClientImpl>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    param_1[1] = lVar2;
  }
  if (lVar2 == 0) {
    if (*param_1 != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CNetClientImpl>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    *param_1 = lVar1;
  }
  *(undefined8 *)(param_2 + 0xa0) = 0;
  *(undefined8 *)(param_2 + 0xa8) = 0;
  *(undefined8 *)(param_2 + 0xb0) = 0;
  *(int *)(param_1 + 2) = (int)param_1[2] + -1;
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_1401af8a0(undefined8 *param_1)

{
  undefined4 *puVar1;
  undefined1 auStack_58 [32];
  undefined8 *local_38;
  undefined8 local_30;
  undefined1 local_28 [16];
  ulonglong local_18;
  
  local_30 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  *param_1 = Proud::CP2PConnectionTrialContext::PeerHolepunchState::vftable;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined4 *)((longlong)param_1 + 0x24) = 0;
  *(undefined4 *)(param_1 + 5) = 0;
  *(undefined4 *)((longlong)param_1 + 0x2c) = 0;
  *(undefined2 *)((longlong)param_1 + 0x34) = 0x3ff;
  *(undefined4 *)(param_1 + 6) = DAT_140320d18;
  *(undefined4 *)(param_1 + 1) = 1;
  param_1[2] = 0;
  param_1[3] = 0;
  local_38 = param_1;
  puVar1 = (undefined4 *)FUN_1401828e0(local_28);
  *(undefined4 *)(param_1 + 4) = *puVar1;
  *(undefined4 *)((longlong)param_1 + 0x24) = puVar1[1];
  *(undefined4 *)(param_1 + 5) = puVar1[2];
  *(undefined4 *)((longlong)param_1 + 0x2c) = puVar1[3];
  return param_1;
}



void * FUN_1401af950(void *param_1,uint param_2)

{
  FUN_140156cd0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401af980(longlong param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001401af98c. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 8) + 0x68) + 0x10))
            (*(longlong *)(param_1 + 8) + 0x68);
  return;
}



undefined8 * FUN_1401af990(undefined8 *param_1,byte param_2)

{
  param_1[2] = 0;
  param_1[1] = Proud::IP2PGroupMember::vftable;
  *param_1 = Proud::ISendDest_C::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401af9d0(longlong param_1)

{
  FUN_1401af990(param_1 + -8);
  return;
}



undefined8 FUN_1401af9e0(longlong param_1)

{
  undefined8 uVar1;
  
  uVar1 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar1);
  FUN_140156be0(uVar1);
  return 1;
}



undefined8 FUN_1401afa10(longlong param_1)

{
  undefined8 uVar1;
  
  uVar1 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar1);
  *(undefined1 *)(*(longlong *)(param_1 + 0x20) + 0x1790) = 1;
  FUN_140156be0(uVar1);
  return 1;
}



undefined8 FUN_1401afa60(longlong param_1)

{
  undefined8 uVar1;
  
  uVar1 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar1);
  *(undefined1 *)(*(longlong *)(param_1 + 0x20) + 0x1790) = 0;
  FUN_140156be0(uVar1);
  return 1;
}



void * FUN_1401afab0(void *param_1,uint param_2)

{
  FUN_140157bd0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401afae0(longlong param_1)

{
  if (*(undefined8 **)(param_1 + 0x1570) != (undefined8 *)0x0) {
    FUN_1401dc980(**(undefined8 **)(param_1 + 0x1570),0);
    return;
  }
  FUN_1401dc980(0,0);
  return;
}



undefined8 FUN_1401afb00(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong *plVar4;
  longlong lVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  undefined8 uVar8;
  undefined1 uVar9;
  
  uVar7 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))
                    (*(longlong **)(param_1 + 0x20),param_2,param_3,param_4,0xfffffffffffffffe);
  uVar8 = uVar2;
  FUN_140156b50(uVar2);
  uVar9 = 1;
  lVar1 = *(longlong *)(param_1 + 0x20);
  plVar4 = *(longlong **)(lVar1 + 0x5d0);
  if ((plVar4 != (longlong *)0x0) && (*plVar4 != 0)) {
    lVar5 = 0;
    lVar3 = lVar5;
    if (plVar4 != (longlong *)0x0) {
      lVar3 = *plVar4;
    }
    if (0.0 < *(double *)(lVar3 + 0xd0)) {
      lVar3 = lVar5;
      if (plVar4 != (longlong *)0x0) {
        lVar3 = *plVar4;
      }
      if (*(double *)(lVar3 + 0xd8) != 0.0) {
        if (*(longlong **)(lVar1 + 0x5d0) != (longlong *)0x0) {
          lVar5 = **(longlong **)(lVar1 + 0x5d0);
        }
        uVar6 = (**(code **)(*(longlong *)(lVar1 + 0x70) + 0x1c0))();
        *(undefined8 *)(lVar5 + 0xd0) = uVar6;
      }
    }
  }
  plVar4 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x1818);
  (**(code **)(*plVar4 + 0x90))(plVar4,1,&DAT_140328530,param_4,uVar7,uVar8,uVar9);
  FUN_140156be0(uVar2);
  return 1;
}



undefined8 FUN_1401afc00(longlong param_1,undefined8 param_2,undefined8 param_3,undefined1 *param_4)

{
  longlong lVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar2);
  lVar1 = *(longlong *)(*(longlong *)(param_1 + 0x20) + 0x5d8);
  uVar3 = 0;
  if (lVar1 != 0) {
    uVar3 = *(undefined8 *)(lVar1 + 0x38);
  }
  FUN_1401d6750(uVar3,*param_4);
  FUN_140156be0(uVar2);
  return 1;
}



undefined8 FUN_1401afc80(longlong param_1,undefined8 param_2,undefined8 param_3,char *param_4)

{
  undefined8 uVar1;
  
  uVar1 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar1);
  if (*param_4 == '\0') {
    *(double *)(*(longlong *)(param_1 + 0x20) + 0x1890) = DAT_140320ca8;
  }
  else if (*(double *)(*(longlong *)(param_1 + 0x20) + 0x1890) == DAT_140320ca8) {
    *(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x1890) = 0;
  }
  FUN_140156be0(uVar1);
  return 1;
}



double FUN_1401afd10(longlong param_1)

{
  double dVar1;
  undefined8 uVar2;
  double dVar3;
  
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))();
  FUN_140156b50(uVar2);
  dVar3 = (double)FUN_14018aee0(param_1 + 0x15b0);
  dVar1 = *(double *)(param_1 + 0x480);
  FUN_140156be0(uVar2);
  return dVar3 - dVar1;
}



void FUN_1401afd80(longlong param_1)

{
  if (*(longlong *)(param_1 + 0x568) != 0) {
    FUN_1401d3e30(*(undefined8 *)(*(longlong *)(param_1 + 0x568) + 0x38));
    return;
  }
  FUN_1401d3e30();
  return;
}



undefined8 FUN_1401afda0(longlong param_1)

{
  if (*(longlong *)(param_1 + 0x5d8) != 0) {
    return *(undefined8 *)(*(longlong *)(*(longlong *)(param_1 + 0x5d8) + 0x38) + 0x100);
  }
  return uRam0000000000000100;
}



ulonglong FUN_1401afdd0(longlong param_1)

{
  longlong *plVar1;
  ulonglong uVar2;
  
  plVar1 = *(longlong **)(param_1 + 0x5d0);
  if ((plVar1 != (longlong *)0x0) && (*plVar1 != 0)) {
    uVar2 = FUN_14018a700();
    return uVar2;
  }
  return (ulonglong)plVar1 & 0xffffffffffffff00;
}



undefined4 FUN_1401afe00(longlong *param_1)

{
  longlong lVar1;
  undefined8 uVar2;
  
  uVar2 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar2);
  lVar1 = param_1[0x2af];
  FUN_140156be0(uVar2);
  return (int)lVar1;
}



undefined8 FUN_1401afe40(longlong param_1,undefined1 *param_2)

{
  longlong lVar1;
  undefined8 uVar2;
  undefined1 uVar3;
  
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))();
  FUN_140156b50();
  if ((*(longlong **)(param_1 + 0x1500) == (longlong *)0x0) ||
     (lVar1 = **(longlong **)(param_1 + 0x1500), lVar1 == 0)) {
    uVar3 = 0;
  }
  else {
    uVar3 = *(undefined1 *)(lVar1 + 0x80);
  }
  *param_2 = uVar3;
  if ((*(longlong **)(param_1 + 0x560) == (longlong *)0x0) ||
     (lVar1 = **(longlong **)(param_1 + 0x560), lVar1 == 0)) goto switchD_1401afed9_default;
  switch(*(undefined4 *)(lVar1 + 0x100)) {
  case 0:
    FUN_140156be0(uVar2);
    uVar2 = 1;
    break;
  case 1:
    FUN_140156be0(uVar2);
    uVar2 = 1;
    break;
  case 2:
    FUN_140156be0(uVar2);
    uVar2 = 2;
    break;
  case 3:
    FUN_140156be0(uVar2);
    uVar2 = 2;
    break;
  case 4:
    FUN_140156be0(uVar2);
    uVar2 = 3;
    break;
  case 5:
  default:
switchD_1401afed9_default:
    FUN_140156be0(uVar2);
    uVar2 = 0;
  }
  return uVar2;
}



longlong FUN_1401aff70(longlong param_1)

{
  longlong lVar1;
  
  if ((*(longlong **)(param_1 + 0x1520) != (longlong *)0x0) &&
     (lVar1 = **(longlong **)(param_1 + 0x1520), lVar1 != 0)) {
    return lVar1 + -0x40;
  }
  return 0;
}



longlong FUN_1401aff90(longlong param_1)

{
  longlong lVar1;
  
  if ((*(longlong **)(param_1 + 0x15d8) != (longlong *)0x0) &&
     (lVar1 = **(longlong **)(param_1 + 0x15d8), lVar1 != 0)) {
    return lVar1 + -0x40;
  }
  return 0;
}



void FUN_1401affb0(longlong param_1)

{
  longlong lVar1;
  longlong lVar2;
  double dVar3;
  undefined8 uVar4;
  
  if ((*(longlong **)(param_1 + 0x1570) != (longlong *)0x0) &&
     (lVar1 = **(longlong **)(param_1 + 0x1570), lVar1 != 0)) {
    dVar3 = (double)(**(code **)(*(longlong *)(param_1 + 0x70) + 0x1c0))(param_1 + 0x70);
    lVar2 = 0;
    dVar3 = dVar3 - *(double *)(lVar1 + 0x180);
    if (0.0 < dVar3) {
      lVar1 = lVar2;
      if (*(longlong **)(param_1 + 0x1570) != (longlong *)0x0) {
        lVar1 = **(longlong **)(param_1 + 0x1570);
      }
      *(double *)(lVar1 + 0x200) = dVar3;
    }
    lVar1 = lVar2;
    if (*(longlong **)(param_1 + 0x1570) != (longlong *)0x0) {
      lVar1 = **(longlong **)(param_1 + 0x1570);
    }
    uVar4 = (**(code **)(*(longlong *)(param_1 + 0x70) + 0x1c0))(param_1 + 0x70);
    *(undefined8 *)(lVar1 + 0x180) = uVar4;
    if (*(longlong **)(param_1 + 0x1570) != (longlong *)0x0) {
      lVar2 = **(longlong **)(param_1 + 0x1570);
    }
    *(int *)(lVar2 + 0x1c0) = *(int *)(lVar2 + 0x1c0) + 1;
  }
  return;
}



undefined8 * FUN_1401b0080(longlong param_1,undefined8 *param_2)

{
  longlong lVar1;
  
  if (((*(longlong **)(param_1 + 0x1520) != (longlong *)0x0) &&
      (lVar1 = **(longlong **)(param_1 + 0x1520), lVar1 != 0)) && (lVar1 != 0x40)) {
    if (lVar1 != 0) {
      lVar1 = lVar1 + -0x40;
    }
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = *(undefined4 *)(lVar1 + 0x130);
    *(undefined2 *)((longlong)param_2 + 0xc) = *(undefined2 *)(lVar1 + 0x134);
    return param_2;
  }
  *param_2 = Proud::AddrPort::vftable;
  *(undefined4 *)(param_2 + 1) = DAT_140320450;
  *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  return param_2;
}



longlong FUN_1401b00f0(longlong param_1)

{
  if (*(longlong *)(param_1 + 0x5d8) != 0) {
    return *(longlong *)(*(longlong *)(param_1 + 0x5d8) + 0x38) + 0x10;
  }
  return 0x10;
}



undefined8 FUN_1401b0110(longlong param_1)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  undefined8 uVar5;
  
  lVar4 = 0;
  lVar2 = lVar4;
  if (*(longlong *)(param_1 + 0x568) != 0) {
    lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x568) + 0x38);
  }
  lVar2 = lVar2 + 0x10;
  FUN_140156b50(lVar2);
  lVar1 = *(longlong *)(param_1 + 0x568);
  lVar3 = lVar4;
  if (lVar1 != 0) {
    lVar3 = *(longlong *)(lVar1 + 0x38);
  }
  if ((*(longlong **)(lVar3 + 0x290) == (longlong *)0x0) || (**(longlong **)(lVar3 + 0x290) == 0)) {
    FUN_140156be0(lVar2);
    uVar5 = 0;
  }
  else {
    lVar3 = lVar4;
    if (lVar1 != 0) {
      lVar3 = *(longlong *)(lVar1 + 0x38);
    }
    if (*(longlong **)(lVar3 + 0x290) != (longlong *)0x0) {
      lVar4 = **(longlong **)(lVar3 + 0x290);
    }
    uVar5 = *(undefined8 *)(lVar4 + 0x40);
    FUN_140156be0(lVar2);
  }
  return uVar5;
}



longlong FUN_1401b01d0(longlong param_1)

{
  longlong *plVar1;
  uint7 uVar2;
  
  plVar1 = *(longlong **)(param_1 + 0x5d0);
  uVar2 = (uint7)((ulonglong)plVar1 >> 8);
  if ((plVar1 != (longlong *)0x0) && (*plVar1 != 0)) {
    return CONCAT71(uVar2,1);
  }
  return (ulonglong)uVar2 << 8;
}



undefined8 * FUN_1401b01f0(longlong param_1,undefined8 *param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))((longlong *)(param_1 + -0x70));
  FUN_140156b50(uVar2);
  plVar1 = *(longlong **)(param_1 + 0x1568);
  if ((((plVar1 == (longlong *)0x0) || (*plVar1 == 0)) || (plVar1 == (longlong *)0x0)) ||
     ((*plVar1 == 0 || (*plVar1 == 0x40)))) {
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = DAT_140320450;
    *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  }
  else {
    if (((plVar1 == (longlong *)0x0) || (*plVar1 == 0)) ||
       ((plVar1 == (longlong *)0x0 || (*plVar1 == 0)))) {
      lVar3 = 0;
    }
    else {
      lVar3 = *plVar1 + -0x40;
    }
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = *(undefined4 *)(lVar3 + 0x108);
    *(undefined2 *)((longlong)param_2 + 0xc) = *(undefined2 *)(lVar3 + 0x10c);
  }
  FUN_140156be0(uVar2);
  return param_2;
}



void FUN_1401b02d0(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  void *pvVar2;
  longlong lVar3;
  longlong lVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  undefined1 uVar7;
  
  uVar5 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(*param_1 + 0x58))();
  uVar6 = uVar1;
  FUN_140156b50(uVar1);
  uVar7 = 1;
  lVar4 = 0;
  lVar3 = lVar4;
  if (param_1[0xbb] != 0) {
    lVar3 = *(longlong *)(param_1[0xbb] + 0x38);
  }
  if ((*(longlong *)(lVar3 + 0x2b0) == 0) && (*(char *)((longlong)param_1 + 0x6c6) != '\0')) {
    pvVar2 = operator_new(0x130);
    lVar3 = lVar4;
    if (pvVar2 != (void *)0x0) {
      if (param_1[0xbb] != 0) {
        lVar3 = *(longlong *)(param_1[0xbb] + 0x38);
      }
      lVar3 = FUN_1401e0960(pvVar2,lVar3,param_3,param_4,uVar5,uVar6,uVar7);
    }
    if (param_1[0xbb] != 0) {
      lVar4 = *(longlong *)(param_1[0xbb] + 0x38);
    }
    *(longlong *)(lVar4 + 0x2b0) = lVar3;
  }
  FUN_140156be0(uVar1);
  return;
}



void FUN_1401b03a0(longlong param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  void *pvVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 0x58) == 0) {
    pvVar1 = operator_new(0xd0);
    uVar2 = 0;
    if (pvVar1 != (void *)0x0) {
      uVar2 = FUN_14019c470(pvVar1,param_1 + 0x98,param_2,param_3,param_4);
    }
    *(undefined8 *)(param_1 + 0x58) = uVar2;
  }
  return;
}



void FUN_1401b0420(longlong param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  if ((*(longlong **)(param_1 + 0x1520) == (longlong *)0x0) ||
     (**(longlong **)(param_1 + 0x1520) == 0)) {
    lVar2 = 0;
    lVar1 = lVar2;
    if (*(longlong **)(param_1 + 0x1570) != (longlong *)0x0) {
      lVar1 = **(longlong **)(param_1 + 0x1570);
    }
    if (((*(char *)(lVar1 + 0x40) == '\0') && (*(int *)(param_1 + 0x6a0) < 2)) &&
       (*(char *)(param_1 + 0x1528) == '\0')) {
      (**(code **)(*(longlong *)(param_1 + 0x1818) + 0x120))
                ((longlong *)(param_1 + 0x1818),1,&DAT_140328530);
      if (*(longlong **)(param_1 + 0x1570) != (longlong *)0x0) {
        lVar2 = **(longlong **)(param_1 + 0x1570);
      }
      *(undefined1 *)(lVar2 + 0x40) = 1;
    }
  }
  return;
}



void FUN_1401b04b0(longlong param_1,undefined4 *param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  puVar2 = (undefined8 *)0x0;
  puVar1 = puVar2;
  if (*(longlong *)(param_1 + 0x568) != 0) {
    puVar1 = *(undefined8 **)(*(longlong *)(param_1 + 0x568) + 0x38);
  }
  if ((undefined8 *)puVar1[0xf] != (undefined8 *)0x0) {
    puVar2 = *(undefined8 **)puVar1[0xf];
  }
  *(undefined8 *)(param_2 + 2) = *puVar2;
  if (*(longlong *)(param_1 + 0x568) == 0) {
    *param_2 = uRam0000000000000284;
    return;
  }
  *param_2 = *(undefined4 *)(*(longlong *)(*(longlong *)(param_1 + 0x568) + 0x38) + 0x284);
  return;
}



void FUN_1401b0510(longlong param_1)

{
  if (*(longlong *)(param_1 + 0x560) != 0) {
    FUN_14018c430(*(undefined8 *)(*(longlong *)(*(longlong *)(param_1 + 0x560) + 0x38) + 0x2b8));
    return;
  }
  FUN_14018c430(uRam00000000000002b8);
  return;
}



undefined8 * FUN_1401b0540(longlong param_1,undefined8 *param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))((longlong *)(param_1 + -0x70));
  FUN_140156b50(uVar2);
  plVar1 = *(longlong **)(param_1 + 0x1568);
  if ((((plVar1 == (longlong *)0x0) || (*plVar1 == 0)) || (plVar1 == (longlong *)0x0)) ||
     ((*plVar1 == 0 || (*plVar1 == 0x40)))) {
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = DAT_140320450;
    *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  }
  else {
    if (((plVar1 == (longlong *)0x0) || (*plVar1 == 0)) ||
       ((plVar1 == (longlong *)0x0 || (*plVar1 == 0)))) {
      lVar3 = 0;
    }
    else {
      lVar3 = *plVar1 + -0x40;
    }
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = *(undefined4 *)(lVar3 + 0x118);
    *(undefined2 *)((longlong)param_2 + 0xc) = *(undefined2 *)(lVar3 + 0x11c);
  }
  FUN_140156be0(uVar2);
  return param_2;
}



undefined8 * FUN_1401b0620(longlong param_1,undefined8 *param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))((longlong *)(param_1 + -0x70));
  FUN_140156b50(uVar2);
  plVar1 = *(longlong **)(param_1 + 0x14b0);
  if ((((plVar1 == (longlong *)0x0) || (*plVar1 == 0)) || (plVar1 == (longlong *)0x0)) ||
     ((*plVar1 == 0 || (*plVar1 == 0x40)))) {
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = DAT_140320450;
    *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  }
  else {
    if (((plVar1 == (longlong *)0x0) || (*plVar1 == 0)) ||
       ((plVar1 == (longlong *)0x0 || (*plVar1 == 0)))) {
      lVar3 = 0;
    }
    else {
      lVar3 = *plVar1 + -0x40;
    }
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = *(undefined4 *)(lVar3 + 0x130);
    *(undefined2 *)((longlong)param_2 + 0xc) = *(undefined2 *)(lVar3 + 0x134);
  }
  FUN_140156be0(uVar2);
  return param_2;
}



void FUN_1401b0700(longlong *param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  undefined8 uVar5;
  undefined1 local_res8 [8];
  undefined8 uVar6;
  undefined1 uVar7;
  
  uVar6 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(param_1[-0xe] + 0x58))();
  FUN_140156b50(uVar2);
  uVar7 = 1;
  lVar4 = 0;
  lVar3 = lVar4;
  if ((longlong *)param_1[0xac] != (longlong *)0x0) {
    lVar3 = *(longlong *)param_1[0xac];
  }
  *(bool *)param_2 = lVar3 == 0;
  lVar3 = lVar4;
  if (param_1[0xad] != 0) {
    lVar3 = *(longlong *)(param_1[0xad] + 0x38);
  }
  *(undefined1 *)(param_2 + 1) = *(undefined1 *)(lVar3 + 0x28c);
  *(int *)(param_2 + 8) = (int)param_1[0xa2];
  *(int *)(param_2 + 0x10) = (int)param_1[0x2b1];
  *(int *)(param_2 + 0x28) = (int)param_1[0x2c0];
  *(int *)(param_2 + 4) = (int)param_1[0xaa];
  uVar5 = (**(code **)(*param_1 + 0x1c0))(param_1);
  *(undefined8 *)(param_2 + 0x20) = uVar5;
  *(longlong *)(param_2 + 0x18) = param_1[0x30a];
  *(undefined4 *)(param_2 + 0x2c) = 0;
  if (*(char *)(param_2 + 1) == '\0') {
    if (param_1[0xad] != 0) {
      lVar4 = *(longlong *)(param_1[0xad] + 0x38);
    }
    *(undefined4 *)(param_2 + 0x2c) = *(undefined4 *)(lVar4 + 0x284);
  }
  local_res8[0] = 0;
  uVar1 = (**(code **)(*param_1 + 0x108))(param_1,local_res8,param_3,param_4,uVar6,uVar2,uVar7);
  *(undefined4 *)(param_2 + 0xc) = uVar1;
  FUN_140156be0(uVar2);
  return;
}



void FUN_1401b0810(longlong param_1)

{
  if (*(longlong *)(param_1 + 0x10) != 0) {
    FUN_1401af7b0(*(longlong *)(param_1 + 0x10),param_1 + -0xa0);
  }
  return;
}



undefined8 * FUN_1401b0840(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401b08a0(undefined8 *param_1,longlong param_2,longlong param_3)

{
  longlong lVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  longlong lVar4;
  undefined8 *puVar5;
  longlong lVar6;
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (-1 < param_3) {
    param_1[3] = param_3;
  }
  if (param_2 == 0) {
    if ((100 < (ulonglong)param_1[2]) && ((void *)*param_1 != (void *)0x0)) {
      operator_delete__((void *)*param_1);
      *param_1 = 0;
    }
    param_1[2] = 100;
    param_1[1] = 0;
    return;
  }
  lVar4 = param_1[2];
  if (param_2 <= lVar4) {
    param_1[1] = param_2;
    return;
  }
  lVar1 = param_1[3];
  if (lVar1 == 0) {
    lVar1 = (longlong)(param_1[1] + (ulonglong)((uint)((longlong)param_1[1] >> 0x3f) & 7)) >> 3;
    if (lVar1 < 4) {
      lVar1 = 4;
    }
    else if (0x400 < lVar1) {
      lVar1 = 0x400;
    }
  }
  lVar6 = param_2;
  if (param_2 < lVar1 + lVar4) {
    lVar6 = lVar1 + lVar4;
  }
  if (lVar6 < lVar4) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  puVar2 = operator_new(lVar6 * 8);
  puVar5 = param_1 + 4;
  if (100 < (ulonglong)param_1[2]) {
    puVar5 = (undefined8 *)*param_1;
  }
  lVar4 = param_1[1];
  if (0 < lVar4) {
    puVar3 = puVar2;
    do {
      lVar4 = lVar4 + -1;
      *puVar3 = *(undefined8 *)(((longlong)puVar5 - (longlong)puVar2) + (longlong)puVar3);
      puVar3 = puVar3 + 1;
    } while (lVar4 != 0);
  }
  memset(puVar2 + param_1[1],0,(param_2 - param_1[1]) * 8);
  if (100 < (ulonglong)param_1[2]) {
    operator_delete__(puVar5);
  }
  *param_1 = puVar2;
  param_1[2] = lVar6;
  param_1[1] = param_2;
  return;
}



void FUN_1401b0a00(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined **local_30;
  undefined8 local_28;
  undefined8 local_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_28 = 0;
  local_20 = 0;
  local_18 = 0;
  local_10 = 0;
  local_30 = Proud::ByteArray::vftable;
  (**(code **)(*param_1 + 0x80))(param_1,DAT_140320d60,&local_30,param_4,0xfffffffffffffffe);
  FUN_1401858d0(&local_30);
  return;
}



void FUN_1401b0a60(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x0001401b0a87. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



undefined8 *
FUN_1401b0aa0(longlong param_1,undefined8 *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  
  uVar5 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))(param_1 + -0x70);
  uVar6 = uVar2;
  FUN_140156b50();
  plVar1 = *(longlong **)(param_1 + 0x1568);
  if ((plVar1 == (longlong *)0x0) || (*plVar1 == 0)) {
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = DAT_140320450;
    *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  }
  else {
    lVar4 = 0;
    lVar3 = lVar4;
    if ((((plVar1 != (longlong *)0x0) && (*plVar1 != 0)) && (plVar1 != (longlong *)0x0)) &&
       (*plVar1 != 0)) {
      lVar3 = *plVar1 + -0x40;
    }
    if (*(longlong **)(lVar3 + 0x128) != (longlong *)0x0) {
      lVar4 = **(longlong **)(lVar3 + 0x128);
    }
    FUN_140184c00(lVar4,param_2,param_3,param_4,uVar5,uVar6,1);
  }
  FUN_140156be0(uVar2);
  return param_2;
}



ulonglong FUN_1401b0b70(longlong *param_1,undefined1 *param_2)

{
  longlong lVar1;
  longlong *plVar2;
  ulonglong uVar3;
  longlong *plVar4;
  longlong *plVar5;
  short sVar6;
  int iVar7;
  short sVar8;
  int iVar9;
  undefined1 local_res8 [8];
  
  local_res8[0] = 0;
  uVar3 = (**(code **)(*param_1 + 0x108))(param_1,local_res8);
  if ((int)uVar3 == 2) {
    plVar4 = (longlong *)param_1[0x296];
    plVar5 = (longlong *)0x0;
    iVar7 = DAT_140320450;
    sVar6 = DAT_140320454;
    if ((((((plVar4 != (longlong *)0x0) && (*plVar4 != 0)) && (plVar4 != (longlong *)0x0)) &&
         ((*plVar4 != 0 && (*plVar4 != 0x40)))) &&
        ((plVar4 = (longlong *)param_1[0x296], iVar7 = iRam0000000000000140,
         sVar6 = sRam0000000000000144, plVar4 != (longlong *)0x0 &&
         ((*plVar4 != 0 && (plVar4 != (longlong *)0x0)))))) && (lVar1 = *plVar4, lVar1 != 0)) {
      iVar7 = *(int *)(lVar1 + 0x100);
      sVar6 = *(short *)(lVar1 + 0x104);
    }
    plVar4 = (longlong *)param_1[0x296];
    iVar9 = DAT_140320450;
    sVar8 = DAT_140320454;
    if (((plVar4 != (longlong *)0x0) && (*plVar4 != 0)) && (plVar4 != (longlong *)0x0)) {
      lVar1 = *plVar4;
      plVar4 = (longlong *)0x0;
      if ((lVar1 != 0) && (plVar4 = (longlong *)0x0, lVar1 != 0x40)) {
        plVar2 = (longlong *)param_1[0x296];
        plVar4 = plVar5;
        if (((plVar2 != (longlong *)0x0) && ((*plVar2 != 0 && (plVar2 != (longlong *)0x0)))) &&
           (*plVar2 != 0)) {
          plVar4 = (longlong *)(*plVar2 + -0x40);
        }
        iVar9 = (int)plVar4[0x26];
        sVar8 = *(short *)((longlong)plVar4 + 0x134);
      }
    }
    if ((iVar9 != iVar7) || (sVar8 != sVar6)) {
      plVar5 = (longlong *)0x1;
    }
    *param_2 = (char)plVar5;
    return CONCAT71((int7)((ulonglong)plVar4 >> 8),1);
  }
  return uVar3 & 0xffffffffffffff00;
}



longlong * FUN_1401b0ca0(longlong *param_1,longlong param_2,longlong param_3)

{
  longlong lVar1;
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_1[1] <= param_2) {
    FUN_1401b08a0(param_1,param_2 + 1,0xffffffffffffffff);
  }
  if (param_2 < param_1[1]) {
    if ((ulonglong)param_1[2] < 0x65) {
      param_1[param_2 + 4] = param_3;
      return param_1 + param_2 + 4;
    }
    lVar1 = *param_1;
    *(longlong *)(lVar1 + param_2 * 8) = param_3;
    return (longlong *)(lVar1 + param_2 * 8);
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_1401b0d20(longlong param_1,longlong param_2,char param_3)

{
  undefined4 uVar1;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if (*(longlong **)(param_1 + 0x50) == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(**(longlong **)(param_1 + 0x50) + 0x18))();
  }
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
  if (((param_3 != '\0') && (*(ulonglong *)(param_1 + 0x20) < *(ulonglong *)(param_1 + 0x40))) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar1 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar1);
  }
  return;
}



void FUN_1401b0d90(longlong param_1,longlong param_2,undefined1 param_3)

{
  uint uVar1;
  ulonglong uVar2;
  uint uVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar1 = *(uint *)(param_1 + 0x28);
  uVar2 = (ulonglong)*(uint *)(param_2 + 0x20) % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x20) == 1) {
    *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    *(undefined8 *)(param_1 + 0x10) = 0;
    *(undefined8 *)(param_1 + 0x18) = 0;
  }
  else {
    uVar3 = (uint)uVar2;
    if (((*(longlong *)(param_2 + 0x18) == 0) ||
        (*(uint *)(*(longlong *)(param_2 + 0x18) + 0x20) % uVar1 != uVar3)) &&
       ((*(longlong *)(param_2 + 0x10) == 0 ||
        (*(uint *)(*(longlong *)(param_2 + 0x10) + 0x20) % uVar1 != uVar3)))) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    }
    else if (param_2 == *(longlong *)(*(longlong *)(param_1 + 8) + (longlong)(int)uVar3 * 8)) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = *(undefined8 *)(param_2 + 0x10);
    }
    if (param_2 == *(longlong *)(param_1 + 0x10)) {
      *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_2 + 0x10);
      *(undefined8 *)(param_2 + 0x18) = 0;
    }
    if (param_2 == *(longlong *)(param_1 + 0x18)) {
      *(undefined8 *)(param_1 + 0x18) = *(undefined8 *)(param_2 + 0x18);
      *(undefined8 *)(param_2 + 0x10) = 0;
    }
    if (*(longlong *)(param_2 + 0x18) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x18) + 0x10) = *(undefined8 *)(param_2 + 0x10);
    }
    if (*(longlong *)(param_2 + 0x10) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x10) + 0x18) = *(undefined8 *)(param_2 + 0x18);
    }
  }
  FUN_1401b0d20(param_1,param_2,param_3);
  FUN_14015b3b0(param_1);
  return;
}



void FUN_1401b0e90(longlong param_1,ulonglong param_2,int param_3)

{
  ulonglong uVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar5;
  uint uVar6;
  ulonglong uVar8;
  ulonglong uVar9;
  longlong lVar10;
  uint local_res10;
  ulonglong local_res20;
  ulonglong local_28;
  ulonglong uVar4;
  int iVar7;
  
  local_res10 = (uint)param_2;
  uVar5 = (ulonglong)param_3;
  local_res20 = (ulonglong)(int)local_res10;
  local_28 = uVar5;
  if (param_3 < (int)local_res10) {
    do {
      uVar8 = param_2 & 0xffffffff;
      lVar10 = (longlong)(int)uVar5;
      uVar3 = local_res20;
      while( true ) {
        uVar1 = *(ulonglong *)(param_1 + local_28 * 8);
        uVar4 = *(ulonglong *)(param_1 + lVar10 * 8);
        while ((uVar4 < uVar1 && (lVar10 < (longlong)uVar3))) {
          lVar10 = lVar10 + 1;
          uVar4 = *(ulonglong *)(param_1 + lVar10 * 8);
        }
        do {
          uVar9 = uVar8;
          uVar4 = uVar3;
          uVar3 = uVar4 - 1;
          iVar7 = (int)uVar9;
          uVar6 = iVar7 - 1;
          uVar8 = (ulonglong)uVar6;
        } while (uVar1 < *(ulonglong *)(param_1 + uVar3 * 8));
        if ((longlong)uVar3 <= lVar10) break;
        uVar2 = *(undefined8 *)(param_1 + lVar10 * 8);
        *(undefined8 *)(param_1 + lVar10 * 8) = *(undefined8 *)(param_1 + uVar3 * 8);
        *(undefined8 *)(param_1 + uVar3 * 8) = uVar2;
      }
      *(undefined8 *)(param_1 + local_28 * 8) = *(undefined8 *)(param_1 + uVar3 * 8);
      *(ulonglong *)(param_1 + uVar3 * 8) = uVar1;
      if ((int)(((int)param_2 - uVar6) + -1) < (int)(uVar6 - (int)uVar5)) {
        FUN_1401b0e90(param_1,iVar7 + -2,uVar5 & 0xffffffff);
        uVar5 = uVar9;
        local_28 = uVar4;
      }
      else {
        FUN_1401b0e90(param_1,param_2,uVar9);
        local_res10 = iVar7 - 2;
        local_res20 = uVar4 - 2;
      }
      param_2 = (ulonglong)local_res10;
    } while ((int)uVar5 < (int)local_res10);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401b0fa0(longlong param_1,undefined4 param_2,int param_3,undefined8 param_4,
                  undefined8 param_5)

{
  longlong lVar1;
  longlong lVar2;
  undefined8 uVar3;
  undefined1 auStack_68 [32];
  undefined8 local_48;
  undefined1 local_40;
  undefined8 local_38;
  undefined8 local_30;
  ulonglong local_28;
  
  local_38 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_68;
  local_30 = param_4;
  if (param_3 == 1) {
    lVar2 = 0;
    local_48 = 0;
    local_40 = 1;
    if ((*(longlong **)(param_1 + 0x15d8) != (longlong *)0x0) &&
       (lVar1 = **(longlong **)(param_1 + 0x15d8), lVar1 != 0)) {
      lVar2 = lVar1 + -0x40;
    }
    FUN_1401e2f30(lVar2,param_4,&local_48);
  }
  else {
    FUN_1401b0420();
    uVar3 = 0;
    if (*(undefined8 **)(param_1 + 0x1570) != (undefined8 *)0x0) {
      uVar3 = **(undefined8 **)(param_1 + 0x1570);
    }
    FUN_1401dca00(uVar3,param_2,param_4,param_5);
  }
  FUN_140156dc0(param_4);
  return;
}



void thunk_FUN_14004f990(void)

{
  FUN_14004f990();
  return;
}



undefined8 * FUN_1401b1070(longlong param_1,undefined8 *param_2)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar1 = *(longlong *)(param_1 + 0x568);
  lVar3 = 0;
  lVar2 = lVar3;
  if (lVar1 != 0) {
    lVar2 = *(longlong *)(lVar1 + 0x38);
  }
  if (*(longlong *)(lVar2 + 0x2b0) == 0) {
    FUN_1401568c0();
    *param_2 = PTR_DAT_1403200a0;
    return param_2;
  }
  if (lVar1 != 0) {
    lVar3 = *(longlong *)(lVar1 + 0x38);
  }
  FUN_1401ddc80(*(undefined8 *)(lVar3 + 0x2b0));
  return param_2;
}



void FUN_1401b10e0(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  longlong lVar2;
  undefined8 *puVar3;
  bool bVar4;
  undefined8 uVar5;
  longlong lVar6;
  
  uVar5 = 0xfffffffffffffffe;
  lVar1 = *param_1;
  if (lVar1 != 0) {
    lVar6 = lVar1;
    FUN_140156b50(lVar1);
    bVar4 = true;
    *(longlong *)(*param_1 + 0x40) = *(longlong *)(*param_1 + 0x40) + -1;
    if (*(longlong *)(*param_1 + 0x40) == 0) {
      FUN_140156be0(lVar1);
      bVar4 = false;
      lVar2 = *param_1;
      puVar3 = *(undefined8 **)(lVar2 + 0x38);
      if (puVar3 != (undefined8 *)0x0) {
        (**(code **)*puVar3)(puVar3,1,param_3,param_4,uVar5,lVar6,0);
      }
      FUN_140156c00(lVar2);
      FUN_140156970(lVar2);
    }
    if (bVar4) {
      FUN_140156be0(lVar1);
    }
  }
  return;
}



void FUN_1401b1190(longlong *param_1)

{
  undefined8 *puVar1;
  
  if ((*param_1 != 0) &&
     (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
     *(longlong *)(*param_1 + 8) == 0)) {
    puVar1 = (undefined8 *)*param_1;
    operator_delete((void *)*puVar1);
    FUN_140156970(puVar1);
  }
  return;
}



void FUN_1401b11e0(longlong *param_1)

{
  undefined8 *puVar1;
  
  if ((*param_1 != 0) &&
     (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
     *(longlong *)(*param_1 + 8) == 0)) {
    param_1 = (longlong *)*param_1;
    puVar1 = (undefined8 *)*param_1;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(param_1);
  }
  return;
}



longlong * FUN_1401b1240(longlong *param_1)

{
  wint_t *pwVar1;
  undefined *puVar2;
  int iVar3;
  wint_t *pwVar4;
  wint_t *pwVar5;
  int iVar6;
  int iVar7;
  undefined *_Dst;
  
  pwVar4 = (wint_t *)*param_1;
  if ((wint_t *)*param_1 == (wint_t *)0x0) {
    pwVar4 = (wint_t *)PTR_DAT_1403200a0;
  }
  iVar3 = iswspace(*pwVar4);
  while (iVar3 != 0) {
    pwVar4 = (wint_t *)FUN_1401567c0(pwVar4);
    iVar3 = iswspace(*pwVar4);
  }
  pwVar1 = (wint_t *)*param_1;
  pwVar5 = pwVar1;
  if (pwVar1 == (wint_t *)0x0) {
    pwVar5 = (wint_t *)PTR_DAT_1403200a0;
  }
  if (pwVar4 == pwVar5) {
    return param_1;
  }
  pwVar5 = pwVar1;
  if (pwVar1 == (wint_t *)0x0) {
    pwVar5 = (wint_t *)PTR_DAT_1403200a0;
  }
  iVar6 = 0;
  iVar3 = 0;
  if (pwVar1 != (wint_t *)0x0) {
    if (pwVar1 != (wint_t *)PTR_DAT_1403200a0) {
      iVar3 = *(int *)(pwVar1 + -4);
    }
    if (pwVar1 != (wint_t *)0x0) {
      iVar7 = 0;
      if (pwVar1 != (wint_t *)PTR_DAT_1403200a0) {
        iVar7 = *(int *)(pwVar1 + -4);
      }
      goto LAB_1401b12dc;
    }
  }
  iVar7 = 0;
LAB_1401b12dc:
  if (((iVar3 <= iVar7) && (iVar3 = iVar6, pwVar1 != (wint_t *)0x0)) &&
     (iVar3 = 0, pwVar1 != (wint_t *)PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(pwVar1 + -4);
  }
  iVar7 = 1;
  if (1 < iVar3) {
    iVar7 = iVar3;
  }
  iVar3 = 0;
  if ((pwVar1 != (wint_t *)0x0) && (iVar3 = 0, pwVar1 != (wint_t *)PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(pwVar1 + -4);
  }
  if (iVar3 < iVar7) {
    FUN_14004f590(param_1,iVar7);
  }
  FUN_14004f670(param_1);
  puVar2 = (undefined *)*param_1;
  iVar3 = (int)((longlong)pwVar4 - (longlong)pwVar5 >> 1);
  _Dst = puVar2;
  if (puVar2 == (undefined *)0x0) {
    _Dst = PTR_DAT_1403200a0;
  }
  iVar7 = 0;
  if ((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) {
    iVar7 = *(int *)(puVar2 + -8);
  }
  iVar7 = iVar7 - iVar3;
  if (puVar2 == (undefined *)0x0) {
    iVar6 = 0;
  }
  else if (puVar2 != PTR_DAT_1403200a0) {
    iVar6 = *(int *)(puVar2 + -8);
  }
  memmove_s(_Dst,(longlong)(iVar6 + 1) * 2,_Dst + (longlong)iVar3 * 2,(longlong)(iVar7 + 1) * 2);
  puVar2 = (undefined *)*param_1;
  iVar3 = 0;
  iVar6 = 0;
  if (0 < iVar7) {
    iVar6 = iVar7;
  }
  if ((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(puVar2 + -8);
  }
  if ((iVar3 <= iVar6) && (iVar6 = 0, puVar2 != (undefined *)0x0)) {
    if (puVar2 == PTR_DAT_1403200a0) {
      return param_1;
    }
    iVar6 = *(int *)(puVar2 + -8);
  }
  if (((puVar2 != PTR_DAT_1403200a0) && (puVar2 != (undefined *)0x0)) &&
     ((int *)(puVar2 + -8) != (int *)0x0)) {
    *(int *)(puVar2 + -8) = iVar6;
    *(undefined2 *)(puVar2 + (longlong)iVar6 * 2) = 0;
  }
  return param_1;
}



// WARNING: Removing unreachable block (ram,0x0001401b151d)
// WARNING: Removing unreachable block (ram,0x0001401b152b)

void FUN_1401b1400(ulonglong *param_1,ulonglong *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  undefined8 uVar6;
  ulonglong uVar7;
  undefined1 uVar8;
  ulonglong uVar9;
  undefined1 uVar10;
  
  uVar6 = 0xfffffffffffffffe;
  uVar4 = *param_2;
  uVar7 = *param_1;
  if (uVar7 != uVar4) {
    uVar3 = uVar7;
    if (uVar4 < uVar7) {
      uVar3 = uVar4;
      uVar4 = uVar7;
    }
    uVar8 = 0;
    uVar10 = 0;
    uVar7 = uVar3;
    uVar9 = uVar4;
    if (uVar3 != 0) {
      uVar8 = 1;
      FUN_140156b50(uVar3);
    }
    if (uVar4 != 0) {
      uVar10 = 1;
      FUN_140156b50(uVar4);
    }
    if (*param_2 != 0) {
      plVar1 = (longlong *)(*param_2 + 0x40);
      *plVar1 = *plVar1 + 1;
    }
    uVar5 = 0;
    if (*param_1 != 0) {
      plVar1 = (longlong *)(*param_1 + 0x40);
      *plVar1 = *plVar1 + -1;
      if (*(longlong *)(*param_1 + 0x40) == 0) {
        uVar5 = *param_1;
      }
    }
    *param_1 = *param_2;
    if (uVar3 != 0) {
      FUN_140156be0(uVar3);
      uVar8 = 0;
    }
    if (uVar4 != 0) {
      FUN_140156be0(uVar4);
      uVar10 = 0;
    }
    if (uVar5 != 0) {
      puVar2 = *(undefined8 **)(uVar5 + 0x38);
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1,param_3,param_4,uVar6,uVar7,uVar8,uVar9,uVar10);
      }
      FUN_140156c00(uVar5);
      FUN_140156970(uVar5);
    }
  }
  return;
}



void FUN_1401b1550(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  undefined8 *puVar2;
  
  lVar1 = *param_2;
  if (lVar1 != *param_1) {
    if (lVar1 != 0) {
      *(longlong *)(*param_2 + 8) = *(longlong *)(lVar1 + 8) + 1;
    }
    puVar2 = (undefined8 *)0x0;
    if ((*param_1 != 0) &&
       (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
       *(longlong *)(*param_1 + 8) == 0)) {
      puVar2 = (undefined8 *)*param_1;
    }
    *param_1 = *param_2;
    if (puVar2 != (undefined8 *)0x0) {
      operator_delete((void *)*puVar2);
      FUN_140156970(puVar2);
    }
  }
  return;
}



void FUN_1401b15d0(longlong *param_1,int param_2)

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  
  FUN_14004f760();
  puVar1 = (undefined *)*param_1;
  iVar2 = 0;
  if (0 < param_2) {
    iVar2 = param_2;
  }
  iVar3 = 0;
  if ((puVar1 != (undefined *)0x0) && (iVar3 = 0, puVar1 != PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(puVar1 + -8);
  }
  if ((iVar3 <= iVar2) && (iVar2 = 0, puVar1 != (undefined *)0x0)) {
    if (puVar1 == PTR_DAT_1403200a0) {
      return;
    }
    iVar2 = *(int *)(puVar1 + -8);
  }
  if (((puVar1 != PTR_DAT_1403200a0) && (puVar1 != (undefined *)0x0)) &&
     ((int *)(puVar1 + -8) != (int *)0x0)) {
    *(int *)(puVar1 + -8) = iVar2;
    *(undefined2 *)(puVar1 + (longlong)iVar2 * 2) = 0;
  }
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401b1650(longlong *param_1)

{
  longlong lVar1;
  undefined8 uVar2;
  undefined4 *puVar3;
  longlong *plVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  undefined8 *puVar7;
  undefined8 *puVar8;
  undefined1 *puVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  undefined8 *puVar12;
  ulonglong uVar13;
  undefined1 auStack_38 [32];
  ulonglong local_18 [2];
  
  puVar9 = auStack_38;
  local_18[0] = DAT_1403223c0 ^ (ulonglong)local_18;
  if ((ulonglong)param_1[2] < 0x65) {
    plVar4 = param_1 + 4;
  }
  else {
    plVar4 = (longlong *)*param_1;
  }
  FUN_1401b0e90(plVar4,(int)param_1[1],0);
  uVar5 = param_1[1] * 8 + 0x10;
  if (uVar5 < 0x401) {
    lVar1 = param_1[1] * 8;
    uVar5 = lVar1 + 0x1f;
    if (uVar5 <= lVar1 + 0x10U) {
      uVar5 = 0xffffffffffffff0;
    }
    lVar1 = -(uVar5 & 0xfffffffffffffff0);
    puVar9 = auStack_38 + lVar1;
    puVar3 = (undefined4 *)((longlong)local_18 + lVar1);
    puVar12 = (undefined8 *)0x0;
    if (puVar3 == (undefined4 *)0x0) goto LAB_1401b1700;
    *puVar3 = 0xcccc;
    puVar9 = auStack_38 + lVar1;
  }
  else {
    puVar3 = malloc(uVar5);
    puVar12 = (undefined8 *)0x0;
    if (puVar3 == (undefined4 *)0x0) goto LAB_1401b1700;
    *puVar3 = 0xdddd;
    puVar9 = auStack_38;
  }
  puVar12 = (undefined8 *)(puVar3 + 4);
LAB_1401b1700:
  uVar5 = param_1[1];
  uVar13 = 0;
  uVar6 = uVar13;
  uVar10 = uVar13;
  uVar11 = uVar13;
  if (uVar5 != 0) {
    do {
      if (uVar10 == 0) {
LAB_1401b1749:
        if (((longlong)uVar6 < 0) || (param_1[1] <= (longlong)uVar6)) {
                    // WARNING: Subroutine does not return
          *(undefined **)(puVar9 + -8) = &UNK_1401b17c4;
          FUN_1401566b0();
        }
        if ((ulonglong)param_1[2] < 0x65) {
          plVar4 = param_1 + uVar6 + 4;
        }
        else {
          plVar4 = (longlong *)(*param_1 + uVar6 * 8);
        }
        uVar11 = uVar10 + 1;
        puVar12[uVar10] = *plVar4;
      }
      else {
        if (((longlong)uVar6 < 0) || (param_1[1] <= (longlong)uVar6)) {
                    // WARNING: Subroutine does not return
          *(undefined **)(puVar9 + -8) = &UNK_1401b17be;
          FUN_1401566b0();
        }
        if ((ulonglong)param_1[2] < 0x65) {
          plVar4 = param_1 + uVar6 + 4;
        }
        else {
          plVar4 = (longlong *)(*param_1 + uVar6 * 8);
        }
        uVar11 = uVar10;
        if (*plVar4 != puVar12[uVar10 - 1]) goto LAB_1401b1749;
      }
      uVar6 = uVar6 + 1;
      uVar10 = uVar11;
    } while (uVar6 < uVar5);
  }
  *(undefined8 *)(puVar9 + -8) = 0x1401b178b;
  FUN_1401b08a0(param_1,uVar11,0xffffffffffffffff);
  if (0 < (longlong)uVar11) {
    puVar8 = puVar12;
    do {
      if (((longlong)uVar13 < 0) || (param_1[1] <= (longlong)uVar13)) {
                    // WARNING: Subroutine does not return
        *(undefined **)(puVar9 + -8) = &UNK_1401b181d;
        FUN_1401566b0();
      }
      if ((ulonglong)param_1[2] < 0x65) {
        lVar1 = (longlong)param_1 + (0x20 - (longlong)puVar12);
      }
      else {
        lVar1 = *param_1 - (longlong)puVar12;
      }
      puVar7 = (undefined8 *)(lVar1 + (longlong)puVar8);
      uVar2 = *puVar8;
      uVar13 = uVar13 + 1;
      puVar8 = puVar8 + 1;
      *puVar7 = uVar2;
    } while ((longlong)uVar13 < (longlong)uVar11);
  }
  if ((puVar12 != (undefined8 *)0x0) && (*(int *)(puVar12 + -2) == 0xdddd)) {
    *(undefined8 *)(puVar9 + -8) = 0x1401b17f6;
    free(puVar12 + -2);
  }
  *(undefined8 *)(puVar9 + -8) = 0x1401b1802;
  return;
}



longlong FUN_1401b1820(longlong param_1,longlong param_2)

{
  int iVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  FUN_14004f4f0();
  *(undefined2 *)(param_1 + 8) = *(undefined2 *)(param_2 + 8);
  *(undefined4 *)(param_1 + 0xc) = *(undefined4 *)(param_2 + 0xc);
  *(undefined4 *)(param_1 + 0x10) = *(undefined4 *)(param_2 + 0x10);
  *(undefined4 *)(param_1 + 0x14) = *(undefined4 *)(param_2 + 0x14);
  *(undefined4 *)(param_1 + 0x18) = *(undefined4 *)(param_2 + 0x18);
  iVar1 = *(int *)(param_2 + 0x38);
  if (-1 < iVar1) {
    FUN_140050060(param_1 + 0x20,iVar1);
    uVar2 = 0;
    uVar3 = uVar2;
    if (*(int *)(param_2 + 0x38) != 0) {
      uVar3 = *(undefined8 *)(param_2 + 0x30);
    }
    if (*(int *)(param_1 + 0x38) != 0) {
      uVar2 = *(undefined8 *)(param_1 + 0x30);
    }
    FUN_140050120(uVar2,uVar3,(longlong)iVar1);
    *(undefined8 *)(param_1 + 0x48) = *(undefined8 *)(param_2 + 0x48);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_1401b18c0(longlong param_1,longlong param_2)

{
  int iVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  ulonglong uVar5;
  longlong lVar6;
  int iVar7;
  longlong lVar8;
  
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))();
  FUN_140156b50(uVar2);
  FUN_14015cb30(param_2,0);
  if (*(longlong *)(param_1 + 0x590) == 0) {
    lVar6 = 0;
  }
  else {
    lVar6 = *(longlong *)(param_1 + 0x580);
  }
  while( true ) {
    if (lVar6 == 0) {
      FUN_140156be0(uVar2);
      return;
    }
    iVar1 = *(int *)(param_2 + 0x18);
    lVar8 = (longlong)iVar1;
    if (iVar1 < 0) break;
    iVar7 = *(int *)(param_2 + 0x18);
    FUN_14015cb30(param_2,iVar7 + 1);
    iVar7 = iVar7 - iVar1;
    if (0 < iVar7) {
      if (*(int *)(param_2 + 0x18) == 0) {
        lVar4 = 0;
        lVar3 = 0;
      }
      else {
        lVar4 = *(longlong *)(param_2 + 0x10);
        lVar3 = *(longlong *)(param_2 + 0x10);
      }
      memmove((void *)(lVar3 + 4 + lVar8 * 4),(void *)(lVar4 + lVar8 * 4),(longlong)iVar7 << 2);
    }
    if (*(int *)(param_2 + 0x18) == 0) {
      lVar4 = 0;
    }
    else {
      lVar4 = *(longlong *)(param_2 + 0x10);
    }
    uVar5 = 0;
    do {
      *(undefined1 *)(uVar5 + lVar4 + lVar8 * 4) = *(undefined1 *)(uVar5 + lVar6);
      uVar5 = uVar5 + 1;
    } while (uVar5 < 4);
    lVar6 = *(longlong *)(lVar6 + 0x10);
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_1401b19f0(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  double dVar5;
  undefined8 uVar6;
  undefined1 uVar7;
  
  uVar6 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar2);
  uVar7 = 1;
  dVar5 = (double)(**(code **)(param_1[0xe] + 0x1c0))();
  lVar4 = 0;
  if (param_1[0xbb] != 0) {
    lVar4 = *(longlong *)(param_1[0xbb] + 0x38);
  }
  FUN_1401ae800(param_1 + 0x2ef,*(undefined8 *)(lVar4 + 0x100),param_3,param_4,uVar6,uVar2,uVar7);
  if ((char)param_1[0x2f1] != '\0') {
    if (((longlong *)param_1[0x2a4] != (longlong *)0x0) &&
       (lVar4 = *(longlong *)param_1[0x2a4], lVar4 != 0)) {
      FUN_1401e7250(lVar4 + -0x40,dVar5);
      if (param_1[0x2ce] == 0) {
        lVar4 = 0;
      }
      else {
        lVar4 = param_1[0x2cc];
      }
      for (; lVar4 != 0; lVar4 = *(longlong *)(lVar4 + 0x10)) {
        lVar3 = 0;
        if (*(longlong **)(lVar4 + 8) != (longlong *)0x0) {
          lVar3 = **(longlong **)(lVar4 + 8);
        }
        if (*(char *)(lVar3 + 0x684) == '\0') {
          if ((*(longlong **)(lVar3 + 0x18) != (longlong *)0x0) &&
             (**(longlong **)(lVar3 + 0x18) != 0)) {
            uVar6 = FUN_1401e36b0(lVar3);
            FUN_1401e7250(uVar6,dVar5);
          }
          uVar1 = FUN_1401e37e0(lVar3 + 0x668);
          *(undefined4 *)(lVar3 + 0x58) = uVar1;
        }
      }
    }
    if ((((longlong *)param_1[699] != (longlong *)0x0) &&
        (lVar4 = *(longlong *)param_1[699], lVar4 != 0)) && (lVar4 != 0x40)) {
      if (lVar4 != 0) {
        lVar4 = lVar4 + -0x40;
      }
      FUN_1401e2c10(lVar4,dVar5);
    }
  }
  if (DAT_140320c88 < dVar5 - (double)param_1[0x1a]) {
    if (((longlong *)param_1[0x2a4] != (longlong *)0x0) &&
       (lVar4 = *(longlong *)param_1[0x2a4], lVar4 != 0)) {
      FUN_14019f830(*(undefined8 *)(lVar4 + 200),dVar5);
    }
    if (param_1[0x2ce] == 0) {
      lVar4 = 0;
    }
    else {
      lVar4 = param_1[0x2cc];
    }
    for (; lVar4 != 0; lVar4 = *(longlong *)(lVar4 + 0x10)) {
      lVar3 = 0;
      if (*(longlong **)(lVar4 + 8) != (longlong *)0x0) {
        lVar3 = **(longlong **)(lVar4 + 8);
      }
      if (((*(char *)(lVar3 + 0x684) == '\0') && (*(longlong **)(lVar3 + 0x18) != (longlong *)0x0))
         && (**(longlong **)(lVar3 + 0x18) != 0)) {
        lVar3 = FUN_1401e36b0();
        FUN_14019f830(*(undefined8 *)(lVar3 + 0x108),dVar5);
      }
    }
    param_1[0x1a] = (longlong)dVar5;
  }
  FUN_140156be0(uVar2);
  return;
}



undefined8 * FUN_1401b1be0(longlong param_1,undefined8 *param_2)

{
  undefined8 uVar1;
  longlong lVar2;
  
  lVar2 = 0;
  uVar1 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))();
  FUN_140156b50(uVar1);
  if (*(longlong *)(param_1 + 0x1600) != 0) {
    lVar2 = *(longlong *)(param_1 + 0x15f0);
  }
  for (; lVar2 != 0; lVar2 = *(longlong *)(lVar2 + 0x10)) {
  }
  FUN_1401568c0();
  *param_2 = PTR_DAT_1403200a0;
  FUN_140156be0(uVar1);
  return param_2;
}



void FUN_1401b1c70(longlong param_1,undefined8 *param_2)

{
  undefined8 uVar1;
  longlong lVar2;
  undefined1 uVar3;
  longlong lVar4;
  
  uVar1 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))();
  FUN_140156b50(uVar1);
  *param_2 = *(undefined8 *)(param_1 + 0x5e8);
  param_2[1] = *(undefined8 *)(param_1 + 0x5f0);
  param_2[2] = *(undefined8 *)(param_1 + 0x5f8);
  param_2[3] = *(undefined8 *)(param_1 + 0x600);
  param_2[4] = *(undefined8 *)(param_1 + 0x608);
  param_2[5] = *(undefined8 *)(param_1 + 0x610);
  param_2[6] = *(undefined8 *)(param_1 + 0x618);
  param_2[7] = *(undefined8 *)(param_1 + 0x620);
  *(int *)(param_2 + 6) = (int)*(undefined8 *)(param_1 + 0x1600);
  if ((*(longlong **)(param_1 + 0x1500) == (longlong *)0x0) ||
     (lVar2 = **(longlong **)(param_1 + 0x1500), lVar2 == 0)) {
    uVar3 = 0;
  }
  else {
    uVar3 = *(undefined1 *)(lVar2 + 0x80);
  }
  *(undefined1 *)((longlong)param_2 + 0x34) = uVar3;
  *(undefined4 *)(param_1 + 0x620) = 0;
  if (*(longlong *)(param_1 + 0x1600) == 0) {
    lVar2 = 0;
  }
  else {
    lVar2 = *(longlong *)(param_1 + 0x15f0);
  }
  for (; lVar2 != 0; lVar2 = *(longlong *)(lVar2 + 0x10)) {
    lVar4 = 0;
    if (*(longlong **)(lVar2 + 8) != (longlong *)0x0) {
      lVar4 = **(longlong **)(lVar2 + 8);
    }
    if (*(char *)(lVar4 + 0x608) == '\0') {
      *(int *)(param_1 + 0x620) = *(int *)(param_1 + 0x620) + 1;
    }
  }
  FUN_140156be0(uVar1);
  return;
}



void FUN_1401b1d90(longlong param_1,longlong param_2)

{
  undefined4 uVar1;
  undefined4 uVar2;
  int iVar3;
  longlong lVar4;
  longlong lVar5;
  int iVar6;
  longlong lVar7;
  longlong lVar8;
  int iVar9;
  longlong lVar10;
  longlong lVar11;
  
  FUN_14015d550(param_2,0);
  iVar3 = *(int *)(param_1 + 0x18);
  iVar9 = 0;
  lVar10 = 0;
  if (0 < iVar3) {
    lVar11 = 0;
    do {
      if ((lVar10 < 0) || (iVar3 <= iVar9)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      iVar3 = *(int *)(param_2 + 0x18);
      uVar1 = *(undefined4 *)(lVar11 + 8 + *(longlong *)(param_1 + 0x10));
      uVar2 = *(undefined4 *)(*(longlong *)(lVar11 + *(longlong *)(param_1 + 0x10)) + 0x56c);
      if (iVar3 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      iVar6 = *(int *)(param_2 + 0x18);
      FUN_14015d550(param_2,iVar6 + 1);
      iVar6 = iVar6 - iVar3;
      if ((0 < iVar6) && (iVar6 = iVar6 + -1, lVar8 = (longlong)iVar6, -1 < iVar6)) {
        lVar7 = (lVar8 + iVar3) * 8 + 8;
        do {
          lVar4 = FUN_1401a7bb0(param_2);
          lVar5 = FUN_1401a7bb0(param_2);
          *(undefined8 *)(lVar5 + lVar7) = *(undefined8 *)(lVar4 + -8 + lVar7);
          lVar7 = lVar7 + -8;
          lVar8 = lVar8 + -1;
        } while (-1 < lVar8);
      }
      lVar8 = FUN_1401a7bb0(param_2);
      *(ulonglong *)(lVar8 + (longlong)iVar3 * 8) = CONCAT44(uVar1,uVar2);
      iVar3 = *(int *)(param_1 + 0x18);
      iVar9 = iVar9 + 1;
      lVar10 = lVar10 + 1;
      lVar11 = lVar11 + 0x10;
    } while (iVar9 < iVar3);
  }
  return;
}



void FUN_1401b1ec0(longlong param_1,undefined4 param_2)

{
  longlong lVar1;
  
  if (*(longlong *)(param_1 + 0x1670) == 0) {
    lVar1 = 0;
  }
  else {
    lVar1 = *(longlong *)(param_1 + 0x1660);
  }
  while (lVar1 != 0) {
    if (*(undefined8 **)(lVar1 + 8) == (undefined8 *)0x0) {
      FUN_1401e5850(0,1,param_2);
      lVar1 = *(longlong *)(lVar1 + 0x10);
    }
    else {
      FUN_1401e5850(**(undefined8 **)(lVar1 + 8),1,param_2);
      lVar1 = *(longlong *)(lVar1 + 0x10);
    }
  }
  return;
}



void FUN_1401b1f20(longlong *param_1)

{
  undefined8 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  
  uVar1 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar1);
  if ((((longlong *)param_1[699] != (longlong *)0x0) &&
      (lVar3 = *(longlong *)param_1[699], lVar3 != 0)) && (lVar3 != 0x40)) {
    if (lVar3 != 0) {
      lVar3 = lVar3 + -0x40;
    }
    FUN_1401e2db0(lVar3);
  }
  if ((((longlong *)param_1[0x2a4] != (longlong *)0x0) &&
      (lVar3 = *(longlong *)param_1[0x2a4], lVar3 != 0)) && (lVar3 != 0x40)) {
    if (lVar3 != 0) {
      lVar3 = lVar3 + -0x40;
    }
    FUN_1401e6fa0(lVar3);
  }
  if (param_1[0x2ce] == 0) {
    lVar3 = 0;
  }
  else {
    lVar3 = param_1[0x2cc];
  }
  for (; lVar3 != 0; lVar3 = *(longlong *)(lVar3 + 0x10)) {
    lVar4 = 0;
    if (*(longlong **)(lVar3 + 8) != (longlong *)0x0) {
      lVar4 = **(longlong **)(lVar3 + 8);
    }
    if (((*(char *)(lVar4 + 0x684) == '\0') && (*(longlong **)(lVar4 + 0x18) != (longlong *)0x0)) &&
       (**(longlong **)(lVar4 + 0x18) != 0)) {
      uVar2 = FUN_1401e36b0();
      FUN_1401e6fa0(uVar2);
    }
  }
  FUN_140156be0(uVar1);
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401b2010(longlong param_1)

{
  int *piVar1;
  longlong lVar2;
  double dVar3;
  undefined8 uVar4;
  undefined4 local_res8 [2];
  
  if ((*(char *)(param_1 + 0x6cc) != '\0') &&
     (dVar3 = (double)(**(code **)(*(longlong *)(param_1 + 0x70) + 0x1c0))(param_1 + 0x70),
     _DAT_140320d98 < dVar3 - *(double *)(param_1 + 0x638))) {
    if (*(longlong *)(param_1 + 0x1670) == 0) {
      piVar1 = (int *)0x0;
    }
    else {
      piVar1 = *(int **)(param_1 + 0x1660);
    }
    for (; piVar1 != (int *)0x0; piVar1 = *(int **)(piVar1 + 4)) {
      uVar4 = (**(code **)(*(longlong *)(param_1 + 0x70) + 0x1c0))(param_1 + 0x70);
      *(undefined8 *)(param_1 + 0x638) = uVar4;
      if (piVar1 == (int *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      if (*(int *)(param_1 + 0x1578) < *piVar1) {
        lVar2 = 0;
        if (*(longlong **)(piVar1 + 2) != (longlong *)0x0) {
          lVar2 = **(longlong **)(piVar1 + 2);
        }
        if ((*(char *)(lVar2 + 0x684) == '\0') && (*(char *)(lVar2 + 0x608) == '\0')) {
          if ((*(double *)(lVar2 + 0x50) <= 0.0) ||
             ((*(double *)(lVar2 + 0x60) <= 0.0 ||
              (dVar3 = *(double *)(lVar2 + 0x60) + *(double *)(param_1 + 0x4f8),
              *(double *)(lVar2 + 0x50) <= dVar3)))) {
            dVar3 = *(double *)(lVar2 + 0x50);
          }
          local_res8[0] = (undefined4)(longlong)(dVar3 * 1000.0);
          (**(code **)(*(longlong *)(param_1 + 0x1818) + 0x110))
                    ((longlong *)(param_1 + 0x1818),1,&DAT_140328530,lVar2 + 0x56c,local_res8);
        }
      }
    }
  }
  return;
}



void FUN_1401b2170(longlong *param_1)

{
  undefined8 uVar1;
  longlong lVar2;
  double dVar3;
  longlong lVar4;
  undefined4 local_res8 [2];
  undefined8 uVar5;
  undefined8 uVar6;
  undefined1 uVar7;
  
  uVar5 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(*param_1 + 0x58))();
  uVar6 = uVar1;
  FUN_140156b50(uVar1);
  uVar7 = 1;
  if (((int)param_1[0x2af] != 0) && (0.0 < (double)param_1[0xa2])) {
    dVar3 = (double)(**(code **)(param_1[0xe] + 0x1c0))(param_1 + 0xe);
    if (DAT_140320d30 < dVar3 - (double)param_1[0xa2]) {
      lVar4 = (**(code **)(param_1[0xe] + 0x1c0))(param_1 + 0xe);
      param_1[0xa2] = lVar4;
      local_res8[0] = (undefined4)param_1[0xa1];
      (**(code **)(param_1[0x303] + 0x150))
                (param_1 + 0x303,1,&DAT_140328530,local_res8,uVar5,uVar6,uVar7);
      if (param_1[0x2ce] == 0) {
        lVar4 = 0;
      }
      else {
        lVar4 = param_1[0x2cc];
      }
      for (; lVar4 != 0; lVar4 = *(longlong *)(lVar4 + 0x10)) {
        lVar2 = 0;
        if (*(longlong **)(lVar4 + 8) != (longlong *)0x0) {
          lVar2 = **(longlong **)(lVar4 + 8);
        }
        if (*(char *)(lVar2 + 0x684) == '\0') {
          (**(code **)(param_1[0x2fa] + 0x40))
                    (param_1 + 0x2fa,*(undefined4 *)(lVar2 + 0x56c),&DAT_140328530,lVar2 + 0x48);
        }
      }
    }
  }
  FUN_140156be0(uVar1);
  return;
}



undefined4 FUN_1401b22a0(longlong param_1,longlong param_2)

{
  char cVar1;
  short sVar2;
  longlong lVar3;
  int iVar4;
  longlong lVar5;
  
  (**(code **)(*(longlong *)(param_1 + 0x78) + 0x10))(param_1 + 0x78);
  if ((*(int *)(param_2 + 8) == 0) || (cVar1 = FUN_1401588c0(param_2), cVar1 != '\0')) {
    if ((*(longlong **)(param_1 + 0x1570) != (longlong *)0x0) &&
       ((lVar3 = **(longlong **)(param_1 + 0x1570), lVar3 != 0 &&
        (cVar1 = FUN_1401588c0(lVar3 + 200), cVar1 != '\0')))) {
      lVar3 = 0;
      if (*(longlong **)(param_1 + 0x1570) != (longlong *)0x0) {
        lVar3 = **(longlong **)(param_1 + 0x1570);
      }
      if ((*(int *)(lVar3 + 0xd0) == *(int *)(param_2 + 8)) &&
         (*(short *)(lVar3 + 0xd4) == *(short *)(param_2 + 0xc))) {
        return 1;
      }
    }
    iVar4 = DAT_140320450;
    sVar2 = DAT_140320454;
    if ((((*(longlong **)(param_1 + 0x1520) != (longlong *)0x0) &&
         (lVar3 = **(longlong **)(param_1 + 0x1520), lVar3 != 0)) && (lVar3 != 0x40)) &&
       (iVar4 = iRam0000000000000140, sVar2 = sRam0000000000000144, lVar3 != 0)) {
      iVar4 = *(int *)(lVar3 + 0x100);
      sVar2 = *(short *)(lVar3 + 0x104);
    }
    if ((iVar4 == *(int *)(param_2 + 8)) && (sVar2 == *(short *)(param_2 + 0xc))) {
      return *(undefined4 *)(param_1 + 0x1578);
    }
    if (*(longlong *)(param_1 + 0x1670) == 0) {
      lVar3 = 0;
    }
    else {
      lVar3 = *(longlong *)(param_1 + 0x1660);
    }
    for (; lVar3 != 0; lVar3 = *(longlong *)(lVar3 + 0x10)) {
      lVar5 = 0;
      if (*(longlong **)(lVar3 + 8) != (longlong *)0x0) {
        lVar5 = **(longlong **)(lVar3 + 8);
      }
      if ((*(int *)(lVar5 + 0x5a8) == *(int *)(param_2 + 8)) &&
         (*(short *)(lVar5 + 0x5ac) == *(short *)(param_2 + 0xc))) {
        return *(undefined4 *)(lVar5 + 0x56c);
      }
    }
  }
  return 0;
}



void FUN_1401b2400(void)

{
  FUN_14019f4d0();
  return;
}



void FUN_1401b2420(longlong *param_1)

{
  undefined8 *puVar1;
  void *pvVar2;
  
  if (*param_1 != 0) {
    *(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1;
    if (*(longlong *)(*param_1 + 8) == 0) {
      puVar1 = (undefined8 *)*param_1;
      pvVar2 = (void *)*puVar1;
      if (pvVar2 != (void *)0x0) {
        FUN_1401d5010(pvVar2);
        operator_delete(pvVar2);
      }
      FUN_140156970(puVar1);
    }
  }
  return;
}



longlong * FUN_1401b2490(longlong *param_1)

{
  wint_t _C;
  int iVar1;
  wint_t *pwVar2;
  undefined *puVar3;
  wint_t *pwVar4;
  
  pwVar2 = (wint_t *)*param_1;
  if ((wint_t *)*param_1 == (wint_t *)0x0) {
    pwVar2 = (wint_t *)PTR_DAT_1403200a0;
  }
  pwVar4 = (wint_t *)0x0;
  _C = *pwVar2;
  if (_C != 0) {
    do {
      iVar1 = iswspace(_C);
      if (iVar1 == 0) {
        pwVar4 = (wint_t *)0x0;
      }
      else if (pwVar4 == (wint_t *)0x0) {
        pwVar4 = pwVar2;
      }
      pwVar2 = (wint_t *)FUN_1401567c0(pwVar2);
      _C = *pwVar2;
    } while (_C != 0);
    if (pwVar4 != (wint_t *)0x0) {
      puVar3 = (undefined *)*param_1;
      if ((undefined *)*param_1 == (undefined *)0x0) {
        puVar3 = PTR_DAT_1403200a0;
      }
      FUN_1401b15d0(param_1,(longlong)pwVar4 - (longlong)puVar3 >> 1 & 0xffffffff);
    }
  }
  return param_1;
}



void FUN_1401b2530(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  void *pvVar2;
  undefined8 *puVar3;
  
  lVar1 = *param_2;
  if (lVar1 != *param_1) {
    if (lVar1 != 0) {
      *(longlong *)(*param_2 + 8) = *(longlong *)(lVar1 + 8) + 1;
    }
    puVar3 = (undefined8 *)0x0;
    if ((*param_1 != 0) &&
       (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
       *(longlong *)(*param_1 + 8) == 0)) {
      puVar3 = (undefined8 *)*param_1;
    }
    *param_1 = *param_2;
    if (puVar3 != (undefined8 *)0x0) {
      pvVar2 = (void *)*puVar3;
      if (pvVar2 != (void *)0x0) {
        FUN_1401d5010(pvVar2);
        operator_delete(pvVar2);
      }
      FUN_140156970(puVar3);
    }
  }
  return;
}



undefined8 FUN_1401b25c0(longlong param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4)

{
  char cVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 8) == 0) {
    cVar1 = FUN_1401a8bb0(param_1,*(undefined4 *)(param_1 + 0x28),1);
    if (cVar1 == '\0') {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  FUN_14015b3b0(param_1);
  uVar2 = FUN_14015f020(param_1,param_2,param_3,param_4);
  FUN_14015b3b0(param_1);
  return uVar2;
}



void FUN_1401b2640(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  undefined8 uVar2;
  undefined *local_res18 [2];
  
  uVar2 = FUN_140159a00(param_2,local_res18,param_3,param_4,0xfffffffffffffffe);
  FUN_14004cc50(param_1,uVar2);
  if (((local_res18[0] != (undefined *)0x0) && (local_res18[0] != PTR_DAT_1403200a0)) &&
     (local_res18[0] + -8 != (undefined *)0x0)) {
    uVar2 = FUN_1401568c0();
    FUN_140156b50(uVar2);
    piVar1 = (int *)(local_res18[0] + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res18[0] + -8);
    }
    FUN_140156be0(uVar2);
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x0001401b272c)
// WARNING: Removing unreachable block (ram,0x0001401b2735)
// WARNING: Removing unreachable block (ram,0x0001401b2753)
// WARNING: Removing unreachable block (ram,0x0001401b275c)

undefined4 * FUN_1401b26d0(undefined4 *param_1)

{
  *(undefined1 *)(param_1 + 2) = 0;
  param_1[0xc] = 0x11;
  *(undefined8 *)(param_1 + 0x16) = 0;
  *(undefined8 *)(param_1 + 4) = 0;
  *(undefined8 *)(param_1 + 6) = 0;
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 10) = 0;
  param_1[0x14] = 0;
  param_1[0xd] = 0x3f400000;
  param_1[0xe] = 0x3e800000;
  param_1[0xf] = 0x40100000;
  *(undefined8 *)(param_1 + 0x10) = 0x26;
  *(undefined8 *)(param_1 + 0x12) = 0;
  *param_1 = 0;
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

undefined8 FUN_1401b2780(longlong *param_1,int *param_2,undefined8 param_3)

{
  int *piVar1;
  int iVar2;
  undefined *puVar3;
  char cVar4;
  undefined4 uVar5;
  DWORD DVar6;
  DWORD DVar7;
  undefined *******pppppppuVar8;
  undefined **ppuVar9;
  undefined ******ppppppuVar10;
  undefined ******ppppppuVar11;
  undefined8 uVar12;
  undefined2 uVar13;
  undefined ******ppppppuVar14;
  int iVar15;
  undefined ******ppppppuVar16;
  undefined1 auStack_4b8 [32];
  undefined ********local_498;
  undefined *******local_490;
  undefined ***local_488;
  undefined ********local_480;
  undefined *******local_478;
  undefined ********local_470;
  undefined *******local_468;
  undefined1 *local_460;
  undefined2 *local_458;
  undefined *******local_448;
  undefined ********local_440;
  undefined ********local_438;
  undefined2 local_430 [4];
  undefined ******local_428;
  undefined ******local_420;
  undefined8 local_418;
  int local_410;
  undefined8 local_408;
  undefined **local_400;
  undefined *local_3f8;
  undefined ******local_3f0;
  undefined8 local_3e8;
  undefined8 local_3e0;
  undefined4 local_3d8 [2];
  undefined ********local_3d0;
  undefined8 local_3c8;
  int local_3c0;
  undefined8 local_3b8;
  undefined1 local_3a8 [4];
  int local_3a4;
  undefined8 local_370;
  undefined **local_348;
  undefined8 local_340;
  int local_338;
  undefined8 local_330;
  undefined4 local_328 [2];
  undefined ******local_320;
  undefined ******local_318;
  undefined *****local_310;
  undefined *****local_308;
  undefined *****local_300;
  undefined4 local_2f8 [2];
  undefined *****local_2f0;
  undefined4 local_2e8 [2];
  undefined *****local_2e0;
  undefined4 local_2d8 [2];
  undefined *****local_2d0;
  undefined4 local_2c8 [2];
  undefined *****local_2c0;
  undefined4 local_2b8 [2];
  undefined *****local_2b0;
  undefined *local_2a8;
  undefined *****local_2a0;
  undefined *****local_298;
  undefined *****local_290;
  undefined4 local_288 [2];
  undefined *****local_280;
  undefined4 local_278 [2];
  undefined *****local_270;
  undefined4 local_268 [2];
  undefined *****local_260;
  undefined *local_258;
  undefined *****local_250;
  undefined *****local_248;
  undefined4 local_240;
  undefined4 local_23c;
  undefined4 local_238 [2];
  undefined *****local_230;
  undefined4 local_228;
  undefined4 local_224;
  undefined4 local_220;
  undefined4 local_21c;
  undefined **local_218;
  undefined *local_210;
  undefined ******local_208;
  undefined8 local_200;
  undefined8 local_1f8;
  undefined *local_1f0;
  undefined *local_1e8;
  undefined **local_1e0;
  undefined8 local_1d8;
  undefined ******local_1d0;
  undefined8 local_1c8;
  undefined8 local_1c0;
  undefined1 local_1b8 [8];
  undefined1 local_1b0 [8];
  undefined1 local_1a8 [8];
  undefined1 local_1a0 [8];
  undefined1 local_198 [8];
  undefined1 local_190 [8];
  undefined1 local_188 [8];
  undefined1 local_180 [8];
  undefined1 local_178 [8];
  undefined1 local_170 [8];
  undefined1 local_168 [8];
  undefined1 local_160 [8];
  undefined1 local_158 [8];
  undefined1 local_150 [8];
  undefined1 local_148 [8];
  undefined1 local_140 [8];
  undefined1 local_138 [8];
  undefined1 local_130 [8];
  undefined1 local_128 [8];
  undefined1 local_120 [8];
  undefined1 local_118 [8];
  undefined1 local_110 [8];
  undefined1 local_108 [8];
  undefined1 local_100 [8];
  undefined1 local_f8 [8];
  undefined1 local_f0 [8];
  undefined1 local_e8 [8];
  undefined1 local_e0 [8];
  undefined1 local_d8 [8];
  undefined1 local_d0 [8];
  undefined1 local_c8 [8];
  undefined8 local_c0;
  undefined1 local_b8 [8];
  undefined1 local_b0 [8];
  undefined1 local_a8 [16];
  undefined *******local_98;
  undefined8 uStack_90;
  int local_88;
  undefined8 local_80;
  undefined *******local_78;
  undefined8 uStack_70;
  int local_68;
  undefined8 local_60;
  int local_58;
  ulonglong local_48;
  
  local_c0 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_4b8;
  iVar2 = param_2[10];
  if (iVar2 == 0) {
    FUN_1401c5a30(param_1,0);
  }
  iVar15 = *param_2;
  cVar4 = FUN_140154d80(param_2,local_2c8);
  if (cVar4 == '\0') {
switchD_1401b2824_default:
    FUN_1401540a0(param_2,(int)((iVar15 >> 0x1f & 7U) + iVar15) >> 3);
    return 0;
  }
  local_370 = param_3;
  switch(local_2c8[0]) {
  case 0xfbf5:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    FUN_140154e60(param_2,&local_440);
    FUN_140154e60(param_2,&local_438);
    ppppppuVar10 = (undefined ******)0x0;
    ppppppuVar16 = (undefined ******)0x0;
    local_3f8 = (undefined *)0x0;
    local_3f0 = (undefined ******)0x0;
    local_3e8 = 0;
    local_3e0 = 0;
    local_400 = Proud::ByteArray::vftable;
    cVar4 = FUN_140154a70(param_2,&local_420);
    ppppppuVar11 = local_420;
    if (((cVar4 != '\0') && (-1 < (int)local_420)) && ((int)local_420 <= DAT_140320d70)) {
      FUN_140050060(&local_400,(ulonglong)local_420 & 0xffffffff);
      ppppppuVar14 = local_3f0;
      if ((int)local_3e8 == 0) {
        ppppppuVar14 = ppppppuVar10;
      }
      FUN_1401543d0(param_2,ppppppuVar14,(ulonglong)ppppppuVar11 & 0xffffffff);
    }
    cVar4 = FUN_1401543d0(param_2,&local_420,4);
    if (cVar4 != '\0') {
      local_3d8[0] = local_420._0_4_;
    }
    local_210 = (undefined *)0x0;
    local_208 = (undefined ******)0x0;
    local_200 = 0;
    local_1f8 = 0;
    local_218 = Proud::ByteArray::vftable;
    cVar4 = FUN_140154a70(param_2,&local_420);
    ppppppuVar11 = local_420;
    if (((cVar4 != '\0') && (-1 < (int)local_420)) && ((int)local_420 <= DAT_140320d70)) {
      FUN_140050060(&local_218,(ulonglong)local_420 & 0xffffffff);
      ppppppuVar14 = local_208;
      if ((int)local_200 == 0) {
        ppppppuVar14 = ppppppuVar10;
      }
      FUN_1401543d0(param_2,ppppppuVar14,(ulonglong)ppppppuVar11 & 0xffffffff);
    }
    local_1d8 = 0;
    local_1d0 = (undefined ******)0x0;
    local_1c8 = 0;
    local_1c0 = 0;
    local_1e0 = Proud::ByteArray::vftable;
    cVar4 = FUN_140154a70(param_2,&local_420);
    ppppppuVar11 = local_420;
    if (((cVar4 != '\0') && (-1 < (int)local_420)) && ((int)local_420 <= DAT_140320d70)) {
      FUN_140050060(&local_1e0,(ulonglong)local_420 & 0xffffffff);
      ppppppuVar14 = local_1d0;
      if ((int)local_1c8 == 0) {
        ppppppuVar14 = ppppppuVar10;
      }
      FUN_1401543d0(param_2,ppppppuVar14,(ulonglong)ppppppuVar11 & 0xffffffff);
    }
    cVar4 = FUN_1401543d0(param_2,&local_420,4);
    uVar5 = 0;
    if (cVar4 != '\0') {
      uVar5 = local_420._0_4_;
    }
    local_3d0 = (undefined ********)CONCAT44(local_3d0._4_4_,uVar5);
    local_98 = (undefined *******)0x0;
    uStack_90 = (undefined *)0x0;
    local_78 = (undefined *******)0x0;
    uStack_70 = (undefined *)0x0;
    cVar4 = FUN_1401543d0(param_2,&local_78,0x10);
    if (cVar4 != '\0') {
      local_98 = local_78;
      uStack_90 = uStack_70;
    }
    cVar4 = FUN_1401543d0(param_2,&local_420,1);
    if (cVar4 != '\0') {
      local_448._0_1_ = local_420._0_1_;
    }
    cVar4 = FUN_1401543d0(param_2,&local_420,2);
    if (cVar4 != '\0') {
      local_430[0] = local_420._0_2_;
    }
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_140321850);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] != '\0') goto LAB_1401b2f1a;
      local_498 = (undefined ********)&DAT_140288b80;
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbf5,PTR_DAT_140321850);
    }
    else {
      ppppppuVar16 = ppppppuVar10;
      if ((char)param_1[3] != '\0') goto LAB_1401b2f1a;
      FUN_1401568c0();
      local_420 = (undefined ******)PTR_DAT_1403200a0;
      local_2b8[0] = local_440._0_4_;
      FUN_140157840(&local_420,local_2b8);
      FUN_14004f840(&local_420,&DAT_140286e98);
      local_240 = local_438._0_4_;
      FUN_140157840(&local_420,&local_240);
      FUN_14004f840(&local_420,&DAT_140286e98);
      FUN_140157b40(&local_420,&local_400);
      FUN_14004f840(&local_420,&DAT_140286e98);
      FUN_1401578a0(&local_420,local_3d8);
      FUN_14004f840(&local_420,&DAT_140286e98);
      FUN_140157b40(&local_420,&local_218);
      FUN_14004f840(&local_420,&DAT_140286e98);
      FUN_140157b40(&local_420,&local_1e0);
      FUN_14004f840(&local_420,&DAT_140286e98);
      local_238[0] = local_3d0._0_4_;
      FUN_140157840(&local_420,local_238);
      FUN_14004f840(&local_420,&DAT_140286e98);
      FUN_140157b50(&local_420,&local_98);
      FUN_14004f840(&local_420,&DAT_140286e98);
      FUN_140157700(&local_420,&local_448);
      FUN_14004f840(&local_420,&DAT_140286e98);
      FUN_1401577e0(&local_420,local_430);
      FUN_14004f840(&local_420,&DAT_140286e98);
      iVar15 = 0;
      if ((local_420 != (undefined ******)0x0) && (local_420 != (undefined ******)PTR_DAT_1403200a0)
         ) {
        iVar15 = *(int *)(local_420 + -1);
      }
      local_428 = (undefined ******)FUN_1400457d0(&local_420,&local_1f0,iVar15 + -2);
      if (local_420 == (undefined ******)0x0) {
        local_420 = (undefined ******)PTR_DAT_1403200a0;
      }
      if ((undefined ******)*local_428 != local_420) {
        pppppppuVar8 = (undefined *******)FUN_1401568c0();
        local_78 = pppppppuVar8;
        FUN_140156b50(pppppppuVar8);
        ppppppuVar11 = local_420;
        uStack_70 = (undefined *)CONCAT71(uStack_70._1_7_,1);
        if (((local_420 != (undefined ******)0x0) &&
            (local_420 != (undefined ******)PTR_DAT_1403200a0)) &&
           (ppppppuVar16 = local_420 + -1, ppppppuVar16 != (undefined ******)0x0)) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_348 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_340 = (undefined *)CONCAT71(local_340._1_7_,1);
          piVar1 = (int *)((longlong)ppppppuVar11 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(ppppppuVar16);
          }
          FUN_140156be0(ppuVar9);
        }
        local_420 = (undefined ******)*local_428;
        if (((local_420 != (undefined ******)PTR_DAT_1403200a0) &&
            (local_420 != (undefined ******)0x0)) && (local_420 != (undefined ******)0x8)) {
          *(int *)((longlong)local_420 + -4) = *(int *)((longlong)local_420 + -4) + 1;
        }
        FUN_140156be0(pppppppuVar8);
      }
      if (((local_1f0 != (undefined *)0x0) && (local_1f0 != PTR_DAT_1403200a0)) &&
         (local_1f0 + -8 != (undefined *)0x0)) {
        pppppppuVar8 = (undefined *******)FUN_1401568c0();
        local_78 = pppppppuVar8;
        FUN_140156b50(pppppppuVar8);
        uStack_70 = (undefined *)CONCAT71(uStack_70._1_7_,1);
        piVar1 = (int *)(local_1f0 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_1f0 + -8);
        }
        FUN_140156be0(pppppppuVar8);
      }
      local_428 = (undefined ******)&local_318;
      local_1f0 = PTR_DAT_1403200a0;
      FUN_1401568c0();
      local_318 = (undefined ******)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        local_318 = ppppppuVar10;
      }
      if (local_420 != (undefined ******)PTR_DAT_1403200a0) {
        pppppppuVar8 = (undefined *******)FUN_1401568c0();
        local_78 = pppppppuVar8;
        FUN_140156b50(pppppppuVar8);
        uStack_70 = (undefined *)CONCAT71(uStack_70._1_7_,1);
        FUN_14004f990(&local_318);
        local_318 = local_420;
        if (((local_420 != (undefined ******)PTR_DAT_1403200a0) &&
            (local_420 != (undefined ******)0x0)) && (local_420 != (undefined ******)0x8)) {
          *(int *)((longlong)local_420 + -4) = *(int *)((longlong)local_420 + -4) + 1;
        }
        FUN_140156be0(pppppppuVar8);
      }
      puVar3 = PTR_DAT_140321850;
      FUN_1401568c0();
      local_258 = PTR_DAT_1403200a0;
      uVar5 = FUN_140156740(puVar3);
      uVar12 = FUN_14004f760(&local_258,uVar5);
      FUN_140156770(uVar12,puVar3,uVar5);
      FUN_14004f380(&local_258);
      (**(code **)(*param_1 + 0x28))(param_1,0xfbf5,&local_258,&local_318);
      local_498 = (undefined ********)local_420;
      if (local_420 == (undefined ******)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbf5,PTR_DAT_140321850);
      ppppppuVar11 = local_420;
      if (((local_420 != (undefined ******)0x0) &&
          (local_420 != (undefined ******)PTR_DAT_1403200a0)) &&
         (ppppppuVar16 = local_420 + -1, ppppppuVar16 != (undefined ******)0x0)) {
        pppppppuVar8 = (undefined *******)FUN_1401568c0();
        local_78 = pppppppuVar8;
        FUN_140156b50(pppppppuVar8);
        uStack_70 = (undefined *)CONCAT71(uStack_70._1_7_,1);
        piVar1 = (int *)((longlong)ppppppuVar11 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(ppppppuVar16);
        }
        FUN_140156be0(pppppppuVar8);
      }
    }
    ppppppuVar16 = ppppppuVar10;
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_78 = (undefined *******)CONCAT44(local_78._4_4_,0xfbf5);
      uStack_70 = PTR_DAT_140321850;
      local_68 = iVar2;
      local_60 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_78);
      DVar6 = GetTickCount();
      ppppppuVar16 = (undefined ******)(ulonglong)DVar6;
    }
LAB_1401b2f1a:
    local_458 = local_430;
    local_460 = (undefined1 *)&local_448;
    local_468 = (undefined *******)&local_98;
    local_470 = (undefined ********)&local_3d0;
    local_478 = (undefined *******)&local_1e0;
    local_480 = (undefined ********)&local_218;
    local_488 = (undefined ***)local_3d8;
    local_490 = (undefined *******)&local_400;
    local_498 = (undefined ********)&local_438;
    cVar4 = (**(code **)(*param_1 + 0x38))(param_1,iVar2,local_3a8,&local_440);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140321850);
    }
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_78 = (undefined *******)CONCAT44(local_78._4_4_,0xfbf5);
      uStack_70 = PTR_DAT_140321850;
      local_68 = iVar2;
      local_60 = param_3;
      DVar6 = GetTickCount();
      local_58 = DVar6 - (int)ppppppuVar16;
      (**(code **)(*param_1 + 0x18))(param_1,&local_78);
    }
    FUN_1401858d0(&local_1e0);
    FUN_1401858d0(&local_218);
    FUN_1401858d0(&local_400);
    return 1;
  case 0xfbf6:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    FUN_140154e60(param_2,&local_3d0);
    FUN_140154e60(param_2,&local_438);
    ppppppuVar10 = (undefined ******)0x0;
    ppppppuVar16 = (undefined ******)0x0;
    local_3f8 = (undefined *)0x0;
    local_3f0 = (undefined ******)0x0;
    local_3e8 = 0;
    local_3e0 = 0;
    local_400 = Proud::ByteArray::vftable;
    cVar4 = FUN_140154a70(param_2,&local_428);
    ppppppuVar11 = local_428;
    if (((cVar4 != '\0') && (-1 < (int)local_428)) && ((int)local_428 <= DAT_140320d70)) {
      FUN_140050060(&local_400,(ulonglong)local_428 & 0xffffffff);
      ppppppuVar14 = local_3f0;
      if ((int)local_3e8 == 0) {
        ppppppuVar14 = ppppppuVar10;
      }
      FUN_1401543d0(param_2,ppppppuVar14,(ulonglong)ppppppuVar11 & 0xffffffff);
    }
    cVar4 = FUN_1401543d0(param_2,&local_420,4);
    if (cVar4 != '\0') {
      local_3d8[0] = local_420._0_4_;
    }
    cVar4 = FUN_1401543d0(param_2,&local_420,4);
    uVar5 = 0;
    if (cVar4 != '\0') {
      uVar5 = local_420._0_4_;
    }
    local_440 = (undefined ********)CONCAT44(local_440._4_4_,uVar5);
    local_98 = (undefined *******)0x0;
    uStack_90 = (undefined *)0x0;
    local_78 = (undefined *******)0x0;
    uStack_70 = (undefined *)0x0;
    cVar4 = FUN_1401543d0(param_2,&local_78,0x10);
    if (cVar4 != '\0') {
      local_98 = local_78;
      uStack_90 = uStack_70;
    }
    cVar4 = FUN_1401543d0(param_2,&local_420,1);
    if (cVar4 != '\0') {
      local_448._0_1_ = local_420._0_1_;
    }
    cVar4 = FUN_1401543d0(param_2,&local_420,2);
    if (cVar4 != '\0') {
      local_430[0] = local_420._0_2_;
    }
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_140321858);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] != '\0') goto LAB_1401b35ec;
      local_498 = (undefined ********)&DAT_140288b80;
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbf6,PTR_DAT_140321858);
    }
    else {
      ppppppuVar16 = ppppppuVar10;
      if ((char)param_1[3] != '\0') goto LAB_1401b35ec;
      FUN_1401568c0();
      local_420 = (undefined ******)PTR_DAT_1403200a0;
      local_228 = local_3d0._0_4_;
      FUN_140157840(&local_420,&local_228);
      FUN_14004f840(&local_420,&DAT_140286e98);
      local_220 = local_438._0_4_;
      FUN_140157840(&local_420,&local_220);
      FUN_14004f840(&local_420,&DAT_140286e98);
      FUN_140157b40(&local_420,&local_400);
      FUN_14004f840(&local_420,&DAT_140286e98);
      FUN_1401578a0(&local_420,local_3d8);
      FUN_14004f840(&local_420,&DAT_140286e98);
      local_288[0] = local_440._0_4_;
      FUN_140157840(&local_420,local_288);
      FUN_14004f840(&local_420,&DAT_140286e98);
      FUN_140157b50(&local_420,&local_98);
      FUN_14004f840(&local_420,&DAT_140286e98);
      FUN_140157700(&local_420,&local_448);
      FUN_14004f840(&local_420,&DAT_140286e98);
      FUN_1401577e0(&local_420,local_430);
      FUN_14004f840(&local_420,&DAT_140286e98);
      iVar15 = 0;
      if ((local_420 != (undefined ******)0x0) && (local_420 != (undefined ******)PTR_DAT_1403200a0)
         ) {
        iVar15 = *(int *)(local_420 + -1);
      }
      local_428 = (undefined ******)FUN_1400457d0(&local_420,&local_1e8,iVar15 + -2);
      if (local_420 == (undefined ******)0x0) {
        local_420 = (undefined ******)PTR_DAT_1403200a0;
      }
      if ((undefined ******)*local_428 != local_420) {
        pppppppuVar8 = (undefined *******)FUN_1401568c0();
        local_78 = pppppppuVar8;
        FUN_140156b50(pppppppuVar8);
        ppppppuVar11 = local_420;
        uStack_70 = (undefined *)CONCAT71(uStack_70._1_7_,1);
        if (((local_420 != (undefined ******)0x0) &&
            (local_420 != (undefined ******)PTR_DAT_1403200a0)) &&
           (ppppppuVar16 = local_420 + -1, ppppppuVar16 != (undefined ******)0x0)) {
          ppuVar9 = (undefined **)FUN_1401568c0();
          local_348 = ppuVar9;
          FUN_140156b50(ppuVar9);
          local_340 = (undefined *)CONCAT71(local_340._1_7_,1);
          piVar1 = (int *)((longlong)ppppppuVar11 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(ppppppuVar16);
          }
          FUN_140156be0(ppuVar9);
        }
        local_420 = (undefined ******)*local_428;
        if (((local_420 != (undefined ******)PTR_DAT_1403200a0) &&
            (local_420 != (undefined ******)0x0)) && (local_420 != (undefined ******)0x8)) {
          *(int *)((longlong)local_420 + -4) = *(int *)((longlong)local_420 + -4) + 1;
        }
        FUN_140156be0(pppppppuVar8);
      }
      if (((local_1e8 != (undefined *)0x0) && (local_1e8 != PTR_DAT_1403200a0)) &&
         (local_1e8 + -8 != (undefined *)0x0)) {
        pppppppuVar8 = (undefined *******)FUN_1401568c0();
        local_78 = pppppppuVar8;
        FUN_140156b50(pppppppuVar8);
        uStack_70 = (undefined *)CONCAT71(uStack_70._1_7_,1);
        piVar1 = (int *)(local_1e8 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_1e8 + -8);
        }
        FUN_140156be0(pppppppuVar8);
      }
      local_428 = (undefined ******)&local_320;
      local_1e8 = PTR_DAT_1403200a0;
      FUN_1401568c0();
      local_320 = (undefined ******)PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        local_320 = ppppppuVar10;
      }
      if (local_420 != (undefined ******)PTR_DAT_1403200a0) {
        pppppppuVar8 = (undefined *******)FUN_1401568c0();
        local_78 = pppppppuVar8;
        FUN_140156b50(pppppppuVar8);
        uStack_70 = (undefined *)CONCAT71(uStack_70._1_7_,1);
        FUN_14004f990(&local_320);
        local_320 = local_420;
        if (((local_420 != (undefined ******)PTR_DAT_1403200a0) &&
            (local_420 != (undefined ******)0x0)) && (local_420 != (undefined ******)0x8)) {
          *(int *)((longlong)local_420 + -4) = *(int *)((longlong)local_420 + -4) + 1;
        }
        FUN_140156be0(pppppppuVar8);
      }
      puVar3 = PTR_DAT_140321858;
      FUN_1401568c0();
      local_2a8 = PTR_DAT_1403200a0;
      uVar5 = FUN_140156740(puVar3);
      uVar12 = FUN_14004f760(&local_2a8,uVar5);
      FUN_140156770(uVar12,puVar3,uVar5);
      FUN_14004f380(&local_2a8);
      (**(code **)(*param_1 + 0x28))(param_1,0xfbf6,&local_2a8,&local_320);
      local_498 = (undefined ********)local_420;
      if (local_420 == (undefined ******)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbf6,PTR_DAT_140321858);
      ppppppuVar11 = local_420;
      if (((local_420 != (undefined ******)0x0) &&
          (local_420 != (undefined ******)PTR_DAT_1403200a0)) &&
         (ppppppuVar16 = local_420 + -1, ppppppuVar16 != (undefined ******)0x0)) {
        pppppppuVar8 = (undefined *******)FUN_1401568c0();
        local_78 = pppppppuVar8;
        FUN_140156b50(pppppppuVar8);
        uStack_70 = (undefined *)CONCAT71(uStack_70._1_7_,1);
        piVar1 = (int *)((longlong)ppppppuVar11 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(ppppppuVar16);
        }
        FUN_140156be0(pppppppuVar8);
      }
    }
    ppppppuVar16 = ppppppuVar10;
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_78 = (undefined *******)CONCAT44(local_78._4_4_,0xfbf6);
      uStack_70 = PTR_DAT_140321858;
      local_68 = iVar2;
      local_60 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_78);
      DVar6 = GetTickCount();
      ppppppuVar16 = (undefined ******)(ulonglong)DVar6;
    }
LAB_1401b35ec:
    local_468 = (undefined *******)local_430;
    local_470 = &local_448;
    local_478 = (undefined *******)&local_98;
    local_480 = (undefined ********)&local_440;
    local_488 = (undefined ***)local_3d8;
    local_490 = (undefined *******)&local_400;
    local_498 = (undefined ********)&local_438;
    cVar4 = (**(code **)(*param_1 + 0x40))(param_1,iVar2,local_3a8,&local_3d0);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140321858);
    }
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_218 = (undefined **)CONCAT44(local_218._4_4_,0xfbf6);
      local_210 = PTR_DAT_140321858;
      local_208 = (undefined ******)CONCAT44(local_208._4_4_,iVar2);
      local_200 = param_3;
      DVar6 = GetTickCount();
      local_1f8 = CONCAT44(local_1f8._4_4_,DVar6 - (int)ppppppuVar16);
      (**(code **)(*param_1 + 0x18))(param_1,&local_218);
    }
    FUN_1401858d0(&local_400);
    return 1;
  case 0xfbf7:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    FUN_140154e60(param_2,&local_440);
    cVar4 = FUN_1401543d0(param_2,&local_420,1);
    if (cVar4 != '\0') {
      local_448._0_1_ = local_420._0_1_;
    }
    local_78 = (undefined *******)Proud::AddrPort::vftable;
    uStack_70 = (undefined *)((ulonglong)uStack_70._6_2_ << 0x30);
    cVar4 = FUN_1401543d0(param_2,&local_438,4);
    uVar5 = (undefined4)uStack_70;
    if (cVar4 != '\0') {
      uVar5 = local_438._0_4_;
    }
    uStack_70 = (undefined *)CONCAT44(uStack_70._4_4_,uVar5);
    cVar4 = FUN_1401543d0(param_2,local_430,2);
    uVar13 = uStack_70._4_2_;
    if (cVar4 != '\0') {
      uVar13 = local_430[0];
    }
    uStack_70._0_6_ = CONCAT24(uVar13,(undefined4)uStack_70);
    local_348 = Proud::AddrPort::vftable;
    local_340 = (undefined *)((ulonglong)local_340._6_2_ << 0x30);
    cVar4 = FUN_1401543d0(param_2,&local_438,4);
    uVar5 = (undefined4)local_340;
    if (cVar4 != '\0') {
      uVar5 = local_438._0_4_;
    }
    local_340 = (undefined *)CONCAT44(local_340._4_4_,uVar5);
    cVar4 = FUN_1401543d0(param_2,local_430,2);
    uVar13 = local_340._4_2_;
    if (cVar4 != '\0') {
      uVar13 = local_430[0];
    }
    local_340._0_6_ = CONCAT24(uVar13,(undefined4)local_340);
    local_3d0 = (undefined ********)Proud::AddrPort::vftable;
    local_3c8 = (undefined *)((ulonglong)local_3c8._6_2_ << 0x30);
    cVar4 = FUN_1401543d0(param_2,&local_438,4);
    uVar5 = (undefined4)local_3c8;
    if (cVar4 != '\0') {
      uVar5 = local_438._0_4_;
    }
    local_3c8 = (undefined *)CONCAT44(local_3c8._4_4_,uVar5);
    cVar4 = FUN_1401543d0(param_2,local_430,2);
    uVar13 = local_3c8._4_2_;
    if (cVar4 != '\0') {
      uVar13 = local_430[0];
    }
    local_3c8._0_6_ = CONCAT24(uVar13,(undefined4)local_3c8);
    local_98 = (undefined *******)Proud::AddrPort::vftable;
    uStack_90 = (undefined *)((ulonglong)uStack_90._6_2_ << 0x30);
    cVar4 = FUN_1401543d0(param_2,&local_438,4);
    uVar5 = (undefined4)uStack_90;
    if (cVar4 != '\0') {
      uVar5 = local_438._0_4_;
    }
    uStack_90 = (undefined *)CONCAT44(uStack_90._4_4_,uVar5);
    cVar4 = FUN_1401543d0(param_2,local_430,2);
    uVar13 = uStack_90._4_2_;
    if (cVar4 != '\0') {
      uVar13 = local_430[0];
    }
    uStack_90._0_6_ = CONCAT24(uVar13,(undefined4)uStack_90);
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_140321860);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfbf7,PTR_DAT_140321860);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_438 = (undefined ********)PTR_DAT_1403200a0;
      local_224 = local_440._0_4_;
      FUN_140157840(&local_438,&local_224);
      FUN_14004f840(&local_438,&DAT_140286e98);
      FUN_140157700(&local_438,&local_448);
      FUN_14004f840(&local_438,&DAT_140286e98);
      uVar12 = (*(code *)*local_78)(&local_78,&local_428);
      FUN_14004cc50(&local_438,uVar12);
      ppppppuVar11 = local_428;
      if (((local_428 != (undefined ******)0x0) &&
          (local_428 != (undefined ******)PTR_DAT_1403200a0)) &&
         (ppppppuVar16 = local_428 + -1, ppppppuVar16 != (undefined ******)0x0)) {
        ppppppuVar10 = (undefined ******)FUN_1401568c0();
        local_420 = ppppppuVar10;
        FUN_140156b50(ppppppuVar10);
        local_418 = (undefined *)CONCAT71(local_418._1_7_,1);
        piVar1 = (int *)((longlong)ppppppuVar11 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(ppppppuVar16);
        }
        FUN_140156be0(ppppppuVar10);
      }
      FUN_14004f840(&local_438,&DAT_140286e98);
      uVar12 = (*(code *)*local_348)(&local_348,&local_428);
      FUN_14004cc50(&local_438,uVar12);
      ppppppuVar11 = local_428;
      if (((local_428 != (undefined ******)0x0) &&
          (local_428 != (undefined ******)PTR_DAT_1403200a0)) &&
         (ppppppuVar16 = local_428 + -1, ppppppuVar16 != (undefined ******)0x0)) {
        ppppppuVar10 = (undefined ******)FUN_1401568c0();
        local_420 = ppppppuVar10;
        FUN_140156b50(ppppppuVar10);
        local_418 = (undefined *)CONCAT71(local_418._1_7_,1);
        piVar1 = (int *)((longlong)ppppppuVar11 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(ppppppuVar16);
        }
        FUN_140156be0(ppppppuVar10);
      }
      FUN_14004f840(&local_438,&DAT_140286e98);
      uVar12 = (*(code *)*local_3d0)(&local_3d0,&local_428);
      FUN_14004cc50(&local_438,uVar12);
      if (((local_428 != (undefined ******)0x0) &&
          (local_428 != (undefined ******)PTR_DAT_1403200a0)) &&
         (local_428 + -1 != (undefined ******)0x0)) {
        ppppppuVar11 = (undefined ******)FUN_1401568c0();
        local_420 = ppppppuVar11;
        FUN_140156b50(ppppppuVar11);
        local_418 = (undefined *)CONCAT71(local_418._1_7_,1);
        piVar1 = (int *)((longlong)local_428 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_428 + -1);
        }
        FUN_140156be0(ppppppuVar11);
      }
      FUN_14004f840(&local_438,&DAT_140286e98);
      FUN_140162330(&local_438,&local_98);
      FUN_14004f840(&local_438,&DAT_140286e98);
      iVar15 = 0;
      if ((local_438 != (undefined ********)0x0) &&
         (iVar15 = 0, local_438 != (undefined ********)PTR_DAT_1403200a0)) {
        iVar15 = *(int *)(local_438 + -1);
      }
      uVar12 = FUN_1400457d0(&local_438,local_148,iVar15 + -2);
      FUN_14004f4f0(&local_438,uVar12);
      FUN_14004f990(local_148);
      local_428 = &local_230;
      FUN_1401568c0();
      local_230 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_230,&local_438);
      uVar12 = FUN_14004f400(local_f8,PTR_DAT_140321860,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfbf7,uVar12,&local_230);
      local_498 = local_438;
      if (local_438 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbf7,PTR_DAT_140321860);
      FUN_14004f990(&local_438);
    }
    DVar6 = 0;
    if (((char)param_1[3] == '\0') && (DVar6 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_420 = (undefined ******)CONCAT44(local_420._4_4_,0xfbf7);
      local_418 = PTR_DAT_140321860;
      local_410 = iVar2;
      local_408 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_420);
      DVar6 = GetTickCount();
    }
    local_478 = (undefined *******)&local_98;
    local_480 = (undefined ********)&local_3d0;
    local_488 = &local_348;
    local_490 = (undefined *******)&local_78;
    local_498 = &local_448;
    cVar4 = (**(code **)(*param_1 + 0x48))(param_1,iVar2,local_3a8,&local_440);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140321860);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfbf7);
    local_3f8 = PTR_DAT_140321860;
    break;
  case 0xfbf8:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    FUN_140154e60(param_2,&local_440);
    local_78 = (undefined *******)Proud::AddrPort::vftable;
    DVar6 = 0;
    uStack_70 = (undefined *)((ulonglong)uStack_70._6_2_ << 0x30);
    FUN_14015b580(param_2,&local_78);
    local_98 = (undefined *******)Proud::AddrPort::vftable;
    uStack_90 = (undefined *)((ulonglong)uStack_90._6_2_ << 0x30);
    FUN_14015b580(param_2,&local_98);
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_140321868);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfbf8,PTR_DAT_140321868);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_438 = (undefined ********)PTR_DAT_1403200a0;
      local_21c = local_440._0_4_;
      FUN_140157840(&local_438,&local_21c);
      FUN_14004f840(&local_438,&DAT_140286e98);
      FUN_140162330(&local_438,&local_78);
      FUN_14004f840(&local_438,&DAT_140286e98);
      FUN_140162330(&local_438,&local_98);
      FUN_14004f840(&local_438,&DAT_140286e98);
      iVar15 = 0;
      if ((local_438 != (undefined ********)0x0) &&
         (local_438 != (undefined ********)PTR_DAT_1403200a0)) {
        iVar15 = *(int *)(local_438 + -1);
      }
      uVar12 = FUN_1400457d0(&local_438,local_138,iVar15 + -2);
      FUN_14004f4f0(&local_438,uVar12);
      FUN_14004f990(local_138);
      local_428 = &local_298;
      FUN_1401568c0();
      local_298 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_298,&local_438);
      uVar12 = FUN_14004f400(local_b8,PTR_DAT_140321868,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfbf8,uVar12,&local_298);
      local_498 = local_438;
      if (local_438 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbf8,PTR_DAT_140321868);
      FUN_14004f990(&local_438);
    }
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_348 = (undefined **)CONCAT44(local_348._4_4_,0xfbf8);
      local_340 = PTR_DAT_140321868;
      local_338 = iVar2;
      local_330 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_348);
      DVar6 = GetTickCount();
    }
    local_490 = (undefined *******)&local_98;
    local_498 = &local_78;
    cVar4 = (**(code **)(*param_1 + 0x50))(param_1,iVar2,local_3a8,&local_440);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140321868);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfbf8);
    local_3f8 = PTR_DAT_140321868;
    break;
  case 0xfbf9:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    FUN_140154e60(param_2,&local_438);
    cVar4 = FUN_1401543d0(param_2,&local_3d0,4);
    uVar5 = local_328[0];
    if (cVar4 != '\0') {
      uVar5 = local_3d0._0_4_;
    }
    local_440 = (undefined ********)CONCAT44(local_440._4_4_,uVar5);
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_140321870);
    DVar6 = 0;
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfbf9,PTR_DAT_140321870);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_3d0 = (undefined ********)PTR_DAT_1403200a0;
      local_2f8[0] = local_438._0_4_;
      FUN_140157840(&local_3d0,local_2f8);
      FUN_14004f840(&local_3d0,&DAT_140286e98);
      uVar12 = FUN_140181e70((ulonglong)local_440 & 0xffffffff);
      FUN_14004f840(&local_3d0,uVar12);
      FUN_14004f840(&local_3d0,&DAT_140286e98);
      iVar15 = 0;
      if ((local_3d0 != (undefined ********)0x0) &&
         (local_3d0 != (undefined ********)PTR_DAT_1403200a0)) {
        iVar15 = *(int *)(local_3d0 + -1);
      }
      uVar12 = FUN_1400457d0(&local_3d0,local_140,iVar15 + -2);
      FUN_14004f4f0(&local_3d0,uVar12);
      FUN_14004f990(local_140);
      local_428 = &local_248;
      FUN_1401568c0();
      local_248 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_248,&local_3d0);
      uVar12 = FUN_14004f400(local_a8,PTR_DAT_140321870,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfbf9,uVar12,&local_248);
      local_498 = local_3d0;
      if (local_3d0 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbf9,PTR_DAT_140321870);
      FUN_14004f990(&local_3d0);
    }
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_98 = (undefined *******)CONCAT44(local_98._4_4_,0xfbf9);
      uStack_90 = PTR_DAT_140321870;
      local_88 = iVar2;
      local_80 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_98);
      DVar6 = GetTickCount();
    }
    local_498 = (undefined ********)&local_440;
    cVar4 = (**(code **)(*param_1 + 0x58))(param_1,iVar2,local_3a8,&local_438);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140321870);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfbf9);
    local_3f8 = PTR_DAT_140321870;
    break;
  case 0xfbfa:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    FUN_140154e60(param_2,&local_438);
    FUN_140154e60(param_2,&local_440);
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_140321878);
    DVar6 = 0;
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfbfa,PTR_DAT_140321878);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_3d0 = (undefined ********)PTR_DAT_1403200a0;
      local_278[0] = local_438._0_4_;
      FUN_140157840(&local_3d0,local_278);
      FUN_14004f840(&local_3d0,&DAT_140286e98);
      local_2e8[0] = local_440._0_4_;
      FUN_140157840(&local_3d0,local_2e8);
      FUN_14004f840(&local_3d0,&DAT_140286e98);
      iVar15 = 0;
      if ((local_3d0 != (undefined ********)0x0) &&
         (local_3d0 != (undefined ********)PTR_DAT_1403200a0)) {
        iVar15 = *(int *)(local_3d0 + -1);
      }
      uVar12 = FUN_1400457d0(&local_3d0,local_178,iVar15 + -2);
      FUN_14004f4f0(&local_3d0,uVar12);
      FUN_14004f990(local_178);
      local_428 = &local_310;
      FUN_1401568c0();
      local_310 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_310,&local_3d0);
      uVar12 = FUN_14004f400(local_b0,PTR_DAT_140321878,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfbfa,uVar12,&local_310);
      local_498 = local_3d0;
      if (local_3d0 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbfa,PTR_DAT_140321878);
      FUN_14004f990(&local_3d0);
    }
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_98 = (undefined *******)CONCAT44(local_98._4_4_,0xfbfa);
      uStack_90 = PTR_DAT_140321878;
      local_88 = iVar2;
      local_80 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_98);
      DVar6 = GetTickCount();
    }
    local_498 = (undefined ********)&local_440;
    cVar4 = (**(code **)(*param_1 + 0x60))(param_1,iVar2,local_3a8,&local_438);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140321878);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfbfa);
    local_3f8 = PTR_DAT_140321878;
    break;
  case 0xfbfb:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    FUN_140154e60(param_2,&local_438);
    FUN_140154e60(param_2,&local_440);
    local_420 = (undefined ******)Proud::AddrPort::vftable;
    DVar6 = 0;
    local_418 = (undefined *)((ulonglong)local_418._6_2_ << 0x30);
    FUN_14015b580(param_2,&local_420);
    local_348 = Proud::AddrPort::vftable;
    local_340 = (undefined *)((ulonglong)local_340._6_2_ << 0x30);
    FUN_14015b580(param_2,&local_348);
    local_78 = (undefined *******)Proud::AddrPort::vftable;
    uStack_70 = (undefined *)((ulonglong)uStack_70._6_2_ << 0x30);
    FUN_14015b580(param_2,&local_78);
    local_98 = (undefined *******)Proud::AddrPort::vftable;
    uStack_90 = (undefined *)((ulonglong)uStack_90._6_2_ << 0x30);
    FUN_14015b580(param_2,&local_98);
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_140321880);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfbfb,PTR_DAT_140321880);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_3d0 = (undefined ********)PTR_DAT_1403200a0;
      local_23c = local_438._0_4_;
      FUN_140157840(&local_3d0,&local_23c);
      FUN_14004f840(&local_3d0,&DAT_140286e98);
      local_2d8[0] = local_440._0_4_;
      FUN_140157840(&local_3d0,local_2d8);
      FUN_14004f840(&local_3d0,&DAT_140286e98);
      FUN_140162330(&local_3d0,&local_420);
      FUN_14004f840(&local_3d0,&DAT_140286e98);
      FUN_140162330(&local_3d0,&local_348);
      FUN_14004f840(&local_3d0,&DAT_140286e98);
      FUN_140162330(&local_3d0,&local_78);
      FUN_14004f840(&local_3d0,&DAT_140286e98);
      FUN_140162330(&local_3d0,&local_98);
      FUN_14004f840(&local_3d0,&DAT_140286e98);
      iVar15 = 0;
      if ((local_3d0 != (undefined ********)0x0) &&
         (local_3d0 != (undefined ********)PTR_DAT_1403200a0)) {
        iVar15 = *(int *)(local_3d0 + -1);
      }
      uVar12 = FUN_1400457d0(&local_3d0,local_168,iVar15 + -2);
      FUN_14004f4f0(&local_3d0,uVar12);
      FUN_14004f990(local_168);
      local_428 = &local_308;
      FUN_1401568c0();
      local_308 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_308,&local_3d0);
      uVar12 = FUN_14004f400(local_130,PTR_DAT_140321880,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfbfb,uVar12,&local_308);
      local_498 = local_3d0;
      if (local_3d0 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbfb,PTR_DAT_140321880);
      FUN_14004f990(&local_3d0);
    }
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_3d0 = (undefined ********)CONCAT44(local_3d0._4_4_,0xfbfb);
      local_3c8 = PTR_DAT_140321880;
      local_3c0 = iVar2;
      local_3b8 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_3d0);
      DVar6 = GetTickCount();
    }
    local_478 = (undefined *******)&local_98;
    local_480 = &local_78;
    local_488 = &local_348;
    local_490 = &local_420;
    local_498 = (undefined ********)&local_440;
    cVar4 = (**(code **)(*param_1 + 0x68))(param_1,iVar2,local_3a8,&local_438);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140321880);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfbfb);
    local_3f8 = PTR_DAT_140321880;
    break;
  case 0xfbfc:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_140321888);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfbfc,PTR_DAT_140321888);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_440 = (undefined ********)PTR_DAT_1403200a0;
      uVar12 = FUN_1400457d0(&local_440,local_158,0xfffffffe);
      FUN_14004f4f0(&local_440,uVar12);
      FUN_14004f990(local_158);
      local_428 = &local_300;
      FUN_1401568c0();
      local_300 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_300,&local_440);
      uVar12 = FUN_14004f400(local_120,PTR_DAT_140321888,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfbfc,uVar12,&local_300);
      local_498 = local_440;
      if (local_440 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbfc,PTR_DAT_140321888);
      FUN_14004f990(&local_440);
    }
    DVar6 = 0;
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_98 = (undefined *******)CONCAT44(local_98._4_4_,0xfbfc);
      uStack_90 = PTR_DAT_140321888;
      local_88 = iVar2;
      local_80 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_98);
      DVar6 = GetTickCount();
    }
    cVar4 = (**(code **)(*param_1 + 0x70))(param_1,iVar2,local_3a8);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140321888);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfbfc);
    local_3f8 = PTR_DAT_140321888;
    break;
  case 0xfbfd:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_140321890);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfbfd,PTR_DAT_140321890);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_440 = (undefined ********)PTR_DAT_1403200a0;
      uVar12 = FUN_1400457d0(&local_440,local_170,0xfffffffe);
      FUN_14004f4f0(&local_440,uVar12);
      FUN_14004f990(local_170);
      local_428 = &local_2f0;
      FUN_1401568c0();
      local_2f0 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_2f0,&local_440);
      uVar12 = FUN_14004f400(local_d8,PTR_DAT_140321890,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfbfd,uVar12,&local_2f0);
      local_498 = local_440;
      if (local_440 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbfd,PTR_DAT_140321890);
      FUN_14004f990(&local_440);
    }
    DVar6 = 0;
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_98 = (undefined *******)CONCAT44(local_98._4_4_,0xfbfd);
      uStack_90 = PTR_DAT_140321890;
      local_88 = iVar2;
      local_80 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_98);
      DVar6 = GetTickCount();
    }
    cVar4 = (**(code **)(*param_1 + 0x78))(param_1,iVar2,local_3a8);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140321890);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfbfd);
    local_3f8 = PTR_DAT_140321890;
    break;
  case 0xfbfe:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_140321898);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfbfe,PTR_DAT_140321898);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_440 = (undefined ********)PTR_DAT_1403200a0;
      uVar12 = FUN_1400457d0(&local_440,local_1a0,0xfffffffe);
      FUN_14004f4f0(&local_440,uVar12);
      FUN_14004f990(local_1a0);
      local_428 = &local_2e0;
      FUN_1401568c0();
      local_2e0 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_2e0,&local_440);
      uVar12 = FUN_14004f400(local_110,PTR_DAT_140321898,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfbfe,uVar12,&local_2e0);
      local_498 = local_440;
      if (local_440 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbfe,PTR_DAT_140321898);
      FUN_14004f990(&local_440);
    }
    DVar6 = 0;
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_98 = (undefined *******)CONCAT44(local_98._4_4_,0xfbfe);
      uStack_90 = PTR_DAT_140321898;
      local_88 = iVar2;
      local_80 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_98);
      DVar6 = GetTickCount();
    }
    cVar4 = (**(code **)(*param_1 + 0x80))(param_1,iVar2,local_3a8);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140321898);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfbfe);
    local_3f8 = PTR_DAT_140321898;
    break;
  case 0xfbff:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_1403218a0);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfbff,PTR_DAT_1403218a0);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_440 = (undefined ********)PTR_DAT_1403200a0;
      uVar12 = FUN_1400457d0(&local_440,local_150,0xfffffffe);
      FUN_14004f4f0(&local_440,uVar12);
      FUN_14004f990(local_150);
      local_428 = &local_2d0;
      FUN_1401568c0();
      local_2d0 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_2d0,&local_440);
      uVar12 = FUN_14004f400(local_d0,PTR_DAT_1403218a0,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfbff,uVar12,&local_2d0);
      local_498 = local_440;
      if (local_440 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfbff,PTR_DAT_1403218a0);
      FUN_14004f990(&local_440);
    }
    DVar6 = 0;
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_98 = (undefined *******)CONCAT44(local_98._4_4_,0xfbff);
      uStack_90 = PTR_DAT_1403218a0;
      local_88 = iVar2;
      local_80 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_98);
      DVar6 = GetTickCount();
    }
    cVar4 = (**(code **)(*param_1 + 0x88))(param_1,iVar2,local_3a8);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403218a0);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfbff);
    local_3f8 = PTR_DAT_1403218a0;
    break;
  case 0xfc00:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    cVar4 = FUN_1401543d0(param_2,&local_420,1);
    if (cVar4 != '\0') {
      local_448._0_1_ = local_420._0_1_;
    }
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_1403218a8);
    DVar6 = 0;
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfc00,PTR_DAT_1403218a8);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_440 = (undefined ********)PTR_DAT_1403200a0;
      FUN_140157700(&local_440,&local_448);
      FUN_14004f840(&local_440,&DAT_140286e98);
      iVar15 = 0;
      if ((local_440 != (undefined ********)0x0) &&
         (local_440 != (undefined ********)PTR_DAT_1403200a0)) {
        iVar15 = *(int *)(local_440 + -1);
      }
      uVar12 = FUN_1400457d0(&local_440,local_190,iVar15 + -2);
      FUN_14004f4f0(&local_440,uVar12);
      FUN_14004f990(local_190);
      local_428 = &local_2c0;
      FUN_1401568c0();
      local_2c0 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_2c0,&local_440);
      uVar12 = FUN_14004f400(local_100,PTR_DAT_1403218a8,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfc00,uVar12,&local_2c0);
      local_498 = local_440;
      if (local_440 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfc00,PTR_DAT_1403218a8);
      FUN_14004f990(&local_440);
    }
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_98 = (undefined *******)CONCAT44(local_98._4_4_,0xfc00);
      uStack_90 = PTR_DAT_1403218a8;
      local_88 = iVar2;
      local_80 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_98);
      DVar6 = GetTickCount();
    }
    cVar4 = (**(code **)(*param_1 + 0x90))(param_1,iVar2,local_3a8,&local_448);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403218a8);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfc00);
    local_3f8 = PTR_DAT_1403218a8;
    break;
  case 0xfc01:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_1403218b0);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfc01,PTR_DAT_1403218b0);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_440 = (undefined ********)PTR_DAT_1403200a0;
      uVar12 = FUN_1400457d0(&local_440,local_160,0xfffffffe);
      FUN_14004f4f0(&local_440,uVar12);
      FUN_14004f990(local_160);
      local_428 = &local_2b0;
      FUN_1401568c0();
      local_2b0 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_2b0,&local_440);
      uVar12 = FUN_14004f400(local_c8,PTR_DAT_1403218b0,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfc01,uVar12,&local_2b0);
      local_498 = local_440;
      if (local_440 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfc01,PTR_DAT_1403218b0);
      FUN_14004f990(&local_440);
    }
    DVar6 = 0;
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_98 = (undefined *******)CONCAT44(local_98._4_4_,0xfc01);
      uStack_90 = PTR_DAT_1403218b0;
      local_88 = iVar2;
      local_80 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_98);
      DVar6 = GetTickCount();
    }
    cVar4 = (**(code **)(*param_1 + 0x98))(param_1,iVar2,local_3a8);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403218b0);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfc01);
    local_3f8 = PTR_DAT_1403218b0;
    break;
  case 0xfc02:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_1403218b8);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfc02,PTR_DAT_1403218b8);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_440 = (undefined ********)PTR_DAT_1403200a0;
      uVar12 = FUN_1400457d0(&local_440,local_180,0xfffffffe);
      FUN_14004f4f0(&local_440,uVar12);
      FUN_14004f990(local_180);
      local_428 = &local_2a0;
      FUN_1401568c0();
      local_2a0 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_2a0,&local_440);
      uVar12 = FUN_14004f400(local_f0,PTR_DAT_1403218b8,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfc02,uVar12,&local_2a0);
      local_498 = local_440;
      if (local_440 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfc02,PTR_DAT_1403218b8);
      FUN_14004f990(&local_440);
    }
    DVar6 = 0;
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_98 = (undefined *******)CONCAT44(local_98._4_4_,0xfc02);
      uStack_90 = PTR_DAT_1403218b8;
      local_88 = iVar2;
      local_80 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_98);
      DVar6 = GetTickCount();
    }
    cVar4 = (**(code **)(*param_1 + 0xa0))(param_1,iVar2,local_3a8);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403218b8);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfc02);
    local_3f8 = PTR_DAT_1403218b8;
    break;
  case 0xfc03:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    FUN_140154e60(param_2,&local_440);
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_1403218c0);
    DVar6 = 0;
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfc03,PTR_DAT_1403218c0);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_438 = (undefined ********)PTR_DAT_1403200a0;
      local_268[0] = local_440._0_4_;
      FUN_140157840(&local_438,local_268);
      FUN_14004f840(&local_438,&DAT_140286e98);
      iVar15 = 0;
      if ((local_438 != (undefined ********)0x0) &&
         (local_438 != (undefined ********)PTR_DAT_1403200a0)) {
        iVar15 = *(int *)(local_438 + -1);
      }
      uVar12 = FUN_1400457d0(&local_438,local_1b8,iVar15 + -2);
      FUN_14004f4f0(&local_438,uVar12);
      FUN_14004f990(local_1b8);
      local_428 = &local_290;
      FUN_1401568c0();
      local_290 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_290,&local_438);
      uVar12 = FUN_14004f400(local_e8,PTR_DAT_1403218c0,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfc03,uVar12,&local_290);
      local_498 = local_438;
      if (local_438 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfc03,PTR_DAT_1403218c0);
      FUN_14004f990(&local_438);
    }
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_98 = (undefined *******)CONCAT44(local_98._4_4_,0xfc03);
      uStack_90 = PTR_DAT_1403218c0;
      local_88 = iVar2;
      local_80 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_98);
      DVar6 = GetTickCount();
    }
    cVar4 = (**(code **)(*param_1 + 0xa8))(param_1,iVar2,local_3a8,&local_440);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403218c0);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfc03);
    local_3f8 = PTR_DAT_1403218c0;
    break;
  case 0xfc04:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    FUN_140154e60(param_2,&local_440);
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_1403218c8);
    DVar6 = 0;
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfc04,PTR_DAT_1403218c8);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_438 = (undefined ********)PTR_DAT_1403200a0;
      local_328[0] = local_440._0_4_;
      FUN_140157840(&local_438,local_328);
      FUN_14004f840(&local_438,&DAT_140286e98);
      iVar15 = 0;
      if ((local_438 != (undefined ********)0x0) &&
         (local_438 != (undefined ********)PTR_DAT_1403200a0)) {
        iVar15 = *(int *)(local_438 + -1);
      }
      uVar12 = FUN_1400457d0(&local_438,local_1b0,iVar15 + -2);
      FUN_14004f4f0(&local_438,uVar12);
      FUN_14004f990(local_1b0);
      local_428 = &local_280;
      FUN_1401568c0();
      local_280 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_280,&local_438);
      uVar12 = FUN_14004f400(local_e0,PTR_DAT_1403218c8,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfc04,uVar12,&local_280);
      local_498 = local_438;
      if (local_438 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfc04,PTR_DAT_1403218c8);
      FUN_14004f990(&local_438);
    }
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_98 = (undefined *******)CONCAT44(local_98._4_4_,0xfc04);
      uStack_90 = PTR_DAT_1403218c8;
      local_88 = iVar2;
      local_80 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_98);
      DVar6 = GetTickCount();
    }
    cVar4 = (**(code **)(*param_1 + 0xb0))(param_1,iVar2,local_3a8,&local_440);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403218c8);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfc04);
    local_3f8 = PTR_DAT_1403218c8;
    break;
  case 0xfc05:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    cVar4 = FUN_1401543d0(param_2,&local_420,1);
    if (cVar4 != '\0') {
      local_448._0_1_ = local_420._0_1_;
    }
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_1403218d0);
    DVar6 = 0;
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfc05,PTR_DAT_1403218d0);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_440 = (undefined ********)PTR_DAT_1403200a0;
      FUN_140157700(&local_440,&local_448);
      FUN_14004f840(&local_440,&DAT_140286e98);
      iVar15 = 0;
      if ((local_440 != (undefined ********)0x0) &&
         (local_440 != (undefined ********)PTR_DAT_1403200a0)) {
        iVar15 = *(int *)(local_440 + -1);
      }
      uVar12 = FUN_1400457d0(&local_440,local_1a8,iVar15 + -2);
      FUN_14004f4f0(&local_440,uVar12);
      FUN_14004f990(local_1a8);
      local_428 = &local_270;
      FUN_1401568c0();
      local_270 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_270,&local_440);
      uVar12 = FUN_14004f400(local_128,PTR_DAT_1403218d0,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfc05,uVar12,&local_270);
      local_498 = local_440;
      if (local_440 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfc05,PTR_DAT_1403218d0);
      FUN_14004f990(&local_440);
    }
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_98 = (undefined *******)CONCAT44(local_98._4_4_,0xfc05);
      uStack_90 = PTR_DAT_1403218d0;
      local_88 = iVar2;
      local_80 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_98);
      DVar6 = GetTickCount();
    }
    cVar4 = (**(code **)(*param_1 + 0xb8))(param_1,iVar2,local_3a8,&local_448);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403218d0);
    }
    if ((char)param_1[3] != '\0') {
      return 1;
    }
    if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
      return 1;
    }
    local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfc05);
    local_3f8 = PTR_DAT_1403218d0;
    break;
  case 0xfc06:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    FUN_1401568c0();
    local_98 = (undefined *******)PTR_DAT_140320098;
    FUN_140157530(param_2,&local_98);
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_1403218d8);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfc06,PTR_DAT_1403218d8);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_440 = (undefined ********)PTR_DAT_1403200a0;
      FUN_1401b2640(&local_440,&local_98);
      FUN_14004f840(&local_440,&DAT_140286e98);
      iVar15 = 0;
      if ((local_440 != (undefined ********)0x0) &&
         (local_440 != (undefined ********)PTR_DAT_1403200a0)) {
        iVar15 = *(int *)(local_440 + -1);
      }
      uVar12 = FUN_1400457d0(&local_440,local_198,iVar15 + -2);
      FUN_14004f4f0(&local_440,uVar12);
      FUN_14004f990(local_198);
      local_428 = &local_260;
      FUN_1401568c0();
      local_260 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_260,&local_440);
      uVar12 = FUN_14004f400(local_118,PTR_DAT_1403218d8,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfc06,uVar12,&local_260);
      local_498 = local_440;
      if (local_440 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfc06,PTR_DAT_1403218d8);
      FUN_14004f990(&local_440);
    }
    DVar6 = 0;
    if (((char)param_1[3] == '\0') && (DVar6 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_78 = (undefined *******)CONCAT44(local_78._4_4_,0xfc06);
      uStack_70 = PTR_DAT_1403218d8;
      local_68 = iVar2;
      local_60 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_78);
      DVar6 = GetTickCount();
    }
    cVar4 = (**(code **)(*param_1 + 0xc0))(param_1,iVar2,local_3a8,&local_98);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403218d8);
    }
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfc06);
      local_3f8 = PTR_DAT_1403218d8;
      local_3f0 = (undefined ******)CONCAT44(local_3f0._4_4_,iVar2);
      local_3e8 = param_3;
      DVar7 = GetTickCount();
      local_3e0 = CONCAT44(local_3e0._4_4_,DVar7 - DVar6);
      (**(code **)(*param_1 + 0x18))(param_1,&local_400);
    }
    goto LAB_1401b6157;
  case 0xfc07:
    FUN_140157c90(local_3a8);
    local_3a4 = param_2[10];
    local_3a8[0] = (undefined1)param_2[0x10];
    cVar4 = FUN_1401543d0(param_2,&local_420,1);
    if (cVar4 != '\0') {
      local_448._0_1_ = local_420._0_1_;
    }
    FUN_1401568c0();
    local_98 = (undefined *******)PTR_DAT_140320098;
    FUN_140157530(param_2,&local_98);
    (**(code **)(*(longlong *)param_1[2] + 0x48))((longlong *)param_1[2],param_2,PTR_DAT_1403218e0);
    if (*(char *)((longlong)param_1 + 0x19) == '\0') {
      if ((char)param_1[3] == '\0') {
        local_498 = (undefined ********)&DAT_140288b80;
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfc07,PTR_DAT_1403218e0);
      }
    }
    else if ((char)param_1[3] == '\0') {
      FUN_1401568c0();
      local_440 = (undefined ********)PTR_DAT_1403200a0;
      FUN_140157700(&local_440,&local_448);
      FUN_14004f840(&local_440,&DAT_140286e98);
      FUN_1401b2640(&local_440,&local_98);
      FUN_14004f840(&local_440,&DAT_140286e98);
      iVar15 = 0;
      if ((local_440 != (undefined ********)0x0) &&
         (local_440 != (undefined ********)PTR_DAT_1403200a0)) {
        iVar15 = *(int *)(local_440 + -1);
      }
      uVar12 = FUN_1400457d0(&local_440,local_188,iVar15 + -2);
      FUN_14004f4f0(&local_440,uVar12);
      FUN_14004f990(local_188);
      local_428 = &local_250;
      FUN_1401568c0();
      local_250 = (undefined *****)PTR_DAT_1403200a0;
      FUN_14004f4f0(&local_250,&local_440);
      uVar12 = FUN_14004f400(local_108,PTR_DAT_1403218e0,0);
      (**(code **)(*param_1 + 0x28))(param_1,0xfc07,uVar12,&local_250);
      local_498 = local_440;
      if (local_440 == (undefined ********)0x0) {
        local_498 = (undefined ********)PTR_DAT_1403200a0;
      }
      (**(code **)(*(longlong *)param_1[2] + 0x70))
                ((longlong *)param_1[2],iVar2,0xfc07,PTR_DAT_1403218e0);
      FUN_14004f990(&local_440);
    }
    DVar6 = 0;
    if (((char)param_1[3] == '\0') && (DVar6 = 0, *(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_78 = (undefined *******)CONCAT44(local_78._4_4_,0xfc07);
      uStack_70 = PTR_DAT_1403218e0;
      local_68 = iVar2;
      local_60 = param_3;
      (**(code **)(*param_1 + 0x20))(param_1,&local_78);
      DVar6 = GetTickCount();
    }
    local_498 = &local_98;
    cVar4 = (**(code **)(*param_1 + 200))(param_1,iVar2,local_3a8,&local_448);
    if (cVar4 == '\0') {
      (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403218e0);
    }
    if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
      local_400 = (undefined **)CONCAT44(local_400._4_4_,0xfc07);
      local_3f8 = PTR_DAT_1403218e0;
      local_3f0 = (undefined ******)CONCAT44(local_3f0._4_4_,iVar2);
      local_3e8 = param_3;
      DVar7 = GetTickCount();
      local_3e0 = CONCAT44(local_3e0._4_4_,DVar7 - DVar6);
      (**(code **)(*param_1 + 0x18))(param_1,&local_400);
    }
LAB_1401b6157:
    FUN_140050520(&local_98);
    return 1;
  default:
    goto switchD_1401b2824_default;
  }
  local_3f0 = (undefined ******)CONCAT44(local_3f0._4_4_,iVar2);
  local_3e8 = param_3;
  DVar7 = GetTickCount();
  local_3e0 = CONCAT44(local_3e0._4_4_,DVar7 - DVar6);
  (**(code **)(*param_1 + 0x18))(param_1,&local_400);
  return 1;
}



undefined8 FUN_1401b61f0(longlong *param_1,int *param_2,undefined8 param_3)

{
  int *piVar1;
  int iVar2;
  char cVar3;
  undefined4 uVar4;
  DWORD DVar5;
  DWORD DVar6;
  longlong *plVar7;
  undefined **ppuVar8;
  undefined8 uVar9;
  undefined *puVar10;
  int iVar11;
  undefined *puVar12;
  undefined *local_res10;
  undefined8 local_res18;
  int local_res20 [2];
  undefined *local_168;
  undefined8 local_160;
  undefined *local_158;
  int local_150;
  undefined8 local_148;
  int local_140;
  undefined **local_138;
  undefined1 local_130;
  undefined *local_128;
  undefined *local_120;
  undefined *local_118;
  undefined *local_110;
  undefined *local_108;
  undefined *local_100;
  undefined *local_f8;
  undefined *local_f0;
  undefined *local_e8;
  undefined *local_e0;
  undefined *local_d8;
  undefined *local_d0;
  undefined *local_c8;
  undefined *local_c0;
  undefined *local_b8 [2];
  undefined1 local_a8 [4];
  int local_a4;
  undefined8 local_70;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  iVar2 = param_2[10];
  local_res18 = param_3;
  if (iVar2 == 0) {
    FUN_1401c5a30(param_1,0);
  }
  iVar11 = *param_2;
  cVar3 = FUN_140154d80(param_2,local_res20);
  if (cVar3 != '\0') {
    local_70 = param_3;
    if (local_res20[0] == 0xfde9) {
      FUN_140157c90(local_a8);
      local_a4 = param_2[10];
      local_a8[0] = (undefined1)param_2[0x10];
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403218e8);
      DVar5 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfde9,PTR_DAT_1403218e8,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        puVar10 = PTR_DAT_1403200a0;
        local_res10 = PTR_DAT_1403200a0;
        plVar7 = (longlong *)FUN_1400457d0(&local_res10,&local_c8,0xfffffffe);
        if (puVar10 == (undefined *)0x0) {
          puVar10 = PTR_DAT_1403200a0;
        }
        local_res10 = puVar10;
        if ((undefined *)*plVar7 != puVar10) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          if (((puVar10 != (undefined *)0x0) && (puVar10 != PTR_DAT_1403200a0)) &&
             (puVar10 + -8 != (undefined *)0x0)) {
            ppuVar8 = (undefined **)FUN_1401568c0();
            local_138 = ppuVar8;
            FUN_140156b50(ppuVar8);
            local_130 = 1;
            piVar1 = (int *)(puVar10 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(puVar10 + -8);
            }
            FUN_140156be0(ppuVar8);
          }
          puVar10 = (undefined *)*plVar7;
          if (((puVar10 != PTR_DAT_1403200a0) && (puVar10 != (undefined *)0x0)) &&
             (puVar10 != (undefined *)0x8)) {
            *(int *)(puVar10 + -4) = *(int *)(puVar10 + -4) + 1;
          }
          local_res10 = puVar10;
          FUN_140156be0(uVar9);
        }
        if (((local_c8 != (undefined *)0x0) && (local_c8 != PTR_DAT_1403200a0)) &&
           (local_c8 + -8 != (undefined *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          piVar1 = (int *)(local_c8 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(local_c8 + -8);
          }
          FUN_140156be0(uVar9);
        }
        local_138 = &local_120;
        local_c8 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_120 = PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_120 = (undefined *)0x0;
        }
        if (puVar10 != PTR_DAT_1403200a0) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          FUN_14004f990(&local_120);
          if (((puVar10 != PTR_DAT_1403200a0) && (puVar10 != (undefined *)0x0)) &&
             (puVar10 != (undefined *)0x8)) {
            *(int *)(puVar10 + -4) = *(int *)(puVar10 + -4) + 1;
          }
          local_120 = puVar10;
          FUN_140156be0(uVar9);
        }
        puVar12 = PTR_DAT_1403218e8;
        FUN_1401568c0();
        local_f0 = PTR_DAT_1403200a0;
        uVar4 = FUN_140156740(puVar12);
        uVar9 = FUN_14004f760(&local_f0,uVar4);
        FUN_140156770(uVar9,puVar12,uVar4);
        FUN_14004f380(&local_f0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfde9,&local_f0,&local_120);
        puVar12 = puVar10;
        if (puVar10 == (undefined *)0x0) {
          puVar12 = PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfde9,PTR_DAT_1403218e8,puVar12);
        param_3 = local_res18;
        if (((puVar10 != (undefined *)0x0) && (puVar10 != PTR_DAT_1403200a0)) &&
           (puVar10 + -8 != (undefined *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          piVar1 = (int *)(puVar10 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(puVar10 + -8);
          }
          FUN_140156be0(uVar9);
          param_3 = local_res18;
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_160 = CONCAT44(local_160._4_4_,0xfde9);
        local_158 = PTR_DAT_1403218e8;
        local_150 = iVar2;
        local_148 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_160);
        DVar5 = GetTickCount();
      }
      cVar3 = (**(code **)(*param_1 + 0x38))(param_1,iVar2,local_a8);
      if (cVar3 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403218e8);
      }
      if ((char)param_1[3] != '\0') {
        return 1;
      }
      if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
        return 1;
      }
      local_160 = CONCAT44(local_160._4_4_,0xfde9);
      local_158 = PTR_DAT_1403218e8;
    }
    else if (local_res20[0] == 0xfdea) {
      FUN_140157c90(local_a8);
      local_a4 = param_2[10];
      local_a8[0] = (undefined1)param_2[0x10];
      cVar3 = FUN_1401543d0(param_2,&local_168,4);
      uVar4 = local_res10._0_4_;
      if (cVar3 != '\0') {
        uVar4 = local_168._0_4_;
      }
      local_res10 = (undefined *)CONCAT44(local_res10._4_4_,uVar4);
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403218f0);
      DVar5 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfdea,PTR_DAT_1403218f0,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_168 = PTR_DAT_1403200a0;
        FUN_1401578a0(&local_168,&local_res10);
        FUN_14004f840(&local_168,&DAT_140286e98);
        iVar11 = 0;
        if ((local_168 != (undefined *)0x0) && (local_168 != PTR_DAT_1403200a0)) {
          iVar11 = *(int *)(local_168 + -8);
        }
        plVar7 = (longlong *)FUN_1400457d0(&local_168,&local_d0,iVar11 + -2);
        if (local_168 == (undefined *)0x0) {
          local_168 = PTR_DAT_1403200a0;
        }
        if ((undefined *)*plVar7 != local_168) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          puVar10 = local_168;
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          if (((local_168 != (undefined *)0x0) && (local_168 != PTR_DAT_1403200a0)) &&
             (puVar12 = local_168 + -8, puVar12 != (undefined *)0x0)) {
            ppuVar8 = (undefined **)FUN_1401568c0();
            local_138 = ppuVar8;
            FUN_140156b50(ppuVar8);
            local_130 = 1;
            piVar1 = (int *)(puVar10 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(puVar12);
            }
            FUN_140156be0(ppuVar8);
          }
          local_168 = (undefined *)*plVar7;
          if (((local_168 != PTR_DAT_1403200a0) && (local_168 != (undefined *)0x0)) &&
             (local_168 != (undefined *)0x8)) {
            *(int *)(local_168 + -4) = *(int *)(local_168 + -4) + 1;
          }
          FUN_140156be0(uVar9);
        }
        if (((local_d0 != (undefined *)0x0) && (local_d0 != PTR_DAT_1403200a0)) &&
           (local_d0 + -8 != (undefined *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          piVar1 = (int *)(local_d0 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(local_d0 + -8);
          }
          FUN_140156be0(uVar9);
        }
        local_138 = &local_118;
        local_d0 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_118 = PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_118 = (undefined *)0x0;
        }
        if (local_168 != PTR_DAT_1403200a0) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          FUN_14004f990(&local_118);
          local_118 = local_168;
          if (((local_168 != PTR_DAT_1403200a0) && (local_168 != (undefined *)0x0)) &&
             (local_168 != (undefined *)0x8)) {
            *(int *)(local_168 + -4) = *(int *)(local_168 + -4) + 1;
          }
          FUN_140156be0(uVar9);
        }
        puVar10 = PTR_DAT_1403218f0;
        FUN_1401568c0();
        local_e8 = PTR_DAT_1403200a0;
        uVar4 = FUN_140156740(puVar10);
        uVar9 = FUN_14004f760(&local_e8,uVar4);
        FUN_140156770(uVar9,puVar10,uVar4);
        FUN_14004f380(&local_e8);
        (**(code **)(*param_1 + 0x28))(param_1,0xfdea,&local_e8,&local_118);
        puVar10 = local_168;
        if (local_168 == (undefined *)0x0) {
          puVar10 = PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfdea,PTR_DAT_1403218f0,puVar10);
        puVar10 = local_168;
        param_3 = local_res18;
        if (((local_168 != (undefined *)0x0) && (local_168 != PTR_DAT_1403200a0)) &&
           (puVar12 = local_168 + -8, puVar12 != (undefined *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          piVar1 = (int *)(puVar10 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(puVar12);
          }
          FUN_140156be0(uVar9);
          param_3 = local_res18;
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_160 = CONCAT44(local_160._4_4_,0xfdea);
        local_158 = PTR_DAT_1403218f0;
        local_150 = iVar2;
        local_148 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_160);
        DVar5 = GetTickCount();
      }
      cVar3 = (**(code **)(*param_1 + 0x40))(param_1,iVar2,local_a8,&local_res10);
      if (cVar3 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403218f0);
      }
      if ((char)param_1[3] != '\0') {
        return 1;
      }
      if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
        return 1;
      }
      local_160 = CONCAT44(local_160._4_4_,0xfdea);
      local_158 = PTR_DAT_1403218f0;
    }
    else if (local_res20[0] == 0xfdeb) {
      FUN_140157c90(local_a8);
      local_a4 = param_2[10];
      local_a8[0] = (undefined1)param_2[0x10];
      cVar3 = FUN_1401543d0(param_2,&local_110,8);
      if (cVar3 != '\0') {
        local_128 = local_110;
      }
      cVar3 = FUN_1401543d0(param_2,&local_168,4);
      if (cVar3 != '\0') {
        local_res10 = (undefined *)CONCAT44(local_res10._4_4_,local_168._0_4_);
      }
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_1403218f8);
      DVar5 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfdeb,PTR_DAT_1403218f8,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_168 = PTR_DAT_1403200a0;
        FUN_1401579d0(&local_168,&local_128);
        FUN_14004f840(&local_168,&DAT_140286e98);
        FUN_140157960(&local_168,&local_res10);
        FUN_14004f840(&local_168,&DAT_140286e98);
        iVar11 = 0;
        if ((local_168 != (undefined *)0x0) && (local_168 != PTR_DAT_1403200a0)) {
          iVar11 = *(int *)(local_168 + -8);
        }
        plVar7 = (longlong *)FUN_1400457d0(&local_168,&local_c0,iVar11 + -2);
        if (local_168 == (undefined *)0x0) {
          local_168 = PTR_DAT_1403200a0;
        }
        if ((undefined *)*plVar7 != local_168) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          puVar10 = local_168;
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          if (((local_168 != (undefined *)0x0) && (local_168 != PTR_DAT_1403200a0)) &&
             (puVar12 = local_168 + -8, puVar12 != (undefined *)0x0)) {
            ppuVar8 = (undefined **)FUN_1401568c0();
            local_138 = ppuVar8;
            FUN_140156b50(ppuVar8);
            local_130 = 1;
            piVar1 = (int *)(puVar10 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(puVar12);
            }
            FUN_140156be0(ppuVar8);
          }
          local_168 = (undefined *)*plVar7;
          if (((local_168 != PTR_DAT_1403200a0) && (local_168 != (undefined *)0x0)) &&
             (local_168 != (undefined *)0x8)) {
            *(int *)(local_168 + -4) = *(int *)(local_168 + -4) + 1;
          }
          FUN_140156be0(uVar9);
        }
        if (((local_c0 != (undefined *)0x0) && (local_c0 != PTR_DAT_1403200a0)) &&
           (local_c0 + -8 != (undefined *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          piVar1 = (int *)(local_c0 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(local_c0 + -8);
          }
          FUN_140156be0(uVar9);
        }
        local_138 = &local_108;
        local_c0 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_108 = PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_108 = (undefined *)0x0;
        }
        if (local_168 != PTR_DAT_1403200a0) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          FUN_14004f990(&local_108);
          local_108 = local_168;
          if (((local_168 != PTR_DAT_1403200a0) && (local_168 != (undefined *)0x0)) &&
             (local_168 != (undefined *)0x8)) {
            *(int *)(local_168 + -4) = *(int *)(local_168 + -4) + 1;
          }
          FUN_140156be0(uVar9);
        }
        puVar10 = PTR_DAT_1403218f8;
        FUN_1401568c0();
        local_f8 = PTR_DAT_1403200a0;
        uVar4 = FUN_140156740(puVar10);
        uVar9 = FUN_14004f760(&local_f8,uVar4);
        FUN_140156770(uVar9,puVar10,uVar4);
        FUN_14004f380(&local_f8);
        (**(code **)(*param_1 + 0x28))(param_1,0xfdeb,&local_f8,&local_108);
        puVar10 = local_168;
        if (local_168 == (undefined *)0x0) {
          puVar10 = PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfdeb,PTR_DAT_1403218f8,puVar10);
        puVar10 = local_168;
        param_3 = local_res18;
        if (((local_168 != (undefined *)0x0) && (local_168 != PTR_DAT_1403200a0)) &&
           (puVar12 = local_168 + -8, puVar12 != (undefined *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          piVar1 = (int *)(puVar10 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(puVar12);
          }
          FUN_140156be0(uVar9);
          param_3 = local_res18;
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_160 = CONCAT44(local_160._4_4_,0xfdeb);
        local_158 = PTR_DAT_1403218f8;
        local_150 = iVar2;
        local_148 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_160);
        DVar5 = GetTickCount();
      }
      cVar3 = (**(code **)(*param_1 + 0x48))(param_1,iVar2,local_a8,&local_128,&local_res10);
      if (cVar3 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_1403218f8);
      }
      if ((char)param_1[3] != '\0') {
        return 1;
      }
      if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
        return 1;
      }
      local_160 = CONCAT44(local_160._4_4_,0xfdeb);
      local_158 = PTR_DAT_1403218f8;
    }
    else {
      if (local_res20[0] != 0xfdec) goto LAB_1401b7370;
      FUN_140157c90(local_a8);
      local_a4 = param_2[10];
      local_a8[0] = (undefined1)param_2[0x10];
      cVar3 = FUN_1401543d0(param_2,&local_168,8);
      if (cVar3 != '\0') {
        local_128 = local_168;
      }
      cVar3 = FUN_1401543d0(param_2,&local_168,8);
      if (cVar3 != '\0') {
        local_110 = local_168;
      }
      cVar3 = FUN_1401543d0(param_2,&local_168,8);
      if (cVar3 != '\0') {
        local_b8[0] = local_168;
      }
      cVar3 = FUN_1401543d0(param_2,&local_168,4);
      if (cVar3 != '\0') {
        local_res10 = (undefined *)CONCAT44(local_res10._4_4_,local_168._0_4_);
      }
      (**(code **)(*(longlong *)param_1[2] + 0x48))
                ((longlong *)param_1[2],param_2,PTR_DAT_140321900);
      DVar5 = 0;
      if (*(char *)((longlong)param_1 + 0x19) == '\0') {
        if ((char)param_1[3] == '\0') {
          (**(code **)(*(longlong *)param_1[2] + 0x70))
                    ((longlong *)param_1[2],iVar2,0xfdec,PTR_DAT_140321900,&DAT_140288b80);
        }
      }
      else if ((char)param_1[3] == '\0') {
        FUN_1401568c0();
        local_168 = PTR_DAT_1403200a0;
        FUN_1401579d0(&local_168,&local_128);
        FUN_14004f840(&local_168,&DAT_140286e98);
        FUN_1401579d0(&local_168,&local_110);
        FUN_14004f840(&local_168,&DAT_140286e98);
        FUN_1401579d0(&local_168,local_b8);
        FUN_14004f840(&local_168,&DAT_140286e98);
        FUN_140157960(&local_168,&local_res10);
        FUN_14004f840(&local_168,&DAT_140286e98);
        iVar11 = 0;
        if ((local_168 != (undefined *)0x0) && (local_168 != PTR_DAT_1403200a0)) {
          iVar11 = *(int *)(local_168 + -8);
        }
        plVar7 = (longlong *)FUN_1400457d0(&local_168,&local_d8,iVar11 + -2);
        if (local_168 == (undefined *)0x0) {
          local_168 = PTR_DAT_1403200a0;
        }
        if ((undefined *)*plVar7 != local_168) {
          ppuVar8 = (undefined **)FUN_1401568c0();
          local_138 = ppuVar8;
          FUN_140156b50(ppuVar8);
          puVar10 = local_168;
          local_130 = 1;
          if (((local_168 != (undefined *)0x0) && (local_168 != PTR_DAT_1403200a0)) &&
             (puVar12 = local_168 + -8, puVar12 != (undefined *)0x0)) {
            uVar9 = FUN_1401568c0();
            local_160 = uVar9;
            FUN_140156b50(uVar9);
            local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
            piVar1 = (int *)(puVar10 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(puVar12);
            }
            FUN_140156be0(uVar9);
          }
          local_168 = (undefined *)*plVar7;
          if (((local_168 != PTR_DAT_1403200a0) && (local_168 != (undefined *)0x0)) &&
             (local_168 != (undefined *)0x8)) {
            *(int *)(local_168 + -4) = *(int *)(local_168 + -4) + 1;
          }
          FUN_140156be0(ppuVar8);
        }
        if (((local_d8 != (undefined *)0x0) && (local_d8 != PTR_DAT_1403200a0)) &&
           (local_d8 + -8 != (undefined *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          piVar1 = (int *)(local_d8 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(local_d8 + -8);
          }
          FUN_140156be0(uVar9);
        }
        local_138 = &local_100;
        local_d8 = PTR_DAT_1403200a0;
        FUN_1401568c0();
        local_100 = PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_100 = (undefined *)0x0;
        }
        if (local_168 != PTR_DAT_1403200a0) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          FUN_14004f990(&local_100);
          local_100 = local_168;
          if (((local_168 != PTR_DAT_1403200a0) && (local_168 != (undefined *)0x0)) &&
             (local_168 != (undefined *)0x8)) {
            *(int *)(local_168 + -4) = *(int *)(local_168 + -4) + 1;
          }
          FUN_140156be0(uVar9);
        }
        puVar10 = PTR_DAT_140321900;
        FUN_1401568c0();
        local_e0 = PTR_DAT_1403200a0;
        uVar4 = FUN_140156740(puVar10);
        uVar9 = FUN_14004f760(&local_e0,uVar4);
        FUN_140156770(uVar9,puVar10,uVar4);
        FUN_14004f380(&local_e0);
        (**(code **)(*param_1 + 0x28))(param_1,0xfdec,&local_e0,&local_100);
        puVar10 = local_168;
        if (local_168 == (undefined *)0x0) {
          puVar10 = PTR_DAT_1403200a0;
        }
        (**(code **)(*(longlong *)param_1[2] + 0x70))
                  ((longlong *)param_1[2],iVar2,0xfdec,PTR_DAT_140321900,puVar10);
        puVar10 = local_168;
        param_3 = local_res18;
        if (((local_168 != (undefined *)0x0) && (local_168 != PTR_DAT_1403200a0)) &&
           (puVar12 = local_168 + -8, puVar12 != (undefined *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_160 = uVar9;
          FUN_140156b50(uVar9);
          local_158 = (undefined *)CONCAT71(local_158._1_7_,1);
          piVar1 = (int *)(puVar10 + -4);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 == 0) {
            FUN_140156970(puVar12);
          }
          FUN_140156be0(uVar9);
          param_3 = local_res18;
        }
      }
      if (((char)param_1[3] == '\0') && (*(char *)((longlong)param_1 + 0x1a) != '\0')) {
        local_160 = CONCAT44(local_160._4_4_,0xfdec);
        local_158 = PTR_DAT_140321900;
        local_150 = iVar2;
        local_148 = param_3;
        (**(code **)(*param_1 + 0x20))(param_1,&local_160);
        DVar5 = GetTickCount();
      }
      cVar3 = (**(code **)(*param_1 + 0x50))
                        (param_1,iVar2,local_a8,&local_128,&local_110,local_b8,&local_res10);
      if (cVar3 == '\0') {
        (**(code **)(*(longlong *)param_1[2] + 0x40))((longlong *)param_1[2],PTR_DAT_140321900);
      }
      if ((char)param_1[3] != '\0') {
        return 1;
      }
      if (*(char *)((longlong)param_1 + 0x1a) == '\0') {
        return 1;
      }
      local_160 = CONCAT44(local_160._4_4_,0xfdec);
      local_158 = PTR_DAT_140321900;
    }
    local_150 = iVar2;
    local_148 = param_3;
    DVar6 = GetTickCount();
    local_140 = DVar6 - DVar5;
    (**(code **)(*param_1 + 0x18))(param_1,&local_160);
    return 1;
  }
LAB_1401b7370:
  FUN_1401540a0(param_2,(int)((iVar11 >> 0x1f & 7U) + iVar11) >> 3);
  return 0;
}



undefined1
FUN_1401b73a0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa01);
  FUN_14004fae0(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321908,0xfa01);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b7480(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa01);
  FUN_14004fae0(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321908,0xfa01);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b7560(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa02);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321910,0xfa02);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b7650(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa02);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321910,0xfa02);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1401b7750(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa03);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321918,0xfa03);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1401b7810(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa03);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321918,0xfa03);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b78e0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,undefined4 *param_6,undefined1 *param_7)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa04);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_14004fd90(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321920,0xfa04);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b7a00(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,undefined4 *param_7,undefined1 *param_8)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa04);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_14004fe70(local_30,*param_7);
  FUN_14004fd90(local_30,*param_8);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321920,0xfa04);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b7b20(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,longlong param_6,longlong param_7,longlong param_8,longlong param_9
             )

{
  undefined2 uVar1;
  undefined1 uVar2;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa05);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = *(undefined2 *)(param_6 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_6 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_7 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_7 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_8 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_8 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_9 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_9 + 8));
  FUN_140050340(local_30,uVar1);
  uVar2 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321928,0xfa05);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar2;
}



undefined1
FUN_1401b7cb0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,longlong param_7,longlong param_8,
             longlong param_9,longlong param_10)

{
  undefined2 uVar1;
  undefined1 uVar2;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa05);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = *(undefined2 *)(param_7 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_7 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_8 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_8 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_9 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_9 + 8));
  FUN_140050340(local_30,uVar1);
  uVar1 = *(undefined2 *)(param_10 + 0xc);
  FUN_14004fe70(local_30,*(undefined4 *)(param_10 + 8));
  FUN_140050340(local_30,uVar1);
  uVar2 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321928,0xfa05);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar2;
}



undefined1 FUN_1401b7e50(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa07);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321938,0xfa07);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1401b7f10(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa07);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321938,0xfa07);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b7fe0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined1 *param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa08);
  FUN_14004fd90(local_30,*param_4);
  FUN_140155f20(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321940,0xfa08);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b80d0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined1 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa08);
  FUN_14004fd90(local_30,*param_5);
  FUN_140155f20(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321940,0xfa08);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b81c0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa09);
  FUN_14004fe70(local_30,*param_4);
  FUN_140155f20(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321948,0xfa09);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b82b0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined8 param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa09);
  FUN_14004fe70(local_30,*param_5);
  FUN_140155f20(local_30,param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321948,0xfa09);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1401b83a0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa0a);
  FUN_140155f20(local_30,param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321950,0xfa0a);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b8480(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa0a);
  FUN_140155f20(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321950,0xfa0a);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b8560(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa0b);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321958,0xfa0b);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b8640(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa0b);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321958,0xfa0b);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b8720(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa0c);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321960,0xfa0c);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b8800(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa0c);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321960,0xfa0c);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1401b88e0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa0d);
  FUN_140155f20(local_30,param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321968,0xfa0d);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b89c0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa0d);
  FUN_140155f20(local_30,param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321968,0xfa0d);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b8aa0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa0e);
  FUN_14004fbc0(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321970,0xfa0e);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b8b80(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa0e);
  FUN_14004fbc0(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321970,0xfa0e);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b8c60(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa0f);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321978,0xfa0f);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b8d50(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa0f);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321978,0xfa0f);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1401b8e50(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa10);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321980,0xfa10);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1401b8f10(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa10);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321980,0xfa10);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b8fe0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined1 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa11);
  FUN_14004fd90(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321988,0xfa11);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b90c0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined1 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa11);
  FUN_14004fd90(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321988,0xfa11);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b91a0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa12);
  FUN_14004fe70(local_30,*param_4);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321990,0xfa12);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b92a0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5,undefined4 *param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa12);
  FUN_14004fe70(local_30,*param_5);
  FUN_14004fe70(local_30,*param_6);
  FUN_14004fe70(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321990,0xfa12);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b93b0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa13);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_140321998,0xfa13);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b9490(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfa13);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_140321998,0xfa13);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1401b9570(longlong *param_1,undefined4 param_2,undefined8 param_3)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfde9);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_1403219a0,0xfde9);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1 FUN_1401b9630(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfde9);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_1403219a0,0xfde9);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b9700(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfdea);
  FUN_14004fe70(local_30,*param_4);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_1403219a8,0xfdea);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b97e0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfdea);
  FUN_14004fe70(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_1403219a8,0xfdea);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b98c0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 *param_4,
             undefined4 *param_5)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfdeb);
  FUN_14004fbc0(local_30,*param_4);
  FUN_14004fae0(local_30,*param_5);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_1403219b0,0xfdeb);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b99b0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 *param_5,undefined4 *param_6)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfdeb);
  FUN_14004fbc0(local_30,*param_5);
  FUN_14004fae0(local_30,*param_6);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_1403219b0,0xfdeb);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b9ab0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 *param_4,
             undefined8 *param_5,undefined8 *param_6,undefined4 *param_7)

{
  undefined1 uVar1;
  undefined4 local_res10 [2];
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfdec);
  FUN_14004fbc0(local_30,*param_4);
  FUN_14004fbc0(local_30,*param_5);
  FUN_14004fbc0(local_30,*param_6);
  FUN_14004fae0(local_30,*param_7);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_30,PTR_DAT_1403219b8,0xfdec);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined1
FUN_1401b9bd0(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             undefined8 *param_5,undefined8 *param_6,undefined8 *param_7,undefined4 *param_8)

{
  undefined1 uVar1;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  longlong local_20;
  int local_14;
  
  FUN_1401544a0(local_30);
  FUN_140153d90(local_30);
  FUN_140050340(local_30,0xfdec);
  FUN_14004fbc0(local_30,*param_5);
  FUN_14004fbc0(local_30,*param_6);
  FUN_14004fbc0(local_30,*param_7);
  FUN_14004fae0(local_30,*param_8);
  uVar1 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_30,PTR_DAT_1403219b8,0xfdec);
  FUN_1401560e0(local_28);
  if ((local_20 != 0) && (local_14 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar1;
}



undefined8 * FUN_1401b9d00(longlong param_1,undefined8 *param_2,longlong param_3)

{
  longlong *plVar1;
  undefined8 *puVar2;
  longlong lVar3;
  longlong lVar4;
  longlong *local_res8;
  
  if (*(longlong *)(param_1 + 0x1670) == 0) {
    lVar4 = 0;
  }
  else {
    lVar4 = *(longlong *)(param_1 + 0x1660);
  }
  do {
    if (lVar4 == 0) {
      *param_2 = 0;
      return param_2;
    }
    if (lVar4 == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    local_res8 = (longlong *)0x0;
    if (*(longlong *)(lVar4 + 8) != 0) {
      *(longlong *)(*(longlong *)(lVar4 + 8) + 8) = *(longlong *)(*(longlong *)(lVar4 + 8) + 8) + 1;
      local_res8 = *(longlong **)(lVar4 + 8);
    }
    if (local_res8 == (longlong *)0x0) {
      lVar3 = 0;
    }
    else {
      lVar3 = *local_res8;
    }
    if (*(char *)(lVar3 + 0x684) == '\0') {
      if (local_res8 == (longlong *)0x0) {
        lVar3 = 0;
      }
      else {
        lVar3 = *local_res8;
      }
      if ((*(int *)(lVar3 + 0x5a8) == *(int *)(param_3 + 8)) &&
         (*(short *)(lVar3 + 0x5ac) == *(short *)(param_3 + 0xc))) {
        *param_2 = 0;
        if (local_res8 == (longlong *)0x0) {
          return param_2;
        }
        local_res8[1] = local_res8[1] + 1;
        *param_2 = local_res8;
        plVar1 = local_res8 + 1;
        *plVar1 = *plVar1 + -1;
        if (*plVar1 != 0) {
          return param_2;
        }
        puVar2 = (undefined8 *)*local_res8;
        if (puVar2 != (undefined8 *)0x0) {
          (**(code **)*puVar2)(puVar2,1);
        }
        FUN_140156970(local_res8);
        return param_2;
      }
    }
    if (local_res8 != (longlong *)0x0) {
      plVar1 = local_res8 + 1;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        if ((undefined8 *)*local_res8 != (undefined8 *)0x0) {
          (*(code *)**(undefined8 **)*local_res8)();
        }
        FUN_140156970(local_res8);
      }
    }
    if (lVar4 != 0) {
      lVar4 = *(longlong *)(lVar4 + 0x10);
    }
  } while( true );
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401b9e70(longlong param_1)

{
  double dVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  longlong lVar5;
  undefined1 auStack_d78 [32];
  undefined8 local_d58;
  undefined4 uStack_d50;
  undefined4 uStack_d4c;
  undefined1 local_d48 [8];
  longlong local_d40;
  longlong local_d38;
  undefined4 local_d30;
  int local_d2c;
  undefined4 local_d20 [2];
  undefined8 local_d18;
  undefined1 local_d10;
  undefined4 local_d0c;
  undefined1 local_d08;
  undefined1 local_d07;
  undefined8 local_d00;
  undefined1 local_cf8 [80];
  undefined4 local_ca8;
  undefined4 uStack_ca4;
  undefined4 uStack_ca0;
  undefined4 uStack_c9c;
  undefined4 *local_28;
  undefined4 local_20;
  int local_1c;
  ulonglong local_18;
  
  local_d00 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_d78;
  if (*(int *)(param_1 + 0x1578) == 0) {
    FUN_1401affb0();
  }
  else {
    dVar1 = (double)(**(code **)(*(longlong *)(param_1 + 0x70) + 0x1c0))(param_1 + 0x70);
    lVar5 = 0;
    if (DAT_140320d28 / *(double *)(param_1 + 0x1798) < dVar1 - *(double *)(param_1 + 0x5c8)) {
      *(int *)(param_1 + 0x4ec) = *(int *)(param_1 + 0x4ec) + 1;
      uVar2 = (**(code **)(*(longlong *)(param_1 + 0x70) + 0x1c0))(param_1 + 0x70);
      *(undefined8 *)(param_1 + 0x5c8) = uVar2;
      FUN_1401544a0(local_d48);
      FUN_140153d90(local_d48);
      FUN_140154600(local_d48,0x800);
      FUN_140154600(local_d48,0);
      FUN_14004fd90(local_d48,0x1a);
      uVar2 = (**(code **)(*(longlong *)(param_1 + 0x70) + 0x1c0))(param_1 + 0x70);
      FUN_14004fbc0(local_d48,uVar2);
      FUN_14004fbc0(local_d48,*(undefined8 *)(param_1 + 0x4f8));
      local_1c = 200;
      local_20 = 0;
      local_28 = &local_ca8;
      if (local_d40 == 0) {
        if (local_d38 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
      }
      else {
        local_d30 = *(undefined4 *)(local_d40 + 0x18);
      }
      lVar3 = local_d38;
      if (local_d38 == 0) {
        if (local_d40 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        lVar3 = lVar5;
        if (*(int *)(local_d40 + 0x18) != 0) {
          lVar3 = *(longlong *)(local_d40 + 0x10);
        }
      }
      local_20 = 1;
      local_d58._0_4_ = (undefined4)lVar3;
      local_d58._4_4_ = (undefined4)((ulonglong)lVar3 >> 0x20);
      local_ca8 = (undefined4)local_d58;
      uStack_ca4 = local_d58._4_4_;
      uStack_c9c = uStack_d4c;
      local_d20[0] = 0;
      local_d18 = 0;
      local_d10 = 1;
      local_d0c = 0xffffffff;
      local_d08 = 1;
      local_d07 = DAT_140320dfc;
      lVar4 = lVar5;
      if (*(longlong **)(param_1 + 0x1570) != (longlong *)0x0) {
        lVar4 = **(longlong **)(param_1 + 0x1570);
      }
      local_d58 = (longlong *)lVar3;
      uStack_d50 = local_d30;
      uStack_ca0 = local_d30;
      FUN_1401dca00(lVar4,1,&local_ca8,local_d20);
      if (local_28 == (undefined4 *)0x0) {
        FUN_140156300(local_cf8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_cf8,(ThrowInfo *)&DAT_14031d928);
      }
      if (local_1c < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_d58 = &local_d40;
      FUN_1401560e0(&local_d40);
      if ((local_d38 != 0) && (local_d2c < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
    }
    FUN_1401ae840(param_1 + 0xb8,DAT_140320d28 * 10.0 * 2.0 * 0.3);
    if (*(longlong *)(param_1 + 0x5d8) != 0) {
      lVar5 = *(longlong *)(*(longlong *)(param_1 + 0x5d8) + 0x38);
    }
    FUN_1401ae800(param_1 + 0xb8,*(undefined8 *)(lVar5 + 0x100));
    if (*(char *)(param_1 + 200) != '\0') {
      local_d58 = (longlong *)CONCAT44(local_d58._4_4_,(float)*(double *)(param_1 + 0x1870));
      (**(code **)(*(longlong *)(param_1 + 0x1818) + 0x30))
                ((longlong *)(param_1 + 0x1818),1,&DAT_140328530,&local_d58);
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401ba160(longlong param_1)

{
  longlong lVar1;
  longlong lVar2;
  double dVar3;
  undefined1 auStack_d78 [32];
  undefined1 local_d58 [8];
  longlong local_d50;
  longlong local_d48;
  undefined4 local_d40;
  int local_d3c;
  undefined8 local_d30;
  undefined4 uStack_d28;
  undefined4 uStack_d24;
  undefined4 local_d20 [2];
  undefined8 local_d18;
  undefined1 local_d10;
  undefined4 local_d0c;
  undefined1 local_d08;
  undefined1 local_d07;
  undefined8 local_d00;
  undefined1 local_cf8 [80];
  undefined4 local_ca8;
  undefined4 uStack_ca4;
  undefined4 uStack_ca0;
  undefined4 uStack_c9c;
  undefined4 *local_28;
  undefined4 local_20;
  int local_1c;
  ulonglong local_18;
  
  local_d00 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_d78;
  if ((*(int *)(param_1 + 0x1578) != 0) && (*(double *)(param_1 + 0x1890) != DAT_140320ca8)) {
    lVar2 = 0;
    lVar1 = lVar2;
    if (*(longlong *)(param_1 + 0x5d8) != 0) {
      lVar1 = *(longlong *)(*(longlong *)(param_1 + 0x5d8) + 0x38);
    }
    dVar3 = *(double *)(param_1 + 0x1890) - *(double *)(lVar1 + 0x100);
    *(double *)(param_1 + 0x1890) = dVar3;
    if (dVar3 <= 0.0) {
      *(undefined8 *)(param_1 + 0x1890) = 0x3fe2e147ae147ae1;
      *(double *)(param_1 + 0x1890) = 0.59 / *(double *)(param_1 + 0x1798);
      FUN_1401544a0(local_d58);
      FUN_140153d90(local_d58);
      FUN_140154600(local_d58,0x800);
      FUN_140154600(local_d58,0);
      FUN_14004fd90(local_d58,0x1b);
      local_1c = 200;
      local_20 = 0;
      local_28 = &local_ca8;
      if (local_d50 == 0) {
        if (local_d48 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
      }
      else {
        local_d40 = *(undefined4 *)(local_d50 + 0x18);
      }
      lVar1 = local_d48;
      if (local_d48 == 0) {
        if (local_d50 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        lVar1 = lVar2;
        if (*(int *)(local_d50 + 0x18) != 0) {
          lVar1 = *(longlong *)(local_d50 + 0x10);
        }
      }
      local_20 = 1;
      local_d30._0_4_ = (undefined4)lVar1;
      local_d30._4_4_ = (undefined4)((ulonglong)lVar1 >> 0x20);
      local_ca8 = (undefined4)local_d30;
      uStack_ca4 = local_d30._4_4_;
      uStack_c9c = uStack_d24;
      local_d20[0] = 0;
      local_d18 = 0;
      local_d10 = 1;
      local_d0c = 0xffffffff;
      local_d08 = 1;
      local_d07 = DAT_140320dfc;
      if (*(longlong **)(param_1 + 0x1570) != (longlong *)0x0) {
        lVar2 = **(longlong **)(param_1 + 0x1570);
      }
      local_d30 = (longlong *)lVar1;
      uStack_d28 = local_d40;
      uStack_ca0 = local_d40;
      FUN_1401dca00(lVar2,1,&local_ca8,local_d20);
      if (local_28 == (undefined4 *)0x0) {
        FUN_140156300(local_cf8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_cf8,(ThrowInfo *)&DAT_14031d928);
      }
      if (local_1c < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_d30 = &local_d50;
      FUN_1401560e0(&local_d50);
      if ((local_d48 != 0) && (local_d3c < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x0001401ba741)
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401ba3c0(longlong param_1)

{
  double dVar1;
  undefined4 uVar2;
  longlong lVar3;
  undefined8 uVar4;
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  double dVar8;
  undefined1 auStack_d98 [32];
  undefined1 local_d78 [8];
  longlong local_d70;
  longlong local_d68;
  undefined4 local_d60;
  int local_d5c;
  undefined4 local_d50 [2];
  undefined8 local_d48;
  undefined1 local_d40;
  undefined4 local_d3c;
  undefined1 local_d38;
  undefined1 local_d37;
  undefined8 local_d30;
  undefined4 uStack_d28;
  undefined4 uStack_d24;
  longlong *local_d20;
  undefined8 local_d18;
  undefined1 local_d10 [72];
  undefined4 local_cc8;
  undefined4 uStack_cc4;
  undefined4 uStack_cc0;
  undefined4 uStack_cbc;
  undefined4 *local_48;
  undefined4 local_40;
  int local_3c;
  ulonglong local_38;
  
  local_d18 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_d98;
  (**(code **)(*(longlong *)(param_1 + 0x78) + 0x10))();
  lVar7 = 0;
  lVar3 = lVar7;
  if (*(longlong *)(param_1 + 0x1670) != 0) {
    lVar3 = *(longlong *)(param_1 + 0x1660);
  }
  do {
    lVar6 = lVar3;
    if (lVar6 == 0) {
      return;
    }
    if ((((*(longlong **)(lVar6 + 8) != (longlong *)0x0) &&
         (lVar3 = **(longlong **)(lVar6 + 8), lVar3 != 0)) && (*(char *)(lVar3 + 0x684) == '\0')) &&
       (*(int *)(lVar3 + 0x56c) != 1)) {
      lVar5 = lVar7;
      if (*(longlong *)(param_1 + 0x5d8) != 0) {
        lVar5 = *(longlong *)(*(longlong *)(param_1 + 0x5d8) + 0x38);
      }
      dVar8 = *(double *)(lVar3 + 0x148) - *(double *)(lVar5 + 0x100);
      *(double *)(lVar3 + 0x148) = dVar8;
      if (dVar8 <= 0.0) {
        *(undefined8 *)(lVar3 + 0x148) = DAT_140320d20;
        uVar4 = (**(code **)(*(longlong *)(param_1 + 0x70) + 0x1c0))(param_1 + 0x70);
        *(undefined8 *)(lVar3 + 0x80) = uVar4;
        if (*(char *)(lVar3 + 0x608) == '\0') {
          FUN_1401544a0(local_d78);
          FUN_140153d90(local_d78);
          FUN_140154600(local_d78,0x800);
          FUN_140154600(local_d78,0);
          FUN_14004fd90(local_d78,0x20);
          uVar4 = FUN_14018aee0(param_1 + 0x1620);
          FUN_14004fbc0(local_d78,uVar4);
          local_3c = 200;
          local_40 = 0;
          local_48 = &local_cc8;
          if (local_d70 == 0) {
            uVar2 = local_d60;
            if (local_d68 == 0) {
                    // WARNING: Subroutine does not return
              FUN_1401561e0();
            }
          }
          else {
            uVar2 = *(undefined4 *)(local_d70 + 0x18);
          }
          lVar5 = local_d68;
          if (local_d68 == 0) {
            if (local_d70 == 0) {
                    // WARNING: Subroutine does not return
              FUN_1401561e0();
            }
            lVar5 = lVar7;
            if (*(int *)(local_d70 + 0x18) != 0) {
              lVar5 = *(longlong *)(local_d70 + 0x10);
            }
          }
          local_40 = 1;
          local_d30._0_4_ = (undefined4)lVar5;
          local_d30._4_4_ = (undefined4)((ulonglong)lVar5 >> 0x20);
          local_cc8 = (undefined4)local_d30;
          uStack_cc4 = local_d30._4_4_;
          uStack_cbc = uStack_d24;
          local_d50[0] = 0;
          local_d48 = 0;
          local_d40 = 1;
          local_d3c = 0xffffffff;
          local_d38 = 1;
          local_d37 = DAT_140320dfc;
          local_d30 = lVar5;
          uStack_d28 = uVar2;
          uStack_cc0 = uVar2;
          FUN_1401e36d0(lVar3 + 0x668,&local_cc8,local_d50);
          if (local_48 == (undefined4 *)0x0) {
            FUN_140156300(local_d10,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
            _CxxThrowException(local_d10,(ThrowInfo *)&DAT_14031d928);
          }
          if (local_3c < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          local_40 = 0;
          local_d20 = &local_d70;
          FUN_1401560e0(&local_d70);
          if (local_d68 != 0) {
            if (local_d5c < 0) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            local_d60 = 0;
          }
        }
        else {
          dVar8 = (double)(**(code **)(*(longlong *)(param_1 + 0x70) + 0x1c0))(param_1 + 0x70);
          dVar8 = dVar8 - *(double *)(lVar3 + 0xc0);
          if (0.0 < dVar8) {
            *(double *)(lVar3 + 0x140) = dVar8;
          }
          uVar4 = (**(code **)(*(longlong *)(param_1 + 0x70) + 0x1c0))(param_1 + 0x70);
          *(undefined8 *)(lVar3 + 0xc0) = uVar4;
          *(int *)(lVar3 + 0x100) = *(int *)(lVar3 + 0x100) + 1;
          *(undefined8 *)(lVar3 + 0x150) = 0;
          dVar8 = *(double *)(param_1 + 0x4f8) + *(double *)(lVar3 + 0x60);
          *(double *)(lVar3 + 0x158) = dVar8;
          if (*(char *)(lVar3 + 0x618) != '\0') {
            *(undefined8 *)(lVar3 + 0x50) = 0;
            *(undefined1 *)(lVar3 + 0x618) = 0;
          }
          dVar1 = *(double *)(lVar3 + 0x50);
          if (dVar1 <= 0.0) {
            *(undefined8 *)(lVar3 + 0x50) = *(undefined8 *)(lVar3 + 0x158);
          }
          else {
            *(double *)(lVar3 + 0x50) = (dVar8 - dVar1) * _DAT_140320d38 + dVar1;
          }
        }
      }
    }
    lVar3 = lVar7;
    if (lVar6 != 0) {
      lVar3 = *(longlong *)(lVar6 + 0x10);
    }
  } while( true );
}



void FUN_1401ba780(longlong param_1,longlong param_2)

{
  longlong *plVar1;
  char cVar2;
  undefined2 uVar3;
  undefined4 uVar4;
  undefined8 uVar5;
  longlong lVar6;
  longlong lVar7;
  undefined8 uVar8;
  undefined **local_90;
  undefined4 local_88;
  undefined2 local_84;
  undefined8 local_80;
  undefined1 local_78;
  undefined4 local_70 [2];
  undefined8 local_68;
  undefined1 local_60;
  undefined4 local_5c;
  undefined1 local_58;
  undefined1 local_57;
  undefined1 local_50 [8];
  undefined1 local_48 [8];
  longlong local_40;
  int local_34;
  
  uVar5 = (**(code **)(*(longlong *)(param_1 + -0x90) + 0x58))(param_1 + -0x90);
  local_80 = uVar5;
  FUN_140156b50(uVar5);
  local_78 = 1;
  plVar1 = *(longlong **)(param_1 + 0x1490);
  if ((((plVar1 != (longlong *)0x0) && (*plVar1 != 0)) && (plVar1 != (longlong *)0x0)) &&
     ((*plVar1 != 0 && (*plVar1 != 0x40)))) {
    lVar7 = 0;
    lVar6 = lVar7;
    if (((plVar1 != (longlong *)0x0) && ((*plVar1 != 0 && (plVar1 != (longlong *)0x0)))) &&
       (*plVar1 != 0)) {
      lVar6 = *plVar1 + -0x40;
    }
    cVar2 = (**(code **)(*(longlong *)(lVar6 + 0x40) + 0x10))();
    if (cVar2 == '\0') {
      FUN_1401544a0(local_50);
      FUN_140153d90(local_50);
      FUN_140154600(local_50,0x800);
      FUN_140154600(local_50,0);
      FUN_14004fd90(local_50,0x27);
      local_70[0] = 1;
      local_68 = 0;
      local_60 = 1;
      local_5c = 0xffffffff;
      local_58 = 1;
      local_57 = DAT_140320dfc;
      local_90 = Proud::AddrPort::vftable;
      local_88 = *(undefined4 *)(param_2 + 8);
      local_84 = *(undefined2 *)(param_2 + 0xc);
      plVar1 = *(longlong **)(param_1 + 0x1490);
      if ((((plVar1 != (longlong *)0x0) && (*plVar1 != 0)) && (plVar1 != (longlong *)0x0)) &&
         (lVar7 = 0, *plVar1 != 0)) {
        lVar7 = *plVar1 + -0x40;
      }
      uVar8 = (**(code **)(*(longlong *)(param_1 + -0x20) + 0x1c0))();
      uVar4 = (**(code **)(*(longlong *)(param_1 + -0x90) + 0x30))(param_1 + -0x90);
      uVar3 = FUN_14019e480(uVar4,1);
      FUN_1401e75f0(lVar7,1,uVar3,&local_90,local_50,uVar8,local_70);
      FUN_1401560e0(local_48);
      if ((local_40 != 0) && (local_34 < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
    }
  }
  FUN_140156be0(uVar5);
  return;
}



void FUN_1401ba990(longlong param_1,undefined8 *param_2,int param_3,undefined4 *param_4)

{
  undefined8 *_Dst;
  longlong lVar1;
  longlong *plVar2;
  ulonglong uVar3;
  size_t _Size;
  ulonglong uVar4;
  undefined4 local_60;
  undefined4 local_5c;
  undefined *local_58;
  undefined4 local_50;
  undefined4 local_4c;
  undefined **local_48;
  longlong *local_40;
  undefined8 *local_38;
  undefined8 local_30;
  undefined8 local_28;
  
  if (*(longlong *)(param_1 + 0x58) != 0) {
    local_48 = Proud::CFastArray<>::vftable;
    local_40 = (longlong *)0x0;
    local_38 = (undefined8 *)0x0;
    local_30 = 0;
    local_28 = 0;
    FUN_14013c2c0(&local_48,param_3);
    _Dst = local_38;
    if ((int)local_30 == 0) {
      _Dst = (undefined8 *)0x0;
    }
    _Size = (longlong)param_3 << 2;
    if (_Size < 0x21) {
      uVar3 = (ulonglong)((uint)_Size & 7);
      for (uVar4 = _Size >> 3; uVar4 != 0; uVar4 = uVar4 - 1) {
        *_Dst = *param_2;
        _Dst = _Dst + 1;
        param_2 = param_2 + 1;
      }
      if (uVar3 != 0) {
        lVar1 = (longlong)_Dst - (longlong)param_2;
        do {
          *(undefined1 *)(lVar1 + (longlong)param_2) = *(undefined1 *)param_2;
          param_2 = (undefined8 *)((longlong)param_2 + 1);
          uVar3 = uVar3 - 1;
        } while (uVar3 != 0);
      }
    }
    else {
      memcpy(_Dst,param_2,_Size);
    }
    FUN_1401568c0();
    local_58 = PTR_DAT_1403200a0;
    local_60 = *param_4;
    local_5c = param_4[1];
    FUN_14004ce80(&local_58,*(undefined8 *)(param_4 + 2));
    local_50 = param_4[4];
    local_4c = param_4[5];
    plVar2 = (longlong *)(*(longlong *)(param_1 + 0x58) + 0x68);
    (**(code **)(*plVar2 + 0x40))(plVar2,1,&DAT_140328530,&local_48,&local_60);
    FUN_14004f990(&local_58);
    local_48 = Proud::CFastArray<>::vftable;
    if (local_38 != (undefined8 *)0x0) {
      if (local_40 == (longlong *)0x0) {
        FUN_140156970(local_38);
      }
      else {
        (**(code **)(*local_40 + 0x18))();
      }
    }
  }
  return;
}



void FUN_1401bab10(longlong param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)

{
  uint uVar1;
  uint uVar2;
  uint *puVar3;
  undefined8 uVar4;
  longlong *plVar5;
  uint *puVar6;
  uint uVar7;
  uint uVar8;
  uint uVar9;
  undefined4 local_res8 [2];
  undefined4 local_res10 [2];
  uint *local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined1 local_30;
  
  local_40 = 0xfffffffffffffffe;
  if (*(longlong *)(param_1 + 0x58) == 0) {
    return;
  }
  local_res8[0] = param_3;
  local_res10[0] = param_2;
  FUN_1401568c0();
  local_48 = (uint *)PTR_DAT_1403200a0;
  uVar1 = FUN_140156740(param_4);
  uVar9 = 0;
  uVar7 = 0;
  if ((local_48 != (uint *)0x0) && (uVar7 = 0, local_48 != (uint *)PTR_DAT_1403200a0)) {
    uVar7 = local_48[-2];
  }
  uVar2 = uVar1;
  if ((((int)uVar1 <= (int)uVar7) && (uVar2 = uVar9, local_48 != (uint *)0x0)) &&
     (local_48 != (uint *)PTR_DAT_1403200a0)) {
    uVar2 = local_48[-2];
  }
  uVar7 = 1;
  if (1 < (int)uVar2) {
    uVar7 = uVar2;
  }
  uVar2 = uVar9;
  if ((local_48 != (uint *)0x0) && (local_48 != (uint *)PTR_DAT_1403200a0)) {
    uVar2 = local_48[-2];
  }
  uVar8 = 0;
  if ((int)uVar2 < (int)uVar7) {
    if (local_48 == (uint *)0x0) {
      local_48 = (uint *)PTR_DAT_1403200a0;
    }
    if ((int)uVar7 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar7 == 0) {
      FUN_14004f990(&local_48);
    }
    else {
      uVar2 = uVar9;
      if ((local_48 != (uint *)0x0) && (local_48 != (uint *)PTR_DAT_1403200a0)) {
        uVar2 = local_48[-2];
      }
      if (uVar7 != uVar2) {
        puVar3 = (uint *)FUN_140156940((longlong)(int)uVar7 * 2 + 10);
        if (puVar3 != (uint *)0x0) {
          *puVar3 = 0;
          puVar3[1] = 1;
        }
        *puVar3 = uVar7;
        uVar2 = uVar8;
        if ((local_48 != (uint *)0x0) && (local_48 != (uint *)PTR_DAT_1403200a0)) {
          uVar2 = local_48[-2];
        }
        puVar6 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar7 < (int)uVar2) {
LAB_1401bac40:
          if (local_48 != (uint *)0x0) {
            puVar6 = local_48;
          }
        }
        else {
          uVar7 = uVar9;
          if (local_48 != (uint *)0x0) {
            if (local_48 != (uint *)PTR_DAT_1403200a0) {
              uVar7 = local_48[-2];
            }
            goto LAB_1401bac40;
          }
        }
        FUN_140156770(puVar3 + 2,puVar6,uVar7);
        FUN_14004f990(&local_48);
        local_48 = puVar3 + 2;
      }
    }
  }
  FUN_14004f670(&local_48);
  puVar3 = local_48;
  if (local_48 == (uint *)0x0) {
    puVar3 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar3,param_4,uVar1);
  puVar3 = local_48;
  if (local_48 == (uint *)0x0) {
    puVar3 = (uint *)PTR_DAT_1403200a0;
  }
  uVar1 = FUN_140156740(puVar3);
  uVar7 = 0;
  if (0 < (int)uVar1) {
    uVar7 = uVar1;
  }
  uVar1 = uVar8;
  if ((local_48 != (uint *)0x0) && (local_48 != (uint *)PTR_DAT_1403200a0)) {
    uVar1 = local_48[-2];
  }
  if (((int)uVar1 <= (int)uVar7) && (uVar7 = uVar8, local_48 != (uint *)0x0)) {
    if (local_48 == (uint *)PTR_DAT_1403200a0) goto LAB_1401bacf7;
    uVar7 = local_48[-2];
  }
  if (((local_48 != (uint *)PTR_DAT_1403200a0) && (local_48 != (uint *)0x0)) &&
     (local_48 + -2 != (uint *)0x0)) {
    local_48[-2] = uVar7;
    *(undefined2 *)((longlong)local_48 + (longlong)(int)uVar7 * 2) = 0;
  }
LAB_1401bacf7:
  plVar5 = (longlong *)(*(longlong *)(param_1 + 0x58) + 0x68);
  (**(code **)(*plVar5 + 0x50))(plVar5,1,&DAT_140328530,local_res10,&local_48,local_res8);
  puVar3 = local_48;
  if (((local_48 != (uint *)0x0) && (local_48 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar6 = local_48 + -2, puVar6 != (uint *)0x0)) {
    uVar4 = FUN_1401568c0();
    local_38 = uVar4;
    FUN_140156b50(uVar4);
    local_30 = 1;
    puVar3 = puVar3 + -1;
    *puVar3 = *puVar3 - 1;
    if (*puVar3 == 0) {
      FUN_140156970(puVar6);
    }
    FUN_140156be0(uVar4);
  }
  return;
}



undefined8 FUN_1401bada0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  int iVar2;
  undefined8 *puVar3;
  longlong *plVar4;
  char cVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lVar8;
  longlong *local_res10;
  undefined8 local_res18 [2];
  undefined8 uVar9;
  undefined **local_38;
  int local_30;
  undefined2 local_2c;
  
  uVar9 = 0xfffffffffffffffe;
  if (*(char *)(param_1 + 0x1528) == '\0') {
    if ((*(longlong **)(param_1 + 0x1520) == (longlong *)0x0) ||
       (**(longlong **)(param_1 + 0x1520) == 0)) {
      local_res10 = operator_new(0x1c0);
      if (local_res10 == (longlong *)0x0) {
        lVar6 = 0;
      }
      else {
        lVar6 = FUN_1401e76f0(local_res10,param_1,0,param_4,uVar9);
      }
      lVar8 = 0;
      if ((lVar6 == 0) || (lVar6 + 0x40 == 0)) {
        local_res10 = (longlong *)0x0;
      }
      else {
        local_res10 = (longlong *)FUN_140156940(0x10);
        local_res10[1] = 1;
        *local_res10 = lVar6 + 0x40;
      }
      plVar1 = local_res10;
      FUN_1401d43e0(param_1 + 0x1520,&local_res10);
      plVar4 = local_res10;
      if (plVar1 != (longlong *)0x0) {
        plVar1 = plVar1 + 1;
        *plVar1 = *plVar1 + -1;
        if (*plVar1 == 0) {
          puVar3 = (undefined8 *)*local_res10;
          if (puVar3 != (undefined8 *)0x0) {
            (**(code **)*puVar3)(puVar3,1);
          }
          FUN_140156970(plVar4);
        }
      }
      lVar6 = lVar8;
      if ((*(longlong **)(param_1 + 0x15d8) != (longlong *)0x0) &&
         (lVar7 = **(longlong **)(param_1 + 0x15d8), lVar7 != 0)) {
        lVar6 = lVar7 + -0x40;
      }
      iVar2 = *(int *)(lVar6 + 0x118);
      if ((iVar2 == 0) || (iVar2 == -1)) {
        FUN_1401580e0(&DAT_140273240);
      }
      local_38 = Proud::AddrPort::vftable;
      local_2c = 0;
      if ((*(longlong **)(param_1 + 0x1520) == (longlong *)0x0) ||
         (lVar6 = **(longlong **)(param_1 + 0x1520), lVar7 = lVar6 + -0x40, lVar6 == 0)) {
        lVar7 = lVar8;
      }
      local_30 = iVar2;
      cVar5 = FUN_1401e7ad0(lVar7,&local_38);
      if (cVar5 == '\0') {
        local_res18[0] = 0;
        FUN_1401d43e0(param_1 + 0x1520,local_res18);
        *(undefined1 *)(param_1 + 0x1528) = 1;
        return 0;
      }
      if ((*(longlong **)(param_1 + 0x1520) != (longlong *)0x0) &&
         (lVar6 = **(longlong **)(param_1 + 0x1520), lVar6 != 0)) {
        lVar8 = lVar6 + -0x40;
      }
      FUN_1401e70d0(lVar8);
    }
    uVar9 = 1;
  }
  else {
    uVar9 = 0;
  }
  return uVar9;
}



undefined8 * FUN_1401baf50(undefined8 *param_1)

{
  undefined4 uVar1;
  int iVar2;
  longlong lVar3;
  longlong lVar4;
  bool bVar5;
  longlong local_res10;
  
  LOCK();
  bVar5 = DAT_14032b280 == 0;
  if (bVar5) {
    DAT_14032b280 = 1;
  }
  UNLOCK();
  if (bVar5) {
    lVar3 = FUN_140156940(0x2c0);
    if (lVar3 == 0) {
      lVar3 = 0;
    }
    else {
      lVar3 = FUN_1401dc630(lVar3);
    }
    if (lVar3 == 0) {
      local_res10 = 0;
    }
    else {
      lVar4 = FUN_140156940(0x48);
      if (lVar4 != 0) {
        local_res10 = lVar4;
        uVar1 = FUN_14015a430();
        FUN_140156a70(lVar4,uVar1,1);
      }
      local_res10 = lVar4;
      FUN_140156b50(lVar4);
      *(undefined8 *)(lVar4 + 0x40) = 1;
      *(longlong *)(lVar4 + 0x38) = lVar3;
      FUN_140156be0(lVar4);
    }
    FUN_1401b1400(&DAT_14032b288,&local_res10);
    FUN_1401b10e0(&local_res10);
    LOCK();
    UNLOCK();
    DAT_14032b280 = 2;
  }
  else {
    LOCK();
    iVar2 = DAT_14032b280;
    if (DAT_14032b280 == 9999) {
      DAT_14032b280 = 999;
      iVar2 = 9999;
    }
    UNLOCK();
    while (iVar2 != 2) {
      Sleep(5);
      LOCK();
      iVar2 = DAT_14032b280;
      if (DAT_14032b280 == 9999) {
        DAT_14032b280 = 999;
        iVar2 = 9999;
      }
      UNLOCK();
    }
  }
  *param_1 = 0;
  FUN_1401b1400(param_1,&DAT_14032b288);
  return param_1;
}



uint * FUN_1401bb0b0(longlong param_1,uint *param_2)

{
  uint *puVar1;
  ulonglong uVar2;
  longlong lVar3;
  
  uVar2 = (ulonglong)*param_2 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (puVar1 = *(uint **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (puVar1 != (uint *)0x0 && ((uint)uVar2 == puVar1[8] % *(uint *)(param_1 + 0x28)));
        puVar1 = *(uint **)(puVar1 + 4)) {
      if (*puVar1 == *param_2) {
        return puVar1 + 2;
      }
    }
  }
  lVar3 = FUN_1401b25c0(param_1,param_2,uVar2);
  return (uint *)(lVar3 + 8);
}



void FUN_1401bb120(longlong *param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 *puVar2;
  
  if (*(longlong *)(param_2 + 0x10) != 0) {
    *(longlong *)(*(longlong *)(param_2 + 0x10) + 8) =
         *(longlong *)(*(longlong *)(param_2 + 0x10) + 8) + -1;
    if (*(longlong *)(*(longlong *)(param_2 + 0x10) + 8) == 0) {
      plVar1 = *(longlong **)(param_2 + 0x10);
      puVar2 = (undefined8 *)*plVar1;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
      }
      FUN_140156970(plVar1);
    }
  }
  plVar1 = (longlong *)*param_1;
  if (plVar1 != (longlong *)0x0) {
    (**(code **)(*plVar1 + 0x10))(plVar1,param_2);
    param_1[3] = param_1[3] + -1;
    return;
  }
  FUN_140156970(param_2);
  param_1[3] = param_1[3] + -1;
  return;
}



void FUN_1401bb1c0(longlong *param_1,longlong param_2)

{
  longlong *plVar1;
  
  FUN_1401560e0(param_2 + 0x18);
  if (*(longlong *)(param_2 + 0x20) != 0) {
    if (*(int *)(param_2 + 0x2c) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_2 + 0x28) = 0;
  }
  plVar1 = (longlong *)*param_1;
  if (plVar1 == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(*plVar1 + 0x10))(plVar1,param_2);
  }
  param_1[3] = param_1[3] + -1;
  return;
}



undefined1 FUN_1401bb230(longlong *param_1,undefined4 param_2,undefined8 param_3,longlong param_4)

{
  int iVar1;
  undefined1 uVar2;
  undefined8 uVar3;
  undefined4 local_res10 [4];
  longlong *local_res20;
  undefined1 local_40 [4];
  undefined4 local_3c;
  longlong local_38;
  longlong local_30;
  int local_24;
  
  local_res10[0] = param_2;
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0xfa06);
  iVar1 = *(int *)(param_4 + 0x18);
  FUN_140155b20(local_40,(longlong)iVar1);
  if (*(int *)(param_4 + 0x18) == 0) {
    uVar3 = 0;
  }
  else {
    uVar3 = *(undefined8 *)(param_4 + 0x10);
  }
  if (iVar1 == 0) goto LAB_1401bb2f1;
  local_3c = 0;
  if (local_38 == 0) {
    if (local_30 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0(0,uVar3);
    }
LAB_1401bb2c3:
    FUN_14004ff50(&local_30,uVar3,iVar1);
  }
  else {
    if (local_30 != 0) goto LAB_1401bb2c3;
    if (local_38 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0(0,uVar3);
    }
    FUN_140050180(local_38,uVar3,iVar1);
  }
  FUN_1400501f0(local_40);
LAB_1401bb2f1:
  uVar2 = (**(code **)(*param_1 + 0x18))
                    (param_1,local_res10,1,param_3,local_40,PTR_DAT_140321930,0xfa06);
  local_res20 = &local_38;
  FUN_1401560e0(&local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar2;
}



undefined1
FUN_1401bb370(longlong *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4,
             longlong param_5)

{
  int iVar1;
  undefined1 uVar2;
  undefined8 uVar3;
  undefined1 local_40 [4];
  undefined4 local_3c;
  longlong local_38;
  longlong local_30;
  int local_24;
  
  FUN_1401544a0(local_40);
  FUN_140153d90(local_40);
  FUN_140050340(local_40,0xfa06);
  iVar1 = *(int *)(param_5 + 0x18);
  FUN_140155b20(local_40,(longlong)iVar1);
  if (*(int *)(param_5 + 0x18) == 0) {
    uVar3 = 0;
  }
  else {
    uVar3 = *(undefined8 *)(param_5 + 0x10);
  }
  if (iVar1 == 0) goto LAB_1401bb440;
  local_3c = 0;
  if (local_38 == 0) {
    if (local_30 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0(0,uVar3);
    }
LAB_1401bb412:
    FUN_14004ff50(&local_30,uVar3,iVar1);
  }
  else {
    if (local_30 != 0) goto LAB_1401bb412;
    if (local_38 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0(0,uVar3);
    }
    FUN_140050180(local_38,uVar3,iVar1);
  }
  FUN_1400501f0(local_40);
LAB_1401bb440:
  uVar2 = (**(code **)(*param_1 + 0x18))
                    (param_1,param_2,param_3,param_4,local_40,PTR_DAT_140321930,0xfa06);
  FUN_1401560e0(&local_38);
  if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return uVar2;
}



undefined8 FUN_1401bb4c0(longlong param_1,undefined8 param_2,undefined8 param_3,longlong *param_4)

{
  undefined8 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong *plVar4;
  undefined *puVar5;
  char local_res8 [8];
  undefined8 uVar6;
  undefined1 local_30 [8];
  undefined1 local_28 [8];
  undefined4 local_20;
  undefined2 local_1c;
  undefined8 local_18;
  undefined1 local_10;
  
  uVar6 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  local_18 = uVar1;
  FUN_140156b50(uVar1);
  local_10 = 1;
  local_res8[0] = FUN_1401bada0(*(undefined8 *)(param_1 + 0x20));
  if (local_res8[0] != '\0') {
    FUN_1401b02d0(*(undefined8 *)(param_1 + 0x20));
    puVar5 = (undefined *)*param_4;
    if ((undefined *)*param_4 == (undefined *)0x0) {
      puVar5 = PTR_DAT_140320098;
    }
    uVar2 = FUN_1401877a0(local_30,puVar5);
    FUN_140158bf0(local_28,uVar2,(short)param_4[1]);
    plVar4 = *(longlong **)(*(longlong *)(param_1 + 0x20) + 0x1570);
    lVar3 = 0;
    if (plVar4 != (longlong *)0x0) {
      lVar3 = *plVar4;
    }
    *(undefined4 *)(lVar3 + 0xd0) = local_20;
    *(undefined2 *)(lVar3 + 0xd4) = local_1c;
  }
  plVar4 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x1818);
  (**(code **)(*plVar4 + 0x130))(plVar4,1,&DAT_140328530,local_res8,uVar6);
  FUN_140156be0(uVar1);
  return 1;
}



undefined8
FUN_1401bb5b0(longlong param_1,undefined8 param_2,undefined8 param_3,char *param_4,longlong *param_5
             )

{
  longlong *plVar1;
  char cVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  longlong lVar5;
  undefined *puVar6;
  longlong lVar7;
  undefined1 local_res8 [8];
  undefined1 local_30 [8];
  undefined4 local_28;
  undefined2 local_24;
  undefined8 local_20;
  undefined1 local_18;
  
  uVar3 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  local_20 = uVar3;
  FUN_140156b50(uVar3);
  local_18 = 1;
  lVar7 = 0;
  if ((*param_4 != '\0') && (cVar2 = FUN_1401bada0(*(undefined8 *)(param_1 + 0x20)), cVar2 != '\0'))
  {
    FUN_1401b02d0(*(undefined8 *)(param_1 + 0x20));
    puVar6 = (undefined *)*param_5;
    if ((undefined *)*param_5 == (undefined *)0x0) {
      puVar6 = PTR_DAT_140320098;
    }
    uVar4 = FUN_1401877a0(local_res8,puVar6);
    FUN_140158bf0(local_30,uVar4,(short)param_5[1]);
    plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x20) + 0x1570);
    lVar5 = lVar7;
    if (plVar1 != (longlong *)0x0) {
      lVar5 = *plVar1;
    }
    *(undefined4 *)(lVar5 + 0xd0) = local_28;
    *(undefined2 *)(lVar5 + 0xd4) = local_24;
  }
  plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x20) + 0x1570);
  if (plVar1 != (longlong *)0x0) {
    lVar7 = *plVar1;
  }
  *(undefined1 *)(lVar7 + 0x40) = 0;
  FUN_140156be0(uVar3);
  return 1;
}



undefined8 * FUN_1401bb6b0(longlong *param_1,undefined8 *param_2,uint param_3)

{
  uint uVar1;
  uint *puVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  
  uVar5 = 0xfffffffffffffffe;
  uVar4 = (**(code **)(*param_1 + 0x58))();
  uVar6 = uVar4;
  FUN_140156b50(uVar4);
  *param_2 = 0;
  uVar1 = *(uint *)(param_1 + 0x2cf);
  uVar3 = (ulonglong)param_3 % (ulonglong)uVar1;
  if (param_1[0x2cb] != 0) {
    puVar2 = *(uint **)(param_1[0x2cb] + uVar3 * 8);
    while( true ) {
      if ((puVar2 == (uint *)0x0) || ((uint)uVar3 != puVar2[8] % uVar1)) goto LAB_1401bb758;
      if (*puVar2 == param_3) break;
      puVar2 = *(uint **)(puVar2 + 4);
    }
    FUN_1401d43e0(param_2,puVar2 + 2,uVar3,(ulonglong)uVar1,uVar5,uVar6,1);
  }
LAB_1401bb758:
  FUN_14015b3b0(param_1 + 0x2ca);
  FUN_140156be0(uVar4);
  return param_2;
}



longlong * FUN_1401bb780(longlong *param_1,int param_2,undefined8 param_3)

{
  undefined8 *puVar1;
  char cVar2;
  undefined8 uVar3;
  longlong *plVar4;
  longlong *plVar5;
  wchar_t *pwVar6;
  longlong *local_res8;
  undefined8 uVar7;
  undefined1 uVar8;
  
  uVar7 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar3);
  uVar8 = 1;
  FUN_1401bb6b0(param_1,&local_res8,param_2);
  plVar4 = (longlong *)0x0;
  if ((local_res8 == (longlong *)0x0) || (*local_res8 == 0)) {
    if ((int)param_1[0x2af] == param_2) {
      plVar5 = param_1 + 0x1b;
      goto LAB_1401bb80f;
    }
    plVar5 = plVar4;
    if (param_2 == 1) {
      plVar5 = param_1 + 0xe1;
      goto LAB_1401bb80f;
    }
  }
  else {
    plVar5 = (longlong *)(*local_res8 + 0x168);
LAB_1401bb80f:
    if (plVar5 != (longlong *)0x0) {
      cVar2 = FUN_140198740(plVar5);
      if ((cVar2 == '\0') || (((char)plVar5[0x7f] == '\0' && ((int)plVar5[0x7d] == 0)))) {
        FUN_14004ce50(param_3,L"key not exists!");
        if ((local_res8 != (longlong *)0x0) &&
           (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
          puVar1 = (undefined8 *)*local_res8;
          if (puVar1 != (undefined8 *)0x0) {
            (**(code **)*puVar1)(puVar1,1);
          }
          FUN_140156970(local_res8);
        }
        FUN_140156be0(uVar3);
        return (longlong *)0x0;
      }
      goto LAB_1401bb8c8;
    }
  }
  if (local_res8 != (longlong *)0x0) {
    plVar4 = (longlong *)*local_res8;
  }
  pwVar6 = L"not NULL";
  if (plVar4 == (longlong *)0x0) {
    pwVar6 = L"NULL";
  }
  FUN_14004ce50(param_3,L"%d remote rp is %s in netclient!",param_2,pwVar6,uVar7,uVar3,uVar8);
LAB_1401bb8c8:
  if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
    puVar1 = (undefined8 *)*local_res8;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(local_res8);
  }
  FUN_140156be0(uVar3);
  return plVar5;
}



undefined8 FUN_1401bb930(longlong param_1,uint param_2,undefined8 param_3)

{
  longlong *plVar1;
  uint *puVar2;
  undefined8 *puVar3;
  ulonglong uVar4;
  undefined8 uVar5;
  longlong lVar6;
  longlong *local_res8;
  
  uVar5 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))();
  FUN_140156b50(uVar5);
  lVar6 = 0;
  local_res8 = (longlong *)0x0;
  uVar4 = (ulonglong)param_2 % (ulonglong)*(uint *)(param_1 + 0x1608);
  if (*(longlong *)(param_1 + 0x15e8) != 0) {
    for (puVar2 = *(uint **)(*(longlong *)(param_1 + 0x15e8) + uVar4 * 8);
        (puVar2 != (uint *)0x0 && ((uint)uVar4 == puVar2[8] % *(uint *)(param_1 + 0x1608)));
        puVar2 = *(uint **)(puVar2 + 4)) {
      if (*puVar2 == param_2) {
        if (*(longlong *)(puVar2 + 2) != 0) {
          *(longlong *)(*(longlong *)(puVar2 + 2) + 8) =
               *(longlong *)(*(longlong *)(puVar2 + 2) + 8) + 1;
          local_res8 = *(longlong **)(puVar2 + 2);
        }
        FUN_14015b3b0(param_1 + 0x15e0);
        if (local_res8 != (longlong *)0x0) {
          lVar6 = *local_res8;
        }
        FUN_1401e5f80(lVar6,param_3);
        if (local_res8 != (longlong *)0x0) {
          plVar1 = local_res8 + 1;
          *plVar1 = *plVar1 + -1;
          if (*plVar1 == 0) {
            puVar3 = (undefined8 *)*local_res8;
            if (puVar3 != (undefined8 *)0x0) {
              (**(code **)*puVar3)(puVar3,1);
            }
            FUN_140156970(local_res8);
          }
        }
        FUN_140156be0(uVar5);
        return 1;
      }
    }
  }
  FUN_14015b3b0(param_1 + 0x15e0);
  FUN_140156be0(uVar5);
  return 0;
}



double FUN_1401bba90(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  longlong lVar3;
  double dVar4;
  double dVar5;
  longlong *local_res8;
  undefined8 uVar6;
  undefined1 uVar7;
  
  uVar6 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))(param_1 + -0x70);
  FUN_140156b50(uVar2);
  uVar7 = 1;
  dVar4 = (double)FUN_14018aee0(param_1 + 0x15b0);
  FUN_1401bb6b0(param_1 + -0x70,&local_res8,param_2,param_4,uVar6,uVar2,uVar7);
  if ((local_res8 == (longlong *)0x0) || (*local_res8 == 0)) {
    dVar4 = dVar4 - *(double *)(param_1 + 0x480);
    if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0))
    {
      puVar1 = (undefined8 *)*local_res8;
      if (puVar1 != (undefined8 *)0x0) {
        (**(code **)*puVar1)(puVar1,1);
      }
      FUN_140156970(local_res8);
    }
  }
  else {
    *(undefined1 *)(*local_res8 + 0x21) = 1;
    if (local_res8 == (longlong *)0x0) {
      lVar3 = 0;
    }
    else {
      lVar3 = *local_res8;
    }
    dVar5 = (double)(**(code **)(*(longlong *)(lVar3 + 8) + 0x10))();
    dVar4 = dVar4 - dVar5;
    if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0))
    {
      puVar1 = (undefined8 *)*local_res8;
      if (puVar1 != (undefined8 *)0x0) {
        (**(code **)*puVar1)(puVar1,1);
      }
      FUN_140156970(local_res8);
    }
  }
  FUN_140156be0(uVar2);
  return dVar4;
}



undefined8 FUN_1401bbbd0(longlong *param_1,int param_2,undefined2 *param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  longlong *local_res8;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar2);
  if ((((longlong *)param_1[699] != (longlong *)0x0) && (*(longlong *)param_1[699] != 0)) &&
     ((int)param_1[0x2af] != 0)) {
    FUN_1401bb6b0(param_1,&local_res8,param_2,param_4,uVar3,uVar2,1);
    if ((local_res8 != (longlong *)0x0) && (*local_res8 != 0)) {
      *param_3 = *(undefined2 *)(*local_res8 + 0x568);
      *(short *)(*local_res8 + 0x568) = *(short *)(*local_res8 + 0x568) + 1;
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        puVar1 = (undefined8 *)*local_res8;
        if (puVar1 != (undefined8 *)0x0) {
          (**(code **)*puVar1)(puVar1,1);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar2);
      return 1;
    }
    if ((int)param_1[0x2af] == param_2) {
      *param_3 = (short)param_1[0x9b];
      *(short *)(param_1 + 0x9b) = (short)param_1[0x9b] + 1;
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        puVar1 = (undefined8 *)*local_res8;
        if (puVar1 != (undefined8 *)0x0) {
          (**(code **)*puVar1)(puVar1,1);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar2);
      return 1;
    }
    if (param_2 == 1) {
      *param_3 = (short)param_1[0xe0];
      *(short *)(param_1 + 0xe0) = (short)param_1[0xe0] + 1;
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        puVar1 = (undefined8 *)*local_res8;
        if (puVar1 != (undefined8 *)0x0) {
          (**(code **)*puVar1)(puVar1,1);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar2);
      return 1;
    }
    if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0))
    {
      puVar1 = (undefined8 *)*local_res8;
      if (puVar1 != (undefined8 *)0x0) {
        (**(code **)*puVar1)(puVar1,1);
      }
      FUN_140156970(local_res8);
    }
  }
  FUN_140156be0(uVar2);
  return 0;
}



void FUN_1401bbdd0(longlong *param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  short *psVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  longlong *local_res8;
  undefined8 uVar4;
  undefined8 uVar5;
  
  uVar4 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*param_1 + 0x58))();
  uVar5 = uVar3;
  FUN_140156b50(uVar3);
  if ((((longlong *)param_1[699] != (longlong *)0x0) && (*(longlong *)param_1[699] != 0)) &&
     ((int)param_1[0x2af] != 0)) {
    FUN_1401bb6b0(param_1,&local_res8,param_2,param_4,uVar4,uVar5,1);
    if ((local_res8 == (longlong *)0x0) || (*local_res8 == 0)) {
      if ((int)param_1[0x2af] == param_2) {
        *(short *)(param_1 + 0x9b) = (short)param_1[0x9b] + -1;
      }
      else if (param_2 == 1) {
        *(short *)(param_1 + 0xe0) = (short)param_1[0xe0] + -1;
      }
    }
    else {
      psVar1 = (short *)(*local_res8 + 0x568);
      *psVar1 = *psVar1 + -1;
    }
    if ((local_res8 != (longlong *)0x0) &&
       (local_res8[1] = local_res8[1] + -1, uVar3 = uVar5, local_res8[1] == 0)) {
      puVar2 = (undefined8 *)*local_res8;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
        uVar3 = uVar5;
      }
      FUN_140156970(local_res8);
    }
  }
  FUN_140156be0(uVar3);
  return;
}



undefined8 FUN_1401bbef0(longlong *param_1,int param_2,undefined2 *param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  longlong *local_res8;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar2);
  FUN_1401bb6b0(param_1,&local_res8,param_2,param_4,uVar3,uVar2,1);
  if ((local_res8 == (longlong *)0x0) || (*local_res8 == 0)) {
    if ((int)param_1[0x2af] == param_2) {
      *param_3 = *(undefined2 *)((longlong)param_1 + 0x4da);
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        puVar1 = (undefined8 *)*local_res8;
        if (puVar1 != (undefined8 *)0x0) {
          (**(code **)*puVar1)(puVar1,1);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar2);
      uVar2 = 1;
    }
    else if (param_2 == 1) {
      *param_3 = *(undefined2 *)((longlong)param_1 + 0x702);
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        puVar1 = (undefined8 *)*local_res8;
        if (puVar1 != (undefined8 *)0x0) {
          (**(code **)*puVar1)(puVar1,1);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar2);
      uVar2 = 1;
    }
    else {
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        puVar1 = (undefined8 *)*local_res8;
        if (puVar1 != (undefined8 *)0x0) {
          (**(code **)*puVar1)(puVar1,1);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar2);
      uVar2 = 0;
    }
  }
  else {
    *param_3 = *(undefined2 *)(*local_res8 + 0x56a);
    local_res8[1] = local_res8[1] + -1;
    if (local_res8[1] == 0) {
      puVar1 = (undefined8 *)*local_res8;
      if (puVar1 != (undefined8 *)0x0) {
        (**(code **)*puVar1)(puVar1,1);
      }
      FUN_140156970(local_res8);
    }
    FUN_140156be0(uVar2);
    uVar2 = 1;
  }
  return uVar2;
}



undefined8 FUN_1401bc0a0(longlong *param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  short *psVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  longlong *local_res8;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar3);
  FUN_1401bb6b0(param_1,&local_res8,param_2,param_4,uVar4,uVar3,1);
  if ((local_res8 == (longlong *)0x0) || (*local_res8 == 0)) {
    if ((int)param_1[0x2af] == param_2) {
      *(short *)((longlong)param_1 + 0x4da) = *(short *)((longlong)param_1 + 0x4da) + 1;
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        puVar2 = (undefined8 *)*local_res8;
        if (puVar2 != (undefined8 *)0x0) {
          (**(code **)*puVar2)(puVar2,1);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar3);
      uVar3 = 1;
    }
    else if (param_2 == 1) {
      *(short *)((longlong)param_1 + 0x702) = *(short *)((longlong)param_1 + 0x702) + 1;
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        puVar2 = (undefined8 *)*local_res8;
        if (puVar2 != (undefined8 *)0x0) {
          (**(code **)*puVar2)(puVar2,1);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar3);
      uVar3 = 1;
    }
    else {
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        puVar2 = (undefined8 *)*local_res8;
        if (puVar2 != (undefined8 *)0x0) {
          (**(code **)*puVar2)(puVar2,1);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar3);
      uVar3 = 0;
    }
  }
  else {
    psVar1 = (short *)(*local_res8 + 0x56a);
    *psVar1 = *psVar1 + 1;
    if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0))
    {
      puVar2 = (undefined8 *)*local_res8;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
      }
      FUN_140156970(local_res8);
    }
    FUN_140156be0(uVar3);
    uVar3 = 1;
  }
  return uVar3;
}



undefined8 *
FUN_1401bc240(longlong param_1,undefined8 *param_2,undefined4 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong *local_res8;
  undefined8 uVar5;
  undefined8 uVar6;
  
  uVar5 = 0xfffffffffffffffe;
  plVar3 = (longlong *)(param_1 + -0x70);
  uVar2 = (**(code **)(*plVar3 + 0x58))(plVar3);
  uVar6 = uVar2;
  FUN_140156b50(uVar2);
  plVar3 = (longlong *)FUN_1401bb6b0(plVar3,&local_res8,param_3,param_4,uVar5,uVar6,1);
  lVar4 = 0;
  if ((longlong *)*plVar3 != (longlong *)0x0) {
    lVar4 = *(longlong *)*plVar3;
  }
  if ((local_res8 != (longlong *)0x0) &&
     (local_res8[1] = local_res8[1] + -1, uVar2 = uVar6, local_res8[1] == 0)) {
    puVar1 = (undefined8 *)*local_res8;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
      uVar2 = uVar6;
    }
    FUN_140156970(local_res8);
  }
  if (((lVar4 == 0) || (*(longlong **)(lVar4 + 0x18) == (longlong *)0x0)) ||
     (**(longlong **)(lVar4 + 0x18) == 0)) {
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = DAT_140320450;
    *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  }
  else {
    lVar4 = FUN_1401e36b0(lVar4);
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = *(undefined4 *)(lVar4 + 0x130);
    *(undefined2 *)((longlong)param_2 + 0xc) = *(undefined2 *)(lVar4 + 0x134);
  }
  FUN_140156be0(uVar2);
  return param_2;
}



undefined8 FUN_1401bc360(longlong param_1,uint param_2,undefined8 param_3)

{
  longlong *plVar1;
  uint uVar2;
  uint *puVar3;
  undefined8 *puVar4;
  ulonglong uVar5;
  undefined8 uVar6;
  longlong lVar7;
  longlong lVar8;
  longlong *local_res8;
  undefined8 uVar9;
  
  uVar9 = 0xfffffffffffffffe;
  uVar6 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))();
  FUN_140156b50(uVar6);
  lVar8 = 0;
  local_res8 = (longlong *)0x0;
  uVar2 = *(uint *)(param_1 + 0x1608);
  uVar5 = (ulonglong)param_2 % (ulonglong)uVar2;
  if (*(longlong *)(param_1 + 0x15e8) != 0) {
    puVar3 = *(uint **)(*(longlong *)(param_1 + 0x15e8) + uVar5 * 8);
    while( true ) {
      if ((puVar3 == (uint *)0x0) || ((uint)uVar5 != puVar3[8] % uVar2)) goto LAB_1401bc491;
      if (*puVar3 == param_2) break;
      puVar3 = *(uint **)(puVar3 + 4);
    }
    lVar7 = lVar8;
    if (*(longlong *)(puVar3 + 2) != 0) {
      *(longlong *)(*(longlong *)(puVar3 + 2) + 8) =
           *(longlong *)(*(longlong *)(puVar3 + 2) + 8) + 1;
      local_res8 = *(longlong **)(puVar3 + 2);
      if (local_res8 != (longlong *)0x0) {
        lVar7 = *local_res8;
      }
    }
    if (*(longlong *)(lVar7 + 0x640) != 0) {
      if (local_res8 != (longlong *)0x0) {
        lVar8 = *local_res8;
      }
      FUN_1401e7d60(*(undefined8 *)(lVar8 + 0x640),param_3,puVar3,(ulonglong)uVar2,uVar9,uVar6,1);
      if (local_res8 != (longlong *)0x0) {
        plVar1 = local_res8 + 1;
        *plVar1 = *plVar1 + -1;
        if (*plVar1 == 0) {
          puVar4 = (undefined8 *)*local_res8;
          if (puVar4 != (undefined8 *)0x0) {
            (**(code **)*puVar4)(puVar4,1);
          }
          FUN_140156970(local_res8);
        }
      }
      FUN_140156be0(uVar6);
      return 1;
    }
  }
LAB_1401bc491:
  if (local_res8 != (longlong *)0x0) {
    plVar1 = local_res8 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      puVar4 = (undefined8 *)*local_res8;
      if (puVar4 != (undefined8 *)0x0) {
        (**(code **)*puVar4)(puVar4,1);
      }
      FUN_140156970(local_res8);
    }
  }
  FUN_140156be0(uVar6);
  return 0;
}



bool FUN_1401bc4f0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong *local_res8;
  undefined8 uVar5;
  undefined8 uVar6;
  
  uVar5 = 0xfffffffffffffffe;
  plVar3 = (longlong *)(param_1 + -0x70);
  uVar2 = (**(code **)(*plVar3 + 0x58))(plVar3);
  uVar6 = uVar2;
  FUN_140156b50(uVar2);
  plVar3 = (longlong *)FUN_1401bb6b0(plVar3,&local_res8,param_2,param_4,uVar5,uVar6,1);
  lVar4 = 0;
  if ((longlong *)*plVar3 != (longlong *)0x0) {
    lVar4 = *(longlong *)*plVar3;
  }
  if ((local_res8 != (longlong *)0x0) &&
     (local_res8[1] = local_res8[1] + -1, uVar2 = uVar6, local_res8[1] == 0)) {
    puVar1 = (undefined8 *)*local_res8;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
      uVar2 = uVar6;
    }
    FUN_140156970(local_res8);
  }
  if (lVar4 == 0) {
    FUN_140156be0(uVar2);
  }
  else {
    *(undefined1 *)(lVar4 + 0x20) = 1;
    FUN_140156be0(uVar2);
  }
  return lVar4 != 0;
}



ulonglong FUN_1401bc5c0(longlong param_1,int param_2,longlong param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  char cVar2;
  undefined8 uVar3;
  longlong *plVar4;
  ulonglong uVar5;
  longlong lVar6;
  longlong *local_res8;
  undefined8 uVar7;
  undefined8 uVar8;
  
  uVar7 = 0xfffffffffffffffe;
  plVar4 = (longlong *)(param_1 + -0x70);
  uVar3 = (**(code **)(*plVar4 + 0x58))(plVar4);
  uVar8 = uVar3;
  FUN_140156b50(uVar3);
  if (param_2 != 1) {
    plVar4 = (longlong *)FUN_1401bb6b0(plVar4,&local_res8,param_2,param_4,uVar7,uVar8,1);
    lVar6 = 0;
    if ((longlong *)*plVar4 != (longlong *)0x0) {
      lVar6 = *(longlong *)*plVar4;
    }
    if ((local_res8 != (longlong *)0x0) &&
       (local_res8[1] = local_res8[1] + -1, uVar3 = uVar8, local_res8[1] == 0)) {
      puVar1 = (undefined8 *)*local_res8;
      if (puVar1 != (undefined8 *)0x0) {
        (**(code **)*puVar1)(puVar1,1);
        uVar3 = uVar8;
      }
      FUN_140156970(local_res8);
    }
    if (lVar6 != 0) {
      *(undefined1 *)(lVar6 + 0x21) = 1;
      FUN_1401e3970(lVar6,param_3);
      cVar2 = FUN_1401588c0(param_3);
      if (((cVar2 == '\0') || (cVar2 = FUN_1401588c0(param_3 + 0x10), cVar2 == '\0')) ||
         (cVar2 = FUN_1401588c0(param_3 + 0x20), cVar2 == '\0')) {
        uVar5 = 0;
      }
      else {
        uVar5 = 1;
      }
      FUN_140156be0(uVar3);
      return uVar5;
    }
  }
  uVar5 = FUN_140156be0(uVar3);
  return uVar5 & 0xffffffffffffff00;
}



ulonglong FUN_1401bc6e0(longlong param_1,int param_2,longlong param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  char cVar2;
  undefined8 uVar3;
  longlong *plVar4;
  longlong lVar5;
  longlong lVar6;
  ulonglong uVar7;
  longlong lVar8;
  longlong lVar9;
  longlong *local_res8;
  undefined8 uVar10;
  undefined8 uVar11;
  
  uVar10 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))(param_1 + -0x70);
  uVar11 = uVar3;
  FUN_140156b50(uVar3);
  if (param_2 != 1) {
    plVar4 = (longlong *)FUN_1401bb6b0(param_1 + -0x70,&local_res8,param_2,param_4,uVar10,uVar11,1);
    lVar8 = 0;
    lVar9 = lVar8;
    if ((longlong *)*plVar4 != (longlong *)0x0) {
      lVar9 = *(longlong *)*plVar4;
    }
    if ((local_res8 != (longlong *)0x0) &&
       (local_res8[1] = local_res8[1] + -1, uVar3 = uVar11, local_res8[1] == 0)) {
      puVar1 = (undefined8 *)*local_res8;
      if (puVar1 != (undefined8 *)0x0) {
        (**(code **)*puVar1)(puVar1,1);
        uVar3 = uVar11;
      }
      FUN_140156970(local_res8);
    }
    if (lVar9 != 0) {
      FUN_1401e3970(lVar9,param_3);
      cVar2 = FUN_1401588c0(param_3);
      if (((cVar2 == '\0') || (cVar2 = FUN_1401588c0(param_3 + 0x10), cVar2 == '\0')) ||
         (cVar2 = FUN_1401588c0(param_3 + 0x20), cVar2 == '\0')) {
        uVar7 = 0;
      }
      else {
        uVar7 = 1;
      }
      if ((*(longlong **)(lVar9 + 0x18) != (longlong *)0x0) && (**(longlong **)(lVar9 + 0x18) != 0))
      {
        lVar5 = FUN_1401e36b0(lVar9);
        lVar6 = lVar8;
        if (*(longlong **)(lVar5 + 0x100) != (longlong *)0x0) {
          lVar6 = **(longlong **)(lVar5 + 0x100);
        }
        cVar2 = FUN_140185860(lVar6);
        if (cVar2 == '\0') {
          (**(code **)(*(longlong *)(param_1 + 8) + 0x10))();
          lVar6 = FUN_1401e36b0(lVar9);
          if (*(longlong **)(lVar6 + 0x100) != (longlong *)0x0) {
            lVar8 = **(longlong **)(lVar6 + 0x100);
          }
          FUN_1401855c0(lVar8);
          FUN_1401e5850(lVar9,1,0x1e);
        }
      }
      FUN_140156be0(uVar3);
      return uVar7;
    }
  }
  uVar7 = FUN_140156be0(uVar3);
  return uVar7 & 0xffffffffffffff00;
}



undefined8 * FUN_1401bc870(longlong param_1,undefined8 *param_2)

{
  int *piVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined *puVar4;
  undefined *local_res18 [2];
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_30;
  undefined4 local_28;
  undefined1 local_24;
  undefined4 local_20;
  
  local_24 = 0;
  local_28 = 0;
  local_20 = 0;
  local_58 = 0;
  local_50 = 0;
  local_30 = 0;
  local_38 = 0;
  local_40 = 0;
  local_48 = 0;
  plVar2 = (longlong *)(param_1 + 0x70);
  (**(code **)(*plVar2 + 0xc0))(plVar2,&local_58);
  FUN_1401568c0();
  *param_2 = PTR_DAT_1403200a0;
  plVar2 = (longlong *)(**(code **)(*plVar2 + 0xb0))(plVar2,local_res18);
  puVar4 = (undefined *)*plVar2;
  if ((undefined *)*plVar2 == (undefined *)0x0) {
    puVar4 = PTR_DAT_1403200a0;
  }
  FUN_14004ce50(param_2,L"TotalSend=%I64d TotalRecv=%I64d PeerCount=%d/%d NAT Name=%s",local_40,
                local_30,local_20,local_28,puVar4);
  if (((local_res18[0] != (undefined *)0x0) && (local_res18[0] != PTR_DAT_1403200a0)) &&
     (local_res18[0] + -8 != (undefined *)0x0)) {
    uVar3 = FUN_1401568c0();
    FUN_140156b50(uVar3);
    piVar1 = (int *)(local_res18[0] + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_res18[0] + -8);
    }
    FUN_140156be0(uVar3);
  }
  return param_2;
}



void FUN_1401bc9a0(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  longlong *local_res8;
  undefined8 uVar4;
  undefined8 uVar5;
  
  uVar4 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*param_1 + 0x58))();
  uVar5 = uVar3;
  FUN_140156b50(uVar3);
  FUN_1401bb6b0(param_1,&local_res8,param_2,param_4,uVar4,uVar5,1);
  if (local_res8 != (longlong *)0x0) {
    if (*local_res8 != 0) {
      piVar1 = (int *)(*local_res8 + 0x680);
      *piVar1 = *piVar1 + -1;
    }
    if ((local_res8 != (longlong *)0x0) &&
       (local_res8[1] = local_res8[1] + -1, uVar3 = uVar5, local_res8[1] == 0)) {
      puVar2 = (undefined8 *)*local_res8;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
        uVar3 = uVar5;
      }
      FUN_140156970(local_res8);
    }
  }
  FUN_140156be0(uVar3);
  return;
}



undefined4 FUN_1401bca60(longlong param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  longlong *local_res8;
  undefined8 uVar4;
  undefined8 uVar5;
  
  uVar4 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))(param_1 + -0x70);
  uVar5 = uVar3;
  FUN_140156b50(uVar3);
  if (param_2 == 1) {
    *(undefined8 *)(param_1 + 0x14f8) = param_3;
    FUN_140156be0(uVar3);
    uVar2 = 1;
  }
  else if (param_2 == *(int *)(param_1 + 0x1508)) {
    *(undefined8 *)(param_1 + 0x17f8) = param_3;
    FUN_140156be0(uVar3);
    uVar2 = 1;
  }
  else {
    FUN_1401bb6b0(param_1 + -0x70,&local_res8,param_2,param_4,uVar4,uVar5,1);
    if ((local_res8 == (longlong *)0x0) || (*local_res8 == 0)) {
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, uVar3 = uVar5, local_res8[1] == 0)) {
        puVar1 = (undefined8 *)*local_res8;
        if (puVar1 != (undefined8 *)0x0) {
          (**(code **)*puVar1)(puVar1,1);
          uVar3 = uVar5;
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar3);
      uVar2 = 0;
    }
    else {
      *(undefined8 *)(*local_res8 + 0x678) = param_3;
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, uVar3 = uVar5, local_res8[1] == 0)) {
        puVar1 = (undefined8 *)*local_res8;
        if (puVar1 != (undefined8 *)0x0) {
          (**(code **)*puVar1)(puVar1,1);
          uVar3 = uVar5;
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar3);
      uVar2 = 1;
    }
  }
  return uVar2;
}



longlong FUN_1401bcbb0(longlong *param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong *local_res8;
  undefined8 uVar4;
  undefined8 uVar5;
  
  uVar4 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(*param_1 + 0x58))();
  uVar5 = uVar2;
  FUN_140156b50(uVar2);
  if (param_2 == 1) {
    lVar3 = param_1[0x2ad];
    FUN_140156be0(uVar2);
  }
  else if (param_2 == (int)param_1[0x2af]) {
    lVar3 = param_1[0x30d];
    FUN_140156be0(uVar2);
  }
  else {
    FUN_1401bb6b0(param_1,&local_res8,param_2,param_4,uVar4,uVar5,1);
    if ((local_res8 == (longlong *)0x0) || (*local_res8 == 0)) {
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, uVar2 = uVar5, local_res8[1] == 0)) {
        puVar1 = (undefined8 *)*local_res8;
        if (puVar1 != (undefined8 *)0x0) {
          (**(code **)*puVar1)(puVar1,1);
          uVar2 = uVar5;
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar2);
      lVar3 = 0;
    }
    else {
      lVar3 = *(longlong *)(*local_res8 + 0x678);
      local_res8[1] = local_res8[1] + -1;
      if (local_res8[1] == 0) {
        puVar1 = (undefined8 *)*local_res8;
        if (puVar1 != (undefined8 *)0x0) {
          (**(code **)*puVar1)(puVar1,1);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar5);
    }
  }
  return lVar3;
}



undefined8 FUN_1401bccf0(longlong param_1,uint *param_2,undefined8 *param_3)

{
  uint *puVar1;
  ulonglong uVar2;
  undefined8 *puVar3;
  
  uVar2 = (ulonglong)*param_2 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (puVar1 = *(uint **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (puVar1 != (uint *)0x0 && ((uint)uVar2 == puVar1[8] % *(uint *)(param_1 + 0x28)));
        puVar1 = *(uint **)(puVar1 + 4)) {
      if (*puVar1 == *param_2) {
        return 0;
      }
    }
  }
  puVar3 = (undefined8 *)FUN_1401bb0b0(param_1,param_2);
  *puVar3 = *param_3;
  return 1;
}



void FUN_1401bcd80(longlong *param_1)

{
  undefined8 *puVar1;
  void *pvVar2;
  undefined8 *puVar3;
  
  if ((*param_1 != 0) &&
     (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
     *(longlong *)(*param_1 + 8) == 0)) {
    puVar1 = (undefined8 *)*param_1;
    pvVar2 = (void *)*puVar1;
    if (pvVar2 != (void *)0x0) {
      puVar3 = *(undefined8 **)((longlong)pvVar2 + 0x10);
      if (puVar3 != (undefined8 *)0x0) {
        (**(code **)*puVar3)(puVar3,1);
      }
      operator_delete(pvVar2);
    }
    FUN_140156970(puVar1);
  }
  return;
}



undefined8 * FUN_1401bcdf0(longlong *param_1,undefined8 *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  
  plVar1 = (longlong *)param_1[1];
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  FUN_1401568c0();
  *param_2 = PTR_DAT_1403200a0;
  FUN_14004f4f0(param_2,plVar1 + 2);
  *(int *)(param_2 + 1) = (int)plVar1[3];
  param_2[2] = plVar1[4];
  lVar2 = *plVar1;
  param_1[1] = lVar2;
  if (lVar2 == 0) {
    param_1[2] = 0;
  }
  else {
    *(undefined8 *)(lVar2 + 8) = 0;
  }
  FUN_14004f990(plVar1 + 2);
  plVar3 = (longlong *)*param_1;
  if (plVar3 == (longlong *)0x0) {
    FUN_140156970(plVar1);
  }
  else {
    (**(code **)(*plVar3 + 0x10))(plVar3,plVar1);
  }
  param_1[3] = param_1[3] + -1;
  return param_2;
}



void FUN_1401bcec0(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  void *pvVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  
  lVar1 = *param_2;
  if (lVar1 != *param_1) {
    if (lVar1 != 0) {
      *(longlong *)(*param_2 + 8) = *(longlong *)(lVar1 + 8) + 1;
    }
    puVar4 = (undefined8 *)0x0;
    if ((*param_1 != 0) &&
       (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
       *(longlong *)(*param_1 + 8) == 0)) {
      puVar4 = (undefined8 *)*param_1;
    }
    *param_1 = *param_2;
    if (puVar4 != (undefined8 *)0x0) {
      pvVar2 = (void *)*puVar4;
      if (pvVar2 != (void *)0x0) {
        puVar3 = *(undefined8 **)((longlong)pvVar2 + 0x10);
        if (puVar3 != (undefined8 *)0x0) {
          (**(code **)*puVar3)(puVar3,1);
        }
        operator_delete(pvVar2);
      }
      FUN_140156970(puVar4);
    }
  }
  return;
}



void FUN_1401bcf60(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  undefined8 *puVar4;
  
  lVar1 = param_1[3];
  while( true ) {
    if (lVar1 == 0) {
      param_1[1] = 0;
      param_1[2] = 0;
      return;
    }
    plVar2 = (longlong *)param_1[1];
    if (plVar2 == (longlong *)0x0) break;
    param_1[1] = *plVar2;
    if ((plVar2[2] != 0) &&
       (*(longlong *)(plVar2[2] + 8) = *(longlong *)(plVar2[2] + 8) + -1,
       *(longlong *)(plVar2[2] + 8) == 0)) {
      plVar3 = (longlong *)plVar2[2];
      puVar4 = (undefined8 *)*plVar3;
      if (puVar4 != (undefined8 *)0x0) {
        (**(code **)*puVar4)(puVar4,1);
      }
      FUN_140156970(plVar3);
    }
    plVar3 = (longlong *)*param_1;
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970(plVar2);
    }
    else {
      (**(code **)(*plVar3 + 0x10))(plVar3,plVar2);
    }
    param_1[3] = param_1[3] + -1;
    lVar1 = param_1[3];
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



longlong FUN_1401bd030(longlong param_1,longlong *param_2)

{
  longlong lVar1;
  
  if (param_2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  lVar1 = *param_2;
  if (param_2 == *(longlong **)(param_1 + 8)) {
    *(longlong *)(param_1 + 8) = lVar1;
  }
  else {
    *(longlong *)param_2[1] = lVar1;
  }
  if (param_2 == *(longlong **)(param_1 + 0x10)) {
    *(longlong *)(param_1 + 0x10) = param_2[1];
  }
  else {
    *(longlong *)(*param_2 + 8) = param_2[1];
  }
  FUN_1401bb120(param_1,param_2);
  return lVar1;
}



undefined8 *
FUN_1401bd0a0(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  
  plVar1 = (longlong *)*param_1;
  if (plVar1 == (longlong *)0x0) {
    puVar2 = (undefined8 *)FUN_140156940(0x18);
  }
  else {
    puVar2 = (undefined8 *)
             (**(code **)(*plVar1 + 8))(plVar1,0x18,param_3,param_4,0xfffffffffffffffe);
  }
  if (puVar2 != (undefined8 *)0x0) {
    puVar2[2] = 0;
    FUN_1401d43e0(puVar2 + 2,param_2);
  }
  puVar2[1] = param_3;
  *puVar2 = param_4;
  param_1[3] = param_1[3] + 1;
  return puVar2;
}



void FUN_1401bd130(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  
  lVar1 = param_1[3];
  while( true ) {
    if (lVar1 == 0) {
      param_1[1] = 0;
      param_1[2] = 0;
      return;
    }
    plVar2 = (longlong *)param_1[1];
    if (plVar2 == (longlong *)0x0) break;
    param_1[1] = *plVar2;
    FUN_1401560e0(plVar2 + 3);
    if (plVar2[4] != 0) {
      if (*(int *)((longlong)plVar2 + 0x2c) < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      *(undefined4 *)(plVar2 + 5) = 0;
    }
    plVar3 = (longlong *)*param_1;
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970(plVar2);
    }
    else {
      (**(code **)(*plVar3 + 0x10))(plVar3,plVar2);
    }
    param_1[3] = param_1[3] + -1;
    lVar1 = param_1[3];
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



void FUN_1401bd1d0(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  
  lVar1 = param_1[3];
  while( true ) {
    if (lVar1 == 0) {
      param_1[1] = 0;
      param_1[2] = 0;
      return;
    }
    plVar2 = (longlong *)param_1[1];
    if (plVar2 == (longlong *)0x0) break;
    param_1[1] = *plVar2;
    FUN_14004f990(plVar2 + 2);
    plVar3 = (longlong *)*param_1;
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970(plVar2);
    }
    else {
      (**(code **)(*plVar3 + 0x10))(plVar3,plVar2);
    }
    param_1[3] = param_1[3] + -1;
    lVar1 = param_1[3];
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



void FUN_1401bd250(longlong param_1,longlong param_2,char param_3)

{
  longlong *plVar1;
  undefined8 *puVar2;
  undefined4 uVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if ((*(longlong *)(param_2 + 8) != 0) &&
     (*(longlong *)(*(longlong *)(param_2 + 8) + 8) =
           *(longlong *)(*(longlong *)(param_2 + 8) + 8) + -1,
     *(longlong *)(*(longlong *)(param_2 + 8) + 8) == 0)) {
    plVar1 = *(longlong **)(param_2 + 8);
    puVar2 = (undefined8 *)*plVar1;
    if (puVar2 != (undefined8 *)0x0) {
      (**(code **)*puVar2)(puVar2,1);
    }
    FUN_140156970(plVar1);
  }
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(*plVar1 + 0x18))(plVar1,param_2);
  }
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
  if (((param_3 != '\0') && (*(ulonglong *)(param_1 + 0x20) < *(ulonglong *)(param_1 + 0x40))) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar3 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar3);
  }
  return;
}



void FUN_1401bd320(longlong param_1,longlong param_2,undefined1 param_3)

{
  uint uVar1;
  ulonglong uVar2;
  uint uVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar1 = *(uint *)(param_1 + 0x28);
  uVar2 = (ulonglong)*(uint *)(param_2 + 0x20) % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x20) == 1) {
    *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    *(undefined8 *)(param_1 + 0x10) = 0;
    *(undefined8 *)(param_1 + 0x18) = 0;
  }
  else {
    uVar3 = (uint)uVar2;
    if (((*(longlong *)(param_2 + 0x18) == 0) ||
        (*(uint *)(*(longlong *)(param_2 + 0x18) + 0x20) % uVar1 != uVar3)) &&
       ((*(longlong *)(param_2 + 0x10) == 0 ||
        (*(uint *)(*(longlong *)(param_2 + 0x10) + 0x20) % uVar1 != uVar3)))) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    }
    else if (param_2 == *(longlong *)(*(longlong *)(param_1 + 8) + (longlong)(int)uVar3 * 8)) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = *(undefined8 *)(param_2 + 0x10);
    }
    if (param_2 == *(longlong *)(param_1 + 0x10)) {
      *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_2 + 0x10);
      *(undefined8 *)(param_2 + 0x18) = 0;
    }
    if (param_2 == *(longlong *)(param_1 + 0x18)) {
      *(undefined8 *)(param_1 + 0x18) = *(undefined8 *)(param_2 + 0x18);
      *(undefined8 *)(param_2 + 0x10) = 0;
    }
    if (*(longlong *)(param_2 + 0x18) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x18) + 0x10) = *(undefined8 *)(param_2 + 0x10);
    }
    if (*(longlong *)(param_2 + 0x10) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x10) + 0x18) = *(undefined8 *)(param_2 + 0x18);
    }
  }
  FUN_1401bd250(param_1,param_2,param_3);
  FUN_14015b3b0(param_1);
  return;
}



undefined2 * FUN_1401bd420(longlong param_1,undefined2 *param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  undefined2 *puVar4;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar4 = (undefined2 *)FUN_140156940(0x28);
  }
  else {
    puVar4 = (undefined2 *)
             (**(code **)(*plVar1 + 8))(plVar1,0x28,param_3,param_4,0xfffffffffffffffe);
  }
  if (puVar4 != (undefined2 *)0x0) {
    *puVar4 = *param_2;
    *(undefined8 *)(puVar4 + 4) = 0;
    *(undefined4 *)(puVar4 + 0x10) = param_4;
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015b3b0(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined2 **)(param_1 + 0x10) = puVar4;
    *(undefined2 **)(param_1 + 0x18) = puVar4;
    *(undefined8 *)(puVar4 + 0xc) = 0;
    *(undefined8 *)(puVar4 + 8) = 0;
  }
  else {
    FUN_14015b3b0(param_1);
    FUN_14015b3b0(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      *(undefined8 *)(puVar4 + 0xc) = 0;
      *(longlong *)(puVar4 + 8) = lVar2;
      if (lVar2 != 0) {
        *(undefined2 **)(lVar2 + 0x18) = puVar4;
      }
      *(undefined2 **)(param_1 + 0x10) = puVar4;
    }
    else {
      if (*(longlong *)(lVar2 + 0x18) == 0) {
        *(undefined2 **)(param_1 + 0x10) = puVar4;
      }
      else {
        *(undefined2 **)(*(longlong *)(lVar2 + 0x18) + 0x10) = puVar4;
      }
      *(undefined8 *)(puVar4 + 0xc) = *(undefined8 *)(lVar2 + 0x18);
      *(longlong *)(puVar4 + 8) = lVar2;
      *(undefined2 **)(lVar2 + 0x18) = puVar4;
    }
  }
  *(undefined2 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar4;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b3b0(param_1);
  FUN_14015b3b0(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar3 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar3);
  }
  FUN_14015b3b0(param_1);
  return puVar4;
}



undefined8
FUN_1401bd570(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             longlong param_5,longlong param_6)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  longlong *plVar3;
  void *pvVar4;
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  longlong *local_res8;
  
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar2);
  plVar3 = (longlong *)FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x20),&local_res8,*param_4);
  lVar7 = 0;
  lVar6 = lVar7;
  if ((longlong *)*plVar3 != (longlong *)0x0) {
    lVar6 = *(longlong *)*plVar3;
  }
  if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
    puVar1 = (undefined8 *)*local_res8;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(local_res8);
  }
  if ((((lVar6 != 0) && (*(char *)(lVar6 + 0x684) == '\0')) &&
      (*(longlong **)(lVar6 + 0x28) != (longlong *)0x0)) && (**(longlong **)(lVar6 + 0x28) != 0)) {
    *(undefined4 *)(lVar6 + 0x578) = *(undefined4 *)(param_6 + 8);
    *(undefined2 *)(lVar6 + 0x57c) = *(undefined2 *)(param_6 + 0xc);
    *(undefined4 *)(lVar6 + 0x588) = *(undefined4 *)(param_5 + 8);
    *(undefined2 *)(lVar6 + 0x58c) = *(undefined2 *)(param_5 + 0xc);
    plVar3 = *(longlong **)(lVar6 + 0x28);
    lVar5 = lVar7;
    if (plVar3 != (longlong *)0x0) {
      lVar5 = *plVar3;
    }
    if (*(longlong *)(lVar5 + 0x10) != 0) {
      lVar5 = lVar7;
      if (plVar3 != (longlong *)0x0) {
        lVar5 = *plVar3;
      }
      if (*(int *)(*(longlong *)(lVar5 + 0x10) + 8) == 1) goto LAB_1401bd711;
    }
    lVar5 = lVar7;
    if (plVar3 != (longlong *)0x0) {
      lVar5 = *plVar3;
    }
    puVar1 = *(undefined8 **)(lVar5 + 0x10);
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    *(undefined8 *)(lVar5 + 0x10) = 0;
    pvVar4 = operator_new(0x38);
    lVar5 = lVar7;
    if (pvVar4 != (void *)0x0) {
      lVar5 = FUN_1401af8a0(pvVar4);
    }
    *(undefined2 *)(lVar5 + 0x34) = *(undefined2 *)(param_6 + 0xc);
    if (*(longlong **)(lVar6 + 0x28) != (longlong *)0x0) {
      lVar7 = **(longlong **)(lVar6 + 0x28);
    }
    *(longlong *)(lVar7 + 0x10) = lVar5;
  }
LAB_1401bd711:
  FUN_140156be0(uVar2);
  return 1;
}



undefined8
FUN_1401bd730(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             undefined4 *param_5)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong *local_res8;
  
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar2);
  plVar3 = (longlong *)FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x20),&local_res8,*param_4);
  lVar4 = 0;
  if ((longlong *)*plVar3 != (longlong *)0x0) {
    lVar4 = *(longlong *)*plVar3;
  }
  if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
    puVar1 = (undefined8 *)*local_res8;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(local_res8);
  }
  if (((lVar4 != 0) && (*(char *)(lVar4 + 0x684) == '\0')) && (*(char *)(lVar4 + 0x608) == '\0')) {
    FUN_1401e5850(lVar4,0,*param_5);
  }
  FUN_140156be0(uVar2);
  return 1;
}



undefined8 FUN_1401bd810(longlong param_1,undefined4 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong *local_res8;
  undefined8 uVar5;
  undefined8 uVar6;
  undefined1 uVar7;
  
  uVar5 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  uVar6 = uVar2;
  FUN_140156b50(uVar2);
  uVar7 = 1;
  plVar3 = (longlong *)FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x20),&local_res8,param_2);
  lVar4 = 0;
  if ((longlong *)*plVar3 != (longlong *)0x0) {
    lVar4 = *(longlong *)*plVar3;
  }
  if ((local_res8 != (longlong *)0x0) &&
     (local_res8[1] = local_res8[1] + -1, uVar2 = uVar6, local_res8[1] == 0)) {
    puVar1 = (undefined8 *)*local_res8;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
      uVar2 = uVar6;
    }
    FUN_140156970(local_res8);
    uVar6 = uVar2;
  }
  if ((lVar4 != 0) && (*(char *)(lVar4 + 0x684) == '\0')) {
    *(undefined4 *)(lVar4 + 0x44) = *param_4;
    plVar3 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x1818);
    (**(code **)(*plVar3 + 0x140))
              (plVar3,1,&DAT_140328530,lVar4 + 0x56c,lVar4 + 0x40,(undefined4 *)(lVar4 + 0x44),uVar5
               ,uVar6,uVar7);
  }
  FUN_140156be0(uVar2);
  return 1;
}



undefined8
FUN_1401bd920(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4,
             float *param_5)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  longlong *plVar3;
  longlong lVar4;
  float local_res8 [2];
  longlong *local_48;
  double local_40;
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined1 local_20;
  
  local_30 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  local_28 = uVar2;
  FUN_140156b50(uVar2);
  local_20 = 1;
  plVar3 = (longlong *)FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x20),&local_48,param_2);
  lVar4 = 0;
  if ((longlong *)*plVar3 != (longlong *)0x0) {
    lVar4 = *(longlong *)*plVar3;
  }
  if ((local_48 != (longlong *)0x0) &&
     (local_48[1] = local_48[1] + -1, uVar2 = local_28, local_48[1] == 0)) {
    puVar1 = (undefined8 *)*local_48;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(local_48);
    uVar2 = local_28;
  }
  if ((lVar4 != 0) && (*(char *)(lVar4 + 0x684) == '\0')) {
    *(double *)(lVar4 + 0x160) = (double)*param_5;
    local_40 = 0.0;
    (**(code **)(**(longlong **)(param_1 + 0x20) + 0xd8))(*(longlong **)(param_1 + 0x20),&local_40);
    local_res8[0] = (float)local_40;
    local_38 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x20) + 0x70) + 0xf8))();
    plVar3 = (longlong *)(*(longlong *)(param_1 + 0x20) + 0x17d0);
    (**(code **)(*plVar3 + 0x60))
              (plVar3,param_2,&DAT_140328530,param_4,&local_38,*(longlong *)(param_1 + 0x20) + 0x4f8
               ,local_res8);
  }
  FUN_140156be0(uVar2);
  return 1;
}



undefined8
FUN_1401bda90(longlong param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4,
             double *param_5,double *param_6,float *param_7)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  longlong *plVar3;
  longlong lVar4;
  double dVar5;
  longlong *local_res8;
  
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))
                    (*(longlong **)(param_1 + 0x20),param_2,param_3,param_4,0xfffffffffffffffe);
  FUN_140156b50(uVar2);
  plVar3 = (longlong *)
           FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x20),&local_res8,param_2 & 0xffffffff);
  lVar4 = 0;
  if ((longlong *)*plVar3 != (longlong *)0x0) {
    lVar4 = *(longlong *)*plVar3;
  }
  if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
    puVar1 = (undefined8 *)*local_res8;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(local_res8);
  }
  if ((lVar4 != 0) && (*(char *)(lVar4 + 0x684) == '\0')) {
    dVar5 = *param_6;
    if (dVar5 <= 0.0) {
      dVar5 = 0.0;
    }
    *(double *)(lVar4 + 0x60) = dVar5;
    *(double *)(lVar4 + 0x160) = (double)*param_7;
    dVar5 = (double)FUN_14018aee0(*(longlong *)(param_1 + 0x20) + 0x1620);
    *(double *)(lVar4 + 0x150) = dVar5 - (*(double *)(lVar4 + 0x50) + *param_5);
  }
  FUN_140156be0(uVar2);
  return 1;
}



undefined ** FUN_1401bdbb0(longlong *param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  undefined **ppuVar3;
  longlong *local_res8;
  undefined8 uVar4;
  undefined8 uVar5;
  
  uVar4 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(*param_1 + 0x58))();
  uVar5 = uVar2;
  FUN_140156b50(uVar2);
  if (param_2 == 1) {
    FUN_140156be0(uVar2);
    ppuVar3 = (undefined **)(param_1 + 0x2aa);
  }
  else if (param_2 == 0) {
    FUN_140156be0(uVar2);
    ppuVar3 = &PTR_vftable_1403221b0;
  }
  else if (param_2 == (int)param_1[0x2af]) {
    FUN_140156be0(uVar2);
    ppuVar3 = (undefined **)(param_1 + 0xc);
  }
  else {
    FUN_1401bb6b0(param_1,&local_res8,param_2,param_4,uVar4,uVar5,1);
    if (((local_res8 == (longlong *)0x0) ||
        (ppuVar3 = (undefined **)*local_res8, ppuVar3 == (undefined **)0x0)) ||
       (*(char *)((longlong)ppuVar3 + 0x684) != '\0')) {
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, uVar2 = uVar5, local_res8[1] == 0)) {
        puVar1 = (undefined8 *)*local_res8;
        if (puVar1 != (undefined8 *)0x0) {
          (**(code **)*puVar1)(puVar1,1);
          uVar2 = uVar5;
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar2);
      ppuVar3 = (undefined **)0x0;
    }
    else {
      local_res8[1] = local_res8[1] + -1;
      if (local_res8[1] == 0) {
        puVar1 = (undefined8 *)*local_res8;
        if (puVar1 != (undefined8 *)0x0) {
          (**(code **)*puVar1)(puVar1,1);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar5);
    }
  }
  return ppuVar3;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401bdd00(longlong param_1,undefined4 param_2,wchar_t *param_3,undefined8 param_4)

{
  longlong *plVar1;
  int iVar2;
  int iVar3;
  int *piVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  __time64_t _Var7;
  undefined *puVar8;
  undefined *puVar9;
  int *piVar10;
  int iVar11;
  undefined *puVar12;
  int iVar13;
  undefined8 local_res20;
  undefined1 auStack_918 [32];
  int **local_8f8;
  int *local_8e8;
  undefined4 local_8e0;
  undefined4 local_8dc;
  undefined *local_8d8;
  undefined1 local_8d0;
  undefined8 local_8c0;
  undefined1 local_8b8;
  undefined8 *local_8b0;
  undefined8 *local_8a8;
  undefined1 local_8a0;
  int *local_898;
  undefined4 local_890;
  __time64_t local_888;
  undefined8 local_880;
  wchar_t local_878 [1040];
  ulonglong local_58;
  
  local_880 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_918;
  local_res20 = param_4;
  local_8e0 = param_2;
  FUN_1401568c0();
  local_8e8 = (int *)PTR_DAT_1403200a0;
  if (param_3 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  iVar2 = vswprintf_s(local_878,0x400,param_3,(va_list)&local_res20);
  iVar13 = 0;
  iVar11 = 0;
  if ((local_8e8 != (int *)0x0) && (iVar11 = 0, local_8e8 != (int *)PTR_DAT_1403200a0)) {
    iVar11 = local_8e8[-2];
  }
  iVar3 = iVar2;
  if (((iVar2 <= iVar11) && (iVar3 = iVar13, local_8e8 != (int *)0x0)) &&
     (local_8e8 != (int *)PTR_DAT_1403200a0)) {
    iVar3 = local_8e8[-2];
  }
  iVar11 = 1;
  if (1 < iVar3) {
    iVar11 = iVar3;
  }
  iVar3 = iVar13;
  if ((local_8e8 != (int *)0x0) && (local_8e8 != (int *)PTR_DAT_1403200a0)) {
    iVar3 = local_8e8[-2];
  }
  if (iVar3 < iVar11) {
    if (local_8e8 == (int *)0x0) {
      local_8e8 = (int *)PTR_DAT_1403200a0;
    }
    if (iVar11 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (iVar11 == 0) {
      FUN_14004f990(&local_8e8);
    }
    else {
      iVar3 = iVar13;
      if ((local_8e8 != (int *)0x0) && (local_8e8 != (int *)PTR_DAT_1403200a0)) {
        iVar3 = local_8e8[-2];
      }
      if (iVar11 != iVar3) {
        piVar4 = (int *)FUN_140156940((longlong)iVar11 * 2 + 10);
        if (piVar4 != (int *)0x0) {
          *piVar4 = 0;
          piVar4[1] = 1;
        }
        *piVar4 = iVar11;
        iVar3 = iVar13;
        if ((local_8e8 != (int *)0x0) && (local_8e8 != (int *)PTR_DAT_1403200a0)) {
          iVar3 = local_8e8[-2];
        }
        piVar10 = (int *)PTR_DAT_1403200a0;
        if (iVar11 < iVar3) {
LAB_1401bde66:
          if (local_8e8 != (int *)0x0) {
            piVar10 = local_8e8;
          }
        }
        else {
          iVar11 = iVar13;
          if (local_8e8 != (int *)0x0) {
            if (local_8e8 != (int *)PTR_DAT_1403200a0) {
              iVar11 = local_8e8[-2];
            }
            goto LAB_1401bde66;
          }
        }
        FUN_140156770(piVar4 + 2,piVar10,iVar11);
        FUN_14004f990(&local_8e8);
        local_8e8 = piVar4 + 2;
      }
    }
  }
  FUN_14004f670(&local_8e8);
  piVar4 = local_8e8;
  if (local_8e8 == (int *)0x0) {
    piVar4 = (int *)PTR_DAT_1403200a0;
  }
  FUN_140156770(piVar4,local_878,iVar2);
  piVar4 = local_8e8;
  if (local_8e8 == (int *)0x0) {
    piVar4 = (int *)PTR_DAT_1403200a0;
  }
  iVar2 = FUN_140156740(piVar4);
  iVar11 = 0;
  if (0 < iVar2) {
    iVar11 = iVar2;
  }
  iVar2 = iVar13;
  if ((local_8e8 != (int *)0x0) && (local_8e8 != (int *)PTR_DAT_1403200a0)) {
    iVar2 = local_8e8[-2];
  }
  if ((iVar2 <= iVar11) && (iVar11 = iVar13, local_8e8 != (int *)0x0)) {
    if (local_8e8 == (int *)PTR_DAT_1403200a0) goto LAB_1401bdf28;
    iVar11 = local_8e8[-2];
  }
  if (((local_8e8 != (int *)PTR_DAT_1403200a0) && (local_8e8 != (int *)0x0)) &&
     (local_8e8 + -2 != (int *)0x0)) {
    local_8e8[-2] = iVar11;
    *(undefined2 *)((longlong)local_8e8 + (longlong)iVar11 * 2) = 0;
  }
LAB_1401bdf28:
  if (*(char *)(param_1 + 0x1790) != '\0') {
    local_8f8 = &local_8e8;
    (**(code **)(*(longlong *)(param_1 + 0x1818) + 0xa0))
              ((longlong *)(param_1 + 0x1818),1,&DAT_140328530,&local_8e0);
  }
  if (*(int *)(param_1 + 0x6c8) != 0) {
    (**(code **)(*(longlong *)(param_1 + 0x78) + 0x10))();
    FUN_1401568c0();
    puVar8 = PTR_DAT_1403200a0;
    local_8dc = local_8e0;
    local_890 = local_8e0;
    local_898 = (int *)PTR_DAT_1403200a0;
    piVar4 = (int *)PTR_DAT_1403200a0;
    if (local_8e8 != (int *)PTR_DAT_1403200a0) {
      puVar5 = (undefined8 *)FUN_1401568c0();
      local_8a8 = puVar5;
      FUN_140156b50(puVar5);
      local_8a0 = 1;
      if (((puVar8 != (undefined *)0x0) && (puVar8 != PTR_DAT_1403200a0)) &&
         (puVar8 + -8 != (undefined *)0x0)) {
        uVar6 = FUN_1401568c0();
        local_8c0 = uVar6;
        FUN_140156b50(uVar6);
        local_8b8 = 1;
        piVar4 = (int *)(puVar8 + -4);
        *piVar4 = *piVar4 + -1;
        if (*piVar4 == 0) {
          FUN_140156970(puVar8 + -8);
        }
        FUN_140156be0(uVar6);
      }
      piVar4 = local_8e8;
      local_898 = local_8e8;
      if (((local_8e8 != (int *)PTR_DAT_1403200a0) && (local_8e8 != (int *)0x0)) &&
         (local_8e8 != (int *)0x8)) {
        local_8e8[-1] = local_8e8[-1] + 1;
      }
      FUN_140156be0(puVar5);
    }
    _Var7 = _time64((__time64_t *)0x0);
    uVar6 = *(undefined8 *)(param_1 + 0x17c0);
    plVar1 = *(longlong **)(param_1 + 0x17b0);
    local_8c0 = uVar6;
    local_888 = _Var7;
    if (plVar1 == (longlong *)0x0) {
      puVar5 = (undefined8 *)FUN_140156940(0x28);
    }
    else {
      puVar5 = (undefined8 *)(**(code **)(*plVar1 + 8))(plVar1,0x28);
    }
    local_8b0 = puVar5;
    local_8a8 = puVar5;
    if (puVar5 != (undefined8 *)0x0) {
      FUN_1401568c0();
      puVar8 = PTR_DAT_1403200a0;
      puVar5[2] = PTR_DAT_1403200a0;
      if (puVar8 == (undefined *)0x0) {
        puVar5[2] = PTR_DAT_1403200a0;
      }
      if (piVar4 != (int *)puVar5[2]) {
        puVar8 = (undefined *)FUN_1401568c0();
        local_8d8 = puVar8;
        FUN_140156b50(puVar8);
        local_8d0 = 1;
        FUN_14004f990(puVar5 + 2);
        puVar5[2] = piVar4;
        if (((piVar4 != (int *)PTR_DAT_1403200a0) && (piVar4 != (int *)0x0)) &&
           (piVar4 != (int *)0x8)) {
          piVar4[-1] = piVar4[-1] + 1;
        }
        FUN_140156be0(puVar8);
        uVar6 = local_8c0;
      }
      *(undefined4 *)(puVar5 + 3) = local_8dc;
      puVar5[4] = _Var7;
    }
    puVar5[1] = uVar6;
    *puVar5 = 0;
    *(longlong *)(param_1 + 0x17c8) = *(longlong *)(param_1 + 0x17c8) + 1;
    if (*(undefined8 **)(param_1 + 0x17c0) == (undefined8 *)0x0) {
      *(undefined8 **)(param_1 + 0x17b8) = puVar5;
    }
    else {
      **(undefined8 **)(param_1 + 0x17c0) = puVar5;
    }
    *(undefined8 **)(param_1 + 0x17c0) = puVar5;
    if ((((ulonglong)*(uint *)(param_1 + 0x6c8) < *(ulonglong *)(param_1 + 0x17c8)) &&
        (FUN_1401bcdf0(param_1 + 0x17b0,&local_8d8), puVar8 = local_8d8,
        local_8d8 != (undefined *)0x0)) &&
       ((local_8d8 != PTR_DAT_1403200a0 && (puVar12 = local_8d8 + -8, puVar12 != (undefined *)0x0)))
       ) {
      puVar9 = (undefined *)FUN_1401568c0();
      local_8d8 = puVar9;
      FUN_140156b50(puVar9);
      local_8d0 = 1;
      piVar10 = (int *)(puVar8 + -4);
      *piVar10 = *piVar10 + -1;
      if (*piVar10 == 0) {
        FUN_140156970(puVar12);
      }
      FUN_140156be0(puVar9);
    }
    if (((piVar4 != (int *)0x0) && (piVar4 != (int *)PTR_DAT_1403200a0)) &&
       (piVar4 + -2 != (int *)0x0)) {
      puVar8 = (undefined *)FUN_1401568c0();
      local_8d8 = puVar8;
      FUN_140156b50(puVar8);
      local_8d0 = 1;
      piVar10 = piVar4 + -1;
      *piVar10 = *piVar10 + -1;
      if (*piVar10 == 0) {
        FUN_140156970(piVar4 + -2);
      }
      FUN_140156be0(puVar8);
    }
  }
  piVar4 = local_8e8;
  if (((local_8e8 != (int *)0x0) && (local_8e8 != (int *)PTR_DAT_1403200a0)) &&
     (piVar10 = local_8e8 + -2, piVar10 != (int *)0x0)) {
    puVar8 = (undefined *)FUN_1401568c0();
    local_8d8 = puVar8;
    FUN_140156b50(puVar8);
    local_8d0 = 1;
    piVar4 = piVar4 + -1;
    *piVar4 = *piVar4 + -1;
    if (*piVar4 == 0) {
      FUN_140156970(piVar10);
    }
    FUN_140156be0(puVar8);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401be250(longlong param_1,undefined4 param_2,wchar_t *param_3,undefined8 param_4)

{
  longlong *plVar1;
  int iVar2;
  int iVar3;
  int *piVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  __time64_t _Var7;
  undefined *puVar8;
  undefined *puVar9;
  int *piVar10;
  int iVar11;
  undefined *puVar12;
  int iVar13;
  undefined8 local_res20;
  undefined1 auStack_918 [32];
  int **local_8f8;
  int *local_8e8;
  undefined4 local_8e0 [2];
  undefined *local_8d8;
  undefined1 local_8d0;
  undefined8 local_8c0;
  undefined1 local_8b8;
  undefined8 *local_8b0;
  undefined8 *local_8a8;
  undefined1 local_8a0;
  int *local_898;
  undefined4 local_890;
  __time64_t local_888;
  undefined8 local_880;
  wchar_t local_878 [1040];
  ulonglong local_58;
  
  local_880 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_918;
  local_res20 = param_4;
  local_8e0[0] = param_2;
  FUN_1401568c0();
  local_8e8 = (int *)PTR_DAT_1403200a0;
  if (param_3 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80070057);
  }
  iVar2 = vswprintf_s(local_878,0x400,param_3,(va_list)&local_res20);
  iVar13 = 0;
  iVar11 = 0;
  if ((local_8e8 != (int *)0x0) && (iVar11 = 0, local_8e8 != (int *)PTR_DAT_1403200a0)) {
    iVar11 = local_8e8[-2];
  }
  iVar3 = iVar2;
  if (((iVar2 <= iVar11) && (iVar3 = iVar13, local_8e8 != (int *)0x0)) &&
     (local_8e8 != (int *)PTR_DAT_1403200a0)) {
    iVar3 = local_8e8[-2];
  }
  iVar11 = 1;
  if (1 < iVar3) {
    iVar11 = iVar3;
  }
  iVar3 = iVar13;
  if ((local_8e8 != (int *)0x0) && (local_8e8 != (int *)PTR_DAT_1403200a0)) {
    iVar3 = local_8e8[-2];
  }
  if (iVar3 < iVar11) {
    if (local_8e8 == (int *)0x0) {
      local_8e8 = (int *)PTR_DAT_1403200a0;
    }
    if (iVar11 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (iVar11 == 0) {
      FUN_14004f990(&local_8e8);
    }
    else {
      iVar3 = iVar13;
      if ((local_8e8 != (int *)0x0) && (local_8e8 != (int *)PTR_DAT_1403200a0)) {
        iVar3 = local_8e8[-2];
      }
      if (iVar11 != iVar3) {
        piVar4 = (int *)FUN_140156940((longlong)iVar11 * 2 + 10);
        if (piVar4 != (int *)0x0) {
          *piVar4 = 0;
          piVar4[1] = 1;
        }
        *piVar4 = iVar11;
        iVar3 = iVar13;
        if ((local_8e8 != (int *)0x0) && (local_8e8 != (int *)PTR_DAT_1403200a0)) {
          iVar3 = local_8e8[-2];
        }
        piVar10 = (int *)PTR_DAT_1403200a0;
        if (iVar11 < iVar3) {
LAB_1401be3b6:
          if (local_8e8 != (int *)0x0) {
            piVar10 = local_8e8;
          }
        }
        else {
          iVar11 = iVar13;
          if (local_8e8 != (int *)0x0) {
            if (local_8e8 != (int *)PTR_DAT_1403200a0) {
              iVar11 = local_8e8[-2];
            }
            goto LAB_1401be3b6;
          }
        }
        FUN_140156770(piVar4 + 2,piVar10,iVar11);
        FUN_14004f990(&local_8e8);
        local_8e8 = piVar4 + 2;
      }
    }
  }
  FUN_14004f670(&local_8e8);
  piVar4 = local_8e8;
  if (local_8e8 == (int *)0x0) {
    piVar4 = (int *)PTR_DAT_1403200a0;
  }
  FUN_140156770(piVar4,local_878,iVar2);
  piVar4 = local_8e8;
  if (local_8e8 == (int *)0x0) {
    piVar4 = (int *)PTR_DAT_1403200a0;
  }
  iVar2 = FUN_140156740(piVar4);
  iVar11 = 0;
  if (0 < iVar2) {
    iVar11 = iVar2;
  }
  iVar2 = iVar13;
  if ((local_8e8 != (int *)0x0) && (local_8e8 != (int *)PTR_DAT_1403200a0)) {
    iVar2 = local_8e8[-2];
  }
  if ((iVar2 <= iVar11) && (iVar11 = iVar13, local_8e8 != (int *)0x0)) {
    if (local_8e8 == (int *)PTR_DAT_1403200a0) goto LAB_1401be478;
    iVar11 = local_8e8[-2];
  }
  if (((local_8e8 != (int *)PTR_DAT_1403200a0) && (local_8e8 != (int *)0x0)) &&
     (local_8e8 + -2 != (int *)0x0)) {
    local_8e8[-2] = iVar11;
    *(undefined2 *)((longlong)local_8e8 + (longlong)iVar11 * 2) = 0;
  }
LAB_1401be478:
  if (*(char *)(param_1 + 0x1790) != '\0') {
    local_8f8 = &local_8e8;
    (**(code **)(*(longlong *)(param_1 + 0x1818) + 0xb0))
              ((longlong *)(param_1 + 0x1818),1,&DAT_140328530,local_8e0);
  }
  if (*(int *)(param_1 + 0x6c8) != 0) {
    (**(code **)(*(longlong *)(param_1 + 0x78) + 0x10))();
    FUN_1401568c0();
    puVar8 = PTR_DAT_1403200a0;
    local_890 = 2;
    local_898 = (int *)PTR_DAT_1403200a0;
    piVar4 = (int *)PTR_DAT_1403200a0;
    if (local_8e8 != (int *)PTR_DAT_1403200a0) {
      puVar5 = (undefined8 *)FUN_1401568c0();
      local_8a8 = puVar5;
      FUN_140156b50(puVar5);
      local_8a0 = 1;
      if (((puVar8 != (undefined *)0x0) && (puVar8 != PTR_DAT_1403200a0)) &&
         (puVar8 + -8 != (undefined *)0x0)) {
        uVar6 = FUN_1401568c0();
        local_8c0 = uVar6;
        FUN_140156b50(uVar6);
        local_8b8 = 1;
        piVar4 = (int *)(puVar8 + -4);
        *piVar4 = *piVar4 + -1;
        if (*piVar4 == 0) {
          FUN_140156970(puVar8 + -8);
        }
        FUN_140156be0(uVar6);
      }
      piVar4 = local_8e8;
      local_898 = local_8e8;
      if (((local_8e8 != (int *)PTR_DAT_1403200a0) && (local_8e8 != (int *)0x0)) &&
         (local_8e8 != (int *)0x8)) {
        local_8e8[-1] = local_8e8[-1] + 1;
      }
      FUN_140156be0(puVar5);
    }
    _Var7 = _time64((__time64_t *)0x0);
    uVar6 = *(undefined8 *)(param_1 + 0x17c0);
    plVar1 = *(longlong **)(param_1 + 0x17b0);
    local_8c0 = uVar6;
    local_888 = _Var7;
    if (plVar1 == (longlong *)0x0) {
      puVar5 = (undefined8 *)FUN_140156940(0x28);
    }
    else {
      puVar5 = (undefined8 *)(**(code **)(*plVar1 + 8))(plVar1,0x28);
    }
    local_8b0 = puVar5;
    local_8a8 = puVar5;
    if (puVar5 != (undefined8 *)0x0) {
      FUN_1401568c0();
      puVar8 = PTR_DAT_1403200a0;
      puVar5[2] = PTR_DAT_1403200a0;
      if (puVar8 == (undefined *)0x0) {
        puVar5[2] = PTR_DAT_1403200a0;
      }
      if (piVar4 != (int *)puVar5[2]) {
        puVar8 = (undefined *)FUN_1401568c0();
        local_8d8 = puVar8;
        FUN_140156b50(puVar8);
        local_8d0 = 1;
        FUN_14004f990(puVar5 + 2);
        puVar5[2] = piVar4;
        if (((piVar4 != (int *)PTR_DAT_1403200a0) && (piVar4 != (int *)0x0)) &&
           (piVar4 != (int *)0x8)) {
          piVar4[-1] = piVar4[-1] + 1;
        }
        FUN_140156be0(puVar8);
        uVar6 = local_8c0;
      }
      *(undefined4 *)(puVar5 + 3) = 2;
      puVar5[4] = _Var7;
    }
    puVar5[1] = uVar6;
    *puVar5 = 0;
    *(longlong *)(param_1 + 0x17c8) = *(longlong *)(param_1 + 0x17c8) + 1;
    if (*(undefined8 **)(param_1 + 0x17c0) == (undefined8 *)0x0) {
      *(undefined8 **)(param_1 + 0x17b8) = puVar5;
    }
    else {
      **(undefined8 **)(param_1 + 0x17c0) = puVar5;
    }
    *(undefined8 **)(param_1 + 0x17c0) = puVar5;
    if ((((ulonglong)*(uint *)(param_1 + 0x6c8) < *(ulonglong *)(param_1 + 0x17c8)) &&
        (FUN_1401bcdf0(param_1 + 0x17b0,&local_8d8), puVar8 = local_8d8,
        local_8d8 != (undefined *)0x0)) &&
       ((local_8d8 != PTR_DAT_1403200a0 && (puVar12 = local_8d8 + -8, puVar12 != (undefined *)0x0)))
       ) {
      puVar9 = (undefined *)FUN_1401568c0();
      local_8d8 = puVar9;
      FUN_140156b50(puVar9);
      local_8d0 = 1;
      piVar10 = (int *)(puVar8 + -4);
      *piVar10 = *piVar10 + -1;
      if (*piVar10 == 0) {
        FUN_140156970(puVar12);
      }
      FUN_140156be0(puVar9);
    }
    if (((piVar4 != (int *)0x0) && (piVar4 != (int *)PTR_DAT_1403200a0)) &&
       (piVar4 + -2 != (int *)0x0)) {
      puVar8 = (undefined *)FUN_1401568c0();
      local_8d8 = puVar8;
      FUN_140156b50(puVar8);
      local_8d0 = 1;
      piVar10 = piVar4 + -1;
      *piVar10 = *piVar10 + -1;
      if (*piVar10 == 0) {
        FUN_140156970(piVar4 + -2);
      }
      FUN_140156be0(puVar8);
    }
  }
  piVar4 = local_8e8;
  if (((local_8e8 != (int *)0x0) && (local_8e8 != (int *)PTR_DAT_1403200a0)) &&
     (piVar10 = local_8e8 + -2, piVar10 != (int *)0x0)) {
    puVar8 = (undefined *)FUN_1401568c0();
    local_8d8 = puVar8;
    FUN_140156b50(puVar8);
    local_8d0 = 1;
    piVar4 = piVar4 + -1;
    *piVar4 = *piVar4 + -1;
    if (*piVar4 == 0) {
      FUN_140156970(piVar10);
    }
    FUN_140156be0(puVar8);
  }
  return;
}



undefined8 FUN_1401be7a0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined8 *puVar1;
  longlong lVar2;
  undefined8 uVar3;
  longlong *plVar4;
  longlong lVar5;
  undefined8 uVar6;
  longlong *local_res8;
  
  uVar3 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar3);
  plVar4 = (longlong *)FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x20),&local_res8,*param_4);
  lVar5 = 0;
  if ((longlong *)*plVar4 != (longlong *)0x0) {
    lVar5 = *(longlong *)*plVar4;
  }
  if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
    puVar1 = (undefined8 *)*local_res8;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(local_res8);
  }
  if (lVar5 != 0) {
    FUN_1401e3530(lVar5,1);
    *(undefined4 *)(lVar5 + 0x61c) = 0;
    uVar6 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x20) + 0x70) + 0x1c0))();
    *(undefined8 *)(lVar5 + 0x620) = uVar6;
    *(undefined1 *)(lVar5 + 0x20) = 0;
    FUN_1401e5760(lVar5);
    lVar2 = *(longlong *)(param_1 + 0x20);
    if ((*(char *)(lVar2 + 0x1790) != '\0') || (*(int *)(lVar2 + 0x6c8) != 0)) {
      FUN_1401bdd00(lVar2,1,&DAT_1402739c0,*(undefined4 *)(lVar5 + 0x56c));
    }
  }
  FUN_140156be0(uVar3);
  return 1;
}



undefined8 FUN_1401be8d0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4)

{
  undefined8 *puVar1;
  longlong lVar2;
  undefined8 uVar3;
  longlong *plVar4;
  longlong lVar5;
  longlong *local_res8;
  undefined8 uVar6;
  undefined8 uVar7;
  undefined1 uVar8;
  
  uVar6 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  uVar7 = uVar3;
  FUN_140156b50(uVar3);
  uVar8 = 1;
  plVar4 = (longlong *)FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x20),&local_res8,*param_4);
  lVar5 = 0;
  if ((longlong *)*plVar4 != (longlong *)0x0) {
    lVar5 = *(longlong *)*plVar4;
  }
  if ((local_res8 != (longlong *)0x0) &&
     (local_res8[1] = local_res8[1] + -1, uVar3 = uVar7, local_res8[1] == 0)) {
    puVar1 = (undefined8 *)*local_res8;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
      uVar3 = uVar7;
    }
    FUN_140156970(local_res8);
    uVar7 = uVar3;
  }
  if ((lVar5 != 0) &&
     ((*(longlong **)(lVar5 + 0x18) == (longlong *)0x0 || (**(longlong **)(lVar5 + 0x18) == 0)))) {
    *(undefined1 *)(lVar5 + 0x23) = 1;
    lVar2 = *(longlong *)(param_1 + 0x20);
    if ((*(char *)(lVar2 + 0x1790) != '\0') || (*(int *)(lVar2 + 0x6c8) != 0)) {
      FUN_1401bdd00(lVar2,1,&DAT_140273a38,*(undefined4 *)(lVar5 + 0x56c),uVar6,uVar7,uVar8);
    }
  }
  FUN_140156be0(uVar3);
  return 1;
}



void FUN_1401be9d0(longlong param_1,undefined8 param_2,longlong *param_3)

{
  undefined8 uVar1;
  undefined *puVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  
  uVar3 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(*(longlong *)(param_1 + -0x78) + 0x58))(param_1 + -0x78);
  uVar4 = uVar1;
  FUN_140156b50(uVar1);
  if ((*(char *)(param_1 + 0x1718) != '\0') || (*(int *)(param_1 + 0x650) != 0)) {
    puVar2 = (undefined *)*param_3;
    if ((undefined *)*param_3 == (undefined *)0x0) {
      puVar2 = PTR_DAT_1403200a0;
    }
    FUN_1401bdd00(param_1 + -0x78,0,L"Socket Warning: %s",puVar2,uVar3,uVar4,1);
  }
  FUN_140156be0(uVar1);
  FUN_14004f990(param_3);
  return;
}



void FUN_1401bea70(longlong *param_1)

{
  undefined8 *puVar1;
  
  FUN_1401bcf60();
  puVar1 = (undefined8 *)*param_1;
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  return;
}



void FUN_1401beaa0(longlong *param_1)

{
  undefined8 *puVar1;
  
  FUN_1401bd130();
  puVar1 = (undefined8 *)*param_1;
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  return;
}



void FUN_1401bead0(longlong *param_1)

{
  undefined8 *puVar1;
  
  FUN_1401bd1d0();
  puVar1 = (undefined8 *)*param_1;
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  return;
}



void FUN_1401beb00(longlong param_1)

{
  longlong *plVar1;
  undefined8 *puVar2;
  uint uVar3;
  ulonglong uVar4;
  longlong lVar5;
  longlong lVar6;
  float fVar7;
  float fVar8;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_14015b3b0();
  lVar5 = *(longlong *)(param_1 + 0x10);
  while (lVar5 != 0) {
    lVar6 = *(longlong *)(lVar5 + 0x10);
    if ((*(longlong *)(lVar5 + 8) != 0) &&
       (*(longlong *)(*(longlong *)(lVar5 + 8) + 8) =
             *(longlong *)(*(longlong *)(lVar5 + 8) + 8) + -1,
       *(longlong *)(*(longlong *)(lVar5 + 8) + 8) == 0)) {
      plVar1 = *(longlong **)(lVar5 + 8);
      puVar2 = (undefined8 *)*plVar1;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
      }
      FUN_140156970(plVar1);
    }
    plVar1 = *(longlong **)(param_1 + 0x50);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970(lVar5);
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,lVar5);
    }
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    lVar5 = lVar6;
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_14015b3b0(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar3 = FUN_14019e650(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    lVar5 = 0;
    *(uint *)(param_1 + 0x28) = uVar3;
    fVar8 = (float)uVar3 * *(float *)(param_1 + 0x34);
    if ((9.223372e+18 < fVar8) && (fVar8 = fVar8 - 9.223372e+18, fVar8 < 9.223372e+18)) {
      lVar5 = -0x8000000000000000;
    }
    fVar7 = (float)uVar3 * *(float *)(param_1 + 0x30);
    lVar6 = 0;
    *(longlong *)(param_1 + 0x38) = (longlong)fVar8 + lVar5;
    if ((9.223372e+18 < fVar7) && (fVar7 = fVar7 - 9.223372e+18, fVar7 < 9.223372e+18)) {
      lVar6 = -0x8000000000000000;
    }
    uVar4 = (longlong)fVar7 + lVar6;
    if ((ulonglong)((longlong)fVar7 + lVar6) < 0x11) {
      uVar4 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar4;
  }
  FUN_14015b3b0(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



undefined8 FUN_1401bec80(longlong param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4)

{
  char cVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 8) == 0) {
    cVar1 = FUN_1401a8bb0(param_1,*(undefined4 *)(param_1 + 0x28),1);
    if (cVar1 == '\0') {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  FUN_14015b3b0(param_1);
  uVar2 = FUN_1401bd420(param_1,param_2,param_3,param_4);
  FUN_14015b3b0(param_1);
  return uVar2;
}



undefined8 FUN_1401bed00(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong *local_res8;
  undefined8 local_res20;
  undefined8 uVar5;
  undefined8 uVar6;
  
  uVar5 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  uVar6 = uVar2;
  FUN_140156b50(uVar2);
  plVar3 = (longlong *)
           FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x20),&local_res8,param_2,param_4,uVar5,uVar6,1);
  lVar4 = 0;
  if ((longlong *)*plVar3 != (longlong *)0x0) {
    lVar4 = *(longlong *)*plVar3;
  }
  if ((local_res8 != (longlong *)0x0) &&
     (local_res8[1] = local_res8[1] + -1, uVar2 = uVar6, local_res8[1] == 0)) {
    puVar1 = (undefined8 *)*local_res8;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
      uVar2 = uVar6;
    }
    FUN_140156970(local_res8);
  }
  if ((lVar4 != 0) && (*(char *)(lVar4 + 0x684) == '\0')) {
    local_res20 = 0;
    FUN_1401bcec0(lVar4 + 0x28,&local_res20);
  }
  FUN_140156be0(uVar2);
  return 1;
}



void FUN_1401bede0(longlong *param_1,undefined8 param_2,undefined4 param_3,longlong param_4,
                  int *param_5,undefined4 *param_6)

{
  undefined8 *puVar1;
  longlong lVar2;
  longlong lVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  int *piVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong lVar10;
  int *piVar11;
  longlong lVar12;
  longlong lVar13;
  longlong lVar14;
  int iVar15;
  int iVar16;
  ulonglong uVar17;
  ulonglong uVar18;
  double dVar19;
  longlong *local_res10;
  undefined **local_c8;
  undefined4 local_c0;
  undefined2 local_bc;
  undefined **local_b8;
  undefined8 local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined4 local_88;
  longlong local_80;
  undefined4 local_78;
  undefined4 local_74;
  undefined1 local_68 [8];
  undefined8 local_60;
  undefined8 local_58;
  undefined1 local_50;
  
  lVar3 = (longlong)param_5;
  local_60 = 0xfffffffffffffffe;
  FUN_140190d90(param_5,0);
  uVar17 = (ulonglong)*(int *)(lVar3 + 0x18);
  FUN_1401a7ac0(&local_90);
  local_80 = lVar3;
  lVar14 = 0;
  local_78 = 0;
  local_74 = *(undefined4 *)((longlong)param_1 + 0x6a4);
  local_90 = param_2;
  local_88 = param_3;
  iVar4 = FUN_1401a84e0(&local_90,param_6);
  if (-1 < iVar4) {
    local_c8 = Proud::AddrPort::vftable;
    local_c0 = *(undefined4 *)(param_4 + 8);
    local_bc = *(undefined2 *)(param_4 + 0xc);
    plVar9 = (longlong *)FUN_1401b9d00(param_1,&local_res10,&local_c8);
    lVar13 = lVar14;
    if ((longlong *)*plVar9 != (longlong *)0x0) {
      lVar13 = *(longlong *)*plVar9;
    }
    if ((local_res10 != (longlong *)0x0) &&
       (local_res10[1] = local_res10[1] + -1, local_res10[1] == 0)) {
      puVar1 = (undefined8 *)*local_res10;
      if (puVar1 != (undefined8 *)0x0) {
        (**(code **)*puVar1)(puVar1,1);
      }
      FUN_140156970(local_res10);
    }
    if (iVar4 < 1) {
      return;
    }
    lVar12 = uVar17 * 0x48;
    uVar18 = uVar17;
    do {
      lVar10 = 0;
      if (((longlong)(uVar17 + lVar14) < 0) || (*(int *)(lVar3 + 0x18) <= (int)uVar18)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      lVar2 = *(longlong *)(lVar3 + 0x10);
      *(undefined4 *)(lVar12 + 0x38 + lVar2) = *(undefined4 *)(param_4 + 8);
      *(undefined2 *)(lVar12 + 0x3c + lVar2) = *(undefined2 *)(param_4 + 0xc);
      if (lVar13 == 0) {
        if ((longlong *)param_1[0x2ae] != (longlong *)0x0) {
          lVar10 = *(longlong *)param_1[0x2ae];
        }
        if ((*(int *)(param_4 + 8) == *(int *)(lVar10 + 0xd0)) &&
           (*(short *)(param_4 + 0xc) == *(short *)(lVar10 + 0xd4))) {
          *(undefined4 *)(lVar12 + 0x28 + lVar2) = 1;
          FUN_1401affb0(param_1);
        }
        else {
          *(undefined4 *)(lVar12 + 0x28 + lVar2) = 0;
        }
      }
      else {
        *(undefined4 *)(lVar12 + 0x28 + lVar2) = *(undefined4 *)(lVar13 + 0x56c);
        dVar19 = (double)(**(code **)(param_1[0xe] + 0x1c0))(param_1 + 0xe);
        dVar19 = dVar19 - *(double *)(lVar13 + 0xc0);
        if (0.0 < dVar19) {
          *(double *)(lVar13 + 0x140) = dVar19;
        }
        uVar8 = (**(code **)(param_1[0xe] + 0x1c0))(param_1 + 0xe);
        *(undefined8 *)(lVar13 + 0xc0) = uVar8;
        *(int *)(lVar13 + 0x100) = *(int *)(lVar13 + 0x100) + 1;
      }
      uVar18 = (ulonglong)((int)uVar18 + 1);
      lVar14 = lVar14 + 1;
      lVar12 = lVar12 + 0x48;
    } while (lVar14 < iVar4);
    return;
  }
  FUN_1401568c0();
  param_5 = (int *)PTR_DAT_1403200a0;
  iVar5 = FUN_140156740(L"ExtractMessageFromUdpRecvQueue : addedCount < 0");
  iVar16 = 0;
  iVar4 = 0;
  if ((param_5 != (int *)0x0) && (iVar4 = 0, param_5 != (int *)PTR_DAT_1403200a0)) {
    iVar4 = param_5[-2];
  }
  iVar6 = iVar5;
  if (((iVar5 <= iVar4) && (iVar6 = iVar16, param_5 != (int *)0x0)) &&
     (param_5 != (int *)PTR_DAT_1403200a0)) {
    iVar6 = param_5[-2];
  }
  iVar4 = 1;
  if (1 < iVar6) {
    iVar4 = iVar6;
  }
  iVar6 = iVar16;
  if ((param_5 != (int *)0x0) && (param_5 != (int *)PTR_DAT_1403200a0)) {
    iVar6 = param_5[-2];
  }
  iVar15 = 0;
  if (iVar6 < iVar4) {
    if (param_5 == (int *)0x0) {
      param_5 = (int *)PTR_DAT_1403200a0;
    }
    if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (iVar4 == 0) {
      FUN_14004f990(&param_5);
    }
    else {
      iVar6 = iVar16;
      if ((param_5 != (int *)0x0) && (param_5 != (int *)PTR_DAT_1403200a0)) {
        iVar6 = param_5[-2];
      }
      if (iVar4 != iVar6) {
        piVar7 = (int *)FUN_140156940((longlong)iVar4 * 2 + 10);
        if (piVar7 != (int *)0x0) {
          *piVar7 = 0;
          piVar7[1] = 1;
        }
        *piVar7 = iVar4;
        iVar6 = iVar15;
        if ((param_5 != (int *)0x0) && (param_5 != (int *)PTR_DAT_1403200a0)) {
          iVar6 = param_5[-2];
        }
        piVar11 = (int *)PTR_DAT_1403200a0;
        if (iVar4 < iVar6) {
LAB_1401bef62:
          if (param_5 != (int *)0x0) {
            piVar11 = param_5;
          }
        }
        else {
          iVar4 = iVar16;
          if (param_5 != (int *)0x0) {
            if (param_5 != (int *)PTR_DAT_1403200a0) {
              iVar4 = param_5[-2];
            }
            goto LAB_1401bef62;
          }
        }
        FUN_140156770(piVar7 + 2,piVar11,iVar4);
        FUN_14004f990(&param_5);
        param_5 = piVar7 + 2;
      }
    }
  }
  FUN_14004f670(&param_5);
  piVar7 = param_5;
  if (param_5 == (int *)0x0) {
    piVar7 = (int *)PTR_DAT_1403200a0;
  }
  FUN_140156770(piVar7,L"ExtractMessageFromUdpRecvQueue : addedCount < 0",iVar5);
  piVar7 = param_5;
  if (param_5 == (int *)0x0) {
    piVar7 = (int *)PTR_DAT_1403200a0;
  }
  iVar5 = FUN_140156740(piVar7);
  iVar4 = 0;
  if (0 < iVar5) {
    iVar4 = iVar5;
  }
  iVar5 = iVar15;
  if ((param_5 != (int *)0x0) && (param_5 != (int *)PTR_DAT_1403200a0)) {
    iVar5 = param_5[-2];
  }
  if ((iVar5 <= iVar4) && (iVar4 = iVar15, param_5 != (int *)0x0)) {
    if (param_5 == (int *)PTR_DAT_1403200a0) goto LAB_1401bf01a;
    iVar4 = param_5[-2];
  }
  if (((param_5 != (int *)PTR_DAT_1403200a0) && (param_5 != (int *)0x0)) &&
     (param_5 + -2 != (int *)0x0)) {
    param_5[-2] = iVar4;
    *(undefined2 *)((longlong)param_5 + (longlong)iVar4 * 2) = 0;
  }
LAB_1401bf01a:
  local_b0 = 0;
  local_a8 = 0;
  local_a0 = 0;
  local_98 = 0;
  local_b8 = Proud::ByteArray::vftable;
  uVar8 = FUN_140181f50(local_68,*param_6,(int)param_1[0x2af],&param_5,&local_b8);
  (**(code **)(*param_1 + 0x88))(param_1,uVar8);
  FUN_1401858d0(&local_b8);
  piVar7 = param_5;
  if (((param_5 != (int *)0x0) && (param_5 != (int *)PTR_DAT_1403200a0)) &&
     (piVar11 = param_5 + -2, piVar11 != (int *)0x0)) {
    uVar8 = FUN_1401568c0();
    local_58 = uVar8;
    FUN_140156b50(uVar8);
    local_50 = 1;
    piVar7 = piVar7 + -1;
    *piVar7 = *piVar7 + -1;
    if (*piVar7 == 0) {
      FUN_140156970(piVar11);
    }
    FUN_140156be0(uVar8);
  }
  return;
}



void FUN_1401bf290(longlong *param_1,undefined8 param_2)

{
  longlong lVar1;
  ulonglong *puVar2;
  int iVar3;
  uint uVar4;
  uint uVar5;
  uint uVar6;
  uint *puVar7;
  undefined8 uVar8;
  ulonglong uVar9;
  uint *puVar10;
  uint uVar11;
  ulonglong uVar12;
  uint uVar13;
  undefined4 local_res8 [2];
  uint *local_res18;
  undefined1 local_res20 [8];
  undefined **local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_30;
  
  FUN_140190d90(param_2,0);
  (**(code **)(param_1[0xf] + 0x10))();
  uVar12 = 0;
  if (((longlong *)param_1[699] == (longlong *)0x0) ||
     (lVar1 = *(longlong *)param_1[699], uVar9 = lVar1 - 0x40, lVar1 == 0)) {
    uVar9 = uVar12;
  }
  iVar3 = FUN_1401a8ac0(uVar9 + 0x130,param_2,1,*(undefined4 *)((longlong)param_1 + 0x6a4),
                        local_res8);
  if (-1 < iVar3) {
    return;
  }
  FUN_1401568c0();
  local_res18 = (uint *)PTR_DAT_1403200a0;
  uVar4 = FUN_140156740(L"Received stream from TCP server became inconsistent!");
  uVar6 = 0;
  uVar9 = uVar12;
  if ((local_res18 != (uint *)0x0) && (uVar9 = 0, local_res18 != (uint *)PTR_DAT_1403200a0)) {
    uVar9 = (ulonglong)local_res18[-2];
  }
  uVar5 = uVar4;
  if ((((int)uVar4 <= (int)uVar9) && (uVar5 = uVar6, local_res18 != (uint *)0x0)) &&
     (local_res18 != (uint *)PTR_DAT_1403200a0)) {
    uVar5 = local_res18[-2];
  }
  uVar11 = 1;
  if (1 < (int)uVar5) {
    uVar11 = uVar5;
  }
  uVar5 = uVar6;
  if ((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_1403200a0)) {
    uVar5 = local_res18[-2];
  }
  uVar13 = 0;
  if ((int)uVar5 < (int)uVar11) {
    if (local_res18 == (uint *)0x0) {
      local_res18 = (uint *)PTR_DAT_1403200a0;
    }
    if ((int)uVar11 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar11 == 0) {
      FUN_14004f990(&local_res18);
    }
    else {
      uVar5 = uVar6;
      if ((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_1403200a0)) {
        uVar5 = local_res18[-2];
      }
      if (uVar11 != uVar5) {
        puVar7 = (uint *)FUN_140156940((longlong)(int)uVar11 * 2 + 10);
        if (puVar7 != (uint *)0x0) {
          *puVar7 = 0;
          puVar7[1] = 1;
        }
        *puVar7 = uVar11;
        uVar5 = uVar13;
        if ((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_1403200a0)) {
          uVar5 = local_res18[-2];
        }
        puVar10 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar11 < (int)uVar5) {
LAB_1401bf40b:
          if (local_res18 != (uint *)0x0) {
            puVar10 = local_res18;
          }
        }
        else {
          uVar11 = uVar6;
          if (local_res18 != (uint *)0x0) {
            if (local_res18 != (uint *)PTR_DAT_1403200a0) {
              uVar11 = local_res18[-2];
            }
            goto LAB_1401bf40b;
          }
        }
        FUN_140156770(puVar7 + 2,puVar10,uVar11);
        FUN_14004f990(&local_res18);
        local_res18 = puVar7 + 2;
      }
    }
  }
  FUN_14004f670(&local_res18);
  puVar7 = local_res18;
  if (local_res18 == (uint *)0x0) {
    puVar7 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar7,L"Received stream from TCP server became inconsistent!",uVar4);
  puVar7 = local_res18;
  if (local_res18 == (uint *)0x0) {
    puVar7 = (uint *)PTR_DAT_1403200a0;
  }
  uVar6 = FUN_140156740(puVar7);
  uVar4 = 0;
  if (0 < (int)uVar6) {
    uVar4 = uVar6;
  }
  uVar6 = uVar13;
  if ((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_1403200a0)) {
    uVar6 = local_res18[-2];
  }
  if (((int)uVar6 <= (int)uVar4) && (uVar4 = uVar13, local_res18 != (uint *)0x0)) {
    if (local_res18 == (uint *)PTR_DAT_1403200a0) goto LAB_1401bf4bb;
    uVar4 = local_res18[-2];
  }
  if (((local_res18 != (uint *)PTR_DAT_1403200a0) && (local_res18 != (uint *)0x0)) &&
     (local_res18 + -2 != (uint *)0x0)) {
    local_res18[-2] = uVar4;
    *(undefined2 *)((longlong)local_res18 + (longlong)(int)uVar4 * 2) = 0;
  }
LAB_1401bf4bb:
  local_48 = 0;
  local_40 = 0;
  local_38 = 0;
  local_30 = 0;
  local_50 = Proud::ByteArray::vftable;
  uVar8 = FUN_140181f50(local_res20,local_res8[0],1,&local_res18,&local_50);
  (**(code **)(*param_1 + 0x80))(param_1,uVar8);
  FUN_1401858d0(&local_50);
  puVar7 = local_res18;
  if (((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar10 = local_res18 + -2, puVar10 != (uint *)0x0)) {
    uVar8 = FUN_1401568c0();
    FUN_140156b50(uVar8);
    puVar7 = puVar7 + -1;
    *puVar7 = *puVar7 - 1;
    if (*puVar7 == 0) {
      FUN_140156970(puVar10);
    }
    FUN_140156be0(uVar8);
  }
  if ((((longlong *)param_1[699] != (longlong *)0x0) &&
      (lVar1 = *(longlong *)param_1[699], lVar1 != 0)) &&
     ((puVar2 = *(ulonglong **)(lVar1 + 0xe8), puVar2 != (ulonglong *)0x0 && (*puVar2 != 0)))) {
    if (puVar2 != (ulonglong *)0x0) {
      uVar12 = *puVar2;
    }
    FUN_1401855c0(uVar12);
  }
  return;
}



void FUN_1401bf5b0(longlong *param_1)

{
  int *piVar1;
  int iVar2;
  undefined8 uVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  undefined **ppuVar6;
  undefined8 *puVar7;
  longlong lVar8;
  longlong lVar9;
  longlong *local_res8;
  undefined **local_88;
  undefined4 uStack_80;
  undefined2 uStack_7c;
  undefined2 uStack_7a;
  undefined4 local_78 [2];
  undefined8 local_70;
  undefined1 local_68;
  undefined4 local_64;
  undefined1 local_60;
  undefined1 local_5f;
  undefined1 local_58 [4];
  undefined4 local_54;
  longlong local_50;
  longlong local_48;
  int local_40;
  int local_3c;
  
  FUN_1401544a0(local_58);
  FUN_140153d90(local_58);
  FUN_140154600(local_58,0x800);
  FUN_140154600(local_58,0);
  FUN_14004fd90(local_58,0xc);
  lVar9 = 0;
  lVar8 = lVar9;
  if ((longlong *)param_1[0x2ae] != (longlong *)0x0) {
    lVar8 = *(longlong *)param_1[0x2ae];
  }
  local_88 = *(undefined ***)(lVar8 + 8);
  uStack_80 = *(undefined4 *)(lVar8 + 0x10);
  uStack_7c = (undefined2)*(undefined4 *)(lVar8 + 0x14);
  uStack_7a = (undefined2)((uint)*(undefined4 *)(lVar8 + 0x14) >> 0x10);
  local_54 = 0;
  if (local_50 == 0) {
    if (local_48 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (local_48 == 0) {
    if (local_50 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar2 = *(int *)(local_50 + 0x18);
    FUN_140050060(local_50,iVar2 + 0x10);
    lVar8 = lVar9;
    if (*(int *)(local_50 + 0x18) != 0) {
      lVar8 = *(longlong *)(local_50 + 0x10);
    }
    puVar7 = (undefined8 *)(lVar8 + iVar2);
    goto LAB_1401bf698;
  }
  lVar8 = (longlong)local_40;
  local_40 = local_40 + 0x10;
  if ((local_40 < 0) || (local_3c < local_40)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  puVar7 = (undefined8 *)(local_48 + lVar8);
LAB_1401bf698:
  *puVar7 = local_88;
  puVar7[1] = CONCAT26(uStack_7a,CONCAT24(uStack_7c,uStack_80));
  FUN_1400501f0(local_58);
  if (((char)param_1[0x2f2] != '\0') || ((int)param_1[0xd9] != 0)) {
    lVar8 = lVar9;
    if ((longlong *)param_1[0x2ae] != (longlong *)0x0) {
      lVar8 = *(longlong *)param_1[0x2ae];
    }
    (*(code *)**(undefined8 **)(lVar8 + 200))((undefined8 *)(lVar8 + 200),&local_res8);
    FUN_1401bdd00(param_1,1,L"Sending ServerHolepunch: %s",local_res8);
    if (((local_res8 != (longlong *)0x0) && (local_res8 != (longlong *)PTR_DAT_1403200a0)) &&
       (local_res8 + -1 != (longlong *)0x0)) {
      ppuVar6 = (undefined **)FUN_1401568c0();
      local_88 = ppuVar6;
      FUN_140156b50(ppuVar6);
      uStack_80 = CONCAT31(uStack_80._1_3_,1);
      piVar1 = (int *)((longlong)local_res8 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_res8 + -1);
      }
      FUN_140156be0(ppuVar6);
    }
  }
  local_78[0] = 5;
  local_70 = 0;
  local_68 = 1;
  local_64 = 0xffffffff;
  local_60 = 1;
  local_5f = DAT_140320dfc;
  lVar8 = lVar9;
  if ((longlong *)param_1[0x2ae] != (longlong *)0x0) {
    lVar8 = *(longlong *)param_1[0x2ae];
  }
  local_88 = Proud::AddrPort::vftable;
  uStack_80 = *(undefined4 *)(lVar8 + 0xd0);
  uStack_7c = *(undefined2 *)(lVar8 + 0xd4);
  if (((longlong *)param_1[0x2a4] != (longlong *)0x0) &&
     (lVar8 = *(longlong *)param_1[0x2a4], lVar8 != 0)) {
    lVar9 = lVar8 + -0x40;
  }
  uVar3 = (**(code **)(param_1[0xe] + 0x1c0))();
  uVar5 = (**(code **)(*param_1 + 0x30))(param_1);
  uVar4 = FUN_14019e480(uVar5,1);
  FUN_1401e75f0(lVar9,1,uVar4,&local_88,local_58,uVar3,local_78);
  local_res8 = &local_50;
  FUN_1401560e0(&local_50);
  if ((local_48 != 0) && (local_3c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



void FUN_1401bf860(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  char cVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong lVar5;
  longlong lVar6;
  
  uVar3 = (**(code **)(*param_1 + 0x58))(param_1,param_2,param_3,param_4,0xfffffffffffffffe);
  FUN_140156b50(uVar3);
  if ((((((int)param_1[0xd4] != 2) && ((longlong *)param_1[0x2a4] != (longlong *)0x0)) &&
       (plVar1 = *(longlong **)param_1[0x2a4], plVar1 != (longlong *)0x0)) &&
      ((cVar2 = (**(code **)(*plVar1 + 0x10))(), cVar2 == '\0' &&
       ((longlong *)param_1[0x2ae] != (longlong *)0x0)))) &&
     ((lVar4 = *(longlong *)param_1[0x2ae], lVar4 != 0 &&
      ((*(char *)(lVar4 + 0x80) != '\x01' && ((int)param_1[0x2af] != 0)))))) {
    plVar1 = (longlong *)param_1[0x2ae];
    lVar4 = 0;
    lVar6 = lVar4;
    if (plVar1 != (longlong *)0x0) {
      lVar6 = *plVar1;
    }
    if (*(int *)(lVar6 + 0xd0) != 0) {
      lVar6 = lVar4;
      if (plVar1 != (longlong *)0x0) {
        lVar6 = *plVar1;
      }
      if (*(int *)(lVar6 + 0xd0) != -1) {
        lVar6 = lVar4;
        if (plVar1 != (longlong *)0x0) {
          lVar6 = *plVar1;
        }
        if (*(double *)(lVar6 + 0x100) != DAT_140320ca8) {
          lVar6 = lVar4;
          if ((longlong *)param_1[0x2ae] != (longlong *)0x0) {
            lVar6 = *(longlong *)param_1[0x2ae];
          }
          lVar5 = lVar4;
          if (param_1[0xbb] != 0) {
            lVar5 = *(longlong *)(param_1[0xbb] + 0x38);
          }
          *(double *)(lVar6 + 0x100) = *(double *)(lVar6 + 0x100) - *(double *)(lVar5 + 0x100);
          lVar6 = lVar4;
          if ((longlong *)param_1[0x2ae] != (longlong *)0x0) {
            lVar6 = *(longlong *)param_1[0x2ae];
          }
          if (*(double *)(lVar6 + 0x100) < 0.0) {
            if ((longlong *)param_1[0x2ae] != (longlong *)0x0) {
              lVar4 = *(longlong *)param_1[0x2ae];
            }
            *(undefined8 *)(lVar4 + 0x100) = DAT_140320cb0;
            FUN_1401bf5b0(param_1);
          }
        }
      }
    }
  }
  FUN_140156be0(uVar3);
  return;
}



void FUN_1401bfa30(longlong param_1,longlong param_2,undefined8 param_3)

{
  longlong *plVar1;
  longlong *plVar2;
  undefined8 *puVar3;
  uint uVar4;
  uint uVar5;
  undefined8 uVar6;
  uint *puVar7;
  undefined8 uVar8;
  uint *puVar9;
  uint uVar10;
  uint uVar11;
  uint uVar12;
  uint uVar13;
  uint *local_res8;
  longlong *local_res10;
  undefined1 local_res20 [8];
  undefined **local_90;
  undefined4 local_88;
  undefined2 local_84;
  undefined8 local_80;
  undefined1 local_78;
  undefined8 local_70;
  undefined1 local_68;
  undefined **local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  
  plVar2 = (longlong *)(param_1 + -0x88);
  uVar6 = (**(code **)(*plVar2 + 0x58))(plVar2);
  local_80 = uVar6;
  FUN_140156b50(uVar6);
  local_78 = 1;
  local_90 = Proud::AddrPort::vftable;
  local_88 = *(undefined4 *)(param_2 + 8);
  local_84 = *(undefined2 *)(param_2 + 0xc);
  FUN_1401b9d00(plVar2,&local_res10,&local_90);
  FUN_1401568c0();
  local_res8 = (uint *)PTR_DAT_1403200a0;
  uVar4 = FUN_140156740(param_3);
  uVar12 = 0;
  uVar13 = 0;
  uVar10 = uVar12;
  if ((local_res8 != (uint *)0x0) && (uVar10 = 0, local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar10 = local_res8[-2];
  }
  uVar5 = uVar4;
  if ((((int)uVar4 <= (int)uVar10) && (uVar5 = uVar13, local_res8 != (uint *)0x0)) &&
     (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar5 = local_res8[-2];
  }
  uVar10 = 1;
  if (1 < (int)uVar5) {
    uVar10 = uVar5;
  }
  uVar5 = uVar13;
  if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar5 = local_res8[-2];
  }
  uVar11 = 0;
  if ((int)uVar5 < (int)uVar10) {
    if (local_res8 == (uint *)0x0) {
      local_res8 = (uint *)PTR_DAT_1403200a0;
    }
    if ((int)uVar10 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar10 == 0) {
      FUN_14004f990(&local_res8);
    }
    else {
      uVar5 = uVar13;
      if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
        uVar5 = local_res8[-2];
      }
      if (uVar10 != uVar5) {
        puVar7 = (uint *)FUN_140156940((longlong)(int)uVar10 * 2 + 10);
        if (puVar7 != (uint *)0x0) {
          *puVar7 = 0;
          puVar7[1] = 1;
        }
        *puVar7 = uVar10;
        uVar5 = uVar11;
        if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
          uVar5 = local_res8[-2];
        }
        puVar9 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar10 < (int)uVar5) {
LAB_1401bfba3:
          if (local_res8 != (uint *)0x0) {
            puVar9 = local_res8;
          }
        }
        else {
          uVar10 = uVar13;
          if (local_res8 != (uint *)0x0) {
            if (local_res8 != (uint *)PTR_DAT_1403200a0) {
              uVar10 = local_res8[-2];
            }
            goto LAB_1401bfba3;
          }
        }
        FUN_140156770(puVar7 + 2,puVar9,uVar10);
        FUN_14004f990(&local_res8);
        local_res8 = puVar7 + 2;
      }
    }
  }
  FUN_14004f670(&local_res8);
  puVar7 = local_res8;
  if (local_res8 == (uint *)0x0) {
    puVar7 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar7,param_3,uVar4);
  puVar7 = local_res8;
  if (local_res8 == (uint *)0x0) {
    puVar7 = (uint *)PTR_DAT_1403200a0;
  }
  uVar4 = FUN_140156740(puVar7);
  plVar1 = local_res10;
  uVar10 = 0;
  if (0 < (int)uVar4) {
    uVar10 = uVar4;
  }
  uVar4 = uVar11;
  if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar4 = local_res8[-2];
  }
  if (((int)uVar4 <= (int)uVar10) && (uVar10 = uVar11, local_res8 != (uint *)0x0)) {
    if (local_res8 == (uint *)PTR_DAT_1403200a0) goto LAB_1401bfc53;
    uVar10 = local_res8[-2];
  }
  if (((local_res8 != (uint *)PTR_DAT_1403200a0) && (local_res8 != (uint *)0x0)) &&
     (local_res8 + -2 != (uint *)0x0)) {
    local_res8[-2] = uVar10;
    *(undefined2 *)((longlong)local_res8 + (longlong)(int)uVar10 * 2) = 0;
  }
LAB_1401bfc53:
  if ((local_res10 != (longlong *)0x0) && (*local_res10 != 0)) {
    uVar12 = *(uint *)(*local_res10 + 0x56c);
  }
  local_58 = 0;
  local_50 = 0;
  local_48 = 0;
  local_40 = 0;
  local_60 = Proud::ByteArray::vftable;
  uVar8 = FUN_140181f50(local_res20,0x1f,uVar12,&local_res8,&local_60);
  (**(code **)(*plVar2 + 0x88))(plVar2,uVar8);
  FUN_1401858d0(&local_60);
  puVar7 = local_res8;
  if (((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar9 = local_res8 + -2, puVar9 != (uint *)0x0)) {
    uVar8 = FUN_1401568c0();
    local_70 = uVar8;
    FUN_140156b50(uVar8);
    local_68 = 1;
    puVar7 = puVar7 + -1;
    *puVar7 = *puVar7 - 1;
    if (*puVar7 == 0) {
      FUN_140156970(puVar9);
    }
    FUN_140156be0(uVar8);
    local_68 = 0;
  }
  local_res8 = (uint *)PTR_DAT_1403200a0;
  if (plVar1 != (longlong *)0x0) {
    plVar1 = plVar1 + 1;
    *plVar1 = *plVar1 + -1;
    uVar6 = local_80;
    if (*plVar1 == 0) {
      puVar3 = (undefined8 *)*local_res10;
      if (puVar3 != (undefined8 *)0x0) {
        (**(code **)*puVar3)(puVar3,1);
      }
      FUN_140156970(local_res10);
      uVar6 = local_80;
    }
  }
  FUN_140156be0(uVar6);
  return;
}



// WARNING: Removing unreachable block (ram,0x0001401c017c)
// WARNING: Removing unreachable block (ram,0x0001401c018b)
// WARNING: Removing unreachable block (ram,0x0001401c0190)
// WARNING: Removing unreachable block (ram,0x0001401c01ce)
// WARNING: Removing unreachable block (ram,0x0001401c01a0)
// WARNING: Removing unreachable block (ram,0x0001401c01bf)
// WARNING: Removing unreachable block (ram,0x0001401c01b1)
// WARNING: Removing unreachable block (ram,0x0001401c01c7)
// WARNING: Removing unreachable block (ram,0x0001401c01cc)

undefined8 FUN_1401bfd70(undefined8 *param_1,LPCWSTR param_2)

{
  int *piVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  int iVar6;
  DWORD DVar7;
  BOOL BVar8;
  longlong lVar9;
  undefined8 *puVar10;
  undefined8 uVar11;
  HANDLE hFile;
  undefined8 uVar12;
  undefined *puVar13;
  undefined8 *puVar14;
  undefined8 *puVar15;
  undefined *puVar16;
  undefined *puVar17;
  HANDLE pvVar18;
  undefined8 *local_res8;
  LPCWSTR local_res10;
  undefined2 local_res18 [4];
  undefined8 *local_res20;
  undefined *local_118;
  undefined8 *local_110;
  undefined8 *local_108;
  undefined8 *local_100;
  undefined8 *local_f8;
  HANDLE local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined1 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  longlong local_c0;
  undefined *local_b8;
  undefined4 local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined1 local_98;
  undefined8 local_90;
  undefined1 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined1 local_70;
  undefined *local_68 [5];
  
  local_80 = 0xfffffffffffffffe;
  local_res8 = param_1;
  local_res10 = param_2;
  local_e0 = (**(code **)(param_1[-0xe] + 0x58))();
  FUN_140156b50(local_e0);
  puVar4 = local_res8;
  local_d8 = 1;
  puVar14 = (undefined8 *)0x0;
  local_110 = (undefined8 *)0x0;
  local_f8 = (undefined8 *)0x0;
  local_108 = (undefined8 *)0x0;
  local_100 = (undefined8 *)0x0;
  lVar9 = param_1[0x2eb];
  puVar2 = puVar14;
  puVar3 = puVar14;
  puVar10 = local_110;
  while (local_110 = puVar10, lVar9 != 0) {
    lVar9 = FUN_1401bcdf0(param_1 + 0x2e8,local_68);
    puVar10 = (undefined8 *)FUN_140156940(0x28);
    local_res8 = puVar10;
    local_res20 = puVar10;
    if (puVar10 != (undefined8 *)0x0) {
      FUN_1401568c0();
      puVar10[2] = PTR_DAT_1403200a0;
      FUN_14004f4f0(puVar10 + 2,lVar9);
      *(undefined4 *)(puVar10 + 3) = *(undefined4 *)(lVar9 + 8);
      puVar10[4] = *(undefined8 *)(lVar9 + 0x10);
    }
    puVar16 = local_68[0];
    puVar10[1] = puVar2;
    *puVar10 = 0;
    puVar14 = (undefined8 *)((longlong)puVar14 + 1);
    puVar15 = puVar10;
    puVar5 = puVar10;
    if (puVar2 != (undefined8 *)0x0) {
      *puVar2 = puVar10;
      puVar15 = puVar3;
      puVar5 = local_108;
    }
    local_108 = puVar5;
    local_100 = puVar10;
    local_f8 = puVar14;
    if (((local_68[0] != (undefined *)0x0) && (local_68[0] != PTR_DAT_1403200a0)) &&
       (puVar13 = local_68[0] + -8, puVar13 != (undefined *)0x0)) {
      uVar11 = FUN_1401568c0();
      local_90 = uVar11;
      FUN_140156b50(uVar11);
      local_88 = 1;
      piVar1 = (int *)(puVar16 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar13);
      }
      FUN_140156be0(uVar11);
      local_88 = 0;
    }
    puVar2 = puVar10;
    puVar3 = puVar15;
    param_1 = puVar4;
    puVar10 = local_110;
    lVar9 = puVar4[0x2eb];
  }
  FUN_140156be0(local_e0);
  local_d8 = 0;
  local_f0 = (HANDLE)0x0;
  local_e8 = 0;
  hFile = CreateFileW(local_res10,0x40000000,1,(LPSECURITY_ATTRIBUTES)0x0,2,0x80,(HANDLE)0x0);
  pvVar18 = hFile;
  if ((hFile == (HANDLE)0xffffffffffffffff) &&
     (iVar6 = FUN_1401961b0(), hFile = (HANDLE)0x0, pvVar18 = local_f0, iVar6 < 0)) {
    for (; puVar14 != (undefined8 *)0x0; puVar14 = (undefined8 *)((longlong)puVar14 + -1)) {
      if (puVar3 == (undefined8 *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      puVar2 = (undefined8 *)*puVar3;
      FUN_14004f990(puVar3 + 2);
      FUN_140156970(puVar3);
      puVar3 = puVar2;
    }
    uVar11 = 0;
  }
  else {
    local_f0 = pvVar18;
    local_d0 = 0;
    DVar7 = SetFilePointer(hFile,0,(PLONG)((longlong)&local_d0 + 4),0);
    if (DVar7 == 0xffffffff) {
      FUN_1401961b0();
    }
    local_res18[0] = 0xfeff;
    BVar8 = WriteFile(hFile,local_res18,2,(LPDWORD)&local_res8,(LPOVERLAPPED)0x0);
    if (BVar8 == 0) {
      FUN_1401961b0();
    }
    FUN_1401568c0();
    local_118 = PTR_DAT_1403200a0;
    puVar16 = PTR_DAT_1403200a0;
    while (puVar14 != (undefined8 *)0x0) {
      FUN_1401bcdf0(&local_110,&local_b8);
      local_c8 = local_a8;
      puVar14 = (undefined8 *)FUN_140196870(&local_c8,&local_c0,&DAT_140267828);
      puVar16 = local_b8;
      if (local_b8 == (undefined *)0x0) {
        puVar16 = PTR_DAT_1403200a0;
      }
      uVar11 = *puVar14;
      uVar12 = FUN_1401a4a50(local_b0);
      FUN_14004ce50(&local_118,L"[%s] [%s] %s\r\n",uVar12,uVar11,puVar16);
      LOCK();
      piVar1 = (int *)(local_c0 + -8);
      iVar6 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
      if (iVar6 + -1 < 1) {
        (**(code **)(**(longlong **)(local_c0 + -0x18) + 8))();
      }
      hFile = local_f0;
      puVar16 = local_118;
      iVar6 = 0;
      puVar13 = PTR_DAT_1403200a0;
      if (local_118 != (undefined *)0x0) {
        pvVar18 = (HANDLE)0x0;
        if (local_118 != PTR_DAT_1403200a0) {
          pvVar18 = (HANDLE)(ulonglong)*(uint *)(local_118 + -8);
        }
        iVar6 = (int)pvVar18;
        puVar13 = local_118;
      }
      BVar8 = WriteFile(local_f0,puVar13,iVar6 * 2,(LPDWORD)&local_res20,(LPOVERLAPPED)0x0);
      if (BVar8 == 0) {
        FUN_1401961b0();
      }
      puVar13 = local_b8;
      puVar10 = local_110;
      puVar14 = local_f8;
      if (((local_b8 != (undefined *)0x0) && (local_b8 != PTR_DAT_1403200a0)) &&
         (puVar17 = local_b8 + -8, puVar17 != (undefined *)0x0)) {
        uVar11 = FUN_1401568c0();
        local_a0 = uVar11;
        FUN_140156b50(uVar11);
        local_98 = 1;
        piVar1 = (int *)(puVar13 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar17);
        }
        FUN_140156be0(uVar11);
        local_98 = 0;
        puVar10 = local_110;
        puVar14 = local_f8;
      }
    }
    if (hFile != (HANDLE)0x0) {
      CloseHandle(hFile);
      local_f0 = (HANDLE)0x0;
    }
    if (((puVar16 != (undefined *)0x0) && (puVar16 != PTR_DAT_1403200a0)) &&
       (puVar16 + -8 != (undefined *)0x0)) {
      uVar11 = FUN_1401568c0();
      local_78 = uVar11;
      FUN_140156b50(uVar11);
      local_70 = 1;
      piVar1 = (int *)(puVar16 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar16 + -8);
      }
      FUN_140156be0(uVar11);
    }
    if (puVar10 != (undefined8 *)0x0) {
      (**(code **)*puVar10)(puVar10,1);
    }
    uVar11 = 1;
  }
  return uVar11;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401c0210(longlong *param_1)

{
  undefined *puVar1;
  int *piVar2;
  longlong *plVar3;
  undefined *puVar4;
  int iVar5;
  undefined8 uVar6;
  undefined **ppuVar7;
  longlong lVar8;
  longlong lVar9;
  longlong lVar10;
  int iVar11;
  double dVar12;
  undefined *local_res8;
  undefined1 local_res10 [8];
  undefined **local_50;
  undefined4 local_48;
  undefined2 local_44;
  undefined **local_40;
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 local_20;
  
  dVar12 = (double)(**(code **)(param_1[0xe] + 0x1c0))();
  if (((((longlong *)param_1[699] != (longlong *)0x0) &&
       (lVar9 = *(longlong *)param_1[699], lVar9 != 0)) && (lVar9 != 0x40)) &&
     (_DAT_140320de8 < dVar12 - (double)param_1[0x2f4])) {
    lVar10 = 0;
    lVar8 = lVar10;
    if (lVar9 != 0) {
      lVar8 = lVar9 + -0x40;
    }
    iVar11 = *(int *)(lVar8 + 0x1a4);
    plVar3 = (longlong *)param_1[0x2a4];
    if (((plVar3 != (longlong *)0x0) && (*plVar3 != 0)) && (*plVar3 != 0x40)) {
      lVar9 = lVar10;
      if ((longlong *)param_1[0x2ae] != (longlong *)0x0) {
        lVar9 = *(longlong *)param_1[0x2ae];
      }
      local_50 = Proud::AddrPort::vftable;
      local_48 = *(undefined4 *)(lVar9 + 0xd0);
      local_44 = *(undefined2 *)(lVar9 + 0xd4);
      if (*plVar3 != 0) {
        lVar10 = *plVar3 + -0x40;
      }
      iVar5 = FUN_14019f0a0(*(undefined8 *)(lVar10 + 0x108),&local_50);
      iVar11 = iVar11 + iVar5;
    }
    if ((double)param_1[0x2f5] == 0.0) {
      if (DAT_140320dc4 < iVar11) {
        param_1[0x2f5] = (longlong)dVar12;
      }
    }
    else if (DAT_140320dc4 < iVar11) {
      if (_DAT_140320de0 < dVar12 - (double)param_1[0x2f5]) {
        param_1[0x2f5] = (longlong)dVar12;
        FUN_1401568c0();
        local_res8 = PTR_DAT_1403200a0;
        FUN_14004ce50(&local_res8,L"%d bytes in send queue",iVar11);
        local_38 = 0;
        local_30 = 0;
        local_28 = 0;
        local_20 = 0;
        local_40 = Proud::ByteArray::vftable;
        uVar6 = FUN_140181f50(local_res10,0x25,1,&local_res8,&local_40);
        (**(code **)(*param_1 + 0x88))(param_1,uVar6);
        FUN_1401858d0(&local_40);
        puVar4 = local_res8;
        if (((local_res8 != (undefined *)0x0) && (local_res8 != PTR_DAT_1403200a0)) &&
           (puVar1 = local_res8 + -8, puVar1 != (undefined *)0x0)) {
          ppuVar7 = (undefined **)FUN_1401568c0();
          local_50 = ppuVar7;
          FUN_140156b50(ppuVar7);
          local_48 = CONCAT31(local_48._1_3_,1);
          piVar2 = (int *)(puVar4 + -4);
          *piVar2 = *piVar2 + -1;
          if (*piVar2 == 0) {
            FUN_140156970(puVar1);
          }
          FUN_140156be0(ppuVar7);
        }
      }
    }
    else {
      param_1[0x2f5] = 0;
    }
    param_1[0x2f4] = (longlong)dVar12;
  }
  return;
}



void FUN_1401c0470(longlong param_1,longlong *param_2)

{
  undefined8 *puVar1;
  longlong *plVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  if ((undefined8 *)*param_2 == (undefined8 *)0x0) {
    plVar2 = (longlong *)0x0;
  }
  else {
    plVar2 = *(longlong **)*param_2;
  }
  (**(code **)(*plVar2 + 8))();
  uVar3 = FUN_1401bd0a0(param_1 + 0x1700,param_2,*(undefined8 *)(param_1 + 0x1710),0,uVar3);
  if (*(undefined8 **)(param_1 + 0x1710) == (undefined8 *)0x0) {
    *(undefined8 *)(param_1 + 0x1708) = uVar3;
  }
  else {
    **(undefined8 **)(param_1 + 0x1710) = uVar3;
  }
  *(undefined8 *)(param_1 + 0x1710) = uVar3;
  if ((*param_2 != 0) &&
     (*(longlong *)(*param_2 + 8) = *(longlong *)(*param_2 + 8) + -1,
     *(longlong *)(*param_2 + 8) == 0)) {
    param_2 = (longlong *)*param_2;
    puVar1 = (undefined8 *)*param_2;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(param_2);
  }
  return;
}



undefined8 FUN_1401c0530(longlong param_1,uint *param_2)

{
  uint *puVar1;
  ulonglong uVar2;
  
  uVar2 = (ulonglong)*param_2 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (puVar1 = *(uint **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (puVar1 != (uint *)0x0 && ((uint)uVar2 == puVar1[8] % *(uint *)(param_1 + 0x28)));
        puVar1 = *(uint **)(puVar1 + 4)) {
      if (*puVar1 == *param_2) {
        FUN_1401bd320(param_1,puVar1);
        return 1;
      }
    }
  }
  return 0;
}



void FUN_1401c05a0(void)

{
  FUN_1401beb00();
  return;
}



ushort * FUN_1401c05c0(longlong param_1,ushort *param_2)

{
  ushort *puVar1;
  ulonglong uVar2;
  longlong lVar3;
  
  uVar2 = (ulonglong)*param_2 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (puVar1 = *(ushort **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (puVar1 != (ushort *)0x0 &&
        ((uint)uVar2 == *(uint *)(puVar1 + 0x10) % *(uint *)(param_1 + 0x28)));
        puVar1 = *(ushort **)(puVar1 + 8)) {
      if (*puVar1 == *param_2) {
        return puVar1 + 4;
      }
    }
  }
  lVar3 = FUN_1401bec80(param_1,param_2,uVar2);
  return (ushort *)(lVar3 + 8);
}



// WARNING: Removing unreachable block (ram,0x0001401c0add)
// WARNING: Removing unreachable block (ram,0x0001401c0ab6)
// WARNING: Removing unreachable block (ram,0x0001401c0719)
// WARNING: Removing unreachable block (ram,0x0001401c0728)
// WARNING: Removing unreachable block (ram,0x0001401c07ae)
// WARNING: Removing unreachable block (ram,0x0001401c0aab)
// WARNING: Removing unreachable block (ram,0x0001401c073a)
// WARNING: Removing unreachable block (ram,0x0001401c0742)
// WARNING: Removing unreachable block (ram,0x0001401c074c)
// WARNING: Removing unreachable block (ram,0x0001401c0abc)
// WARNING: Removing unreachable block (ram,0x0001401c07a3)

void FUN_1401c0630(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  uint *puVar1;
  undefined8 *puVar2;
  ulonglong uVar3;
  double dVar4;
  longlong *plVar5;
  char cVar6;
  uint uVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *plVar12;
  longlong local_res8;
  longlong *local_res10;
  longlong *local_res18;
  
  uVar8 = (**(code **)(*param_1 + 0x58))(param_1,param_2,param_3,param_4,0xfffffffffffffffe);
  FUN_140156b50(uVar8);
  dVar4 = (double)(**(code **)(param_1[0xe] + 0x1c0))();
  plVar12 = (longlong *)0x0;
  plVar10 = plVar12;
  if (param_1[0x2e8] != 0) {
    plVar10 = (longlong *)param_1[0x2e6];
  }
  while (plVar10 != (longlong *)0x0) {
    plVar11 = (longlong *)plVar10[1];
    plVar9 = plVar12;
    if ((plVar11 != (longlong *)0x0) && (*plVar11 != 0)) {
      plVar9 = (longlong *)(*plVar11 + -0x40);
    }
    if (dVar4 - (double)plVar9[0x29] <= DAT_140320d10 + 10.0) {
      plVar10 = (longlong *)plVar10[2];
    }
    else {
      local_res8 = 0;
      if (plVar11 != (longlong *)0x0) {
        *(longlong *)(plVar10[1] + 8) = plVar11[1] + 1;
        local_res8 = plVar10[1];
      }
      FUN_1401c0470(param_1,&local_res8);
      plVar11 = (longlong *)plVar10[2];
      FUN_1401bd320(param_1 + 0x2e4,plVar10,0);
      plVar10 = plVar11;
    }
  }
  plVar10 = plVar12;
  if (param_1[0x2d9] != 0) {
    plVar10 = (longlong *)param_1[0x2d7];
  }
  while (plVar10 != (longlong *)0x0) {
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    local_res18 = (longlong *)0x0;
    if (plVar10[1] != 0) {
      *(longlong *)(plVar10[1] + 8) = *(longlong *)(plVar10[1] + 8) + 1;
      local_res18 = (longlong *)plVar10[1];
    }
    plVar11 = local_res18;
    plVar9 = plVar12;
    if (local_res18 != (longlong *)0x0) {
      plVar9 = (longlong *)*local_res18;
    }
    if ((int)plVar9[0xd0] == 0) {
      if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      plVar9 = (longlong *)plVar10[2];
      FUN_1401bd320(param_1 + 0x2d5,plVar10,0);
      plVar10 = plVar12;
      if (plVar11 != (longlong *)0x0) {
        plVar10 = (longlong *)*plVar11;
      }
      uVar7 = (**(code **)(*plVar10 + 8))();
      uVar3 = (ulonglong)uVar7 % (ulonglong)*(uint *)(param_1 + 0x2cf);
      if (param_1[0x2cb] != 0) {
        puVar1 = *(uint **)(param_1[0x2cb] + uVar3 * 8);
        while( true ) {
          if ((puVar1 == (uint *)0x0) || ((uint)uVar3 != puVar1[8] % *(uint *)(param_1 + 0x2cf)))
          goto LAB_1401c08fe;
          if (*puVar1 == uVar7) break;
          puVar1 = *(uint **)(puVar1 + 4);
        }
        FUN_1401bd320(param_1 + 0x2ca,puVar1,0);
      }
    }
    else {
      plVar9 = plVar12;
      if (plVar10 != (longlong *)0x0) {
        plVar9 = (longlong *)plVar10[2];
      }
    }
LAB_1401c08fe:
    plVar5 = local_res18;
    plVar10 = plVar9;
    if (plVar11 != (longlong *)0x0) {
      plVar11 = plVar11 + 1;
      *plVar11 = *plVar11 + -1;
      if (*plVar11 == 0) {
        puVar2 = (undefined8 *)*local_res18;
        if (puVar2 != (undefined8 *)0x0) {
          (**(code **)*puVar2)(puVar2,1);
        }
        FUN_140156970(plVar5);
      }
    }
  }
  plVar10 = (longlong *)param_1[0x2e1];
  do {
    if (plVar10 == (longlong *)0x0) {
      FUN_140156be0(uVar8);
      return;
    }
    if (plVar10 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    local_res10 = (longlong *)0x0;
    if (plVar10[2] != 0) {
      *(longlong *)(plVar10[2] + 8) = *(longlong *)(plVar10[2] + 8) + 1;
      local_res10 = (longlong *)plVar10[2];
    }
    plVar11 = local_res10;
    plVar9 = plVar12;
    if (local_res10 != (longlong *)0x0) {
      plVar9 = (longlong *)*local_res10;
    }
    cVar6 = (**(code **)(*plVar9 + 0x10))();
    if (cVar6 == '\0') {
LAB_1401c0a5a:
      plVar9 = (longlong *)*plVar10;
    }
    else {
      plVar9 = plVar12;
      if (plVar11 != (longlong *)0x0) {
        plVar9 = (longlong *)*plVar11;
      }
      plVar11 = local_res10;
      if ((char)plVar9[0x10] != '\0') goto LAB_1401c0a5a;
      plVar9 = plVar12;
      if (local_res10 != (longlong *)0x0) {
        plVar9 = (longlong *)*local_res10;
      }
      if ((char)plVar9[8] != '\0') goto LAB_1401c0a5a;
      plVar9 = (longlong *)*plVar10;
      if (plVar10 == (longlong *)param_1[0x2e1]) {
        param_1[0x2e1] = (longlong)plVar9;
      }
      else {
        *(longlong **)plVar10[1] = plVar9;
      }
      if (plVar10 == (longlong *)param_1[0x2e2]) {
        param_1[0x2e2] = plVar10[1];
      }
      else {
        *(longlong *)(*plVar10 + 8) = plVar10[1];
      }
      FUN_1401bb120(param_1 + 0x2e0,plVar10);
      plVar11 = local_res10;
    }
    plVar5 = local_res10;
    plVar10 = plVar9;
    if (plVar11 != (longlong *)0x0) {
      plVar11 = plVar11 + 1;
      *plVar11 = *plVar11 + -1;
      if (*plVar11 == 0) {
        puVar2 = (undefined8 *)*local_res10;
        if (puVar2 != (undefined8 *)0x0) {
          (**(code **)*puVar2)(puVar2,1);
        }
        FUN_140156970(plVar5);
      }
    }
  } while( true );
}



void FUN_1401c0b10(longlong *param_1,int *param_2,byte *param_3,byte *param_4,int *param_5,
                  int *param_6)

{
  char cVar1;
  byte bVar2;
  int iVar3;
  undefined8 uVar4;
  longlong lVar5;
  undefined8 uVar6;
  int *piVar7;
  longlong *plVar8;
  int iVar9;
  undefined4 *puVar10;
  undefined8 uVar11;
  undefined4 *puVar12;
  undefined4 *puVar13;
  int *piVar14;
  int iVar15;
  int iVar16;
  int iVar17;
  ulonglong local_res10;
  byte *local_res18;
  byte *local_res20;
  undefined8 in_stack_fffffffffffffdd8;
  undefined4 uVar18;
  int *local_218;
  int *local_210;
  int local_208;
  undefined8 local_200;
  int local_1f8;
  undefined8 local_1e8;
  undefined8 local_1e0;
  undefined8 local_1d8;
  undefined8 local_1d0;
  undefined8 local_1c8;
  undefined8 local_1b0;
  longlong local_188;
  undefined1 local_180;
  int *local_178;
  undefined8 local_170;
  undefined1 local_168 [8];
  undefined1 local_160 [8];
  undefined1 local_158 [8];
  undefined **local_150;
  undefined8 local_148;
  undefined8 local_140;
  undefined8 local_138;
  undefined8 local_130;
  undefined **local_128;
  undefined8 local_120;
  undefined8 local_118;
  undefined8 local_110;
  undefined8 local_108;
  undefined **local_100;
  undefined8 local_f8;
  undefined8 local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_c8;
  
  uVar18 = (undefined4)((ulonglong)in_stack_fffffffffffffdd8 >> 0x20);
  local_c8 = 0xfffffffffffffffe;
  iVar15 = *param_2;
  local_res18 = param_3;
  local_res20 = param_4;
  if (iVar15 != 0) {
    if (iVar15 == 1) {
      piVar7 = param_2 + 2;
      local_1f8 = (int)(*piVar7 + (*piVar7 >> 0x1f & 7U)) >> 3;
      local_res10 = local_res10 & 0xffffffffffffff00;
      local_218 = piVar7;
      local_188 = FUN_1401bcbb0(param_1,param_2[0xc]);
      (**(code **)(param_1[0xf] + 0x18))();
      iVar15 = 0;
      local_200 = (int *)((ulonglong)local_200._4_4_ << 0x20);
      local_178 = piVar7;
      cVar1 = FUN_140154d80(piVar7,&local_200);
      if (cVar1 != '\0') {
        for (; local_208 = iVar15, iVar15 < (int)param_1[9]; iVar15 = iVar15 + 1) {
          if ((iVar15 < 0) || ((int)param_1[9] <= iVar15)) {
                    // WARNING: Subroutine does not return
            FUN_1401566e0();
          }
          plVar8 = *(longlong **)(param_1[8] + (longlong)iVar15 * 8);
          FUN_1401540a0(local_178,local_1f8);
          *(undefined2 *)(plVar8 + 1) = 0;
          bVar2 = (**(code **)(*plVar8 + 0x10))(plVar8,piVar7,local_188);
          local_res10 = CONCAT71(local_res10._1_7_,(byte)local_res10 | bVar2);
          *param_3 = *param_3 | *(byte *)(plVar8 + 1);
          *param_4 = *param_4 | *(byte *)((longlong)plVar8 + 9);
          if (((bVar2 != 0) && (plVar8 != param_1 + 0x307)) && (plVar8 != param_1 + 0x2fe)) {
            *param_5 = *param_5 + 1;
          }
        }
        if ((byte)local_res10 != '\0') {
          return;
        }
      }
      FUN_1401540a0(local_178,local_1f8);
      if (param_1[0x2b0] == 0) {
        return;
      }
      *param_6 = *param_6 + 1;
      (**(code **)(*(longlong *)param_1[0x2b0] + 0x28))
                ((longlong *)param_1[0x2b0],(ulonglong)local_200 & 0xffffffff);
      return;
    }
    if (iVar15 != 2) {
      return;
    }
    piVar7 = param_2 + 2;
    local_218 = piVar7;
    uVar4 = FUN_1401bcbb0(param_1,param_2[0xc]);
    (**(code **)(param_1[0xf] + 0x18))();
    if (param_1[0x2b0] == 0) {
      return;
    }
    cVar1 = FUN_140154a70(piVar7,&local_res10);
    if (cVar1 != '\0') {
      iVar15 = *piVar7;
      iVar3 = FUN_140154030(piVar7);
      if ((int)local_res10 == iVar3 - ((int)((iVar15 >> 0x1f & 7U) + iVar15) >> 3)) {
        *(undefined1 *)(param_1[0x2b0] + 8) = 0;
        *(undefined1 *)(param_1[0x2b0] + 9) = 0;
        FUN_140157c90(&local_1e8);
        local_1e8 = (undefined **)CONCAT44(param_2[0xc],(undefined4)local_1e8);
        local_1e8 = (undefined **)CONCAT71(local_1e8._1_7_,(char)param_2[0x12]);
        iVar15 = *piVar7;
        local_1b0 = uVar4;
        lVar5 = FUN_140154060(piVar7);
        (**(code **)(*(longlong *)param_1[0x2b0] + 0x30))
                  ((longlong *)param_1[0x2b0],param_2[0xc],&local_1e8,
                   lVar5 + ((int)(iVar15 + (iVar15 >> 0x1f & 7U)) >> 3),
                   CONCAT44(uVar18,(int)local_res10));
        *param_3 = *param_3 | *(byte *)(param_1[0x2b0] + 8);
        *param_4 = *param_4 | *(byte *)(param_1[0x2b0] + 9);
        *param_5 = *param_5 + 1;
        return;
      }
    }
    local_188 = FUN_140156940(0x60);
    if (local_188 == 0) {
      uVar4 = 0;
    }
    else {
      uVar4 = FUN_140181eb0(local_188);
    }
    puVar10 = (undefined4 *)0x0;
    FUN_14013c5b0(&local_res10,uVar4);
    puVar12 = puVar10;
    if (local_res10 != 0) {
      puVar12 = *(undefined4 **)(local_res10 + 0x38);
    }
    *puVar12 = 0x1f;
    if (local_res10 != 0) {
      puVar10 = *(undefined4 **)(local_res10 + 0x38);
    }
    FUN_14004ce80(puVar10 + 4,L"Invalid payload size in User Message!");
    local_170 = 0;
    FUN_14016dca0(&local_170,&local_res10);
    (**(code **)(*param_1 + 0x80))(param_1,&local_170);
    FUN_14013c530(&local_res10);
    return;
  }
  (**(code **)(param_1[0xf] + 0x18))();
  if (param_1[0x2b0] == 0) {
    return;
  }
  local_200 = param_2 + 0x14;
  *(undefined1 *)(param_1[0x2b0] + 8) = 0;
  *(undefined1 *)(param_1[0x2b0] + 9) = 0;
  switch(*local_200) {
  case 1:
    iVar15 = FUN_140153f80(param_2 + 0x28);
    uVar6 = FUN_140156d50(param_2 + 0x28);
    local_1e8 = Proud::CFastArray<>::vftable;
    uVar4 = 0;
    local_1e0 = 0;
    local_1d8 = 0;
    local_1d0 = 0;
    local_1c8 = 0;
    if (iVar15 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_140050060(&local_1e8,iVar15);
    uVar11 = local_1d8;
    if ((int)local_1d0 == 0) {
      uVar11 = uVar4;
    }
    FUN_140050120(uVar11,uVar6,(longlong)iVar15);
    local_1e8 = Proud::ByteArray::vftable;
    local_res10 = FUN_140156940(0x60);
    uVar6 = uVar4;
    if (local_res10 != 0) {
      uVar6 = FUN_140181eb0(local_res10);
    }
    plVar8 = (longlong *)FUN_14013c5b0(local_158,uVar6);
    if (*plVar8 != 0) {
      uVar4 = *(undefined8 *)(*plVar8 + 0x38);
    }
    (**(code **)(*(longlong *)param_1[0x2b0] + 0x38))((longlong *)param_1[0x2b0],uVar4,&local_1e8);
    FUN_14013c530(local_158);
    FUN_1401858d0(&local_1e8);
    break;
  case 2:
    FUN_1401568c0();
    local_210 = (int *)PTR_DAT_1403200a0;
    iVar3 = FUN_140156740(&DAT_140288b80);
    local_res10 = CONCAT44(local_res10._4_4_,iVar3);
    puVar10 = (undefined4 *)0x0;
    iVar16 = 0;
    iVar15 = iVar16;
    if ((local_210 != (int *)0x0) && (local_210 != (int *)PTR_DAT_1403200a0)) {
      iVar15 = local_210[-2];
    }
    iVar17 = 0;
    iVar9 = iVar3;
    if (((iVar3 <= iVar15) && (iVar9 = iVar17, local_210 != (int *)0x0)) &&
       (local_210 != (int *)PTR_DAT_1403200a0)) {
      iVar9 = local_210[-2];
    }
    iVar15 = 1;
    if (1 < iVar9) {
      iVar15 = iVar9;
    }
    puVar12 = puVar10;
    if ((local_210 != (int *)0x0) &&
       (puVar12 = (undefined4 *)0x0, local_210 != (int *)PTR_DAT_1403200a0)) {
      puVar12 = (undefined4 *)(ulonglong)(uint)local_210[-2];
    }
    if ((int)puVar12 < iVar15) {
      if (local_210 == (int *)0x0) {
        local_210 = (int *)PTR_DAT_1403200a0;
      }
      if (iVar15 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (iVar15 == 0) {
        FUN_14004f990(&local_210);
      }
      else {
        iVar9 = iVar17;
        if ((local_210 != (int *)0x0) && (local_210 != (int *)PTR_DAT_1403200a0)) {
          iVar9 = local_210[-2];
        }
        if (iVar15 != iVar9) {
          piVar7 = (int *)FUN_140156940((longlong)iVar15 * 2 + 10);
          if (piVar7 != (int *)0x0) {
            *piVar7 = 0;
            piVar7[1] = 1;
          }
          *piVar7 = iVar15;
          iVar3 = iVar17;
          if ((local_210 != (int *)0x0) && (local_210 != (int *)PTR_DAT_1403200a0)) {
            iVar3 = local_210[-2];
          }
          piVar14 = (int *)PTR_DAT_1403200a0;
          if (iVar15 < iVar3) {
LAB_1401c1104:
            if (local_210 != (int *)0x0) {
              piVar14 = local_210;
            }
          }
          else {
            iVar15 = iVar16;
            if (local_210 != (int *)0x0) {
              if (local_210 != (int *)PTR_DAT_1403200a0) {
                iVar15 = local_210[-2];
              }
              goto LAB_1401c1104;
            }
          }
          FUN_140156770(piVar7 + 2,piVar14,iVar15);
          FUN_14004f990(&local_210);
          local_210 = piVar7 + 2;
          iVar3 = (int)local_res10;
        }
      }
    }
    FUN_14004f670(&local_210);
    piVar7 = local_210;
    if (local_210 == (int *)0x0) {
      piVar7 = (int *)PTR_DAT_1403200a0;
    }
    FUN_140156770(piVar7,&DAT_140288b80,iVar3);
    piVar7 = local_210;
    if (local_210 == (int *)0x0) {
      piVar7 = (int *)PTR_DAT_1403200a0;
    }
    iVar3 = FUN_140156740(piVar7);
    iVar15 = 0;
    if (0 < iVar3) {
      iVar15 = iVar3;
    }
    if ((local_210 != (int *)0x0) && (local_210 != (int *)PTR_DAT_1403200a0)) {
      iVar17 = local_210[-2];
    }
    if ((iVar15 < iVar17) || (iVar15 = iVar16, local_210 == (int *)0x0)) {
LAB_1401c11a8:
      if (((local_210 != (int *)PTR_DAT_1403200a0) && (local_210 != (int *)0x0)) &&
         (local_210 + -2 != (int *)0x0)) {
        local_210[-2] = iVar15;
        *(undefined2 *)((longlong)local_210 + (longlong)iVar15 * 2) = 0;
      }
    }
    else if (local_210 != (int *)PTR_DAT_1403200a0) {
      iVar15 = local_210[-2];
      goto LAB_1401c11a8;
    }
    local_120 = 0;
    local_118 = 0;
    local_110 = 0;
    local_108 = 0;
    local_128 = Proud::ByteArray::vftable;
    puVar12 = puVar10;
    if (*(longlong *)(param_2 + 0x16) != 0) {
      puVar12 = *(undefined4 **)(*(longlong *)(param_2 + 0x16) + 0x38);
    }
    FUN_140181f50(&local_218,*puVar12,1,&local_210,&local_128);
    FUN_1401858d0(&local_128);
    piVar7 = local_210;
    if (((local_210 != (int *)0x0) && (local_210 != (int *)PTR_DAT_1403200a0)) &&
       (piVar14 = local_210 + -2, piVar14 != (int *)0x0)) {
      uVar4 = FUN_1401568c0();
      local_180 = 0;
      local_188 = uVar4;
      FUN_140156b50(uVar4);
      local_180 = 1;
      piVar7 = piVar7 + -1;
      *piVar7 = *piVar7 + -1;
      if (*piVar7 == 0) {
        FUN_140156970(piVar14);
      }
      FUN_140156be0(uVar4);
      param_3 = local_res18;
    }
    local_210 = (int *)PTR_DAT_1403200a0;
    puVar12 = puVar10;
    if (local_218 != (int *)0x0) {
      puVar12 = *(undefined4 **)(local_218 + 0xe);
    }
    puVar12[8] = param_2[0x40];
    *(short *)(puVar12 + 9) = (short)param_2[0x41];
    puVar12 = puVar10;
    if (local_218 != (int *)0x0) {
      puVar12 = *(undefined4 **)(local_218 + 0xe);
    }
    puVar12[2] = param_2[0x42];
    local_1e0 = 0;
    local_1d8 = 0;
    local_1d0 = 0;
    local_1c8 = 0;
    local_1e8 = Proud::ByteArray::vftable;
    if (*(longlong *)(param_2 + 0x28) != 0) {
      iVar15 = *(int *)(*(longlong *)(param_2 + 0x28) + 0x18);
LAB_1401c137b:
      if (iVar15 < 1) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    if (*(longlong *)(param_2 + 0x2a) != 0) {
      if (*(longlong *)(param_2 + 0x2a) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      iVar15 = param_2[0x2c];
      goto LAB_1401c137b;
    }
    if (local_218 != (int *)0x0) {
      puVar10 = *(undefined4 **)(local_218 + 0xe);
    }
    (**(code **)(*(longlong *)param_1[0x2b0] + 0x38))((longlong *)param_1[0x2b0],puVar10,&local_1e8)
    ;
    FUN_1401858d0(&local_1e8);
    FUN_14013c530(&local_218);
    break;
  case 3:
    uVar4 = 0;
    if (*(longlong *)(param_2 + 0x16) != 0) {
      uVar4 = *(undefined8 *)(*(longlong *)(param_2 + 0x16) + 0x38);
    }
    (**(code **)(*(longlong *)param_1[0x2b0] + 0x40))((longlong *)param_1[0x2b0],uVar4);
    break;
  default:
    goto switchD_1401c0efb_caseD_4;
  case 8:
    (**(code **)(*(longlong *)param_1[0x2b0] + 0x48))
              ((longlong *)param_1[0x2b0],param_2[0x2f],param_2[0x2e],param_2[0x3c],param_2 + 0x32);
    break;
  case 9:
    (**(code **)(*(longlong *)param_1[0x2b0] + 0x50))
              ((longlong *)param_1[0x2b0],param_2[0x2f],param_2[0x2e],param_2[0x3c]);
    FUN_1401bc9a0(param_1,param_2[0x2f]);
    break;
  case 10:
    (**(code **)(*(longlong *)param_1[0x2b0] + 0x58))((longlong *)param_1[0x2b0],param_2[0x30],0);
    break;
  case 0xb:
    puVar10 = (undefined4 *)0x0;
    if (*(longlong *)(param_2 + 0x16) != 0) {
      puVar10 = *(undefined4 **)(*(longlong *)(param_2 + 0x16) + 0x38);
    }
    (**(code **)(*(longlong *)param_1[0x2b0] + 0x58))
              ((longlong *)param_1[0x2b0],param_2[0x30],*puVar10);
    break;
  case 0xd:
    if (param_1[0x2b0] != 0) {
      puVar10 = (undefined4 *)0x0;
      if (*(longlong *)(param_2 + 0x16) != 0) {
        puVar10 = *(undefined4 **)(*(longlong *)(param_2 + 0x16) + 0x38);
      }
      (**(code **)(*(longlong *)param_1[0x2b0] + 0x60))((longlong *)param_1[0x2b0],*puVar10);
    }
    break;
  case 0xe:
    (**(code **)(*(longlong *)param_1[0x2b0] + 0x68))();
    break;
  case 0x14:
    puVar10 = (undefined4 *)0x0;
    local_f8 = 0;
    local_f0 = 0;
    local_e8 = 0;
    local_e0 = 0;
    local_100 = Proud::ByteArray::vftable;
    lVar5 = *(longlong *)(param_2 + 0x16);
    puVar13 = puVar10;
    puVar12 = puVar10;
    if (lVar5 != 0) {
      puVar13 = *(undefined4 **)(lVar5 + 0x38);
      puVar12 = *(undefined4 **)(lVar5 + 0x38);
    }
    plVar8 = (longlong *)FUN_140181f50(local_160,*puVar13,param_2[0x30],puVar12 + 4,&local_100);
    if (*plVar8 != 0) {
      puVar10 = *(undefined4 **)(*plVar8 + 0x38);
    }
    (**(code **)(*(longlong *)param_1[0x2b0] + 8))((longlong *)param_1[0x2b0],puVar10);
    FUN_14013c530(local_160);
    FUN_1401858d0(&local_100);
    break;
  case 0x15:
    puVar10 = (undefined4 *)0x0;
    local_148 = 0;
    local_140 = 0;
    local_138 = 0;
    local_130 = 0;
    local_150 = Proud::ByteArray::vftable;
    lVar5 = *(longlong *)(param_2 + 0x16);
    puVar13 = puVar10;
    puVar12 = puVar10;
    if (lVar5 != 0) {
      puVar13 = *(undefined4 **)(lVar5 + 0x38);
      puVar12 = *(undefined4 **)(lVar5 + 0x38);
    }
    plVar8 = (longlong *)FUN_140181f50(local_168,*puVar13,param_2[0x30],puVar12 + 4,&local_150);
    if (*plVar8 != 0) {
      puVar10 = *(undefined4 **)(*plVar8 + 0x38);
    }
    (**(code **)(*(longlong *)param_1[0x2b0] + 0x10))((longlong *)param_1[0x2b0],puVar10);
    FUN_14013c530(local_168);
    FUN_1401858d0(&local_150);
  }
  *param_3 = *(byte *)(param_1[0x2b0] + 8);
  *param_4 = *(byte *)(param_1[0x2b0] + 9);
  *param_6 = *param_6 + 1;
switchD_1401c0efb_caseD_4:
  return;
}



// WARNING: Removing unreachable block (ram,0x0001401c1779)
// WARNING: Removing unreachable block (ram,0x0001401c16f3)
// WARNING: Removing unreachable block (ram,0x0001401c1703)
// WARNING: Removing unreachable block (ram,0x0001401c1784)
// WARNING: Removing unreachable block (ram,0x0001401c1717)
// WARNING: Removing unreachable block (ram,0x0001401c171f)
// WARNING: Removing unreachable block (ram,0x0001401c1729)

void FUN_1401c1670(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  longlong lVar2;
  undefined8 local_res8;
  longlong lVar3;
  
  lVar2 = 0;
  if (*(longlong *)(param_1 + 0x1740) != 0) {
    lVar2 = *(longlong *)(param_1 + 0x1730);
  }
  while (lVar2 != 0) {
    local_res8 = 0;
    if (*(longlong *)(lVar2 + 8) != 0) {
      *(longlong *)(*(longlong *)(lVar2 + 8) + 8) = *(longlong *)(*(longlong *)(lVar2 + 8) + 8) + 1;
      local_res8 = *(undefined8 *)(lVar2 + 8);
    }
    lVar3 = lVar2;
    FUN_1401c0470(param_1,&local_res8);
    lVar1 = *(longlong *)(lVar2 + 0x10);
    FUN_1401bd320(param_1 + 0x1720,lVar2,0,param_4,lVar3);
    lVar2 = lVar1;
  }
  FUN_1401beb00(param_1 + 0x1720);
  return;
}



void FUN_1401c17c0(longlong param_1)

{
  FUN_1401beb00(param_1 + 0x16a8);
  return;
}



undefined8 FUN_1401c17d0(longlong param_1,uint *param_2,undefined8 param_3)

{
  uint *puVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  
  uVar2 = (ulonglong)*param_2 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (puVar1 = *(uint **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (puVar1 != (uint *)0x0 && ((uint)uVar2 == puVar1[8] % *(uint *)(param_1 + 0x28)));
        puVar1 = *(uint **)(puVar1 + 4)) {
      if (*puVar1 == *param_2) {
        return 0;
      }
    }
  }
  uVar3 = FUN_1401c4660(param_1,param_2);
  FUN_1401d43e0(uVar3,param_3);
  return 1;
}



undefined8 FUN_1401c1860(longlong param_1,ushort *param_2,undefined8 param_3)

{
  ushort *puVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  
  uVar2 = (ulonglong)*param_2 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (puVar1 = *(ushort **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (puVar1 != (ushort *)0x0 &&
        ((uint)uVar2 == *(uint *)(puVar1 + 0x10) % *(uint *)(param_1 + 0x28)));
        puVar1 = *(ushort **)(puVar1 + 8)) {
      if (*puVar1 == *param_2) {
        return 0;
      }
    }
  }
  uVar3 = FUN_1401c05c0(param_1,param_2);
  FUN_1401d43e0(uVar3,param_3);
  return 1;
}



void FUN_1401c18f0(longlong *param_1)

{
  undefined8 *puVar1;
  void *pvVar2;
  
  if (*param_1 != 0) {
    *(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1;
    if (*(longlong *)(*param_1 + 8) == 0) {
      puVar1 = (undefined8 *)*param_1;
      pvVar2 = (void *)*puVar1;
      if (pvVar2 != (void *)0x0) {
        FUN_1401b2400((longlong)pvVar2 + 8);
        operator_delete(pvVar2);
      }
      FUN_140156970(puVar1);
    }
  }
  return;
}



void FUN_1401c1960(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  void *pvVar2;
  undefined8 *puVar3;
  
  lVar1 = *param_2;
  if (lVar1 != *param_1) {
    if (lVar1 != 0) {
      *(longlong *)(*param_2 + 8) = *(longlong *)(lVar1 + 8) + 1;
    }
    puVar3 = (undefined8 *)0x0;
    if ((*param_1 != 0) &&
       (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
       *(longlong *)(*param_1 + 8) == 0)) {
      puVar3 = (undefined8 *)*param_1;
    }
    *param_1 = *param_2;
    if (puVar3 != (undefined8 *)0x0) {
      pvVar2 = (void *)*puVar3;
      if (pvVar2 != (void *)0x0) {
        FUN_1401b2400((longlong)pvVar2 + 8);
        operator_delete(pvVar2);
      }
      FUN_140156970(puVar3);
    }
  }
  return;
}



void FUN_1401c19f0(longlong param_1)

{
  undefined8 *puVar1;
  void *pvVar2;
  
  if (*(longlong *)(param_1 + 8) != 0) {
    *(longlong *)(*(longlong *)(param_1 + 8) + 8) =
         *(longlong *)(*(longlong *)(param_1 + 8) + 8) + -1;
    if (*(longlong *)(*(longlong *)(param_1 + 8) + 8) == 0) {
      puVar1 = *(undefined8 **)(param_1 + 8);
      pvVar2 = (void *)*puVar1;
      if (pvVar2 != (void *)0x0) {
        FUN_1401b2400((longlong)pvVar2 + 8);
        operator_delete(pvVar2);
      }
      FUN_140156970(puVar1);
    }
  }
  return;
}



void FUN_1401c1a60(longlong param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  longlong lVar2;
  undefined8 uVar3;
  
  if (((longlong *)*param_2 == (longlong *)0x0) || (lVar2 = *(longlong *)*param_2, lVar2 == 0)) {
    lVar2 = 0;
  }
  else {
    lVar2 = lVar2 + -0x40;
  }
  FUN_1401c1860(param_1 + 0x1720,lVar2 + 0x134,param_2,param_4,0xfffffffffffffffe);
  *(undefined8 *)(lVar2 + 0x120) = 0;
  uVar3 = (**(code **)(*(longlong *)(param_1 + 0x70) + 0x1c0))();
  *(undefined8 *)(lVar2 + 0x148) = uVar3;
  FUN_1401e7290(lVar2);
  if ((*param_2 != 0) &&
     (*(longlong *)(*param_2 + 8) = *(longlong *)(*param_2 + 8) + -1,
     *(longlong *)(*param_2 + 8) == 0)) {
    param_2 = (longlong *)*param_2;
    puVar1 = (undefined8 *)*param_2;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(param_2);
  }
  return;
}



ulonglong FUN_1401c1b30(longlong param_1,ulonglong *param_2)

{
  uint uVar1;
  uint uVar2;
  longlong *plVar3;
  uint *puVar4;
  undefined8 *puVar5;
  ulonglong uVar6;
  longlong lVar7;
  ulonglong uVar8;
  longlong lVar9;
  undefined8 local_res8;
  ulonglong *local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined8 uVar10;
  
  uVar10 = 0xfffffffffffffffe;
  local_res10 = param_2;
  (**(code **)(*(longlong *)(param_1 + 0x78) + 0x10))();
  plVar3 = (longlong *)*param_2;
  lVar9 = 0;
  lVar7 = lVar9;
  if (plVar3 != (longlong *)0x0) {
    lVar7 = *plVar3;
  }
  if ((*(longlong **)(lVar7 + 0x18) != (longlong *)0x0) && (**(longlong **)(lVar7 + 0x18) != 0)) {
    lVar7 = lVar9;
    if (plVar3 != (longlong *)0x0) {
      lVar7 = *plVar3;
    }
    if (*(char *)(lVar7 + 0x608) == '\0') {
      lVar7 = lVar9;
      if (plVar3 != (longlong *)0x0) {
        lVar7 = *plVar3;
      }
      local_res18 = 0;
      FUN_1401d43e0(&local_res18,lVar7 + 0x18);
      FUN_1401c1a60(param_1,&local_res18);
    }
    else {
      lVar7 = lVar9;
      if (plVar3 != (longlong *)0x0) {
        lVar7 = *plVar3;
      }
      local_res8 = 0;
      FUN_1401d43e0(&local_res8,lVar7 + 0x18);
      FUN_1401c0470(param_1,&local_res8);
    }
    local_res20 = 0;
    lVar7 = lVar9;
    if ((longlong *)*param_2 != (longlong *)0x0) {
      lVar7 = *(longlong *)*param_2;
    }
    FUN_1401d43e0(lVar7 + 0x18);
  }
  lVar7 = lVar9;
  if ((longlong *)*param_2 != (longlong *)0x0) {
    lVar7 = *(longlong *)*param_2;
  }
  *(undefined8 *)(lVar7 + 0x670) = 0;
  if ((longlong *)*param_2 != (longlong *)0x0) {
    lVar9 = *(longlong *)*param_2;
  }
  uVar1 = *(uint *)(lVar9 + 0x56c);
  uVar2 = *(uint *)(param_1 + 0x1678);
  uVar8 = (ulonglong)uVar1 / (ulonglong)uVar2;
  uVar6 = (ulonglong)uVar1 % (ulonglong)uVar2;
  if (*(longlong *)(param_1 + 0x1658) != 0) {
    puVar4 = *(uint **)(*(longlong *)(param_1 + 0x1658) + uVar6 * 8);
    while( true ) {
      if ((puVar4 == (uint *)0x0) ||
         (uVar8 = (ulonglong)puVar4[8] / (ulonglong)uVar2, (uint)uVar6 != puVar4[8] % uVar2))
      goto LAB_1401c1c92;
      if (*puVar4 == uVar1) break;
      puVar4 = *(uint **)(puVar4 + 4);
    }
    uVar8 = FUN_1401bd320(param_1 + 0x1650,puVar4,0,uVar6,uVar10);
  }
LAB_1401c1c92:
  if (*param_2 != 0) {
    *(longlong *)(*param_2 + 8) = *(longlong *)(*param_2 + 8) + -1;
    uVar8 = *param_2;
    if (*(longlong *)(uVar8 + 8) == 0) {
      plVar3 = (longlong *)*param_2;
      puVar5 = (undefined8 *)*plVar3;
      if (puVar5 != (undefined8 *)0x0) {
        (**(code **)*puVar5)(puVar5,1);
      }
      uVar8 = FUN_140156970(plVar3);
    }
  }
  return uVar8;
}



void FUN_1401c1ce0(longlong param_1,longlong *param_2)

{
  longlong *plVar1;
  undefined8 *puVar2;
  longlong lVar3;
  longlong lVar4;
  undefined8 local_res8;
  longlong *local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined8 local_28;
  undefined8 local_20;
  
  local_20 = 0xfffffffffffffffe;
  local_res10 = param_2;
  (**(code **)(*(longlong *)(param_1 + 0x78) + 0x10))();
  plVar1 = (longlong *)*param_2;
  lVar4 = 0;
  lVar3 = lVar4;
  if (plVar1 != (longlong *)0x0) {
    lVar3 = *plVar1;
  }
  if (*(char *)(lVar3 + 0x684) == '\0') {
    lVar3 = lVar4;
    if (plVar1 != (longlong *)0x0) {
      lVar3 = *plVar1;
    }
    if (*(longlong *)(lVar3 + 0x670) == param_1) {
      lVar3 = lVar4;
      if (plVar1 != (longlong *)0x0) {
        lVar3 = *plVar1;
      }
      if ((*(longlong **)(lVar3 + 0x18) != (longlong *)0x0) && (**(longlong **)(lVar3 + 0x18) != 0))
      {
        lVar3 = lVar4;
        if (plVar1 != (longlong *)0x0) {
          lVar3 = *plVar1;
        }
        if (*(char *)(lVar3 + 0x608) == '\0') {
          lVar3 = lVar4;
          if (plVar1 != (longlong *)0x0) {
            lVar3 = *plVar1;
          }
          local_res18 = 0;
          FUN_1401d43e0(&local_res18,lVar3 + 0x18);
          FUN_1401c1a60(param_1,&local_res18);
        }
        else {
          lVar3 = lVar4;
          if (plVar1 != (longlong *)0x0) {
            lVar3 = *plVar1;
          }
          local_res8 = 0;
          FUN_1401d43e0(&local_res8,lVar3 + 0x18);
          FUN_1401c0470(param_1,&local_res8);
        }
        local_res20 = 0;
        lVar3 = lVar4;
        if ((longlong *)*param_2 != (longlong *)0x0) {
          lVar3 = *(longlong *)*param_2;
        }
        FUN_1401d43e0(lVar3 + 0x18,&local_res20);
      }
      lVar3 = lVar4;
      if ((longlong *)*param_2 != (longlong *)0x0) {
        lVar3 = *(longlong *)*param_2;
      }
      *(undefined8 *)(lVar3 + 0x670) = 0;
      lVar3 = lVar4;
      if ((longlong *)*param_2 != (longlong *)0x0) {
        lVar3 = *(longlong *)*param_2;
      }
      *(undefined1 *)(lVar3 + 0x684) = 1;
      local_28 = 0;
      lVar3 = lVar4;
      if ((longlong *)*param_2 != (longlong *)0x0) {
        lVar3 = *(longlong *)*param_2;
      }
      FUN_1401bcec0(lVar3 + 0x28,&local_28);
      if ((longlong *)*param_2 != (longlong *)0x0) {
        lVar4 = *(longlong *)*param_2;
      }
      FUN_1401c17d0(param_1 + 0x16a8,lVar4 + 0x56c,param_2);
    }
    if (*param_2 == 0) {
      return;
    }
    lVar4 = *(longlong *)(*param_2 + 8);
  }
  else {
    if (plVar1 == (longlong *)0x0) {
      return;
    }
    lVar4 = plVar1[1];
  }
  *(longlong *)(*param_2 + 8) = lVar4 + -1;
  if (*(longlong *)(*param_2 + 8) == 0) {
    param_2 = (longlong *)*param_2;
    puVar2 = (undefined8 *)*param_2;
    if (puVar2 != (undefined8 *)0x0) {
      (**(code **)*puVar2)(puVar2,1);
    }
    FUN_140156970(param_2);
  }
  return;
}



undefined8 * FUN_1401c1ec0(longlong *param_1,undefined8 *param_2,uint param_3)

{
  uint uVar1;
  uint *puVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  
  uVar5 = 0xfffffffffffffffe;
  uVar4 = (**(code **)(*param_1 + 0x58))();
  uVar6 = uVar4;
  FUN_140156b50(uVar4);
  *param_2 = 0;
  uVar1 = *(uint *)(param_1 + 0xc1);
  uVar3 = (ulonglong)param_3 % (ulonglong)uVar1;
  if (param_1[0xbd] != 0) {
    puVar2 = *(uint **)(param_1[0xbd] + uVar3 * 8);
    while( true ) {
      if ((puVar2 == (uint *)0x0) || ((uint)uVar3 != puVar2[8] % uVar1)) goto LAB_1401c1f69;
      if (*puVar2 == param_3) break;
      puVar2 = *(uint **)(puVar2 + 4);
    }
    FUN_1401c1960(param_2,puVar2 + 2,uVar3,(ulonglong)uVar1,uVar5,uVar6,1);
  }
LAB_1401c1f69:
  FUN_140156be0(uVar4);
  return param_2;
}



undefined8 FUN_1401c1f90(longlong param_1,undefined4 param_2,longlong *param_3,undefined8 param_4)

{
  longlong lVar1;
  void *pvVar2;
  longlong lVar3;
  longlong *plVar4;
  longlong lVar5;
  undefined4 *puVar6;
  longlong *local_res8;
  undefined8 uVar7;
  
  uVar7 = 0xfffffffffffffffe;
  (**(code **)(*(longlong *)(param_1 + 0x78) + 0x10))();
  FUN_1401c1ec0(param_1,&local_res8,param_2,param_4,uVar7);
  if ((local_res8 == (longlong *)0x0) || (lVar1 = *local_res8, lVar1 == 0)) {
    uVar7 = FUN_1401bdbb0(param_1,param_2);
    FUN_1401b0ca0(param_3,param_3[1],uVar7);
  }
  else {
    if (*(longlong *)(lVar1 + 0x28) == 0) {
      puVar6 = (undefined4 *)0x0;
    }
    else {
      puVar6 = *(undefined4 **)(lVar1 + 0x18);
    }
    while( true ) {
      if (local_res8 == (longlong *)0x0) {
        lVar5 = 0;
      }
      else {
        lVar5 = *local_res8;
      }
      if (puVar6 == (undefined4 *)0x0) break;
      lVar3 = FUN_1401bdbb0(param_1,*puVar6);
      lVar5 = param_3[1];
      if (lVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      FUN_1401b08a0(param_3,lVar5 + 1,0xffffffffffffffff);
      if (param_3[1] <= lVar5) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if ((ulonglong)param_3[2] < 0x65) {
        plVar4 = param_3 + lVar5 + 4;
      }
      else {
        plVar4 = (longlong *)(*param_3 + lVar5 * 8);
      }
      *plVar4 = lVar3;
      puVar6 = *(undefined4 **)(puVar6 + 4);
    }
    if (lVar1 + 8 != lVar5 + 8) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  if (local_res8 != (longlong *)0x0) {
    local_res8[1] = local_res8[1] + -1;
    if (local_res8[1] == 0) {
      pvVar2 = (void *)*local_res8;
      if (pvVar2 != (void *)0x0) {
        FUN_1401b2400((longlong)pvVar2 + 8);
        operator_delete(pvVar2);
      }
      FUN_140156970(local_res8);
    }
  }
  return 1;
}



void FUN_1401c2100(longlong *param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  void *pvVar2;
  undefined8 uVar3;
  longlong *plVar4;
  longlong lVar5;
  longlong lVar6;
  longlong *local_res8;
  undefined8 uVar7;
  undefined1 uVar8;
  
  uVar7 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(param_1[-0xe] + 0x58))(param_1 + -0xe);
  FUN_140156b50(uVar3);
  uVar8 = 1;
  (**(code **)(*param_1 + 0x100))(param_1);
  FUN_1401c1ec0(param_1 + -0xe,&local_res8,param_2,param_4,uVar7,uVar3,uVar8);
  if ((local_res8 == (longlong *)0x0) || (lVar1 = *local_res8, lVar1 == 0)) {
    (**(code **)(*param_1 + 0xf8))(param_1);
    if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0))
    {
      pvVar2 = (void *)*local_res8;
      if (pvVar2 != (void *)0x0) {
        FUN_1401b2400((longlong)pvVar2 + 8);
        operator_delete(pvVar2);
      }
      FUN_140156970(local_res8);
    }
    FUN_140156be0(uVar3);
  }
  else {
    plVar4 = local_res8;
    if (*(longlong *)(lVar1 + 0x28) == 0) {
      lVar6 = 0;
    }
    else {
      lVar6 = *(longlong *)(lVar1 + 0x18);
    }
    while( true ) {
      if (plVar4 == (longlong *)0x0) {
        lVar5 = 0;
      }
      else {
        lVar5 = *plVar4;
      }
      if (lVar6 == 0) break;
      if (*(longlong **)(lVar6 + 8) != (longlong *)0x0) {
        (**(code **)(**(longlong **)(lVar6 + 8) + 0x10))();
        plVar4 = local_res8;
      }
      lVar6 = *(longlong *)(lVar6 + 0x10);
    }
    if (lVar1 + 8 != lVar5 + 8) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    FUN_14018aee0(param_1 + 0x2b6);
    if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0))
    {
      pvVar2 = (void *)*local_res8;
      if (pvVar2 != (void *)0x0) {
        FUN_1401b2400((longlong)pvVar2 + 8);
        operator_delete(pvVar2);
      }
      FUN_140156970(local_res8);
    }
    FUN_140156be0(uVar3);
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x0001401c255b)
// WARNING: Removing unreachable block (ram,0x0001401c256e)
// WARNING: Removing unreachable block (ram,0x0001401c247d)
// WARNING: Removing unreachable block (ram,0x0001401c2587)
// WARNING: Removing unreachable block (ram,0x0001401c258f)
// WARNING: Removing unreachable block (ram,0x0001401c2599)

longlong FUN_1401c22e0(longlong param_1,longlong *param_2)

{
  longlong *plVar1;
  longlong *plVar2;
  void *pvVar3;
  undefined8 *puVar4;
  longlong *plVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lVar8;
  longlong lVar9;
  longlong lVar10;
  longlong lVar11;
  longlong lVar12;
  undefined4 local_res8 [2];
  longlong *local_res10;
  longlong local_res18;
  longlong *local_res20;
  
  local_res10 = param_2;
  (**(code **)(*(longlong *)(param_1 + 0x78) + 0x10))();
  lVar10 = 0;
  lVar11 = lVar10;
  if (*(longlong *)(param_1 + 0x600) != 0) {
    lVar11 = *(longlong *)(param_1 + 0x5f0);
  }
  do {
    if (lVar11 == 0) {
      lVar11 = lVar10;
      if ((longlong *)*param_2 != (longlong *)0x0) {
        lVar11 = *(longlong *)*param_2;
      }
      FUN_1401e3530(lVar11,1);
      local_res8[0] = 0x1d;
      lVar11 = lVar10;
      if ((longlong *)*param_2 != (longlong *)0x0) {
        lVar11 = *(longlong *)*param_2;
      }
      (**(code **)(*(longlong *)(param_1 + 0x1818) + 0x40))
                ((longlong *)(param_1 + 0x1818),1,&DAT_140328530,lVar11 + 0x56c,local_res8);
      if ((*(char *)(param_1 + 0x1790) != '\0') || (*(int *)(param_1 + 0x6c8) != 0)) {
        if ((longlong *)*param_2 != (longlong *)0x0) {
          lVar10 = *(longlong *)*param_2;
        }
        FUN_1401bdd00(param_1,1,&DAT_140273f90,*(undefined4 *)(param_1 + 0x1578),
                      *(undefined4 *)(lVar10 + 0x56c));
      }
      local_res18 = 0;
      if (*param_2 != 0) {
        *(longlong *)(*param_2 + 8) = *(longlong *)(*param_2 + 8) + 1;
        local_res18 = *param_2;
      }
      FUN_1401c1ce0(param_1,&local_res18);
      lVar9 = FUN_14015b3b0(param_1 + 0x1650);
LAB_1401c25be:
      if (*param_2 != 0) {
        *(longlong *)(*param_2 + 8) = *(longlong *)(*param_2 + 8) + -1;
        lVar9 = *param_2;
        if (*(longlong *)(lVar9 + 8) == 0) {
          param_2 = (longlong *)*param_2;
          puVar4 = (undefined8 *)*param_2;
          if (puVar4 != (undefined8 *)0x0) {
            (**(code **)*puVar4)(puVar4,1);
          }
          lVar9 = FUN_140156970(param_2);
        }
      }
      return lVar9;
    }
    local_res20 = (longlong *)0x0;
    if (*(longlong *)(lVar11 + 8) != 0) {
      *(longlong *)(*(longlong *)(lVar11 + 8) + 8) =
           *(longlong *)(*(longlong *)(lVar11 + 8) + 8) + 1;
      local_res20 = *(longlong **)(lVar11 + 8);
    }
    plVar1 = local_res20;
    lVar6 = lVar10;
    if (local_res20 != (longlong *)0x0) {
      lVar6 = *local_res20;
    }
    lVar9 = lVar10;
    if (*(longlong *)(lVar6 + 0x28) != 0) {
      lVar9 = *(longlong *)(lVar6 + 0x18);
    }
    lVar7 = FUN_14015ae70(&local_res20);
    while ((lVar12 = lVar9, plVar5 = local_res20, lVar12 != 0 || (lVar6 + 8 != lVar7 + 8))) {
      if (lVar12 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      lVar8 = FUN_14015ae70(param_2);
      plVar5 = local_res20;
      lVar9 = lVar10;
      if (lVar8 != 0) {
        lVar9 = lVar8 + 8;
      }
      if (*(longlong *)(lVar12 + 8) == lVar9) {
        if (plVar1 != (longlong *)0x0) {
          plVar2 = plVar1 + 1;
          *plVar2 = *plVar2 + -1;
          lVar9 = plVar1[1];
          if (*plVar2 == 0) {
            pvVar3 = (void *)*local_res20;
            if (pvVar3 != (void *)0x0) {
              FUN_1401b2400((longlong)pvVar3 + 8);
              operator_delete(pvVar3);
            }
            lVar9 = FUN_140156970(plVar5);
          }
        }
        goto LAB_1401c25be;
      }
      lVar9 = lVar10;
      if (lVar12 != 0) {
        lVar9 = *(longlong *)(lVar12 + 0x10);
      }
    }
    if (plVar1 != (longlong *)0x0) {
      plVar1 = plVar1 + 1;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        pvVar3 = (void *)*local_res20;
        if (pvVar3 != (void *)0x0) {
          FUN_1401b2400((longlong)pvVar3 + 8);
          operator_delete(pvVar3);
        }
        FUN_140156970(plVar5);
      }
    }
    if (lVar11 == 0) {
      lVar11 = 0;
    }
    else {
      lVar11 = *(longlong *)(lVar11 + 0x10);
    }
  } while( true );
}



void FUN_1401c2610(longlong param_1,undefined4 param_2,longlong param_3,undefined8 param_4)

{
  undefined4 uVar1;
  int iVar2;
  longlong lVar3;
  void *pvVar4;
  undefined8 uVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lVar8;
  int iVar9;
  undefined4 *puVar10;
  longlong *local_res20;
  
  FUN_14015cb30(param_3,0,param_3,param_4,0xfffffffffffffffe);
  uVar5 = (**(code **)(*(longlong *)(param_1 + -0x70) + 0x58))(param_1 + -0x70);
  FUN_140156b50(uVar5);
  FUN_1401c1ec0(param_1 + -0x70,&local_res20,param_2);
  if ((local_res20 != (longlong *)0x0) && (lVar3 = *local_res20, lVar3 != 0)) {
    if (*(longlong *)(lVar3 + 0x28) == 0) {
      puVar10 = (undefined4 *)0x0;
    }
    else {
      puVar10 = *(undefined4 **)(lVar3 + 0x18);
    }
    while( true ) {
      if (local_res20 == (longlong *)0x0) {
        lVar8 = 0;
      }
      else {
        lVar8 = *local_res20;
      }
      if (puVar10 == (undefined4 *)0x0) break;
      uVar1 = *puVar10;
      iVar2 = *(int *)(param_3 + 0x18);
      lVar8 = (longlong)iVar2;
      if (iVar2 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      iVar9 = *(int *)(param_3 + 0x18);
      FUN_14015cb30(param_3,iVar9 + 1);
      iVar9 = iVar9 - iVar2;
      if (0 < iVar9) {
        if (*(int *)(param_3 + 0x18) == 0) {
          lVar7 = 0;
          lVar6 = 0;
        }
        else {
          lVar7 = *(longlong *)(param_3 + 0x10);
          lVar6 = *(longlong *)(param_3 + 0x10);
        }
        memmove((void *)(lVar6 + 4 + lVar8 * 4),(void *)(lVar7 + lVar8 * 4),(longlong)iVar9 << 2);
      }
      if (*(int *)(param_3 + 0x18) == 0) {
        lVar7 = 0;
      }
      else {
        lVar7 = *(longlong *)(param_3 + 0x10);
      }
      *(undefined4 *)(lVar7 + lVar8 * 4) = uVar1;
      puVar10 = *(undefined4 **)(puVar10 + 4);
    }
    if (lVar3 + 8 != lVar8 + 8) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  if ((local_res20 != (longlong *)0x0) &&
     (local_res20[1] = local_res20[1] + -1, local_res20[1] == 0)) {
    pvVar4 = (void *)*local_res20;
    if (pvVar4 != (void *)0x0) {
      FUN_1401b2400((longlong)pvVar4 + 8);
      operator_delete(pvVar4);
    }
    FUN_140156970(local_res20);
  }
  FUN_140156be0(uVar5);
  return;
}



double FUN_1401c27c0(longlong *param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  void *pvVar2;
  double dVar3;
  undefined8 uVar4;
  longlong *plVar5;
  longlong lVar6;
  longlong lVar7;
  undefined4 *puVar8;
  double dVar9;
  double dVar10;
  longlong *local_res8;
  longlong *local_res18;
  undefined8 uVar11;
  undefined8 uVar12;
  
  uVar11 = 0xfffffffffffffffe;
  uVar4 = (**(code **)(param_1[-0xe] + 0x58))(param_1 + -0xe);
  uVar12 = uVar4;
  FUN_140156b50(uVar4);
  if (param_2 == 1) {
    dVar10 = (double)param_1[0x92];
    FUN_140156be0(uVar4);
  }
  else {
    plVar5 = (longlong *)FUN_1401bb6b0(param_1 + -0xe,&local_res18,param_2,param_4,uVar11,uVar12,1);
    lVar7 = 0;
    if ((longlong *)*plVar5 != (longlong *)0x0) {
      lVar7 = *(longlong *)*plVar5;
    }
    if ((local_res18 != (longlong *)0x0) &&
       (local_res18[1] = local_res18[1] + -1, local_res18[1] == 0)) {
      puVar1 = (undefined8 *)*local_res18;
      if (puVar1 != (undefined8 *)0x0) {
        (**(code **)*puVar1)(puVar1,1);
      }
      FUN_140156970(local_res18);
    }
    if (lVar7 == 0) {
      FUN_1401c1ec0(param_1 + -0xe,&local_res8,param_2);
      if ((local_res8 != (longlong *)0x0) && (lVar7 = *local_res8, lVar7 != 0)) {
        dVar10 = 0.0;
        dVar3 = dVar10;
        if (*(longlong *)(lVar7 + 0x28) == 0) {
          puVar8 = (undefined4 *)0x0;
        }
        else {
          puVar8 = *(undefined4 **)(lVar7 + 0x18);
        }
        while( true ) {
          if (local_res8 == (longlong *)0x0) {
            lVar6 = 0;
          }
          else {
            lVar6 = *local_res8;
          }
          if (puVar8 == (undefined4 *)0x0) break;
          dVar9 = (double)(**(code **)(*param_1 + 0x120))(param_1,*puVar8);
          if (0.0 <= dVar9) {
            dVar3 = dVar3 + 1.0;
            dVar10 = dVar10 + dVar9;
          }
          puVar8 = *(undefined4 **)(puVar8 + 4);
        }
        if (lVar7 + 8 != lVar6 + 8) {
                    // WARNING: Subroutine does not return
          FUN_14004ea80(0x80004005);
        }
        if (0.0 < dVar3) {
          if ((local_res8 != (longlong *)0x0) &&
             (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
            pvVar2 = (void *)*local_res8;
            if (pvVar2 != (void *)0x0) {
              FUN_1401b2400((longlong)pvVar2 + 8);
              operator_delete(pvVar2);
            }
            FUN_140156970(local_res8);
          }
          FUN_140156be0(uVar12);
          return dVar10 / dVar3;
        }
      }
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        pvVar2 = (void *)*local_res8;
        if (pvVar2 != (void *)0x0) {
          FUN_1401b2400((longlong)pvVar2 + 8);
          operator_delete(pvVar2);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar12);
      dVar10 = -1.0;
    }
    else {
      *(undefined1 *)(lVar7 + 0x21) = 1;
      dVar10 = *(double *)(lVar7 + 0x158);
      FUN_140156be0(uVar12);
    }
  }
  return dVar10;
}



double FUN_1401c2a60(longlong *param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  void *pvVar2;
  double dVar3;
  undefined8 uVar4;
  longlong *plVar5;
  longlong lVar6;
  longlong lVar7;
  undefined4 *puVar8;
  double dVar9;
  double dVar10;
  longlong *local_res8;
  longlong *local_res18;
  undefined8 uVar11;
  undefined8 uVar12;
  
  uVar11 = 0xfffffffffffffffe;
  uVar4 = (**(code **)(param_1[-0xe] + 0x58))(param_1 + -0xe);
  uVar12 = uVar4;
  FUN_140156b50(uVar4);
  if (param_2 == 1) {
    dVar10 = (double)param_1[0x91];
    FUN_140156be0(uVar4);
  }
  else {
    plVar5 = (longlong *)FUN_1401bb6b0(param_1 + -0xe,&local_res18,param_2,param_4,uVar11,uVar12,1);
    lVar7 = 0;
    if ((longlong *)*plVar5 != (longlong *)0x0) {
      lVar7 = *(longlong *)*plVar5;
    }
    if ((local_res18 != (longlong *)0x0) &&
       (local_res18[1] = local_res18[1] + -1, local_res18[1] == 0)) {
      puVar1 = (undefined8 *)*local_res18;
      if (puVar1 != (undefined8 *)0x0) {
        (**(code **)*puVar1)(puVar1,1);
      }
      FUN_140156970(local_res18);
    }
    if (lVar7 == 0) {
      FUN_1401c1ec0(param_1 + -0xe,&local_res8,param_2);
      if ((local_res8 != (longlong *)0x0) && (lVar7 = *local_res8, lVar7 != 0)) {
        dVar10 = 0.0;
        dVar3 = dVar10;
        if (*(longlong *)(lVar7 + 0x28) == 0) {
          puVar8 = (undefined4 *)0x0;
        }
        else {
          puVar8 = *(undefined4 **)(lVar7 + 0x18);
        }
        while( true ) {
          if (local_res8 == (longlong *)0x0) {
            lVar6 = 0;
          }
          else {
            lVar6 = *local_res8;
          }
          if (puVar8 == (undefined4 *)0x0) break;
          dVar9 = (double)(**(code **)(*param_1 + 0x128))(param_1,*puVar8);
          if (0.0 <= dVar9) {
            dVar3 = dVar3 + 1.0;
            dVar10 = dVar10 + dVar9;
          }
          puVar8 = *(undefined4 **)(puVar8 + 4);
        }
        if (lVar7 + 8 != lVar6 + 8) {
                    // WARNING: Subroutine does not return
          FUN_14004ea80(0x80004005);
        }
        if (0.0 < dVar3) {
          if ((local_res8 != (longlong *)0x0) &&
             (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
            pvVar2 = (void *)*local_res8;
            if (pvVar2 != (void *)0x0) {
              FUN_1401b2400((longlong)pvVar2 + 8);
              operator_delete(pvVar2);
            }
            FUN_140156970(local_res8);
          }
          FUN_140156be0(uVar12);
          return dVar10 / dVar3;
        }
      }
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        pvVar2 = (void *)*local_res8;
        if (pvVar2 != (void *)0x0) {
          FUN_1401b2400((longlong)pvVar2 + 8);
          operator_delete(pvVar2);
        }
        FUN_140156970(local_res8);
      }
      FUN_140156be0(uVar12);
      dVar10 = -1.0;
    }
    else {
      *(undefined1 *)(lVar7 + 0x21) = 1;
      dVar10 = *(double *)(lVar7 + 0x50);
      FUN_140156be0(uVar12);
    }
  }
  return dVar10;
}



void FUN_1401c2d00(longlong param_1,longlong param_2,char param_3)

{
  longlong *plVar1;
  undefined4 uVar2;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  FUN_1401c19f0(param_2);
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(*plVar1 + 0x18))(plVar1,param_2);
  }
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
  if (((param_3 != '\0') && (*(ulonglong *)(param_1 + 0x20) < *(ulonglong *)(param_1 + 0x40))) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar2 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar2);
  }
  return;
}



void FUN_1401c2d90(longlong param_1,longlong param_2,undefined1 param_3)

{
  uint uVar1;
  ulonglong uVar2;
  uint uVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar1 = *(uint *)(param_1 + 0x28);
  uVar2 = (ulonglong)*(uint *)(param_2 + 0x20) % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x20) == 1) {
    *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    *(undefined8 *)(param_1 + 0x10) = 0;
    *(undefined8 *)(param_1 + 0x18) = 0;
  }
  else {
    uVar3 = (uint)uVar2;
    if (((*(longlong *)(param_2 + 0x18) == 0) ||
        (*(uint *)(*(longlong *)(param_2 + 0x18) + 0x20) % uVar1 != uVar3)) &&
       ((*(longlong *)(param_2 + 0x10) == 0 ||
        (*(uint *)(*(longlong *)(param_2 + 0x10) + 0x20) % uVar1 != uVar3)))) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    }
    else if (param_2 == *(longlong *)(*(longlong *)(param_1 + 8) + (longlong)(int)uVar3 * 8)) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = *(undefined8 *)(param_2 + 0x10);
    }
    if (param_2 == *(longlong *)(param_1 + 0x10)) {
      *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_2 + 0x10);
      *(undefined8 *)(param_2 + 0x18) = 0;
    }
    if (param_2 == *(longlong *)(param_1 + 0x18)) {
      *(undefined8 *)(param_1 + 0x18) = *(undefined8 *)(param_2 + 0x18);
      *(undefined8 *)(param_2 + 0x10) = 0;
    }
    if (*(longlong *)(param_2 + 0x18) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x18) + 0x10) = *(undefined8 *)(param_2 + 0x10);
    }
    if (*(longlong *)(param_2 + 0x10) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x10) + 0x18) = *(undefined8 *)(param_2 + 0x18);
    }
  }
  FUN_1401c2d00(param_1,param_2,param_3);
  FUN_14015b3b0(param_1);
  return;
}



undefined4 * FUN_1401c2e90(longlong param_1,undefined4 *param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  undefined4 *puVar4;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar4 = (undefined4 *)FUN_140156940(0x28);
  }
  else {
    puVar4 = (undefined4 *)
             (**(code **)(*plVar1 + 8))(plVar1,0x28,param_3,param_4,0xfffffffffffffffe);
  }
  if (puVar4 != (undefined4 *)0x0) {
    *puVar4 = *param_2;
    *(undefined8 *)(puVar4 + 2) = 0;
    puVar4[8] = param_4;
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015b3b0(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined4 **)(param_1 + 0x10) = puVar4;
    *(undefined4 **)(param_1 + 0x18) = puVar4;
    *(undefined8 *)(puVar4 + 6) = 0;
    *(undefined8 *)(puVar4 + 4) = 0;
  }
  else {
    FUN_14015b3b0(param_1);
    FUN_14015b3b0(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      *(undefined8 *)(puVar4 + 6) = 0;
      *(longlong *)(puVar4 + 4) = lVar2;
      if (lVar2 != 0) {
        *(undefined4 **)(lVar2 + 0x18) = puVar4;
      }
      *(undefined4 **)(param_1 + 0x10) = puVar4;
    }
    else {
      if (*(longlong *)(lVar2 + 0x18) == 0) {
        *(undefined4 **)(param_1 + 0x10) = puVar4;
      }
      else {
        *(undefined4 **)(*(longlong *)(lVar2 + 0x18) + 0x10) = puVar4;
      }
      *(undefined8 *)(puVar4 + 6) = *(undefined8 *)(lVar2 + 0x18);
      *(longlong *)(puVar4 + 4) = lVar2;
      *(undefined4 **)(lVar2 + 0x18) = puVar4;
    }
  }
  *(undefined4 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar4;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b3b0(param_1);
  FUN_14015b3b0(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar3 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar3);
  }
  FUN_14015b3b0(param_1);
  return puVar4;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x0001401c3720)
// WARNING: Removing unreachable block (ram,0x0001401c372c)
// WARNING: Removing unreachable block (ram,0x0001401c3724)
// WARNING: Removing unreachable block (ram,0x0001401c3732)
// WARNING: Removing unreachable block (ram,0x0001401c35b7)
// WARNING: Removing unreachable block (ram,0x0001401c35be)
// WARNING: Removing unreachable block (ram,0x0001401c35d6)
// WARNING: Removing unreachable block (ram,0x0001401c35e2)
// WARNING: Removing unreachable block (ram,0x0001401c35da)
// WARNING: Removing unreachable block (ram,0x0001401c35e8)
// WARNING: Removing unreachable block (ram,0x0001401c3604)
// WARNING: Removing unreachable block (ram,0x0001401c3500)
// WARNING: Removing unreachable block (ram,0x0001401c3507)
// WARNING: Removing unreachable block (ram,0x0001401c3520)
// WARNING: Removing unreachable block (ram,0x0001401c352c)
// WARNING: Removing unreachable block (ram,0x0001401c3524)
// WARNING: Removing unreachable block (ram,0x0001401c3532)
// WARNING: Removing unreachable block (ram,0x0001401c354e)

undefined8 FUN_1401c2fe0(longlong *param_1,longlong param_2,int *param_3,int *param_4,uint param_5)

{
  undefined *puVar1;
  undefined4 uVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  undefined8 *puVar7;
  longlong lVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *plVar11;
  uint *puVar12;
  undefined8 uVar13;
  longlong lVar14;
  longlong *plVar15;
  uint *puVar16;
  int iVar17;
  uint uVar18;
  ulonglong uVar19;
  longlong *plVar20;
  uint uVar21;
  longlong *plVar22;
  undefined1 auStack_2c38 [32];
  undefined ***local_2c18;
  undefined8 local_2c08;
  undefined **local_2c00;
  longlong *local_2bf8;
  longlong *local_2bf0;
  ulonglong local_2be8;
  undefined8 local_2be0;
  undefined8 local_2bd8;
  undefined4 uStack_2bd0;
  undefined4 uStack_2bcc;
  undefined1 local_2bc8 [4];
  undefined4 local_2bc4;
  longlong *local_2bc0;
  longlong *local_2bb8;
  undefined4 local_2bb0;
  int local_2bac;
  longlong local_2ba0;
  int local_2b98 [2];
  undefined8 local_2b90;
  undefined1 local_2b88;
  int local_2b84;
  undefined1 local_2b80;
  undefined1 local_2b7f;
  longlong local_2b78;
  undefined8 local_2b70;
  longlong *local_2b68;
  undefined **local_2b60;
  longlong *local_2b58;
  longlong *local_2b50;
  uint local_2b48;
  undefined8 local_2b44;
  undefined4 local_2b3c;
  int *local_2b38;
  undefined8 local_2b30;
  undefined4 local_2b28;
  undefined4 uStack_2b24;
  undefined8 local_2b20;
  char local_2b18;
  longlong local_2b10;
  longlong *local_2b08;
  undefined8 *local_2b00;
  longlong local_2af0;
  undefined8 local_2ae0;
  undefined1 local_2ad8 [72];
  undefined1 local_2a90 [72];
  undefined1 local_2a48 [80];
  undefined1 local_29f8 [8];
  longlong *local_29f0;
  longlong local_29e8;
  undefined4 local_29e0;
  int local_29dc;
  undefined1 local_29d0 [136];
  void *local_2948;
  longlong local_2940;
  ulonglong local_2938;
  undefined8 local_2930;
  undefined8 auStack_2928 [100];
  undefined4 local_2608;
  undefined4 uStack_2604;
  undefined4 uStack_2600;
  undefined4 uStack_25fc;
  undefined4 *local_1988;
  undefined4 local_1980;
  int local_197c;
  undefined1 local_1978 [3200];
  undefined1 *local_cf8;
  undefined4 local_cf0;
  int local_cec;
  longlong *local_ce8 [400];
  longlong **local_68;
  undefined4 local_60;
  undefined4 local_5c;
  ulonglong local_58;
  
  local_2ae0 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_2c38;
  plVar15 = (longlong *)0x0;
  local_2b78 = 0;
  local_2ba0 = param_2;
  local_2b68 = param_1;
  local_2b38 = param_3;
  local_2b10 = param_2;
  local_2b08 = param_1;
  local_2b20 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(local_2b20);
  puVar1 = PTR_u_Cannot_send_messages_unless_conn_1403219c0;
  local_2b18 = '\x01';
  uVar21 = 0;
  if ((((longlong *)param_1[699] != (longlong *)0x0) && (*(longlong *)param_1[699] != 0)) &&
     ((int)param_1[0x2af] != 0)) {
    local_2948 = (void *)0x0;
    local_2930 = 0;
    local_2940 = 0;
    local_2938 = 100;
    if (0 < (int)param_5) {
      uVar19 = (ulonglong)param_5;
      do {
        if (*param_4 != 0) {
          FUN_1401c1f90(param_1,*param_4,&local_2948);
        }
        param_4 = param_4 + 1;
        uVar19 = uVar19 - 1;
      } while (uVar19 != 0);
    }
    FUN_1401b1650(&local_2948);
    local_2b58 = (longlong *)0x0;
    local_2b3c = 0;
    local_2b50 = (longlong *)0x0;
    local_2b48 = 0;
    local_2b44 = 0;
    local_2b60 = Proud::CNetClientImpl::BypassDestList_C::vftable;
    local_2b70 = (longlong *)((ulonglong)local_2b70._4_4_ << 0x20);
    plVar9 = plVar15;
    plVar10 = plVar15;
    plVar22 = plVar15;
    while( true ) {
      iVar4 = (int)plVar9;
      local_2c08 = (uint *)CONCAT44(local_2c08._4_4_,iVar4);
      lVar14 = (longlong)iVar4;
      iVar17 = (int)plVar10;
      if (local_2940 <= lVar14) break;
      if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (local_2938 < 0x65) {
        puVar7 = auStack_2928 + lVar14;
      }
      else {
        puVar7 = (undefined8 *)((longlong)local_2948 + lVar14 * 8);
      }
      plVar9 = (longlong *)*puVar7;
      plVar11 = param_1 + 0xc;
      if (param_1 == (longlong *)0x0) {
        plVar11 = plVar15;
      }
      if ((plVar9 == plVar11) && (*(char *)((longlong)param_3 + 0x2d) != '\0')) {
        FUN_1401544a0(&local_2c00);
        FUN_1401846e0(local_2ba0,&local_2c00);
        lVar14 = param_1[0x2a8];
        plVar11 = (longlong *)local_2b68[0x2a6];
        if (plVar11 == (longlong *)0x0) {
          puVar7 = (undefined8 *)FUN_140156940(0x38);
        }
        else {
          puVar7 = (undefined8 *)(**(code **)(*plVar11 + 8))(plVar11,0x38);
        }
        local_2b00 = puVar7;
        if (puVar7 != (undefined8 *)0x0) {
          local_2bd8 = (longlong **)puVar7;
          FUN_1401544d0(puVar7 + 2,&local_2c00);
        }
        param_1 = local_2b68;
        puVar7[1] = lVar14;
        *puVar7 = 0;
        local_2b68[0x2a9] = local_2b68[0x2a9] + 1;
        if ((undefined8 *)local_2b68[0x2a8] == (undefined8 *)0x0) {
          local_2b68[0x2a7] = (longlong)puVar7;
        }
        else {
          *(undefined8 *)local_2b68[0x2a8] = puVar7;
        }
        local_2b68[0x2a8] = (longlong)puVar7;
        local_2bd8 = &local_2bf8;
        FUN_1401560e0(&local_2bf8);
        if ((local_2bf0 != (longlong *)0x0) && ((longlong)local_2be8 < 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
      }
      param_2 = local_2ba0;
      if (plVar9 == param_1 + 0x2aa) {
        local_2b98[0] = param_3[8];
        local_2b90 = *(undefined8 *)(param_3 + 6);
        local_2b88 = *(undefined1 *)((longlong)param_3 + 0x2d);
        local_2b84 = param_3[0xc];
        local_2b80 = *(undefined1 *)((longlong)param_3 + 0x41);
        local_2b7f = (undefined1)param_3[0x10];
        local_2bd8 = local_ce8;
        local_5c = 200;
        local_60 = 0;
        local_68 = local_ce8;
        FUN_140184470(local_2ba0 + 0xc80,&local_68);
        local_2c18 = (undefined ***)local_2b98;
        FUN_1401b0fa0(param_1,1,*param_3,local_ce8);
      }
      else if (plVar9 != (longlong *)0x0) {
        local_2c18 = (undefined ***)((ulonglong)local_2c18 & 0xffffffff00000000);
        lVar14 = __RTDynamicCast(plVar9,0,&Proud::ISendDest_C::RTTI_Type_Descriptor,
                                 &Proud::CRemotePeer_C::RTTI_Type_Descriptor);
        param_2 = local_2ba0;
        local_2b78 = lVar14;
        if (lVar14 != 0) {
          if ((((*(char *)(lVar14 + 0x608) != '\0') || (param_3[4] <= (int)local_2b70)) ||
              (*(double *)(lVar14 + 0x50) <= 0.0)) ||
             ((*(double *)(lVar14 + 0x60) <= 0.0 ||
              ((*(double *)(lVar14 + 0x60) + (double)param_1[0x9f]) / *(double *)(lVar14 + 0x50) <
               *(double *)(param_3 + 0xe))))) {
            if (*param_3 == 1) {
              FUN_1401e9610(*(longlong *)(lVar14 + 0x640) + 8,1);
              uVar2 = FUN_1401e7f70(lVar14 + 0x638);
              local_2af0 = CONCAT44(local_2af0._4_4_,uVar2);
              if (iVar17 < 0) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              FUN_14015d6a0(&local_2b60);
              plVar9 = local_2b50;
              if (local_2b48 == 0) {
                plVar9 = plVar15;
              }
              plVar9[(longlong)iVar17 * 2] = lVar14;
              lVar8 = local_2af0;
LAB_1401c3635:
              plVar10 = (longlong *)(ulonglong)local_2b48;
              plVar9[(longlong)iVar17 * 2 + 1] = lVar8;
              plVar22 = local_2b50;
            }
            else if (*(char *)((longlong)param_3 + 0x2e) != '\0') {
              local_2b28 = 0;
              if (iVar17 < 0) {
                    // WARNING: Subroutine does not return
                FUN_1401566b0();
              }
              FUN_14015d6a0(&local_2b60);
              plVar9 = local_2b50;
              if (local_2b48 == 0) {
                plVar9 = plVar15;
              }
              plVar9[(longlong)iVar17 * 2] = lVar14;
              lVar8 = CONCAT44(uStack_2b24,local_2b28);
              goto LAB_1401c3635;
            }
            if ((char)param_3[0xb] != '\0') {
              *(undefined1 *)(lVar14 + 0x21) = 1;
            }
          }
          else {
            local_2b70 = (longlong *)CONCAT44(local_2b70._4_4_,(int)local_2b70 + 1);
            if (*(char *)((longlong)param_3 + 0x41) == '\0') {
              *(int *)(lVar14 + 0x40) = *(int *)(lVar14 + 0x40) + 1;
            }
            if (*param_3 == 1) {
              FUN_1401e7fd0(lVar14 + 0x638);
            }
            else {
              local_2b98[0] = param_3[8];
              local_2b90 = *(undefined8 *)(param_3 + 6);
              local_2b88 = *(undefined1 *)((longlong)param_3 + 0x2d);
              local_2b84 = param_3[0xc];
              local_2b80 = *(undefined1 *)((longlong)param_3 + 0x41);
              local_2b7f = (undefined1)param_3[0x10];
              FUN_1401e36d0(lVar14 + 0x668,local_2ba0,local_2b98);
            }
          }
        }
      }
      plVar9 = (longlong *)(ulonglong)((int)local_2c08 + 1);
    }
    if (iVar17 < 1) goto LAB_1401c3eeb;
    if (*param_3 != 0) {
      local_5c = 200;
      local_60 = 0;
      local_68 = local_ce8;
      FUN_1401544a0(local_29f8);
      FUN_140154120(local_29f8,local_29d0,0x80);
      FUN_1401a80b0(param_2,local_ce8,local_29f8);
      local_2bf8 = (longlong *)0x0;
      local_2bf0 = (longlong *)0x0;
      local_2be8 = 0;
      local_2be0 = 0;
      local_2c00 = Proud::BypassDestList::vftable;
      FUN_1401b1d90(&local_2b60,&local_2c00);
      local_cec = 200;
      local_cf0 = 0;
      local_cf8 = local_1978;
      FUN_1401544a0(local_2bc8);
      FUN_140153d90(local_2bc8);
      FUN_14004fd90(local_2bc8,0x14);
      FUN_140155e40(local_2bc8,&local_2c00);
      FUN_140153c60(&local_2b30,local_2bc8);
      iVar4 = FUN_1401843d0(local_ce8);
      FUN_140155b20(local_2bc8,(longlong)iVar4);
      local_197c = 200;
      local_1980 = 0;
      local_1988 = &local_2608;
      if (local_2bc0 == (longlong *)0x0) {
        uStack_2bd0 = local_2bb0;
        if (local_2bb8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
      }
      else {
        uStack_2bd0 = (int)local_2bc0[3];
      }
      plVar9 = local_2bb8;
      if (local_2bb8 == (longlong *)0x0) {
        if (local_2bc0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        plVar9 = plVar15;
        if ((int)local_2bc0[3] != 0) {
          plVar9 = (longlong *)local_2bc0[2];
        }
      }
      local_1980 = 1;
      local_2bd8._0_4_ = SUB84(plVar9,0);
      local_2bd8._4_4_ = (undefined4)((ulonglong)plVar9 >> 0x20);
      local_2608 = (undefined4)local_2bd8;
      uStack_2604 = local_2bd8._4_4_;
      uStack_25fc = uStack_2bcc;
      local_2bd8 = (longlong **)plVar9;
      uStack_2600 = uStack_2bd0;
      FUN_140156ed0(local_1978,&local_2608);
      if (local_1988 == (undefined4 *)0x0) {
        FUN_140156300(local_2ad8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_2ad8,(ThrowInfo *)&DAT_14031d928);
      }
      if (local_197c < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      FUN_140156ed0(local_1978,local_ce8);
      local_2b98[0] = param_3[8];
      local_2b90 = *(undefined8 *)(param_3 + 6);
      local_2b88 = *(undefined1 *)((longlong)param_3 + 0x2d);
      local_2b84 = param_3[0xc];
      local_2b7f = (undefined1)param_3[0x10];
      local_2b80 = 1;
      local_2bd8 = (longlong **)&local_2608;
      local_197c = 200;
      local_1980 = 0;
      local_1988 = &local_2608;
      FUN_140184470(&local_cf8,&local_1988);
      local_2c18 = (undefined ***)local_2b98;
      FUN_1401b0fa0(param_1,0,1,&local_2608);
      FUN_140153c80(&local_2b30);
      local_2bd8 = &local_2bc0;
      FUN_1401560e0(&local_2bc0);
      if (local_2bb8 != (longlong *)0x0) {
        if (local_2bac < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_2bb0 = 0;
      }
      FUN_140156dc0(local_1978);
      local_2c00 = Proud::CFastArray<>::vftable;
      if (local_2bf0 != (longlong *)0x0) {
        if (local_2bf8 == (longlong *)0x0) {
          FUN_140156970();
        }
        else {
          (**(code **)(*local_2bf8 + 0x18))(local_2bf8,local_2bf0);
        }
      }
      local_2bd8 = &local_29f0;
      FUN_1401560e0(&local_29f0);
      if (local_29e8 != 0) {
        if (local_29dc < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_29e0 = 0;
      }
      FUN_140156dc0(local_ce8);
      goto LAB_1401c3eeb;
    }
    local_2bf8 = (longlong *)0x0;
    local_2bf0 = (longlong *)0x0;
    local_2be8 = 0;
    local_2be0 = 0;
    local_2c00 = Proud::HostIDArray::vftable;
    local_2c08 = (uint *)((ulonglong)local_2c08._4_4_ << 0x20);
    local_2b78 = 0;
    plVar10 = plVar15;
    plVar11 = plVar22;
    plVar20 = plVar15;
    plVar9 = plVar15;
    if (0 < iVar17) {
      do {
        local_2b70 = plVar11;
        if ((local_2b78 < 0) || (iVar17 <= (int)plVar10)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        local_2af0 = plVar11[1];
        local_2b38 = (int *)(*plVar11 + 0x56c);
        iVar4 = (int)plVar20;
        if (iVar4 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        FUN_14015cb30(&local_2c00,iVar4 + 1);
        plVar9 = local_2bf0;
        uVar21 = (uint)local_2be8;
        plVar20 = (longlong *)(local_2be8 & 0xffffffff);
        plVar10 = local_2bf0;
        if ((uint)local_2be8 == 0) {
          plVar10 = plVar15;
        }
        FUN_140050120((longlong)plVar10 + (longlong)iVar4 * 4,local_2b38,4);
        uVar3 = (int)local_2c08 + 1;
        local_2c08 = (uint *)CONCAT44(local_2c08._4_4_,uVar3);
        local_2b78 = local_2b78 + 1;
        local_2b70 = local_2b70 + 2;
        plVar10 = (longlong *)(ulonglong)uVar3;
        plVar11 = local_2b70;
      } while ((int)uVar3 < iVar17);
    }
    plVar10 = local_2bf8;
    FUN_1401544a0(local_2bc8);
    FUN_140153d90(local_2bc8);
    FUN_14004fd90(local_2bc8,0x15);
    FUN_14004fd90(local_2bc8,(char)param_3[8]);
    FUN_140155b20(local_2bc8,*(undefined8 *)(param_3 + 6));
    FUN_140155b20(local_2bc8,(longlong)(int)uVar21);
    plVar11 = plVar9;
    if (uVar21 == 0) {
      plVar11 = plVar15;
    }
    if ((uVar21 & 0x3fffffff) != 0) {
      local_2bc4 = 0;
      if (local_2bc0 == (longlong *)0x0) {
        if (local_2bb8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0(0,plVar11);
        }
LAB_1401c383e:
        FUN_14004ff50(&local_2bb8);
      }
      else {
        if (local_2bb8 != (longlong *)0x0) goto LAB_1401c383e;
        if (local_2bc0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0(0,plVar11);
        }
        FUN_140050180();
      }
      FUN_1400501f0(local_2bc8);
    }
    FUN_140153c60(&local_2b30,local_2bc8);
    lVar14 = local_2ba0;
    iVar4 = FUN_1401843d0(local_2ba0);
    FUN_140155b20(local_2bc8,(longlong)iVar4);
    local_cec = 200;
    local_cf0 = 0;
    local_cf8 = local_1978;
    local_197c = 200;
    local_1980 = 0;
    local_1988 = &local_2608;
    if (local_2bc0 == (longlong *)0x0) {
      uStack_2bd0 = local_2bb0;
      if (local_2bb8 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
    }
    else {
      uStack_2bd0 = (int)local_2bc0[3];
    }
    plVar11 = local_2bb8;
    if (local_2bb8 == (longlong *)0x0) {
      if (local_2bc0 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      plVar11 = plVar15;
      if ((int)local_2bc0[3] != 0) {
        plVar11 = (longlong *)local_2bc0[2];
      }
    }
    local_1980 = 1;
    local_2bd8._0_4_ = SUB84(plVar11,0);
    local_2bd8._4_4_ = (undefined4)((ulonglong)plVar11 >> 0x20);
    local_2608 = (undefined4)local_2bd8;
    uStack_2604 = local_2bd8._4_4_;
    uStack_25fc = uStack_2bcc;
    local_2bd8 = (longlong **)plVar11;
    uStack_2600 = uStack_2bd0;
    FUN_140156ed0(local_1978,&local_2608);
    if (local_1988 == (undefined4 *)0x0) {
      FUN_140156300(local_2a90,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_2a90,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_197c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_140156ed0(local_1978,lVar14);
    local_2b98[0] = param_3[8];
    local_2b90 = *(undefined8 *)(param_3 + 6);
    local_2b88 = *(undefined1 *)((longlong)param_3 + 0x2d);
    local_2b84 = param_3[0xc];
    local_2b7f = (undefined1)param_3[0x10];
    local_2b80 = 1;
    local_2bd8 = (longlong **)&local_2608;
    local_197c = 200;
    local_1980 = 0;
    local_1988 = &local_2608;
    FUN_140184470(&local_cf8,&local_1988);
    plVar11 = local_2b68;
    local_2bd8 = (longlong **)&local_2608;
    FUN_1401b0420(local_2b68);
    if ((undefined8 *)plVar11[0x2ae] != (undefined8 *)0x0) {
      plVar15 = *(longlong **)plVar11[0x2ae];
    }
    FUN_1401dca00(plVar15,0,&local_2608,local_2b98);
    FUN_140156dc0(&local_2608);
    if (local_cf8 == (undefined1 *)0x0) {
      FUN_140156300(local_2a48,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_2a48,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_cec < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_cf0 = 0;
    FUN_140153c80(&local_2b30);
    local_2bd8 = &local_2bc0;
    FUN_1401560e0(&local_2bc0);
    if (local_2bb8 != (longlong *)0x0) {
      if (local_2bac < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_2bb0 = 0;
    }
    if (plVar9 != (longlong *)0x0) {
      if (plVar10 == (longlong *)0x0) {
        FUN_140156970(plVar9);
      }
      else {
        (**(code **)(*plVar10 + 0x18))(plVar10,plVar9);
      }
    }
LAB_1401c3eeb:
    if (plVar22 != (longlong *)0x0) {
      if (local_2b58 == (longlong *)0x0) {
        FUN_140156970(plVar22);
      }
      else {
        (**(code **)(*local_2b58 + 0x18))(local_2b58,plVar22);
      }
    }
    if (100 < local_2938) {
      operator_delete__(local_2948);
    }
    if (local_2b18 != '\0') {
      FUN_140156be0(local_2b20);
    }
    return 1;
  }
  FUN_1401568c0();
  local_2c08 = (uint *)PTR_DAT_1403200a0;
  uVar3 = FUN_140156740(puVar1);
  if ((local_2c08 != (uint *)0x0) &&
     (plVar15 = (longlong *)0x0, local_2c08 != (uint *)PTR_DAT_1403200a0)) {
    plVar15 = (longlong *)(ulonglong)local_2c08[-2];
  }
  uVar5 = 0;
  uVar6 = uVar3;
  if ((((int)uVar3 <= (int)plVar15) && (uVar6 = uVar5, local_2c08 != (uint *)0x0)) &&
     (local_2c08 != (uint *)PTR_DAT_1403200a0)) {
    uVar6 = local_2c08[-2];
  }
  uVar18 = 1;
  if (1 < (int)uVar6) {
    uVar18 = uVar6;
  }
  uVar6 = uVar5;
  if ((local_2c08 != (uint *)0x0) && (local_2c08 != (uint *)PTR_DAT_1403200a0)) {
    uVar6 = local_2c08[-2];
  }
  if ((int)uVar6 < (int)uVar18) {
    if (local_2c08 == (uint *)0x0) {
      local_2c08 = (uint *)PTR_DAT_1403200a0;
    }
    if ((int)uVar18 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar18 == 0) {
      FUN_14004f990(&local_2c08);
    }
    else {
      uVar6 = uVar5;
      if ((local_2c08 != (uint *)0x0) && (local_2c08 != (uint *)PTR_DAT_1403200a0)) {
        uVar6 = local_2c08[-2];
      }
      if (uVar18 != uVar6) {
        puVar12 = (uint *)FUN_140156940((longlong)(int)uVar18 * 2 + 10);
        if (puVar12 != (uint *)0x0) {
          *puVar12 = 0;
          puVar12[1] = 1;
        }
        *puVar12 = uVar18;
        uVar6 = uVar5;
        if ((local_2c08 != (uint *)0x0) && (local_2c08 != (uint *)PTR_DAT_1403200a0)) {
          uVar6 = local_2c08[-2];
        }
        puVar16 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar18 < (int)uVar6) {
LAB_1401c4045:
          if (local_2c08 != (uint *)0x0) {
            puVar16 = local_2c08;
          }
        }
        else {
          uVar18 = uVar21;
          if (local_2c08 != (uint *)0x0) {
            if (local_2c08 != (uint *)PTR_DAT_1403200a0) {
              uVar18 = local_2c08[-2];
            }
            goto LAB_1401c4045;
          }
        }
        FUN_140156770(puVar12 + 2,puVar16,uVar18);
        FUN_14004f990(&local_2c08);
        local_2c08 = puVar12 + 2;
      }
    }
  }
  FUN_14004f670(&local_2c08);
  puVar12 = local_2c08;
  if (local_2c08 == (uint *)0x0) {
    puVar12 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar12,puVar1,uVar3);
  puVar12 = local_2c08;
  if (local_2c08 == (uint *)0x0) {
    puVar12 = (uint *)PTR_DAT_1403200a0;
  }
  uVar3 = FUN_140156740(puVar12);
  uVar21 = 0;
  if (0 < (int)uVar3) {
    uVar21 = uVar3;
  }
  uVar3 = uVar5;
  if ((local_2c08 != (uint *)0x0) && (local_2c08 != (uint *)PTR_DAT_1403200a0)) {
    uVar3 = local_2c08[-2];
  }
  if (((int)uVar3 <= (int)uVar21) && (uVar21 = uVar5, local_2c08 != (uint *)0x0)) {
    if (local_2c08 == (uint *)PTR_DAT_1403200a0) goto LAB_1401c40fa;
    uVar21 = local_2c08[-2];
  }
  if (((local_2c08 != (uint *)PTR_DAT_1403200a0) && (local_2c08 != (uint *)0x0)) &&
     (local_2c08 + -2 != (uint *)0x0)) {
    local_2c08[-2] = uVar21;
    *(undefined2 *)((longlong)local_2c08 + (longlong)(int)uVar21 * 2) = 0;
  }
LAB_1401c40fa:
  local_2bf8 = (longlong *)0x0;
  local_2bf0 = (longlong *)0x0;
  local_2be8 = 0;
  local_2be0 = 0;
  local_2c00 = Proud::ByteArray::vftable;
  local_2c18 = &local_2c00;
  uVar13 = FUN_140181f50(&local_2bd8,0x12,0,&local_2c08);
  (**(code **)(*param_1 + 0x80))(param_1,uVar13);
  FUN_1401858d0(&local_2c00);
  puVar12 = local_2c08;
  if (((local_2c08 != (uint *)0x0) && (local_2c08 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar16 = local_2c08 + -2, puVar16 != (uint *)0x0)) {
    uVar13 = FUN_1401568c0();
    local_2b30 = uVar13;
    FUN_140156b50(uVar13);
    local_2b28 = CONCAT31(local_2b28._1_3_,1);
    puVar12 = puVar12 + -1;
    *puVar12 = *puVar12 - 1;
    if (*puVar12 == 0) {
      FUN_140156970(puVar16);
    }
    FUN_140156be0(uVar13);
  }
  FUN_140156be0(local_2b20);
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401c41f0(longlong *param_1,uint param_2,int *param_3,longlong *param_4)

{
  undefined4 uVar1;
  undefined8 uVar2;
  undefined4 *puVar3;
  ulonglong uVar4;
  longlong *plVar5;
  uint uVar6;
  ulonglong uVar7;
  undefined1 auStack_3b8 [32];
  undefined8 local_398;
  undefined1 local_390;
  undefined8 local_388;
  void *local_378;
  longlong local_370;
  ulonglong local_368;
  undefined8 local_360;
  longlong local_358 [100];
  ulonglong local_38;
  
  local_388 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_3b8;
  uVar7 = (ulonglong)param_2;
  uVar2 = (**(code **)(*param_1 + 0x58))();
  local_398 = uVar2;
  FUN_140156b50(uVar2);
  local_390 = 1;
  uVar4 = 0;
  local_378 = (void *)0x0;
  local_360 = 0;
  local_370 = 0;
  local_368 = 100;
  if (0 < (int)param_2) {
    do {
      if (*param_3 != 0) {
        FUN_1401c1f90(param_1,*param_3,&local_378);
      }
      param_3 = param_3 + 1;
      uVar7 = uVar7 - 1;
    } while (uVar7 != 0);
  }
  FUN_1401b1650(&local_378);
  FUN_14015d090(param_4,local_370,0xffffffffffffffff);
  uVar7 = uVar4;
  if (0 < local_370) {
    do {
      if (((longlong)uVar4 < 0) || (local_370 <= (longlong)uVar4)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (local_368 < 0x65) {
        plVar5 = local_358 + uVar4;
      }
      else {
        plVar5 = (longlong *)((longlong)local_378 + uVar4 * 8);
      }
      plVar5 = (longlong *)*plVar5;
      if (plVar5 == (longlong *)0x0) {
        if (param_4[1] <= (longlong)uVar4) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        if ((ulonglong)param_4[2] < 0x65) {
          puVar3 = (undefined4 *)((longlong)param_4 + uVar4 * 4 + 0x20);
        }
        else {
          puVar3 = (undefined4 *)(*param_4 + uVar4 * 4);
        }
        *puVar3 = 0;
      }
      else {
        if (param_4[1] <= (longlong)uVar4) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        if ((ulonglong)param_4[2] < 0x65) {
          puVar3 = (undefined4 *)((longlong)param_4 + uVar4 * 4 + 0x20);
        }
        else {
          puVar3 = (undefined4 *)(*param_4 + uVar4 * 4);
        }
        uVar1 = (**(code **)(*plVar5 + 8))(plVar5);
        *puVar3 = uVar1;
      }
      uVar6 = (int)uVar7 + 1;
      uVar7 = (ulonglong)uVar6;
      uVar4 = (ulonglong)(int)uVar6;
    } while ((longlong)uVar4 < local_370);
  }
  if (100 < local_368) {
    operator_delete__(local_378);
  }
  FUN_140156be0(uVar2);
  return;
}



void FUN_1401c43a0(longlong param_1)

{
  undefined8 *puVar1;
  void *pvVar2;
  longlong *plVar3;
  uint uVar4;
  ulonglong uVar5;
  longlong lVar6;
  longlong lVar7;
  float fVar8;
  float fVar9;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_14015b3b0();
  lVar6 = *(longlong *)(param_1 + 0x10);
  while (lVar6 != 0) {
    lVar7 = *(longlong *)(lVar6 + 0x10);
    if ((*(longlong *)(lVar6 + 8) != 0) &&
       (*(longlong *)(*(longlong *)(lVar6 + 8) + 8) =
             *(longlong *)(*(longlong *)(lVar6 + 8) + 8) + -1,
       *(longlong *)(*(longlong *)(lVar6 + 8) + 8) == 0)) {
      puVar1 = *(undefined8 **)(lVar6 + 8);
      pvVar2 = (void *)*puVar1;
      if (pvVar2 != (void *)0x0) {
        FUN_1401b2400((longlong)pvVar2 + 8);
        operator_delete(pvVar2);
      }
      FUN_140156970(puVar1);
    }
    plVar3 = *(longlong **)(param_1 + 0x50);
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970(lVar6);
    }
    else {
      (**(code **)(*plVar3 + 0x18))(plVar3,lVar6);
    }
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    lVar6 = lVar7;
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_14015b3b0(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar4 = FUN_14019e650(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    lVar6 = 0;
    *(uint *)(param_1 + 0x28) = uVar4;
    fVar9 = (float)uVar4 * *(float *)(param_1 + 0x34);
    if ((9.223372e+18 < fVar9) && (fVar9 = fVar9 - 9.223372e+18, fVar9 < 9.223372e+18)) {
      lVar6 = -0x8000000000000000;
    }
    fVar8 = (float)uVar4 * *(float *)(param_1 + 0x30);
    lVar7 = 0;
    *(longlong *)(param_1 + 0x38) = (longlong)fVar9 + lVar6;
    if ((9.223372e+18 < fVar8) && (fVar8 = fVar8 - 9.223372e+18, fVar8 < 9.223372e+18)) {
      lVar7 = -0x8000000000000000;
    }
    uVar5 = (longlong)fVar8 + lVar7;
    if ((ulonglong)((longlong)fVar8 + lVar7) < 0x11) {
      uVar5 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar5;
  }
  FUN_14015b3b0(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



undefined8 FUN_1401c4530(longlong param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4)

{
  char cVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 8) == 0) {
    cVar1 = FUN_1401a8bb0(param_1,*(undefined4 *)(param_1 + 0x28),1);
    if (cVar1 == '\0') {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  FUN_14015b3b0(param_1);
  uVar2 = FUN_1401c2e90(param_1,param_2,param_3,param_4);
  FUN_14015b3b0(param_1);
  return uVar2;
}



void FUN_1401c45b0(void)

{
  FUN_1401c43a0();
  return;
}



undefined4 *
FUN_1401c45d0(undefined4 *param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  *param_1 = *param_2;
  FUN_1401544d0(param_1 + 2,param_2 + 2,param_3,param_4,0xfffffffffffffffe);
  param_1[0xc] = param_2[0xc];
  *(undefined ***)(param_1 + 0xe) = Proud::AddrPort::vftable;
  param_1[0x10] = param_2[0x10];
  *(undefined2 *)(param_1 + 0x11) = *(undefined2 *)(param_2 + 0x11);
  *(undefined1 *)(param_1 + 0x12) = *(undefined1 *)(param_2 + 0x12);
  FUN_140176480(param_1 + 0x14,param_2 + 0x14);
  return param_1;
}



uint * FUN_1401c4660(longlong param_1,uint *param_2)

{
  uint *puVar1;
  ulonglong uVar2;
  longlong lVar3;
  
  uVar2 = (ulonglong)*param_2 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (puVar1 = *(uint **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (puVar1 != (uint *)0x0 && ((uint)uVar2 == puVar1[8] % *(uint *)(param_1 + 0x28)));
        puVar1 = *(uint **)(puVar1 + 4)) {
      if (*puVar1 == *param_2) {
        return puVar1 + 2;
      }
    }
  }
  lVar3 = FUN_1401c4530(param_1,param_2,uVar2);
  return (uint *)(lVar3 + 8);
}



undefined4 * FUN_1401c46d0(undefined4 *param_1,undefined4 *param_2)

{
  *param_1 = *param_2;
  FUN_1401a7bc0(param_1 + 2,param_2 + 2);
  param_1[0xc] = param_2[0xc];
  param_1[0x10] = param_2[0x10];
  *(undefined2 *)(param_1 + 0x11) = *(undefined2 *)(param_2 + 0x11);
  *(undefined1 *)(param_1 + 0x12) = *(undefined1 *)(param_2 + 0x12);
  FUN_1401ab270(param_1 + 0x14,param_2 + 0x14);
  return param_1;
}



undefined8 FUN_1401c4740(longlong param_1,uint *param_2,undefined8 param_3)

{
  uint *puVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  
  uVar2 = (ulonglong)*param_2 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (puVar1 = *(uint **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (puVar1 != (uint *)0x0 && ((uint)uVar2 == puVar1[8] % *(uint *)(param_1 + 0x28)));
        puVar1 = *(uint **)(puVar1 + 4)) {
      if (*puVar1 == *param_2) {
        return 0;
      }
    }
  }
  uVar3 = FUN_1401c4660(param_1,param_2);
  FUN_1401c1960(uVar3,param_3);
  return 1;
}



void FUN_1401c47d0(longlong *param_1,longlong param_2)

{
  longlong *plVar1;
  
  FUN_140174b20(param_2 + 0x60);
  FUN_1401560e0(param_2 + 0x20);
  if (*(longlong *)(param_2 + 0x28) != 0) {
    if (*(int *)(param_2 + 0x34) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_2 + 0x30) = 0;
  }
  plVar1 = (longlong *)*param_1;
  if (plVar1 == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(*plVar1 + 0x10))(plVar1,param_2);
  }
  param_1[3] = param_1[3] + -1;
  return;
}



longlong * FUN_1401c4840(longlong *param_1,longlong *param_2,uint param_3)

{
  uint uVar1;
  ulonglong uVar2;
  char cVar3;
  undefined8 uVar4;
  uint *puVar5;
  longlong lVar6;
  uint *puVar7;
  ulonglong uVar8;
  longlong *plVar9;
  uint local_res18 [2];
  void *local_res20;
  undefined8 uVar10;
  undefined8 uVar11;
  undefined1 uVar12;
  
  uVar10 = 0xfffffffffffffffe;
  puVar7 = (uint *)0x0;
  local_res18[0] = param_3;
  uVar4 = (**(code **)(*param_1 + 0x58))();
  uVar11 = uVar4;
  FUN_140156b50(uVar4);
  uVar12 = 1;
  local_res20 = operator_new(0x60);
  puVar5 = puVar7;
  if (local_res20 != (void *)0x0) {
    puVar5 = (uint *)FUN_1401b26d0(local_res20);
  }
  if (puVar5 == (uint *)0x0) {
    *param_2 = 0;
  }
  else {
    lVar6 = FUN_140156940(0x10);
    *param_2 = lVar6;
    *(undefined8 *)(lVar6 + 8) = 1;
    *(uint **)*param_2 = puVar5;
  }
  if ((longlong *)*param_2 != (longlong *)0x0) {
    puVar7 = *(uint **)*param_2;
  }
  *puVar7 = param_3;
  plVar9 = param_1 + 0xbc;
  uVar1 = *(uint *)(param_1 + 0xc1);
  uVar8 = (ulonglong)uVar1;
  uVar2 = (ulonglong)param_3 % uVar8;
  lVar6 = param_1[0xbd];
  if (lVar6 != 0) {
    for (puVar7 = *(uint **)(lVar6 + uVar2 * 8);
        (puVar7 != (uint *)0x0 && ((uint)uVar2 == puVar7[8] % uVar1));
        puVar7 = *(uint **)(puVar7 + 4)) {
      if (*puVar7 == param_3) goto LAB_1401c49c1;
    }
    if (lVar6 != 0) {
      for (puVar7 = *(uint **)(lVar6 + uVar2 * 8);
          (puVar7 != (uint *)0x0 && ((uint)uVar2 == puVar7[8] % uVar1));
          puVar7 = *(uint **)(puVar7 + 4)) {
        if (*puVar7 == param_3) goto LAB_1401c49b4;
      }
      if (lVar6 != 0) goto LAB_1401c498b;
    }
  }
  cVar3 = FUN_1401a8bb0(plVar9,uVar8,CONCAT71((int7)((ulonglong)lVar6 >> 8),1),uVar8,uVar10,uVar11,
                        uVar12);
  if (cVar3 == '\0') {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x8007000e);
  }
LAB_1401c498b:
  FUN_14015b3b0(plVar9);
  puVar7 = (uint *)FUN_1401c2e90(plVar9,local_res18,uVar2,param_3);
  FUN_14015b3b0(plVar9);
LAB_1401c49b4:
  FUN_1401c1960(puVar7 + 2,param_2);
LAB_1401c49c1:
  FUN_140156be0(uVar4);
  return param_2;
}



undefined8 FUN_1401c49e0(longlong param_1,undefined8 param_2)

{
  longlong *plVar1;
  longlong lVar2;
  
  plVar1 = *(longlong **)(param_1 + 8);
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  FUN_1401c45d0(param_2,plVar1 + 2);
  lVar2 = *plVar1;
  *(longlong *)(param_1 + 8) = lVar2;
  if (lVar2 == 0) {
    *(undefined8 *)(param_1 + 0x10) = 0;
  }
  else {
    *(undefined8 *)(lVar2 + 8) = 0;
  }
  FUN_1401c47d0(param_1,plVar1);
  return param_2;
}



void FUN_1401c4a60(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  
  lVar1 = param_1[3];
  while( true ) {
    if (lVar1 == 0) {
      param_1[1] = 0;
      param_1[2] = 0;
      return;
    }
    plVar2 = (longlong *)param_1[1];
    if (plVar2 == (longlong *)0x0) break;
    param_1[1] = *plVar2;
    FUN_140174b20(plVar2 + 0xc);
    FUN_1401560e0(plVar2 + 4);
    if (plVar2[5] != 0) {
      if (*(int *)((longlong)plVar2 + 0x34) < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      *(undefined4 *)(plVar2 + 6) = 0;
    }
    plVar3 = (longlong *)*param_1;
    if (plVar3 == (longlong *)0x0) {
      FUN_140156970(plVar2);
    }
    else {
      (**(code **)(*plVar3 + 0x10))(plVar3,plVar2);
    }
    param_1[3] = param_1[3] + -1;
    lVar1 = param_1[3];
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



undefined8 *
FUN_1401c4b10(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  
  plVar1 = (longlong *)*param_1;
  if (plVar1 == (longlong *)0x0) {
    puVar2 = (undefined8 *)FUN_140156940(0x148);
  }
  else {
    puVar2 = (undefined8 *)
             (**(code **)(*plVar1 + 8))(plVar1,0x148,param_3,param_4,0xfffffffffffffffe);
  }
  if (puVar2 != (undefined8 *)0x0) {
    FUN_1401c45d0(puVar2 + 2,param_2);
  }
  puVar2[1] = param_3;
  *puVar2 = param_4;
  param_1[3] = param_1[3] + 1;
  return puVar2;
}



undefined8 FUN_1401c4ba0(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined1 local_140 [16];
  undefined1 local_130 [8];
  longlong local_128;
  int local_11c;
  undefined1 local_f0 [232];
  
  uVar3 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(*param_1 + 0x58))();
  uVar2 = uVar1;
  FUN_140156b50(uVar1);
  if (param_1[0x2bf] == 0) {
    FUN_140156be0(uVar1);
    uVar2 = 0;
  }
  else {
    uVar2 = FUN_1401c49e0(param_1 + 700,local_140,param_3,param_4,uVar2,1,uVar3);
    FUN_1401c46d0(param_2,uVar2);
    FUN_140174b20(local_f0);
    FUN_1401560e0(local_130);
    if ((local_128 != 0) && (local_11c < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_140156be0(uVar1);
    uVar2 = 1;
  }
  return uVar2;
}



void FUN_1401c4c70(longlong *param_1)

{
  undefined8 *puVar1;
  
  FUN_1401c4a60();
  puVar1 = (undefined8 *)*param_1;
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  return;
}



undefined8 FUN_1401c4ca0(longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  int *piVar2;
  undefined8 *puVar3;
  void *pvVar4;
  undefined8 *puVar5;
  char cVar6;
  int iVar7;
  undefined8 uVar8;
  longlong *plVar9;
  longlong *plVar10;
  longlong *plVar11;
  undefined *puVar12;
  double dVar13;
  longlong lVar14;
  undefined1 local_res8 [8];
  longlong *local_res18;
  longlong *local_res20;
  undefined8 *local_1c8;
  undefined8 *local_1c0;
  longlong *local_1b8;
  longlong *local_1b0;
  longlong *local_1a8;
  undefined *local_1a0;
  undefined *local_198;
  undefined8 local_190;
  undefined1 local_188;
  undefined8 local_180;
  undefined1 local_178;
  undefined8 local_170;
  undefined1 local_168;
  undefined8 local_160;
  undefined1 local_158;
  undefined8 local_150;
  undefined1 local_148;
  longlong *local_140;
  undefined1 local_138;
  undefined8 local_130;
  undefined1 local_128;
  undefined8 local_120;
  undefined1 local_118;
  undefined8 local_110;
  undefined4 local_d8;
  uint uStack_d4;
  undefined4 local_d0;
  uint uStack_cc;
  undefined1 local_c8 [72];
  undefined1 local_80 [72];
  
  local_110 = 0xfffffffffffffffe;
  local_140 = param_1 + 0x95;
  FUN_140156b50();
  local_138 = 1;
  plVar10 = param_1 + 1;
  (**(code **)(*plVar10 + 0x18))(plVar10);
  LOCK();
  *(int *)(param_1 + 0xaa) = (int)param_1[0xaa] + 1;
  UNLOCK();
  plVar1 = param_1 + -0xe;
  local_160 = (**(code **)(*plVar1 + 0x58))(plVar1);
  FUN_140156b50(local_160);
  local_158 = 1;
  local_res8[0] = 0;
  iVar7 = (**(code **)(*param_1 + 0x108))(param_1,local_res8);
  if (iVar7 != 0) {
    uVar8 = FUN_1401a4a80(iVar7);
    FUN_140156300(local_c8,
                  L"Wrong state(%s)! Disconnect() or GetServerConnectionState() may be required.",
                  uVar8);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_c8,(ThrowInfo *)&DAT_14031d928);
  }
  plVar11 = (longlong *)0x0;
  if (((longlong *)param_1[0xac] != (longlong *)0x0) && (*(longlong *)param_1[0xac] != 0)) {
    FUN_1401568c0();
    local_res20 = (longlong *)PTR_DAT_1403200a0;
    plVar9 = (longlong *)FUN_140158700(&local_1a0);
    puVar12 = (undefined *)*plVar9;
    if ((undefined *)*plVar9 == (undefined *)0x0) {
      puVar12 = PTR_DAT_1403200a0;
    }
    FUN_14004ce50(&local_res20,L"Unstability in Connect #3! Process=%s",puVar12);
    if (((local_1a0 != (undefined *)0x0) && (local_1a0 != PTR_DAT_1403200a0)) &&
       (local_1a0 + -8 != (undefined *)0x0)) {
      uVar8 = FUN_1401568c0();
      local_170 = uVar8;
      FUN_140156b50(uVar8);
      local_168 = 1;
      piVar2 = (int *)(local_1a0 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(local_1a0 + -8);
      }
      FUN_140156be0(uVar8);
      local_168 = 0;
    }
    local_1a0 = PTR_DAT_1403200a0;
    FUN_1401568c0();
    plVar9 = local_res20;
    local_res18 = (longlong *)PTR_DAT_1403200a0;
    if (PTR_DAT_1403200a0 == (undefined *)0x0) {
      local_res18 = plVar11;
    }
    if (local_res20 != (longlong *)PTR_DAT_1403200a0) {
      uVar8 = FUN_1401568c0();
      local_190 = uVar8;
      FUN_140156b50(uVar8);
      local_188 = 1;
      FUN_14004f990(&local_res18);
      local_res18 = plVar9;
      if (((plVar9 != (longlong *)PTR_DAT_1403200a0) && (plVar9 != (longlong *)0x0)) &&
         (plVar9 != (longlong *)0x8)) {
        *(int *)((longlong)plVar9 + -4) = *(int *)((longlong)plVar9 + -4) + 1;
      }
      FUN_140156be0(uVar8);
      local_188 = 0;
    }
    FUN_1401a7000(&local_res18);
    if (((plVar9 != (longlong *)0x0) && (plVar9 != (longlong *)PTR_DAT_1403200a0)) &&
       (plVar9 + -1 != (longlong *)0x0)) {
      uVar8 = FUN_1401568c0();
      local_150 = uVar8;
      FUN_140156b50(uVar8);
      local_148 = 1;
      piVar2 = (int *)((longlong)plVar9 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(plVar9 + -1);
      }
      FUN_140156be0(uVar8);
      local_148 = 0;
    }
    local_res20 = (longlong *)PTR_DAT_1403200a0;
  }
  if ((((longlong *)param_1[0x296] != (longlong *)0x0) && (*(longlong *)param_1[0x296] != 0)) ||
     (((longlong *)param_1[0x2a0] != (longlong *)0x0 && (*(longlong *)param_1[0x2a0] != 0)))) {
    FUN_1401568c0();
    local_1a8 = (longlong *)PTR_DAT_1403200a0;
    plVar9 = (longlong *)FUN_140158700(&local_198);
    puVar12 = (undefined *)*plVar9;
    if ((undefined *)*plVar9 == (undefined *)0x0) {
      puVar12 = PTR_DAT_1403200a0;
    }
    FUN_14004ce50(&local_1a8,L"Unstability in Connect #1! Process=%s",puVar12);
    if (((local_198 != (undefined *)0x0) && (local_198 != PTR_DAT_1403200a0)) &&
       (local_198 + -8 != (undefined *)0x0)) {
      uVar8 = FUN_1401568c0();
      local_120 = uVar8;
      FUN_140156b50(uVar8);
      local_118 = 1;
      piVar2 = (int *)(local_198 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(local_198 + -8);
      }
      FUN_140156be0(uVar8);
      local_118 = 0;
    }
    local_198 = PTR_DAT_1403200a0;
    FUN_1401568c0();
    plVar9 = local_1a8;
    local_1b0 = (longlong *)PTR_DAT_1403200a0;
    if (PTR_DAT_1403200a0 == (undefined *)0x0) {
      local_1b0 = plVar11;
    }
    if (local_1a8 != (longlong *)PTR_DAT_1403200a0) {
      uVar8 = FUN_1401568c0();
      local_130 = uVar8;
      FUN_140156b50(uVar8);
      local_128 = 1;
      FUN_14004f990(&local_1b0);
      local_1b0 = plVar9;
      if (((plVar9 != (longlong *)PTR_DAT_1403200a0) && (plVar9 != (longlong *)0x0)) &&
         (plVar9 != (longlong *)0x8)) {
        *(int *)((longlong)plVar9 + -4) = *(int *)((longlong)plVar9 + -4) + 1;
      }
      FUN_140156be0(uVar8);
      local_128 = 0;
    }
    FUN_1401a7000(&local_1b0);
    if (((plVar9 != (longlong *)0x0) && (plVar9 != (longlong *)PTR_DAT_1403200a0)) &&
       (plVar9 + -1 != (longlong *)0x0)) {
      uVar8 = FUN_1401568c0();
      local_180 = uVar8;
      FUN_140156b50(uVar8);
      local_178 = 1;
      piVar2 = (int *)((longlong)plVar9 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(plVar9 + -1);
      }
      FUN_140156be0(uVar8);
      local_178 = 0;
    }
    local_1a8 = (longlong *)PTR_DAT_1403200a0;
  }
  puVar12 = (undefined *)*param_2;
  if ((undefined *)*param_2 == (undefined *)0x0) {
    puVar12 = PTR_DAT_1403200a0;
  }
  iVar7 = FUN_140156780(puVar12,L"0.0.0.0");
  if (((iVar7 != 0) && ((short)param_2[1] != 0)) && ((short)param_2[1] != -1)) {
    puVar12 = (undefined *)*param_2;
    if ((undefined *)*param_2 == (undefined *)0x0) {
      puVar12 = PTR_DAT_1403200a0;
    }
    iVar7 = FUN_140156780(puVar12,L"255.255.255.255");
    if (iVar7 != 0) {
      dVar13 = (double)param_2[9];
      if ((double)param_2[9] <= 0.0) {
        dVar13 = DAT_140320dd0;
      }
      param_1[0x2fe] = (longlong)dVar13;
      FUN_1401ae870(param_1 + 0x2e1);
      FUN_1401ae840(param_1 + 0x301,param_1[0x2fe]);
      FUN_1401ae870(param_1 + 0x301);
      FUN_1401ae870(param_1 + 9);
      FUN_1401c4a60(param_1 + 0x2ae);
      FUN_1401c4a60(param_1 + 0x2b2);
      lVar14 = (**(code **)(*param_1 + 0x1c0))(param_1);
      param_1[0x30a] = lVar14;
      *(undefined1 *)(param_1 + 0xbc) = 0;
      lVar14 = FUN_140181840();
      param_1[0xba] = lVar14;
      param_1[0xbb] = DAT_140320cc0;
      cVar6 = FUN_14018afa0(param_1 + 0x2b6);
      if (cVar6 == '\0') {
        FUN_14018aea0(param_1 + 0x2b6);
      }
      FUN_14018ae50(param_1 + 0x2b6);
      uStack_d4 = uStack_d4 & 0xffffff00;
      local_d8 = 0;
      local_d0 = 0;
      param_1[0xbd] = 0;
      param_1[0xbe] = 0;
      param_1[0xbf] = 0;
      param_1[0xc0] = 0;
      param_1[0xc1] = 0;
      param_1[0xc2] = 0;
      param_1[0xc3] = (ulonglong)uStack_d4 << 0x20;
      param_1[0xc4] = (ulonglong)uStack_cc << 0x20;
      lVar14 = (**(code **)(*param_1 + 0x1c0))(param_1);
      param_1[699] = lVar14;
      *(undefined4 *)(param_1 + 0xd2) = 0;
      param_1[0xab] = 0;
      *(undefined4 *)((longlong)param_1 + 0x47c) = 0;
      param_1[0x90] = 0;
      param_1[0x91] = 0;
      param_1[0x92] = 0;
      *(undefined4 *)(param_1 + 0x2a1) = 0;
      param_1[0x304] = 0;
      *(undefined4 *)(param_1 + 0x8d) = 0;
      local_1b8 = operator_new(0x200);
      plVar9 = plVar11;
      if (local_1b8 != (longlong *)0x0) {
        if (plVar1 != (longlong *)0x0) {
          plVar9 = plVar10;
        }
        plVar9 = (longlong *)FUN_1401e3190(local_1b8,plVar9);
      }
      if ((plVar9 == (longlong *)0x0) || (plVar9 + 8 == (longlong *)0x0)) {
        local_1b8 = (longlong *)0x0;
      }
      else {
        local_1b8 = (longlong *)FUN_140156940(0x10);
        local_1b8[1] = 1;
        *local_1b8 = (longlong)(plVar9 + 8);
      }
      plVar10 = local_1b8;
      FUN_1401d43e0(param_1 + 0x2ad,&local_1b8);
      plVar9 = local_1b8;
      if (plVar10 != (longlong *)0x0) {
        plVar10 = plVar10 + 1;
        *plVar10 = *plVar10 + -1;
        if (*plVar10 == 0) {
          puVar3 = (undefined8 *)*local_1b8;
          if (puVar3 != (undefined8 *)0x0) {
            (**(code **)*puVar3)(puVar3,1);
          }
          FUN_140156970(plVar9);
        }
      }
      *(undefined1 *)(param_1 + 0x8f) = 0;
      FUN_1401b1820(param_1 + 0x2a3,param_2);
      uVar8 = FUN_1401b2490(param_1 + 0x2a3);
      uVar8 = FUN_1401b1240(uVar8);
      FUN_14004f4f0(param_1 + 0x2a3,uVar8);
      puVar12 = (undefined *)param_1[0x2a3];
      if (((puVar12 == (undefined *)0x0) || (puVar12 == PTR_DAT_1403200a0)) ||
         (*(int *)(puVar12 + -8) == 0)) {
        FUN_14004ce80(param_1 + 0x2a3,L"localhost");
      }
      local_1c8 = operator_new(0x240);
      plVar10 = plVar11;
      if (local_1c8 != (undefined8 *)0x0) {
        plVar10 = (longlong *)FUN_1401dc8b0(local_1c8,plVar1);
      }
      if (plVar10 == (longlong *)0x0) {
        local_1c8 = (undefined8 *)0x0;
      }
      else {
        local_1c8 = (undefined8 *)FUN_140156940(0x10);
        local_1c8[1] = 1;
        *local_1c8 = plVar10;
      }
      puVar3 = local_1c8;
      FUN_1401b1550(param_1 + 0x2a0,&local_1c8);
      puVar5 = local_1c8;
      if (puVar3 != (undefined8 *)0x0) {
        plVar10 = puVar3 + 1;
        *plVar10 = *plVar10 + -1;
        if (*plVar10 == 0) {
          operator_delete((void *)*local_1c8);
          FUN_140156970(puVar5);
        }
      }
      local_1c0 = operator_new(0x140);
      if (local_1c0 != (undefined8 *)0x0) {
        plVar11 = (longlong *)FUN_1401d4250(local_1c0,plVar1);
      }
      if (plVar11 == (longlong *)0x0) {
        local_1c0 = (undefined8 *)0x0;
      }
      else {
        local_1c0 = (undefined8 *)FUN_140156940(0x10);
        local_1c0[1] = 1;
        *local_1c0 = plVar11;
      }
      puVar3 = local_1c0;
      FUN_1401b2530(param_1 + 0xac,&local_1c0);
      puVar5 = local_1c0;
      if (puVar3 != (undefined8 *)0x0) {
        plVar10 = puVar3 + 1;
        *plVar10 = *plVar10 + -1;
        if (*plVar10 == 0) {
          pvVar4 = (void *)*local_1c0;
          if (pvVar4 != (void *)0x0) {
            FUN_1401d5010(pvVar4);
            operator_delete(pvVar4);
          }
          FUN_140156970(puVar5);
        }
      }
      FUN_140156be0(local_160);
      FUN_140156be0(local_140);
      return 1;
    }
  }
  uVar8 = FUN_140181e70(0xe);
  FUN_140156300(local_80,uVar8);
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_80,(ThrowInfo *)&DAT_14031d928);
}



void FUN_1401c54e0(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  void *pvVar2;
  longlong lVar3;
  longlong *plVar4;
  undefined8 local_res10;
  undefined8 local_res18;
  undefined8 *local_res20;
  undefined **local_70;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  
  *param_1 = Proud::CNetClientImpl::vftable;
  param_1[0xc] = Proud::CNetClientImpl::vftable;
  param_1[0xd] = Proud::CNetClientImpl::vftable;
  plVar4 = param_1 + 0xe;
  *plVar4 = (longlong)Proud::CNetClientImpl::vftable;
  param_1[0xf] = Proud::CNetClientImpl::vftable;
  param_1[0x11] = Proud::CNetClientImpl::vftable;
  param_1[0x12] = Proud::CNetClientImpl::vftable;
  param_1[0x13] = Proud::CNetClientImpl::vftable;
  lVar3 = 0;
  local_68 = 0;
  local_60 = 0;
  local_58 = 0;
  local_50 = 0;
  local_70 = Proud::ByteArray::vftable;
  (**(code **)(*plVar4 + 0x80))(plVar4,DAT_140320d60,&local_70,param_4,0xfffffffffffffffe);
  FUN_1401858d0(&local_70);
  FUN_140188740(param_1);
  if (param_1[0xbb] != 0) {
    lVar3 = *(longlong *)(param_1[0xbb] + 0x38);
  }
  FUN_140156b50(lVar3 + 0x10);
  FUN_1401c43a0(param_1 + 0xbc);
  local_res10 = 0;
  FUN_1401b1550(param_1 + 0x2ae,&local_res10);
  FUN_1401c4a60(param_1 + 700);
  FUN_1401c4a60(param_1 + 0x2c0);
  FUN_1401bcf60(param_1 + 0x2e0);
  FUN_1401bd130(param_1 + 0x2a6);
  FUN_1401bd130(param_1 + 0xdc);
  FUN_1401beb00(param_1 + 0x2ca);
  local_res18 = 0;
  FUN_1401d43e0(param_1 + 0x2a4,&local_res18);
  if (param_1[0x16] != 0) {
    FUN_1401af7b0(param_1[0x16],param_1);
  }
  FUN_140156be0(lVar3 + 0x10);
  puVar1 = (undefined8 *)param_1[0xb];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  param_1[0xb] = 0;
  FUN_140157bd0(param_1 + 0x307);
  FUN_140156cd0(param_1 + 0x303);
  FUN_140157bd0(param_1 + 0x2fe);
  FUN_140156cd0(param_1 + 0x2fa);
  FUN_1401bd1d0(param_1 + 0x2f6);
  puVar1 = (undefined8 *)param_1[0x2f6];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  FUN_1401c05a0(param_1 + 0x2e4);
  FUN_1401bcf60(param_1 + 0x2e0);
  puVar1 = (undefined8 *)param_1[0x2e0];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  FUN_1401c05a0(param_1 + 0x2d5);
  FUN_1401c05a0(param_1 + 0x2ca);
  FUN_1401c4a60(param_1 + 0x2c0);
  puVar1 = (undefined8 *)param_1[0x2c0];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  FUN_1401c4a60(param_1 + 700);
  puVar1 = (undefined8 *)param_1[700];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  if ((param_1[699] != 0) &&
     (*(longlong *)(param_1[699] + 8) = *(longlong *)(param_1[699] + 8) + -1,
     *(longlong *)(param_1[699] + 8) == 0)) {
    plVar4 = (longlong *)param_1[699];
    puVar1 = (undefined8 *)*plVar4;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(plVar4);
  }
  local_res20 = param_1 + 0x2b1;
  FUN_1401858d0(param_1 + 0x2b5);
  FUN_14004f990(param_1 + 0x2b1);
  if ((param_1[0x2ae] != 0) &&
     (*(longlong *)(param_1[0x2ae] + 8) = *(longlong *)(param_1[0x2ae] + 8) + -1,
     *(longlong *)(param_1[0x2ae] + 8) == 0)) {
    puVar1 = (undefined8 *)param_1[0x2ae];
    operator_delete((void *)*puVar1);
    FUN_140156970(puVar1);
  }
  param_1[0x2ac] = 0;
  param_1[0x2ab] = Proud::IP2PGroupMember::vftable;
  param_1[0x2aa] = Proud::ISendDest_C::vftable;
  FUN_1401bd130(param_1 + 0x2a6);
  puVar1 = (undefined8 *)param_1[0x2a6];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  if ((param_1[0x2a4] != 0) &&
     (*(longlong *)(param_1[0x2a4] + 8) = *(longlong *)(param_1[0x2a4] + 8) + -1,
     *(longlong *)(param_1[0x2a4] + 8) == 0)) {
    plVar4 = (longlong *)param_1[0x2a4];
    puVar1 = (undefined8 *)*plVar4;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(plVar4);
  }
  FUN_140187ae0(param_1 + 0x161);
  FUN_1401858d0(param_1 + 0x15b);
  FUN_1401bd130(param_1 + 0xdc);
  puVar1 = (undefined8 *)param_1[0xdc];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  FUN_1401c45b0(param_1 + 0xbc);
  FUN_1401b10e0(param_1 + 0xbb);
  if ((param_1[0xba] != 0) &&
     (*(longlong *)(param_1[0xba] + 8) = *(longlong *)(param_1[0xba] + 8) + -1,
     *(longlong *)(param_1[0xba] + 8) == 0)) {
    puVar1 = (undefined8 *)param_1[0xba];
    pvVar2 = (void *)*puVar1;
    if (pvVar2 != (void *)0x0) {
      FUN_1401d5010(pvVar2);
      operator_delete(pvVar2);
    }
    FUN_140156970(puVar1);
  }
  FUN_140156c00(param_1 + 0xa3);
  puVar1 = (undefined8 *)param_1[0x9c];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  FUN_1401858d0(param_1 + 0x95);
  param_1[0x13] = Proud::IVizAgentDg::vftable;
  if (param_1[0x16] != 0) {
    FUN_1401af7b0(param_1[0x16],param_1);
  }
  param_1[0x12] = Proud::IUdpPacketFragBoardDg::vftable;
  param_1[0x11] = Proud::IUdpPacketDefragBoardDg::vftable;
  param_1[0xf] = Proud::IFastSocketDelegate::vftable;
  param_1[0xe] = Proud::IRmiHost::vftable;
  param_1[0xd] = Proud::IP2PGroupMember::vftable;
  param_1[0xc] = Proud::ISendDest_C::vftable;
  FUN_1401883e0(param_1);
  return;
}



void FUN_1401c5a30(void)

{
  return;
}



undefined8 FUN_1401c5a40(longlong param_1)

{
  return *(undefined8 *)(param_1 + 0x480);
}



undefined4 FUN_1401c5a50(longlong param_1)

{
  return *(undefined4 *)(param_1 + 0x1518);
}



undefined8 FUN_1401c5a60(longlong param_1)

{
  return *(undefined8 *)(param_1 + 0x488);
}



void thunk_FUN_1401885f0(longlong param_1,longlong param_2)

{
  longlong lVar1;
  int iVar2;
  longlong lVar3;
  longlong lVar4;
  int iVar5;
  longlong lVar6;
  longlong lVar7;
  int iVar8;
  
  iVar5 = 0;
  lVar6 = 0;
  if (0 < *(int *)(param_1 + 0x48)) {
    lVar1 = param_1 + 0x30;
    while( true ) {
      if ((lVar6 < 0) || (*(int *)(param_1 + 0x48) <= iVar5)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      if (*(longlong *)(*(longlong *)(param_1 + 0x40) + lVar6 * 8) == param_2) break;
      iVar5 = iVar5 + 1;
      lVar6 = lVar6 + 1;
      if (*(int *)(param_1 + 0x48) <= iVar5) {
        return;
      }
    }
    if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    iVar2 = *(int *)(param_1 + 0x48) - iVar5;
    iVar8 = 1;
    if (iVar2 < 2) {
      iVar8 = iVar2;
    }
    iVar5 = (*(int *)(param_1 + 0x48) - iVar8) - iVar5;
    if (0 < iVar5) {
      lVar7 = (longlong)iVar5;
      lVar6 = lVar6 * 8;
      do {
        lVar3 = FUN_1401a7bb0(lVar1);
        lVar4 = FUN_1401a7bb0(lVar1);
        *(undefined8 *)(lVar4 + lVar6) = *(undefined8 *)((longlong)iVar8 * 8 + lVar3 + lVar6);
        lVar6 = lVar6 + 8;
        lVar7 = lVar7 + -1;
      } while (lVar7 != 0);
    }
    FUN_14015d550(lVar1,*(int *)(param_1 + 0x48) - iVar8);
    *(undefined8 *)(param_2 + 0x10) = 0;
  }
  return;
}



void thunk_FUN_140188250(undefined8 param_1,longlong param_2)

{
  if ((*(longlong *)(param_2 + 8) == 0) && (*(longlong *)(param_2 + 0x10) == 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401561e0(param_1,param_2,param_2);
  }
  return;
}



void FUN_1401c5a90(longlong param_1)

{
  FUN_140188ba0(param_1 + -0x70);
  return;
}



longlong FUN_1401c5ac0(longlong param_1)

{
  return param_1 + -0x98;
}



void FUN_1401c5ad0(longlong param_1)

{
  FUN_1401c8a40(param_1 + -0x90);
  return;
}



void FUN_1401c5ae0(longlong param_1)

{
  thunk_FUN_1401889e0(param_1 + -0x70);
  return;
}



void FUN_1401c5af0(longlong param_1)

{
  FUN_1401af750(param_1 + -0x88);
  return;
}



void FUN_1401c5b00(longlong param_1)

{
  FUN_1401c8a40(param_1 + -0x78);
  return;
}



void FUN_1401c5b10(longlong param_1)

{
  FUN_1401c8a40(param_1 + -0x98);
  return;
}



void FUN_1401c5b20(longlong param_1)

{
  thunk_FUN_140188490(param_1 + -0x70);
  return;
}



void FUN_1401c5b30(longlong param_1)

{
  FUN_1401af750(param_1 + -0x70);
  return;
}



void FUN_1401c5b40(longlong param_1)

{
  FUN_1401c8a40(param_1 + -0x60);
  return;
}



void FUN_1401c5b50(longlong param_1)

{
  thunk_FUN_140188250(param_1 + -0x70);
  return;
}



void FUN_1401c5b60(longlong param_1)

{
  thunk_FUN_1401887e0(param_1 + -0x70);
  return;
}



void FUN_1401c5b70(longlong param_1)

{
  FUN_1401c8a40(param_1 + -0x68);
  return;
}



void FUN_1401c5b80(longlong param_1)

{
  FUN_1401c8a40(param_1 + -0x88);
  return;
}



void FUN_1401c5b90(longlong param_1)

{
  thunk_FUN_1401885f0(param_1 + -0x70);
  return;
}



void FUN_1401c5ba0(longlong param_1)

{
  thunk_FUN_1401c5a30(param_1 + -0x70);
  return;
}



void FUN_1401c5bb0(longlong param_1)

{
  FUN_1401c5a50(param_1 + -8);
  return;
}



void FUN_1401c5bc0(longlong param_1)

{
  FUN_1401c8a40(param_1 + -0x70);
  return;
}



undefined8 FUN_1401c5bd0(longlong param_1)

{
  return *(undefined8 *)(param_1 + 0x458);
}



undefined8 FUN_1401c5be0(longlong param_1)

{
  if (*(undefined8 **)(param_1 + 0x558) != (undefined8 *)0x0) {
    return **(undefined8 **)(param_1 + 0x558);
  }
  return 0;
}



void FUN_1401c5c00(longlong param_1)

{
  FUN_1401afd80(param_1 + -0x18);
  return;
}



void FUN_1401c5c10(longlong param_1)

{
  FUN_1401b00f0(param_1 + -0x70);
  return;
}



void FUN_1401c5c20(longlong param_1)

{
  FUN_1401afd80(param_1 + -0x20);
  return;
}



void FUN_1401c5c30(longlong param_1)

{
  FUN_1401afe00(param_1 + -0x88);
  return;
}



void FUN_1401c5c40(longlong param_1)

{
  FUN_1401afd80(param_1 + -8);
  return;
}



void FUN_1401c5c50(longlong param_1)

{
  FUN_1401afd80(param_1 + -0x28);
  return;
}



void FUN_1401c5c60(longlong param_1)

{
  FUN_1401afdd0(param_1 + -0x70);
  return;
}



void FUN_1401c5c70(longlong param_1)

{
  FUN_1401b03a0(param_1 + -0x70);
  return;
}



void FUN_1401c5c80(longlong param_1)

{
  FUN_1401afe00(param_1 + -0x70);
  return;
}



void FUN_1401c5c90(longlong param_1)

{
  FUN_1401bab10(param_1 + -0x70);
  return;
}



void FUN_1401c5ca0(longlong param_1)

{
  FUN_1401ba990(param_1 + -0x70);
  return;
}



void FUN_1401c5cb0(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 local_res18 [2];
  undefined8 uVar1;
  
  uVar1 = 0xfffffffffffffffe;
  local_res18[0] = 0;
  FUN_14016dca0(local_res18);
  FUN_140188f10(param_1,local_res18,param_3,param_4,uVar1);
  FUN_14013c530(param_2);
  return;
}



void FUN_1401c5d10(longlong param_1)

{
  FUN_1401c5cb0(param_1 + -0x70);
  return;
}



void FUN_1401c5d20(longlong param_1)

{
  FUN_1401c41f0(param_1 + -0x70);
  return;
}



void FUN_1401c5d30(longlong *param_1,undefined8 param_2)

{
  undefined8 uVar1;
  longlong lVar2;
  undefined8 uVar3;
  undefined1 uVar4;
  undefined8 uVar5;
  undefined4 local_140 [2];
  undefined1 local_138 [8];
  undefined1 local_130 [8];
  longlong local_128;
  int local_11c;
  undefined4 local_110;
  undefined **local_108;
  undefined4 local_100;
  undefined2 local_fc;
  undefined1 local_f8;
  undefined1 local_f0 [232];
  
  uVar5 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(*param_1 + 0x58))();
  uVar3 = uVar1;
  FUN_140156b50(uVar1);
  uVar4 = 1;
  local_140[0] = 0;
  FUN_1401544a0(local_138);
  local_108 = Proud::AddrPort::vftable;
  local_f8 = 0;
  local_110 = 0;
  local_100 = DAT_140320450;
  local_fc = DAT_140320454;
  FUN_140176480(local_f0,param_2);
  lVar2 = FUN_1401c4b10(param_1 + 700,local_140,param_1[0x2be],0,uVar3,uVar4,uVar5);
  if ((longlong *)param_1[0x2be] == (longlong *)0x0) {
    param_1[0x2bd] = lVar2;
  }
  else {
    *(longlong *)param_1[0x2be] = lVar2;
  }
  param_1[0x2be] = lVar2;
  FUN_140174b20(local_f0);
  FUN_1401560e0(local_130);
  if ((local_128 != 0) && (local_11c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_140156be0(uVar1);
  return;
}



void FUN_1401c5e60(undefined8 param_1,longlong *param_2)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  undefined4 local_118 [2];
  undefined8 local_110 [2];
  undefined8 local_100;
  undefined8 local_f8;
  undefined **local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  longlong local_c0;
  ulonglong local_b8;
  undefined4 local_a8;
  undefined **local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined **local_70;
  undefined4 local_68;
  undefined2 local_64;
  undefined **local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_28;
  
  local_28 = 0xfffffffffffffffe;
  lVar3 = 0;
  local_110[0] = 0;
  local_100 = 0;
  local_f8 = 0;
  local_e8 = 0;
  local_e0 = 0;
  local_d8 = 0;
  local_d0 = 0;
  local_f0 = Proud::ByteArray::vftable;
  local_b8 = 0;
  local_c0 = 0;
  local_c8 = 0;
  local_98 = 0;
  local_90 = 0;
  local_88 = 0;
  local_80 = 0;
  local_a0 = Proud::ByteArray::vftable;
  local_70 = Proud::AddrPort::vftable;
  local_68 = 0;
  local_64 = 0;
  local_50 = 0;
  local_48 = 0;
  local_40 = 0;
  local_38 = 0;
  local_58 = Proud::ByteArray::vftable;
  local_118[0] = 0x14;
  FUN_14016dca0(local_110);
  lVar1 = *param_2;
  lVar2 = lVar3;
  if (lVar1 != 0) {
    lVar2 = *(longlong *)(lVar1 + 0x38);
  }
  local_a8 = *(undefined4 *)(lVar2 + 0xc);
  if (lVar1 != 0) {
    lVar3 = *(longlong *)(lVar1 + 0x38);
  }
  local_68 = *(undefined4 *)(lVar3 + 0x20);
  local_64 = *(undefined2 *)(lVar3 + 0x24);
  FUN_1401c5d30(param_1,local_118);
  FUN_1401858d0(&local_58);
  FUN_1401858d0(&local_a0);
  FUN_1401560e0(&local_c8);
  if (local_c0 != 0) {
    if ((longlong)local_b8 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_b8 = local_b8 & 0xffffffff00000000;
  }
  FUN_1401858d0(&local_f0);
  FUN_140174710(&local_f8);
  FUN_140174690(&local_100);
  FUN_14013c530(local_110);
  FUN_14013c530(param_2);
  return;
}



void FUN_1401c5fe0(undefined8 param_1,longlong *param_2)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  undefined4 local_118 [2];
  undefined8 local_110 [2];
  undefined8 local_100;
  undefined8 local_f8;
  undefined **local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  longlong local_c0;
  ulonglong local_b8;
  undefined4 local_a8;
  undefined **local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined **local_70;
  undefined4 local_68;
  undefined2 local_64;
  undefined **local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_28;
  
  local_28 = 0xfffffffffffffffe;
  lVar3 = 0;
  local_110[0] = 0;
  local_100 = 0;
  local_f8 = 0;
  local_e8 = 0;
  local_e0 = 0;
  local_d8 = 0;
  local_d0 = 0;
  local_f0 = Proud::ByteArray::vftable;
  local_b8 = 0;
  local_c0 = 0;
  local_c8 = 0;
  local_98 = 0;
  local_90 = 0;
  local_88 = 0;
  local_80 = 0;
  local_a0 = Proud::ByteArray::vftable;
  local_70 = Proud::AddrPort::vftable;
  local_68 = 0;
  local_64 = 0;
  local_50 = 0;
  local_48 = 0;
  local_40 = 0;
  local_38 = 0;
  local_58 = Proud::ByteArray::vftable;
  local_118[0] = 0x15;
  FUN_14016dca0(local_110);
  lVar1 = *param_2;
  lVar2 = lVar3;
  if (lVar1 != 0) {
    lVar2 = *(longlong *)(lVar1 + 0x38);
  }
  local_a8 = *(undefined4 *)(lVar2 + 0xc);
  if (lVar1 != 0) {
    lVar3 = *(longlong *)(lVar1 + 0x38);
  }
  local_68 = *(undefined4 *)(lVar3 + 0x20);
  local_64 = *(undefined2 *)(lVar3 + 0x24);
  FUN_1401c5d30(param_1,local_118);
  FUN_1401858d0(&local_58);
  FUN_1401858d0(&local_a0);
  FUN_1401560e0(&local_c8);
  if (local_c0 != 0) {
    if ((longlong)local_b8 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_b8 = local_b8 & 0xffffffff00000000;
  }
  FUN_1401858d0(&local_f0);
  FUN_140174710(&local_f8);
  FUN_140174690(&local_100);
  FUN_14013c530(local_110);
  FUN_14013c530(param_2);
  return;
}



void FUN_1401c6160(longlong *param_1,longlong param_2)

{
  undefined8 uVar1;
  longlong lVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  
  uVar3 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(*param_1 + 0x58))();
  uVar4 = uVar1;
  FUN_140156b50(uVar1);
  lVar2 = FUN_1401c4b10(param_1 + 0x2c0,param_2,param_1[0x2c2],0,uVar3,uVar4,1);
  if ((longlong *)param_1[0x2c2] == (longlong *)0x0) {
    param_1[0x2c1] = lVar2;
  }
  else {
    *(longlong *)param_1[0x2c2] = lVar2;
  }
  param_1[0x2c2] = lVar2;
  FUN_1401540a0(param_2 + 8,0);
  FUN_140156be0(uVar1);
  return;
}



void FUN_1401c6200(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong lVar3;
  bool bVar4;
  longlong lVar5;
  undefined8 uVar6;
  undefined4 *puVar7;
  undefined8 *puVar8;
  undefined1 local_188 [16];
  undefined1 local_178 [8];
  longlong local_170;
  int local_164;
  longlong local_130;
  longlong local_120;
  longlong local_118;
  undefined1 local_110 [40];
  undefined1 local_e8 [8];
  longlong local_e0;
  undefined4 local_d8;
  int local_d4;
  undefined1 local_c0 [72];
  undefined1 local_78 [56];
  
  uVar6 = (**(code **)(*param_1 + 0x58))();
  FUN_140156b50(uVar6);
  lVar1 = param_1[0x2c3];
  while( true ) {
    if (lVar1 == 0) {
      FUN_140156be0(uVar6);
      return;
    }
    puVar7 = (undefined4 *)FUN_1401c49e0(param_1 + 0x2c0,local_188);
    lVar1 = param_1[0x2be];
    plVar2 = (longlong *)param_1[700];
    if (plVar2 == (longlong *)0x0) {
      puVar8 = (undefined8 *)FUN_140156940(0x148);
    }
    else {
      puVar8 = (undefined8 *)(**(code **)(*plVar2 + 8))(plVar2,0x148);
    }
    if (puVar8 != (undefined8 *)0x0) {
      *(undefined4 *)(puVar8 + 2) = *puVar7;
      FUN_1401544d0(puVar8 + 3,puVar7 + 2);
      *(undefined4 *)(puVar8 + 8) = puVar7[0xc];
      puVar8[9] = Proud::AddrPort::vftable;
      *(undefined4 *)(puVar8 + 10) = puVar7[0x10];
      *(undefined2 *)((longlong)puVar8 + 0x54) = *(undefined2 *)(puVar7 + 0x11);
      *(undefined1 *)(puVar8 + 0xb) = *(undefined1 *)(puVar7 + 0x12);
      FUN_140176480(puVar8 + 0xc,puVar7 + 0x14);
    }
    puVar8[1] = lVar1;
    *puVar8 = 0;
    param_1[0x2bf] = param_1[0x2bf] + 1;
    if ((undefined8 *)param_1[0x2be] == (undefined8 *)0x0) {
      param_1[0x2bd] = (longlong)puVar8;
    }
    else {
      *(undefined8 *)param_1[0x2be] = puVar8;
    }
    param_1[0x2be] = (longlong)puVar8;
    FUN_1401858d0(local_78);
    FUN_1401858d0(local_c0);
    FUN_1401560e0(local_e8);
    if (local_e0 != 0) {
      if (local_d4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_d8 = 0;
    }
    FUN_1401858d0(local_110);
    lVar1 = local_118;
    if (local_118 != 0) {
      FUN_140156b50(local_118);
      bVar4 = true;
      *(longlong *)(local_118 + 0x40) = *(longlong *)(local_118 + 0x40) + -1;
      if (*(longlong *)(local_118 + 0x40) == 0) {
        FUN_140156be0(lVar1);
        lVar5 = local_118;
        bVar4 = false;
        lVar3 = *(longlong *)(local_118 + 0x38);
        if (lVar3 != 0) {
          FUN_1401617d0(lVar3 + 0x28);
          FUN_140156970(lVar3);
        }
        FUN_140156c00(lVar5);
        FUN_140156970(lVar5);
      }
      if (bVar4) {
        FUN_140156be0(lVar1);
      }
    }
    lVar1 = local_120;
    if (local_120 != 0) {
      FUN_140156b50(local_120);
      bVar4 = true;
      *(longlong *)(local_120 + 0x40) = *(longlong *)(local_120 + 0x40) + -1;
      if (*(longlong *)(local_120 + 0x40) == 0) {
        FUN_140156be0(lVar1);
        lVar5 = local_120;
        bVar4 = false;
        lVar3 = *(longlong *)(local_120 + 0x38);
        if (lVar3 != 0) {
          FUN_14004f990(lVar3 + 0x98);
          FUN_1401617d0(lVar3 + 0x38);
          FUN_140156970(lVar3);
        }
        FUN_140156c00(lVar5);
        FUN_140156970(lVar5);
      }
      if (bVar4) {
        FUN_140156be0(lVar1);
      }
    }
    lVar1 = local_130;
    if (local_130 != 0) {
      FUN_140156b50(local_130);
      bVar4 = true;
      *(longlong *)(local_130 + 0x40) = *(longlong *)(local_130 + 0x40) + -1;
      if (*(longlong *)(local_130 + 0x40) == 0) {
        FUN_140156be0(lVar1);
        lVar5 = local_130;
        bVar4 = false;
        lVar3 = *(longlong *)(local_130 + 0x38);
        if (lVar3 != 0) {
          FUN_14004f990(lVar3 + 0x58);
          FUN_1401858d0(lVar3 + 0x28);
          FUN_14004f990(lVar3 + 0x10);
          FUN_140156970(lVar3);
        }
        FUN_140156c00(lVar5);
        FUN_140156970(lVar5);
      }
      if (bVar4) {
        FUN_140156be0(lVar1);
      }
    }
    FUN_1401560e0(local_178);
    if ((local_170 != 0) && (local_164 < 0)) break;
    lVar1 = param_1[0x2c3];
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Removing unreachable block (ram,0x0001401c68f8)
// WARNING: Removing unreachable block (ram,0x0001401c67f9)
// WARNING: Removing unreachable block (ram,0x0001401c6809)
// WARNING: Removing unreachable block (ram,0x0001401c6903)
// WARNING: Removing unreachable block (ram,0x0001401c681d)
// WARNING: Removing unreachable block (ram,0x0001401c6825)
// WARNING: Removing unreachable block (ram,0x0001401c682f)
// WARNING: Removing unreachable block (ram,0x0001401c68ed)

void FUN_1401c65c0(longlong param_1,char param_2)

{
  longlong *plVar1;
  int *piVar2;
  longlong *plVar3;
  longlong *plVar4;
  undefined8 *puVar5;
  longlong lVar6;
  longlong lVar7;
  undefined8 uVar8;
  undefined1 auStack_1a8 [40];
  longlong local_180;
  longlong *local_178;
  undefined8 local_170;
  undefined8 local_168;
  undefined8 local_160;
  undefined8 local_158;
  undefined8 local_150;
  undefined8 local_148;
  undefined1 local_140;
  undefined8 local_138;
  undefined4 local_100;
  uint uStack_fc;
  undefined4 local_f8;
  uint uStack_f4;
  undefined1 local_f0 [24];
  undefined1 local_d8 [24];
  undefined1 local_c0 [56];
  undefined *local_88 [4];
  undefined1 local_68 [48];
  ulonglong local_38;
  
  local_138 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_1a8;
  (**(code **)(*(longlong *)(param_1 + 0x78) + 0x10))();
  lVar7 = 0;
  local_158 = 0;
  FUN_1401b1550(param_1 + 0x1570,&local_158);
  if ((*(longlong **)(param_1 + 0x15d8) != (longlong *)0x0) &&
     (lVar6 = **(longlong **)(param_1 + 0x15d8), lVar6 != 0)) {
    if (*(char *)(lVar6 + 0x40) == '\0') {
      lVar6 = lVar7;
      if (*(longlong **)(param_1 + 0x15d8) != (longlong *)0x0) {
        lVar6 = **(longlong **)(param_1 + 0x15d8);
      }
      if (*(char *)(lVar6 + 0x80) == '\0') goto LAB_1401c669b;
    }
    local_170 = 0;
    FUN_1401d43e0(&local_170,param_1 + 0x15d8);
    lVar6 = lVar7;
    if (*(longlong *)(param_1 + 0x5d8) != 0) {
      lVar6 = *(longlong *)(*(longlong *)(param_1 + 0x5d8) + 0x38);
    }
    FUN_1401d9360(lVar6,&local_170);
  }
LAB_1401c669b:
  if ((*(longlong **)(param_1 + 0x1520) != (longlong *)0x0) &&
     (lVar6 = **(longlong **)(param_1 + 0x1520), lVar6 != 0)) {
    if (*(char *)(lVar6 + 0x40) == '\0') {
      lVar6 = lVar7;
      if (*(longlong **)(param_1 + 0x1520) != (longlong *)0x0) {
        lVar6 = **(longlong **)(param_1 + 0x1520);
      }
      if (*(char *)(lVar6 + 0x80) == '\0') goto LAB_1401c670f;
    }
    local_168 = 0;
    FUN_1401d43e0(&local_168,param_1 + 0x1520);
    lVar6 = lVar7;
    if (*(longlong *)(param_1 + 0x5d8) != 0) {
      lVar6 = *(longlong *)(*(longlong *)(param_1 + 0x5d8) + 0x38);
    }
    FUN_1401d9360(lVar6,&local_168);
  }
LAB_1401c670f:
  local_150 = 0;
  FUN_1401d43e0(param_1 + 0x15d8,&local_150);
  local_160 = 0;
  FUN_1401d43e0(param_1 + 0x1520,&local_160);
  FUN_1401c1670(param_1);
  plVar3 = *(longlong **)(param_1 + 0x1708);
  do {
    if (plVar3 == (longlong *)0x0) {
      FUN_1401bcf60(param_1 + 0x1700);
      if (param_2 != '\0') {
        FUN_1401c4a60(param_1 + 0x15e0);
      }
      FUN_140198750(param_1 + 0xd8);
      FUN_140050060(param_1 + 0x4a8,0);
      *(undefined4 *)(param_1 + 0x4d8) = 0;
      *(undefined1 *)(param_1 + 0x4e8) = 0;
      *(undefined4 *)(param_1 + 0x4ec) = 0;
      *(undefined8 *)(param_1 + 0x4f0) = 0;
      *(undefined8 *)(param_1 + 0x4f8) = 0;
      *(undefined8 *)(param_1 + 0x500) = 0;
      *(undefined8 *)(param_1 + 0x5c8) = 0;
      FUN_1401c43a0(param_1 + 0x5e0);
      uVar8 = FUN_140181840();
      *(undefined8 *)(param_1 + 0x640) = uVar8;
      *(undefined8 *)(param_1 + 0x648) = DAT_140320cc0;
      *(undefined8 *)(param_1 + 0x510) = DAT_140320d30;
      *(undefined1 *)(param_1 + 0x650) = 0;
      uStack_fc = uStack_fc & 0xffffff00;
      local_100 = 0;
      local_f8 = 0;
      *(undefined8 *)(param_1 + 0x658) = 0;
      *(undefined8 *)(param_1 + 0x660) = 0;
      *(undefined8 *)(param_1 + 0x668) = 0;
      *(undefined8 *)(param_1 + 0x670) = 0;
      *(undefined8 *)(param_1 + 0x678) = 0;
      *(undefined8 *)(param_1 + 0x680) = 0;
      *(ulonglong *)(param_1 + 0x688) = (ulonglong)uStack_fc << 0x20;
      *(ulonglong *)(param_1 + 0x690) = (ulonglong)uStack_f4 << 0x20;
      *(undefined4 *)(param_1 + 0x698) = DAT_140320d40;
      puVar5 = (undefined8 *)FUN_1401ab900(local_c0);
      *(undefined8 *)(param_1 + 0x6a0) = *puVar5;
      *(undefined8 *)(param_1 + 0x6a8) = puVar5[1];
      *(undefined8 *)(param_1 + 0x6b0) = puVar5[2];
      *(undefined8 *)(param_1 + 0x6b8) = puVar5[3];
      *(undefined8 *)(param_1 + 0x6c0) = puVar5[4];
      *(undefined8 *)(param_1 + 0x6c8) = puVar5[5];
      *(undefined4 *)(param_1 + 0x6d0) = 0;
      *(undefined4 *)(param_1 + 0x6d4) = 0;
      *(undefined4 *)(param_1 + 0x6d8) = 0;
      *(undefined4 *)(param_1 + 0x6dc) = 0;
      FUN_1401bd130(param_1 + 0x6e0);
      *(undefined4 *)(param_1 + 0x700) = 0;
      *(undefined1 *)(param_1 + 0x1528) = 0;
      FUN_1401bd130(param_1 + 0x1530);
      *(undefined4 *)(param_1 + 0x1578) = 0;
      uVar8 = FUN_1401a48f0(local_88);
      FUN_1401b1820(param_1 + 0x1588,uVar8);
      FUN_1401858d0(local_68);
      if (((local_88[0] != (undefined *)0x0) && (local_88[0] != PTR_DAT_1403200a0)) &&
         (local_88[0] + -8 != (undefined *)0x0)) {
        uVar8 = FUN_1401568c0();
        local_148 = uVar8;
        FUN_140156b50(uVar8);
        local_140 = 1;
        piVar2 = (int *)(local_88[0] + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(local_88[0] + -8);
        }
        FUN_140156be0(uVar8);
        local_140 = 0;
      }
      local_88[0] = PTR_DAT_1403200a0;
      FUN_1401c4a60(param_1 + 0x1600);
      FUN_14018aea0(param_1 + 0x1620);
      *(undefined8 *)(param_1 + 0x1648) = 0;
      FUN_1401beb00(param_1 + 0x1650);
      FUN_1401beb00(param_1 + 0x16a8);
      puVar5 = (undefined8 *)FUN_1401ae890(local_f0,DAT_140320db0);
      *(undefined8 *)(param_1 + 0x1778) = *puVar5;
      *(undefined8 *)(param_1 + 0x1780) = puVar5[1];
      *(undefined8 *)(param_1 + 0x1788) = puVar5[2];
      puVar5 = (undefined8 *)FUN_1401ae890(local_d8,DAT_140320dd0);
      *(undefined8 *)(param_1 + 0x1878) = *puVar5;
      *(undefined8 *)(param_1 + 0x1880) = puVar5[1];
      *(undefined8 *)(param_1 + 0x1888) = puVar5[2];
      *(undefined8 *)(param_1 + 0x1798) = 0x3ff0000000000000;
      *(undefined8 *)(param_1 + 0x1890) = 0;
      *(undefined8 *)(param_1 + 0x18c0) = 0;
      *(undefined2 *)(param_1 + 0x18c8) = 0;
      *(undefined1 *)(param_1 + 0x18ca) = 0;
      *(undefined8 *)(param_1 + 0x1870) = 0;
      *(undefined8 *)(param_1 + 0x17a0) = 0;
      *(undefined8 *)(param_1 + 0x17a8) = 0;
      *(undefined8 *)(param_1 + 0xd0) = 0;
      return;
    }
    local_178 = (longlong *)0x0;
    if (plVar3[2] != 0) {
      *(longlong *)(plVar3[2] + 8) = *(longlong *)(plVar3[2] + 8) + 1;
      local_178 = (longlong *)plVar3[2];
    }
    lVar6 = lVar7;
    if (local_178 != (longlong *)0x0) {
      lVar6 = *local_178;
    }
    if (*(char *)(lVar6 + 0x40) == '\0') {
      lVar6 = lVar7;
      if (local_178 != (longlong *)0x0) {
        lVar6 = *local_178;
      }
      if (*(char *)(lVar6 + 0x80) != '\0') goto code_r0x0001401c67cf;
    }
    else {
code_r0x0001401c67cf:
      local_180 = 0;
      if (plVar3[2] != 0) {
        *(longlong *)(plVar3[2] + 8) = *(longlong *)(plVar3[2] + 8) + 1;
        local_180 = plVar3[2];
      }
      lVar6 = lVar7;
      if (*(longlong *)(param_1 + 0x5d8) != 0) {
        lVar6 = *(longlong *)(*(longlong *)(param_1 + 0x5d8) + 0x38);
      }
      FUN_1401d9360(lVar6,&local_180);
    }
    if (plVar3 == *(longlong **)(param_1 + 0x1708)) {
      *(longlong *)(param_1 + 0x1708) = *plVar3;
    }
    else {
      *(longlong *)plVar3[1] = *plVar3;
    }
    if (plVar3 == *(longlong **)(param_1 + 0x1710)) {
      *(longlong *)(param_1 + 0x1710) = plVar3[1];
    }
    else {
      *(longlong *)(*plVar3 + 8) = plVar3[1];
    }
    FUN_1401bb120(param_1 + 0x1700);
    plVar4 = local_178;
    if (local_178 != (longlong *)0x0) {
      plVar1 = local_178 + 1;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        if ((undefined8 *)*local_178 != (undefined8 *)0x0) {
          (*(code *)**(undefined8 **)*local_178)();
        }
        FUN_140156970(plVar4);
      }
    }
  } while( true );
}



void FUN_1401c6ca0(longlong param_1,undefined4 *param_2,int *param_3,longlong param_4,
                  undefined8 param_5,undefined4 *param_6,undefined4 *param_7,longlong param_8,
                  longlong param_9,char *param_10,short *param_11)

{
  int iVar1;
  longlong lVar2;
  void *pvVar3;
  undefined8 *puVar4;
  longlong *plVar5;
  longlong *plVar6;
  longlong *plVar7;
  longlong *plVar8;
  undefined1 local_res8 [8];
  longlong *local_168;
  longlong *local_160;
  longlong *local_158;
  undefined8 *local_150;
  longlong local_148;
  longlong local_140;
  longlong local_138 [2];
  undefined4 local_128 [2];
  undefined8 local_120;
  undefined8 local_110;
  undefined8 local_108;
  undefined **local_100;
  undefined8 local_f8;
  undefined8 local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined4 local_c0;
  int local_bc;
  int local_b8;
  undefined **local_b0;
  undefined8 local_a8;
  longlong *local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined4 local_88;
  undefined **local_80;
  undefined4 local_78;
  undefined2 local_74;
  undefined **local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  (**(code **)(*(longlong *)(param_1 + 0x78) + 0x10))();
  if (((*(longlong **)(param_1 + 0x5d0) != (longlong *)0x0) &&
      (lVar2 = **(longlong **)(param_1 + 0x5d0), lVar2 != 0)) && (*(int *)(lVar2 + 0x100) == 3)) {
    FUN_1401c1ec0(param_1,&local_160,*param_2);
    plVar8 = (longlong *)0x0;
    if ((local_160 == (longlong *)0x0) || (*local_160 == 0)) {
      plVar5 = (longlong *)FUN_1401c4840(param_1,&local_150,*param_2);
      plVar6 = (longlong *)*plVar5;
      if (plVar6 != local_160) {
        if (plVar6 != (longlong *)0x0) {
          *(longlong *)(*plVar5 + 8) = plVar6[1] + 1;
        }
        plVar6 = plVar8;
        if ((local_160 != (longlong *)0x0) && (local_160[1] = local_160[1] + -1, local_160[1] == 0))
        {
          plVar6 = local_160;
        }
        local_160 = (longlong *)*plVar5;
        if (plVar6 != (longlong *)0x0) {
          pvVar3 = (void *)*plVar6;
          if (pvVar3 != (void *)0x0) {
            FUN_1401b2400((longlong)pvVar3 + 8);
            operator_delete(pvVar3);
          }
          FUN_140156970(plVar6);
        }
      }
      if ((local_150 != (undefined8 *)0x0) && (local_150[1] = local_150[1] + -1, local_150[1] == 0))
      {
        pvVar3 = (void *)*local_150;
        if (pvVar3 != (void *)0x0) {
          FUN_1401b2400((longlong)pvVar3 + 8);
          operator_delete(pvVar3);
        }
        FUN_140156970(local_150);
      }
    }
    local_res8[0] = 0;
    if (*param_3 == 1) {
      if (param_1 == -0x1550) {
        local_140 = 0;
      }
      else {
        local_140 = param_1 + 0x1558;
      }
      plVar6 = plVar8;
      if (local_160 != (longlong *)0x0) {
        plVar6 = (longlong *)*local_160;
      }
      FUN_1401bccf0(plVar6 + 1,param_3,&local_140);
    }
    else {
      FUN_1401bb6b0(param_1,&local_168);
      plVar6 = plVar8;
      if (*(int *)(param_1 + 0x1578) == *param_3) {
        local_138[0] = param_1 + 0x68;
        if (local_160 != (longlong *)0x0) {
          plVar6 = (longlong *)*local_160;
        }
        plVar5 = local_138;
      }
      else {
        if ((local_168 == (longlong *)0x0) || (lVar2 = *local_168, lVar2 == 0)) {
          local_158 = operator_new(0x6c0);
          plVar5 = plVar8;
          if (local_158 != (void *)0x0) {
            plVar5 = (longlong *)FUN_1401e6d30(local_158,param_1);
          }
          if (plVar5 == (longlong *)0x0) {
            local_158 = (longlong *)0x0;
          }
          else {
            local_158 = (longlong *)FUN_140156940(0x10);
            local_158[1] = 1;
            *local_158 = (longlong)plVar5;
          }
          plVar5 = local_158;
          if (local_158 != local_168) {
            if (local_158 != (longlong *)0x0) {
              local_158[1] = local_158[1] + 1;
            }
            plVar7 = plVar8;
            if ((local_168 != (longlong *)0x0) &&
               (local_168[1] = local_168[1] + -1, local_168[1] == 0)) {
              plVar7 = local_168;
            }
            local_168 = local_158;
            if (plVar7 != (longlong *)0x0) {
              puVar4 = (undefined8 *)*plVar7;
              if (puVar4 != (undefined8 *)0x0) {
                (**(code **)*puVar4)(puVar4,1);
              }
              FUN_140156970(plVar7);
            }
          }
          plVar7 = local_158;
          if (plVar5 != (longlong *)0x0) {
            plVar5 = plVar5 + 1;
            *plVar5 = *plVar5 + -1;
            if (*plVar5 == 0) {
              puVar4 = (undefined8 *)*local_158;
              if (puVar4 != (undefined8 *)0x0) {
                (**(code **)*puVar4)(puVar4,1);
              }
              FUN_140156970(plVar7);
            }
          }
          plVar5 = plVar8;
          if (local_168 != (longlong *)0x0) {
            plVar5 = (longlong *)*local_168;
          }
          *(int *)((longlong)plVar5 + 0x56c) = *param_3;
          plVar5 = plVar8;
          if (local_168 != (longlong *)0x0) {
            plVar5 = (longlong *)*local_168;
          }
          *(undefined4 *)(plVar5 + 6) = *param_7;
          *(undefined4 *)((longlong)plVar5 + 0x34) = param_7[1];
          *(undefined4 *)(plVar5 + 7) = param_7[2];
          *(undefined4 *)((longlong)plVar5 + 0x3c) = param_7[3];
          plVar5 = plVar8;
          if (local_168 != (longlong *)0x0) {
            plVar5 = (longlong *)*local_168;
          }
          *(char *)((longlong)plVar5 + 0x25) = *param_10;
          plVar5 = plVar8;
          if (local_168 != (longlong *)0x0) {
            plVar5 = (longlong *)*local_168;
          }
          FUN_1401c17d0(param_1 + 0x1650,(longlong)plVar5 + 0x56c,&local_168);
          FUN_14015b3b0(param_1 + 0x1650);
          plVar5 = plVar8;
          if (local_168 != (longlong *)0x0) {
            plVar5 = (longlong *)*local_168;
          }
          FUN_1401e3530(plVar5,1);
          if (*(int *)(param_8 + 0x18) == 0) {
            plVar5 = plVar8;
            if (local_168 != (longlong *)0x0) {
              plVar5 = (longlong *)*local_168;
            }
            FUN_140198750(plVar5 + 0x2d);
          }
          else {
            plVar5 = plVar8;
            if (local_168 != (longlong *)0x0) {
              plVar5 = (longlong *)*local_168;
            }
            FUN_140198270(plVar5 + 0x2d,*(undefined8 *)(param_8 + 0x10),
                          *(uint *)(param_1 + 0x6bc) >> 3,0x10);
          }
          if (*(int *)(param_9 + 0x18) == 0) {
            plVar5 = plVar8;
            if (local_168 != (longlong *)0x0) {
              plVar5 = (longlong *)*local_168;
            }
            *(undefined1 *)(plVar5 + 0xac) = 1;
          }
          else {
            plVar5 = plVar8;
            if (local_168 != (longlong *)0x0) {
              plVar5 = (longlong *)*local_168;
            }
            FUN_1401a9a60(plVar5 + 0xa7,*(undefined8 *)(param_9 + 0x10),
                          *(uint *)(param_1 + 0x6c0) >> 3);
          }
          plVar5 = plVar8;
          if (local_168 != (longlong *)0x0) {
            plVar5 = (longlong *)*local_168;
          }
          FUN_1401e8ce0(plVar5 + 199,*param_6);
          if ((*param_11 != 0) && (*param_10 != '\0')) {
            plVar5 = plVar8;
            if (local_168 != (longlong *)0x0) {
              plVar5 = (longlong *)*local_168;
            }
            local_res8[0] = FUN_1401e6570(plVar5);
          }
        }
        else if (*(char *)(lVar2 + 0x684) != '\0') {
          FUN_1401e5590(lVar2,param_1);
          plVar5 = plVar8;
          if (local_168 != (longlong *)0x0) {
            plVar5 = (longlong *)*local_168;
          }
          *(int *)((longlong)plVar5 + 0x56c) = *param_3;
          plVar5 = plVar8;
          if (local_168 != (longlong *)0x0) {
            plVar5 = (longlong *)*local_168;
          }
          *(undefined4 *)(plVar5 + 6) = *param_7;
          *(undefined4 *)((longlong)plVar5 + 0x34) = param_7[1];
          *(undefined4 *)(plVar5 + 7) = param_7[2];
          *(undefined4 *)((longlong)plVar5 + 0x3c) = param_7[3];
          plVar7 = plVar8;
          if (local_168 != (longlong *)0x0) {
            plVar7 = (longlong *)*local_168;
          }
          *(char *)((longlong)plVar7 + 0x25) = *param_10;
          plVar7 = plVar8;
          if (local_168 != (longlong *)0x0) {
            plVar7 = (longlong *)*local_168;
          }
          FUN_1401e3530(plVar7,CONCAT71((int7)((ulonglong)plVar5 >> 8),1));
          if (*(int *)(param_8 + 0x18) == 0) {
            plVar5 = plVar8;
            if (local_168 != (longlong *)0x0) {
              plVar5 = (longlong *)*local_168;
            }
            FUN_140198750(plVar5 + 0x2d);
            FUN_140050060(plVar5 + 0xa7,0);
          }
          else {
            plVar5 = plVar8;
            if (local_168 != (longlong *)0x0) {
              plVar5 = (longlong *)*local_168;
            }
            FUN_140198270(plVar5 + 0x2d,*(undefined8 *)(param_8 + 0x10),
                          *(uint *)(param_1 + 0x6bc) >> 3,0x10);
          }
          if (*(int *)(param_9 + 0x18) == 0) {
            plVar5 = plVar8;
            if (local_168 != (longlong *)0x0) {
              plVar5 = (longlong *)*local_168;
            }
            *(undefined1 *)(plVar5 + 0xac) = 1;
          }
          else {
            plVar5 = plVar8;
            if (local_168 != (longlong *)0x0) {
              plVar5 = (longlong *)*local_168;
            }
            FUN_1401a9a60(plVar5 + 0xa7,*(undefined8 *)(param_9 + 0x10),
                          *(uint *)(param_1 + 0x6c0) >> 3);
          }
          plVar5 = plVar8;
          if (local_168 != (longlong *)0x0) {
            plVar5 = (longlong *)*local_168;
          }
          FUN_1401e8ce0(plVar5 + 199,*param_6);
          if ((*param_11 != 0) && (*param_10 != '\0')) {
            plVar5 = plVar8;
            if (local_168 != (longlong *)0x0) {
              plVar5 = (longlong *)*local_168;
            }
            local_res8[0] = FUN_1401e6570(plVar5);
          }
          plVar5 = plVar8;
          if (local_168 != (longlong *)0x0) {
            plVar5 = (longlong *)*local_168;
          }
          *(undefined1 *)((longlong)plVar5 + 0x684) = 0;
          FUN_1401c0530(param_1 + 0x16a8,param_3,0);
        }
        plVar5 = plVar8;
        if (local_160 != (longlong *)0x0) {
          plVar5 = (longlong *)*local_160;
        }
        plVar7 = plVar8;
        if (local_168 != (longlong *)0x0) {
          plVar7 = (longlong *)*local_168;
        }
        FUN_1401c4740(plVar7 + 0xb6,plVar5,&local_160);
        if ((local_168 == (longlong *)0x0) || (*local_168 == 0)) {
          local_148 = 0;
        }
        else {
          local_148 = *local_168 + 8;
        }
        if (local_160 != (longlong *)0x0) {
          plVar6 = (longlong *)*local_160;
        }
        plVar5 = &local_148;
      }
      FUN_1401bccf0(plVar6 + 1,param_3,plVar5);
      plVar6 = local_168;
      if ((local_168 != (longlong *)0x0) && (local_168[1] = local_168[1] + -1, local_168[1] == 0)) {
        puVar4 = (undefined8 *)*local_168;
        if (puVar4 != (undefined8 *)0x0) {
          (**(code **)*puVar4)(puVar4,1);
        }
        FUN_140156970(plVar6);
      }
    }
    (**(code **)(*(longlong *)(param_1 + 0x1818) + 0x60))
              ((longlong *)(param_1 + 0x1818),1,&DAT_140328530,param_2,param_3,param_5,local_res8);
    local_120 = 0;
    local_110 = 0;
    local_108 = 0;
    local_f8 = 0;
    local_f0 = 0;
    local_e8 = 0;
    local_e0 = 0;
    local_100 = Proud::ByteArray::vftable;
    local_c8 = 0;
    local_d0 = 0;
    local_d8 = 0;
    local_a8 = 0;
    local_a0 = (longlong *)0x0;
    local_98 = 0;
    local_90 = 0;
    local_b0 = Proud::ByteArray::vftable;
    local_80 = Proud::AddrPort::vftable;
    local_78 = 0;
    local_74 = 0;
    local_60 = 0;
    local_58 = 0;
    local_50 = 0;
    local_48 = 0;
    local_68 = Proud::ByteArray::vftable;
    local_128[0] = 8;
    local_c0 = *param_2;
    local_bc = *param_3;
    plVar6 = plVar8;
    if (local_160 != (longlong *)0x0) {
      plVar6 = (longlong *)*local_160;
    }
    local_88 = (undefined4)plVar6[5];
    iVar1 = *(int *)(param_4 + 0x18);
    local_b8 = local_bc;
    if (iVar1 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_140050060(&local_b0,iVar1);
    plVar6 = plVar8;
    if (*(int *)(param_4 + 0x18) != 0) {
      plVar6 = *(longlong **)(param_4 + 0x10);
    }
    plVar5 = local_a0;
    if ((int)local_98 == 0) {
      plVar5 = plVar8;
    }
    FUN_140050120(plVar5,plVar6,(longlong)iVar1);
    FUN_1401c5d30(param_1,local_128);
    FUN_140174b20(local_128);
    plVar8 = local_160;
    if ((local_160 != (longlong *)0x0) && (local_160[1] = local_160[1] + -1, local_160[1] == 0)) {
      pvVar3 = (void *)*local_160;
      if (pvVar3 != (void *)0x0) {
        FUN_1401b2400((longlong)pvVar3 + 8);
        operator_delete(pvVar3);
      }
      FUN_140156970(plVar8);
    }
  }
  return;
}



undefined8
FUN_1401c7590(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
             undefined8 param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8,
             undefined8 param_9,undefined8 param_10,undefined8 param_11,undefined8 param_12,
             undefined8 param_13)

{
  undefined8 uVar1;
  
  uVar1 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar1);
  FUN_1401c6ca0(*(undefined8 *)(param_1 + 0x20),param_4,param_5,param_6,param_7,param_10,param_11,
                param_8,param_9,param_12,param_13);
  FUN_140156be0(uVar1);
  return 1;
}



undefined8
FUN_1401c7670(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
             undefined8 param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8,
             undefined8 param_9,undefined8 param_10,undefined8 param_11)

{
  undefined8 uVar1;
  undefined **local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined **local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 local_20;
  undefined8 local_18;
  
  uVar1 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50();
  local_30 = 0;
  local_28 = 0;
  local_20 = 0;
  local_18 = 0;
  local_38 = Proud::ByteArray::vftable;
  local_58 = 0;
  local_50 = 0;
  local_48 = 0;
  local_40 = 0;
  local_60 = Proud::ByteArray::vftable;
  FUN_1401c6ca0(*(undefined8 *)(param_1 + 0x20),param_4,param_5,param_6,param_7,param_8,param_9,
                &local_60,&local_38,param_10,param_11);
  FUN_1401858d0(&local_60);
  FUN_1401858d0(&local_38);
  FUN_140156be0(uVar1);
  return 1;
}



undefined8
FUN_1401c77c0(longlong param_1,undefined8 param_2,undefined8 param_3,int *param_4,int *param_5,
             longlong param_6,longlong param_7,longlong param_8,longlong param_9)

{
  int iVar1;
  undefined4 uVar2;
  undefined8 *puVar3;
  undefined8 uVar4;
  longlong *plVar5;
  longlong lVar6;
  int iVar7;
  undefined4 uVar8;
  undefined2 uVar9;
  undefined4 uVar10;
  undefined2 uVar11;
  undefined4 local_138 [2];
  undefined8 local_130;
  undefined8 local_120;
  undefined8 local_118;
  undefined **local_110;
  undefined8 local_108;
  undefined8 local_100;
  undefined8 local_f8;
  undefined8 local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  int local_c8;
  undefined **local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined **local_90;
  undefined4 local_88;
  undefined2 local_84;
  undefined **local_78;
  undefined8 local_70;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  iVar7 = *param_4;
  iVar1 = *param_5;
  uVar2 = *(undefined4 *)(param_6 + 8);
  param_5._0_2_ = *(undefined2 *)(param_6 + 0xc);
  uVar8 = *(undefined4 *)(param_7 + 8);
  uVar9 = *(undefined2 *)(param_7 + 0xc);
  uVar10 = *(undefined4 *)(param_8 + 8);
  uVar11 = *(undefined2 *)(param_8 + 0xc);
  param_7._0_4_ = *(undefined4 *)(param_9 + 8);
  param_6 = CONCAT62(param_6._2_6_,*(undefined2 *)(param_9 + 0xc));
  uVar4 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar4);
  if (*(int *)(*(longlong *)(param_1 + 0x20) + 0x1578) != iVar1) {
    iVar7 = iVar1;
    uVar8 = (undefined4)param_7;
    uVar9 = (undefined2)param_6;
    uVar10 = uVar2;
    uVar11 = param_5._0_2_;
  }
  plVar5 = (longlong *)FUN_1401bb6b0(*(longlong *)(param_1 + 0x20),&param_5,iVar7);
  lVar6 = 0;
  if ((longlong *)*plVar5 != (longlong *)0x0) {
    lVar6 = *(longlong *)*plVar5;
  }
  if ((CONCAT62(param_5._2_6_,param_5._0_2_) != 0) &&
     (plVar5 = (longlong *)(CONCAT62(param_5._2_6_,param_5._0_2_) + 8), *plVar5 = *plVar5 + -1,
     *(longlong *)(CONCAT62(param_5._2_6_,param_5._0_2_) + 8) == 0)) {
    plVar5 = (longlong *)CONCAT62(param_5._2_6_,param_5._0_2_);
    puVar3 = (undefined8 *)*plVar5;
    if (puVar3 != (undefined8 *)0x0) {
      (**(code **)*puVar3)(puVar3,1);
    }
    FUN_140156970(plVar5);
  }
  if ((lVar6 != 0) && (*(char *)(lVar6 + 0x684) == '\0')) {
    *(undefined4 *)(lVar6 + 0x598) = uVar10;
    *(undefined2 *)(lVar6 + 0x59c) = uVar11;
    *(undefined4 *)(lVar6 + 0x5a8) = uVar8;
    *(undefined2 *)(lVar6 + 0x5ac) = uVar9;
    FUN_1401e3530(lVar6,0);
    param_6 = 0;
    FUN_1401bcec0(lVar6 + 0x28,&param_6);
    local_130 = 0;
    local_120 = 0;
    local_118 = 0;
    local_108 = 0;
    local_100 = 0;
    local_f8 = 0;
    local_f0 = 0;
    local_110 = Proud::ByteArray::vftable;
    local_d8 = 0;
    local_e0 = 0;
    local_e8 = 0;
    local_b8 = 0;
    local_b0 = 0;
    local_a8 = 0;
    local_a0 = 0;
    local_c0 = Proud::ByteArray::vftable;
    local_90 = Proud::AddrPort::vftable;
    local_88 = 0;
    local_84 = 0;
    local_70 = 0;
    local_68 = 0;
    local_60 = 0;
    local_58 = 0;
    local_78 = Proud::ByteArray::vftable;
    local_138[0] = 10;
    local_c8 = iVar7;
    FUN_1401c5d30(*(undefined8 *)(param_1 + 0x20),local_138);
    FUN_140174b20(local_138);
  }
  FUN_140156be0(uVar4);
  return 1;
}



// WARNING: Removing unreachable block (ram,0x0001401c7bf2)
// WARNING: Removing unreachable block (ram,0x0001401c7c04)
// WARNING: Removing unreachable block (ram,0x0001401c7c1f)
// WARNING: Removing unreachable block (ram,0x0001401c7c27)
// WARNING: Removing unreachable block (ram,0x0001401c7c31)

undefined8
FUN_1401c7a30(longlong param_1,undefined8 param_2,undefined8 param_3,uint *param_4,uint *param_5)

{
  uint *puVar1;
  longlong lVar2;
  void *pvVar3;
  undefined8 *puVar4;
  ulonglong uVar5;
  longlong lVar6;
  longlong *local_res8;
  longlong *local_res20;
  undefined4 local_138 [2];
  undefined8 local_130 [2];
  undefined8 local_120;
  undefined8 local_118;
  undefined **local_110;
  undefined8 local_108;
  undefined8 local_100;
  undefined8 local_f8;
  undefined8 local_f0;
  undefined8 local_e8;
  longlong local_e0;
  ulonglong local_d8;
  uint local_d0;
  uint local_cc;
  uint local_c8;
  undefined **local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined4 local_98;
  undefined **local_90;
  undefined4 local_88;
  undefined2 local_84;
  undefined **local_78;
  undefined8 local_70;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_48;
  undefined1 local_40;
  undefined8 *local_38;
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  local_48 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(local_48);
  local_40 = 1;
  lVar6 = *(longlong *)(param_1 + 0x20);
  if ((*(char *)(lVar6 + 0x1790) != '\0') || (*(int *)(lVar6 + 0x6c8) != 0)) {
    FUN_1401bdd00(lVar6,1,&DAT_1402749f0,*(undefined4 *)(lVar6 + 0x1578),*param_4,*param_5);
  }
  FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x20),&local_res20,*param_4);
  FUN_1401c1ec0(*(undefined8 *)(param_1 + 0x20),&local_res8,*param_5);
  if ((local_res8 != (longlong *)0x0) && (lVar6 = *local_res8, lVar6 != 0)) {
    uVar5 = (ulonglong)*param_4 % (ulonglong)*(uint *)(lVar6 + 0x30);
    if (*(longlong *)(lVar6 + 0x10) != 0) {
      puVar1 = *(uint **)(*(longlong *)(lVar6 + 0x10) + uVar5 * 8);
      while( true ) {
        if ((puVar1 == (uint *)0x0) || ((uint)uVar5 != puVar1[8] % *(uint *)(lVar6 + 0x30)))
        goto LAB_1401c7b4f;
        if (*puVar1 == *param_4) break;
        puVar1 = *(uint **)(puVar1 + 4);
      }
      FUN_1401b0d90(lVar6 + 8,puVar1,0);
    }
  }
LAB_1401c7b4f:
  lVar6 = 0;
  if ((local_res20 != (longlong *)0x0) && (lVar2 = *local_res20, lVar2 != 0)) {
    uVar5 = (ulonglong)*param_5 % (ulonglong)*(uint *)(lVar2 + 0x5d8);
    if (*(longlong *)(lVar2 + 0x5b8) != 0) {
      puVar1 = *(uint **)(*(longlong *)(lVar2 + 0x5b8) + uVar5 * 8);
      while( true ) {
        if ((puVar1 == (uint *)0x0) || ((uint)uVar5 != puVar1[8] % *(uint *)(lVar2 + 0x5d8)))
        goto LAB_1401c7bd3;
        if (*puVar1 == *param_5) break;
        puVar1 = *(uint **)(puVar1 + 4);
      }
      FUN_1401c2d90(lVar2 + 0x5b0,puVar1,0);
    }
LAB_1401c7bd3:
    if (local_res20 != (longlong *)0x0) {
      local_res20[1] = local_res20[1] + 1;
    }
    FUN_1401c22e0(*(undefined8 *)(param_1 + 0x20));
    if (local_res20 != (longlong *)0x0) {
      lVar6 = *local_res20;
    }
    *(int *)(lVar6 + 0x680) = *(int *)(lVar6 + 0x680) + 1;
  }
  lVar6 = *(longlong *)(param_1 + 0x20);
  if (*param_4 == *(uint *)(lVar6 + 0x1578)) {
    uVar5 = (ulonglong)*param_5 % (ulonglong)*(uint *)(lVar6 + 0x608);
    if (*(longlong *)(lVar6 + 0x5e8) != 0) {
      puVar1 = *(uint **)(*(longlong *)(lVar6 + 0x5e8) + uVar5 * 8);
      while( true ) {
        if ((puVar1 == (uint *)0x0) || ((uint)uVar5 != puVar1[8] % *(uint *)(lVar6 + 0x608)))
        goto LAB_1401c7cd0;
        if (*puVar1 == *param_5) break;
        puVar1 = *(uint **)(puVar1 + 4);
      }
      FUN_1401c2d90(lVar6 + 0x5e0,puVar1,0);
    }
  }
LAB_1401c7cd0:
  local_130[0] = 0;
  local_120 = 0;
  local_118 = 0;
  local_108 = 0;
  local_100 = 0;
  local_f8 = 0;
  local_f0 = 0;
  local_110 = Proud::ByteArray::vftable;
  local_d8 = 0;
  local_e0 = 0;
  local_e8 = 0;
  local_b8 = 0;
  local_b0 = 0;
  local_a8 = 0;
  local_a0 = 0;
  local_c0 = Proud::ByteArray::vftable;
  local_90 = Proud::AddrPort::vftable;
  local_88 = 0;
  local_84 = 0;
  local_70 = 0;
  local_68 = 0;
  local_60 = 0;
  local_58 = 0;
  local_78 = Proud::ByteArray::vftable;
  local_138[0] = 9;
  local_cc = *param_4;
  local_d0 = *param_5;
  if ((local_res8 == (longlong *)0x0) || (*local_res8 == 0)) {
    local_98 = 0;
  }
  else {
    local_98 = (undefined4)*(undefined8 *)(*local_res8 + 0x28);
  }
  local_c8 = local_cc;
  FUN_1401c5d30(*(undefined8 *)(param_1 + 0x20),local_138);
  FUN_1401858d0(&local_78);
  FUN_1401858d0(&local_c0);
  local_38 = &local_e8;
  FUN_1401560e0(&local_e8);
  if (local_e0 != 0) {
    if ((longlong)local_d8 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_d8 = local_d8 & 0xffffffff00000000;
  }
  FUN_1401858d0(&local_110);
  FUN_140174710(&local_118);
  FUN_140174690(&local_120);
  FUN_14013c530(local_130);
  if ((local_res8 != (longlong *)0x0) && (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
    pvVar3 = (void *)*local_res8;
    if (pvVar3 != (void *)0x0) {
      FUN_1401b2400((longlong)pvVar3 + 8);
      operator_delete(pvVar3);
    }
    FUN_140156970(local_res8);
  }
  if ((local_res20 != (longlong *)0x0) &&
     (local_res20[1] = local_res20[1] + -1, local_res20[1] == 0)) {
    puVar4 = (undefined8 *)*local_res20;
    if (puVar4 != (undefined8 *)0x0) {
      (**(code **)*puVar4)(puVar4,1);
    }
    FUN_140156970(local_res20);
  }
  FUN_140156be0(local_48);
  return 1;
}



undefined8
FUN_1401c7ea0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4,
             char *param_5,longlong param_6,longlong param_7,longlong param_8,longlong param_9)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong lVar5;
  longlong *local_res8;
  undefined8 local_148;
  undefined8 local_140;
  undefined8 local_138;
  undefined8 local_130;
  undefined1 local_128;
  undefined4 local_118 [2];
  undefined8 local_110;
  undefined8 local_100;
  undefined8 local_f8;
  undefined **local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined8 local_b8;
  undefined4 local_a8;
  undefined **local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined **local_70;
  undefined4 local_68;
  undefined2 local_64;
  undefined **local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_28;
  
  local_28 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  local_130 = uVar2;
  FUN_140156b50(uVar2);
  local_128 = 1;
  FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x20),&local_res8,*param_4);
  if (((local_res8 != (longlong *)0x0) && (lVar5 = *local_res8, lVar5 != 0)) &&
     (*(char *)(lVar5 + 0x684) == '\0')) {
    *(undefined1 *)(lVar5 + 0x24) = 1;
    lVar5 = 0;
    if (*param_5 == '\0') {
      lVar4 = lVar5;
      if (local_res8 != (longlong *)0x0) {
        lVar4 = *local_res8;
      }
      FUN_1401e3670(lVar4);
      lVar4 = lVar5;
      if (local_res8 != (longlong *)0x0) {
        lVar4 = *local_res8;
      }
      if ((*(longlong **)(lVar4 + 0x18) != (longlong *)0x0) && (**(longlong **)(lVar4 + 0x18) != 0))
      {
        lVar4 = lVar5;
        if (local_res8 != (longlong *)0x0) {
          lVar4 = *local_res8;
        }
        local_148 = 0;
        FUN_1401d43e0(&local_148,lVar4 + 0x18);
        FUN_1401c0470(*(undefined8 *)(param_1 + 0x20),&local_148);
        local_140 = 0;
        lVar4 = lVar5;
        if (local_res8 != (longlong *)0x0) {
          lVar4 = *local_res8;
        }
        FUN_1401d43e0(lVar4 + 0x18,&local_140);
      }
      if (local_res8 != (longlong *)0x0) {
        lVar5 = *local_res8;
      }
      FUN_1401e3530(lVar5,1);
    }
    else {
      lVar4 = lVar5;
      if (local_res8 != (longlong *)0x0) {
        lVar4 = *local_res8;
      }
      *(undefined4 *)(lVar4 + 0x578) = *(undefined4 *)(param_7 + 8);
      *(undefined2 *)(lVar4 + 0x57c) = *(undefined2 *)(param_7 + 0xc);
      lVar4 = lVar5;
      if (local_res8 != (longlong *)0x0) {
        lVar4 = *local_res8;
      }
      *(undefined4 *)(lVar4 + 0x588) = *(undefined4 *)(param_6 + 8);
      *(undefined2 *)(lVar4 + 0x58c) = *(undefined2 *)(param_6 + 0xc);
      lVar4 = lVar5;
      if (local_res8 != (longlong *)0x0) {
        lVar4 = *local_res8;
      }
      *(undefined4 *)(lVar4 + 0x598) = *(undefined4 *)(param_8 + 8);
      *(undefined2 *)(lVar4 + 0x59c) = *(undefined2 *)(param_8 + 0xc);
      lVar4 = lVar5;
      if (local_res8 != (longlong *)0x0) {
        lVar4 = *local_res8;
      }
      *(undefined4 *)(lVar4 + 0x5a8) = *(undefined4 *)(param_9 + 8);
      *(undefined2 *)(lVar4 + 0x5ac) = *(undefined2 *)(param_9 + 0xc);
      lVar4 = lVar5;
      if (local_res8 != (longlong *)0x0) {
        lVar4 = *local_res8;
      }
      FUN_1401e3530(lVar4,0);
      local_138 = 0;
      lVar4 = lVar5;
      if (local_res8 != (longlong *)0x0) {
        lVar4 = *local_res8;
      }
      FUN_1401bcec0(lVar4 + 0x28,&local_138);
      if (local_res8 != (longlong *)0x0) {
        lVar5 = *local_res8;
      }
      uVar3 = FUN_1401e36b0(lVar5);
      FUN_1401e70d0(uVar3);
      local_110 = 0;
      local_100 = 0;
      local_f8 = 0;
      local_e8 = 0;
      local_e0 = 0;
      local_d8 = 0;
      local_d0 = 0;
      local_f0 = Proud::ByteArray::vftable;
      local_b8 = 0;
      local_c0 = 0;
      local_c8 = 0;
      local_98 = 0;
      local_90 = 0;
      local_88 = 0;
      local_80 = 0;
      local_a0 = Proud::ByteArray::vftable;
      local_70 = Proud::AddrPort::vftable;
      local_68 = 0;
      local_64 = 0;
      local_50 = 0;
      local_48 = 0;
      local_40 = 0;
      local_38 = 0;
      local_58 = Proud::ByteArray::vftable;
      local_118[0] = 10;
      local_a8 = *param_4;
      FUN_1401c5d30(*(undefined8 *)(param_1 + 0x20),local_118);
      FUN_140174b20(local_118);
    }
  }
  if ((local_res8 != (longlong *)0x0) &&
     (local_res8[1] = local_res8[1] + -1, uVar2 = local_130, local_res8[1] == 0)) {
    puVar1 = (undefined8 *)*local_res8;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(local_res8);
    uVar2 = local_130;
  }
  FUN_140156be0(uVar2);
  return 1;
}



// WARNING: Removing unreachable block (ram,0x0001401c838c)
// WARNING: Removing unreachable block (ram,0x0001401c8395)
// WARNING: Removing unreachable block (ram,0x0001401c83b6)
// WARNING: Removing unreachable block (ram,0x0001401c83bf)

undefined8 *
FUN_1401c81e0(undefined8 *param_1,undefined8 param_2,undefined1 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  bool bVar4;
  undefined8 *puVar5;
  undefined8 *puVar6;
  undefined4 uVar7;
  undefined8 uVar8;
  longlong lVar9;
  longlong lVar10;
  double dVar11;
  undefined8 *local_res10;
  undefined8 *local_res18;
  undefined8 local_50;
  undefined4 local_44;
  longlong local_40;
  
  FUN_140188390(param_1,param_2,param_3,param_4,0xfffffffffffffffe);
  lVar10 = 0;
  param_1[0x10] = 0;
  param_1[0x14] = 0;
  param_1[0x15] = 0;
  param_1[0x16] = 0;
  *param_1 = Proud::CNetClientImpl::vftable;
  param_1[0xc] = Proud::CNetClientImpl::vftable;
  param_1[0xd] = Proud::CNetClientImpl::vftable;
  param_1[0xe] = Proud::CNetClientImpl::vftable;
  param_1[0xf] = Proud::CNetClientImpl::vftable;
  param_1[0x11] = Proud::CNetClientImpl::vftable;
  param_1[0x12] = Proud::CNetClientImpl::vftable;
  param_1[0x13] = Proud::CNetClientImpl::vftable;
  FUN_1401ae890(param_1 + 0x17,DAT_140320d28 * 10.0 * 2.0);
  *(undefined4 *)(param_1 + 0x93) = 0;
  param_1[0x96] = 0;
  param_1[0x97] = 0;
  param_1[0x98] = 0;
  param_1[0x99] = 0;
  param_1[0x95] = Proud::ByteArray::vftable;
  *(undefined1 *)(param_1 + 0x9a) = 0;
  param_1[0x9c] = 0;
  uVar7 = FUN_14015a430();
  FUN_140156a70(param_1 + 0xa3,uVar7,1);
  param_1[0xba] = 0;
  param_1[0xbb] = 0;
  *(undefined1 *)(param_1 + 0xbc) = 0;
  param_1[0xc6] = 0;
  param_1[0xbd] = 0;
  param_1[0xbe] = 0;
  param_1[0xbf] = 0;
  *(undefined4 *)(param_1 + 0xc1) = 0x11;
  param_1[0xc0] = 0;
  *(undefined4 *)(param_1 + 0xc5) = 0;
  *(undefined4 *)((longlong)param_1 + 0x60c) = 0x3f400000;
  *(undefined4 *)(param_1 + 0xc2) = 0x3e800000;
  *(undefined4 *)((longlong)param_1 + 0x614) = 0x40100000;
  param_1[0xc3] = 0x26;
  param_1[0xc4] = 4;
  param_1[0xc4] = 0;
  param_1[199] = 0;
  *(undefined1 *)((longlong)param_1 + 0x68c) = 0;
  *(undefined4 *)(param_1 + 0xd1) = 0;
  *(undefined4 *)(param_1 + 0xd2) = 0;
  param_1[0xcb] = 0;
  param_1[0xcc] = 0;
  param_1[0xd0] = 0;
  param_1[0xcf] = 0;
  param_1[0xce] = 0;
  param_1[0xcd] = 0;
  FUN_1401ab900(param_1 + 0xd4);
  *(undefined4 *)(param_1 + 0xda) = 0;
  *(undefined4 *)((longlong)param_1 + 0x6d4) = 0;
  *(undefined4 *)(param_1 + 0xdb) = 0;
  *(undefined4 *)((longlong)param_1 + 0x6dc) = 0;
  param_1[0xdc] = 0;
  param_1[0xdf] = 0;
  param_1[0xdd] = 0;
  param_1[0xde] = 0;
  *(undefined4 *)(param_1 + 0x159) = 0;
  param_1[0x15c] = 0;
  param_1[0x15d] = 0;
  param_1[0x15e] = 0;
  param_1[0x15f] = 0;
  param_1[0x15b] = Proud::ByteArray::vftable;
  *(undefined1 *)(param_1 + 0x160) = 0;
  puVar1 = param_1 + 0x161;
  local_res10 = puVar1;
  FUN_140187aa0(puVar1);
  FUN_140187bc0(puVar1);
  param_1[0x2a4] = 0;
  *(undefined1 *)(param_1 + 0x2a5) = 0;
  param_1[0x2a6] = 0;
  param_1[0x2a9] = 0;
  param_1[0x2a7] = 0;
  param_1[0x2a8] = 0;
  param_1[0x2aa] = Proud::CNetClientImpl::ServerAsSendDest::vftable;
  param_1[0x2ab] = Proud::CNetClientImpl::ServerAsSendDest::vftable;
  param_1[0x2ac] = param_1;
  param_1[0x2ad] = 0;
  param_1[0x2ae] = 0;
  FUN_1401a48f0(param_1 + 0x2b1);
  param_1[699] = 0;
  param_1[700] = 0;
  param_1[0x2bf] = 0;
  param_1[0x2bd] = 0;
  param_1[0x2be] = 0;
  param_1[0x2c0] = 0;
  param_1[0x2c3] = 0;
  param_1[0x2c1] = 0;
  param_1[0x2c2] = 0;
  FUN_14018ae00(param_1 + 0x2c4);
  *(undefined1 *)(param_1 + 0x2ca) = 0;
  param_1[0x2d4] = 0;
  param_1[0x2cb] = 0;
  param_1[0x2cc] = 0;
  param_1[0x2cd] = 0;
  *(undefined4 *)(param_1 + 0x2cf) = 0x11;
  param_1[0x2ce] = 0;
  *(undefined4 *)(param_1 + 0x2d3) = 0;
  *(undefined4 *)((longlong)param_1 + 0x167c) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x2d0) = 0x3e800000;
  *(undefined4 *)((longlong)param_1 + 0x1684) = 0x40100000;
  param_1[0x2d1] = 0x26;
  param_1[0x2d2] = 4;
  param_1[0x2d2] = 0;
  *(undefined1 *)(param_1 + 0x2d5) = 0;
  param_1[0x2df] = 0;
  param_1[0x2d6] = 0;
  param_1[0x2d7] = 0;
  param_1[0x2d8] = 0;
  *(undefined4 *)(param_1 + 0x2da) = 0x11;
  param_1[0x2d9] = 0;
  *(undefined4 *)(param_1 + 0x2de) = 0;
  *(undefined4 *)((longlong)param_1 + 0x16d4) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x2db) = 0x3e800000;
  *(undefined4 *)((longlong)param_1 + 0x16dc) = 0x40100000;
  param_1[0x2dc] = 0x26;
  param_1[0x2dd] = 0;
  param_1[0x2e0] = 0;
  param_1[0x2e3] = 0;
  param_1[0x2e1] = 0;
  param_1[0x2e2] = 0;
  *(undefined1 *)(param_1 + 0x2e4) = 0;
  param_1[0x2ee] = 0;
  param_1[0x2e5] = 0;
  param_1[0x2e6] = 0;
  param_1[0x2e7] = 0;
  *(undefined4 *)(param_1 + 0x2e9) = 0x11;
  param_1[0x2e8] = 0;
  *(undefined4 *)(param_1 + 0x2ed) = 0;
  *(undefined4 *)((longlong)param_1 + 0x174c) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x2ea) = 0x3e800000;
  *(undefined4 *)((longlong)param_1 + 0x1754) = 0x40100000;
  param_1[0x2eb] = 0x26;
  param_1[0x2ec] = 0;
  FUN_1401ae890(param_1 + 0x2ef,DAT_140320db0);
  param_1[0x2f4] = 0;
  param_1[0x2f5] = 0;
  param_1[0x2f6] = 0;
  param_1[0x2f9] = 0;
  param_1[0x2f7] = 0;
  param_1[0x2f8] = 0;
  puVar1 = param_1 + 0x2fa;
  local_res10 = puVar1;
  FUN_140156ca0(puVar1);
  *puVar1 = ProudC2C::Proxy::vftable;
  if (*(int *)((longlong)param_1 + 0x17e4) != 1) {
    FUN_1401580e0(PTR_u_PIDL_compiler_is_incompatible_to_1403200e0);
  }
  *puVar1 = Proud::CNetClientImpl::C2CProxy::vftable;
  FUN_140157ba0(param_1 + 0x2fe);
  param_1[0x2fe] = Proud::CNetClientImpl::C2CStub::vftable;
  puVar2 = param_1 + 0x303;
  local_res10 = puVar2;
  FUN_140156ca0(puVar2);
  *puVar2 = ProudC2S::Proxy::vftable;
  if (*(int *)((longlong)param_1 + 0x182c) != 1) {
    FUN_1401580e0(PTR_u_PIDL_compiler_is_incompatible_to_1403200e0);
  }
  *puVar2 = Proud::CNetClientImpl::C2SProxy::vftable;
  FUN_140157ba0(param_1 + 0x307);
  param_1[0x307] = Proud::CNetClientImpl::S2CStub::vftable;
  param_1[0x30d] = 0;
  param_1[0x30e] = 0;
  FUN_1401ae890(param_1 + 0x30f,DAT_140320dd0);
  *(undefined2 *)(param_1 + 0x319) = 0;
  *(undefined1 *)((longlong)param_1 + 0x18ca) = 0;
  param_1[0x30c] = DAT_140320dd0;
  uVar8 = FUN_1401baf50(&local_res10);
  FUN_1401b1400(param_1 + 0xbb,uVar8);
  puVar5 = local_res10;
  if (local_res10 != (undefined8 *)0x0) {
    FUN_140156b50(local_res10);
    bVar4 = true;
    local_res10[8] = local_res10[8] + -1;
    if (local_res10[8] == 0) {
      FUN_140156be0(puVar5);
      puVar6 = local_res10;
      bVar4 = false;
      local_res18 = local_res10;
      puVar3 = (undefined8 *)local_res10[7];
      if (puVar3 != (undefined8 *)0x0) {
        (**(code **)*puVar3)(puVar3,1);
      }
      FUN_140156c00(puVar6);
      FUN_140156970(puVar6);
    }
    if (bVar4) {
      FUN_140156be0(puVar5);
    }
  }
  FUN_1401581d0();
  *(undefined1 *)(param_1 + 0xca) = 0;
  *(undefined4 *)(param_1 + 0xd3) = DAT_140320d40;
  param_1[0x2b0] = 0;
  param_1[0x2c9] = 0;
  *(undefined4 *)(param_1 + 0x2af) = 0;
  *(undefined4 *)(param_1 + 0xb8) = 0;
  *(undefined4 *)(param_1 + 0xb0) = 0;
  *(undefined4 *)(param_1 + 0xa1) = 0;
  lVar9 = lVar10;
  if (param_1[0xbb] != 0) {
    lVar9 = *(longlong *)(param_1[0xbb] + 0x38);
  }
  dVar11 = (double)FUN_1401d3e30(lVar9);
  param_1[0xa2] = dVar11 + DAT_140320d30;
  FUN_1401887e0(param_1,puVar1);
  FUN_1401887e0(param_1,puVar2);
  FUN_1401889e0(param_1,param_1 + 0x307);
  FUN_1401889e0(param_1,param_1 + 0x2fe);
  *(undefined1 *)(param_1 + 0x2fc) = 1;
  *(undefined1 *)(param_1 + 0x305) = 1;
  *(undefined1 *)(param_1 + 0x30a) = 1;
  *(undefined1 *)(param_1 + 0x301) = 1;
  param_1[0x302] = param_1;
  param_1[0x30b] = param_1;
  *(undefined1 *)(param_1 + 0x2f2) = 0;
  param_1[0x2f3] = 0x3ff0000000000000;
  FUN_14019c9e0(&local_50);
  local_50 = 0;
  local_44 = 0;
  if (param_1[0xbb] != 0) {
    lVar10 = *(longlong *)(param_1[0xbb] + 0x38);
  }
  local_40 = lVar10 + 0x10;
  uVar8 = FUN_140156a10(0x800,&local_50);
  param_1[0x9c] = uVar8;
  FUN_1401f0c30(param_1 + 0xdc);
  FUN_1401f0c30(param_1 + 700);
  FUN_1401f0c30(param_1 + 0x2c0);
  FUN_1401f0c30(param_1 + 0x2a6);
  return param_1;
}



void * FUN_1401c8a40(void *param_1,uint param_2)

{
  FUN_1401c54e0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401c8a70(longlong *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  undefined4 *puVar6;
  longlong lVar7;
  undefined8 *local_res8;
  undefined8 *local_158;
  undefined1 local_150;
  undefined4 local_148 [2];
  longlong local_140 [2];
  undefined8 local_130;
  undefined8 local_128;
  undefined **local_120;
  undefined8 local_118;
  undefined8 local_110;
  undefined8 local_108;
  undefined8 local_100;
  undefined8 local_f8;
  longlong local_f0;
  ulonglong local_e8;
  undefined4 local_d8;
  undefined **local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined **local_a0;
  undefined4 local_98;
  undefined2 local_94;
  undefined **local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 local_70;
  undefined8 local_68;
  undefined8 local_58;
  undefined1 local_50;
  longlong local_48;
  undefined1 local_40;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*param_1 + 0x58))();
  local_58 = uVar3;
  FUN_140156b50(uVar3);
  local_50 = 1;
  if ((char)param_1[0x9d] == '\0') {
    puVar5 = (undefined8 *)0x0;
    local_140[0] = 0;
    local_130 = 0;
    local_128 = 0;
    local_118 = 0;
    local_110 = 0;
    local_108 = 0;
    local_100 = 0;
    local_120 = Proud::ByteArray::vftable;
    local_e8 = 0;
    local_f0 = 0;
    local_f8 = 0;
    local_c8 = 0;
    local_c0 = 0;
    local_b8 = 0;
    local_b0 = 0;
    local_d0 = Proud::ByteArray::vftable;
    local_a0 = Proud::AddrPort::vftable;
    local_98 = 0;
    local_94 = 0;
    local_80 = 0;
    local_78 = 0;
    local_70 = 0;
    local_68 = 0;
    local_88 = Proud::ByteArray::vftable;
    local_res8 = (undefined8 *)FUN_140156940(0x60);
    puVar4 = puVar5;
    if (local_res8 != (undefined8 *)0x0) {
      puVar4 = (undefined8 *)FUN_140181eb0(local_res8);
    }
    if (puVar4 == (undefined8 *)0x0) {
      local_res8 = (undefined8 *)0x0;
    }
    else {
      puVar5 = (undefined8 *)FUN_140156940(0x48);
      local_158 = puVar5;
      if (puVar5 != (undefined8 *)0x0) {
        local_res8 = puVar5;
        uVar2 = FUN_14015a430();
        FUN_140156a70(puVar5,uVar2,1);
      }
      local_res8 = puVar5;
      FUN_140156b50(puVar5);
      puVar5[8] = 1;
      puVar5[7] = puVar4;
      FUN_140156be0(puVar5);
    }
    FUN_14016dca0(local_140,&local_res8);
    if (puVar5 != (undefined8 *)0x0) {
      local_158 = puVar5;
      FUN_140156b50();
      local_150 = 1;
      plVar1 = puVar5 + 8;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_140156be0(puVar5);
        local_150 = 0;
        FUN_14013c4c0();
      }
      else {
        FUN_140156be0();
      }
    }
    local_148[0] = 3;
    if (local_140[0] == 0) {
      puVar6 = (undefined4 *)0x0;
    }
    else {
      puVar6 = *(undefined4 **)(local_140[0] + 0x38);
    }
    *puVar6 = param_2;
    lVar7 = 0;
    if (local_140[0] != 0) {
      lVar7 = *(longlong *)(local_140[0] + 0x38);
    }
    *(undefined4 *)(lVar7 + 4) = param_3;
    if (local_140[0] == 0) {
      lVar7 = 0;
    }
    else {
      lVar7 = *(longlong *)(local_140[0] + 0x38);
    }
    FUN_14004f4f0(lVar7 + 0x10,param_4);
    local_d8 = 1;
    FUN_1401c5d30(param_1,local_148);
    *(undefined1 *)(param_1 + 0x9d) = 1;
    if (param_1[0xb] != 0) {
      lVar7 = param_1[0xb] + 0x98;
      local_48 = lVar7;
      FUN_140156b50(lVar7);
      local_40 = 1;
      local_res8 = (undefined8 *)((ulonglong)local_res8 & 0xffffffffffffff00);
      uVar2 = (**(code **)(param_1[0xe] + 0x108))(param_1 + 0xe,&local_res8);
      local_158 = (undefined8 *)CONCAT44(local_158._4_4_,uVar2);
      (**(code **)(*(longlong *)(param_1[0xb] + 0x68) + 0x60))
                ((longlong *)(param_1[0xb] + 0x68),1,&DAT_140328530,&local_158);
      FUN_140156be0(lVar7);
    }
    FUN_1401858d0(&local_88);
    FUN_1401858d0(&local_d0);
    local_res8 = &local_f8;
    FUN_1401560e0(&local_f8);
    if (local_f0 != 0) {
      if ((longlong)local_e8 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_e8 = local_e8 & 0xffffffff00000000;
    }
    FUN_1401858d0(&local_120);
    FUN_140174710(&local_128);
    FUN_140174690(&local_130);
    FUN_14013c530(local_140);
  }
  FUN_140156be0(uVar3);
  return;
}



void FUN_1401c8d90(longlong *param_1,undefined4 param_2,longlong *param_3)

{
  longlong *plVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  longlong lVar6;
  undefined8 *puVar7;
  undefined8 *local_res8;
  undefined8 *local_158;
  undefined1 local_150;
  undefined4 local_148 [2];
  longlong local_140 [2];
  undefined8 local_130;
  undefined8 local_128;
  undefined **local_120;
  undefined8 local_118;
  undefined8 local_110;
  undefined8 local_108;
  undefined8 local_100;
  undefined8 local_f8;
  longlong local_f0;
  ulonglong local_e8;
  undefined4 local_d8;
  undefined **local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined **local_a0;
  undefined4 local_98;
  undefined2 local_94;
  undefined4 local_90;
  undefined **local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 local_70;
  undefined8 local_68;
  undefined8 local_58;
  undefined1 local_50;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*param_1 + 0x58))();
  local_58 = uVar3;
  FUN_140156b50(uVar3);
  local_50 = 1;
  if ((char)param_1[0x9d] == '\0') {
    puVar7 = (undefined8 *)0x0;
    local_140[0] = 0;
    local_130 = 0;
    local_128 = 0;
    local_118 = 0;
    local_110 = 0;
    local_108 = 0;
    local_100 = 0;
    local_120 = Proud::ByteArray::vftable;
    local_e8 = 0;
    local_f0 = 0;
    local_f8 = 0;
    local_c8 = 0;
    local_c0 = 0;
    local_b8 = 0;
    local_b0 = 0;
    local_d0 = Proud::ByteArray::vftable;
    local_a0 = Proud::AddrPort::vftable;
    local_98 = 0;
    local_94 = 0;
    local_80 = 0;
    local_78 = 0;
    local_70 = 0;
    local_68 = 0;
    local_88 = Proud::ByteArray::vftable;
    local_res8 = (undefined8 *)FUN_140156940(0x60);
    puVar4 = puVar7;
    if (local_res8 != (undefined8 *)0x0) {
      puVar4 = (undefined8 *)FUN_140181eb0(local_res8);
    }
    if (puVar4 == (undefined8 *)0x0) {
      local_res8 = (undefined8 *)0x0;
      puVar5 = puVar7;
    }
    else {
      puVar5 = (undefined8 *)FUN_140156940(0x48);
      if (puVar5 != (undefined8 *)0x0) {
        local_res8 = puVar5;
        uVar2 = FUN_14015a430();
        FUN_140156a70(puVar5,uVar2,1);
      }
      local_res8 = puVar5;
      FUN_140156b50(puVar5);
      puVar5[8] = 1;
      puVar5[7] = puVar4;
      FUN_140156be0(puVar5);
    }
    FUN_14016dca0(local_140,&local_res8);
    if (puVar5 != (undefined8 *)0x0) {
      local_158 = puVar5;
      FUN_140156b50(puVar5);
      local_150 = 1;
      plVar1 = puVar5 + 8;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_140156be0(puVar5);
        local_150 = 0;
        FUN_14013c4c0(puVar5);
      }
      else {
        FUN_140156be0(puVar5);
      }
    }
    local_148[0] = 2;
    puVar4 = puVar7;
    if (local_140[0] != 0) {
      puVar4 = *(undefined8 **)(local_140[0] + 0x38);
    }
    *(undefined4 *)puVar4 = param_2;
    puVar4 = puVar7;
    if (*param_3 != 0) {
      puVar4 = *(undefined8 **)(*param_3 + 0x38);
    }
    if (local_140[0] != 0) {
      puVar7 = *(undefined8 **)(local_140[0] + 0x38);
    }
    FUN_14004f4f0(puVar7 + 2,puVar4 + 2);
    local_d8 = 1;
    FUN_1401568c0();
    local_res8 = (undefined8 *)PTR_DAT_1403200a0;
    FUN_14004f4f0(&local_res8,param_1 + 0x2b1);
    lVar6 = FUN_140158c60(&local_158,&local_res8,(short)param_1[0x2b2]);
    local_98 = *(undefined4 *)(lVar6 + 8);
    local_94 = *(undefined2 *)(lVar6 + 0xc);
    local_90 = 0;
    FUN_1401c5d30(param_1,local_148);
    *(undefined1 *)(param_1 + 0x9d) = 1;
    FUN_1401858d0(&local_88);
    FUN_1401858d0(&local_d0);
    local_res8 = &local_f8;
    FUN_1401560e0(&local_f8);
    if (local_f0 != 0) {
      if ((longlong)local_e8 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_e8 = local_e8 & 0xffffffff00000000;
    }
    FUN_1401858d0(&local_120);
    FUN_140174710(&local_128);
    FUN_140174690(&local_130);
    FUN_14013c530(local_140);
  }
  FUN_140156be0(uVar3);
  FUN_14013c530(param_3);
  return;
}



void FUN_1401c90b0(longlong *param_1,undefined4 param_2,undefined4 param_3)

{
  longlong *plVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  longlong lVar6;
  undefined8 *puVar7;
  undefined8 *local_res8;
  undefined8 *local_158;
  undefined1 local_150;
  undefined4 local_148 [2];
  longlong local_140 [2];
  undefined8 local_130;
  undefined8 local_128;
  undefined **local_120;
  undefined8 local_118;
  undefined8 local_110;
  undefined8 local_108;
  undefined8 local_100;
  undefined8 local_f8;
  longlong local_f0;
  ulonglong local_e8;
  undefined4 local_d8;
  undefined **local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined **local_a0;
  undefined4 local_98;
  undefined2 local_94;
  undefined4 local_90;
  undefined **local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 local_70;
  undefined8 local_68;
  undefined8 local_58;
  undefined1 local_50;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  uVar3 = (**(code **)(*param_1 + 0x58))();
  local_58 = uVar3;
  FUN_140156b50(uVar3);
  local_50 = 1;
  if ((char)param_1[0x9d] == '\0') {
    puVar7 = (undefined8 *)0x0;
    local_140[0] = 0;
    local_130 = 0;
    local_128 = 0;
    local_118 = 0;
    local_110 = 0;
    local_108 = 0;
    local_100 = 0;
    local_120 = Proud::ByteArray::vftable;
    local_e8 = 0;
    local_f0 = 0;
    local_f8 = 0;
    local_c8 = 0;
    local_c0 = 0;
    local_b8 = 0;
    local_b0 = 0;
    local_d0 = Proud::ByteArray::vftable;
    local_a0 = Proud::AddrPort::vftable;
    local_98 = 0;
    local_94 = 0;
    local_80 = 0;
    local_78 = 0;
    local_70 = 0;
    local_68 = 0;
    local_88 = Proud::ByteArray::vftable;
    local_res8 = (undefined8 *)FUN_140156940(0x60);
    puVar4 = puVar7;
    if (local_res8 != (undefined8 *)0x0) {
      puVar4 = (undefined8 *)FUN_140181eb0(local_res8);
    }
    if (puVar4 == (undefined8 *)0x0) {
      local_res8 = (undefined8 *)0x0;
      puVar5 = puVar7;
    }
    else {
      puVar5 = (undefined8 *)FUN_140156940(0x48);
      if (puVar5 != (undefined8 *)0x0) {
        local_res8 = puVar5;
        uVar2 = FUN_14015a430();
        FUN_140156a70(puVar5,uVar2,1);
      }
      local_res8 = puVar5;
      FUN_140156b50(puVar5);
      puVar5[8] = 1;
      puVar5[7] = puVar4;
      FUN_140156be0(puVar5);
    }
    FUN_14016dca0(local_140,&local_res8);
    if (puVar5 != (undefined8 *)0x0) {
      local_158 = puVar5;
      FUN_140156b50(puVar5);
      local_150 = 1;
      plVar1 = puVar5 + 8;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_140156be0(puVar5);
        local_150 = 0;
        FUN_14013c4c0(puVar5);
      }
      else {
        FUN_140156be0(puVar5);
      }
    }
    local_148[0] = 2;
    if (local_140[0] != 0) {
      puVar7 = *(undefined8 **)(local_140[0] + 0x38);
    }
    *(undefined4 *)puVar7 = param_2;
    local_d8 = 1;
    FUN_1401568c0();
    local_res8 = (undefined8 *)PTR_DAT_1403200a0;
    FUN_14004f4f0(&local_res8,param_1 + 0x2b1);
    lVar6 = FUN_140158c60(&local_158,&local_res8,(short)param_1[0x2b2]);
    local_98 = *(undefined4 *)(lVar6 + 8);
    local_94 = *(undefined2 *)(lVar6 + 0xc);
    local_90 = param_3;
    FUN_1401c5d30(param_1,local_148);
    *(undefined1 *)(param_1 + 0x9d) = 1;
    FUN_1401858d0(&local_88);
    FUN_1401858d0(&local_d0);
    local_res8 = &local_f8;
    FUN_1401560e0(&local_f8);
    if (local_f0 != 0) {
      if ((longlong)local_e8 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_e8 = local_e8 & 0xffffffff00000000;
    }
    FUN_1401858d0(&local_120);
    FUN_140174710(&local_128);
    FUN_140174690(&local_130);
    FUN_14013c530(local_140);
  }
  FUN_140156be0(uVar3);
  return;
}



undefined8 FUN_1401c9390(longlong param_1)

{
  ulonglong *puVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  undefined8 uVar5;
  ulonglong uVar6;
  uint *puVar7;
  undefined8 uVar8;
  uint uVar9;
  uint *puVar10;
  uint *puVar11;
  uint uVar12;
  ulonglong uVar13;
  uint *local_res8;
  
  uVar5 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar5);
  puVar1 = *(ulonglong **)(*(longlong *)(param_1 + 0x20) + 0x5d0);
  if ((puVar1 == (ulonglong *)0x0) || (*puVar1 == 0)) goto LAB_1401c9629;
  uVar13 = 0;
  uVar6 = uVar13;
  if (puVar1 != (ulonglong *)0x0) {
    uVar6 = *puVar1;
  }
  if (3 < *(int *)(uVar6 + 0x100)) goto LAB_1401c9629;
  FUN_1401568c0();
  puVar11 = (uint *)PTR_DAT_1403200a0;
  local_res8 = (uint *)PTR_DAT_1403200a0;
  uVar2 = FUN_140156740(L"Autoprune");
  uVar4 = 0;
  uVar6 = uVar13;
  if ((puVar11 != (uint *)0x0) && (uVar6 = 0, puVar11 != (uint *)PTR_DAT_1403200a0)) {
    uVar6 = (ulonglong)*(uint *)((longlong)puVar11 + -8);
  }
  uVar3 = uVar2;
  if ((((int)uVar2 <= (int)uVar6) && (uVar3 = uVar4, puVar11 != (uint *)0x0)) &&
     (puVar11 != (uint *)PTR_DAT_1403200a0)) {
    uVar3 = *(uint *)((longlong)puVar11 + -8);
  }
  uVar12 = 1;
  if (1 < (int)uVar3) {
    uVar12 = uVar3;
  }
  uVar3 = uVar4;
  if ((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_1403200a0)) {
    uVar3 = *(uint *)((longlong)puVar11 + -8);
  }
  uVar9 = 0;
  if ((int)uVar3 < (int)uVar12) {
    if (puVar11 == (uint *)0x0) {
      puVar11 = (uint *)PTR_DAT_1403200a0;
    }
    local_res8 = puVar11;
    if ((int)uVar12 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar12 == 0) {
      FUN_14004f990(&local_res8);
    }
    else {
      uVar3 = uVar4;
      if ((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_1403200a0)) {
        uVar3 = puVar11[-2];
      }
      if (uVar12 != uVar3) {
        puVar7 = (uint *)FUN_140156940((longlong)(int)uVar12 * 2 + 10);
        if (puVar7 != (uint *)0x0) {
          *puVar7 = 0;
          puVar7[1] = 1;
        }
        *puVar7 = uVar12;
        uVar3 = uVar9;
        if ((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_1403200a0)) {
          uVar3 = puVar11[-2];
        }
        puVar10 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar12 < (int)uVar3) {
LAB_1401c94f4:
          if (puVar11 != (uint *)0x0) {
            puVar10 = puVar11;
          }
        }
        else {
          uVar12 = uVar4;
          if (puVar11 != (uint *)0x0) {
            if (puVar11 != (uint *)PTR_DAT_1403200a0) {
              uVar12 = puVar11[-2];
            }
            goto LAB_1401c94f4;
          }
        }
        FUN_140156770(puVar7 + 2,puVar10,uVar12);
        FUN_14004f990(&local_res8);
        local_res8 = puVar7 + 2;
      }
    }
  }
  FUN_14004f670(&local_res8);
  puVar11 = local_res8;
  puVar7 = local_res8;
  if (local_res8 == (uint *)0x0) {
    puVar7 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar7,L"Autoprune",uVar2);
  puVar7 = puVar11;
  if (puVar11 == (uint *)0x0) {
    puVar7 = (uint *)PTR_DAT_1403200a0;
  }
  uVar4 = FUN_140156740(puVar7);
  uVar2 = 0;
  if (0 < (int)uVar4) {
    uVar2 = uVar4;
  }
  uVar4 = uVar9;
  if ((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_1403200a0)) {
    uVar4 = puVar11[-2];
  }
  if (((int)uVar2 < (int)uVar4) || (uVar2 = uVar9, puVar11 == (uint *)0x0)) {
LAB_1401c9589:
    if (((puVar11 != (uint *)PTR_DAT_1403200a0) && (puVar11 != (uint *)0x0)) &&
       (puVar11 + -2 != (uint *)0x0)) {
      puVar11[-2] = uVar2;
      *(undefined2 *)((longlong)puVar11 + (longlong)(int)uVar2 * 2) = 0;
    }
  }
  else if (puVar11 != (uint *)PTR_DAT_1403200a0) {
    uVar2 = puVar11[-2];
    goto LAB_1401c9589;
  }
  FUN_1401c8a70(*(undefined8 *)(param_1 + 0x20),0xb,3,&local_res8);
  if (((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar11 + -2 != (uint *)0x0)) {
    uVar8 = FUN_1401568c0();
    FUN_140156b50(uVar8);
    puVar7 = puVar11 + -1;
    *puVar7 = *puVar7 - 1;
    if (*puVar7 == 0) {
      FUN_140156970(puVar11 + -2);
    }
    FUN_140156be0(uVar8);
  }
  puVar1 = *(ulonglong **)(*(longlong *)(param_1 + 0x20) + 0x5d0);
  if (puVar1 != (ulonglong *)0x0) {
    uVar13 = *puVar1;
  }
  FUN_1401d3870(uVar13,4);
LAB_1401c9629:
  FUN_140156be0(uVar5);
  return 1;
}



void FUN_1401c9650(longlong *param_1,double param_2,undefined8 param_3)

{
  longlong *plVar1;
  int *piVar2;
  longlong lVar3;
  undefined8 *puVar4;
  double dVar5;
  bool bVar6;
  DWORD DVar7;
  DWORD DVar8;
  undefined8 uVar9;
  undefined *puVar10;
  longlong *plVar11;
  undefined8 uVar12;
  char cVar13;
  undefined *puVar14;
  undefined *puVar15;
  undefined *local_res10;
  undefined8 local_res18;
  undefined *local_res20;
  undefined *local_168;
  undefined8 local_160;
  char local_158;
  longlong *local_150;
  undefined1 local_148;
  undefined *local_140;
  undefined *local_138;
  undefined *local_130;
  undefined *local_128;
  undefined *local_120;
  undefined *local_118;
  undefined8 local_110;
  undefined1 local_108;
  undefined8 local_100;
  undefined1 local_f8;
  undefined8 local_f0;
  undefined1 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  undefined1 local_d0;
  undefined8 local_c8;
  undefined1 local_c0;
  undefined8 local_b8;
  undefined1 local_b0;
  undefined8 local_a8;
  undefined1 local_a0;
  undefined8 local_98;
  undefined1 local_90;
  undefined *local_88;
  undefined1 local_80;
  undefined8 local_78;
  undefined1 local_70;
  
  local_e0 = 0xfffffffffffffffe;
  local_150 = param_1 + 0x95;
  local_res18 = param_3;
  FUN_140156b50();
  local_148 = 1;
  (**(code **)(param_1[1] + 0x18))();
  bVar6 = false;
  puVar15 = (undefined *)0x0;
  puVar14 = puVar15;
  if (param_1[0xad] != 0) {
    puVar14 = *(undefined **)(param_1[0xad] + 0x38);
  }
  FUN_140156b50(puVar14 + 0x10);
  puVar10 = puVar15;
  if (param_1[0xad] != 0) {
    puVar10 = *(undefined **)(param_1[0xad] + 0x38);
  }
  *(int *)(puVar10 + 0x288) = *(int *)(puVar10 + 0x288) + 1;
  LOCK();
  *(int *)(param_1 + 0xa2) = (int)param_1[0xa2] + 1;
  UNLOCK();
  FUN_140156be0(puVar14 + 0x10);
  DVar7 = GetTickCount();
  dVar5 = param_2 * 2.0 * 1000.0;
  if (dVar5 <= 100000.0) {
    dVar5 = 100000.0;
  }
  if (((char)param_1[0x2e4] != '\0') || ((int)param_1[0xcb] != 0)) {
    puVar14 = puVar15;
    if (param_1[0xad] != 0) {
      puVar14 = *(undefined **)(param_1[0xad] + 0x38);
    }
    puVar14 = puVar14 + 0x10;
    local_88 = puVar14;
    FUN_140156b50(puVar14);
    local_80 = 1;
    FUN_1401bdd00(param_1 + -0xe,0,&DAT_140274d40,(int)param_1[0x2a1]);
    FUN_140156be0(puVar14);
  }
  plVar1 = param_1 + -0xe;
  puVar14 = puVar15;
  do {
    uVar9 = (**(code **)(*plVar1 + 0x58))(plVar1);
    local_160 = uVar9;
    FUN_140156b50(uVar9);
    local_158 = '\x01';
    if (((longlong *)param_1[0xac] == (longlong *)0x0) ||
       (lVar3 = *(longlong *)param_1[0xac], lVar3 == 0)) {
      if ((((longlong *)param_1[0x2a0] != (longlong *)0x0) && (*(longlong *)param_1[0x2a0] != 0)) ||
         (((longlong *)param_1[0x296] != (longlong *)0x0 && (*(longlong *)param_1[0x296] != 0)))) {
        FUN_1401568c0();
        local_140 = PTR_DAT_1403200a0;
        plVar11 = (longlong *)FUN_140158700(&local_118);
        puVar14 = (undefined *)*plVar11;
        if ((undefined *)*plVar11 == (undefined *)0x0) {
          puVar14 = PTR_DAT_1403200a0;
        }
        FUN_14004ce50(&local_140,L"Unstability in Disconnect #1! Process=%s",puVar14);
        if (((local_118 != (undefined *)0x0) && (local_118 != PTR_DAT_1403200a0)) &&
           (local_118 + -8 != (undefined *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_b8 = uVar12;
          FUN_140156b50(uVar12);
          local_b0 = 1;
          piVar2 = (int *)(local_118 + -4);
          *piVar2 = *piVar2 + -1;
          if (*piVar2 == 0) {
            FUN_140156970(local_118 + -8);
          }
          FUN_140156be0(uVar12);
        }
        FUN_1401568c0();
        puVar14 = local_140;
        local_168 = PTR_DAT_1403200a0;
        if (PTR_DAT_1403200a0 == (undefined *)0x0) {
          local_168 = puVar15;
        }
        if (local_140 != PTR_DAT_1403200a0) {
          uVar12 = FUN_1401568c0();
          local_98 = uVar12;
          FUN_140156b50(uVar12);
          local_90 = 1;
          FUN_14004f990(&local_168);
          local_168 = puVar14;
          if (((puVar14 != PTR_DAT_1403200a0) && (puVar14 != (undefined *)0x0)) &&
             (puVar14 != (undefined *)0x8)) {
            *(int *)(puVar14 + -4) = *(int *)(puVar14 + -4) + 1;
          }
          FUN_140156be0(uVar12);
        }
        FUN_1401a7000(&local_168);
        if (((puVar14 != (undefined *)0x0) && (puVar14 != PTR_DAT_1403200a0)) &&
           (puVar14 + -8 != (undefined *)0x0)) {
          uVar12 = FUN_1401568c0();
          local_78 = uVar12;
          FUN_140156b50(uVar12);
          local_70 = 1;
          piVar2 = (int *)(puVar14 + -4);
          *piVar2 = *piVar2 + -1;
          if (*piVar2 == 0) {
            FUN_140156970(puVar14 + -8);
          }
          FUN_140156be0(uVar12);
        }
      }
      FUN_1401c65c0(plVar1,1);
      FUN_140156be0(uVar9);
LAB_1401c9e3d:
      FUN_140156be0(local_150);
      return;
    }
    if ((*(int *)(lVar3 + 0x100) == 5) && (param_1[0x2d5] == 0)) {
      FUN_1401c65c0(plVar1,1);
      FUN_140156be0(local_160);
      goto LAB_1401c9e3d;
    }
    if (DAT_140328940 != '\0') {
      FUN_1401c65c0(plVar1,1);
      FUN_140156be0(local_160);
      goto LAB_1401c9e3d;
    }
    puVar10 = puVar15;
    if (param_1[0xad] != 0) {
      puVar10 = *(undefined **)(param_1[0xad] + 0x38);
    }
    if (*(longlong *)(puVar10 + 0x2b8) == 0) {
      puVar14 = puVar15;
      if ((undefined8 *)param_1[0xac] != (undefined8 *)0x0) {
        puVar14 = *(undefined **)param_1[0xac];
      }
      FUN_1401d3870(puVar14,5);
      FUN_1401568c0();
      local_138 = PTR_DAT_1403200a0;
      plVar11 = (longlong *)FUN_140158700(&local_128);
      puVar14 = (undefined *)*plVar11;
      if ((undefined *)*plVar11 == (undefined *)0x0) {
        puVar14 = PTR_DAT_1403200a0;
      }
      FUN_14004ce50(&local_138,L"Unstability in Disconnect #2! Process=%s",puVar14);
      if (((local_128 != (undefined *)0x0) && (local_128 != PTR_DAT_1403200a0)) &&
         (local_128 + -8 != (undefined *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_100 = uVar9;
        FUN_140156b50(uVar9);
        local_f8 = 1;
        piVar2 = (int *)(local_128 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(local_128 + -8);
        }
        FUN_140156be0(uVar9);
      }
      FUN_1401568c0();
      puVar14 = local_138;
      local_res20 = PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        local_res20 = puVar15;
      }
      if (local_138 != PTR_DAT_1403200a0) {
        uVar9 = FUN_1401568c0();
        local_f0 = uVar9;
        FUN_140156b50(uVar9);
        local_e8 = 1;
        FUN_14004f990(&local_res20);
        local_res20 = puVar14;
        if (((puVar14 != PTR_DAT_1403200a0) && (puVar14 != (undefined *)0x0)) &&
           (puVar14 != (undefined *)0x8)) {
          *(int *)(puVar14 + -4) = *(int *)(puVar14 + -4) + 1;
        }
        FUN_140156be0(uVar9);
      }
      FUN_1401a7000(&local_res20);
      if (((puVar14 != (undefined *)0x0) && (puVar14 != PTR_DAT_1403200a0)) &&
         (puVar14 + -8 != (undefined *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_d8 = uVar9;
        FUN_140156b50(uVar9);
        local_d0 = 1;
        piVar2 = (int *)(puVar14 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(puVar14 + -8);
        }
        FUN_140156be0(uVar9);
      }
      FUN_1401c65c0(plVar1,1);
      FUN_140156be0(local_160);
      goto LAB_1401c9e3d;
    }
    DVar8 = GetTickCount();
    if (dVar5 < (double)(DVar8 - DVar7)) {
      FUN_1401568c0();
      local_130 = PTR_DAT_1403200a0;
      plVar11 = (longlong *)FUN_140158700(&local_120);
      puVar14 = (undefined *)*plVar11;
      if ((undefined *)*plVar11 == (undefined *)0x0) {
        puVar14 = PTR_DAT_1403200a0;
      }
      puVar10 = puVar15;
      if ((undefined8 *)param_1[0xac] != (undefined8 *)0x0) {
        puVar10 = *(undefined **)param_1[0xac];
      }
      FUN_14004ce50(&local_130,
                    L"CNetClient.Disconnect seems to be freezed ## State=%d##GarbageCount=%d##Process=%s"
                    ,*(undefined4 *)(puVar10 + 0x100),param_1[0x2d5],puVar14);
      if (((local_120 != (undefined *)0x0) && (local_120 != PTR_DAT_1403200a0)) &&
         (local_120 + -8 != (undefined *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_110 = uVar9;
        FUN_140156b50(uVar9);
        local_108 = 1;
        piVar2 = (int *)(local_120 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(local_120 + -8);
        }
        FUN_140156be0(uVar9);
      }
      FUN_1401568c0();
      puVar14 = local_130;
      local_res10 = PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        local_res10 = puVar15;
      }
      if (local_130 != PTR_DAT_1403200a0) {
        uVar9 = FUN_1401568c0();
        local_a8 = uVar9;
        FUN_140156b50(uVar9);
        local_a0 = 1;
        FUN_14004f990(&local_res10);
        local_res10 = puVar14;
        if (((puVar14 != PTR_DAT_1403200a0) && (puVar14 != (undefined *)0x0)) &&
           (puVar14 != (undefined *)0x8)) {
          *(int *)(puVar14 + -4) = *(int *)(puVar14 + -4) + 1;
        }
        FUN_140156be0(uVar9);
      }
      FUN_1401a7000(&local_res10);
      if ((undefined8 *)param_1[0xac] != (undefined8 *)0x0) {
        puVar15 = *(undefined **)param_1[0xac];
      }
      FUN_1401d3870(puVar15,5);
      FUN_1401c65c0(plVar1,1);
      if (((puVar14 != (undefined *)0x0) && (puVar14 != PTR_DAT_1403200a0)) &&
         (puVar14 + -8 != (undefined *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_c8 = uVar9;
        FUN_140156b50(uVar9);
        local_c0 = 1;
        piVar2 = (int *)(puVar14 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(puVar14 + -8);
        }
        FUN_140156be0(uVar9);
      }
      FUN_140156be0(local_160);
      goto LAB_1401c9e3d;
    }
    if (!bVar6) {
      bVar6 = true;
      puVar10 = puVar15;
      if (param_1[0xad] != 0) {
        puVar10 = *(undefined **)(param_1[0xad] + 0x38);
      }
      FUN_140156c80(puVar10 + 0x10);
      puVar10 = puVar15;
      if ((undefined8 *)param_1[0xac] != (undefined8 *)0x0) {
        puVar10 = *(undefined **)param_1[0xac];
      }
      puVar4 = (undefined8 *)param_1[0xac];
      if (*(int *)(puVar10 + 0x100) == 3) {
        puVar10 = puVar15;
        if (puVar4 != (undefined8 *)0x0) {
          puVar10 = (undefined *)*puVar4;
        }
        uVar9 = (**(code **)(*param_1 + 0x1c0))(param_1);
        *(undefined8 *)(puVar10 + 0xd0) = uVar9;
        puVar10 = puVar15;
        if ((undefined8 *)param_1[0xac] != (undefined8 *)0x0) {
          puVar10 = *(undefined **)param_1[0xac];
        }
        *(double *)(puVar10 + 0xd8) = param_2;
        (**(code **)(param_1[0x2f5] + 0x80))(param_1 + 0x2f5,1,&DAT_140328530,local_res18);
      }
      else {
        puVar10 = puVar15;
        if (puVar4 != (undefined8 *)0x0) {
          puVar10 = (undefined *)*puVar4;
        }
        if (*(int *)(puVar10 + 0x100) < 3) {
          puVar10 = puVar15;
          if ((undefined8 *)param_1[0xac] != (undefined8 *)0x0) {
            puVar10 = *(undefined **)param_1[0xac];
          }
          FUN_1401d3870(puVar10,4);
        }
      }
    }
    uVar9 = local_160;
    cVar13 = local_158;
    if (0 < (int)puVar14) {
      FUN_140156be0(local_160);
      Sleep(10);
      cVar13 = '\0';
    }
    puVar14 = (undefined *)(ulonglong)((int)puVar14 + 1);
    if (cVar13 != '\0') {
      FUN_140156be0(uVar9);
    }
  } while( true );
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401c9e70(longlong *param_1,undefined4 *param_2)

{
  char cVar1;
  undefined8 uVar2;
  undefined1 auStack_1b8 [32];
  undefined4 *local_198;
  undefined4 *local_190;
  char local_188;
  char local_187 [3];
  undefined4 local_184;
  undefined4 local_180 [2];
  undefined8 local_178;
  undefined1 local_168 [312];
  undefined8 local_30;
  ulonglong local_18;
  
  local_178 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_1b8;
  (**(code **)(param_1[0xf] + 0x18))();
  local_184 = 0;
  local_180[0] = 0;
  uVar2 = (**(code **)(*param_1 + 0x58))(param_1);
  FUN_1401ab470(local_168,uVar2);
  cVar1 = FUN_1401c4ba0(param_1,local_30);
  while (cVar1 != '\0') {
    local_187[0] = '\0';
    local_188 = '\0';
    local_190 = local_180;
    local_198 = &local_184;
    FUN_1401c0b10(param_1,local_30,local_187,&local_188);
    if (local_188 != '\0') {
      FUN_1401c6160(param_1,local_30);
    }
    if (local_187[0] != '\0') break;
    FUN_1401ab4b0(local_168);
    uVar2 = (**(code **)(*param_1 + 0x58))(param_1);
    FUN_1401ab470(local_168,uVar2);
    cVar1 = FUN_1401c4ba0(param_1,local_30);
  }
  FUN_1401ab4b0(local_168);
  if (param_2 != (undefined4 *)0x0) {
    *param_2 = local_184;
    param_2[1] = local_180[0];
  }
  return;
}



void FUN_1401c9fc0(longlong param_1,undefined4 param_2)

{
  int *piVar1;
  double dVar2;
  undefined8 *puVar3;
  char cVar4;
  undefined4 uVar5;
  uint uVar6;
  uint uVar7;
  uint uVar8;
  uint uVar9;
  int iVar10;
  undefined4 *puVar11;
  undefined4 *puVar12;
  longlong *plVar13;
  uint *puVar14;
  undefined8 uVar15;
  longlong *plVar16;
  longlong lVar17;
  uint *puVar18;
  longlong lVar19;
  uint *puVar20;
  longlong lVar21;
  uint uVar22;
  longlong lVar23;
  longlong lVar24;
  longlong lVar25;
  int iVar26;
  undefined *puVar27;
  undefined *puVar28;
  undefined *puVar29;
  undefined4 *puVar30;
  double dVar31;
  double dVar32;
  undefined8 *local_res8;
  undefined4 local_res10;
  uint *local_res18;
  undefined4 *local_res20;
  undefined **local_228;
  undefined4 local_220;
  undefined2 local_21c;
  undefined *local_218;
  undefined *local_210;
  undefined *local_208;
  undefined *local_200;
  undefined4 *local_1f8;
  undefined1 local_1f0;
  undefined *local_1e8;
  undefined *local_1e0;
  undefined4 local_1d8 [2];
  longlong local_1d0 [2];
  undefined8 local_1c0;
  undefined8 local_1b8;
  undefined **local_1b0;
  undefined8 local_1a8;
  undefined8 local_1a0;
  undefined8 local_198;
  undefined8 local_190;
  undefined8 local_188;
  longlong local_180;
  ulonglong local_178;
  undefined4 local_168;
  undefined **local_160;
  undefined8 local_158;
  undefined8 local_150;
  undefined8 local_148;
  undefined8 local_140;
  undefined **local_130;
  undefined4 local_128;
  undefined2 local_124;
  undefined **local_118;
  undefined8 local_110;
  undefined8 local_108;
  undefined8 local_100;
  undefined8 local_f8;
  undefined8 local_e8;
  undefined1 local_e0;
  undefined8 local_d8;
  undefined1 local_d0;
  undefined8 local_c8;
  undefined1 local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined1 local_a8;
  undefined8 local_a0;
  undefined1 local_98;
  undefined8 local_90;
  undefined1 local_88;
  undefined8 local_80;
  undefined1 local_78;
  undefined4 *local_70;
  
  local_b8 = 0xfffffffffffffffe;
  puVar30 = (undefined4 *)0x0;
  uVar8 = 0;
  puVar11 = puVar30;
  if (*(undefined8 **)(param_1 + 0x1570) != (undefined8 *)0x0) {
    puVar11 = (undefined4 *)**(undefined8 **)(param_1 + 0x1570);
  }
  if (*(char *)(puVar11 + 0x20) != '\x01') {
    return;
  }
  puVar11 = puVar30;
  if (*(undefined8 **)(param_1 + 0x1570) != (undefined8 *)0x0) {
    puVar11 = (undefined4 *)**(undefined8 **)(param_1 + 0x1570);
  }
  local_res10 = param_2;
  FUN_1401dc980(puVar11,0);
  local_1d0[0] = 0;
  local_1c0 = 0;
  local_1b8 = 0;
  local_1a8 = 0;
  local_1a0 = 0;
  local_198 = 0;
  local_190 = 0;
  local_1b0 = Proud::ByteArray::vftable;
  local_178 = 0;
  local_180 = 0;
  local_188 = 0;
  local_158 = 0;
  local_150 = 0;
  local_148 = 0;
  local_140 = 0;
  local_160 = Proud::ByteArray::vftable;
  local_130 = Proud::AddrPort::vftable;
  local_128 = 0;
  local_124 = 0;
  local_110 = 0;
  local_108 = 0;
  local_100 = 0;
  local_f8 = 0;
  local_118 = Proud::ByteArray::vftable;
  local_res20 = (undefined4 *)FUN_140156940(0x60);
  puVar11 = puVar30;
  if (local_res20 != (undefined4 *)0x0) {
    puVar11 = (undefined4 *)FUN_140181eb0(local_res20);
  }
  if (puVar11 == (undefined4 *)0x0) {
    local_res20 = (undefined4 *)0x0;
    puVar12 = puVar30;
  }
  else {
    puVar12 = (undefined4 *)FUN_140156940(0x48);
    local_70 = puVar12;
    if (puVar12 != (undefined4 *)0x0) {
      local_res20 = puVar12;
      uVar5 = FUN_14015a430();
      FUN_140156a70(puVar12,uVar5,1);
    }
    local_res20 = puVar12;
    FUN_140156b50(puVar12);
    *(undefined8 *)(puVar12 + 0x10) = 1;
    *(undefined4 **)(puVar12 + 0xe) = puVar11;
    FUN_140156be0(puVar12);
  }
  FUN_14016dca0(local_1d0,&local_res20);
  if (puVar12 != (undefined4 *)0x0) {
    local_1f8 = puVar12;
    FUN_140156b50(puVar12);
    local_1f0 = 1;
    plVar16 = (longlong *)(puVar12 + 0x10);
    *plVar16 = *plVar16 + -1;
    if (*plVar16 == 0) {
      FUN_140156be0(puVar12);
      local_1f0 = 0;
      FUN_14013c4c0(puVar12);
    }
    else {
      FUN_140156be0(puVar12);
      local_1f0 = 0;
    }
  }
  local_1d8[0] = 0xd;
  puVar11 = puVar30;
  if (local_1d0[0] != 0) {
    puVar11 = *(undefined4 **)(local_1d0[0] + 0x38);
  }
  *puVar11 = 0x1c;
  local_168 = 1;
  FUN_1401c5d30(param_1,local_1d8);
  puVar11 = puVar30;
  if (*(undefined8 **)(param_1 + 0x1570) != (undefined8 *)0x0) {
    puVar11 = (undefined4 *)**(undefined8 **)(param_1 + 0x1570);
  }
  puVar3 = *(undefined8 **)(param_1 + 0x1570);
  if ((int)puVar11[0x50] < DAT_140320cb8) {
    puVar11 = puVar30;
    if (puVar3 != (undefined8 *)0x0) {
      puVar11 = (undefined4 *)*puVar3;
    }
    *(undefined8 *)(puVar11 + 0x40) = DAT_140328930;
    puVar11 = puVar30;
    if (*(undefined8 **)(param_1 + 0x1570) != (undefined8 *)0x0) {
      puVar11 = (undefined4 *)**(undefined8 **)(param_1 + 0x1570);
    }
    puVar11[0x50] = puVar11[0x50] + 1;
  }
  else {
    puVar11 = puVar30;
    if (puVar3 != (undefined8 *)0x0) {
      puVar11 = (undefined4 *)*puVar3;
    }
    *(undefined8 *)(puVar11 + 0x40) = DAT_140320ca8;
  }
  if ((*(char *)(param_1 + 0x1790) == '\0') && (*(int *)(param_1 + 0x6c8) == 0)) goto LAB_1401ca912;
  FUN_1401bc870(param_1,&local_210);
  puVar11 = puVar30;
  if (*(undefined8 **)(param_1 + 0x1570) != (undefined8 *)0x0) {
    puVar11 = (undefined4 *)**(undefined8 **)(param_1 + 0x1570);
  }
  plVar16 = (longlong *)(param_1 + 0x70);
  dVar31 = (double)(**(code **)(*plVar16 + 0x1c0))(plVar16);
  dVar2 = *(double *)(puVar11 + 0x30);
  dVar32 = 0.0;
  if (((*(longlong **)(param_1 + 0x1520) != (longlong *)0x0) &&
      (lVar21 = **(longlong **)(param_1 + 0x1520), dVar32 = 0.0, lVar21 != 0)) &&
     (dVar32 = 0.0, lVar21 != 0x40)) {
    puVar11 = (undefined4 *)(lVar21 + -0x40);
    if (lVar21 == 0) {
      puVar11 = puVar30;
    }
    dVar32 = (double)(**(code **)(*plVar16 + 0x1c0))(plVar16);
    dVar32 = dVar32 - *(double *)(puVar11 + 0x60);
  }
  if (((*(longlong **)(param_1 + 0x1520) == (longlong *)0x0) ||
      (lVar21 = **(longlong **)(param_1 + 0x1520), lVar21 == 0)) || (lVar21 == 0x40)) {
    local_220 = DAT_140320450;
    local_21c = DAT_140320454;
  }
  else {
    puVar11 = puVar30;
    if (lVar21 != 0) {
      puVar11 = (undefined4 *)(lVar21 + -0x40);
    }
    local_220 = puVar11[0x4c];
    local_21c = *(undefined2 *)(puVar11 + 0x4d);
  }
  local_228 = Proud::AddrPort::vftable;
  plVar13 = (longlong *)FUN_140159580(&local_228,&local_200);
  puVar27 = (undefined *)*plVar13;
  if ((undefined *)*plVar13 == (undefined *)0x0) {
    puVar27 = PTR_DAT_1403200a0;
  }
  FUN_1401568c0();
  puVar20 = (uint *)PTR_DAT_1403200a0;
  local_res18 = (uint *)PTR_DAT_1403200a0;
  uVar6 = FUN_140156740(puVar27);
  puVar11 = puVar30;
  if ((puVar20 != (uint *)0x0) &&
     (puVar11 = (undefined4 *)0x0, puVar20 != (uint *)PTR_DAT_1403200a0)) {
    puVar11 = (undefined4 *)(ulonglong)*(uint *)((longlong)puVar20 + -8);
  }
  uVar9 = 0;
  uVar7 = uVar6;
  if ((((int)uVar6 <= (int)puVar11) && (uVar7 = uVar8, puVar20 != (uint *)0x0)) &&
     (uVar7 = uVar9, puVar20 != (uint *)PTR_DAT_1403200a0)) {
    uVar7 = *(uint *)((longlong)puVar20 + -8);
  }
  uVar22 = 1;
  if (1 < (int)uVar7) {
    uVar22 = uVar7;
  }
  uVar7 = uVar9;
  if ((puVar20 != (uint *)0x0) && (puVar20 != (uint *)PTR_DAT_1403200a0)) {
    uVar7 = *(uint *)((longlong)puVar20 + -8);
  }
  if ((int)uVar7 < (int)uVar22) {
    if (puVar20 == (uint *)0x0) {
      puVar20 = (uint *)PTR_DAT_1403200a0;
    }
    local_res18 = puVar20;
    if ((int)uVar22 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar22 == 0) {
      FUN_14004f990(&local_res18);
    }
    else {
      uVar7 = uVar9;
      if ((puVar20 != (uint *)0x0) && (puVar20 != (uint *)PTR_DAT_1403200a0)) {
        uVar7 = puVar20[-2];
      }
      if (uVar22 != uVar7) {
        puVar14 = (uint *)FUN_140156940((longlong)(int)uVar22 * 2 + 10);
        if (puVar14 != (uint *)0x0) {
          *puVar14 = 0;
          puVar14[1] = 1;
        }
        *puVar14 = uVar22;
        uVar7 = uVar9;
        if ((puVar20 != (uint *)0x0) && (puVar20 != (uint *)PTR_DAT_1403200a0)) {
          uVar7 = puVar20[-2];
        }
        puVar18 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar22 < (int)uVar7) {
LAB_1401ca45a:
          if (puVar20 != (uint *)0x0) {
            puVar18 = puVar20;
          }
        }
        else {
          uVar22 = uVar8;
          if (puVar20 != (uint *)0x0) {
            if (puVar20 != (uint *)PTR_DAT_1403200a0) {
              uVar22 = puVar20[-2];
            }
            goto LAB_1401ca45a;
          }
        }
        FUN_140156770(puVar14 + 2,puVar18,uVar22);
        FUN_14004f990(&local_res18);
        local_res18 = puVar14 + 2;
      }
    }
  }
  FUN_14004f670(&local_res18);
  puVar20 = local_res18;
  puVar14 = local_res18;
  if (local_res18 == (uint *)0x0) {
    puVar14 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar14,puVar27,uVar6);
  puVar14 = puVar20;
  if (puVar20 == (uint *)0x0) {
    puVar14 = (uint *)PTR_DAT_1403200a0;
  }
  uVar8 = FUN_140156740(puVar14);
  puVar11 = puVar30;
  if (0 < (int)uVar8) {
    puVar11 = (undefined4 *)(ulonglong)uVar8;
  }
  if ((puVar20 != (uint *)0x0) && (puVar20 != (uint *)PTR_DAT_1403200a0)) {
    uVar9 = puVar20[-2];
  }
  if (((int)puVar11 < (int)uVar9) || (puVar11 = puVar30, puVar20 == (uint *)0x0)) {
LAB_1401ca4f6:
    if (((puVar20 != (uint *)PTR_DAT_1403200a0) && (puVar20 != (uint *)0x0)) &&
       (puVar20 + -2 != (uint *)0x0)) {
      puVar20[-2] = (uint)puVar11;
      *(undefined2 *)((longlong)puVar20 + (longlong)(int)(uint)puVar11 * 2) = 0;
    }
  }
  else if (puVar20 != (uint *)PTR_DAT_1403200a0) {
    puVar11 = (undefined4 *)(ulonglong)puVar20[-2];
    goto LAB_1401ca4f6;
  }
  if (((local_200 != (undefined *)0x0) && (local_200 != PTR_DAT_1403200a0)) &&
     (local_200 + -8 != (undefined *)0x0)) {
    uVar15 = FUN_1401568c0();
    local_a0 = uVar15;
    FUN_140156b50(uVar15);
    local_98 = 1;
    piVar1 = (int *)(local_200 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_200 + -8);
    }
    FUN_140156be0(uVar15);
  }
  if (puVar20 == (uint *)0x0) {
    puVar20 = (uint *)PTR_DAT_1403200a0;
  }
  puVar27 = local_210;
  if (local_210 == (undefined *)0x0) {
    puVar27 = PTR_DAT_1403200a0;
  }
  local_res8 = (undefined8 *)((ulonglong)local_res8 & 0xffffffffffffff00);
  local_200 = PTR_DAT_1403200a0;
  cVar4 = (**(code **)(*plVar16 + 0x158))(plVar16,&local_res8);
  iVar26 = 1;
  if (cVar4 != '\0') {
    iVar26 = 1;
    if ((char)local_res8 == '\0') {
      iVar26 = 2;
    }
  }
  plVar16 = (longlong *)(**(code **)(*plVar16 + 0xb0))(plVar16,&local_1e8);
  puVar28 = (undefined *)*plVar16;
  if (puVar28 == (undefined *)0x0) {
    iVar10 = 0;
  }
  else if (puVar28 == PTR_DAT_1403200a0) {
    iVar10 = 0;
  }
  else {
    iVar10 = *(int *)(puVar28 + -8);
  }
  if (((local_1e8 != (undefined *)0x0) && (local_1e8 != PTR_DAT_1403200a0)) &&
     (local_1e8 + -8 != (undefined *)0x0)) {
    uVar15 = FUN_1401568c0();
    local_e8 = uVar15;
    FUN_140156b50(uVar15);
    local_e0 = 1;
    piVar1 = (int *)(local_1e8 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_1e8 + -8);
    }
    FUN_140156be0(uVar15);
  }
  if (iVar10 != 0) {
    iVar26 = iVar26 + 1;
  }
  FUN_1401568c0();
  local_218 = PTR_DAT_1403200a0;
  plVar16 = (longlong *)FUN_140158700(&local_1e0);
  plVar13 = (longlong *)(**(code **)(*(longlong *)(param_1 + 0x70) + 0xb0))();
  puVar28 = (undefined *)*plVar16;
  if ((undefined *)*plVar16 == (undefined *)0x0) {
    puVar28 = PTR_DAT_1403200a0;
  }
  puVar29 = (undefined *)*plVar13;
  if ((undefined *)*plVar13 == (undefined *)0x0) {
    puVar29 = PTR_DAT_1403200a0;
  }
  plVar16 = *(longlong **)(param_1 + 0x1570);
  if (plVar16 == (longlong *)0x0) {
    lVar21 = 0;
    lVar25 = 0;
    lVar24 = 0;
  }
  else {
    lVar21 = *plVar16;
    lVar25 = *plVar16;
    lVar24 = *plVar16;
  }
  lVar17 = *(longlong *)(param_1 + 0x5d8);
  if (lVar17 == 0) {
    lVar23 = 0;
    lVar19 = 0;
    lVar17 = 0;
  }
  else {
    lVar23 = *(longlong *)(lVar17 + 0x38);
    lVar19 = *(longlong *)(lVar17 + 0x38);
    lVar17 = *(longlong *)(lVar17 + 0x38);
  }
  FUN_14004ce50(&local_218,
                L"(first chance) to-server UDP punch lost##Reason:%d##CliInstCount=%d##RecentElapTime=%3.3f##DisconnedCount=%d##recv count=%d##last ok recv interval=%3.3f##Recurred:%d##LocalIP:%s##UDP kept time:%3.3f##Time diff since RecvIssue:%3.3f##NAT name=%s##%s##Process=%s"
                ,local_res10,*(undefined4 *)(lVar17 + 0x2a8),*(undefined8 *)(lVar19 + 0x180),
                *(undefined4 *)(lVar23 + 0x288),*(undefined4 *)(lVar24 + 0x1c0),
                *(undefined8 *)(lVar25 + 0x200),*(undefined4 *)(lVar21 + 0x140),puVar20,
                dVar31 - dVar2,dVar32,puVar29,puVar27,puVar28);
  if (((local_208 != (undefined *)0x0) && (local_208 != PTR_DAT_1403200a0)) &&
     (local_208 + -8 != (undefined *)0x0)) {
    uVar15 = FUN_1401568c0();
    local_80 = uVar15;
    FUN_140156b50(uVar15);
    local_78 = 1;
    piVar1 = (int *)(local_208 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_208 + -8);
    }
    FUN_140156be0(uVar15);
  }
  local_208 = PTR_DAT_1403200a0;
  if (((local_1e0 != (undefined *)0x0) && (local_1e0 != PTR_DAT_1403200a0)) &&
     (local_1e0 + -8 != (undefined *)0x0)) {
    uVar15 = FUN_1401568c0();
    local_d8 = uVar15;
    FUN_140156b50(uVar15);
    local_d0 = 1;
    piVar1 = (int *)(local_1e0 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_1e0 + -8);
    }
    FUN_140156be0(uVar15);
  }
  puVar27 = local_218;
  FUN_1401be250(param_1,iVar26,&DAT_140294c90,local_218);
  if (((puVar27 != (undefined *)0x0) && (puVar27 != PTR_DAT_1403200a0)) &&
     (puVar27 + -8 != (undefined *)0x0)) {
    uVar15 = FUN_1401568c0();
    local_c8 = uVar15;
    FUN_140156b50(uVar15);
    local_c0 = 1;
    piVar1 = (int *)(puVar27 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar27 + -8);
    }
    FUN_140156be0(uVar15);
  }
  puVar20 = local_res18;
  if (((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar14 = local_res18 + -2, puVar14 != (uint *)0x0)) {
    uVar15 = FUN_1401568c0();
    local_b0 = uVar15;
    FUN_140156b50(uVar15);
    local_a8 = 1;
    puVar20 = puVar20 + -1;
    *puVar20 = *puVar20 - 1;
    if (*puVar20 == 0) {
      FUN_140156970(puVar14);
    }
    FUN_140156be0(uVar15);
  }
  if (((local_210 != (undefined *)0x0) && (local_210 != PTR_DAT_1403200a0)) &&
     (local_210 + -8 != (undefined *)0x0)) {
    uVar15 = FUN_1401568c0();
    local_90 = uVar15;
    FUN_140156b50(uVar15);
    local_88 = 1;
    piVar1 = (int *)(local_210 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(local_210 + -8);
    }
    FUN_140156be0(uVar15);
  }
LAB_1401ca912:
  (**(code **)(*(longlong *)(param_1 + 0x1818) + 0x50))
            ((longlong *)(param_1 + 0x1818),1,&DAT_140328530);
  FUN_1401858d0(&local_118);
  FUN_1401858d0(&local_160);
  local_res8 = &local_188;
  FUN_1401560e0(&local_188);
  if (local_180 != 0) {
    if ((longlong)local_178 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_178 = local_178 & 0xffffffff00000000;
  }
  FUN_1401858d0(&local_1b0);
  FUN_140174710(&local_1b8);
  FUN_140174690(&local_1c0);
  FUN_14013c530(local_1d0);
  return;
}



void FUN_1401ca9c0(longlong *param_1,undefined8 param_2)

{
  char cVar1;
  longlong lVar2;
  
  if (((double)param_1[699] != -1.0) && (cVar1 = FUN_14018afa0(param_1 + 0x2b6), cVar1 == '\0')) {
    lVar2 = (**(code **)(*param_1 + 0x1c0))(param_1);
    param_1[699] = lVar2;
  }
  FUN_1401c6200(param_1 + -0xe);
  FUN_1401c9e70(param_1 + -0xe,param_2);
  return;
}



void FUN_1401caa30(undefined8 param_1,undefined4 param_2,undefined4 param_3)

{
  longlong *plVar1;
  undefined4 uVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  undefined8 *local_res20;
  undefined4 local_128 [2];
  longlong local_120 [2];
  undefined8 local_110;
  undefined8 local_108;
  undefined **local_100;
  undefined8 local_f8;
  undefined8 local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  longlong local_d0;
  ulonglong local_c8;
  undefined4 local_b8;
  undefined **local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined **local_80;
  undefined4 local_78;
  undefined2 local_74;
  undefined **local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  puVar5 = (undefined8 *)0x0;
  local_120[0] = 0;
  local_110 = 0;
  local_108 = 0;
  local_f8 = 0;
  local_f0 = 0;
  local_e8 = 0;
  local_e0 = 0;
  local_100 = Proud::ByteArray::vftable;
  local_c8 = 0;
  local_d0 = 0;
  local_d8 = 0;
  local_a8 = 0;
  local_a0 = 0;
  local_98 = 0;
  local_90 = 0;
  local_b0 = Proud::ByteArray::vftable;
  local_80 = Proud::AddrPort::vftable;
  local_78 = 0;
  local_74 = 0;
  local_60 = 0;
  local_58 = 0;
  local_50 = 0;
  local_48 = 0;
  local_68 = Proud::ByteArray::vftable;
  local_res20 = (undefined8 *)FUN_140156940(0x60);
  puVar3 = puVar5;
  if (local_res20 != (undefined8 *)0x0) {
    puVar3 = (undefined8 *)FUN_140181eb0(local_res20);
  }
  if (puVar3 == (undefined8 *)0x0) {
    local_res20 = (undefined8 *)0x0;
    puVar4 = puVar5;
  }
  else {
    puVar4 = (undefined8 *)FUN_140156940(0x48);
    if (puVar4 != (undefined8 *)0x0) {
      local_res20 = puVar4;
      uVar2 = FUN_14015a430();
      FUN_140156a70(puVar4,uVar2,1);
    }
    local_res20 = puVar4;
    FUN_140156b50(puVar4);
    puVar4[8] = 1;
    puVar4[7] = puVar3;
    FUN_140156be0(puVar4);
  }
  FUN_14016dca0(local_120,&local_res20);
  if (puVar4 != (undefined8 *)0x0) {
    FUN_140156b50(puVar4);
    plVar1 = puVar4 + 8;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      FUN_140156be0(puVar4);
      FUN_14013c4c0(puVar4);
    }
    else {
      FUN_140156be0(puVar4);
    }
  }
  local_128[0] = 0xb;
  if (local_120[0] != 0) {
    puVar5 = *(undefined8 **)(local_120[0] + 0x38);
  }
  *(undefined4 *)puVar5 = param_3;
  local_b8 = param_2;
  FUN_1401c5d30(param_1,local_128);
  FUN_1401858d0(&local_68);
  FUN_1401858d0(&local_b0);
  local_res20 = &local_d8;
  FUN_1401560e0(&local_d8);
  if (local_d0 != 0) {
    if ((longlong)local_c8 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_c8 = local_c8 & 0xffffffff00000000;
  }
  FUN_1401858d0(&local_100);
  FUN_140174710(&local_108);
  FUN_140174690(&local_110);
  FUN_14013c530(local_120);
  return;
}



longlong FUN_1401cac60(void)

{
  void *pvVar1;
  longlong lVar2;
  
  pvVar1 = operator_new(0x1900);
  lVar2 = 0;
  if (pvVar1 != (void *)0x0) {
    lVar2 = FUN_1401c81e0(pvVar1);
  }
  if (lVar2 != 0) {
    lVar2 = lVar2 + 0x70;
  }
  return lVar2;
}



void FUN_1401caca0(longlong param_1)

{
  longlong lVar1;
  longlong lVar2;
  double dVar3;
  
  dVar3 = (double)(**(code **)(*(longlong *)(param_1 + 0x70) + 0x1c0))(param_1 + 0x70);
  lVar2 = 0;
  lVar1 = lVar2;
  if (*(longlong **)(param_1 + 0x1570) != (longlong *)0x0) {
    lVar1 = **(longlong **)(param_1 + 0x1570);
  }
  if (*(char *)(lVar1 + 0x80) != '\0') {
    if (*(longlong **)(param_1 + 0x1570) != (longlong *)0x0) {
      lVar2 = **(longlong **)(param_1 + 0x1570);
    }
    if (DAT_140320d28 * 10.0 < dVar3 - *(double *)(lVar2 + 0x180)) {
      FUN_1401c9fc0(param_1,0x1c);
    }
  }
  return;
}



void FUN_1401cad20(longlong *param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong *plVar4;
  undefined8 uVar5;
  longlong lVar6;
  undefined1 local_res8 [8];
  
  local_res8[0] = 0;
  iVar1 = (**(code **)(*param_1 + 0x108))(param_1,local_res8,param_3,param_4,0xfffffffffffffffe);
  if (iVar1 == 2) {
    uVar2 = (**(code **)(param_1[-0xe] + 0x58))(param_1 + -0xe);
    FUN_140156b50(uVar2);
    if (param_2 == 1) {
      FUN_1401b1ec0(param_1 + -0xe,0x1e);
    }
    else if (param_2 == 2) {
      FUN_1401c9fc0(param_1 + -0xe,0x1e);
    }
    else if (param_2 == 3) {
      (**(code **)(param_1[1] + 0x10))();
      plVar4 = (longlong *)param_1[0x296];
      if ((((plVar4 != (longlong *)0x0) && (*plVar4 != 0)) && (plVar4 != (longlong *)0x0)) &&
         ((*plVar4 != 0 && (*plVar4 != 0x40)))) {
        plVar4 = (longlong *)param_1[0x296];
        if (((plVar4 == (longlong *)0x0) || ((*plVar4 == 0 || (plVar4 == (longlong *)0x0)))) ||
           (*plVar4 == 0)) {
          lVar3 = 0;
        }
        else {
          lVar3 = *plVar4 + -0x40;
        }
        uVar5 = 0;
        if (*(undefined8 **)(lVar3 + 0x100) != (undefined8 *)0x0) {
          uVar5 = **(undefined8 **)(lVar3 + 0x100);
        }
        FUN_1401855c0(uVar5);
      }
      if (param_1[0x2c0] == 0) {
        lVar3 = 0;
      }
      else {
        lVar3 = param_1[0x2be];
      }
      for (; lVar3 != 0; lVar3 = *(longlong *)(lVar3 + 0x10)) {
        lVar6 = 0;
        if (*(longlong **)(lVar3 + 8) != (longlong *)0x0) {
          lVar6 = **(longlong **)(lVar3 + 8);
        }
        if ((*(longlong **)(lVar6 + 0x18) != (longlong *)0x0) &&
           (**(longlong **)(lVar6 + 0x18) != 0)) {
          plVar4 = (longlong *)FUN_1401e36b0();
          (**(code **)(*plVar4 + 0x10))(plVar4);
        }
      }
    }
    FUN_140156be0(uVar2);
  }
  return;
}



undefined8 FUN_1401cae90(longlong param_1)

{
  undefined8 uVar1;
  
  uVar1 = (**(code **)(**(longlong **)(param_1 + 0x20) + 0x58))();
  FUN_140156b50(uVar1);
  FUN_1401caca0(*(undefined8 *)(param_1 + 0x20));
  FUN_140156be0(uVar1);
  return 1;
}



undefined8 * FUN_1401caef0(undefined8 *param_1,undefined8 param_2,undefined2 param_3)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(param_1 + 0xe,uVar1,1);
  *param_1 = param_2;
  param_1[0xd] = 0;
  param_1[9] = 0;
  param_1[10] = 0;
  param_1[0xb] = 0;
  *(undefined4 *)(param_1 + 8) = 2;
  *(undefined2 *)(param_1 + 0xc) = param_3;
  *(undefined1 *)(param_1 + 0x15) = 0;
  return param_1;
}



void FUN_1401caf60(longlong param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001401caf67. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(**(longlong **)(param_1 + 8) + 0x18))();
  return;
}



ulonglong FUN_1401caf70(longlong param_1)

{
  int *piVar1;
  int iVar2;
  ulonglong uVar3;
  int iVar4;
  LPVOID pvVar5;
  
  if (*(int *)(param_1 + 0x14) == 0) {
    return 0;
  }
  pvVar5 = TlsGetValue(DAT_14032b2b8);
  iVar4 = DAT_14032b2b0;
  if (pvVar5 == (LPVOID)0x0) {
    LOCK();
    piVar1 = (int *)(param_1 + 0x40);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + 1;
    UNLOCK();
    uVar3 = (longlong)(iVar2 + 1) % (longlong)iVar4;
    TlsSetValue(DAT_14032b2b8,(LPVOID)((longlong)(int)uVar3 + 1));
    return uVar3 & 0xffffffff;
  }
  return (longlong)pvVar5 - 1U & 0xffffffff;
}



undefined2 * FUN_1401caff0(longlong *param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  char cVar3;
  undefined2 *puVar4;
  bool bVar5;
  undefined8 uVar6;
  longlong *plVar7;
  undefined1 uVar8;
  
  uVar6 = 0xfffffffffffffffe;
  if ((int)param_1[8] == 2) {
    bVar5 = *(int *)(*param_1 + 0x14) != 0;
    plVar1 = param_1 + 0xe;
    plVar7 = plVar1;
    if (bVar5) {
      FUN_140156b50();
    }
    *(undefined1 *)(param_1 + 0x15) = 1;
    uVar8 = bVar5;
    if (((*(int *)(*param_1 + 0x14) == 0) && (*(longlong *)(*param_1 + 0x18) != 0)) &&
       (cVar3 = FUN_140156c80(), cVar3 == '\0')) {
      FUN_1401580e0();
    }
    if (param_2 != 0) {
      if (param_1[0xd] == 0) {
        param_1[0xd] = param_2;
      }
      else if (param_1[0xd] != param_2) {
        *(undefined1 *)(param_1 + 0x15) = 0;
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      lVar2 = param_1[9];
      if (lVar2 == 0) {
        puVar4 = (undefined2 *)
                 (**(code **)**(undefined8 **)(*param_1 + 8))
                           (*(undefined8 **)(*param_1 + 8),param_2 + 0x20,param_3,param_4,uVar6,
                            plVar7,uVar8);
        if (puVar4 != (undefined2 *)0x0) {
          puVar4[0xc] = 0;
          *(undefined8 *)(puVar4 + 8) = 0;
          *puVar4 = 0x10e1;
        }
        *(longlong *)(puVar4 + 4) = param_1[0xd];
        puVar4[0xc] = (short)param_1[0xc];
        param_1[0xb] = param_1[0xb] + 1;
        *(undefined1 *)(param_1 + 0x15) = 0;
        if (!bVar5) {
          return puVar4 + 0x10;
        }
        FUN_140156be0(plVar1);
        return puVar4 + 0x10;
      }
      param_1[9] = *(longlong *)(lVar2 + 0x10);
      *(undefined8 *)(lVar2 + 0x10) = 0;
      *(short *)(lVar2 + 0x18) = (short)param_1[0xc];
      param_1[10] = param_1[10] + -1;
      *(undefined1 *)(param_1 + 0x15) = 0;
      if (!bVar5) {
        return (undefined2 *)(lVar2 + 0x20);
      }
      FUN_140156be0(plVar1);
      return (undefined2 *)(lVar2 + 0x20);
    }
    *(undefined1 *)(param_1 + 0x15) = 0;
    if (bVar5) {
      FUN_140156be0(plVar1);
    }
  }
  else {
    FUN_1401580e0(L"CLookasideAllocator.Alloc() is called after the allocator is already disposed!")
    ;
  }
  return (undefined2 *)0x0;
}



void FUN_1401cb180(longlong *param_1,longlong param_2)

{
  char cVar1;
  bool bVar2;
  
  if ((int)param_1[8] != 2) {
    FUN_1401580e0(
                 L"CLookasideAllocator.Free() is called after the allocator is already disposed! Doing Free before WinMain returns in highly recommended."
                 );
  }
  bVar2 = *(int *)(*param_1 + 0x14) != 0;
  if (bVar2) {
    FUN_140156b50(param_1 + 0xe);
  }
  *(undefined1 *)(param_1 + 0x15) = 1;
  if ((*(int *)(*param_1 + 0x14) == 0) && (*(longlong *)(*param_1 + 0x18) != 0)) {
    cVar1 = FUN_140156c80();
    if (cVar1 == '\0') {
      FUN_1401580e0(L"Unsafe heap accessor with thread unsafety is detected!");
    }
  }
  if (*(longlong *)(param_2 + 0x10) == 0) {
    *(longlong *)(param_2 + 0x10) = param_1[9];
    param_1[9] = param_2;
    param_1[10] = param_1[10] + 1;
  }
  else {
    FUN_1401580e0(
                 L"Not a CLookasideAllocator or owner CFastHeap allocated block! Refer to technical notes for more help."
                 );
    *(undefined1 *)(param_1 + 0x15) = 0;
  }
  *(undefined1 *)(param_1 + 0x15) = 0;
  if (bVar2) {
    FUN_140156be0(param_1 + 0xe);
  }
  return;
}



void FUN_1401cb270(longlong *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  
  plVar1 = param_1 + 0xe;
  FUN_140156b80(plVar1);
  *(undefined4 *)(param_1 + 8) = 3;
  lVar2 = param_1[9];
  while (lVar2 != 0) {
    lVar2 = param_1[9];
    param_1[9] = *(longlong *)(lVar2 + 0x10);
    *(undefined8 *)(lVar2 + 0x10) = 0;
    (**(code **)(**(longlong **)(*param_1 + 8) + 0x10))();
    lVar2 = param_1[9];
  }
  FUN_140156be0(plVar1);
  FUN_140156c00(plVar1);
  return;
}



void FUN_1401cb310(longlong param_1,undefined8 param_2)

{
  int iVar1;
  
  iVar1 = FUN_1401caf70();
  FUN_1401caff0(*(undefined8 *)(*(longlong *)(param_1 + 0x48) + (longlong)iVar1 * 8),param_2);
  return;
}



void FUN_1401cb350(longlong param_1,longlong param_2)

{
  longlong lVar1;
  
  if ((param_2 != 0) && (*(short *)(param_2 + -0x20) == 0x10e1)) {
    lVar1 = *(longlong *)(*(longlong *)(param_1 + 0x48) + (ulonglong)*(ushort *)(param_2 + -8) * 8);
    if ((*(ushort *)(param_2 + -8) < DAT_14032b2b0) &&
       (*(longlong *)(lVar1 + 0x68) == *(longlong *)(param_2 + -0x18))) {
      FUN_1401cb180(lVar1,param_2 + -0x20);
      return;
    }
  }
  FUN_1401580e0(
               L"Not a CLookasideAllocator or owner CFastHeap allocated block! Refer to technical notes for more help."
               );
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401cb3a0(void)

{
  undefined4 uVar1;
  DWORD DVar2;
  
  if ((DAT_14032b2f8 & 1) == 0) {
    DAT_14032b2f8 = DAT_14032b2f8 | 1;
    uVar1 = FUN_14015a430();
    FUN_140156a70(&DAT_14032b2c0,uVar1,1);
    atexit((_func_5014 *)&LAB_140258170);
  }
  FUN_140156b50(&DAT_14032b2c0);
  if (DAT_14032b2b0 == 0) {
    DAT_14032b2b0 = FUN_140157f20();
  }
  if (_DAT_14032b2b8 == 0) {
    DVar2 = TlsAlloc();
    _DAT_14032b2b8 = (ulonglong)DVar2;
  }
  FUN_140156be0(&DAT_14032b2c0);
  return;
}



undefined8 * FUN_1401cb440(undefined8 *param_1,longlong *param_2)

{
  longlong *plVar1;
  undefined4 uVar2;
  longlong lVar3;
  void *pvVar4;
  undefined8 *puVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  ushort uVar8;
  
  FUN_14019c9d0();
  *param_1 = Proud::CLookasideAllocatorImpl::vftable;
  plVar1 = param_1 + 1;
  FUN_14019c9e0(plVar1);
  FUN_1401cb3a0(param_1);
  puVar5 = (undefined8 *)0x0;
  *(undefined4 *)(param_1 + 8) = 0;
  *plVar1 = *param_2;
  param_1[2] = param_2[1];
  param_1[3] = param_2[2];
  if (DAT_1403288ed != '\0') {
    *(undefined4 *)((longlong)param_1 + 0x14) = 1;
  }
  if (*plVar1 == 0) {
    lVar3 = FUN_1401842a0();
    *plVar1 = lVar3;
  }
  if (*(int *)((longlong)param_1 + 0x14) == 0) {
    pvVar4 = malloc(8);
    param_1[9] = pvVar4;
    pvVar4 = operator_new(0xc0);
    if (pvVar4 != (void *)0x0) {
      puVar5 = (undefined8 *)FUN_1401caef0(pvVar4,param_1,0);
    }
    *(undefined8 **)param_1[9] = puVar5;
  }
  else {
    pvVar4 = malloc((ulonglong)DAT_14032b2b0 << 3);
    param_1[9] = pvVar4;
    uVar8 = 0;
    if (DAT_14032b2b0 != 0) {
      do {
        puVar6 = operator_new(0xc0);
        puVar7 = puVar5;
        if (puVar6 != (undefined8 *)0x0) {
          uVar2 = FUN_14015a430();
          FUN_140156a70(puVar6 + 0xe,uVar2,1);
          *puVar6 = param_1;
          puVar6[0xd] = 0;
          *(undefined4 *)(puVar6 + 8) = 2;
          puVar6[9] = 0;
          puVar6[10] = 0;
          puVar6[0xb] = 0;
          *(ushort *)(puVar6 + 0xc) = uVar8;
          *(undefined1 *)(puVar6 + 0x15) = 0;
          puVar7 = puVar6;
        }
        *(undefined8 **)(param_1[9] + (ulonglong)uVar8 * 8) = puVar7;
        uVar8 = uVar8 + 1;
      } while (uVar8 < DAT_14032b2b0);
    }
  }
  return param_1;
}



void FUN_1401cb5b0(undefined8 *param_1)

{
  void *pvVar1;
  uint uVar2;
  ushort uVar3;
  
  *param_1 = Proud::CLookasideAllocatorImpl::vftable;
  if (*(int *)((longlong)param_1 + 0x14) == 0) {
    pvVar1 = *(void **)param_1[9];
    if (pvVar1 != (void *)0x0) {
      FUN_1401cb270(pvVar1);
      operator_delete(pvVar1);
    }
  }
  else {
    uVar3 = 0;
    uVar2 = DAT_14032b2b0;
    if (DAT_14032b2b0 != 0) {
      do {
        pvVar1 = *(void **)(param_1[9] + (ulonglong)uVar3 * 8);
        if (pvVar1 != (void *)0x0) {
          FUN_1401cb270(pvVar1);
          operator_delete(pvVar1);
          uVar2 = DAT_14032b2b0;
        }
        uVar3 = uVar3 + 1;
      } while (uVar3 < uVar2);
    }
  }
  free((void *)param_1[9]);
  FUN_14019c990(param_1);
  return;
}



undefined8 FUN_1401cb670(undefined8 param_1,uint param_2)

{
  FUN_1401cb5b0();
  if ((param_2 & 1) != 0) {
    FUN_140156970(param_1);
  }
  return param_1;
}



undefined8 * FUN_1401cb6a0(undefined8 *param_1)

{
  *param_1 = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 1) = 0;
  *(undefined2 *)((longlong)param_1 + 0xc) = 0;
  param_1[2] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 3) = 0;
  *(undefined2 *)((longlong)param_1 + 0x1c) = 0;
  param_1[4] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 5) = 0;
  *(undefined2 *)((longlong)param_1 + 0x2c) = 0;
  FUN_14019d7a0(param_1 + 7);
  FUN_1401568c0();
  param_1[0x13] = PTR_DAT_1403200a0;
  *(undefined1 *)((longlong)param_1 + 0x91) = 0;
  *(undefined1 *)((longlong)param_1 + 0x34) = 1;
  *(undefined4 *)(param_1 + 6) = 0;
  *(undefined4 *)(param_1 + 3) = DAT_140320450;
  *(undefined2 *)((longlong)param_1 + 0x1c) = DAT_140320454;
  *(undefined4 *)(param_1 + 1) = *(undefined4 *)(param_1 + 3);
  *(undefined2 *)((longlong)param_1 + 0xc) = *(undefined2 *)((longlong)param_1 + 0x1c);
  *(undefined4 *)(param_1 + 5) = DAT_140320450;
  *(undefined2 *)((longlong)param_1 + 0x2c) = DAT_140320454;
  param_1[0x14] = 0;
  *(undefined4 *)(param_1 + 0x15) = 0;
  *(undefined1 *)(param_1 + 0x12) = 0;
  param_1[0x16] = 0;
  param_1[0x17] = 0;
  *(undefined4 *)(param_1 + 0x19) = 0;
  param_1[0x18] = 0;
  return param_1;
}



ulonglong FUN_1401cb790(double *param_1,double param_2,double param_3)

{
  int iVar1;
  ulonglong in_RAX;
  
  if (DAT_1403288ec != '\0') {
    if (*param_1 == 0.0) {
      *param_1 = param_2;
    }
    else if (DAT_140320d7c <= *(int *)(param_1 + 1)) {
      iVar1 = (int)((param_2 - *param_1) * param_3);
      return (ulonglong)CONCAT31((int3)((uint)iVar1 >> 8),iVar1 < *(int *)(param_1 + 1));
    }
  }
  return in_RAX & 0xffffffffffffff00;
}



void FUN_1401cb7d0(longlong param_1,int param_2)

{
  *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + param_2;
  return;
}



void FUN_1401cb7e0(double *param_1,double param_2)

{
  if (0.0 < param_2 - *param_1) {
    *param_1 = param_2;
    *(undefined4 *)(param_1 + 1) = 0;
  }
  return;
}



undefined8 * FUN_1401cb800(undefined8 *param_1)

{
  *param_1 = 0;
  *(undefined4 *)(param_1 + 1) = 0;
  return param_1;
}



undefined8 FUN_1401cb810(double *param_1,double param_2)

{
  if (*param_1 == 0.0) {
    *param_1 = param_2;
  }
  return 0x6400000;
}



undefined1 FUN_1401cb830(longlong param_1,double param_2)

{
  if (DAT_140320db0 * 3.0 < param_2 - *(double *)(param_1 + 0x18)) {
    return 1;
  }
  return 0;
}



void FUN_1401cb860(double *param_1,double param_2,double param_3)

{
  double dVar1;
  
  if (param_3 == 0.0) {
    param_3 = 2146483647.0;
  }
  if (param_2 * 0.5 <= param_3) {
    dVar1 = *param_1 * 2.0;
    *param_1 = dVar1;
    if (2146483647.0 <= dVar1) {
      dVar1 = 2146483647.0;
    }
    *param_1 = dVar1;
  }
  else {
    *param_1 = param_3 * 0.8;
  }
  if (*param_1 <= (double)DAT_140320d7c) {
    *param_1 = (double)DAT_140320d7c;
    return;
  }
  *param_1 = *param_1;
  return;
}



undefined8 * FUN_1401cb8e0(undefined8 *param_1)

{
  *param_1 = 0x41dffc2f6fc00000;
  return param_1;
}



void FUN_1401cb900(undefined8 *param_1,double param_2)

{
  if ((double)param_1[1] == 0.0) {
    param_1[1] = param_2;
  }
  if (DAT_140320db0 * 3.0 < param_2 - (double)param_1[1]) {
    param_1[1] = param_2;
    *param_1 = 0;
  }
  return;
}



void FUN_1401cb950(double *param_1,double param_2)

{
  double dVar1;
  double dVar2;
  
  if (param_1[2] == 0.0) {
    param_1[2] = param_2;
  }
  dVar2 = param_2 - param_1[2];
  if ((dVar2 != 0.0) && (DAT_140320db0 * 0.2 < dVar2)) {
    dVar1 = param_1[1];
    param_1[2] = param_2;
    param_1[1] = 0.0;
    *param_1 = (dVar1 / dVar2 - *param_1) * 0.7 + *param_1;
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401cb9c0(uint param_1,int param_2,longlong param_3,undefined8 param_4)

{
  int iVar1;
  int iVar2;
  undefined8 uVar3;
  longlong lVar4;
  undefined1 auStack_168 [32];
  undefined1 local_148 [256];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_168;
  lVar4 = (longlong)param_2;
  if (param_3 == 0) {
    uVar3 = 0x10;
  }
  else {
    uVar3 = FUN_1401e9d00(param_2);
    if ((int)uVar3 == 0) {
      if (param_1 - 0x40 < 0x3c1) {
        uVar3 = (**(code **)(lVar4 * 0x50 + 0x14032b320))(param_3);
        if ((int)uVar3 == 0) {
          iVar1 = ((int)CONCAT71((int7)((ulonglong)uVar3 >> 8),(param_1 & 7) != 0) +
                  ((int)(param_1 + ((int)param_1 >> 0x1f & 7U)) >> 3)) * 2;
          iVar2 = FUN_1401e9ca0(local_148,iVar1,param_4);
          if (iVar2 == iVar1) {
            uVar3 = (**(code **)(lVar4 * 0x50 + 0x14032b328))(local_148,iVar1,param_3);
            if ((int)uVar3 == 0) {
              uVar3 = (**(code **)(lVar4 * 0x50 + 0x14032b330))(param_3);
            }
          }
          else {
            uVar3 = 9;
          }
        }
      }
      else {
        uVar3 = 8;
      }
    }
  }
  return uVar3;
}



int FUN_1401cbac0(longlong param_1)

{
  char cVar1;
  char cVar2;
  char *pcVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong lVar6;
  
  if (param_1 == 0) {
    return 0x10;
  }
  EnterCriticalSection((LPCRITICAL_SECTION)&DAT_1403792c0);
  iVar4 = 0;
  puVar5 = &DAT_14032bd10;
  do {
    pcVar3 = (char *)*puVar5;
    if (pcVar3 != (char *)0x0) {
      lVar6 = param_1 - (longlong)pcVar3;
      do {
        cVar1 = *pcVar3;
        cVar2 = pcVar3[lVar6];
        if (cVar1 != cVar2) break;
        pcVar3 = pcVar3 + 1;
      } while (cVar2 != '\0');
      if (cVar1 == cVar2) {
        LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_1403792c0);
        return iVar4;
      }
    }
    iVar4 = iVar4 + 1;
    puVar5 = puVar5 + 0x10;
    if (0x1f < iVar4) {
      LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_1403792c0);
      return -1;
    }
  } while( true );
}



int FUN_1401cbb60(longlong param_1)

{
  char cVar1;
  char cVar2;
  char *pcVar3;
  int iVar4;
  undefined8 *puVar5;
  longlong lVar6;
  
  if (param_1 == 0) {
    return 0x10;
  }
  EnterCriticalSection((LPCRITICAL_SECTION)&DAT_140379300);
  iVar4 = 0;
  puVar5 = &DAT_14032b310;
  do {
    pcVar3 = (char *)*puVar5;
    if (pcVar3 != (char *)0x0) {
      lVar6 = param_1 - (longlong)pcVar3;
      do {
        cVar1 = *pcVar3;
        cVar2 = pcVar3[lVar6];
        if (cVar1 != cVar2) break;
        pcVar3 = pcVar3 + 1;
      } while (cVar2 != '\0');
      if (cVar1 == cVar2) {
        LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_140379300);
        return iVar4;
      }
    }
    iVar4 = iVar4 + 1;
    puVar5 = puVar5 + 10;
    if (0x1f < iVar4) {
      LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_140379300);
      return -1;
    }
  } while( true );
}



undefined4 FUN_1401cbc00(int param_1)

{
  int *piVar1;
  int iVar2;
  
  iVar2 = 0;
  piVar1 = &DAT_140275540;
  do {
    if (param_1 == *piVar1) {
      return *(undefined4 *)(&DAT_140275544 + (longlong)iVar2 * 8);
    }
    piVar1 = piVar1 + 2;
    iVar2 = iVar2 + 1;
  } while ((longlong)piVar1 < 0x140275558);
  return 1;
}



int FUN_1401cbc40(undefined8 *param_1)

{
  int iVar1;
  void *pvVar2;
  int *piVar3;
  int iVar4;
  int iVar5;
  
  if (param_1 == (undefined8 *)0x0) {
    return 0x10;
  }
  iVar5 = 1;
  pvVar2 = calloc(1,0x18);
  *param_1 = pvVar2;
  if (pvVar2 == (void *)0x0) {
    return 0xd;
  }
  iVar1 = FUN_1401e9fb0();
  iVar4 = 0;
  piVar3 = &DAT_140275540;
  do {
    if (iVar1 == *piVar3) {
      iVar5 = *(int *)(&DAT_140275544 + (longlong)iVar4 * 8);
      if (iVar5 == 0) {
        return 0;
      }
      break;
    }
    piVar3 = piVar3 + 2;
    iVar4 = iVar4 + 1;
  } while ((longlong)piVar3 < 0x140275558);
  free((void *)*param_1);
  return iVar5;
}



void FUN_1401cbce0(void *param_1)

{
  if (param_1 != (void *)0x0) {
    FUN_1401ea010();
    free(param_1);
  }
  return;
}



undefined4 FUN_1401cbd10(longlong param_1,longlong param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_2 != 0)) {
    iVar1 = FUN_1401ea070();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cbd70(longlong param_1,longlong param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_2 != 0)) {
    iVar1 = FUN_1401ea0b0();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cbdd0(longlong *param_1,longlong param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  iVar1 = FUN_1401cbc40();
  if (iVar1 != 0) {
    return 0xd;
  }
  if ((param_2 != 0) && (*param_1 != 0)) {
    iVar1 = FUN_1401ea0b0(param_2);
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cbe70(longlong param_1)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if (param_1 == 0) {
    return 0x10;
  }
  iVar1 = FUN_1401ea140();
  iVar3 = 0;
  piVar2 = &DAT_140275540;
  do {
    if (iVar1 == *piVar2) {
      return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
    }
    piVar2 = piVar2 + 2;
    iVar3 = iVar3 + 1;
  } while ((longlong)piVar2 < 0x140275558);
  return 1;
}



ulonglong FUN_1401cbf20(longlong param_1,longlong param_2)

{
  int iVar1;
  
  if ((param_1 == 0) || (param_2 == 0)) {
    return 0x10;
  }
  iVar1 = FUN_1401ea200();
  if (iVar1 == -1) {
    return 0xffffffff;
  }
  if (iVar1 != 0) {
    return (ulonglong)(iVar1 == 1);
  }
  return 0;
}



uint FUN_1401cbf70(longlong param_1)

{
  int iVar1;
  
  if (param_1 == 0) {
    return 0x10;
  }
  iVar1 = FUN_1401ea230();
  if (iVar1 != -1) {
    if (iVar1 != 0) {
      return (uint)(iVar1 == 1);
    }
    return 0;
  }
  return 0xffffffff;
}



undefined4 FUN_1401cbfd0(longlong param_1)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if (param_1 == 0) {
    return 0x10;
  }
  iVar1 = FUN_1401ea300();
  iVar3 = 0;
  piVar2 = &DAT_140275540;
  do {
    if (iVar1 == *piVar2) {
      return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
    }
    piVar2 = piVar2 + 2;
    iVar3 = iVar3 + 1;
  } while ((longlong)piVar2 < 0x140275558);
  return 1;
}



undefined4 FUN_1401cc030(longlong param_1,longlong param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_2 != 0)) {
    iVar1 = FUN_1401ea380();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc090(longlong param_1,longlong param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_2 != 0)) {
    iVar1 = FUN_1401ea480();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc100(longlong param_1,longlong param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_2 != 0)) {
    iVar1 = FUN_1401ea5b0();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc160(longlong param_1,longlong param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_2 != 0)) {
    iVar1 = FUN_1401ea660();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc1c0(longlong param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if (((param_1 != 0) && (param_2 != 0)) && (param_3 != 0)) {
    iVar1 = FUN_1401ea6f0();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc220(longlong param_1,undefined8 param_2,longlong param_3)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_3 != 0)) {
    iVar1 = FUN_1401ea770();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc280(longlong param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if (((param_1 != 0) && (param_2 != 0)) && (param_3 != 0)) {
    iVar1 = FUN_1401ea8b0();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc2e0(longlong param_1,undefined8 param_2,longlong param_3)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_3 != 0)) {
    iVar1 = FUN_1401ea930();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc340(longlong param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if (((param_1 != 0) && (param_2 != 0)) && (param_3 != 0)) {
    iVar1 = FUN_1401eaa70();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc3a0(longlong param_1,undefined8 param_2,longlong param_3)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_3 != 0)) {
    iVar1 = FUN_1401eab20();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc400(longlong param_1,longlong param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_2 != 0)) {
    iVar1 = FUN_1401eabe0();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc460(longlong param_1,longlong param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_2 != 0)) {
    iVar1 = FUN_1401eac60();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc4c0(longlong param_1,longlong param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_2 != 0)) {
    iVar1 = FUN_1401eb190();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



int FUN_1401cc520(longlong param_1,undefined8 param_2,undefined4 *param_3)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  undefined4 local_res8 [8];
  
  if ((param_1 != 0) && (param_3 != (undefined4 *)0x0)) {
    iVar1 = FUN_1401eb240(param_1,param_2,local_res8);
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        iVar1 = *(int *)(&DAT_140275544 + (longlong)iVar3 * 8);
        if (iVar1 == 0) {
          *param_3 = local_res8[0];
          iVar1 = 0;
        }
        return iVar1;
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc5a0(longlong param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if (((param_1 != 0) && (param_2 != 0)) && (param_3 != 0)) {
    iVar1 = FUN_1401eb250();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc600(longlong param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if (((param_1 != 0) && (param_2 != 0)) && (param_3 != 0)) {
    iVar1 = FUN_1401eb430();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined8 FUN_1401cc660(longlong param_1,longlong param_2,longlong param_3,longlong param_4)

{
  undefined4 uVar1;
  undefined8 uVar2;
  
  if ((((param_1 != 0) && (param_2 != 0)) && (param_3 != 0)) && (param_4 != 0)) {
    uVar1 = FUN_1401eb500();
    uVar2 = FUN_1401cbc00(uVar1);
    return uVar2;
  }
  return 0x10;
}



undefined4 FUN_1401cc6a0(longlong param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if (((param_1 != 0) && (param_2 != 0)) && (param_3 != 0)) {
    iVar1 = FUN_1401eb580();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc700(longlong param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if (((param_1 != 0) && (param_2 != 0)) && (param_3 != 0)) {
    iVar1 = FUN_1401eb5f0();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



int FUN_1401cc760(longlong param_1,undefined8 *param_2)

{
  int iVar1;
  void *pvVar2;
  int *piVar3;
  int iVar4;
  int iVar5;
  
  if ((param_1 == 0) || (param_2 == (undefined8 *)0x0)) {
    return 0x10;
  }
  iVar5 = 1;
  pvVar2 = calloc(1,4);
  *param_2 = pvVar2;
  if (pvVar2 == (void *)0x0) {
    return 0xd;
  }
  iVar1 = FUN_1401eb620(param_1);
  iVar4 = 0;
  piVar3 = &DAT_140275540;
  do {
    if (iVar1 == *piVar3) {
      iVar5 = *(int *)(&DAT_140275544 + (longlong)iVar4 * 8);
      if (iVar5 == 0) {
        return 0;
      }
      break;
    }
    piVar3 = piVar3 + 2;
    iVar4 = iVar4 + 1;
  } while ((longlong)piVar3 < 0x140275558);
  free((void *)*param_2);
  return iVar5;
}



undefined4 FUN_1401cc820(longlong param_1,longlong param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if ((param_1 != 0) && (param_2 != 0)) {
    iVar1 = FUN_1401eb680();
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined4 FUN_1401cc880(longlong param_1,longlong param_2,undefined4 *param_3)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  if (((param_1 != 0) && (param_2 != 0)) && (param_3 != (undefined4 *)0x0)) {
    iVar1 = FUN_1401eb750(param_1,param_2,*param_3);
    iVar3 = 0;
    piVar2 = &DAT_140275540;
    do {
      if (iVar1 == *piVar2) {
        return *(undefined4 *)(&DAT_140275544 + (longlong)iVar3 * 8);
      }
      piVar2 = piVar2 + 2;
      iVar3 = iVar3 + 1;
    } while ((longlong)piVar2 < 0x140275558);
    return 1;
  }
  return 0x10;
}



undefined8 FUN_1401cc8f0(longlong param_1,longlong param_2,longlong param_3,longlong param_4)

{
  undefined4 uVar1;
  undefined8 uVar2;
  
  if ((((param_1 != 0) && (param_2 != 0)) && (param_3 != 0)) && (param_4 != 0)) {
    uVar1 = FUN_1401eb8c0();
    uVar2 = FUN_1401cbc00(uVar1);
    return uVar2;
  }
  return 0x10;
}



undefined4 FUN_1401cc930(longlong param_1,uint *param_2)

{
  undefined4 uVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  
  if ((param_1 != 0) && (param_2 != (uint *)0x0)) {
    iVar2 = FUN_1401eba20(param_1,8);
    iVar4 = 0;
    piVar3 = &DAT_140275540;
    do {
      if (iVar2 == *piVar3) {
        uVar1 = *(undefined4 *)(&DAT_140275544 + (longlong)iVar4 * 8);
        *param_2 = (uint)(*param_2 == 1);
        return uVar1;
      }
      piVar3 = piVar3 + 2;
      iVar4 = iVar4 + 1;
    } while ((longlong)piVar3 < 0x140275558);
    *param_2 = (uint)(*param_2 == 1);
    return 1;
  }
  return 0x10;
}



int FUN_1401cc9b0(void *param_1)

{
  int iVar1;
  longlong *plVar2;
  int iVar3;
  int iVar4;
  
  if (param_1 == (void *)0x0) {
    return 0x10;
  }
  EnterCriticalSection((LPCRITICAL_SECTION)&DAT_1403792c0);
  iVar4 = 0;
  iVar3 = 0;
  do {
    iVar1 = memcmp(&DAT_14032bd10 + (longlong)iVar3 * 0x10,param_1,0x80);
    if (iVar1 == 0) {
      LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_1403792c0);
      return iVar3;
    }
    iVar3 = iVar3 + 1;
  } while (iVar3 < 0x20);
  plVar2 = &DAT_14032bd10;
  do {
    if (*plVar2 == 0) {
      memcpy(&DAT_14032bd10 + (longlong)iVar4 * 0x10,param_1,0x80);
      LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_1403792c0);
      return iVar4;
    }
    plVar2 = plVar2 + 0x10;
    iVar4 = iVar4 + 1;
  } while ((longlong)plVar2 < 0x14032cd10);
  LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_1403792c0);
  return -1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401cca90(longlong param_1,longlong param_2)

{
  uint uVar1;
  undefined1 uVar2;
  undefined1 uVar3;
  uint uVar4;
  uint uVar5;
  uint uVar6;
  longlong lVar7;
  uint *puVar8;
  int *piVar9;
  uint uVar10;
  uint uVar11;
  uint uVar12;
  uint uVar13;
  undefined1 *puVar14;
  undefined1 *puVar15;
  uint uVar16;
  uint uVar17;
  longlong lVar18;
  undefined1 auStack_17a [2];
  undefined1 local_178 [4];
  undefined1 local_174 [4];
  undefined1 local_170 [4];
  uint local_16c [37];
  int local_d8 [20];
  int local_88 [20];
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)local_178;
  lVar18 = 4;
  lVar7 = 4;
  puVar14 = (undefined1 *)(param_2 + 2);
  do {
    puVar15 = puVar14 + 0x10;
    uVar2 = puVar14[3];
    *(uint *)(puVar15 + (longlong)local_16c + (-0x1e - param_2)) =
         CONCAT31(CONCAT21(CONCAT11(puVar14[-2],puVar14[-1]),*puVar14),puVar14[1]);
    uVar3 = puVar14[7];
    *(uint *)(puVar15 + (longlong)local_16c + (-0x1a - param_2)) =
         CONCAT31(CONCAT21(CONCAT11(puVar14[2],uVar2),puVar14[4]),puVar14[5]);
    uVar2 = puVar14[0xb];
    *(uint *)(puVar15 + (longlong)local_16c + (-0x16 - param_2)) =
         CONCAT31(CONCAT21(CONCAT11(puVar14[6],uVar3),puVar14[8]),puVar14[9]);
    lVar7 = lVar7 + -1;
    *(uint *)(puVar15 + (longlong)local_16c + (-0x12 - param_2)) =
         CONCAT31(CONCAT21(CONCAT11(puVar14[10],uVar2),puVar14[0xc]),puVar14[0xd]);
    puVar14 = puVar15;
  } while (lVar7 != 0);
  uVar4 = *(uint *)(param_1 + 8);
  uVar5 = *(uint *)(param_1 + 0xc);
  uVar16 = *(uint *)(param_1 + 0x10);
  uVar17 = *(uint *)(param_1 + 0x14);
  uVar10 = *(uint *)(param_1 + 0x18);
  lVar7 = 0x10;
  puVar8 = local_16c + 5;
  do {
    uVar13 = puVar8[-8] ^ puVar8[5] ^ puVar8[-6] ^ *puVar8;
    uVar6 = puVar8[-7] ^ puVar8[6] ^ puVar8[1] ^ puVar8[-5];
    uVar13 = uVar13 << 1 | (uint)((int)uVar13 < 0);
    puVar8[8] = uVar13;
    puVar8[9] = uVar6 << 1 | (uint)((int)uVar6 < 0);
    uVar6 = puVar8[7] ^ puVar8[-4] ^ puVar8[2] ^ puVar8[-6];
    puVar8[10] = uVar6 << 1 | (uint)((int)uVar6 < 0);
    uVar6 = puVar8[-3] ^ puVar8[3] ^ uVar13 ^ puVar8[-5];
    lVar7 = lVar7 + -1;
    puVar8[0xb] = uVar6 << 1 | (uint)((int)uVar6 < 0);
    puVar8 = puVar8 + 4;
  } while (lVar7 != 0);
  lVar7 = 4;
  piVar9 = (int *)local_178;
  uVar13 = uVar4;
  uVar6 = uVar5;
  do {
    uVar12 = uVar6 << 0x1e | uVar6 >> 2;
    uVar6 = uVar10 + 0x5a827999 +
            (uVar13 << 5 | uVar13 >> 0x1b) + ((uVar17 ^ uVar16) & uVar6 ^ uVar17) + *piVar9;
    uVar11 = uVar13 << 0x1e | uVar13 >> 2;
    uVar13 = uVar17 + 0x5a827999 +
             (uVar6 * 0x20 | uVar6 >> 0x1b) + ((uVar16 ^ uVar12) & uVar13 ^ uVar16) + piVar9[1];
    uVar10 = uVar6 * 0x40000000 | uVar6 >> 2;
    uVar1 = uVar16 + 0x5a827999 +
            (uVar13 * 0x20 | uVar13 >> 0x1b) + ((uVar12 ^ uVar11) & uVar6 ^ uVar12) + piVar9[2];
    uVar17 = uVar13 * 0x40000000 | uVar13 >> 2;
    uVar6 = uVar12 + 0x5a827999 +
            (uVar1 * 0x20 | uVar1 >> 0x1b) + ((uVar10 ^ uVar11) & uVar13 ^ uVar11) + piVar9[3];
    uVar16 = uVar1 * 0x40000000 | uVar1 >> 2;
    lVar7 = lVar7 + -1;
    uVar13 = uVar11 + 0x5a827999 +
             (uVar6 * 0x20 | uVar6 >> 0x1b) + ((uVar10 ^ uVar17) & uVar1 ^ uVar10) + piVar9[4];
    piVar9 = piVar9 + 5;
  } while (lVar7 != 0);
  lVar7 = 4;
  puVar8 = local_16c + 0x11;
  do {
    uVar12 = uVar6 << 0x1e | uVar6 >> 2;
    uVar6 = uVar10 + 0x6ed9eba1 +
            (uVar13 << 5 | uVar13 >> 0x1b) + (uVar17 ^ uVar16 ^ uVar6) + *puVar8;
    uVar11 = uVar13 << 0x1e | uVar13 >> 2;
    uVar13 = uVar17 + 0x6ed9eba1 +
             (uVar6 * 0x20 | uVar6 >> 0x1b) + (uVar16 ^ uVar12 ^ uVar13) + puVar8[1];
    uVar10 = uVar6 * 0x40000000 | uVar6 >> 2;
    uVar1 = uVar16 + 0x6ed9eba1 +
            (uVar13 * 0x20 | uVar13 >> 0x1b) + (uVar6 ^ uVar12 ^ uVar11) + puVar8[2];
    uVar17 = uVar13 * 0x40000000 | uVar13 >> 2;
    uVar6 = uVar12 + 0x6ed9eba1 +
            (uVar1 * 0x20 | uVar1 >> 0x1b) + (uVar10 ^ uVar13 ^ uVar11) + puVar8[3];
    uVar16 = uVar1 * 0x40000000 | uVar1 >> 2;
    lVar7 = lVar7 + -1;
    uVar13 = uVar11 + 0x6ed9eba1 +
             (uVar6 * 0x20 | uVar6 >> 0x1b) + (uVar10 ^ uVar17 ^ uVar1) + puVar8[4];
    puVar8 = puVar8 + 5;
  } while (lVar7 != 0);
  lVar7 = 4;
  piVar9 = local_d8;
  do {
    uVar12 = uVar6 << 0x1e | uVar6 >> 2;
    uVar6 = ((uVar16 | uVar6) & uVar17 | uVar16 & uVar6) + *piVar9 + uVar10 + -0x70e44324 +
            (uVar13 << 5 | uVar13 >> 0x1b);
    uVar11 = uVar13 << 0x1e | uVar13 >> 2;
    uVar13 = ((uVar12 | uVar13) & uVar16 | uVar12 & uVar13) + piVar9[1] + uVar17 + -0x70e44324 +
             (uVar6 * 0x20 | uVar6 >> 0x1b);
    uVar10 = uVar6 * 0x40000000 | uVar6 >> 2;
    uVar1 = ((uVar6 | uVar11) & uVar12 | uVar6 & uVar11) + piVar9[2] + uVar16 + -0x70e44324 +
            (uVar13 * 0x20 | uVar13 >> 0x1b);
    uVar17 = uVar13 * 0x40000000 | uVar13 >> 2;
    uVar6 = ((uVar10 | uVar13) & uVar11 | uVar10 & uVar13) + piVar9[3] + uVar12 + -0x70e44324 +
            (uVar1 * 0x20 | uVar1 >> 0x1b);
    uVar16 = uVar1 * 0x40000000 | uVar1 >> 2;
    lVar7 = lVar7 + -1;
    uVar13 = ((uVar17 | uVar1) & uVar10 | uVar17 & uVar1) + piVar9[4] + uVar11 + -0x70e44324 +
             (uVar6 * 0x20 | uVar6 >> 0x1b);
    piVar9 = piVar9 + 5;
  } while (lVar7 != 0);
  piVar9 = local_88;
  do {
    uVar12 = uVar6 << 0x1e | uVar6 >> 2;
    uVar6 = (uVar17 ^ uVar16 ^ uVar6) + *piVar9 + uVar10 + -0x359d3e2a +
            (uVar13 << 5 | uVar13 >> 0x1b);
    uVar11 = uVar13 << 0x1e | uVar13 >> 2;
    uVar13 = (uVar16 ^ uVar12 ^ uVar13) + piVar9[1] + uVar17 + -0x359d3e2a +
             (uVar6 * 0x20 | uVar6 >> 0x1b);
    uVar10 = uVar6 * 0x40000000 | uVar6 >> 2;
    uVar1 = (uVar6 ^ uVar12 ^ uVar11) + piVar9[2] + uVar16 + -0x359d3e2a +
            (uVar13 * 0x20 | uVar13 >> 0x1b);
    uVar17 = uVar13 * 0x40000000 | uVar13 >> 2;
    uVar6 = (uVar10 ^ uVar13 ^ uVar11) + piVar9[3] + uVar12 + -0x359d3e2a +
            (uVar1 * 0x20 | uVar1 >> 0x1b);
    uVar16 = uVar1 * 0x40000000 | uVar1 >> 2;
    lVar18 = lVar18 + -1;
    uVar13 = (uVar10 ^ uVar17 ^ uVar1) + piVar9[4] + uVar11 + -0x359d3e2a +
             (uVar6 * 0x20 | uVar6 >> 0x1b);
    piVar9 = piVar9 + 5;
  } while (lVar18 != 0);
  *(uint *)(param_1 + 8) = uVar4 + uVar13;
  *(uint *)(param_1 + 0xc) = uVar5 + uVar6;
  *(uint *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + uVar16;
  *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + uVar17;
  *(uint *)(param_1 + 0x18) = *(int *)(param_1 + 0x18) + uVar10;
  return 0;
}



undefined8 FUN_1401ccfa0(longlong *param_1,void *param_2,uint param_3)

{
  undefined8 uVar1;
  uint uVar2;
  
  if (((param_1 != (longlong *)0x0) && (param_2 != (void *)0x0)) &&
     (*(uint *)((longlong)param_1 + 0x1c) < 0x41)) {
    while( true ) {
      while( true ) {
        if (param_3 == 0) {
          return 0;
        }
        if ((*(int *)((longlong)param_1 + 0x1c) == 0) && (0x3f < param_3)) break;
        uVar2 = 0x40 - *(int *)((longlong)param_1 + 0x1c);
        if (param_3 < uVar2) {
          uVar2 = param_3;
        }
        memcpy((void *)((ulonglong)*(uint *)((longlong)param_1 + 0x1c) + 0x20 + (longlong)param_1),
               param_2,(ulonglong)uVar2);
        *(int *)((longlong)param_1 + 0x1c) = *(int *)((longlong)param_1 + 0x1c) + uVar2;
        param_2 = (void *)((longlong)param_2 + (ulonglong)uVar2);
        param_3 = param_3 - uVar2;
        if (*(int *)((longlong)param_1 + 0x1c) == 0x40) {
          uVar1 = FUN_1401cca90(param_1,param_1 + 4);
          if ((int)uVar1 != 0) {
            return uVar1;
          }
          *param_1 = *param_1 + 0x200;
          *(undefined4 *)((longlong)param_1 + 0x1c) = 0;
        }
      }
      uVar1 = FUN_1401cca90(param_1,param_2);
      if ((int)uVar1 != 0) break;
      *param_1 = *param_1 + 0x200;
      param_2 = (void *)((longlong)param_2 + 0x40);
      param_3 = param_3 - 0x40;
    }
    return uVar1;
  }
  return 0x10;
}



undefined8 FUN_1401cd080(longlong *param_1,undefined1 *param_2)

{
  uint uVar1;
  
  if ((param_1 != (longlong *)0x0) && (param_2 != (undefined1 *)0x0)) {
    uVar1 = *(uint *)((longlong)param_1 + 0x1c);
    if (uVar1 < 0x40) {
      *param_1 = *param_1 + (ulonglong)(uVar1 * 8);
      *(undefined1 *)((ulonglong)uVar1 + 0x20 + (longlong)param_1) = 0x80;
      *(int *)((longlong)param_1 + 0x1c) = *(int *)((longlong)param_1 + 0x1c) + 1;
      uVar1 = *(uint *)((longlong)param_1 + 0x1c);
      if (0x38 < uVar1) {
        while (uVar1 < 0x40) {
          *(undefined1 *)((ulonglong)uVar1 + 0x20 + (longlong)param_1) = 0;
          *(int *)((longlong)param_1 + 0x1c) = *(int *)((longlong)param_1 + 0x1c) + 1;
          uVar1 = *(uint *)((longlong)param_1 + 0x1c);
        }
        FUN_1401cca90(param_1,param_1 + 4);
        *(undefined4 *)((longlong)param_1 + 0x1c) = 0;
      }
      uVar1 = *(uint *)((longlong)param_1 + 0x1c);
      while (uVar1 < 0x38) {
        *(undefined1 *)((ulonglong)*(uint *)((longlong)param_1 + 0x1c) + 0x20 + (longlong)param_1) =
             0;
        *(int *)((longlong)param_1 + 0x1c) = *(int *)((longlong)param_1 + 0x1c) + 1;
        uVar1 = *(uint *)((longlong)param_1 + 0x1c);
      }
      *(undefined1 *)(param_1 + 0xb) = *(undefined1 *)((longlong)param_1 + 7);
      *(undefined1 *)((longlong)param_1 + 0x59) = *(undefined1 *)((longlong)param_1 + 6);
      *(undefined1 *)((longlong)param_1 + 0x5a) = *(undefined1 *)((longlong)param_1 + 5);
      *(undefined1 *)((longlong)param_1 + 0x5b) = *(undefined1 *)((longlong)param_1 + 4);
      *(undefined1 *)((longlong)param_1 + 0x5c) = *(undefined1 *)((longlong)param_1 + 3);
      *(undefined1 *)((longlong)param_1 + 0x5d) = *(undefined1 *)((longlong)param_1 + 2);
      *(undefined1 *)((longlong)param_1 + 0x5e) = *(undefined1 *)((longlong)param_1 + 1);
      *(char *)((longlong)param_1 + 0x5f) = (char)*param_1;
      FUN_1401cca90(param_1,param_1 + 4);
      *param_2 = *(undefined1 *)((longlong)param_1 + 0xb);
      param_2[1] = *(undefined1 *)((longlong)param_1 + 10);
      param_2[2] = *(undefined1 *)((longlong)param_1 + 9);
      param_2[3] = (char)param_1[1];
      param_2[4] = *(undefined1 *)((longlong)param_1 + 0xf);
      param_2[5] = *(undefined1 *)((longlong)param_1 + 0xe);
      param_2[6] = *(undefined1 *)((longlong)param_1 + 0xd);
      param_2[7] = *(undefined1 *)((longlong)param_1 + 0xc);
      param_2[8] = *(undefined1 *)((longlong)param_1 + 0x13);
      param_2[9] = *(undefined1 *)((longlong)param_1 + 0x12);
      param_2[10] = *(undefined1 *)((longlong)param_1 + 0x11);
      param_2[0xb] = (char)param_1[2];
      param_2[0xc] = *(undefined1 *)((longlong)param_1 + 0x17);
      param_2[0xd] = *(undefined1 *)((longlong)param_1 + 0x16);
      param_2[0xe] = *(undefined1 *)((longlong)param_1 + 0x15);
      param_2[0xf] = *(undefined1 *)((longlong)param_1 + 0x14);
      param_2[0x10] = *(undefined1 *)((longlong)param_1 + 0x1b);
      param_2[0x11] = *(undefined1 *)((longlong)param_1 + 0x1a);
      param_2[0x12] = *(undefined1 *)((longlong)param_1 + 0x19);
      param_2[0x13] = (char)param_1[3];
      return 0;
    }
  }
  return 0x10;
}



int FUN_1401cd200(void *param_1)

{
  int iVar1;
  longlong *plVar2;
  int iVar3;
  int iVar4;
  
  if (param_1 == (void *)0x0) {
    return 0x10;
  }
  EnterCriticalSection((LPCRITICAL_SECTION)&DAT_140379300);
  iVar4 = 0;
  iVar3 = 0;
  do {
    iVar1 = memcmp(&DAT_14032b310 + (longlong)iVar3 * 10,param_1,0x50);
    if (iVar1 == 0) {
      LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_140379300);
      return iVar3;
    }
    iVar3 = iVar3 + 1;
  } while (iVar3 < 0x20);
  plVar2 = &DAT_14032b310;
  do {
    if (*plVar2 == 0) {
      memcpy(&DAT_14032b310 + (longlong)iVar4 * 10,param_1,0x50);
      LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_140379300);
      return iVar4;
    }
    plVar2 = plVar2 + 10;
    iVar4 = iVar4 + 1;
  } while ((longlong)plVar2 < 0x14032bd10);
  LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_140379300);
  return -1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_1401cd2f0(longlong param_1)

{
  uint uVar1;
  ulonglong uVar2;
  char *pcVar3;
  int iVar4;
  longlong lVar5;
  undefined1 auStack_138 [32];
  undefined1 local_118 [112];
  undefined1 local_a8 [128];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_138;
  *(longlong *)(param_1 + 0x1028) = *(longlong *)(param_1 + 0x1028) + 1;
  FUN_1401ee8e0(local_118);
  uVar1 = FUN_1401ee930(local_118,param_1 + 0xfe8,0x20);
  uVar2 = (ulonglong)uVar1;
  if (uVar1 == 0) {
    iVar4 = 0;
    do {
      if ((iVar4 != 0) && ((*(ulonglong *)(param_1 + 0x1028) >> ((char)iVar4 - 1U & 0x3f) & 1) != 0)
         ) break;
      lVar5 = (longlong)iVar4 * 0x70 + param_1;
      uVar1 = FUN_1401eea10(lVar5,local_a8);
      if ((uVar1 != 0) ||
         ((uVar1 = FUN_1401ee930(local_118,local_a8,0x20), uVar1 != 0 ||
          (uVar1 = FUN_1401ee8e0(lVar5), uVar1 != 0)))) {
        FUN_1401eea10(local_118,local_a8);
        return (ulonglong)uVar1;
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 < 0x20);
    uVar2 = FUN_1401eea10(local_118,param_1 + 0xfe8);
    if (((int)uVar2 == 0) &&
       (uVar2 = FUN_1401ebb40(param_1 + 0xfe8,0x20,0,param_1 + 0xe00), (int)uVar2 == 0)) {
      pcVar3 = (char *)(param_1 + 0x1008);
      do {
        *pcVar3 = *pcVar3 + '\x01';
        if (*pcVar3 != '\0') break;
        pcVar3 = pcVar3 + 1;
      } while ((longlong)pcVar3 - (param_1 + 0x1008) < 0x10);
      *(undefined8 *)(param_1 + 0x101c) = 0;
      uVar2 = 0;
    }
  }
  else {
    FUN_1401eea10(local_118,local_a8);
  }
  return uVar2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401cd480(longlong param_1)

{
  int iVar1;
  int iVar2;
  ulonglong uVar3;
  longlong lVar4;
  undefined1 auStack_b8 [32];
  undefined1 local_98 [128];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_b8;
  if (param_1 == 0) {
    iVar1 = 0x10;
  }
  else {
    uVar3 = 0;
    do {
      iVar2 = (int)uVar3;
      iVar1 = FUN_1401ee8e0((longlong)iVar2 * 0x70 + param_1);
      if (iVar1 != 0) {
        if (iVar2 < 1) {
          return iVar1;
        }
        do {
          FUN_1401eea10(param_1,local_98);
          param_1 = param_1 + 0x70;
          uVar3 = uVar3 - 1;
        } while (uVar3 != 0);
        return iVar1;
      }
      uVar3 = (ulonglong)(iVar2 + 1U);
    } while ((int)(iVar2 + 1U) < 0x20);
    lVar4 = 0x20;
    *(undefined8 *)(param_1 + 0x101c) = 0;
    *(undefined4 *)(param_1 + 0x1018) = 0;
    *(undefined8 *)(param_1 + 0x1028) = 0;
    FUN_1401eebe0(param_1 + 0xfe8,0x20);
    iVar1 = FUN_1401ebb40(param_1 + 0xfe8,0x20,0,param_1 + 0xe00);
    if (iVar1 == 0) {
      FUN_1401eebe0(param_1 + 0x1008,0x10);
      InitializeCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x1030));
      iVar1 = 0;
    }
    else {
      do {
        FUN_1401eea10(param_1,local_98);
        param_1 = param_1 + 0x70;
        lVar4 = lVar4 + -1;
      } while (lVar4 != 0);
    }
  }
  return iVar1;
}



int FUN_1401cd5d0(longlong param_1,uint param_2,longlong param_3)

{
  int iVar1;
  undefined1 local_res8;
  undefined1 local_res9;
  
  if ((param_1 != 0) && (param_3 != 0)) {
    EnterCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
    if (0x20 < param_2) {
      LeaveCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
      return 0x10;
    }
    local_res8 = 0;
    local_res9 = (char)param_2;
    iVar1 = FUN_1401ee930((ulonglong)*(uint *)(param_3 + 0x1018) * 0x70 + param_3,&local_res8,2);
    if (iVar1 == 0) {
      iVar1 = FUN_1401ee930((ulonglong)*(uint *)(param_3 + 0x1018) * 0x70 + param_3,param_1,param_2)
      ;
      if (iVar1 == 0) {
        if (*(int *)(param_3 + 0x1018) == 0) {
          *(int *)(param_3 + 0x101c) = *(int *)(param_3 + 0x101c) + param_2;
        }
        iVar1 = *(int *)(param_3 + 0x1018) + 1;
        if (iVar1 == 0x20) {
          iVar1 = 0;
        }
        *(int *)(param_3 + 0x1018) = iVar1;
        LeaveCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
        iVar1 = 0;
      }
      else {
        LeaveCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
      }
    }
    else {
      LeaveCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
    }
    return iVar1;
  }
  return 0x10;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

uint FUN_1401cd700(void *param_1,uint param_2,longlong param_3)

{
  int iVar1;
  char *pcVar2;
  ulonglong uVar3;
  char *pcVar4;
  ulonglong _Size;
  undefined1 auStack_78 [32];
  undefined1 local_58 [16];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_78;
  _Size = (ulonglong)param_2;
  if ((param_1 == (void *)0x0) || (param_3 == 0)) {
    param_2 = 0x10;
  }
  else {
    EnterCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
    *(int *)(param_3 + 0x1020) = *(int *)(param_3 + 0x1020) + 1;
    if (((*(int *)(param_3 + 0x1020) == 10) || (0x3f < *(uint *)(param_3 + 0x101c))) &&
       (iVar1 = FUN_1401cd2f0(param_3), iVar1 != 0)) {
      LeaveCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
      param_2 = 0;
    }
    else {
      if (0xf < param_2) {
        uVar3 = (ulonglong)(param_2 >> 4);
        do {
          FUN_1401ec2e0(param_3 + 0x1008,param_1,param_3 + 0xe00);
          param_1 = (void *)((longlong)param_1 + 0x10);
          _Size = (ulonglong)((int)_Size - 0x10);
          pcVar2 = (char *)(param_3 + 0x1008);
          do {
            *pcVar2 = *pcVar2 + '\x01';
            if (*pcVar2 != '\0') break;
            pcVar2 = pcVar2 + 1;
          } while ((longlong)pcVar2 - (param_3 + 0x1008) < 0x10);
          uVar3 = uVar3 - 1;
        } while (uVar3 != 0);
      }
      if ((int)_Size != 0) {
        pcVar2 = (char *)(param_3 + 0x1008);
        FUN_1401ec2e0(pcVar2,local_58,param_3 + 0xe00);
        memcpy(param_1,local_58,_Size);
        pcVar4 = pcVar2;
        do {
          *pcVar4 = *pcVar4 + '\x01';
          if (*pcVar4 != '\0') break;
          pcVar4 = pcVar4 + 1;
        } while ((longlong)pcVar4 - (longlong)pcVar2 < 0x10);
      }
      pcVar2 = (char *)(param_3 + 0x1008);
      FUN_1401ec2e0(pcVar2,param_3 + 0xfe8,param_3 + 0xe00);
      pcVar4 = pcVar2;
      do {
        *pcVar4 = *pcVar4 + '\x01';
        if (*pcVar4 != '\0') break;
        pcVar4 = pcVar4 + 1;
      } while ((longlong)pcVar4 - (longlong)pcVar2 < 0x10);
      FUN_1401ec2e0(pcVar2,param_3 + 0xff8,param_3 + 0xe00);
      pcVar4 = pcVar2;
      do {
        *pcVar4 = *pcVar4 + '\x01';
        if (*pcVar4 != '\0') break;
        pcVar4 = pcVar4 + 1;
      } while ((longlong)pcVar4 - (longlong)pcVar2 < 0x10);
      iVar1 = FUN_1401ebb40(param_3 + 0xfe8,0x20,0,param_3 + 0xe00);
      if (iVar1 == 0) {
        LeaveCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
      }
      else {
        LeaveCriticalSection((LPCRITICAL_SECTION)(param_3 + 0x1030));
        param_2 = 0;
      }
    }
  }
  return param_2;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401cd910(longlong param_1)

{
  int iVar1;
  int iVar2;
  undefined1 auStack_58 [32];
  undefined1 local_38 [32];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  if (param_1 == 0) {
    return 0x10;
  }
  EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x1030));
  iVar2 = 0;
  do {
    iVar1 = FUN_1401eea10((longlong)iVar2 * 0x70 + param_1,local_38);
    if (iVar1 != 0) {
      LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x1030));
      return iVar1;
    }
    iVar2 = iVar2 + 1;
  } while (iVar2 < 0x20);
  LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x1030));
  return 0;
}



int FUN_1401cd9d0(longlong param_1,uint *param_2,void *param_3)

{
  LPCRITICAL_SECTION lpCriticalSection;
  int iVar1;
  void *_Dst;
  int iVar2;
  longlong lVar3;
  
  if (((param_1 == 0) || (param_2 == (uint *)0x0)) || (param_3 == (void *)0x0)) {
    return 0x10;
  }
  lpCriticalSection = (LPCRITICAL_SECTION)((longlong)param_3 + 0x1030);
  EnterCriticalSection(lpCriticalSection);
  if (*param_2 < 0x400) {
    LeaveCriticalSection(lpCriticalSection);
    *param_2 = 0x400;
    return 6;
  }
  _Dst = malloc(0x70);
  if (_Dst == (void *)0x0) {
    LeaveCriticalSection(lpCriticalSection);
    iVar1 = 0xd;
  }
  else {
    iVar2 = 0;
    do {
      memcpy(_Dst,param_3,0x70);
      lVar3 = iVar2 + param_1;
      iVar1 = FUN_1401eea10(_Dst,lVar3);
      if (iVar1 != 0) goto LAB_1401cdaf2;
      iVar1 = FUN_1401ee8e0(_Dst);
      if (iVar1 != 0) goto LAB_1401cdaf2;
      iVar1 = FUN_1401ee930(_Dst,lVar3,0x20);
      if (iVar1 != 0) goto LAB_1401cdaf2;
      iVar1 = FUN_1401eea10(_Dst,lVar3);
      if (iVar1 != 0) goto LAB_1401cdaf2;
      iVar2 = iVar2 + 0x20;
      param_3 = (void *)((longlong)param_3 + 0x70);
    } while (iVar2 < 0x400);
    *param_2 = 0x400;
LAB_1401cdaf2:
    free(_Dst);
    LeaveCriticalSection(lpCriticalSection);
  }
  return iVar1;
}



undefined8 FUN_1401cdb30(longlong param_1,int param_2,longlong param_3)

{
  undefined8 uVar1;
  int iVar2;
  
  if (((param_1 != 0) && (param_3 != 0)) && (param_2 == 0x400)) {
    uVar1 = FUN_1401cd480(param_3);
    if ((int)uVar1 == 0) {
      iVar2 = 0;
      do {
        uVar1 = FUN_1401cd5d0(iVar2 + param_1,0x20,param_3);
        if ((int)uVar1 != 0) {
          return uVar1;
        }
        iVar2 = iVar2 + 0x20;
      } while (iVar2 < 0x400);
    }
    return uVar1;
  }
  return 0x10;
}



void FUN_1401cdbd0(longlong param_1)

{
  if (param_1 != 0) {
    FUN_1401eec90(*(undefined8 *)(param_1 + 8),*(undefined8 *)(param_1 + 0x10),
                  *(undefined8 *)(param_1 + 0x18),*(undefined8 *)(param_1 + 0x40),
                  *(undefined8 *)(param_1 + 0x38),*(undefined8 *)(param_1 + 0x30),
                  *(undefined8 *)(param_1 + 0x20),*(undefined8 *)(param_1 + 0x28),0);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_1401cdc20(longlong param_1,undefined4 param_2,undefined4 *param_3)

{
  int iVar1;
  ulonglong uVar2;
  byte *_Memory;
  byte bVar3;
  undefined8 *puVar4;
  uint uVar5;
  int iVar6;
  byte *pbVar7;
  byte *pbVar8;
  undefined1 auStack_2a8 [32];
  undefined8 *local_288;
  undefined8 *local_280;
  undefined8 *local_278;
  undefined8 *local_270;
  undefined8 local_268;
  undefined8 local_260;
  undefined8 local_258;
  undefined4 local_250;
  undefined4 local_248;
  undefined8 local_240;
  undefined4 local_238;
  undefined4 local_230;
  undefined8 local_228;
  undefined4 local_220;
  undefined4 local_218;
  undefined8 local_210;
  undefined4 local_208;
  undefined4 local_200;
  undefined8 local_1f8;
  undefined4 local_1f0;
  undefined4 local_1e8;
  undefined8 local_1e0;
  undefined4 local_1d8;
  undefined4 local_1d0;
  undefined8 local_1c8;
  undefined8 local_1c0;
  undefined8 local_1b8;
  undefined8 local_1b0;
  undefined8 *local_1a8;
  undefined8 local_1a0;
  undefined8 *local_198;
  undefined8 *local_190;
  undefined8 *local_188;
  undefined8 *local_180;
  undefined8 *local_178;
  undefined4 local_168 [2];
  undefined4 *local_160;
  undefined8 local_158;
  undefined4 local_130;
  byte *local_128;
  undefined8 local_120;
  undefined4 local_f8 [2];
  undefined1 *local_f0;
  undefined8 local_e8;
  undefined4 local_c0;
  undefined8 local_b8;
  undefined8 local_b0;
  undefined1 local_88 [64];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_2a8;
  if (((param_1 == 0) || (param_3 == (undefined4 *)0x0)) || (DAT_140379340 == 0)) {
    uVar2 = 0x10;
  }
  else {
    local_278 = (undefined8 *)(param_3 + 8);
    local_280 = (undefined8 *)(param_3 + 0xc);
    local_270 = (undefined8 *)(param_3 + 10);
    local_288 = (undefined8 *)(param_3 + 0xe);
    local_190 = (undefined8 *)(param_3 + 4);
    local_178 = (undefined8 *)(param_3 + 0x10);
    local_268 = 0;
    local_1a8 = local_270;
    local_198 = local_288;
    local_188 = local_280;
    local_180 = local_278;
    uVar2 = FUN_1401eec00(param_3 + 2,local_190,param_3 + 6);
    if ((int)uVar2 == 0) {
      _Memory = calloc(1,0x8000);
      if (_Memory == (byte *)0x0) {
        uVar5 = 0xd;
        puVar4 = local_1a8;
      }
      else {
        local_f0 = local_88;
        local_b8 = 0;
        local_b0 = 0;
        local_160 = local_f8;
        local_f8[0] = 7;
        local_e8 = 0x10;
        local_c0 = 6;
        local_168[0] = 0xd;
        local_158 = 2;
        local_130 = 4;
        local_120 = 0x8000;
        local_288 = (undefined8 *)CONCAT44(local_288._4_4_,1);
        local_128 = _Memory;
        iVar1 = FUN_1401eee20(param_1,param_2,local_168);
        if (iVar1 == 0) {
          uVar5 = 0;
          iVar1 = 0;
          bVar3 = 0;
          iVar6 = 0;
          pbVar7 = _Memory;
          pbVar8 = _Memory;
          if ((uint)local_120 != 0) {
            do {
              iVar1 = iVar1 + 1;
              bVar3 = bVar3 * '\x02' | *pbVar7;
              if (iVar1 == 8) {
                *pbVar8 = bVar3;
                pbVar8 = pbVar8 + 1;
                bVar3 = 0;
                iVar6 = iVar6 + 1;
                iVar1 = 0;
              }
              uVar5 = uVar5 + 1;
              pbVar7 = pbVar7 + 1;
            } while (uVar5 < (uint)local_120);
          }
          local_270 = *(undefined8 **)(param_3 + 2);
          local_258 = 0;
          local_260 = 0;
          local_268 = 0;
          local_288 = *(undefined8 **)(param_3 + 6);
          local_278 = (undefined8 *)CONCAT44(local_278._4_4_,1);
          local_280 = (undefined8 *)CONCAT44(local_280._4_4_,2);
          uVar5 = FUN_1401eece0(_Memory,iVar6,2);
          if (uVar5 == 0) {
            free(_Memory);
            *param_3 = 0;
            return 0;
          }
          free(_Memory);
          puVar4 = local_1a8;
        }
        else {
          free(_Memory);
          local_288 = *(undefined8 **)(param_3 + 6);
          local_270 = (undefined8 *)0x0;
          local_278 = (undefined8 *)0x0;
          local_280 = (undefined8 *)0x0;
          uVar5 = FUN_1401eece0(param_1,param_2,2,1);
          puVar4 = local_1a8;
          if (uVar5 == 0) {
            iVar1 = (*DAT_1403793a0)(*(undefined8 *)(param_3 + 6),0);
            if (iVar1 == 0) {
              uVar5 = (*DAT_140379350)(&local_1a0);
              puVar4 = local_1a8;
              if (uVar5 == 0) {
                local_1c8 = *(undefined8 *)(param_3 + 0xc);
                local_1b0 = 0;
                local_1b8 = 0;
                local_1c0 = 0;
                local_1e0 = *(undefined8 *)(param_3 + 0x10);
                local_1d0 = 1;
                local_1d8 = 2;
                local_1f8 = *(undefined8 *)(param_3 + 0xe);
                local_1e8 = 1;
                local_1f0 = 2;
                local_210 = *(undefined8 *)(param_3 + 10);
                local_200 = 1;
                local_208 = 2;
                local_228 = *(undefined8 *)(param_3 + 8);
                local_218 = 1;
                local_220 = 2;
                local_240 = *(undefined8 *)(param_3 + 4);
                local_230 = 1;
                local_238 = 2;
                local_258 = *(undefined8 *)(param_3 + 2);
                local_248 = 1;
                local_250 = 2;
                local_270 = *(undefined8 **)(param_3 + 6);
                local_260 = CONCAT44(local_260._4_4_,1);
                local_268 = CONCAT44(local_268._4_4_,2);
                local_278 = (undefined8 *)CONCAT44(local_278._4_4_,1);
                local_280 = (undefined8 *)CONCAT44(local_280._4_4_,2);
                local_288 = (undefined8 *)local_1a0;
                uVar5 = FUN_1401eece0(param_1,param_2,2,1);
                if (uVar5 == 0) {
                  (*DAT_140379360)(local_1a0);
                  *param_3 = 1;
                  return 0;
                }
                (*DAT_140379360)();
                puVar4 = (undefined8 *)(param_3 + 10);
              }
            }
            else {
              iVar1 = (*DAT_1403793a0)(*(undefined8 *)(param_3 + 6),1);
              if (iVar1 == 0) {
                uVar5 = 0x12;
                puVar4 = local_1a8;
              }
              else {
                local_270 = *(undefined8 **)(param_3 + 2);
                local_258 = 0;
                local_260 = 0;
                local_268 = 0;
                local_288 = *(undefined8 **)(param_3 + 6);
                local_278 = (undefined8 *)CONCAT44(local_278._4_4_,1);
                local_280 = (undefined8 *)CONCAT44(local_280._4_4_,2);
                uVar2 = FUN_1401eece0(param_1,param_2,2);
                uVar5 = (uint)uVar2;
                puVar4 = local_1a8;
                if (uVar5 == 0) {
                  *param_3 = 0;
                  return uVar2;
                }
              }
            }
          }
        }
      }
      local_270 = (undefined8 *)*puVar4;
      local_268 = 0;
      local_278 = (undefined8 *)*local_180;
      local_280 = (undefined8 *)*local_188;
      local_288 = (undefined8 *)*local_198;
      FUN_1401eec90(*local_190,*(undefined8 *)(param_3 + 2),*(undefined8 *)(param_3 + 6),*local_178)
      ;
      uVar2 = (ulonglong)uVar5;
    }
  }
  return uVar2;
}



undefined8 FUN_1401ce100(longlong param_1,longlong param_2,int param_3,int *param_4)

{
  undefined8 uVar1;
  undefined4 local_res8 [8];
  
  local_res8[0] = 0;
  if (((param_1 != 0) && (param_2 != 0)) && (param_4 != (int *)0x0)) {
    if (*param_4 == 1) {
      if (param_3 == 1) {
        uVar1 = FUN_1401ef360(param_1,param_2,3,1,local_res8,2,1,*(undefined8 *)(param_4 + 6),2,1,
                              *(undefined8 *)(param_4 + 2),2,1,*(undefined8 *)(param_4 + 4),2,1,
                              *(undefined8 *)(param_4 + 8),2,1,*(undefined8 *)(param_4 + 10),2,1,
                              *(undefined8 *)(param_4 + 0xe),2,1,*(undefined8 *)(param_4 + 0x10),2,1
                              ,*(undefined8 *)(param_4 + 0xc),0,0,0);
        return uVar1;
      }
    }
    else if (param_3 == 1) {
      return 0x12;
    }
    uVar1 = FUN_1401ef360(param_1,param_2,2,1,*(undefined8 *)(param_4 + 6),2,1,
                          *(undefined8 *)(param_4 + 2),0,0,0);
    return uVar1;
  }
  return 0x10;
}



ulonglong FUN_1401ce2b0(undefined8 param_1,undefined4 param_2,int param_3,uint param_4,
                       undefined4 *param_5)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  uint uVar3;
  int iVar4;
  ulonglong uVar5;
  undefined8 *puVar6;
  undefined8 *puVar7;
  undefined8 uVar8;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38 [2];
  
  if (DAT_140379340 == 0) {
    return 0x10;
  }
  if (param_5 == (undefined4 *)0x0) {
    return 0x10;
  }
  if (0x180 < param_3 - 0x80U) {
    return 3;
  }
  if ((int)param_4 < 3) {
    return 0x10;
  }
  if ((param_4 & 1) == 0) {
    return 0x10;
  }
  uVar5 = FUN_1401e9d00(param_2);
  if ((int)uVar5 != 0) {
    return uVar5;
  }
  uVar5 = FUN_1401eec00(&local_48,&local_40,&local_58,&local_50,local_38,0);
  if ((int)uVar5 != 0) {
    return uVar5;
  }
  uVar3 = (*DAT_140379378)(local_38[0],param_4);
  uVar5 = (ulonglong)uVar3;
  if (uVar3 == 0) {
    do {
      uVar3 = FUN_1401ef4c0(local_48,param_3 / 2,param_1,param_2);
      uVar5 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401ce5e2;
      uVar3 = (*DAT_140379400)(local_48,1,local_58);
      uVar5 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401ce5e2;
      uVar3 = (*DAT_140379438)(local_58,local_38[0],local_50);
      uVar5 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401ce5e2;
      iVar4 = (*DAT_1403793a0)(local_50,1);
    } while (iVar4 != 0);
    do {
      uVar3 = FUN_1401ef4c0(local_40,param_3 / 2,param_1,param_2);
      uVar5 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401ce5e2;
      uVar3 = (*DAT_140379400)(local_40,1,local_58);
      uVar5 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401ce5e2;
      uVar3 = (*DAT_140379438)(local_58,local_38[0],local_50);
      uVar5 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401ce5e2;
      iVar4 = (*DAT_1403793a0)(local_50,1);
    } while (iVar4 != 0);
    uVar3 = (*DAT_140379400)(local_48,1,local_50);
    uVar5 = (ulonglong)uVar3;
    if (uVar3 == 0) {
      uVar3 = (*DAT_140379440)(local_58,local_50,local_58);
      uVar5 = (ulonglong)uVar3;
      if (uVar3 == 0) {
        uVar8 = 0;
        puVar1 = (undefined8 *)(param_5 + 10);
        puVar2 = (undefined8 *)(param_5 + 8);
        puVar6 = puVar2;
        puVar7 = puVar1;
        uVar3 = FUN_1401eec00(param_5 + 2,param_5 + 4,param_5 + 6,param_5 + 0x10,param_5 + 0xe,
                              param_5 + 0xc,puVar2,puVar1,0);
        uVar5 = (ulonglong)uVar3;
        if (uVar3 == 0) {
          uVar3 = (*DAT_140379378)(*(undefined8 *)(param_5 + 2),param_4);
          uVar5 = (ulonglong)uVar3;
          if (uVar3 == 0) {
            uVar3 = (*DAT_140379458)(*(undefined8 *)(param_5 + 2),local_58,
                                     *(undefined8 *)(param_5 + 4));
            uVar5 = (ulonglong)uVar3;
            if (uVar3 == 0) {
              uVar3 = (*DAT_140379408)(local_48,local_40,*(undefined8 *)(param_5 + 6));
              uVar5 = (ulonglong)uVar3;
              if (uVar3 == 0) {
                uVar3 = (*DAT_140379400)(local_48,1,local_58);
                uVar5 = (ulonglong)uVar3;
                if (uVar3 == 0) {
                  uVar3 = (*DAT_140379400)(local_40,1,local_50);
                  uVar5 = (ulonglong)uVar3;
                  if (uVar3 == 0) {
                    uVar3 = (*DAT_140379420)(*(undefined8 *)(param_5 + 4),local_58,0,
                                             *(undefined8 *)(param_5 + 0xe));
                    uVar5 = (ulonglong)uVar3;
                    if (uVar3 == 0) {
                      uVar3 = (*DAT_140379420)(*(undefined8 *)(param_5 + 4),local_50,0,
                                               *(undefined8 *)(param_5 + 0x10));
                      uVar5 = (ulonglong)uVar3;
                      if (uVar3 == 0) {
                        uVar3 = (*DAT_140379458)(local_40,local_48,*(undefined8 *)(param_5 + 0xc));
                        uVar5 = (ulonglong)uVar3;
                        if (uVar3 == 0) {
                          uVar3 = (*DAT_140379370)(local_48,*puVar2);
                          uVar5 = (ulonglong)uVar3;
                          if (uVar3 == 0) {
                            uVar3 = (*DAT_140379370)(local_40,*puVar1);
                            uVar5 = (ulonglong)uVar3;
                            if (uVar3 == 0) {
                              *param_5 = 1;
                              goto LAB_1401ce624;
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
LAB_1401ce5e2:
  puVar7 = *(undefined8 **)(param_5 + 10);
  uVar8 = 0;
  puVar6 = *(undefined8 **)(param_5 + 8);
  FUN_1401eec90(*(undefined8 *)(param_5 + 4),*(undefined8 *)(param_5 + 2),
                *(undefined8 *)(param_5 + 6),*(undefined8 *)(param_5 + 0x10),
                *(undefined8 *)(param_5 + 0xe),*(undefined8 *)(param_5 + 0xc),puVar6,puVar7,0);
LAB_1401ce624:
  FUN_1401eec90(local_38[0],local_50,local_58,local_48,local_40,0,puVar6,puVar7,uVar8);
  return uVar5;
}



undefined8
FUN_1401ce690(longlong param_1,undefined4 param_2,longlong param_3,uint *param_4,undefined8 param_5,
             undefined4 param_6,ulonglong param_7,undefined4 param_8,undefined4 param_9,int param_10
             ,longlong param_11)

{
  undefined4 uVar1;
  uint uVar2;
  int iVar3;
  undefined8 uVar4;
  uint local_res8 [2];
  undefined4 local_res10;
  undefined8 in_stack_ffffffffffffff98;
  undefined4 uVar6;
  ulonglong uVar5;
  undefined8 in_stack_ffffffffffffffa0;
  undefined4 uVar7;
  undefined8 in_stack_ffffffffffffffa8;
  undefined4 uVar8;
  undefined8 in_stack_ffffffffffffffb0;
  undefined4 uVar9;
  
  uVar7 = (undefined4)((ulonglong)in_stack_ffffffffffffffa0 >> 0x20);
  uVar6 = (undefined4)((ulonglong)in_stack_ffffffffffffff98 >> 0x20);
  uVar8 = (undefined4)((ulonglong)in_stack_ffffffffffffffa8 >> 0x20);
  uVar9 = (undefined4)((ulonglong)in_stack_ffffffffffffffb0 >> 0x20);
  if (((param_1 != 0) && (param_3 != 0)) && (param_4 != (uint *)0x0)) {
    if (param_11 != 0) {
      if ((param_10 == 1) || (param_10 == 2)) {
        local_res10 = param_2;
        uVar4 = FUN_1401e9d00(param_8);
        if (((int)uVar4 == 0) &&
           ((param_10 != 2 || (uVar4 = FUN_1401efb80(param_9), (int)uVar4 == 0)))) {
          uVar1 = (*DAT_1403793a8)(*(undefined8 *)(param_11 + 0x18));
          uVar2 = (*DAT_1403793d0)(*(undefined8 *)(param_11 + 0x18));
          local_res8[0] = *param_4;
          if (local_res8[0] < uVar2) {
            *param_4 = uVar2;
            uVar4 = 6;
          }
          else {
            if (param_10 == 2) {
              uVar5 = CONCAT44(uVar6,uVar1);
              uVar4 = FUN_1401ef7f0(param_1,local_res10,param_5,param_6,uVar5,param_7,
                                    CONCAT44(uVar8,param_8),CONCAT44(uVar9,param_9),param_3,
                                    local_res8);
              iVar3 = (int)uVar4;
            }
            else {
              uVar4 = FUN_1401ef620(param_1,local_res10,2,uVar1,param_7,CONCAT44(uVar7,param_8),
                                    param_3,local_res8);
              iVar3 = (int)uVar4;
              uVar5 = param_7;
            }
            if (iVar3 == 0) {
              uVar4 = (*DAT_1403794c0)(param_3,local_res8[0],param_3,param_4,
                                       uVar5 & 0xffffffff00000000,param_11);
            }
          }
        }
      }
      else {
        uVar4 = 0x18;
      }
      return uVar4;
    }
    return 0x10;
  }
  return 0x10;
}



ulonglong FUN_1401ce850(undefined8 param_1,uint param_2,longlong param_3,longlong param_4,
                       undefined8 param_5,undefined4 param_6,undefined4 param_7,int param_8,
                       undefined4 *param_9,longlong param_10)

{
  undefined4 uVar1;
  uint uVar2;
  ulonglong uVar3;
  void *_Memory;
  uint local_res18 [2];
  undefined8 in_stack_ffffffffffffff98;
  undefined4 uVar4;
  
  uVar4 = (undefined4)((ulonglong)in_stack_ffffffffffffff98 >> 0x20);
  if ((param_3 == 0) || (param_4 == 0)) {
    return 0x10;
  }
  if (param_10 == 0) {
    return 0x10;
  }
  if (param_9 != (undefined4 *)0x0) {
    *param_9 = 0;
    if (param_8 != 1) {
      if (param_8 != 2) {
        return 0x18;
      }
      uVar3 = FUN_1401efb80(param_7);
      if ((int)uVar3 != 0) {
        return uVar3;
      }
    }
    uVar1 = (*DAT_1403793a8)(*(undefined8 *)(param_10 + 0x18));
    uVar2 = (*DAT_1403793d0)(*(undefined8 *)(param_10 + 0x18));
    if (uVar2 == param_2) {
      _Memory = malloc((ulonglong)param_2);
      if (_Memory == (void *)0x0) {
        uVar3 = 0xd;
      }
      else {
        local_res18[0] = param_2;
        uVar2 = (*DAT_1403794c0)(param_1,param_2,_Memory,local_res18,CONCAT44(uVar4,1),param_10);
        uVar3 = (ulonglong)uVar2;
        if (uVar2 == 0) {
          if (param_8 == 2) {
            uVar2 = FUN_1401efd10(_Memory,local_res18[0],param_5,param_6,uVar1,param_7,param_3,
                                  param_4,param_9);
          }
          else {
            uVar2 = FUN_1401efbe0(_Memory,local_res18[0],2,uVar1,param_3,param_4,param_9);
          }
          uVar3 = (ulonglong)uVar2;
          free(_Memory);
        }
        else {
          free(_Memory);
        }
      }
    }
    else {
      uVar3 = 7;
    }
    return uVar3;
  }
  return 0x10;
}



undefined4 * FUN_1401cea30(undefined4 *param_1)

{
  FUN_14019d7a0(param_1 + 2);
  *param_1 = 0;
  return param_1;
}



uint FUN_1401cea60(uint param_1,byte *param_2,uint param_3)

{
  byte bVar1;
  int iVar2;
  ulonglong uVar3;
  uint uVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  int iVar8;
  int iVar9;
  int iVar10;
  int iVar11;
  int iVar12;
  int iVar13;
  int iVar14;
  int iVar15;
  int iVar16;
  int iVar17;
  int iVar18;
  int iVar19;
  byte *pbVar20;
  
  uVar4 = param_1 & 0xffff;
  param_1 = param_1 >> 0x10;
  if (param_3 == 1) {
    uVar4 = uVar4 + *param_2;
    if (0xfff0 < uVar4) {
      uVar4 = uVar4 - 0xfff1;
    }
    param_1 = param_1 + uVar4;
    if (0xfff0 < param_1) {
      return (param_1 - 0xfff1) * 0x10000 | uVar4;
    }
  }
  else {
    if (param_2 == (byte *)0x0) {
      return 1;
    }
    if (param_3 < 0x10) {
      for (; param_3 != 0; param_3 = param_3 - 1) {
        bVar1 = *param_2;
        param_2 = param_2 + 1;
        uVar4 = uVar4 + bVar1;
        param_1 = param_1 + uVar4;
      }
      if (0xfff0 < uVar4) {
        uVar4 = uVar4 - 0xfff1;
      }
      return (param_1 + (param_1 / 0xfff1) * 0xf) * 0x10000 | uVar4;
    }
    if (0x15af < param_3) {
      uVar3 = (ulonglong)param_3 / 0x15b0;
      do {
        param_3 = param_3 - 0x15b0;
        iVar2 = 0x15b;
        pbVar20 = param_2;
        do {
          param_2 = pbVar20 + 0x10;
          iVar5 = uVar4 + *pbVar20;
          iVar6 = iVar5 + (uint)pbVar20[1];
          iVar7 = iVar6 + (uint)pbVar20[2];
          iVar8 = iVar7 + (uint)pbVar20[3];
          iVar9 = iVar8 + (uint)pbVar20[4];
          iVar10 = iVar9 + (uint)pbVar20[5];
          iVar11 = iVar10 + (uint)pbVar20[6];
          iVar12 = iVar11 + (uint)pbVar20[7];
          iVar13 = iVar12 + (uint)pbVar20[8];
          iVar14 = iVar13 + (uint)pbVar20[9];
          iVar15 = iVar14 + (uint)pbVar20[10];
          iVar16 = iVar15 + (uint)pbVar20[0xb];
          iVar17 = iVar16 + (uint)pbVar20[0xc];
          iVar18 = iVar17 + (uint)pbVar20[0xd];
          iVar19 = iVar18 + (uint)pbVar20[0xe];
          uVar4 = iVar19 + (uint)pbVar20[0xf];
          param_1 = param_1 + iVar5 + iVar6 + iVar7 + iVar8 + iVar9 + iVar10 + iVar11 + iVar12 +
                    iVar13 + iVar14 + iVar15 + iVar16 + iVar17 + iVar18 + iVar19 + uVar4;
          iVar2 = iVar2 + -1;
          pbVar20 = param_2;
        } while (iVar2 != 0);
        uVar4 = uVar4 % 0xfff1;
        param_1 = param_1 % 0xfff1;
        uVar3 = uVar3 - 1;
      } while (uVar3 != 0);
    }
    if (param_3 != 0) {
      if (0xf < param_3) {
        uVar3 = (ulonglong)(param_3 >> 4);
        pbVar20 = param_2;
        do {
          param_3 = param_3 - 0x10;
          param_2 = pbVar20 + 0x10;
          iVar2 = uVar4 + *pbVar20;
          iVar5 = iVar2 + (uint)pbVar20[1];
          iVar6 = iVar5 + (uint)pbVar20[2];
          iVar7 = iVar6 + (uint)pbVar20[3];
          iVar8 = iVar7 + (uint)pbVar20[4];
          iVar9 = iVar8 + (uint)pbVar20[5];
          iVar10 = iVar9 + (uint)pbVar20[6];
          iVar11 = iVar10 + (uint)pbVar20[7];
          iVar12 = iVar11 + (uint)pbVar20[8];
          iVar13 = iVar12 + (uint)pbVar20[9];
          iVar14 = iVar13 + (uint)pbVar20[10];
          iVar15 = iVar14 + (uint)pbVar20[0xb];
          iVar16 = iVar15 + (uint)pbVar20[0xc];
          iVar17 = iVar16 + (uint)pbVar20[0xd];
          iVar18 = iVar17 + (uint)pbVar20[0xe];
          uVar4 = iVar18 + (uint)pbVar20[0xf];
          param_1 = param_1 + iVar2 + iVar5 + iVar6 + iVar7 + iVar8 + iVar9 + iVar10 + iVar11 +
                    iVar12 + iVar13 + iVar14 + iVar15 + iVar16 + iVar17 + iVar18 + uVar4;
          uVar3 = uVar3 - 1;
          pbVar20 = param_2;
        } while (uVar3 != 0);
      }
      for (; param_3 != 0; param_3 = param_3 - 1) {
        bVar1 = *param_2;
        param_2 = param_2 + 1;
        uVar4 = uVar4 + bVar1;
        param_1 = param_1 + uVar4;
      }
      uVar4 = uVar4 % 0xfff1;
      param_1 = param_1 % 0xfff1;
    }
  }
  return param_1 << 0x10 | uVar4;
}



void FUN_1401ced70(longlong param_1)

{
  longlong *plVar1;
  int *piVar2;
  longlong lVar3;
  uint uVar4;
  
  uVar4 = *(uint *)(*(longlong *)(param_1 + 0x28) + 0x28);
  if (*(uint *)(param_1 + 0x18) < uVar4) {
    uVar4 = *(uint *)(param_1 + 0x18);
  }
  if (uVar4 != 0) {
    memcpy(*(void **)(param_1 + 0x10),*(void **)(*(longlong *)(param_1 + 0x28) + 0x20),
           (ulonglong)uVar4);
    *(longlong *)(param_1 + 0x10) = *(longlong *)(param_1 + 0x10) + (ulonglong)uVar4;
    plVar1 = (longlong *)(*(longlong *)(param_1 + 0x28) + 0x20);
    *plVar1 = *plVar1 + (ulonglong)uVar4;
    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + uVar4;
    *(int *)(param_1 + 0x18) = *(int *)(param_1 + 0x18) - uVar4;
    piVar2 = (int *)(*(longlong *)(param_1 + 0x28) + 0x28);
    *piVar2 = *piVar2 - uVar4;
    lVar3 = *(longlong *)(param_1 + 0x28);
    if (*(int *)(lVar3 + 0x28) == 0) {
      *(undefined8 *)(lVar3 + 0x20) = *(undefined8 *)(lVar3 + 0x10);
    }
  }
  return;
}



undefined8 FUN_1401cedf0(longlong param_1)

{
  int iVar1;
  longlong lVar2;
  undefined8 uVar3;
  
  if ((param_1 == 0) || (lVar2 = *(longlong *)(param_1 + 0x28), lVar2 == 0)) {
    return 0xfffffffe;
  }
  iVar1 = *(int *)(lVar2 + 8);
  if ((((iVar1 != 0x2a) && (iVar1 != 0x45)) && (iVar1 != 0x49)) &&
     (((iVar1 != 0x5b && (iVar1 != 0x67)) && ((iVar1 != 0x71 && (iVar1 != 0x29a)))))) {
    return 0xfffffffe;
  }
  if (*(longlong *)(lVar2 + 0x10) != 0) {
    (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40));
  }
  if (*(longlong *)(*(longlong *)(param_1 + 0x28) + 0x68) != 0) {
    (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40));
  }
  if (*(longlong *)(*(longlong *)(param_1 + 0x28) + 0x60) != 0) {
    (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40));
  }
  if (*(longlong *)(*(longlong *)(param_1 + 0x28) + 0x50) != 0) {
    (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40));
  }
  (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40),*(undefined8 *)(param_1 + 0x28));
  uVar3 = 0;
  *(undefined8 *)(param_1 + 0x28) = 0;
  if (iVar1 == 0x71) {
    uVar3 = 0xfffffffd;
  }
  return uVar3;
}



uint FUN_1401ceed0(longlong *param_1,void *param_2,uint param_3)

{
  uint uVar1;
  undefined4 uVar2;
  uint uVar3;
  
  uVar1 = *(uint *)(param_1 + 1);
  uVar3 = uVar1;
  if (param_3 < uVar1) {
    uVar3 = param_3;
  }
  if (uVar3 == 0) {
    return 0;
  }
  *(uint *)(param_1 + 1) = uVar1 - uVar3;
  if (*(int *)(param_1[5] + 0x2c) == 1) {
    uVar2 = FUN_1401cea60(*(undefined4 *)((longlong)param_1 + 0x4c),*param_1,uVar3);
  }
  else {
    if (*(int *)(param_1[5] + 0x2c) != 2) goto LAB_1401cef43;
    uVar2 = FUN_1401ad0b0(*(undefined4 *)((longlong)param_1 + 0x4c),*param_1,uVar3);
  }
  *(undefined4 *)((longlong)param_1 + 0x4c) = uVar2;
LAB_1401cef43:
  memcpy(param_2,(void *)*param_1,(ulonglong)uVar3);
  *param_1 = *param_1 + (ulonglong)uVar3;
  *(int *)((longlong)param_1 + 0xc) = *(int *)((longlong)param_1 + 0xc) + uVar3;
  return uVar3;
}



uint FUN_1401cef70(longlong param_1,uint param_2)

{
  char *pcVar1;
  char *pcVar2;
  ushort uVar3;
  uint uVar4;
  longlong lVar5;
  char *pcVar6;
  uint uVar7;
  uint uVar8;
  char *pcVar9;
  char *pcVar10;
  int iVar11;
  uint uVar12;
  ulonglong uVar13;
  ulonglong uVar14;
  char cVar15;
  char cVar16;
  uint uVar17;
  
  uVar8 = *(uint *)(param_1 + 0x94);
  uVar7 = *(uint *)(param_1 + 0xa4);
  lVar5 = *(longlong *)(param_1 + 0x50);
  uVar13 = (ulonglong)(int)*(uint *)(param_1 + 0xa0);
  uVar14 = (ulonglong)param_2;
  pcVar2 = (char *)((ulonglong)uVar8 + lVar5);
  if (*(int *)(param_1 + 0x44) - 0x106U < uVar8) {
    uVar8 = (uVar8 - *(int *)(param_1 + 0x44)) + 0x106;
  }
  else {
    uVar8 = 0;
  }
  cVar15 = pcVar2[uVar13 - 1];
  cVar16 = pcVar2[uVar13];
  if (*(uint *)(param_1 + 0xb4) <= *(uint *)(param_1 + 0xa0)) {
    uVar7 = uVar7 >> 2;
  }
  uVar4 = *(uint *)(param_1 + 0x9c);
  uVar17 = *(uint *)(param_1 + 0xb8);
  if (uVar4 < *(uint *)(param_1 + 0xb8)) {
    uVar17 = uVar4;
  }
  do {
    iVar11 = (int)uVar13;
    pcVar6 = (char *)(lVar5 + uVar14);
    if ((((pcVar6[iVar11] == cVar16) && (pcVar6[(longlong)iVar11 + -1] == cVar15)) &&
        (*pcVar6 == *pcVar2)) && (pcVar6[1] == pcVar2[1])) {
      pcVar6 = pcVar6 + 2;
      pcVar9 = pcVar2 + 2;
      while (((((pcVar10 = pcVar9 + 1, *pcVar10 == pcVar6[1] &&
                (pcVar10 = pcVar9 + 2, *pcVar10 == pcVar6[2])) &&
               ((pcVar10 = pcVar9 + 3, *pcVar10 == pcVar6[3] &&
                ((pcVar10 = pcVar9 + 4, *pcVar10 == pcVar6[4] &&
                 (pcVar10 = pcVar9 + 5, *pcVar10 == pcVar6[5])))))) &&
              (pcVar10 = pcVar9 + 6, *pcVar10 == pcVar6[6])) &&
             (pcVar10 = pcVar9 + 7, *pcVar10 == pcVar6[7]))) {
        pcVar1 = pcVar6 + 8;
        pcVar6 = pcVar6 + 8;
        pcVar10 = pcVar9 + 8;
        if ((*pcVar10 != *pcVar1) || (pcVar9 = pcVar10, pcVar2 + 0x102 <= pcVar10)) break;
      }
      uVar12 = ((int)pcVar10 - (int)(pcVar2 + 0x102)) + 0x102;
      if (iVar11 < (int)uVar12) {
        *(int *)(param_1 + 0x98) = (int)uVar14;
        uVar13 = (ulonglong)uVar12;
        if ((int)uVar17 <= (int)uVar12) break;
        cVar15 = pcVar2[(longlong)(int)uVar12 + -1];
        cVar16 = pcVar2[(int)uVar12];
      }
    }
    uVar12 = (uint)uVar13;
    uVar3 = *(ushort *)(*(longlong *)(param_1 + 0x60) + (*(uint *)(param_1 + 0x4c) & uVar14) * 2);
    uVar14 = (ulonglong)uVar3;
    if (uVar3 <= uVar8) break;
    uVar7 = uVar7 - 1;
    lVar5 = *(longlong *)(param_1 + 0x50);
  } while (uVar7 != 0);
  if (uVar12 <= uVar4) {
    uVar4 = uVar12;
  }
  return uVar4;
}



void FUN_1401cf120(longlong *param_1)

{
  ushort *puVar1;
  uint uVar2;
  short sVar3;
  short *psVar4;
  ulonglong _Size;
  int iVar5;
  uint uVar6;
  uint uVar7;
  ulonglong uVar8;
  
  uVar2 = *(uint *)((longlong)param_1 + 0x44);
  _Size = (ulonglong)uVar2;
  while( true ) {
    iVar5 = ((int)param_1[0xb] - *(int *)((longlong)param_1 + 0x9c)) -
            *(uint *)((longlong)param_1 + 0x94);
    if ((uVar2 - 0x106) + *(int *)((longlong)param_1 + 0x44) <= *(uint *)((longlong)param_1 + 0x94))
    {
      memcpy((void *)param_1[10],(void *)(param_1[10] + _Size),_Size);
      uVar8 = (ulonglong)*(uint *)((longlong)param_1 + 0x74);
      *(uint *)(param_1 + 0x13) = (int)param_1[0x13] - uVar2;
      *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) - uVar2;
      *(int *)((longlong)param_1 + 0x84) = *(int *)((longlong)param_1 + 0x84) - uVar2;
      psVar4 = (short *)(param_1[0xd] + uVar8 * 2);
      do {
        puVar1 = (ushort *)(psVar4 + -1);
        psVar4 = psVar4 + -1;
        if (*puVar1 < uVar2) {
          sVar3 = 0;
        }
        else {
          sVar3 = *puVar1 - (short)uVar2;
        }
        uVar6 = (int)uVar8 - 1;
        uVar8 = (ulonglong)uVar6;
        *psVar4 = sVar3;
      } while (uVar6 != 0);
      psVar4 = (short *)(param_1[0xc] + _Size * 2);
      uVar6 = uVar2;
      do {
        puVar1 = (ushort *)(psVar4 + -1);
        psVar4 = psVar4 + -1;
        if (*puVar1 < uVar2) {
          sVar3 = 0;
        }
        else {
          sVar3 = *puVar1 - (short)uVar2;
        }
        uVar6 = uVar6 - 1;
        *psVar4 = sVar3;
      } while (uVar6 != 0);
      iVar5 = iVar5 + uVar2;
    }
    if (*(int *)(*param_1 + 8) == 0) break;
    iVar5 = FUN_1401ceed0(*param_1,(ulonglong)*(uint *)((longlong)param_1 + 0x9c) +
                                   (ulonglong)*(uint *)((longlong)param_1 + 0x94) + param_1[10],
                          iVar5);
    *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) + iVar5;
    uVar6 = *(uint *)((longlong)param_1 + 0x9c);
    if (2 < uVar6) {
      uVar7 = (uint)*(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x94) + param_1[10]);
      *(uint *)(param_1 + 0xe) = uVar7;
      *(uint *)(param_1 + 0xe) =
           (uVar7 << ((byte)(int)param_1[0x10] & 0x1f) ^
           (uint)*(byte *)((ulonglong)(*(uint *)((longlong)param_1 + 0x94) + 1) + param_1[10])) &
           *(uint *)((longlong)param_1 + 0x7c);
    }
    if ((0x105 < uVar6) || (*(int *)(*param_1 + 8) == 0)) {
      uVar2 = *(uint *)(param_1 + 0x2e3);
      uVar7 = *(uint *)(param_1 + 0xb);
      if (uVar2 < uVar7) {
        uVar6 = uVar6 + *(int *)((longlong)param_1 + 0x94);
        if (uVar2 < uVar6) {
          uVar2 = uVar7 - uVar6;
          if (0x102 < uVar7 - uVar6) {
            uVar2 = 0x102;
          }
          memset((void *)((ulonglong)uVar6 + param_1[10]),0,(ulonglong)uVar2);
          *(uint *)(param_1 + 0x2e3) = uVar2 + uVar6;
        }
        else if (uVar2 < uVar6 + 0x102) {
          uVar6 = (uVar6 - uVar2) + 0x102;
          if (uVar7 - uVar2 < uVar6) {
            uVar6 = uVar7 - uVar2;
          }
          memset((void *)((ulonglong)uVar2 + param_1[10]),0,(ulonglong)uVar6);
          *(uint *)(param_1 + 0x2e3) = (int)param_1[0x2e3] + uVar6;
        }
      }
      return;
    }
  }
  return;
}



undefined8 FUN_1401cf2e0(longlong *param_1,int param_2)

{
  longlong *plVar1;
  int *piVar2;
  uint uVar3;
  uint uVar4;
  longlong lVar5;
  longlong lVar6;
  uint uVar7;
  uint uVar8;
  
  uVar4 = (int)param_1[3] - 5;
  uVar3 = 0xffff;
  if (uVar4 < 0xffff) {
    uVar3 = uVar4;
  }
  lVar6 = 0;
  do {
    uVar4 = *(uint *)((longlong)param_1 + 0x9c);
    if (uVar4 < 2) {
      FUN_1401cf120(param_1);
      uVar4 = *(uint *)((longlong)param_1 + 0x9c);
      if (uVar4 == 0) {
        if (param_2 == 0) {
          return 0;
        }
        uVar3 = *(uint *)((longlong)param_1 + 0x84);
        if (-1 < (int)uVar3) {
          lVar6 = (ulonglong)uVar3 + param_1[10];
        }
        FUN_1401d3530(param_1,lVar6,*(int *)((longlong)param_1 + 0x94) - uVar3,param_2 == 4);
        *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
        FUN_1401ced70(*param_1);
        if (*(int *)(*param_1 + 0x18) != 0) {
          if (param_2 == 4) {
            return 3;
          }
          return 1;
        }
        if (param_2 == 4) {
          return 2;
        }
        return 0;
      }
    }
    uVar8 = *(uint *)((longlong)param_1 + 0x84);
    piVar2 = (int *)((longlong)param_1 + 0x94);
    *piVar2 = *piVar2 + uVar4;
    uVar4 = *(uint *)((longlong)param_1 + 0x94);
    uVar7 = uVar8 + uVar3;
    *(undefined4 *)((longlong)param_1 + 0x9c) = 0;
    if ((*piVar2 == 0) || (uVar7 <= uVar4)) {
      *(uint *)((longlong)param_1 + 0x94) = uVar7;
      *(uint *)((longlong)param_1 + 0x9c) = uVar4 - uVar7;
      lVar5 = lVar6;
      if (-1 < (int)uVar8) {
        lVar5 = (ulonglong)uVar8 + param_1[10];
      }
      FUN_1401d3530(param_1,lVar5,uVar7 - uVar8,0);
      lVar5 = *param_1;
      *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
      uVar4 = *(uint *)(*(longlong *)(lVar5 + 0x28) + 0x28);
      if (*(uint *)(lVar5 + 0x18) < uVar4) {
        uVar4 = *(uint *)(lVar5 + 0x18);
      }
      if (uVar4 != 0) {
        memcpy(*(void **)(lVar5 + 0x10),*(void **)(*(longlong *)(lVar5 + 0x28) + 0x20),
               (ulonglong)uVar4);
        *(longlong *)(lVar5 + 0x10) = *(longlong *)(lVar5 + 0x10) + (ulonglong)uVar4;
        plVar1 = (longlong *)(*(longlong *)(lVar5 + 0x28) + 0x20);
        *plVar1 = *plVar1 + (ulonglong)uVar4;
        *(int *)(lVar5 + 0x1c) = *(int *)(lVar5 + 0x1c) + uVar4;
        *(int *)(lVar5 + 0x18) = *(int *)(lVar5 + 0x18) - uVar4;
        piVar2 = (int *)(*(longlong *)(lVar5 + 0x28) + 0x28);
        *piVar2 = *piVar2 - uVar4;
        lVar5 = *(longlong *)(lVar5 + 0x28);
        if (*(int *)(lVar5 + 0x28) == 0) {
          *(undefined8 *)(lVar5 + 0x20) = *(undefined8 *)(lVar5 + 0x10);
        }
      }
      if (*(int *)(*param_1 + 0x18) == 0) {
        return 0;
      }
    }
    uVar4 = *(uint *)((longlong)param_1 + 0x84);
    uVar8 = *(int *)((longlong)param_1 + 0x94) - uVar4;
    if (*(int *)((longlong)param_1 + 0x44) - 0x106U <= uVar8) {
      lVar5 = lVar6;
      if (-1 < (int)uVar4) {
        lVar5 = (ulonglong)uVar4 + param_1[10];
      }
      FUN_1401d3530(param_1,lVar5,uVar8,0);
      lVar5 = *param_1;
      *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
      uVar4 = *(uint *)(*(longlong *)(lVar5 + 0x28) + 0x28);
      if (*(uint *)(lVar5 + 0x18) < uVar4) {
        uVar4 = *(uint *)(lVar5 + 0x18);
      }
      if (uVar4 != 0) {
        memcpy(*(void **)(lVar5 + 0x10),*(void **)(*(longlong *)(lVar5 + 0x28) + 0x20),
               (ulonglong)uVar4);
        *(longlong *)(lVar5 + 0x10) = *(longlong *)(lVar5 + 0x10) + (ulonglong)uVar4;
        plVar1 = (longlong *)(*(longlong *)(lVar5 + 0x28) + 0x20);
        *plVar1 = *plVar1 + (ulonglong)uVar4;
        *(int *)(lVar5 + 0x1c) = *(int *)(lVar5 + 0x1c) + uVar4;
        *(int *)(lVar5 + 0x18) = *(int *)(lVar5 + 0x18) - uVar4;
        piVar2 = (int *)(*(longlong *)(lVar5 + 0x28) + 0x28);
        *piVar2 = *piVar2 - uVar4;
        lVar5 = *(longlong *)(lVar5 + 0x28);
        if (*(int *)(lVar5 + 0x28) == 0) {
          *(undefined8 *)(lVar5 + 0x20) = *(undefined8 *)(lVar5 + 0x10);
        }
      }
      if (*(int *)(*param_1 + 0x18) == 0) {
        return 0;
      }
    }
  } while( true );
}



undefined8 FUN_1401cf560(longlong *param_1,int param_2)

{
  longlong *plVar1;
  int *piVar2;
  short *psVar3;
  undefined4 uVar4;
  byte bVar5;
  longlong lVar6;
  longlong lVar7;
  short sVar8;
  ushort uVar9;
  uint uVar10;
  bool bVar11;
  
  lVar7 = 0;
  do {
    uVar10 = *(uint *)((longlong)param_1 + 0x9c);
    if (uVar10 < 0x106) {
      FUN_1401cf120(param_1);
      uVar10 = *(uint *)((longlong)param_1 + 0x9c);
      if ((uVar10 < 0x106) && (param_2 == 0)) {
        return 0;
      }
      if (uVar10 == 0) {
        uVar10 = *(uint *)((longlong)param_1 + 0x84);
        if (-1 < (int)uVar10) {
          lVar7 = (ulonglong)uVar10 + param_1[10];
        }
        FUN_1401d3530(param_1,lVar7,*(int *)((longlong)param_1 + 0x94) - uVar10,param_2 == 4);
        *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
        FUN_1401ced70(*param_1);
        if (*(int *)(*param_1 + 0x18) != 0) {
          if (param_2 == 4) {
            return 3;
          }
          return 1;
        }
        if (param_2 == 4) {
          return 2;
        }
        return 0;
      }
    }
    if (2 < uVar10) {
      uVar10 = ((uint)*(byte *)((ulonglong)(*(uint *)((longlong)param_1 + 0x94) + 2) + param_1[10])
               ^ (int)param_1[0xe] << ((byte)(int)param_1[0x10] & 0x1f)) &
               *(uint *)((longlong)param_1 + 0x7c);
      *(uint *)(param_1 + 0xe) = uVar10;
      *(undefined2 *)
       (param_1[0xc] +
       (ulonglong)(*(uint *)((longlong)param_1 + 0x94) & *(uint *)((longlong)param_1 + 0x4c)) * 2) =
           *(undefined2 *)(param_1[0xd] + (ulonglong)uVar10 * 2);
      uVar9 = *(ushort *)
               (param_1[0xc] +
               (ulonglong)
               (*(uint *)((longlong)param_1 + 0x94) & *(uint *)((longlong)param_1 + 0x4c)) * 2);
      *(undefined2 *)(param_1[0xd] + (ulonglong)*(uint *)(param_1 + 0xe) * 2) =
           *(undefined2 *)((longlong)param_1 + 0x94);
      if ((uVar9 != 0) &&
         (*(int *)((longlong)param_1 + 0x94) - (uint)uVar9 <=
          *(int *)((longlong)param_1 + 0x44) - 0x106U)) {
        uVar4 = FUN_1401cef70(param_1);
        *(undefined4 *)(param_1 + 0x11) = uVar4;
      }
    }
    if (*(uint *)(param_1 + 0x11) < 3) {
      bVar5 = *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x94) + param_1[10]);
      *(undefined2 *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) = 0;
      *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar5;
      *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
      psVar3 = (short *)((longlong)param_1 + (ulonglong)bVar5 * 4 + 0xbc);
      *psVar3 = *psVar3 + 1;
      bVar11 = *(int *)((longlong)param_1 + 0x16f4) == (int)param_1[0x2de] + -1;
      *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) + -1;
LAB_1401cf83c:
      *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
    }
    else {
      sVar8 = *(short *)((longlong)param_1 + 0x94) - (short)param_1[0x13];
      lVar6 = param_1[0x11];
      *(short *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) = sVar8;
      bVar5 = (char)lVar6 - 3;
      uVar9 = sVar8 - 1;
      *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar5;
      *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
      psVar3 = (short *)((longlong)param_1 + (ulonglong)(byte)(&DAT_140276ab0)[bVar5] * 4 + 0x4c0);
      *psVar3 = *psVar3 + 1;
      if (uVar9 < 0x100) {
        bVar5 = (&DAT_1402768b0)[uVar9];
      }
      else {
        bVar5 = (&DAT_1402769b0)[uVar9 >> 7];
      }
      psVar3 = (short *)((longlong)param_1 + (longlong)(int)(uint)bVar5 * 4 + 0x9b0);
      *psVar3 = *psVar3 + 1;
      bVar11 = *(int *)((longlong)param_1 + 0x16f4) == (int)param_1[0x2de] + -1;
      uVar10 = *(uint *)(param_1 + 0x11);
      *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) - uVar10;
      if ((uVar10 <= *(uint *)(param_1 + 0x15)) && (2 < *(uint *)((longlong)param_1 + 0x9c))) {
        *(uint *)(param_1 + 0x11) = uVar10 - 1;
        do {
          *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
          uVar10 = ((uint)*(byte *)((ulonglong)(*(uint *)((longlong)param_1 + 0x94) + 2) +
                                   param_1[10]) ^
                   (int)param_1[0xe] << ((byte)(int)param_1[0x10] & 0x1f)) &
                   *(uint *)((longlong)param_1 + 0x7c);
          *(uint *)(param_1 + 0xe) = uVar10;
          *(undefined2 *)
           (param_1[0xc] +
           (ulonglong)(*(uint *)((longlong)param_1 + 0x94) & *(uint *)((longlong)param_1 + 0x4c)) *
           2) = *(undefined2 *)(param_1[0xd] + (ulonglong)uVar10 * 2);
          *(undefined2 *)(param_1[0xd] + (ulonglong)*(uint *)(param_1 + 0xe) * 2) =
               *(undefined2 *)((longlong)param_1 + 0x94);
          plVar1 = param_1 + 0x11;
          *(int *)plVar1 = (int)*plVar1 + -1;
        } while ((int)*plVar1 != 0);
        goto LAB_1401cf83c;
      }
      *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + uVar10;
      *(undefined4 *)(param_1 + 0x11) = 0;
      uVar10 = (uint)*(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x94) + param_1[10]);
      *(uint *)(param_1 + 0xe) = uVar10;
      *(uint *)(param_1 + 0xe) =
           (uVar10 << ((byte)(int)param_1[0x10] & 0x1f) ^
           (uint)*(byte *)((ulonglong)(*(uint *)((longlong)param_1 + 0x94) + 1) + param_1[10])) &
           *(uint *)((longlong)param_1 + 0x7c);
    }
    if (bVar11) {
      uVar10 = *(uint *)((longlong)param_1 + 0x84);
      lVar6 = lVar7;
      if (-1 < (int)uVar10) {
        lVar6 = (ulonglong)uVar10 + param_1[10];
      }
      FUN_1401d3530(param_1,lVar6,*(int *)((longlong)param_1 + 0x94) - uVar10,0);
      lVar6 = *param_1;
      *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
      uVar10 = *(uint *)(*(longlong *)(lVar6 + 0x28) + 0x28);
      if (*(uint *)(lVar6 + 0x18) < uVar10) {
        uVar10 = *(uint *)(lVar6 + 0x18);
      }
      if (uVar10 != 0) {
        memcpy(*(void **)(lVar6 + 0x10),*(void **)(*(longlong *)(lVar6 + 0x28) + 0x20),
               (ulonglong)uVar10);
        *(longlong *)(lVar6 + 0x10) = *(longlong *)(lVar6 + 0x10) + (ulonglong)uVar10;
        plVar1 = (longlong *)(*(longlong *)(lVar6 + 0x28) + 0x20);
        *plVar1 = *plVar1 + (ulonglong)uVar10;
        *(int *)(lVar6 + 0x1c) = *(int *)(lVar6 + 0x1c) + uVar10;
        *(int *)(lVar6 + 0x18) = *(int *)(lVar6 + 0x18) - uVar10;
        piVar2 = (int *)(*(longlong *)(lVar6 + 0x28) + 0x28);
        *piVar2 = *piVar2 - uVar10;
        lVar6 = *(longlong *)(lVar6 + 0x28);
        if (*(int *)(lVar6 + 0x28) == 0) {
          *(undefined8 *)(lVar6 + 0x20) = *(undefined8 *)(lVar6 + 0x10);
        }
      }
      if (*(int *)(*param_1 + 0x18) == 0) {
        return 0;
      }
    }
  } while( true );
}



undefined4 FUN_1401cf980(longlong *param_1,int param_2)

{
  longlong *plVar1;
  int *piVar2;
  short *psVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  undefined4 uVar7;
  longlong lVar8;
  byte bVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  short sVar12;
  ushort uVar13;
  uint uVar14;
  uint uVar15;
  
  uVar11 = 0;
  do {
    uVar14 = *(uint *)((longlong)param_1 + 0x9c);
    if (uVar14 < 0x106) {
      FUN_1401cf120(param_1);
      uVar14 = *(uint *)((longlong)param_1 + 0x9c);
      if ((uVar14 < 0x106) && (param_2 == 0)) {
        return 0;
      }
      if (uVar14 == 0) {
        if ((int)param_1[0x12] != 0) {
          bVar9 = *(byte *)((ulonglong)(*(int *)((longlong)param_1 + 0x94) - 1) + param_1[10]);
          *(undefined2 *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) = 0
          ;
          *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar9;
          *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
          psVar3 = (short *)((longlong)param_1 + (ulonglong)bVar9 * 4 + 0xbc);
          *psVar3 = *psVar3 + 1;
          *(undefined4 *)(param_1 + 0x12) = 0;
        }
        uVar14 = *(uint *)((longlong)param_1 + 0x84);
        if (-1 < (int)uVar14) {
          uVar11 = (ulonglong)uVar14 + param_1[10];
        }
        FUN_1401d3530(param_1,uVar11,*(int *)((longlong)param_1 + 0x94) - uVar14,param_2 == 4);
        *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
        FUN_1401ced70(*param_1);
        if (*(int *)(*param_1 + 0x18) != 0) {
          uVar7 = 1;
          if (param_2 == 4) {
            uVar7 = 3;
          }
          return uVar7;
        }
        if (param_2 == 4) {
          return 2;
        }
        return 0;
      }
    }
    uVar10 = uVar11;
    if (2 < uVar14) {
      uVar14 = ((uint)*(byte *)((ulonglong)(*(uint *)((longlong)param_1 + 0x94) + 2) + param_1[10])
               ^ (int)param_1[0xe] << ((byte)(int)param_1[0x10] & 0x1f)) &
               *(uint *)((longlong)param_1 + 0x7c);
      *(uint *)(param_1 + 0xe) = uVar14;
      *(undefined2 *)
       (param_1[0xc] +
       (ulonglong)(*(uint *)((longlong)param_1 + 0x94) & *(uint *)((longlong)param_1 + 0x4c)) * 2) =
           *(undefined2 *)(param_1[0xd] + (ulonglong)uVar14 * 2);
      uVar10 = (ulonglong)
               *(ushort *)
                (param_1[0xc] +
                (ulonglong)
                (*(uint *)((longlong)param_1 + 0x94) & *(uint *)((longlong)param_1 + 0x4c)) * 2);
      *(undefined2 *)(param_1[0xd] + (ulonglong)*(uint *)(param_1 + 0xe) * 2) =
           *(undefined2 *)((longlong)param_1 + 0x94);
    }
    uVar14 = *(uint *)(param_1 + 0x11);
    *(undefined4 *)(param_1 + 0x11) = 2;
    *(uint *)(param_1 + 0x14) = uVar14;
    *(int *)((longlong)param_1 + 0x8c) = (int)param_1[0x13];
    if ((((int)uVar10 != 0) && (uVar14 < *(uint *)(param_1 + 0x15))) &&
       ((uint)(*(int *)((longlong)param_1 + 0x94) - (int)uVar10) <=
        *(int *)((longlong)param_1 + 0x44) - 0x106U)) {
      uVar14 = FUN_1401cef70(param_1,uVar10);
      *(uint *)(param_1 + 0x11) = uVar14;
      if ((uVar14 < 6) &&
         (((int)param_1[0x16] == 1 ||
          ((uVar14 == 3 &&
           (0x1000 < (uint)(*(int *)((longlong)param_1 + 0x94) - (int)param_1[0x13]))))))) {
        *(undefined4 *)(param_1 + 0x11) = 2;
      }
    }
    if ((*(uint *)(param_1 + 0x14) < 3) || (*(uint *)(param_1 + 0x14) < *(uint *)(param_1 + 0x11)))
    {
      if ((int)param_1[0x12] == 0) {
        *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
        *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) + -1;
        *(undefined4 *)(param_1 + 0x12) = 1;
      }
      else {
        bVar9 = *(byte *)((ulonglong)(*(int *)((longlong)param_1 + 0x94) - 1) + param_1[10]);
        *(undefined2 *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) = 0;
        *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar9;
        *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
        psVar3 = (short *)((longlong)param_1 + (ulonglong)bVar9 * 4 + 0xbc);
        *psVar3 = *psVar3 + 1;
        if (*(int *)((longlong)param_1 + 0x16f4) == (int)param_1[0x2de] + -1) {
          uVar14 = *(uint *)((longlong)param_1 + 0x84);
          uVar10 = uVar11;
          if (-1 < (int)uVar14) {
            uVar10 = (ulonglong)uVar14 + param_1[10];
          }
          FUN_1401d3530(param_1,uVar10,*(int *)((longlong)param_1 + 0x94) - uVar14,0);
          lVar8 = *param_1;
          *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
          uVar14 = *(uint *)(*(longlong *)(lVar8 + 0x28) + 0x28);
          if (*(uint *)(lVar8 + 0x18) < uVar14) {
            uVar14 = *(uint *)(lVar8 + 0x18);
          }
          if (uVar14 != 0) {
            memcpy(*(void **)(lVar8 + 0x10),*(void **)(*(longlong *)(lVar8 + 0x28) + 0x20),
                   (ulonglong)uVar14);
            *(longlong *)(lVar8 + 0x10) = *(longlong *)(lVar8 + 0x10) + (ulonglong)uVar14;
            plVar1 = (longlong *)(*(longlong *)(lVar8 + 0x28) + 0x20);
            *plVar1 = *plVar1 + (ulonglong)uVar14;
            *(int *)(lVar8 + 0x1c) = *(int *)(lVar8 + 0x1c) + uVar14;
            *(int *)(lVar8 + 0x18) = *(int *)(lVar8 + 0x18) - uVar14;
            piVar2 = (int *)(*(longlong *)(lVar8 + 0x28) + 0x28);
            *piVar2 = *piVar2 - uVar14;
            lVar8 = *(longlong *)(lVar8 + 0x28);
            if (*(int *)(lVar8 + 0x28) == 0) {
              *(undefined8 *)(lVar8 + 0x20) = *(undefined8 *)(lVar8 + 0x10);
            }
          }
        }
        *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
        *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) + -1;
        if (*(int *)(*param_1 + 0x18) == 0) {
          return 0;
        }
      }
    }
    else {
      iVar4 = *(int *)((longlong)param_1 + 0x94);
      iVar5 = *(int *)((longlong)param_1 + 0x9c);
      sVar12 = (short)iVar4 - *(short *)((longlong)param_1 + 0x8c);
      bVar9 = (char)param_1[0x14] - 3;
      *(short *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) =
           sVar12 + -1;
      *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar9;
      *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
      uVar13 = sVar12 - 2;
      psVar3 = (short *)((longlong)param_1 + (ulonglong)(byte)(&DAT_140276ab0)[bVar9] * 4 + 0x4c0);
      *psVar3 = *psVar3 + 1;
      if (uVar13 < 0x100) {
        bVar9 = (&DAT_1402768b0)[uVar13];
      }
      else {
        bVar9 = (&DAT_1402769b0)[uVar13 >> 7];
      }
      psVar3 = (short *)((longlong)param_1 + (longlong)(int)(uint)bVar9 * 4 + 0x9b0);
      *psVar3 = *psVar3 + 1;
      lVar8 = param_1[0x2de];
      iVar6 = *(int *)((longlong)param_1 + 0x16f4);
      *(int *)((longlong)param_1 + 0x9c) =
           *(int *)((longlong)param_1 + 0x9c) + (1 - (int)param_1[0x14]);
      *(int *)(param_1 + 0x14) = (int)param_1[0x14] + -2;
      do {
        *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
        uVar14 = *(uint *)((longlong)param_1 + 0x94);
        if (uVar14 <= (uint)(iVar4 + -3 + iVar5)) {
          uVar15 = ((uint)*(byte *)((ulonglong)(uVar14 + 2) + param_1[10]) ^
                   (int)param_1[0xe] << ((byte)(int)param_1[0x10] & 0x1f)) &
                   *(uint *)((longlong)param_1 + 0x7c);
          *(uint *)(param_1 + 0xe) = uVar15;
          *(undefined2 *)
           (param_1[0xc] + (ulonglong)(*(uint *)((longlong)param_1 + 0x4c) & uVar14) * 2) =
               *(undefined2 *)(param_1[0xd] + (ulonglong)uVar15 * 2);
          *(undefined2 *)(param_1[0xd] + (ulonglong)*(uint *)(param_1 + 0xe) * 2) =
               *(undefined2 *)((longlong)param_1 + 0x94);
        }
        plVar1 = param_1 + 0x14;
        *(int *)plVar1 = (int)*plVar1 + -1;
      } while ((int)*plVar1 != 0);
      *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
      *(undefined4 *)(param_1 + 0x12) = 0;
      *(undefined4 *)(param_1 + 0x11) = 2;
      if (iVar6 == (int)lVar8 + -1) {
        uVar14 = *(uint *)((longlong)param_1 + 0x84);
        uVar10 = uVar11;
        if (-1 < (int)uVar14) {
          uVar10 = (ulonglong)uVar14 + param_1[10];
        }
        FUN_1401d3530(param_1,uVar10,*(int *)((longlong)param_1 + 0x94) - uVar14,0);
        *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
        FUN_1401ced70(*param_1);
        if (*(int *)(*param_1 + 0x18) == 0) {
          return 0;
        }
      }
    }
  } while( true );
}



undefined4 FUN_1401cfed0(longlong *param_1,int param_2)

{
  longlong *plVar1;
  int *piVar2;
  short *psVar3;
  char cVar4;
  uint uVar5;
  longlong lVar6;
  undefined4 uVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  byte bVar11;
  longlong lVar12;
  longlong lVar13;
  uint uVar14;
  bool bVar15;
  
  lVar13 = 0;
  do {
    uVar14 = *(uint *)((longlong)param_1 + 0x9c);
    if (uVar14 < 0x102) {
      FUN_1401cf120(param_1);
      uVar14 = *(uint *)((longlong)param_1 + 0x9c);
      if ((uVar14 < 0x102) && (param_2 == 0)) {
        return 0;
      }
      if (uVar14 == 0) {
        uVar14 = *(uint *)((longlong)param_1 + 0x84);
        if (-1 < (int)uVar14) {
          lVar13 = (ulonglong)uVar14 + param_1[10];
        }
        FUN_1401d3530(param_1,lVar13,*(int *)((longlong)param_1 + 0x94) - uVar14,param_2 == 4);
        *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
        FUN_1401ced70(*param_1);
        if (*(int *)(*param_1 + 0x18) != 0) {
          uVar7 = 1;
          if (param_2 == 4) {
            uVar7 = 3;
          }
          return uVar7;
        }
        if (param_2 == 4) {
          return 2;
        }
        return 0;
      }
    }
    *(undefined4 *)(param_1 + 0x11) = 0;
    if (2 < uVar14) {
      uVar5 = *(uint *)((longlong)param_1 + 0x94);
      uVar8 = (ulonglong)uVar5;
      if (uVar5 != 0) {
        lVar6 = param_1[10];
        cVar4 = *(char *)(lVar6 + -1 + uVar8);
        lVar12 = lVar6 + -1 + uVar8;
        if (((cVar4 == *(char *)(lVar6 + uVar8)) && (cVar4 == *(char *)(lVar12 + 2))) &&
           (cVar4 == *(char *)(lVar12 + 3))) {
          uVar8 = lVar6 + 0x102 + (ulonglong)uVar5;
          uVar9 = lVar12 + 3;
          while ((((uVar10 = uVar9 + 1, cVar4 == *(char *)(uVar9 + 1) &&
                   (uVar10 = uVar9 + 2, cVar4 == *(char *)(uVar9 + 2))) &&
                  ((uVar10 = uVar9 + 3, cVar4 == *(char *)(uVar9 + 3) &&
                   ((uVar10 = uVar9 + 4, cVar4 == *(char *)(uVar9 + 4) &&
                    (uVar10 = uVar9 + 5, cVar4 == *(char *)(uVar9 + 5))))))) &&
                 (uVar10 = uVar9 + 6, cVar4 == *(char *)(uVar9 + 6)))) {
            uVar10 = uVar9 + 7;
            if (((cVar4 != *(char *)(uVar9 + 7)) ||
                (uVar10 = uVar9 + 8, cVar4 != *(char *)(uVar9 + 8))) ||
               (uVar9 = uVar10, uVar8 <= uVar10)) break;
          }
          uVar5 = ((int)uVar10 - (int)uVar8) + 0x102;
          *(uint *)(param_1 + 0x11) = uVar5;
          if (uVar14 < uVar5) {
            *(uint *)(param_1 + 0x11) = uVar14;
          }
        }
      }
    }
    if (*(uint *)(param_1 + 0x11) < 3) {
      bVar11 = *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x94) + param_1[10]);
      *(undefined2 *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) = 0;
      *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar11;
      *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
      psVar3 = (short *)((longlong)param_1 + (ulonglong)bVar11 * 4 + 0xbc);
      *psVar3 = *psVar3 + 1;
      bVar15 = *(int *)((longlong)param_1 + 0x16f4) == (int)param_1[0x2de] + -1;
      *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) + -1;
      *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
    }
    else {
      lVar12 = param_1[0x11];
      *(undefined2 *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) = 1;
      bVar11 = (char)lVar12 - 3;
      *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar11;
      *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
      psVar3 = (short *)((longlong)param_1 + (ulonglong)(byte)(&DAT_140276ab0)[bVar11] * 4 + 0x4c0);
      *psVar3 = *psVar3 + 1;
      *(short *)(param_1 + 0x136) = (short)param_1[0x136] + 1;
      bVar15 = *(int *)((longlong)param_1 + 0x16f4) == (int)param_1[0x2de] + -1;
      lVar12 = param_1[0x11];
      *(undefined4 *)(param_1 + 0x11) = 0;
      *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) - (int)lVar12;
      *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + (int)lVar12;
    }
    if (bVar15) {
      uVar14 = *(uint *)((longlong)param_1 + 0x84);
      lVar12 = lVar13;
      if (-1 < (int)uVar14) {
        lVar12 = (ulonglong)uVar14 + param_1[10];
      }
      FUN_1401d3530(param_1,lVar12,*(int *)((longlong)param_1 + 0x94) - uVar14,0);
      lVar12 = *param_1;
      *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
      uVar14 = *(uint *)(*(longlong *)(lVar12 + 0x28) + 0x28);
      if (*(uint *)(lVar12 + 0x18) < uVar14) {
        uVar14 = *(uint *)(lVar12 + 0x18);
      }
      if (uVar14 != 0) {
        memcpy(*(void **)(lVar12 + 0x10),*(void **)(*(longlong *)(lVar12 + 0x28) + 0x20),
               (ulonglong)uVar14);
        *(longlong *)(lVar12 + 0x10) = *(longlong *)(lVar12 + 0x10) + (ulonglong)uVar14;
        plVar1 = (longlong *)(*(longlong *)(lVar12 + 0x28) + 0x20);
        *plVar1 = *plVar1 + (ulonglong)uVar14;
        *(int *)(lVar12 + 0x1c) = *(int *)(lVar12 + 0x1c) + uVar14;
        *(int *)(lVar12 + 0x18) = *(int *)(lVar12 + 0x18) - uVar14;
        piVar2 = (int *)(*(longlong *)(lVar12 + 0x28) + 0x28);
        *piVar2 = *piVar2 - uVar14;
        lVar12 = *(longlong *)(lVar12 + 0x28);
        if (*(int *)(lVar12 + 0x28) == 0) {
          *(undefined8 *)(lVar12 + 0x20) = *(undefined8 *)(lVar12 + 0x10);
        }
      }
      if (*(int *)(*param_1 + 0x18) == 0) {
        return 0;
      }
    }
  } while( true );
}



undefined8 FUN_1401d0250(longlong *param_1,int param_2)

{
  longlong *plVar1;
  int *piVar2;
  short *psVar3;
  byte bVar4;
  longlong lVar5;
  longlong lVar6;
  uint uVar7;
  
  lVar6 = 0;
  while ((*(int *)((longlong)param_1 + 0x9c) != 0 ||
         (FUN_1401cf120(param_1), *(int *)((longlong)param_1 + 0x9c) != 0))) {
    *(undefined4 *)(param_1 + 0x11) = 0;
    bVar4 = *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x94) + param_1[10]);
    *(undefined2 *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) = 0;
    *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar4;
    *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
    psVar3 = (short *)((longlong)param_1 + (ulonglong)bVar4 * 4 + 0xbc);
    *psVar3 = *psVar3 + 1;
    *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
    *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) + -1;
    if (*(int *)((longlong)param_1 + 0x16f4) == (int)param_1[0x2de] + -1) {
      uVar7 = *(uint *)((longlong)param_1 + 0x84);
      lVar5 = lVar6;
      if (-1 < (int)uVar7) {
        lVar5 = (ulonglong)uVar7 + param_1[10];
      }
      FUN_1401d3530(param_1,lVar5,*(int *)((longlong)param_1 + 0x94) - uVar7,0);
      lVar5 = *param_1;
      *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
      uVar7 = *(uint *)(*(longlong *)(lVar5 + 0x28) + 0x28);
      if (*(uint *)(lVar5 + 0x18) < uVar7) {
        uVar7 = *(uint *)(lVar5 + 0x18);
      }
      if (uVar7 != 0) {
        memcpy(*(void **)(lVar5 + 0x10),*(void **)(*(longlong *)(lVar5 + 0x28) + 0x20),
               (ulonglong)uVar7);
        *(longlong *)(lVar5 + 0x10) = *(longlong *)(lVar5 + 0x10) + (ulonglong)uVar7;
        plVar1 = (longlong *)(*(longlong *)(lVar5 + 0x28) + 0x20);
        *plVar1 = *plVar1 + (ulonglong)uVar7;
        *(int *)(lVar5 + 0x1c) = *(int *)(lVar5 + 0x1c) + uVar7;
        *(int *)(lVar5 + 0x18) = *(int *)(lVar5 + 0x18) - uVar7;
        piVar2 = (int *)(*(longlong *)(lVar5 + 0x28) + 0x28);
        *piVar2 = *piVar2 - uVar7;
        lVar5 = *(longlong *)(lVar5 + 0x28);
        if (*(int *)(lVar5 + 0x28) == 0) {
          *(undefined8 *)(lVar5 + 0x20) = *(undefined8 *)(lVar5 + 0x10);
        }
      }
      if (*(int *)(*param_1 + 0x18) == 0) {
        return 0;
      }
    }
  }
  if (param_2 == 0) {
    return 0;
  }
  uVar7 = *(uint *)((longlong)param_1 + 0x84);
  if (-1 < (int)uVar7) {
    lVar6 = (ulonglong)uVar7 + param_1[10];
  }
  FUN_1401d3530(param_1,lVar6,*(int *)((longlong)param_1 + 0x94) - uVar7,param_2 == 4);
  *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
  FUN_1401ced70(*param_1);
  if (*(int *)(*param_1 + 0x18) != 0) {
    if (param_2 == 4) {
      return 3;
    }
    return 1;
  }
  if (param_2 == 4) {
    return 2;
  }
  return 0;
}



undefined8 FUN_1401d0430(longlong param_1)

{
  ushort uVar1;
  longlong lVar2;
  undefined4 uVar3;
  longlong lVar4;
  
  if ((((param_1 != 0) && (lVar2 = *(longlong *)(param_1 + 0x28), lVar2 != 0)) &&
      (*(longlong *)(param_1 + 0x30) != 0)) && (*(longlong *)(param_1 + 0x38) != 0)) {
    *(undefined4 *)(param_1 + 0x48) = 2;
    *(undefined4 *)(param_1 + 0x1c) = 0;
    *(undefined4 *)(param_1 + 0xc) = 0;
    *(undefined8 *)(param_1 + 0x20) = 0;
    *(undefined4 *)(lVar2 + 0x28) = 0;
    *(undefined8 *)(lVar2 + 0x20) = *(undefined8 *)(lVar2 + 0x10);
    if (*(int *)(lVar2 + 0x2c) < 0) {
      *(int *)(lVar2 + 0x2c) = -*(int *)(lVar2 + 0x2c);
    }
    uVar3 = 0x71;
    if (*(int *)(lVar2 + 0x2c) != 0) {
      uVar3 = 0x2a;
    }
    *(undefined4 *)(lVar2 + 8) = uVar3;
    if (*(int *)(lVar2 + 0x2c) == 2) {
      uVar3 = FUN_1401ad0b0(0,0,0);
    }
    else {
      uVar3 = 1;
    }
    *(undefined4 *)(param_1 + 0x4c) = uVar3;
    *(undefined4 *)(lVar2 + 0x40) = 0;
    FUN_1401d2e70(lVar2);
    *(int *)(lVar2 + 0x58) = *(int *)(lVar2 + 0x44) * 2;
    *(undefined2 *)(*(longlong *)(lVar2 + 0x68) + (ulonglong)(*(int *)(lVar2 + 0x74) - 1) * 2) = 0;
    memset(*(void **)(lVar2 + 0x68),0,(ulonglong)(*(int *)(lVar2 + 0x74) - 1) * 2);
    lVar4 = (longlong)*(int *)(lVar2 + 0xac);
    *(uint *)(lVar2 + 0xa8) = (uint)*(ushort *)(&DAT_140275812 + lVar4 * 0x10);
    *(uint *)(lVar2 + 0xb4) = (uint)*(ushort *)(&DAT_140275810 + lVar4 * 0x10);
    *(uint *)(lVar2 + 0xb8) = (uint)*(ushort *)(&DAT_140275814 + lVar4 * 0x10);
    uVar1 = *(ushort *)(&DAT_140275816 + lVar4 * 0x10);
    *(undefined4 *)(lVar2 + 0x84) = 0;
    *(undefined4 *)(lVar2 + 0x9c) = 0;
    *(undefined8 *)(lVar2 + 0x90) = 0;
    *(undefined4 *)(lVar2 + 0x70) = 0;
    *(uint *)(lVar2 + 0xa4) = (uint)uVar1;
    *(undefined4 *)(lVar2 + 0xa0) = 2;
    *(undefined4 *)(lVar2 + 0x88) = 2;
    return 0;
  }
  return 0xfffffffe;
}



uint FUN_1401d05a0(longlong *param_1,uint param_2)

{
  char cVar1;
  undefined2 uVar2;
  int iVar3;
  undefined8 *puVar4;
  int *piVar5;
  bool bVar6;
  undefined4 uVar7;
  int iVar8;
  uint uVar9;
  undefined1 uVar10;
  ulonglong uVar11;
  uint uVar12;
  int iVar13;
  ulonglong uVar14;
  
  if (((param_1 == (longlong *)0x0) ||
      (puVar4 = (undefined8 *)param_1[5], puVar4 == (undefined8 *)0x0)) || (5 < param_2)) {
    return 0xfffffffe;
  }
  if (((param_1[2] == 0) || ((*param_1 == 0 && ((int)param_1[1] != 0)))) ||
     ((*(int *)(puVar4 + 1) == 0x29a && (param_2 != 4)))) {
    param_1[4] = (longlong)"stream error";
    return 0xfffffffe;
  }
  if ((int)param_1[3] == 0) {
    param_1[4] = (longlong)"buffer error";
    return 0xfffffffb;
  }
  iVar8 = *(int *)(puVar4 + 8);
  *(uint *)(puVar4 + 8) = param_2;
  *puVar4 = param_1;
  iVar13 = 0;
  if (*(int *)(puVar4 + 1) == 0x2a) {
    if (*(int *)((longlong)puVar4 + 0x2c) == 2) {
      uVar7 = FUN_1401ad0b0(0,0,0);
      *(undefined4 *)((longlong)param_1 + 0x4c) = uVar7;
      *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = 0x1f;
      *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
      *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = 0x8b;
      *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
      *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = 8;
      *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
      piVar5 = (int *)puVar4[6];
      uVar10 = 0;
      if (piVar5 == (int *)0x0) {
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = 0;
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = 0;
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = 0;
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = 0;
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = 0;
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        if (*(int *)((longlong)puVar4 + 0xac) == 9) {
          uVar10 = 2;
        }
        else if ((1 < *(int *)(puVar4 + 0x16)) || (*(int *)((longlong)puVar4 + 0xac) < 2)) {
          uVar10 = 4;
        }
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = uVar10;
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = 0xb;
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(undefined4 *)(puVar4 + 1) = 0x71;
      }
      else {
        *(byte *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
             (-(*(longlong *)(piVar5 + 0xc) != 0) & 0x10U) + (-(piVar5[0xf] != 0) & 2U) +
             (-(*(longlong *)(piVar5 + 8) != 0) & 8U) + (-(*(longlong *)(piVar5 + 4) != 0) & 4U) +
             (*piVar5 != 0);
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
             *(undefined1 *)(puVar4[6] + 4);
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
             *(undefined1 *)(puVar4[6] + 5);
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
             *(undefined1 *)(puVar4[6] + 6);
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
             *(undefined1 *)(puVar4[6] + 7);
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        if (*(int *)((longlong)puVar4 + 0xac) == 9) {
          uVar10 = 2;
        }
        else if ((1 < *(int *)(puVar4 + 0x16)) || (*(int *)((longlong)puVar4 + 0xac) < 2)) {
          uVar10 = 4;
        }
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = uVar10;
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
             *(undefined1 *)(puVar4[6] + 0xc);
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        uVar11 = (ulonglong)*(uint *)(puVar4 + 5);
        if (*(longlong *)(puVar4[6] + 0x10) != 0) {
          *(undefined1 *)(uVar11 + puVar4[2]) = *(undefined1 *)(puVar4[6] + 0x18);
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
               *(undefined1 *)(puVar4[6] + 0x19);
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          uVar11 = (ulonglong)*(uint *)(puVar4 + 5);
        }
        if (*(int *)(puVar4[6] + 0x3c) != 0) {
          uVar7 = FUN_1401ad0b0(*(undefined4 *)((longlong)param_1 + 0x4c),puVar4[2],uVar11);
          *(undefined4 *)((longlong)param_1 + 0x4c) = uVar7;
        }
        *(undefined4 *)(puVar4 + 7) = 0;
        *(undefined4 *)(puVar4 + 1) = 0x45;
      }
    }
    else {
      if ((*(int *)(puVar4 + 0x16) < 2) && (iVar3 = *(int *)((longlong)puVar4 + 0xac), 1 < iVar3)) {
        if (iVar3 < 6) {
          iVar13 = 1;
        }
        else {
          iVar13 = (iVar3 != 6) + 2;
        }
      }
      uVar12 = (*(int *)(puVar4 + 9) + -8) * 0x1000 + 0x800U | iVar13 << 6;
      if (*(int *)((longlong)puVar4 + 0x94) != 0) {
        uVar12 = uVar12 | 0x20;
      }
      *(undefined4 *)(puVar4 + 1) = 0x71;
      iVar13 = (uVar12 / 0x1f + 1) * 0x1f;
      *(char *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = (char)((uint)iVar13 >> 8);
      *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
      *(char *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = (char)iVar13;
      *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
      if (*(int *)((longlong)puVar4 + 0x94) != 0) {
        uVar2 = *(undefined2 *)((longlong)param_1 + 0x4e);
        *(char *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = (char)((ushort)uVar2 >> 8);
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(char *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = (char)uVar2;
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        uVar2 = *(undefined2 *)((longlong)param_1 + 0x4c);
        *(char *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = (char)((ushort)uVar2 >> 8);
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        *(char *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = (char)uVar2;
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
      }
      *(undefined4 *)((longlong)param_1 + 0x4c) = 1;
    }
  }
  if (*(int *)(puVar4 + 1) == 0x45) {
    if (*(longlong *)(puVar4[6] + 0x10) != 0) {
      uVar12 = *(uint *)(puVar4 + 5);
      if (*(uint *)(puVar4 + 7) < (uint)*(ushort *)(puVar4[6] + 0x18)) {
        do {
          uVar9 = *(uint *)(puVar4 + 5);
          if (uVar9 == *(uint *)(puVar4 + 3)) {
            if ((*(int *)(puVar4[6] + 0x3c) != 0) && (uVar12 < uVar9)) {
              uVar7 = FUN_1401ad0b0(*(undefined4 *)((longlong)param_1 + 0x4c),
                                    (ulonglong)uVar12 + puVar4[2],uVar9 - uVar12);
              *(undefined4 *)((longlong)param_1 + 0x4c) = uVar7;
            }
            FUN_1401ced70(param_1);
            uVar12 = *(uint *)(puVar4 + 5);
            uVar9 = uVar12;
            if (uVar12 == *(uint *)(puVar4 + 3)) break;
          }
          *(undefined1 *)((ulonglong)uVar9 + puVar4[2]) =
               *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 7) + *(longlong *)(puVar4[6] + 0x10));
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          *(int *)(puVar4 + 7) = *(int *)(puVar4 + 7) + 1;
        } while (*(uint *)(puVar4 + 7) < (uint)*(ushort *)(puVar4[6] + 0x18));
      }
      if ((*(int *)(puVar4[6] + 0x3c) != 0) && (uVar12 < *(uint *)(puVar4 + 5))) {
        uVar7 = FUN_1401ad0b0(*(undefined4 *)((longlong)param_1 + 0x4c),
                              (ulonglong)uVar12 + puVar4[2],*(uint *)(puVar4 + 5) - uVar12);
        *(undefined4 *)((longlong)param_1 + 0x4c) = uVar7;
      }
      if (*(int *)(puVar4 + 7) != *(int *)(puVar4[6] + 0x18)) goto LAB_1401d0a30;
      *(undefined4 *)(puVar4 + 7) = 0;
    }
    *(undefined4 *)(puVar4 + 1) = 0x49;
  }
LAB_1401d0a30:
  if (*(int *)(puVar4 + 1) == 0x49) {
    if (*(longlong *)(puVar4[6] + 0x20) != 0) {
      uVar11 = (ulonglong)*(uint *)(puVar4 + 5);
      do {
        uVar12 = *(uint *)(puVar4 + 5);
        uVar14 = (ulonglong)uVar12;
        if (uVar12 == *(uint *)(puVar4 + 3)) {
          if ((*(int *)(puVar4[6] + 0x3c) != 0) && ((uint)uVar11 < uVar12)) {
            uVar7 = FUN_1401ad0b0(*(undefined4 *)((longlong)param_1 + 0x4c),uVar11 + puVar4[2],
                                  uVar12 - (uint)uVar11);
            *(undefined4 *)((longlong)param_1 + 0x4c) = uVar7;
          }
          FUN_1401ced70(param_1);
          uVar11 = (ulonglong)*(uint *)(puVar4 + 5);
          uVar14 = uVar11;
          if (*(uint *)(puVar4 + 5) == *(uint *)(puVar4 + 3)) {
            bVar6 = true;
            goto LAB_1401d0ac0;
          }
        }
        cVar1 = *(char *)(*(longlong *)(puVar4[6] + 0x20) + (ulonglong)*(uint *)(puVar4 + 7));
        *(uint *)(puVar4 + 7) = *(uint *)(puVar4 + 7) + 1;
        *(char *)(uVar14 + puVar4[2]) = cVar1;
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
      } while (cVar1 != '\0');
      bVar6 = false;
LAB_1401d0ac0:
      if (*(int *)(puVar4[6] + 0x3c) != 0) {
        if ((uint)uVar11 < *(uint *)(puVar4 + 5)) {
          uVar7 = FUN_1401ad0b0(*(undefined4 *)((longlong)param_1 + 0x4c),uVar11 + puVar4[2],
                                *(uint *)(puVar4 + 5) - (uint)uVar11);
          *(undefined4 *)((longlong)param_1 + 0x4c) = uVar7;
        }
      }
      if (bVar6) goto LAB_1401d0af4;
      *(undefined4 *)(puVar4 + 7) = 0;
    }
    *(undefined4 *)(puVar4 + 1) = 0x5b;
  }
LAB_1401d0af4:
  if (*(int *)(puVar4 + 1) == 0x5b) {
    if (*(longlong *)(puVar4[6] + 0x30) != 0) {
      uVar11 = (ulonglong)*(uint *)(puVar4 + 5);
      do {
        uVar12 = *(uint *)(puVar4 + 5);
        uVar14 = (ulonglong)uVar12;
        if (uVar12 == *(uint *)(puVar4 + 3)) {
          if ((*(int *)(puVar4[6] + 0x3c) != 0) && ((uint)uVar11 < uVar12)) {
            uVar7 = FUN_1401ad0b0(*(undefined4 *)((longlong)param_1 + 0x4c),uVar11 + puVar4[2],
                                  uVar12 - (uint)uVar11);
            *(undefined4 *)((longlong)param_1 + 0x4c) = uVar7;
          }
          FUN_1401ced70(param_1);
          uVar11 = (ulonglong)*(uint *)(puVar4 + 5);
          uVar14 = uVar11;
          if (*(uint *)(puVar4 + 5) == *(uint *)(puVar4 + 3)) {
            bVar6 = true;
            goto LAB_1401d0b80;
          }
        }
        cVar1 = *(char *)(*(longlong *)(puVar4[6] + 0x30) + (ulonglong)*(uint *)(puVar4 + 7));
        *(uint *)(puVar4 + 7) = *(uint *)(puVar4 + 7) + 1;
        *(char *)(uVar14 + puVar4[2]) = cVar1;
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
      } while (cVar1 != '\0');
      bVar6 = false;
LAB_1401d0b80:
      if (*(int *)(puVar4[6] + 0x3c) != 0) {
        if ((uint)uVar11 < *(uint *)(puVar4 + 5)) {
          uVar7 = FUN_1401ad0b0(*(undefined4 *)((longlong)param_1 + 0x4c),uVar11 + puVar4[2],
                                *(uint *)(puVar4 + 5) - (uint)uVar11);
          *(undefined4 *)((longlong)param_1 + 0x4c) = uVar7;
        }
      }
      if (bVar6) goto LAB_1401d0bb0;
    }
    *(undefined4 *)(puVar4 + 1) = 0x67;
  }
LAB_1401d0bb0:
  if (*(int *)(puVar4 + 1) == 0x67) {
    if (*(int *)(puVar4[6] + 0x3c) != 0) {
      if (*(uint *)(puVar4 + 3) < *(int *)(puVar4 + 5) + 2U) {
        FUN_1401ced70(param_1);
      }
      if (*(uint *)(puVar4 + 3) < *(uint *)(puVar4 + 5) + 2) goto LAB_1401d0c1a;
      *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
           *(undefined1 *)((longlong)param_1 + 0x4c);
      *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
      *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
           *(undefined1 *)((longlong)param_1 + 0x4d);
      *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
      uVar7 = FUN_1401ad0b0(0,0,0);
      *(undefined4 *)((longlong)param_1 + 0x4c) = uVar7;
    }
    *(undefined4 *)(puVar4 + 1) = 0x71;
  }
LAB_1401d0c1a:
  if (*(int *)(puVar4 + 5) == 0) {
    if ((((int)param_1[1] == 0) && ((int)param_2 <= iVar8)) && (param_2 != 4)) goto LAB_1401d0c69;
LAB_1401d0c59:
    if (*(int *)(puVar4 + 1) == 0x29a) {
      if ((int)param_1[1] != 0) {
LAB_1401d0c69:
        param_1[4] = (longlong)"buffer error";
        return 0xfffffffb;
      }
LAB_1401d0c81:
      if ((*(int *)((longlong)puVar4 + 0x9c) != 0) ||
         ((param_2 != 0 && (*(int *)(puVar4 + 1) != 0x29a)))) goto LAB_1401d0c9d;
    }
    else {
      if ((int)param_1[1] == 0) goto LAB_1401d0c81;
LAB_1401d0c9d:
      if (*(int *)(puVar4 + 0x16) == 2) {
        iVar8 = FUN_1401d0250();
      }
      else if (*(int *)(puVar4 + 0x16) == 3) {
        iVar8 = FUN_1401cfed0();
      }
      else {
        iVar8 = (*(code *)(&PTR_FUN_140275818)[(longlong)*(int *)((longlong)puVar4 + 0xac) * 2])
                          (puVar4);
      }
      if ((iVar8 == 2) || (iVar8 == 3)) {
        *(undefined4 *)(puVar4 + 1) = 0x29a;
      }
      if ((iVar8 == 0) || (iVar8 == 2)) {
        if ((int)param_1[3] != 0) {
          return 0;
        }
        goto LAB_1401d0c2e;
      }
      if (iVar8 == 1) {
        if (param_2 == 1) {
          FUN_1401d3310(puVar4);
        }
        else if ((param_2 != 5) && (FUN_1401d3270(puVar4,0,0,0), param_2 == 3)) {
          *(undefined2 *)(puVar4[0xd] + (ulonglong)(*(int *)((longlong)puVar4 + 0x74) - 1) * 2) = 0;
          memset((void *)puVar4[0xd],0,(ulonglong)(*(int *)((longlong)puVar4 + 0x74) - 1) * 2);
          if (*(int *)((longlong)puVar4 + 0x9c) == 0) {
            *(undefined4 *)((longlong)puVar4 + 0x94) = 0;
            *(undefined4 *)((longlong)puVar4 + 0x84) = 0;
          }
        }
        FUN_1401ced70(param_1);
        if ((int)param_1[3] == 0) goto LAB_1401d0c2e;
      }
    }
    if (param_2 == 4) {
      if (0 < *(int *)((longlong)puVar4 + 0x2c)) {
        if (*(int *)((longlong)puVar4 + 0x2c) == 2) {
          *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
               *(undefined1 *)((longlong)param_1 + 0x4c);
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
               *(undefined1 *)((longlong)param_1 + 0x4d);
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
               *(undefined1 *)((longlong)param_1 + 0x4e);
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
               *(undefined1 *)((longlong)param_1 + 0x4f);
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
               *(undefined1 *)((longlong)param_1 + 0xc);
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
               *(undefined1 *)((longlong)param_1 + 0xd);
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
               *(undefined1 *)((longlong)param_1 + 0xe);
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) =
               *(undefined1 *)((longlong)param_1 + 0xf);
        }
        else {
          uVar2 = *(undefined2 *)((longlong)param_1 + 0x4e);
          *(char *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = (char)((ushort)uVar2 >> 8);
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          *(char *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = (char)uVar2;
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          uVar2 = *(undefined2 *)((longlong)param_1 + 0x4c);
          *(char *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = (char)((ushort)uVar2 >> 8);
          *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
          *(char *)((ulonglong)*(uint *)(puVar4 + 5) + puVar4[2]) = (char)uVar2;
        }
        *(int *)(puVar4 + 5) = *(int *)(puVar4 + 5) + 1;
        FUN_1401ced70(param_1);
        if (0 < *(int *)((longlong)puVar4 + 0x2c)) {
          *(int *)((longlong)puVar4 + 0x2c) = -*(int *)((longlong)puVar4 + 0x2c);
        }
        return (uint)(*(int *)(puVar4 + 5) == 0);
      }
      return 1;
    }
  }
  else {
    FUN_1401ced70(param_1);
    if ((int)param_1[3] != 0) goto LAB_1401d0c59;
LAB_1401d0c2e:
    *(undefined4 *)(puVar4 + 8) = 0xffffffff;
  }
  return 0;
}



undefined8
FUN_1401d0ec0(longlong param_1,uint param_2,int param_3,int param_4,int param_5,uint param_6,
             char *param_7,int param_8)

{
  uint uVar1;
  int iVar2;
  code *pcVar3;
  longlong *plVar4;
  longlong lVar5;
  undefined8 uVar6;
  int iVar7;
  undefined4 uVar8;
  
  uVar8 = 1;
  if (((param_7 == (char *)0x0) || (*param_7 != '1')) || (param_8 != 0x58)) {
    return 0xfffffffa;
  }
  if (param_1 == 0) {
    return 0xfffffffe;
  }
  *(undefined8 *)(param_1 + 0x20) = 0;
  if (*(longlong *)(param_1 + 0x30) == 0) {
    *(undefined8 *)(param_1 + 0x40) = 0;
    *(code **)(param_1 + 0x30) = FUN_1401d1190;
  }
  pcVar3 = *(code **)(param_1 + 0x38);
  if (pcVar3 == (code *)0x0) {
    pcVar3 = FUN_1401d11a0;
  }
  *(code **)(param_1 + 0x38) = pcVar3;
  if (param_2 == 0xffffffff) {
    param_2 = 6;
  }
  if (param_4 < 0) {
    param_4 = -param_4;
    uVar8 = 0;
  }
  else if (0xf < param_4) {
    uVar8 = 2;
    param_4 = param_4 + -0x10;
  }
  if (((param_5 - 1U < 9) && (param_3 == 8)) &&
     ((param_4 - 8U < 8 && ((param_2 < 10 && (param_6 < 5)))))) {
    if (param_4 == 8) {
      param_4 = 9;
    }
    plVar4 = (longlong *)(**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x40),1,0x1720);
    if (plVar4 != (longlong *)0x0) {
      *(longlong **)(param_1 + 0x28) = plVar4;
      *(undefined4 *)((longlong)plVar4 + 0x2c) = uVar8;
      *plVar4 = param_1;
      *(int *)(plVar4 + 9) = param_4;
      plVar4[6] = 0;
      iVar7 = 1 << ((byte)param_4 & 0x1f);
      *(int *)((longlong)plVar4 + 0x44) = iVar7;
      *(int *)(plVar4 + 0xf) = param_5 + 7;
      *(int *)((longlong)plVar4 + 0x4c) = iVar7 + -1;
      iVar2 = 1 << ((byte)(param_5 + 7) & 0x1f);
      *(int *)((longlong)plVar4 + 0x74) = iVar2;
      *(int *)((longlong)plVar4 + 0x7c) = iVar2 + -1;
      *(uint *)(plVar4 + 0x10) = (param_5 + 9U) / 3;
      lVar5 = (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x40),iVar7,2);
      plVar4[10] = lVar5;
      lVar5 = (**(code **)(param_1 + 0x30))
                        (*(undefined8 *)(param_1 + 0x40),*(undefined4 *)((longlong)plVar4 + 0x44),2)
      ;
      plVar4[0xc] = lVar5;
      lVar5 = (**(code **)(param_1 + 0x30))
                        (*(undefined8 *)(param_1 + 0x40),*(undefined4 *)((longlong)plVar4 + 0x74),2)
      ;
      *(undefined4 *)(plVar4 + 0x2e3) = 0;
      iVar2 = 1 << ((char)param_5 + 6U & 0x1f);
      plVar4[0xd] = lVar5;
      *(int *)(plVar4 + 0x2de) = iVar2;
      lVar5 = (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x40),iVar2,4);
      plVar4[2] = lVar5;
      uVar1 = *(uint *)(plVar4 + 0x2de);
      *(uint *)(plVar4 + 3) = uVar1 * 4;
      if ((((plVar4[10] != 0) && (plVar4[0xc] != 0)) && (plVar4[0xd] != 0)) && (lVar5 != 0)) {
        *(uint *)((longlong)plVar4 + 0xac) = param_2;
        *(uint *)(plVar4 + 0x16) = param_6;
        *(undefined1 *)((longlong)plVar4 + 0x3c) = 8;
        plVar4[0x2df] = lVar5 + (ulonglong)(uVar1 >> 1) * 2;
        plVar4[0x2dd] = lVar5 + (ulonglong)uVar1 * 3;
        uVar6 = FUN_1401d0430(param_1);
        return uVar6;
      }
      *(undefined4 *)(plVar4 + 1) = 0x29a;
      *(char **)(param_1 + 0x20) = "insufficient memory";
      FUN_1401cedf0(param_1);
    }
    uVar6 = 0xfffffffc;
  }
  else {
    uVar6 = 0xfffffffe;
  }
  return uVar6;
}



void FUN_1401d1150(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined4 param_4)

{
  FUN_1401d0ec0(param_1,param_2,8,0xf,8,0,param_3,param_4);
  return;
}



void FUN_1401d1190(undefined8 param_1,int param_2,int param_3)

{
                    // WARNING: Could not recover jumptable at 0x0001401d1196. Too many branches
                    // WARNING: Treating indirect jump as call
  malloc((ulonglong)(uint)(param_2 * param_3));
  return;
}



void FUN_1401d11a0(undefined8 param_1,void *param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001401d11a3. Too many branches
                    // WARNING: Treating indirect jump as call
  free(param_2);
  return;
}



void FUN_1401d11b0(longlong *param_1,int param_2)

{
  longlong lVar1;
  uint uVar2;
  undefined4 uVar3;
  uint uVar4;
  undefined4 uVar5;
  undefined4 *puVar6;
  longlong lVar7;
  longlong lVar8;
  longlong lVar9;
  uint uVar10;
  ulonglong uVar11;
  uint uVar12;
  uint uVar13;
  uint uVar14;
  byte *pbVar15;
  byte *pbVar16;
  longlong lVar17;
  undefined1 *puVar18;
  undefined1 *puVar19;
  undefined1 *puVar20;
  undefined1 *puVar21;
  undefined1 *puVar22;
  char cVar23;
  uint uVar24;
  uint uVar25;
  int iVar26;
  byte *pbVar27;
  int local_60;
  
  puVar6 = (undefined4 *)param_1[5];
  lVar9 = param_1[3];
  lVar17 = *(longlong *)(puVar6 + 0x16);
  lVar7 = *(longlong *)(puVar6 + 0x18);
  uVar2 = puVar6[0xd];
  uVar14 = puVar6[0x10];
  uVar25 = puVar6[0x11];
  puVar18 = (undefined1 *)(param_1[2] + -1);
  uVar3 = puVar6[0x1a];
  pbVar15 = (byte *)(*param_1 + -1);
  local_60 = (int)puVar18 - (param_2 - (int)lVar9);
  iVar26 = puVar6[0xb];
  uVar4 = puVar6[0xc];
  lVar8 = *(longlong *)(puVar6 + 0xe);
  pbVar27 = pbVar15 + ((int)param_1[1] - 5);
  uVar5 = puVar6[0x1b];
  puVar20 = puVar18;
LAB_1401d1260:
  if (uVar25 < 0xf) {
    pbVar16 = pbVar15 + 1;
    pbVar15 = pbVar15 + 2;
    uVar14 = uVar14 + ((uint)*pbVar16 << ((byte)uVar25 & 0x1f)) +
             ((uint)*pbVar15 << ((byte)uVar25 + 8 & 0x1f));
    uVar25 = uVar25 + 0x10;
  }
  uVar12 = *(uint *)(lVar17 + (ulonglong)(uVar14 & (1 << ((byte)uVar3 & 0x1f)) - 1U) * 4);
  uVar14 = uVar14 >> ((byte)(uVar12 >> 8) & 0x1f);
  uVar25 = uVar25 - (uVar12 >> 8 & 0xff);
  cVar23 = (char)uVar12;
  while (cVar23 != '\0') {
    puVar19 = puVar20;
    if ((uVar12 & 0x10) != 0) {
      uVar24 = uVar12 >> 0x10;
      uVar12 = uVar12 & 0xf;
      pbVar16 = pbVar15;
      if (uVar12 != 0) {
        if (uVar25 < uVar12) {
          pbVar16 = pbVar15 + 1;
          pbVar15 = pbVar15 + 1;
          uVar14 = uVar14 + ((uint)*pbVar16 << ((byte)uVar25 & 0x1f));
          uVar25 = uVar25 + 8;
        }
        uVar10 = (1 << (sbyte)uVar12) - 1U & uVar14;
        uVar14 = uVar14 >> (sbyte)uVar12;
        uVar24 = uVar24 + uVar10;
        uVar25 = uVar25 - uVar12;
        pbVar16 = pbVar15;
      }
      if (uVar25 < 0xf) {
        pbVar15 = pbVar16 + 1;
        pbVar16 = pbVar16 + 2;
        uVar14 = uVar14 + ((uint)*pbVar15 << ((byte)uVar25 & 0x1f)) +
                 ((uint)*pbVar16 << ((byte)uVar25 + 8 & 0x1f));
        uVar25 = uVar25 + 0x10;
      }
      uVar12 = *(uint *)(lVar7 + (ulonglong)((1 << ((byte)uVar5 & 0x1f)) - 1U & uVar14) * 4);
      uVar14 = uVar14 >> ((byte)(uVar12 >> 8) & 0x1f);
      uVar25 = uVar25 - (uVar12 >> 8 & 0xff);
      goto joined_r0x0001401d136d;
    }
    if ((uVar12 & 0x40) != 0) {
      if ((uVar12 & 0x20) == 0) {
        param_1[4] = (longlong)"invalid literal/length code";
        *puVar6 = 0x1d;
      }
      else {
        *puVar6 = 0xb;
      }
      goto LAB_1401d1635;
    }
    uVar12 = *(uint *)(lVar17 + (ulonglong)
                                (((1 << ((byte)uVar12 & 0x1f)) - 1U & uVar14) + (uVar12 >> 0x10)) *
                                4);
    uVar14 = uVar14 >> ((byte)(uVar12 >> 8) & 0x1f);
    uVar25 = uVar25 - (uVar12 >> 8 & 0xff);
    cVar23 = (char)uVar12;
  }
  puVar20[1] = (char)(uVar12 >> 0x10);
  puVar19 = puVar20 + 1;
  goto LAB_1401d15b7;
joined_r0x0001401d136d:
  pbVar15 = pbVar16;
  if ((uVar12 & 0x10) != 0) goto LAB_1401d13b2;
  if ((uVar12 & 0x40) != 0) {
    param_1[4] = (longlong)"invalid distance code";
    *puVar6 = 0x1d;
    goto LAB_1401d1635;
  }
  uVar12 = *(uint *)(lVar7 + (ulonglong)
                             (((1 << ((byte)uVar12 & 0x1f)) - 1U & uVar14) + (uVar12 >> 0x10)) * 4);
  uVar14 = uVar14 >> ((byte)(uVar12 >> 8) & 0x1f);
  uVar25 = uVar25 - (uVar12 >> 8 & 0xff);
  goto joined_r0x0001401d136d;
LAB_1401d13b2:
  uVar13 = uVar12 & 0xf;
  uVar10 = uVar25;
  if (uVar25 < uVar13) {
    pbVar15 = pbVar16 + 1;
    uVar10 = uVar25 + 8;
    uVar14 = uVar14 + ((uint)pbVar16[1] << ((byte)uVar25 & 0x1f));
    if (uVar10 < uVar13) {
      pbVar15 = pbVar16 + 2;
      uVar14 = uVar14 + ((uint)pbVar16[2] << ((byte)uVar10 & 0x1f));
      uVar10 = uVar25 + 0x10;
    }
  }
  uVar25 = uVar10 - uVar13;
  uVar10 = (1 << (sbyte)uVar13) - 1U & uVar14;
  uVar14 = uVar14 >> (sbyte)uVar13;
  uVar10 = (uVar12 >> 0x10) + uVar10;
  uVar12 = (int)puVar20 - local_60;
  if (uVar10 <= uVar12) {
    puVar19 = puVar20 + -(ulonglong)uVar10;
    do {
      puVar22 = puVar20;
      puVar21 = puVar19;
      puVar20 = puVar22 + 3;
      puVar22[1] = puVar21[1];
      uVar24 = uVar24 - 3;
      puVar22[2] = puVar21[2];
      *puVar20 = puVar21[3];
      puVar19 = puVar21 + 3;
    } while (2 < uVar24);
    puVar19 = puVar20;
    if (uVar24 != 0) {
      puVar22[4] = puVar21[4];
      puVar19 = puVar22 + 4;
      if (1 < uVar24) {
        puVar22[5] = puVar21[5];
        puVar19 = puVar22 + 5;
      }
    }
    goto LAB_1401d15b7;
  }
  uVar12 = uVar10 - uVar12;
  if ((uVar4 < uVar12) && (puVar6[0x6f6] != 0)) {
    param_1[4] = (longlong)"invalid distance too far back";
    *puVar6 = 0x1d;
LAB_1401d1635:
    lVar17 = (longlong)pbVar15 - (ulonglong)(uVar25 >> 3);
    iVar26 = uVar25 + (uVar25 >> 3) * -8;
    *param_1 = lVar17 + 1;
    param_1[2] = (longlong)(puVar19 + 1);
    *(int *)(param_1 + 1) = ((int)pbVar27 - (int)lVar17) + 5;
    *(int *)(param_1 + 3) = ((int)(puVar18 + ((int)lVar9 - 0x101)) - (int)puVar19) + 0x101;
    puVar6[0x10] = uVar14 & (1 << ((byte)iVar26 & 0x1f)) - 1U;
    puVar6[0x11] = iVar26;
    return;
  }
  lVar1 = lVar8 + -1;
  if (uVar2 == 0) {
    puVar21 = (undefined1 *)(lVar1 + (ulonglong)(iVar26 - uVar12));
    if (uVar12 < uVar24) {
      uVar24 = uVar24 - uVar12;
      do {
        puVar20 = puVar21 + 1;
        puVar21 = puVar21 + 1;
        puVar19 = puVar19 + 1;
        uVar12 = uVar12 - 1;
        *puVar19 = *puVar20;
      } while (uVar12 != 0);
LAB_1401d14e2:
      puVar21 = puVar19 + -(ulonglong)uVar10;
      puVar20 = puVar19;
    }
  }
  else if (uVar2 < uVar12) {
    uVar13 = uVar12 - uVar2;
    puVar21 = (undefined1 *)(lVar1 + (ulonglong)((uVar2 - uVar12) + iVar26));
    if (uVar13 < uVar24) {
      uVar24 = uVar24 - uVar13;
      do {
        puVar22 = puVar19 + (longlong)(puVar21 + (1 - (longlong)puVar20));
        puVar19 = puVar19 + 1;
        uVar13 = uVar13 - 1;
        *puVar19 = *puVar22;
      } while (uVar13 != 0);
      puVar21 = (undefined1 *)(lVar8 + -1);
      puVar20 = puVar19;
      if (uVar2 < uVar24) {
        uVar24 = uVar24 - uVar2;
        uVar12 = uVar2;
        do {
          puVar20 = puVar21 + 1;
          puVar21 = puVar21 + 1;
          puVar19 = puVar19 + 1;
          uVar12 = uVar12 - 1;
          *puVar19 = *puVar20;
        } while (uVar12 != 0);
        goto LAB_1401d14e2;
      }
    }
  }
  else {
    puVar21 = (undefined1 *)(lVar1 + (ulonglong)(uVar2 - uVar12));
    if (uVar12 < uVar24) {
      uVar24 = uVar24 - uVar12;
      do {
        puVar20 = puVar21 + 1;
        puVar21 = puVar21 + 1;
        puVar19 = puVar19 + 1;
        uVar12 = uVar12 - 1;
        *puVar19 = *puVar20;
      } while (uVar12 != 0);
      goto LAB_1401d14e2;
    }
  }
  if (2 < uVar24) {
    uVar11 = (ulonglong)((uVar24 - 3) / 3 + 1);
    puVar19 = puVar20;
    puVar22 = puVar21;
    do {
      puVar21 = puVar22 + 3;
      puVar20 = puVar19 + 3;
      puVar19[1] = puVar22[1];
      uVar24 = uVar24 - 3;
      uVar11 = uVar11 - 1;
      puVar19[2] = puVar22[2];
      *puVar20 = *puVar21;
      puVar19 = puVar20;
      puVar22 = puVar21;
    } while (uVar11 != 0);
  }
  puVar19 = puVar20;
  if (uVar24 != 0) {
    puVar20[1] = puVar21[1];
    puVar19 = puVar20 + 1;
    if (1 < uVar24) {
      puVar20[2] = puVar21[2];
      puVar19 = puVar20 + 2;
    }
  }
LAB_1401d15b7:
  if ((pbVar27 <= pbVar15) || (puVar20 = puVar19, puVar18 + ((int)lVar9 - 0x101) <= puVar19))
  goto LAB_1401d1635;
  goto LAB_1401d1260;
}



void FUN_1401d16a0(longlong param_1)

{
  undefined2 *puVar1;
  longlong lVar2;
  
  puVar1 = (undefined2 *)(param_1 + 0xbc);
  lVar2 = 0x11e;
  do {
    *puVar1 = 0;
    puVar1 = puVar1 + 2;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  puVar1 = (undefined2 *)(param_1 + 0x9b0);
  lVar2 = 0x1e;
  do {
    *puVar1 = 0;
    puVar1 = puVar1 + 2;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  puVar1 = (undefined2 *)(param_1 + 0xaa4);
  lVar2 = 0x13;
  do {
    *puVar1 = 0;
    puVar1 = puVar1 + 2;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  *(undefined8 *)(param_1 + 0x1700) = 0;
  *(undefined4 *)(param_1 + 0x1708) = 0;
  *(undefined2 *)(param_1 + 0x4bc) = 1;
  *(undefined4 *)(param_1 + 0x16f4) = 0;
  return;
}



void FUN_1401d1720(longlong param_1,longlong param_2,int param_3)

{
  ushort uVar1;
  ushort uVar2;
  int iVar3;
  int iVar4;
  longlong lVar5;
  int iVar6;
  longlong lVar7;
  longlong lVar8;
  bool bVar9;
  
  iVar3 = *(int *)(param_1 + 0x149c);
  lVar7 = (longlong)param_3;
  iVar4 = *(int *)(param_1 + 0xba8 + lVar7 * 4);
  param_3 = param_3 * 2;
  bVar9 = SBORROW4(param_3,iVar3);
  iVar6 = param_3 - iVar3;
  if (param_3 <= iVar3) {
    do {
      if (bVar9 != iVar6 < 0) {
        lVar8 = (longlong)*(int *)(param_1 + 0xba8 + (longlong)param_3 * 4);
        lVar5 = (longlong)*(int *)(param_1 + 0xbac + (longlong)param_3 * 4);
        uVar1 = *(ushort *)(param_2 + lVar5 * 4);
        uVar2 = *(ushort *)(param_2 + lVar8 * 4);
        if ((uVar1 < uVar2) ||
           ((uVar1 == uVar2 &&
            (*(byte *)(lVar5 + 0x14a4 + param_1) <= *(byte *)(lVar8 + 0x14a4 + param_1))))) {
          param_3 = param_3 + 1;
        }
      }
      iVar3 = *(int *)(param_1 + 0xba8 + (longlong)param_3 * 4);
      uVar1 = *(ushort *)(param_2 + (longlong)iVar4 * 4);
      uVar2 = *(ushort *)(param_2 + (longlong)iVar3 * 4);
      iVar6 = (int)lVar7;
      if ((uVar1 < uVar2) ||
         ((uVar1 == uVar2 &&
          (*(byte *)((longlong)iVar4 + 0x14a4 + param_1) <=
           *(byte *)((longlong)iVar3 + 0x14a4 + param_1))))) {
        *(int *)(param_1 + 0xba8 + (longlong)iVar6 * 4) = iVar4;
        return;
      }
      lVar7 = (longlong)param_3;
      param_3 = param_3 * 2;
      *(int *)(param_1 + 0xba8 + (longlong)iVar6 * 4) = iVar3;
      iVar3 = *(int *)(param_1 + 0x149c);
      bVar9 = SBORROW4(param_3,iVar3);
      iVar6 = param_3 - iVar3;
    } while (param_3 <= iVar3);
  }
  *(int *)(param_1 + 0xba8 + lVar7 * 4) = iVar4;
  return;
}



void FUN_1401d1810(longlong param_1,longlong *param_2)

{
  short *psVar1;
  ushort uVar2;
  short sVar3;
  int iVar4;
  longlong *plVar5;
  longlong lVar6;
  longlong lVar7;
  uint uVar8;
  longlong lVar9;
  uint uVar10;
  longlong lVar11;
  ulonglong uVar12;
  int iVar13;
  int iVar14;
  longlong lVar15;
  undefined2 *puVar16;
  longlong lVar17;
  int iVar18;
  uint uVar19;
  ulonglong uVar20;
  int *piVar21;
  longlong lVar22;
  
  plVar5 = (longlong *)param_2[2];
  lVar6 = *param_2;
  lVar7 = param_2[1];
  lVar9 = plVar5[2];
  uVar19 = *(uint *)(plVar5 + 3);
  uVar20 = (ulonglong)(int)uVar19;
  lVar15 = *plVar5;
  iVar13 = 0;
  lVar17 = plVar5[1];
  puVar16 = (undefined2 *)(param_1 + 0xb88);
  for (lVar11 = 0x10; lVar11 != 0; lVar11 = lVar11 + -1) {
    *puVar16 = 0;
    puVar16 = puVar16 + 1;
  }
  *(undefined2 *)
   (lVar6 + 2 + (longlong)*(int *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x14a0) * 4) * 4)
       = 0;
  iVar14 = *(int *)(param_1 + 0x14a0) + 1;
  lVar11 = (longlong)iVar14;
  if (lVar11 < 0x23d) {
    lVar22 = 0x23d - lVar11;
    piVar21 = (int *)(param_1 + 0xba8 + lVar11 * 4);
    iVar14 = iVar14 + (int)lVar22;
    do {
      iVar4 = *piVar21;
      lVar11 = (longlong)iVar4 * 4;
      uVar10 = *(ushort *)(lVar6 + 2 + (ulonglong)*(ushort *)(lVar11 + 2 + lVar6) * 4) + 1;
      if ((int)uVar19 < (int)uVar10) {
        iVar13 = iVar13 + 1;
        uVar10 = uVar19;
      }
      *(short *)(lVar11 + 2 + lVar6) = (short)uVar10;
      if (iVar4 <= (int)lVar7) {
        iVar18 = 0;
        psVar1 = (short *)(param_1 + 0xb88 + (longlong)(int)uVar10 * 2);
        *psVar1 = *psVar1 + 1;
        if ((int)lVar9 <= iVar4) {
          iVar18 = *(int *)(lVar17 + ((longlong)iVar4 - (longlong)(int)lVar9) * 4);
        }
        uVar2 = *(ushort *)(lVar11 + lVar6);
        *(int *)(param_1 + 0x1700) = *(int *)(param_1 + 0x1700) + (iVar18 + uVar10) * (uint)uVar2;
        if (lVar15 != 0) {
          *(int *)(param_1 + 0x1704) =
               *(int *)(param_1 + 0x1704) +
               ((uint)*(ushort *)(lVar11 + 2 + lVar15) + iVar18) * (uint)uVar2;
        }
      }
      piVar21 = piVar21 + 1;
      lVar22 = lVar22 + -1;
    } while (lVar22 != 0);
  }
  if (iVar13 != 0) {
    do {
      uVar12 = (ulonglong)(int)(uVar19 - 1);
      sVar3 = *(short *)(param_1 + 0xb88 + uVar12 * 2);
      uVar10 = uVar19 - 1;
      while (sVar3 == 0) {
        uVar10 = (int)uVar12 - 1;
        uVar12 = (ulonglong)uVar10;
        sVar3 = *(short *)(param_1 + 0xb88 + (longlong)(int)uVar10 * 2);
      }
      iVar13 = iVar13 + -2;
      psVar1 = (short *)(param_1 + 0xb88 + (longlong)(int)uVar10 * 2);
      *psVar1 = *psVar1 + -1;
      psVar1 = (short *)(param_1 + 0xb8a + (longlong)(int)uVar10 * 2);
      *psVar1 = *psVar1 + 2;
      psVar1 = (short *)(param_1 + 0xb88 + uVar20 * 2);
      *psVar1 = *psVar1 + -1;
    } while (0 < iVar13);
    lVar15 = (longlong)iVar14;
    while (uVar19 != 0) {
      uVar19 = (uint)uVar20;
      uVar2 = *(ushort *)(param_1 + 0xb88 + (longlong)(int)uVar19 * 2);
      uVar10 = (uint)uVar2;
      if (uVar2 != 0) {
        lVar17 = param_1 + 0xba8 + lVar15 * 4;
        do {
          piVar21 = (int *)(lVar17 + -4);
          lVar9 = (longlong)*piVar21;
          lVar17 = lVar17 + -4;
          lVar15 = lVar15 + -1;
          if (*piVar21 <= (int)lVar7) {
            uVar8 = (uint)*(ushort *)(lVar6 + 2 + lVar9 * 4);
            if (uVar8 != uVar19) {
              *(int *)(param_1 + 0x1700) =
                   *(int *)(param_1 + 0x1700) +
                   (uVar19 - uVar8) * (uint)*(ushort *)(lVar6 + lVar9 * 4);
              *(short *)(lVar6 + 2 + lVar9 * 4) = (short)uVar20;
            }
            uVar10 = uVar10 - 1;
          }
        } while (uVar10 != 0);
      }
      uVar19 = uVar19 - 1;
      uVar20 = (ulonglong)uVar19;
    }
  }
  return;
}



void FUN_1401d1a30(longlong param_1,longlong param_2,int param_3)

{
  short *psVar1;
  ushort uVar2;
  int iVar3;
  longlong lVar4;
  uint uVar5;
  uint uVar6;
  uint uVar7;
  int iVar8;
  int iVar9;
  ushort *puVar10;
  
  uVar2 = *(ushort *)(param_2 + 2);
  uVar5 = 0xffffffff;
  iVar9 = 0;
  iVar3 = 7;
  iVar8 = 4;
  if (uVar2 == 0) {
    iVar3 = 0x8a;
    iVar8 = 3;
  }
  lVar4 = (longlong)param_3;
  *(undefined2 *)(param_2 + 6 + lVar4 * 4) = 0xffff;
  if (-1 < lVar4) {
    puVar10 = (ushort *)(param_2 + 6);
    lVar4 = lVar4 + 1;
    uVar6 = (uint)uVar2;
    do {
      iVar9 = iVar9 + 1;
      uVar2 = *puVar10;
      uVar7 = (uint)uVar2;
      if ((iVar3 <= iVar9) || (uVar6 != uVar7)) {
        if (iVar9 < iVar8) {
          psVar1 = (short *)(param_1 + 0xaa4 + (longlong)(int)uVar6 * 4);
          *psVar1 = *psVar1 + (short)iVar9;
        }
        else if (uVar6 == 0) {
          if (iVar9 < 0xb) {
            *(short *)(param_1 + 0xae8) = *(short *)(param_1 + 0xae8) + 1;
          }
          else {
            *(short *)(param_1 + 0xaec) = *(short *)(param_1 + 0xaec) + 1;
          }
        }
        else {
          if (uVar6 != uVar5) {
            psVar1 = (short *)(param_1 + 0xaa4 + (longlong)(int)uVar6 * 4);
            *psVar1 = *psVar1 + 1;
          }
          *(short *)(param_1 + 0xae4) = *(short *)(param_1 + 0xae4) + 1;
        }
        iVar9 = 0;
        uVar5 = uVar6;
        if (uVar2 == 0) {
          iVar3 = 0x8a;
          iVar8 = 3;
          iVar9 = 0;
        }
        else if (uVar6 == uVar7) {
          iVar3 = 6;
          iVar8 = 3;
          iVar9 = 0;
        }
        else {
          iVar3 = 7;
          iVar8 = 4;
        }
      }
      puVar10 = puVar10 + 2;
      lVar4 = lVar4 + -1;
      uVar6 = uVar7;
    } while (lVar4 != 0);
  }
  return;
}



void FUN_1401d1b20(longlong param_1,longlong param_2,int param_3)

{
  ushort uVar1;
  ushort uVar2;
  ushort uVar3;
  int iVar4;
  byte bVar5;
  int iVar6;
  ushort *puVar7;
  uint uVar8;
  uint uVar9;
  longlong lVar10;
  short sVar11;
  int iVar12;
  uint uVar14;
  longlong lVar15;
  int iVar13;
  
  uVar14 = 0xffffffff;
  iVar13 = 0;
  iVar4 = 7;
  iVar6 = 4;
  if (*(ushort *)(param_2 + 2) == 0) {
    iVar4 = 0x8a;
    iVar6 = 3;
  }
  if (-1 < param_3) {
    lVar15 = (longlong)param_3 + 1;
    puVar7 = (ushort *)(param_2 + 6);
    uVar8 = (uint)*(ushort *)(param_2 + 2);
    do {
      iVar12 = iVar13 + 1;
      lVar10 = (longlong)(int)uVar8;
      uVar1 = *puVar7;
      uVar9 = (uint)uVar1;
      if ((iVar4 <= iVar12) || (uVar8 != uVar9)) {
        if (iVar12 < iVar6) {
          do {
            uVar14 = (uint)*(ushort *)(param_1 + 0xaa6 + lVar10 * 4);
            iVar6 = *(int *)(param_1 + 0x1714);
            if ((int)(0x10 - uVar14) < iVar6) {
              uVar3 = *(ushort *)(param_1 + 0xaa4 + lVar10 * 4);
              *(ushort *)(param_1 + 0x1710) =
                   *(ushort *)(param_1 + 0x1710) | uVar3 << ((byte)iVar6 & 0x1f);
              *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10))
                   = *(undefined1 *)(param_1 + 0x1710);
              *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
              *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10))
                   = *(undefined1 *)(param_1 + 0x1711);
              *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
              iVar6 = *(int *)(param_1 + 0x1714) + -0x10;
              *(ushort *)(param_1 + 0x1710) =
                   uVar3 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
            }
            else {
              *(ushort *)(param_1 + 0x1710) =
                   *(ushort *)(param_1 + 0x1710) |
                   *(short *)(param_1 + 0xaa4 + lVar10 * 4) << ((byte)iVar6 & 0x1f);
            }
            iVar12 = iVar12 + -1;
            *(uint *)(param_1 + 0x1714) = iVar6 + uVar14;
          } while (iVar12 != 0);
        }
        else {
          if (uVar8 == 0) {
            iVar6 = *(int *)(param_1 + 0x1714);
            sVar11 = (short)iVar12;
            bVar5 = (byte)iVar6;
            if (iVar12 < 0xb) {
              uVar3 = *(ushort *)(param_1 + 0xaea);
              if ((int)(0x10 - (uint)uVar3) < iVar6) {
                uVar2 = *(ushort *)(param_1 + 0xae8);
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | uVar2 << (bVar5 & 0x1f);
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1710);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1711);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                iVar6 = *(int *)(param_1 + 0x1714) + -0x10;
                *(ushort *)(param_1 + 0x1710) =
                     uVar2 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
              }
              else {
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | *(short *)(param_1 + 0xae8) << (bVar5 & 0x1f);
              }
              iVar6 = iVar6 + (uint)uVar3;
              *(int *)(param_1 + 0x1714) = iVar6;
              if (iVar6 < 0xe) {
                sVar11 = sVar11 + -3;
                iVar4 = iVar6 + 3;
LAB_1401d202e:
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | sVar11 << ((byte)iVar6 & 0x1f);
              }
              else {
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | sVar11 - 3U << ((byte)iVar6 & 0x1f);
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1710);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1711);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                iVar4 = *(int *)(param_1 + 0x1714) + -0xd;
                *(ushort *)(param_1 + 0x1710) =
                     (ushort)(sVar11 - 3U) >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
              }
            }
            else {
              uVar3 = *(ushort *)(param_1 + 0xaee);
              if ((int)(0x10 - (uint)uVar3) < iVar6) {
                uVar2 = *(ushort *)(param_1 + 0xaec);
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | uVar2 << (bVar5 & 0x1f);
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1710);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1711);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                iVar6 = *(int *)(param_1 + 0x1714) + -0x10;
                *(ushort *)(param_1 + 0x1710) =
                     uVar2 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
              }
              else {
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | *(short *)(param_1 + 0xaec) << (bVar5 & 0x1f);
              }
              iVar6 = iVar6 + (uint)uVar3;
              *(int *)(param_1 + 0x1714) = iVar6;
              if (iVar6 < 10) {
                sVar11 = sVar11 + -0xb;
                iVar4 = iVar6 + 7;
                goto LAB_1401d202e;
              }
              *(ushort *)(param_1 + 0x1710) =
                   *(ushort *)(param_1 + 0x1710) | sVar11 - 0xbU << ((byte)iVar6 & 0x1f);
              *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10))
                   = *(undefined1 *)(param_1 + 0x1710);
              *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
              *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10))
                   = *(undefined1 *)(param_1 + 0x1711);
              *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
              iVar4 = *(int *)(param_1 + 0x1714) + -9;
              *(ushort *)(param_1 + 0x1710) =
                   (ushort)(sVar11 - 0xbU) >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
            }
          }
          else {
            if (uVar8 != uVar14) {
              uVar14 = (uint)*(ushort *)(param_1 + 0xaa6 + lVar10 * 4);
              iVar6 = *(int *)(param_1 + 0x1714);
              if ((int)(0x10 - uVar14) < iVar6) {
                uVar3 = *(ushort *)(param_1 + 0xaa4 + lVar10 * 4);
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | uVar3 << ((byte)iVar6 & 0x1f);
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1710);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1711);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                iVar6 = *(int *)(param_1 + 0x1714) + -0x10;
                *(ushort *)(param_1 + 0x1710) =
                     uVar3 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
              }
              else {
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) |
                     *(short *)(param_1 + 0xaa4 + lVar10 * 4) << ((byte)iVar6 & 0x1f);
              }
              *(uint *)(param_1 + 0x1714) = iVar6 + uVar14;
              iVar12 = iVar13;
            }
            uVar3 = *(ushort *)(param_1 + 0xae6);
            iVar6 = *(int *)(param_1 + 0x1714);
            if ((int)(0x10 - (uint)uVar3) < iVar6) {
              uVar2 = *(ushort *)(param_1 + 0xae4);
              *(ushort *)(param_1 + 0x1710) =
                   *(ushort *)(param_1 + 0x1710) | uVar2 << ((byte)iVar6 & 0x1f);
              *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10))
                   = *(undefined1 *)(param_1 + 0x1710);
              *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
              *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10))
                   = *(undefined1 *)(param_1 + 0x1711);
              *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
              iVar6 = *(int *)(param_1 + 0x1714) + -0x10;
              *(ushort *)(param_1 + 0x1710) =
                   uVar2 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
            }
            else {
              *(ushort *)(param_1 + 0x1710) =
                   *(ushort *)(param_1 + 0x1710) |
                   *(short *)(param_1 + 0xae4) << ((byte)iVar6 & 0x1f);
            }
            iVar6 = iVar6 + (uint)uVar3;
            *(int *)(param_1 + 0x1714) = iVar6;
            if (iVar6 < 0xf) {
              sVar11 = (short)iVar12 + -3;
              iVar4 = iVar6 + 2;
              goto LAB_1401d202e;
            }
            uVar3 = (short)iVar12 - 3;
            *(ushort *)(param_1 + 0x1710) =
                 *(ushort *)(param_1 + 0x1710) | uVar3 << ((byte)iVar6 & 0x1f);
            *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                 *(undefined1 *)(param_1 + 0x1710);
            *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
            *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                 *(undefined1 *)(param_1 + 0x1711);
            *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
            iVar4 = *(int *)(param_1 + 0x1714) + -0xe;
            *(ushort *)(param_1 + 0x1710) =
                 uVar3 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
          }
          *(int *)(param_1 + 0x1714) = iVar4;
        }
        uVar14 = uVar8;
        iVar12 = 0;
        if (uVar1 == 0) {
          iVar4 = 0x8a;
          iVar6 = 3;
        }
        else if (uVar8 == uVar9) {
          iVar4 = 6;
          iVar6 = 3;
        }
        else {
          iVar4 = 7;
          iVar6 = 4;
          iVar12 = 0;
        }
      }
      iVar13 = iVar12;
      puVar7 = puVar7 + 2;
      lVar15 = lVar15 + -1;
      uVar8 = uVar9;
    } while (lVar15 != 0);
  }
  return;
}



void FUN_1401d2090(longlong param_1,int param_2,int param_3,uint param_4)

{
  ushort uVar1;
  int iVar2;
  int iVar3;
  byte *pbVar4;
  ulonglong uVar5;
  
  iVar2 = *(int *)(param_1 + 0x1714);
  uVar5 = (ulonglong)param_4;
  if (iVar2 < 0xc) {
    *(ushort *)(param_1 + 0x1710) =
         *(ushort *)(param_1 + 0x1710) | (short)param_2 + -0x101 << ((byte)iVar2 & 0x1f);
    iVar2 = iVar2 + 5;
  }
  else {
    uVar1 = (short)param_2 - 0x101;
    *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar1 << ((byte)iVar2 & 0x1f);
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    iVar2 = *(int *)(param_1 + 0x1714) + -0xb;
    *(ushort *)(param_1 + 0x1710) = uVar1 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
  }
  *(int *)(param_1 + 0x1714) = iVar2;
  if (iVar2 < 0xc) {
    *(ushort *)(param_1 + 0x1710) =
         *(ushort *)(param_1 + 0x1710) | (short)param_3 + -1 << ((byte)iVar2 & 0x1f);
    iVar2 = iVar2 + 5;
  }
  else {
    uVar1 = (short)param_3 - 1;
    *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar1 << ((byte)iVar2 & 0x1f);
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    iVar2 = *(int *)(param_1 + 0x1714) + -0xb;
    *(ushort *)(param_1 + 0x1710) = uVar1 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
  }
  *(int *)(param_1 + 0x1714) = iVar2;
  if (iVar2 < 0xd) {
    *(ushort *)(param_1 + 0x1710) =
         *(ushort *)(param_1 + 0x1710) | (short)param_4 + -4 << ((byte)iVar2 & 0x1f);
    iVar2 = iVar2 + 4;
  }
  else {
    uVar1 = (short)param_4 - 4;
    *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar1 << ((byte)iVar2 & 0x1f);
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    iVar2 = *(int *)(param_1 + 0x1714) + -0xc;
    *(ushort *)(param_1 + 0x1710) = uVar1 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
  }
  *(int *)(param_1 + 0x1714) = iVar2;
  if (0 < (int)param_4) {
    pbVar4 = &DAT_140276390;
    do {
      iVar2 = *(int *)(param_1 + 0x1714);
      if (iVar2 < 0xe) {
        iVar3 = iVar2 + 3;
        *(ushort *)(param_1 + 0x1710) =
             *(ushort *)(param_1 + 0x1710) |
             *(short *)(param_1 + 0xaa6 + (ulonglong)*pbVar4 * 4) << ((byte)iVar2 & 0x1f);
      }
      else {
        uVar1 = *(ushort *)(param_1 + 0xaa6 + (ulonglong)*pbVar4 * 4);
        *(ushort *)(param_1 + 0x1710) =
             *(ushort *)(param_1 + 0x1710) | uVar1 << ((byte)iVar2 & 0x1f);
        *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
             *(undefined1 *)(param_1 + 0x1710);
        *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
             *(undefined1 *)(param_1 + 0x1711);
        *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
        iVar3 = *(int *)(param_1 + 0x1714) + -0xd;
        *(ushort *)(param_1 + 0x1710) = uVar1 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
      }
      pbVar4 = pbVar4 + 1;
      uVar5 = uVar5 - 1;
      *(int *)(param_1 + 0x1714) = iVar3;
    } while (uVar5 != 0);
  }
  FUN_1401d1b20(param_1,param_1 + 0xbc,param_2 + -1);
  FUN_1401d1b20(param_1,param_1 + 0x9b0,param_3 + -1);
  return;
}



void FUN_1401d2300(longlong param_1,longlong param_2,longlong param_3)

{
  byte bVar1;
  byte bVar2;
  int iVar3;
  int iVar4;
  byte bVar5;
  ulonglong uVar6;
  longlong lVar7;
  uint uVar8;
  uint uVar9;
  ushort uVar10;
  uint uVar11;
  ushort uVar12;
  longlong lVar13;
  
  uVar8 = 0;
  if (*(int *)(param_1 + 0x16f4) != 0) {
    lVar13 = 0;
    do {
      uVar6 = (ulonglong)uVar8;
      lVar13 = lVar13 + 2;
      uVar10 = *(ushort *)(*(longlong *)(param_1 + 0x16f8) + -2 + lVar13);
      uVar8 = uVar8 + 1;
      bVar1 = *(byte *)(uVar6 + *(longlong *)(param_1 + 0x16e8));
      iVar3 = *(int *)(param_1 + 0x1714);
      bVar5 = (byte)iVar3;
      if (uVar10 == 0) {
        lVar7 = (longlong)(int)(uint)bVar1;
        uVar11 = (uint)*(ushort *)(param_2 + 2 + lVar7 * 4);
        if ((int)(0x10 - uVar11) < iVar3) {
          uVar10 = *(ushort *)(param_2 + lVar7 * 4);
          *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar10 << (bVar5 & 0x1f);
          *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
               *(undefined1 *)(param_1 + 0x1710);
          *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
               *(undefined1 *)(param_1 + 0x1711);
          *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
          iVar3 = *(int *)(param_1 + 0x1714) + -0x10 + uVar11;
          *(ushort *)(param_1 + 0x1710) =
               uVar10 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
        }
        else {
          *(ushort *)(param_1 + 0x1710) =
               *(ushort *)(param_1 + 0x1710) | *(short *)(param_2 + lVar7 * 4) << (bVar5 & 0x1f);
          iVar3 = iVar3 + uVar11;
        }
LAB_1401d2687:
        *(int *)(param_1 + 0x1714) = iVar3;
      }
      else {
        bVar2 = (&DAT_140276ab0)[bVar1];
        uVar11 = bVar2 + 0x101;
        uVar9 = (uint)*(ushort *)(param_2 + 2 + (ulonglong)uVar11 * 4);
        if ((int)(0x10 - uVar9) < iVar3) {
          uVar12 = *(ushort *)(param_2 + (ulonglong)uVar11 * 4);
          *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar12 << (bVar5 & 0x1f);
          *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
               *(undefined1 *)(param_1 + 0x1710);
          *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
               *(undefined1 *)(param_1 + 0x1711);
          *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
          iVar3 = *(int *)(param_1 + 0x1714) + -0x10;
          *(ushort *)(param_1 + 0x1710) =
               uVar12 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
        }
        else {
          *(ushort *)(param_1 + 0x1710) =
               *(ushort *)(param_1 + 0x1710) |
               *(short *)(param_2 + (ulonglong)uVar11 * 4) << (bVar5 & 0x1f);
        }
        iVar3 = iVar3 + uVar9;
        *(int *)(param_1 + 0x1714) = iVar3;
        iVar4 = *(int *)(&DAT_140276240 + (ulonglong)bVar2 * 4);
        if (iVar4 != 0) {
          uVar12 = (ushort)bVar1 - (short)*(undefined4 *)(&DAT_140276bb0 + (ulonglong)bVar2 * 4);
          if (0x10 - iVar4 < iVar3) {
            *(ushort *)(param_1 + 0x1710) =
                 *(ushort *)(param_1 + 0x1710) | uVar12 << ((byte)iVar3 & 0x1f);
            *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                 *(undefined1 *)(param_1 + 0x1710);
            *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
            *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                 *(undefined1 *)(param_1 + 0x1711);
            *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
            iVar3 = *(int *)(param_1 + 0x1714) + -0x10;
            *(ushort *)(param_1 + 0x1710) =
                 uVar12 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
          }
          else {
            *(ushort *)(param_1 + 0x1710) =
                 *(ushort *)(param_1 + 0x1710) | uVar12 << ((byte)iVar3 & 0x1f);
          }
          *(int *)(param_1 + 0x1714) = iVar3 + iVar4;
        }
        uVar11 = uVar10 - 1;
        if (uVar11 < 0x100) {
          bVar1 = (&DAT_1402768b0)[uVar11];
        }
        else {
          bVar1 = (&DAT_1402768b0)[(uVar11 >> 7) + 0x100];
        }
        uVar6 = (ulonglong)bVar1;
        uVar9 = (uint)*(ushort *)(param_3 + 2 + uVar6 * 4);
        iVar4 = *(int *)(param_1 + 0x1714);
        if ((int)(0x10 - uVar9) < iVar4) {
          uVar10 = *(ushort *)(param_3 + uVar6 * 4);
          *(ushort *)(param_1 + 0x1710) =
               *(ushort *)(param_1 + 0x1710) | uVar10 << ((byte)iVar4 & 0x1f);
          *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
               *(undefined1 *)(param_1 + 0x1710);
          *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
               *(undefined1 *)(param_1 + 0x1711);
          *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
          iVar4 = *(int *)(param_1 + 0x1714) + -0x10;
          *(ushort *)(param_1 + 0x1710) =
               uVar10 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
        }
        else {
          *(ushort *)(param_1 + 0x1710) =
               *(ushort *)(param_1 + 0x1710) |
               *(short *)(param_3 + uVar6 * 4) << ((byte)iVar4 & 0x1f);
        }
        iVar4 = iVar4 + uVar9;
        *(int *)(param_1 + 0x1714) = iVar4;
        iVar3 = *(int *)(&DAT_1402762c0 + uVar6 * 4);
        if (iVar3 != 0) {
          uVar10 = (short)uVar11 - (short)*(undefined4 *)(&DAT_140276c30 + uVar6 * 4);
          if (0x10 - iVar3 < iVar4) {
            *(ushort *)(param_1 + 0x1710) =
                 *(ushort *)(param_1 + 0x1710) | uVar10 << ((byte)iVar4 & 0x1f);
            *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                 *(undefined1 *)(param_1 + 0x1710);
            *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
            *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                 *(undefined1 *)(param_1 + 0x1711);
            *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
            iVar3 = *(int *)(param_1 + 0x1714) + -0x10 + iVar3;
            *(ushort *)(param_1 + 0x1710) =
                 uVar10 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
          }
          else {
            iVar3 = iVar4 + iVar3;
            *(ushort *)(param_1 + 0x1710) =
                 *(ushort *)(param_1 + 0x1710) | uVar10 << ((byte)iVar4 & 0x1f);
          }
          goto LAB_1401d2687;
        }
      }
    } while (uVar8 < *(uint *)(param_1 + 0x16f4));
  }
  uVar10 = *(ushort *)(param_2 + 0x402);
  iVar3 = *(int *)(param_1 + 0x1714);
  if ((int)(0x10 - (uint)uVar10) < iVar3) {
    uVar12 = *(ushort *)(param_2 + 0x400);
    *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar12 << ((byte)iVar3 & 0x1f);
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    iVar3 = *(int *)(param_1 + 0x1714) + -0x10;
    *(ushort *)(param_1 + 0x1710) = uVar12 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
  }
  else {
    *(ushort *)(param_1 + 0x1710) =
         *(ushort *)(param_1 + 0x1710) | *(short *)(param_2 + 0x400) << ((byte)iVar3 & 0x1f);
  }
  *(uint *)(param_1 + 0x1714) = iVar3 + (uint)uVar10;
  *(uint *)(param_1 + 0x170c) = (uint)*(ushort *)(param_2 + 0x402);
  return;
}



undefined8 FUN_1401d2770(longlong param_1)

{
  short *psVar1;
  longlong lVar2;
  ulonglong uVar3;
  
  lVar2 = 0;
  uVar3 = 0xf3ffc07f;
  psVar1 = (short *)(param_1 + 0xbc);
  while (((uVar3 & 1) == 0 || (*psVar1 == 0))) {
    lVar2 = lVar2 + 1;
    psVar1 = psVar1 + 2;
    uVar3 = uVar3 >> 1;
    if (0x1f < lVar2) {
      if (((*(short *)(param_1 + 0xe0) == 0) && (*(short *)(param_1 + 0xe4) == 0)) &&
         (*(short *)(param_1 + 0xf0) == 0)) {
        lVar2 = 0x20;
        psVar1 = (short *)(param_1 + 0x13c);
        while (*psVar1 == 0) {
          lVar2 = lVar2 + 1;
          psVar1 = psVar1 + 2;
          if (0xff < lVar2) {
            return 0;
          }
        }
      }
      return 1;
    }
  }
  return 0;
}



void FUN_1401d27f0(longlong param_1)

{
  if (*(int *)(param_1 + 0x1714) == 0x10) {
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined4 *)(param_1 + 0x1714) = 0;
    *(undefined2 *)(param_1 + 0x1710) = 0;
    return;
  }
  if (7 < *(int *)(param_1 + 0x1714)) {
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(int *)(param_1 + 0x1714) = *(int *)(param_1 + 0x1714) + -8;
    *(ushort *)(param_1 + 0x1710) = (ushort)*(byte *)(param_1 + 0x1711);
  }
  return;
}



void FUN_1401d2880(longlong param_1,undefined1 *param_2,int param_3,int param_4)

{
  undefined1 uVar1;
  byte bVar2;
  
  if (*(int *)(param_1 + 0x1714) < 9) {
    if (*(int *)(param_1 + 0x1714) < 1) goto LAB_1401d28da;
    uVar1 = *(undefined1 *)(param_1 + 0x1710);
  }
  else {
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    uVar1 = *(undefined1 *)(param_1 + 0x1711);
  }
  *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = uVar1;
  *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
LAB_1401d28da:
  *(undefined4 *)(param_1 + 0x170c) = 8;
  *(undefined2 *)(param_1 + 0x1710) = 0;
  *(undefined4 *)(param_1 + 0x1714) = 0;
  if (param_4 != 0) {
    *(byte *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = (byte)param_3;
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    bVar2 = (byte)((uint)param_3 >> 8);
    *(byte *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = bVar2;
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(byte *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = ~(byte)param_3
    ;
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(byte *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = ~bVar2;
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
  }
  for (; param_3 != 0; param_3 = param_3 + -1) {
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = *param_2
    ;
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    param_2 = param_2 + 1;
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

undefined8
FUN_1401d2990(int param_1,ushort *param_2,uint param_3,longlong *param_4,uint *param_5,
             undefined *param_6)

{
  uint uVar1;
  byte bVar2;
  ushort uVar4;
  uint uVar5;
  ushort *puVar6;
  undefined8 uVar7;
  byte bVar8;
  longlong lVar9;
  ulonglong uVar10;
  uint uVar11;
  ulonglong uVar12;
  uint uVar13;
  ulonglong uVar14;
  int iVar15;
  ulonglong uVar16;
  uint uVar17;
  int iVar18;
  int iVar19;
  uint uVar20;
  uint uVar21;
  byte bVar22;
  bool bVar23;
  undefined4 local_d8;
  uint local_d0;
  uint local_cc;
  undefined *local_b0;
  undefined *local_a8;
  ushort local_88 [15];
  ushort local_6a [17];
  ulonglong local_48;
  char cVar3;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)&local_d8;
  uVar16 = 0;
  puVar6 = local_88;
  for (lVar9 = 0x10; lVar9 != 0; lVar9 = lVar9 + -1) {
    *puVar6 = 0;
    puVar6 = puVar6 + 1;
  }
  if (param_3 != 0) {
    uVar12 = (ulonglong)param_3;
    puVar6 = param_2;
    do {
      uVar4 = *puVar6;
      puVar6 = puVar6 + 1;
      local_88[uVar4] = local_88[uVar4] + 1;
      uVar12 = uVar12 - 1;
    } while (uVar12 != 0);
  }
  uVar20 = 0xf;
  puVar6 = local_6a;
  uVar12 = 0xffffffff;
  do {
    if (*puVar6 != 0) break;
    uVar20 = uVar20 - 1;
    puVar6 = puVar6 + -1;
  } while (uVar20 != 0);
  uVar1 = *param_5;
  if (uVar20 < *param_5) {
    uVar1 = uVar20;
  }
  if (uVar20 == 0) {
    *(undefined4 *)*param_4 = 0x140;
    *param_4 = *param_4 + 4;
    *(undefined4 *)*param_4 = 0x140;
    *param_4 = *param_4 + 4;
    *param_5 = 1;
    uVar7 = 0;
  }
  else {
    uVar21 = 1;
    if (1 < uVar20) {
      puVar6 = local_88;
      do {
        puVar6 = puVar6 + 1;
        if (*puVar6 != 0) break;
        uVar21 = uVar21 + 1;
      } while (uVar21 < uVar20);
    }
    iVar15 = 1;
    if (uVar1 < uVar21) {
      uVar1 = uVar21;
    }
    uVar10 = 1;
    do {
      iVar15 = iVar15 * 2 - (uint)local_88[uVar10];
      if (iVar15 < 0) goto LAB_1401d2e3c;
      uVar11 = (int)uVar10 + 1;
      uVar10 = (ulonglong)uVar11;
    } while (uVar11 < 0x10);
    if ((iVar15 < 1) || ((param_1 != 0 && (uVar20 == 1)))) {
      local_6a[2] = 0;
      lVar9 = 0xe;
      uVar10 = uVar16;
      do {
        lVar9 = lVar9 + -1;
        *(short *)((longlong)local_6a + uVar10 + 6) =
             *(short *)((longlong)local_88 + uVar10 + 2) +
             *(short *)((longlong)local_6a + uVar10 + 4);
        uVar10 = uVar10 + 2;
      } while (lVar9 != 0);
      puVar6 = param_2;
      uVar10 = uVar16;
      if (param_3 != 0) {
        do {
          if (*puVar6 != 0) {
            *(short *)(param_6 + (ulonglong)local_6a[(ulonglong)*puVar6 + 1] * 2) = (short)uVar10;
            local_6a[(ulonglong)*puVar6 + 1] = local_6a[(ulonglong)*puVar6 + 1] + 1;
          }
          uVar11 = (int)uVar10 + 1;
          puVar6 = puVar6 + 1;
          uVar10 = (ulonglong)uVar11;
        } while (uVar11 < param_3);
      }
      if (param_1 == 0) {
        local_a8 = param_6;
        local_b0 = param_6;
        iVar15 = 0x13;
      }
      else if (param_1 == 1) {
        iVar15 = 0x100;
        local_b0 = &DAT_140276ad6;
        local_a8 = &DAT_140276b16;
      }
      else {
        iVar15 = -1;
        local_b0 = &DAT_140276d60;
        local_a8 = &DAT_140276da0;
      }
      bVar8 = (byte)uVar1;
      local_cc = 1 << (bVar8 & 0x1f);
      uVar14 = (ulonglong)local_cc;
      local_d0 = 0;
      lVar9 = *param_4;
      uVar5 = local_cc - 1;
      uVar10 = uVar16;
      uVar11 = 0;
      if (param_1 == 1) {
        uVar12 = 0xffffffff;
        if (local_cc < 0x354) {
LAB_1401d2c00:
          do {
            do {
              cVar3 = (char)uVar21;
              bVar22 = (byte)uVar11;
              bVar2 = cVar3 - bVar22;
              uVar4 = *(ushort *)(param_6 + uVar10 * 2);
              if ((int)(uint)uVar4 < iVar15) {
                local_d8._0_2_ = (ushort)bVar2 << 8;
              }
              else if (iVar15 < (int)(uint)uVar4) {
                local_d8._0_2_ =
                     CONCAT11(bVar2,local_a8[(ulonglong)*(ushort *)(param_6 + uVar10 * 2) * 2]);
                uVar4 = *(ushort *)(local_b0 + (ulonglong)*(ushort *)(param_6 + uVar10 * 2) * 2);
              }
              else {
                local_d8 = CONCAT31((uint3)bVar2,0x60);
                uVar4 = 0;
              }
              uVar13 = (uint)uVar16;
              local_d8 = CONCAT22(uVar4,(ushort)local_d8);
              iVar18 = 1 << (cVar3 - bVar22 & 0x1f);
              uVar10 = (ulonglong)((uVar13 >> (bVar22 & 0x1f)) + (int)uVar14);
              uVar16 = uVar14;
              do {
                uVar10 = (ulonglong)(uint)((int)uVar10 - iVar18);
                uVar17 = (int)uVar16 - iVar18;
                uVar16 = (ulonglong)uVar17;
                *(uint *)(lVar9 + uVar10 * 4) = local_d8;
              } while (uVar17 != 0);
              for (uVar17 = 1 << (cVar3 - 1U & 0x1f); (uVar13 & uVar17) != 0; uVar17 = uVar17 >> 1)
              {
              }
              if (uVar17 == 0) {
                uVar16 = 0;
              }
              else {
                uVar16 = (ulonglong)(uVar17 + (uVar17 - 1 & uVar13));
              }
              local_d0 = local_d0 + 1;
              uVar10 = (ulonglong)local_d0;
              puVar6 = local_88 + uVar21;
              *puVar6 = *puVar6 - 1;
              uVar13 = (uint)uVar16;
              if (*puVar6 == 0) {
                if (uVar21 == uVar20) {
                  local_d8._0_2_ = CONCAT11(cVar3 - bVar22,0x40);
                  local_d8 = (uint)(ushort)local_d8;
                  goto joined_r0x0001401d2dcc;
                }
                uVar21 = (uint)param_2[*(ushort *)(param_6 + uVar10 * 2)];
              }
            } while (uVar21 <= uVar1);
            uVar13 = uVar5 & uVar13;
          } while (uVar13 == (uint)uVar12);
          if (uVar11 == 0) {
            uVar11 = uVar1;
          }
          lVar9 = lVar9 + uVar14 * 4;
          iVar19 = uVar21 - uVar11;
          uVar17 = uVar11 + iVar19;
          for (iVar18 = 1 << ((byte)iVar19 & 0x1f);
              (uVar17 < uVar20 &&
              (uVar12 = (ulonglong)uVar17, 0 < (int)(iVar18 - (uint)local_88[uVar12])));
              iVar18 = (iVar18 - (uint)local_88[uVar12]) * 2) {
            uVar17 = uVar17 + 1;
            iVar19 = iVar19 + 1;
          }
          uVar17 = 1 << ((byte)iVar19 & 0x1f);
          uVar14 = (ulonglong)uVar17;
          local_cc = local_cc + uVar17;
          if (param_1 == 1) {
            bVar23 = local_cc < 0x354;
LAB_1401d2d6e:
            if (!bVar23) goto LAB_1401d2bda;
          }
          else if (param_1 == 2) {
            bVar23 = local_cc < 0x250;
            goto LAB_1401d2d6e;
          }
          uVar12 = (ulonglong)uVar13;
          *(byte *)(*param_4 + (ulonglong)uVar13 * 4) = (byte)iVar19;
          *(byte *)(*param_4 + 1 + uVar12 * 4) = bVar8;
          *(short *)(*param_4 + 2 + uVar12 * 4) = (short)(lVar9 - *param_4 >> 2);
          uVar10 = (ulonglong)local_d0;
          goto LAB_1401d2c00;
        }
      }
      else if ((param_1 != 2) || (uVar16 = 0, uVar10 = 0, uVar11 = 0, local_cc < 0x250))
      goto LAB_1401d2c00;
LAB_1401d2bda:
      uVar7 = 1;
    }
    else {
LAB_1401d2e3c:
      uVar7 = 0xffffffff;
    }
  }
  return uVar7;
joined_r0x0001401d2dcc:
  if (uVar13 == 0) {
LAB_1401d2e28:
    *param_4 = *param_4 + (ulonglong)local_cc * 4;
    *param_5 = uVar1;
    return 0;
  }
  uVar20 = (uint)uVar16;
  if ((uVar11 != 0) && ((uVar5 & uVar20) != (uint)uVar12)) {
    lVar9 = *param_4;
    local_d8._0_2_ = CONCAT11(bVar8,(undefined1)local_d8);
    local_d8 = (uint)(ushort)local_d8;
    uVar21 = uVar1;
    uVar11 = 0;
  }
  *(uint *)(lVar9 + (uVar16 >> ((byte)uVar11 & 0x3f)) * 4) = local_d8;
  for (uVar13 = 1 << ((char)uVar21 - 1U & 0x1f); (uVar20 & uVar13) != 0; uVar13 = uVar13 >> 1) {
  }
  if (uVar13 == 0) goto LAB_1401d2e28;
  uVar13 = (uVar20 & uVar13 - 1) + uVar13;
  uVar16 = (ulonglong)uVar13;
  goto joined_r0x0001401d2dcc;
}



void FUN_1401d2e70(longlong param_1)

{
  *(undefined4 *)(param_1 + 0x170c) = 8;
  *(longlong *)(param_1 + 0xb40) = param_1 + 0xbc;
  *(undefined ***)(param_1 + 0xb50) = &PTR_DAT_140321e58;
  *(longlong *)(param_1 + 0xb58) = param_1 + 0x9b0;
  *(undefined ***)(param_1 + 0xb68) = &PTR_DAT_140321e78;
  *(longlong *)(param_1 + 0xb70) = param_1 + 0xaa4;
  *(undefined **)(param_1 + 0xb80) = &DAT_140321e98;
  *(undefined2 *)(param_1 + 0x1710) = 0;
  *(undefined4 *)(param_1 + 0x1714) = 0;
  FUN_1401d16a0();
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

void FUN_1401d2ef0(longlong param_1,int param_2,longlong param_3)

{
  longlong lVar1;
  ushort uVar2;
  ulonglong uVar3;
  uint uVar4;
  ulonglong uVar5;
  uint uVar6;
  ulonglong uVar7;
  short sVar8;
  uint uVar9;
  longlong lVar10;
  ulonglong uVar11;
  short sStack_3a;
  ushort auStack_38 [16];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_38;
  sVar8 = 0;
  lVar10 = 1;
  do {
    lVar1 = lVar10 * 2;
    lVar10 = lVar10 + 1;
    sVar8 = (sVar8 + *(short *)(param_3 + lVar1 + -2)) * 2;
    (&sStack_3a)[lVar10] = sVar8;
  } while (lVar10 < 0x10);
  uVar11 = 0;
  if (-1 < param_2) {
    do {
      uVar2 = *(ushort *)(param_1 + 2 + uVar11 * 4);
      uVar7 = (ulonglong)uVar2;
      if (uVar2 != 0) {
        uVar2 = auStack_38[uVar7];
        auStack_38[uVar7] = uVar2 + 1;
        uVar3 = 0;
        uVar9 = (uint)uVar2;
        do {
          uVar5 = uVar3;
          uVar6 = (int)uVar7 - 1;
          uVar7 = (ulonglong)uVar6;
          uVar4 = uVar9 & 1;
          uVar3 = (ulonglong)(((uint)uVar5 | uVar4) * 2);
          uVar9 = uVar9 >> 1;
        } while (0 < (int)uVar6);
        *(ushort *)(param_1 + uVar11 * 4) = (ushort)uVar5 | (ushort)uVar4;
      }
      uVar11 = uVar11 + 1;
    } while ((longlong)uVar11 <= (longlong)param_2);
  }
  return;
}



void FUN_1401d2fa0(longlong param_1,longlong *param_2)

{
  byte bVar1;
  longlong lVar2;
  byte bVar3;
  int iVar4;
  longlong lVar5;
  longlong lVar6;
  int iVar7;
  int iVar8;
  int iVar9;
  ulonglong uVar10;
  
  lVar2 = *param_2;
  iVar4 = *(int *)(param_2[2] + 0x14);
  uVar10 = (ulonglong)iVar4;
  lVar6 = *(longlong *)param_2[2];
  iVar7 = -1;
  *(undefined4 *)(param_1 + 0x149c) = 0;
  *(undefined4 *)(param_1 + 0x14a0) = 0x23d;
  iVar8 = 0;
  lVar5 = 0;
  if (0 < iVar4) {
    do {
      if (*(short *)(lVar2 + lVar5 * 4) == 0) {
        *(undefined2 *)(lVar2 + 2 + lVar5 * 4) = 0;
      }
      else {
        *(int *)(param_1 + 0x149c) = *(int *)(param_1 + 0x149c) + 1;
        *(int *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x149c) * 4) = iVar8;
        *(undefined1 *)(lVar5 + 0x14a4 + param_1) = 0;
        iVar7 = iVar8;
      }
      lVar5 = lVar5 + 1;
      iVar8 = iVar8 + 1;
    } while (lVar5 < (longlong)uVar10);
  }
  iVar4 = *(int *)(param_1 + 0x149c);
  while (iVar4 < 2) {
    if (iVar7 < 2) {
      iVar7 = iVar7 + 1;
      iVar4 = iVar7;
    }
    else {
      iVar4 = 0;
    }
    *(int *)(param_1 + 0x149c) = *(int *)(param_1 + 0x149c) + 1;
    *(int *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x149c) * 4) = iVar4;
    lVar5 = (longlong)iVar4;
    *(undefined2 *)(lVar2 + lVar5 * 4) = 1;
    *(undefined1 *)(lVar5 + 0x14a4 + param_1) = 0;
    *(int *)(param_1 + 0x1700) = *(int *)(param_1 + 0x1700) + -1;
    if (lVar6 != 0) {
      *(int *)(param_1 + 0x1704) =
           *(int *)(param_1 + 0x1704) - (uint)*(ushort *)(lVar6 + 2 + lVar5 * 4);
    }
    iVar4 = *(int *)(param_1 + 0x149c);
  }
  *(int *)(param_2 + 1) = iVar7;
  for (iVar4 = *(int *)(param_1 + 0x149c) / 2; 0 < iVar4; iVar4 = iVar4 + -1) {
    FUN_1401d1720(param_1,lVar2,iVar4);
  }
  do {
    iVar4 = *(int *)(param_1 + 0xbac);
    lVar5 = (longlong)iVar4;
    *(undefined4 *)(param_1 + 0xbac) =
         *(undefined4 *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x149c) * 4);
    *(int *)(param_1 + 0x149c) = *(int *)(param_1 + 0x149c) + -1;
    FUN_1401d1720(param_1,lVar2,1);
    *(int *)(param_1 + 0x14a0) = *(int *)(param_1 + 0x14a0) + -1;
    iVar8 = *(int *)(param_1 + 0xbac);
    lVar6 = (longlong)iVar8;
    iVar9 = (int)uVar10;
    *(int *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x14a0) * 4) = iVar4;
    *(int *)(param_1 + 0x14a0) = *(int *)(param_1 + 0x14a0) + -1;
    *(int *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x14a0) * 4) = iVar8;
    *(short *)(lVar2 + (longlong)iVar9 * 4) =
         *(short *)(lVar2 + lVar6 * 4) + *(short *)(lVar2 + lVar5 * 4);
    bVar3 = *(byte *)(lVar5 + 0x14a4 + param_1);
    bVar1 = *(byte *)(lVar6 + 0x14a4 + param_1);
    if (bVar3 < bVar1) {
      bVar3 = bVar1;
    }
    *(byte *)((longlong)iVar9 + 0x14a4 + param_1) = bVar3 + 1;
    *(short *)(lVar2 + 2 + lVar6 * 4) = (short)uVar10;
    *(short *)(lVar2 + 2 + lVar5 * 4) = (short)uVar10;
    *(int *)(param_1 + 0xbac) = iVar9;
    uVar10 = (ulonglong)(iVar9 + 1);
    FUN_1401d1720(param_1,lVar2,1);
  } while (1 < *(int *)(param_1 + 0x149c));
  *(int *)(param_1 + 0x14a0) = *(int *)(param_1 + 0x14a0) + -1;
  *(undefined4 *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x14a0) * 4) =
       *(undefined4 *)(param_1 + 0xbac);
  FUN_1401d1810();
  FUN_1401d2ef0(lVar2,iVar7,param_1 + 0xb88);
  return;
}



int FUN_1401d31f0(longlong param_1)

{
  longlong lVar1;
  int iVar2;
  
  FUN_1401d1a30(param_1,param_1 + 0xbc,*(undefined4 *)(param_1 + 0xb48));
  FUN_1401d1a30();
  FUN_1401d2fa0();
  iVar2 = 0x12;
  lVar1 = 0x12;
  do {
    if (*(short *)(param_1 + 0xaa6 + (ulonglong)(byte)(&DAT_140276390)[lVar1] * 4) != 0) break;
    lVar1 = lVar1 + -1;
    iVar2 = iVar2 + -1;
  } while (2 < lVar1);
  *(int *)(param_1 + 0x1700) = *(int *)(param_1 + 0x1700) + iVar2 * 3 + 0x11;
  return iVar2;
}



void FUN_1401d3270(longlong param_1,undefined8 param_2,undefined8 param_3,ushort param_4)

{
  int iVar1;
  int iVar2;
  
  iVar1 = *(int *)(param_1 + 0x1714);
  if (iVar1 < 0xe) {
    iVar2 = iVar1 + 3;
    *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | param_4 << ((byte)iVar1 & 0x1f);
  }
  else {
    *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | param_4 << ((byte)iVar1 & 0x1f);
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    iVar2 = *(int *)(param_1 + 0x1714) + -0xd;
    *(ushort *)(param_1 + 0x1710) = param_4 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
  }
  *(int *)(param_1 + 0x1714) = iVar2;
  FUN_1401d2880(param_1,param_2,param_3,1);
  return;
}



void FUN_1401d3310(longlong param_1)

{
  ushort uVar1;
  int iVar2;
  int iVar3;
  
  iVar2 = *(int *)(param_1 + 0x1714);
  *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | 2 << ((byte)iVar2 & 0x1f);
  if (iVar2 < 0xe) {
    iVar2 = iVar2 + 3;
  }
  else {
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(ushort *)(param_1 + 0x1710) = 2 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
    iVar2 = *(int *)(param_1 + 0x1714) + -0xd;
  }
  *(int *)(param_1 + 0x1714) = iVar2;
  uVar1 = 0;
  *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | 0 << ((byte)iVar2 & 0x1f);
  if (iVar2 < 10) {
    iVar2 = iVar2 + 7;
  }
  else {
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(ushort *)(param_1 + 0x1710) = 0 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
    iVar2 = *(int *)(param_1 + 0x1714) + -9;
  }
  *(int *)(param_1 + 0x1714) = iVar2;
  FUN_1401d27f0(param_1);
  iVar2 = *(int *)(param_1 + 0x1714);
  if ((*(int *)(param_1 + 0x170c) - iVar2) + 0xb < 9) {
    if (iVar2 < 0xe) {
      iVar3 = iVar2 + 3;
      *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | 2 << ((byte)iVar2 & 0x1f);
    }
    else {
      *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | 2 << ((byte)iVar2 & 0x1f);
      *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
           *(undefined1 *)(param_1 + 0x1710);
      *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
      *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
           *(undefined1 *)(param_1 + 0x1711);
      *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
      iVar3 = *(int *)(param_1 + 0x1714) + -0xd;
      *(ushort *)(param_1 + 0x1710) = 2 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
    }
    *(int *)(param_1 + 0x1714) = iVar3;
    if (iVar3 < 10) {
      iVar2 = iVar3 + 7;
      *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar1 << ((byte)iVar3 & 0x1f);
    }
    else {
      *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar1 << ((byte)iVar3 & 0x1f);
      *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
           *(undefined1 *)(param_1 + 0x1710);
      *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
      *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
           *(undefined1 *)(param_1 + 0x1711);
      *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
      iVar2 = *(int *)(param_1 + 0x1714) + -9;
      *(ushort *)(param_1 + 0x1710) = uVar1 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
    }
    *(int *)(param_1 + 0x1714) = iVar2;
    FUN_1401d27f0(param_1);
  }
  *(undefined4 *)(param_1 + 0x170c) = 7;
  return;
}



void FUN_1401d3530(longlong *param_1,longlong param_2,int param_3,int param_4)

{
  short sVar1;
  undefined1 uVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  uint uVar6;
  uint uVar7;
  undefined *puVar8;
  longlong *plVar9;
  longlong lVar10;
  
  iVar4 = 0;
  if (*(int *)((longlong)param_1 + 0xac) < 1) {
    uVar7 = param_3 + 5;
LAB_1401d35c3:
    uVar6 = uVar7;
    uVar7 = uVar6;
  }
  else {
    lVar10 = *param_1;
    if (*(int *)(lVar10 + 0x48) == 2) {
      uVar3 = FUN_1401d2770();
      *(undefined4 *)(lVar10 + 0x48) = uVar3;
    }
    FUN_1401d2fa0(param_1,param_1 + 0x168);
    FUN_1401d2fa0(param_1,param_1 + 0x16b);
    iVar4 = FUN_1401d31f0(param_1);
    uVar6 = (int)param_1[0x2e0] + 10U >> 3;
    uVar7 = *(int *)((longlong)param_1 + 0x1704) + 10U >> 3;
    if (uVar7 <= uVar6) goto LAB_1401d35c3;
  }
  if ((uVar6 < param_3 + 4U) || (param_2 == 0)) {
    sVar1 = (short)param_4;
    if (((int)param_1[0x16] == 4) || (uVar7 == uVar6)) {
      iVar4 = *(int *)((longlong)param_1 + 0x1714);
      if (iVar4 < 0xe) {
        *(ushort *)(param_1 + 0x2e2) =
             *(ushort *)(param_1 + 0x2e2) | sVar1 + 2 << ((byte)iVar4 & 0x1f);
        iVar4 = iVar4 + 3;
      }
      else {
        *(ushort *)(param_1 + 0x2e2) =
             *(ushort *)(param_1 + 0x2e2) | sVar1 + 2U << ((byte)iVar4 & 0x1f);
        *(char *)((ulonglong)*(uint *)(param_1 + 5) + param_1[2]) = (char)param_1[0x2e2];
        *(int *)(param_1 + 5) = (int)param_1[5] + 1;
        *(undefined1 *)((ulonglong)*(uint *)(param_1 + 5) + param_1[2]) =
             *(undefined1 *)((longlong)param_1 + 0x1711);
        *(int *)(param_1 + 5) = (int)param_1[5] + 1;
        iVar4 = *(int *)((longlong)param_1 + 0x1714) + -0xd;
        *(ushort *)(param_1 + 0x2e2) =
             (ushort)(sVar1 + 2U) >> (0x10U - (char)*(int *)((longlong)param_1 + 0x1714) & 0x1f);
      }
      *(int *)((longlong)param_1 + 0x1714) = iVar4;
      plVar9 = (longlong *)&DAT_140276830;
      puVar8 = &DAT_1402763b0;
    }
    else {
      iVar5 = *(int *)((longlong)param_1 + 0x1714);
      if (iVar5 < 0xe) {
        *(ushort *)(param_1 + 0x2e2) =
             *(ushort *)(param_1 + 0x2e2) | sVar1 + 4 << ((byte)iVar5 & 0x1f);
        iVar5 = iVar5 + 3;
      }
      else {
        *(ushort *)(param_1 + 0x2e2) =
             *(ushort *)(param_1 + 0x2e2) | sVar1 + 4U << ((byte)iVar5 & 0x1f);
        *(char *)((ulonglong)*(uint *)(param_1 + 5) + param_1[2]) = (char)param_1[0x2e2];
        *(int *)(param_1 + 5) = (int)param_1[5] + 1;
        *(undefined1 *)((ulonglong)*(uint *)(param_1 + 5) + param_1[2]) =
             *(undefined1 *)((longlong)param_1 + 0x1711);
        *(int *)(param_1 + 5) = (int)param_1[5] + 1;
        iVar5 = *(int *)((longlong)param_1 + 0x1714) + -0xd;
        *(ushort *)(param_1 + 0x2e2) =
             (ushort)(sVar1 + 4U) >> (0x10U - (char)*(int *)((longlong)param_1 + 0x1714) & 0x1f);
      }
      *(int *)((longlong)param_1 + 0x1714) = iVar5;
      FUN_1401d2090(param_1,(int)param_1[0x169] + 1,(int)param_1[0x16c] + 1,iVar4 + 1);
      plVar9 = param_1 + 0x136;
      puVar8 = (undefined *)((longlong)param_1 + 0xbc);
    }
    FUN_1401d2300(param_1,puVar8,plVar9);
  }
  else {
    FUN_1401d3270(param_1,param_2,param_3,param_4);
  }
  FUN_1401d16a0(param_1);
  if (param_4 == 0) {
    return;
  }
  if (*(int *)((longlong)param_1 + 0x1714) < 9) {
    if (*(int *)((longlong)param_1 + 0x1714) < 1) goto LAB_1401d3780;
    uVar2 = (undefined1)param_1[0x2e2];
  }
  else {
    *(char *)((ulonglong)*(uint *)(param_1 + 5) + param_1[2]) = (char)param_1[0x2e2];
    *(int *)(param_1 + 5) = (int)param_1[5] + 1;
    uVar2 = *(undefined1 *)((longlong)param_1 + 0x1711);
  }
  *(undefined1 *)((ulonglong)*(uint *)(param_1 + 5) + param_1[2]) = uVar2;
  *(int *)(param_1 + 5) = (int)param_1[5] + 1;
LAB_1401d3780:
  *(undefined2 *)(param_1 + 0x2e2) = 0;
  *(undefined4 *)((longlong)param_1 + 0x1714) = 0;
  return;
}



void FUN_1401d37b0(undefined8 *param_1)

{
  *param_1 = Proud::ISendSpeedMeasurerDg::vftable;
  return;
}



undefined8 * FUN_1401d37c0(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::ISendSpeedMeasurerDg::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401d37f0(longlong param_1,undefined8 param_2)

{
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))
            (*(longlong *)(param_1 + 0x108) + 0x78);
  FUN_1401e4940(*(undefined8 *)(param_1 + 0x108),param_2);
  return;
}



void FUN_1401d3830(longlong param_1,undefined8 param_2)

{
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))
            (*(longlong *)(param_1 + 0x108) + 0x78);
  FUN_1401e50e0(*(undefined8 *)(param_1 + 0x108),param_2);
  return;
}



void FUN_1401d3870(longlong param_1,int param_2)

{
  undefined8 uVar1;
  
  if (*(int *)(param_1 + 0x100) < param_2) {
    *(undefined4 *)(param_1 + 0x40) = 0;
    *(int *)(param_1 + 0x100) = param_2;
    uVar1 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))
                      (*(longlong *)(param_1 + 0x108) + 0x70);
    *(undefined8 *)(param_1 + 0x80) = uVar1;
    *(undefined1 *)(param_1 + 0xc0) = 0;
  }
  return;
}



void FUN_1401d38d0(longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined1 local_58 [88];
  
  if ((longlong *)param_2[2] != param_1) {
    FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                  L"Proud::CListNode<class Proud::CNetClientWorker>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
  }
  plVar1 = (longlong *)param_2[1];
  lVar2 = *param_2;
  if (plVar1 != (longlong *)0x0) {
    *plVar1 = lVar2;
  }
  if (lVar2 != 0) {
    *(longlong **)(lVar2 + 8) = plVar1;
  }
  if (plVar1 == (longlong *)0x0) {
    if ((longlong *)param_1[1] != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CNetClientWorker>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    param_1[1] = lVar2;
  }
  if (lVar2 == 0) {
    if ((longlong *)*param_1 != param_2) {
      FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                    L"Proud::CListNode<class Proud::CNetClientWorker>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
    }
    *param_1 = (longlong)plVar1;
  }
  *param_2 = 0;
  param_2[1] = 0;
  param_2[2] = 0;
  *(int *)(param_1 + 2) = (int)param_1[2] + -1;
  return;
}



void FUN_1401d39b0(longlong param_1,undefined8 param_2)

{
  longlong *plVar1;
  longlong lVar2;
  
  lVar2 = 0;
  plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x108) + 0x1570);
  if (plVar1 != (longlong *)0x0) {
    lVar2 = *plVar1;
  }
  FUN_14013b390(param_2,lVar2 + 8);
  plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x108) + 0x1570);
  if (plVar1 == (longlong *)0x0) {
    uRam0000000000000100 = 0;
    return;
  }
  *(undefined8 *)(*plVar1 + 0x100) = 0;
  return;
}



void FUN_1401d3a30(longlong param_1)

{
  undefined8 uVar1;
  
  FUN_1401c90b0(*(undefined8 *)(param_1 + 0x108),7);
  if (*(int *)(param_1 + 0x100) < 4) {
    *(undefined4 *)(param_1 + 0x40) = 0;
    *(undefined4 *)(param_1 + 0x100) = 4;
    uVar1 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))
                      (*(longlong *)(param_1 + 0x108) + 0x70);
    *(undefined8 *)(param_1 + 0x80) = uVar1;
    *(undefined1 *)(param_1 + 0xc0) = 0;
  }
  return;
}



void FUN_1401d3aa0(longlong param_1)

{
  undefined8 uVar1;
  
  FUN_1401c90b0(*(undefined8 *)(param_1 + 0x108),8);
  if (*(int *)(param_1 + 0x100) < 4) {
    *(undefined4 *)(param_1 + 0x40) = 0;
    *(undefined4 *)(param_1 + 0x100) = 4;
    uVar1 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))
                      (*(longlong *)(param_1 + 0x108) + 0x70);
    *(undefined8 *)(param_1 + 0x80) = uVar1;
    *(undefined1 *)(param_1 + 0xc0) = 0;
  }
  return;
}



void FUN_1401d3b10(longlong param_1)

{
  undefined8 uVar1;
  
  FUN_1401c90b0(*(undefined8 *)(param_1 + 0x108),9);
  if (*(int *)(param_1 + 0x100) < 4) {
    *(undefined4 *)(param_1 + 0x40) = 0;
    *(undefined4 *)(param_1 + 0x100) = 4;
    uVar1 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))
                      (*(longlong *)(param_1 + 0x108) + 0x70);
    *(undefined8 *)(param_1 + 0x80) = uVar1;
    *(undefined1 *)(param_1 + 0xc0) = 0;
  }
  return;
}



void FUN_1401d3b80(longlong param_1,longlong param_2,longlong param_3)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))();
  FUN_140156b50(uVar2);
  *(undefined1 *)(param_2 + 0x80) = 0;
  if ((*(longlong **)(param_2 + 0x100) != (longlong *)0x0) &&
     (**(longlong **)(param_2 + 0x100) != 0)) {
    FUN_1401870c0();
  }
  if (0 < *(int *)(param_3 + 8)) {
    plVar1 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x668);
    *plVar1 = *plVar1 + 1;
    plVar1 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x670);
    *plVar1 = *plVar1 + (longlong)*(int *)(param_3 + 8);
  }
  FUN_1401e6fa0(param_2);
  FUN_140156be0(uVar2);
  return;
}



void FUN_1401d3c40(longlong param_1,undefined4 param_2)

{
  longlong lVar1;
  undefined8 uVar2;
  
  lVar1 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
  uVar2 = 0;
  if (*(undefined8 **)(lVar1 + 0x128) != (undefined8 *)0x0) {
    uVar2 = **(undefined8 **)(lVar1 + 0x128);
  }
  FUN_140184da0(uVar2,1);
  lVar1 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
  uVar2 = 0;
  if (*(undefined8 **)(lVar1 + 0x128) != (undefined8 *)0x0) {
    uVar2 = **(undefined8 **)(lVar1 + 0x128);
  }
  FUN_140184cb0(uVar2,1);
  FUN_1401c90b0(*(undefined8 *)(param_1 + 0x108),3,param_2);
  if (*(int *)(param_1 + 0x100) < 4) {
    *(undefined4 *)(param_1 + 0x40) = 0;
    *(undefined4 *)(param_1 + 0x100) = 4;
    uVar2 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))
                      (*(longlong *)(param_1 + 0x108) + 0x70);
    *(undefined8 *)(param_1 + 0x80) = uVar2;
    *(undefined1 *)(param_1 + 0xc0) = 0;
  }
  return;
}



void FUN_1401d3d00(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  undefined1 uVar6;
  
  uVar5 = 0xfffffffffffffffe;
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))();
  uVar4 = uVar2;
  FUN_140156b50(uVar2);
  uVar6 = 1;
  uVar3 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
  iVar1 = FUN_1401e2c20(uVar3);
  if ((iVar1 != 0) &&
     (uVar2 = uVar4,
     FUN_1401c90b0(*(undefined8 *)(param_1 + 0x108),3,iVar1,param_4,uVar5,uVar4,uVar6),
     *(int *)(param_1 + 0x100) < 4)) {
    *(undefined4 *)(param_1 + 0x40) = 0;
    *(undefined4 *)(param_1 + 0x100) = 4;
    uVar4 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
    *(undefined8 *)(param_1 + 0x80) = uVar4;
    *(undefined1 *)(param_1 + 0xc0) = 0;
  }
  FUN_140156be0(uVar2);
  return;
}



void FUN_1401d3dc0(longlong param_1)

{
  undefined8 uVar1;
  
  FUN_1401afae0(*(undefined8 *)(param_1 + 0x108));
  if (*(int *)(param_1 + 0x100) < 3) {
    *(undefined4 *)(param_1 + 0x40) = 0;
    *(undefined4 *)(param_1 + 0x100) = 3;
    uVar1 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))
                      (*(longlong *)(param_1 + 0x108) + 0x70);
    *(undefined8 *)(param_1 + 0x80) = uVar1;
    *(undefined1 *)(param_1 + 0xc0) = 0;
  }
  FUN_1401d3d00(param_1);
  FUN_1401c0630(*(undefined8 *)(param_1 + 0x108));
  return;
}



undefined8 FUN_1401d3e30(longlong param_1)

{
  char cVar1;
  undefined8 uVar2;
  
  if (*(char *)(param_1 + 0x1c0) == '\0') {
    FUN_140156b50();
    FUN_140156b50();
    if (*(char *)(param_1 + 0x1c0) == '\0') {
      cVar1 = FUN_14018afa0(param_1 + 0x48);
      if (cVar1 != '\0') {
        FUN_14018ae50(param_1 + 0x48);
        uVar2 = FUN_14018aee0(param_1 + 0x48);
        *(undefined8 *)(param_1 + 0xc0) = uVar2;
      }
    }
    *(undefined1 *)(param_1 + 0x1c0) = 1;
    FUN_140156be0(param_1 + 0x88);
    FUN_140156be0(param_1 + 0x1c8);
    uVar2 = *(undefined8 *)(param_1 + 0xc0);
  }
  else {
    uVar2 = *(undefined8 *)(param_1 + 0xc0);
  }
  return uVar2;
}



void FUN_1401d3ef0(longlong param_1,undefined8 param_2)

{
  longlong lVar1;
  longlong *plVar2;
  undefined8 local_res10 [3];
  
  local_res10[0] = param_2;
  for (lVar1 = *(longlong *)(param_1 + 0x290); lVar1 != 0; lVar1 = *(longlong *)(lVar1 + 8)) {
    plVar2 = (longlong *)(*(longlong *)(lVar1 + 0x108) + 0x1818);
    (**(code **)(*plVar2 + 0x100))(plVar2,1,&DAT_140328530,local_res10);
  }
  return;
}



void FUN_1401d3f50(longlong param_1)

{
  if (*(longlong *)(param_1 + 0x10) != 0) {
    FUN_1401d38d0(*(longlong *)(param_1 + 0x10),param_1);
  }
  return;
}



void FUN_1401d3f70(undefined8 *param_1)

{
  void *pvVar1;
  
  pvVar1 = (void *)*param_1;
  if (pvVar1 != (void *)0x0) {
    FUN_1401e0ac0(pvVar1);
    operator_delete(pvVar1);
  }
  return;
}



undefined * FUN_1401d3fa0(void)

{
  bool bVar1;
  char cVar2;
  
  bVar1 = false;
  cVar2 = FUN_140156bf0(&DAT_14032e3a8);
  if (cVar2 != '\0') {
    if (DAT_140321f00 == '\0') {
      bVar1 = false;
    }
    else {
      bVar1 = true;
      FUN_140156b50(&DAT_14032e3a8);
    }
  }
  if ((DAT_14032e3a0 & 1) == 0) {
    DAT_14032e3a0 = DAT_14032e3a0 | 1;
    FUN_1401965f0(&DAT_14032e310);
    atexit((_func_5014 *)&LAB_140258180);
  }
  DAT_140321f00 = 0;
  if (bVar1) {
    FUN_140156be0(&DAT_14032e3a8);
  }
  return &DAT_14032e310;
}



void FUN_1401d4060(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  undefined1 local_58 [88];
  
  lVar1 = *param_1;
  while( true ) {
    if (lVar1 == 0) {
      return;
    }
    plVar2 = (longlong *)*param_1;
    if ((longlong *)plVar2[2] != param_1) break;
    plVar3 = (longlong *)plVar2[1];
    lVar1 = *plVar2;
    if (plVar3 != (longlong *)0x0) {
      *plVar3 = lVar1;
    }
    if (lVar1 != 0) {
      *(longlong **)(lVar1 + 8) = plVar3;
    }
    if (plVar3 == (longlong *)0x0) {
      if ((longlong *)param_1[1] != plVar2) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::CNetClientWorker>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      param_1[1] = lVar1;
    }
    if (lVar1 == 0) {
      if ((longlong *)*param_1 != plVar2) {
        FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                      L"Proud::CListNode<class Proud::CNetClientWorker>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
      }
      *param_1 = (longlong)plVar3;
    }
    *plVar2 = 0;
    plVar2[1] = 0;
    plVar2[2] = 0;
    *(int *)(param_1 + 2) = (int)param_1[2] + -1;
    lVar1 = *param_1;
  }
  FUN_140156300(local_58,PTR_u_CListNode_reports_a_consistency_p_1403212b8,
                L"Proud::CListNode<class Proud::CNetClientWorker>::CListOwner::Erase");
                    // WARNING: Subroutine does not return
  _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
}



void FUN_1401d4150(longlong param_1,undefined8 *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  longlong lVar4;
  undefined1 uVar5;
  
  uVar3 = 0xfffffffffffffffe;
  lVar1 = param_1 + 0x10;
  lVar4 = lVar1;
  FUN_140156b50(lVar1);
  uVar5 = 1;
  if (param_2[2] != 0) {
    FUN_1401d38d0(param_2[2],param_2,param_3,param_4,uVar3,lVar4,1);
  }
  puVar2 = (undefined8 *)(param_1 + 0x298);
  if (param_2[2] != 0) {
    FUN_1401d38d0(puVar2,param_2,param_3,param_4,uVar3,lVar4,uVar5);
  }
  if (*(longlong *)(param_1 + 0x2a0) == 0) {
    *puVar2 = param_2;
  }
  else {
    *(undefined8 **)(*(longlong *)(param_1 + 0x2a0) + 8) = param_2;
    *param_2 = *(undefined8 *)(param_1 + 0x2a0);
  }
  *(undefined8 **)(param_1 + 0x2a0) = param_2;
  param_2[2] = puVar2;
  *(int *)(param_1 + 0x2a8) = *(int *)(param_1 + 0x2a8) + 1;
  FUN_140156be0(lVar1);
  return;
}



void thunk_FUN_1401d4060(void)

{
  FUN_1401d4060();
  return;
}



void FUN_1401d4200(undefined8 *param_1)

{
  void *pvVar1;
  
  pvVar1 = (void *)*param_1;
  if (pvVar1 != (void *)0x0) {
    FUN_14018c200(pvVar1);
    operator_delete(pvVar1);
    *param_1 = 0;
    return;
  }
  *param_1 = 0;
  return;
}



undefined8 *
FUN_1401d4250(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  
  uVar1 = 0;
  *param_1 = 0;
  param_1[1] = 0;
  param_1[2] = 0;
  param_1[0x1a] = 0;
  *(undefined4 *)(param_1 + 8) = 0;
  param_1[0x10] = 0;
  *(undefined1 *)(param_1 + 0x18) = 0;
  param_1[0x21] = param_2;
  *(undefined4 *)(param_1 + 0x20) = 0;
  if (*(longlong *)(param_1[0x21] + 0x5d8) != 0) {
    uVar1 = *(undefined8 *)(*(longlong *)(param_1[0x21] + 0x5d8) + 0x38);
  }
  FUN_1401d4150(uVar1,param_1,param_3,param_4,0xfffffffffffffffe);
  return param_1;
}



void FUN_1401d42c0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  int iVar2;
  undefined *puVar3;
  undefined8 uVar4;
  longlong *plVar5;
  undefined1 local_res8;
  undefined7 uStackX_9;
  
  if (*(char *)(*(longlong *)(param_1 + 0x108) + 0x650) == '\0') {
    plVar5 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x70);
    local_res8 = 0;
    iVar2 = (**(code **)(*plVar5 + 0x108))(plVar5,&local_res8,param_3,param_4,0xfffffffffffffffe);
    if ((iVar2 == 2) && (*(int *)(*(longlong *)(param_1 + 0x108) + 0x1578) != 0)) {
      plVar5 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x70);
      (**(code **)(*plVar5 + 0xb0))(plVar5,&local_res8);
      puVar3 = (undefined *)CONCAT71(uStackX_9,local_res8);
      if ((puVar3 != (undefined *)0x0) &&
         ((puVar3 != PTR_DAT_1403200a0 && (0 < *(int *)(puVar3 + -8))))) {
        *(undefined1 *)(*(longlong *)(param_1 + 0x108) + 0x650) = 1;
        plVar5 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x1818);
        (**(code **)(*plVar5 + 0xf0))(plVar5,1,&DAT_140328530,&local_res8);
        puVar3 = (undefined *)CONCAT71(uStackX_9,local_res8);
      }
      if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_1403200a0)) &&
         (puVar3 + -8 != (undefined *)0x0)) {
        uVar4 = FUN_1401568c0();
        FUN_140156b50(uVar4);
        piVar1 = (int *)(puVar3 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar3 + -8);
        }
        FUN_140156be0(uVar4);
      }
    }
  }
  return;
}



void FUN_1401d43e0(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  undefined8 *puVar2;
  longlong *plVar3;
  
  lVar1 = *param_2;
  if (lVar1 != *param_1) {
    if (lVar1 != 0) {
      *(longlong *)(*param_2 + 8) = *(longlong *)(lVar1 + 8) + 1;
    }
    plVar3 = (longlong *)0x0;
    if ((*param_1 != 0) &&
       (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
       *(longlong *)(*param_1 + 8) == 0)) {
      plVar3 = (longlong *)*param_1;
    }
    *param_1 = *param_2;
    if (plVar3 != (longlong *)0x0) {
      puVar2 = (undefined8 *)*plVar3;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
      }
      FUN_140156970(plVar3);
    }
  }
  return;
}



void FUN_1401d4460(longlong param_1,longlong *param_2)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined8 uVar3;
  uint uVar4;
  undefined8 *_Dst;
  int iVar5;
  undefined8 *_Src;
  undefined8 *puVar6;
  size_t _Size;
  ulonglong uVar7;
  ulonglong uVar8;
  undefined1 local_98 [144];
  
  if (*(longlong *)(param_1 + 8) == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar5 = *(int *)(param_1 + 0x18);
  }
  else {
    iVar5 = *(int *)(*(longlong *)(param_1 + 8) + 0x18);
  }
  if (iVar5 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2[1] == 0) {
    lVar2 = *param_2;
    if (iVar5 < 1) {
      if (lVar2 == 0) goto LAB_1401d44ce;
      iVar5 = 0;
    }
    else if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    FUN_140050060(lVar2,iVar5);
  }
  else {
    if (*(int *)((longlong)param_2 + 0x14) < iVar5) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(int *)(param_2 + 2) = iVar5;
  }
LAB_1401d44ce:
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar2 == 0) {
    if (*(longlong *)(param_1 + 0x10) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    uVar4 = *(uint *)(param_1 + 0x18);
  }
  else {
    uVar4 = *(uint *)(lVar2 + 0x18);
  }
  if (*(longlong *)(param_1 + 0x10) == 0) {
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(int *)(lVar2 + 0x18) == 0) {
      _Src = (undefined8 *)0x0;
    }
    else {
      _Src = *(undefined8 **)(lVar2 + 0x10);
    }
  }
  else {
    _Src = *(undefined8 **)(param_1 + 0x10);
    if (_Src == (undefined8 *)0x0) {
      FUN_140156300(local_98,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_98,(ThrowInfo *)&DAT_14031d928);
    }
  }
  _Dst = (undefined8 *)param_2[1];
  if (_Dst == (undefined8 *)0x0) {
    lVar2 = *param_2;
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    if (*(int *)(lVar2 + 0x18) == 0) {
      _Dst = (undefined8 *)0x0;
    }
    else {
      _Dst = *(undefined8 **)(lVar2 + 0x10);
    }
  }
  _Size = (size_t)(int)uVar4;
  if (0x20 < _Size) {
    memcpy(_Dst,_Src,_Size);
    return;
  }
  uVar8 = (ulonglong)(uVar4 & 7);
  for (uVar7 = _Size >> 3; uVar7 != 0; uVar7 = uVar7 - 1) {
    uVar3 = *_Src;
    _Src = _Src + 1;
    *_Dst = uVar3;
    _Dst = _Dst + 1;
  }
  if (uVar8 != 0) {
    puVar6 = _Src;
    do {
      uVar1 = *(undefined1 *)puVar6;
      puVar6 = (undefined8 *)((longlong)puVar6 + 1);
      uVar8 = uVar8 - 1;
      *(undefined1 *)((longlong)_Dst + (-1 - (longlong)_Src) + (longlong)puVar6) = uVar1;
    } while (uVar8 != 0);
  }
  return;
}



void FUN_1401d45e0(longlong param_1)

{
  longlong lVar1;
  double dVar2;
  longlong lVar3;
  int iVar4;
  longlong lVar5;
  undefined8 uVar6;
  double dVar7;
  
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))
            (*(longlong *)(param_1 + 0x108) + 0x78);
  uVar6 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))
                    (*(longlong *)(param_1 + 0x108) + 0x70);
  lVar1 = *(longlong *)(param_1 + 0x108);
  iVar4 = 0;
  if (*(longlong *)(lVar1 + 0x1670) == 0) {
    lVar5 = 0;
  }
  else {
    lVar5 = *(longlong *)(lVar1 + 0x1660);
  }
  for (; lVar5 != 0; lVar5 = *(longlong *)(lVar5 + 0x10)) {
    lVar3 = 0;
    if (*(longlong **)(lVar5 + 8) != (longlong *)0x0) {
      lVar3 = **(longlong **)(lVar5 + 8);
    }
    if (*(char *)(lVar3 + 0x684) == '\0') {
      FUN_1401e6130(lVar3,uVar6);
      if ((*(longlong **)(lVar3 + 0x28) != (longlong *)0x0) && (**(longlong **)(lVar3 + 0x28) != 0))
      {
        iVar4 = iVar4 + 1;
      }
    }
  }
  if (lVar1 + 0x1650 == *(longlong *)(param_1 + 0x108) + 0x1650) {
    dVar2 = 1.0;
    if (1.0 <= (double)iVar4) {
      dVar2 = (double)iVar4;
    }
    *(double *)(*(longlong *)(param_1 + 0x108) + 0x648) = DAT_140320cc0 * dVar2;
    dVar7 = (double)FUN_140181840();
    *(double *)(*(longlong *)(param_1 + 0x108) + 0x640) = dVar7 * dVar2;
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401d4720(longlong param_1,undefined8 param_2)

{
  undefined8 *puVar1;
  char cVar2;
  longlong *plVar3;
  longlong lVar4;
  undefined1 auStack_a8 [32];
  undefined4 local_88;
  undefined4 local_78 [2];
  longlong *local_70;
  undefined **local_68;
  undefined4 local_60;
  undefined2 local_5c;
  undefined **local_58;
  undefined4 local_50;
  undefined2 local_4c;
  undefined4 local_48;
  undefined4 uStack_44;
  undefined4 uStack_40;
  undefined4 uStack_3c;
  undefined4 local_38;
  undefined4 uStack_34;
  undefined4 uStack_30;
  undefined4 uStack_2c;
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_a8;
  lVar4 = 0;
  local_60 = 0;
  local_38 = 0;
  uStack_34 = 0;
  uStack_30 = 0;
  uStack_2c = 0;
  local_68 = Proud::AddrPort::vftable;
  local_5c = 0;
  cVar2 = FUN_1401543d0(param_2,&local_38,0x10);
  if (cVar2 != '\0') {
    cVar2 = FUN_140154e00(param_2,&local_68);
    if (cVar2 != '\0') {
      cVar2 = FUN_140154e60(param_2,local_78);
      if (cVar2 != '\0') {
        plVar3 = (longlong *)FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x108),&local_70,local_78[0]);
        if ((longlong *)*plVar3 != (longlong *)0x0) {
          lVar4 = *(longlong *)*plVar3;
        }
        if ((local_70 != (longlong *)0x0) && (local_70[1] = local_70[1] + -1, local_70[1] == 0)) {
          puVar1 = (undefined8 *)*local_70;
          if (puVar1 != (undefined8 *)0x0) {
            (**(code **)*puVar1)(puVar1,1);
          }
          FUN_140156970(local_70);
        }
        if ((((lVar4 != 0) && (*(char *)(lVar4 + 0x684) == '\0')) &&
            (plVar3 = *(longlong **)(lVar4 + 0x28), plVar3 != (longlong *)0x0)) && (*plVar3 != 0)) {
          local_58 = Proud::AddrPort::vftable;
          local_50 = local_60;
          local_48 = local_38;
          uStack_44 = uStack_34;
          uStack_40 = uStack_30;
          uStack_3c = uStack_2c;
          local_4c = local_5c;
          local_88 = local_78[0];
          FUN_1401e39e0(*plVar3,param_2,&local_48,&local_58);
        }
      }
    }
  }
  return;
}



void FUN_1401d4890(longlong param_1,undefined8 param_2,longlong param_3)

{
  undefined8 *puVar1;
  char cVar2;
  undefined4 local_res18 [2];
  longlong *local_res20;
  undefined1 *local_b8;
  undefined4 local_b0 [2];
  undefined1 local_a8 [8];
  longlong local_a0;
  int local_94;
  undefined1 *local_88;
  undefined4 local_78 [2];
  undefined1 local_70 [8];
  longlong local_68;
  undefined4 local_60;
  int local_5c;
  undefined4 local_50;
  undefined **local_48;
  undefined4 local_40;
  undefined2 local_3c;
  undefined1 local_38;
  undefined8 local_28;
  
  local_28 = 0xfffffffffffffffe;
  if (*(int *)(param_3 + 0x28) == 1) {
    (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
    cVar2 = FUN_140154e60(param_3,local_res18);
    if ((((cVar2 != '\0') && (cVar2 = FUN_140154a70(param_3,&local_b8), cVar2 != '\0')) &&
        (-1 < (int)local_b8)) && ((int)local_b8 < DAT_140320d70)) {
      FUN_1401544a0(local_b0);
      cVar2 = FUN_140154700(param_3,local_b0,(ulonglong)local_b8 & 0xffffffff);
      if (cVar2 == '\0') {
        local_b8 = local_a8;
        FUN_1401560e0(local_a8);
        if ((local_a0 != 0) && (local_94 < 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
      }
      else {
        FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x108),&local_res20,local_res18[0]);
        if (((local_res20 != (longlong *)0x0) && (*local_res20 != 0)) &&
           (*(char *)(*local_res20 + 0x684) == '\0')) {
          FUN_1401544a0(local_78);
          local_48 = Proud::AddrPort::vftable;
          local_38 = 0;
          local_50 = 0;
          local_40 = DAT_140320450;
          local_3c = DAT_140320454;
          FUN_140153d90(local_78);
          local_38 = 1;
          FUN_1401d4460(local_b0,local_70);
          local_78[0] = local_b0[0];
          FUN_1401540a0(local_78,0);
          local_50 = local_res18[0];
          FUN_1401da970(param_1,param_2,local_78);
          local_88 = local_70;
          FUN_1401560e0(local_70);
          if (local_68 != 0) {
            if (local_5c < 0) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            local_60 = 0;
          }
        }
        if ((local_res20 != (longlong *)0x0) &&
           (local_res20[1] = local_res20[1] + -1, local_res20[1] == 0)) {
          puVar1 = (undefined8 *)*local_res20;
          if (puVar1 != (undefined8 *)0x0) {
            (**(code **)*puVar1)(puVar1,1);
          }
          FUN_140156970(local_res20);
        }
        local_88 = local_a8;
        FUN_1401560e0(local_a8);
        if ((local_a0 != 0) && (local_94 < 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
      }
    }
  }
  return;
}



undefined8 FUN_1401d4ab0(longlong param_1,int *param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  longlong lVar2;
  undefined8 uVar3;
  undefined *local_res8;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  lVar2 = *(longlong *)(param_1 + 0x108);
  FUN_1401568c0();
  local_res8 = PTR_DAT_1403200a0;
  FUN_14004f4f0(&local_res8,lVar2 + 0x1588);
  lVar2 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
  uVar3 = 0;
  if (*(undefined8 **)(lVar2 + 0x128) != (undefined8 *)0x0) {
    uVar3 = **(undefined8 **)(lVar2 + 0x128);
  }
  iVar1 = FUN_140186000(uVar3,&local_res8,*(undefined2 *)(*(longlong *)(param_1 + 0x108) + 0x1590),
                        param_4,uVar4);
  if ((iVar1 == 0) || (iVar1 == 0x2733)) {
    uVar3 = 1;
  }
  else {
    *param_2 = iVar1;
    uVar3 = 0;
  }
  return uVar3;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401d4b60(longlong param_1)

{
  char cVar1;
  longlong lVar2;
  undefined8 uVar3;
  double dVar4;
  undefined1 auStack_668 [32];
  int local_648 [4];
  undefined1 local_638 [1568];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_668;
  dVar4 = (double)(**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))
                            (*(longlong *)(param_1 + 0x108) + 0x70);
  if (dVar4 - *(double *)(param_1 + 200) <= DAT_140320c90) {
    FUN_140184e20(local_638);
    lVar2 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    uVar3 = 0;
    if (*(undefined8 **)(lVar2 + 0x128) != (undefined8 *)0x0) {
      uVar3 = **(undefined8 **)(lVar2 + 0x128);
    }
    FUN_140184e40(local_638,uVar3);
    lVar2 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    uVar3 = 0;
    if (*(undefined8 **)(lVar2 + 0x128) != (undefined8 *)0x0) {
      uVar3 = **(undefined8 **)(lVar2 + 0x128);
    }
    FUN_140184ea0(local_638,uVar3);
    FUN_140184f00(local_638,0);
    lVar2 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    uVar3 = 0;
    if (*(undefined8 **)(lVar2 + 0x128) != (undefined8 *)0x0) {
      uVar3 = **(undefined8 **)(lVar2 + 0x128);
    }
    cVar1 = FUN_140184f60(local_638,uVar3,local_648);
    if (cVar1 == '\0') {
      return;
    }
    if (local_648[0] == 0) {
      lVar2 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
      uVar3 = 0;
      if (*(undefined8 **)(lVar2 + 0x128) != (undefined8 *)0x0) {
        uVar3 = **(undefined8 **)(lVar2 + 0x128);
      }
      FUN_140184da0(uVar3,1);
      uVar3 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
      FUN_1401e2d20(uVar3);
      lVar2 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
      cVar1 = FUN_1401588c0(lVar2 + 0x110);
      if (cVar1 == '\0') {
        FUN_1401580e0(&DAT_140276ff0);
      }
      if (1 < *(int *)(param_1 + 0x100)) {
        return;
      }
      *(undefined4 *)(param_1 + 0x40) = 0;
      *(undefined4 *)(param_1 + 0x100) = 2;
      uVar3 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))
                        (*(longlong *)(param_1 + 0x108) + 0x70);
      *(undefined8 *)(param_1 + 0x80) = uVar3;
      *(undefined1 *)(param_1 + 0xc0) = 0;
      return;
    }
    cVar1 = FUN_1401d4ab0(param_1,local_648);
    if (cVar1 != '\0') {
      return;
    }
  }
  else {
    local_648[0] = 0x274c;
  }
  FUN_1401d3c40(param_1,local_648[0]);
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401d4d30(longlong param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  double dVar1;
  undefined8 *puVar2;
  char cVar3;
  undefined8 uVar4;
  longlong *plVar5;
  longlong lVar6;
  double dVar7;
  double dVar8;
  longlong *local_res18;
  double local_res20;
  undefined **local_20;
  undefined4 local_18;
  undefined2 local_14;
  
  cVar3 = FUN_1401543d0(param_2,&local_res20,8,param_4,0xfffffffffffffffe);
  if (cVar3 != '\0') {
    uVar4 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))();
    FUN_140156b50(uVar4);
    local_20 = Proud::AddrPort::vftable;
    local_18 = *(undefined4 *)(param_2 + 0x38);
    local_14 = *(undefined2 *)(param_2 + 0x3c);
    plVar5 = (longlong *)FUN_1401b9d00(*(undefined8 *)(param_1 + 0x108),&local_res18,&local_20);
    lVar6 = 0;
    if ((longlong *)*plVar5 != (longlong *)0x0) {
      lVar6 = *(longlong *)*plVar5;
    }
    if ((local_res18 != (longlong *)0x0) &&
       (local_res18[1] = local_res18[1] + -1, local_res18[1] == 0)) {
      puVar2 = (undefined8 *)*local_res18;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
      }
      FUN_140156970(local_res18);
    }
    if ((lVar6 != 0) && (*(int *)(lVar6 + 0x56c) != 1)) {
      dVar7 = (double)FUN_14018aee0(*(longlong *)(param_1 + 0x108) + 0x1620);
      dVar8 = (dVar7 - local_res20) * 0.5;
      *(double *)(lVar6 + 0x158) = dVar8;
      dVar1 = *(double *)(lVar6 + 0x50);
      if (0.0 < dVar1) {
        dVar8 = (dVar8 - dVar1) * _DAT_140320d38 + dVar1;
      }
      *(double *)(lVar6 + 0x50) = dVar8;
      if (0.0 < dVar7) {
        *(double *)(lVar6 + 0xc0) = dVar7;
        *(int *)(lVar6 + 0x100) = *(int *)(lVar6 + 0x100) + 1;
      }
    }
    FUN_140156be0(uVar4);
  }
  return;
}



void FUN_1401d4ea0(longlong param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 *puVar2;
  char cVar3;
  longlong lVar4;
  longlong lVar5;
  longlong *plVar6;
  undefined2 uVar7;
  undefined4 uVar8;
  longlong *local_res8;
  undefined8 local_res10;
  undefined **local_28;
  undefined4 local_20;
  undefined2 local_1c;
  
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))
            (*(longlong *)(param_1 + 0x108) + 0x78);
  cVar3 = FUN_1401543d0(param_2,&local_res10,8);
  if (cVar3 != '\0') {
    lVar5 = 0;
    uVar8 = 0;
    uVar7 = 0;
    if ((*(int *)(param_2 + 0x28) == 1) &&
       (lVar4 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x108)), lVar4 != 0)) {
      lVar5 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x108));
      plVar1 = *(longlong **)(lVar5 + 0x108);
      lVar5 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x108));
      uVar8 = *(undefined4 *)(lVar5 + 0x140);
      uVar7 = *(undefined2 *)(lVar5 + 0x144);
      local_res8 = plVar1;
    }
    else {
      plVar6 = (longlong *)
               FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x108),&local_res8,
                             *(undefined4 *)(param_2 + 0x28));
      plVar1 = local_res8;
      if ((longlong *)*plVar6 != (longlong *)0x0) {
        lVar5 = *(longlong *)*plVar6;
      }
      if ((local_res8 != (longlong *)0x0) &&
         (local_res8[1] = local_res8[1] + -1, local_res8[1] == 0)) {
        puVar2 = (undefined8 *)*local_res8;
        if (puVar2 != (undefined8 *)0x0) {
          (**(code **)*puVar2)(puVar2,1);
        }
        FUN_140156970(plVar1);
      }
      if (((lVar5 != 0) && (*(longlong **)(lVar5 + 0x18) != (longlong *)0x0)) &&
         (**(longlong **)(lVar5 + 0x18) != 0)) {
        lVar4 = FUN_1401e36b0(lVar5);
        uVar8 = *(undefined4 *)(lVar5 + 0x598);
        uVar7 = *(undefined2 *)(lVar5 + 0x59c);
        local_res8 = *(longlong **)(lVar4 + 0x108);
      }
    }
    if (local_res8 != (longlong *)0x0) {
      local_28 = Proud::AddrPort::vftable;
      local_20 = uVar8;
      local_1c = uVar7;
      FUN_14019f040(local_res8,&local_28,local_res10);
    }
  }
  return;
}



void FUN_1401d5010(longlong param_1)

{
  int *piVar1;
  longlong lVar2;
  undefined *puVar3;
  bool bVar4;
  bool bVar5;
  undefined *local_res10;
  undefined *local_res18 [2];
  undefined8 uVar6;
  
  uVar6 = 0xfffffffffffffffe;
  bVar4 = *(int *)(param_1 + 0x100) == 5;
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x108) + 0x5d8);
  puVar3 = (undefined *)0x0;
  if (lVar2 != 0) {
    puVar3 = *(undefined **)(lVar2 + 0x38);
  }
  FUN_140156b50(puVar3 + 0x10);
  bVar5 = *(longlong *)(param_1 + 0x10) == 0;
  FUN_140156be0(puVar3 + 0x10);
  if ((!bVar4) || (!bVar5)) {
    FUN_1401568c0();
    local_res18[0] = PTR_DAT_1403200a0;
    FUN_14004ce50(local_res18,L"CNetClientManager.dtor assert fail: %d %d",bVar4,bVar5,uVar6);
    FUN_1401568c0();
    puVar3 = local_res18[0];
    local_res10 = PTR_DAT_1403200a0;
    if (PTR_DAT_1403200a0 == (undefined *)0x0) {
      local_res10 = (undefined *)0x0;
    }
    if (local_res18[0] != PTR_DAT_1403200a0) {
      uVar6 = FUN_1401568c0();
      FUN_140156b50(uVar6);
      FUN_14004f990(&local_res10);
      local_res10 = puVar3;
      if (((puVar3 != PTR_DAT_1403200a0) && (puVar3 != (undefined *)0x0)) &&
         (puVar3 != (undefined *)0x8)) {
        *(int *)(puVar3 + -4) = *(int *)(puVar3 + -4) + 1;
      }
      FUN_140156be0(uVar6);
    }
    FUN_1401a7000(&local_res10);
    if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_1403200a0)) &&
       (puVar3 + -8 != (undefined *)0x0)) {
      uVar6 = FUN_1401568c0();
      FUN_140156b50(uVar6);
      piVar1 = (int *)(puVar3 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar3 + -8);
      }
      FUN_140156be0(uVar6);
    }
  }
  if (*(longlong *)(param_1 + 0x10) != 0) {
    FUN_1401d38d0(*(longlong *)(param_1 + 0x10),param_1);
  }
  return;
}



void FUN_1401d51b0(longlong param_1)

{
  undefined *puVar1;
  int *piVar2;
  longlong *plVar3;
  undefined *puVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  longlong lVar7;
  double dVar8;
  undefined *local_res8;
  
  uVar5 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))();
  FUN_140156b50(uVar5);
  lVar7 = *(longlong *)(param_1 + 0x108);
  if (0.0 < *(double *)(lVar7 + 0x1648)) {
    dVar8 = (double)(**(code **)(*(longlong *)(lVar7 + 0x70) + 0x1c0))();
    if (10.0 < dVar8 - *(double *)(lVar7 + 0x1648)) {
      if ((*(char *)(lVar7 + 0x1790) != '\0') || (*(int *)(lVar7 + 0x6c8) != 0)) {
        FUN_1401bdd00(lVar7,0,
                      L"**WARNING** CNetClient.FrameMove is not called in ten seconds. Is this your intention?"
                     );
      }
      *(undefined8 *)(*(longlong *)(param_1 + 0x108) + 0x1648) = 0xbff0000000000000;
    }
  }
  lVar7 = *(longlong *)(param_1 + 0x108);
  dVar8 = (double)(**(code **)(*(longlong *)(lVar7 + 0x70) + 0x1c0))();
  dVar8 = dVar8 - *(double *)(*(longlong *)(param_1 + 0x108) + 0x18c0);
  if (((*(double *)(lVar7 + 0x6a8) <= dVar8 && dVar8 != *(double *)(lVar7 + 0x6a8)) &&
      (*(longlong **)(lVar7 + 0x5d0) != (longlong *)0x0)) && (**(longlong **)(lVar7 + 0x5d0) != 0))
  {
    if ((*(char *)(lVar7 + 0x1790) != '\0') || (*(int *)(lVar7 + 0x6c8) != 0)) {
      lVar7 = *(longlong *)(param_1 + 0x108);
      FUN_1401bdd00(lVar7,0,&DAT_140277110,*(undefined8 *)(lVar7 + 0x6a8),
                    *(undefined4 *)(lVar7 + 0x1578));
    }
    FUN_1401568c0();
    local_res8 = PTR_DAT_1403200a0;
    FUN_1401c8a70(*(undefined8 *)(param_1 + 0x108),0xc,7,&local_res8);
    puVar4 = local_res8;
    if (((local_res8 != (undefined *)0x0) && (local_res8 != PTR_DAT_1403200a0)) &&
       (puVar1 = local_res8 + -8, puVar1 != (undefined *)0x0)) {
      uVar6 = FUN_1401568c0();
      FUN_140156b50(uVar6);
      piVar2 = (int *)(puVar4 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar6);
    }
    local_res8 = PTR_DAT_1403200a0;
    plVar3 = *(longlong **)(*(longlong *)(param_1 + 0x108) + 0x5d0);
    lVar7 = 0;
    if (plVar3 != (longlong *)0x0) {
      lVar7 = *plVar3;
    }
    if (*(int *)(lVar7 + 0x100) < 4) {
      *(undefined4 *)(lVar7 + 0x40) = 0;
      *(undefined4 *)(lVar7 + 0x100) = 4;
      uVar6 = (**(code **)(*(longlong *)(*(longlong *)(lVar7 + 0x108) + 0x70) + 0x1c0))();
      *(undefined8 *)(lVar7 + 0x80) = uVar6;
      *(undefined1 *)(lVar7 + 0xc0) = 0;
    }
  }
  FUN_1401d45e0(param_1);
  FUN_1401bf860(*(undefined8 *)(param_1 + 0x108));
  FUN_1401b9e70(*(undefined8 *)(param_1 + 0x108));
  FUN_1401ba160(*(undefined8 *)(param_1 + 0x108));
  FUN_1401ba3c0(*(undefined8 *)(param_1 + 0x108));
  FUN_1401caca0(*(undefined8 *)(param_1 + 0x108));
  FUN_1401b2010(*(undefined8 *)(param_1 + 0x108));
  FUN_1401b2170(*(undefined8 *)(param_1 + 0x108));
  FUN_1401c0210(*(undefined8 *)(param_1 + 0x108));
  FUN_140156be0(uVar5);
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401d5460(longlong param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  longlong *plVar3;
  undefined *puVar4;
  char cVar5;
  int iVar6;
  longlong lVar7;
  undefined8 uVar8;
  longlong lVar9;
  undefined8 *puVar10;
  bool bVar11;
  undefined1 auStack_19c8 [32];
  undefined **local_19a8;
  undefined4 local_19a0;
  undefined2 local_199c;
  undefined1 local_1998 [8];
  undefined1 local_1990 [8];
  longlong local_1988;
  int local_197c;
  undefined8 local_1970;
  undefined1 local_1968;
  undefined8 local_1960;
  undefined *local_1958;
  undefined4 uStack_1950;
  undefined4 uStack_194c;
  undefined1 local_1948 [3200];
  undefined1 *local_cc8;
  undefined4 local_cc0;
  undefined4 local_cbc;
  undefined1 local_cb8 [3216];
  ulonglong local_28;
  undefined8 uStack_20;
  
  uStack_20 = 0x1401d5476;
  local_1960 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_19c8;
  local_19a8 = Proud::AddrPort::vftable;
  lVar9 = 0;
  local_19a0 = 0;
  local_199c = 0;
  local_1958 = (undefined *)0x0;
  uStack_1950 = 0;
  uStack_194c = 0;
  cVar5 = FUN_1401543d0(param_2,&local_1958,0x10);
  if ((cVar5 != '\0') && (cVar5 = FUN_140154e00(param_2,&local_19a8), cVar5 != '\0')) {
    plVar3 = *(longlong **)(*(longlong *)(param_1 + 0x108) + 0x1570);
    lVar7 = lVar9;
    if (plVar3 != (longlong *)0x0) {
      lVar7 = *plVar3;
    }
    bVar11 = local_1958 < *(undefined **)(lVar7 + 8);
    iVar6 = 0;
    if ((local_1958 != *(undefined **)(lVar7 + 8)) ||
       (bVar11 = CONCAT44(uStack_194c,uStack_1950) < *(ulonglong *)(lVar7 + 0x10),
       CONCAT44(uStack_194c,uStack_1950) != *(ulonglong *)(lVar7 + 0x10))) {
      iVar6 = (1 - (uint)bVar11) - (uint)(bVar11 != 0);
    }
    if (iVar6 == 0) {
      plVar3 = *(longlong **)(*(longlong *)(param_1 + 0x108) + 0x1570);
      lVar7 = lVar9;
      if (plVar3 != (longlong *)0x0) {
        lVar7 = *plVar3;
      }
      if ((*(int *)(lVar7 + 0xd0) == *(int *)(param_2 + 0x38)) &&
         (*(short *)(lVar7 + 0xd4) == *(short *)(param_2 + 0x3c))) {
        FUN_1401544a0(local_1998);
        FUN_140153d90(local_1998);
        FUN_140154600(local_1998,0x800);
        FUN_140154600(local_1998,0);
        FUN_14004fd90(local_1998,0xe);
        plVar3 = *(longlong **)(*(longlong *)(param_1 + 0x108) + 0x1570);
        if (plVar3 != (longlong *)0x0) {
          lVar9 = *plVar3;
        }
        local_1958 = *(undefined **)(lVar9 + 8);
        uStack_1950 = *(undefined4 *)(lVar9 + 0x10);
        uStack_194c = *(undefined4 *)(lVar9 + 0x14);
        FUN_14013b2a0(local_1998,&local_1958);
        uVar8 = FUN_1401b0080(*(undefined8 *)(param_1 + 0x108),&local_1970);
        FUN_140155350(local_1998,uVar8);
        FUN_140155350(local_1998,&local_19a8);
        local_cbc = 200;
        local_cc0 = 0;
        local_cc8 = local_1948;
        FUN_1401570d0(local_cb8,local_1998);
        FUN_140156ed0(local_1948,local_cb8);
        FUN_140156dc0(local_cb8);
        lVar9 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x108));
        *(undefined4 *)(lVar9 + 0x140) = local_19a0;
        *(undefined2 *)(lVar9 + 0x144) = local_199c;
        local_1958 = (undefined *)0x0;
        uStack_1950 = CONCAT31(uStack_1950._1_3_,1);
        uVar8 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
        FUN_1401e2f30(uVar8,local_1948,&local_1958);
        if ((*(char *)(*(longlong *)(param_1 + 0x108) + 0x1790) != '\0') ||
           (*(int *)(*(longlong *)(param_1 + 0x108) + 0x6c8) != 0)) {
          puVar10 = (undefined8 *)FUN_140159580(&local_19a8,&local_1958);
          FUN_1401bdd00(*(undefined8 *)(param_1 + 0x108),1,
                        L"Message_ServerHolepunchAck. AddrOfHereAtServer=%s",*puVar10);
          puVar4 = local_1958;
          if ((local_1958 != (undefined *)0x0) &&
             ((local_1958 != PTR_DAT_1403200a0 &&
              (puVar1 = local_1958 + -8, puVar1 != (undefined *)0x0)))) {
            uVar8 = FUN_1401568c0();
            local_1970 = uVar8;
            FUN_140156b50(uVar8);
            local_1968 = 1;
            piVar2 = (int *)(puVar4 + -4);
            *piVar2 = *piVar2 + -1;
            if (*piVar2 == 0) {
              FUN_140156970(puVar1);
            }
            FUN_140156be0(uVar8);
          }
        }
        FUN_140156dc0(local_1948);
        local_1958 = local_1990;
        FUN_1401560e0(local_1990);
        if ((local_1988 != 0) && (local_197c < 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
      }
    }
  }
  return;
}



undefined8 FUN_1401d5790(undefined8 param_1,undefined8 param_2,undefined8 param_3)

{
  char cVar1;
  undefined8 uVar2;
  longlong *local_res18;
  undefined **local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined1 local_78 [4];
  undefined4 local_74;
  longlong local_70;
  longlong local_68;
  undefined4 local_60;
  int local_5c;
  undefined4 local_50;
  undefined **local_48;
  undefined4 local_40;
  undefined2 local_3c;
  undefined1 local_38;
  undefined8 local_28;
  
  local_28 = 0xfffffffffffffffe;
  local_a0 = 0;
  local_98 = 0;
  local_90 = 0;
  local_88 = 0;
  local_a8 = Proud::ByteArray::vftable;
  cVar1 = FUN_140154a70(param_3,&local_res18);
  if (((cVar1 == '\0') || ((int)local_res18 < 0)) || (DAT_140320d70 < (int)local_res18)) {
LAB_1401d5917:
    FUN_1401858d0(&local_a8);
    return 0;
  }
  FUN_140050060(&local_a8,(ulonglong)local_res18 & 0xffffffff);
  uVar2 = local_98;
  if ((int)local_90 == 0) {
    uVar2 = 0;
  }
  cVar1 = FUN_1401543d0(param_3,uVar2,(ulonglong)local_res18 & 0xffffffff);
  if (cVar1 == '\0') goto LAB_1401d5917;
  FUN_1401544a0(local_78);
  local_48 = Proud::AddrPort::vftable;
  local_38 = 0;
  local_40 = DAT_140320450;
  local_3c = DAT_140320454;
  local_50 = 1;
  FUN_140153d90(local_78);
  if ((int)local_90 < 1) {
                    // WARNING: Subroutine does not return
    FUN_1401566e0();
  }
  local_74 = 0;
  if (local_70 == 0) {
    if (local_68 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (local_68 == 0) {
    if (local_70 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    FUN_140050180(local_70,local_98);
    goto LAB_1401d58bc;
  }
  FUN_14004ff50(&local_68,local_98);
LAB_1401d58bc:
  FUN_1400501f0(local_78);
  local_38 = 1;
  FUN_1401da970(param_1,param_2,local_78);
  local_res18 = &local_70;
  FUN_1401560e0(&local_70);
  if (local_68 != 0) {
    if (local_5c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_60 = 0;
  }
  FUN_1401858d0(&local_a8);
  return 1;
}



void FUN_1401d5940(longlong param_1,longlong param_2)

{
  longlong *plVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  longlong lVar5;
  uint *puVar6;
  undefined8 uVar7;
  uint *puVar8;
  uint uVar9;
  uint uVar10;
  uint uVar11;
  uint *local_res8;
  
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
  lVar5 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
  *(undefined1 *)(lVar5 + 0x80) = 0;
  iVar2 = *(int *)(param_2 + 8);
  if (-1 < iVar2) {
    if (0 < iVar2) {
      lVar5 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
      FUN_1401a7fb0(lVar5 + 0x170,iVar2);
      plVar1 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x660);
      *plVar1 = *plVar1 + (longlong)*(int *)(param_2 + 8);
    }
    uVar7 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    FUN_1401e2db0(uVar7);
    return;
  }
  FUN_1401568c0();
  local_res8 = (uint *)PTR_DAT_1403200a0;
  uVar3 = FUN_140156740(L"compdatalength < 0 sendcomplete");
  uVar11 = 0;
  uVar9 = 0;
  if ((local_res8 != (uint *)0x0) && (uVar9 = 0, local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar9 = local_res8[-2];
  }
  uVar4 = uVar3;
  if ((((int)uVar3 <= (int)uVar9) && (uVar4 = uVar11, local_res8 != (uint *)0x0)) &&
     (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar4 = local_res8[-2];
  }
  uVar9 = 1;
  if (1 < (int)uVar4) {
    uVar9 = uVar4;
  }
  uVar4 = uVar11;
  if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar4 = local_res8[-2];
  }
  uVar10 = 0;
  if ((int)uVar4 < (int)uVar9) {
    if (local_res8 == (uint *)0x0) {
      local_res8 = (uint *)PTR_DAT_1403200a0;
    }
    if ((int)uVar9 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar9 == 0) {
      FUN_14004f990(&local_res8);
    }
    else {
      uVar4 = uVar11;
      if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
        uVar4 = local_res8[-2];
      }
      if (uVar9 != uVar4) {
        puVar6 = (uint *)FUN_140156940((longlong)(int)uVar9 * 2 + 10);
        if (puVar6 != (uint *)0x0) {
          *puVar6 = 0;
          puVar6[1] = 1;
        }
        *puVar6 = uVar9;
        uVar4 = uVar10;
        if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
          uVar4 = local_res8[-2];
        }
        puVar8 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar9 < (int)uVar4) {
LAB_1401d5a92:
          if (local_res8 != (uint *)0x0) {
            puVar8 = local_res8;
          }
        }
        else {
          uVar9 = uVar11;
          if (local_res8 != (uint *)0x0) {
            if (local_res8 != (uint *)PTR_DAT_1403200a0) {
              uVar9 = local_res8[-2];
            }
            goto LAB_1401d5a92;
          }
        }
        FUN_140156770(puVar6 + 2,puVar8,uVar9);
        FUN_14004f990(&local_res8);
        local_res8 = puVar6 + 2;
      }
    }
  }
  FUN_14004f670(&local_res8);
  puVar6 = local_res8;
  if (local_res8 == (uint *)0x0) {
    puVar6 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar6,L"compdatalength < 0 sendcomplete",uVar3);
  puVar6 = local_res8;
  if (local_res8 == (uint *)0x0) {
    puVar6 = (uint *)PTR_DAT_1403200a0;
  }
  uVar3 = FUN_140156740(puVar6);
  uVar9 = 0;
  if (0 < (int)uVar3) {
    uVar9 = uVar3;
  }
  uVar3 = uVar10;
  if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar3 = local_res8[-2];
  }
  if (((int)uVar3 <= (int)uVar9) && (uVar9 = uVar10, local_res8 != (uint *)0x0)) {
    if (local_res8 == (uint *)PTR_DAT_1403200a0) goto LAB_1401d5b4c;
    uVar9 = local_res8[-2];
  }
  if (((local_res8 != (uint *)PTR_DAT_1403200a0) && (local_res8 != (uint *)0x0)) &&
     (local_res8 + -2 != (uint *)0x0)) {
    local_res8[-2] = uVar9;
    *(undefined2 *)((longlong)local_res8 + (longlong)(int)uVar9 * 2) = 0;
  }
LAB_1401d5b4c:
  FUN_1401c8a70(*(undefined8 *)(param_1 + 0x108),0xb,3,&local_res8);
  puVar6 = local_res8;
  if (((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar8 = local_res8 + -2, puVar8 != (uint *)0x0)) {
    uVar7 = FUN_1401568c0();
    FUN_140156b50(uVar7);
    puVar6 = puVar6 + -1;
    *puVar6 = *puVar6 - 1;
    if (*puVar6 == 0) {
      FUN_140156970(puVar8);
    }
    FUN_140156be0(uVar7);
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x0001401d5d3a)
// WARNING: Removing unreachable block (ram,0x0001401d5d4d)
// WARNING: Removing unreachable block (ram,0x0001401d5d67)
// WARNING: Removing unreachable block (ram,0x0001401d5d6f)
// WARNING: Removing unreachable block (ram,0x0001401d5d76)

void FUN_1401d5c10(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  int *piVar1;
  char cVar2;
  undefined8 uVar3;
  longlong lVar4;
  undefined8 uVar5;
  undefined *puVar6;
  undefined *puVar7;
  undefined4 uVar8;
  double dVar9;
  undefined8 local_res8;
  undefined *local_res10;
  undefined *local_res18;
  
  uVar3 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))
                    (*(longlong **)(param_1 + 0x108),param_2,param_3,param_4,0xfffffffffffffffe);
  FUN_140156b50(uVar3);
  *(int *)(param_1 + 0x40) = *(int *)(param_1 + 0x40) + 1;
  if (*(longlong *)(*(longlong *)(param_1 + 0x108) + 0xb0) != 0) {
    FUN_1401af7b0();
  }
  puVar7 = (undefined *)0x0;
  uVar8 = 1;
  if (*(int *)(param_1 + 0x40) == 1) {
    (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
    lVar4 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x108));
    if (lVar4 != 0) {
      lVar4 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x108));
      puVar6 = puVar7;
      if (*(undefined8 **)(lVar4 + 0x100) != (undefined8 *)0x0) {
        puVar6 = (undefined *)**(undefined8 **)(lVar4 + 0x100);
      }
      FUN_1401855c0(puVar6);
    }
    lVar4 = *(longlong *)(*(longlong *)(param_1 + 0x108) + 0x1670);
    while (lVar4 != 0) {
      puVar6 = puVar7;
      if (*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x1670) != 0) {
        puVar6 = *(undefined **)(*(longlong *)(param_1 + 0x108) + 0x1660);
      }
      if (puVar6 == (undefined *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      local_res8 = 0;
      if (*(longlong *)(puVar6 + 8) != 0) {
        *(longlong *)(*(longlong *)(puVar6 + 8) + 8) =
             *(longlong *)(*(longlong *)(puVar6 + 8) + 8) + 1;
        local_res8 = *(undefined8 *)(puVar6 + 8);
      }
      FUN_1401c1b30(*(undefined8 *)(param_1 + 0x108),&local_res8);
      lVar4 = *(longlong *)(*(longlong *)(param_1 + 0x108) + 0x1670);
    }
    FUN_1401c1670(*(undefined8 *)(param_1 + 0x108));
    FUN_1401c17c0(*(undefined8 *)(param_1 + 0x108));
    lVar4 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    if (lVar4 != 0) {
      lVar4 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
      puVar6 = puVar7;
      if (*(undefined8 **)(lVar4 + 0x128) != (undefined8 *)0x0) {
        puVar6 = (undefined *)**(undefined8 **)(lVar4 + 0x128);
      }
      FUN_1401855c0(puVar6);
    }
  }
  FUN_1401c0630(*(undefined8 *)(param_1 + 0x108));
  if (*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x1718) == 0) {
    lVar4 = FUN_1401aff70();
    if (lVar4 != 0) {
      lVar4 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x108));
      if ((*(longlong **)(lVar4 + 0x100) != (longlong *)0x0) &&
         (**(longlong **)(lVar4 + 0x100) != 0)) {
        lVar4 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x108));
        puVar6 = puVar7;
        if (*(undefined8 **)(lVar4 + 0x100) != (undefined8 *)0x0) {
          puVar6 = (undefined *)**(undefined8 **)(lVar4 + 0x100);
        }
        cVar2 = FUN_140185860(puVar6);
        if (((cVar2 == '\0') ||
            (lVar4 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x108)),
            *(char *)(lVar4 + 0x80) != '\0')) ||
           (lVar4 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x108)), *(char *)(lVar4 + 0xc0) != '\0'
           )) {
          uVar8 = 2;
          goto LAB_1401d5f43;
        }
      }
    }
    lVar4 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    if (lVar4 != 0) {
      lVar4 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
      if ((*(longlong **)(lVar4 + 0x128) != (longlong *)0x0) &&
         (**(longlong **)(lVar4 + 0x128) != 0)) {
        lVar4 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
        puVar6 = puVar7;
        if (*(undefined8 **)(lVar4 + 0x128) != (undefined8 *)0x0) {
          puVar6 = (undefined *)**(undefined8 **)(lVar4 + 0x128);
        }
        cVar2 = FUN_140185860(puVar6);
        if (((cVar2 == '\0') ||
            (lVar4 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108)),
            *(char *)(lVar4 + 0x80) != '\0')) ||
           (lVar4 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108)), *(char *)(lVar4 + 0xc0) != '\0'
           )) {
          uVar8 = 3;
          goto LAB_1401d5f43;
        }
      }
    }
    cVar2 = FUN_14018afa0(*(longlong *)(param_1 + 0x108) + 0x1620);
    if (cVar2 == '\0') {
      FUN_14018aea0(*(longlong *)(param_1 + 0x108) + 0x1620);
    }
    FUN_1401c65c0(*(undefined8 *)(param_1 + 0x108),0);
    if (*(int *)(param_1 + 0x100) < 5) {
      *(undefined4 *)(param_1 + 0x40) = 0;
      *(undefined4 *)(param_1 + 0x100) = 5;
      uVar5 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
      *(undefined8 *)(param_1 + 0x80) = uVar5;
      *(undefined1 *)(param_1 + 0xc0) = 0;
    }
  }
  else {
LAB_1401d5f43:
    dVar9 = (double)(**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
    if ((5.0 < dVar9 - *(double *)(param_1 + 0x80)) && (*(char *)(param_1 + 0xc0) == '\0')) {
      FUN_1401568c0();
      local_res18 = PTR_DAT_1403200a0;
      FUN_14004ce50(&local_res18,
                    L"Too long time elapsed since disconnecting mode! unsafeDisconnectReason=%d",
                    uVar8);
      FUN_1401568c0();
      puVar6 = local_res18;
      local_res10 = PTR_DAT_1403200a0;
      if (PTR_DAT_1403200a0 == (undefined *)0x0) {
        local_res10 = puVar7;
      }
      if (local_res18 != PTR_DAT_1403200a0) {
        uVar5 = FUN_1401568c0();
        FUN_140156b50(uVar5);
        FUN_14004f990(&local_res10);
        local_res10 = puVar6;
        if (((puVar6 != PTR_DAT_1403200a0) && (puVar6 != (undefined *)0x0)) &&
           (puVar6 != (undefined *)0x8)) {
          *(int *)(puVar6 + -4) = *(int *)(puVar6 + -4) + 1;
        }
        FUN_140156be0(uVar5);
      }
      FUN_1401a7000(&local_res10);
      *(undefined1 *)(param_1 + 0xc0) = 1;
      if (((puVar6 != (undefined *)0x0) && (puVar6 != PTR_DAT_1403200a0)) &&
         (puVar6 + -8 != (undefined *)0x0)) {
        uVar5 = FUN_1401568c0();
        FUN_140156b50(uVar5);
        piVar1 = (int *)(puVar6 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar6 + -8);
        }
        FUN_140156be0(uVar5);
      }
    }
  }
  FUN_140156be0(uVar3);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401d6120(longlong param_1,longlong param_2)

{
  undefined8 *puVar1;
  char cVar2;
  undefined8 uVar3;
  longlong *plVar4;
  longlong lVar5;
  longlong lVar6;
  undefined1 auStack_da8 [32];
  longlong *local_d88;
  undefined8 local_d80;
  undefined4 uStack_d78;
  undefined4 uStack_d74;
  undefined1 local_d70 [8];
  longlong local_d68;
  longlong local_d60;
  undefined4 local_d58;
  int local_d54;
  undefined8 local_d48;
  undefined1 local_d40;
  undefined **local_d38;
  undefined4 local_d30;
  undefined2 local_d2c;
  undefined4 local_d28 [2];
  undefined8 local_d20;
  undefined1 local_d18;
  undefined4 local_d14;
  undefined1 local_d10;
  undefined1 local_d0f;
  undefined8 local_d08;
  undefined1 local_d00 [72];
  undefined4 local_cb8;
  undefined4 uStack_cb4;
  undefined4 uStack_cb0;
  undefined4 uStack_cac;
  undefined4 *local_38;
  undefined4 local_30;
  int local_2c;
  ulonglong local_28;
  
  local_d08 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_da8;
  cVar2 = FUN_1401543d0(param_2,&local_d80,8);
  if (cVar2 != '\0') {
    uVar3 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))();
    local_d48 = uVar3;
    FUN_140156b50(uVar3);
    local_d40 = 1;
    local_d38 = Proud::AddrPort::vftable;
    local_d30 = *(undefined4 *)(param_2 + 0x38);
    local_d2c = *(undefined2 *)(param_2 + 0x3c);
    plVar4 = (longlong *)FUN_1401b9d00(*(undefined8 *)(param_1 + 0x108),&local_d88,&local_d38);
    lVar6 = 0;
    if ((longlong *)*plVar4 != (longlong *)0x0) {
      lVar6 = *(longlong *)*plVar4;
    }
    if ((local_d88 != (longlong *)0x0) &&
       (local_d88[1] = local_d88[1] + -1, uVar3 = local_d48, local_d88[1] == 0)) {
      puVar1 = (undefined8 *)*local_d88;
      if (puVar1 != (undefined8 *)0x0) {
        (**(code **)*puVar1)(puVar1,1);
      }
      FUN_140156970(local_d88);
      uVar3 = local_d48;
    }
    if ((lVar6 != 0) && (*(int *)(lVar6 + 0x56c) != 1)) {
      FUN_1401544a0(local_d70);
      FUN_140153d90(local_d70);
      FUN_140154600(local_d70,0x800);
      FUN_140154600(local_d70,0);
      FUN_14004fd90(local_d70,0x21);
      FUN_14004fbc0(local_d70,local_d80);
      local_2c = 200;
      local_30 = 0;
      local_38 = &local_cb8;
      if (local_d68 == 0) {
        uStack_d78 = local_d58;
        if (local_d60 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
      }
      else {
        uStack_d78 = *(undefined4 *)(local_d68 + 0x18);
      }
      lVar5 = local_d60;
      if (local_d60 == 0) {
        if (local_d68 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        lVar5 = 0;
        if (*(int *)(local_d68 + 0x18) != 0) {
          lVar5 = *(longlong *)(local_d68 + 0x10);
        }
      }
      local_30 = 1;
      local_d80._0_4_ = (undefined4)lVar5;
      local_d80._4_4_ = (undefined4)((ulonglong)lVar5 >> 0x20);
      local_cb8 = (undefined4)local_d80;
      uStack_cb4 = local_d80._4_4_;
      uStack_cac = uStack_d74;
      local_d28[0] = 0;
      local_d20 = 0;
      local_d18 = 1;
      local_d14 = 0xffffffff;
      local_d10 = 1;
      local_d0f = DAT_140320dfc;
      local_d80 = (longlong *)lVar5;
      uStack_cb0 = uStack_d78;
      FUN_1401e36d0(lVar6 + 0x668,&local_cb8,local_d28);
      if (local_38 == (undefined4 *)0x0) {
        FUN_140156300(local_d00,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_d00,(ThrowInfo *)&DAT_14031d928);
      }
      if (local_2c < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_30 = 0;
      local_d80 = &local_d68;
      FUN_1401560e0(&local_d68);
      if (local_d60 != 0) {
        if (local_d54 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_d58 = 0;
      }
    }
    FUN_140156be0(uVar3);
  }
  return;
}



void FUN_1401d63d0(longlong param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  undefined8 *puVar2;
  undefined2 uVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  longlong *plVar6;
  int *piVar7;
  longlong lVar8;
  undefined ***pppuVar9;
  double dVar10;
  undefined8 uVar11;
  undefined4 uVar12;
  undefined4 uVar13;
  longlong *local_res10;
  undefined1 local_d8 [8];
  longlong local_d0;
  longlong local_c8;
  int local_bc;
  undefined **local_b0;
  undefined4 local_a8;
  undefined2 local_a4;
  undefined **local_a0;
  undefined4 local_98;
  undefined2 local_94;
  undefined **local_90;
  undefined4 local_88;
  undefined2 local_84;
  int local_80 [2];
  undefined8 local_78;
  undefined1 local_70;
  undefined4 local_6c;
  undefined1 local_68;
  undefined1 local_67;
  int local_60 [2];
  undefined8 local_58;
  undefined1 local_50;
  undefined4 local_4c;
  undefined1 local_48;
  undefined1 local_47;
  undefined8 local_40;
  
  if (param_2 == 0) {
    return;
  }
  local_40 = 0xfffffffffffffffe;
  local_a0 = Proud::AddrPort::vftable;
  local_98 = *(undefined4 *)(param_3 + 0x38);
  local_94 = *(undefined2 *)(param_3 + 0x3c);
  dVar10 = (double)FUN_14019ef20(*(undefined8 *)(param_2 + 0x188),&local_a0);
  if (dVar10 <= 0.0) {
    return;
  }
  FUN_1401544a0(local_d8);
  FUN_140153d90(local_d8);
  FUN_140154600(local_d8,0x800);
  FUN_140154600(local_d8,0);
  FUN_14004fd90(local_d8,0x28);
  FUN_14004fbc0(local_d8,dVar10);
  iVar1 = *(int *)(param_3 + 0x28);
  if (iVar1 == 1) {
    lVar8 = 0;
    local_78 = 0;
    local_70 = 1;
    local_6c = 0xffffffff;
    local_68 = 1;
    local_67 = DAT_140320dfc;
    plVar6 = *(longlong **)(*(longlong *)(param_1 + 0x108) + 0x1570);
    if (plVar6 != (longlong *)0x0) {
      lVar8 = *plVar6;
    }
    local_90 = Proud::AddrPort::vftable;
    local_88 = *(undefined4 *)(lVar8 + 0xd0);
    local_84 = *(undefined2 *)(lVar8 + 0xd4);
    plVar6 = *(longlong **)(param_1 + 0x108);
    local_80[0] = iVar1;
    uVar11 = (**(code **)(plVar6[0xe] + 0x1c0))();
    uVar12 = (undefined4)uVar11;
    uVar13 = (undefined4)((ulonglong)uVar11 >> 0x20);
    uVar4 = (**(code **)(*plVar6 + 0x30))(plVar6);
    uVar3 = FUN_14019e480(uVar4,1);
    uVar11 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x108));
    piVar7 = local_80;
    pppuVar9 = &local_90;
    uVar4 = 1;
  }
  else {
    if (iVar1 == 0) goto LAB_1401d6656;
    plVar6 = (longlong *)FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x108),&local_res10);
    lVar8 = 0;
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      lVar8 = *(longlong *)*plVar6;
    }
    if ((local_res10 != (longlong *)0x0) &&
       (local_res10[1] = local_res10[1] + -1, local_res10[1] == 0)) {
      puVar2 = (undefined8 *)*local_res10;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
      }
      FUN_140156970(local_res10);
    }
    if ((*(longlong **)(lVar8 + 0x18) == (longlong *)0x0) || (**(longlong **)(lVar8 + 0x18) == 0))
    goto LAB_1401d6656;
    local_60[0] = 1;
    local_58 = 0;
    local_50 = 1;
    local_4c = 0xffffffff;
    local_48 = 1;
    local_47 = DAT_140320dfc;
    local_b0 = Proud::AddrPort::vftable;
    local_a8 = *(undefined4 *)(lVar8 + 0x598);
    local_a4 = *(undefined2 *)(lVar8 + 0x59c);
    uVar4 = *(undefined4 *)(param_3 + 0x28);
    plVar6 = *(longlong **)(param_1 + 0x108);
    uVar11 = (**(code **)(plVar6[0xe] + 0x1c0))();
    uVar12 = (undefined4)uVar11;
    uVar13 = (undefined4)((ulonglong)uVar11 >> 0x20);
    uVar5 = (**(code **)(*plVar6 + 0x30))(plVar6);
    uVar3 = FUN_14019e480(uVar5,uVar4);
    uVar11 = FUN_1401e36b0(lVar8);
    piVar7 = local_60;
    pppuVar9 = &local_b0;
  }
  FUN_1401e75f0(uVar11,uVar4,uVar3,pppuVar9,local_d8,CONCAT44(uVar13,uVar12),piVar7);
LAB_1401d6656:
  local_res10 = &local_d0;
  FUN_1401560e0(&local_d0);
  if ((local_c8 != 0) && (local_bc < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



void FUN_1401d66a0(longlong param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  undefined8 uVar2;
  undefined *local_res8;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  FUN_140156b50();
  if (*(int *)(param_2 + 0x100) != 5) {
    FUN_1401568c0();
    local_res8 = PTR_DAT_1403200a0;
    uVar1 = FUN_140156740(L"Unexpected at CNetClientManager::Unregister");
    uVar2 = FUN_14004f760(&local_res8,uVar1);
    FUN_140156770(uVar2,L"Unexpected at CNetClientManager::Unregister",uVar1,param_4,uVar3);
    FUN_14004f380(&local_res8);
    FUN_1401a7000(&local_res8);
  }
  if (*(longlong *)(param_2 + 0x10) != 0) {
    FUN_1401d38d0(*(longlong *)(param_2 + 0x10),param_2);
  }
  FUN_140156be0(param_1 + 0x10);
  return;
}



void FUN_1401d6750(longlong param_1,char param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong *plVar2;
  undefined8 *puVar3;
  longlong *plVar4;
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  longlong *local_res8;
  undefined8 uVar8;
  longlong lVar9;
  undefined1 uVar10;
  
  uVar8 = 0xfffffffffffffffe;
  lVar6 = param_1 + 0x10;
  lVar9 = lVar6;
  FUN_140156b50(lVar6);
  uVar10 = 1;
  plVar1 = (longlong *)(param_1 + 0x290);
  plVar2 = (longlong *)*plVar1;
  if (((plVar2 == (longlong *)0x0) || (*plVar2 == 0)) && (param_2 != '\0')) {
    local_res8 = operator_new(0x3c0);
    lVar7 = 0;
    lVar5 = lVar7;
    if (local_res8 != (longlong *)0x0) {
      lVar5 = FUN_1401f0530(local_res8,param_1 + 8,param_3,param_4,uVar8,lVar9,uVar10);
    }
    if (lVar5 == 0) {
      local_res8 = (longlong *)0x0;
    }
    else {
      local_res8 = (longlong *)FUN_140156940(0x10);
      local_res8[1] = 1;
      *local_res8 = lVar5;
    }
    plVar2 = local_res8;
    FUN_1401d43e0(plVar1,&local_res8);
    plVar4 = local_res8;
    if (plVar2 != (longlong *)0x0) {
      plVar2 = plVar2 + 1;
      *plVar2 = *plVar2 + -1;
      lVar6 = lVar9;
      if (*plVar2 == 0) {
        puVar3 = (undefined8 *)*local_res8;
        if (puVar3 != (undefined8 *)0x0) {
          (**(code **)*puVar3)(puVar3,1);
          lVar6 = lVar9;
        }
        FUN_140156970(plVar4);
      }
    }
    if ((longlong *)*plVar1 != (longlong *)0x0) {
      lVar7 = *(longlong *)*plVar1;
    }
    FUN_1401f00f0(lVar7);
  }
  else if (((plVar2 != (longlong *)0x0) && (*plVar2 != 0)) && (param_2 == '\0')) {
    FUN_1401f0090();
  }
  FUN_140156be0(lVar6);
  return;
}



undefined8 * FUN_1401d6890(longlong *param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  
  plVar1 = (longlong *)*param_1;
  if (plVar1 == (longlong *)0x0) {
    puVar2 = (undefined8 *)FUN_140156940(0x58);
  }
  else {
    puVar2 = (undefined8 *)
             (**(code **)(*plVar1 + 8))(plVar1,0x58,param_3,param_4,0xfffffffffffffffe);
  }
  if (puVar2 != (undefined8 *)0x0) {
    FUN_1401544d0(puVar2 + 2,param_2);
    *(undefined4 *)(puVar2 + 7) = *(undefined4 *)(param_2 + 0x28);
    puVar2[8] = Proud::AddrPort::vftable;
    *(undefined4 *)(puVar2 + 9) = *(undefined4 *)(param_2 + 0x38);
    *(undefined2 *)((longlong)puVar2 + 0x4c) = *(undefined2 *)(param_2 + 0x3c);
    *(undefined1 *)(puVar2 + 10) = *(undefined1 *)(param_2 + 0x40);
  }
  puVar2[1] = param_3;
  *puVar2 = param_4;
  param_1[3] = param_1[3] + 1;
  return puVar2;
}



undefined8 FUN_1401d6940(longlong param_1,undefined8 param_2,longlong param_3)

{
  undefined8 *puVar1;
  longlong *plVar2;
  ulonglong uVar3;
  char cVar4;
  undefined2 uVar5;
  undefined4 uVar6;
  longlong *plVar7;
  undefined8 uVar8;
  longlong lVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *plVar12;
  int iVar13;
  longlong *plVar14;
  int iVar15;
  uint uVar16;
  longlong *plVar17;
  undefined8 uVar18;
  undefined4 local_res18 [2];
  longlong *local_res20;
  undefined1 local_178 [4];
  undefined4 local_174;
  longlong local_170;
  longlong local_168;
  undefined4 local_160;
  int local_15c;
  undefined **local_150;
  undefined8 local_148;
  longlong *local_140;
  ulonglong local_138;
  undefined8 local_130;
  undefined **local_128;
  longlong *local_120;
  longlong *local_118;
  undefined8 local_110;
  undefined8 local_108;
  int *local_100;
  undefined1 local_f8 [4];
  undefined4 local_f4;
  longlong local_f0;
  longlong local_e8;
  undefined4 local_e0;
  int local_dc;
  undefined4 local_d0;
  undefined **local_c8;
  undefined4 local_c0;
  undefined2 local_bc;
  undefined1 local_b8;
  undefined **local_a8;
  undefined4 local_a0;
  undefined2 local_9c;
  undefined8 local_98;
  ulonglong local_90;
  ulonglong local_88;
  undefined4 local_80 [2];
  undefined8 local_78;
  undefined1 local_70;
  undefined4 local_6c;
  undefined1 local_68;
  undefined1 local_67;
  undefined8 local_60;
  
  local_60 = 0xfffffffffffffffe;
  if (*(int *)(param_3 + 0x28) != 1) {
    return 0;
  }
  cVar4 = FUN_140154c80(param_3,local_res18);
  if (cVar4 == '\0') {
    return 0;
  }
  cVar4 = FUN_140154a70(param_3,&local_98);
  if (cVar4 == '\0') {
    return 0;
  }
  plVar12 = (longlong *)0x0;
  local_120 = (longlong *)0x0;
  local_118 = (longlong *)0x0;
  local_110 = 0;
  local_108 = 0;
  local_128 = Proud::HostIDArray::vftable;
  cVar4 = FUN_140154a70(param_3,&local_90);
  plVar11 = plVar12;
  plVar10 = plVar12;
  if (((cVar4 != '\0') && (iVar13 = (int)local_90, plVar11 = (longlong *)0x0, -1 < iVar13)) &&
     (iVar13 <= DAT_140320d70)) {
    FUN_14015cb30(&local_128,local_90 & 0xffffffff);
    plVar11 = local_118;
    iVar15 = (int)local_110;
    plVar10 = local_118;
    if ((int)local_110 == 0) {
      plVar10 = plVar12;
    }
    cVar4 = FUN_1401543d0(param_3,plVar10,iVar13 * 4);
    plVar10 = local_120;
    if (cVar4 != '\0') {
      local_148 = 0;
      local_140 = (longlong *)0x0;
      local_138 = 0;
      local_130 = 0;
      local_150 = Proud::ByteArray::vftable;
      cVar4 = FUN_140154a70(param_3,&local_88);
      if (((cVar4 != '\0') && (-1 < (int)local_88)) && ((int)local_88 <= DAT_140320d70)) {
        FUN_140050060(&local_150,local_88 & 0xffffffff);
        plVar10 = local_140;
        if ((int)local_138 == 0) {
          plVar10 = plVar12;
        }
        cVar4 = FUN_1401543d0(param_3,plVar10,local_88 & 0xffffffff);
        if (cVar4 != '\0') {
          FUN_1401544a0(local_178);
          FUN_140153d90(local_178);
          FUN_140154600(local_178,0x800);
          FUN_140154600(local_178,0);
          FUN_14004fd90(local_178,0x23);
          uVar3 = local_138;
          iVar13 = (int)local_138;
          FUN_140155b20(local_178,(longlong)(int)local_138);
          plVar10 = local_140;
          if ((int)local_138 == 0) {
            plVar10 = plVar12;
          }
          if (iVar13 != 0) {
            local_174 = 0;
            if (local_170 == 0) {
              if (local_168 == 0) {
                    // WARNING: Subroutine does not return
                FUN_1401561e0(0,plVar10);
              }
LAB_1401d6b2e:
              FUN_14004ff50(&local_168,plVar10,uVar3 & 0xffffffff);
            }
            else {
              if (local_168 != 0) goto LAB_1401d6b2e;
              if (local_170 == 0) {
                    // WARNING: Subroutine does not return
                FUN_1401561e0(0,plVar10);
              }
              FUN_140050180(local_170,plVar10,uVar3 & 0xffffffff);
            }
            FUN_1400501f0(local_178);
          }
          local_70 = DAT_1403285c0;
          local_6c = 0xffffffff;
          local_68 = DAT_1403285e0;
          local_80[0] = local_res18[0];
          local_78 = local_98;
          local_67 = 0;
          plVar10 = plVar12;
          plVar17 = plVar12;
          if (0 < iVar15) {
            do {
              if (((longlong)plVar17 < 0) || (iVar15 <= (int)plVar10)) {
                    // WARNING: Subroutine does not return
                FUN_1401566e0();
              }
              local_100 = (int *)((longlong)plVar11 + (longlong)plVar17 * 4);
              if (*local_100 != *(int *)(*(longlong *)(param_1 + 0x108) + 0x1578)) {
                plVar7 = (longlong *)
                         FUN_1401bb6b0(*(longlong *)(param_1 + 0x108),&local_res20,*local_100);
                plVar2 = local_res20;
                plVar14 = plVar12;
                if ((undefined8 *)*plVar7 != (undefined8 *)0x0) {
                  plVar14 = *(longlong **)*plVar7;
                }
                if (local_res20 != (longlong *)0x0) {
                  local_res20[1] = local_res20[1] + -1;
                  if (local_res20[1] == 0) {
                    puVar1 = (undefined8 *)*local_res20;
                    if (puVar1 != (undefined8 *)0x0) {
                      (**(code **)*puVar1)(puVar1,1);
                    }
                    FUN_140156970(plVar2);
                  }
                  plVar11 = local_118;
                  iVar15 = (int)local_110;
                }
                if ((((plVar14 != (longlong *)0x0) && (*(char *)((longlong)plVar14 + 0x684) == '\0')
                     ) && ((char)plVar14[0xc1] != '\x01')) &&
                   (((longlong *)plVar14[3] != (longlong *)0x0 && (*(longlong *)plVar14[3] != 0))))
                {
                  local_a8 = Proud::AddrPort::vftable;
                  local_a0 = (undefined4)plVar14[0xb3];
                  local_9c = *(undefined2 *)((longlong)plVar14 + 0x59c);
                  plVar2 = *(longlong **)(param_1 + 0x108);
                  uVar18 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0
                                       ))();
                  uVar6 = (**(code **)(*plVar2 + 0x30))(plVar2);
                  uVar5 = FUN_14019e480(uVar6,*local_100);
                  uVar8 = FUN_1401e36b0(plVar14);
                  FUN_1401e75f0(uVar8,*local_100,uVar5,&local_a8,local_178,uVar18,local_80);
                }
              }
              uVar16 = (int)plVar10 + 1;
              plVar10 = (longlong *)(ulonglong)uVar16;
              plVar17 = (longlong *)((longlong)plVar17 + 1);
            } while ((int)uVar16 < iVar15);
          }
          FUN_1401544a0(local_f8);
          local_c8 = Proud::AddrPort::vftable;
          local_b8 = 0;
          local_c0 = DAT_140320450;
          local_bc = DAT_140320454;
          local_d0 = 1;
          FUN_140153d90(local_f8);
          if ((int)local_138 < 1) {
                    // WARNING: Subroutine does not return
            FUN_1401566e0();
          }
          local_f4 = 0;
          if (local_f0 == 0) {
            if (local_e8 == 0) {
                    // WARNING: Subroutine does not return
              FUN_1401561e0();
            }
          }
          else if (local_e8 == 0) {
            if (local_f0 == 0) {
                    // WARNING: Subroutine does not return
              FUN_1401561e0();
            }
            FUN_140050180(local_f0,local_140);
            goto LAB_1401d6db9;
          }
          FUN_14004ff50(&local_e8,local_140);
LAB_1401d6db9:
          FUN_1400501f0(local_f8);
          FUN_1401da970(param_1,param_2,local_f8);
          local_res20 = &local_f0;
          FUN_1401560e0(&local_f0);
          if (local_e8 != 0) {
            if (local_dc < 0) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            local_e0 = 0;
          }
          local_res20 = &local_170;
          FUN_1401560e0(&local_170);
          if (local_168 != 0) {
            if (local_15c < 0) {
                    // WARNING: Subroutine does not return
              FUN_1401566b0();
            }
            local_160 = 0;
          }
          FUN_1401858d0(&local_150);
          if (plVar11 != (longlong *)0x0) {
            if (local_120 == (longlong *)0x0) {
              FUN_140156970(plVar11);
            }
            else {
              (**(code **)(*local_120 + 0x18))(local_120,plVar11);
            }
          }
          return 1;
        }
      }
      FUN_1401858d0(&local_150);
      if (plVar11 == (longlong *)0x0) {
        return 0;
      }
      if (local_120 == (longlong *)0x0) goto LAB_1401d6ea3;
      lVar9 = *local_120;
      plVar10 = local_120;
      goto LAB_1401d6e9b;
    }
  }
  if (plVar11 == (longlong *)0x0) {
    return 0;
  }
  if (plVar10 == (longlong *)0x0) {
LAB_1401d6ea3:
    FUN_140156970(plVar11);
    return 0;
  }
  lVar9 = *plVar10;
LAB_1401d6e9b:
  (**(code **)(lVar9 + 0x18))(plVar10,plVar11);
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401d6ed0(undefined *param_1,int *param_2)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  longlong lVar4;
  undefined *puVar5;
  longlong *plVar6;
  ulonglong uVar7;
  char cVar8;
  undefined8 uVar9;
  undefined8 uVar10;
  undefined1 auStack_ec8 [32];
  undefined1 local_ea8 [8];
  undefined *local_ea0;
  undefined1 local_e98 [4];
  undefined4 local_e94;
  longlong local_e90;
  longlong local_e88;
  undefined4 local_e80;
  int local_e7c;
  undefined *local_e70;
  undefined *local_e68;
  undefined *local_e60;
  undefined **local_e58;
  undefined8 local_e50;
  undefined8 local_e48;
  undefined8 local_e40;
  undefined8 local_e38;
  undefined **local_e30;
  undefined8 local_e28;
  undefined8 local_e20;
  undefined8 local_e18;
  undefined8 local_e10;
  undefined **local_e08;
  undefined8 local_e00;
  undefined8 local_df8;
  undefined8 local_df0;
  undefined8 local_de8;
  longlong *local_dd0;
  undefined **local_dc8;
  undefined8 local_dc0;
  undefined8 local_db8;
  ulonglong local_db0;
  undefined8 local_da8;
  undefined **local_da0;
  undefined8 local_d98;
  undefined8 local_d90;
  ulonglong local_d88;
  undefined8 local_d80;
  undefined8 local_d78;
  undefined1 local_d70;
  undefined8 local_d68;
  undefined1 local_d60;
  undefined8 local_d58;
  undefined1 local_d50;
  undefined4 local_d48;
  int iStack_d44;
  undefined8 local_d40;
  undefined8 local_d38;
  undefined8 local_d30;
  undefined8 local_d28;
  undefined8 local_d20;
  undefined8 local_d18;
  undefined1 local_d10;
  undefined8 local_d08;
  undefined1 local_d00;
  undefined8 local_ce0;
  undefined1 local_cb8 [3216];
  ulonglong local_28;
  
  local_ce0 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_ec8;
  local_ea0 = param_1;
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
  cVar8 = FUN_1401543d0(param_2,local_ea8,1);
  if (cVar8 == '\0') {
    FUN_1401568c0();
    local_e70 = PTR_DAT_1403200a0;
    FUN_1401c8a70(*(undefined8 *)(param_1 + 0x108),8,3,&local_e70);
    puVar5 = local_e70;
    if (((local_e70 != (undefined *)0x0) && (local_e70 != PTR_DAT_1403200a0)) &&
       (puVar1 = local_e70 + -8, puVar1 != (undefined *)0x0)) {
      uVar9 = FUN_1401568c0();
      local_d68 = uVar9;
      FUN_140156b50(uVar9);
      local_d60 = 1;
      piVar2 = (int *)(puVar5 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar9);
      local_d60 = 0;
    }
    local_e70 = PTR_DAT_1403200a0;
LAB_1401d6fce:
    if (*(int *)(param_1 + 0x100) < 4) {
      *(undefined4 *)(param_1 + 0x40) = 0;
      *(undefined4 *)(param_1 + 0x100) = 4;
      uVar9 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
      *(undefined8 *)(param_1 + 0x80) = uVar9;
      param_1[0xc0] = 0;
    }
    return;
  }
  FUN_1401ab900(&local_d48);
  cVar8 = FUN_140154ee0(param_2,&local_d48);
  if (cVar8 == '\0') {
    FUN_1401568c0();
    local_e60 = PTR_DAT_1403200a0;
    FUN_1401c8a70(*(undefined8 *)(param_1 + 0x108),8,3,&local_e60);
    puVar5 = local_e60;
    if (((local_e60 != (undefined *)0x0) && (local_e60 != PTR_DAT_1403200a0)) &&
       (puVar1 = local_e60 + -8, puVar1 != (undefined *)0x0)) {
      uVar9 = FUN_1401568c0();
      local_d78 = uVar9;
      FUN_140156b50(uVar9);
      local_d70 = 1;
      piVar2 = (int *)(puVar5 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar9);
      local_d70 = 0;
    }
    local_e60 = PTR_DAT_1403200a0;
    goto LAB_1401d6fce;
  }
  lVar4 = *(longlong *)(param_1 + 0x108);
  *(ulonglong *)(lVar4 + 0x6a0) = CONCAT44(iStack_d44,local_d48);
  *(undefined8 *)(lVar4 + 0x6a8) = local_d40;
  *(undefined8 *)(lVar4 + 0x6b0) = local_d38;
  *(undefined8 *)(lVar4 + 0x6b8) = local_d30;
  *(undefined8 *)(lVar4 + 0x6c0) = local_d28;
  *(undefined8 *)(lVar4 + 0x6c8) = local_d20;
  if (*(char *)(*(longlong *)(param_1 + 0x108) + 0x6cc) != '\0') {
    uVar9 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
    *(undefined8 *)(*(longlong *)(param_1 + 0x108) + 0x638) = uVar9;
  }
  uVar9 = 0;
  local_e00 = 0;
  local_df8 = 0;
  local_df0 = 0;
  local_de8 = 0;
  local_e08 = Proud::ByteArray::vftable;
  cVar8 = FUN_140154a70(param_2,&local_dd0);
  plVar6 = local_dd0;
  if (((cVar8 != '\0') && (-1 < (int)local_dd0)) && ((int)local_dd0 <= DAT_140320d70)) {
    FUN_140050060(&local_e08,(ulonglong)local_dd0 & 0xffffffff);
    uVar10 = local_df8;
    if ((int)local_df0 == 0) {
      uVar10 = uVar9;
    }
    cVar8 = FUN_1401543d0(param_2,uVar10,(ulonglong)plVar6 & 0xffffffff);
    if (cVar8 != '\0') {
      local_e50 = 0;
      local_e48 = 0;
      local_e40 = 0;
      local_e38 = 0;
      local_e58 = Proud::ByteArray::vftable;
      local_e28 = 0;
      local_e20 = 0;
      local_e18 = 0;
      local_e10 = 0;
      local_e30 = Proud::ByteArray::vftable;
      FUN_1401aa370(&local_e58,*(undefined4 *)(*(longlong *)(param_1 + 0x108) + 0x6bc));
      uVar10 = local_e48;
      if ((int)local_e40 == 0) {
        uVar10 = uVar9;
      }
      FUN_140198270(*(longlong *)(param_1 + 0x108) + 0xd8,uVar10,
                    *(uint *)(*(longlong *)(param_1 + 0x108) + 0x6bc) >> 3,0x10);
      FUN_1401aa370(&local_e30,*(undefined4 *)(*(longlong *)(param_1 + 0x108) + 0x6c0));
      uVar10 = local_e20;
      if ((int)local_e18 == 0) {
        uVar10 = uVar9;
      }
      FUN_1401a9a60(*(longlong *)(param_1 + 0x108) + 0x4a8,uVar10,
                    *(uint *)(*(longlong *)(param_1 + 0x108) + 0x6c0) >> 3);
      uVar10 = FUN_140181860();
      FUN_140156b50(uVar10);
      if (iStack_d44 < DAT_140320d70) {
        iStack_d44 = DAT_140320d70;
      }
      DAT_140320d70 = iStack_d44;
      FUN_140156be0(uVar10);
      if (*(longlong *)(param_2 + 2) == 0) {
        if (*(longlong *)(param_2 + 4) == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        iVar3 = param_2[6];
      }
      else {
        iVar3 = *(int *)(*(longlong *)(param_2 + 2) + 0x18);
      }
      if ((int)(*param_2 + (*param_2 >> 0x1f & 7U)) >> 3 != iVar3) {
        FUN_1401568c0();
        local_ea0 = PTR_DAT_1403200a0;
        FUN_1401c8a70(*(undefined8 *)(param_1 + 0x108),8,3,&local_ea0);
        puVar5 = local_ea0;
        if (((local_ea0 != (undefined *)0x0) && (local_ea0 != PTR_DAT_1403200a0)) &&
           (puVar1 = local_ea0 + -8, puVar1 != (undefined *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_d08 = uVar9;
          FUN_140156b50(uVar9);
          local_d00 = 1;
          piVar2 = (int *)(puVar5 + -4);
          *piVar2 = *piVar2 + -1;
          if (*piVar2 == 0) {
            FUN_140156970(puVar1);
          }
          FUN_140156be0(uVar9);
        }
        FUN_1401d3870(param_1,4);
        FUN_1401858d0(&local_e30);
        FUN_1401858d0(&local_e58);
        goto LAB_1401d7867;
      }
      *(undefined1 *)(*(longlong *)(param_1 + 0x108) + 0x1790) = local_ea8[0];
      lVar4 = *(longlong *)(param_1 + 0x108);
      uVar10 = FUN_1401aff90(lVar4);
      FUN_1401e2d00(uVar10,*(undefined1 *)(lVar4 + 0x6b8));
      local_dc0 = 0;
      local_db8 = 0;
      local_db0 = 0;
      local_da8 = 0;
      local_dc8 = Proud::ByteArray::vftable;
      local_d98 = 0;
      local_d90 = 0;
      local_d88 = 0;
      local_d80 = 0;
      local_da0 = Proud::ByteArray::vftable;
      FUN_1401aa370(&local_e58,*(undefined4 *)(*(longlong *)(param_1 + 0x108) + 0x6bc));
      uVar10 = local_e48;
      if ((int)local_e40 == 0) {
        uVar10 = uVar9;
      }
      FUN_140198270(*(longlong *)(param_1 + 0x108) + 0x708,uVar10,
                    *(uint *)(*(longlong *)(param_1 + 0x108) + 0x6bc) >> 3,0x10);
      FUN_1401aa530(&local_dc8,&local_e58,&local_e08);
      FUN_1401aa370(&local_e30,*(undefined4 *)(*(longlong *)(param_1 + 0x108) + 0x6c0));
      uVar10 = local_e20;
      if ((int)local_e18 == 0) {
        uVar10 = uVar9;
      }
      FUN_1401a9a60(*(longlong *)(param_1 + 0x108) + 0xad8,uVar10,
                    *(uint *)(*(longlong *)(param_1 + 0x108) + 0x6c0) >> 3);
      FUN_14019a330(&local_e30,&local_da0,*(longlong *)(param_1 + 0x108) + 0x708);
      FUN_1401544a0(local_e98);
      FUN_140153d90(local_e98);
      FUN_140154600(local_e98,0x800);
      FUN_140154600(local_e98,0);
      FUN_14004fd90(local_e98,5);
      uVar7 = local_db0;
      iVar3 = (int)local_db0;
      FUN_140155b20(local_e98,(longlong)(int)local_db0);
      uVar10 = local_db8;
      if ((int)local_db0 == 0) {
        uVar10 = uVar9;
      }
      if (iVar3 != 0) {
        local_e94 = 0;
        if (local_e90 == 0) {
          if (local_e88 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0(0,uVar10);
          }
LAB_1401d75d2:
          FUN_14004ff50(&local_e88,uVar10,uVar7 & 0xffffffff);
        }
        else {
          if (local_e88 != 0) goto LAB_1401d75d2;
          if (local_e90 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0(0,uVar10);
          }
          FUN_140050180(local_e90,uVar10,uVar7 & 0xffffffff);
        }
        FUN_1400501f0(local_e98);
      }
      uVar7 = local_d88;
      iVar3 = (int)local_d88;
      FUN_140155b20(local_e98,(longlong)(int)local_d88);
      uVar10 = local_d90;
      if ((int)local_d88 == 0) {
        uVar10 = uVar9;
      }
      if (iVar3 != 0) {
        local_e94 = 0;
        if (local_e90 == 0) {
          if (local_e88 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0(0,uVar10);
          }
LAB_1401d7650:
          FUN_14004ff50(&local_e88,uVar10,uVar7 & 0xffffffff);
        }
        else {
          if (local_e88 != 0) goto LAB_1401d7650;
          if (local_e90 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0(0,uVar10);
          }
          FUN_140050180(local_e90,uVar10,uVar7 & 0xffffffff);
        }
        FUN_1400501f0(local_e98);
      }
      uVar9 = FUN_1401570d0(local_cb8,local_e98);
      local_d58 = 0;
      local_d50 = 1;
      uVar10 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
      FUN_1401e2f30(uVar10,uVar9,&local_d58);
      FUN_140156dc0(local_cb8);
      local_dd0 = &local_e90;
      FUN_1401560e0(&local_e90);
      if (local_e88 != 0) {
        if (local_e7c < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_e80 = 0;
      }
      FUN_1401858d0(&local_da0);
      FUN_1401858d0(&local_dc8);
      FUN_1401858d0(&local_e30);
      FUN_1401858d0(&local_e58);
      goto LAB_1401d7867;
    }
  }
  FUN_1401568c0();
  local_e68 = PTR_DAT_1403200a0;
  FUN_1401c8a70(*(undefined8 *)(param_1 + 0x108),8,3,&local_e68);
  puVar5 = local_e68;
  if (((local_e68 != (undefined *)0x0) && (local_e68 != PTR_DAT_1403200a0)) &&
     (puVar1 = local_e68 + -8, puVar1 != (undefined *)0x0)) {
    uVar9 = FUN_1401568c0();
    local_d18 = uVar9;
    FUN_140156b50(uVar9);
    local_d10 = 1;
    piVar2 = (int *)(puVar5 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar1);
    }
    FUN_140156be0(uVar9);
    local_d10 = 0;
  }
  local_e68 = PTR_DAT_1403200a0;
  if (*(int *)(param_1 + 0x100) < 4) {
    *(undefined4 *)(param_1 + 0x40) = 0;
    *(undefined4 *)(param_1 + 0x100) = 4;
    uVar9 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
    *(undefined8 *)(param_1 + 0x80) = uVar9;
    param_1[0xc0] = 0;
  }
LAB_1401d7867:
  FUN_1401858d0(&local_e08);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401d78a0(longlong param_1)

{
  int iVar1;
  undefined8 uVar2;
  undefined8 *puVar3;
  longlong lVar4;
  longlong lVar5;
  longlong lVar6;
  undefined1 auStack_d68 [32];
  undefined1 local_d48 [4];
  undefined4 local_d44;
  longlong local_d40;
  longlong local_d38;
  int local_d30;
  int local_d2c;
  undefined8 local_d18;
  undefined4 uStack_d10;
  undefined4 uStack_d0c;
  undefined8 local_d08;
  undefined1 local_d00 [72];
  undefined4 local_cb8;
  undefined4 uStack_cb4;
  int iStack_cb0;
  undefined4 uStack_cac;
  undefined4 *local_38;
  undefined4 local_30;
  int local_2c;
  ulonglong local_28;
  
  local_d08 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_d68;
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
  FUN_1401544a0(local_d48);
  FUN_140153d90(local_d48);
  FUN_140154600(local_d48,0x800);
  FUN_140154600(local_d48,0);
  FUN_14004fd90(local_d48,7);
  lVar5 = *(longlong *)(param_1 + 0x108);
  iVar1 = *(int *)(lVar5 + 0x15c0);
  FUN_140155b20(local_d48,(longlong)iVar1);
  lVar6 = 0;
  lVar4 = lVar6;
  if (*(int *)(lVar5 + 0x15c0) != 0) {
    lVar4 = *(longlong *)(lVar5 + 0x15b8);
  }
  if (iVar1 != 0) {
    local_d44 = 0;
    if (local_d40 == 0) {
      if (local_d38 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar4);
      }
LAB_1401d7980:
      FUN_14004ff50(&local_d38,lVar4,iVar1);
    }
    else {
      if (local_d38 != 0) goto LAB_1401d7980;
      if (local_d40 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0(0,lVar4);
      }
      FUN_140050180(local_d40,lVar4,iVar1);
    }
    FUN_1400501f0(local_d48);
  }
  lVar4 = local_d40;
  lVar5 = *(longlong *)(param_1 + 0x108);
  local_d18 = *(longlong **)(lVar5 + 0x1594);
  uStack_d10 = *(undefined4 *)(lVar5 + 0x159c);
  uStack_d0c = *(undefined4 *)(lVar5 + 0x15a0);
  local_d44 = 0;
  if (local_d40 == 0) {
    if (local_d38 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (local_d38 == 0) {
    if (local_d40 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = *(int *)(local_d40 + 0x18);
    FUN_140050060(local_d40,iVar1 + 0x10);
    lVar5 = lVar6;
    if (*(int *)(lVar4 + 0x18) != 0) {
      lVar5 = *(longlong *)(lVar4 + 0x10);
    }
    puVar3 = (undefined8 *)(lVar5 + iVar1);
    goto LAB_1401d7a30;
  }
  lVar5 = (longlong)local_d30;
  local_d30 = local_d30 + 0x10;
  if ((local_d30 < 0) || (local_d2c < local_d30)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  puVar3 = (undefined8 *)(local_d38 + lVar5);
LAB_1401d7a30:
  *puVar3 = local_d18;
  puVar3[1] = CONCAT44(uStack_d0c,uStack_d10);
  FUN_1400501f0(local_d48);
  FUN_14004fe70(local_d48,*(undefined4 *)(*(longlong *)(param_1 + 0x108) + 0x698));
  local_2c = 200;
  local_30 = 0;
  local_38 = &local_cb8;
  if (local_d40 == 0) {
    iStack_cb0 = local_d30;
    if (local_d38 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else {
    iStack_cb0 = *(int *)(local_d40 + 0x18);
  }
  lVar5 = local_d38;
  if (local_d38 == 0) {
    if (local_d40 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    lVar5 = lVar6;
    if (*(int *)(local_d40 + 0x18) != 0) {
      lVar5 = *(longlong *)(local_d40 + 0x10);
    }
  }
  local_30 = 1;
  local_d18._0_4_ = (undefined4)lVar5;
  local_d18._4_4_ = (undefined4)((ulonglong)lVar5 >> 0x20);
  local_cb8 = (undefined4)local_d18;
  uStack_cb4 = local_d18._4_4_;
  uStack_cac = uStack_d0c;
  local_d18 = (longlong *)0x0;
  uStack_d10 = CONCAT31((int3)((uint)iStack_cb0 >> 8),1);
  uVar2 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
  FUN_1401e2f30(uVar2,&local_cb8,&local_d18);
  if (local_38 == (undefined4 *)0x0) {
    FUN_140156300(local_d00,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_d00,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_2c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  local_d18 = &local_d40;
  FUN_1401560e0(&local_d40);
  if ((local_d38 != 0) && (local_d2c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



undefined8 FUN_1401d7ba0(longlong param_1,undefined8 param_2)

{
  longlong *plVar1;
  longlong lVar2;
  
  plVar1 = *(longlong **)(param_1 + 8);
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  FUN_1401544d0(param_2,plVar1 + 2);
  lVar2 = *plVar1;
  *(longlong *)(param_1 + 8) = lVar2;
  if (lVar2 == 0) {
    *(undefined8 *)(param_1 + 0x10) = 0;
  }
  else {
    *(undefined8 *)(lVar2 + 8) = 0;
  }
  FUN_1401bb1c0(param_1,plVar1);
  return param_2;
}



void FUN_1401d7c20(longlong param_1,undefined8 param_2,int *param_3)

{
  undefined8 *puVar1;
  uint uVar2;
  uint uVar3;
  longlong *plVar4;
  uint *puVar5;
  undefined8 uVar6;
  uint *puVar7;
  uint uVar8;
  uint uVar9;
  int iVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  int local_res8 [2];
  undefined8 local_res10;
  uint *local_res18;
  longlong *local_res20;
  undefined **local_c8;
  undefined8 local_c0;
  longlong local_b8;
  undefined8 local_b0;
  undefined4 local_a8;
  undefined4 local_a4;
  undefined **local_a0;
  int local_98;
  undefined2 local_94;
  undefined **local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined8 local_78;
  undefined8 local_70;
  undefined8 local_68;
  undefined1 local_60;
  undefined1 local_58 [8];
  undefined8 local_50;
  
  local_50 = 0xfffffffffffffffe;
  local_res10 = param_2;
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
  local_a0 = Proud::AddrPort::vftable;
  local_98 = param_3[0xe];
  local_94 = (undefined2)param_3[0xf];
  plVar4 = (longlong *)FUN_1401b9d00(*(undefined8 *)(param_1 + 0x108),&local_res20,&local_a0);
  uVar11 = 0;
  uVar13 = uVar11;
  if ((ulonglong *)*plVar4 != (ulonglong *)0x0) {
    uVar13 = *(ulonglong *)*plVar4;
  }
  if ((local_res20 != (longlong *)0x0) &&
     (local_res20[1] = local_res20[1] + -1, local_res20[1] == 0)) {
    puVar1 = (undefined8 *)*local_res20;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(local_res20);
  }
  if ((uVar13 == 0) || (*(char *)(uVar13 + 0x650) != '\0')) {
    if (*(longlong *)(param_3 + 2) == 0) {
      if (*(longlong *)(param_3 + 4) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      iVar10 = param_3[6];
    }
    else {
      iVar10 = *(int *)(*(longlong *)(param_3 + 2) + 0x18);
    }
    FUN_140154660(param_3,iVar10 - ((int)(*param_3 + (*param_3 >> 0x1f & 7U)) >> 3));
    return;
  }
  local_c0 = 0;
  local_b8 = 0;
  local_b0 = 0;
  local_c8 = Proud::CReceivedMessageList::vftable;
  local_a8 = 1000;
  local_a4 = 1;
  FUN_1401e8760(uVar13 + 0x638,param_3,&local_c8,local_res8);
  if (local_res8[0] == 0) goto LAB_1401d7f82;
  FUN_1401568c0();
  local_res18 = (uint *)PTR_DAT_1403200a0;
  uVar2 = FUN_140156740(L"Stream Extract Error at Reliable UDP");
  uVar9 = 0;
  uVar12 = uVar11;
  if ((local_res18 != (uint *)0x0) && (uVar12 = 0, local_res18 != (uint *)PTR_DAT_1403200a0)) {
    uVar12 = (ulonglong)local_res18[-2];
  }
  uVar3 = uVar2;
  if ((((int)uVar2 <= (int)uVar12) && (uVar3 = uVar9, local_res18 != (uint *)0x0)) &&
     (local_res18 != (uint *)PTR_DAT_1403200a0)) {
    uVar3 = local_res18[-2];
  }
  uVar8 = 1;
  if (1 < (int)uVar3) {
    uVar8 = uVar3;
  }
  uVar3 = uVar9;
  if ((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_1403200a0)) {
    uVar3 = local_res18[-2];
  }
  if ((int)uVar3 < (int)uVar8) {
    if (local_res18 == (uint *)0x0) {
      local_res18 = (uint *)PTR_DAT_1403200a0;
    }
    if ((int)uVar8 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar8 == 0) {
      FUN_14004f990(&local_res18);
    }
    else {
      uVar3 = uVar9;
      if ((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_1403200a0)) {
        uVar3 = local_res18[-2];
      }
      if (uVar8 != uVar3) {
        puVar5 = (uint *)FUN_140156940((longlong)(int)uVar8 * 2 + 10);
        if (puVar5 != (uint *)0x0) {
          *puVar5 = 0;
          puVar5[1] = 1;
        }
        *puVar5 = uVar8;
        uVar3 = uVar9;
        if ((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_1403200a0)) {
          uVar3 = local_res18[-2];
        }
        puVar7 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar8 < (int)uVar3) {
LAB_1401d7e2b:
          if (local_res18 != (uint *)0x0) {
            puVar7 = local_res18;
          }
        }
        else {
          uVar8 = uVar9;
          if (local_res18 != (uint *)0x0) {
            if (local_res18 != (uint *)PTR_DAT_1403200a0) {
              uVar8 = local_res18[-2];
            }
            goto LAB_1401d7e2b;
          }
        }
        FUN_140156770(puVar5 + 2,puVar7,uVar8);
        FUN_14004f990(&local_res18);
        local_res18 = puVar5 + 2;
      }
    }
  }
  FUN_14004f670(&local_res18);
  puVar5 = local_res18;
  if (local_res18 == (uint *)0x0) {
    puVar5 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar5,L"Stream Extract Error at Reliable UDP",uVar2);
  puVar5 = local_res18;
  if (local_res18 == (uint *)0x0) {
    puVar5 = (uint *)PTR_DAT_1403200a0;
  }
  uVar3 = FUN_140156740(puVar5);
  uVar2 = 0;
  if (0 < (int)uVar3) {
    uVar2 = uVar3;
  }
  uVar3 = uVar9;
  if ((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_1403200a0)) {
    uVar3 = local_res18[-2];
  }
  if (((int)uVar2 < (int)uVar3) || (uVar2 = uVar9, local_res18 == (uint *)0x0)) {
LAB_1401d7ebe:
    if (((local_res18 != (uint *)PTR_DAT_1403200a0) && (local_res18 != (uint *)0x0)) &&
       (local_res18 + -2 != (uint *)0x0)) {
      local_res18[-2] = uVar2;
      *(undefined2 *)((longlong)local_res18 + (longlong)(int)uVar2 * 2) = 0;
    }
  }
  else if (local_res18 != (uint *)PTR_DAT_1403200a0) {
    uVar2 = local_res18[-2];
    goto LAB_1401d7ebe;
  }
  local_88 = 0;
  local_80 = 0;
  local_78 = 0;
  local_70 = 0;
  local_90 = Proud::ByteArray::vftable;
  uVar6 = FUN_140181f50(local_58,local_res8[0],*(undefined4 *)(uVar13 + 0x56c),&local_res18,
                        &local_90);
  (**(code **)(**(longlong **)(param_1 + 0x108) + 0x80))(*(longlong **)(param_1 + 0x108),uVar6);
  FUN_1401858d0(&local_90);
  puVar5 = local_res18;
  param_2 = local_res10;
  if (((local_res18 != (uint *)0x0) && (local_res18 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar7 = local_res18 + -2, puVar7 != (uint *)0x0)) {
    uVar6 = FUN_1401568c0();
    local_68 = uVar6;
    FUN_140156b50(uVar6);
    local_60 = 1;
    puVar5 = puVar5 + -1;
    *puVar5 = *puVar5 - 1;
    if (*puVar5 == 0) {
      FUN_140156970(puVar7);
    }
    FUN_140156be0(uVar6);
    param_2 = local_res10;
  }
LAB_1401d7f82:
  while( true ) {
    iVar10 = (int)uVar11;
    if (iVar10 == (int)local_b0) {
      FUN_140190f40(&local_c8);
      return;
    }
    if ((iVar10 < 0) || ((int)local_b0 <= iVar10)) break;
    *(char *)(local_b8 + (longlong)iVar10 * 0x48 + 0x40) = (char)param_3[0x10];
    FUN_1401da970(param_1,param_2);
    if ((int)local_b0 <= iVar10) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    uVar11 = (ulonglong)(iVar10 + 1);
  }
                    // WARNING: Subroutine does not return
  FUN_1401566e0();
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401d8030(longlong param_1,undefined8 param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 *puVar3;
  char cVar4;
  uint uVar5;
  uint uVar6;
  uint uVar7;
  uint *puVar8;
  undefined8 uVar9;
  ulonglong uVar10;
  uint *puVar11;
  uint uVar12;
  int iVar13;
  ulonglong uVar14;
  uint uVar15;
  undefined1 auStack_df8 [32];
  undefined ***local_dd8;
  uint *local_dc8;
  ulonglong *local_dc0;
  int local_db8;
  undefined4 local_db4;
  undefined4 local_db0 [2];
  undefined1 *local_da8;
  undefined8 local_da0;
  undefined8 local_d98;
  longlong local_d90;
  ulonglong local_d88;
  longlong local_d80;
  undefined8 local_d78;
  undefined4 local_d6c;
  undefined **local_d68;
  undefined8 local_d60;
  longlong local_d58;
  undefined8 local_d50;
  undefined4 local_d48;
  undefined4 local_d44;
  undefined1 local_d40 [8];
  undefined1 local_d38 [8];
  longlong local_d30;
  int local_d24;
  undefined8 *local_d18;
  undefined **local_d10;
  undefined8 local_d08;
  undefined8 local_d00;
  undefined8 local_cf8;
  undefined8 local_cf0;
  undefined8 local_ce8;
  undefined1 local_ce0;
  undefined1 local_cd8 [8];
  undefined8 local_cd0;
  undefined1 local_cc8 [3216];
  ulonglong local_38;
  
  local_cd0 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_df8;
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
  cVar4 = FUN_140154e60(param_2,local_db0);
  if (cVar4 == '\0') {
    return;
  }
  cVar4 = FUN_1401543d0(param_2,&local_db4,4);
  if (cVar4 == '\0') {
    return;
  }
  cVar4 = FUN_140154a70(param_2,&local_da8);
  if (cVar4 == '\0') {
    return;
  }
  if ((int)local_da8 < 0) {
    return;
  }
  if (DAT_140320d70 <= (int)local_da8) {
    return;
  }
  FUN_1401544a0(local_d40);
  cVar4 = FUN_140154700(param_2,local_d40,(ulonglong)local_da8 & 0xffffffff);
  if (cVar4 == '\0') {
    local_da8 = local_d38;
    FUN_1401560e0(local_d38);
    if (local_d30 == 0) {
      return;
    }
    if (-1 < local_d24) {
      return;
    }
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x108),&local_dc0,local_db0[0]);
  if ((((local_dc0 == (ulonglong *)0x0) || (uVar10 = *local_dc0, uVar10 == 0)) ||
      (*(char *)(uVar10 + 0x684) != '\0')) || (*(char *)(uVar10 + 0x650) != '\0'))
  goto LAB_1401d8570;
  local_d78 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x88) + 0x18))();
  uVar14 = 0;
  local_d88 = 0;
  local_d90 = 0;
  local_d98 = 0;
  local_d80 = 0;
  local_da0 = 0;
  uVar15 = 0;
  local_d6c = 0;
  FUN_1401570d0(local_cc8,local_d40);
  FUN_1401ab990(*(undefined8 *)(*(longlong *)(param_1 + 0x108) + 0x4e0),local_db4,local_cc8,
                &local_da0);
  FUN_140156dc0(local_cc8);
  local_d60 = 0;
  local_d58 = 0;
  local_d50 = 0;
  local_d68 = Proud::CReceivedMessageList::vftable;
  local_d48 = 1000;
  local_d44 = 1;
  uVar10 = uVar14;
  if (local_dc0 != (ulonglong *)0x0) {
    uVar10 = *local_dc0;
  }
  FUN_1401e86d0(uVar10 + 0x638,&local_da0,&local_d68,&local_db8);
  if (local_db8 != 0) {
    FUN_1401568c0();
    local_dc8 = (uint *)PTR_DAT_1403200a0;
    uVar5 = FUN_140156740(L"Stream Extract Error at Reliable UDP");
    uVar10 = uVar14;
    if ((local_dc8 != (uint *)0x0) && (uVar10 = 0, local_dc8 != (uint *)PTR_DAT_1403200a0)) {
      uVar10 = (ulonglong)local_dc8[-2];
    }
    uVar6 = 0;
    uVar7 = uVar5;
    if ((((int)uVar5 <= (int)uVar10) && (uVar7 = uVar15, local_dc8 != (uint *)0x0)) &&
       (uVar7 = uVar6, local_dc8 != (uint *)PTR_DAT_1403200a0)) {
      uVar7 = local_dc8[-2];
    }
    uVar12 = 1;
    if (1 < (int)uVar7) {
      uVar12 = uVar7;
    }
    uVar7 = uVar6;
    if ((local_dc8 != (uint *)0x0) && (local_dc8 != (uint *)PTR_DAT_1403200a0)) {
      uVar7 = local_dc8[-2];
    }
    if ((int)uVar7 < (int)uVar12) {
      if (local_dc8 == (uint *)0x0) {
        local_dc8 = (uint *)PTR_DAT_1403200a0;
      }
      if ((int)uVar12 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (uVar12 == 0) {
        FUN_14004f990(&local_dc8);
      }
      else {
        uVar7 = uVar15;
        if ((local_dc8 != (uint *)0x0) && (local_dc8 != (uint *)PTR_DAT_1403200a0)) {
          uVar7 = local_dc8[-2];
        }
        if (uVar12 != uVar7) {
          puVar8 = (uint *)FUN_140156940((longlong)(int)uVar12 * 2 + 10);
          if (puVar8 != (uint *)0x0) {
            *puVar8 = 0;
            puVar8[1] = 1;
          }
          *puVar8 = uVar12;
          uVar7 = uVar15;
          if ((local_dc8 != (uint *)0x0) && (local_dc8 != (uint *)PTR_DAT_1403200a0)) {
            uVar7 = local_dc8[-2];
          }
          puVar11 = (uint *)PTR_DAT_1403200a0;
          if ((int)uVar12 < (int)uVar7) {
LAB_1401d833e:
            if (local_dc8 != (uint *)0x0) {
              puVar11 = local_dc8;
            }
          }
          else {
            uVar12 = uVar15;
            if (local_dc8 != (uint *)0x0) {
              if (local_dc8 != (uint *)PTR_DAT_1403200a0) {
                uVar12 = local_dc8[-2];
              }
              goto LAB_1401d833e;
            }
          }
          FUN_140156770(puVar8 + 2,puVar11,uVar12);
          FUN_14004f990(&local_dc8);
          local_dc8 = puVar8 + 2;
        }
      }
    }
    FUN_14004f670(&local_dc8);
    puVar8 = local_dc8;
    if (local_dc8 == (uint *)0x0) {
      puVar8 = (uint *)PTR_DAT_1403200a0;
    }
    FUN_140156770(puVar8,L"Stream Extract Error at Reliable UDP",uVar5);
    puVar8 = local_dc8;
    if (local_dc8 == (uint *)0x0) {
      puVar8 = (uint *)PTR_DAT_1403200a0;
    }
    uVar5 = FUN_140156740(puVar8);
    uVar15 = 0;
    if (0 < (int)uVar5) {
      uVar15 = uVar5;
    }
    uVar5 = uVar6;
    if ((local_dc8 != (uint *)0x0) && (local_dc8 != (uint *)PTR_DAT_1403200a0)) {
      uVar5 = local_dc8[-2];
    }
    if (((int)uVar15 < (int)uVar5) || (uVar15 = uVar6, local_dc8 == (uint *)0x0)) {
LAB_1401d83da:
      if (((local_dc8 != (uint *)PTR_DAT_1403200a0) && (local_dc8 != (uint *)0x0)) &&
         (local_dc8 + -2 != (uint *)0x0)) {
        local_dc8[-2] = uVar15;
        *(undefined2 *)((longlong)local_dc8 + (longlong)(int)uVar15 * 2) = 0;
      }
    }
    else if (local_dc8 != (uint *)PTR_DAT_1403200a0) {
      uVar15 = local_dc8[-2];
      goto LAB_1401d83da;
    }
    local_d08 = 0;
    local_d00 = 0;
    local_cf8 = 0;
    local_cf0 = 0;
    local_d10 = Proud::ByteArray::vftable;
    uVar10 = uVar14;
    if (local_dc0 != (ulonglong *)0x0) {
      uVar10 = *local_dc0;
    }
    local_dd8 = &local_d10;
    uVar9 = FUN_140181f50(local_cd8,local_db8,*(undefined4 *)(uVar10 + 0x56c),&local_dc8);
    (**(code **)(**(longlong **)(param_1 + 0x108) + 0x80))(*(longlong **)(param_1 + 0x108),uVar9);
    FUN_1401858d0(&local_d10);
    puVar8 = local_dc8;
    if (((local_dc8 != (uint *)0x0) && (local_dc8 != (uint *)PTR_DAT_1403200a0)) &&
       (puVar11 = local_dc8 + -2, puVar11 != (uint *)0x0)) {
      uVar9 = FUN_1401568c0();
      local_ce8 = uVar9;
      FUN_140156b50(uVar9);
      local_ce0 = 1;
      puVar8 = puVar8 + -1;
      *puVar8 = *puVar8 - 1;
      if (*puVar8 == 0) {
        FUN_140156970(puVar11);
      }
      FUN_140156be0(uVar9);
      local_ce0 = 0;
    }
    local_dc8 = (uint *)PTR_DAT_1403200a0;
  }
  while (iVar13 = (int)uVar14, iVar13 != (int)local_d50) {
    if ((iVar13 < 0) || ((int)local_d50 <= iVar13)) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    lVar2 = local_d58 + (longlong)iVar13 * 0x48;
    *(undefined1 *)(lVar2 + 0x40) = 1;
    FUN_1401540a0(lVar2,0);
    FUN_1401da970(param_1,0,lVar2);
    if ((int)local_d50 <= iVar13) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    uVar14 = (ulonglong)(iVar13 + 1);
  }
  FUN_140190f40(&local_d68);
  if (local_d80 != 0) {
    plVar1 = (longlong *)(local_d80 + 8);
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      FUN_140161ae0(&local_d80,local_d80);
    }
  }
  local_d18 = &local_d98;
  FUN_1401560e0(&local_d98);
  if (local_d90 != 0) {
    if ((longlong)local_d88 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_d88 = local_d88 & 0xffffffff00000000;
  }
LAB_1401d8570:
  if ((local_dc0 != (ulonglong *)0x0) && (local_dc0[1] = local_dc0[1] - 1, local_dc0[1] == 0)) {
    puVar3 = (undefined8 *)*local_dc0;
    if (puVar3 != (undefined8 *)0x0) {
      (**(code **)*puVar3)(puVar3,1);
    }
    FUN_140156970(local_dc0);
  }
  local_d18 = (undefined8 *)local_d38;
  FUN_1401560e0(local_d38);
  if ((local_d30 != 0) && (local_d24 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



void FUN_1401d8600(longlong param_1,undefined8 param_2,longlong param_3)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 *puVar3;
  char cVar4;
  uint uVar5;
  uint uVar6;
  uint uVar7;
  uint *puVar8;
  undefined8 uVar9;
  void *pvVar10;
  uint *puVar11;
  int iVar12;
  void *pvVar13;
  uint uVar14;
  void *_Dst;
  uint uVar15;
  longlong *local_res18;
  undefined4 local_res20 [2];
  uint *local_128;
  longlong *local_120;
  undefined4 local_118;
  undefined4 local_114;
  longlong local_110;
  void *local_108;
  undefined8 local_100;
  longlong local_f8;
  undefined8 local_f0;
  undefined4 local_e4;
  undefined4 local_e0 [2];
  undefined1 local_d8 [8];
  longlong local_d0;
  void *local_c8;
  int local_c0;
  int local_bc;
  undefined **local_b0;
  undefined8 local_a8;
  longlong local_a0;
  undefined8 local_98;
  undefined4 local_90;
  undefined4 local_8c;
  ulonglong local_88;
  undefined **local_80;
  undefined8 local_78;
  undefined8 local_70;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined1 local_50;
  undefined1 local_48 [8];
  longlong *local_40;
  undefined8 local_38;
  
  local_38 = 0xfffffffffffffffe;
  if (*(int *)(param_3 + 0x28) != 1) {
    return;
  }
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
  cVar4 = FUN_140154e60(param_3,local_res20);
  if (cVar4 == '\0') {
    return;
  }
  cVar4 = FUN_1401543d0(param_3,local_e0,4);
  if (cVar4 == '\0') {
    return;
  }
  cVar4 = FUN_140154a70(param_3,&local_88);
  if (cVar4 == '\0') {
    return;
  }
  if ((int)local_88 < 0) {
    return;
  }
  if (DAT_140320d70 <= (int)local_88) {
    return;
  }
  FUN_1401544a0(local_d8);
  cVar4 = FUN_140154700(param_3,local_d8,local_88 & 0xffffffff);
  if (cVar4 == '\0') {
    local_res18 = &local_d0;
    FUN_1401560e0(&local_d0);
    if (local_c8 == (void *)0x0) {
      return;
    }
    if (-1 < local_bc) {
      return;
    }
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x108),&local_120,local_res20[0]);
  if ((((local_120 == (longlong *)0x0) || (lVar2 = *local_120, lVar2 == 0)) ||
      (*(char *)(lVar2 + 0x684) != '\0')) || (*(char *)(lVar2 + 0x650) != '\0')) goto LAB_1401d8c09;
  local_f0 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x88) + 0x18))();
  pvVar13 = (void *)0x0;
  local_100 = 0;
  local_108 = (void *)0x0;
  local_110 = 0;
  local_f8 = 0;
  uVar15 = 0;
  local_e4 = 0;
  local_118 = 1;
  local_114 = local_e0[0];
  local_110 = FUN_140156120();
  *(undefined8 *)(local_110 + 0x28) = 1;
  if (local_d0 == 0) {
    iVar12 = local_c0;
    if (local_c8 == (void *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else {
    iVar12 = *(int *)(local_d0 + 0x18);
  }
  if (iVar12 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (local_108 == (void *)0x0) {
    if (iVar12 < 1) {
      if (local_110 == 0) goto LAB_1401d8815;
      iVar12 = 0;
    }
    else if (local_110 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    FUN_140050060(local_110,iVar12);
  }
  else {
    if (local_100._4_4_ < iVar12) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_100 = CONCAT44(local_100._4_4_,iVar12);
  }
LAB_1401d8815:
  if (local_d0 == 0) {
    if (local_c8 == (void *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else {
    local_c0 = *(int *)(local_d0 + 0x18);
  }
  pvVar10 = local_c8;
  if (local_c8 == (void *)0x0) {
    if (local_d0 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    pvVar10 = pvVar13;
    if (*(int *)(local_d0 + 0x18) != 0) {
      pvVar10 = *(void **)(local_d0 + 0x10);
    }
  }
  _Dst = local_108;
  if (local_108 == (void *)0x0) {
    if (local_110 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    _Dst = pvVar13;
    if (*(int *)(local_110 + 0x18) != 0) {
      _Dst = *(void **)(local_110 + 0x10);
    }
  }
  memcpy(_Dst,pvVar10,(longlong)local_c0);
  local_a8 = 0;
  local_a0 = 0;
  local_98 = 0;
  local_b0 = Proud::CReceivedMessageList::vftable;
  local_90 = 1000;
  local_8c = 1;
  pvVar10 = pvVar13;
  if (local_120 != (longlong *)0x0) {
    pvVar10 = (void *)*local_120;
  }
  FUN_1401e86d0((longlong)pvVar10 + 0x638,&local_118,&local_b0,&local_res18);
  if ((int)local_res18 != 0) {
    FUN_1401568c0();
    local_128 = (uint *)PTR_DAT_1403200a0;
    uVar5 = FUN_140156740(L"Stream Extract Error at Reliable UDP");
    pvVar10 = pvVar13;
    if ((local_128 != (uint *)0x0) &&
       (pvVar10 = (void *)0x0, local_128 != (uint *)PTR_DAT_1403200a0)) {
      pvVar10 = (void *)(ulonglong)local_128[-2];
    }
    uVar6 = 0;
    uVar7 = uVar5;
    if ((((int)uVar5 <= (int)pvVar10) && (uVar7 = uVar15, local_128 != (uint *)0x0)) &&
       (uVar7 = uVar6, local_128 != (uint *)PTR_DAT_1403200a0)) {
      uVar7 = local_128[-2];
    }
    uVar14 = 1;
    if (1 < (int)uVar7) {
      uVar14 = uVar7;
    }
    uVar7 = uVar6;
    if ((local_128 != (uint *)0x0) && (local_128 != (uint *)PTR_DAT_1403200a0)) {
      uVar7 = local_128[-2];
    }
    if ((int)uVar7 < (int)uVar14) {
      if (local_128 == (uint *)0x0) {
        local_128 = (uint *)PTR_DAT_1403200a0;
      }
      if ((int)uVar14 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (uVar14 == 0) {
        FUN_14004f990(&local_128);
      }
      else {
        uVar7 = uVar15;
        if ((local_128 != (uint *)0x0) && (local_128 != (uint *)PTR_DAT_1403200a0)) {
          uVar7 = local_128[-2];
        }
        if (uVar14 != uVar7) {
          puVar8 = (uint *)FUN_140156940((longlong)(int)uVar14 * 2 + 10);
          if (puVar8 != (uint *)0x0) {
            *puVar8 = 0;
            puVar8[1] = 1;
          }
          *puVar8 = uVar14;
          uVar7 = uVar15;
          if ((local_128 != (uint *)0x0) && (local_128 != (uint *)PTR_DAT_1403200a0)) {
            uVar7 = local_128[-2];
          }
          puVar11 = (uint *)PTR_DAT_1403200a0;
          if ((int)uVar14 < (int)uVar7) {
LAB_1401d89c5:
            if (local_128 != (uint *)0x0) {
              puVar11 = local_128;
            }
          }
          else {
            uVar14 = uVar15;
            if (local_128 != (uint *)0x0) {
              if (local_128 != (uint *)PTR_DAT_1403200a0) {
                uVar14 = local_128[-2];
              }
              goto LAB_1401d89c5;
            }
          }
          FUN_140156770(puVar8 + 2,puVar11,uVar14);
          FUN_14004f990(&local_128);
          local_128 = puVar8 + 2;
        }
      }
    }
    FUN_14004f670(&local_128);
    puVar8 = local_128;
    if (local_128 == (uint *)0x0) {
      puVar8 = (uint *)PTR_DAT_1403200a0;
    }
    FUN_140156770(puVar8,L"Stream Extract Error at Reliable UDP",uVar5);
    puVar8 = local_128;
    if (local_128 == (uint *)0x0) {
      puVar8 = (uint *)PTR_DAT_1403200a0;
    }
    uVar5 = FUN_140156740(puVar8);
    uVar15 = 0;
    if (0 < (int)uVar5) {
      uVar15 = uVar5;
    }
    uVar5 = uVar6;
    if ((local_128 != (uint *)0x0) && (local_128 != (uint *)PTR_DAT_1403200a0)) {
      uVar5 = local_128[-2];
    }
    if (((int)uVar15 < (int)uVar5) || (uVar15 = uVar6, local_128 == (uint *)0x0)) {
LAB_1401d8a61:
      if (((local_128 != (uint *)PTR_DAT_1403200a0) && (local_128 != (uint *)0x0)) &&
         (local_128 + -2 != (uint *)0x0)) {
        local_128[-2] = uVar15;
        *(undefined2 *)((longlong)local_128 + (longlong)(int)uVar15 * 2) = 0;
      }
    }
    else if (local_128 != (uint *)PTR_DAT_1403200a0) {
      uVar15 = local_128[-2];
      goto LAB_1401d8a61;
    }
    local_78 = 0;
    local_70 = 0;
    local_68 = 0;
    local_60 = 0;
    local_80 = Proud::ByteArray::vftable;
    pvVar10 = pvVar13;
    if (local_120 != (longlong *)0x0) {
      pvVar10 = (void *)*local_120;
    }
    uVar9 = FUN_140181f50(local_48,(ulonglong)local_res18 & 0xffffffff,
                          *(undefined4 *)((longlong)pvVar10 + 0x56c),&local_128,&local_80);
    (**(code **)(**(longlong **)(param_1 + 0x108) + 0x80))(*(longlong **)(param_1 + 0x108),uVar9);
    FUN_1401858d0(&local_80);
    puVar8 = local_128;
    if (((local_128 != (uint *)0x0) && (local_128 != (uint *)PTR_DAT_1403200a0)) &&
       (puVar11 = local_128 + -2, puVar11 != (uint *)0x0)) {
      uVar9 = FUN_1401568c0();
      local_58 = uVar9;
      FUN_140156b50(uVar9);
      local_50 = 1;
      puVar8 = puVar8 + -1;
      *puVar8 = *puVar8 - 1;
      if (*puVar8 == 0) {
        FUN_140156970(puVar11);
      }
      FUN_140156be0(uVar9);
      local_50 = 0;
    }
    local_128 = (uint *)PTR_DAT_1403200a0;
  }
  while (iVar12 = (int)pvVar13, iVar12 != (int)local_98) {
    if ((iVar12 < 0) || ((int)local_98 <= iVar12)) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    *(undefined1 *)(local_a0 + (longlong)iVar12 * 0x48 + 0x40) = 1;
    FUN_1401da970(param_1,param_2);
    if ((int)local_98 <= iVar12) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    pvVar13 = (void *)(ulonglong)(iVar12 + 1);
  }
  FUN_140190f40(&local_b0);
  if (local_f8 != 0) {
    plVar1 = (longlong *)(local_f8 + 8);
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      FUN_140161ae0(&local_f8,local_f8);
    }
  }
  local_40 = &local_110;
  FUN_1401560e0(&local_110);
  if (local_108 != (void *)0x0) {
    if ((longlong)local_100 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_100 = local_100 & 0xffffffff00000000;
  }
LAB_1401d8c09:
  if ((local_120 != (longlong *)0x0) && (local_120[1] = local_120[1] + -1, local_120[1] == 0)) {
    puVar3 = (undefined8 *)*local_120;
    if (puVar3 != (undefined8 *)0x0) {
      (**(code **)*puVar3)(puVar3,1);
    }
    FUN_140156970(local_120);
  }
  local_res18 = &local_d0;
  FUN_1401560e0(&local_d0);
  if ((local_c8 != (void *)0x0) && (local_bc < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



void FUN_1401d8c90(longlong param_1)

{
  undefined **ppuVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  longlong lVar7;
  int *piVar8;
  undefined8 uVar9;
  undefined **ppuVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  int iVar13;
  undefined **local_res8;
  undefined *local_res10;
  undefined1 local_res18 [8];
  undefined **local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_30;
  
  lVar7 = *(longlong *)(param_1 + 0x108);
  if ((*(char *)(lVar7 + 0x1790) != '\0') || (*(int *)(lVar7 + 0x6c8) != 0)) {
    FUN_1401bdd00(lVar7,0,&DAT_140277738);
  }
  lVar7 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
  uVar12 = 0;
  uVar11 = uVar12;
  if (*(ulonglong **)(lVar7 + 0x128) != (ulonglong *)0x0) {
    uVar11 = **(ulonglong **)(lVar7 + 0x128);
  }
  cVar2 = FUN_140187680(uVar11);
  iVar6 = 0;
  if (cVar2 != '\0') {
    uVar9 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    FUN_1401e2d20(uVar9);
    uVar9 = FUN_14018aee0(*(longlong *)(param_1 + 0x108) + 0x1620);
    *(undefined8 *)(param_1 + 200) = uVar9;
    lVar7 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    uVar11 = uVar12;
    if (*(ulonglong **)(lVar7 + 0x128) != (ulonglong *)0x0) {
      uVar11 = **(ulonglong **)(lVar7 + 0x128);
    }
    FUN_140184ca0(uVar11);
    lVar7 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    uVar11 = uVar12;
    if (*(ulonglong **)(lVar7 + 0x128) != (ulonglong *)0x0) {
      uVar11 = **(ulonglong **)(lVar7 + 0x128);
    }
    FUN_140184cb0(uVar11,0);
    lVar7 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    uVar11 = uVar12;
    if (*(ulonglong **)(lVar7 + 0x128) != (ulonglong *)0x0) {
      uVar11 = **(ulonglong **)(lVar7 + 0x128);
    }
    FUN_140184da0(uVar11,0);
    local_res8 = &local_res10;
    lVar7 = *(longlong *)(param_1 + 0x108);
    FUN_1401568c0();
    local_res10 = PTR_DAT_1403200a0;
    FUN_14004f4f0(&local_res10,lVar7 + 0x1588);
    lVar7 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    if (*(ulonglong **)(lVar7 + 0x128) != (ulonglong *)0x0) {
      uVar12 = **(ulonglong **)(lVar7 + 0x128);
    }
    iVar6 = FUN_140186000(uVar12,&local_res10,
                          *(undefined2 *)(*(longlong *)(param_1 + 0x108) + 0x1590));
    if ((iVar6 == 0) || (iVar6 == 0x2733)) {
      if (0 < *(int *)(param_1 + 0x100)) {
        return;
      }
      *(undefined4 *)(param_1 + 0x40) = 0;
      *(undefined4 *)(param_1 + 0x100) = 1;
      uVar9 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
      *(undefined8 *)(param_1 + 0x80) = uVar9;
      *(undefined1 *)(param_1 + 0xc0) = 0;
      return;
    }
    goto LAB_1401d8f5d;
  }
  FUN_1401568c0();
  local_res8 = (undefined **)PTR_DAT_1403200a0;
  iVar3 = FUN_140156740(L"Cannot bind TCP socket to a local address!");
  if ((local_res8 != (undefined **)0x0) &&
     (uVar12 = 0, local_res8 != (undefined **)PTR_DAT_1403200a0)) {
    uVar12 = (ulonglong)*(uint *)(local_res8 + -1);
  }
  iVar4 = 0;
  iVar5 = iVar3;
  if (((iVar3 <= (int)uVar12) && (iVar5 = iVar6, local_res8 != (undefined **)0x0)) &&
     (iVar5 = iVar4, local_res8 != (undefined **)PTR_DAT_1403200a0)) {
    iVar5 = *(int *)(local_res8 + -1);
  }
  iVar13 = 1;
  if (1 < iVar5) {
    iVar13 = iVar5;
  }
  iVar5 = iVar4;
  if ((local_res8 != (undefined **)0x0) && (local_res8 != (undefined **)PTR_DAT_1403200a0)) {
    iVar5 = *(int *)(local_res8 + -1);
  }
  if (iVar5 < iVar13) {
    if (local_res8 == (undefined **)0x0) {
      local_res8 = (undefined **)PTR_DAT_1403200a0;
    }
    if (iVar13 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (iVar13 == 0) {
      FUN_14004f990(&local_res8);
    }
    else {
      iVar5 = iVar6;
      if ((local_res8 != (undefined **)0x0) && (local_res8 != (undefined **)PTR_DAT_1403200a0)) {
        iVar5 = *(int *)(local_res8 + -1);
      }
      if (iVar13 != iVar5) {
        piVar8 = (int *)FUN_140156940((longlong)iVar13 * 2 + 10);
        if (piVar8 != (int *)0x0) {
          *piVar8 = 0;
          piVar8[1] = 1;
        }
        *piVar8 = iVar13;
        iVar5 = iVar6;
        if ((local_res8 != (undefined **)0x0) && (local_res8 != (undefined **)PTR_DAT_1403200a0)) {
          iVar5 = *(int *)(local_res8 + -1);
        }
        ppuVar10 = (undefined **)PTR_DAT_1403200a0;
        if (iVar13 < iVar5) {
LAB_1401d8e03:
          if (local_res8 != (undefined **)0x0) {
            ppuVar10 = local_res8;
          }
        }
        else {
          iVar13 = iVar6;
          if (local_res8 != (undefined **)0x0) {
            if (local_res8 != (undefined **)PTR_DAT_1403200a0) {
              iVar13 = *(int *)(local_res8 + -1);
            }
            goto LAB_1401d8e03;
          }
        }
        FUN_140156770(piVar8 + 2,ppuVar10,iVar13);
        FUN_14004f990(&local_res8);
        local_res8 = (undefined **)(piVar8 + 2);
      }
    }
  }
  FUN_14004f670(&local_res8);
  ppuVar10 = local_res8;
  if (local_res8 == (undefined **)0x0) {
    ppuVar10 = (undefined **)PTR_DAT_1403200a0;
  }
  FUN_140156770(ppuVar10,L"Cannot bind TCP socket to a local address!",iVar3);
  ppuVar10 = local_res8;
  if (local_res8 == (undefined **)0x0) {
    ppuVar10 = (undefined **)PTR_DAT_1403200a0;
  }
  iVar3 = FUN_140156740(ppuVar10);
  iVar6 = 0;
  if (0 < iVar3) {
    iVar6 = iVar3;
  }
  iVar3 = iVar4;
  if ((local_res8 != (undefined **)0x0) && (local_res8 != (undefined **)PTR_DAT_1403200a0)) {
    iVar3 = *(int *)(local_res8 + -1);
  }
  if ((iVar6 < iVar3) || (iVar6 = iVar4, local_res8 == (undefined **)0x0)) {
LAB_1401d8e99:
    if (((local_res8 != (undefined **)PTR_DAT_1403200a0) && (local_res8 != (undefined **)0x0)) &&
       (local_res8 + -1 != (undefined **)0x0)) {
      *(int *)(local_res8 + -1) = iVar6;
      *(undefined2 *)((longlong)local_res8 + (longlong)iVar6 * 2) = 0;
    }
  }
  else if (local_res8 != (undefined **)PTR_DAT_1403200a0) {
    iVar6 = *(int *)(local_res8 + -1);
    goto LAB_1401d8e99;
  }
  local_48 = 0;
  local_40 = 0;
  local_38 = 0;
  local_30 = 0;
  local_50 = Proud::ByteArray::vftable;
  uVar9 = FUN_140181f50(local_res18,3,0,&local_res8,&local_50);
  (**(code **)(**(longlong **)(param_1 + 0x108) + 0x80))(*(longlong **)(param_1 + 0x108),uVar9);
  FUN_1401858d0(&local_50);
  ppuVar10 = local_res8;
  if (((local_res8 != (undefined **)0x0) && (local_res8 != (undefined **)PTR_DAT_1403200a0)) &&
     (ppuVar1 = local_res8 + -1, ppuVar1 != (undefined **)0x0)) {
    uVar9 = FUN_1401568c0();
    FUN_140156b50(uVar9);
    piVar8 = (int *)((longlong)ppuVar10 + -4);
    *piVar8 = *piVar8 + -1;
    if (*piVar8 == 0) {
      FUN_140156970(ppuVar1);
    }
    FUN_140156be0(uVar9);
  }
  iVar6 = Ordinal_111();
LAB_1401d8f5d:
  FUN_1401d3c40(param_1,iVar6);
  return;
}



void FUN_1401d90e0(undefined8 *param_1)

{
  longlong *plVar1;
  void *pvVar2;
  undefined8 *puVar3;
  longlong lVar4;
  undefined8 uVar5;
  
  *param_1 = Proud::CNetClientManager::vftable;
  param_1[1] = Proud::CNetClientManager::vftable;
  if (param_1[0x56] != 0) {
    FUN_1401ddd20();
    FUN_1401dde40(param_1[0x56]);
  }
  plVar1 = (longlong *)param_1[0x52];
  if ((plVar1 != (longlong *)0x0) && (*plVar1 != 0)) {
    if (plVar1 == (longlong *)0x0) {
      lVar4 = 0;
    }
    else {
      lVar4 = *plVar1;
    }
    FUN_1401f0150(lVar4);
    uVar5 = 0;
    if ((undefined8 *)param_1[0x52] != (undefined8 *)0x0) {
      uVar5 = *(undefined8 *)param_1[0x52];
    }
    FUN_1401f0940(uVar5);
  }
  *(undefined1 *)(param_1 + 0x10) = 1;
  if ((undefined8 *)param_1[0xf] == (undefined8 *)0x0) {
    uVar5 = 0;
  }
  else {
    uVar5 = *(undefined8 *)param_1[0xf];
  }
  FUN_140182710(uVar5);
  pvVar2 = (void *)param_1[0x57];
  if (pvVar2 != (void *)0x0) {
    FUN_14018c200(pvVar2);
    operator_delete(pvVar2);
  }
  param_1[0x57] = 0;
  timeKillEvent(*(UINT *)(param_1 + 0x4c));
  pvVar2 = (void *)param_1[0x56];
  if (pvVar2 != (void *)0x0) {
    FUN_1401e0ac0(pvVar2);
    operator_delete(pvVar2);
  }
  param_1[0x56] = 0;
  FUN_1401bcf60(param_1 + 0x45);
  pvVar2 = (void *)param_1[0x57];
  if (pvVar2 != (void *)0x0) {
    FUN_14018c200(pvVar2);
    operator_delete(pvVar2);
  }
  param_1[0x57] = 0;
  pvVar2 = (void *)param_1[0x56];
  if (pvVar2 != (void *)0x0) {
    FUN_1401e0ac0(pvVar2);
    operator_delete(pvVar2);
  }
  FUN_1401d4060(param_1 + 0x53);
  if ((param_1[0x52] != 0) &&
     (*(longlong *)(param_1[0x52] + 8) = *(longlong *)(param_1[0x52] + 8) + -1,
     *(longlong *)(param_1[0x52] + 8) == 0)) {
    plVar1 = (longlong *)param_1[0x52];
    puVar3 = (undefined8 *)*plVar1;
    if (puVar3 != (undefined8 *)0x0) {
      (**(code **)*puVar3)(puVar3,1);
    }
    FUN_140156970(plVar1);
  }
  FUN_1401bcf60(param_1 + 0x45);
  puVar3 = (undefined8 *)param_1[0x45];
  if (puVar3 != (undefined8 *)0x0) {
    (**(code **)*puVar3)(puVar3,1);
  }
  FUN_1401a9270(param_1 + 0x41);
  FUN_140156c00(param_1 + 0x39);
  FUN_140156c00(param_1 + 0x11);
  if ((param_1[0xf] != 0) &&
     (*(longlong *)(param_1[0xf] + 8) = *(longlong *)(param_1[0xf] + 8) + -1,
     *(longlong *)(param_1[0xf] + 8) == 0)) {
    puVar3 = (undefined8 *)param_1[0xf];
    pvVar2 = (void *)*puVar3;
    if (pvVar2 != (void *)0x0) {
      FUN_140182790(pvVar2);
      operator_delete(pvVar2);
    }
    FUN_140156970(puVar3);
  }
  FUN_140156c00(param_1 + 2);
  param_1[1] = Proud::ISendSpeedMeasurerDg::vftable;
  *param_1 = Proud::ICompletionPortEventSink::vftable;
  return;
}



void FUN_1401d9350(longlong param_1)

{
  FUN_1401d9520(param_1 + -8);
  return;
}



void FUN_1401d9360(longlong param_1,longlong *param_2)

{
  undefined8 *puVar1;
  char cVar2;
  longlong *plVar3;
  longlong *plVar4;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  plVar4 = (longlong *)0x0;
  plVar3 = plVar4;
  if ((undefined8 *)*param_2 != (undefined8 *)0x0) {
    plVar3 = *(longlong **)*param_2;
  }
  cVar2 = (**(code **)(*plVar3 + 0x10))();
  if (cVar2 == '\0') {
    if ((undefined8 *)*param_2 != (undefined8 *)0x0) {
      plVar4 = *(longlong **)*param_2;
    }
    (**(code **)(*plVar4 + 8))(plVar4);
  }
  uVar5 = FUN_1401bd0a0(param_1 + 0x228,param_2,*(undefined8 *)(param_1 + 0x238),0,uVar5);
  if (*(undefined8 **)(param_1 + 0x238) == (undefined8 *)0x0) {
    *(undefined8 *)(param_1 + 0x230) = uVar5;
  }
  else {
    **(undefined8 **)(param_1 + 0x238) = uVar5;
  }
  *(undefined8 *)(param_1 + 0x238) = uVar5;
  if ((*param_2 != 0) &&
     (*(longlong *)(*param_2 + 8) = *(longlong *)(*param_2 + 8) + -1,
     *(longlong *)(*param_2 + 8) == 0)) {
    param_2 = (longlong *)*param_2;
    puVar1 = (undefined8 *)*param_2;
    if (puVar1 != (undefined8 *)0x0) {
      (**(code **)*puVar1)(puVar1,1);
    }
    FUN_140156970(param_2);
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x0001401d94ff)
// WARNING: Removing unreachable block (ram,0x0001401d950a)
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401d9440(longlong param_1)

{
  undefined8 *puVar1;
  longlong lVar2;
  undefined8 *puVar3;
  
  if (*(double *)(param_1 + 0xc0) - *(double *)(param_1 + 0x248) <= _DAT_140320df0) {
    return;
  }
  *(double *)(param_1 + 0x248) = *(double *)(param_1 + 0xc0);
  puVar3 = *(undefined8 **)(param_1 + 0x230);
  do {
    while( true ) {
      if (puVar3 == (undefined8 *)0x0) {
        return;
      }
      lVar2 = 0;
      if ((longlong *)puVar3[2] != (longlong *)0x0) {
        lVar2 = *(longlong *)puVar3[2];
      }
      if (*(char *)(lVar2 + 0x80) == '\0') break;
LAB_1401d94fa:
      puVar3 = (undefined8 *)*puVar3;
    }
    lVar2 = 0;
    if ((longlong *)puVar3[2] != (longlong *)0x0) {
      lVar2 = *(longlong *)puVar3[2];
    }
    if (*(char *)(lVar2 + 0x40) != '\0') goto LAB_1401d94fa;
    puVar1 = (undefined8 *)*puVar3;
    FUN_1401bd030(param_1 + 0x228,puVar3);
    puVar3 = puVar1;
  } while( true );
}



undefined8 FUN_1401d9520(undefined8 param_1,uint param_2)

{
  FUN_1401d90e0();
  if ((param_2 & 1) != 0) {
    FUN_140156970(param_1);
  }
  return param_1;
}



void FUN_1401d9550(longlong param_1,undefined8 param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  undefined8 *puVar4;
  undefined8 *puVar5;
  undefined8 *local_res8;
  undefined4 local_128 [2];
  undefined8 local_120 [2];
  undefined8 local_110;
  undefined8 local_108;
  undefined **local_100;
  undefined8 local_f8;
  undefined8 local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  longlong local_d0;
  ulonglong local_c8;
  undefined4 local_b8;
  undefined **local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined **local_80;
  undefined4 local_78;
  undefined2 local_74;
  undefined **local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 *local_38;
  undefined1 local_30;
  undefined8 local_28;
  
  local_28 = 0xfffffffffffffffe;
  plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x108) + 0x1570);
  puVar5 = (undefined8 *)0x0;
  puVar4 = puVar5;
  if (plVar1 != (longlong *)0x0) {
    puVar4 = (undefined8 *)*plVar1;
  }
  FUN_14013b390(param_2,puVar4 + 1);
  plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x108) + 0x1570);
  puVar4 = puVar5;
  if (plVar1 != (longlong *)0x0) {
    puVar4 = (undefined8 *)*plVar1;
  }
  FUN_1401dc980(puVar4,1);
  local_120[0] = 0;
  local_110 = 0;
  local_108 = 0;
  local_f8 = 0;
  local_f0 = 0;
  local_e8 = 0;
  local_e0 = 0;
  local_100 = Proud::ByteArray::vftable;
  local_c8 = 0;
  local_d0 = 0;
  local_d8 = 0;
  local_a8 = 0;
  local_a0 = 0;
  local_98 = 0;
  local_90 = 0;
  local_b0 = Proud::ByteArray::vftable;
  local_80 = Proud::AddrPort::vftable;
  local_78 = 0;
  local_74 = 0;
  local_60 = 0;
  local_58 = 0;
  local_50 = 0;
  local_48 = 0;
  local_68 = Proud::ByteArray::vftable;
  local_res8 = (undefined8 *)FUN_140156940(0x60);
  puVar4 = puVar5;
  if (local_res8 != (undefined8 *)0x0) {
    puVar4 = (undefined8 *)FUN_140181eb0(local_res8);
  }
  if (puVar4 == (undefined8 *)0x0) {
    local_res8 = (undefined8 *)0x0;
  }
  else {
    puVar5 = (undefined8 *)FUN_140156940(0x48);
    if (puVar5 != (undefined8 *)0x0) {
      local_res8 = puVar5;
      uVar3 = FUN_14015a430();
      FUN_140156a70(puVar5,uVar3,1);
    }
    local_res8 = puVar5;
    FUN_140156b50(puVar5);
    puVar5[8] = 1;
    puVar5[7] = puVar4;
    FUN_140156be0(puVar5);
  }
  FUN_14016dca0(local_120,&local_res8);
  if (puVar5 != (undefined8 *)0x0) {
    local_38 = puVar5;
    FUN_140156b50(puVar5);
    local_30 = 1;
    plVar1 = puVar5 + 8;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      FUN_140156be0(puVar5);
      local_30 = 0;
      FUN_14013c4c0(puVar5);
    }
    else {
      FUN_140156be0(puVar5);
    }
  }
  local_128[0] = 0xd;
  local_b8 = 1;
  FUN_1401c5d30(*(undefined8 *)(param_1 + 0x108),local_128);
  lVar2 = *(longlong *)(param_1 + 0x108);
  if ((*(char *)(lVar2 + 0x1790) != '\0') || (*(int *)(lVar2 + 0x6c8) != 0)) {
    FUN_1401bdd00(lVar2,1,&DAT_140277820,*(undefined4 *)(lVar2 + 0x1578));
  }
  FUN_1401858d0(&local_68);
  FUN_1401858d0(&local_b0);
  local_res8 = &local_d8;
  FUN_1401560e0(&local_d8);
  if (local_d0 != 0) {
    if ((longlong)local_c8 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_c8 = local_c8 & 0xffffffff00000000;
  }
  FUN_1401858d0(&local_100);
  FUN_140174710(&local_108);
  FUN_140174690(&local_110);
  FUN_14013c530(local_120);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401d97f0(longlong param_1,undefined8 param_2)

{
  int *piVar1;
  char cVar2;
  int iVar3;
  uint uVar4;
  uint uVar5;
  longlong lVar6;
  undefined8 uVar7;
  undefined8 uVar8;
  longlong *plVar9;
  uint *puVar10;
  longlong *plVar11;
  ulonglong uVar12;
  undefined *puVar13;
  uint *puVar14;
  uint uVar15;
  undefined *puVar16;
  undefined *puVar17;
  uint uVar18;
  undefined1 auStack_4a8 [32];
  undefined ***local_488;
  undefined1 local_478 [8];
  uint *local_470;
  longlong local_468;
  undefined *local_460;
  undefined8 local_458;
  undefined4 local_450 [2];
  undefined *local_448;
  undefined4 local_440 [2];
  undefined *local_438;
  undefined *local_430;
  undefined **local_428;
  undefined4 local_420;
  undefined2 local_41c;
  undefined *local_418;
  ulonglong local_410;
  undefined **local_408;
  undefined8 local_400;
  undefined8 local_3f8;
  undefined8 local_3f0;
  undefined8 local_3e8;
  undefined8 local_3e0;
  undefined1 local_3d8;
  undefined1 local_3d0 [8];
  undefined8 local_3c8;
  undefined1 local_3c0;
  undefined8 local_3b8;
  undefined1 local_3b0;
  undefined8 local_3a8;
  undefined1 local_3a0;
  undefined8 local_398;
  undefined1 local_390;
  undefined8 local_388;
  undefined1 local_380;
  longlong local_378;
  undefined1 local_370;
  undefined1 local_368 [8];
  undefined8 local_360;
  undefined1 local_358 [16];
  undefined4 local_348 [20];
  longlong local_2f8;
  undefined *local_2f0;
  undefined4 local_2e8;
  undefined4 local_2e4;
  undefined4 local_2d8;
  undefined4 local_298;
  undefined2 local_294;
  undefined4 local_258;
  undefined4 local_254;
  undefined4 local_250;
  undefined4 local_24c;
  WCHAR local_248 [264];
  ulonglong local_38;
  
  local_360 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_4a8;
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
  puVar17 = (undefined *)0x0;
  local_458 = 0;
  local_460 = (undefined *)0x0;
  local_468 = 0;
  local_468 = FUN_140156120();
  *(undefined8 *)(local_468 + 0x28) = 1;
  local_428 = Proud::AddrPort::vftable;
  local_420 = 0;
  local_41c = 0;
  cVar2 = FUN_140154e60(param_2,local_440);
  if (cVar2 != '\0') {
    local_258 = 0;
    local_254 = 0;
    local_250 = 0;
    local_24c = 0;
    cVar2 = FUN_1401543d0(param_2,&local_258,0x10);
    if ((((cVar2 != '\0') && (cVar2 = FUN_140154a70(param_2,&local_410), cVar2 != '\0')) &&
        (iVar3 = (int)local_410, -1 < iVar3)) && (iVar3 <= DAT_140320d70)) {
      if (local_460 == (undefined *)0x0) {
        if (iVar3 < 1) {
          if (local_468 == 0) goto LAB_1401d9e27;
          uVar12 = 0;
        }
        else {
          if (local_468 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0();
          }
          uVar12 = local_410 & 0xffffffff;
        }
        FUN_140050060(local_468,uVar12);
      }
      else {
        if (local_458._4_4_ < iVar3) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_458 = CONCAT44(local_458._4_4_,iVar3);
      }
      puVar13 = local_460;
      if (local_460 == (undefined *)0x0) {
        if (local_468 == 0) {
LAB_1401d9e27:
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        puVar13 = puVar17;
        if (*(int *)(local_468 + 0x18) != 0) {
          puVar13 = *(undefined **)(local_468 + 0x10);
        }
      }
      cVar2 = FUN_1401543d0(param_2,puVar13,local_410 & 0xffffffff);
      if ((cVar2 != '\0') && (cVar2 = FUN_140154e00(param_2,&local_428), cVar2 != '\0')) {
        *(undefined4 *)(*(longlong *)(param_1 + 0x108) + 0x1578) = local_440[0];
        plVar11 = *(longlong **)(*(longlong *)(param_1 + 0x108) + 0x15d8);
        if ((plVar11 != (longlong *)0x0) && (*plVar11 != 0)) {
          lVar6 = FUN_1401aff90();
          *(undefined4 *)(lVar6 + 0x108) = local_420;
          *(undefined2 *)(lVar6 + 0x10c) = local_41c;
        }
        uVar7 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))();
        local_3a8 = uVar7;
        FUN_140156b50(uVar7);
        local_3a0 = 1;
        FUN_140174a70(local_348);
        local_348[0] = 1;
        if (local_468 == local_2f8) {
          local_2e4 = local_458._4_4_;
          local_2f0 = local_460;
          local_2e8 = (undefined4)local_458;
        }
        else {
          FUN_1401560e0(&local_2f8);
          if (local_468 != 0) {
            *(longlong *)(local_468 + 0x28) = *(longlong *)(local_468 + 0x28) + 1;
            local_2f8 = local_468;
          }
        }
        local_2d8 = 1;
        uVar8 = FUN_14004f480(local_368,*(longlong *)(param_1 + 0x108) + 0x1588);
        lVar6 = FUN_140158c60(local_358,uVar8,
                              *(undefined2 *)(*(longlong *)(param_1 + 0x108) + 0x1590));
        local_298 = *(undefined4 *)(lVar6 + 8);
        local_294 = *(undefined2 *)(lVar6 + 0xc);
        FUN_1401c5d30(*(undefined8 *)(param_1 + 0x108),local_348);
        lVar6 = *(longlong *)(param_1 + 0x108);
        *(undefined4 *)(lVar6 + 0x6d0) = local_258;
        *(undefined4 *)(lVar6 + 0x6d4) = local_254;
        *(undefined4 *)(lVar6 + 0x6d8) = local_250;
        *(undefined4 *)(lVar6 + 0x6dc) = local_24c;
        if (*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x58) != 0) {
          lVar6 = *(longlong *)(*(longlong *)(param_1 + 0x108) + 0x58) + 0x98;
          local_378 = lVar6;
          FUN_140156b50(lVar6);
          local_370 = 1;
          local_478[0] = 0;
          plVar11 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x70);
          local_450[0] = (**(code **)(*plVar11 + 0x108))(plVar11,local_478);
          plVar11 = (longlong *)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x58) + 0x68);
          (**(code **)(*plVar11 + 0x60))(plVar11,1,&DAT_140328530,local_450);
          FUN_140156be0(lVar6);
        }
        FUN_140174b20(local_348);
        FUN_140156be0(uVar7);
        lVar6 = *(longlong *)(param_1 + 0x108);
        if ((*(char *)(lVar6 + 0x1790) != '\0') || (*(int *)(lVar6 + 0x6c8) != 0)) {
          FUN_1401bdd00(lVar6,1,&DAT_140277908,*(undefined4 *)(lVar6 + 0x1578));
        }
        if ((*(int *)(*(longlong *)(param_1 + 0x108) + 0x1578) == 0x32) &&
           (iVar3 = FUN_140187fb0(),
           iVar3 == (iVar3 / 3 + (iVar3 >> 0x1f) +
                    (int)(((longlong)iVar3 / 3 + ((longlong)iVar3 >> 0x3f) & 0xffffffffU) >> 0x1f))
                    * 3)) {
          FUN_1401568c0();
          puVar13 = PTR_DAT_1403200a0;
          local_438 = PTR_DAT_1403200a0;
          GetModuleFileNameW((HMODULE)0x0,local_248,0x104);
          plVar11 = *(longlong **)(*(longlong *)(param_1 + 0x108) + 0x15d8);
          if ((plVar11 != (longlong *)0x0) && (*plVar11 != 0)) {
            lVar6 = FUN_1401aff90();
            plVar11 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x70);
            plVar11 = (longlong *)(**(code **)(*plVar11 + 0xb0))(plVar11,&local_418);
            plVar9 = (longlong *)
                     (*(code *)**(undefined8 **)(lVar6 + 0x100))
                               ((undefined8 *)(lVar6 + 0x100),&local_430);
            puVar13 = (undefined *)*plVar11;
            if ((undefined *)*plVar11 == (undefined *)0x0) {
              puVar13 = PTR_DAT_1403200a0;
            }
            puVar16 = (undefined *)*plVar9;
            if ((undefined *)*plVar9 == (undefined *)0x0) {
              puVar16 = PTR_DAT_1403200a0;
            }
            local_488 = (undefined ***)local_248;
            FUN_14004ce50(&local_438,L"Usage: %s ## %s ## %s",puVar16,puVar13);
            if (((local_430 != (undefined *)0x0) && (local_430 != PTR_DAT_1403200a0)) &&
               (local_430 + -8 != (undefined *)0x0)) {
              uVar7 = FUN_1401568c0();
              local_388 = uVar7;
              FUN_140156b50(uVar7);
              local_380 = 1;
              piVar1 = (int *)(local_430 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(local_430 + -8);
              }
              FUN_140156be0(uVar7);
            }
            local_430 = PTR_DAT_1403200a0;
            if (((local_418 != (undefined *)0x0) && (local_418 != PTR_DAT_1403200a0)) &&
               (local_418 + -8 != (undefined *)0x0)) {
              uVar7 = FUN_1401568c0();
              local_3c8 = uVar7;
              FUN_140156b50(uVar7);
              local_3c0 = 1;
              piVar1 = (int *)(local_418 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(local_418 + -8);
              }
              FUN_140156be0(uVar7);
            }
            FUN_1401568c0();
            puVar13 = local_438;
            local_448 = PTR_DAT_1403200a0;
            if (PTR_DAT_1403200a0 == (undefined *)0x0) {
              local_448 = puVar17;
            }
            if (local_438 != PTR_DAT_1403200a0) {
              uVar7 = FUN_1401568c0();
              local_3b8 = uVar7;
              FUN_140156b50(uVar7);
              local_3b0 = 1;
              FUN_14004f990(&local_448);
              local_448 = puVar13;
              if (((puVar13 != PTR_DAT_1403200a0) && (puVar13 != (undefined *)0x0)) &&
                 (puVar13 != (undefined *)0x8)) {
                *(int *)(puVar13 + -4) = *(int *)(puVar13 + -4) + 1;
              }
              FUN_140156be0(uVar7);
            }
            FUN_1401a7000(&local_448);
          }
          if (((puVar13 != (undefined *)0x0) && (puVar13 != PTR_DAT_1403200a0)) &&
             (puVar13 + -8 != (undefined *)0x0)) {
            uVar7 = FUN_1401568c0();
            local_398 = uVar7;
            FUN_140156b50(uVar7);
            local_390 = 1;
            piVar1 = (int *)(puVar13 + -4);
            *piVar1 = *piVar1 + -1;
            if (*piVar1 == 0) {
              FUN_140156970(puVar13 + -8);
            }
            FUN_140156be0(uVar7);
          }
        }
        FUN_1401560e0(&local_468);
        if (local_460 == (undefined *)0x0) {
          return;
        }
        if (-1 < local_458) {
          return;
        }
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
    }
  }
  FUN_1401568c0();
  local_470 = (uint *)PTR_DAT_1403200a0;
  uVar4 = FUN_140156740(L"Bad format in NotifyServerConnectSuccess");
  if ((local_470 != (uint *)0x0) &&
     (puVar17 = (undefined *)0x0, local_470 != (uint *)PTR_DAT_1403200a0)) {
    puVar17 = (undefined *)(ulonglong)local_470[-2];
  }
  uVar18 = 0;
  uVar5 = uVar4;
  if ((((int)uVar4 <= (int)puVar17) && (uVar5 = uVar18, local_470 != (uint *)0x0)) &&
     (local_470 != (uint *)PTR_DAT_1403200a0)) {
    uVar5 = local_470[-2];
  }
  uVar15 = 1;
  if (1 < (int)uVar5) {
    uVar15 = uVar5;
  }
  uVar5 = uVar18;
  if ((local_470 != (uint *)0x0) && (local_470 != (uint *)PTR_DAT_1403200a0)) {
    uVar5 = local_470[-2];
  }
  if ((int)uVar5 < (int)uVar15) {
    if (local_470 == (uint *)0x0) {
      local_470 = (uint *)PTR_DAT_1403200a0;
    }
    if ((int)uVar15 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar15 == 0) {
      FUN_14004f990(&local_470);
    }
    else {
      uVar5 = uVar18;
      if ((local_470 != (uint *)0x0) && (local_470 != (uint *)PTR_DAT_1403200a0)) {
        uVar5 = local_470[-2];
      }
      if (uVar15 != uVar5) {
        puVar10 = (uint *)FUN_140156940((longlong)(int)uVar15 * 2 + 10);
        if (puVar10 != (uint *)0x0) {
          *puVar10 = 0;
          puVar10[1] = 1;
        }
        *puVar10 = uVar15;
        uVar5 = uVar18;
        if ((local_470 != (uint *)0x0) && (local_470 != (uint *)PTR_DAT_1403200a0)) {
          uVar5 = local_470[-2];
        }
        puVar14 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar15 < (int)uVar5) {
LAB_1401d9f2c:
          if (local_470 != (uint *)0x0) {
            puVar14 = local_470;
          }
        }
        else {
          uVar15 = uVar18;
          if (local_470 != (uint *)0x0) {
            if (local_470 != (uint *)PTR_DAT_1403200a0) {
              uVar15 = local_470[-2];
            }
            goto LAB_1401d9f2c;
          }
        }
        FUN_140156770(puVar10 + 2,puVar14,uVar15);
        FUN_14004f990(&local_470);
        local_470 = puVar10 + 2;
      }
    }
  }
  FUN_14004f670(&local_470);
  puVar10 = local_470;
  if (local_470 == (uint *)0x0) {
    puVar10 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar10,L"Bad format in NotifyServerConnectSuccess",uVar4);
  puVar10 = local_470;
  if (local_470 == (uint *)0x0) {
    puVar10 = (uint *)PTR_DAT_1403200a0;
  }
  uVar5 = FUN_140156740(puVar10);
  uVar4 = 0;
  if (0 < (int)uVar5) {
    uVar4 = uVar5;
  }
  uVar5 = uVar18;
  if ((local_470 != (uint *)0x0) && (local_470 != (uint *)PTR_DAT_1403200a0)) {
    uVar5 = local_470[-2];
  }
  if (((int)uVar5 <= (int)uVar4) && (uVar4 = uVar18, local_470 != (uint *)0x0)) {
    if (local_470 == (uint *)PTR_DAT_1403200a0) goto LAB_1401d9fe6;
    uVar4 = local_470[-2];
  }
  if (((local_470 != (uint *)PTR_DAT_1403200a0) && (local_470 != (uint *)0x0)) &&
     (local_470 + -2 != (uint *)0x0)) {
    local_470[-2] = uVar4;
    *(undefined2 *)((longlong)local_470 + (longlong)(int)uVar4 * 2) = 0;
  }
LAB_1401d9fe6:
  local_400 = 0;
  local_3f8 = 0;
  local_3f0 = 0;
  local_3e8 = 0;
  local_408 = Proud::ByteArray::vftable;
  local_488 = &local_408;
  uVar7 = FUN_140181f50(local_3d0,8,1,&local_470);
  FUN_1401c8d90(*(undefined8 *)(param_1 + 0x108),0x1f,uVar7);
  FUN_1401858d0(&local_408);
  puVar10 = local_470;
  if (((local_470 != (uint *)0x0) && (local_470 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar14 = local_470 + -2, puVar14 != (uint *)0x0)) {
    uVar7 = FUN_1401568c0();
    local_3e0 = uVar7;
    FUN_140156b50(uVar7);
    local_3d8 = 1;
    puVar10 = puVar10 + -1;
    *puVar10 = *puVar10 - 1;
    if (*puVar10 == 0) {
      FUN_140156970(puVar14);
    }
    FUN_140156be0(uVar7);
    local_3d8 = 0;
  }
  local_470 = (uint *)PTR_DAT_1403200a0;
  if (*(int *)(param_1 + 0x100) < 4) {
    *(undefined4 *)(param_1 + 0x40) = 0;
    *(undefined4 *)(param_1 + 0x100) = 4;
    uVar7 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
    *(undefined8 *)(param_1 + 0x80) = uVar7;
    *(undefined1 *)(param_1 + 0xc0) = 0;
  }
  FUN_1401560e0(&local_468);
  if ((local_460 != (undefined *)0x0) && (local_458 < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401da120(longlong param_1,undefined8 param_2)

{
  longlong lVar1;
  char cVar2;
  undefined8 uVar3;
  double dVar4;
  double dVar5;
  double local_res18;
  double local_res20;
  undefined4 local_118 [2];
  undefined8 local_110;
  undefined8 local_100;
  undefined8 local_f8;
  undefined **local_f0;
  undefined8 local_e8;
  undefined8 local_e0;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined8 local_b8;
  undefined4 local_a8;
  undefined **local_a0;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  undefined8 local_80;
  undefined **local_70;
  undefined4 local_68;
  undefined2 local_64;
  undefined **local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined8 local_38;
  undefined8 local_28;
  undefined1 local_20;
  undefined8 local_18;
  
  local_18 = 0xfffffffffffffffe;
  cVar2 = FUN_1401543d0(param_2,&local_res18,8);
  if ((cVar2 != '\0') && (cVar2 = FUN_1401543d0(param_2,&local_res20,8), cVar2 != '\0')) {
    uVar3 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))();
    local_28 = uVar3;
    FUN_140156b50(uVar3);
    local_20 = 1;
    dVar4 = (double)FUN_14018aee0(*(longlong *)(param_1 + 0x108) + 0x1620);
    dVar5 = (dVar4 - local_res18) * 0.5;
    *(double *)(*(longlong *)(param_1 + 0x108) + 0x500) = dVar5;
    lVar1 = *(longlong *)(param_1 + 0x108);
    if (*(double *)(lVar1 + 0x4f8) != 0.0) {
      dVar5 = (dVar5 - *(double *)(lVar1 + 0x4f8)) * _DAT_140320d38 + *(double *)(lVar1 + 0x4f8);
    }
    *(double *)(lVar1 + 0x4f8) = dVar5;
    *(double *)(*(longlong *)(param_1 + 0x108) + 0x4f0) =
         dVar4 - (local_res20 + *(double *)(*(longlong *)(param_1 + 0x108) + 0x4f8));
    local_110 = 0;
    local_100 = 0;
    local_f8 = 0;
    local_e8 = 0;
    local_e0 = 0;
    local_d8 = 0;
    local_d0 = 0;
    local_f0 = Proud::ByteArray::vftable;
    local_b8 = 0;
    local_c0 = 0;
    local_c8 = 0;
    local_98 = 0;
    local_90 = 0;
    local_88 = 0;
    local_80 = 0;
    local_a0 = Proud::ByteArray::vftable;
    local_70 = Proud::AddrPort::vftable;
    local_68 = 0;
    local_64 = 0;
    local_50 = 0;
    local_48 = 0;
    local_40 = 0;
    local_38 = 0;
    local_58 = Proud::ByteArray::vftable;
    local_118[0] = 0xe;
    local_a8 = 1;
    FUN_1401c5d30(*(undefined8 *)(param_1 + 0x108),local_118);
    FUN_140174b20(local_118);
    FUN_140156be0(uVar3);
  }
  return;
}



void FUN_1401da2f0(longlong param_1,int *param_2,byte *param_3)

{
  longlong lVar1;
  undefined8 *puVar2;
  byte bVar3;
  int iVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong lVar8;
  int iVar9;
  longlong *local_res8;
  undefined1 local_1b8 [8];
  longlong local_1b0;
  longlong local_1a8;
  int local_19c;
  int local_190;
  undefined **local_188;
  int local_180;
  undefined2 local_17c;
  char local_178;
  undefined8 local_168;
  undefined1 local_160;
  undefined8 local_158;
  undefined4 local_150 [2];
  undefined1 local_148 [8];
  longlong local_140;
  longlong local_138;
  undefined4 local_130;
  int local_12c;
  int local_120;
  undefined **local_118;
  int local_110;
  undefined2 local_10c;
  char local_108;
  undefined1 local_100 [232];
  
  local_158 = 0xfffffffffffffffe;
  iVar9 = (int)((*param_2 >> 0x1f & 7U) + *param_2) >> 3;
  uVar5 = FUN_1401bcbb0(*(undefined8 *)(param_1 + 0x108),param_2[10]);
  plVar6 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x1838);
  bVar3 = (**(code **)(*plVar6 + 0x10))(plVar6,param_2,uVar5);
  *param_3 = *param_3 | bVar3;
  if (*param_3 == 0) {
    FUN_1401540a0(param_2,iVar9);
    plVar6 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x17f0);
    bVar3 = (**(code **)(*plVar6 + 0x10))(plVar6,param_2,uVar5);
    *param_3 = *param_3 | bVar3;
    if (*param_3 == 0) {
      FUN_1401540a0(param_2,iVar9);
      FUN_1401544a0(local_1b8);
      local_188 = Proud::AddrPort::vftable;
      local_178 = 0;
      lVar8 = 0;
      local_190 = 0;
      local_180 = DAT_140320450;
      local_17c = DAT_140320454;
      FUN_140153d90(local_1b8);
      if (*(longlong *)(param_2 + 2) == 0) {
        if (*(longlong *)(param_2 + 4) == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        iVar9 = param_2[6];
      }
      else {
        iVar9 = *(int *)(*(longlong *)(param_2 + 2) + 0x18);
      }
      iVar4 = (int)(*param_2 + (*param_2 >> 0x1f & 7U)) >> 3;
      lVar7 = *(longlong *)(param_2 + 4);
      if (*(longlong *)(param_2 + 4) == 0) {
        lVar1 = *(longlong *)(param_2 + 2);
        if (lVar1 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        lVar7 = lVar8;
        if (*(int *)(lVar1 + 0x18) != 0) {
          lVar7 = *(longlong *)(lVar1 + 0x10);
        }
      }
      FUN_140154a40(local_1b8,iVar4 + lVar7,iVar9 - iVar4);
      local_180 = param_2[0xe];
      local_17c = (undefined2)param_2[0xf];
      local_190 = param_2[10];
      local_178 = (char)param_2[0x10];
      if ((local_1b0 == 0) && (local_1a8 == 0)) {
        local_1b0 = FUN_140156120();
        *(undefined8 *)(local_1b0 + 0x28) = 1;
      }
      (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
      FUN_1401544d0(local_148,local_1b8);
      local_120 = local_190;
      local_118 = Proud::AddrPort::vftable;
      local_110 = local_180;
      local_10c = local_17c;
      local_108 = local_178;
      FUN_140174a70(local_100);
      local_150[0] = 1;
      lVar7 = *(longlong *)(param_1 + 0x108);
      uVar5 = FUN_1401c4b10(lVar7 + 0x15e0,local_150,*(undefined8 *)(lVar7 + 0x15f0),0);
      if (*(undefined8 **)(lVar7 + 0x15f0) == (undefined8 *)0x0) {
        *(undefined8 *)(lVar7 + 0x15e8) = uVar5;
      }
      else {
        **(undefined8 **)(lVar7 + 0x15f0) = uVar5;
      }
      *(undefined8 *)(lVar7 + 0x15f0) = uVar5;
      FUN_140174b20(local_100);
      local_res8 = &local_140;
      FUN_1401560e0(&local_140);
      if (local_138 != 0) {
        if (local_12c < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_130 = 0;
      }
      if ((local_190 != 1) && (local_190 != 0)) {
        uVar5 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))();
        local_168 = uVar5;
        FUN_140156b50(uVar5);
        local_160 = 1;
        plVar6 = (longlong *)FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x108),&local_res8,local_190);
        if ((longlong *)*plVar6 != (longlong *)0x0) {
          lVar8 = *(longlong *)*plVar6;
        }
        if ((local_res8 != (longlong *)0x0) &&
           (local_res8[1] = local_res8[1] + -1, plVar6 = local_res8, uVar5 = local_168,
           local_res8[1] == 0)) {
          puVar2 = (undefined8 *)*local_res8;
          if (puVar2 != (undefined8 *)0x0) {
            (**(code **)*puVar2)(puVar2,1);
          }
          FUN_140156970(plVar6);
          uVar5 = local_168;
        }
        if (((lVar8 != 0) && (*(char *)(lVar8 + 0x684) == '\0')) &&
           (*(undefined1 *)(lVar8 + 0x21) = 1, local_178 == '\0')) {
          *(int *)(lVar8 + 0x48) = *(int *)(lVar8 + 0x48) + 1;
        }
        FUN_140156be0(uVar5);
      }
      local_res8 = &local_1b0;
      FUN_1401560e0(&local_1b0);
      if ((local_1a8 != 0) && (local_19c < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
    }
  }
  return;
}



void FUN_1401da670(longlong param_1,int *param_2)

{
  int iVar1;
  longlong lVar2;
  undefined8 *puVar3;
  int iVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  longlong lVar8;
  longlong *local_res10;
  undefined1 local_208 [8];
  longlong local_200;
  longlong local_1f8;
  int local_1ec;
  int local_1e0;
  undefined **local_1d8;
  int local_1d0;
  undefined2 local_1cc;
  char local_1c8;
  undefined8 local_1b8;
  undefined1 local_1b0;
  undefined8 local_1a8;
  undefined4 local_1a0 [2];
  undefined1 local_198 [8];
  longlong local_190;
  longlong local_188;
  undefined4 local_180;
  int local_17c;
  int local_170;
  undefined **local_168;
  int local_160;
  undefined2 local_15c;
  char local_158;
  undefined1 local_150 [232];
  undefined1 local_68 [80];
  
  local_1a8 = 0xfffffffffffffffe;
  FUN_1401544a0(local_208);
  local_1d8 = Proud::AddrPort::vftable;
  local_1c8 = 0;
  lVar8 = 0;
  local_1e0 = 0;
  local_1d0 = DAT_140320450;
  local_1cc = DAT_140320454;
  FUN_140153d90(local_208);
  if (*(longlong *)(param_2 + 2) == 0) {
    if (*(longlong *)(param_2 + 4) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar1 = param_2[6];
  }
  else {
    iVar1 = *(int *)(*(longlong *)(param_2 + 2) + 0x18);
  }
  iVar4 = (int)(*param_2 + (*param_2 >> 0x1f & 7U)) >> 3;
  lVar7 = *(longlong *)(param_2 + 4);
  if (*(longlong *)(param_2 + 4) == 0) {
    lVar2 = *(longlong *)(param_2 + 2);
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    lVar7 = lVar8;
    if (*(int *)(lVar2 + 0x18) != 0) {
      lVar7 = *(longlong *)(lVar2 + 0x10);
    }
  }
  FUN_140154a40(local_208,iVar4 + lVar7,iVar1 - iVar4);
  local_1d0 = param_2[0xe];
  local_1cc = (undefined2)param_2[0xf];
  local_1e0 = param_2[10];
  local_1c8 = (char)param_2[0x10];
  if (local_200 == 0) {
    FUN_140156300(local_68,PTR_u_exception_due_to_not_using_Inter_140320010);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_68,(ThrowInfo *)&DAT_14031d928);
  }
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
  FUN_1401544d0(local_198,local_208);
  local_170 = local_1e0;
  local_168 = Proud::AddrPort::vftable;
  local_160 = local_1d0;
  local_15c = local_1cc;
  local_158 = local_1c8;
  FUN_140174a70(local_150);
  local_1a0[0] = 2;
  lVar7 = *(longlong *)(param_1 + 0x108);
  uVar5 = FUN_1401c4b10(lVar7 + 0x15e0,local_1a0,*(undefined8 *)(lVar7 + 0x15f0),0);
  if (*(undefined8 **)(lVar7 + 0x15f0) == (undefined8 *)0x0) {
    *(undefined8 *)(lVar7 + 0x15e8) = uVar5;
  }
  else {
    **(undefined8 **)(lVar7 + 0x15f0) = uVar5;
  }
  *(undefined8 *)(lVar7 + 0x15f0) = uVar5;
  FUN_140174b20(local_150);
  local_res10 = &local_190;
  FUN_1401560e0(&local_190);
  if (local_188 != 0) {
    if (local_17c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_180 = 0;
  }
  if ((local_1e0 != 1) && (local_1e0 != 0)) {
    uVar5 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))();
    local_1b8 = uVar5;
    FUN_140156b50(uVar5);
    local_1b0 = 1;
    plVar6 = (longlong *)FUN_1401bb6b0(*(undefined8 *)(param_1 + 0x108),&local_res10,local_1e0);
    if ((longlong *)*plVar6 != (longlong *)0x0) {
      lVar8 = *(longlong *)*plVar6;
    }
    if ((local_res10 != (longlong *)0x0) &&
       (local_res10[1] = local_res10[1] + -1, plVar6 = local_res10, uVar5 = local_1b8,
       local_res10[1] == 0)) {
      puVar3 = (undefined8 *)*local_res10;
      if (puVar3 != (undefined8 *)0x0) {
        (**(code **)*puVar3)(puVar3,1);
      }
      FUN_140156970(plVar6);
      uVar5 = local_1b8;
    }
    if (((lVar8 != 0) && (*(char *)(lVar8 + 0x684) == '\0')) &&
       (*(undefined1 *)(lVar8 + 0x21) = 1, local_1c8 == '\0')) {
      *(int *)(lVar8 + 0x48) = *(int *)(lVar8 + 0x48) + 1;
    }
    FUN_140156be0(uVar5);
  }
  local_res10 = &local_200;
  FUN_1401560e0(&local_200);
  if ((local_1f8 != 0) && (local_1ec < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



undefined8 FUN_1401da970(longlong param_1,undefined8 param_2,int *param_3)

{
  undefined8 *puVar1;
  int *piVar2;
  undefined8 *puVar3;
  char cVar4;
  char cVar5;
  int iVar6;
  undefined8 uVar7;
  longlong lVar8;
  undefined8 *local_res8;
  undefined8 local_res10;
  uint local_res18 [2];
  undefined8 local_res20;
  undefined **local_78;
  undefined8 local_70;
  longlong local_68;
  undefined8 local_60;
  undefined8 local_58;
  int local_50;
  undefined **local_48;
  int local_40;
  undefined2 local_3c;
  undefined1 local_38;
  
  local_res10 = param_2;
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
  iVar6 = (int)(*param_3 + (*param_3 >> 0x1f & 7U)) >> 3;
  local_res20 = CONCAT44(local_res20._4_4_,iVar6);
  cVar4 = FUN_140154c00(param_3,local_res18);
  if (cVar4 == '\0') goto LAB_1401daf60;
  cVar4 = '\0';
  local_res8 = (undefined8 *)((ulonglong)local_res8 & 0xffffffffffffff00);
  switch(local_res18[0]) {
  case 1:
    FUN_1401da2f0(param_1,param_3,&local_res8);
    cVar4 = (char)local_res8;
    goto switchD_1401da9f3_caseD_5;
  case 2:
    FUN_1401da670(param_1,param_3,&local_res8);
    goto switchD_1401da9f3_caseD_5;
  case 3:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d3a30(param_1,param_3);
    }
    break;
  case 4:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d6ed0(param_1,param_3);
    }
    break;
  default:
    goto switchD_1401da9f3_caseD_5;
  case 6:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d78a0(param_1,param_3);
    }
    break;
  case 8:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d3aa0(param_1,param_3);
    }
    break;
  case 9:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d3b10(param_1,param_3);
    }
    break;
  case 10:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d97f0(param_1,param_3);
    }
    break;
  case 0xb:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d39b0(param_1,param_3);
    }
    break;
  case 0xd:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d5460(param_1,param_3);
    }
    break;
  case 0xf:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d9550(param_1,param_3);
    }
    break;
  case 0x11:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d4720(param_1,param_3);
    }
    break;
  case 0x13:
    FUN_1401d7c20(param_1,local_res10,param_3);
    break;
  case 0x17:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d8030(param_1,param_3);
    }
    break;
  case 0x18:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d4890(param_1,local_res10,param_3);
    }
    break;
  case 0x19:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d8600(param_1,local_res10,param_3);
    }
    break;
  case 0x1c:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401da120(param_1,param_3);
    }
    break;
  case 0x1d:
    break;
  case 0x1e:
    FUN_1401d37f0(param_1,param_3);
    break;
  case 0x1f:
    FUN_1401d3830(param_1,param_3);
    break;
  case 0x20:
    FUN_1401d6120(param_1,param_3);
    break;
  case 0x21:
    FUN_1401d4d30(param_1,param_3);
    break;
  case 0x22:
    if ((param_3[10] == 1) || (param_3[10] == 0)) {
      FUN_1401d6940(param_1,local_res10,param_3);
    }
    break;
  case 0x23:
    FUN_1401d5790(param_1,local_res10,param_3);
    break;
  case 0x24:
  case 0x25:
    FUN_1401544a0(&local_78);
    local_48 = Proud::AddrPort::vftable;
    local_38 = 0;
    local_50 = 0;
    local_40 = DAT_140320450;
    local_3c = DAT_140320454;
    cVar5 = FUN_140189e50(*(undefined8 *)(param_1 + 0x108),local_res18[0],param_3,&local_78);
    if (cVar5 != '\0') {
      local_38 = (undefined1)param_3[0x10];
      local_40 = param_3[0xe];
      local_3c = (undefined2)param_3[0xf];
      local_50 = param_3[10];
      cVar4 = FUN_1401da970(param_1,local_res10,&local_78);
    }
    local_res8 = &local_70;
    FUN_1401560e0(&local_70);
    if ((local_68 != 0) && (local_60._4_4_ < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    goto switchD_1401da9f3_caseD_5;
  case 0x26:
    FUN_1401544a0(&local_78);
    local_48 = Proud::AddrPort::vftable;
    local_38 = 0;
    local_50 = 0;
    local_40 = DAT_140320450;
    local_3c = DAT_140320454;
    cVar5 = FUN_140188280(*(undefined8 *)(param_1 + 0x108),param_3,&local_78);
    if (cVar5 != '\0') {
      local_38 = (undefined1)param_3[0x10];
      local_40 = param_3[0xe];
      local_3c = (undefined2)param_3[0xf];
      local_50 = param_3[10];
      cVar4 = FUN_1401da970(param_1,local_res10,&local_78);
    }
    local_res8 = &local_70;
    FUN_1401560e0(&local_70);
    if ((local_68 != 0) && (local_60._4_4_ < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    goto switchD_1401da9f3_caseD_5;
  case 0x27:
    FUN_1401d63d0(param_1,local_res10,param_3);
    break;
  case 0x28:
    FUN_1401d4ea0(param_1,param_3);
  }
  cVar4 = '\x01';
switchD_1401da9f3_caseD_5:
  if (*(longlong *)(param_3 + 2) == 0) {
    if (*(longlong *)(param_3 + 4) == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar6 = param_3[6];
  }
  else {
    iVar6 = *(int *)(*(longlong *)(param_3 + 2) + 0x18);
  }
  if (cVar4 == '\x01') {
    if (((iVar6 != (int)(*param_3 + (*param_3 >> 0x1f & 7U)) >> 3) && (local_res18[0] != 0x24)) &&
       (local_res18[0] != 0x25)) {
      FUN_1401568c0();
      local_res8 = (undefined8 *)PTR_DAT_1403200a0;
      FUN_14004ce50(&local_res8,&DAT_1402779d8,
                    L"Proud::CNetClientWorker::ProcessMessage_ProudNetLayer",local_res18[0]);
      iVar6 = FUN_140154030(param_3);
      local_res20 = FUN_140154060(param_3);
      local_78 = Proud::CFastArray<>::vftable;
      local_70 = 0;
      local_68 = 0;
      local_60 = 0;
      local_58 = 0;
      if (iVar6 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      FUN_140050060(&local_78,iVar6);
      lVar8 = local_68;
      if ((int)local_60 == 0) {
        lVar8 = 0;
      }
      FUN_140050120(lVar8,local_res20,(longlong)iVar6);
      local_78 = Proud::ByteArray::vftable;
      uVar7 = FUN_140181f50(&local_res20,0x1f,param_3[10],&local_res8,&local_78);
      (**(code **)(**(longlong **)(param_1 + 0x108) + 0x80))(*(longlong **)(param_1 + 0x108),uVar7);
      FUN_1401858d0(&local_78);
      puVar3 = local_res8;
      if (((local_res8 != (undefined8 *)0x0) && (local_res8 != (undefined8 *)PTR_DAT_1403200a0)) &&
         (puVar1 = local_res8 + -1, puVar1 != (undefined8 *)0x0)) {
        uVar7 = FUN_1401568c0();
        FUN_140156b50(uVar7);
        piVar2 = (int *)((longlong)puVar3 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(puVar1);
        }
        FUN_140156be0(uVar7);
      }
    }
  }
  else if (cVar4 == '\0') {
    iVar6 = (int)local_res20;
LAB_1401daf60:
    FUN_1401540a0(param_3,iVar6);
    return 0;
  }
  return 1;
}



void FUN_1401db020(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  longlong lVar2;
  longlong *plVar3;
  longlong *plVar4;
  undefined8 uVar5;
  undefined1 local_78 [8];
  undefined1 local_70 [8];
  longlong local_68;
  int local_5c;
  undefined4 local_50;
  undefined **local_48;
  undefined4 local_40;
  undefined2 local_3c;
  undefined1 local_38;
  
  uVar5 = 0xfffffffffffffffe;
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
  lVar1 = *(longlong *)(param_1 + 0x108);
  lVar2 = *(longlong *)(lVar1 + 0x6f8);
  while( true ) {
    if (lVar2 == 0) {
      return;
    }
    lVar2 = *(longlong *)(lVar1 + 0x6e8);
    if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    FUN_1401544d0(local_78,lVar2 + 0x10);
    local_50 = *(undefined4 *)(lVar2 + 0x38);
    local_48 = Proud::AddrPort::vftable;
    local_40 = *(undefined4 *)(lVar2 + 0x48);
    local_3c = *(undefined2 *)(lVar2 + 0x4c);
    local_38 = *(undefined1 *)(lVar2 + 0x50);
    FUN_1401da970(param_1,param_2,local_78,param_4,uVar5);
    plVar3 = *(longlong **)(lVar1 + 0x6e8);
    if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    lVar2 = *plVar3;
    *(longlong *)(lVar1 + 0x6e8) = lVar2;
    if (lVar2 == 0) {
      *(undefined8 *)(lVar1 + 0x6f0) = 0;
    }
    else {
      *(undefined8 *)(lVar2 + 8) = 0;
    }
    FUN_1401560e0(plVar3 + 3);
    if (plVar3[4] != 0) {
      if (*(int *)((longlong)plVar3 + 0x2c) < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      *(undefined4 *)(plVar3 + 5) = 0;
    }
    plVar4 = *(longlong **)(lVar1 + 0x6e0);
    if (plVar4 == (longlong *)0x0) {
      FUN_140156970(plVar3);
    }
    else {
      (**(code **)(*plVar4 + 0x10))(plVar4,plVar3);
    }
    *(longlong *)(lVar1 + 0x6f8) = *(longlong *)(lVar1 + 0x6f8) + -1;
    FUN_1401560e0(local_70);
    if ((local_68 != 0) && (local_5c < 0)) break;
    lVar2 = *(longlong *)(lVar1 + 0x6f8);
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



void FUN_1401db1d0(longlong param_1,longlong param_2,longlong param_3)

{
  undefined *puVar1;
  int *piVar2;
  longlong *plVar3;
  undefined8 uVar4;
  undefined4 uVar5;
  int iVar6;
  undefined8 uVar7;
  longlong lVar8;
  undefined8 *puVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  undefined *puVar12;
  undefined8 uVar13;
  undefined1 local_res8 [8];
  undefined *local_res10;
  undefined8 in_stack_fffffffffffffef8;
  undefined4 uVar14;
  longlong local_e8;
  undefined **local_e0;
  undefined4 local_d8;
  undefined2 local_d4;
  undefined **local_d0;
  undefined8 local_c8;
  longlong local_c0;
  undefined8 local_b8;
  undefined4 local_b0;
  undefined4 local_ac;
  undefined **local_a8;
  undefined4 local_a0;
  undefined2 local_9c;
  undefined **local_98;
  undefined4 local_90;
  undefined2 local_8c;
  undefined **local_88;
  undefined4 local_80;
  undefined2 local_7c;
  undefined **local_78;
  undefined4 local_70;
  undefined2 local_6c;
  undefined8 local_68;
  undefined1 local_60;
  undefined8 local_58;
  
  uVar14 = (undefined4)((ulonglong)in_stack_fffffffffffffef8 >> 0x20);
  local_58 = 0xfffffffffffffffe;
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
  *(undefined1 *)(param_2 + 0xc0) = 0;
  if ((*(double *)(param_2 + 0x148) == 0.0) && (0 < *(int *)(param_3 + 8))) {
    uVar13 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
    plVar3 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x678);
    *plVar3 = *plVar3 + 1;
    plVar3 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x680);
    *plVar3 = *plVar3 + (longlong)*(int *)(param_3 + 8);
    local_e0 = Proud::AddrPort::vftable;
    uVar11 = 0;
    local_d8 = 0;
    local_d4 = 0;
    local_e8 = 0;
    FUN_1401568c0();
    local_res10 = PTR_DAT_1403200a0;
    local_78 = Proud::AddrPort::vftable;
    local_80 = *(undefined4 *)(param_3 + 0x30);
    local_7c = *(undefined2 *)(param_3 + 0x34);
    local_88 = Proud::AddrPort::vftable;
    uVar10 = uVar11;
    if (*(ulonglong **)(param_2 + 0x100) != (ulonglong *)0x0) {
      uVar10 = **(ulonglong **)(param_2 + 0x100);
    }
    uVar4 = *(undefined8 *)(param_2 + 0x188);
    local_70 = local_80;
    local_6c = local_7c;
    uVar5 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0xe0))
                      (*(longlong **)(param_1 + 0x108),&local_78);
    uVar7 = FUN_140185840(uVar10);
    iVar6 = FUN_1401a18b0(uVar4,uVar7,*(undefined4 *)(param_3 + 8),&local_88,CONCAT44(uVar14,uVar5),
                          uVar13,&local_e8,&local_res10);
    if (iVar6 == 0) {
      local_c8 = 0;
      local_c0 = 0;
      local_b8 = 0;
      local_d0 = Proud::CReceivedMessageList::vftable;
      local_b0 = 1000;
      local_ac = 1;
      local_a8 = Proud::AddrPort::vftable;
      local_a0 = local_d8;
      local_9c = local_d4;
      uVar10 = uVar11;
      if (*(int *)(local_e8 + 0x40) != 0) {
        uVar10 = *(ulonglong *)(local_e8 + 0x38);
      }
      FUN_1401bede0(*(undefined8 *)(param_1 + 0x108),uVar10,*(int *)(local_e8 + 0x40),&local_a8,
                    &local_d0,local_res8);
      while (iVar6 = (int)uVar11, iVar6 != (int)local_b8) {
        if ((iVar6 < 0) || ((int)local_b8 <= iVar6)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        lVar8 = *(longlong *)(param_1 + 0x108);
        uVar13 = FUN_1401d6890(lVar8 + 0x6e0,local_c0 + (longlong)iVar6 * 0x48,
                               *(undefined8 *)(lVar8 + 0x6f0),0);
        if (*(undefined8 **)(lVar8 + 0x6f0) == (undefined8 *)0x0) {
          *(undefined8 *)(lVar8 + 0x6e8) = uVar13;
        }
        else {
          **(undefined8 **)(lVar8 + 0x6f0) = uVar13;
        }
        *(undefined8 *)(lVar8 + 0x6f0) = uVar13;
        if ((int)local_b8 <= iVar6) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        uVar11 = (ulonglong)(iVar6 + 1);
      }
      if ((*(longlong *)(param_2 + 0x120) != 0) ||
         (lVar8 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x108)), param_2 == lVar8)) {
        FUN_1401db020(param_1,param_2);
      }
      FUN_140190f40(&local_d0);
    }
    else if (iVar6 == 2) {
      puVar12 = local_res10;
      if (local_res10 == (undefined *)0x0) {
        puVar12 = PTR_DAT_1403200a0;
      }
      local_98 = Proud::AddrPort::vftable;
      local_90 = *(undefined4 *)(param_3 + 0x30);
      local_8c = *(undefined2 *)(param_3 + 0x34);
      puVar9 = (undefined8 *)(*(longlong *)(param_1 + 0x108) + 0x88);
      (**(code **)*puVar9)(puVar9,&local_98,puVar12);
    }
    puVar12 = local_res10;
    if (((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) &&
       (puVar1 = local_res10 + -8, puVar1 != (undefined *)0x0)) {
      uVar13 = FUN_1401568c0();
      local_68 = uVar13;
      FUN_140156b50(uVar13);
      local_60 = 1;
      piVar2 = (int *)(puVar12 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar13);
    }
    local_res10 = PTR_DAT_1403200a0;
    if (local_e8 != 0) {
      FUN_14018d9e0();
    }
  }
  FUN_1401e70d0(param_2);
  return;
}



undefined8 FUN_1401db530(longlong param_1)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined4 *puVar5;
  undefined8 *puVar6;
  undefined4 local_b8;
  undefined4 local_b4;
  longlong local_b0;
  longlong local_a8;
  undefined4 local_a0;
  int local_9c;
  undefined1 local_98;
  undefined4 local_90;
  undefined **local_88;
  undefined4 local_80;
  undefined2 local_7c;
  undefined1 local_78;
  undefined8 local_68;
  undefined1 local_60;
  undefined1 local_58 [8];
  undefined1 local_50 [8];
  longlong local_48;
  int local_3c;
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  uVar4 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))();
  local_68 = uVar4;
  FUN_140156b50(uVar4);
  local_60 = 1;
  if (*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x1548) == 0) {
    FUN_140156be0(uVar4);
    uVar4 = 0;
  }
  else {
    FUN_1401544a0(&local_b8);
    local_88 = Proud::AddrPort::vftable;
    local_78 = 0;
    local_80 = DAT_140320450;
    local_7c = DAT_140320454;
    local_90 = *(undefined4 *)(*(longlong *)(param_1 + 0x108) + 0x1578);
    puVar5 = (undefined4 *)FUN_1401d7ba0(*(longlong *)(param_1 + 0x108) + 0x1530,local_58);
    local_b8 = *puVar5;
    local_b4 = puVar5[1];
    if (*(longlong *)(puVar5 + 2) == local_b0) {
      local_9c = puVar5[7];
      local_a8 = *(longlong *)(puVar5 + 4);
      local_a0 = puVar5[6];
    }
    else {
      FUN_1401560e0(&local_b0);
      if (*(longlong *)(puVar5 + 2) != 0) {
        plVar1 = (longlong *)(*(longlong *)(puVar5 + 2) + 0x28);
        *plVar1 = *plVar1 + 1;
        local_b0 = *(longlong *)(puVar5 + 2);
      }
    }
    local_98 = *(undefined1 *)(puVar5 + 8);
    FUN_1401560e0(local_50);
    if ((local_48 != 0) && (local_3c < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_1401540a0(&local_b8,0);
    lVar2 = *(longlong *)(param_1 + 0x108);
    uVar3 = *(undefined8 *)(lVar2 + 0x6f0);
    plVar1 = *(longlong **)(lVar2 + 0x6e0);
    if (plVar1 == (longlong *)0x0) {
      puVar6 = (undefined8 *)FUN_140156940(0x58);
    }
    else {
      puVar6 = (undefined8 *)(**(code **)(*plVar1 + 8))(plVar1,0x58);
    }
    if (puVar6 != (undefined8 *)0x0) {
      FUN_1401544d0(puVar6 + 2,&local_b8);
      *(undefined4 *)(puVar6 + 7) = local_90;
      puVar6[8] = Proud::AddrPort::vftable;
      *(undefined4 *)(puVar6 + 9) = local_80;
      *(undefined2 *)((longlong)puVar6 + 0x4c) = local_7c;
      *(undefined1 *)(puVar6 + 10) = local_78;
    }
    puVar6[1] = uVar3;
    *puVar6 = 0;
    *(longlong *)(lVar2 + 0x6f8) = *(longlong *)(lVar2 + 0x6f8) + 1;
    if (*(undefined8 **)(lVar2 + 0x6f0) == (undefined8 *)0x0) {
      *(undefined8 **)(lVar2 + 0x6e8) = puVar6;
    }
    else {
      **(undefined8 **)(lVar2 + 0x6f0) = puVar6;
    }
    *(undefined8 **)(lVar2 + 0x6f0) = puVar6;
    FUN_1401db020(param_1,0);
    FUN_1401560e0(&local_b0);
    if (local_a8 != 0) {
      if (local_9c < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_a0 = 0;
    }
    FUN_140156be0(uVar4);
    uVar4 = 1;
  }
  return uVar4;
}



void FUN_1401db780(longlong param_1,longlong param_2)

{
  undefined *puVar1;
  int *piVar2;
  longlong *plVar3;
  undefined *puVar4;
  char cVar5;
  uint uVar6;
  uint uVar7;
  uint uVar8;
  int iVar9;
  longlong lVar10;
  uint *puVar11;
  ulonglong uVar12;
  uint *puVar13;
  ulonglong uVar14;
  uint uVar15;
  uint uVar16;
  uint *local_res8;
  undefined *local_res10;
  undefined *local_res18;
  undefined8 uVar17;
  undefined **local_50;
  undefined8 local_48;
  longlong local_40;
  undefined8 local_38;
  undefined4 local_30;
  undefined4 local_2c;
  
  uVar17 = 0xfffffffffffffffe;
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x78) + 0x10))();
  lVar10 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
  *(undefined1 *)(lVar10 + 0xc0) = 0;
  if (*(int *)(param_2 + 8) < 1) {
    FUN_1401568c0();
    local_res10 = PTR_DAT_1403200a0;
    FUN_14004ce50(&local_res10,L"compeltedlength < 0 recvcomplete errorcode:%d",
                  *(undefined4 *)(param_2 + 0xc));
    FUN_1401c8a70(*(undefined8 *)(param_1 + 0x108),0xb,3,&local_res10,uVar17);
    if (*(int *)(param_1 + 0x100) < 4) {
      *(undefined4 *)(param_1 + 0x40) = 0;
      *(undefined4 *)(param_1 + 0x100) = 4;
      uVar17 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
      *(undefined8 *)(param_1 + 0x80) = uVar17;
      *(undefined1 *)(param_1 + 0xc0) = 0;
    }
    puVar4 = local_res10;
    if (((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) &&
       (puVar1 = local_res10 + -8, puVar1 != (undefined *)0x0)) {
      uVar17 = FUN_1401568c0();
      FUN_140156b50(uVar17);
      piVar2 = (int *)(puVar4 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar1);
      }
      FUN_140156be0(uVar17);
    }
    local_res10 = PTR_DAT_1403200a0;
    goto LAB_1401dbc97;
  }
  lVar10 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
  uVar14 = 0;
  uVar12 = uVar14;
  if (*(ulonglong **)(lVar10 + 0x128) != (ulonglong *)0x0) {
    uVar12 = **(ulonglong **)(lVar10 + 0x128);
  }
  cVar5 = FUN_140185860(uVar12);
  uVar15 = 0;
  if (cVar5 == '\0') {
    uVar17 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
    *(undefined8 *)(*(longlong *)(param_1 + 0x108) + 0x18c0) = uVar17;
    lVar10 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    uVar12 = uVar14;
    if (*(ulonglong **)(lVar10 + 0x128) != (ulonglong *)0x0) {
      uVar12 = **(ulonglong **)(lVar10 + 0x128);
    }
    uVar17 = FUN_140185840(uVar12);
    lVar10 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    FUN_1401aea00(lVar10 + 0x130,uVar17,*(undefined4 *)(param_2 + 8));
    plVar3 = (longlong *)(*(longlong *)(param_1 + 0x108) + 0x658);
    *plVar3 = *plVar3 + (longlong)*(int *)(param_2 + 8);
    local_48 = 0;
    local_40 = 0;
    local_38 = 0;
    local_50 = Proud::CReceivedMessageList::vftable;
    local_30 = 1000;
    local_2c = 1;
    FUN_1401bf290(*(undefined8 *)(param_1 + 0x108),&local_50);
    while (iVar9 = (int)uVar14, iVar9 != (int)local_38) {
      if ((iVar9 < 0) || ((int)local_38 <= iVar9)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      lVar10 = *(longlong *)(param_1 + 0x108);
      uVar17 = FUN_1401d6890(lVar10 + 0x6e0,local_40 + (longlong)iVar9 * 0x48,
                             *(undefined8 *)(lVar10 + 0x6f0),0);
      if (*(undefined8 **)(lVar10 + 0x6f0) == (undefined8 *)0x0) {
        *(undefined8 *)(lVar10 + 0x6e8) = uVar17;
      }
      else {
        **(undefined8 **)(lVar10 + 0x6f0) = uVar17;
      }
      *(undefined8 *)(lVar10 + 0x6f0) = uVar17;
      if ((int)local_38 <= iVar9) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      uVar14 = (ulonglong)(iVar9 + 1);
    }
    FUN_1401db020(param_1,0);
    FUN_140190f40(&local_50);
    goto LAB_1401dbc97;
  }
  if (3 < *(int *)(param_1 + 0x100)) goto LAB_1401dbc97;
  FUN_1401568c0();
  local_res8 = (uint *)PTR_DAT_1403200a0;
  uVar6 = FUN_140156740(L"close socket completion");
  if ((local_res8 != (uint *)0x0) && (uVar14 = 0, local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar14 = (ulonglong)local_res8[-2];
  }
  uVar7 = 0;
  uVar8 = uVar6;
  if ((((int)uVar6 <= (int)uVar14) && (uVar8 = uVar15, local_res8 != (uint *)0x0)) &&
     (uVar8 = uVar7, local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar8 = local_res8[-2];
  }
  uVar16 = 1;
  if (1 < (int)uVar8) {
    uVar16 = uVar8;
  }
  uVar8 = uVar7;
  if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar8 = local_res8[-2];
  }
  if ((int)uVar8 < (int)uVar16) {
    if (local_res8 == (uint *)0x0) {
      local_res8 = (uint *)PTR_DAT_1403200a0;
    }
    if ((int)uVar16 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar16 == 0) {
      FUN_14004f990(&local_res8);
    }
    else {
      uVar8 = uVar15;
      if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
        uVar8 = local_res8[-2];
      }
      if (uVar16 != uVar8) {
        puVar11 = (uint *)FUN_140156940((longlong)(int)uVar16 * 2 + 10);
        if (puVar11 != (uint *)0x0) {
          *puVar11 = 0;
          puVar11[1] = 1;
        }
        *puVar11 = uVar16;
        uVar8 = uVar15;
        if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
          uVar8 = local_res8[-2];
        }
        puVar13 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar16 < (int)uVar8) {
LAB_1401db9ec:
          if (local_res8 != (uint *)0x0) {
            puVar13 = local_res8;
          }
        }
        else {
          uVar16 = uVar15;
          if (local_res8 != (uint *)0x0) {
            if (local_res8 != (uint *)PTR_DAT_1403200a0) {
              uVar16 = local_res8[-2];
            }
            goto LAB_1401db9ec;
          }
        }
        FUN_140156770(puVar11 + 2,puVar13,uVar16);
        FUN_14004f990(&local_res8);
        local_res8 = puVar11 + 2;
      }
    }
  }
  FUN_14004f670(&local_res8);
  puVar11 = local_res8;
  if (local_res8 == (uint *)0x0) {
    puVar11 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar11,L"close socket completion",uVar6);
  puVar11 = local_res8;
  if (local_res8 == (uint *)0x0) {
    puVar11 = (uint *)PTR_DAT_1403200a0;
  }
  uVar6 = FUN_140156740(puVar11);
  uVar15 = 0;
  if (0 < (int)uVar6) {
    uVar15 = uVar6;
  }
  uVar6 = uVar7;
  if ((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) {
    uVar6 = local_res8[-2];
  }
  if (((int)uVar15 < (int)uVar6) || (uVar15 = uVar7, local_res8 == (uint *)0x0)) {
LAB_1401dba7f:
    if (((local_res8 != (uint *)PTR_DAT_1403200a0) && (local_res8 != (uint *)0x0)) &&
       (local_res8 + -2 != (uint *)0x0)) {
      local_res8[-2] = uVar15;
      *(undefined2 *)((longlong)local_res8 + (longlong)(int)uVar15 * 2) = 0;
    }
  }
  else if (local_res8 != (uint *)PTR_DAT_1403200a0) {
    uVar15 = local_res8[-2];
    goto LAB_1401dba7f;
  }
  FUN_1401c8a70(*(undefined8 *)(param_1 + 0x108),0xb,3,&local_res8);
  puVar11 = local_res8;
  if (((local_res8 != (uint *)0x0) && (local_res8 != (uint *)PTR_DAT_1403200a0)) &&
     (puVar13 = local_res8 + -2, puVar13 != (uint *)0x0)) {
    uVar17 = FUN_1401568c0();
    FUN_140156b50(uVar17);
    puVar11 = puVar11 + -1;
    *puVar11 = *puVar11 - 1;
    if (*puVar11 == 0) {
      FUN_140156970(puVar13);
    }
    FUN_140156be0(uVar17);
  }
  local_res8 = (uint *)PTR_DAT_1403200a0;
  if (*(int *)(param_1 + 0x100) < 4) {
    *(undefined4 *)(param_1 + 0x40) = 0;
    *(undefined4 *)(param_1 + 0x100) = 4;
    uVar17 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
    *(undefined8 *)(param_1 + 0x80) = uVar17;
    *(undefined1 *)(param_1 + 0xc0) = 0;
  }
LAB_1401dbc97:
  lVar10 = 0;
  plVar3 = *(longlong **)(*(longlong *)(param_1 + 0x108) + 0x5d0);
  if (plVar3 != (longlong *)0x0) {
    lVar10 = *plVar3;
  }
  if (*(int *)(lVar10 + 0x100) < 4) {
    uVar17 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x108));
    iVar9 = FUN_1401e2c20(uVar17);
    if (iVar9 != 0) {
      FUN_1401568c0();
      local_res18 = PTR_DAT_1403200a0;
      FUN_14004ce50(&local_res18,L"%d Tcp issueRecv Failed SocketErrorCode",iVar9);
      FUN_1401c8a70(*(undefined8 *)(param_1 + 0x108),3,1,&local_res18);
      if (*(int *)(param_1 + 0x100) < 4) {
        *(undefined4 *)(param_1 + 0x40) = 0;
        *(undefined4 *)(param_1 + 0x100) = 4;
        uVar17 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))();
        *(undefined8 *)(param_1 + 0x80) = uVar17;
        *(undefined1 *)(param_1 + 0xc0) = 0;
      }
      puVar4 = local_res18;
      if (((local_res18 != (undefined *)0x0) && (local_res18 != PTR_DAT_1403200a0)) &&
         (puVar1 = local_res18 + -8, puVar1 != (undefined *)0x0)) {
        uVar17 = FUN_1401568c0();
        FUN_140156b50(uVar17);
        piVar2 = (int *)(puVar4 + -4);
        *piVar2 = *piVar2 + -1;
        if (*piVar2 == 0) {
          FUN_140156970(puVar1);
        }
        FUN_140156be0(uVar17);
      }
    }
  }
  return;
}



void FUN_1401dbdc0(longlong param_1)

{
  char cVar1;
  double dVar2;
  undefined8 uVar3;
  
  FUN_1401c0630(*(undefined8 *)(param_1 + 0x108));
  FUN_1401d51b0(param_1);
  FUN_1401d42c0(param_1);
  do {
    dVar2 = (double)(**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))
                              (*(longlong *)(param_1 + 0x108) + 0x70);
    if ((0.0 < *(double *)(param_1 + 0xd0)) &&
       (dVar2 = dVar2 - *(double *)(param_1 + 0xd0),
       *(double *)(param_1 + 0xd8) <= dVar2 && dVar2 != *(double *)(param_1 + 0xd8))) {
      if (*(int *)(param_1 + 0x100) < 4) {
        *(undefined4 *)(param_1 + 0x40) = 0;
        *(undefined4 *)(param_1 + 0x100) = 4;
        uVar3 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x108) + 0x70) + 0x1c0))
                          (*(longlong *)(param_1 + 0x108) + 0x70);
        *(undefined8 *)(param_1 + 0x80) = uVar3;
        *(undefined1 *)(param_1 + 0xc0) = 0;
      }
      return;
    }
    cVar1 = FUN_1401db530(param_1);
    if (*(int *)(param_1 + 0x100) == 4) {
      return;
    }
  } while (cVar1 != '\0');
  return;
}



undefined8 FUN_1401dbe90(longlong param_1,undefined8 *param_2)

{
  bool bVar1;
  undefined4 uVar2;
  undefined *puVar3;
  undefined8 uVar4;
  undefined *local_res18;
  
  puVar3 = (undefined *)
           __RTDynamicCast(*param_2,0,&Proud::ICompletionContext::RTTI_Type_Descriptor,
                           &Proud::CTcpLayer_C::RTTI_Type_Descriptor,0);
  if (puVar3 == (undefined *)0x0) {
    uVar4 = 0;
  }
  else {
    param_1 = param_1 + 0x10;
    local_res18 = puVar3;
    FUN_140156b50(param_1);
    bVar1 = true;
    if (*(int *)(param_2 + 2) == 1) {
      uVar4 = (**(code **)(**(longlong **)(puVar3 + 0x120) + 0x38))();
      FUN_1401d5940(uVar4,param_2);
    }
    else if (*(int *)(param_2 + 2) == 2) {
      uVar4 = (**(code **)(**(longlong **)(puVar3 + 0x120) + 0x38))();
      FUN_1401db780(uVar4,param_2);
    }
    else {
      FUN_140156be0(param_1);
      bVar1 = false;
      FUN_1401568c0();
      local_res18 = PTR_DAT_1403200a0;
      uVar2 = FUN_140156740(L"Unexpected at Client IOCP TCP completion!");
      uVar4 = FUN_14004f760(&local_res18,uVar2);
      FUN_140156770(uVar4,L"Unexpected at Client IOCP TCP completion!",uVar2);
      FUN_14004f380(&local_res18);
      FUN_1401a7000(&local_res18);
    }
    if (bVar1) {
      FUN_140156be0(param_1);
    }
    uVar4 = 1;
  }
  return uVar4;
}



undefined8 FUN_1401dbff0(longlong param_1,undefined8 *param_2)

{
  bool bVar1;
  undefined4 uVar2;
  undefined *puVar3;
  undefined8 uVar4;
  undefined *local_res18 [2];
  
  uVar4 = 0;
  puVar3 = (undefined *)
           __RTDynamicCast(*param_2,0,&Proud::ICompletionContext::RTTI_Type_Descriptor,
                           &Proud::CUdpSocket_C::RTTI_Type_Descriptor,0);
  if (puVar3 == (undefined *)0x0) {
    uVar4 = 0;
  }
  else {
    param_1 = param_1 + 0x10;
    local_res18[0] = puVar3;
    FUN_140156b50(param_1);
    bVar1 = true;
    if (*(int *)(param_2 + 2) == 1) {
      if (*(undefined8 **)(*(longlong *)(puVar3 + 0x118) + 0x5d0) != (undefined8 *)0x0) {
        uVar4 = **(undefined8 **)(*(longlong *)(puVar3 + 0x118) + 0x5d0);
      }
      FUN_1401d3b80(uVar4,puVar3,param_2);
    }
    else if (*(int *)(param_2 + 2) == 2) {
      if (*(undefined8 **)(*(longlong *)(puVar3 + 0x118) + 0x5d0) != (undefined8 *)0x0) {
        uVar4 = **(undefined8 **)(*(longlong *)(puVar3 + 0x118) + 0x5d0);
      }
      FUN_1401db1d0(uVar4,puVar3,param_2);
    }
    else {
      FUN_140156be0(param_1);
      bVar1 = false;
      FUN_1401568c0();
      local_res18[0] = PTR_DAT_1403200a0;
      uVar2 = FUN_140156740(L"Unexpected at Client IOCP UDP completion!");
      uVar4 = FUN_14004f760(local_res18,uVar2);
      FUN_140156770(uVar4,L"Unexpected at Client IOCP UDP completion!",uVar2);
      FUN_14004f380(local_res18);
      FUN_1401a7000(local_res18);
    }
    if (bVar1) {
      FUN_140156be0(param_1);
    }
    uVar4 = 1;
  }
  return uVar4;
}



void FUN_1401dc170(longlong param_1)

{
  undefined8 uVar1;
  
  uVar1 = (**(code **)(**(longlong **)(param_1 + 0x108) + 0x58))();
  FUN_140156b50(uVar1);
  FUN_1401dbdc0(param_1);
  FUN_140156be0(uVar1);
  return;
}



void FUN_1401dc1d0(longlong param_1,undefined4 param_2)

{
  char cVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  undefined *local_res8 [4];
  undefined8 local_48;
  undefined8 local_40;
  undefined4 local_38;
  undefined8 local_30;
  undefined4 local_28;
  undefined **local_20;
  undefined4 local_18;
  undefined2 local_14;
  
  local_20 = Proud::AddrPort::vftable;
  local_48 = 0;
  local_30 = 0;
  local_40 = 0;
  local_28 = 0;
  local_18 = DAT_140320450;
  local_14 = DAT_140320454;
  local_38 = 5;
  cVar1 = FUN_14018b2f0(*(undefined8 *)(param_1 + 0x2b8),&local_48,param_2);
  if (cVar1 != '\0') {
    cVar1 = FUN_1401dbe90(param_1,&local_48);
    if (cVar1 == '\0') {
      cVar1 = FUN_1401dbff0(param_1,&local_48);
      if (cVar1 == '\0') {
        FUN_1401568c0();
        local_res8[0] = PTR_DAT_1403200a0;
        uVar2 = FUN_140156740(L"Unexpected at Client IOCP completion!");
        uVar3 = FUN_14004f760(local_res8,uVar2);
        FUN_140156770(uVar3,L"Unexpected at Client IOCP completion!",uVar2);
        FUN_14004f380(local_res8);
        FUN_1401a7000(local_res8);
      }
    }
  }
  return;
}



void FUN_1401dc2b0(longlong param_1)

{
  int iVar1;
  undefined8 uVar2;
  
  iVar1 = *(int *)(param_1 + 0x100);
  if (iVar1 == 0) {
    FUN_1401d8c90();
  }
  else if (iVar1 == 1) {
    FUN_1401d4b60();
  }
  else if (iVar1 == 2) {
    FUN_1401d3dc0();
  }
  else if (iVar1 == 3) {
    FUN_1401dc170();
  }
  else if (iVar1 == 4) {
    FUN_1401d5c10();
  }
  FUN_1401b19f0(*(undefined8 *)(param_1 + 0x108));
  uVar2 = FUN_1401afda0(*(undefined8 *)(param_1 + 0x108));
  FUN_1401ae800(*(longlong *)(param_1 + 0x108) + 0x1878,uVar2);
  if (*(char *)(*(longlong *)(param_1 + 0x108) + 0x1888) != '\0') {
    FUN_1401b1f20();
  }
  return;
}



void FUN_1401dc340(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  undefined8 *puVar2;
  longlong lVar3;
  longlong lVar4;
  longlong lVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  undefined1 uVar8;
  
  uVar7 = 0xfffffffffffffffe;
  lVar3 = param_1 + 0x10;
  lVar5 = lVar3;
  FUN_140156b50(lVar3);
  uVar8 = 1;
  if (*(longlong *)(param_1 + 0x298) != 0) {
    lVar4 = *(longlong *)(param_1 + 0x298);
    lVar3 = lVar5;
    do {
      if (*(longlong *)(param_1 + 0x2b8) == 0) {
        if (*(int *)(lVar4 + 0x100) < 5) {
          *(undefined4 *)(lVar4 + 0x40) = 0;
          *(undefined4 *)(lVar4 + 0x100) = 5;
          uVar6 = (**(code **)(*(longlong *)(*(longlong *)(lVar4 + 0x108) + 0x70) + 0x1c0))();
          *(undefined8 *)(lVar4 + 0x80) = uVar6;
          *(undefined1 *)(lVar4 + 0xc0) = 0;
        }
      }
      else {
        FUN_1401dc2b0(lVar4);
      }
      if (*(int *)(lVar4 + 0x100) == 5) {
        lVar5 = *(longlong *)(lVar4 + 8);
        FUN_1401d66a0(param_1,lVar4,param_3,param_4,uVar7,lVar3,uVar8);
        lVar4 = *(longlong *)(lVar4 + 0x108);
        if (*(longlong *)(lVar4 + 0x5d0) != 0) {
          *(longlong *)(*(longlong *)(lVar4 + 0x5d0) + 8) =
               *(longlong *)(*(longlong *)(lVar4 + 0x5d0) + 8) + -1;
          puVar2 = (undefined8 *)0x0;
          if (*(longlong *)(*(longlong *)(lVar4 + 0x5d0) + 8) == 0) {
            puVar2 = *(undefined8 **)(lVar4 + 0x5d0);
          }
          *(undefined8 *)(lVar4 + 0x5d0) = 0;
          if (puVar2 != (undefined8 *)0x0) {
            pvVar1 = (void *)*puVar2;
            if (pvVar1 != (void *)0x0) {
              FUN_1401d5010(pvVar1);
              operator_delete(pvVar1);
            }
            FUN_140156970(puVar2);
          }
        }
      }
      else {
        lVar5 = *(longlong *)(lVar4 + 8);
      }
      lVar4 = lVar5;
    } while (lVar5 != 0);
  }
  FUN_1401d9440(param_1);
  FUN_140156be0(lVar3);
  return;
}



void FUN_1401dc4b0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  char cVar1;
  DWORD DVar2;
  HANDLE hThread;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  DVar2 = GetCurrentThreadId();
  FUN_1401ac7d0(DVar2,"PNCliWorker",param_3,param_4,uVar3);
  DVar2 = GetCurrentThreadId();
  *(DWORD *)(param_1 + 0x284) = DVar2;
  if (DAT_140320d77 != '\0') {
    hThread = GetCurrentThread();
    SetThreadPriority(hThread,1);
  }
  *(undefined1 *)(param_1 + 0x28c) = 0;
  cVar1 = *(char *)(param_1 + 0x80);
  while( true ) {
    if (cVar1 != '\0') {
      *(undefined1 *)(param_1 + 0x28c) = 1;
      return;
    }
    if (DAT_140328940 != '\0') break;
    FUN_1401dc1d0(param_1,DAT_140320ca4);
    if (*(char *)(param_1 + 0x280) != '\0') {
      *(undefined1 *)(param_1 + 0x280) = 0;
      FUN_140156b50();
      uVar3 = FUN_14018aee0(param_1 + 0x48);
      *(undefined8 *)(param_1 + 0xc0) = uVar3;
      uVar3 = FUN_14018af40(param_1 + 0x48);
      *(undefined8 *)(param_1 + 0x100) = uVar3;
      *(double *)(param_1 + 0x180) =
           (*(double *)(param_1 + 0x100) - *(double *)(param_1 + 0x180)) * 0.3 +
           *(double *)(param_1 + 0x180);
      *(undefined1 *)(param_1 + 0x1c0) = 1;
      FUN_140156be0(param_1 + 0x88);
      FUN_1401dc340(param_1);
      if (*(longlong *)(param_1 + 0x2b0) != 0) {
        FUN_1401e2ac0();
      }
    }
    cVar1 = *(char *)(param_1 + 0x80);
  }
  return;
}



undefined8 * FUN_1401dc630(undefined8 *param_1)

{
  longlong *plVar1;
  void *pvVar2;
  UINT uDelay;
  longlong *plVar3;
  undefined4 uVar4;
  MMRESULT MVar5;
  longlong lVar6;
  longlong lVar7;
  undefined8 uVar8;
  longlong *local_res10;
  void *local_res18;
  
  *param_1 = Proud::CNetClientManager::vftable;
  param_1[1] = Proud::CNetClientManager::vftable;
  uVar4 = FUN_14015a430();
  FUN_140156a70(param_1 + 2,uVar4,1);
  FUN_14018ae00(param_1 + 9);
  lVar7 = 0;
  param_1[0xf] = 0;
  uVar4 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x11,uVar4,1);
  uVar4 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x39,uVar4,1);
  param_1[0x41] = 0;
  param_1[0x44] = 0;
  param_1[0x42] = 0;
  param_1[0x43] = 0;
  param_1[0x45] = 0;
  param_1[0x48] = 0;
  param_1[0x46] = 0;
  param_1[0x47] = 0;
  param_1[0x52] = 0;
  param_1[0x53] = 0;
  param_1[0x54] = 0;
  *(undefined4 *)(param_1 + 0x55) = 0;
  param_1[0x56] = 0;
  param_1[0x57] = 0;
  FUN_1401d3fa0();
  *(undefined1 *)(param_1 + 0x38) = 0;
  FUN_14018ae50(param_1 + 9);
  uVar8 = FUN_14018aee0(param_1 + 9);
  param_1[0x18] = uVar8;
  param_1[0x20] = 0;
  param_1[0x30] = 0;
  *(undefined1 *)(param_1 + 0x38) = 1;
  param_1[0x4a] = 0;
  param_1[0x4b] = 0;
  param_1[0x40] = 0;
  param_1[0x49] = 0;
  local_res18 = operator_new(0xa8);
  lVar6 = lVar7;
  if (local_res18 != (void *)0x0) {
    lVar6 = FUN_14018c020(local_res18,param_1,1);
  }
  param_1[0x57] = lVar6;
  *(undefined1 *)(param_1 + 0x10) = 0;
  *(undefined1 *)(param_1 + 0x50) = 0;
  *(undefined8 *)((longlong)param_1 + 0x284) = 0;
  param_1[0xe] = 0;
  uDelay = 1;
  if (1 < DAT_140320ca4) {
    uDelay = DAT_140320ca4;
  }
  MVar5 = timeSetEvent(uDelay,uDelay,&LAB_1401d38c0,(DWORD_PTR)(param_1 + 0x50),1);
  *(MMRESULT *)(param_1 + 0x4c) = MVar5;
  local_res10 = operator_new(0x28);
  lVar6 = lVar7;
  if (local_res10 != (longlong *)0x0) {
    lVar6 = FUN_140182680(local_res10,&LAB_1401dc620,param_1);
  }
  if (lVar6 == 0) {
    local_res10 = (longlong *)0x0;
  }
  else {
    local_res10 = (longlong *)FUN_140156940(0x10);
    local_res10[1] = 1;
    *local_res10 = lVar6;
  }
  plVar1 = local_res10;
  FUN_14018da90(param_1 + 0xf,&local_res10);
  plVar3 = local_res10;
  if (plVar1 != (longlong *)0x0) {
    plVar1 = plVar1 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      pvVar2 = (void *)*local_res10;
      if (pvVar2 != (void *)0x0) {
        FUN_140182790(pvVar2);
        operator_delete(pvVar2);
      }
      FUN_140156970(plVar3);
    }
  }
  if ((longlong *)param_1[0xf] != (longlong *)0x0) {
    lVar7 = *(longlong *)param_1[0xf];
  }
  FUN_140182870(lVar7);
  return param_1;
}



longlong * FUN_1401dc8b0(longlong *param_1,longlong param_2)

{
  longlong lVar1;
  
  *(undefined4 *)(param_1 + 1) = 0;
  *(undefined4 *)((longlong)param_1 + 0xc) = 0;
  *(undefined4 *)(param_1 + 2) = 0;
  *(undefined4 *)((longlong)param_1 + 0x14) = 0;
  param_1[0x19] = (longlong)Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0x1a) = 0;
  *(undefined2 *)((longlong)param_1 + 0xd4) = 0;
  param_1[0x18] = 0;
  *(undefined1 *)(param_1 + 8) = 0;
  *(undefined4 *)(param_1 + 0x1a) = DAT_140320450;
  *(undefined2 *)((longlong)param_1 + 0xd4) = DAT_140320454;
  *param_1 = param_2;
  param_1[0x20] = DAT_140320ca8;
  *(undefined4 *)(param_1 + 0x28) = 0;
  *(undefined1 *)(param_1 + 0x10) = 0;
  param_1[0x18] = 0;
  *(undefined4 *)(param_1 + 0x38) = 0;
  param_1[0x40] = -0x4010000000000000;
  lVar1 = (**(code **)(*(longlong *)(param_2 + 0x70) + 0x1c0))(param_2 + 0x70);
  param_1[0x30] = lVar1;
  return param_1;
}



void FUN_1401dc980(longlong *param_1,char param_2)

{
  longlong lVar1;
  
  if ((char)param_1[0x10] != param_2) {
    *(char *)(param_1 + 0x10) = param_2;
    lVar1 = (**(code **)(*(longlong *)(*param_1 + 0x70) + 0x1c0))(*param_1 + 0x70);
    param_1[0x30] = lVar1;
    *(undefined4 *)(param_1 + 0x38) = 0;
    param_1[0x40] = -0x4010000000000000;
    if (param_2 != '\0') {
      lVar1 = (**(code **)(*(longlong *)(*param_1 + 0x70) + 0x1c0))(*param_1 + 0x70);
      param_1[0x18] = lVar1;
    }
  }
  return;
}



void FUN_1401dca00(longlong *param_1,undefined4 param_2,undefined8 param_3,longlong param_4)

{
  longlong *plVar1;
  char cVar2;
  undefined2 uVar3;
  undefined4 uVar4;
  longlong lVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  undefined **local_38;
  undefined4 local_30;
  undefined2 local_2c;
  undefined8 local_28;
  undefined1 local_20;
  
  (**(code **)(*(longlong *)(*param_1 + 0x78) + 0x10))(*param_1 + 0x78);
  if ((char)param_1[0x10] != '\0') {
    lVar5 = FUN_1401aff70(*param_1);
    cVar2 = (**(code **)(*(longlong *)(lVar5 + 0x40) + 0x10))(lVar5 + 0x40);
    if (cVar2 == '\0') {
      if (*(char *)(param_4 + 0x18) == '\0') {
        *(int *)(*param_1 + 0x508) = *(int *)(*param_1 + 0x508) + 1;
      }
      local_38 = Proud::AddrPort::vftable;
      local_30 = (undefined4)param_1[0x1a];
      local_2c = *(undefined2 *)((longlong)param_1 + 0xd4);
      plVar1 = (longlong *)*param_1;
      uVar7 = (**(code **)(plVar1[0xe] + 0x1c0))();
      uVar4 = (**(code **)(*plVar1 + 0x30))(plVar1);
      uVar3 = FUN_14019e480(uVar4,1);
      uVar6 = FUN_1401aff70(*param_1);
      FUN_1401e7440(uVar6,param_2,uVar3,&local_38,param_3,uVar7,param_4);
      return;
    }
  }
  local_28 = *(undefined8 *)(param_4 + 8);
  local_20 = *(undefined1 *)(param_4 + 0x10);
  uVar6 = FUN_1401aff90(*param_1);
  FUN_1401e2f30(uVar6,param_3,&local_28);
  return;
}



undefined8 FUN_1401dcb50(int param_1)

{
  if (param_1 == 0) {
    return 0x15;
  }
  if (param_1 == 1) {
    return 0x46;
  }
  if (param_1 == 2) {
    return 0x50;
  }
  if (param_1 != 3) {
    if (param_1 != 7) {
      return 0;
    }
    return 0x438;
  }
  return 0x1bb;
}



int FUN_1401dcb90(char *param_1,char *param_2,int *param_3,uint param_4)

{
  byte bVar1;
  char cVar2;
  short sVar3;
  short sVar4;
  int iVar5;
  uint uVar6;
  
  if (param_1 == (char *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if (param_2 == (char *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  cVar2 = *param_1;
  uVar6 = 0;
  iVar5 = 1;
  if (cVar2 != '\0') {
    do {
      if (uVar6 == param_4) {
        iVar5 = 0;
      }
      else if (iVar5 != 0) {
        if (cVar2 == '%') {
          if ((param_1[1] != '\0') && (param_1[2] != '\0')) {
            bVar1 = param_1[1];
            if ((byte)(bVar1 - 0x30) < 10) {
              sVar4 = bVar1 - 0x30;
            }
            else if ((byte)(bVar1 + 0xbf) < 6) {
              sVar4 = bVar1 - 0x37;
            }
            else if ((byte)(bVar1 + 0x9f) < 6) {
              sVar4 = bVar1 - 0x57;
            }
            else {
              sVar4 = -1;
            }
            bVar1 = param_1[2];
            param_1 = param_1 + 2;
            if ((byte)(bVar1 - 0x30) < 10) {
              sVar3 = bVar1 - 0x30;
            }
            else if ((byte)(bVar1 + 0xbf) < 6) {
              sVar3 = bVar1 - 0x37;
            }
            else if ((byte)(bVar1 + 0x9f) < 6) {
              sVar3 = bVar1 - 0x57;
            }
            else {
              sVar3 = -1;
            }
            if ((-1 < sVar4) && (-1 < sVar3)) {
              *param_2 = (char)sVar4 * '\x10' + (char)sVar3;
              goto LAB_1401dcca1;
            }
          }
          iVar5 = 0;
          goto LAB_1401dccc4;
        }
        *param_2 = cVar2;
LAB_1401dcca1:
        param_2 = param_2 + 1;
      }
      cVar2 = param_1[1];
      param_1 = param_1 + 1;
      uVar6 = uVar6 + 1;
    } while (cVar2 != '\0');
    if (iVar5 == 0) goto LAB_1401dccc4;
  }
  if (uVar6 < param_4) {
    *param_2 = '\0';
  }
LAB_1401dccc4:
  if (param_3 != (int *)0x0) {
    *param_3 = uVar6 + 1;
  }
  if (param_4 < uVar6 + 1) {
    iVar5 = 0;
  }
  return iVar5;
}



undefined8 FUN_1401dcd00(longlong param_1,wchar_t *param_2)

{
  errno_t eVar1;
  size_t sVar2;
  
  sVar2 = wcsnlen(param_2,0x101);
  if (0x100 < (uint)sVar2) {
    return 0;
  }
  eVar1 = wcsncpy_s((wchar_t *)(param_1 + 0x42),0x101,param_2,sVar2 & 0xffffffff);
  if (eVar1 != 0) {
    if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  *(uint *)(param_1 + 0x2458) = (uint)sVar2;
  return 1;
}



undefined8 FUN_1401dcdb0(longlong param_1,wchar_t *param_2)

{
  errno_t eVar1;
  size_t sVar2;
  
  sVar2 = wcsnlen(param_2,0x81);
  if (0x80 < (uint)sVar2) {
    return 0;
  }
  eVar1 = wcsncpy_s((wchar_t *)(param_1 + 0x244),0x81,param_2,sVar2 & 0xffffffff);
  if (eVar1 != 0) {
    if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  *(uint *)(param_1 + 0x245c) = (uint)sVar2;
  return 1;
}



undefined8 FUN_1401dce60(longlong param_1,wchar_t *param_2)

{
  errno_t eVar1;
  size_t sVar2;
  
  if (param_2 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if ((*param_2 != L'\0') && (*(short *)(param_1 + 0x244) == 0)) {
    return 0;
  }
  sVar2 = wcsnlen(param_2,0x81);
  if (0x80 < (uint)sVar2) {
    return 0;
  }
  eVar1 = wcsncpy_s((wchar_t *)(param_1 + 0x346),0x81,param_2,sVar2 & 0xffffffff);
  if (eVar1 != 0) {
    if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  *(uint *)(param_1 + 0x2460) = (uint)sVar2;
  return 1;
}



undefined8 FUN_1401dcf40(longlong param_1,wchar_t *param_2)

{
  errno_t eVar1;
  size_t sVar2;
  
  sVar2 = wcsnlen(param_2,0x801);
  if (0x800 < (uint)sVar2) {
    return 0;
  }
  eVar1 = wcsncpy_s((wchar_t *)(param_1 + 0x144a),0x801,param_2,sVar2 & 0xffffffff);
  if (eVar1 != 0) {
    if (eVar1 == 0xc) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
    if ((eVar1 == 0x16) || (eVar1 == 0x22)) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80070057);
    }
    if (eVar1 != 0x50) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
  }
  *(uint *)(param_1 + 0x2468) = (uint)sVar2;
  return 1;
}



int FUN_1401dcff0(longlong param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  int iVar4;
  
  iVar4 = *(int *)(param_1 + 0x24);
  if (iVar4 == 0) {
    iVar2 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
    iVar4 = 0x400;
    if (iVar2 < 0x400) {
      iVar4 = iVar2;
    }
    iVar2 = 4;
    if (4 < iVar4) {
      iVar2 = iVar4;
    }
    iVar4 = iVar2 + param_2;
    if (iVar2 + param_2 < *(int *)(param_1 + 0x20)) {
      iVar4 = *(int *)(param_1 + 0x20);
    }
    return iVar4;
  }
  if (iVar4 != 1) {
    if (iVar4 != 2) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (param_2 < *(int *)(param_1 + 0x20)) {
      param_2 = *(int *)(param_1 + 0x20);
    }
    return param_2;
  }
  uVar1 = (int)(*(int *)(param_1 + 0x18) + (*(int *)(param_1 + 0x18) >> 0x1f & 7U)) >> 3;
  uVar3 = 0x10;
  if (0x10 < (int)uVar1) {
    uVar3 = uVar1;
  }
  if (uVar3 < 0x41) {
    uVar3 = 0x40;
  }
  iVar4 = uVar3 + param_2;
  if ((int)(uVar3 + param_2) < *(int *)(param_1 + 0x20)) {
    iVar4 = *(int *)(param_1 + 0x20);
  }
  return iVar4;
}



undefined8 FUN_1401dd090(wchar_t *param_1,wchar_t *param_2)

{
  wchar_t wVar1;
  int iVar2;
  errno_t eVar3;
  undefined8 uVar4;
  longlong lVar5;
  undefined **ppuVar6;
  uint uVar7;
  wchar_t *pwVar8;
  
  if (param_2 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  ppuVar6 = &PTR_DAT_14026d670;
  uVar7 = 0;
  do {
    if ((wchar_t *)*ppuVar6 != (wchar_t *)0x0) {
      iVar2 = _wcsicmp(param_2,(wchar_t *)*ppuVar6);
      if (iVar2 == 0) {
        if (uVar7 != 0xffffffff) {
          *(uint *)(param_1 + 0x1228) = uVar7;
          *(undefined4 *)(param_1 + 0x122a) =
               *(undefined4 *)(&DAT_14026d678 + (longlong)(int)uVar7 * 0x10);
          param_1[0x1226] = *(wchar_t *)(&DAT_14026d67c + (longlong)(int)uVar7 * 0x10);
          goto LAB_1401dd124;
        }
        break;
      }
    }
    uVar7 = uVar7 + 1;
    ppuVar6 = ppuVar6 + 2;
  } while (uVar7 < 8);
  lVar5 = -1;
  uVar4 = 0;
  param_1[0x1228] = L'\xffff';
  param_1[0x1229] = L'\xffff';
  pwVar8 = param_2;
  do {
    if (lVar5 == 0) break;
    lVar5 = lVar5 + -1;
    wVar1 = *pwVar8;
    pwVar8 = pwVar8 + 1;
  } while (wVar1 != L'\0');
  uVar7 = ~(uint)lVar5 - 1;
  *(uint *)(param_1 + 0x122a) = uVar7;
  if (uVar7 < 0x21) {
    param_1[0x1226] = L'\0';
LAB_1401dd124:
    eVar3 = wcsncpy_s(param_1,0x21,param_2,(ulonglong)*(uint *)(param_1 + 0x122a));
    if (eVar3 != 0) {
      if (eVar3 == 0xc) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x8007000e);
      }
      if ((eVar3 == 0x16) || (eVar3 == 0x22)) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80070057);
      }
      if (eVar3 != 0x50) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
    }
    param_1[*(uint *)(param_1 + 0x122a)] = L'\0';
    uVar4 = 1;
  }
  return uVar4;
}



void FUN_1401dd1d0(undefined8 *param_1)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x0001401dd1f7. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
      return;
    }
    FUN_140156970(param_1[2]);
  }
  return;
}



undefined8 * FUN_1401dd210(undefined8 *param_1,uint param_2)

{
  *param_1 = Proud::CFastArray<>::vftable;
  if (param_1[2] != 0) {
    if ((longlong *)param_1[1] == (longlong *)0x0) {
      FUN_140156970(param_1[2]);
    }
    else {
      (**(code **)(*(longlong *)param_1[1] + 0x18))();
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401dd270(longlong param_1,int param_2)

{
  int iVar1;
  longlong *plVar2;
  longlong lVar3;
  int iVar4;
  undefined8 uVar5;
  undefined1 *puVar6;
  undefined1 *puVar7;
  int iVar8;
  longlong lVar9;
  undefined1 local_58 [80];
  
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (param_2 != *(int *)(param_1 + 0x18)) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar4 = FUN_1401dcff0();
      plVar2 = *(longlong **)(param_1 + 8);
      lVar9 = (longlong)iVar4;
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar2 == (longlong *)0x0) {
          uVar5 = FUN_140156940(lVar9);
          *(undefined8 *)(param_1 + 0x10) = uVar5;
        }
        else {
          uVar5 = (**(code **)(*plVar2 + 8))(plVar2,lVar9);
          *(undefined8 *)(param_1 + 0x10) = uVar5;
        }
      }
      else {
        lVar3 = *(longlong *)(param_1 + 0x10);
        if (plVar2 == (longlong *)0x0) {
          puVar6 = (undefined1 *)FUN_140156940(lVar9);
        }
        else {
          puVar6 = (undefined1 *)(**(code **)(*plVar2 + 8))();
        }
        iVar1 = *(int *)(param_1 + 0x18);
        iVar8 = 0;
        if (0 < iVar1) {
          puVar7 = puVar6;
          do {
            if (puVar7 != (undefined1 *)0x0) {
              *puVar7 = puVar7[lVar3 - (longlong)puVar6];
            }
            iVar8 = iVar8 + 1;
            puVar7 = puVar7 + 1;
          } while (iVar8 < iVar1);
        }
        if (puVar6 == (undefined1 *)0x0) {
          FUN_140156300(local_58,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_58,(ThrowInfo *)&DAT_14031d928);
        }
        plVar2 = *(longlong **)(param_1 + 8);
        if (plVar2 == (longlong *)0x0) {
          FUN_140156970(lVar3);
        }
        else {
          (**(code **)(*plVar2 + 0x18))(plVar2,lVar3);
        }
        *(undefined1 **)(param_1 + 0x10) = puVar6;
      }
      *(int *)(param_1 + 0x1c) = iVar4;
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



undefined8 FUN_1401dd3b0(undefined8 param_1,longlong param_2)

{
  int iVar1;
  undefined8 uVar2;
  undefined *puVar3;
  
  uVar2 = 0;
  puVar3 = *(undefined **)(param_2 + 0x2488);
  iVar1 = 0;
  if ((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_140320098)) {
    iVar1 = *(int *)(puVar3 + -8);
  }
  *(undefined1 *)(param_2 + 0x24c0) = 1;
  puVar3 = *(undefined **)(param_2 + 0x2488);
  if (*(undefined **)(param_2 + 0x2488) == (undefined *)0x0) {
    puVar3 = PTR_DAT_140320098;
  }
  if (*(undefined8 **)(param_2 + 0x2480) != (undefined8 *)0x0) {
    uVar2 = **(undefined8 **)(param_2 + 0x2480);
  }
  iVar1 = FUN_140186760(uVar2,puVar3 + *(int *)(param_2 + 0x2504),
                        (iVar1 - *(int *)(param_2 + 0x2504)) + 1);
  if (iVar1 != 0) {
    *(undefined1 *)(param_2 + 0x24c0) = 0;
    return 0;
  }
  return 1;
}



void FUN_1401dd430(longlong param_1,longlong param_2,int param_3)

{
  undefined1 *puVar1;
  int iVar2;
  longlong lVar3;
  longlong lVar4;
  
  if (-1 < param_3) {
    if (param_3 != 0) {
      iVar2 = *(int *)(param_1 + 0x18);
      FUN_1401dd270(param_1,iVar2 + param_3);
      lVar4 = 0;
      if (0 < param_3) {
        do {
          lVar3 = FUN_1401a7bb0(param_1);
          puVar1 = (undefined1 *)(lVar4 + param_2);
          lVar3 = lVar3 + lVar4;
          lVar4 = lVar4 + 1;
          *(undefined1 *)(lVar3 + iVar2) = *puVar1;
        } while (lVar4 < param_3);
      }
    }
    return;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566b0();
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

int FUN_1401dd4b0(short *param_1,longlong param_2,undefined4 *param_3,uint param_4)

{
  short sVar1;
  undefined1 *_Memory;
  undefined1 *_Memory_00;
  int iVar2;
  int iVar3;
  undefined1 *puVar4;
  undefined1 *puVar5;
  ulonglong uVar6;
  uint uVar7;
  short *psVar8;
  undefined1 auStack_1208 [32];
  undefined4 local_11e8 [2];
  undefined1 *local_11e0;
  longlong local_11d8;
  undefined1 *local_11d0;
  undefined4 *local_11c8;
  undefined8 local_11c0;
  undefined1 *local_11b8;
  undefined1 local_11b0 [264];
  undefined1 local_10a8 [2096];
  undefined1 local_878 [2096];
  ulonglong local_48;
  undefined8 uStack_40;
  
  uStack_40 = 0x1401dd4c6;
  local_11c0 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_1208;
  iVar3 = 0;
  local_11d8 = param_2;
  local_11c8 = param_3;
  if (param_1 == (short *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar6 = 0xffffffffffffffff;
  psVar8 = param_1;
  do {
    if (uVar6 == 0) break;
    uVar6 = uVar6 - 1;
    sVar1 = *psVar8;
    psVar8 = psVar8 + 1;
  } while (sVar1 != 0);
  local_11e0 = (undefined1 *)(~uVar6 - 1);
  iVar2 = FUN_1401a4fe0(param_1,(ulonglong)local_11e0 & 0xffffffff,0,0);
  if (iVar2 != 0) {
    uVar7 = iVar2 + 1;
    local_11d0 = (undefined1 *)0x0;
    puVar4 = local_10a8;
    if ((int)uVar7 < 1) {
      free((void *)0x0);
      iVar3 = 0;
    }
    else if ((uVar7 < 0x825) ||
            (puVar4 = malloc((longlong)(int)uVar7), local_11d0 = puVar4, puVar4 != (undefined1 *)0x0
            )) {
      _Memory_00 = local_11d0;
      iVar3 = FUN_1401a4fe0(param_1,(ulonglong)local_11e0 & 0xffffffff,puVar4,uVar7);
      puVar4[iVar3] = 0;
      puVar5 = local_878;
      local_11e0 = (undefined1 *)0x0;
      if ((param_4 < 0x825) ||
         (puVar5 = malloc((ulonglong)param_4), local_11e0 = puVar5, puVar5 != (undefined1 *)0x0)) {
        _Memory = local_11e0;
        local_11e8[0] = 0;
        iVar3 = FUN_1401dcb90(puVar4,puVar5,local_11e8,param_4);
        if (iVar3 != 0) {
          local_11b8 = local_11b0;
          FUN_140142dc0(&local_11b8,puVar5,3);
          FUN_140157cf0(local_11d8,(ulonglong)param_4,local_11b8,local_11e8[0]);
          if (local_11b8 != local_11b0) {
            free(local_11b8);
          }
        }
        if (param_3 != (undefined4 *)0x0) {
          *param_3 = local_11e8[0];
        }
        free(_Memory);
        free(_Memory_00);
      }
      else {
        free((void *)0x0);
        free(_Memory_00);
        iVar3 = 0;
      }
    }
    else {
      free((void *)0x0);
      iVar3 = 0;
    }
  }
  return iVar3;
}



undefined8 * FUN_1401dd6e0(longlong param_1,undefined8 *param_2)

{
  longlong lVar1;
  
  if (*(longlong *)(param_1 + 0x20) == 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  lVar1 = *(longlong *)(param_1 + 0x10);
  if (lVar1 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  FUN_1401568c0();
  *param_2 = PTR_DAT_1403200a0;
  FUN_14004f4f0(param_2,lVar1);
  return param_2;
}



void FUN_1401dd740(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  
  if ((*(longlong *)(param_1 + 8) != 0) &&
     (*(longlong *)(*(longlong *)(param_1 + 8) + 8) =
           *(longlong *)(*(longlong *)(param_1 + 8) + 8) + -1,
     *(longlong *)(*(longlong *)(param_1 + 8) + 8) == 0)) {
    plVar1 = *(longlong **)(param_1 + 8);
    puVar2 = (undefined8 *)*plVar1;
    if (puVar2 != (undefined8 *)0x0) {
      (**(code **)*puVar2)(puVar2,1,param_3,param_4,0xfffffffffffffffe);
    }
    FUN_140156970(plVar1);
  }
  FUN_140050520(param_1);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401dd7c0(longlong param_1,wchar_t *param_2)

{
  bool bVar1;
  bool bVar2;
  wchar_t *pwVar3;
  wchar_t wVar4;
  undefined2 uVar5;
  int iVar6;
  longlong lVar7;
  ulonglong uVar8;
  wchar_t *pwVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  undefined1 auStack_188 [32];
  int local_168;
  int local_164;
  wchar_t *local_160;
  undefined8 local_158;
  wchar_t local_148 [136];
  ulonglong local_38;
  
  local_158 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_188;
  if (param_2 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  bVar2 = false;
  bVar1 = false;
  local_164 = 0;
  local_168 = 0;
  lVar7 = (**(code **)(PTR_PTR_140322350 + 0x18))(&PTR_PTR_140322350);
  local_160 = (wchar_t *)(lVar7 + 0x18);
  if ((int)(*(int *)(lVar7 + 0xc) - 0x82aU | 1U - *(int *)(lVar7 + 0x10)) < 0) {
    FUN_1401584d0(&local_160,0x82a);
  }
  pwVar3 = local_160;
  uVar8 = 0;
  wVar4 = *param_2;
  pwVar9 = local_160;
  uVar11 = uVar8;
  if (wVar4 != L'\0') {
LAB_1401dd882:
    uVar10 = 0;
    if (0x828 < uVar8) goto LAB_1401ddc1c;
    if (wVar4 == L':') {
      if ((int)uVar11 == 0) {
        *pwVar9 = L'\0';
        if (bVar2) {
          if ((!bVar1) || (local_168 == 0)) {
            *pwVar9 = L'\0';
            pwVar9 = local_148;
            param_2 = param_2 + 1;
            wVar4 = *param_2;
            uVar8 = uVar10;
            while (((wVar4 != L'/' && (wVar4 != L'@')) && (wVar4 != L'\0'))) {
              if (0x7f < (int)uVar8) goto LAB_1401ddc1c;
              *pwVar9 = wVar4;
              pwVar9 = pwVar9 + 1;
              uVar8 = (ulonglong)((int)uVar8 + 1);
              param_2 = param_2 + 1;
              wVar4 = *param_2;
            }
            *pwVar9 = L'\0';
            uVar8 = uVar10;
            if ((local_168 == 0) && ((wVar4 == L'/' || (wVar4 == L'\0')))) {
              iVar6 = FUN_1401dcd00(param_1,pwVar3);
              if (iVar6 == 0) goto LAB_1401ddc1c;
              iVar6 = _wtoi(local_148);
              *(short *)(param_1 + 0x244c) = (short)iVar6;
              local_164 = 1;
              local_168 = 1;
              pwVar9 = pwVar3;
            }
            else {
              if ((bVar1) ||
                 (((wVar4 != L'@' || (iVar6 = FUN_1401dcdb0(param_1,pwVar3), iVar6 == 0)) ||
                  (iVar6 = FUN_1401dce60(param_1,local_148), iVar6 == 0)))) goto LAB_1401ddc1c;
              bVar1 = true;
              param_2 = param_2 + 1;
              pwVar9 = pwVar3;
            }
          }
        }
        else {
          iVar6 = FUN_1401dd090(param_1,pwVar3);
          if (iVar6 == 0) goto LAB_1401ddc1c;
          bVar2 = true;
          pwVar9 = param_2;
          if (param_2[1] == L'/') {
            pwVar9 = param_2 + 2;
            if (*pwVar9 != L'/') {
              param_2 = param_2 + 1;
              uVar8 = 0;
              pwVar9 = pwVar3;
              goto LAB_1401ddb00;
            }
            if (*(int *)(param_1 + 0x2450) == 6) goto LAB_1401ddc1c;
          }
          uVar8 = 0;
          param_2 = pwVar9 + 1;
          pwVar9 = pwVar3;
          if (*(int *)(param_1 + 0x2450) == 4) goto LAB_1401ddb00;
        }
      }
      else {
LAB_1401dda52:
        if (param_2[1] == L'\0') {
LAB_1401ddaac:
          if ((wVar4 != L'/') && (wVar4 != L'?')) {
            if (uVar8 < 0x828) {
              *pwVar9 = wVar4;
              pwVar9 = pwVar9 + 1;
              param_2 = param_2 + 1;
              goto LAB_1401ddad0;
            }
            goto LAB_1401ddc1c;
          }
          goto LAB_1401ddad0;
        }
        if (wVar4 == L'[') {
          if ((bVar2) && (local_164 == 0)) {
            uVar11 = 1;
          }
        }
        else if (wVar4 == L']') {
          uVar11 = uVar10;
        }
        *pwVar9 = wVar4;
        param_2 = param_2 + 1;
        uVar8 = uVar8 + 1;
        pwVar9 = pwVar9 + 1;
      }
    }
    else {
      if (wVar4 != L'@') {
        if ((wVar4 != L'/') && (wVar4 != L'?')) goto LAB_1401dda52;
        if (param_2[1] == L'\0') goto LAB_1401ddaac;
LAB_1401ddad0:
        *pwVar9 = L'\0';
        if ((local_164 == 0) && (iVar6 = FUN_1401dcd00(param_1,pwVar3), iVar6 == 0))
        goto LAB_1401ddc1c;
        uVar8 = 0;
        pwVar9 = pwVar3;
        goto LAB_1401ddaf7;
      }
      if (bVar1) goto LAB_1401ddc1c;
      *pwVar9 = L'\0';
      iVar6 = FUN_1401dcdb0(param_1,pwVar3);
      if (iVar6 == 0) goto LAB_1401ddc1c;
      uVar11 = 0;
      bVar1 = true;
      param_2 = param_2 + 1;
      uVar8 = 0;
      pwVar9 = pwVar3;
    }
    wVar4 = *param_2;
    if (wVar4 == L'\0') goto LAB_1401ddaf7;
    goto LAB_1401dd882;
  }
  goto LAB_1401ddc1c;
LAB_1401ddaf7:
  if (bVar2) {
LAB_1401ddb00:
    wVar4 = *param_2;
    while (wVar4 != L'\0') {
      if (0x828 < uVar8) goto LAB_1401ddc1c;
      if ((*(int *)(param_1 + 0x2450) != 4) && ((wVar4 == L'#' || (wVar4 == L'?')))) break;
      *pwVar9 = wVar4;
      pwVar9 = pwVar9 + 1;
      uVar8 = uVar8 + 1;
      param_2 = param_2 + 1;
      wVar4 = *param_2;
    }
    *pwVar9 = L'\0';
    if ((*pwVar3 == L'\0') || (iVar6 = FUN_1401a55d0(param_1,pwVar3), iVar6 != 0)) {
      uVar8 = 0;
      wVar4 = *param_2;
      pwVar9 = pwVar3;
      while (wVar4 != L'\0') {
        param_2 = param_2 + 1;
        if (0x828 < uVar8) goto LAB_1401ddc1c;
        *pwVar9 = wVar4;
        pwVar9 = pwVar9 + 1;
        uVar8 = uVar8 + 1;
        wVar4 = *param_2;
      }
      *pwVar9 = L'\0';
      if ((*pwVar3 == L'\0') || (iVar6 = FUN_1401dcf40(param_1,pwVar3), iVar6 != 0)) {
        iVar6 = *(int *)(param_1 + 0x2450);
        if ((iVar6 == 4) || ((iVar6 == 5 || (iVar6 == 6)))) {
          *(undefined2 *)(param_1 + 0x244c) = 0;
        }
        else if (local_168 == 0) {
          uVar5 = FUN_1401dcb50();
          *(undefined2 *)(param_1 + 0x244c) = uVar5;
        }
        LOCK();
        pwVar9 = pwVar3 + -4;
        iVar6 = *(int *)pwVar9;
        *(int *)pwVar9 = *(int *)pwVar9 + -1;
        UNLOCK();
        if (iVar6 + -1 < 1) {
          (**(code **)(**(longlong **)(pwVar3 + -0xc) + 8))();
        }
        return 1;
      }
    }
  }
LAB_1401ddc1c:
  FUN_1401a5680();
  LOCK();
  pwVar9 = pwVar3 + -4;
  iVar6 = *(int *)pwVar9;
  *(int *)pwVar9 = *(int *)pwVar9 + -1;
  UNLOCK();
  if (iVar6 + -1 < 1) {
    (**(code **)(**(longlong **)(pwVar3 + -0xc) + 8))();
  }
  return 0;
}



undefined8 *
FUN_1401ddc80(longlong param_1,undefined8 *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  uVar2 = 0xfffffffffffffffe;
  lVar1 = param_1 + 0x10;
  lVar3 = lVar1;
  FUN_140156b50(lVar1);
  if (*(longlong *)(param_1 + 200) == 0) {
    FUN_1401568c0();
    *param_2 = PTR_DAT_1403200a0;
  }
  else {
    FUN_1401dd6e0(param_1 + 0xa8,param_2,param_3,param_4,uVar2,lVar3,1);
  }
  FUN_140156be0(lVar1);
  return param_2;
}



void FUN_1401ddd20(longlong param_1)

{
  ulonglong *puVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  int iVar4;
  ulonglong uVar5;
  
  FUN_140156b50(param_1 + 0x10);
  uVar5 = 0;
  uVar2 = uVar5;
  while( true ) {
    iVar4 = (int)uVar2;
    if (iVar4 == *(int *)(param_1 + 0x118)) {
      uVar2 = uVar5;
      if (*(longlong *)(param_1 + 0x70) != 0) {
        uVar2 = *(ulonglong *)(param_1 + 0x60);
      }
      for (; uVar2 != 0; uVar2 = *(ulonglong *)(uVar2 + 0x10)) {
        uVar3 = uVar5;
        if (*(ulonglong **)(uVar2 + 8) != (ulonglong *)0x0) {
          uVar3 = **(ulonglong **)(uVar2 + 8);
        }
        if (*(int *)(uVar3 + 0x2490) < 4) {
          *(undefined8 *)(uVar3 + 0x2490) = 4;
        }
      }
      FUN_140156be0(param_1 + 0x10);
      return;
    }
    if ((iVar4 < 0) || (*(int *)(param_1 + 0x118) <= iVar4)) break;
    puVar1 = *(ulonglong **)(*(longlong *)(param_1 + 0x110) + (longlong)iVar4 * 8);
    uVar2 = uVar5;
    if (puVar1 != (ulonglong *)0x0) {
      uVar2 = *puVar1;
    }
    if ((*(longlong **)(uVar2 + 0x10) != (longlong *)0x0) && (**(longlong **)(uVar2 + 0x10) != 0)) {
      puVar1 = *(ulonglong **)(*(longlong *)(param_1 + 0x110) + (longlong)iVar4 * 8);
      uVar2 = uVar5;
      if (puVar1 != (ulonglong *)0x0) {
        uVar2 = *puVar1;
      }
      uVar3 = uVar5;
      if (*(ulonglong **)(uVar2 + 0x10) != (ulonglong *)0x0) {
        uVar3 = **(ulonglong **)(uVar2 + 0x10);
      }
      FUN_1401855c0(uVar3);
    }
    if (*(int *)(param_1 + 0x118) <= iVar4) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    uVar2 = (ulonglong)(iVar4 + 1);
  }
                    // WARNING: Subroutine does not return
  FUN_1401566e0();
}



// WARNING: Removing unreachable block (ram,0x0001401de03e)

void FUN_1401dde40(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  ulonglong *puVar2;
  char cVar3;
  ulonglong uVar4;
  longlong lVar5;
  ulonglong uVar6;
  int iVar7;
  ulonglong uVar8;
  undefined8 uVar9;
  longlong lVar10;
  undefined1 uVar11;
  undefined8 local_40;
  undefined **local_38;
  undefined4 local_30;
  undefined2 local_2c;
  undefined4 local_28;
  
  uVar9 = 0xfffffffffffffffe;
  lVar1 = param_1 + 0x10;
  uVar8 = 0;
  while( true ) {
    lVar10 = lVar1;
    FUN_140156b50(lVar1);
    uVar11 = 1;
    lVar5 = lVar1;
    if (DAT_140328940 != '\0') break;
    local_38 = Proud::AddrPort::vftable;
    local_28 = 0;
    local_40 = 0;
    local_30 = DAT_140320450;
    local_2c = DAT_140320454;
    uVar6 = uVar8;
    lVar5 = lVar10;
    while (iVar7 = (int)uVar6, iVar7 != *(int *)(param_1 + 0x118)) {
      if ((iVar7 < 0) || (*(int *)(param_1 + 0x118) <= iVar7)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      puVar2 = *(ulonglong **)(*(longlong *)(param_1 + 0x110) + (longlong)iVar7 * 8);
      uVar6 = uVar8;
      if (puVar2 != (ulonglong *)0x0) {
        uVar6 = *puVar2;
      }
      if ((*(longlong **)(uVar6 + 0x10) != (longlong *)0x0) &&
         (lVar10 = **(longlong **)(uVar6 + 0x10), lVar10 != 0)) {
        cVar3 = FUN_140185280(lVar10,0,&local_40,param_4,uVar9,lVar5,uVar11);
        if (cVar3 != '\0') {
          *(undefined1 *)(uVar6 + 0xc0) = 0;
        }
        uVar4 = uVar8;
        if (*(ulonglong **)(uVar6 + 0x10) != (ulonglong *)0x0) {
          uVar4 = **(ulonglong **)(uVar6 + 0x10);
        }
        cVar3 = FUN_1401854f0(uVar4,0,&local_40);
        if (cVar3 != '\0') {
          *(undefined1 *)(uVar6 + 0x80) = 0;
        }
      }
      if (((*(longlong **)(uVar6 + 0x10) != (longlong *)0x0) && (**(longlong **)(uVar6 + 0x10) != 0)
          ) && ((cVar3 = FUN_140185860(), cVar3 == '\0' ||
                ((*(char *)(uVar6 + 0xc0) != '\0' || (*(char *)(uVar6 + 0x80) != '\0'))))))
      goto LAB_1401de017;
      if (*(int *)(param_1 + 0x118) <= iVar7) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      uVar6 = (ulonglong)(iVar7 + 1);
    }
    uVar6 = uVar8;
    if (*(longlong *)(param_1 + 0x70) != 0) {
      uVar6 = *(ulonglong *)(param_1 + 0x60);
    }
    while( true ) {
      uVar4 = uVar6;
      if (uVar4 == 0) goto LAB_1401de053;
      uVar6 = uVar8;
      if (*(ulonglong **)(uVar4 + 8) != (ulonglong *)0x0) {
        uVar6 = **(ulonglong **)(uVar4 + 8);
      }
      if (((*(longlong **)(uVar6 + 0x2480) != (longlong *)0x0) &&
          (**(longlong **)(uVar6 + 0x2480) != 0)) &&
         ((cVar3 = FUN_140185860(), cVar3 == '\0' ||
          ((*(char *)(uVar6 + 0x2500) != '\0' || (*(char *)(uVar6 + 0x24c0) != '\0')))))) break;
      uVar6 = uVar8;
      if (uVar4 != 0) {
        uVar6 = *(ulonglong *)(uVar4 + 0x10);
      }
    }
LAB_1401de017:
    FUN_140156be0(lVar5);
    Sleep(10);
  }
LAB_1401de053:
  FUN_140156be0(lVar5);
  return;
}



longlong * FUN_1401de080(longlong *param_1)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  undefined *puVar4;
  int iVar5;
  
  puVar4 = (undefined *)*param_1;
  if (puVar4 == (undefined *)0x0) {
    iVar5 = 0;
  }
  else if (puVar4 == PTR_DAT_140320098) {
    iVar5 = 0;
  }
  else {
    iVar5 = *(int *)(puVar4 + -8);
  }
  if (puVar4 == (undefined *)0x0) {
    iVar2 = 0;
  }
  else if (puVar4 == PTR_DAT_140320098) {
    iVar2 = 0;
  }
  else {
    iVar2 = *(int *)(puVar4 + -8);
  }
  iVar3 = iVar5;
  if (iVar5 <= iVar2) {
    if (puVar4 == (undefined *)0x0) {
      iVar3 = 0;
    }
    else if (puVar4 == PTR_DAT_140320098) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(puVar4 + -8);
    }
  }
  iVar2 = 1;
  if (1 < iVar3) {
    iVar2 = iVar3;
  }
  iVar3 = 0;
  if (puVar4 != (undefined *)0x0) {
    if (puVar4 == PTR_DAT_140320098) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(puVar4 + -8);
    }
  }
  if (iVar3 < iVar2) {
    FUN_140124200(param_1,iVar2);
  }
  FUN_1401242e0(param_1);
  puVar4 = (undefined *)*param_1;
  if ((undefined *)*param_1 == (undefined *)0x0) {
    puVar4 = PTR_DAT_140320098;
  }
  FUN_140156870(puVar4,(longlong)(iVar5 + 1));
  puVar4 = (undefined *)*param_1;
  iVar2 = 0;
  if (0 < iVar5) {
    iVar2 = iVar5;
  }
  if (puVar4 == (undefined *)0x0) {
    iVar5 = 0;
  }
  else if (puVar4 == PTR_DAT_140320098) {
    iVar5 = 0;
  }
  else {
    iVar5 = *(int *)(puVar4 + -8);
  }
  if (iVar5 <= iVar2) {
    if (puVar4 == (undefined *)0x0) {
      iVar2 = 0;
    }
    else if (puVar4 == PTR_DAT_140320098) {
      iVar2 = 0;
    }
    else {
      iVar2 = *(int *)(puVar4 + -8);
    }
  }
  if (((puVar4 != PTR_DAT_140320098) && (puVar4 != (undefined *)0x0)) &&
     (piVar1 = (int *)(puVar4 + -8), piVar1 != (int *)0x0)) {
    *piVar1 = iVar2;
    *(undefined1 *)((longlong)iVar2 + 8 + (longlong)piVar1) = 0;
  }
  return param_1;
}



undefined8 * FUN_1401de1a0(longlong *param_1,undefined8 *param_2,int param_3,int param_4)

{
  int iVar1;
  undefined *puVar2;
  int iVar3;
  int iVar4;
  
  iVar3 = 0;
  iVar4 = 0;
  puVar2 = (undefined *)*param_1;
  if (param_3 < 0) {
    param_3 = 0;
  }
  if (param_4 < 0) {
    param_4 = iVar3;
  }
  iVar1 = 0;
  if ((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_140320098)) {
    iVar1 = *(int *)(puVar2 + -8);
  }
  if (iVar1 < param_3 + param_4) {
    param_4 = iVar3;
    if ((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_140320098)) {
      param_4 = *(int *)(puVar2 + -8);
    }
    param_4 = param_4 - param_3;
  }
  iVar1 = iVar3;
  if ((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_140320098)) {
    iVar1 = *(int *)(puVar2 + -8);
  }
  if (iVar1 < param_3) {
    param_4 = iVar3;
  }
  if (param_3 == 0) {
    if ((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_140320098)) {
      iVar4 = *(int *)(puVar2 + -8);
    }
    if (param_4 == iVar4) {
      FUN_1401568c0();
      *param_2 = PTR_DAT_140320098;
      FUN_140050450(param_2,param_1);
      return param_2;
    }
  }
  if (puVar2 == (undefined *)0x0) {
    puVar2 = PTR_DAT_140320098;
  }
  FUN_140124540(param_2,puVar2 + param_3,param_4);
  return param_2;
}



void FUN_1401de290(longlong *param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 *puVar2;
  int iVar3;
  
  if (0 < param_2) {
    iVar3 = 0;
    do {
      if ((*param_1 != 0) &&
         (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
         *(longlong *)(*param_1 + 8) == 0)) {
        plVar1 = (longlong *)*param_1;
        puVar2 = (undefined8 *)*plVar1;
        if (puVar2 != (undefined8 *)0x0) {
          (**(code **)*puVar2)(puVar2,1);
        }
        FUN_140156970(plVar1);
      }
      iVar3 = iVar3 + 1;
      param_1 = param_1 + 1;
    } while (iVar3 < param_2);
  }
  return;
}



void FUN_1401de320(longlong *param_1,longlong param_2,longlong param_3)

{
  undefined8 *puVar1;
  uint uVar2;
  longlong *plVar4;
  longlong *plVar5;
  longlong *plVar3;
  
  if (0 < param_3) {
    plVar5 = (longlong *)0x0;
    param_2 = param_2 - (longlong)param_1;
    plVar3 = plVar5;
    do {
      if (param_1 != (longlong *)0x0) {
        *param_1 = 0;
        if (*(longlong *)((longlong)param_1 + param_2) != 0) {
          *(longlong *)(*(longlong *)((longlong)param_1 + param_2) + 8) =
               *(longlong *)(*(longlong *)((longlong)param_1 + param_2) + 8) + 1;
          plVar4 = plVar5;
          if ((*param_1 != 0) &&
             (*(longlong *)(*param_1 + 8) = *(longlong *)(*param_1 + 8) + -1,
             *(longlong *)(*param_1 + 8) == 0)) {
            plVar4 = (longlong *)*param_1;
          }
          *param_1 = *(longlong *)((longlong)param_1 + param_2);
          if (plVar4 != (longlong *)0x0) {
            puVar1 = (undefined8 *)*plVar4;
            if (puVar1 != (undefined8 *)0x0) {
              (**(code **)*puVar1)(puVar1,1);
            }
            FUN_140156970(plVar4);
          }
        }
      }
      uVar2 = (int)plVar3 + 1;
      plVar3 = (longlong *)(ulonglong)uVar2;
      param_1 = param_1 + 1;
    } while ((int)uVar2 < param_3);
  }
  return;
}



void FUN_1401de400(longlong param_1,undefined8 param_2,ulonglong param_3)

{
  int iVar1;
  
  FUN_1401a5680();
  iVar1 = FUN_1401dd7c0(param_1,param_2);
  if ((((param_3 & 1) != 0) || ((param_3 & 4) != 0)) && (iVar1 != 0)) {
    if (*(int *)(param_1 + 0x245c) != 0) {
      iVar1 = FUN_1401dd4b0(param_1 + 0x244,param_1 + 0x244,param_1 + 0x245c,0x81);
      if (iVar1 == 0) {
        return;
      }
      *(int *)(param_1 + 0x245c) = *(int *)(param_1 + 0x245c) + -1;
    }
    if (*(int *)(param_1 + 0x2460) != 0) {
      iVar1 = FUN_1401dd4b0(param_1 + 0x346,param_1 + 0x346,param_1 + 0x2460,0x81);
      if (iVar1 == 0) {
        return;
      }
      *(int *)(param_1 + 0x2460) = *(int *)(param_1 + 0x2460) + -1;
    }
    if (*(int *)(param_1 + 0x2458) != 0) {
      iVar1 = FUN_1401dd4b0(param_1 + 0x42,param_1 + 0x42,param_1 + 0x2458,0x101);
      if (iVar1 == 0) {
        return;
      }
      *(int *)(param_1 + 0x2458) = *(int *)(param_1 + 0x2458) + -1;
    }
    if (*(int *)(param_1 + 0x2464) != 0) {
      iVar1 = FUN_1401dd4b0(param_1 + 0x448,param_1 + 0x448,param_1 + 0x2464,0x801);
      if (iVar1 == 0) {
        return;
      }
      *(int *)(param_1 + 0x2464) = *(int *)(param_1 + 0x2464) + -1;
    }
    if ((*(int *)(param_1 + 0x2468) != 0) &&
       (iVar1 = FUN_1401dd4b0(param_1 + 0x144a,param_1 + 0x144a,param_1 + 0x2468,0x801), iVar1 != 0)
       ) {
      *(int *)(param_1 + 0x2468) = *(int *)(param_1 + 0x2468) + -1;
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401de540(longlong param_1,longlong *param_2)

{
  int *piVar1;
  int iVar2;
  char *pcVar3;
  undefined *puVar4;
  longlong *plVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  char *pcVar8;
  undefined *puVar9;
  int iVar10;
  undefined1 auStack_1a8 [32];
  undefined8 local_188;
  undefined1 local_180;
  undefined *local_178;
  undefined *local_170;
  longlong *local_168;
  undefined8 local_160;
  undefined8 local_158;
  undefined1 local_150;
  undefined1 *local_148;
  undefined1 local_140 [264];
  ulonglong local_38;
  
  local_160 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_1a8;
  local_168 = param_2;
  FUN_1401568c0();
  puVar9 = PTR_DAT_140320098;
  local_178 = PTR_DAT_140320098;
  pcVar3 = (char *)*param_2;
  pcVar8 = PTR_DAT_140320098;
  if (((pcVar3 == (char *)0x0) || (pcVar8 = pcVar3, pcVar3 == PTR_DAT_140320098)) ||
     (-1 < *(int *)(pcVar3 + -8))) {
    pcVar3 = strstr(pcVar8,"http");
    iVar2 = -1;
    if (pcVar3 != (char *)0x0) {
      puVar4 = (undefined *)*param_2;
      if ((undefined *)*param_2 == (undefined *)0x0) {
        puVar4 = PTR_DAT_140320098;
      }
      iVar2 = (int)pcVar3 - (int)puVar4;
    }
  }
  else {
    iVar2 = -1;
  }
  pcVar3 = (char *)*param_2;
  pcVar8 = PTR_DAT_140320098;
  if ((((pcVar3 == (char *)0x0) || (pcVar8 = pcVar3, pcVar3 == PTR_DAT_140320098)) ||
      (iVar10 = -1, -1 < *(int *)(pcVar3 + -8))) &&
     (pcVar3 = strstr(pcVar8,".xml"), iVar10 = -1, pcVar3 != (char *)0x0)) {
    puVar4 = (undefined *)*param_2;
    if ((undefined *)*param_2 == (undefined *)0x0) {
      puVar4 = PTR_DAT_140320098;
    }
    iVar10 = (int)pcVar3 - (int)puVar4;
  }
  if ((iVar2 < iVar10) && (-1 < iVar2)) {
    plVar5 = (longlong *)FUN_1401de1a0(param_2,&local_170,iVar2,(iVar10 - iVar2) + 4);
    if (puVar9 == (undefined *)0x0) {
      puVar9 = PTR_DAT_140320098;
    }
    local_178 = puVar9;
    if ((undefined *)*plVar5 != puVar9) {
      uVar6 = FUN_1401568c0();
      local_158 = uVar6;
      FUN_140156b50(uVar6);
      local_150 = 1;
      if (((puVar9 != (undefined *)0x0) && (puVar9 != PTR_DAT_140320098)) &&
         (puVar9 + -8 != (undefined *)0x0)) {
        uVar7 = FUN_1401568c0();
        local_188 = uVar7;
        FUN_140156b50(uVar7);
        local_180 = 1;
        piVar1 = (int *)(puVar9 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar9 + -8);
        }
        FUN_140156be0(uVar7);
      }
      puVar9 = (undefined *)*plVar5;
      if (((puVar9 != PTR_DAT_140320098) && (puVar9 != (undefined *)0x0)) &&
         (puVar9 != (undefined *)0x8)) {
        *(int *)(puVar9 + -4) = *(int *)(puVar9 + -4) + 1;
      }
      local_178 = puVar9;
      FUN_140156be0(uVar6);
    }
    if (((local_170 != (undefined *)0x0) && (local_170 != PTR_DAT_140320098)) &&
       (local_170 + -8 != (undefined *)0x0)) {
      uVar6 = FUN_1401568c0();
      local_188 = uVar6;
      FUN_140156b50(uVar6);
      local_180 = 1;
      piVar1 = (int *)(local_170 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_170 + -8);
      }
      FUN_140156be0(uVar6);
    }
  }
  puVar4 = puVar9;
  if (puVar9 == (undefined *)0x0) {
    puVar4 = PTR_DAT_140320098;
  }
  local_148 = local_140;
  FUN_140142dc0(&local_148,puVar4,3);
  iVar2 = FUN_1401de400(param_1 + 0x10,local_148,0);
  if (local_148 != local_140) {
    free(local_148);
  }
  if (iVar2 == 0) {
    if (((puVar9 != (undefined *)0x0) && (puVar9 != PTR_DAT_140320098)) &&
       (puVar9 + -8 != (undefined *)0x0)) {
      uVar6 = FUN_1401568c0();
      local_188 = uVar6;
      FUN_140156b50(uVar6);
      local_180 = 1;
      piVar1 = (int *)(puVar9 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar9 + -8);
      }
      FUN_140156be0(uVar6);
    }
    FUN_140050520(param_2);
    uVar6 = 0;
  }
  else if (param_1 == 0x140288b2e) {
    if (((puVar9 != (undefined *)0x0) && (puVar9 != PTR_DAT_140320098)) &&
       (puVar9 + -8 != (undefined *)0x0)) {
      uVar6 = FUN_1401568c0();
      local_188 = uVar6;
      FUN_140156b50(uVar6);
      local_180 = 1;
      piVar1 = (int *)(puVar9 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar9 + -8);
      }
      FUN_140156be0(uVar6);
    }
    FUN_140050520(param_2);
    uVar6 = 0;
  }
  else {
    if (((puVar9 != (undefined *)0x0) && (puVar9 != PTR_DAT_140320098)) &&
       (puVar9 + -8 != (undefined *)0x0)) {
      uVar6 = FUN_1401568c0();
      local_188 = uVar6;
      FUN_140156b50(uVar6);
      local_180 = 1;
      piVar1 = (int *)(puVar9 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar9 + -8);
      }
      FUN_140156be0(uVar6);
    }
    FUN_140050520(param_2);
    uVar6 = 1;
  }
  return uVar6;
}



void FUN_1401de8d0(undefined8 *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  
  *param_1 = Proud::CDiscoveringNatDevice::vftable;
  FUN_140050520(param_1 + 0x4a7);
  param_1[0x4a2] = Proud::CFastArray<>::vftable;
  if (param_1[0x4a4] != 0) {
    if ((longlong *)param_1[0x4a3] == (longlong *)0x0) {
      FUN_140156970(param_1[0x4a4]);
    }
    else {
      (**(code **)(*(longlong *)param_1[0x4a3] + 0x18))();
    }
  }
  FUN_140050520(param_1 + 0x491);
  if ((param_1[0x490] != 0) &&
     (*(longlong *)(param_1[0x490] + 8) = *(longlong *)(param_1[0x490] + 8) + -1,
     *(longlong *)(param_1[0x490] + 8) == 0)) {
    plVar1 = (longlong *)param_1[0x490];
    lVar2 = *plVar1;
    if (lVar2 != 0) {
      FUN_1401859b0(lVar2);
      FUN_140156970(lVar2);
    }
    FUN_140156970(plVar1);
  }
  FUN_140050520(param_1 + 1);
  *param_1 = Proud::IFastSocketDelegate::vftable;
  return;
}



void * FUN_1401de9d0(void *param_1,uint param_2)

{
  FUN_1401de8d0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 * FUN_1401dea00(undefined8 *param_1)

{
  *param_1 = Proud::CDiscoveringNatDevice::vftable;
  FUN_1401568c0();
  param_1[1] = PTR_DAT_140320098;
  FUN_1401a5850(param_1 + 2);
  param_1[0x490] = 0;
  FUN_1401568c0();
  param_1[0x491] = PTR_DAT_140320098;
  param_1[0x4a2] = Proud::CFastArray<>::vftable;
  param_1[0x4a3] = 0;
  param_1[0x4a4] = 0;
  param_1[0x4a5] = 0;
  param_1[0x4a6] = 0;
  FUN_1401568c0();
  param_1[0x4a7] = PTR_DAT_140320098;
  *(undefined1 *)(param_1 + 0x498) = 0;
  *(undefined1 *)(param_1 + 0x4a0) = 0;
  *(undefined8 *)((longlong)param_1 + 0x2504) = 0;
  param_1[0x492] = 0;
  return param_1;
}



undefined8 FUN_1401dead0(undefined8 param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined2 uVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  int iVar5;
  uint *puVar6;
  uint *puVar7;
  uint *puVar8;
  uint uVar9;
  uint uVar10;
  uint *puVar11;
  uint *local_res10;
  uint *local_res18 [2];
  undefined8 uVar12;
  
  uVar12 = 0xfffffffffffffffe;
  FUN_1401568c0();
  puVar8 = (uint *)PTR_DAT_1403200a0;
  local_res10 = (uint *)PTR_DAT_1403200a0;
  uVar2 = FUN_140156740(param_2 + 0x52);
  puVar11 = (uint *)0x0;
  uVar10 = 0;
  puVar6 = puVar11;
  if ((puVar8 != (uint *)0x0) && (puVar6 = (uint *)0x0, puVar8 != (uint *)PTR_DAT_1403200a0)) {
    puVar6 = (uint *)(ulonglong)*(uint *)((longlong)puVar8 + -8);
  }
  uVar3 = uVar2;
  if ((((int)uVar2 <= (int)puVar6) && (uVar3 = uVar10, puVar8 != (uint *)0x0)) &&
     (puVar8 != (uint *)PTR_DAT_1403200a0)) {
    uVar3 = *(uint *)((longlong)puVar8 + -8);
  }
  uVar9 = 1;
  if (1 < (int)uVar3) {
    uVar9 = uVar3;
  }
  uVar3 = uVar10;
  if ((puVar8 != (uint *)0x0) && (puVar8 != (uint *)PTR_DAT_1403200a0)) {
    uVar3 = *(uint *)((longlong)puVar8 + -8);
  }
  uVar4 = 0;
  if ((int)uVar3 < (int)uVar9) {
    if (puVar8 == (uint *)0x0) {
      puVar8 = (uint *)PTR_DAT_1403200a0;
    }
    local_res10 = puVar8;
    if ((int)uVar9 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar9 == 0) {
      FUN_14004f990(&local_res10);
    }
    else {
      uVar3 = uVar10;
      if ((puVar8 != (uint *)0x0) && (puVar8 != (uint *)PTR_DAT_1403200a0)) {
        uVar3 = puVar8[-2];
      }
      if (uVar9 != uVar3) {
        puVar6 = (uint *)FUN_140156940((longlong)(int)uVar9 * 2 + 10);
        if (puVar6 != (uint *)0x0) {
          *puVar6 = 0;
          puVar6[1] = 1;
        }
        *puVar6 = uVar9;
        uVar3 = uVar4;
        if ((puVar8 != (uint *)0x0) && (puVar8 != (uint *)PTR_DAT_1403200a0)) {
          uVar3 = puVar8[-2];
        }
        puVar7 = (uint *)PTR_DAT_1403200a0;
        if ((int)uVar9 < (int)uVar3) {
LAB_1401debd3:
          if (puVar8 != (uint *)0x0) {
            puVar7 = puVar8;
          }
        }
        else {
          uVar9 = uVar10;
          if (puVar8 != (uint *)0x0) {
            if (puVar8 != (uint *)PTR_DAT_1403200a0) {
              uVar9 = puVar8[-2];
            }
            goto LAB_1401debd3;
          }
        }
        FUN_140156770(puVar6 + 2,puVar7,uVar9,param_4,uVar12);
        FUN_14004f990(&local_res10);
        local_res10 = puVar6 + 2;
      }
    }
  }
  FUN_14004f670(&local_res10);
  puVar8 = local_res10;
  puVar6 = local_res10;
  if (local_res10 == (uint *)0x0) {
    puVar6 = (uint *)PTR_DAT_1403200a0;
  }
  FUN_140156770(puVar6,param_2 + 0x52,uVar2,param_4,uVar12);
  puVar6 = puVar8;
  if (puVar8 == (uint *)0x0) {
    puVar6 = (uint *)PTR_DAT_1403200a0;
  }
  uVar2 = FUN_140156740(puVar6);
  puVar6 = puVar11;
  if (0 < (int)uVar2) {
    puVar6 = (uint *)(ulonglong)uVar2;
  }
  if ((puVar8 != (uint *)0x0) && (puVar8 != (uint *)PTR_DAT_1403200a0)) {
    uVar4 = puVar8[-2];
  }
  if (((int)uVar4 <= (int)puVar6) && (puVar6 = puVar11, puVar8 != (uint *)0x0)) {
    if (puVar8 == (uint *)PTR_DAT_1403200a0) goto LAB_1401dec83;
    puVar6 = (uint *)(ulonglong)puVar8[-2];
  }
  if (((puVar8 != (uint *)PTR_DAT_1403200a0) && (puVar8 != (uint *)0x0)) &&
     (puVar8 + -2 != (uint *)0x0)) {
    puVar8[-2] = (uint)puVar6;
    *(undefined2 *)((longlong)puVar8 + (longlong)(int)(uint)puVar6 * 2) = 0;
  }
LAB_1401dec83:
  uVar1 = *(undefined2 *)(param_2 + 0x245c);
  FUN_1401568c0();
  local_res18[0] = (uint *)PTR_DAT_1403200a0;
  if (PTR_DAT_1403200a0 == (undefined *)0x0) {
    local_res18[0] = puVar11;
  }
  if (puVar8 != (uint *)PTR_DAT_1403200a0) {
    uVar12 = FUN_1401568c0();
    FUN_140156b50(uVar12);
    FUN_14004f990(local_res18);
    local_res18[0] = puVar8;
    if (((puVar8 != (uint *)PTR_DAT_1403200a0) && (puVar8 != (uint *)0x0)) &&
       (puVar8 != (uint *)0x8)) {
      puVar8[-1] = puVar8[-1] + 1;
    }
    FUN_140156be0(uVar12);
  }
  if (*(undefined8 **)(param_2 + 0x2480) != (undefined8 *)0x0) {
    puVar11 = (uint *)**(undefined8 **)(param_2 + 0x2480);
  }
  iVar5 = FUN_140186000(puVar11,local_res18,uVar1);
  if ((iVar5 == 0) || (iVar5 == 0x2733)) {
    if ((puVar8 != (uint *)0x0) &&
       ((puVar8 != (uint *)PTR_DAT_1403200a0 && (puVar8 + -2 != (uint *)0x0)))) {
      uVar12 = FUN_1401568c0();
      FUN_140156b50(uVar12);
      puVar11 = puVar8 + -1;
      *puVar11 = *puVar11 - 1;
      if (*puVar11 == 0) {
        FUN_140156970(puVar8 + -2);
      }
      FUN_140156be0(uVar12);
    }
    uVar12 = 1;
  }
  else {
    if (((puVar8 != (uint *)0x0) && (puVar8 != (uint *)PTR_DAT_1403200a0)) &&
       (puVar8 + -2 != (uint *)0x0)) {
      uVar12 = FUN_1401568c0();
      FUN_140156b50(uVar12);
      puVar11 = puVar8 + -1;
      *puVar11 = *puVar11 - 1;
      if (*puVar11 == 0) {
        FUN_140156970(puVar8 + -2);
      }
      FUN_140156be0(uVar12);
    }
    uVar12 = 0;
  }
  return uVar12;
}



undefined8 *
FUN_1401dedd0(undefined8 param_1,undefined8 *param_2,longlong *param_3,longlong *param_4)

{
  int *piVar1;
  char *pcVar2;
  undefined *puVar3;
  char *pcVar4;
  char *pcVar5;
  char *pcVar6;
  char *_Str;
  int iVar7;
  int iVar8;
  char *local_48;
  char *local_40;
  undefined1 local_38;
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  FUN_1401568c0();
  local_48 = PTR_DAT_140320098;
  puVar3 = (undefined *)*param_4;
  if ((undefined *)*param_4 == (undefined *)0x0) {
    puVar3 = PTR_DAT_140320098;
  }
  FUN_1401592d0(&local_48,&DAT_14029580c,puVar3);
  pcVar2 = local_48;
  pcVar5 = local_48;
  if (local_48 == (char *)0x0) {
    pcVar5 = PTR_DAT_140320098;
  }
  if (pcVar5 == (char *)0x0) {
    iVar7 = -1;
  }
  else {
    pcVar4 = (char *)*param_3;
    pcVar6 = PTR_DAT_140320098;
    if (((pcVar4 == (char *)0x0) || (pcVar6 = pcVar4, pcVar4 == PTR_DAT_140320098)) ||
       (iVar7 = -1, -1 < *(int *)(pcVar4 + -8))) {
      pcVar5 = strstr(pcVar6,pcVar5);
      if (pcVar5 == (char *)0x0) {
        iVar7 = -1;
      }
      else {
        puVar3 = (undefined *)*param_3;
        if ((undefined *)*param_3 == (undefined *)0x0) {
          puVar3 = PTR_DAT_140320098;
        }
        iVar7 = (int)pcVar5 - (int)puVar3;
        if (-1 < iVar7) {
          iVar8 = 0;
          if ((pcVar2 != (char *)0x0) && (iVar8 = 0, pcVar2 != PTR_DAT_140320098)) {
            iVar8 = *(int *)(pcVar2 + -8);
          }
          iVar7 = iVar7 + iVar8;
        }
      }
    }
  }
  FUN_1401568c0();
  local_40 = PTR_DAT_140320098;
  puVar3 = (undefined *)*param_4;
  if ((undefined *)*param_4 == (undefined *)0x0) {
    puVar3 = PTR_DAT_140320098;
  }
  FUN_1401592d0(&local_40,"</%s>",puVar3);
  pcVar5 = local_40;
  pcVar4 = local_40;
  if (local_40 == (char *)0x0) {
    pcVar4 = PTR_DAT_140320098;
  }
  iVar8 = -1;
  if ((pcVar4 != (char *)0x0) &&
     ((((pcVar6 = (char *)*param_3, _Str = PTR_DAT_140320098, iVar8 = -1, pcVar6 == (char *)0x0 ||
        (_Str = pcVar6, pcVar6 == PTR_DAT_140320098)) || (-1 < *(int *)(pcVar6 + -8))) &&
      (pcVar4 = strstr(_Str,pcVar4), pcVar4 != (char *)0x0)))) {
    puVar3 = (undefined *)*param_3;
    if ((undefined *)*param_3 == (undefined *)0x0) {
      puVar3 = PTR_DAT_140320098;
    }
    iVar8 = (int)pcVar4 - (int)puVar3;
  }
  if (((iVar7 < 0) || (iVar8 < 0)) || (iVar8 <= iVar7)) {
    FUN_1401568c0();
    *param_2 = PTR_DAT_140320098;
    if (((pcVar5 != (char *)0x0) && (pcVar5 != PTR_DAT_140320098)) && (pcVar5 + -8 != (char *)0x0))
    {
      pcVar4 = (char *)FUN_1401568c0();
      local_40 = pcVar4;
      FUN_140156b50(pcVar4);
      local_38 = 1;
      piVar1 = (int *)(pcVar5 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(pcVar5 + -8);
      }
      FUN_140156be0(pcVar4);
    }
    if (pcVar2 == (char *)0x0) {
      return param_2;
    }
    if (pcVar2 == PTR_DAT_140320098) {
      return param_2;
    }
    if (pcVar2 + -8 == (char *)0x0) {
      return param_2;
    }
    pcVar5 = (char *)FUN_1401568c0();
    local_40 = pcVar5;
    FUN_140156b50(pcVar5);
    local_38 = 1;
    piVar1 = (int *)(pcVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(pcVar2 + -8);
    }
  }
  else {
    FUN_1401de1a0(param_3,param_2,iVar7,iVar8 - iVar7);
    if (((pcVar5 != (char *)0x0) && (pcVar5 != PTR_DAT_140320098)) && (pcVar5 + -8 != (char *)0x0))
    {
      pcVar4 = (char *)FUN_1401568c0();
      local_40 = pcVar4;
      FUN_140156b50(pcVar4);
      local_38 = 1;
      piVar1 = (int *)(pcVar5 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(pcVar5 + -8);
      }
      FUN_140156be0(pcVar4);
    }
    if (pcVar2 == (char *)0x0) {
      return param_2;
    }
    if (pcVar2 == PTR_DAT_140320098) {
      return param_2;
    }
    if (pcVar2 + -8 == (char *)0x0) {
      return param_2;
    }
    pcVar5 = (char *)FUN_1401568c0();
    local_40 = pcVar5;
    FUN_140156b50(pcVar5);
    local_38 = 1;
    piVar1 = (int *)(pcVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(pcVar2 + -8);
    }
  }
  FUN_140156be0(pcVar5);
  return param_2;
}



void FUN_1401df0b0(longlong param_1)

{
  ulonglong *puVar1;
  longlong lVar2;
  longlong lVar3;
  undefined8 *puVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  longlong lVar7;
  ulonglong uVar8;
  int iVar9;
  double dVar10;
  ulonglong *local_res8;
  
  FUN_140156b50(param_1 + 0x10);
  dVar10 = (double)FUN_1401d3e30(*(undefined8 *)(param_1 + 8));
  if (600.0 < dVar10 - *(double *)(param_1 + 0x128)) {
    uVar8 = 0;
    uVar5 = uVar8;
    while (iVar9 = (int)uVar5, iVar9 != *(int *)(param_1 + 0x118)) {
      if ((iVar9 < 0) || (*(int *)(param_1 + 0x118) <= iVar9)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      lVar7 = (longlong)iVar9;
      lVar2 = *(longlong *)(param_1 + 0x110);
      local_res8 = (ulonglong *)0x0;
      lVar3 = *(longlong *)(lVar2 + lVar7 * 8);
      if (lVar3 != 0) {
        *(longlong *)(*(longlong *)(lVar2 + lVar7 * 8) + 8) = *(longlong *)(lVar3 + 8) + 1;
        local_res8 = *(ulonglong **)(lVar2 + lVar7 * 8);
      }
      uVar5 = uVar8;
      if (local_res8 != (ulonglong *)0x0) {
        uVar5 = *local_res8;
      }
      if ((*(longlong **)(uVar5 + 0x10) != (longlong *)0x0) && (**(longlong **)(uVar5 + 0x10) != 0))
      {
        uVar5 = uVar8;
        if (local_res8 != (ulonglong *)0x0) {
          uVar5 = *local_res8;
        }
        uVar6 = uVar8;
        if (*(ulonglong **)(uVar5 + 0x10) != (ulonglong *)0x0) {
          uVar6 = **(ulonglong **)(uVar5 + 0x10);
        }
        FUN_1401855c0(uVar6);
      }
      if (local_res8 != (ulonglong *)0x0) {
        puVar1 = local_res8 + 1;
        *puVar1 = *puVar1 - 1;
        if (*puVar1 == 0) {
          puVar4 = (undefined8 *)*local_res8;
          if (puVar4 != (undefined8 *)0x0) {
            (**(code **)*puVar4)(puVar4,1);
          }
          FUN_140156970(local_res8);
        }
      }
      if (*(int *)(param_1 + 0x118) <= iVar9) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      uVar5 = (ulonglong)(iVar9 + 1);
    }
    uVar5 = uVar8;
    if (*(longlong *)(param_1 + 0x70) != 0) {
      uVar5 = *(ulonglong *)(param_1 + 0x60);
    }
    for (; uVar5 != 0; uVar5 = *(ulonglong *)(uVar5 + 0x10)) {
      uVar6 = uVar8;
      if (*(ulonglong **)(uVar5 + 8) != (ulonglong *)0x0) {
        uVar6 = **(ulonglong **)(uVar5 + 8);
      }
      if (*(int *)(uVar6 + 0x2490) < 4) {
        *(undefined8 *)(uVar6 + 0x2490) = 4;
      }
    }
  }
  FUN_140156be0(param_1 + 0x10);
  return;
}



void FUN_1401df260(undefined8 *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  
  FUN_1401858d0(param_1 + 4);
  if ((param_1[2] != 0) &&
     (*(longlong *)(param_1[2] + 8) = *(longlong *)(param_1[2] + 8) + -1,
     *(longlong *)(param_1[2] + 8) == 0)) {
    plVar1 = (longlong *)param_1[2];
    lVar2 = *plVar1;
    if (lVar2 != 0) {
      FUN_1401859b0(lVar2);
      FUN_140156970(lVar2);
    }
    FUN_140156970(plVar1);
  }
  FUN_140050520(param_1 + 1);
  *param_1 = Proud::IFastSocketDelegate::vftable;
  return;
}



void FUN_1401df300(undefined8 *param_1)

{
  longlong *plVar1;
  
  *param_1 = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 3)) {
    FUN_1401de290(param_1[2],(longlong)*(int *)(param_1 + 3));
  }
  if (param_1[2] != 0) {
    plVar1 = (longlong *)param_1[1];
    if (plVar1 != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x0001401df347. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*plVar1 + 0x18))(plVar1,param_1[2]);
      return;
    }
    FUN_140156970();
  }
  return;
}



undefined8 * FUN_1401df360(undefined8 *param_1,uint param_2)

{
  longlong *plVar1;
  
  *param_1 = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 3)) {
    FUN_1401de290(param_1[2],(longlong)*(int *)(param_1 + 3));
  }
  if (param_1[2] != 0) {
    plVar1 = (longlong *)param_1[1];
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,param_1[2]);
    }
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401df3d0(longlong param_1,int param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 uVar2;
  undefined8 *puVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  longlong lVar7;
  longlong lVar8;
  undefined1 local_a0 [152];
  
  lVar7 = (longlong)param_2;
  if (param_2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  iVar5 = *(int *)(param_1 + 0x18);
  if (param_2 != iVar5) {
    if (*(int *)(param_1 + 0x1c) < param_2) {
      iVar5 = FUN_1401abc90(param_1,param_2,param_3,param_4,0xfffffffffffffffe);
      lVar8 = (longlong)iVar5;
      plVar1 = *(longlong **)(param_1 + 8);
      if (*(int *)(param_1 + 0x1c) == 0) {
        if (plVar1 == (longlong *)0x0) {
          puVar3 = (undefined8 *)FUN_140156940(lVar8 << 3);
        }
        else {
          puVar3 = (undefined8 *)(**(code **)(*plVar1 + 8))(plVar1,lVar8 << 3);
        }
        *(undefined8 **)(param_1 + 0x10) = puVar3;
        if (0 < param_2) {
          do {
            if (puVar3 != (undefined8 *)0x0) {
              *puVar3 = 0;
            }
            puVar3 = puVar3 + 1;
            lVar7 = lVar7 + -1;
          } while (lVar7 != 0);
        }
      }
      else {
        uVar2 = *(undefined8 *)(param_1 + 0x10);
        if (plVar1 == (longlong *)0x0) {
          lVar7 = FUN_140156940(lVar8 << 3);
        }
        else {
          lVar7 = (**(code **)(*plVar1 + 8))(plVar1,lVar8 << 3);
        }
        FUN_1401de320(lVar7,uVar2);
        iVar4 = param_2 - *(int *)(param_1 + 0x18);
        puVar3 = (undefined8 *)(lVar7 + (longlong)*(int *)(param_1 + 0x18) * 8);
        iVar6 = 0;
        if (0 < iVar4) {
          do {
            if (puVar3 != (undefined8 *)0x0) {
              *puVar3 = 0;
            }
            iVar6 = iVar6 + 1;
            puVar3 = puVar3 + 1;
          } while (iVar6 < iVar4);
        }
        if (lVar7 == 0) {
          FUN_140156300(local_a0,L"Memory allocation failure!");
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_a0,(ThrowInfo *)&DAT_14031d928);
        }
        FUN_1401de290(uVar2,(longlong)*(int *)(param_1 + 0x18));
        plVar1 = *(longlong **)(param_1 + 8);
        if (plVar1 == (longlong *)0x0) {
          FUN_140156970(uVar2);
        }
        else {
          (**(code **)(*plVar1 + 0x18))(plVar1,uVar2);
        }
        *(longlong *)(param_1 + 0x10) = lVar7;
      }
      *(int *)(param_1 + 0x1c) = iVar5;
    }
    else if (iVar5 - param_2 < 1) {
      iVar4 = param_2 - iVar5;
      if (0 < iVar4) {
        puVar3 = (undefined8 *)(*(longlong *)(param_1 + 0x10) + (longlong)iVar5 * 8);
        iVar5 = 0;
        if (0 < iVar4) {
          do {
            if (puVar3 != (undefined8 *)0x0) {
              *puVar3 = 0;
            }
            iVar5 = iVar5 + 1;
            puVar3 = puVar3 + 1;
          } while (iVar5 < iVar4);
        }
      }
    }
    else {
      FUN_1401de290(*(longlong *)(param_1 + 0x10) + lVar7 * 8,(longlong)(iVar5 - param_2));
    }
    *(int *)(param_1 + 0x18) = param_2;
  }
  return;
}



void FUN_1401df5c0(undefined8 param_1,longlong param_2)

{
  int iVar1;
  undefined8 uVar2;
  undefined *puVar3;
  undefined8 local_res10 [3];
  undefined **local_20;
  undefined4 local_18;
  undefined2 local_14;
  
  *(undefined1 *)(param_2 + 0x80) = 1;
  local_20 = Proud::AddrPort::vftable;
  local_18 = DAT_14032e3f0;
  local_14 = DAT_14032e3f4;
  if (DAT_14032e3e0 == (undefined *)0x0) {
    iVar1 = 0;
    puVar3 = PTR_DAT_140320098;
  }
  else {
    puVar3 = DAT_14032e3e0;
    if (DAT_14032e3e0 == PTR_DAT_140320098) {
      iVar1 = 0;
    }
    else {
      iVar1 = *(int *)(DAT_14032e3e0 + -8);
    }
  }
  if (*(undefined8 **)(param_2 + 0x10) == (undefined8 *)0x0) {
    uVar2 = 0;
  }
  else {
    uVar2 = **(undefined8 **)(param_2 + 0x10);
  }
  iVar1 = FUN_140187440(uVar2,puVar3,iVar1 + 1,&local_20,0xfffffffffffffffe);
  if ((iVar1 == 0) || (iVar1 == 0x3e5)) {
    *(undefined4 *)(param_2 + 0x18) = 1;
  }
  else {
    *(undefined1 *)(param_2 + 0x80) = 0;
    local_res10[0] = 0;
    FUN_140161a50(param_2 + 0x10,local_res10);
    *(undefined4 *)(param_2 + 0x18) = 3;
  }
  return;
}



void FUN_1401df690(undefined8 param_1,longlong param_2)

{
  int iVar1;
  void *_Dst;
  undefined8 uVar2;
  undefined8 local_res10 [3];
  
  FUN_140050060();
  if (*(int *)(param_2 + 0x38) == 0) {
    _Dst = (void *)0x0;
  }
  else {
    _Dst = *(void **)(param_2 + 0x30);
  }
  memset(_Dst,0,(longlong)*(int *)(param_2 + 0x38));
  *(undefined1 *)(param_2 + 0xc0) = 1;
  uVar2 = 0;
  if (*(undefined8 **)(param_2 + 0x10) != (undefined8 *)0x0) {
    uVar2 = **(undefined8 **)(param_2 + 0x10);
  }
  iVar1 = FUN_1401865a0(uVar2,*(int *)(param_2 + 0x38) + -1);
  if (iVar1 == 0) {
    *(undefined4 *)(param_2 + 0x18) = 2;
  }
  else {
    *(undefined1 *)(param_2 + 0xc0) = 0;
    local_res10[0] = 0;
    FUN_140161a50(param_2 + 0x10,local_res10);
    *(undefined4 *)(param_2 + 0x18) = 3;
  }
  return;
}



void * FUN_1401df730(void *param_1,uint param_2)

{
  FUN_1401df260();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401df760(longlong param_1)

{
  longlong *plVar1;
  uint uVar2;
  ulonglong uVar3;
  longlong lVar4;
  longlong lVar5;
  float fVar6;
  float fVar7;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_14015b3b0();
  lVar4 = *(longlong *)(param_1 + 0x10);
  while (lVar4 != 0) {
    lVar5 = *(longlong *)(lVar4 + 0x10);
    FUN_14004f990(lVar4);
    plVar1 = *(longlong **)(param_1 + 0x50);
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970(lVar4);
    }
    else {
      (**(code **)(*plVar1 + 0x18))(plVar1,lVar4);
    }
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    lVar4 = lVar5;
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_14015b3b0(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar2 = FUN_14019e650(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    lVar4 = 0;
    *(uint *)(param_1 + 0x28) = uVar2;
    fVar7 = (float)uVar2 * *(float *)(param_1 + 0x34);
    if ((9.223372e+18 < fVar7) && (fVar7 = fVar7 - 9.223372e+18, fVar7 < 9.223372e+18)) {
      lVar4 = -0x8000000000000000;
    }
    fVar6 = (float)uVar2 * *(float *)(param_1 + 0x30);
    lVar5 = 0;
    *(longlong *)(param_1 + 0x38) = (longlong)fVar7 + lVar4;
    if ((9.223372e+18 < fVar6) && (fVar6 = fVar6 - 9.223372e+18, fVar6 < 9.223372e+18)) {
      lVar5 = -0x8000000000000000;
    }
    uVar3 = (longlong)fVar6 + lVar5;
    if ((ulonglong)((longlong)fVar6 + lVar5) < 0x11) {
      uVar3 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar3;
  }
  FUN_14015b3b0(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



void FUN_1401df890(longlong param_1,longlong param_2,char param_3)

{
  longlong *plVar1;
  undefined4 uVar2;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  FUN_1401dd740(param_2);
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(*plVar1 + 0x18))(plVar1,param_2);
  }
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
  if (((param_3 != '\0') && (*(ulonglong *)(param_1 + 0x20) < *(ulonglong *)(param_1 + 0x40))) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar2 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar2);
  }
  return;
}



void FUN_1401df920(longlong param_1,longlong param_2,undefined1 param_3)

{
  uint uVar1;
  ulonglong uVar2;
  uint uVar3;
  
  if (param_2 == 0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar1 = *(uint *)(param_1 + 0x28);
  uVar2 = (ulonglong)*(uint *)(param_2 + 0x20) % (ulonglong)uVar1;
  if (*(longlong *)(param_1 + 0x20) == 1) {
    *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    *(undefined8 *)(param_1 + 0x10) = 0;
    *(undefined8 *)(param_1 + 0x18) = 0;
  }
  else {
    uVar3 = (uint)uVar2;
    if (((*(longlong *)(param_2 + 0x18) == 0) ||
        (*(uint *)(*(longlong *)(param_2 + 0x18) + 0x20) % uVar1 != uVar3)) &&
       ((*(longlong *)(param_2 + 0x10) == 0 ||
        (*(uint *)(*(longlong *)(param_2 + 0x10) + 0x20) % uVar1 != uVar3)))) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = 0;
    }
    else if (param_2 == *(longlong *)(*(longlong *)(param_1 + 8) + (longlong)(int)uVar3 * 8)) {
      *(undefined8 *)(*(longlong *)(param_1 + 8) + uVar2 * 8) = *(undefined8 *)(param_2 + 0x10);
    }
    if (param_2 == *(longlong *)(param_1 + 0x10)) {
      *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_2 + 0x10);
      *(undefined8 *)(param_2 + 0x18) = 0;
    }
    if (param_2 == *(longlong *)(param_1 + 0x18)) {
      *(undefined8 *)(param_1 + 0x18) = *(undefined8 *)(param_2 + 0x18);
      *(undefined8 *)(param_2 + 0x10) = 0;
    }
    if (*(longlong *)(param_2 + 0x18) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x18) + 0x10) = *(undefined8 *)(param_2 + 0x10);
    }
    if (*(longlong *)(param_2 + 0x10) != 0) {
      *(undefined8 *)(*(longlong *)(param_2 + 0x10) + 0x18) = *(undefined8 *)(param_2 + 0x18);
    }
  }
  FUN_1401df890(param_1,param_2,param_3);
  FUN_14015b3b0(param_1);
  return;
}



undefined8 * FUN_1401dfa20(longlong param_1,undefined8 param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  undefined8 *puVar4;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar4 = (undefined8 *)FUN_140156940(0x28);
  }
  else {
    puVar4 = (undefined8 *)
             (**(code **)(*plVar1 + 8))(plVar1,0x28,param_3,param_4,0xfffffffffffffffe);
  }
  if (puVar4 != (undefined8 *)0x0) {
    FUN_1401568c0();
    *puVar4 = PTR_DAT_140320098;
    FUN_140050450(puVar4,param_2);
    puVar4[1] = 0;
    *(undefined4 *)(puVar4 + 4) = param_4;
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015b3b0(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined8 **)(param_1 + 0x10) = puVar4;
    *(undefined8 **)(param_1 + 0x18) = puVar4;
    puVar4[3] = 0;
    puVar4[2] = 0;
  }
  else {
    FUN_14015b3b0(param_1);
    FUN_14015b3b0(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      puVar4[3] = 0;
      puVar4[2] = lVar2;
      if (lVar2 != 0) {
        *(undefined8 **)(lVar2 + 0x18) = puVar4;
      }
      *(undefined8 **)(param_1 + 0x10) = puVar4;
    }
    else {
      if (*(longlong *)(lVar2 + 0x18) == 0) {
        *(undefined8 **)(param_1 + 0x10) = puVar4;
      }
      else {
        *(undefined8 **)(*(longlong *)(lVar2 + 0x18) + 0x10) = puVar4;
      }
      puVar4[3] = *(undefined8 *)(lVar2 + 0x18);
      puVar4[2] = lVar2;
      *(undefined8 **)(lVar2 + 0x18) = puVar4;
    }
  }
  *(undefined8 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar4;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b3b0(param_1);
  FUN_14015b3b0(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar3 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar3);
  }
  FUN_14015b3b0(param_1);
  return puVar4;
}



undefined8 * FUN_1401dfb90(longlong param_1,undefined8 param_2,uint param_3,undefined4 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  undefined8 *puVar4;
  
  plVar1 = *(longlong **)(param_1 + 0x50);
  if (plVar1 == (longlong *)0x0) {
    puVar4 = (undefined8 *)FUN_140156940(0x28);
  }
  else {
    puVar4 = (undefined8 *)
             (**(code **)(*plVar1 + 8))(plVar1,0x28,param_3,param_4,0xfffffffffffffffe);
  }
  if (puVar4 != (undefined8 *)0x0) {
    FUN_1401568c0();
    *puVar4 = PTR_DAT_1403200a0;
    FUN_14004f4f0(puVar4,param_2);
    *(undefined4 *)(puVar4 + 4) = param_4;
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8);
  FUN_14015b3b0(param_1);
  if (*(longlong *)(param_1 + 0x20) == 0) {
    *(undefined8 **)(param_1 + 0x10) = puVar4;
    *(undefined8 **)(param_1 + 0x18) = puVar4;
    puVar4[3] = 0;
    puVar4[2] = 0;
  }
  else {
    FUN_14015b3b0(param_1);
    FUN_14015b3b0(param_1);
    if (lVar2 == 0) {
      lVar2 = *(longlong *)(param_1 + 0x10);
      puVar4[3] = 0;
      puVar4[2] = lVar2;
      if (lVar2 != 0) {
        *(undefined8 **)(lVar2 + 0x18) = puVar4;
      }
      *(undefined8 **)(param_1 + 0x10) = puVar4;
    }
    else {
      if (*(longlong *)(lVar2 + 0x18) == 0) {
        *(undefined8 **)(param_1 + 0x10) = puVar4;
      }
      else {
        *(undefined8 **)(*(longlong *)(lVar2 + 0x18) + 0x10) = puVar4;
      }
      puVar4[3] = *(undefined8 *)(lVar2 + 0x18);
      puVar4[2] = lVar2;
      *(undefined8 **)(lVar2 + 0x18) = puVar4;
    }
  }
  *(undefined8 **)(*(longlong *)(param_1 + 8) + (ulonglong)param_3 * 8) = puVar4;
  *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + 1;
  FUN_14015b3b0(param_1);
  FUN_14015b3b0(param_1);
  if ((*(ulonglong *)(param_1 + 0x38) < *(ulonglong *)(param_1 + 0x20)) &&
     (*(int *)(param_1 + 0x48) == 0)) {
    uVar3 = FUN_14019e650(param_1);
    FUN_14015d800(param_1,uVar3);
  }
  FUN_14015b3b0(param_1);
  return puVar4;
}



void FUN_1401dfcf0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined *puVar2;
  longlong *plVar3;
  char cVar4;
  int iVar5;
  longlong lVar6;
  longlong lVar7;
  longlong *local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined8 local_38;
  undefined8 local_30;
  
  local_30 = 0xfffffffffffffffe;
  local_res10 = (longlong *)FUN_140156940(0x400);
  lVar7 = 0;
  lVar6 = lVar7;
  if (local_res10 != (longlong *)0x0) {
    lVar6 = FUN_140185b00(local_res10,1,param_2);
  }
  if (lVar6 == 0) {
    local_res10 = (longlong *)0x0;
  }
  else {
    local_res10 = (longlong *)FUN_140156940(0x10);
    local_res10[1] = 1;
    *local_res10 = lVar6;
  }
  plVar1 = local_res10;
  FUN_140161a50(param_2 + 0x10,&local_res10);
  plVar3 = local_res10;
  if (plVar1 != (longlong *)0x0) {
    plVar1 = plVar1 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      lVar6 = *local_res10;
      if (lVar6 != 0) {
        FUN_1401859b0(lVar6);
        FUN_140156970(lVar6);
      }
      FUN_140156970(plVar3);
    }
  }
  lVar6 = lVar7;
  if (*(longlong **)(param_2 + 0x10) != (longlong *)0x0) {
    lVar6 = **(longlong **)(param_2 + 0x10);
  }
  iVar5 = FUN_140186d80(lVar6,1);
  if (iVar5 == 0) {
    puVar2 = *(undefined **)(param_2 + 8);
    if (((puVar2 == (undefined *)0x0) || (puVar2 == PTR_DAT_140320098)) ||
       (*(int *)(puVar2 + -8) < 1)) {
      lVar6 = lVar7;
      if (*(longlong **)(param_2 + 0x10) != (longlong *)0x0) {
        lVar6 = **(longlong **)(param_2 + 0x10);
      }
      cVar4 = FUN_140187680(lVar6);
      if (cVar4 == '\0') {
        local_38 = 0;
        FUN_140161a50(param_2 + 0x10,&local_38);
        *(undefined4 *)(param_2 + 0x18) = 3;
        return;
      }
    }
    else {
      lVar6 = lVar7;
      if (*(longlong **)(param_2 + 0x10) != (longlong *)0x0) {
        lVar6 = **(longlong **)(param_2 + 0x10);
      }
      cVar4 = FUN_140187140(lVar6,puVar2,0);
      if (cVar4 == '\0') {
        local_res20 = 0;
        FUN_140161a50(param_2 + 0x10,&local_res20);
        *(undefined4 *)(param_2 + 0x18) = 3;
        return;
      }
    }
    if (*(longlong **)(param_2 + 0x10) != (longlong *)0x0) {
      lVar7 = **(longlong **)(param_2 + 0x10);
    }
    FUN_140184da0(lVar7,0);
    FUN_1401df5c0(param_1,param_2);
  }
  else {
    local_res18 = 0;
    FUN_140161a50(param_2 + 0x10,&local_res18);
    *(undefined4 *)(param_2 + 0x18) = 3;
  }
  return;
}



void FUN_1401dfec0(longlong param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  char cVar1;
  undefined8 uVar2;
  undefined8 local_res10;
  undefined8 uVar3;
  undefined8 local_40;
  undefined **local_38;
  undefined4 local_30;
  undefined2 local_2c;
  int local_28;
  
  uVar3 = 0xfffffffffffffffe;
  while( true ) {
    local_38 = Proud::AddrPort::vftable;
    local_28 = 0;
    local_40 = 0;
    local_30 = DAT_140320450;
    local_2c = DAT_140320454;
    uVar2 = 0;
    if (*(undefined8 **)(param_2 + 0x10) != (undefined8 *)0x0) {
      uVar2 = **(undefined8 **)(param_2 + 0x10);
    }
    cVar1 = FUN_1401854f0(uVar2,0,&local_40,param_4,uVar3);
    if (cVar1 == '\0') break;
    *(undefined1 *)(param_2 + 0x80) = 0;
    if ((local_40._4_4_ != 0) || (local_28 == 0)) {
      *(undefined4 *)(param_2 + 0x18) = 3;
      local_res10 = 0;
      FUN_140161a50(param_2 + 0x10,&local_res10);
      return;
    }
    *(int *)(param_2 + 0x1c) = *(int *)(param_2 + 0x1c) + 1;
    if (2 < *(int *)(param_2 + 0x1c)) {
      if (*(double *)(param_2 + 200) == 0.0) {
        uVar3 = FUN_1401d3e30(*(undefined8 *)(param_1 + 8));
        *(undefined8 *)(param_2 + 200) = uVar3;
      }
      FUN_1401df690(param_1,param_2);
      return;
    }
    FUN_1401df5c0(param_1);
  }
  return;
}



void FUN_1401dffd0(void)

{
  FUN_1401df760();
  return;
}



void FUN_1401dfff0(longlong param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  longlong lVar1;
  longlong *plVar2;
  undefined8 *puVar3;
  uint uVar4;
  ulonglong uVar5;
  longlong lVar6;
  float fVar7;
  
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  FUN_14015b3b0(param_1,param_2,param_3,param_4,0xfffffffffffffffe);
  lVar6 = *(longlong *)(param_1 + 0x10);
  while (lVar6 != 0) {
    lVar1 = *(longlong *)(lVar6 + 0x10);
    if ((*(longlong *)(lVar6 + 8) != 0) &&
       (*(longlong *)(*(longlong *)(lVar6 + 8) + 8) =
             *(longlong *)(*(longlong *)(lVar6 + 8) + 8) + -1,
       *(longlong *)(*(longlong *)(lVar6 + 8) + 8) == 0)) {
      plVar2 = *(longlong **)(lVar6 + 8);
      puVar3 = (undefined8 *)*plVar2;
      if (puVar3 != (undefined8 *)0x0) {
        (**(code **)*puVar3)(puVar3,1);
      }
      FUN_140156970(plVar2);
    }
    FUN_140050520(lVar6);
    plVar2 = *(longlong **)(param_1 + 0x50);
    if (plVar2 == (longlong *)0x0) {
      FUN_140156970(lVar6);
    }
    else {
      (**(code **)(*plVar2 + 0x18))(plVar2,lVar6);
    }
    *(longlong *)(param_1 + 0x20) = *(longlong *)(param_1 + 0x20) + -1;
    lVar6 = lVar1;
  }
  FUN_140156970(*(undefined8 *)(param_1 + 8));
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined8 *)(param_1 + 0x20) = 0;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 0x18) = 0;
  FUN_14015b3b0(param_1);
  if (*(int *)(param_1 + 0x48) == 0) {
    uVar4 = FUN_14019e650(param_1,*(undefined8 *)(param_1 + 0x20));
    if (*(longlong *)(param_1 + 8) != 0) {
      FUN_140156970();
      *(undefined8 *)(param_1 + 8) = 0;
    }
    *(uint *)(param_1 + 0x28) = uVar4;
    fVar7 = (float)uVar4 * *(float *)(param_1 + 0x34);
    lVar6 = 0;
    if ((9.223372e+18 < fVar7) && (fVar7 = fVar7 - 9.223372e+18, fVar7 < 9.223372e+18)) {
      lVar6 = -0x8000000000000000;
    }
    *(longlong *)(param_1 + 0x38) = (longlong)fVar7 + lVar6;
    fVar7 = (float)uVar4 * *(float *)(param_1 + 0x30);
    lVar6 = 0;
    if ((9.223372e+18 < fVar7) && (fVar7 = fVar7 - 9.223372e+18, fVar7 < 9.223372e+18)) {
      lVar6 = -0x8000000000000000;
    }
    uVar5 = (longlong)fVar7 + lVar6;
    if ((ulonglong)((longlong)fVar7 + lVar6) < 0x11) {
      uVar5 = 0;
    }
    *(ulonglong *)(param_1 + 0x40) = uVar5;
  }
  FUN_14015b3b0(param_1);
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1;
  return;
}



undefined8 FUN_1401e0190(longlong param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4)

{
  char cVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 8) == 0) {
    cVar1 = FUN_1401a8bb0(param_1,*(undefined4 *)(param_1 + 0x28),1);
    if (cVar1 == '\0') {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  FUN_14015b3b0(param_1);
  uVar2 = FUN_1401dfa20(param_1,param_2,param_3,param_4);
  FUN_14015b3b0(param_1);
  return uVar2;
}



undefined8 FUN_1401e0210(longlong param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4)

{
  char cVar1;
  undefined8 uVar2;
  
  if (*(longlong *)(param_1 + 8) == 0) {
    cVar1 = FUN_1401a8bb0(param_1,*(undefined4 *)(param_1 + 0x28),1);
    if (cVar1 == '\0') {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x8007000e);
    }
  }
  FUN_14015b3b0(param_1);
  uVar2 = FUN_1401dfb90(param_1,param_2,param_3,param_4);
  FUN_14015b3b0(param_1);
  return uVar2;
}



void thunk_FUN_1401dffd0(void)

{
  FUN_1401dffd0();
  return;
}



// WARNING: Removing unreachable block (ram,0x0001401e0340)
// WARNING: Removing unreachable block (ram,0x0001401e0344)
// WARNING: Removing unreachable block (ram,0x0001401e0360)
// WARNING: Removing unreachable block (ram,0x0001401e036e)
// WARNING: Removing unreachable block (ram,0x0001401e0366)
// WARNING: Removing unreachable block (ram,0x0001401e0375)
// WARNING: Removing unreachable block (ram,0x0001401e038d)

void FUN_1401e02a0(longlong param_1)

{
  int *piVar1;
  int iVar2;
  undefined8 uVar3;
  undefined8 *puVar4;
  undefined *puVar5;
  longlong lVar6;
  longlong lVar7;
  undefined8 *puVar8;
  longlong lVar9;
  longlong *plVar10;
  int iVar11;
  undefined8 *puVar12;
  ulonglong uVar13;
  uint uVar14;
  longlong lVar15;
  longlong lVar16;
  longlong lVar17;
  int local_res10;
  longlong *local_res18;
  longlong local_res20;
  undefined **local_b8;
  longlong *local_b0;
  longlong local_a8;
  undefined8 local_a0;
  undefined8 local_98;
  undefined *local_90;
  longlong local_88;
  undefined1 local_80;
  undefined8 local_78;
  undefined1 local_70;
  undefined8 local_68;
  undefined1 local_60;
  undefined8 local_58;
  undefined8 *local_50;
  
  local_58 = 0xfffffffffffffffe;
  lVar9 = param_1 + 0x10;
  local_88 = lVar9;
  FUN_140156b50(lVar9);
  local_80 = 1;
  local_b8 = Proud::CFastArray<>::vftable;
  local_b0 = (longlong *)0x0;
  local_a8 = 0;
  local_a0 = 0;
  local_98 = 0;
  FUN_14015a130(&local_b8);
  if ((uint)local_a0 == 0) {
    FUN_1401568c0();
    puVar5 = PTR_DAT_140320098;
    local_90 = PTR_DAT_140320098;
    lVar15 = (longlong)(int)(uint)local_a0;
    if ((int)(uint)local_a0 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    FUN_140159390(&local_b8,(uint)local_a0 + 1);
    lVar16 = local_a8;
    if ((uint)local_a0 == 0) {
      lVar16 = 0;
    }
    FUN_140050450(lVar16 + lVar15 * 8,&local_90);
    if (((puVar5 != (undefined *)0x0) && (puVar5 != PTR_DAT_140320098)) &&
       (puVar5 + -8 != (undefined *)0x0)) {
      uVar3 = FUN_1401568c0();
      local_78 = uVar3;
      FUN_140156b50(uVar3);
      local_70 = 1;
      piVar1 = (int *)(puVar5 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(puVar5 + -8);
      }
      FUN_140156be0(uVar3);
      local_70 = 0;
    }
    local_90 = PTR_DAT_140320098;
  }
  local_res10 = 0;
  local_res20 = 0;
  uVar14 = (uint)local_a0;
  if (0 < (int)(uint)local_a0) {
    do {
      puVar8 = (undefined8 *)0x0;
      puVar4 = operator_new(0x100);
      puVar12 = puVar8;
      local_50 = puVar4;
      if (puVar4 != (undefined8 *)0x0) {
        *puVar4 = Proud::CSsdpContext::vftable;
        FUN_1401568c0();
        puVar4[1] = PTR_DAT_140320098;
        puVar4[2] = 0;
        puVar4[5] = 0;
        puVar4[6] = 0;
        puVar4[7] = 0;
        puVar4[8] = 0;
        puVar4[4] = Proud::ByteArray::vftable;
        *(undefined1 *)(puVar4 + 0x10) = 0;
        *(undefined1 *)(puVar4 + 0x18) = 0;
        puVar4[0x19] = 0;
        puVar4[3] = 0;
        puVar12 = puVar4;
      }
      if (puVar12 == (undefined8 *)0x0) {
        local_res18 = (longlong *)0x0;
      }
      else {
        local_res18 = (longlong *)FUN_140156940(0x10);
        local_res18[1] = 1;
        *local_res18 = (longlong)puVar12;
      }
      lVar9 = local_a8;
      if ((local_res20 < 0) || ((int)(uint)local_a0 <= local_res10)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      if (local_res18 != (longlong *)0x0) {
        puVar8 = (undefined8 *)*local_res18;
      }
      puVar5 = (undefined *)puVar8[1];
      if ((undefined *)puVar8[1] == (undefined *)0x0) {
        puVar5 = PTR_DAT_140320098;
      }
      puVar8[1] = puVar5;
      if (*(undefined **)(local_a8 + local_res20 * 8) != puVar5) {
        uVar3 = FUN_1401568c0();
        local_68 = uVar3;
        FUN_140156b50(uVar3);
        local_60 = 1;
        FUN_140050520(puVar8 + 1);
        puVar5 = *(undefined **)(lVar9 + local_res20 * 8);
        puVar8[1] = puVar5;
        if (((puVar5 != PTR_DAT_140320098) && (puVar5 != (undefined *)0x0)) &&
           (puVar5 != (undefined *)0x8)) {
          *(int *)(puVar5 + -4) = *(int *)(puVar5 + -4) + 1;
        }
        FUN_140156be0(uVar3);
        local_60 = 0;
      }
      lVar15 = param_1 + 0x100;
      iVar2 = *(int *)(param_1 + 0x118);
      lVar9 = (longlong)iVar2;
      if (iVar2 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      iVar11 = *(int *)(param_1 + 0x118);
      FUN_1401df3d0(lVar15,iVar11 + 1);
      iVar11 = iVar11 - iVar2;
      if ((0 < iVar11) && (iVar11 = iVar11 + -1, -1 < iVar11)) {
        lVar16 = (longlong)(iVar11 + iVar2 + 1) << 3;
        lVar17 = (longlong)(iVar11 + iVar2) << 3;
        do {
          lVar6 = FUN_1401a7bb0(lVar15);
          lVar7 = FUN_1401a7bb0(lVar15);
          FUN_1401d43e0(lVar16 + lVar7,lVar17 + lVar6);
          lVar17 = lVar17 + -8;
          lVar16 = lVar16 + -8;
          iVar11 = iVar11 + -1;
        } while (-1 < iVar11);
      }
      lVar15 = FUN_1401a7bb0(lVar15);
      if (local_res18 != *(longlong **)(lVar15 + lVar9 * 8)) {
        if (local_res18 != (longlong *)0x0) {
          local_res18[1] = local_res18[1] + 1;
        }
        plVar10 = (longlong *)0x0;
        lVar16 = *(longlong *)(lVar15 + lVar9 * 8);
        if ((lVar16 != 0) &&
           (*(longlong *)(*(longlong *)(lVar15 + lVar9 * 8) + 8) = *(longlong *)(lVar16 + 8) + -1,
           *(longlong *)(*(longlong *)(lVar15 + lVar9 * 8) + 8) == 0)) {
          plVar10 = *(longlong **)(lVar15 + lVar9 * 8);
        }
        *(longlong **)(lVar15 + lVar9 * 8) = local_res18;
        if (plVar10 != (longlong *)0x0) {
          puVar8 = (undefined8 *)*plVar10;
          if (puVar8 != (undefined8 *)0x0) {
            (**(code **)*puVar8)(puVar8,1);
          }
          FUN_140156970(plVar10);
        }
      }
      if (local_res18 != (longlong *)0x0) {
        plVar10 = local_res18 + 1;
        *plVar10 = *plVar10 + -1;
        if (*plVar10 == 0) {
          puVar8 = (undefined8 *)*local_res18;
          if (puVar8 != (undefined8 *)0x0) {
            (**(code **)*puVar8)(puVar8,1);
          }
          FUN_140156970(local_res18);
        }
      }
      local_res10 = local_res10 + 1;
      local_res20 = local_res20 + 1;
      lVar9 = local_88;
      uVar14 = (uint)local_a0;
    } while (local_res10 < (int)(uint)local_a0);
  }
  local_b8 = Proud::CFastArray<>::vftable;
  if (0 < (int)uVar14) {
    uVar13 = (ulonglong)uVar14;
    lVar15 = local_a8;
    do {
      FUN_140050520(lVar15);
      lVar15 = lVar15 + 8;
      uVar13 = uVar13 - 1;
    } while (uVar13 != 0);
  }
  if (local_a8 != 0) {
    if (local_b0 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*local_b0 + 0x18))(local_b0,local_a8);
    }
  }
  FUN_140156be0(lVar9);
  return;
}



void FUN_1401e0740(void)

{
  FUN_1401dfff0();
  return;
}



longlong * FUN_1401e0760(longlong param_1,undefined8 *param_2)

{
  char cVar1;
  ulonglong uVar2;
  int iVar3;
  char *pcVar4;
  longlong *plVar5;
  undefined *puVar6;
  uint uVar7;
  char *pcVar8;
  
  pcVar8 = (char *)*param_2;
  pcVar4 = pcVar8;
  if (pcVar8 == (char *)0x0) {
    pcVar4 = PTR_DAT_140320098;
  }
  if (pcVar4 == (char *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar7 = 0;
  if (pcVar8 == (char *)0x0) {
    pcVar8 = PTR_DAT_140320098;
  }
  cVar1 = *pcVar8;
  while (cVar1 != '\0') {
    pcVar8 = pcVar8 + 1;
    uVar7 = uVar7 * 0x21 + (int)cVar1;
    cVar1 = *pcVar8;
  }
  uVar2 = (ulonglong)uVar7 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (plVar5 = *(longlong **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (plVar5 != (longlong *)0x0 &&
        ((uint)uVar2 == *(uint *)(plVar5 + 4) % *(uint *)(param_1 + 0x28)));
        plVar5 = (longlong *)plVar5[2]) {
      puVar6 = (undefined *)*plVar5;
      if ((undefined *)*plVar5 == (undefined *)0x0) {
        puVar6 = PTR_DAT_140320098;
      }
      iVar3 = FUN_140156840(puVar6);
      if (iVar3 == 0) goto LAB_1401e0840;
    }
  }
  plVar5 = (longlong *)FUN_1401e0190(param_1,param_2,uVar2,uVar7);
LAB_1401e0840:
  return plVar5 + 1;
}



longlong * FUN_1401e0860(longlong param_1,undefined8 *param_2)

{
  ushort uVar1;
  ulonglong uVar2;
  int iVar3;
  ushort *puVar4;
  longlong *plVar5;
  undefined *puVar6;
  uint uVar7;
  ushort *puVar8;
  
  puVar8 = (ushort *)*param_2;
  puVar4 = puVar8;
  if (puVar8 == (ushort *)0x0) {
    puVar4 = (ushort *)PTR_DAT_1403200a0;
  }
  if (puVar4 == (ushort *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  uVar7 = 0;
  if (puVar8 == (ushort *)0x0) {
    puVar8 = (ushort *)PTR_DAT_1403200a0;
  }
  uVar1 = *puVar8;
  while (uVar1 != 0) {
    puVar8 = puVar8 + 1;
    uVar7 = uVar7 * 0x21 + (uint)uVar1;
    uVar1 = *puVar8;
  }
  uVar2 = (ulonglong)uVar7 % (ulonglong)*(uint *)(param_1 + 0x28);
  if (*(longlong *)(param_1 + 8) != 0) {
    for (plVar5 = *(longlong **)(*(longlong *)(param_1 + 8) + uVar2 * 8);
        (plVar5 != (longlong *)0x0 &&
        ((uint)uVar2 == *(uint *)(plVar5 + 4) % *(uint *)(param_1 + 0x28)));
        plVar5 = (longlong *)plVar5[2]) {
      puVar6 = (undefined *)*plVar5;
      if ((undefined *)*plVar5 == (undefined *)0x0) {
        puVar6 = PTR_DAT_1403200a0;
      }
      iVar3 = FUN_140156780(puVar6);
      if (iVar3 == 0) goto LAB_1401e0940;
    }
  }
  plVar5 = (longlong *)FUN_1401e0210(param_1,param_2,uVar2,uVar7);
LAB_1401e0940:
  return plVar5 + 1;
}



// WARNING: Removing unreachable block (ram,0x0001401e0a07)
// WARNING: Removing unreachable block (ram,0x0001401e0a10)
// WARNING: Removing unreachable block (ram,0x0001401e0a31)
// WARNING: Removing unreachable block (ram,0x0001401e0a3a)

undefined8 *
FUN_1401e0960(undefined8 *param_1,undefined8 param_2,undefined1 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  undefined4 uVar2;
  
  *param_1 = Proud::CUpnp::vftable;
  uVar2 = FUN_14015a430(param_1,param_2,param_3,param_4,0xfffffffffffffffe);
  FUN_140156a70(param_1 + 2,uVar2,1);
  *(undefined1 *)(param_1 + 10) = 0;
  param_1[0x14] = 0;
  param_1[0xb] = 0;
  param_1[0xc] = 0;
  param_1[0xd] = 0;
  *(undefined4 *)(param_1 + 0xf) = 0x11;
  param_1[0xe] = 0;
  *(undefined4 *)(param_1 + 0x13) = 0;
  *(undefined4 *)((longlong)param_1 + 0x7c) = 0x3f400000;
  *(undefined4 *)(param_1 + 0x10) = 0x3e800000;
  *(undefined4 *)((longlong)param_1 + 0x84) = 0x40100000;
  param_1[0x11] = 0x26;
  param_1[0x12] = 4;
  param_1[0x12] = 0;
  FUN_14019d7a0(param_1 + 0x15);
  param_1[0x20] = Proud::CFastArray<>::vftable;
  param_1[0x21] = 0;
  param_1[0x22] = 0;
  param_1[0x23] = 0;
  param_1[0x24] = 0;
  param_1[1] = param_2;
  *(undefined4 *)(param_1 + 9) = 0;
  uVar1 = FUN_1401d3e30(param_2);
  param_1[0x25] = uVar1;
  return param_1;
}



void FUN_1401e0ac0(undefined8 *param_1)

{
  undefined8 *puVar1;
  longlong *plVar2;
  
  *param_1 = Proud::CUpnp::vftable;
  puVar1 = param_1 + 2;
  FUN_140156b50(puVar1);
  FUN_1401dfff0(param_1 + 10);
  FUN_1401df760(param_1 + 0x15);
  FUN_1401df3d0(param_1 + 0x20,0);
  FUN_140156be0(puVar1);
  param_1[0x20] = Proud::CFastArray<>::vftable;
  if (0 < *(int *)(param_1 + 0x23)) {
    FUN_1401de290(param_1[0x22],(longlong)*(int *)(param_1 + 0x23));
  }
  if (param_1[0x22] != 0) {
    plVar2 = (longlong *)param_1[0x21];
    if (plVar2 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar2 + 0x18))(plVar2,param_1[0x22]);
    }
  }
  FUN_1401dffd0(param_1 + 0x15);
  FUN_1401e0740(param_1 + 10);
  FUN_140156c00(puVar1);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401e0bc0(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  undefined1 *puVar2;
  char cVar3;
  uint uVar4;
  uint uVar5;
  int iVar6;
  undefined8 *puVar7;
  void *_Src;
  uint *puVar8;
  undefined8 uVar9;
  uint *puVar10;
  uint *puVar11;
  undefined8 *puVar12;
  longlong *plVar13;
  undefined *puVar14;
  uint uVar15;
  size_t _Size;
  uint uVar16;
  uint uVar17;
  longlong *plVar19;
  uint *puVar20;
  uint uVar21;
  longlong lVar22;
  double dVar23;
  undefined1 auStack_218 [32];
  uint *local_1f8;
  uint *local_1f0;
  longlong *local_1e8;
  uint *local_1e0;
  longlong local_1d8;
  undefined8 local_1d0;
  undefined **local_1c8;
  undefined4 local_1c0;
  undefined2 local_1bc;
  int local_1b8;
  longlong local_1b0;
  undefined8 local_1a8;
  undefined8 *local_1a0;
  undefined8 local_198;
  undefined1 local_190;
  undefined8 local_188;
  undefined1 local_180;
  longlong *local_178;
  longlong local_170;
  longlong *local_168;
  longlong local_160;
  undefined8 local_158;
  undefined1 local_150;
  undefined8 local_148;
  undefined1 local_140;
  undefined8 local_138;
  undefined1 local_130;
  undefined8 local_128;
  undefined1 local_120;
  undefined8 local_118;
  uint **local_110;
  uint *local_108;
  undefined8 local_100;
  undefined1 local_f8;
  undefined1 *local_e8;
  undefined1 local_e0 [136];
  ulonglong local_58;
  uint *puVar18;
  
  local_118 = 0xfffffffffffffffe;
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_218;
  puVar12 = (undefined8 *)(param_2 + 0x10);
  puVar18 = (uint *)0x0;
  uVar16 = 0;
  local_1d8 = param_1;
  local_1b0 = param_2;
  local_1a0 = puVar12;
  do {
    local_1c8 = Proud::AddrPort::vftable;
    uVar17 = 0;
    local_1b8 = 0;
    local_1d0 = 0;
    local_1c0 = DAT_140320450;
    local_1bc = DAT_140320454;
    puVar8 = puVar18;
    if ((undefined8 *)*puVar12 != (undefined8 *)0x0) {
      puVar8 = *(uint **)*puVar12;
    }
    cVar3 = FUN_140185280(puVar8,0,&local_1d0);
    if (cVar3 == '\0') {
      return;
    }
    *(undefined1 *)(param_2 + 0xc0) = 0;
    if ((local_1d0._4_4_ != 0) || (local_1b8 == 0)) {
      *(undefined4 *)(param_2 + 0x18) = 3;
      local_1a8 = 0;
      FUN_140161a50(puVar12,&local_1a8);
      return;
    }
    FUN_1401568c0();
    local_1f8 = (uint *)PTR_DAT_140320098;
    local_110 = &local_1f8;
    uVar5 = local_1b8 + 2U;
    if ((int)(local_1b8 + 2U) < 1) {
      uVar5 = uVar17;
    }
    uVar4 = 1;
    if (1 < (int)uVar5) {
      uVar4 = uVar5;
    }
    puVar8 = local_1f8;
    if (0 < (int)uVar4) {
      if ((int)uVar4 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (uVar4 == 0) {
        puVar8 = local_1f8;
      }
      else {
        puVar8 = (uint *)FUN_140156940((longlong)(int)uVar4 + 9);
        if (puVar8 != (uint *)0x0) {
          *puVar8 = 0;
          puVar8[1] = 1;
        }
        *puVar8 = uVar4;
        uVar5 = uVar17;
        if ((local_1f8 != (uint *)0x0) && (local_1f8 != (uint *)PTR_DAT_140320098)) {
          uVar5 = local_1f8[-2];
        }
        puVar10 = (uint *)PTR_DAT_140320098;
        if ((int)uVar4 < (int)uVar5) {
LAB_1401e0d37:
          if (local_1f8 != (uint *)0x0) {
            puVar10 = local_1f8;
          }
        }
        else {
          uVar4 = uVar17;
          if (local_1f8 != (uint *)0x0) {
            if (local_1f8 != (uint *)PTR_DAT_140320098) {
              uVar4 = local_1f8[-2];
            }
            goto LAB_1401e0d37;
          }
        }
        puVar8 = puVar8 + 2;
        FUN_140156810(puVar8,puVar10,uVar4);
        puVar10 = local_1f8;
        if (((local_1f8 != (uint *)0x0) && (local_1f8 != (uint *)PTR_DAT_140320098)) &&
           (puVar11 = local_1f8 + -2, puVar11 != (uint *)0x0)) {
          uVar9 = FUN_1401568c0();
          local_138 = uVar9;
          FUN_140156b50(uVar9);
          local_130 = 1;
          puVar10 = puVar10 + -1;
          *puVar10 = *puVar10 - 1;
          if (*puVar10 == 0) {
            FUN_140156970(puVar11);
          }
          FUN_140156be0(uVar9);
          local_130 = 0;
        }
      }
    }
    local_1f8 = puVar8;
    puVar8 = (uint *)PTR_DAT_140320098;
    if (((local_1f8 == (uint *)0x0) || (puVar8 = local_1f8, local_1f8 == (uint *)PTR_DAT_140320098))
       || (local_1f8 + -2 == (uint *)0x0)) {
      local_1f8 = puVar8;
      puVar7 = (undefined8 *)FUN_140156940();
      *puVar7 = 0;
      *(undefined1 *)(puVar7 + 1) = 0;
      if (puVar7 != (undefined8 *)0x0) {
        *(undefined4 *)puVar7 = 0;
        *(undefined4 *)((longlong)puVar7 + 4) = 1;
      }
      *(undefined1 *)(puVar7 + 1) = 0;
      puVar8 = (uint *)(puVar7 + 1);
    }
    else if (1 < (int)local_1f8[-1]) {
      uVar5 = local_1f8[-2];
      if ((int)uVar5 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      puVar8 = (uint *)FUN_140156940((longlong)(int)uVar5 + 9);
      if (puVar8 != (uint *)0x0) {
        *puVar8 = 0;
        puVar8[1] = 1;
      }
      uVar5 = uVar16;
      if ((local_1f8 != (uint *)0x0) && (local_1f8 != (uint *)PTR_DAT_140320098)) {
        uVar5 = local_1f8[-2];
      }
      *puVar8 = uVar5;
      puVar10 = (uint *)PTR_DAT_140320098;
      puVar11 = puVar18;
      if ((local_1f8 != (uint *)0x0) &&
         (puVar10 = local_1f8, puVar11 = (uint *)0x0, local_1f8 != (uint *)PTR_DAT_140320098)) {
        puVar11 = (uint *)(ulonglong)local_1f8[-2];
      }
      puVar8 = puVar8 + 2;
      FUN_140156810(puVar8,puVar10,puVar11);
      puVar10 = local_1f8;
      if (((local_1f8 != (uint *)0x0) && (local_1f8 != (uint *)PTR_DAT_140320098)) &&
         (puVar11 = local_1f8 + -2, puVar11 != (uint *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_198 = uVar9;
        FUN_140156b50(uVar9);
        local_190 = 1;
        puVar10 = puVar10 + -1;
        *puVar10 = *puVar10 - 1;
        if (*puVar10 == 0) {
          FUN_140156970(puVar11);
        }
        FUN_140156be0(uVar9);
        local_190 = 0;
      }
    }
    local_1f8 = puVar8;
    puVar8 = local_1f8;
    if (local_1f8 == (uint *)0x0) {
      puVar8 = (uint *)PTR_DAT_140320098;
    }
    puVar10 = puVar18;
    if ((undefined8 *)*puVar12 != (undefined8 *)0x0) {
      puVar10 = *(uint **)*puVar12;
    }
    _Size = (size_t)local_1b8;
    local_108 = puVar8;
    _Src = (void *)FUN_140185840(puVar10);
    memcpy(puVar8,_Src,_Size);
    *(undefined1 *)((longlong)local_1b8 + (longlong)puVar8) = 0;
    puVar8 = local_1f8;
    if (local_1f8 == (uint *)0x0) {
      puVar8 = (uint *)PTR_DAT_140320098;
    }
    uVar4 = FUN_1401567e0(puVar8);
    uVar5 = uVar16;
    if (0 < (int)uVar4) {
      uVar5 = uVar4;
    }
    uVar15 = 0;
    uVar4 = uVar15;
    if ((local_1f8 != (uint *)0x0) && (local_1f8 != (uint *)PTR_DAT_140320098)) {
      uVar4 = local_1f8[-2];
    }
    if (((int)uVar5 < (int)uVar4) || (uVar5 = uVar15, local_1f8 == (uint *)0x0)) {
LAB_1401e0f5a:
      if (((local_1f8 != (uint *)PTR_DAT_140320098) && (local_1f8 != (uint *)0x0)) &&
         (puVar8 = local_1f8 + -2, puVar8 != (uint *)0x0)) {
        *puVar8 = uVar5;
        *(undefined1 *)((longlong)(int)uVar5 + 8 + (longlong)puVar8) = 0;
      }
    }
    else if (local_1f8 != (uint *)PTR_DAT_140320098) {
      uVar5 = local_1f8[-2];
      goto LAB_1401e0f5a;
    }
    local_1e8 = operator_new(0x2540);
    puVar8 = puVar18;
    if (local_1e8 != (void *)0x0) {
      puVar8 = (uint *)FUN_1401dea00(local_1e8);
    }
    if (puVar8 == (uint *)0x0) {
      local_1e8 = (longlong *)0x0;
    }
    else {
      local_1e8 = (longlong *)FUN_140156940(0x10);
      local_1e8[1] = 1;
      *local_1e8 = (longlong)puVar8;
    }
    plVar19 = local_1e8;
    FUN_1401568c0();
    local_1e0 = (uint *)PTR_DAT_140320098;
    if (PTR_DAT_140320098 == (undefined *)0x0) {
      local_1e0 = puVar18;
    }
    if (local_1f8 != (uint *)PTR_DAT_140320098) {
      uVar9 = FUN_1401568c0();
      local_148 = uVar9;
      FUN_140156b50(uVar9);
      local_140 = 1;
      FUN_140050520(&local_1e0);
      local_1e0 = local_1f8;
      if (((local_1f8 != (uint *)PTR_DAT_140320098) && (local_1f8 != (uint *)0x0)) &&
         (local_1f8 != (uint *)0x8)) {
        local_1f8[-1] = local_1f8[-1] + 1;
      }
      FUN_140156be0(uVar9);
      local_140 = 0;
    }
    puVar8 = puVar18;
    if (plVar19 != (longlong *)0x0) {
      puVar8 = (uint *)*plVar19;
    }
    cVar3 = FUN_1401de540(puVar8,&local_1e0);
    if ((cVar3 != '\0') && (*(ulonglong *)(param_1 + 0x70) < 0x14)) {
      puVar8 = puVar18;
      if (plVar19 != (longlong *)0x0) {
        puVar8 = (uint *)*plVar19;
      }
      local_e8 = local_e0;
      FUN_140153e40(&local_e8,(undefined1 *)((longlong)puVar8 + 0x52),3);
      puVar2 = local_e8;
      FUN_1401568c0();
      puVar8 = (uint *)PTR_DAT_140320098;
      local_1f0 = (uint *)PTR_DAT_140320098;
      uVar5 = FUN_1401567e0(puVar2);
      puVar10 = puVar18;
      if ((puVar8 != (uint *)0x0) && (puVar10 = (uint *)0x0, puVar8 != (uint *)PTR_DAT_140320098)) {
        puVar10 = (uint *)(ulonglong)*(uint *)((longlong)puVar8 + -8);
      }
      uVar4 = uVar5;
      if ((((int)uVar5 <= (int)puVar10) && (uVar4 = uVar15, puVar8 != (uint *)0x0)) &&
         (puVar8 != (uint *)PTR_DAT_140320098)) {
        uVar4 = *(uint *)((longlong)puVar8 + -8);
      }
      uVar21 = 1;
      if (1 < (int)uVar4) {
        uVar21 = uVar4;
      }
      uVar4 = uVar15;
      if ((puVar8 != (uint *)0x0) && (puVar8 != (uint *)PTR_DAT_140320098)) {
        uVar4 = *(uint *)((longlong)puVar8 + -8);
      }
      if ((int)uVar4 < (int)uVar21) {
        if (puVar8 == (uint *)0x0) {
          puVar8 = (uint *)PTR_DAT_140320098;
        }
        local_1f0 = puVar8;
        if ((int)uVar21 < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        if (uVar21 == 0) {
          FUN_140050520(&local_1f0);
          puVar8 = local_1f0;
        }
        else {
          uVar4 = uVar15;
          if ((puVar8 != (uint *)0x0) && (puVar8 != (uint *)PTR_DAT_140320098)) {
            uVar4 = puVar8[-2];
          }
          if (uVar21 != uVar4) {
            puVar10 = (uint *)FUN_140156940((longlong)(int)uVar21 + 9);
            if (puVar10 != (uint *)0x0) {
              *puVar10 = 0;
              puVar10[1] = 1;
            }
            *puVar10 = uVar21;
            uVar4 = uVar16;
            if ((puVar8 != (uint *)0x0) && (puVar8 != (uint *)PTR_DAT_140320098)) {
              uVar4 = puVar8[-2];
            }
            puVar11 = (uint *)PTR_DAT_140320098;
            if ((int)uVar21 < (int)uVar4) {
LAB_1401e1182:
              if (puVar8 != (uint *)0x0) {
                puVar11 = puVar8;
              }
            }
            else {
              uVar21 = uVar17;
              if (puVar8 != (uint *)0x0) {
                if (puVar8 != (uint *)PTR_DAT_140320098) {
                  uVar21 = puVar8[-2];
                }
                goto LAB_1401e1182;
              }
            }
            puVar8 = puVar10 + 2;
            FUN_140156810(puVar8,puVar11,uVar21);
            FUN_140050520(&local_1f0);
            local_1f0 = puVar8;
          }
        }
      }
      if (((puVar8 == (uint *)0x0) || (puVar8 == (uint *)PTR_DAT_140320098)) ||
         (puVar10 = puVar8 + -2, puVar10 == (uint *)0x0)) {
        puVar12 = (undefined8 *)FUN_140156940();
        *puVar12 = 0;
        *(undefined1 *)(puVar12 + 1) = 0;
        if (puVar12 != (undefined8 *)0x0) {
          *(undefined4 *)puVar12 = 0;
          *(undefined4 *)((longlong)puVar12 + 4) = 1;
        }
        puVar11 = (uint *)(puVar12 + 1);
        *(undefined1 *)puVar11 = 0;
        puVar20 = puVar11;
      }
      else {
        puVar11 = puVar8;
        puVar20 = local_1f0;
        if (1 < (int)puVar8[-1]) {
          if ((int)*puVar10 < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          puVar11 = (uint *)FUN_140156940((longlong)(int)*puVar10 + 9);
          if (puVar11 != (uint *)0x0) {
            *puVar11 = 0;
            puVar11[1] = 1;
          }
          uVar17 = uVar16;
          if (puVar8 != (uint *)PTR_DAT_140320098) {
            uVar17 = *puVar10;
          }
          *puVar11 = uVar17;
          puVar20 = puVar18;
          if (puVar8 != (uint *)PTR_DAT_140320098) {
            puVar20 = (uint *)(ulonglong)*puVar10;
          }
          puVar11 = puVar11 + 2;
          FUN_140156810(puVar11,puVar8,puVar20);
          param_1 = local_1d8;
          puVar20 = puVar11;
          if ((puVar8 != (uint *)PTR_DAT_140320098) && (puVar10 != (uint *)0x0)) {
            uVar9 = FUN_1401568c0();
            local_158 = uVar9;
            FUN_140156b50(uVar9);
            local_150 = 1;
            puVar8 = puVar8 + -1;
            *puVar8 = *puVar8 - 1;
            if (*puVar8 == 0) {
              FUN_140156970(puVar10);
            }
            FUN_140156be0(uVar9);
            local_150 = 0;
            param_1 = local_1d8;
          }
        }
      }
      local_1f0 = puVar20;
      puVar8 = puVar11;
      if (puVar11 == (uint *)0x0) {
        puVar8 = (uint *)PTR_DAT_140320098;
      }
      FUN_140156810(puVar8,puVar2,uVar5);
      puVar8 = puVar11;
      if (puVar11 == (uint *)0x0) {
        puVar8 = (uint *)PTR_DAT_140320098;
      }
      uVar5 = FUN_1401567e0(puVar8);
      uVar17 = uVar16;
      if (0 < (int)uVar5) {
        uVar17 = uVar5;
      }
      uVar5 = uVar15;
      if ((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_140320098)) {
        uVar5 = puVar11[-2];
      }
      if (((int)uVar17 < (int)uVar5) || (uVar17 = uVar15, puVar11 == (uint *)0x0)) {
LAB_1401e130d:
        if (((puVar11 != (uint *)PTR_DAT_140320098) && (puVar11 != (uint *)0x0)) &&
           (puVar8 = puVar11 + -2, puVar8 != (uint *)0x0)) {
          *puVar8 = uVar17;
          *(undefined1 *)((longlong)(int)uVar17 + 8 + (longlong)puVar8) = 0;
        }
      }
      else if (puVar11 != (uint *)PTR_DAT_140320098) {
        uVar17 = puVar11[-2];
        goto LAB_1401e130d;
      }
      if (local_e8 != local_e0) {
        free(local_e8);
      }
      lVar22 = param_1 + 0x50;
      puVar8 = puVar11;
      if (puVar11 == (uint *)0x0) {
        puVar8 = (uint *)PTR_DAT_140320098;
      }
      local_170 = lVar22;
      if (puVar8 == (uint *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      puVar8 = puVar11;
      if (puVar11 == (uint *)0x0) {
        puVar8 = (uint *)PTR_DAT_140320098;
      }
      cVar3 = (char)*puVar8;
      puVar10 = puVar18;
      while (cVar3 != '\0') {
        puVar10 = (uint *)(ulonglong)(uint)((int)puVar10 * 0x21 + (int)cVar3);
        puVar8 = (uint *)((longlong)puVar8 + 1);
        cVar3 = *(char *)puVar8;
      }
      uVar1 = (ulonglong)puVar10 % (ulonglong)*(uint *)(param_1 + 0x78);
      if (*(longlong *)(param_1 + 0x58) != 0) {
        for (plVar13 = *(longlong **)(*(longlong *)(param_1 + 0x58) + uVar1 * 8);
            (plVar13 != (longlong *)0x0 &&
            ((uint)uVar1 == *(uint *)(plVar13 + 4) % *(uint *)(param_1 + 0x78)));
            plVar13 = (longlong *)plVar13[2]) {
          puVar14 = (undefined *)*plVar13;
          if ((undefined *)*plVar13 == (undefined *)0x0) {
            puVar14 = PTR_DAT_140320098;
          }
          iVar6 = FUN_140156840(puVar14);
          if (iVar6 == 0) {
            local_178 = plVar13;
            if (plVar13 != (longlong *)0x0) goto LAB_1401e1542;
            goto LAB_1401e140b;
          }
        }
      }
      local_178 = (longlong *)0x0;
LAB_1401e140b:
      puVar8 = puVar11;
      if (puVar11 == (uint *)0x0) {
        puVar8 = (uint *)PTR_DAT_140320098;
      }
      local_160 = lVar22;
      if (puVar8 == (uint *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      puVar8 = puVar11;
      if (puVar11 == (uint *)0x0) {
        puVar8 = (uint *)PTR_DAT_140320098;
      }
      cVar3 = (char)*puVar8;
      puVar10 = puVar18;
      while (cVar3 != '\0') {
        puVar10 = (uint *)(ulonglong)(uint)((int)puVar10 * 0x21 + (int)cVar3);
        puVar8 = (uint *)((longlong)puVar8 + 1);
        cVar3 = *(char *)puVar8;
      }
      uVar1 = (ulonglong)puVar10 % (ulonglong)*(uint *)(param_1 + 0x78);
      if (*(longlong *)(param_1 + 0x58) != 0) {
        for (plVar13 = *(longlong **)(*(longlong *)(param_1 + 0x58) + uVar1 * 8);
            (plVar13 != (longlong *)0x0 &&
            ((uint)uVar1 == *(uint *)(plVar13 + 4) % *(uint *)(param_1 + 0x78)));
            plVar13 = (longlong *)plVar13[2]) {
          puVar14 = (undefined *)*plVar13;
          if ((undefined *)*plVar13 == (undefined *)0x0) {
            puVar14 = PTR_DAT_140320098;
          }
          iVar6 = FUN_140156840(puVar14);
          if (iVar6 == 0) {
            local_168 = plVar13;
            if (plVar13 != (longlong *)0x0) goto LAB_1401e1542;
            goto LAB_1401e14c4;
          }
        }
      }
      local_168 = (longlong *)0x0;
LAB_1401e14c4:
      plVar13 = (longlong *)FUN_1401e0760(lVar22,&local_1f0);
      if (plVar19 != (longlong *)*plVar13) {
        if (plVar19 != (longlong *)0x0) {
          plVar19[1] = plVar19[1] + 1;
          puVar11 = local_1f0;
          plVar19 = local_1e8;
        }
        puVar8 = puVar18;
        if ((*plVar13 != 0) &&
           (*(longlong *)(*plVar13 + 8) = *(longlong *)(*plVar13 + 8) + -1, puVar11 = local_1f0,
           plVar19 = local_1e8, *(longlong *)(*plVar13 + 8) == 0)) {
          puVar8 = (uint *)*plVar13;
        }
        *plVar13 = (longlong)plVar19;
        if (puVar8 != (uint *)0x0) {
          puVar12 = *(undefined8 **)puVar8;
          if (puVar12 != (undefined8 *)0x0) {
            (**(code **)*puVar12)(puVar12,1);
          }
          FUN_140156970(puVar8);
        }
      }
LAB_1401e1542:
      if (((puVar11 != (uint *)0x0) && (puVar11 != (uint *)PTR_DAT_140320098)) &&
         (puVar11 + -2 != (uint *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_188 = uVar9;
        FUN_140156b50(uVar9);
        local_180 = 1;
        puVar8 = puVar11 + -1;
        *puVar8 = *puVar8 - 1;
        if (*puVar8 == 0) {
          FUN_140156970(puVar11 + -2);
        }
        FUN_140156be0(uVar9);
        local_180 = 0;
      }
      local_1f0 = (uint *)PTR_DAT_140320098;
      param_1 = local_1d8;
      puVar12 = local_1a0;
    }
    dVar23 = (double)FUN_1401d3e30(*(undefined8 *)(param_1 + 8));
    param_2 = local_1b0;
    if (3.0 < dVar23 - *(double *)(local_1b0 + 200)) {
      if ((undefined8 *)*puVar12 != (undefined8 *)0x0) {
        puVar18 = *(uint **)*puVar12;
      }
      FUN_1401855c0(puVar18);
      plVar13 = local_1e8;
      *(undefined4 *)(param_2 + 0x18) = 3;
      if (plVar19 != (longlong *)0x0) {
        plVar19 = plVar19 + 1;
        *plVar19 = *plVar19 + -1;
        if (*plVar19 == 0) {
          puVar12 = (undefined8 *)*local_1e8;
          if (puVar12 != (undefined8 *)0x0) {
            (**(code **)*puVar12)(puVar12,1);
          }
          FUN_140156970(plVar13);
        }
      }
      puVar18 = local_1f8;
      if (((local_1f8 != (uint *)0x0) && (local_1f8 != (uint *)PTR_DAT_140320098)) &&
         (puVar8 = local_1f8 + -2, puVar8 != (uint *)0x0)) {
        uVar9 = FUN_1401568c0();
        local_100 = uVar9;
        FUN_140156b50(uVar9);
        local_f8 = 1;
        puVar18 = puVar18 + -1;
        *puVar18 = *puVar18 - 1;
        if (*puVar18 == 0) {
          FUN_140156970(puVar8);
        }
        FUN_140156be0(uVar9);
      }
      return;
    }
    FUN_1401df690(param_1);
    plVar13 = local_1e8;
    if (plVar19 != (longlong *)0x0) {
      plVar19 = plVar19 + 1;
      *plVar19 = *plVar19 + -1;
      if (*plVar19 == 0) {
        if ((undefined8 *)*local_1e8 != (undefined8 *)0x0) {
          (*(code *)**(undefined8 **)*local_1e8)();
        }
        FUN_140156970(plVar13);
      }
    }
    puVar8 = local_1f8;
    if (((local_1f8 != (uint *)0x0) && (local_1f8 != (uint *)PTR_DAT_140320098)) &&
       (puVar10 = local_1f8 + -2, puVar10 != (uint *)0x0)) {
      uVar9 = FUN_1401568c0();
      local_128 = uVar9;
      FUN_140156b50(uVar9);
      local_120 = 1;
      puVar8 = puVar8 + -1;
      *puVar8 = *puVar8 - 1;
      if (*puVar8 == 0) {
        FUN_140156970(puVar10);
      }
      FUN_140156be0(uVar9);
      local_120 = 0;
    }
    local_1f8 = (uint *)PTR_DAT_140320098;
  } while( true );
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401e1770(longlong *param_1,longlong param_2)

{
  longlong *plVar1;
  int *piVar2;
  ushort uVar3;
  longlong *plVar4;
  char cVar5;
  uint uVar6;
  uint uVar7;
  uint uVar8;
  int iVar9;
  void *_Dst;
  uint *puVar10;
  uint *puVar11;
  undefined8 uVar12;
  uint *puVar13;
  undefined1 *puVar14;
  undefined8 uVar15;
  longlong lVar16;
  undefined *puVar17;
  void *_Src;
  uint *puVar18;
  longlong lVar19;
  uint *puVar20;
  uint uVar21;
  undefined *puVar22;
  undefined1 auStack_a38 [32];
  uint local_a18;
  uint *local_a08;
  uint *local_a00;
  uint *local_9f8;
  uint *local_9f0;
  uint local_9e8 [2];
  longlong *local_9e0;
  undefined *local_9d8;
  undefined *local_9d0;
  undefined *local_9c8;
  undefined *local_9c0;
  undefined *local_9b8;
  undefined8 local_9b0;
  undefined **local_9a8;
  undefined4 local_9a0;
  undefined2 local_99c;
  int local_998;
  undefined8 local_990;
  undefined **local_988;
  undefined4 local_980;
  undefined2 local_97c;
  int local_978;
  undefined8 local_970;
  undefined **local_968;
  undefined4 local_960;
  undefined2 local_95c;
  undefined4 local_958;
  undefined8 local_950;
  undefined1 local_948;
  undefined8 local_940;
  undefined1 local_938;
  undefined8 local_930;
  undefined1 local_928;
  undefined8 local_920;
  undefined1 local_918;
  undefined8 local_910;
  undefined1 local_908;
  undefined8 local_900;
  undefined1 local_8f8;
  undefined8 local_8f0;
  undefined1 local_8e8;
  undefined8 local_8e0;
  undefined8 local_8d8;
  undefined1 local_8d0;
  undefined8 local_8c8;
  undefined1 local_8c0;
  undefined8 local_8b8;
  undefined1 local_8b0;
  undefined8 local_8a8;
  undefined1 local_8a0;
  undefined1 *local_898;
  undefined1 local_890 [136];
  undefined1 *local_808;
  undefined1 local_800 [136];
  undefined1 *local_778;
  undefined1 local_770 [264];
  undefined1 local_668 [1568];
  ulonglong local_48;
  
  local_8e0 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_a38;
  iVar9 = *(int *)(param_2 + 0x2490);
  local_9e0 = param_1;
  if (iVar9 == 0) {
    lVar19 = 0;
    if (*(int *)(param_2 + 0x2494) == 0) {
      local_9d8 = (undefined *)FUN_140156940(0x400);
      lVar16 = lVar19;
      if (local_9d8 != (undefined *)0x0) {
        lVar16 = FUN_140185b00(local_9d8,0,param_2);
      }
      if (lVar16 == 0) {
        local_9e0 = (longlong *)0x0;
      }
      else {
        local_9e0 = (longlong *)FUN_140156940(0x10);
        local_9e0[1] = 1;
        *local_9e0 = lVar16;
      }
      plVar1 = local_9e0;
      FUN_140161a50(param_2 + 0x2480,&local_9e0);
      plVar4 = local_9e0;
      if (plVar1 != (longlong *)0x0) {
        plVar1 = plVar1 + 1;
        *plVar1 = *plVar1 + -1;
        if (*plVar1 == 0) {
          lVar16 = *local_9e0;
          if (lVar16 != 0) {
            FUN_1401859b0(lVar16);
            FUN_140156970(lVar16);
          }
          FUN_140156970(plVar4);
        }
      }
      lVar16 = lVar19;
      if (*(longlong **)(param_2 + 0x2480) != (longlong *)0x0) {
        lVar16 = **(longlong **)(param_2 + 0x2480);
      }
      FUN_140187680(lVar16);
      lVar16 = lVar19;
      if (*(longlong **)(param_2 + 0x2480) != (longlong *)0x0) {
        lVar16 = **(longlong **)(param_2 + 0x2480);
      }
      FUN_140184da0(lVar16,0);
      cVar5 = FUN_1401dead0(param_1,param_2);
      if (cVar5 == '\0') goto LAB_1401e28ba;
    }
    FUN_140184e20(local_668);
    lVar16 = lVar19;
    if (*(longlong **)(param_2 + 0x2480) != (longlong *)0x0) {
      lVar16 = **(longlong **)(param_2 + 0x2480);
    }
    FUN_140184e40(local_668,lVar16);
    lVar16 = lVar19;
    if (*(longlong **)(param_2 + 0x2480) != (longlong *)0x0) {
      lVar16 = **(longlong **)(param_2 + 0x2480);
    }
    FUN_140184ea0(local_668,lVar16);
    FUN_140184f00(local_668,0);
    if (*(longlong **)(param_2 + 0x2480) != (longlong *)0x0) {
      lVar19 = **(longlong **)(param_2 + 0x2480);
    }
    cVar5 = FUN_140184f60(local_668,lVar19,local_9e8);
    if (cVar5 != '\0') {
      if (local_9e8[0] == 0) {
        if (0 < *(int *)(param_2 + 0x2490)) {
          return;
        }
        *(undefined8 *)(param_2 + 0x2490) = 1;
        return;
      }
      cVar5 = FUN_1401dead0(param_1,param_2);
      if (cVar5 != '\0') goto LAB_1401e298c;
      goto LAB_1401e28ba;
    }
    goto LAB_1401e298c;
  }
  if (iVar9 == 1) {
    uVar12 = 0;
    iVar9 = 0;
    if (*(int *)(param_2 + 0x2494) == 0) {
      uVar15 = uVar12;
      if (*(undefined8 **)(param_2 + 0x2480) != (undefined8 *)0x0) {
        uVar15 = **(undefined8 **)(param_2 + 0x2480);
      }
      FUN_140184da0(uVar15,1);
      local_808 = local_800;
      FUN_140153e40(&local_808,param_2 + 0x52,3);
      local_898 = local_890;
      FUN_140153e40(&local_898,param_2 + 0x458,3);
      local_a18 = (uint)*(ushort *)(param_2 + 0x245c);
      FUN_1401592d0(param_2 + 0x2488,
                    "GET %s HTTP/1.1\r\n\r\nHost: %s:%d\r\n\r\nConnection: Keep-Alive\r\n\r\n",
                    local_898,local_808);
      if (local_898 != local_890) {
        free(local_898);
      }
      if (local_808 != local_800) {
        free(local_808);
      }
      cVar5 = FUN_1401dd3b0(param_1,param_2);
      if (cVar5 == '\0') goto LAB_1401e28ba;
    }
    local_988 = Proud::AddrPort::vftable;
    local_978 = 0;
    local_990 = 0;
    local_980 = DAT_140320450;
    local_97c = DAT_140320454;
    if (*(undefined8 **)(param_2 + 0x2480) != (undefined8 *)0x0) {
      uVar12 = **(undefined8 **)(param_2 + 0x2480);
    }
    cVar5 = FUN_1401854f0(uVar12,0,&local_990);
    if (cVar5 != '\0') {
      *(undefined1 *)(param_2 + 0x24c0) = 0;
      if (local_978 == 0) goto LAB_1401e28ba;
      *(int *)(param_2 + 0x2504) = *(int *)(param_2 + 0x2504) + local_978;
      puVar22 = *(undefined **)(param_2 + 0x2488);
      if (puVar22 != (undefined *)0x0) {
        if (puVar22 == PTR_DAT_140320098) {
          iVar9 = 0;
        }
        else {
          iVar9 = *(int *)(puVar22 + -8);
        }
      }
      if ((iVar9 - *(int *)(param_2 + 0x2504)) + 1 < 1) {
        if (1 < *(int *)(param_2 + 0x2490)) {
          return;
        }
        *(undefined8 *)(param_2 + 0x2490) = 2;
        return;
      }
      FUN_1401dd3b0(param_1,param_2);
    }
    goto LAB_1401e298c;
  }
  if (iVar9 == 2) {
    uVar12 = 0;
    if (*(int *)(param_2 + 0x2494) == 0) {
      *(undefined1 *)(param_2 + 0x2500) = 1;
      uVar15 = uVar12;
      if (*(undefined8 **)(param_2 + 0x2480) != (undefined8 *)0x0) {
        uVar15 = **(undefined8 **)(param_2 + 0x2480);
      }
      iVar9 = FUN_140186430(uVar15,0x8000);
      if (iVar9 == 0) goto LAB_1401e2527;
    }
    else {
LAB_1401e2527:
      local_9a8 = Proud::AddrPort::vftable;
      local_998 = 0;
      local_9b0 = 0;
      local_9a0 = DAT_140320450;
      local_99c = DAT_140320454;
      uVar15 = uVar12;
      if (*(undefined8 **)(param_2 + 0x2480) != (undefined8 *)0x0) {
        uVar15 = **(undefined8 **)(param_2 + 0x2480);
      }
      cVar5 = FUN_140185280(uVar15,0,&local_9b0);
      if (cVar5 == '\0') {
LAB_1401e298c:
        *(int *)(param_2 + 0x2494) = *(int *)(param_2 + 0x2494) + 1;
        return;
      }
      *(undefined1 *)(param_2 + 0x2500) = 0;
      if (local_998 == 0) {
LAB_1401e28ba:
        if (2 < *(int *)(param_2 + 0x2490)) {
          return;
        }
        *(undefined8 *)(param_2 + 0x2490) = 3;
        return;
      }
      uVar15 = uVar12;
      if (*(undefined8 **)(param_2 + 0x2480) != (undefined8 *)0x0) {
        uVar15 = **(undefined8 **)(param_2 + 0x2480);
      }
      uVar15 = FUN_140185840(uVar15);
      FUN_1401dd430(param_2 + 0x2510,uVar15,local_998);
      *(int *)(param_2 + 0x2508) = *(int *)(param_2 + 0x2508) + local_998;
      iVar9 = 0x8000 - *(int *)(param_2 + 0x2508);
      if (iVar9 < 1) goto LAB_1401e28ba;
      *(undefined1 *)(param_2 + 0x2500) = 1;
      if (*(undefined8 **)(param_2 + 0x2480) != (undefined8 *)0x0) {
        uVar12 = **(undefined8 **)(param_2 + 0x2480);
      }
      iVar9 = FUN_140186430(uVar12,iVar9);
      if (iVar9 == 0) goto LAB_1401e298c;
    }
    *(undefined1 *)(param_2 + 0x2500) = 0;
    goto LAB_1401e25fd;
  }
  if (iVar9 != 3) {
    if (iVar9 == 4) {
      if (((*(int *)(param_2 + 0x2494) == 0) &&
          (*(longlong **)(param_2 + 0x2480) != (longlong *)0x0)) &&
         (**(longlong **)(param_2 + 0x2480) != 0)) {
        FUN_1401855c0();
      }
      local_968 = Proud::AddrPort::vftable;
      uVar12 = 0;
      local_958 = 0;
      local_970 = 0;
      local_960 = DAT_140320450;
      local_95c = DAT_140320454;
      uVar15 = uVar12;
      if (*(undefined8 **)(param_2 + 0x2480) != (undefined8 *)0x0) {
        uVar15 = **(undefined8 **)(param_2 + 0x2480);
      }
      cVar5 = FUN_140185280(uVar15,0,&local_970);
      if (cVar5 != '\0') {
        *(undefined1 *)(param_2 + 0x2500) = 0;
      }
      if (*(undefined8 **)(param_2 + 0x2480) != (undefined8 *)0x0) {
        uVar12 = **(undefined8 **)(param_2 + 0x2480);
      }
      cVar5 = FUN_1401854f0(uVar12,0,&local_970);
      if (cVar5 != '\0') {
        *(undefined1 *)(param_2 + 0x24c0) = 0;
      }
      if ((*(char *)(param_2 + 0x2500) == '\0') && (*(char *)(param_2 + 0x24c0) == '\0')) {
        if (4 < *(int *)(param_2 + 0x2490)) {
          return;
        }
        *(undefined8 *)(param_2 + 0x2490) = 5;
        return;
      }
    }
    goto LAB_1401e298c;
  }
  uVar8 = 0;
  if (*(int *)(param_2 + 0x2528) == 0) goto LAB_1401e25fd;
  _Dst = (void *)FUN_1401243d0(param_2 + 0x2538);
  memset(_Dst,0,(longlong)(*(int *)(param_2 + 0x2528) + 1));
  _Src = (void *)0x0;
  if (*(int *)(param_2 + 0x2528) != 0) {
    _Src = *(void **)(param_2 + 0x2520);
  }
  memcpy(_Dst,_Src,(longlong)*(int *)(param_2 + 0x2528));
  FUN_1401244c0(param_2 + 0x2538);
  FUN_1401568c0();
  puVar22 = PTR_DAT_140320098;
  local_9d8 = PTR_DAT_140320098;
  FUN_1401de080(param_2 + 0x2538);
  FUN_1401568c0();
  puVar20 = (uint *)PTR_DAT_140320098;
  local_9f0 = (uint *)PTR_DAT_140320098;
  uVar6 = FUN_1401567e0("MODELDESCRIPTION");
  iVar9 = 0;
  if ((puVar20 != (uint *)0x0) && (puVar20 != (uint *)PTR_DAT_140320098)) {
    iVar9 = *(int *)((longlong)puVar20 + -8);
  }
  uVar7 = uVar6;
  if ((int)uVar6 <= iVar9) {
    uVar7 = 0;
    if ((puVar20 != (uint *)0x0) && (uVar7 = 0, puVar20 != (uint *)PTR_DAT_140320098)) {
      uVar7 = *(uint *)((longlong)puVar20 + -8);
    }
  }
  uVar21 = 1;
  if (1 < (int)uVar7) {
    uVar21 = uVar7;
  }
  iVar9 = 0;
  if ((puVar20 != (uint *)0x0) && (iVar9 = 0, puVar20 != (uint *)PTR_DAT_140320098)) {
    iVar9 = *(int *)((longlong)puVar20 + -8);
  }
  if (iVar9 < (int)uVar21) {
    if (puVar20 == (uint *)0x0) {
      puVar20 = (uint *)PTR_DAT_140320098;
    }
    local_9f0 = puVar20;
    if ((int)uVar21 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar21 == 0) {
      FUN_140050520(&local_9f0);
    }
    else {
      uVar7 = 0;
      if ((puVar20 != (uint *)0x0) && (puVar20 != (uint *)PTR_DAT_140320098)) {
        uVar7 = puVar20[-2];
      }
      if (uVar21 != uVar7) {
        puVar13 = (uint *)FUN_140156940((longlong)(int)uVar21 + 9);
        if (puVar13 != (uint *)0x0) {
          *puVar13 = 0;
          puVar13[1] = 1;
        }
        *puVar13 = uVar21;
        uVar7 = 0;
        if ((puVar20 != (uint *)0x0) && (puVar20 != (uint *)PTR_DAT_140320098)) {
          uVar7 = puVar20[-2];
        }
        puVar10 = (uint *)PTR_DAT_140320098;
        if ((int)uVar21 < (int)uVar7) {
LAB_1401e1a35:
          if (puVar20 != (uint *)0x0) {
            puVar10 = puVar20;
          }
        }
        else {
          uVar21 = uVar8;
          if (puVar20 != (uint *)0x0) {
            if (puVar20 != (uint *)PTR_DAT_140320098) {
              uVar21 = puVar20[-2];
            }
            goto LAB_1401e1a35;
          }
        }
        FUN_140156810(puVar13 + 2,puVar10,uVar21);
        FUN_140050520(&local_9f0);
        local_9f0 = puVar13 + 2;
      }
    }
  }
  FUN_1401242e0(&local_9f0);
  puVar20 = local_9f0;
  puVar13 = local_9f0;
  if (local_9f0 == (uint *)0x0) {
    puVar13 = (uint *)PTR_DAT_140320098;
  }
  FUN_140156810(puVar13,"MODELDESCRIPTION",uVar6);
  puVar13 = puVar20;
  if (puVar20 == (uint *)0x0) {
    puVar13 = (uint *)PTR_DAT_140320098;
  }
  uVar7 = FUN_1401567e0(puVar13);
  uVar6 = 0;
  if (0 < (int)uVar7) {
    uVar6 = uVar7;
  }
  uVar7 = 0;
  if ((puVar20 != (uint *)0x0) && (uVar7 = 0, puVar20 != (uint *)PTR_DAT_140320098)) {
    uVar7 = puVar20[-2];
  }
  if (((int)uVar6 < (int)uVar7) || (uVar6 = 0, puVar20 == (uint *)0x0)) {
LAB_1401e1acd:
    if (((puVar20 != (uint *)PTR_DAT_140320098) && (puVar20 != (uint *)0x0)) &&
       (puVar13 = puVar20 + -2, puVar13 != (uint *)0x0)) {
      *puVar13 = uVar6;
      *(undefined1 *)((longlong)(int)uVar6 + 8 + (longlong)puVar13) = 0;
    }
  }
  else if (puVar20 != (uint *)PTR_DAT_140320098) {
    uVar6 = puVar20[-2];
    goto LAB_1401e1acd;
  }
  FUN_1401568c0();
  puVar13 = (uint *)PTR_DAT_140320098;
  local_a00 = (uint *)PTR_DAT_140320098;
  uVar6 = FUN_1401567e0("FRIENDLYNAME");
  iVar9 = 0;
  if ((puVar13 != (uint *)0x0) && (puVar13 != (uint *)PTR_DAT_140320098)) {
    iVar9 = *(int *)((longlong)puVar13 + -8);
  }
  uVar7 = uVar6;
  if ((int)uVar6 <= iVar9) {
    uVar7 = 0;
    if ((puVar13 != (uint *)0x0) && (uVar7 = 0, puVar13 != (uint *)PTR_DAT_140320098)) {
      uVar7 = *(uint *)((longlong)puVar13 + -8);
    }
  }
  uVar21 = 1;
  if (1 < (int)uVar7) {
    uVar21 = uVar7;
  }
  iVar9 = 0;
  if ((puVar13 != (uint *)0x0) && (iVar9 = 0, puVar13 != (uint *)PTR_DAT_140320098)) {
    iVar9 = *(int *)((longlong)puVar13 + -8);
  }
  if (iVar9 < (int)uVar21) {
    if (puVar13 == (uint *)0x0) {
      puVar13 = (uint *)PTR_DAT_140320098;
    }
    local_a00 = puVar13;
    if ((int)uVar21 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar21 == 0) {
      FUN_140050520(&local_a00);
    }
    else {
      uVar7 = 0;
      if ((puVar13 != (uint *)0x0) && (puVar13 != (uint *)PTR_DAT_140320098)) {
        uVar7 = puVar13[-2];
      }
      if (uVar21 != uVar7) {
        puVar10 = (uint *)FUN_140156940((longlong)(int)uVar21 + 9);
        if (puVar10 != (uint *)0x0) {
          *puVar10 = 0;
          puVar10[1] = 1;
        }
        *puVar10 = uVar21;
        uVar7 = 0;
        if ((puVar13 != (uint *)0x0) && (puVar13 != (uint *)PTR_DAT_140320098)) {
          uVar7 = puVar13[-2];
        }
        puVar11 = (uint *)PTR_DAT_140320098;
        if ((int)uVar21 < (int)uVar7) {
LAB_1401e1bda:
          if (puVar13 != (uint *)0x0) {
            puVar11 = puVar13;
          }
        }
        else {
          uVar21 = uVar8;
          if (puVar13 != (uint *)0x0) {
            if (puVar13 != (uint *)PTR_DAT_140320098) {
              uVar21 = puVar13[-2];
            }
            goto LAB_1401e1bda;
          }
        }
        FUN_140156810(puVar10 + 2,puVar11,uVar21);
        FUN_140050520(&local_a00);
        local_a00 = puVar10 + 2;
      }
    }
  }
  FUN_1401242e0(&local_a00);
  puVar13 = local_a00;
  puVar10 = local_a00;
  if (local_a00 == (uint *)0x0) {
    puVar10 = (uint *)PTR_DAT_140320098;
  }
  FUN_140156810(puVar10,"FRIENDLYNAME",uVar6);
  puVar10 = puVar13;
  if (puVar13 == (uint *)0x0) {
    puVar10 = (uint *)PTR_DAT_140320098;
  }
  uVar7 = FUN_1401567e0(puVar10);
  uVar6 = 0;
  if (0 < (int)uVar7) {
    uVar6 = uVar7;
  }
  uVar7 = 0;
  if ((puVar13 != (uint *)0x0) && (uVar7 = 0, puVar13 != (uint *)PTR_DAT_140320098)) {
    uVar7 = puVar13[-2];
  }
  if (((int)uVar6 < (int)uVar7) || (uVar6 = 0, puVar13 == (uint *)0x0)) {
LAB_1401e1c72:
    if (((puVar13 != (uint *)PTR_DAT_140320098) && (puVar13 != (uint *)0x0)) &&
       (puVar10 = puVar13 + -2, puVar10 != (uint *)0x0)) {
      *puVar10 = uVar6;
      *(undefined1 *)((longlong)(int)uVar6 + 8 + (longlong)puVar10) = 0;
    }
  }
  else if (puVar13 != (uint *)PTR_DAT_140320098) {
    uVar6 = puVar13[-2];
    goto LAB_1401e1c72;
  }
  local_a08 = (uint *)FUN_1401dedd0(local_9e0,&local_9d0,param_2 + 0x2538,&local_9f0);
  FUN_1401568c0();
  puVar10 = (uint *)PTR_DAT_140320098;
  local_9f8 = (uint *)PTR_DAT_140320098;
  local_9e8[0] = FUN_1401567e0(&DAT_140278340);
  iVar9 = 0;
  if ((puVar10 != (uint *)0x0) && (puVar10 != (uint *)PTR_DAT_140320098)) {
    iVar9 = *(int *)((longlong)puVar10 + -8);
  }
  uVar6 = local_9e8[0];
  if ((int)local_9e8[0] <= iVar9) {
    uVar6 = 0;
    if ((puVar10 != (uint *)0x0) && (uVar6 = 0, puVar10 != (uint *)PTR_DAT_140320098)) {
      uVar6 = *(uint *)((longlong)puVar10 + -8);
    }
  }
  uVar7 = 1;
  if (1 < (int)uVar6) {
    uVar7 = uVar6;
  }
  iVar9 = 0;
  if ((puVar10 != (uint *)0x0) && (iVar9 = 0, puVar10 != (uint *)PTR_DAT_140320098)) {
    iVar9 = *(int *)((longlong)puVar10 + -8);
  }
  if (iVar9 < (int)uVar7) {
    if (puVar10 == (uint *)0x0) {
      puVar10 = (uint *)PTR_DAT_140320098;
    }
    local_9f8 = puVar10;
    if ((int)uVar7 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    if (uVar7 == 0) {
      FUN_140050520(&local_9f8);
    }
    else {
      uVar6 = 0;
      if ((puVar10 != (uint *)0x0) && (puVar10 != (uint *)PTR_DAT_140320098)) {
        uVar6 = puVar10[-2];
      }
      if (uVar7 != uVar6) {
        puVar11 = (uint *)FUN_140156940((longlong)(int)uVar7 + 9);
        if (puVar11 != (uint *)0x0) {
          *puVar11 = 0;
          puVar11[1] = 1;
        }
        *puVar11 = uVar7;
        uVar6 = 0;
        if ((puVar10 != (uint *)0x0) && (puVar10 != (uint *)PTR_DAT_140320098)) {
          uVar6 = puVar10[-2];
        }
        puVar18 = (uint *)PTR_DAT_140320098;
        if ((int)uVar7 < (int)uVar6) {
LAB_1401e1da9:
          if (puVar10 != (uint *)0x0) {
            puVar18 = puVar10;
          }
        }
        else {
          uVar7 = uVar8;
          if (puVar10 != (uint *)0x0) {
            if (puVar10 != (uint *)PTR_DAT_140320098) {
              uVar7 = puVar10[-2];
            }
            goto LAB_1401e1da9;
          }
        }
        FUN_140156810(puVar11 + 2,puVar18,uVar7);
        FUN_140050520(&local_9f8);
        local_9f8 = puVar11 + 2;
      }
    }
  }
  FUN_1401242e0(&local_9f8);
  puVar10 = local_9f8;
  puVar11 = local_9f8;
  if (local_9f8 == (uint *)0x0) {
    puVar11 = (uint *)PTR_DAT_140320098;
  }
  FUN_140156810(puVar11,&DAT_140278340,local_9e8[0]);
  puVar11 = puVar10;
  if (puVar10 == (uint *)0x0) {
    puVar11 = (uint *)PTR_DAT_140320098;
  }
  uVar7 = FUN_1401567e0(puVar11);
  uVar6 = 0;
  if (0 < (int)uVar7) {
    uVar6 = uVar7;
  }
  uVar7 = 0;
  if ((puVar10 != (uint *)0x0) && (uVar7 = 0, puVar10 != (uint *)PTR_DAT_140320098)) {
    uVar7 = puVar10[-2];
  }
  if (((int)uVar6 < (int)uVar7) || (uVar6 = 0, puVar10 == (uint *)0x0)) {
LAB_1401e1e43:
    if (((puVar10 != (uint *)PTR_DAT_140320098) && (puVar10 != (uint *)0x0)) &&
       (puVar11 = puVar10 + -2, puVar11 != (uint *)0x0)) {
      *puVar11 = uVar6;
      *(undefined1 *)((longlong)(int)uVar6 + 8 + (longlong)puVar11) = 0;
    }
  }
  else if (puVar10 != (uint *)PTR_DAT_140320098) {
    uVar6 = puVar10[-2];
    goto LAB_1401e1e43;
  }
  uVar12 = FUN_1401dedd0(local_9e0,&local_9b8,param_2 + 0x2538,&local_a00);
  uVar12 = FUN_1401a6310(&local_9c0,uVar12,&local_9f8);
  local_a08 = (uint *)FUN_1401a6310(&local_9c8,uVar12,local_a08);
  if (puVar22 == (undefined *)0x0) {
    puVar22 = PTR_DAT_140320098;
  }
  local_9d8 = puVar22;
  if (*(undefined **)local_a08 != puVar22) {
    uVar12 = FUN_1401568c0();
    local_920 = uVar12;
    FUN_140156b50(uVar12);
    local_918 = 1;
    if (((puVar22 != (undefined *)0x0) && (puVar22 != PTR_DAT_140320098)) &&
       (puVar22 + -8 != (undefined *)0x0)) {
      uVar12 = FUN_1401568c0();
      local_8a8 = uVar12;
      FUN_140156b50(uVar12);
      local_8a0 = 1;
      piVar2 = (int *)(puVar22 + -4);
      *piVar2 = *piVar2 + -1;
      if (*piVar2 == 0) {
        FUN_140156970(puVar22 + -8);
      }
      FUN_140156be0(uVar12);
      uVar12 = local_920;
    }
    puVar22 = *(undefined **)local_a08;
    if (((puVar22 != PTR_DAT_140320098) && (puVar22 != (undefined *)0x0)) &&
       (puVar22 != (undefined *)0x8)) {
      *(int *)(puVar22 + -4) = *(int *)(puVar22 + -4) + 1;
    }
    local_9d8 = puVar22;
    FUN_140156be0(uVar12);
  }
  if (((local_9c8 != (undefined *)0x0) && (local_9c8 != PTR_DAT_140320098)) &&
     (local_9c8 + -8 != (undefined *)0x0)) {
    local_930 = FUN_1401568c0();
    FUN_140156b50(local_930);
    local_928 = 1;
    piVar2 = (int *)(local_9c8 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(local_9c8 + -8);
    }
    FUN_140156be0(local_930);
  }
  local_9c8 = PTR_DAT_140320098;
  if (((local_9c0 != (undefined *)0x0) && (local_9c0 != PTR_DAT_140320098)) &&
     (local_9c0 + -8 != (undefined *)0x0)) {
    local_950 = FUN_1401568c0();
    FUN_140156b50(local_950);
    local_948 = 1;
    piVar2 = (int *)(local_9c0 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(local_9c0 + -8);
    }
    FUN_140156be0(local_950);
  }
  local_9c0 = PTR_DAT_140320098;
  if (((local_9b8 != (undefined *)0x0) && (local_9b8 != PTR_DAT_140320098)) &&
     (local_9b8 + -8 != (undefined *)0x0)) {
    local_940 = FUN_1401568c0();
    FUN_140156b50(local_940);
    local_938 = 1;
    piVar2 = (int *)(local_9b8 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(local_9b8 + -8);
    }
    FUN_140156be0(local_940);
  }
  local_9b8 = PTR_DAT_140320098;
  if (((puVar10 != (uint *)0x0) && (puVar10 != (uint *)PTR_DAT_140320098)) &&
     (puVar10 + -2 != (uint *)0x0)) {
    uVar12 = FUN_1401568c0();
    local_8b8 = uVar12;
    FUN_140156b50(uVar12);
    local_8b0 = 1;
    puVar11 = puVar10 + -1;
    *puVar11 = *puVar11 - 1;
    if (*puVar11 == 0) {
      FUN_140156970(puVar10 + -2);
    }
    FUN_140156be0(uVar12);
  }
  if (((local_9d0 != (undefined *)0x0) && (local_9d0 != PTR_DAT_140320098)) &&
     (local_9d0 + -8 != (undefined *)0x0)) {
    uVar12 = FUN_1401568c0();
    local_900 = uVar12;
    FUN_140156b50(uVar12);
    local_8f8 = 1;
    piVar2 = (int *)(local_9d0 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(local_9d0 + -8);
    }
    FUN_140156be0(uVar12);
  }
  local_9d0 = PTR_DAT_140320098;
  if (((puVar13 != (uint *)0x0) && (puVar13 != (uint *)PTR_DAT_140320098)) &&
     (puVar13 + -2 != (uint *)0x0)) {
    uVar12 = FUN_1401568c0();
    local_8f0 = uVar12;
    FUN_140156b50(uVar12);
    local_8e8 = 1;
    puVar10 = puVar13 + -1;
    *puVar10 = *puVar10 - 1;
    if (*puVar10 == 0) {
      FUN_140156970(puVar13 + -2);
    }
    FUN_140156be0(uVar12);
  }
  if (((puVar20 != (uint *)0x0) && (puVar20 != (uint *)PTR_DAT_140320098)) &&
     (puVar20 + -2 != (uint *)0x0)) {
    uVar12 = FUN_1401568c0();
    local_8c8 = uVar12;
    FUN_140156b50(uVar12);
    local_8c0 = 1;
    puVar13 = puVar20 + -1;
    *puVar13 = *puVar13 - 1;
    if (*puVar13 == 0) {
      FUN_140156970(puVar20 + -2);
    }
    FUN_140156be0(uVar12);
  }
  if (((puVar22 != (undefined *)0x0) && (puVar22 != PTR_DAT_140320098)) &&
     (2 < *(int *)(puVar22 + -8))) {
    local_778 = local_770;
    FUN_140142dc0(&local_778,puVar22,3);
    puVar14 = local_778;
    FUN_1401568c0();
    puVar20 = (uint *)PTR_DAT_1403200a0;
    local_a08 = (uint *)PTR_DAT_1403200a0;
    uVar6 = FUN_140156740(puVar14);
    iVar9 = 0;
    if ((puVar20 != (uint *)0x0) && (puVar20 != (uint *)PTR_DAT_1403200a0)) {
      iVar9 = *(int *)((longlong)puVar20 + -8);
    }
    uVar7 = uVar6;
    if ((int)uVar6 <= iVar9) {
      uVar7 = 0;
      if ((puVar20 != (uint *)0x0) && (uVar7 = 0, puVar20 != (uint *)PTR_DAT_1403200a0)) {
        uVar7 = *(uint *)((longlong)puVar20 + -8);
      }
    }
    uVar21 = 1;
    if (1 < (int)uVar7) {
      uVar21 = uVar7;
    }
    iVar9 = 0;
    if ((puVar20 != (uint *)0x0) && (iVar9 = 0, puVar20 != (uint *)PTR_DAT_1403200a0)) {
      iVar9 = *(int *)((longlong)puVar20 + -8);
    }
    if (iVar9 < (int)uVar21) {
      if (puVar20 == (uint *)0x0) {
        puVar20 = (uint *)PTR_DAT_1403200a0;
      }
      local_a08 = puVar20;
      if ((int)uVar21 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (uVar21 == 0) {
        FUN_14004f990(&local_a08);
      }
      else {
        uVar7 = 0;
        if ((puVar20 != (uint *)0x0) && (puVar20 != (uint *)PTR_DAT_1403200a0)) {
          uVar7 = puVar20[-2];
        }
        if (uVar21 != uVar7) {
          puVar13 = (uint *)FUN_140156940((longlong)(int)uVar21 * 2 + 10);
          if (puVar13 != (uint *)0x0) {
            *puVar13 = 0;
            puVar13[1] = 1;
          }
          *puVar13 = uVar21;
          uVar7 = 0;
          if ((puVar20 != (uint *)0x0) && (puVar20 != (uint *)PTR_DAT_1403200a0)) {
            uVar7 = puVar20[-2];
          }
          puVar10 = (uint *)PTR_DAT_1403200a0;
          if ((int)uVar21 < (int)uVar7) {
LAB_1401e22ac:
            if (puVar20 != (uint *)0x0) {
              puVar10 = puVar20;
            }
          }
          else {
            uVar21 = uVar8;
            if (puVar20 != (uint *)0x0) {
              if (puVar20 != (uint *)PTR_DAT_1403200a0) {
                uVar21 = puVar20[-2];
              }
              goto LAB_1401e22ac;
            }
          }
          FUN_140156770(puVar13 + 2,puVar10,uVar21);
          FUN_14004f990(&local_a08);
          local_a08 = puVar13 + 2;
        }
      }
    }
    FUN_14004f670(&local_a08);
    puVar20 = local_a08;
    puVar13 = local_a08;
    if (local_a08 == (uint *)0x0) {
      puVar13 = (uint *)PTR_DAT_1403200a0;
    }
    FUN_140156770(puVar13,puVar14,uVar6);
    puVar13 = puVar20;
    if (puVar20 == (uint *)0x0) {
      puVar13 = (uint *)PTR_DAT_1403200a0;
    }
    uVar6 = FUN_140156740(puVar13);
    plVar1 = local_9e0;
    uVar8 = 0;
    if (0 < (int)uVar6) {
      uVar8 = uVar6;
    }
    uVar6 = 0;
    if ((puVar20 != (uint *)0x0) && (uVar6 = 0, puVar20 != (uint *)PTR_DAT_1403200a0)) {
      uVar6 = puVar20[-2];
    }
    if (((int)uVar8 < (int)uVar6) || (uVar8 = 0, puVar20 == (uint *)0x0)) {
LAB_1401e2340:
      if (((puVar20 != (uint *)PTR_DAT_1403200a0) && (puVar20 != (uint *)0x0)) &&
         (puVar20 + -2 != (uint *)0x0)) {
        puVar20[-2] = uVar8;
        *(ushort *)((longlong)puVar20 + (longlong)(int)uVar8 * 2) = 0;
      }
    }
    else if (puVar20 != (uint *)PTR_DAT_1403200a0) {
      uVar8 = puVar20[-2];
      goto LAB_1401e2340;
    }
    puVar13 = puVar20;
    if (puVar20 == (uint *)0x0) {
      puVar13 = (uint *)PTR_DAT_1403200a0;
    }
    if (puVar13 == (uint *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    uVar8 = 0;
    puVar13 = puVar20;
    if (puVar20 == (uint *)0x0) {
      puVar13 = (uint *)PTR_DAT_1403200a0;
    }
    uVar3 = (ushort)*puVar13;
    while (uVar3 != 0) {
      uVar8 = uVar8 * 0x21 + (uint)uVar3;
      puVar13 = (uint *)((longlong)puVar13 + 2);
      uVar3 = *(ushort *)puVar13;
    }
    uVar6 = *(uint *)(local_9e0 + 0x1a);
    if (local_9e0[0x16] != 0) {
      plVar4 = *(longlong **)(local_9e0[0x16] + ((ulonglong)uVar8 % (ulonglong)uVar6) * 8);
      while( true ) {
        if ((plVar4 == (longlong *)0x0) ||
           ((uint)((ulonglong)uVar8 % (ulonglong)uVar6) !=
            *(uint *)(plVar4 + 4) % *(uint *)(plVar1 + 0x1a))) goto LAB_1401e2424;
        puVar17 = (undefined *)*plVar4;
        if ((undefined *)*plVar4 == (undefined *)0x0) {
          puVar17 = PTR_DAT_1403200a0;
        }
        iVar9 = FUN_140156780(puVar17);
        if (iVar9 == 0) break;
        plVar4 = (longlong *)plVar4[2];
      }
      if (plVar4 != (longlong *)0x0) goto LAB_1401e2438;
    }
LAB_1401e2424:
    puVar14 = (undefined1 *)FUN_1401e0860(plVar1 + 0x15,&local_a08);
    *puVar14 = 0;
LAB_1401e2438:
    if (((puVar20 != (uint *)0x0) && (puVar20 != (uint *)PTR_DAT_1403200a0)) &&
       (puVar20 + -2 != (uint *)0x0)) {
      uVar12 = FUN_1401568c0();
      local_8d8 = uVar12;
      FUN_140156b50(uVar12);
      local_8d0 = 1;
      puVar13 = puVar20 + -1;
      *puVar13 = *puVar13 - 1;
      if (*puVar13 == 0) {
        FUN_140156970(puVar20 + -2);
      }
      FUN_140156be0(uVar12);
    }
    if (local_778 != local_770) {
      free(local_778);
    }
  }
  if (((puVar22 != (undefined *)0x0) && (puVar22 != PTR_DAT_140320098)) &&
     (puVar22 + -8 != (undefined *)0x0)) {
    uVar12 = FUN_1401568c0();
    local_910 = uVar12;
    FUN_140156b50(uVar12);
    local_908 = 1;
    piVar2 = (int *)(puVar22 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar22 + -8);
    }
    FUN_140156be0(uVar12);
  }
LAB_1401e25fd:
  if (3 < *(int *)(param_2 + 0x2490)) {
    return;
  }
  *(undefined8 *)(param_2 + 0x2490) = 4;
  return;
}



// WARNING: Removing unreachable block (ram,0x0001401e2a89)
// WARNING: Removing unreachable block (ram,0x0001401e2a94)

void FUN_1401e29c0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  longlong lVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  FUN_140156b50(param_1 + 0x10);
  if (*(longlong *)(param_1 + 0x70) == 0) {
    lVar1 = 0;
  }
  else {
    lVar1 = *(longlong *)(param_1 + 0x60);
  }
  while (lVar1 != 0) {
    lVar2 = 0;
    if (*(longlong **)(lVar1 + 8) != (longlong *)0x0) {
      lVar2 = **(longlong **)(lVar1 + 8);
    }
    FUN_1401e1770(param_1,lVar2);
    if (*(int *)(lVar2 + 0x2490) == 5) {
      lVar2 = *(longlong *)(lVar1 + 0x10);
      FUN_1401df920(param_1 + 0x50,lVar1,0,param_4,uVar3);
      lVar1 = lVar2;
    }
    else {
      lVar1 = *(longlong *)(lVar1 + 0x10);
    }
  }
  FUN_140156be0(param_1 + 0x10);
  return;
}



void FUN_1401e2ac0(longlong param_1)

{
  int iVar1;
  longlong *plVar2;
  longlong lVar3;
  int iVar4;
  
  FUN_140156b50(param_1 + 0x10);
  if (*(int *)(param_1 + 0x48) == 0) {
    FUN_1401e02a0(param_1);
  }
  *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 1;
  iVar4 = 0;
  while( true ) {
    if (iVar4 == *(int *)(param_1 + 0x118)) {
      FUN_1401e29c0(param_1);
      FUN_1401df0b0(param_1);
      FUN_140156be0(param_1 + 0x10);
      return;
    }
    if ((iVar4 < 0) || (*(int *)(param_1 + 0x118) <= iVar4)) break;
    plVar2 = *(longlong **)(*(longlong *)(param_1 + 0x110) + (longlong)iVar4 * 8);
    lVar3 = 0;
    if (plVar2 != (longlong *)0x0) {
      lVar3 = *plVar2;
    }
    iVar1 = *(int *)(lVar3 + 0x18);
    if (iVar1 == 0) {
      FUN_1401dfcf0(param_1);
    }
    else if (iVar1 == 1) {
      FUN_1401dfec0(param_1);
    }
    else if (iVar1 == 2) {
      FUN_1401e0bc0(param_1);
    }
    if (*(int *)(param_1 + 0x118) <= iVar4) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    iVar4 = iVar4 + 1;
  }
                    // WARNING: Subroutine does not return
  FUN_1401566e0();
}



ulonglong FUN_1401e2ba0(longlong param_1,undefined8 param_2)

{
  uint uVar1;
  int iVar2;
  ulonglong uVar3;
  
  uVar1 = *(uint *)(param_1 + 0x1a4);
  iVar2 = FUN_1401cb810(param_1 + 0x1b8,param_2,*(undefined8 *)(param_1 + 0x1c8));
  if (iVar2 < (int)uVar1) {
    uVar3 = FUN_1401cb810(param_1 + 0x1b8,param_2,*(undefined8 *)(param_1 + 0x1c8));
  }
  else {
    uVar3 = (ulonglong)uVar1;
  }
  return uVar3;
}



void FUN_1401e2c10(longlong param_1)

{
  FUN_1401a7ae0(param_1 + 0x170);
  return;
}



int FUN_1401e2c20(longlong param_1)

{
  char cVar1;
  int iVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  
  if (*(char *)(param_1 + 0xc0) == '\0') {
    uVar4 = 0;
    uVar3 = uVar4;
    if (*(undefined8 **)(param_1 + 0x128) != (undefined8 *)0x0) {
      uVar3 = **(undefined8 **)(param_1 + 0x128);
    }
    cVar1 = FUN_140185860(uVar3);
    if (cVar1 == '\0') {
      *(undefined1 *)(param_1 + 0xc0) = 1;
      uVar3 = uVar4;
      if (*(undefined8 **)(param_1 + 0x128) != (undefined8 *)0x0) {
        uVar3 = **(undefined8 **)(param_1 + 0x128);
      }
      iVar2 = FUN_140186430(uVar3,DAT_140320c78);
      if (iVar2 != 0) {
        *(undefined1 *)(param_1 + 0xc0) = 0;
        if (*(undefined8 **)(param_1 + 0x128) != (undefined8 *)0x0) {
          uVar4 = **(undefined8 **)(param_1 + 0x128);
        }
        FUN_1401855c0(uVar4);
        return iVar2;
      }
      *(undefined8 *)(param_1 + 0x1f0) = 0;
    }
  }
  return 0;
}



void FUN_1401e2ce0(longlong param_1)

{
  if (*(undefined8 **)(param_1 + 0xe8) != (undefined8 *)0x0) {
    FUN_1401855c0(**(undefined8 **)(param_1 + 0xe8));
    return;
  }
  FUN_1401855c0();
  return;
}



void FUN_1401e2d00(longlong param_1)

{
  if (*(undefined8 **)(param_1 + 0x128) != (undefined8 *)0x0) {
    FUN_140184dd0(**(undefined8 **)(param_1 + 0x128));
    return;
  }
  FUN_140184dd0();
  return;
}



void FUN_1401e2d20(longlong param_1)

{
  undefined8 uVar1;
  undefined1 local_28 [8];
  int local_20;
  undefined2 local_1c;
  undefined1 local_18 [8];
  int local_10;
  
  if (*(undefined8 **)(param_1 + 0x128) == (undefined8 *)0x0) {
    uVar1 = 0;
  }
  else {
    uVar1 = **(undefined8 **)(param_1 + 0x128);
  }
  FUN_140184b60(uVar1,local_28);
  FUN_14015a100(local_18);
  if ((local_20 == 0) && (local_10 != 0)) {
    local_20 = local_10;
  }
  *(int *)(param_1 + 0x118) = local_20;
  *(undefined2 *)(param_1 + 0x11c) = local_1c;
  return;
}



undefined8 FUN_1401e2d80(longlong param_1)

{
  longlong lVar1;
  
  if ((*(longlong **)(param_1 + 0xe8) != (longlong *)0x0) &&
     (lVar1 = **(longlong **)(param_1 + 0xe8), lVar1 != 0)) {
    if (*(char *)(lVar1 + 0x80) == '\0') {
      return 0;
    }
  }
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401e2db0(longlong param_1)

{
  char cVar1;
  int iVar2;
  int iVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  undefined1 auStack_6a8 [32];
  undefined8 local_688;
  void *local_678;
  undefined8 local_670;
  ulonglong local_668;
  undefined8 local_660;
  ulonglong local_18;
  
  local_688 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_6a8;
  uVar4 = 0;
  uVar5 = uVar4;
  if (*(undefined8 **)(param_1 + 0x128) != (undefined8 *)0x0) {
    uVar5 = **(undefined8 **)(param_1 + 0x128);
  }
  cVar1 = FUN_140185860(uVar5);
  if ((cVar1 == '\0') && (*(char *)(param_1 + 0x80) == '\0')) {
    uVar5 = (**(code **)(**(longlong **)(param_1 + 0x120) + 0x30))();
    iVar2 = FUN_1401e2ba0(param_1,uVar5);
    if (0 < iVar2) {
      *(undefined1 *)(param_1 + 0x80) = 1;
      local_678 = (void *)0x0;
      local_660 = 0;
      local_670 = 0;
      local_668 = 100;
      FUN_1401a7e60(param_1 + 0x170,&local_678,iVar2);
      uVar5 = uVar4;
      if (*(undefined8 **)(param_1 + 0x128) != (undefined8 *)0x0) {
        uVar5 = **(undefined8 **)(param_1 + 0x128);
      }
      iVar3 = FUN_140186940(uVar5,&local_678);
      FUN_1401cb7d0(param_1 + 0x1b8,iVar2);
      uVar5 = (**(code **)(**(longlong **)(param_1 + 0x120) + 0x30))();
      *(double *)(param_1 + 0x1d8) = (double)iVar2 + *(double *)(param_1 + 0x1d8);
      *(undefined8 *)(param_1 + 0x1e8) = uVar5;
      if (iVar3 == 0) {
        *(undefined8 *)(param_1 + 0x1f8) = 0;
      }
      else {
        *(undefined1 *)(param_1 + 0x80) = 0;
        if (*(undefined8 **)(param_1 + 0x128) != (undefined8 *)0x0) {
          uVar4 = **(undefined8 **)(param_1 + 0x128);
        }
        FUN_1401855c0(uVar4);
      }
      if (100 < local_668) {
        operator_delete__(local_678);
      }
    }
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401e2f30(longlong param_1,undefined8 param_2,undefined8 param_3)

{
  undefined1 auStack_de8 [32];
  undefined8 local_dc8;
  undefined1 *local_dc0;
  undefined1 local_db8 [80];
  undefined1 local_d68 [8];
  undefined1 local_d60 [8];
  longlong local_d58;
  undefined4 local_d50;
  int local_d4c;
  undefined1 local_d40 [136];
  undefined1 local_cb8 [3200];
  undefined1 *local_38;
  undefined4 local_30;
  int local_2c;
  ulonglong local_28;
  
  local_dc8 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_de8;
  (**(code **)(**(longlong **)(param_1 + 0x120) + 0x20))();
  local_2c = 200;
  local_30 = 0;
  local_38 = local_cb8;
  FUN_1401544a0(local_d68);
  FUN_140154120(local_d68,local_d40,0x80);
  FUN_1401a80b0(param_2,local_cb8,local_d68);
  FUN_1401a7db0(param_1 + 0x170,local_cb8,param_3);
  local_dc0 = local_d60;
  FUN_1401560e0(local_d60);
  if (local_d58 != 0) {
    if (local_d4c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_d50 = 0;
  }
  if (local_38 == (undefined1 *)0x0) {
    FUN_140156300(local_db8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_db8,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_2c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



void FUN_1401e3090(undefined8 *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  
  *param_1 = Proud::CTcpLayer_C::vftable;
  param_1[8] = Proud::CTcpLayer_C::vftable;
  (**(code **)(*(longlong *)param_1[0x24] + 0x10))();
  FUN_1401a8260(param_1 + 0x2e);
  FUN_1401ae940(param_1 + 0x26);
  if ((param_1[0x25] != 0) &&
     (*(longlong *)(param_1[0x25] + 8) = *(longlong *)(param_1[0x25] + 8) + -1,
     *(longlong *)(param_1[0x25] + 8) == 0)) {
    plVar1 = (longlong *)param_1[0x25];
    lVar2 = *plVar1;
    if (lVar2 != 0) {
      FUN_1401859b0(lVar2);
      FUN_140156970(lVar2);
    }
    FUN_140156970(plVar1);
  }
  param_1[8] = Proud::IHasOverlappedIo::vftable;
  *param_1 = Proud::ICompletionContext::vftable;
  return;
}



undefined8 FUN_1401e3170(void)

{
  return 3;
}



void FUN_1401e3180(longlong param_1)

{
  FUN_1401e3370(param_1 + -0x40);
  return;
}



undefined8 *
FUN_1401e3190(undefined8 *param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong lVar3;
  longlong lVar4;
  longlong *local_res10;
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  *param_1 = Proud::ICompletionContext::vftable;
  FUN_140185060(param_1 + 8);
  *param_1 = Proud::CTcpLayer_C::vftable;
  param_1[8] = Proud::CTcpLayer_C::vftable;
  param_1[0x20] = Proud::AddrPort::vftable;
  lVar4 = 0;
  *(undefined4 *)(param_1 + 0x21) = 0;
  *(undefined2 *)((longlong)param_1 + 0x10c) = 0;
  param_1[0x22] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0x23) = 0;
  *(undefined2 *)((longlong)param_1 + 0x11c) = 0;
  param_1[0x25] = 0;
  FUN_1401ae900(param_1 + 0x26,(longlong)DAT_140320d1c);
  FUN_1401a81d0(param_1 + 0x2e);
  *(undefined1 *)(param_1 + 0x10) = 0;
  *(undefined1 *)(param_1 + 0x18) = 0;
  param_1[0x24] = param_2;
  local_res10 = (longlong *)FUN_140156940(0x400);
  lVar3 = lVar4;
  if (local_res10 != (longlong *)0x0) {
    lVar3 = FUN_140185b00(local_res10,0,param_2,param_4,uVar5);
  }
  if (lVar3 == 0) {
    local_res10 = (longlong *)0x0;
  }
  else {
    local_res10 = (longlong *)FUN_140156940(0x10);
    local_res10[1] = 1;
    *local_res10 = lVar3;
  }
  plVar1 = local_res10;
  FUN_140161a50(param_1 + 0x25,&local_res10);
  plVar2 = local_res10;
  if (plVar1 != (longlong *)0x0) {
    plVar1 = plVar1 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      lVar3 = *local_res10;
      if (lVar3 != 0) {
        FUN_1401859b0(lVar3);
        FUN_140156970(lVar3);
      }
      FUN_140156970(plVar2);
    }
  }
  lVar3 = lVar4;
  if ((longlong *)param_1[0x25] != (longlong *)0x0) {
    lVar3 = *(longlong *)param_1[0x25];
  }
  FUN_140184cc0(lVar3,param_1);
  (**(code **)(*param_2 + 0x10))(param_2);
  lVar3 = lVar4;
  if ((longlong *)param_1[0x25] != (longlong *)0x0) {
    lVar3 = *(longlong *)param_1[0x25];
  }
  (**(code **)(*param_2 + 0x40))(param_2,lVar3);
  if ((longlong *)param_1[0x25] != (longlong *)0x0) {
    lVar4 = *(longlong *)param_1[0x25];
  }
  FUN_1401a7b50(lVar4);
  param_1[0x3e] = 0;
  param_1[0x3f] = 0;
  return param_1;
}



void * FUN_1401e3370(void *param_1,uint param_2)

{
  FUN_1401e3090();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401e33a0(undefined8 *param_1)

{
  *param_1 = Proud::IReliableUdpHostDelegate::vftable;
  return;
}



undefined8 * FUN_1401e33b0(undefined8 *param_1,byte param_2)

{
  *param_1 = Proud::IReliableUdpHostDelegate::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 FUN_1401e33e0(longlong param_1)

{
  return *(undefined8 *)(param_1 + 0x148);
}



undefined4 FUN_1401e33f0(longlong param_1)

{
  return *(undefined4 *)(*(longlong *)(param_1 + 0x660) + 0x6b4);
}



void FUN_1401e3400(longlong param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001401e340f. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x660) + 0x70) + 0x1c0))
            (*(longlong *)(param_1 + 0x660) + 0x70);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 * FUN_1401e3420(undefined8 *param_1)

{
  undefined4 *puVar1;
  undefined1 auStack_58 [32];
  undefined8 *local_38;
  undefined8 local_30;
  undefined1 local_28 [16];
  ulonglong local_18;
  
  local_30 = 0xfffffffffffffffe;
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  *param_1 = Proud::CP2PConnectionTrialContext::ServerHolepunchState::vftable;
  *(undefined4 *)((longlong)param_1 + 0x1c) = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined4 *)((longlong)param_1 + 0x24) = 0;
  *(undefined4 *)(param_1 + 5) = 0;
  *(undefined4 *)(param_1 + 1) = 0;
  *(undefined4 *)(param_1 + 3) = 0;
  param_1[2] = 0;
  local_38 = param_1;
  puVar1 = (undefined4 *)FUN_1401828e0(local_28);
  *(undefined4 *)((longlong)param_1 + 0x1c) = *puVar1;
  *(undefined4 *)(param_1 + 4) = puVar1[1];
  *(undefined4 *)((longlong)param_1 + 0x24) = puVar1[2];
  *(undefined4 *)(param_1 + 5) = puVar1[3];
  return param_1;
}



undefined8 * FUN_1401e34c0(longlong *param_1,undefined8 *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  
  plVar1 = *(longlong **)(*(longlong *)(*param_1 + 0x670) + 0x1570);
  if ((plVar1 != (longlong *)0x0) && (*plVar1 != 0)) {
    if (plVar1 == (longlong *)0x0) {
      lVar2 = 0;
    }
    else {
      lVar2 = *plVar1;
    }
    *param_2 = Proud::AddrPort::vftable;
    *(undefined4 *)(param_2 + 1) = *(undefined4 *)(lVar2 + 0xd0);
    *(undefined2 *)((longlong)param_2 + 0xc) = *(undefined2 *)(lVar2 + 0xd4);
    return param_2;
  }
  *param_2 = Proud::AddrPort::vftable;
  *(undefined4 *)(param_2 + 1) = DAT_140320450;
  *(undefined2 *)((longlong)param_2 + 0xc) = DAT_140320454;
  return param_2;
}



void FUN_1401e3530(longlong param_1,char param_2)

{
  undefined8 uVar1;
  
  if (param_2 == '\0') {
    *(undefined1 *)(param_1 + 0x608) = 0;
    uVar1 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x670) + 0x70) + 0x1c0))
                      (*(longlong *)(param_1 + 0x670) + 0x70);
    *(undefined8 *)(param_1 + 0x610) = uVar1;
    uVar1 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x670) + 0x70) + 0x1c0))();
    *(undefined8 *)(param_1 + 0xc0) = uVar1;
    *(undefined4 *)(param_1 + 0x100) = 0;
    *(undefined8 *)(param_1 + 0x140) = 0xbff0000000000000;
  }
  else {
    if (*(char *)(param_1 + 0x608) == '\0') {
      *(undefined1 *)(param_1 + 0x618) = 1;
    }
    *(undefined1 *)(param_1 + 0x608) = 1;
  }
  if (*(longlong *)(param_1 + 0x640) != 0) {
    *(undefined8 *)(*(longlong *)(param_1 + 0x640) + 0xd8) = 0;
  }
  return;
}



double FUN_1401e35d0(longlong param_1)

{
  longlong *plVar1;
  undefined8 uVar2;
  double dVar3;
  double dVar4;
  
  uVar2 = (**(code **)(**(longlong **)(param_1 + 0x670) + 0x58))();
  FUN_140156b50(uVar2);
  plVar1 = (longlong *)(*(longlong *)(param_1 + 0x670) + 0x70);
  dVar3 = (double)FUN_1401a4ac0(*(longlong *)(param_1 + 0x670) + 0xb08);
  dVar4 = (double)(**(code **)(*plVar1 + 0x1c0))(plVar1);
  FUN_140156be0(uVar2);
  return dVar3 * 2.0 + dVar4 + 1.0;
}



void FUN_1401e3670(longlong param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) &&
     (lVar1 = **(longlong **)(param_1 + 0x18), lVar1 != 0)) {
    lVar2 = 0;
    if (*(char *)(lVar1 + 0x40) == '\0') {
      if (*(longlong **)(param_1 + 0x18) != (longlong *)0x0) {
        lVar2 = **(longlong **)(param_1 + 0x18);
      }
      if (*(char *)(lVar2 + 0x80) == '\0') {
        return;
      }
    }
    uRam0000000000000000 = 1;
  }
  return;
}



longlong FUN_1401e36b0(longlong param_1)

{
  longlong lVar1;
  
  if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) &&
     (lVar1 = **(longlong **)(param_1 + 0x18), lVar1 != 0)) {
    return lVar1 + -0x40;
  }
  return 0;
}



void FUN_1401e36d0(longlong *param_1,undefined8 param_2,undefined8 param_3)

{
  longlong lVar1;
  longlong *plVar2;
  undefined2 uVar3;
  undefined4 uVar4;
  longlong lVar5;
  undefined8 uVar6;
  undefined **local_38;
  undefined4 local_30;
  undefined2 local_2c;
  
  lVar1 = *param_1;
  if ((*(longlong **)(lVar1 + 0x18) != (longlong *)0x0) && (**(longlong **)(lVar1 + 0x18) != 0)) {
    local_38 = Proud::AddrPort::vftable;
    local_30 = *(undefined4 *)(lVar1 + 0x598);
    local_2c = *(undefined2 *)(lVar1 + 0x59c);
    if ((*(longlong **)(lVar1 + 0x18) == (longlong *)0x0) ||
       (lVar5 = **(longlong **)(lVar1 + 0x18), lVar5 == 0)) {
      lVar5 = 0;
    }
    else {
      lVar5 = lVar5 + -0x40;
    }
    plVar2 = *(longlong **)(lVar1 + 0x670);
    uVar6 = (**(code **)(plVar2[0xe] + 0x1c0))();
    uVar4 = (**(code **)(*plVar2 + 0x30))(plVar2);
    uVar3 = FUN_14019e480(uVar4,*(undefined4 *)(lVar1 + 0x56c));
    FUN_1401e7440(lVar5,*(undefined4 *)(*param_1 + 0x56c),uVar3,&local_38,param_2,uVar6,param_3);
  }
  return;
}



undefined8 FUN_1401e37e0(longlong *param_1)

{
  longlong lVar1;
  undefined8 uVar2;
  undefined **local_18;
  undefined4 local_10;
  undefined2 local_c;
  
  lVar1 = *param_1;
  if ((*(longlong **)(lVar1 + 0x18) == (longlong *)0x0) || (**(longlong **)(lVar1 + 0x18) == 0)) {
    return 0;
  }
  local_18 = Proud::AddrPort::vftable;
  local_10 = *(undefined4 *)(lVar1 + 0x598);
  local_c = *(undefined2 *)(lVar1 + 0x59c);
  if ((*(longlong **)(lVar1 + 0x18) != (longlong *)0x0) &&
     (lVar1 = **(longlong **)(lVar1 + 0x18), lVar1 != 0)) {
    uVar2 = FUN_1401e7170(lVar1 + -0x40,&local_18);
    return uVar2;
  }
  uVar2 = FUN_1401e7170(0,&local_18);
  return uVar2;
}



void FUN_1401e3860(longlong param_1)

{
  longlong lVar1;
  char cVar2;
  longlong lVar3;
  longlong *plVar4;
  longlong lVar5;
  
  if ((((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) &&
       (lVar5 = **(longlong **)(param_1 + 0x18), lVar5 != 0)) &&
      (plVar4 = *(longlong **)(lVar5 + 0xc0), plVar4 != (longlong *)0x0)) &&
     ((*plVar4 != 0 && (*(char *)(param_1 + 0x20) != '\0')))) {
    lVar5 = 0;
    lVar3 = lVar5;
    if (plVar4 != (longlong *)0x0) {
      lVar3 = *plVar4;
    }
    cVar2 = FUN_140185860(lVar3);
    if (cVar2 != '\0') {
      lVar3 = lVar5;
      if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) &&
         (lVar1 = **(longlong **)(param_1 + 0x18), lVar1 != 0)) {
        lVar3 = lVar1 + -0x40;
      }
      FUN_1401e72f0(lVar3);
      if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) &&
         (lVar3 = **(longlong **)(param_1 + 0x18), lVar3 != 0)) {
        lVar5 = lVar3 + -0x40;
      }
      FUN_1401e70d0(lVar5);
      plVar4 = (longlong *)(*(longlong *)(param_1 + 0x670) + 0x1818);
      (**(code **)(*plVar4 + 0xd0))(plVar4,1,&DAT_140328530,param_1 + 0x56c);
      lVar5 = *(longlong *)(param_1 + 0x670);
      if ((*(char *)(lVar5 + 0x1790) != '\0') || (*(int *)(lVar5 + 0x6c8) != 0)) {
        FUN_1401bdd00(lVar5,1,&DAT_1402785c0,*(undefined4 *)(param_1 + 0x56c));
      }
    }
    *(undefined1 *)(param_1 + 0x20) = 0;
  }
  return;
}



void FUN_1401e3970(longlong param_1,longlong param_2)

{
  longlong lVar1;
  
  *(undefined4 *)(param_2 + 0x18) = *(undefined4 *)(param_1 + 0x598);
  *(undefined2 *)(param_2 + 0x1c) = *(undefined2 *)(param_1 + 0x59c);
  *(undefined4 *)(param_2 + 0x28) = *(undefined4 *)(param_1 + 0x5a8);
  *(undefined2 *)(param_2 + 0x2c) = *(undefined2 *)(param_1 + 0x5ac);
  if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) &&
     (lVar1 = **(longlong **)(param_1 + 0x18), lVar1 != 0)) {
    *(undefined4 *)(param_2 + 8) = *(undefined4 *)(lVar1 + 0xf0);
    *(undefined2 *)(param_2 + 0xc) = *(undefined2 *)(lVar1 + 0xf4);
    return;
  }
  *(undefined4 *)(param_2 + 8) = DAT_140320450;
  *(undefined2 *)(param_2 + 0xc) = DAT_140320454;
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401e39e0(longlong *param_1,longlong param_2,ulonglong *param_3,longlong param_4)

{
  undefined *puVar1;
  int *piVar2;
  longlong lVar3;
  int iVar4;
  longlong lVar5;
  undefined8 uVar6;
  longlong *plVar7;
  short sVar8;
  undefined *puVar9;
  bool bVar10;
  undefined1 auStack_19b8 [32];
  undefined *local_1998;
  undefined1 local_1990;
  undefined1 local_1988 [8];
  undefined1 local_1980 [8];
  longlong local_1978;
  int local_196c;
  undefined8 local_1960;
  undefined1 local_1958;
  undefined8 local_1950;
  undefined1 local_1948 [3200];
  undefined1 *local_cc8;
  undefined4 local_cc0;
  undefined4 local_cbc;
  undefined1 local_cb8 [3216];
  ulonglong local_28;
  undefined8 uStack_20;
  
  uStack_20 = 0x1401e39f6;
  local_1950 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_19b8;
  lVar3 = param_1[2];
  if ((lVar3 != 0) && (*(int *)(lVar3 + 8) == 0)) {
    bVar10 = *param_3 < *(ulonglong *)(lVar3 + 0x1c);
    if ((*param_3 == *(ulonglong *)(lVar3 + 0x1c)) &&
       (bVar10 = param_3[1] < *(ulonglong *)(lVar3 + 0x24),
       param_3[1] == *(ulonglong *)(lVar3 + 0x24))) {
      iVar4 = 0;
    }
    else {
      iVar4 = (1 - (uint)bVar10) - (uint)(bVar10 != 0);
    }
    if ((iVar4 == 0) && (*(int *)(lVar3 + 0x18) < 1)) {
      plVar7 = *(longlong **)(*(longlong *)(*param_1 + 0x670) + 0x1570);
      sVar8 = DAT_140320454;
      iVar4 = DAT_140320450;
      if ((plVar7 != (longlong *)0x0) && (*plVar7 != 0)) {
        lVar5 = 0;
        if (plVar7 != (longlong *)0x0) {
          lVar5 = *plVar7;
        }
        sVar8 = *(short *)(lVar5 + 0xd4);
        iVar4 = *(int *)(lVar5 + 0xd0);
      }
      if ((((iVar4 == *(int *)(param_2 + 0x38)) && (sVar8 == *(short *)(param_2 + 0x3c))) &&
          (plVar7 = *(longlong **)(*param_1 + 0x18), plVar7 != (longlong *)0x0)) && (*plVar7 != 0))
      {
        FUN_1401544a0(local_1988);
        FUN_140153d90(local_1988);
        FUN_140154600(local_1988,0x800);
        FUN_140154600(local_1988,0);
        FUN_14004fd90(local_1988,0x12);
        if ((*(longlong **)(*param_1 + 0x18) == (longlong *)0x0) ||
           (lVar5 = **(longlong **)(*param_1 + 0x18), lVar5 == 0)) {
          lVar5 = 0;
        }
        else {
          lVar5 = lVar5 + -0x40;
        }
        FUN_140155350(local_1988,lVar5 + 0x128);
        FUN_140155350(local_1988,param_4);
        FUN_14004fe70(local_1988,*(undefined4 *)(*param_1 + 0x56c));
        local_cbc = 200;
        local_cc0 = 0;
        local_cc8 = local_1948;
        FUN_1401570d0(local_cb8,local_1988);
        FUN_140156ed0(local_1948,local_cb8);
        FUN_140156dc0();
        if ((*(longlong **)(*param_1 + 0x18) == (longlong *)0x0) ||
           (lVar5 = **(longlong **)(*param_1 + 0x18), lVar5 == 0)) {
          lVar5 = 0;
        }
        else {
          lVar5 = lVar5 + -0x40;
        }
        *(undefined4 *)(lVar5 + 0x140) = *(undefined4 *)(param_4 + 8);
        *(undefined2 *)(lVar5 + 0x144) = *(undefined2 *)(param_4 + 0xc);
        local_1998 = (undefined *)0x0;
        local_1990 = 1;
        uVar6 = FUN_1401aff90(*(undefined8 *)(*param_1 + 0x670));
        FUN_1401e2f30(uVar6,local_1948,&local_1998);
        if ((*(char *)(*(longlong *)(*param_1 + 0x670) + 0x1790) != '\0') ||
           (*(int *)(*(longlong *)(*param_1 + 0x670) + 0x6c8) != 0)) {
          plVar7 = (longlong *)FUN_140159580(param_4,&local_1998);
          puVar9 = (undefined *)*plVar7;
          if ((undefined *)*plVar7 == (undefined *)0x0) {
            puVar9 = PTR_DAT_1403200a0;
          }
          FUN_1401bdd00(*(undefined8 *)(*param_1 + 0x670),1,
                        L"Message_PeerUdp_ServerHolepunchAck. AddrOfHereAtServer=%s",puVar9);
          puVar9 = local_1998;
          if (((local_1998 != (undefined *)0x0) && (local_1998 != PTR_DAT_1403200a0)) &&
             (puVar1 = local_1998 + -8, puVar1 != (undefined *)0x0)) {
            uVar6 = FUN_1401568c0();
            local_1960 = uVar6;
            FUN_140156b50(uVar6);
            local_1958 = 1;
            piVar2 = (int *)(puVar9 + -4);
            *piVar2 = *piVar2 + -1;
            if (*piVar2 == 0) {
              FUN_140156970(puVar1);
            }
            FUN_140156be0(uVar6);
          }
        }
        *(int *)(lVar3 + 0x18) = *(int *)(lVar3 + 0x18) + 1;
        FUN_140156dc0(local_1948);
        local_1998 = local_1980;
        FUN_1401560e0(local_1980);
        if ((local_1978 != 0) && (local_196c < 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
      }
    }
  }
  return;
}



void FUN_1401e3d10(longlong *param_1,longlong param_2,undefined8 *param_3)

{
  longlong *plVar1;
  undefined8 uVar2;
  undefined2 uVar3;
  undefined4 uVar4;
  longlong lVar5;
  int iVar6;
  undefined8 *puVar7;
  longlong lVar8;
  longlong lVar9;
  undefined **local_88;
  undefined4 uStack_80;
  undefined2 uStack_7c;
  undefined2 uStack_7a;
  undefined4 local_78 [2];
  undefined8 local_70;
  undefined1 local_68;
  undefined4 local_64;
  undefined1 local_60;
  undefined1 local_5f;
  undefined1 local_58 [4];
  undefined4 local_54;
  longlong local_50;
  longlong local_48;
  int local_40;
  int local_3c;
  
  FUN_1401544a0(local_58);
  FUN_140153d90(local_58);
  FUN_140154600(local_58,0x800);
  FUN_140154600(local_58,0);
  FUN_14004fd90(local_58,0x1e);
  FUN_14004fe70(local_58,*(undefined4 *)(*(longlong *)(*param_1 + 0x670) + 0x1578));
  lVar8 = local_50;
  local_88 = (undefined **)*param_3;
  uStack_80 = *(undefined4 *)(param_3 + 1);
  uStack_7c = (undefined2)*(undefined4 *)((longlong)param_3 + 0xc);
  uStack_7a = (undefined2)((uint)*(undefined4 *)((longlong)param_3 + 0xc) >> 0x10);
  lVar9 = 0;
  local_54 = 0;
  if (local_50 == 0) {
    if (local_48 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
LAB_1401e3dbf:
    lVar8 = (longlong)local_40;
    local_40 = local_40 + 0x10;
    if ((local_40 < 0) || (local_3c < local_40)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    puVar7 = (undefined8 *)(local_48 + lVar8);
  }
  else {
    if (local_48 != 0) goto LAB_1401e3dbf;
    if (local_50 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar6 = *(int *)(local_50 + 0x18);
    FUN_140050060(local_50,iVar6 + 0x10);
    lVar5 = lVar9;
    if (*(int *)(lVar8 + 0x18) != 0) {
      lVar5 = *(longlong *)(lVar8 + 0x10);
    }
    puVar7 = (undefined8 *)(lVar5 + iVar6);
  }
  *puVar7 = local_88;
  puVar7[1] = CONCAT26(uStack_7a,CONCAT24(uStack_7c,uStack_80));
  FUN_1400501f0(local_58);
  lVar8 = *(longlong *)(*param_1 + 0x670);
  local_88 = *(undefined ***)(lVar8 + 0x6d0);
  uStack_80 = *(undefined4 *)(lVar8 + 0x6d8);
  uStack_7c = (undefined2)*(undefined4 *)(lVar8 + 0x6dc);
  uStack_7a = (undefined2)((uint)*(undefined4 *)(lVar8 + 0x6dc) >> 0x10);
  local_54 = 0;
  if (local_50 == 0) {
    if (local_48 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (local_48 == 0) {
    if (local_50 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar6 = *(int *)(local_50 + 0x18);
    FUN_140050060(local_50,iVar6 + 0x10);
    lVar8 = lVar9;
    if (*(int *)(local_50 + 0x18) != 0) {
      lVar8 = *(longlong *)(local_50 + 0x10);
    }
    puVar7 = (undefined8 *)(lVar8 + iVar6);
    goto LAB_1401e3e9e;
  }
  iVar6 = local_40 + 0x10;
  if ((iVar6 < 0) || (local_3c < iVar6)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  puVar7 = (undefined8 *)(local_48 + local_40);
  local_40 = iVar6;
LAB_1401e3e9e:
  *puVar7 = local_88;
  puVar7[1] = CONCAT26(uStack_7a,CONCAT24(uStack_7c,uStack_80));
  FUN_1400501f0(local_58);
  FUN_140155350(local_58,param_2);
  lVar8 = *param_1;
  local_78[0] = 5;
  local_70 = 0;
  local_68 = 1;
  local_64 = 0xffffffff;
  local_60 = 1;
  local_5f = DAT_140320dfc;
  local_88 = Proud::AddrPort::vftable;
  uStack_80 = *(undefined4 *)(param_2 + 8);
  uStack_7c = *(undefined2 *)(param_2 + 0xc);
  if ((*(longlong **)(lVar8 + 0x18) != (longlong *)0x0) &&
     (lVar5 = **(longlong **)(lVar8 + 0x18), lVar5 != 0)) {
    lVar9 = lVar5 + -0x40;
  }
  plVar1 = *(longlong **)(lVar8 + 0x670);
  uVar2 = (**(code **)(*(longlong *)(*(longlong *)(lVar8 + 0x670) + 0x70) + 0x1c0))();
  uVar4 = (**(code **)(*plVar1 + 0x30))(plVar1);
  uVar3 = FUN_14019e480(uVar4,*(undefined4 *)(lVar8 + 0x56c));
  FUN_1401e75f0(lVar9,*(undefined4 *)(*param_1 + 0x56c),uVar3,&local_88,local_58,uVar2,local_78);
  FUN_1401560e0(&local_50);
  if ((local_48 != 0) && (local_3c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



void FUN_1401e3fe0(longlong *param_1,longlong param_2,undefined8 *param_3,undefined8 param_4,
                  undefined8 param_5)

{
  int *piVar1;
  undefined **ppuVar2;
  int iVar3;
  longlong lVar4;
  undefined **ppuVar5;
  undefined2 uVar6;
  undefined4 uVar7;
  longlong *plVar8;
  longlong *plVar9;
  longlong *plVar10;
  undefined8 uVar11;
  undefined8 *puVar12;
  longlong lVar13;
  undefined *puVar14;
  longlong lVar15;
  undefined *puVar16;
  undefined *puVar17;
  longlong *local_res18 [2];
  undefined **local_a8;
  undefined4 uStack_a0;
  undefined2 uStack_9c;
  undefined2 uStack_9a;
  undefined1 local_98 [4];
  undefined4 local_94;
  longlong local_90;
  longlong local_88;
  int local_80;
  int local_7c;
  undefined8 local_70;
  undefined8 local_68;
  undefined1 local_60;
  undefined4 local_5c;
  undefined1 local_58;
  undefined1 local_57;
  undefined *local_50;
  undefined8 local_48;
  
  local_48 = 0xfffffffffffffffe;
  FUN_1401544a0(local_98);
  FUN_140153d90(local_98);
  FUN_140154600(local_98,0x800);
  FUN_140154600(local_98,0);
  FUN_14004fd90(local_98,0x1f);
  local_a8 = (undefined **)*param_3;
  uStack_a0 = *(undefined4 *)(param_3 + 1);
  uStack_9c = (undefined2)*(undefined4 *)((longlong)param_3 + 0xc);
  uStack_9a = (undefined2)((uint)*(undefined4 *)((longlong)param_3 + 0xc) >> 0x10);
  lVar15 = 0;
  local_94 = 0;
  if (local_90 == 0) {
    if (local_88 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
  }
  else if (local_88 == 0) {
    if (local_90 == 0) {
                    // WARNING: Subroutine does not return
      FUN_1401561e0();
    }
    iVar3 = *(int *)(local_90 + 0x18);
    FUN_140050060(local_90,iVar3 + 0x10);
    lVar13 = lVar15;
    if (*(int *)(local_90 + 0x18) != 0) {
      lVar13 = *(longlong *)(local_90 + 0x10);
    }
    puVar12 = (undefined8 *)(lVar13 + iVar3);
    goto LAB_1401e40be;
  }
  lVar13 = (longlong)local_80;
  local_80 = local_80 + 0x10;
  if ((local_80 < 0) || (local_7c < local_80)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  puVar12 = (undefined8 *)(local_88 + lVar13);
LAB_1401e40be:
  *puVar12 = local_a8;
  puVar12[1] = CONCAT26(uStack_9a,CONCAT24(uStack_9c,uStack_a0));
  FUN_1400501f0(local_98);
  FUN_14004fe70(local_98,*(undefined4 *)(*(longlong *)(*param_1 + 0x670) + 0x1578));
  FUN_140155350(local_98,param_4);
  FUN_140155350(local_98,param_5);
  FUN_140155350(local_98,param_2);
  lVar13 = *param_1;
  local_70 = CONCAT44(local_70._4_4_,5);
  local_68 = 0;
  local_60 = 1;
  local_5c = 0xffffffff;
  local_58 = 1;
  local_57 = DAT_140320dfc;
  local_a8 = Proud::AddrPort::vftable;
  uStack_a0 = *(undefined4 *)(param_2 + 8);
  uStack_9c = *(undefined2 *)(param_2 + 0xc);
  if ((*(longlong **)(lVar13 + 0x18) != (longlong *)0x0) &&
     (lVar4 = **(longlong **)(lVar13 + 0x18), lVar4 != 0)) {
    lVar15 = lVar4 + -0x40;
  }
  plVar8 = *(longlong **)(lVar13 + 0x670);
  uVar11 = (**(code **)(*(longlong *)(*(longlong *)(lVar13 + 0x670) + 0x70) + 0x1c0))();
  uVar7 = (**(code **)(*plVar8 + 0x30))(plVar8);
  uVar6 = FUN_14019e480(uVar7,*(undefined4 *)(lVar13 + 0x56c));
  FUN_1401e75f0(lVar15,*(undefined4 *)(*param_1 + 0x56c),uVar6,&local_a8,local_98,uVar11,&local_70);
  if ((*(char *)(*(longlong *)(*param_1 + 0x670) + 0x1790) != '\0') ||
     (*(int *)(*(longlong *)(*param_1 + 0x670) + 0x6c8) != 0)) {
    plVar8 = (longlong *)FUN_140159580(param_2,&local_a8);
    plVar9 = (longlong *)FUN_140159580(param_5,&local_50);
    plVar10 = (longlong *)FUN_140159580(param_4,local_res18);
    puVar16 = (undefined *)*plVar8;
    if ((undefined *)*plVar8 == (undefined *)0x0) {
      puVar16 = PTR_DAT_1403200a0;
    }
    puVar14 = (undefined *)*plVar9;
    if ((undefined *)*plVar9 == (undefined *)0x0) {
      puVar14 = PTR_DAT_1403200a0;
    }
    puVar17 = (undefined *)*plVar10;
    if ((undefined *)*plVar10 == (undefined *)0x0) {
      puVar17 = PTR_DAT_1403200a0;
    }
    FUN_1401bdd00(*(undefined8 *)(*param_1 + 0x670),1,&DAT_140278720,puVar17,puVar14,puVar16);
    if (((local_res18[0] != (longlong *)0x0) && (local_res18[0] != (longlong *)PTR_DAT_1403200a0))
       && (local_res18[0] + -1 != (longlong *)0x0)) {
      uVar11 = FUN_1401568c0();
      local_70 = uVar11;
      FUN_140156b50(uVar11);
      local_68 = CONCAT71(local_68._1_7_,1);
      piVar1 = (int *)((longlong)local_res18[0] + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_res18[0] + -1);
      }
      FUN_140156be0(uVar11);
    }
    local_res18[0] = (longlong *)PTR_DAT_1403200a0;
    if (((local_50 != (undefined *)0x0) && (local_50 != PTR_DAT_1403200a0)) &&
       (local_50 + -8 != (undefined *)0x0)) {
      uVar11 = FUN_1401568c0();
      local_70 = uVar11;
      FUN_140156b50(uVar11);
      local_68 = CONCAT71(local_68._1_7_,1);
      piVar1 = (int *)(local_50 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(local_50 + -8);
      }
      FUN_140156be0(uVar11);
    }
    ppuVar5 = local_a8;
    local_50 = PTR_DAT_1403200a0;
    if (((local_a8 != (undefined **)0x0) && (local_a8 != (undefined **)PTR_DAT_1403200a0)) &&
       (ppuVar2 = local_a8 + -1, ppuVar2 != (undefined **)0x0)) {
      uVar11 = FUN_1401568c0();
      local_70 = uVar11;
      FUN_140156b50(uVar11);
      local_68 = CONCAT71(local_68._1_7_,1);
      piVar1 = (int *)((longlong)ppuVar5 + -4);
      *piVar1 = *piVar1 + -1;
      if (*piVar1 == 0) {
        FUN_140156970(ppuVar2);
      }
      FUN_140156be0(uVar11);
    }
  }
  local_res18[0] = &local_90;
  FUN_1401560e0(&local_90);
  if ((local_88 != 0) && (local_7c < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



void FUN_1401e43b0(longlong *param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  undefined2 uVar3;
  undefined4 uVar4;
  longlong lVar5;
  undefined8 uVar6;
  undefined **local_70;
  undefined4 local_68;
  undefined2 local_64;
  undefined4 local_60 [2];
  undefined8 local_58;
  undefined1 local_50;
  undefined4 local_4c;
  undefined1 local_48;
  undefined1 local_47;
  undefined1 local_40 [8];
  undefined1 local_38 [8];
  longlong local_30;
  int local_24;
  
  if (((longlong *)param_1[1] != (longlong *)0x0) && (*(longlong *)param_1[1] != 0)) {
    FUN_1401544a0(local_40);
    FUN_140153d90(local_40);
    FUN_140154600(local_40,0x800);
    FUN_140154600(local_40,0);
    FUN_14004fd90(local_40,0x27);
    local_60[0] = 1;
    lVar5 = 0;
    local_58 = 0;
    local_50 = 1;
    local_4c = 0xffffffff;
    local_48 = 1;
    local_47 = DAT_140320dfc;
    local_70 = Proud::AddrPort::vftable;
    local_68 = *(undefined4 *)(param_2 + 8);
    local_64 = *(undefined2 *)(param_2 + 0xc);
    if (((longlong *)param_1[1] != (longlong *)0x0) && (lVar1 = *(longlong *)param_1[1], lVar1 != 0)
       ) {
      lVar5 = lVar1 + -0x40;
    }
    plVar2 = (longlong *)param_1[0xcc];
    uVar6 = (**(code **)(*param_1 + 8))(param_1);
    uVar4 = (**(code **)(*plVar2 + 0x30))(plVar2);
    uVar3 = FUN_14019e480(uVar4,*(undefined4 *)((longlong)param_1 + 0x55c));
    FUN_1401e75f0(lVar5,*(undefined4 *)((longlong)param_1 + 0x55c),uVar3,&local_70,local_40,uVar6,
                  local_60);
    FUN_1401560e0(local_38);
    if ((local_30 != 0) && (local_24 < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

undefined8 FUN_1401e4540(longlong *param_1)

{
  int *piVar1;
  longlong lVar2;
  longlong *plVar3;
  longlong lVar4;
  undefined2 uVar5;
  undefined4 uVar6;
  undefined8 uVar7;
  undefined8 uVar8;
  ulonglong uVar9;
  ushort uVar10;
  uint uVar11;
  ulonglong uVar12;
  longlong lVar13;
  undefined4 extraout_XMM0_Da;
  undefined4 extraout_XMM0_Da_00;
  undefined4 extraout_XMM0_Db;
  undefined4 extraout_XMM0_Db_00;
  double dVar14;
  undefined4 local_d8;
  undefined4 uStack_d4;
  undefined4 uStack_d0;
  undefined4 uStack_cc;
  undefined1 local_c8 [8];
  undefined1 local_c0 [8];
  longlong local_b8;
  int local_ac;
  undefined **local_a0;
  undefined4 local_98;
  ushort local_94;
  undefined **local_90;
  undefined4 local_88;
  undefined2 local_84;
  undefined **local_80;
  undefined4 local_78;
  undefined2 local_74;
  undefined4 local_70 [2];
  undefined8 local_68;
  undefined1 local_60;
  undefined4 local_5c;
  undefined1 local_58;
  undefined1 local_57;
  undefined8 local_50;
  undefined1 local_48 [32];
  
  local_50 = 0xfffffffffffffffe;
  dVar14 = (double)FUN_1401afda0(*(undefined8 *)(*param_1 + 0x670));
  dVar14 = dVar14 + (double)param_1[1];
  param_1[1] = (longlong)dVar14;
  lVar13 = *(longlong *)(*param_1 + 0x670);
  if (dVar14 < *(double *)(lVar13 + 0x640) || dVar14 == *(double *)(lVar13 + 0x640)) {
    lVar2 = param_1[2];
    if (*(int *)(lVar2 + 8) == 0) {
      FUN_1401afda0(lVar13);
      dVar14 = *(double *)(lVar2 + 0x10) - (double)CONCAT44(extraout_XMM0_Db_00,extraout_XMM0_Da_00)
      ;
      *(double *)(lVar2 + 0x10) = dVar14;
      if (dVar14 < 0.0) {
        *(undefined8 *)(lVar2 + 0x10) = DAT_140320cb0;
        FUN_1401544a0(local_c8);
        FUN_140153d90(local_c8);
        FUN_140154600(local_c8,0x800);
        FUN_140154600(local_c8,0);
        FUN_14004fd90(local_c8,0x10);
        local_d8 = *(undefined4 *)(lVar2 + 0x1c);
        uStack_d4 = *(undefined4 *)(lVar2 + 0x20);
        uStack_d0 = *(undefined4 *)(lVar2 + 0x24);
        uStack_cc = *(undefined4 *)(lVar2 + 0x28);
        FUN_14013b2a0(local_c8,&local_d8);
        FUN_14004fe70(local_c8,*(undefined4 *)(*param_1 + 0x56c));
        lVar2 = *param_1;
        local_70[0] = 5;
        lVar13 = 0;
        local_68 = 0;
        local_60 = 1;
        local_5c = 0xffffffff;
        local_58 = 1;
        local_57 = DAT_140320dfc;
        if ((*(longlong **)(lVar2 + 0x18) != (longlong *)0x0) &&
           (lVar4 = **(longlong **)(lVar2 + 0x18), lVar4 != 0)) {
          lVar13 = lVar4 + -0x40;
        }
        plVar3 = *(longlong **)(lVar2 + 0x670);
        uVar7 = (**(code **)(*(longlong *)(*(longlong *)(lVar2 + 0x670) + 0x70) + 0x1c0))();
        uVar8 = FUN_1401e34c0(param_1,local_48);
        uVar6 = (**(code **)(*plVar3 + 0x30))(plVar3);
        uVar5 = FUN_14019e480(uVar6,1);
        FUN_1401e75f0(lVar13,1,uVar5,uVar8,local_c8,uVar7,local_70);
        FUN_1401560e0(local_c0);
        if ((local_b8 != 0) && (local_ac < 0)) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
      }
    }
    else if (*(int *)(lVar2 + 8) == 1) {
      FUN_1401afda0(lVar13);
      dVar14 = *(double *)(lVar2 + 0x10) - (double)CONCAT44(extraout_XMM0_Db,extraout_XMM0_Da);
      *(double *)(lVar2 + 0x10) = dVar14;
      if (dVar14 < 0.0) {
        *(undefined8 *)(lVar2 + 0x10) = *(undefined8 *)(*(longlong *)(*param_1 + 0x670) + 0x648);
        *(int *)(lVar2 + 0x18) = *(int *)(lVar2 + 0x18) + 1;
        lVar13 = *param_1;
        local_d8 = *(undefined4 *)(lVar13 + 0x30);
        uStack_d4 = *(undefined4 *)(lVar13 + 0x34);
        uStack_d0 = *(undefined4 *)(lVar13 + 0x38);
        uStack_cc = *(undefined4 *)(lVar13 + 0x3c);
        local_90 = Proud::AddrPort::vftable;
        local_88 = *(undefined4 *)(lVar13 + 0x578);
        local_84 = *(undefined2 *)(lVar13 + 0x57c);
        FUN_1401e3d10(param_1,&local_90,&local_d8);
        lVar13 = *param_1;
        plVar3 = *(longlong **)(lVar13 + 0x18);
        uVar12 = 0;
        if ((plVar3 != (longlong *)0x0) && (*plVar3 != 0)) {
          uVar9 = uVar12;
          if ((plVar3 != (longlong *)0x0) && (*plVar3 != 0)) {
            uVar9 = *plVar3 - 0x40;
          }
          if (*(int *)(uVar9 + 0x140) == *(int *)(lVar13 + 0x578)) {
            uVar9 = uVar12;
            if ((*(longlong **)(lVar13 + 0x18) != (longlong *)0x0) &&
               (lVar4 = **(longlong **)(lVar13 + 0x18), lVar4 != 0)) {
              uVar9 = lVar4 - 0x40;
            }
            if (((*(char *)(uVar9 + 0x130) == *(char *)(lVar13 + 0x588)) &&
                (*(char *)(uVar9 + 0x131) == *(char *)(lVar13 + 0x589))) &&
               (*(char *)(uVar9 + 0x132) == *(char *)(lVar13 + 0x58a))) {
              local_d8 = *(undefined4 *)(lVar13 + 0x30);
              uStack_d4 = *(undefined4 *)(lVar13 + 0x34);
              uStack_d0 = *(undefined4 *)(lVar13 + 0x38);
              uStack_cc = *(undefined4 *)(lVar13 + 0x3c);
              local_80 = Proud::AddrPort::vftable;
              local_78 = *(undefined4 *)(lVar13 + 0x588);
              local_74 = *(undefined2 *)(lVar13 + 0x58c);
              FUN_1401e3d10(param_1,&local_80,&local_d8);
            }
          }
        }
        if (DAT_140320cbc < *(int *)(lVar2 + 0x18)) {
          piVar1 = (int *)(lVar2 + 0x30);
          *piVar1 = *piVar1 + -1;
          if (*piVar1 < 0) {
            *(undefined4 *)(lVar2 + 0x30) = DAT_140320d18;
            *(short *)(lVar2 + 0x34) = *(short *)(lVar2 + 0x34) + (short)_DAT_1403288e0;
            uVar10 = *(ushort *)(lVar2 + 0x34);
            if ((uVar10 < 0x3ff) || (uVar10 == 0xffff)) {
              uVar10 = 0x3ff;
            }
            *(ushort *)(lVar2 + 0x34) = uVar10;
          }
          uVar6 = *(undefined4 *)(*param_1 + 0x578);
          uVar10 = *(ushort *)(lVar2 + 0x34);
          if (0 < _DAT_1403288e0) {
            do {
              lVar13 = *param_1;
              local_d8 = *(undefined4 *)(lVar13 + 0x30);
              uStack_d4 = *(undefined4 *)(lVar13 + 0x34);
              uStack_d0 = *(undefined4 *)(lVar13 + 0x38);
              uStack_cc = *(undefined4 *)(lVar13 + 0x3c);
              local_a0 = Proud::AddrPort::vftable;
              local_98 = uVar6;
              local_94 = uVar10;
              FUN_1401e3d10(param_1,&local_a0,&local_d8);
              uVar10 = uVar10 + 1;
              if ((uVar10 < 0x3ff) || (uVar10 == 0xffff)) {
                uVar10 = 0x3ff;
              }
              uVar11 = (int)uVar12 + 1;
              uVar12 = (ulonglong)uVar11;
            } while ((int)uVar11 < _DAT_1403288e0);
          }
        }
      }
    }
    uVar7 = 1;
  }
  else {
    uVar7 = 0;
  }
  return uVar7;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401e4940(longlong param_1,longlong param_2)

{
  int *piVar1;
  undefined8 *puVar2;
  char cVar3;
  int iVar4;
  longlong *plVar5;
  longlong *plVar6;
  undefined8 uVar7;
  undefined1 *puVar8;
  longlong lVar9;
  longlong lVar10;
  undefined1 *_Memory;
  longlong lVar11;
  undefined *puVar12;
  longlong lVar13;
  bool bVar14;
  undefined4 uVar15;
  undefined4 uVar16;
  undefined4 uVar17;
  undefined4 uVar18;
  undefined1 auStack_628 [32];
  undefined ***local_608;
  undefined **local_5f8;
  undefined4 local_5f0;
  undefined2 local_5ec;
  undefined **local_5e8;
  undefined4 local_5e0;
  undefined2 local_5dc;
  longlong *local_5d8;
  undefined4 local_5d0 [2];
  undefined *local_5c8;
  undefined **local_5c0;
  undefined4 local_5b8;
  undefined2 local_5b4;
  undefined **local_5b0;
  undefined4 local_5a8;
  undefined2 local_5a4;
  undefined *local_5a0;
  undefined **local_598;
  undefined4 local_590;
  undefined2 local_58c;
  undefined **local_588;
  undefined4 local_580;
  undefined2 local_57c;
  undefined **local_578;
  undefined4 local_570;
  undefined2 local_56c;
  undefined **local_568;
  undefined4 local_560;
  undefined2 local_55c;
  undefined **local_558;
  undefined4 local_550;
  undefined2 local_54c;
  undefined **local_548;
  undefined4 local_540;
  undefined2 local_53c;
  undefined **local_538;
  undefined4 local_530;
  undefined2 local_52c;
  undefined4 local_528;
  undefined4 uStack_524;
  undefined4 uStack_520;
  undefined4 uStack_51c;
  undefined8 local_518;
  undefined1 local_510;
  undefined4 local_508;
  undefined4 uStack_504;
  undefined4 uStack_500;
  undefined4 uStack_4fc;
  undefined8 local_4f8;
  undefined1 local_4f0;
  undefined8 local_4e8;
  undefined4 local_4d8;
  undefined4 uStack_4d4;
  undefined4 uStack_4d0;
  undefined4 uStack_4cc;
  undefined4 local_4c8;
  undefined4 uStack_4c4;
  undefined4 uStack_4c0;
  undefined4 uStack_4bc;
  undefined4 local_4b8;
  undefined4 uStack_4b4;
  undefined4 uStack_4b0;
  undefined4 uStack_4ac;
  undefined4 local_4a8;
  undefined4 uStack_4a4;
  undefined4 uStack_4a0;
  undefined4 uStack_49c;
  undefined4 local_498;
  undefined4 uStack_494;
  undefined4 uStack_490;
  undefined4 uStack_48c;
  undefined1 *local_488;
  undefined1 local_480 [264];
  undefined1 *local_378;
  undefined1 local_370 [264];
  undefined1 *local_268;
  undefined1 local_260 [264];
  undefined1 *local_158;
  undefined1 local_150 [264];
  ulonglong local_48;
  
  local_4e8 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_628;
  local_5f8 = Proud::AddrPort::vftable;
  lVar11 = 0;
  iVar4 = 0;
  local_5f0 = 0;
  local_5ec = 0;
  cVar3 = FUN_140154e60(param_2,local_5d0);
  if (cVar3 == '\0') {
    if ((*(char *)(param_1 + 0x1790) == '\0') && (*(int *)(param_1 + 0x6c8) == 0)) {
      return;
    }
    local_488 = local_480;
    FUN_140142dc0(&local_488,"RemotePeer.cpp",3);
    local_608 = (undefined ***)CONCAT44(local_608._4_4_,0x9b);
    FUN_1401bdd00(param_1,1,&DAT_140278838,local_488);
    puVar8 = local_480;
    _Memory = local_488;
  }
  else {
    local_4c8 = 0;
    uStack_4c4 = 0;
    uStack_4c0 = 0;
    uStack_4bc = 0;
    cVar3 = FUN_1401543d0(param_2,&local_4c8,0x10);
    uVar18 = uStack_4bc;
    uVar17 = uStack_4c0;
    uVar16 = uStack_4c4;
    uVar15 = local_4c8;
    if (cVar3 == '\0') {
      if ((*(char *)(param_1 + 0x1790) == '\0') && (*(int *)(param_1 + 0x6c8) == 0)) {
        return;
      }
      local_158 = local_150;
      FUN_140142dc0(&local_158,"RemotePeer.cpp",3);
      local_608 = (undefined ***)CONCAT44(local_608._4_4_,0xa0);
      FUN_1401bdd00(param_1,1,&DAT_140278838,local_158);
      puVar8 = local_150;
      _Memory = local_158;
    }
    else {
      local_4a8 = local_4c8;
      uStack_4a4 = uStack_4c4;
      uStack_4a0 = uStack_4c0;
      uStack_49c = uStack_4bc;
      local_4b8 = 0;
      uStack_4b4 = 0;
      uStack_4b0 = 0;
      uStack_4ac = 0;
      cVar3 = FUN_1401543d0(param_2,&local_4b8,0x10);
      if (cVar3 == '\0') {
        if ((*(char *)(param_1 + 0x1790) == '\0') && (*(int *)(param_1 + 0x6c8) == 0)) {
          return;
        }
        local_378 = local_370;
        FUN_140142dc0(&local_378,"RemotePeer.cpp",3);
        local_608 = (undefined ***)CONCAT44(local_608._4_4_,0xa5);
        FUN_1401bdd00(param_1,1,&DAT_140278838,local_378);
        puVar8 = local_370;
        _Memory = local_378;
      }
      else {
        local_498 = local_4b8;
        uStack_494 = uStack_4b4;
        uStack_490 = uStack_4b0;
        uStack_48c = uStack_4ac;
        cVar3 = FUN_140154e00(param_2,&local_5f8);
        if (cVar3 != '\0') {
          bVar14 = CONCAT44(uStack_494,local_498) < *(ulonglong *)(param_1 + 0x6d0);
          if ((CONCAT44(uStack_494,local_498) != *(ulonglong *)(param_1 + 0x6d0)) ||
             (bVar14 = CONCAT44(uStack_48c,uStack_490) < *(ulonglong *)(param_1 + 0x6d8),
             CONCAT44(uStack_48c,uStack_490) != *(ulonglong *)(param_1 + 0x6d8))) {
            iVar4 = (1 - (uint)bVar14) - (uint)(bVar14 != 0);
          }
          if (iVar4 != 0) {
            return;
          }
          local_5e8 = Proud::AddrPort::vftable;
          local_5e0 = *(undefined4 *)(param_2 + 0x38);
          local_5dc = *(undefined2 *)(param_2 + 0x3c);
          plVar5 = (longlong *)FUN_1401bb6b0(param_1,&local_5d8,local_5d0[0]);
          lVar13 = lVar11;
          if ((longlong *)*plVar5 != (longlong *)0x0) {
            lVar13 = *(longlong *)*plVar5;
          }
          if ((local_5d8 != (longlong *)0x0) &&
             (local_5d8[1] = local_5d8[1] + -1, uVar15 = local_4c8, uVar16 = uStack_4c4,
             uVar17 = uStack_4c0, uVar18 = uStack_4bc, local_5d8[1] == 0)) {
            puVar2 = (undefined8 *)*local_5d8;
            if (puVar2 != (undefined8 *)0x0) {
              (**(code **)*puVar2)(puVar2,1);
            }
            FUN_140156970(local_5d8);
            uVar15 = local_4c8;
            uVar16 = uStack_4c4;
            uVar17 = uStack_4c0;
            uVar18 = uStack_4bc;
          }
          if (lVar13 == 0) {
            return;
          }
          if (*(char *)(lVar13 + 0x684) != '\0') {
            return;
          }
          if (*(longlong **)(lVar13 + 0x28) == (longlong *)0x0) {
            return;
          }
          if (**(longlong **)(lVar13 + 0x28) == 0) {
            return;
          }
          bVar14 = CONCAT44(uStack_4a4,local_4a8) < *(ulonglong *)(lVar13 + 0x30);
          if ((CONCAT44(uStack_4a4,local_4a8) == *(ulonglong *)(lVar13 + 0x30)) &&
             (bVar14 = CONCAT44(uStack_49c,uStack_4a0) < *(ulonglong *)(lVar13 + 0x38),
             CONCAT44(uStack_49c,uStack_4a0) == *(ulonglong *)(lVar13 + 0x38))) {
            iVar4 = 0;
          }
          else {
            iVar4 = (1 - (uint)bVar14) - (uint)(bVar14 != 0);
          }
          if (iVar4 != 0) {
            return;
          }
          if ((*(char *)(param_1 + 0x1790) != '\0') || (*(int *)(param_1 + 0x6c8) != 0)) {
            plVar5 = (longlong *)FUN_140159580(&local_5e8,&local_5a0);
            plVar6 = (longlong *)FUN_140159580(&local_5f8,&local_5c8);
            local_608 = (undefined ***)*plVar5;
            if ((undefined ***)*plVar5 == (undefined ***)0x0) {
              local_608 = (undefined ***)PTR_DAT_1403200a0;
            }
            puVar12 = (undefined *)*plVar6;
            if ((undefined *)*plVar6 == (undefined *)0x0) {
              puVar12 = PTR_DAT_1403200a0;
            }
            FUN_1401bdd00(param_1,1,&DAT_1402787f0,puVar12);
            if (((local_5c8 != (undefined *)0x0) && (local_5c8 != PTR_DAT_1403200a0)) &&
               (local_5c8 + -8 != (undefined *)0x0)) {
              uVar7 = FUN_1401568c0();
              local_518 = uVar7;
              FUN_140156b50(uVar7);
              local_510 = 1;
              piVar1 = (int *)(local_5c8 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(local_5c8 + -8);
              }
              FUN_140156be0(uVar7);
            }
            local_5c8 = PTR_DAT_1403200a0;
            if (((local_5a0 != (undefined *)0x0) && (local_5a0 != PTR_DAT_1403200a0)) &&
               (local_5a0 + -8 != (undefined *)0x0)) {
              uVar7 = FUN_1401568c0();
              local_4f8 = uVar7;
              FUN_140156b50(uVar7);
              local_4f0 = 1;
              piVar1 = (int *)(local_5a0 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(local_5a0 + -8);
              }
              FUN_140156be0(uVar7);
            }
          }
          FUN_1401588c0(lVar13 + 0x570);
          cVar3 = FUN_1401588c0(lVar13 + 0x580);
          if (cVar3 != '\0') {
            if ((*(longlong **)(lVar13 + 0x18) == (longlong *)0x0) ||
               (lVar10 = **(longlong **)(lVar13 + 0x18), lVar9 = lVar10 + -0x40, lVar10 == 0)) {
              lVar9 = lVar11;
            }
            cVar3 = FUN_1401588c0(lVar9 + 0x128);
            if (cVar3 != '\0') {
              plVar5 = *(longlong **)(lVar13 + 0x18);
              if ((plVar5 == (longlong *)0x0) || (lVar10 = *plVar5 + -0x40, *plVar5 == 0)) {
                lVar10 = lVar11;
              }
              if (*(int *)(lVar10 + 0x140) == *(int *)(lVar13 + 0x578)) {
                lVar10 = lVar11;
                if ((plVar5 != (longlong *)0x0) && (*plVar5 != 0)) {
                  lVar10 = *plVar5 + -0x40;
                }
                if (((*(char *)(lVar10 + 0x130) == *(char *)(lVar13 + 0x588)) &&
                    (*(char *)(lVar10 + 0x131) == *(char *)(lVar13 + 0x589))) &&
                   (*(char *)(lVar10 + 0x132) == *(char *)(lVar13 + 0x58a))) {
                  local_598 = Proud::AddrPort::vftable;
                  local_590 = local_5e0;
                  local_58c = local_5dc;
                  local_558 = Proud::AddrPort::vftable;
                  local_550 = local_5f0;
                  local_54c = local_5ec;
                  local_568 = Proud::AddrPort::vftable;
                  local_560 = *(undefined4 *)(lVar13 + 0x588);
                  local_55c = *(undefined2 *)(lVar13 + 0x58c);
                  lVar10 = lVar11;
                  if (*(longlong **)(lVar13 + 0x28) != (longlong *)0x0) {
                    lVar10 = **(longlong **)(lVar13 + 0x28);
                  }
                  local_608 = &local_598;
                  local_4d8 = uVar15;
                  uStack_4d4 = uVar16;
                  uStack_4d0 = uVar17;
                  uStack_4cc = uVar18;
                  FUN_1401e3fe0(lVar10,&local_568,&local_4d8,&local_558);
                }
              }
            }
          }
          cVar3 = FUN_1401588c0(lVar13 + 0x570);
          if (cVar3 != '\0') {
            local_588 = Proud::AddrPort::vftable;
            local_580 = local_5e0;
            local_57c = local_5dc;
            local_578 = Proud::AddrPort::vftable;
            local_570 = local_5f0;
            local_56c = local_5ec;
            local_5b0 = Proud::AddrPort::vftable;
            local_5a8 = *(undefined4 *)(lVar13 + 0x578);
            local_5a4 = *(undefined2 *)(lVar13 + 0x57c);
            lVar10 = lVar11;
            if (*(longlong **)(lVar13 + 0x28) != (longlong *)0x0) {
              lVar10 = **(longlong **)(lVar13 + 0x28);
            }
            local_608 = &local_588;
            local_528 = uVar15;
            uStack_524 = uVar16;
            uStack_520 = uVar17;
            uStack_51c = uVar18;
            FUN_1401e3fe0(lVar10,&local_5b0,&local_528,&local_578);
          }
          local_5c0 = Proud::AddrPort::vftable;
          local_5b8 = local_5e0;
          local_5b4 = local_5dc;
          local_538 = Proud::AddrPort::vftable;
          local_530 = local_5f0;
          local_52c = local_5ec;
          local_548 = Proud::AddrPort::vftable;
          local_540 = *(undefined4 *)(param_2 + 0x38);
          local_53c = *(undefined2 *)(param_2 + 0x3c);
          if (*(longlong **)(lVar13 + 0x28) != (longlong *)0x0) {
            lVar11 = **(longlong **)(lVar13 + 0x28);
          }
          local_608 = &local_5c0;
          local_508 = uVar15;
          uStack_504 = uVar16;
          uStack_500 = uVar17;
          uStack_4fc = uVar18;
          FUN_1401e3fe0(lVar11,&local_548,&local_508,&local_538);
          return;
        }
        if ((*(char *)(param_1 + 0x1790) == '\0') && (*(int *)(param_1 + 0x6c8) == 0)) {
          return;
        }
        local_268 = local_260;
        FUN_140142dc0(&local_268,"RemotePeer.cpp",3);
        local_608 = (undefined ***)CONCAT44(local_608._4_4_,0xaa);
        FUN_1401bdd00(param_1,1,&DAT_140278838,local_268);
        puVar8 = local_260;
        _Memory = local_268;
      }
    }
  }
  if (_Memory != puVar8) {
    free(_Memory);
  }
  return;
}



void FUN_1401e5070(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong *plVar2;
  
  plVar2 = (longlong *)(param_1 + 0x20);
  if (*plVar2 != 0) {
    plVar1 = (longlong *)(*plVar2 + 8);
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      FUN_140161ae0(plVar2,*plVar2,param_3,param_4,0xfffffffffffffffe);
    }
  }
  FUN_1401560e0(param_1 + 8);
  if (*(longlong *)(param_1 + 0x10) != 0) {
    if (*(int *)(param_1 + 0x1c) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_1 + 0x18) = 0;
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401e50e0(longlong param_1,longlong param_2)

{
  int *piVar1;
  undefined8 *puVar2;
  longlong lVar3;
  char cVar4;
  int iVar5;
  longlong *plVar6;
  longlong *plVar7;
  longlong *plVar8;
  longlong *plVar9;
  undefined8 uVar10;
  longlong lVar11;
  undefined *puVar12;
  bool bVar13;
  undefined1 auStack_1b8 [32];
  undefined4 *local_198;
  undefined ***local_190;
  undefined ***local_188;
  undefined ***local_180;
  undefined ***local_178;
  undefined4 local_168 [2];
  longlong *local_160;
  undefined **local_158;
  undefined4 local_150;
  undefined2 local_14c;
  undefined **local_148;
  undefined4 local_140;
  undefined2 local_13c;
  undefined **local_138;
  undefined4 local_130;
  undefined2 local_12c;
  undefined *local_128;
  undefined8 local_120;
  undefined *local_118;
  undefined *local_110;
  undefined **local_108;
  undefined4 local_100;
  undefined2 local_fc;
  undefined *local_f8;
  undefined8 local_f0;
  undefined1 local_e8;
  undefined8 local_e0;
  undefined1 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  undefined1 local_c0;
  undefined8 local_b8;
  undefined1 local_b0;
  undefined8 local_a8;
  undefined8 uStack_a0;
  undefined8 local_98;
  ulonglong uStack_90;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  undefined8 uStack_70;
  undefined4 local_68;
  undefined4 uStack_64;
  undefined4 uStack_60;
  undefined4 uStack_5c;
  undefined4 local_58;
  undefined4 uStack_54;
  undefined4 uStack_50;
  undefined4 uStack_4c;
  undefined4 local_48;
  undefined4 uStack_44;
  undefined4 uStack_40;
  undefined4 uStack_3c;
  undefined4 local_38;
  undefined4 uStack_34;
  undefined4 uStack_30;
  undefined4 uStack_2c;
  ulonglong local_28;
  
  local_d0 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_1b8;
  local_148 = Proud::AddrPort::vftable;
  lVar11 = 0;
  local_140 = 0;
  local_13c = 0;
  local_158 = Proud::AddrPort::vftable;
  local_150 = 0;
  local_14c = 0;
  local_138 = Proud::AddrPort::vftable;
  local_130 = 0;
  local_12c = 0;
  local_48 = 0;
  uStack_44 = 0;
  uStack_40 = 0;
  uStack_3c = 0;
  cVar4 = FUN_1401543d0(param_2,&local_48,0x10);
  if (cVar4 != '\0') {
    local_38 = local_48;
    uStack_34 = uStack_44;
    uStack_30 = uStack_40;
    uStack_2c = uStack_3c;
    cVar4 = FUN_140154e60(param_2,local_168);
    if ((((cVar4 != '\0') && (cVar4 = FUN_140154e00(param_2,&local_148), cVar4 != '\0')) &&
        (cVar4 = FUN_140154e00(param_2,&local_158), cVar4 != '\0')) &&
       (cVar4 = FUN_140154e00(param_2,&local_138), cVar4 != '\0')) {
      local_108 = Proud::AddrPort::vftable;
      local_100 = *(undefined4 *)(param_2 + 0x38);
      local_fc = *(undefined2 *)(param_2 + 0x3c);
      plVar6 = (longlong *)FUN_1401bb6b0(param_1,&local_160,local_168[0]);
      if ((longlong *)*plVar6 != (longlong *)0x0) {
        lVar11 = *(longlong *)*plVar6;
      }
      if ((local_160 != (longlong *)0x0) && (local_160[1] = local_160[1] + -1, local_160[1] == 0)) {
        puVar2 = (undefined8 *)*local_160;
        if (puVar2 != (undefined8 *)0x0) {
          (**(code **)*puVar2)(puVar2,1);
        }
        FUN_140156970(local_160);
      }
      if (((lVar11 != 0) && (*(char *)(lVar11 + 0x684) == '\0')) &&
         ((*(longlong **)(lVar11 + 0x28) != (longlong *)0x0 &&
          (lVar3 = **(longlong **)(lVar11 + 0x28), lVar3 != 0)))) {
        bVar13 = *(ulonglong *)(lVar11 + 0x30) < CONCAT44(uStack_34,local_38);
        if ((*(ulonglong *)(lVar11 + 0x30) == CONCAT44(uStack_34,local_38)) &&
           (bVar13 = *(ulonglong *)(lVar11 + 0x38) < CONCAT44(uStack_2c,uStack_30),
           *(ulonglong *)(lVar11 + 0x38) == CONCAT44(uStack_2c,uStack_30))) {
          iVar5 = 0;
        }
        else {
          iVar5 = (1 - (uint)bVar13) - (uint)(bVar13 != 0);
        }
        if (((iVar5 == 0) && (*(longlong *)(lVar3 + 0x10) != 0)) &&
           (*(int *)(*(longlong *)(lVar3 + 0x10) + 8) == 1)) {
          local_120 = 0;
          FUN_1401bcec0(lVar11 + 0x28,&local_120);
          FUN_1401bcd80(&local_120);
          local_a8 = _DAT_140328530;
          uStack_a0 = uRam0000000140328538;
          local_98 = _DAT_140328540;
          local_88 = _DAT_140328550;
          uStack_80 = _DAT_140328558;
          local_78 = _DAT_140328560;
          uStack_70 = _DAT_140328568;
          local_68 = _DAT_140328570;
          uStack_64 = uRam0000000140328574;
          uStack_60 = _DAT_140328578;
          uStack_5c = uRam000000014032857c;
          local_58 = _DAT_140328580;
          uStack_54 = _DAT_140328584;
          uStack_50 = uRam0000000140328588;
          uStack_4c = uRam000000014032858c;
          uStack_90 = _DAT_140328548 & 0xffffffff00000000;
          (**(code **)(*(longlong *)(param_1 + 0x17d0) + 0x30))
                    ((longlong *)(param_1 + 0x17d0),*(undefined4 *)(lVar11 + 0x56c),&local_a8);
          local_178 = &local_108;
          local_180 = &local_138;
          local_188 = &local_158;
          local_190 = &local_148;
          local_198 = (undefined4 *)(lVar11 + 0x56c);
          (**(code **)(*(longlong *)(param_1 + 0x1818) + 0x70))
                    ((longlong *)(param_1 + 0x1818),1,&DAT_140328530,param_1 + 0x1578);
          if ((*(char *)(param_1 + 0x1790) != '\0') || (*(int *)(param_1 + 0x6c8) != 0)) {
            plVar6 = (longlong *)FUN_140159580(&local_108,&local_f8);
            plVar7 = (longlong *)FUN_140159580(&local_138,&local_118);
            plVar8 = (longlong *)FUN_140159580(&local_158,&local_128);
            plVar9 = (longlong *)FUN_140159580(&local_148,&local_110);
            local_188 = (undefined ***)*plVar6;
            if ((undefined *)*plVar6 == (undefined *)0x0) {
              local_188 = (undefined ***)PTR_DAT_1403200a0;
            }
            local_190 = (undefined ***)*plVar7;
            if ((undefined *)*plVar7 == (undefined *)0x0) {
              local_190 = (undefined ***)PTR_DAT_1403200a0;
            }
            local_198 = (undefined4 *)*plVar8;
            if ((undefined *)*plVar8 == (undefined *)0x0) {
              local_198 = (undefined4 *)PTR_DAT_1403200a0;
            }
            puVar12 = (undefined *)*plVar9;
            if ((undefined *)*plVar9 == (undefined *)0x0) {
              puVar12 = PTR_DAT_1403200a0;
            }
            FUN_1401bdd00(param_1,1,L"HolepunchAck OK. ABS=%s ABR=%s BAS=%s BAR=%s",puVar12);
            if (((local_110 != (undefined *)0x0) && (local_110 != PTR_DAT_1403200a0)) &&
               (local_110 + -8 != (undefined *)0x0)) {
              uVar10 = FUN_1401568c0();
              local_f0 = uVar10;
              FUN_140156b50(uVar10);
              local_e8 = 1;
              piVar1 = (int *)(local_110 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(local_110 + -8);
              }
              FUN_140156be0(uVar10);
            }
            local_110 = PTR_DAT_1403200a0;
            if (((local_128 != (undefined *)0x0) && (local_128 != PTR_DAT_1403200a0)) &&
               (local_128 + -8 != (undefined *)0x0)) {
              uVar10 = FUN_1401568c0();
              local_e0 = uVar10;
              FUN_140156b50(uVar10);
              local_d8 = 1;
              piVar1 = (int *)(local_128 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(local_128 + -8);
              }
              FUN_140156be0(uVar10);
            }
            local_128 = PTR_DAT_1403200a0;
            if (((local_118 != (undefined *)0x0) && (local_118 != PTR_DAT_1403200a0)) &&
               (local_118 + -8 != (undefined *)0x0)) {
              uVar10 = FUN_1401568c0();
              local_c8 = uVar10;
              FUN_140156b50(uVar10);
              local_c0 = 1;
              piVar1 = (int *)(local_118 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(local_118 + -8);
              }
              FUN_140156be0(uVar10);
            }
            if (((local_f8 != (undefined *)0x0) && (local_f8 != PTR_DAT_1403200a0)) &&
               (local_f8 + -8 != (undefined *)0x0)) {
              local_118 = PTR_DAT_1403200a0;
              uVar10 = FUN_1401568c0();
              local_b8 = uVar10;
              FUN_140156b50(uVar10);
              local_b0 = 1;
              piVar1 = (int *)(local_f8 + -4);
              *piVar1 = *piVar1 + -1;
              if (*piVar1 == 0) {
                FUN_140156970(local_f8 + -8);
              }
              FUN_140156be0(uVar10);
            }
          }
        }
      }
    }
  }
  return;
}



void FUN_1401e5590(longlong param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  double dVar1;
  undefined8 uVar2;
  undefined8 local_res8;
  
  *(undefined1 *)(param_1 + 0x25) = DAT_140320588;
  *(bool *)(param_1 + 0x21) = *(int *)(param_2 + 0x6b0) == 1;
  *(undefined1 *)(param_1 + 0x22) = 0;
  *(undefined1 *)(param_1 + 0x24) = 0;
  local_res8 = 0;
  FUN_1401bcec0(param_1 + 0x28,&local_res8,param_3,param_4,0xfffffffffffffffe);
  *(undefined1 *)(param_1 + 0x20) = 0;
  *(undefined1 *)(param_1 + 0x23) = 0;
  *(undefined8 *)(param_1 + 0x158) = 0;
  *(undefined8 *)(param_1 + 0x160) = 0;
  *(undefined8 *)(param_1 + 0x60) = 0;
  *(undefined4 *)(param_1 + 0x598) = DAT_140320450;
  *(undefined2 *)(param_1 + 0x59c) = DAT_140320454;
  *(undefined4 *)(param_1 + 0x5a8) = DAT_140320450;
  *(undefined2 *)(param_1 + 0x5ac) = DAT_140320454;
  *(undefined4 *)(param_1 + 0x578) = DAT_140320450;
  *(undefined2 *)(param_1 + 0x57c) = DAT_140320454;
  *(undefined4 *)(param_1 + 0x588) = DAT_140320450;
  *(undefined2 *)(param_1 + 0x58c) = DAT_140320454;
  *(longlong *)(param_1 + 0x670) = param_2;
  *(undefined1 *)(param_1 + 0x608) = 1;
  *(undefined8 *)(param_1 + 0x610) = 0;
  dVar1 = (double)FUN_1401a4ac0(param_2 + 0xb08);
  *(double *)(param_1 + 0x148) = (DAT_140320d20 - DAT_140320d20 * 0.5) * dVar1 + DAT_140320d20 * 0.5
  ;
  *(undefined8 *)(param_1 + 0x150) = 0;
  uVar2 = (**(code **)(*(longlong *)(param_2 + 0x70) + 0x1c0))();
  *(undefined8 *)(param_1 + 0xc0) = uVar2;
  *(undefined4 *)(param_1 + 0x100) = 0;
  *(undefined8 *)(param_1 + 0x140) = 0xbff0000000000000;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined4 *)(param_1 + 0x58) = 0;
  *(undefined8 *)(param_1 + 0x80) = 0;
  *(undefined4 *)(param_1 + 0x568) = 0;
  *(undefined4 *)(param_1 + 0x61c) = 0;
  *(undefined8 *)(param_1 + 0x620) = 0;
  *(undefined8 *)(param_1 + 0x40) = 0;
  *(undefined4 *)(param_1 + 0x48) = 0;
  *(undefined8 *)(param_1 + 0x628) = 0;
  *(undefined8 *)(param_1 + 0x630) = 0;
  *(undefined8 *)(param_1 + 0x678) = 0;
  uVar2 = FUN_1401e35d0(param_1);
  *(undefined8 *)(param_1 + 0x88) = uVar2;
  *(undefined8 *)(param_1 + 0x658) = 0;
  *(undefined8 *)(param_1 + 0x660) = 0;
  *(undefined1 *)(param_1 + 0x618) = 1;
  return;
}



longlong FUN_1401e5760(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  void *pvVar2;
  undefined8 *puVar3;
  longlong *plVar4;
  longlong *plVar5;
  longlong lVar6;
  longlong *local_res8;
  void *local_res10;
  undefined8 uVar7;
  
  uVar7 = 0xfffffffffffffffe;
  plVar4 = operator_new(0x18);
  plVar5 = (longlong *)0x0;
  local_res8 = plVar4;
  if (plVar4 != (longlong *)0x0) {
    plVar4[2] = 0;
    plVar4[1] = 0;
    *plVar4 = param_1;
    local_res10 = operator_new(0x30);
    if (local_res10 != (void *)0x0) {
      plVar5 = (longlong *)FUN_1401e3420(local_res10);
    }
    plVar4[2] = (longlong)plVar5;
    plVar5 = plVar4;
  }
  if (plVar5 == (longlong *)0x0) {
    local_res8 = (longlong *)0x0;
  }
  else {
    local_res8 = (longlong *)FUN_140156940(0x10);
    local_res8[1] = 1;
    *local_res8 = (longlong)plVar5;
  }
  plVar5 = local_res8;
  lVar6 = FUN_1401bcec0(param_1 + 0x28,&local_res8,param_3,param_4,uVar7);
  plVar4 = local_res8;
  if (plVar5 != (longlong *)0x0) {
    plVar1 = plVar5 + 1;
    *plVar1 = *plVar1 + -1;
    lVar6 = plVar5[1];
    if (*plVar1 == 0) {
      pvVar2 = (void *)*local_res8;
      if (pvVar2 != (void *)0x0) {
        puVar3 = *(undefined8 **)((longlong)pvVar2 + 0x10);
        if (puVar3 != (undefined8 *)0x0) {
          (**(code **)*puVar3)(puVar3,1);
        }
        operator_delete(pvVar2);
      }
      lVar6 = FUN_140156970(plVar4);
    }
  }
  return lVar6;
}



void FUN_1401e5850(longlong param_1,char param_2,int param_3)

{
  int *piVar1;
  double dVar2;
  int iVar3;
  undefined8 uVar4;
  undefined8 *puVar5;
  longlong *plVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong lVar9;
  longlong lVar10;
  undefined *puVar11;
  undefined *puVar12;
  undefined *puVar13;
  int iVar14;
  bool bVar15;
  double dVar16;
  double dVar17;
  double dVar18;
  undefined1 local_res8 [8];
  int local_res18 [2];
  undefined *local_res20;
  undefined8 in_stack_fffffffffffffeb8;
  undefined4 uVar19;
  undefined *local_e8;
  undefined *local_e0;
  undefined *local_d8;
  undefined *local_d0;
  undefined8 local_c8;
  undefined8 local_c0;
  undefined8 local_b8;
  undefined1 local_b0;
  undefined8 local_a8;
  undefined1 local_a0;
  undefined8 local_98;
  undefined1 local_90;
  undefined8 local_88;
  undefined1 local_80;
  undefined8 local_78;
  undefined1 local_70;
  undefined1 local_68 [48];
  
  uVar19 = (undefined4)((ulonglong)in_stack_fffffffffffffeb8 >> 0x20);
  local_c0 = 0xfffffffffffffffe;
  if (*(char *)(param_1 + 0x608) == '\0') {
    local_res18[0] = param_3;
    if (((param_2 != '\0') && (param_3 != 0x1d)) &&
       ((lVar8 = *(longlong *)(param_1 + 0x670), *(char *)(lVar8 + 0x1790) != '\0' ||
        (*(int *)(lVar8 + 0x6c8) != 0)))) {
      local_res8[0] = 0;
      (**(code **)(*(longlong *)(lVar8 + 0x70) + 0x158))((longlong *)(lVar8 + 0x70),local_res8);
      bVar15 = *(int *)(param_1 + 0x588) != *(int *)(param_1 + 0x578);
      FUN_1401bc870(*(undefined8 *)(param_1 + 0x670),&local_e0);
      dVar16 = (double)(**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x670) + 0x70) + 0x1c0))()
      ;
      dVar18 = *(double *)(param_1 + 0x610);
      if ((*(longlong **)(param_1 + 0x18) == (longlong *)0x0) ||
         (lVar8 = **(longlong **)(param_1 + 0x18), lVar8 == 0)) {
        lVar8 = 0;
      }
      else {
        lVar8 = lVar8 + -0x40;
      }
      dVar17 = (double)(**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x670) + 0x70) + 0x1c0))()
      ;
      dVar2 = *(double *)(lVar8 + 0x180);
      iVar14 = 1;
      if (!bVar15) {
        iVar14 = 2;
      }
      plVar7 = (longlong *)(*(longlong *)(param_1 + 0x670) + 0x70);
      plVar7 = (longlong *)(**(code **)(*plVar7 + 0xb0))(plVar7,&local_d8);
      puVar11 = (undefined *)*plVar7;
      if (puVar11 == (undefined *)0x0) {
        iVar3 = 0;
      }
      else if (puVar11 == PTR_DAT_1403200a0) {
        iVar3 = 0;
      }
      else {
        iVar3 = *(int *)(puVar11 + -8);
      }
      if (((local_d8 != (undefined *)0x0) && (local_d8 != PTR_DAT_1403200a0)) &&
         (local_d8 + -8 != (undefined *)0x0)) {
        uVar4 = FUN_1401568c0();
        local_78 = uVar4;
        FUN_140156b50(uVar4);
        local_70 = 1;
        piVar1 = (int *)(local_d8 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_d8 + -8);
        }
        FUN_140156be0(uVar4);
      }
      if (iVar3 != 0) {
        iVar14 = iVar14 + 1;
      }
      FUN_1401568c0();
      local_e8 = PTR_DAT_1403200a0;
      puVar5 = (undefined8 *)FUN_1401b0080(*(undefined8 *)(param_1 + 0x670),local_68);
      plVar7 = (longlong *)FUN_140158700(&local_d0);
      plVar6 = (longlong *)(**(code **)*puVar5)(puVar5);
      puVar11 = (undefined *)*plVar7;
      if ((undefined *)*plVar7 == (undefined *)0x0) {
        puVar11 = PTR_DAT_1403200a0;
      }
      puVar12 = local_e0;
      if (local_e0 == (undefined *)0x0) {
        puVar12 = PTR_DAT_1403200a0;
      }
      puVar13 = (undefined *)*plVar6;
      if ((undefined *)*plVar6 == (undefined *)0x0) {
        puVar13 = PTR_DAT_1403200a0;
      }
      lVar8 = *(longlong *)(*(longlong *)(param_1 + 0x670) + 0x5d8);
      lVar10 = 0;
      if (lVar8 != 0) {
        lVar10 = *(longlong *)(lVar8 + 0x38);
      }
      lVar8 = *(longlong *)(*(longlong *)(param_1 + 0x670) + 0x5d8);
      if (lVar8 == 0) {
        lVar9 = 0;
        lVar8 = 0;
      }
      else {
        lVar9 = *(longlong *)(lVar8 + 0x38);
        lVar8 = *(longlong *)(lVar8 + 0x38);
      }
      FUN_14004ce50(&local_e8,
                    L"(first chance) to-peer client %d UDP punch lost##Reason:%d##CliInstCount=%d##RecentElapTime=%3.3f##DisconnedCount=%d##recv count=%d##last ok recv interval=%3.3f##Recurred:%d##LocalIP:%s##Remote peer behind NAT:%d##UDP kept time:%3.3f##Time diff since last RecvIssue:%3.3f##%s##Process=%s"
                    ,*(undefined4 *)(param_1 + 0x56c),local_res18[0],
                    CONCAT44(uVar19,*(undefined4 *)(lVar8 + 0x2a8)),*(undefined8 *)(lVar9 + 0x180),
                    *(undefined4 *)(lVar10 + 0x288),*(undefined4 *)(param_1 + 0x100),
                    *(undefined8 *)(param_1 + 0x140),*(undefined4 *)(param_1 + 0x61c),puVar13,bVar15
                    ,dVar16 - dVar18,dVar17 - dVar2,puVar12,puVar11);
      if (((local_res20 != (undefined *)0x0) && (local_res20 != PTR_DAT_1403200a0)) &&
         (local_res20 + -8 != (undefined *)0x0)) {
        uVar4 = FUN_1401568c0();
        local_98 = uVar4;
        FUN_140156b50(uVar4);
        local_90 = 1;
        piVar1 = (int *)(local_res20 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_res20 + -8);
        }
        FUN_140156be0(uVar4);
      }
      local_res20 = PTR_DAT_1403200a0;
      if (((local_d0 != (undefined *)0x0) && (local_d0 != PTR_DAT_1403200a0)) &&
         (local_d0 + -8 != (undefined *)0x0)) {
        uVar4 = FUN_1401568c0();
        local_b8 = uVar4;
        FUN_140156b50(uVar4);
        local_b0 = 1;
        piVar1 = (int *)(local_d0 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_d0 + -8);
        }
        FUN_140156be0(uVar4);
      }
      puVar11 = local_e8;
      FUN_1401be250(*(undefined8 *)(param_1 + 0x670),iVar14,&DAT_140294c90,local_e8);
      if (((puVar11 != (undefined *)0x0) && (puVar11 != PTR_DAT_1403200a0)) &&
         (puVar11 + -8 != (undefined *)0x0)) {
        uVar4 = FUN_1401568c0();
        local_a8 = uVar4;
        FUN_140156b50(uVar4);
        local_a0 = 1;
        piVar1 = (int *)(puVar11 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(puVar11 + -8);
        }
        FUN_140156be0(uVar4);
      }
      if (((local_e0 != (undefined *)0x0) && (local_e0 != PTR_DAT_1403200a0)) &&
         (local_e0 + -8 != (undefined *)0x0)) {
        uVar4 = FUN_1401568c0();
        local_88 = uVar4;
        FUN_140156b50(uVar4);
        local_80 = 1;
        piVar1 = (int *)(local_e0 + -4);
        *piVar1 = *piVar1 + -1;
        if (*piVar1 == 0) {
          FUN_140156970(local_e0 + -8);
        }
        FUN_140156be0(uVar4);
      }
    }
    if (*(char *)(param_1 + 0x608) == '\0') {
      *(undefined1 *)(param_1 + 0x618) = 1;
    }
    *(undefined1 *)(param_1 + 0x608) = 1;
    if (*(longlong *)(param_1 + 0x640) != 0) {
      *(undefined8 *)(*(longlong *)(param_1 + 0x640) + 0xd8) = 0;
    }
    if (param_2 != '\0') {
      plVar7 = (longlong *)(*(longlong *)(param_1 + 0x670) + 0x1818);
      (**(code **)(*plVar7 + 0x40))(plVar7,1,&DAT_140328530,param_1 + 0x56c,local_res18);
    }
    local_c8 = 0;
    FUN_1401bcec0(param_1 + 0x28,&local_c8);
    if (local_res18[0] != 0x1d) {
      FUN_1401caa30(*(undefined8 *)(param_1 + 0x670),*(undefined4 *)(param_1 + 0x56c));
    }
    if (*(int *)(param_1 + 0x61c) < DAT_140320cb8) {
      *(int *)(param_1 + 0x61c) = *(int *)(param_1 + 0x61c) + 1;
      dVar18 = (double)(**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x670) + 0x70) + 0x1c0))()
      ;
      *(double *)(param_1 + 0x620) = dVar18 + DAT_140328930;
    }
  }
  return;
}



void FUN_1401e5d60(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong lVar5;
  longlong lVar6;
  longlong *local_res8;
  undefined8 local_res10;
  undefined8 local_res18 [2];
  undefined8 uVar7;
  undefined **local_40;
  int local_38;
  undefined2 local_34;
  
  uVar7 = 0xfffffffffffffffe;
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x670) + 0x78) + 0x10))();
  if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) && (**(longlong **)(param_1 + 0x18) != 0))
  {
    return;
  }
  if (*(char *)(param_1 + 0x23) == '\0') {
    return;
  }
  lVar4 = FUN_1401aff70(*(undefined8 *)(param_1 + 0x670));
  if (lVar4 == 0) {
    return;
  }
  *(undefined1 *)(param_1 + 0x23) = 0;
  lVar4 = 0;
  if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) &&
     (lVar5 = **(longlong **)(param_1 + 0x18), lVar5 != 0)) {
    if (*(char *)(lVar5 + 0x40) == '\0') {
      lVar5 = lVar4;
      if (*(longlong **)(param_1 + 0x18) != (longlong *)0x0) {
        lVar5 = **(longlong **)(param_1 + 0x18);
      }
      if (*(char *)(lVar5 + 0x80) == '\0') goto LAB_1401e5dfb;
    }
    uRam0000000000000000 = 1;
  }
LAB_1401e5dfb:
  if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) && (**(longlong **)(param_1 + 0x18) != 0))
  {
    local_res10 = 0;
    FUN_1401d43e0(&local_res10,param_1 + 0x18);
    FUN_1401c0470(*(undefined8 *)(param_1 + 0x670),&local_res10);
    local_res18[0] = 0;
    FUN_1401d43e0(param_1 + 0x18,local_res18);
  }
  local_res8 = operator_new(0x1c0);
  lVar5 = lVar4;
  if (local_res8 != (longlong *)0x0) {
    lVar5 = FUN_1401e76f0(local_res8,*(undefined8 *)(param_1 + 0x670),param_1,param_4,uVar7);
  }
  if ((lVar5 == 0) || (lVar5 + 0x40 == 0)) {
    local_res8 = (longlong *)0x0;
  }
  else {
    local_res8 = (longlong *)FUN_140156940(0x10);
    local_res8[1] = 1;
    *local_res8 = lVar5 + 0x40;
  }
  plVar1 = local_res8;
  FUN_1401d43e0(param_1 + 0x18,&local_res8);
  plVar3 = local_res8;
  if (plVar1 != (longlong *)0x0) {
    plVar1 = plVar1 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      puVar2 = (undefined8 *)*local_res8;
      if (puVar2 != (undefined8 *)0x0) {
        (**(code **)*puVar2)(puVar2,1);
      }
      FUN_140156970(plVar3);
    }
  }
  lVar5 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x670));
  local_38 = *(int *)(lVar5 + 0x118);
  if ((local_38 == 0) || (local_38 == -1)) {
    FUN_1401580e0(&DAT_140273240);
  }
  local_40 = Proud::AddrPort::vftable;
  local_34 = 0;
  if ((*(longlong **)(param_1 + 0x18) == (longlong *)0x0) ||
     (lVar5 = **(longlong **)(param_1 + 0x18), lVar6 = lVar5 + -0x40, lVar5 == 0)) {
    lVar6 = lVar4;
  }
  FUN_1401e7ad0(lVar6,&local_40);
  if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) &&
     (lVar5 = **(longlong **)(param_1 + 0x18), lVar5 != 0)) {
    lVar4 = lVar5 + -0x40;
  }
  FUN_1401e70d0(lVar4);
  FUN_1401e5760(param_1);
  return;
}



void FUN_1401e5f80(longlong param_1,longlong param_2)

{
  uint uVar1;
  uint uVar2;
  longlong lVar3;
  ulonglong uVar4;
  char cVar5;
  uint *puVar6;
  uint *puVar7;
  uint local_res8 [2];
  
  *(undefined4 *)(param_2 + 0x20) = *(undefined4 *)(param_1 + 0x56c);
  *(undefined4 *)(param_2 + 8) = *(undefined4 *)(param_1 + 0x578);
  *(undefined2 *)(param_2 + 0xc) = *(undefined2 *)(param_1 + 0x57c);
  *(undefined4 *)(param_2 + 0x18) = *(undefined4 *)(param_1 + 0x588);
  *(undefined2 *)(param_2 + 0x1c) = *(undefined2 *)(param_1 + 0x58c);
  *(undefined8 *)(param_2 + 0x88) = *(undefined8 *)(param_1 + 0x50);
  *(undefined4 *)(param_2 + 0x90) = *(undefined4 *)(param_1 + 0x58);
  if (*(longlong *)(param_1 + 0x5d0) == 0) {
    puVar7 = (uint *)0x0;
  }
  else {
    puVar7 = *(uint **)(param_1 + 0x5c0);
  }
  do {
    if (puVar7 == (uint *)0x0) {
      *(undefined1 *)(param_2 + 0x24) = *(undefined1 *)(param_1 + 0x608);
      *(bool *)(param_2 + 0x80) = *(int *)(param_1 + 0x588) != *(int *)(param_1 + 0x578);
      *(undefined8 *)(param_2 + 0x98) = *(undefined8 *)(param_1 + 0x678);
      *(undefined8 *)(param_2 + 0xa0) = *(undefined8 *)(param_1 + 0x160);
      *(undefined4 *)(param_2 + 0xa8) = *(undefined4 *)(param_1 + 0x40);
      *(undefined4 *)(param_2 + 0xac) = *(undefined4 *)(param_1 + 0x44);
      return;
    }
    uVar1 = *puVar7;
    uVar2 = *(uint *)(param_2 + 0x50);
    lVar3 = *(longlong *)(param_2 + 0x30);
    uVar4 = (ulonglong)uVar1 % (ulonglong)uVar2;
    local_res8[0] = uVar1;
    if (lVar3 == 0) {
LAB_1401e606e:
      cVar5 = FUN_1401a8bb0(param_2 + 0x28,(ulonglong)uVar2,
                            CONCAT71((int7)((ulonglong)lVar3 >> 8),1));
      if (cVar5 == '\0') {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x8007000e);
      }
    }
    else {
      for (puVar6 = *(uint **)(lVar3 + uVar4 * 8);
          (puVar6 != (uint *)0x0 && ((uint)uVar4 == puVar6[6] % uVar2));
          puVar6 = *(uint **)(puVar6 + 2)) {
        if (*puVar6 == uVar1) goto LAB_1401e60ae;
      }
      if (lVar3 == 0) goto LAB_1401e606e;
      for (puVar6 = *(uint **)(lVar3 + uVar4 * 8);
          (puVar6 != (uint *)0x0 && ((uint)uVar4 == puVar6[6] % uVar2));
          puVar6 = *(uint **)(puVar6 + 2)) {
        if (*puVar6 == uVar1) goto LAB_1401e60aa;
      }
      if (lVar3 == 0) goto LAB_1401e606e;
    }
    FUN_14015ce40(param_2 + 0x28);
    puVar6 = (uint *)FUN_14015ec60(param_2 + 0x28,local_res8,uVar4,uVar1);
    FUN_14015ce40(param_2 + 0x28);
LAB_1401e60aa:
    *(undefined1 *)(puVar6 + 1) = 0;
LAB_1401e60ae:
    puVar7 = *(uint **)(puVar7 + 4);
  } while( true );
}



// WARNING: Type propagation algorithm not settling
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401e6130(longlong param_1,double param_2)

{
  undefined *puVar1;
  int *piVar2;
  double *pdVar3;
  undefined *puVar4;
  char cVar5;
  int iVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong lVar9;
  undefined8 uVar10;
  double dVar11;
  float local_res8 [2];
  undefined *local_res10;
  double local_res18 [2];
  undefined8 local_a8;
  undefined8 local_a0;
  undefined1 local_98 [8];
  undefined **local_90;
  undefined4 local_88;
  undefined2 local_84;
  undefined8 local_80;
  undefined1 local_78;
  undefined **local_70;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  undefined8 local_50;
  
  local_a0 = 0xfffffffffffffffe;
  if (DAT_140320c88 < param_2 - *(double *)(param_1 + 0x658)) {
    FUN_1401e7f80(param_1 + 0x638);
    *(double *)(param_1 + 0x658) = param_2;
  }
  iVar6 = *(int *)(*(longlong *)(param_1 + 0x670) + 0x6a0);
  if ((((iVar6 != 1) && (iVar6 != 3)) && (iVar6 != 2)) &&
     ((*(char *)(param_1 + 0x25) != '\0' && (*(char *)(param_1 + 0x24) != '\0')))) {
    if (((*(longlong **)(param_1 + 0x18) == (longlong *)0x0) ||
        (**(longlong **)(param_1 + 0x18) == 0)) &&
       (((dVar11 = (double)(**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x670) + 0x70) + 0x1c0
                                       ))(),
         *(double *)(param_1 + 0x88) <= dVar11 && dVar11 != *(double *)(param_1 + 0x88) &&
         (*(char *)(param_1 + 0x21) != '\0')) && (*(char *)(param_1 + 0x22) == '\0')))) {
      *(undefined1 *)(param_1 + 0x22) = 1;
      plVar7 = (longlong *)(*(longlong *)(param_1 + 0x670) + 0x1818);
      (**(code **)(*plVar7 + 0xe0))(plVar7,1,&DAT_140328530,param_1 + 0x56c);
    }
    FUN_1401e3860(param_1);
    FUN_1401e5d60(param_1);
  }
  lVar9 = 0;
  if (((*(longlong **)(param_1 + 0x28) != (longlong *)0x0) && (**(longlong **)(param_1 + 0x28) != 0)
      ) && (cVar5 = FUN_1401e4540(), cVar5 == '\0')) {
    local_res18[1] = 0.0;
    FUN_1401bcec0(param_1 + 0x28,local_res18 + 1);
  }
  if (_DAT_140320da0 < param_2 - *(double *)(param_1 + 0x660)) {
    local_res18[0] = 0.0;
    (**(code **)(**(longlong **)(param_1 + 0x670) + 0xd8))
              (*(longlong **)(param_1 + 0x670),local_res18);
    local_res8[0] = (float)local_res18[0];
    local_a8 = FUN_14018aee0(*(longlong *)(param_1 + 0x670) + 0x1620);
    plVar7 = (longlong *)(*(longlong *)(param_1 + 0x670) + 0x17d0);
    (**(code **)(*plVar7 + 0x50))
              (plVar7,*(undefined4 *)(param_1 + 0x56c),&DAT_140328530,&local_a8,local_res8);
    *(double *)(param_1 + 0x660) = param_2;
  }
  if (*(char *)(param_1 + 0x608) == '\0') {
    if (param_2 - *(double *)(param_1 + 0xc0) <= DAT_140320d20 * 10.0) {
      if (*(char *)(param_1 + 0x608) != '\0') goto LAB_1401e635a;
      if ((*(longlong *)(param_1 + 0x640) != 0) &&
         (dVar11 = *(double *)(*(longlong *)(param_1 + 0x640) + 0xd8),
         pdVar3 = (double *)(*(longlong *)(param_1 + 0x670) + 0x6a8),
         *pdVar3 <= dVar11 && dVar11 != *pdVar3)) {
        uVar10 = 0x1b;
        goto LAB_1401e6347;
      }
    }
    else {
      uVar10 = 0x1a;
LAB_1401e6347:
      FUN_1401e5850(param_1,1,uVar10);
    }
    if (*(char *)(param_1 + 0x608) == '\0') goto LAB_1401e63ab;
  }
LAB_1401e635a:
  if (((0.0 < *(double *)(param_1 + 0x620)) && (*(double *)(param_1 + 0x620) < param_2)) &&
     ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0 &&
      (lVar8 = **(longlong **)(param_1 + 0x18), lVar8 != 0)))) {
    plVar7 = *(longlong **)(lVar8 + 0xc0);
    lVar8 = lVar9;
    if (plVar7 != (longlong *)0x0) {
      lVar8 = *plVar7;
    }
    cVar5 = FUN_140185860(lVar8);
    if (cVar5 == '\0') {
      *(undefined8 *)(param_1 + 0x620) = 0;
      FUN_1401e5760(param_1);
    }
  }
LAB_1401e63ab:
  plVar7 = *(longlong **)(param_1 + 0x18);
  if (((plVar7 != (longlong *)0x0) && (*plVar7 != 0)) &&
     (_DAT_140320de8 < param_2 - *(double *)(param_1 + 0x628))) {
    local_90 = Proud::AddrPort::vftable;
    local_88 = *(undefined4 *)(param_1 + 0x598);
    local_84 = *(undefined2 *)(param_1 + 0x59c);
    if (*plVar7 != 0) {
      lVar9 = *plVar7 + -0x40;
    }
    iVar6 = FUN_14019f0a0(*(undefined8 *)(lVar9 + 0x108),&local_90);
    if (*(double *)(param_1 + 0x630) == 0.0) {
      if (DAT_140320dc4 < iVar6) {
        *(double *)(param_1 + 0x630) = param_2;
      }
    }
    else if (DAT_140320dc4 < iVar6) {
      if (_DAT_140320de0 < param_2 - *(double *)(param_1 + 0x630)) {
        *(double *)(param_1 + 0x630) = param_2;
        FUN_1401568c0();
        local_res10 = PTR_DAT_1403200a0;
        FUN_14004ce50(&local_res10,L"sendQueue %dBytes",iVar6);
        local_68 = 0;
        local_60 = 0;
        local_58 = 0;
        local_50 = 0;
        local_70 = Proud::ByteArray::vftable;
        uVar10 = FUN_140181f50(local_98,0x25,*(undefined4 *)(param_1 + 0x56c),&local_res10,&local_70
                              );
        (**(code **)(**(longlong **)(param_1 + 0x670) + 0x88))
                  (*(longlong **)(param_1 + 0x670),uVar10);
        FUN_1401858d0(&local_70);
        puVar4 = local_res10;
        if (((local_res10 != (undefined *)0x0) && (local_res10 != PTR_DAT_1403200a0)) &&
           (puVar1 = local_res10 + -8, puVar1 != (undefined *)0x0)) {
          uVar10 = FUN_1401568c0();
          local_80 = uVar10;
          FUN_140156b50(uVar10);
          local_78 = 1;
          piVar2 = (int *)(puVar4 + -4);
          *piVar2 = *piVar2 + -1;
          if (*piVar2 == 0) {
            FUN_140156970(puVar1);
          }
          FUN_140156be0(uVar10);
        }
      }
    }
    else {
      *(undefined8 *)(param_1 + 0x630) = 0;
    }
    *(double *)(param_1 + 0x628) = param_2;
  }
  return;
}



undefined8 FUN_1401e6570(longlong param_1,ushort param_2)

{
  longlong *plVar1;
  uint uVar2;
  ushort *puVar3;
  undefined8 *puVar4;
  ulonglong uVar5;
  longlong *plVar6;
  char cVar7;
  longlong lVar8;
  undefined8 uVar9;
  longlong lVar10;
  longlong lVar11;
  longlong *local_res8;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined8 local_48;
  undefined8 local_40;
  undefined **local_38;
  int local_30;
  ushort local_2c;
  
  local_40 = 0xfffffffffffffffe;
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x670) + 0x78) + 0x10))();
  lVar11 = 0;
  if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) &&
     (lVar8 = **(longlong **)(param_1 + 0x18), lVar8 != 0)) {
    if (*(char *)(lVar8 + 0x40) == '\0') {
      lVar8 = lVar11;
      if (*(longlong **)(param_1 + 0x18) != (longlong *)0x0) {
        lVar8 = **(longlong **)(param_1 + 0x18);
      }
      if (*(char *)(lVar8 + 0x80) == '\0') goto LAB_1401e65de;
    }
    uRam0000000000000000 = 1;
  }
LAB_1401e65de:
  if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) && (**(longlong **)(param_1 + 0x18) != 0))
  {
    local_res18 = 0;
    FUN_1401d43e0(&local_res18,param_1 + 0x18);
    FUN_1401c0470(*(undefined8 *)(param_1 + 0x670),&local_res18);
    local_res20 = 0;
    FUN_1401d43e0(param_1 + 0x18);
  }
  *(undefined8 *)(param_1 + 0x628) = 0;
  *(undefined8 *)(param_1 + 0x630) = 0;
  uVar2 = *(uint *)(*(longlong *)(param_1 + 0x670) + 0x1748);
  uVar5 = (ulonglong)param_2 % (ulonglong)uVar2;
  lVar8 = *(longlong *)(*(longlong *)(param_1 + 0x670) + 0x1728);
  if (lVar8 != 0) {
    for (puVar3 = *(ushort **)(lVar8 + uVar5 * 8);
        (puVar3 != (ushort *)0x0 && ((uint)uVar5 == *(uint *)(puVar3 + 0x10) % uVar2));
        puVar3 = *(ushort **)(puVar3 + 8)) {
      if (*puVar3 == param_2) {
        FUN_1401d43e0(param_1 + 0x18);
        lVar8 = lVar11;
        if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) &&
           (lVar10 = **(longlong **)(param_1 + 0x18), lVar10 != 0)) {
          lVar8 = lVar10 + -0x40;
        }
        *(undefined8 *)(lVar8 + 0x148) = 0;
        if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) &&
           (lVar8 = **(longlong **)(param_1 + 0x18), lVar8 != 0)) {
          lVar11 = lVar8 + -0x40;
        }
        *(longlong *)(lVar11 + 0x120) = param_1;
        lVar11 = *(longlong *)(param_1 + 0x670);
        uVar5 = (ulonglong)param_2 % (ulonglong)*(uint *)(lVar11 + 0x1748);
        if (*(longlong *)(lVar11 + 0x1728) == 0) goto LAB_1401e6882;
        puVar3 = *(ushort **)(*(longlong *)(lVar11 + 0x1728) + uVar5 * 8);
        goto joined_r0x0001401e6720;
      }
    }
  }
  local_res8 = operator_new(0x1c0);
  lVar8 = lVar11;
  if (local_res8 != (longlong *)0x0) {
    lVar8 = FUN_1401e76f0(local_res8,*(undefined8 *)(param_1 + 0x670),param_1);
  }
  if ((lVar8 == 0) || (lVar8 + 0x40 == 0)) {
    local_res8 = (longlong *)0x0;
  }
  else {
    local_res8 = (longlong *)FUN_140156940(0x10);
    local_res8[1] = 1;
    *local_res8 = lVar8 + 0x40;
  }
  plVar1 = local_res8;
  FUN_1401d43e0(param_1 + 0x18,&local_res8);
  plVar6 = local_res8;
  if (plVar1 != (longlong *)0x0) {
    plVar1 = plVar1 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      puVar4 = (undefined8 *)*local_res8;
      if (puVar4 != (undefined8 *)0x0) {
        (**(code **)*puVar4)(puVar4,1);
      }
      FUN_140156970(plVar6);
    }
  }
  lVar8 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x670));
  local_30 = *(int *)(lVar8 + 0x118);
  if ((local_30 == 0) || (local_30 == -1)) {
    FUN_1401580e0(&DAT_140273240);
  }
  local_38 = Proud::AddrPort::vftable;
  if ((*(longlong **)(param_1 + 0x18) == (longlong *)0x0) ||
     (lVar8 = **(longlong **)(param_1 + 0x18), lVar10 = lVar8 + -0x40, lVar8 == 0)) {
    lVar10 = lVar11;
  }
  local_2c = param_2;
  cVar7 = FUN_1401e7ad0(lVar10,&local_38);
  if (cVar7 == '\0') {
    local_48 = 0;
    FUN_1401d43e0(param_1 + 0x18,&local_48);
    uVar9 = 0;
  }
  else {
LAB_1401e6882:
    uVar9 = 1;
  }
  return uVar9;
joined_r0x0001401e6720:
  if ((puVar3 == (ushort *)0x0) ||
     ((uint)uVar5 != *(uint *)(puVar3 + 0x10) % *(uint *)(lVar11 + 0x1748))) goto LAB_1401e6882;
  if (*puVar3 == param_2) {
    FUN_1401bd320(lVar11 + 0x1720,puVar3,0);
    goto LAB_1401e6882;
  }
  puVar3 = *(ushort **)(puVar3 + 8);
  goto joined_r0x0001401e6720;
}



void FUN_1401e68a0(longlong *param_1,longlong param_2)

{
  longlong *plVar1;
  
  if (*(longlong *)(param_2 + 0x30) != 0) {
    plVar1 = (longlong *)(*(longlong *)(param_2 + 0x30) + 8);
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      FUN_140161ae0((undefined8 *)(param_2 + 0x30),*(undefined8 *)(param_2 + 0x30));
    }
  }
  FUN_1401560e0(param_2 + 0x18);
  if (*(longlong *)(param_2 + 0x20) != 0) {
    if (*(int *)(param_2 + 0x2c) < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(undefined4 *)(param_2 + 0x28) = 0;
  }
  plVar1 = (longlong *)*param_1;
  if (plVar1 == (longlong *)0x0) {
    FUN_140156970(param_2);
  }
  else {
    (**(code **)(*plVar1 + 0x10))(plVar1,param_2);
  }
  param_1[3] = param_1[3] + -1;
  return;
}



void FUN_1401e6930(longlong *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  longlong *plVar4;
  
  lVar2 = param_1[3];
  while( true ) {
    if (lVar2 == 0) {
      param_1[1] = 0;
      param_1[2] = 0;
      return;
    }
    plVar3 = (longlong *)param_1[1];
    if (plVar3 == (longlong *)0x0) break;
    plVar4 = plVar3 + 6;
    param_1[1] = *plVar3;
    if (*plVar4 != 0) {
      plVar1 = (longlong *)(*plVar4 + 8);
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_140161ae0(plVar4,*plVar4);
      }
    }
    FUN_1401560e0(plVar3 + 3);
    if (plVar3[4] != 0) {
      if (*(int *)((longlong)plVar3 + 0x2c) < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      *(undefined4 *)(plVar3 + 5) = 0;
    }
    plVar4 = (longlong *)*param_1;
    if (plVar4 == (longlong *)0x0) {
      FUN_140156970(plVar3);
    }
    else {
      (**(code **)(*plVar4 + 0x10))(plVar4,plVar3);
    }
    param_1[3] = param_1[3] + -1;
    lVar2 = param_1[3];
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



void FUN_1401e69f0(longlong *param_1)

{
  undefined8 *puVar1;
  
  FUN_1401e6930();
  puVar1 = (undefined8 *)*param_1;
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  return;
}



void FUN_1401e6a20(longlong param_1)

{
  undefined8 *puVar1;
  
  FUN_1401e6930(param_1 + 0x90);
  puVar1 = *(undefined8 **)(param_1 + 0x90);
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  FUN_1401e6930(param_1 + 0x70);
  puVar1 = *(undefined8 **)(param_1 + 0x70);
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  FUN_1401ae940(param_1 + 0x30);
  return;
}



void FUN_1401e6a80(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  longlong *plVar2;
  undefined8 uVar3;
  
  uVar3 = 0xfffffffffffffffe;
  FUN_1401ae940(param_1 + 0x60);
  FUN_1401e6930(param_1 + 0x40);
  puVar1 = *(undefined8 **)(param_1 + 0x40);
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  *(undefined ***)(param_1 + 0x18) = Proud::CFastArray<>::vftable;
  if (*(longlong *)(param_1 + 0x28) != 0) {
    plVar2 = *(longlong **)(param_1 + 0x20);
    if (plVar2 == (longlong *)0x0) {
      FUN_140156970();
    }
    else {
      (**(code **)(*plVar2 + 0x18))(plVar2,*(longlong *)(param_1 + 0x28),plVar2,param_4,uVar3);
    }
  }
  return;
}



void FUN_1401e6b00(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  FUN_1401e6a80(param_1 + 0xf0);
  FUN_1401e6930(param_1 + 0x98);
  puVar1 = *(undefined8 **)(param_1 + 0x98);
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1,param_3,param_4,uVar2);
  }
  FUN_1401e6930(param_1 + 0x78);
  puVar1 = *(undefined8 **)(param_1 + 0x78);
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
  }
  FUN_1401ae940(param_1 + 0x38);
  return;
}



void FUN_1401e6b90(undefined8 *param_1)

{
  void *pvVar1;
  
  pvVar1 = (void *)param_1[1];
  if (pvVar1 != (void *)0x0) {
    FUN_1401e6b00(pvVar1);
    operator_delete(pvVar1);
  }
  *param_1 = Proud::IReliableUdpHostDelegate::vftable;
  return;
}



void FUN_1401e6be0(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  longlong *plVar2;
  undefined8 *puVar3;
  undefined8 uVar4;
  
  uVar4 = 0xfffffffffffffffe;
  *param_1 = Proud::CRemotePeer_C::vftable;
  param_1[1] = Proud::CRemotePeer_C::vftable;
  param_1[2] = Proud::CRemotePeer_C::vftable;
  pvVar1 = (void *)param_1[200];
  if (pvVar1 != (void *)0x0) {
    FUN_1401e6b00(pvVar1);
    operator_delete(pvVar1);
  }
  param_1[199] = Proud::IReliableUdpHostDelegate::vftable;
  FUN_1401c45b0(param_1 + 0xb6);
  FUN_1401858d0(param_1 + 0xa7);
  FUN_1401bcd80(param_1 + 5);
  if ((param_1[3] != 0) &&
     (*(longlong *)(param_1[3] + 8) = *(longlong *)(param_1[3] + 8) + -1,
     *(longlong *)(param_1[3] + 8) == 0)) {
    plVar2 = (longlong *)param_1[3];
    puVar3 = (undefined8 *)*plVar2;
    if (puVar3 != (undefined8 *)0x0) {
      (**(code **)*puVar3)(puVar3,1,param_3,param_4,uVar4);
    }
    FUN_140156970(plVar2);
  }
  param_1[2] = Proud::IUdpPacketFragBoardDg::vftable;
  param_1[1] = Proud::IP2PGroupMember::vftable;
  *param_1 = Proud::ISendDest_C::vftable;
  return;
}



undefined4 FUN_1401e6cf0(longlong param_1)

{
  return *(undefined4 *)(param_1 + 0x56c);
}



void FUN_1401e6d00(longlong param_1)

{
  FUN_1401e6f40(param_1 + -8);
  return;
}



void FUN_1401e6d10(longlong param_1)

{
  FUN_1401e6f40(param_1 + -0x10);
  return;
}



void FUN_1401e6d20(longlong param_1)

{
  FUN_1401e6cf0(param_1 + -8);
  return;
}



// WARNING: Removing unreachable block (ram,0x0001401e6ea8)
// WARNING: Removing unreachable block (ram,0x0001401e6eb1)
// WARNING: Removing unreachable block (ram,0x0001401e6ed2)
// WARNING: Removing unreachable block (ram,0x0001401e6edb)

undefined8 *
FUN_1401e6d30(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *param_1 = Proud::CRemotePeer_C::vftable;
  param_1[1] = Proud::CRemotePeer_C::vftable;
  param_1[2] = Proud::CRemotePeer_C::vftable;
  param_1[3] = 0;
  param_1[5] = 0;
  *(undefined4 *)(param_1 + 6) = 0;
  *(undefined4 *)((longlong)param_1 + 0x34) = 0;
  *(undefined4 *)(param_1 + 7) = 0;
  *(undefined4 *)((longlong)param_1 + 0x3c) = 0;
  *(undefined4 *)(param_1 + 0xa5) = 0;
  param_1[0xa8] = 0;
  param_1[0xa9] = 0;
  param_1[0xaa] = 0;
  param_1[0xab] = 0;
  param_1[0xa7] = Proud::ByteArray::vftable;
  *(undefined1 *)(param_1 + 0xac) = 0;
  param_1[0xae] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0xaf) = 0;
  *(undefined2 *)((longlong)param_1 + 0x57c) = 0;
  param_1[0xb0] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0xb1) = 0;
  *(undefined2 *)((longlong)param_1 + 0x58c) = 0;
  param_1[0xb2] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0xb3) = 0;
  *(undefined2 *)((longlong)param_1 + 0x59c) = 0;
  param_1[0xb4] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0xb5) = 0;
  *(undefined2 *)((longlong)param_1 + 0x5ac) = 0;
  *(undefined1 *)(param_1 + 0xb6) = 0;
  param_1[0xc0] = 0;
  param_1[0xb7] = 0;
  param_1[0xb8] = 0;
  param_1[0xb9] = 0;
  *(undefined4 *)(param_1 + 0xbb) = 0x11;
  param_1[0xba] = 0;
  *(undefined4 *)(param_1 + 0xbf) = 0;
  *(undefined4 *)((longlong)param_1 + 0x5dc) = 0x3f400000;
  *(undefined4 *)(param_1 + 0xbc) = 0x3e800000;
  *(undefined4 *)((longlong)param_1 + 0x5e4) = 0x40100000;
  param_1[0xbd] = 0x26;
  param_1[0xbe] = 0;
  FUN_1401e8cc0(param_1 + 199,param_1,param_3,param_4,0xfffffffffffffffe);
  param_1[0xcd] = param_1;
  FUN_1401e5590(param_1,param_2);
  *(undefined4 *)(param_1 + 0xd0) = 0;
  *(undefined1 *)((longlong)param_1 + 0x684) = 0;
  return param_1;
}



void * FUN_1401e6f40(void *param_1,uint param_2)

{
  FUN_1401e6be0();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401e6f70(longlong param_1)

{
  (**(code **)(*(longlong *)(param_1 + -0x40) + 0x10))(param_1 + -0x40);
  *(undefined8 *)(param_1 + 0xe0) = 0;
  return;
}



void FUN_1401e6fa0(longlong param_1)

{
  undefined8 uVar1;
  longlong lVar2;
  char cVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  undefined **local_18;
  undefined4 local_10;
  undefined2 local_c;
  
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x118) + 0x78) + 0x10))
            (*(longlong *)(param_1 + 0x118) + 0x78);
  if ((*(double *)(param_1 + 0x148) == 0.0) && (*(char *)(param_1 + 0x80) == '\0')) {
    uVar6 = 0;
    uVar5 = uVar6;
    if (*(undefined8 **)(param_1 + 0x100) != (undefined8 *)0x0) {
      uVar5 = **(undefined8 **)(param_1 + 0x100);
    }
    cVar3 = FUN_140185860(uVar5);
    if (cVar3 == '\0') {
      uVar5 = *(undefined8 *)(param_1 + 0x110);
      uVar1 = *(undefined8 *)(param_1 + 0x108);
      uVar7 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x118) + 0x70) + 0x1c0))
                        (*(longlong *)(param_1 + 0x118) + 0x70);
      cVar3 = FUN_1401a0780(uVar1,uVar5,uVar7);
      if ((cVar3 != '\0') && (0 < *(longlong *)(*(longlong *)(param_1 + 0x110) + 8))) {
        lVar2 = *(longlong *)(param_1 + 0x110);
        *(undefined1 *)(param_1 + 0x80) = 1;
        local_18 = Proud::AddrPort::vftable;
        local_10 = *(undefined4 *)(lVar2 + 0x6a8);
        local_c = *(undefined2 *)(lVar2 + 0x6ac);
        if (*(undefined8 **)(param_1 + 0x100) != (undefined8 *)0x0) {
          uVar6 = **(undefined8 **)(param_1 + 0x100);
        }
        iVar4 = FUN_140187200(uVar6,lVar2,&local_18,*(undefined4 *)(lVar2 + 0x6b0));
        if (iVar4 != 0) {
          *(undefined1 *)(param_1 + 0x80) = 0;
        }
      }
    }
  }
  return;
}



void FUN_1401e70d0(longlong param_1)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  undefined8 uVar4;
  
  if ((*(double *)(param_1 + 0x148) == 0.0) && (*(char *)(param_1 + 0xc0) == '\0')) {
    lVar2 = 0;
    lVar3 = lVar2;
    if (*(longlong **)(param_1 + 0x100) != (longlong *)0x0) {
      lVar3 = **(longlong **)(param_1 + 0x100);
    }
    if (*(char *)(lVar3 + 0x80) == '\0') {
      *(undefined1 *)(param_1 + 0xc0) = 1;
      if (*(longlong **)(param_1 + 0x100) != (longlong *)0x0) {
        lVar2 = **(longlong **)(param_1 + 0x100);
      }
      iVar1 = FUN_1401865a0(lVar2,DAT_140320c7c);
      if (iVar1 == 0) {
        uVar4 = (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x118) + 0x70) + 0x1c0))
                          (*(longlong *)(param_1 + 0x118) + 0x70);
        *(undefined8 *)(param_1 + 0x180) = uVar4;
        return;
      }
      *(undefined1 *)(param_1 + 0xc0) = 0;
    }
  }
  return;
}



void FUN_1401e7170(longlong param_1,longlong param_2)

{
  undefined **local_18;
  undefined4 local_10;
  undefined2 local_c;
  
  local_18 = Proud::AddrPort::vftable;
  local_10 = *(undefined4 *)(param_2 + 8);
  local_c = *(undefined2 *)(param_2 + 0xc);
  FUN_14019efa0(*(undefined8 *)(param_1 + 0x108),&local_18);
  return;
}



void FUN_1401e71b0(longlong param_1)

{
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x118) + 0x78) + 0x10))
            (*(longlong *)(param_1 + 0x118) + 0x78);
  if (*(undefined8 **)(param_1 + 0x100) != (undefined8 *)0x0) {
    FUN_1401855c0(**(undefined8 **)(param_1 + 0x100));
    return;
  }
  FUN_1401855c0();
  return;
}



void FUN_1401e71f0(longlong param_1)

{
  int iVar1;
  longlong lVar2;
  undefined8 uVar3;
  undefined1 local_18 [16];
  
  if (*(undefined8 **)(param_1 + 0x100) == (undefined8 *)0x0) {
    uVar3 = 0;
  }
  else {
    uVar3 = **(undefined8 **)(param_1 + 0x100);
  }
  lVar2 = FUN_140184b60(uVar3,local_18);
  iVar1 = *(int *)(lVar2 + 8);
  *(int *)(param_1 + 0x130) = iVar1;
  *(undefined2 *)(param_1 + 0x134) = *(undefined2 *)(lVar2 + 0xc);
  if ((iVar1 == 0) || (iVar1 == -1)) {
    FUN_1401580e0(&DAT_140278d90);
  }
  return;
}



void FUN_1401e7250(longlong param_1,undefined8 param_2)

{
  FUN_1401a0b70(*(undefined8 *)(param_1 + 0x108));
  if (*(longlong *)(param_1 + 0x188) != 0) {
    FUN_1401a2710(*(longlong *)(param_1 + 0x188),param_2);
  }
  return;
}



void FUN_1401e7290(longlong param_1)

{
  FUN_1401a0ed0(*(undefined8 *)(param_1 + 0x108));
  if (*(longlong *)(param_1 + 0x188) != 0) {
    FUN_1401a2820();
  }
  return;
}



undefined8 FUN_1401e72c0(longlong param_1)

{
  longlong lVar1;
  
  if ((*(longlong **)(param_1 + 0xc0) != (longlong *)0x0) &&
     (lVar1 = **(longlong **)(param_1 + 0xc0), lVar1 != 0)) {
    if (*(char *)(lVar1 + 0x80) == '\0') {
      return 0;
    }
  }
  return 1;
}



void FUN_1401e72f0(longlong param_1)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  longlong lVar5;
  undefined **local_18;
  int local_10;
  undefined2 local_c;
  
  lVar5 = 0;
  lVar3 = lVar5;
  if (*(longlong **)(param_1 + 0x100) != (longlong *)0x0) {
    lVar3 = **(longlong **)(param_1 + 0x100);
  }
  FUN_1401851a0(lVar3,0);
  lVar3 = FUN_1401aff90(*(undefined8 *)(param_1 + 0x118));
  local_10 = *(int *)(lVar3 + 0x118);
  if ((local_10 == 0) || (local_10 == -1)) {
    FUN_1401580e0(&DAT_140273240);
  }
  local_18 = Proud::AddrPort::vftable;
  local_c = 0;
  lVar3 = lVar5;
  if (*(longlong **)(param_1 + 0x100) != (longlong *)0x0) {
    lVar3 = **(longlong **)(param_1 + 0x100);
  }
  FUN_1401871b0(lVar3,&local_18);
  lVar3 = lVar5;
  if (*(longlong **)(param_1 + 0x100) != (longlong *)0x0) {
    lVar3 = **(longlong **)(param_1 + 0x100);
  }
  lVar3 = FUN_140184b60(lVar3,&local_18);
  iVar1 = *(int *)(lVar3 + 8);
  *(int *)(param_1 + 0x130) = iVar1;
  *(undefined2 *)(param_1 + 0x134) = *(undefined2 *)(lVar3 + 0xc);
  if ((iVar1 == 0) || (iVar1 == -1)) {
    FUN_1401580e0(&DAT_140278d90);
  }
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x118) + 0x78) + 0x10))
            (*(longlong *)(param_1 + 0x118) + 0x78);
  lVar3 = lVar5;
  if (*(longlong **)(param_1 + 0x100) != (longlong *)0x0) {
    lVar3 = **(longlong **)(param_1 + 0x100);
  }
  lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x118) + 0x5d8);
  lVar4 = lVar5;
  if (lVar2 != 0) {
    lVar4 = *(longlong *)(lVar2 + 0x38);
  }
  FUN_14018c430(*(undefined8 *)(lVar4 + 0x2b8),lVar3);
  if (*(longlong **)(param_1 + 0x100) != (longlong *)0x0) {
    lVar5 = **(longlong **)(param_1 + 0x100);
  }
  FUN_1401a7b80(lVar5);
  FUN_1401e70d0(param_1);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401e7440(longlong param_1,undefined4 param_2,undefined2 param_3,longlong param_4,
                  undefined8 param_5,undefined8 param_6,undefined8 *param_7)

{
  undefined1 auStack_e58 [32];
  undefined1 *local_e38;
  undefined8 local_e30;
  undefined8 *local_e28;
  undefined **local_e18;
  undefined4 local_e10;
  undefined2 local_e0c;
  undefined8 local_e08;
  undefined8 local_df8;
  undefined8 uStack_df0;
  undefined4 local_de8;
  undefined4 uStack_de4;
  undefined4 uStack_de0;
  undefined4 uStack_ddc;
  undefined1 local_dd8 [80];
  undefined1 local_d88 [8];
  undefined *local_d80;
  longlong local_d78;
  undefined4 local_d70;
  int local_d6c;
  undefined1 local_d60 [136];
  undefined1 local_cd8 [3200];
  undefined1 *local_58;
  undefined4 local_50;
  int local_4c;
  ulonglong local_48;
  
  local_e08 = 0xfffffffffffffffe;
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_e58;
  (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x118) + 0x78) + 0x10))();
  local_4c = 200;
  local_50 = 0;
  local_58 = local_cd8;
  FUN_1401544a0(local_d88);
  FUN_140154120(local_d88,local_d60,0x80);
  FUN_1401a80b0(param_5,local_cd8,local_d88);
  local_df8 = *param_7;
  uStack_df0 = param_7[1];
  local_de8 = *(undefined4 *)(param_7 + 2);
  uStack_de4 = *(undefined4 *)((longlong)param_7 + 0x14);
  uStack_de0 = *(undefined4 *)(param_7 + 3);
  uStack_ddc = *(undefined4 *)((longlong)param_7 + 0x1c);
  local_e18 = Proud::AddrPort::vftable;
  local_e10 = *(undefined4 *)(param_4 + 8);
  local_e0c = *(undefined2 *)(param_4 + 0xc);
  local_e28 = &local_df8;
  local_e30 = param_6;
  local_e38 = local_cd8;
  FUN_1401a15c0(*(undefined8 *)(param_1 + 0x108),param_2,param_3,&local_e18);
  local_e18 = &local_d80;
  FUN_1401560e0(&local_d80);
  if (local_d78 != 0) {
    if (local_d6c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_d70 = 0;
  }
  if (local_58 == (undefined1 *)0x0) {
    FUN_140156300(local_dd8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_dd8,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_4c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401e75f0(undefined8 param_1,undefined4 param_2,undefined2 param_3,longlong param_4,
                  undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined1 auStack_d68 [32];
  undefined8 local_d48;
  undefined8 local_d40;
  undefined8 local_d38;
  undefined **local_d28;
  undefined4 local_d20;
  undefined2 local_d1c;
  undefined8 local_d18;
  undefined1 local_d10 [72];
  undefined1 local_cc8 [3200];
  longlong local_48;
  int local_3c;
  ulonglong local_38;
  
  local_d18 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_d68;
  local_d48 = FUN_1401570d0(local_cc8,param_5);
  local_d28 = Proud::AddrPort::vftable;
  local_d20 = *(undefined4 *)(param_4 + 8);
  local_d1c = *(undefined2 *)(param_4 + 0xc);
  local_d38 = param_7;
  local_d40 = param_6;
  FUN_1401e7440(param_1,param_2,param_3,&local_d28);
  if (local_48 == 0) {
    FUN_140156300(local_d10,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_d10,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_3c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



undefined8 * FUN_1401e76f0(undefined8 *param_1,longlong param_2,longlong param_3,undefined8 param_4)

{
  void *pvVar1;
  undefined8 *puVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  
  uVar6 = 0xfffffffffffffffe;
  *param_1 = Proud::ICompletionContext::vftable;
  FUN_140185060(param_1 + 8);
  *param_1 = Proud::CUdpSocket_C::vftable;
  param_1[8] = Proud::CUdpSocket_C::vftable;
  puVar4 = (undefined8 *)0x0;
  param_1[0x20] = 0;
  param_1[0x21] = 0;
  param_1[0x22] = 0;
  param_1[0x25] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0x26) = 0;
  *(undefined2 *)((longlong)param_1 + 0x134) = 0;
  param_1[0x27] = Proud::AddrPort::vftable;
  *(undefined4 *)(param_1 + 0x28) = 0;
  *(undefined2 *)((longlong)param_1 + 0x144) = 0;
  param_1[0x31] = 0;
  *(undefined4 *)(param_1 + 0x28) = DAT_140320450;
  *(undefined2 *)((longlong)param_1 + 0x144) = DAT_140320454;
  *(undefined4 *)(param_1 + 0x26) = *(undefined4 *)(param_1 + 0x28);
  *(undefined2 *)((longlong)param_1 + 0x134) = *(undefined2 *)((longlong)param_1 + 0x144);
  *(undefined1 *)(param_1 + 0x10) = 0;
  *(undefined1 *)(param_1 + 0x18) = 0;
  param_1[0x29] = 0;
  uVar5 = (**(code **)(*(longlong *)(param_2 + 0x70) + 0x1c0))();
  param_1[0x30] = uVar5;
  param_1[0x23] = param_2;
  param_1[0x24] = param_3;
  pvVar1 = operator_new(0x90);
  puVar2 = puVar4;
  if (pvVar1 != (void *)0x0) {
    if (param_3 == 0) {
      param_3 = param_2 + 0x90;
    }
    else {
      param_3 = param_3 + 0x10;
    }
    uVar5 = (**(code **)(*(longlong *)(param_2 + 0x88) + 0x18))();
    puVar2 = (undefined8 *)FUN_1401a2f40(pvVar1,uVar5,param_3,param_4,uVar6);
  }
  param_1[0x21] = puVar2;
  puVar3 = operator_new(0x6b8);
  puVar2 = puVar4;
  if (puVar3 != (undefined8 *)0x0) {
    *puVar3 = 0;
    puVar3[3] = 0;
    puVar3[1] = 0;
    puVar3[2] = 100;
    puVar3[0xcf] = Proud::CFastArray<>::vftable;
    puVar3[0xd0] = 0;
    puVar3[0xd1] = 0;
    puVar3[0xd2] = 0;
    puVar3[0xd3] = 0;
    puVar3[0xd4] = Proud::AddrPort::vftable;
    *(undefined4 *)(puVar3 + 0xd5) = 0;
    *(undefined2 *)((longlong)puVar3 + 0x6ac) = 0;
    puVar2 = puVar3;
  }
  param_1[0x22] = puVar2;
  FUN_14019ee10(param_1[0x21]);
  pvVar1 = operator_new(0x60);
  if (pvVar1 != (void *)0x0) {
    if (param_1[0x23] != 0) {
      puVar4 = (undefined8 *)(param_1[0x23] + 0x88);
    }
    puVar4 = (undefined8 *)FUN_1401a30a0(pvVar1,puVar4);
  }
  param_1[0x31] = puVar4;
  return param_1;
}



void FUN_1401e7910(longlong param_1)

{
  FUN_1401e7aa0(param_1 + -0x40);
  return;
}



void FUN_1401e7920(undefined8 *param_1)

{
  void *pvVar1;
  longlong *plVar2;
  longlong lVar3;
  
  *param_1 = Proud::CUdpSocket_C::vftable;
  param_1[8] = Proud::CUdpSocket_C::vftable;
  pvVar1 = (void *)param_1[0x31];
  if (pvVar1 != (void *)0x0) {
    FUN_1401a2ee0((longlong)pvVar1 + 8);
    operator_delete(pvVar1);
  }
  param_1[0x31] = 0;
  pvVar1 = (void *)param_1[0x22];
  if (pvVar1 != (void *)0x0) {
    FUN_1401a01c0(pvVar1);
    operator_delete(pvVar1);
  }
  param_1[0x22] = 0;
  pvVar1 = (void *)param_1[0x21];
  if (pvVar1 != (void *)0x0) {
    FUN_1401a3040(pvVar1);
    operator_delete(pvVar1);
  }
  param_1[0x21] = 0;
  pvVar1 = (void *)param_1[0x31];
  if (pvVar1 != (void *)0x0) {
    FUN_1401a2ee0((longlong)pvVar1 + 8);
    operator_delete(pvVar1);
  }
  pvVar1 = (void *)param_1[0x22];
  if (pvVar1 != (void *)0x0) {
    FUN_1401a01c0(pvVar1);
    operator_delete(pvVar1);
  }
  pvVar1 = (void *)param_1[0x21];
  if (pvVar1 != (void *)0x0) {
    FUN_1401a3040(pvVar1);
    operator_delete(pvVar1);
  }
  if ((param_1[0x20] != 0) &&
     (*(longlong *)(param_1[0x20] + 8) = *(longlong *)(param_1[0x20] + 8) + -1,
     *(longlong *)(param_1[0x20] + 8) == 0)) {
    plVar2 = (longlong *)param_1[0x20];
    lVar3 = *plVar2;
    if (lVar3 != 0) {
      FUN_1401859b0(lVar3);
      FUN_140156970(lVar3);
    }
    FUN_140156970(plVar2);
  }
  param_1[8] = Proud::IHasOverlappedIo::vftable;
  *param_1 = Proud::ICompletionContext::vftable;
  return;
}



void * FUN_1401e7aa0(void *param_1,uint param_2)

{
  FUN_1401e7920();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



undefined8 FUN_1401e7ad0(longlong param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  char cVar4;
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  longlong *local_res8;
  undefined8 local_res18 [2];
  undefined8 uVar8;
  undefined **local_40;
  undefined4 local_38;
  undefined2 local_34;
  
  uVar8 = 0xfffffffffffffffe;
  if (*(longlong *)(param_1 + 0x118) != 0) {
    (**(code **)(*(longlong *)(*(longlong *)(param_1 + 0x118) + 0x78) + 0x10))();
    local_res8 = (longlong *)FUN_140156940(0x400);
    lVar7 = 0;
    lVar5 = lVar7;
    if (local_res8 != (longlong *)0x0) {
      lVar5 = *(longlong *)(param_1 + 0x118) + 0x78;
      if (*(longlong *)(param_1 + 0x118) == 0) {
        lVar5 = lVar7;
      }
      lVar5 = FUN_140185b00(local_res8,1,lVar5,param_4,uVar8);
    }
    if (lVar5 == 0) {
      local_res8 = (longlong *)0x0;
    }
    else {
      local_res8 = (longlong *)FUN_140156940(0x10);
      local_res8[1] = 1;
      *local_res8 = lVar5;
    }
    plVar1 = local_res8;
    FUN_140161a50(param_1 + 0x100,&local_res8);
    plVar3 = local_res8;
    if (plVar1 != (longlong *)0x0) {
      plVar1 = plVar1 + 1;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        lVar5 = *local_res8;
        if (lVar5 != 0) {
          FUN_1401859b0(lVar5);
          FUN_140156970(lVar5);
        }
        FUN_140156970(plVar3);
      }
    }
    lVar5 = lVar7;
    if (*(longlong **)(param_1 + 0x100) != (longlong *)0x0) {
      lVar5 = **(longlong **)(param_1 + 0x100);
    }
    FUN_140184cc0(lVar5,param_1);
    local_40 = Proud::AddrPort::vftable;
    local_38 = *(undefined4 *)(param_2 + 8);
    local_34 = *(undefined2 *)(param_2 + 0xc);
    lVar5 = lVar7;
    if (*(longlong **)(param_1 + 0x100) != (longlong *)0x0) {
      lVar5 = **(longlong **)(param_1 + 0x100);
    }
    cVar4 = FUN_1401871b0(lVar5,&local_40);
    if (cVar4 != '\0') {
      lVar5 = lVar7;
      if (*(longlong **)(param_1 + 0x100) != (longlong *)0x0) {
        lVar5 = **(longlong **)(param_1 + 0x100);
      }
      lVar2 = *(longlong *)(*(longlong *)(param_1 + 0x118) + 0x5d8);
      lVar6 = lVar7;
      if (lVar2 != 0) {
        lVar6 = *(longlong *)(lVar2 + 0x38);
      }
      FUN_14018c430(*(undefined8 *)(lVar6 + 0x2b8),lVar5);
      FUN_1401e71f0(param_1);
      if (*(longlong **)(param_1 + 0x100) != (longlong *)0x0) {
        lVar7 = **(longlong **)(param_1 + 0x100);
      }
      FUN_1401a7b80(lVar7);
      return 1;
    }
    local_res18[0] = 0;
    FUN_140161a50(param_1 + 0x100,local_res18);
  }
  return 0;
}



longlong FUN_1401e7cb0(longlong param_1)

{
  return param_1 + 0x150;
}



void FUN_1401e7cc0(longlong param_1,undefined4 param_2)

{
  FUN_1401f1830(param_1 + 0xf0);
  FUN_1401e9a70(param_1 + 8,param_2);
  return;
}



void FUN_1401e7d00(longlong param_1,undefined8 param_2,int param_3)

{
  FUN_1401aea00(param_1 + 0x38);
  *(int *)(param_1 + 0xb8) = *(int *)(param_1 + 0xb8) + param_3;
  FUN_1401e9610(param_1 + 8,0);
  return;
}



void FUN_1401e7d40(longlong param_1)

{
  FUN_1401f1f40(param_1 + 0xf0);
  return;
}



void FUN_1401e7d50(longlong param_1)

{
  FUN_1401e8dd0(param_1 + 8);
  return;
}



void FUN_1401e7d60(longlong param_1,undefined4 *param_2)

{
  *param_2 = *(undefined4 *)(param_1 + 0x148);
  param_2[1] = *(undefined4 *)(param_1 + 0x188);
  param_2[2] = *(undefined4 *)(param_1 + 400);
  param_2[3] = *(undefined4 *)(param_1 + 0x194);
  param_2[4] = *(undefined4 *)(param_1 + 0x1a8);
  param_2[5] = *(undefined4 *)(param_1 + 0x100);
  param_2[6] = *(undefined4 *)(param_1 + 0x104);
  param_2[7] = *(undefined4 *)(param_1 + 0x70);
  param_2[8] = *(undefined4 *)(param_1 + 0x90);
  param_2[9] = *(undefined4 *)(param_1 + 0xb0);
  param_2[10] = *(undefined4 *)(param_1 + 0xb8);
  param_2[0xb] = *(undefined4 *)(param_1 + 0xbc);
  param_2[0xc] = *(undefined4 *)(param_1 + 0xc0);
  param_2[0xd] = *(undefined4 *)(param_1 + 0xd0);
  param_2[0xe] = *(undefined4 *)(param_1 + 0x34);
  param_2[0x12] = *(undefined4 *)(param_1 + 0x1ac);
  if (*(longlong *)(param_1 + 0x90) == 0) {
    param_2[0xf] = 0;
  }
  else {
    if (*(longlong *)(param_1 + 0x88) == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    param_2[0xf] = *(undefined4 *)(*(longlong *)(param_1 + 0x88) + 0x14);
  }
  if (*(longlong *)(param_1 + 0xb0) != 0) {
    if (*(longlong *)(param_1 + 0xa8) == 0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    param_2[0x10] = *(undefined4 *)(*(longlong *)(param_1 + 0xa8) + 0x14);
    param_2[0x11] = *(undefined4 *)(param_1 + 0xe0);
    return;
  }
  param_2[0x10] = 0;
  param_2[0x11] = *(undefined4 *)(param_1 + 0xe0);
  return;
}



undefined8 * FUN_1401e7e70(undefined8 *param_1,longlong *param_2,undefined4 param_3)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  uVar1 = (**(code **)(*param_2 + 0x38))(param_2);
  FUN_1401e9970(param_1 + 1,param_1,param_3,uVar1,uVar2);
  uVar1 = (**(code **)(*param_2 + 0x38))(param_2);
  FUN_1401f1bf0(param_1 + 0x1e,param_1,param_3,uVar1);
  *param_1 = param_2;
  return param_1;
}



undefined1 FUN_1401e7ef0(longlong param_1)

{
  return *(undefined1 *)(*(longlong *)(param_1 + 0x10) + 0x608);
}



void FUN_1401e7f00(longlong param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(*(longlong *)(param_1 + 0x10) + 0x670);
                    // WARNING: Could not recover jumptable at 0x0001401e7f13. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*(longlong *)(lVar1 + 0x70) + 0x1c0))(lVar1 + 0x70);
  return;
}



undefined8 FUN_1401e7f20(longlong param_1)

{
  undefined8 uVar1;
  
  if (*(char *)(*(longlong *)(param_1 + 0x10) + 0x608) == '\0') {
    uVar1 = FUN_1401e37e0(*(longlong *)(param_1 + 0x10) + 0x668);
    return uVar1;
  }
  return 1;
}



undefined4 FUN_1401e7f40(longlong param_1)

{
  return *(undefined4 *)(*(longlong *)(param_1 + 0x10) + 0x56c);
}



double FUN_1401e7f50(longlong param_1)

{
  double dVar1;
  double dVar2;
  
  dVar1 = *(double *)(*(longlong *)(param_1 + 0x10) + 0x50);
  dVar2 = 0.0;
  if (0.0 < dVar1) {
    dVar2 = dVar1;
  }
  return dVar2;
}



void FUN_1401e7f70(longlong param_1)

{
  FUN_1401e7d50(*(undefined8 *)(param_1 + 8));
  return;
}



void FUN_1401e7f80(longlong param_1)

{
  undefined8 uVar1;
  double dVar2;
  
  uVar1 = *(undefined8 *)(param_1 + 8);
  dVar2 = (double)FUN_1401afda0(*(undefined8 *)(*(longlong *)(param_1 + 0x10) + 0x670));
  FUN_1401e7cc0(uVar1,(float)dVar2);
  return;
}



undefined8 FUN_1401e7fb0(longlong param_1)

{
  return *(undefined8 *)(*(longlong *)(*(longlong *)(param_1 + 0x10) + 0x670) + 0x4e0);
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401e7fd0(longlong param_1,undefined8 param_2)

{
  longlong lVar1;
  undefined8 uVar2;
  undefined1 auStack_e08 [32];
  undefined **local_de8;
  longlong local_de0;
  undefined8 local_dd8;
  undefined8 local_dd0;
  undefined8 local_dc8;
  undefined1 *local_dc0;
  undefined8 local_db8;
  undefined1 local_db0 [72];
  undefined1 local_d68 [8];
  undefined1 local_d60 [8];
  longlong local_d58;
  undefined4 local_d50;
  int local_d4c;
  undefined1 local_d40 [136];
  undefined1 local_cb8 [3200];
  undefined1 *local_38;
  undefined4 local_30;
  int local_2c;
  ulonglong local_28;
  
  local_db8 = 0xfffffffffffffffe;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_e08;
  local_2c = 200;
  local_30 = 0;
  local_38 = local_cb8;
  FUN_1401544a0(local_d68);
  FUN_140154120(local_d68,local_d40,0x80);
  FUN_1401a80b0(param_2,local_cb8,local_d68);
  local_de0 = 0;
  local_dd8 = 0;
  local_dd0 = 0;
  local_dc8 = 0;
  local_de8 = Proud::ByteArray::vftable;
  lVar1 = *(longlong *)(*(longlong *)(*(longlong *)(param_1 + 0x10) + 0x670) + 0x4e0);
  if (lVar1 == 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  local_de0 = lVar1;
  thunk_FUN_140184540(local_cb8,&local_de8);
  uVar2 = local_dd8;
  if ((int)local_dd0 == 0) {
    uVar2 = 0;
  }
  FUN_1401e7d00(*(undefined8 *)(param_1 + 8),uVar2);
  FUN_1401858d0(&local_de8);
  local_dc0 = local_d60;
  FUN_1401560e0(local_d60);
  if (local_d58 != 0) {
    if (local_d4c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_d50 = 0;
  }
  if (local_38 == (undefined1 *)0x0) {
    FUN_140156300(local_db0,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_db0,(ThrowInfo *)&DAT_14031d928);
  }
  if (local_2c < 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1401e8160(longlong param_1,int *param_2)

{
  int iVar1;
  undefined4 uVar2;
  longlong lVar3;
  longlong lVar4;
  int iVar5;
  undefined1 auStack_2808 [32];
  undefined4 *local_27e8;
  undefined8 local_27d8;
  int iStack_27d0;
  undefined4 uStack_27cc;
  undefined4 local_27c8 [2];
  undefined8 local_27c0;
  undefined4 local_27b8;
  undefined4 uStack_27b4;
  undefined4 local_27b0;
  int local_27ac;
  undefined4 local_27a0 [2];
  undefined8 local_2798;
  undefined1 local_2790;
  undefined4 local_278c;
  undefined1 local_2788;
  undefined1 local_2787;
  undefined8 local_2780;
  undefined1 local_2778 [72];
  undefined1 local_2730 [72];
  undefined1 local_26e8 [72];
  undefined1 local_26a0 [3200];
  undefined1 *local_1a20;
  undefined4 local_1a18;
  undefined4 local_1a14;
  undefined1 local_1a08 [8];
  longlong local_1a00;
  longlong local_19f8;
  undefined4 local_19f0;
  int local_19ec;
  undefined1 local_19e0 [136];
  undefined4 local_1958;
  undefined4 uStack_1954;
  undefined4 uStack_1950;
  undefined4 uStack_194c;
  undefined4 *local_cd8;
  undefined4 local_cd0;
  int local_ccc;
  undefined1 local_cc8 [3200];
  undefined1 *local_48;
  int local_40;
  int local_3c;
  ulonglong local_38;
  undefined8 uStack_30;
  
  uStack_30 = 0x1401e817a;
  local_2780 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_2808;
  iVar1 = *param_2;
  uVar2 = DAT_1403285b8;
  if (iVar1 == 1) {
    if (DAT_140322262 != '\0') {
      uVar2 = 1;
    }
  }
  else if ((iVar1 == 2) && (DAT_140322261 != '\0')) {
    uVar2 = 1;
  }
  if (*(char *)(*(longlong *)(param_1 + 0x10) + 0x608) == '\0') {
    local_ccc = 200;
    local_cd0 = 0;
    local_cd8 = &local_1958;
    FUN_1401544a0(local_27c8);
    FUN_140153d90(local_27c8);
    FUN_140154600(local_27c8,0x800);
    FUN_140154600(local_27c8,0);
    FUN_1401aba10(param_2,&local_1958,local_27c8);
    local_2798 = 0;
    local_2790 = 1;
    local_278c = 0xffffffff;
    local_2788 = 1;
    local_2787 = DAT_140320dfc;
    local_27a0[0] = uVar2;
    FUN_1401e36d0(*(longlong *)(param_1 + 0x10) + 0x668,&local_1958,local_27a0);
    local_27d8 = &local_27c0;
    FUN_1401560e0(&local_27c0);
    if (CONCAT44(uStack_27b4,local_27b8) != 0) {
      if (local_27ac < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      local_27b0 = 0;
    }
    if (local_cd8 == (undefined4 *)0x0) {
      FUN_140156300(local_2778,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_2778,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_ccc < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  else if (iVar1 == 1) {
    FUN_1401544a0(local_1a08);
    FUN_140154120(local_1a08,local_19e0,0x80);
    FUN_14004fd90(local_1a08,0x16);
    FUN_14004fe70(local_1a08,*(undefined4 *)(*(longlong *)(param_1 + 0x10) + 0x56c));
    FUN_14004fe70(local_1a08,param_2[1]);
    FUN_140153c60(local_27a0,local_1a08);
    if (*(longlong *)(param_2 + 2) == 0) {
      if (*(longlong *)(param_2 + 4) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      iVar1 = param_2[6];
    }
    else {
      iVar1 = *(int *)(*(longlong *)(param_2 + 2) + 0x18);
    }
    FUN_140155b20(local_1a08,(longlong)iVar1);
    local_3c = 200;
    lVar4 = 0;
    local_40 = 0;
    local_48 = local_cc8;
    local_ccc = 200;
    local_cd0 = 0;
    local_cd8 = &local_1958;
    if (local_1a00 == 0) {
      if (local_19f8 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
    }
    else {
      local_19f0 = *(undefined4 *)(local_1a00 + 0x18);
    }
    lVar3 = local_19f8;
    if (local_19f8 == 0) {
      if (local_1a00 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      lVar3 = lVar4;
      if (*(int *)(local_1a00 + 0x18) != 0) {
        lVar3 = *(longlong *)(local_1a00 + 0x10);
      }
    }
    local_cd0 = 1;
    local_27d8._0_4_ = (undefined4)lVar3;
    local_27d8._4_4_ = (undefined4)((ulonglong)lVar3 >> 0x20);
    local_1958 = (undefined4)local_27d8;
    uStack_1954 = local_27d8._4_4_;
    uStack_194c = uStack_27cc;
    local_27d8 = (longlong *)lVar3;
    iStack_27d0 = local_19f0;
    uStack_1950 = local_19f0;
    FUN_140156ed0(local_cc8,&local_1958);
    if (local_cd8 == (undefined4 *)0x0) {
      FUN_140156300(local_2778,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_2778,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_ccc < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_cd0 = 0;
    lVar3 = *(longlong *)(param_2 + 2);
    if (lVar3 == 0) {
      if (*(longlong *)(param_2 + 4) == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      iVar1 = param_2[6];
    }
    else {
      iVar1 = *(int *)(lVar3 + 0x18);
    }
    if (*(longlong *)(param_2 + 4) == 0) {
      if (lVar3 == 0) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(int *)(lVar3 + 0x18) != 0) {
        lVar4 = *(longlong *)(lVar3 + 0x10);
      }
    }
    else {
      lVar4 = *(longlong *)(param_2 + 4);
      if (lVar4 == 0) {
        FUN_140156300(local_26e8,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
        _CxxThrowException(local_26e8,(ThrowInfo *)&DAT_14031d928);
      }
    }
    iStack_27d0 = iVar1;
    if (local_48 == (undefined1 *)0x0) {
      FUN_140156300(local_2730,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_2730,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_40 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    iVar5 = local_40 + 1;
    if ((iVar5 < 0) || (local_3c < iVar5)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    *(longlong *)(local_48 + (longlong)local_40 * 0x10) = lVar4;
    *(ulonglong *)(local_48 + (longlong)local_40 * 0x10 + 8) = CONCAT44(uStack_27cc,iVar1);
    local_27d8 = (longlong *)local_26a0;
    local_1a14 = 200;
    local_1a18 = 0;
    local_1a20 = local_26a0;
    local_40 = iVar5;
    FUN_140184470(&local_48,&local_1a20);
    local_27c8[0] = DAT_1403285b8;
    local_27c0 = DAT_1403285b0;
    local_27b8 = CONCAT31(local_27b8._1_3_,DAT_1403285c0);
    uStack_27b4 = 0xffffffff;
    local_27b0._0_2_ = CONCAT11(DAT_140320dfc,DAT_1403285e0);
    uVar2 = (**(code **)(**(longlong **)(param_1 + 0x10) + 8))();
    local_27e8 = local_27c8;
    FUN_1401b0fa0(*(undefined8 *)(*(longlong *)(param_1 + 0x10) + 0x670),uVar2,1,local_26a0);
    if (local_48 == (undefined1 *)0x0) {
      FUN_140156300(local_2730,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_2730,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_3c < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_40 = 0;
    FUN_140153c80(local_27a0);
    local_27d8 = &local_1a00;
    FUN_1401560e0(&local_1a00);
    if ((local_19f8 != 0) && (local_19ec < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  return;
}



void FUN_1401e86d0(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  int iVar2;
  
  FUN_140190d90(param_3,0);
  FUN_1401e7d40(*(undefined8 *)(param_1 + 8),param_2);
  uVar1 = FUN_1401e7cb0(*(undefined8 *)(param_1 + 8));
  iVar2 = FUN_1401a8ac0(uVar1,param_3,*(undefined4 *)(*(longlong *)(param_1 + 0x10) + 0x56c),
                        *(undefined4 *)
                         (*(longlong *)(*(longlong *)(param_1 + 0x10) + 0x670) + 0x6a4),param_4);
  if (iVar2 < 0) {
    *(undefined1 *)(param_1 + 0x18) = 1;
  }
  return;
}



undefined8 FUN_1401e8760(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  longlong *plVar2;
  longlong *plVar3;
  char cVar4;
  int iVar5;
  undefined8 uVar6;
  longlong *plVar7;
  longlong lVar8;
  ulonglong uVar9;
  longlong *plVar10;
  longlong *plVar11;
  longlong *local_res8;
  undefined8 local_d8;
  longlong local_d0;
  longlong *local_c8;
  undefined8 local_c0;
  longlong *local_b8;
  longlong *local_b0;
  undefined4 local_a8;
  undefined4 local_a4;
  longlong *local_a0;
  longlong *local_98;
  undefined8 local_90;
  undefined1 local_88 [80];
  
  local_90 = 0xfffffffffffffffe;
  local_b0 = (longlong *)(**(code **)(*param_1 + 0x38))();
  plVar11 = (longlong *)0x0;
  local_c0 = 0;
  local_c8 = (longlong *)0x0;
  local_d0 = 0;
  local_b8 = (longlong *)0x0;
  local_d8 = 0;
  local_a4 = 0;
  cVar4 = FUN_140154c00(param_2,&local_d8);
  if (cVar4 == '\0') {
    if (local_b8 != (longlong *)0x0) {
      plVar11 = local_b8 + 1;
      *plVar11 = *plVar11 + -1;
      if (*plVar11 == 0) {
        FUN_140161ae0(&local_b8,local_b8);
      }
    }
    local_res8 = &local_d0;
    FUN_1401560e0(&local_d0);
    if ((local_c8 != (longlong *)0x0) && (local_c0 < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  else {
    if ((int)local_d8 != 1) {
      if ((int)local_d8 == 2) {
        uVar6 = (**(code **)(*(longlong *)(*(longlong *)(param_1[2] + 0x670) + 0x88) + 0x18))();
        plVar7 = (longlong *)FUN_14016b910(&local_a0,uVar6);
        plVar3 = local_b0;
        plVar2 = local_b8;
        plVar10 = (longlong *)*plVar7;
        if (plVar10 != (longlong *)0x0) {
          plVar10[1] = plVar10[1] + 1;
          plVar11 = plVar10;
        }
        if (local_b8 != (longlong *)0x0) {
          plVar10 = local_b8 + 1;
          *plVar10 = *plVar10 + -1;
          if (*plVar10 == 0) {
            puVar1 = (undefined8 *)*local_b8;
            *puVar1 = Proud::CFastArray<>::vftable;
            if (puVar1[2] != 0) {
              if ((longlong *)puVar1[1] == (longlong *)0x0) {
                FUN_140156970(puVar1[2]);
              }
              else {
                (**(code **)(*(longlong *)puVar1[1] + 0x18))();
              }
            }
            (**(code **)(*plVar3 + 0x18))(plVar3,puVar1);
            (**(code **)(*local_b0 + 0x18))(local_b0,plVar2);
          }
        }
        plVar10 = local_98;
        local_b0 = (longlong *)plVar7[1];
        local_b8 = plVar11;
        if (local_a0 != (longlong *)0x0) {
          plVar11 = local_a0 + 1;
          *plVar11 = *plVar11 + -1;
          if (*plVar11 == 0) {
            puVar1 = (undefined8 *)*local_a0;
            *puVar1 = Proud::CFastArray<>::vftable;
            if (puVar1[2] != 0) {
              if ((longlong *)puVar1[1] == (longlong *)0x0) {
                FUN_140156970(puVar1[2]);
              }
              else {
                (**(code **)(*(longlong *)puVar1[1] + 0x18))();
              }
            }
            (**(code **)(*plVar10 + 0x18))(plVar10,puVar1);
            (**(code **)(*local_98 + 0x18))(local_98,local_a0);
          }
        }
        if (local_b8 == (longlong *)0x0) {
          lVar8 = 0;
        }
        else {
          lVar8 = *local_b8;
        }
        cVar4 = FUN_1401abe40(lVar8,param_2);
        if (cVar4 == '\0') {
          if (local_b8 != (longlong *)0x0) {
            plVar11 = local_b8 + 1;
            *plVar11 = *plVar11 + -1;
            if (*plVar11 == 0) {
              FUN_140161ae0(&local_b8,local_b8);
            }
          }
          local_res8 = &local_d0;
          FUN_1401560e0(&local_d0);
          if (local_c8 == (longlong *)0x0) {
            return 0;
          }
          if (-1 < local_c0) {
            return 0;
          }
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        cVar4 = FUN_1401543d0(param_2,&local_res8,4);
        if (cVar4 == '\0') {
          local_a4 = 0;
          if (local_b8 != (longlong *)0x0) {
            plVar11 = local_b8 + 1;
            *plVar11 = *plVar11 + -1;
            if (*plVar11 == 0) {
              FUN_140161ae0(&local_b8,local_b8);
            }
          }
          local_res8 = &local_d0;
          FUN_1401560e0(&local_d0);
          if (local_c8 == (longlong *)0x0) {
            return 0;
          }
          if (-1 < local_c0) {
            return 0;
          }
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_a4 = local_res8._0_4_;
        cVar4 = FUN_1401543d0(param_2,&local_res8,4);
        if (cVar4 == '\0') {
          if (local_b8 != (longlong *)0x0) {
            plVar11 = local_b8 + 1;
            *plVar11 = *plVar11 + -1;
            if (*plVar11 == 0) {
              FUN_140161ae0(&local_b8,local_b8);
            }
          }
          local_res8 = &local_d0;
          FUN_1401560e0(&local_d0);
          if (local_c8 == (longlong *)0x0) {
            return 0;
          }
          if (-1 < local_c0) {
            return 0;
          }
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_a8 = local_res8._0_4_;
      }
LAB_1401e8b71:
      FUN_140190d90(param_3,0);
      FUN_1401e7d40(param_1[1],&local_d8);
      uVar6 = FUN_1401e7cb0(param_1[1]);
      iVar5 = FUN_1401a8ac0(uVar6,param_3,*(undefined4 *)(param_1[2] + 0x56c),
                            *(undefined4 *)(*(longlong *)(param_1[2] + 0x670) + 0x6a4),param_4);
      if (iVar5 < 0) {
        *(undefined1 *)(param_1 + 3) = 1;
      }
      if (local_b8 != (longlong *)0x0) {
        plVar11 = local_b8 + 1;
        *plVar11 = *plVar11 + -1;
        if (*plVar11 == 0) {
          FUN_140161ae0(&local_b8,local_b8);
        }
      }
      local_res8 = &local_d0;
      FUN_1401560e0(&local_d0);
      if ((local_c8 != (longlong *)0x0) && (local_c0 < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      return 1;
    }
    cVar4 = FUN_1401543d0(param_2,&local_res8,4);
    if (cVar4 == '\0') {
      local_d8 = local_d8 & 0xffffffff;
      if (local_b8 != (longlong *)0x0) {
        plVar11 = local_b8 + 1;
        *plVar11 = *plVar11 + -1;
        if (*plVar11 == 0) {
          FUN_140161ae0(&local_b8,local_b8);
        }
      }
      local_res8 = &local_d0;
      FUN_1401560e0(&local_d0);
      if (local_c8 == (longlong *)0x0) {
        return 0;
      }
      if (-1 < local_c0) {
        return 0;
      }
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    local_d8 = CONCAT44(local_res8._0_4_,(int)local_d8);
    if (local_c8 != (longlong *)0x0) {
      FUN_140156300(local_88,PTR_u_Cannot_use_internal_buffer_becau_140320030);
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_88,(ThrowInfo *)&DAT_14031d928);
    }
    if (local_d0 == 0) {
      local_d0 = FUN_140156120();
      *(undefined8 *)(local_d0 + 0x28) = 1;
    }
    cVar4 = FUN_140154a70(param_2,&local_res8);
    if (((cVar4 != '\0') && (iVar5 = (int)local_res8, -1 < iVar5)) && (iVar5 <= DAT_140320d70)) {
      if (local_c8 == (longlong *)0x0) {
        if (iVar5 < 1) {
          if (local_d0 == 0) goto LAB_1401e8c10;
          uVar9 = 0;
        }
        else {
          if (local_d0 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0();
          }
          uVar9 = (ulonglong)local_res8 & 0xffffffff;
        }
        FUN_140050060(local_d0,uVar9);
      }
      else {
        if (local_c0._4_4_ < iVar5) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_c0 = CONCAT44(local_c0._4_4_,iVar5);
      }
      plVar10 = local_c8;
      if (local_c8 == (longlong *)0x0) {
        if (local_d0 == 0) {
LAB_1401e8c10:
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        plVar10 = plVar11;
        if (*(int *)(local_d0 + 0x18) != 0) {
          plVar10 = *(longlong **)(local_d0 + 0x10);
        }
      }
      cVar4 = FUN_1401543d0(param_2,plVar10,(ulonglong)local_res8 & 0xffffffff);
      if (cVar4 != '\0') goto LAB_1401e8b71;
    }
    if (local_b8 != (longlong *)0x0) {
      plVar11 = local_b8 + 1;
      *plVar11 = *plVar11 + -1;
      if (*plVar11 == 0) {
        FUN_140161ae0(&local_b8,local_b8);
      }
    }
    local_res8 = &local_d0;
    FUN_1401560e0(&local_d0);
    if ((local_c8 != (longlong *)0x0) && (local_c0 < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
  }
  return 0;
}



undefined8 * FUN_1401e8cc0(undefined8 *param_1,undefined8 param_2)

{
  *param_1 = Proud::CRemotePeerReliableUdp::vftable;
  param_1[1] = 0;
  *(undefined1 *)(param_1 + 3) = 0;
  param_1[2] = param_2;
  return param_1;
}



void FUN_1401e8ce0(longlong param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  pvVar1 = *(void **)(param_1 + 8);
  if (pvVar1 != (void *)0x0) {
    FUN_1401e6b00(pvVar1);
    operator_delete(pvVar1);
  }
  *(undefined8 *)(param_1 + 8) = 0;
  pvVar1 = operator_new(0x1b0);
  if (pvVar1 == (void *)0x0) {
    *(undefined8 *)(param_1 + 8) = 0;
  }
  else {
    uVar2 = FUN_1401e7e70(pvVar1,param_1,param_2,param_4,uVar2);
    *(undefined8 *)(param_1 + 8) = uVar2;
  }
  return;
}



undefined8 * FUN_1401e8d60(undefined8 *param_1,uint param_2)

{
  void *pvVar1;
  
  pvVar1 = (void *)param_1[1];
  if (pvVar1 != (void *)0x0) {
    FUN_1401e6b00(pvVar1);
    operator_delete(pvVar1);
  }
  *param_1 = Proud::IReliableUdpHostDelegate::vftable;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401e8dd0(longlong param_1)

{
  *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;
  return;
}



void FUN_1401e8de0(undefined8 *param_1,int *param_2)

{
  (**(code **)(**(longlong **)*param_1 + 8))();
  if (*param_2 == 1) {
    *(int *)((longlong)param_1 + 0xbc) = *(int *)((longlong)param_1 + 0xbc) + 1;
    param_1[3] = 0;
  }
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401e8e20(undefined8 *param_1)

{
  double dVar1;
  int iVar2;
  double dVar3;
  
  dVar3 = (double)(**(code **)(**(longlong **)*param_1 + 0x18))();
  if ((double)param_1[0x18] == 0.0) {
    param_1[0x18] = dVar3;
  }
  dVar1 = (double)param_1[0x18];
  if (_DAT_1403222a8 < dVar3 - dVar1) {
    iVar2 = *(int *)((longlong)param_1 + 0xbc);
    param_1[0x18] = dVar3;
    *(undefined4 *)((longlong)param_1 + 0xbc) = 0;
    *(int *)(param_1 + 0x19) =
         (int)(((double)iVar2 - (double)*(int *)(param_1 + 0x19)) * (0.1 / (dVar3 - dVar1)) +
              (double)*(int *)(param_1 + 0x19));
  }
  return;
}



undefined4 * FUN_1401e8ec0(undefined4 *param_1,undefined4 *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  
  *param_1 = *param_2;
  param_1[1] = param_2[1];
  *(undefined8 *)(param_1 + 6) = 0;
  *(undefined8 *)(param_1 + 4) = 0;
  if (*(longlong *)(param_2 + 2) == 0) {
    *(undefined8 *)(param_1 + 2) = 0;
    param_1[7] = param_2[7];
    *(undefined8 *)(param_1 + 4) = *(undefined8 *)(param_2 + 4);
    param_1[6] = param_2[6];
  }
  else {
    plVar1 = (longlong *)(*(longlong *)(param_2 + 2) + 0x28);
    *plVar1 = *plVar1 + 1;
    *(undefined8 *)(param_1 + 2) = *(undefined8 *)(param_2 + 2);
  }
  *(undefined8 *)(param_1 + 10) = *(undefined8 *)(param_2 + 10);
  lVar2 = *(longlong *)(param_2 + 8);
  if (lVar2 != 0) {
    *(longlong *)(lVar2 + 8) = *(longlong *)(lVar2 + 8) + 1;
    *(longlong *)(param_1 + 8) = lVar2;
    param_1[0xc] = param_2[0xc];
    param_1[0xd] = param_2[0xd];
    return param_1;
  }
  *(undefined8 *)(param_1 + 8) = 0;
  param_1[0xc] = param_2[0xc];
  param_1[0xd] = param_2[0xd];
  return param_1;
}



longlong FUN_1401e8f50(longlong param_1,longlong *param_2)

{
  longlong lVar1;
  
  if (param_2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  lVar1 = *param_2;
  if (param_2 == *(longlong **)(param_1 + 8)) {
    *(longlong *)(param_1 + 8) = lVar1;
  }
  else {
    *(longlong *)param_2[1] = lVar1;
  }
  if (param_2 == *(longlong **)(param_1 + 0x10)) {
    *(longlong *)(param_1 + 0x10) = param_2[1];
  }
  else {
    *(longlong *)(*param_2 + 8) = param_2[1];
  }
  FUN_1401e68a0(param_1,param_2);
  return lVar1;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401e8fc0(undefined8 *param_1,double param_2)

{
  longlong *plVar1;
  bool bVar2;
  char cVar3;
  longlong *plVar4;
  int iVar5;
  double dVar6;
  double dVar7;
  double dVar8;
  
  dVar6 = (double)(**(code **)(**(longlong **)*param_1 + 0x18))();
  (**(code **)(**(longlong **)*param_1 + 0x30))();
  dVar7 = (double)(longlong)param_1[0x15];
  if ((longlong)param_1[0x15] < 0) {
    dVar7 = dVar7 + 1.8446744073709552e+19;
  }
  dVar8 = dVar7 * _DAT_1403222c0;
  if (dVar7 * _DAT_1403222c0 <= (double)DAT_1403222c8) {
    dVar8 = (double)DAT_1403222c8;
  }
  if ((double)DAT_1403222cc <= dVar8) {
    dVar8 = (double)DAT_1403222cc;
  }
  dVar8 = dVar8 * param_2;
  if (DAT_140320c88 * 5.0 < param_2) {
    dVar8 = dVar8 / (param_2 / DAT_140320c88);
  }
  iVar5 = (int)dVar8;
  if ((int)dVar8 < 1) {
    iVar5 = 1;
  }
  cVar3 = (**(code **)(**(longlong **)*param_1 + 0x10))();
  plVar1 = (longlong *)param_1[0x13];
joined_r0x0001401e9099:
  if ((plVar1 == (longlong *)0x0) || (iVar5 < 1)) {
    return;
  }
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_14004ea80(0x80004005);
  }
  bVar2 = false;
  plVar4 = plVar1;
  if ((double)plVar1[10] <= dVar6 - (double)plVar1[9] &&
      dVar6 - (double)plVar1[9] != (double)plVar1[10]) goto code_r0x0001401e90dd;
  goto LAB_1401e91af;
code_r0x0001401e90dd:
  if (0.0 < (double)plVar1[0xb]) {
    dVar8 = dVar6 - (double)plVar1[0xb];
    dVar7 = (double)param_1[0x1a];
    if ((double)param_1[0x1a] <= dVar8) {
      dVar7 = dVar8;
    }
    param_1[0x1a] = dVar7;
  }
  dVar7 = DAT_140322280 * (double)plVar1[10];
  plVar1[10] = (longlong)dVar7;
  if (DAT_140322270 <= dVar7) {
    dVar7 = DAT_140322270;
  }
  *(int *)(plVar1 + 0xc) = (int)plVar1[0xc] + 1;
  plVar1[10] = (longlong)dVar7;
  plVar1[9] = (longlong)dVar6;
  *(int *)((longlong)param_1 + 0xb4) = *(int *)((longlong)param_1 + 0xb4) + 1;
  (**(code **)(**(longlong **)*param_1 + 8))(*(longlong **)*param_1,plVar1 + 2);
  if ((int)plVar1[2] == 1) {
    *(int *)((longlong)param_1 + 0xbc) = *(int *)((longlong)param_1 + 0xbc) + 1;
    param_1[3] = 0;
  }
  if (cVar3 != '\0') {
    plVar4 = (longlong *)*plVar1;
    if (plVar1 == (longlong *)param_1[0x13]) {
      param_1[0x13] = plVar4;
    }
    else {
      *(longlong **)plVar1[1] = plVar4;
    }
    if (plVar1 == (longlong *)param_1[0x14]) {
      param_1[0x14] = plVar1[1];
    }
    else {
      *(longlong *)(*plVar1 + 8) = plVar1[1];
    }
    FUN_1401e68a0(param_1 + 0x12,plVar1);
    bVar2 = true;
  }
  iVar5 = iVar5 + -1;
  plVar1 = plVar4;
  if (!bVar2) {
LAB_1401e91af:
    if (plVar4 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    plVar1 = (longlong *)*plVar4;
  }
  goto joined_r0x0001401e9099;
}



undefined8 FUN_1401e9200(longlong param_1,int param_2)

{
  undefined8 *puVar1;
  
  puVar1 = *(undefined8 **)(param_1 + 0x98);
  while( true ) {
    if (puVar1 == (undefined8 *)0x0) {
      return 0;
    }
    if (*(int *)((longlong)puVar1 + 0x14) == param_2) break;
    puVar1 = (undefined8 *)*puVar1;
  }
  FUN_1401e8f50(param_1 + 0x90);
  return 1;
}



void FUN_1401e9240(longlong param_1,int param_2)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong *plVar3;
  
  plVar2 = *(longlong **)(param_1 + 0x98);
  if (plVar2 != (longlong *)0x0) {
    if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      FUN_14004ea80(0x80004005);
    }
    do {
      if ((*(int *)((longlong)plVar2 + 0x14) == param_2) ||
         ((uint)(*(int *)((longlong)plVar2 + 0x14) - param_2) < 0x80000000)) {
        plVar3 = (longlong *)*plVar2;
      }
      else {
        plVar3 = (longlong *)*plVar2;
        if (plVar2 == *(longlong **)(param_1 + 0x98)) {
          *(longlong **)(param_1 + 0x98) = plVar3;
        }
        else {
          *(longlong **)plVar2[1] = plVar3;
        }
        if (plVar2 == *(longlong **)(param_1 + 0xa0)) {
          *(longlong *)(param_1 + 0xa0) = plVar2[1];
        }
        else {
          *(longlong *)(*plVar2 + 8) = plVar2[1];
        }
        if (plVar2[6] != 0) {
          plVar1 = (longlong *)(plVar2[6] + 8);
          *plVar1 = *plVar1 + -1;
          if (*plVar1 == 0) {
            FUN_140161ae0(plVar2 + 6,plVar2[6]);
          }
        }
        FUN_1401560e0(plVar2 + 3);
        if (plVar2[4] != 0) {
          if (*(int *)((longlong)plVar2 + 0x2c) < 0) {
                    // WARNING: Subroutine does not return
            FUN_1401566b0();
          }
          *(undefined4 *)(plVar2 + 5) = 0;
        }
        plVar1 = *(longlong **)(param_1 + 0x90);
        if (plVar1 == (longlong *)0x0) {
          FUN_140156970(plVar2);
          *(longlong *)(param_1 + 0xa8) = *(longlong *)(param_1 + 0xa8) + -1;
        }
        else {
          (**(code **)(*plVar1 + 0x10))(plVar1,plVar2);
          *(longlong *)(param_1 + 0xa8) = *(longlong *)(param_1 + 0xa8) + -1;
        }
      }
      plVar2 = plVar3;
    } while (plVar3 != (longlong *)0x0);
  }
  return;
}



void FUN_1401e9370(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  undefined8 uVar3;
  longlong *plVar4;
  char cVar5;
  undefined8 *puVar6;
  longlong lVar7;
  double dVar8;
  double dVar9;
  
  lVar7 = (**(code **)(**(longlong **)*param_1 + 0x18))();
  dVar8 = (double)(**(code **)(**(longlong **)*param_1 + 0x30))();
  cVar5 = (**(code **)(**(longlong **)*param_1 + 0x10))();
  plVar4 = (longlong *)param_1[0xf];
  while( true ) {
    if (plVar4 == (longlong *)0x0) {
      return;
    }
    if (plVar4 == (longlong *)0x0) break;
    plVar4[9] = lVar7;
    plVar4[0xb] = lVar7;
    if (dVar8 * 2.0 <= 0.0) {
      plVar4[10] = DAT_140322268;
    }
    else {
      plVar4[10] = (longlong)(dVar8 * 2.0);
    }
    dVar9 = (double)plVar4[10];
    if ((double)plVar4[10] <= DAT_140322278) {
      dVar9 = DAT_140322278;
    }
    plVar4[10] = (longlong)dVar9;
    if (DAT_140322270 <= dVar9) {
      dVar9 = DAT_140322270;
    }
    plVar4[10] = (longlong)dVar9;
    *(int *)(param_1 + 0x17) = *(int *)(param_1 + 0x17) + 1;
    (**(code **)(**(longlong **)*param_1 + 8))(*(longlong **)*param_1,plVar4 + 2);
    if ((int)plVar4[2] == 1) {
      *(int *)((longlong)param_1 + 0xbc) = *(int *)((longlong)param_1 + 0xbc) + 1;
      param_1[3] = 0;
    }
    if (cVar5 == '\0') {
      plVar2 = (longlong *)param_1[0x12];
      uVar3 = param_1[0x14];
      if (plVar2 == (longlong *)0x0) {
        puVar6 = (undefined8 *)FUN_140156940(0x68);
      }
      else {
        puVar6 = (undefined8 *)(**(code **)(*plVar2 + 8))(plVar2,0x68);
      }
      if (puVar6 != (undefined8 *)0x0) {
        FUN_1401e8ec0(puVar6 + 2,plVar4 + 2);
        puVar6[9] = plVar4[9];
        puVar6[10] = plVar4[10];
        puVar6[0xb] = plVar4[0xb];
        *(int *)(puVar6 + 0xc) = (int)plVar4[0xc];
      }
      puVar6[1] = uVar3;
      *puVar6 = 0;
      param_1[0x15] = param_1[0x15] + 1;
      if ((undefined8 *)param_1[0x14] == (undefined8 *)0x0) {
        param_1[0x13] = puVar6;
      }
      else {
        *(undefined8 *)param_1[0x14] = puVar6;
      }
      param_1[0x14] = puVar6;
    }
    plVar2 = (longlong *)*plVar4;
    if (plVar4 == (longlong *)param_1[0xf]) {
      param_1[0xf] = plVar2;
    }
    else {
      *(longlong **)plVar4[1] = plVar2;
    }
    if (plVar4 == (longlong *)param_1[0x10]) {
      param_1[0x10] = plVar4[1];
    }
    else {
      *(longlong *)(*plVar4 + 8) = plVar4[1];
    }
    if (plVar4[6] != 0) {
      plVar1 = (longlong *)(plVar4[6] + 8);
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        FUN_140161ae0(plVar4 + 6,plVar4[6]);
      }
    }
    FUN_1401560e0(plVar4 + 3);
    if (plVar4[4] != 0) {
      if (*(int *)((longlong)plVar4 + 0x2c) < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      *(undefined4 *)(plVar4 + 5) = 0;
    }
    plVar1 = (longlong *)param_1[0xe];
    if (plVar1 == (longlong *)0x0) {
      FUN_140156970(plVar4);
    }
    else {
      (**(code **)(*plVar1 + 0x10))(plVar1,plVar4);
    }
    param_1[0x11] = param_1[0x11] + -1;
    plVar4 = plVar2;
  }
                    // WARNING: Subroutine does not return
  FUN_14004ea80(0x80004005);
}



void FUN_1401e9610(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  longlong *plVar2;
  int iVar3;
  undefined8 *puVar4;
  longlong lVar5;
  uint uVar6;
  undefined8 *puVar7;
  uint uVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  undefined8 *puVar11;
  double dVar12;
  longlong local_80;
  undefined8 *local_78;
  undefined8 local_70;
  undefined8 *local_68;
  undefined8 local_60;
  undefined4 local_58;
  undefined4 local_54;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined4 local_38;
  
  dVar12 = (double)(**(code **)(**(longlong **)*param_1 + 0x18))
                             (*(longlong **)*param_1,param_2,param_3,param_4,0xfffffffffffffffe);
  if (((((char)param_2 != '\0') ||
       (iVar3 = (**(code **)(**(longlong **)*param_1 + 0x20))(), iVar3 == 0)) ||
      (DAT_1403222b8 < dVar12 - (double)param_1[4])) &&
     (param_1[4] = dVar12, 0 < (longlong)param_1[0xd])) {
    puVar11 = (undefined8 *)0x0;
    do {
      local_60 = (**(code **)(**(longlong **)*param_1 + 0x38))();
      local_70 = 0;
      local_78 = (undefined8 *)0x0;
      local_80 = 0;
      local_68 = (undefined8 *)0x0;
      local_54 = 0;
      local_40 = 0;
      local_50 = 0;
      local_48 = 0;
      local_38 = 0;
      iVar3 = *(int *)(param_1 + 1);
      *(int *)(param_1 + 1) = iVar3 + 1;
      uVar8 = DAT_14032e668;
      if ((int)(uint)param_1[0xd] <= (int)DAT_14032e668) {
        uVar8 = (uint)param_1[0xd];
      }
      local_80 = FUN_140156120();
      *(undefined8 *)(local_80 + 0x28) = 1;
      if ((int)uVar8 < 0) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      if (local_78 == (undefined8 *)0x0) {
        if ((int)uVar8 < 1) {
          if (local_80 == 0) goto LAB_1401e974b;
          uVar6 = 0;
        }
        else {
          uVar6 = uVar8;
          if (local_80 == 0) {
                    // WARNING: Subroutine does not return
            FUN_1401561e0();
          }
        }
        FUN_140050060(local_80,uVar6);
      }
      else {
        if (local_70._4_4_ < (int)uVar8) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        local_70 = CONCAT44(local_70._4_4_,uVar8);
      }
LAB_1401e974b:
      puVar7 = puVar11;
      if (*(int *)(param_1 + 10) != 0) {
        puVar7 = (undefined8 *)param_1[9];
      }
      puVar7 = (undefined8 *)((longlong)puVar7 + param_1[0xc]);
      puVar4 = local_78;
      if (local_78 == (undefined8 *)0x0) {
        if (local_80 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        puVar4 = puVar11;
        if (*(int *)(local_80 + 0x18) != 0) {
          puVar4 = *(undefined8 **)(local_80 + 0x10);
        }
      }
      uVar9 = (ulonglong)(int)uVar8;
      if (uVar9 < 0x21) {
        uVar10 = (ulonglong)(uVar8 & 7);
        for (uVar9 = uVar9 >> 3; uVar9 != 0; uVar9 = uVar9 - 1) {
          *puVar4 = *puVar7;
          puVar4 = puVar4 + 1;
          puVar7 = puVar7 + 1;
        }
        if (uVar10 != 0) {
          lVar5 = (longlong)puVar4 - (longlong)puVar7;
          do {
            *(undefined1 *)(lVar5 + (longlong)puVar7) = *(undefined1 *)puVar7;
            puVar7 = (undefined8 *)((longlong)puVar7 + 1);
            uVar10 = uVar10 - 1;
          } while (uVar10 != 0);
        }
      }
      else {
        memcpy(puVar4,puVar7,uVar9);
      }
      uVar1 = param_1[0x10];
      plVar2 = (longlong *)param_1[0xe];
      if (plVar2 == (longlong *)0x0) {
        puVar7 = (undefined8 *)FUN_140156940(0x68);
      }
      else {
        puVar7 = (undefined8 *)(**(code **)(*plVar2 + 8))(plVar2,0x68);
      }
      if (puVar7 != (undefined8 *)0x0) {
        *(undefined4 *)(puVar7 + 2) = 1;
        *(int *)((longlong)puVar7 + 0x14) = iVar3;
        puVar7[5] = 0;
        puVar7[4] = 0;
        if (local_80 == 0) {
          puVar7[3] = 0;
          *(int *)((longlong)puVar7 + 0x2c) = local_70._4_4_;
          puVar7[4] = local_78;
          *(undefined4 *)(puVar7 + 5) = (undefined4)local_70;
        }
        else {
          *(longlong *)(local_80 + 0x28) = *(longlong *)(local_80 + 0x28) + 1;
          puVar7[3] = local_80;
        }
        puVar7[7] = local_60;
        puVar4 = puVar11;
        if (local_68 != (undefined8 *)0x0) {
          local_68[1] = local_68[1] + 1;
          puVar4 = local_68;
        }
        puVar7[6] = puVar4;
        *(undefined4 *)(puVar7 + 8) = local_58;
        *(undefined4 *)((longlong)puVar7 + 0x44) = local_54;
        puVar7[9] = local_50;
        puVar7[10] = local_48;
        puVar7[0xb] = local_40;
        *(undefined4 *)(puVar7 + 0xc) = local_38;
      }
      puVar7[1] = uVar1;
      *puVar7 = 0;
      param_1[0x11] = param_1[0x11] + 1;
      if ((undefined8 *)param_1[0x10] == (undefined8 *)0x0) {
        param_1[0xf] = puVar7;
      }
      else {
        *(undefined8 *)param_1[0x10] = puVar7;
      }
      param_1[0x10] = puVar7;
      FUN_1401aebf0(param_1 + 6);
      if (local_68 != (undefined8 *)0x0) {
        plVar2 = local_68 + 1;
        *plVar2 = *plVar2 + -1;
        if (*plVar2 == 0) {
          FUN_140161ae0(&local_68);
        }
      }
      FUN_1401560e0(&local_80);
      if ((local_78 != (undefined8 *)0x0) && (local_70 < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
    } while (0 < (longlong)param_1[0xd]);
  }
  return;
}



undefined8 *
FUN_1401e9970(undefined8 *param_1,undefined8 param_2,undefined4 param_3,undefined8 param_4)

{
  FUN_1401ae900(param_1 + 6,(longlong)DAT_140320d1c,param_3,param_4,0xfffffffffffffffe);
  param_1[0xe] = 0;
  param_1[0x11] = 0;
  param_1[0xf] = 0;
  param_1[0x10] = 0;
  FUN_1401f0c30();
  param_1[0x12] = 0;
  param_1[0x15] = 0;
  param_1[0x13] = 0;
  param_1[0x14] = 0;
  FUN_1401f0c30();
  param_1[4] = 0;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[0x16] = 0;
  *(undefined4 *)(param_1 + 0x17) = 0;
  *(undefined4 *)((longlong)param_1 + 0xbc) = DAT_140322294;
  param_1[0x18] = 0;
  *(undefined4 *)(param_1 + 0x19) = DAT_140322294;
  *(undefined4 *)((longlong)param_1 + 0x2c) = DAT_14032e670;
  *(undefined4 *)((longlong)param_1 + 0xc) = DAT_140322294;
  *(undefined4 *)(param_1 + 1) = param_3;
  *param_1 = param_2;
  *(undefined4 *)(param_1 + 0x1b) = 0;
  param_1[0x1a] = 0;
  *(undefined4 *)((longlong)param_1 + 0xdc) = param_3;
  param_1[0x1c] = 0;
  *(undefined4 *)(param_1 + 5) = 0;
  return param_1;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401e9a70(longlong param_1,float param_2)

{
  int iVar1;
  
  FUN_1401e8e20();
  *(double *)(param_1 + 0x10) = (double)param_2 + *(double *)(param_1 + 0x10);
  *(double *)(param_1 + 0x18) = (double)param_2 + *(double *)(param_1 + 0x18);
  iVar1 = DAT_14032e670;
  if ((double)*(int *)(param_1 + 0xc) < (double)*(int *)(param_1 + 200) * _DAT_1403222b0) {
    iVar1 = (int)(double)*(int *)(param_1 + 0xc) + 1;
  }
  *(int *)(param_1 + 0x2c) = iVar1;
  FUN_1401e9610(param_1,0);
  FUN_1401e8fc0(param_1,(double)param_2);
  FUN_1401e9370(param_1);
  return;
}



int FUN_1401e9b10(byte *param_1,int param_2,code *param_3)

{
  clock_t cVar1;
  int iVar2;
  int iVar3;
  byte bVar4;
  byte bVar5;
  byte bVar6;
  int iVar7;
  
  bVar4 = 0;
  bVar5 = 0;
  iVar7 = param_2;
  while (iVar7 != 0) {
    iVar3 = 8;
    bVar6 = 0;
    iVar7 = iVar7 + -1;
    if (param_3 != (code *)0x0) {
      (*param_3)();
    }
    do {
      iVar3 = iVar3 + -1;
      do {
        cVar1 = clock();
        iVar2 = clock();
        while (cVar1 == iVar2) {
          bVar5 = bVar5 ^ 1;
          iVar2 = clock();
        }
        cVar1 = clock();
        iVar2 = clock();
        while (cVar1 == iVar2) {
          bVar4 = bVar4 ^ 1;
          iVar2 = clock();
        }
      } while (bVar5 == bVar4);
      bVar6 = bVar6 * '\x02' | bVar5;
    } while (iVar3 != 0);
    *param_1 = bVar6;
    param_1 = param_1 + 1;
  }
  return param_2;
}



DWORD FUN_1401e9bf0(BYTE *param_1,DWORD param_2)

{
  BOOL BVar1;
  HCRYPTPROV local_res18 [2];
  
  local_res18[0] = 0;
  BVar1 = CryptAcquireContextW
                    (local_res18,(LPCWSTR)0x0,L"Microsoft Base Cryptographic Provider v1.0",1,
                     0xf0000020);
  if ((BVar1 == 0) &&
     (BVar1 = CryptAcquireContextW
                        (local_res18,(LPCWSTR)0x0,L"Microsoft Base Cryptographic Provider v1.0",1,
                         0xf0000028), BVar1 == 0)) {
    return 0;
  }
  BVar1 = CryptGenRandom(local_res18[0],param_2,param_1);
  if (BVar1 != 1) {
    CryptReleaseContext(local_res18[0],0);
    return 0;
  }
  CryptReleaseContext(local_res18[0],0);
  return param_2;
}



undefined8 FUN_1401e9ca0(longlong param_1,undefined4 param_2,undefined8 param_3)

{
  undefined8 uVar1;
  
  if (param_1 == 0) {
    return 0x10;
  }
  uVar1 = FUN_1401e9bf0();
  if ((int)uVar1 == 0) {
    uVar1 = FUN_1401e9b10(param_1,param_2,param_3);
  }
  return uVar1;
}



undefined8 FUN_1401e9d00(uint param_1)

{
  EnterCriticalSection((LPCRITICAL_SECTION)&DAT_140379300);
  if ((param_1 < 0x20) && ((&DAT_14032b310)[(longlong)(int)param_1 * 10] != 0)) {
    LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_140379300);
    return 0;
  }
  LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_140379300);
  return 0xc;
}



ulonglong FUN_1401e9d60(longlong param_1,undefined4 param_2,longlong param_3,uint *param_4,
                       int param_5,int *param_6)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  ulonglong uVar5;
  undefined8 local_res8;
  undefined8 local_28;
  undefined8 local_20;
  
  if (((param_1 == 0) || (param_3 == 0)) || (param_4 == (uint *)0x0)) {
    return 0x10;
  }
  if (param_6 == (int *)0x0) {
    return 0x10;
  }
  if (param_5 == 1) {
    if (*param_6 != 1) {
      return 0xf;
    }
  }
  else if (param_5 != 0) {
    return 0x12;
  }
  uVar5 = FUN_1401eec00(&local_res8,&local_20,&local_28,0);
  if ((int)uVar5 != 0) {
    return uVar5;
  }
  uVar1 = (*DAT_1403793e0)(local_res8,param_1,param_2);
  uVar5 = (ulonglong)uVar1;
  if (uVar1 == 0) {
    iVar2 = (*DAT_140379398)(*(undefined8 *)(param_6 + 6),local_res8);
    if (iVar2 == -1) {
      uVar5 = 0x16;
    }
    else {
      if (param_5 == 1) {
        uVar1 = (*DAT_140379480)(local_res8,*(undefined8 *)(param_6 + 0xe),
                                 *(undefined8 *)(param_6 + 8),local_20);
        uVar5 = (ulonglong)uVar1;
        if (uVar1 != 0) goto LAB_1401e9f70;
        uVar1 = (*DAT_140379480)(local_res8,*(undefined8 *)(param_6 + 0x10),
                                 *(undefined8 *)(param_6 + 10),local_28);
        uVar5 = (ulonglong)uVar1;
        if (uVar1 != 0) goto LAB_1401e9f70;
        uVar1 = (*DAT_1403793f8)(local_20,local_28,local_res8);
        uVar5 = (ulonglong)uVar1;
        if (uVar1 != 0) goto LAB_1401e9f70;
        uVar1 = (*DAT_140379448)(local_res8,*(undefined8 *)(param_6 + 0xc),
                                 *(undefined8 *)(param_6 + 8),local_res8);
        uVar5 = (ulonglong)uVar1;
        if (uVar1 != 0) goto LAB_1401e9f70;
        uVar1 = (*DAT_140379408)(local_res8,*(undefined8 *)(param_6 + 10),local_res8);
        uVar5 = (ulonglong)uVar1;
        if (uVar1 != 0) goto LAB_1401e9f70;
        uVar1 = (*DAT_1403793e8)(local_res8,local_28,local_res8);
      }
      else {
        uVar1 = (*DAT_140379480)(local_res8,*(undefined8 *)(param_6 + 2),
                                 *(undefined8 *)(param_6 + 6),local_res8);
      }
      uVar5 = (ulonglong)uVar1;
      if (uVar1 == 0) {
        uVar1 = (*DAT_1403793d0)(*(undefined8 *)(param_6 + 6));
        if (*param_4 < uVar1) {
          *param_4 = uVar1;
          uVar5 = 6;
        }
        else {
          uVar3 = (*DAT_1403793d0)(local_res8);
          uVar4 = (*DAT_1403793d0)(*(undefined8 *)(param_6 + 6));
          if (uVar4 < uVar3) {
            uVar5 = 1;
          }
          else {
            *param_4 = uVar1;
            FUN_1401eebe0(param_3,uVar1);
            iVar2 = (*DAT_1403793d0)(local_res8);
            uVar1 = (*DAT_1403793d8)(local_res8,(ulonglong)(uVar1 - iVar2) + param_3);
            uVar5 = (ulonglong)uVar1;
          }
        }
      }
    }
  }
LAB_1401e9f70:
  FUN_1401eec90(local_res8,local_20,local_28,0);
  return uVar5;
}



undefined8 FUN_1401e9fb0(undefined4 *param_1)

{
  void *pvVar1;
  longlong lVar2;
  longlong lVar3;
  
  pvVar1 = malloc(0x80);
  *(void **)(param_1 + 4) = pvVar1;
  if (pvVar1 == (void *)0x0) {
    return 0xfffffffe;
  }
  lVar2 = 0;
  do {
    lVar3 = lVar2 + 8;
    *(undefined4 *)(lVar2 + *(longlong *)(param_1 + 4)) = 0;
    *(undefined4 *)(lVar2 + 4 + *(longlong *)(param_1 + 4)) = 0;
    lVar2 = lVar3;
  } while (lVar3 < 0x80);
  *param_1 = 0;
  *(undefined8 *)(param_1 + 1) = 0x20;
  return 0;
}



void FUN_1401ea010(int *param_1)

{
  uint uVar1;
  ulonglong uVar3;
  ulonglong uVar2;
  
  if (*(longlong *)(param_1 + 4) != 0) {
    uVar2 = 0;
    uVar3 = uVar2;
    if (0 < *param_1) {
      do {
        uVar1 = (int)uVar2 + 1;
        uVar2 = (ulonglong)uVar1;
        *(undefined4 *)(uVar3 + *(longlong *)(param_1 + 4)) = 0;
        uVar3 = uVar3 + 4;
      } while ((int)uVar1 < *param_1);
    }
    free(*(void **)(param_1 + 4));
    param_1[4] = 0;
    param_1[5] = 0;
    param_1[0] = 0;
    param_1[1] = 0;
    param_1[2] = 0;
  }
  return;
}



undefined8 FUN_1401ea070(int *param_1,int *param_2)

{
  uint uVar1;
  undefined8 uVar2;
  
  if ((param_1 != param_2) && (uVar2 = FUN_1401ea0b0(), (int)uVar2 != 0)) {
    return uVar2;
  }
  uVar1 = 0;
  if (*param_2 != 0) {
    uVar1 = (uint)(param_1[2] == 0);
  }
  param_2[2] = uVar1;
  return 0;
}



undefined8 FUN_1401ea0b0(int *param_1,int *param_2)

{
  undefined8 uVar1;
  int iVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  undefined4 *puVar5;
  
  if (param_1 != param_2) {
    if ((param_2[1] < *param_1) && (uVar1 = FUN_1401f1f70(param_2), (int)uVar1 != 0)) {
      return uVar1;
    }
    puVar5 = *(undefined4 **)(param_1 + 4);
    puVar4 = *(undefined4 **)(param_2 + 4);
    iVar2 = 0;
    puVar3 = puVar4;
    if (0 < *param_1) {
      do {
        iVar2 = iVar2 + 1;
        puVar4 = puVar3 + 1;
        *puVar3 = *puVar5;
        puVar5 = puVar5 + 1;
        puVar3 = puVar4;
      } while (iVar2 < *param_1);
    }
    if (iVar2 < *param_2) {
      do {
        *puVar4 = 0;
        iVar2 = iVar2 + 1;
        puVar4 = puVar4 + 1;
      } while (iVar2 < *param_2);
    }
    *param_2 = *param_1;
    param_2[2] = param_1[2];
  }
  return 0;
}



undefined8 FUN_1401ea140(int *param_1,ulonglong param_2)

{
  ulonglong uVar1;
  undefined8 uVar2;
  int iVar3;
  
  param_2 = param_2 & 0xffffffff;
  FUN_1401f2150();
  iVar3 = 0;
  do {
    uVar2 = FUN_1401f2050(param_1,4,param_1);
    if ((int)uVar2 != 0) {
      return uVar2;
    }
    iVar3 = iVar3 + 1;
    uVar1 = param_2 >> 0x1c;
    param_2 = (ulonglong)(uint)((int)param_2 << 4);
    **(uint **)(param_1 + 4) = **(uint **)(param_1 + 4) | (uint)uVar1;
    *param_1 = *param_1 + 1;
  } while (iVar3 < 8);
  FUN_1401f2010(param_1);
  return 0;
}



undefined8 FUN_1401ea200(longlong param_1,longlong param_2)

{
  int iVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  iVar1 = *(int *)(param_1 + 8);
  if (iVar1 != *(int *)(param_2 + 8)) {
    uVar2 = 1;
    if (iVar1 == 1) {
      uVar2 = 0xffffffff;
    }
    return uVar2;
  }
  lVar3 = param_1;
  if (iVar1 == 1) {
    lVar3 = param_2;
    param_2 = param_1;
  }
  uVar2 = FUN_1401f2180(lVar3,param_2);
  return uVar2;
}



int FUN_1401ea230(int *param_1,uint param_2)

{
  if (param_1[2] == 1) {
    return -1;
  }
  if ((*param_1 < 2) && (**(uint **)(param_1 + 4) <= param_2)) {
    return -(uint)(**(uint **)(param_1 + 4) < param_2);
  }
  return 1;
}



int FUN_1401ea260(int *param_1)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  
  iVar1 = *param_1;
  if (iVar1 != 0) {
    iVar2 = iVar1 * 0x1c + -0x1c;
    for (uVar3 = *(uint *)(*(longlong *)(param_1 + 4) + -4 + (longlong)iVar1 * 4); uVar3 != 0;
        uVar3 = uVar3 >> 1) {
      iVar2 = iVar2 + 1;
    }
    return iVar2;
  }
  return 0;
}



int FUN_1401ea290(int *param_1)

{
  uint uVar1;
  int *piVar2;
  uint uVar3;
  int iVar4;
  int iVar5;
  
  iVar5 = *param_1;
  if (iVar5 == 0) {
    return 0;
  }
  iVar4 = 0;
  if (0 < iVar5) {
    piVar2 = *(int **)(param_1 + 4);
    do {
      if (*piVar2 != 0) break;
      iVar4 = iVar4 + 1;
      piVar2 = piVar2 + 1;
    } while (iVar4 < iVar5);
  }
  iVar5 = iVar4 * 0x1c;
  uVar1 = *(uint *)(*(longlong *)(param_1 + 4) + (longlong)iVar4 * 4);
  uVar3 = uVar1 & 1;
  while (uVar3 == 0) {
    uVar3 = uVar1 & 0xf;
    iVar5 = iVar5 + *(int *)(&DAT_1402790d0 + (ulonglong)uVar3 * 4);
    uVar1 = uVar1 >> 4;
  }
  return iVar5;
}



undefined8 FUN_1401ea300(int *param_1,int param_2)

{
  int iVar1;
  undefined8 uVar2;
  
  FUN_1401f2150();
  iVar1 = param_2 / 0x1c;
  uVar2 = FUN_1401f1f70(param_1,iVar1 + 1);
  if ((int)uVar2 == 0) {
    *param_1 = iVar1 + 1;
    *(int *)(*(longlong *)(param_1 + 4) + (longlong)iVar1 * 4) =
         1 << ((char)param_2 + (char)iVar1 * -0x1c & 0x1fU);
    uVar2 = 0;
  }
  return uVar2;
}



undefined8 FUN_1401ea380(int *param_1,char *param_2,int param_3)

{
  char *pcVar1;
  char cVar2;
  int iVar3;
  longlong lVar4;
  undefined8 uVar5;
  char cVar6;
  
  FUN_1401f2150();
  if (0x3e < param_3 - 2U) {
    return 0xfffffffd;
  }
  cVar2 = *param_2;
  if (cVar2 == '-') {
    param_2 = param_2 + 1;
  }
  FUN_1401f2150(param_1);
  cVar6 = *param_2;
  while (cVar6 != '\0') {
    if (param_3 < 0x24) {
      iVar3 = toupper((int)cVar6);
      cVar6 = (char)iVar3;
    }
    iVar3 = 0;
    lVar4 = 0;
    do {
      if (cVar6 == PTR_s_0123456789ABCDEFGHIJKLMNOPQRSTUV_1403222d0[lVar4]) break;
      lVar4 = lVar4 + 1;
      iVar3 = iVar3 + 1;
    } while (lVar4 < 0x40);
    if (param_3 <= iVar3) break;
    uVar5 = FUN_1401eab20(param_1,param_3,param_1);
    if ((int)uVar5 != 0) {
      return uVar5;
    }
    uVar5 = FUN_1401ea770(param_1,iVar3,param_1);
    if ((int)uVar5 != 0) {
      return uVar5;
    }
    pcVar1 = param_2 + 1;
    param_2 = param_2 + 1;
    cVar6 = *pcVar1;
  }
  if (*param_1 != 0) {
    param_1[2] = (uint)(cVar2 == '-');
  }
  return 0;
}



ulonglong FUN_1401ea480(int *param_1,undefined2 *param_2,int param_3)

{
  undefined2 *puVar1;
  uint uVar2;
  ulonglong uVar3;
  int iVar4;
  uint local_res18 [4];
  int local_38 [2];
  int local_30;
  
  if (0x3e < param_3 - 2U) {
    return 0xfffffffd;
  }
  if (*param_1 != 0) {
    uVar3 = FUN_1401f23b0(local_38,param_1);
    if ((int)uVar3 == 0) {
      iVar4 = 0;
      puVar1 = param_2;
      if (local_30 == 1) {
        puVar1 = (undefined2 *)((longlong)param_2 + 1);
        *(undefined1 *)param_2 = 0x2d;
        local_30 = 0;
        param_2 = puVar1;
      }
      while (local_38[0] != 0) {
        uVar2 = FUN_1401f2230(local_38,param_3,local_38,local_res18);
        if (uVar2 != 0) {
          FUN_1401ea010(local_38);
          return (ulonglong)uVar2;
        }
        iVar4 = iVar4 + 1;
        *(undefined *)puVar1 = PTR_s_0123456789ABCDEFGHIJKLMNOPQRSTUV_1403222d0[local_res18[0]];
        puVar1 = (undefined2 *)((longlong)puVar1 + 1);
      }
      FUN_1401f21e0(param_2,iVar4);
      *(undefined1 *)puVar1 = 0;
      FUN_1401ea010(local_38);
      uVar3 = 0;
    }
    return uVar3;
  }
  *param_2 = 0x30;
  return 0;
}



int FUN_1401ea580(void)

{
  uint uVar1;
  
  uVar1 = FUN_1401ea260();
  return ((int)(uVar1 + ((int)uVar1 >> 0x1f & 7U)) >> 3) + (uint)((uVar1 & 7) != 0);
}



ulonglong FUN_1401ea5b0(undefined8 param_1,undefined1 *param_2)

{
  uint uVar1;
  ulonglong uVar2;
  int iVar3;
  undefined1 *puVar4;
  int local_28 [4];
  undefined1 *local_18;
  
  uVar2 = FUN_1401f23b0(local_28,param_1);
  if ((int)uVar2 == 0) {
    iVar3 = 0;
    puVar4 = param_2;
    do {
      if (local_28[0] == 0) {
        FUN_1401f21e0(param_2,iVar3);
        FUN_1401ea010(local_28);
        return 0;
      }
      iVar3 = iVar3 + 1;
      *puVar4 = *local_18;
      puVar4 = puVar4 + 1;
      uVar1 = FUN_1401f23e0(local_28,8,local_28);
      uVar2 = (ulonglong)uVar1;
    } while (uVar1 == 0);
    FUN_1401ea010(local_28);
  }
  return uVar2;
}



undefined8 FUN_1401ea660(int *param_1,byte *param_2,int param_3)

{
  byte bVar1;
  undefined8 uVar2;
  
  if ((1 < param_1[1]) || (uVar2 = FUN_1401f1f70(param_1,2), (int)uVar2 == 0)) {
    FUN_1401f2150(param_1);
    while (0 < param_3) {
      param_3 = param_3 + -1;
      uVar2 = FUN_1401f2050(param_1,8,param_1);
      if ((int)uVar2 != 0) {
        return uVar2;
      }
      bVar1 = *param_2;
      param_2 = param_2 + 1;
      **(uint **)(param_1 + 4) = **(uint **)(param_1 + 4) | (uint)bVar1;
      *param_1 = *param_1 + 1;
    }
    FUN_1401f2010(param_1);
    uVar2 = 0;
  }
  return uVar2;
}



void FUN_1401ea6f0(longlong param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  int iVar2;
  int iVar3;
  longlong lVar4;
  
  iVar1 = *(int *)(param_1 + 8);
  iVar2 = *(int *)(param_2 + 8);
  if (iVar1 == iVar2) {
    *(int *)(param_3 + 8) = iVar1;
    FUN_1401f2660();
  }
  else {
    iVar3 = FUN_1401f2180();
    if (iVar3 == -1) {
      *(int *)(param_3 + 8) = iVar2;
      lVar4 = param_2;
      param_2 = param_1;
    }
    else {
      *(int *)(param_3 + 8) = iVar1;
      lVar4 = param_1;
    }
    FUN_1401f2560(lVar4,param_2,param_3);
  }
  return;
}



ulonglong FUN_1401ea770(int *param_1,uint param_2,int *param_3)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  ulonglong uVar4;
  int iVar5;
  uint *puVar6;
  uint *puVar7;
  int *piVar8;
  
  if ((param_3[1] < *param_1 + 1) && (uVar4 = FUN_1401f1f70(param_3), (int)uVar4 != 0)) {
    return uVar4;
  }
  if ((param_1[2] == 1) && ((1 < *param_1 || (param_2 <= **(uint **)(param_1 + 4))))) {
    param_1[2] = 0;
    uVar3 = FUN_1401ea930(param_1,param_2,param_3);
    param_3[2] = 1;
    param_1[2] = 1;
    FUN_1401f2010(param_3);
    return (ulonglong)uVar3;
  }
  iVar1 = *param_3;
  puVar6 = *(uint **)(param_3 + 4);
  param_3[2] = 0;
  piVar8 = *(int **)(param_1 + 4);
  iVar5 = 1;
  if (param_1[2] == 0) {
    iVar2 = *piVar8;
    puVar7 = puVar6 + 1;
    *puVar6 = param_2 + iVar2 & 0xfffffff;
    uVar3 = param_2 + iVar2 >> 0x1c;
    puVar6 = puVar7;
    if (1 < *param_1) {
      do {
        piVar8 = piVar8 + 1;
        iVar2 = *piVar8;
        iVar5 = iVar5 + 1;
        puVar7 = puVar6 + 1;
        *puVar6 = uVar3 + iVar2 & 0xfffffff;
        uVar3 = uVar3 + iVar2 >> 0x1c;
        puVar6 = puVar7;
      } while (iVar5 < *param_1);
    }
    *puVar7 = uVar3;
    iVar5 = iVar5 + 1;
    *param_3 = *param_1 + 1;
    puVar6 = puVar7;
  }
  else {
    *param_3 = 1;
    if (*param_1 == 1) {
      param_2 = param_2 - **(int **)(param_1 + 4);
    }
    *puVar6 = param_2;
  }
  if (iVar5 < iVar1) {
    memset(puVar6 + 1,0,(ulonglong)(uint)(iVar1 - iVar5) << 2);
  }
  FUN_1401f2010(param_3);
  return 0;
}



void FUN_1401ea8b0(longlong param_1,longlong param_2,longlong param_3)

{
  int iVar1;
  int iVar2;
  longlong lVar3;
  
  iVar1 = *(int *)(param_1 + 8);
  if (iVar1 == *(int *)(param_2 + 8)) {
    iVar2 = FUN_1401f2180();
    if (iVar2 == -1) {
      *(uint *)(param_3 + 8) = (uint)(iVar1 == 0);
      lVar3 = param_2;
    }
    else {
      *(int *)(param_3 + 8) = iVar1;
      lVar3 = param_1;
      param_1 = param_2;
    }
    FUN_1401f2560(lVar3,param_1,param_3);
  }
  else {
    *(int *)(param_3 + 8) = iVar1;
    FUN_1401f2660();
  }
  return;
}



ulonglong FUN_1401ea930(int *param_1,uint param_2,int *param_3)

{
  int iVar1;
  uint uVar2;
  ulonglong uVar3;
  uint *puVar4;
  uint *_Dst;
  int iVar5;
  uint *puVar6;
  
  if ((*param_1 + 1 <= param_3[1]) || (uVar3 = FUN_1401f1f70(param_3), (int)uVar3 == 0)) {
    if (param_1[2] == 1) {
      param_1[2] = 0;
      uVar2 = FUN_1401ea770(param_1,param_2,param_3);
      param_3[2] = 1;
      param_1[2] = 1;
      FUN_1401f2010(param_3);
      return (ulonglong)uVar2;
    }
    iVar5 = *param_1;
    iVar1 = *param_3;
    puVar6 = *(uint **)(param_1 + 4);
    puVar4 = *(uint **)(param_3 + 4);
    if (((iVar5 == 1) && (*puVar6 <= param_2)) || (iVar5 == 0)) {
      if (iVar5 == 1) {
        param_2 = param_2 - *puVar6;
      }
      *puVar4 = param_2;
      iVar5 = 1;
      _Dst = puVar4 + 1;
      param_3[2] = 1;
      *param_3 = 1;
    }
    else {
      param_3[2] = 0;
      iVar5 = 1;
      *param_3 = *param_1;
      _Dst = puVar4 + 1;
      param_2 = *puVar6 - param_2;
      *puVar4 = param_2 & 0xfffffff;
      puVar4 = _Dst;
      if (1 < *param_1) {
        do {
          puVar6 = puVar6 + 1;
          iVar5 = iVar5 + 1;
          _Dst = puVar4 + 1;
          param_2 = *puVar6 + ((int)param_2 >> 0x1f);
          *puVar4 = param_2 & 0xfffffff;
          puVar4 = _Dst;
        } while (iVar5 < *param_1);
      }
    }
    if (iVar5 < iVar1) {
      memset(_Dst,0,(ulonglong)(uint)(iVar1 - iVar5) << 2);
    }
    FUN_1401f2010(param_3);
    uVar3 = 0;
  }
  return uVar3;
}



void FUN_1401eaa70(int *param_1,int *param_2,int *param_3)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  uint uVar5;
  int iVar6;
  
  iVar1 = param_2[2];
  iVar6 = *param_2;
  iVar2 = param_1[2];
  iVar3 = *param_1;
  uVar5 = 0;
  iVar4 = iVar6;
  if (iVar3 < iVar6) {
    iVar4 = iVar3;
  }
  if (iVar4 < DAT_1403222e0) {
    iVar4 = iVar6;
    if (iVar3 < iVar6) {
      iVar4 = iVar3;
    }
    if (iVar4 < DAT_1403222d8) {
      iVar4 = iVar6 + 1 + iVar3;
      if (iVar4 < 0x200) {
        if (iVar3 < iVar6) {
          iVar6 = iVar3;
        }
        if (iVar6 < 0x101) {
          FUN_1401f28f0(param_1,param_2,param_3,iVar4);
          goto LAB_1401eab02;
        }
      }
      FUN_1401f2790(param_1,param_2,param_3,iVar4);
    }
    else {
      FUN_1401f2a90(param_1,param_2,param_3);
    }
  }
  else {
    FUN_1401f2d70(param_1,param_2,param_3);
  }
LAB_1401eab02:
  if (0 < *param_3) {
    uVar5 = (uint)(iVar2 != iVar1);
  }
  param_3[2] = uVar5;
  return;
}



undefined8 FUN_1401eab20(int *param_1,uint param_2,int *param_3)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  undefined8 uVar4;
  ulonglong uVar5;
  uint *puVar6;
  uint *puVar7;
  uint *puVar8;
  
  if ((*param_1 + 1 <= param_3[1]) || (uVar4 = FUN_1401f1f70(param_3), (int)uVar4 == 0)) {
    iVar1 = *param_3;
    puVar7 = *(uint **)(param_3 + 4);
    param_3[2] = param_1[2];
    puVar8 = *(uint **)(param_1 + 4);
    uVar2 = 0;
    uVar5 = 0;
    puVar6 = puVar7;
    uVar3 = uVar2;
    if (0 < *param_1) {
      do {
        uVar3 = *puVar8;
        uVar2 = uVar2 + 1;
        puVar8 = puVar8 + 1;
        puVar7 = puVar6 + 1;
        uVar5 = (ulonglong)uVar3 * (ulonglong)param_2 + (uVar5 & 0xffffffff);
        *puVar6 = (uint)uVar5 & 0xfffffff;
        uVar5 = uVar5 >> 0x1c;
        uVar3 = (uint)uVar5;
        puVar6 = puVar7;
      } while ((int)uVar2 < *param_1);
    }
    *puVar7 = uVar3;
    if ((int)(uVar2 + 1) < iVar1) {
      memset(puVar7 + 1,0,(ulonglong)(iVar1 - (uVar2 + 1)) << 2);
    }
    *param_3 = *param_1 + 1;
    FUN_1401f2010(param_3);
    uVar4 = 0;
  }
  return uVar4;
}



void FUN_1401eabe0(int *param_1,longlong param_2)

{
  int iVar1;
  
  iVar1 = *param_1;
  if (DAT_1403222e4 <= iVar1) {
    FUN_1401f3a90();
    *(undefined4 *)(param_2 + 8) = 0;
    return;
  }
  if (DAT_1403222dc <= iVar1) {
    FUN_1401f3850();
    *(undefined4 *)(param_2 + 8) = 0;
    return;
  }
  if ((iVar1 * 2 + 1 < 0x200) && (iVar1 < 0x80)) {
    FUN_1401f3680();
    *(undefined4 *)(param_2 + 8) = 0;
    return;
  }
  FUN_1401f3510();
  *(undefined4 *)(param_2 + 8) = 0;
  return;
}



ulonglong FUN_1401eac60(int *param_1,int *param_2,longlong param_3,longlong param_4)

{
  int *piVar1;
  uint uVar2;
  int iVar3;
  uint uVar4;
  int iVar5;
  ulonglong uVar6;
  undefined4 uVar7;
  undefined4 uVar8;
  longlong lVar9;
  longlong lVar10;
  int iVar11;
  longlong lVar12;
  int local_d8 [2];
  int local_d0;
  longlong local_c8;
  int local_c0;
  int local_bc;
  int local_b8 [2];
  undefined4 local_b0;
  longlong local_a8;
  undefined4 local_a0 [4];
  undefined4 *local_90;
  int local_88 [4];
  longlong local_78;
  uint local_70;
  undefined4 local_68 [4];
  undefined4 *local_58;
  
  if (*param_2 == 0) {
    return 0xfffffffd;
  }
  iVar3 = FUN_1401f2180();
  if (iVar3 == -1) {
    uVar6 = 0;
    if (param_4 != 0) {
      uVar4 = FUN_1401ea0b0(param_1,param_4);
      uVar6 = (ulonglong)uVar4;
    }
    if (param_3 != 0) {
      FUN_1401f2150(param_3);
    }
    return uVar6;
  }
  uVar6 = FUN_1401f4190(local_88,*param_1 + 2);
  if ((int)uVar6 != 0) {
    return uVar6;
  }
  local_88[0] = *param_1 + 2;
  uVar4 = FUN_1401e9fb0(local_a0);
  uVar6 = (ulonglong)uVar4;
  if (uVar4 != 0) goto LAB_1401eb169;
  uVar4 = FUN_1401e9fb0(local_68);
  uVar6 = (ulonglong)uVar4;
  if (uVar4 == 0) {
    uVar4 = FUN_1401f23b0(local_d8,param_1);
    uVar6 = (ulonglong)uVar4;
    if (uVar4 == 0) {
      uVar4 = FUN_1401f23b0(local_b8,param_2);
      uVar6 = (ulonglong)uVar4;
      if (uVar4 == 0) {
        local_b0 = 0;
        local_d0 = 0;
        local_70 = (uint)(param_1[2] != param_2[2]);
        iVar3 = FUN_1401ea260(local_b8);
        if (iVar3 % 0x1c < 0x1b) {
          iVar3 = 0x1b - iVar3 % 0x1c;
          local_c0 = iVar3;
          uVar4 = FUN_1401f2050(local_d8,iVar3,local_d8);
          uVar6 = (ulonglong)uVar4;
          if (uVar4 == 0) {
            uVar4 = FUN_1401f2050(local_b8,iVar3,local_b8);
            uVar6 = (ulonglong)uVar4;
            if (uVar4 == 0) goto LAB_1401eadda;
          }
        }
        else {
          local_c0 = 0;
LAB_1401eadda:
          iVar3 = local_b8[0] + -1;
          iVar11 = local_d8[0] + -1;
          uVar4 = FUN_1401f4100(local_b8,iVar11 - iVar3);
          uVar6 = (ulonglong)uVar4;
          if (uVar4 == 0) {
            lVar10 = (longlong)iVar11;
            lVar12 = (longlong)iVar3;
            iVar5 = FUN_1401ea200(local_d8,local_b8);
            if (iVar5 != -1) {
              do {
                piVar1 = (int *)(local_78 + (lVar10 - lVar12) * 4);
                *piVar1 = *piVar1 + 1;
                uVar4 = FUN_1401ea8b0(local_d8,local_b8,local_d8);
                uVar6 = (ulonglong)uVar4;
                if (uVar4 != 0) goto LAB_1401eb145;
                iVar5 = FUN_1401ea200(local_d8,local_b8);
              } while (iVar5 != -1);
            }
            FUN_1401f4080(local_b8,iVar11 - iVar3);
            local_bc = local_b8[0];
            iVar5 = local_b8[0];
            if (local_b8[0] <= iVar11) {
              do {
                if (iVar11 <= local_d8[0]) {
                  uVar4 = *(uint *)(local_c8 + lVar10 * 4);
                  uVar2 = *(uint *)(local_a8 + lVar12 * 4);
                  if (uVar4 == uVar2) {
                    lVar9 = (lVar10 - lVar12) * 4 + -4;
                    *(undefined4 *)(lVar9 + local_78) = 0xfffffff;
                  }
                  else {
                    uVar6 = ((ulonglong)uVar4 << 0x1c |
                            (ulonglong)*(uint *)(local_c8 + -4 + lVar10 * 4)) / (ulonglong)uVar2;
                    if (0xfffffff < uVar6) {
                      uVar6 = 0xfffffff;
                    }
                    lVar9 = (lVar10 - lVar12) * 4 + -4;
                    *(uint *)(lVar9 + local_78) = (uint)uVar6 & 0xfffffff;
                  }
                  *(uint *)(lVar9 + local_78) = *(int *)(lVar9 + local_78) + 1U & 0xfffffff;
                  do {
                    *(uint *)(lVar9 + local_78) = *(int *)(lVar9 + local_78) - 1U & 0xfffffff;
                    FUN_1401f2150(local_a0);
                    uVar7 = 0;
                    if (-1 < local_b8[0] + -2) {
                      uVar7 = *(undefined4 *)(local_a8 + -4 + lVar12 * 4);
                    }
                    *local_90 = uVar7;
                    local_90[1] = *(undefined4 *)(local_a8 + lVar12 * 4);
                    local_a0[0] = 2;
                    uVar4 = FUN_1401eab20(local_a0,*(undefined4 *)(lVar9 + local_78),local_a0);
                    uVar6 = (ulonglong)uVar4;
                    if (uVar4 != 0) goto LAB_1401eb145;
                    uVar7 = 0;
                    uVar8 = uVar7;
                    if (-1 < iVar11 + -2) {
                      uVar8 = *(undefined4 *)(local_c8 + -8 + lVar10 * 4);
                    }
                    *local_58 = uVar8;
                    if (-1 < iVar11 + -1) {
                      uVar7 = *(undefined4 *)(local_c8 + -4 + lVar10 * 4);
                    }
                    local_58[1] = uVar7;
                    local_58[2] = *(undefined4 *)(local_c8 + lVar10 * 4);
                    local_68[0] = 3;
                    iVar5 = FUN_1401f2180(local_a0,local_68);
                  } while (iVar5 == 1);
                  uVar4 = FUN_1401eab20(local_b8,*(undefined4 *)(lVar9 + local_78),local_a0);
                  uVar6 = (ulonglong)uVar4;
                  if (uVar4 != 0) goto LAB_1401eb145;
                  uVar4 = FUN_1401f4100(local_a0,(iVar11 - iVar3) + -1);
                  uVar6 = (ulonglong)uVar4;
                  if (uVar4 != 0) goto LAB_1401eb145;
                  uVar4 = FUN_1401ea8b0(local_d8,local_a0,local_d8);
                  uVar6 = (ulonglong)uVar4;
                  if (uVar4 != 0) goto LAB_1401eb145;
                  iVar5 = local_bc;
                  if (local_d0 == 1) {
                    uVar4 = FUN_1401ea0b0(local_b8,local_a0);
                    uVar6 = (ulonglong)uVar4;
                    if (uVar4 != 0) goto LAB_1401eb145;
                    uVar4 = FUN_1401f4100(local_a0,(iVar11 - iVar3) + -1);
                    uVar6 = (ulonglong)uVar4;
                    if (uVar4 != 0) goto LAB_1401eb145;
                    uVar4 = FUN_1401ea6f0(local_d8,local_a0,local_d8);
                    uVar6 = (ulonglong)uVar4;
                    if (uVar4 != 0) goto LAB_1401eb145;
                    *(uint *)(lVar9 + local_78) = *(int *)(lVar9 + local_78) - 1U & 0xfffffff;
                    iVar5 = local_bc;
                  }
                }
                iVar11 = iVar11 + -1;
                lVar10 = lVar10 + -1;
              } while (iVar5 <= iVar11);
            }
            if (local_d8[0] == 0) {
              local_d0 = 0;
            }
            else {
              local_d0 = param_1[2];
            }
            if (param_3 != 0) {
              FUN_1401f2010(local_88);
              FUN_1401f4050(local_88,param_3);
              *(uint *)(param_3 + 8) = local_70;
            }
            if (param_4 != 0) {
              FUN_1401f23e0(local_d8,local_c0,local_d8,0);
              FUN_1401f4050(local_d8,param_4);
            }
            uVar6 = 0;
          }
        }
LAB_1401eb145:
        FUN_1401ea010(local_b8);
      }
      FUN_1401ea010(local_d8);
    }
    FUN_1401ea010(local_68);
  }
  FUN_1401ea010(local_a0);
LAB_1401eb169:
  FUN_1401ea010(local_88);
  return uVar6;
}



undefined8 FUN_1401eb190(int *param_1,int *param_2)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  uint *puVar4;
  undefined8 uVar5;
  uint uVar6;
  uint *puVar7;
  uint uVar8;
  
  if ((*param_1 <= param_2[1]) || (uVar5 = FUN_1401f1f70(param_2), (int)uVar5 == 0)) {
    iVar1 = *param_1;
    iVar2 = *param_2;
    uVar6 = 0;
    *param_2 = iVar1;
    puVar7 = (uint *)(*(longlong *)(param_1 + 4) + -4 + (longlong)iVar1 * 4);
    puVar4 = (uint *)(*(longlong *)(param_2 + 4) + -4 + (longlong)iVar1 * 4);
    while (iVar1 = iVar1 + -1, -1 < iVar1) {
      uVar3 = *puVar7;
      uVar8 = uVar6 << 0x1b;
      puVar7 = puVar7 + -1;
      uVar6 = uVar3 & 1;
      *puVar4 = uVar3 >> 1 | uVar8;
      puVar4 = puVar4 + -1;
    }
    iVar1 = *param_2;
    if (iVar1 < iVar2) {
      memset((void *)(*(longlong *)(param_2 + 4) + (longlong)iVar1 * 4),0,
             (ulonglong)(uint)(iVar2 - iVar1) << 2);
    }
    param_2[2] = param_1[2];
    FUN_1401f2010(param_2);
    uVar5 = 0;
  }
  return uVar5;
}



void FUN_1401eb240(undefined8 param_1,undefined8 param_2,undefined8 param_3)

{
  FUN_1401f2230(param_1,param_2,0,param_3);
  return;
}



ulonglong FUN_1401eb250(int *param_1,int *param_2,longlong param_3)

{
  uint uVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  ulonglong uVar5;
  int iVar6;
  int local_48 [2];
  uint local_40;
  undefined1 local_30 [8];
  uint local_28;
  
  if (*param_1 == 0) {
    uVar5 = FUN_1401f4240(param_2,param_3);
    return uVar5;
  }
  if (*param_2 == 0) {
    uVar5 = FUN_1401f4240(param_1,param_3);
    return uVar5;
  }
  uVar5 = FUN_1401f23b0(local_30,param_1);
  if ((int)uVar5 != 0) {
    return uVar5;
  }
  uVar1 = FUN_1401f23b0(local_48,param_2);
  uVar5 = (ulonglong)uVar1;
  if (uVar1 != 0) goto LAB_1401eb40f;
  local_40 = uVar1;
  local_28 = uVar1;
  iVar2 = FUN_1401ea290(local_30);
  iVar3 = FUN_1401ea290(local_48);
  iVar6 = iVar3;
  if (iVar2 < iVar3) {
    iVar6 = iVar2;
  }
  if (iVar6 < 1) {
LAB_1401eb32f:
    if (iVar2 != iVar6) {
      uVar1 = FUN_1401f23e0(local_30,iVar2 - iVar6,local_30,0);
      uVar5 = (ulonglong)uVar1;
      if (uVar1 != 0) goto LAB_1401eb3f4;
    }
    if (iVar3 != iVar6) {
      uVar1 = FUN_1401f23e0(local_48,iVar3 - iVar6,local_48,0);
      uVar5 = (ulonglong)uVar1;
      if (uVar1 != 0) goto LAB_1401eb3f4;
    }
    do {
      if (local_48[0] == 0) {
        uVar1 = FUN_1401f2050(local_30,iVar6,param_3);
        uVar5 = (ulonglong)uVar1;
        if (uVar1 == 0) {
          *(undefined4 *)(param_3 + 8) = 0;
        }
        break;
      }
      iVar2 = FUN_1401f2180(local_30,local_48);
      if (iVar2 == 1) {
        FUN_1401f4050(local_30,local_48);
      }
      uVar1 = FUN_1401f2560(local_48,local_30,local_48);
      uVar5 = (ulonglong)uVar1;
      if (uVar1 != 0) break;
      uVar4 = FUN_1401ea290(local_48);
      uVar1 = FUN_1401f23e0(local_48,uVar4,local_48,0);
      uVar5 = (ulonglong)uVar1;
    } while (uVar1 == 0);
  }
  else {
    uVar1 = FUN_1401f23e0(local_30,iVar6,local_30,0);
    uVar5 = (ulonglong)uVar1;
    if (uVar1 == 0) {
      uVar1 = FUN_1401f23e0(local_48,iVar6,local_48,0);
      uVar5 = (ulonglong)uVar1;
      if (uVar1 == 0) goto LAB_1401eb32f;
    }
  }
LAB_1401eb3f4:
  FUN_1401ea010(local_30);
LAB_1401eb40f:
  FUN_1401ea010(local_48);
  return uVar5;
}



ulonglong FUN_1401eb430(undefined8 param_1,undefined8 param_2,longlong param_3)

{
  uint uVar1;
  int iVar2;
  ulonglong uVar3;
  undefined1 local_38 [24];
  undefined1 local_20 [24];
  
  uVar3 = FUN_1401f42b0(local_20,local_38,0);
  if ((int)uVar3 == 0) {
    uVar1 = FUN_1401eb250(param_1,param_2,local_20);
    uVar3 = (ulonglong)uVar1;
    if (uVar1 == 0) {
      iVar2 = FUN_1401f2180(param_1,param_2);
      if (iVar2 == -1) {
        uVar1 = FUN_1401eac60(param_1,local_20,local_38,0);
      }
      else {
        uVar1 = FUN_1401eac60(param_2,local_20,local_38,0);
        param_2 = param_1;
      }
      uVar3 = (ulonglong)uVar1;
      if (uVar1 == 0) {
        uVar1 = FUN_1401eaa70(param_2,local_38,param_3);
        *(undefined4 *)(param_3 + 8) = 0;
        uVar3 = (ulonglong)uVar1;
      }
    }
    FUN_1401f4270(local_20,local_38,0);
  }
  return uVar3;
}



ulonglong FUN_1401eb500(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  uint uVar1;
  ulonglong uVar2;
  undefined1 local_28 [32];
  
  uVar2 = FUN_1401e9fb0(local_28);
  if ((int)uVar2 == 0) {
    uVar1 = FUN_1401eaa70(param_1,param_2,local_28);
    if (uVar1 == 0) {
      uVar1 = FUN_1401f4330(local_28,param_3,param_4);
    }
    uVar2 = (ulonglong)uVar1;
    FUN_1401ea010(local_28);
  }
  return uVar2;
}



ulonglong FUN_1401eb580(undefined8 param_1,undefined8 param_2,undefined8 param_3)

{
  uint uVar1;
  ulonglong uVar2;
  undefined1 local_28 [32];
  
  uVar2 = FUN_1401e9fb0(local_28);
  if ((int)uVar2 == 0) {
    uVar1 = FUN_1401eabe0(param_1,local_28);
    if (uVar1 == 0) {
      uVar1 = FUN_1401f4330(local_28,param_2,param_3);
    }
    uVar2 = (ulonglong)uVar1;
    FUN_1401ea010(local_28);
  }
  return uVar2;
}



undefined8 FUN_1401eb5f0(undefined8 param_1,int *param_2)

{
  undefined8 uVar1;
  
  if ((param_2[2] == 1) || (*param_2 == 0)) {
    return 0xfffffffd;
  }
  if ((0 < *param_2) && ((**(byte **)(param_2 + 4) & 1) != 0)) {
    uVar1 = FUN_1401f4830();
    return uVar1;
  }
  uVar1 = FUN_1401f43e0();
  return uVar1;
}



undefined8 FUN_1401eb620(longlong param_1,uint *param_2)

{
  uint uVar1;
  int iVar2;
  
  uVar1 = **(uint **)(param_1 + 0x10);
  if ((uVar1 & 1) == 0) {
    return 0xfffffffd;
  }
  iVar2 = (uVar1 * 2 + 4 & 8) + uVar1;
  iVar2 = iVar2 * (2 - iVar2 * uVar1);
  iVar2 = iVar2 * (2 - iVar2 * uVar1);
  *param_2 = -((2 - iVar2 * uVar1) * iVar2) & 0xfffffff;
  return 0;
}



undefined8 FUN_1401eb680(undefined8 param_1,int *param_2)

{
  int iVar1;
  int iVar2;
  undefined8 uVar3;
  
  iVar1 = FUN_1401ea260(param_2);
  iVar1 = iVar1 % 0x1c;
  if (*param_2 < 2) {
    iVar1 = 1;
    FUN_1401f4bb0(param_1,1);
  }
  else {
    uVar3 = FUN_1401ea300(param_1,*param_2 * 0x1c + -0x1d + iVar1);
    if ((int)uVar3 != 0) {
      return uVar3;
    }
  }
  iVar1 = iVar1 + -1;
  while( true ) {
    if (0x1b < iVar1) {
      return 0;
    }
    uVar3 = FUN_1401f4b00(param_1,param_1);
    if ((int)uVar3 != 0) break;
    iVar2 = FUN_1401f2180(param_1,param_2);
    if ((iVar2 != -1) && (uVar3 = FUN_1401f2560(param_1,param_2,param_1), (int)uVar3 != 0)) {
      return uVar3;
    }
    iVar1 = iVar1 + 1;
  }
  return uVar3;
}



undefined8 FUN_1401eb750(int *param_1,int *param_2,int param_3)

{
  int iVar1;
  int iVar2;
  undefined8 uVar3;
  ulonglong uVar4;
  uint *puVar5;
  uint *puVar6;
  int iVar7;
  uint *puVar8;
  uint uVar9;
  int iVar10;
  longlong lVar11;
  
  iVar2 = *param_2 * 2 + 1;
  if ((iVar2 < 0x200) && (*param_2 < 0x100)) {
    uVar3 = FUN_1401f4bf0();
    return uVar3;
  }
  if ((iVar2 <= param_1[1]) || (uVar3 = FUN_1401f1f70(param_1,iVar2), (int)uVar3 == 0)) {
    *param_1 = iVar2;
    iVar2 = *param_2;
    iVar10 = 0;
    if (0 < iVar2) {
      lVar11 = 0;
      do {
        puVar8 = *(uint **)(param_2 + 4);
        iVar1 = *(int *)(lVar11 + *(longlong *)(param_1 + 4));
        uVar4 = 0;
        iVar7 = 0;
        if (0 < iVar2) {
          puVar5 = (uint *)(*(longlong *)(param_1 + 4) + (longlong)iVar10 * 4);
          do {
            uVar9 = *puVar8;
            iVar7 = iVar7 + 1;
            puVar6 = puVar5 + 1;
            puVar8 = puVar8 + 1;
            uVar4 = (ulonglong)uVar9 * (ulonglong)(iVar1 * param_3 & 0xfffffff) + (ulonglong)*puVar5
                    + (uVar4 & 0xffffffff);
            *puVar5 = (uint)uVar4 & 0xfffffff;
            uVar4 = uVar4 >> 0x1c;
            puVar5 = puVar6;
          } while (iVar7 < *param_2);
          for (uVar9 = (uint)uVar4; uVar9 != 0; uVar9 = uVar9 >> 0x1c) {
            *puVar6 = *puVar6 + (int)uVar4;
            uVar9 = *puVar6;
            *puVar6 = *puVar6 & 0xfffffff;
            puVar6 = puVar6 + 1;
            uVar4 = (ulonglong)(uVar9 >> 0x1c);
          }
        }
        iVar2 = *param_2;
        iVar10 = iVar10 + 1;
        lVar11 = lVar11 + 4;
      } while (iVar10 < iVar2);
    }
    FUN_1401f2010(param_1);
    FUN_1401f4080(param_1,*param_2);
    iVar2 = FUN_1401f2180(param_1,param_2);
    if (iVar2 != -1) {
      uVar3 = FUN_1401f2560(param_1,param_2,param_1);
      return uVar3;
    }
    uVar3 = 0;
  }
  return uVar3;
}



ulonglong FUN_1401eb8c0(undefined8 param_1,longlong param_2,int *param_3,undefined8 param_4)

{
  uint uVar1;
  int iVar2;
  ulonglong uVar3;
  undefined4 uVar4;
  undefined1 local_38 [24];
  undefined1 local_20 [24];
  
  if (param_3[2] == 1) {
    uVar3 = 0xfffffffd;
  }
  else if (*(int *)(param_2 + 8) == 1) {
    uVar3 = FUN_1401e9fb0(local_38);
    if ((int)uVar3 == 0) {
      uVar1 = FUN_1401eb5f0(param_1,param_3,local_38);
      if ((uVar1 == 0) && (uVar1 = FUN_1401e9fb0(local_20), uVar1 == 0)) {
        uVar1 = FUN_1401f4240(param_2,local_20);
        if (uVar1 != 0) {
          FUN_1401f4270(local_38,local_20,0);
          return (ulonglong)uVar1;
        }
        uVar1 = FUN_1401eb8c0(local_38,local_20,param_3,param_4);
        FUN_1401f4270(local_38,local_20,0);
        return (ulonglong)uVar1;
      }
      uVar3 = (ulonglong)uVar1;
      FUN_1401ea010(local_38);
    }
  }
  else {
    iVar2 = FUN_1401f5a30(param_3);
    if (iVar2 == 1) {
      uVar4 = 1;
    }
    else {
      iVar2 = FUN_1401f5470(param_3);
      if (iVar2 == 0) {
        iVar2 = FUN_1401f5400(param_3);
        iVar2 = iVar2 * 2;
      }
      if (((0 < *param_3) && ((**(byte **)(param_3 + 4) & 1) != 0)) || (iVar2 != 0)) {
        uVar3 = FUN_1401f4e40(param_1,param_2,param_3,param_4,iVar2);
        return uVar3;
      }
      uVar4 = 0;
    }
    uVar3 = FUN_1401f54b0(param_1,param_2,param_3,param_4,uVar4);
  }
  return uVar3;
}



ulonglong FUN_1401eba20(undefined8 param_1,int param_2,undefined4 *param_3)

{
  int iVar1;
  uint uVar2;
  ulonglong uVar3;
  longlong lVar4;
  undefined4 *puVar5;
  int local_res10 [2];
  undefined1 local_48 [32];
  
  lVar4 = 0;
  *param_3 = 0;
  if (0xff < param_2 - 1U) {
    return 0xfffffffd;
  }
  puVar5 = &DAT_14027dde0;
  do {
    iVar1 = FUN_1401ea230(param_1,*puVar5);
    if (iVar1 == 0) {
      *param_3 = 1;
      goto LAB_1401ebb2c;
    }
    puVar5 = puVar5 + 1;
  } while ((longlong)puVar5 < 0x14027e1e0);
  uVar3 = FUN_1401f5c40(param_1,local_res10);
  if ((int)uVar3 == 0) {
    if (local_res10[0] == 1) {
LAB_1401ebb2c:
      uVar3 = 0;
    }
    else {
      uVar3 = FUN_1401e9fb0(local_48);
      if ((int)uVar3 == 0) {
        uVar3 = uVar3 & 0xffffffff;
        if (0 < (longlong)param_2) {
          do {
            FUN_1401f4bb0(local_48,(&DAT_14027dde0)[lVar4]);
            uVar2 = FUN_1401f5a80(param_1,local_48,local_res10);
            uVar3 = (ulonglong)uVar2;
            if ((uVar2 != 0) || (local_res10[0] == 0)) goto LAB_1401ebafc;
            lVar4 = lVar4 + 1;
          } while (lVar4 < param_2);
        }
        *param_3 = 1;
LAB_1401ebafc:
        FUN_1401ea010(local_48);
      }
    }
  }
  return uVar3;
}



undefined8 FUN_1401ebb40(undefined1 *param_1,int param_2,int param_3,uint *param_4)

{
  byte bVar1;
  byte bVar2;
  uint3 uVar3;
  uint uVar4;
  uint *puVar5;
  uint *puVar6;
  uint *puVar7;
  int iVar8;
  uint uVar9;
  uint *puVar10;
  
  if ((param_1 == (undefined1 *)0x0) || (param_4 == (uint *)0x0)) {
    return 0x10;
  }
  if (((param_2 != 0x10) && (param_2 != 0x18)) && (param_2 != 0x20)) {
    return 3;
  }
  if ((param_3 != 0) && (param_3 != ((int)(param_2 + (param_2 >> 0x1f & 7U)) >> 3) * 2 + 6)) {
    return 4;
  }
  puVar5 = param_4 + 1;
  param_4[0x78] = ((int)(param_2 + (param_2 >> 0x1f & 7U)) >> 3) * 2 + 6;
  uVar4 = CONCAT31(CONCAT21(CONCAT11(*param_1,param_1[1]),param_1[2]),param_1[3]);
  *param_4 = uVar4;
  *puVar5 = CONCAT31(CONCAT21(CONCAT11(param_1[4],param_1[5]),param_1[6]),param_1[7]);
  param_4[2] = CONCAT31(CONCAT21(CONCAT11(param_1[8],param_1[9]),param_1[10]),param_1[0xb]);
  bVar1 = param_1[0xc];
  uVar3 = CONCAT21(CONCAT11(bVar1,param_1[0xd]),param_1[0xe]);
  bVar2 = param_1[0xf];
  uVar9 = CONCAT31(uVar3,bVar2);
  param_4[3] = uVar9;
  if (param_2 == 0x10) {
    uVar4 = *(uint *)(&DAT_14027ae90 + (ulonglong)bVar1 * 4) ^
            *(uint *)(&DAT_14027ba90 + (ulonglong)(((uVar3 & 0xff00) << 8) >> 0x10) * 4) ^
            *(uint *)(&DAT_14027b690 + (ulonglong)(uVar3 & 0xff) * 4) ^
            *(uint *)(&DAT_14027b290 + (ulonglong)bVar2 * 4) ^ uVar4 ^ 0x1000000;
    param_4[4] = uVar4;
    uVar4 = uVar4 ^ *puVar5;
    param_4[5] = uVar4;
    uVar4 = uVar4 ^ param_4[2];
    param_4[6] = uVar4;
    param_4[7] = uVar4 ^ uVar9;
    puVar7 = &DAT_14027da94;
    do {
      uVar4 = puVar5[6];
      puVar6 = puVar7 + 1;
      uVar4 = *(uint *)(&DAT_14027ae90 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027ba90 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027b690 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027b290 + (ulonglong)(uVar4 & 0xff) * 4) ^ puVar5[3] ^ *puVar7;
      puVar5[7] = uVar4;
      uVar4 = uVar4 ^ puVar5[4];
      puVar5[8] = uVar4;
      uVar4 = puVar5[5] ^ uVar4;
      puVar5[9] = uVar4;
      puVar5[10] = uVar4 ^ puVar5[6];
      puVar7 = puVar6;
      puVar5 = puVar5 + 4;
    } while (puVar6 != (uint *)"sha256");
  }
  else if (param_2 == 0x18) {
    param_4[4] = CONCAT31(CONCAT21(CONCAT11(param_1[0x10],param_1[0x11]),param_1[0x12]),
                          param_1[0x13]);
    bVar1 = param_1[0x14];
    uVar3 = CONCAT21(CONCAT11(bVar1,param_1[0x15]),param_1[0x16]);
    bVar2 = param_1[0x17];
    param_4[5] = CONCAT31(uVar3,bVar2);
    uVar4 = *(uint *)(&DAT_14027ae90 + (ulonglong)bVar1 * 4) ^
            *(uint *)(&DAT_14027ba90 + (ulonglong)(((uVar3 & 0xff00) << 8) >> 0x10) * 4) ^
            *(uint *)(&DAT_14027b690 + (ulonglong)(uVar3 & 0xff) * 4) ^
            *(uint *)(&DAT_14027b290 + (ulonglong)bVar2 * 4) ^ uVar4 ^ 0x1000000;
    param_4[6] = uVar4;
    uVar4 = uVar4 ^ *puVar5;
    param_4[7] = uVar4;
    uVar4 = uVar4 ^ param_4[2];
    param_4[8] = uVar4;
    param_4[9] = uVar4 ^ param_4[3];
    puVar5 = &DAT_14027da94;
    puVar7 = param_4 + 10;
    do {
      puVar6 = puVar5 + 1;
      *puVar7 = puVar7[-6] ^ puVar7[-1];
      puVar7[1] = puVar7[-5] ^ puVar7[-6] ^ puVar7[-1];
      uVar4 = param_4[((-0x28 - (longlong)param_4) + (longlong)(puVar7 + 6) >> 2) + 5];
      uVar4 = *(uint *)(&DAT_14027ae90 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027ba90 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027b690 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027b290 + (ulonglong)(uVar4 & 0xff) * 4) ^ puVar7[-4] ^ *puVar5;
      puVar7[2] = uVar4;
      uVar4 = puVar7[-3] ^ uVar4;
      puVar7[3] = uVar4;
      uVar4 = puVar7[-2] ^ uVar4;
      puVar7[4] = uVar4;
      puVar7[5] = puVar7[-1] ^ uVar4;
      puVar5 = puVar6;
      puVar7 = puVar7 + 6;
    } while (puVar6 != (uint *)&DAT_14027dab0);
  }
  else {
    if (param_2 != 0x20) {
      return 1;
    }
    param_4[4] = CONCAT31(CONCAT21(CONCAT11(param_1[0x10],param_1[0x11]),param_1[0x12]),
                          param_1[0x13]);
    param_4[5] = CONCAT31(CONCAT21(CONCAT11(param_1[0x14],param_1[0x15]),param_1[0x16]),
                          param_1[0x17]);
    param_4[6] = CONCAT31(CONCAT21(CONCAT11(param_1[0x18],param_1[0x19]),param_1[0x1a]),
                          param_1[0x1b]);
    bVar1 = param_1[0x1c];
    uVar3 = CONCAT21(CONCAT11(bVar1,param_1[0x1d]),param_1[0x1e]);
    bVar2 = param_1[0x1f];
    param_4[7] = CONCAT31(uVar3,bVar2);
    uVar4 = *(uint *)(&DAT_14027ae90 + (ulonglong)bVar1 * 4) ^
            *(uint *)(&DAT_14027ba90 + (ulonglong)(((uVar3 & 0xff00) << 8) >> 0x10) * 4) ^
            *(uint *)(&DAT_14027b690 + (ulonglong)(uVar3 & 0xff) * 4) ^
            *(uint *)(&DAT_14027b290 + (ulonglong)bVar2 * 4) ^ uVar4 ^ 0x1000000;
    param_4[8] = uVar4;
    uVar4 = uVar4 ^ *puVar5;
    param_4[9] = uVar4;
    uVar4 = uVar4 ^ param_4[2];
    param_4[10] = uVar4;
    param_4[0xb] = uVar4 ^ param_4[3];
    puVar5 = &DAT_14027da94;
    puVar7 = param_4 + 0xc;
    do {
      uVar4 = puVar7[-1];
      puVar6 = puVar5 + 1;
      uVar9 = *(uint *)(&DAT_14027ae90 + (ulonglong)(uVar4 & 0xff) * 4) ^
              *(uint *)(&DAT_14027ba90 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027b690 + (ulonglong)((uVar4 >> 8 & 0xff00) >> 8) * 4) ^
              *(uint *)(&DAT_14027b290 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^ puVar7[-8];
      uVar4 = puVar7[-7] ^ uVar9;
      *puVar7 = uVar9;
      puVar7[1] = uVar4;
      uVar4 = puVar7[-6] ^ uVar4;
      puVar7[2] = uVar4;
      puVar7[3] = puVar7[-5] ^ uVar4;
      uVar4 = param_4[((-0x30 - (longlong)param_4) + (longlong)(puVar7 + 8) >> 2) + 7];
      uVar4 = *(uint *)(&DAT_14027ae90 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027ba90 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027b690 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027b290 + (ulonglong)(uVar4 & 0xff) * 4) ^ puVar7[-4] ^ *puVar5;
      puVar7[4] = uVar4;
      uVar4 = puVar7[-3] ^ uVar4;
      puVar7[5] = uVar4;
      uVar4 = puVar7[-2] ^ uVar4;
      puVar7[6] = uVar4;
      puVar7[7] = puVar7[-1] ^ uVar4;
      puVar5 = puVar6;
      puVar7 = puVar7 + 8;
    } while (puVar6 != (uint *)&DAT_14027daac);
  }
  iVar8 = 1;
  puVar5 = param_4 + 0x3c;
  puVar7 = param_4 + (longlong)(param_2 + 0x1c) + -4;
  param_4[0x3c] = param_4[(longlong)(param_2 + 0x1c) + -4];
  param_4[0x3d] = puVar7[1];
  param_4[0x3e] = puVar7[2];
  param_4[0x3f] = puVar7[3];
  puVar6 = puVar7;
  puVar10 = puVar5;
  if (1 < (int)param_4[0x78]) {
    do {
      uVar4 = puVar6[-4];
      puVar7 = puVar6 + -4;
      puVar5 = puVar10 + 4;
      iVar8 = iVar8 + 1;
      *puVar5 = *(uint *)(&DAT_14027ca90 + (ulonglong)(uVar4 >> 0x18) * 4) ^
                *(uint *)(&DAT_14027ce90 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) ^
                *(uint *)(&DAT_14027d290 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^
                *(uint *)(&DAT_14027d690 + (ulonglong)(uVar4 & 0xff) * 4);
      uVar4 = puVar6[-3];
      puVar10[5] = *(uint *)(&DAT_14027ca90 + (ulonglong)(uVar4 >> 0x18) * 4) ^
                   *(uint *)(&DAT_14027ce90 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) ^
                   *(uint *)(&DAT_14027d290 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^
                   *(uint *)(&DAT_14027d690 + (ulonglong)(uVar4 & 0xff) * 4);
      uVar4 = puVar6[-2];
      puVar10[6] = *(uint *)(&DAT_14027ca90 + (ulonglong)(uVar4 >> 0x18) * 4) ^
                   *(uint *)(&DAT_14027ce90 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) ^
                   *(uint *)(&DAT_14027d290 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^
                   *(uint *)(&DAT_14027d690 + (ulonglong)(uVar4 & 0xff) * 4);
      uVar4 = puVar6[-1];
      puVar10[7] = *(uint *)(&DAT_14027ca90 + (ulonglong)(uVar4 >> 0x18) * 4) ^
                   *(uint *)(&DAT_14027ce90 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) ^
                   *(uint *)(&DAT_14027d290 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^
                   *(uint *)(&DAT_14027d690 + (ulonglong)(uVar4 & 0xff) * 4);
      puVar6 = puVar7;
      puVar10 = puVar5;
    } while (iVar8 < (int)param_4[0x78]);
  }
  puVar5[4] = puVar7[-4];
  puVar5[5] = puVar7[-3];
  puVar5[6] = puVar7[-2];
  puVar5[7] = puVar7[-1];
  return 0;
}



undefined8 FUN_1401ec2e0(undefined1 *param_1,undefined1 *param_2,uint *param_3)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  uint uVar5;
  uint uVar6;
  int iVar7;
  uint uVar8;
  
  if (((param_1 != (undefined1 *)0x0) && (param_2 != (undefined1 *)0x0)) && (param_3 != (uint *)0x0)
     ) {
    uVar6 = CONCAT31(CONCAT21(CONCAT11(*param_1,param_1[1]),param_1[2]),param_1[3]) ^ *param_3;
    uVar5 = CONCAT31(CONCAT21(CONCAT11(param_1[4],param_1[5]),param_1[6]),param_1[7]) ^ param_3[1];
    uVar4 = CONCAT31(CONCAT21(CONCAT11(param_1[8],param_1[9]),param_1[10]),param_1[0xb]) ^
            param_3[2];
    uVar3 = CONCAT31(CONCAT21(CONCAT11(param_1[0xc],param_1[0xd]),param_1[0xe]),param_1[0xf]) ^
            param_3[3];
    uVar2 = *(uint *)(&DAT_14027a690 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^
            *(uint *)(&DAT_14027a290 + (ulonglong)(uVar5 >> 0x10 & 0xff) * 4) ^
            *(uint *)(&DAT_140279290 + (ulonglong)(uVar6 >> 0x18) * 4) ^
            *(uint *)(&DAT_14027aa90 + (ulonglong)(uVar3 & 0xff) * 4) ^ param_3[4];
    uVar1 = *(uint *)(&DAT_14027a690 + (ulonglong)(uVar3 >> 8 & 0xff) * 4) ^
            *(uint *)(&DAT_14027a290 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) ^
            *(uint *)(&DAT_140279290 + (ulonglong)(uVar5 >> 0x18) * 4) ^
            *(uint *)(&DAT_14027aa90 + (ulonglong)(uVar6 & 0xff) * 4) ^ param_3[5];
    uVar8 = *(uint *)(&DAT_14027a290 + (ulonglong)(uVar3 >> 0x10 & 0xff) * 4) ^
            *(uint *)(&DAT_140279290 + (ulonglong)(uVar4 >> 0x18) * 4) ^
            *(uint *)(&DAT_14027a690 + (ulonglong)(uVar6 >> 8 & 0xff) * 4) ^
            *(uint *)(&DAT_14027aa90 + (ulonglong)(uVar5 & 0xff) * 4) ^ param_3[6];
    uVar3 = *(uint *)(&DAT_140279290 + (ulonglong)(uVar3 >> 0x18) * 4) ^
            *(uint *)(&DAT_14027a690 + (ulonglong)(uVar5 >> 8 & 0xff) * 4) ^
            *(uint *)(&DAT_14027a290 + (ulonglong)(uVar6 >> 0x10 & 0xff) * 4) ^
            *(uint *)(&DAT_14027aa90 + (ulonglong)(uVar4 & 0xff) * 4) ^ param_3[7];
    iVar7 = (int)param_3[0x78] >> 1;
    while( true ) {
      iVar7 = iVar7 + -1;
      param_3 = param_3 + 8;
      if (iVar7 == 0) break;
      uVar6 = *(uint *)(&DAT_14027a690 + (ulonglong)(uVar8 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027a290 + (ulonglong)(uVar1 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_140279290 + (ulonglong)(uVar2 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027aa90 + (ulonglong)(uVar3 & 0xff) * 4) ^ *param_3;
      uVar5 = *(uint *)(&DAT_14027a690 + (ulonglong)(uVar3 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027a290 + (ulonglong)(uVar8 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_140279290 + (ulonglong)(uVar1 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027aa90 + (ulonglong)(uVar2 & 0xff) * 4) ^ param_3[1];
      uVar4 = *(uint *)(&DAT_14027a290 + (ulonglong)(uVar3 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_140279290 + (ulonglong)(uVar8 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027a690 + (ulonglong)(uVar2 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027aa90 + (ulonglong)(uVar1 & 0xff) * 4) ^ param_3[2];
      uVar3 = *(uint *)(&DAT_140279290 + (ulonglong)(uVar3 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027a690 + (ulonglong)(uVar1 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027a290 + (ulonglong)(uVar2 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027aa90 + (ulonglong)(uVar8 & 0xff) * 4) ^ param_3[3];
      uVar2 = *(uint *)(&DAT_14027a690 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027a290 + (ulonglong)(uVar5 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_140279290 + (ulonglong)(uVar6 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027aa90 + (ulonglong)(uVar3 & 0xff) * 4) ^ param_3[4];
      uVar1 = *(uint *)(&DAT_14027a690 + (ulonglong)(uVar3 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027a290 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_140279290 + (ulonglong)(uVar5 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027aa90 + (ulonglong)(uVar6 & 0xff) * 4) ^ param_3[5];
      uVar8 = *(uint *)(&DAT_14027a290 + (ulonglong)(uVar3 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_140279290 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027a690 + (ulonglong)(uVar6 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027aa90 + (ulonglong)(uVar5 & 0xff) * 4) ^ param_3[6];
      uVar3 = *(uint *)(&DAT_140279290 + (ulonglong)(uVar3 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027a690 + (ulonglong)(uVar5 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027a290 + (ulonglong)(uVar6 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027aa90 + (ulonglong)(uVar4 & 0xff) * 4) ^ param_3[7];
    }
    uVar4 = *(uint *)(&DAT_14027b290 + (ulonglong)(uVar8 >> 8 & 0xff) * 4) ^
            *(uint *)(&DAT_14027b690 + (ulonglong)(uVar1 >> 0x10 & 0xff) * 4) ^
            *(uint *)(&DAT_14027ba90 + (ulonglong)(uVar2 >> 0x18) * 4) ^
            *(uint *)(&DAT_14027ae90 + (ulonglong)(uVar3 & 0xff) * 4) ^ *param_3;
    param_2[3] = (char)uVar4;
    *param_2 = (char)(uVar4 >> 0x18);
    param_2[1] = (char)(uVar4 >> 0x10);
    param_2[2] = (char)(uVar4 >> 8);
    uVar4 = *(uint *)(&DAT_14027b290 + (ulonglong)(uVar3 >> 8 & 0xff) * 4) ^
            *(uint *)(&DAT_14027b690 + (ulonglong)(uVar8 >> 0x10 & 0xff) * 4) ^
            *(uint *)(&DAT_14027ba90 + (ulonglong)(uVar1 >> 0x18) * 4) ^
            *(uint *)(&DAT_14027ae90 + (ulonglong)(uVar2 & 0xff) * 4) ^ param_3[1];
    param_2[7] = (char)uVar4;
    param_2[4] = (char)(uVar4 >> 0x18);
    param_2[5] = (char)(uVar4 >> 0x10);
    param_2[6] = (char)(uVar4 >> 8);
    uVar4 = *(uint *)(&DAT_14027b690 + (ulonglong)(uVar3 >> 0x10 & 0xff) * 4) ^
            *(uint *)(&DAT_14027ba90 + (ulonglong)(uVar8 >> 0x18) * 4) ^
            *(uint *)(&DAT_14027b290 + (ulonglong)(uVar2 >> 8 & 0xff) * 4) ^
            *(uint *)(&DAT_14027ae90 + (ulonglong)(uVar1 & 0xff) * 4) ^ param_3[2];
    param_2[0xb] = (char)uVar4;
    param_2[8] = (char)(uVar4 >> 0x18);
    param_2[9] = (char)(uVar4 >> 0x10);
    param_2[10] = (char)(uVar4 >> 8);
    uVar2 = *(uint *)(&DAT_14027ba90 + (ulonglong)(uVar3 >> 0x18) * 4) ^
            *(uint *)(&DAT_14027b290 + (ulonglong)(uVar1 >> 8 & 0xff) * 4) ^
            *(uint *)(&DAT_14027b690 + (ulonglong)(uVar2 >> 0x10 & 0xff) * 4) ^
            *(uint *)(&DAT_14027ae90 + (ulonglong)(uVar8 & 0xff) * 4) ^ param_3[3];
    param_2[0xf] = (char)uVar2;
    param_2[0xc] = (char)(uVar2 >> 0x18);
    param_2[0xd] = (char)(uVar2 >> 0x10);
    param_2[0xe] = (char)(uVar2 >> 8);
    return 0;
  }
  return 0x10;
}



undefined8 FUN_1401ec8c0(undefined1 *param_1,undefined1 *param_2,longlong param_3)

{
  uint *puVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  uint uVar5;
  uint uVar6;
  uint uVar7;
  uint uVar8;
  int iVar9;
  
  if (((param_2 != (undefined1 *)0x0) && (param_1 != (undefined1 *)0x0)) && (param_3 != 0)) {
    uVar7 = CONCAT31(CONCAT21(CONCAT11(*param_1,param_1[1]),param_1[2]),param_1[3]) ^
            *(uint *)(param_3 + 0xf0);
    uVar6 = CONCAT31(CONCAT21(CONCAT11(param_1[4],param_1[5]),param_1[6]),param_1[7]) ^
            *(uint *)(param_3 + 0xf4);
    uVar5 = CONCAT31(CONCAT21(CONCAT11(param_1[8],param_1[9]),param_1[10]),param_1[0xb]) ^
            *(uint *)(param_3 + 0xf8);
    uVar4 = CONCAT31(CONCAT21(CONCAT11(param_1[0xc],param_1[0xd]),param_1[0xe]),param_1[0xf]) ^
            *(uint *)(param_3 + 0xfc);
    uVar8 = *(uint *)(&DAT_14027be90 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) ^
            *(uint *)(&DAT_14027c290 + (ulonglong)(uVar5 >> 8 & 0xff) * 4) ^
            *(uint *)(&DAT_140279a90 + (ulonglong)(uVar7 >> 0x18) * 4) ^
            *(uint *)(&DAT_14027c690 + (ulonglong)(uVar6 & 0xff) * 4) ^ *(uint *)(param_3 + 0x100);
    uVar3 = *(uint *)(&DAT_14027c290 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^
            *(uint *)(&DAT_140279a90 + (ulonglong)(uVar6 >> 0x18) * 4) ^
            *(uint *)(&DAT_14027be90 + (ulonglong)(uVar7 >> 0x10 & 0xff) * 4) ^
            *(uint *)(&DAT_14027c690 + (ulonglong)(uVar5 & 0xff) * 4) ^ *(uint *)(param_3 + 0x104);
    iVar9 = *(int *)(param_3 + 0x1e0) >> 1;
    uVar2 = *(uint *)(&DAT_140279a90 + (ulonglong)(uVar5 >> 0x18) * 4) ^
            *(uint *)(&DAT_14027be90 + (ulonglong)(uVar6 >> 0x10 & 0xff) * 4) ^
            *(uint *)(&DAT_14027c290 + (ulonglong)(uVar7 >> 8 & 0xff) * 4) ^
            *(uint *)(&DAT_14027c690 + (ulonglong)(uVar4 & 0xff) * 4) ^ *(uint *)(param_3 + 0x108);
    uVar4 = *(uint *)(&DAT_140279a90 + (ulonglong)(uVar4 >> 0x18) * 4) ^
            *(uint *)(&DAT_14027be90 + (ulonglong)(uVar5 >> 0x10 & 0xff) * 4) ^
            *(uint *)(&DAT_14027c290 + (ulonglong)(uVar6 >> 8 & 0xff) * 4) ^
            *(uint *)(&DAT_14027c690 + (ulonglong)(uVar7 & 0xff) * 4) ^ *(uint *)(param_3 + 0x10c);
    puVar1 = (uint *)(param_3 + 0x110);
    while (iVar9 = iVar9 + -1, iVar9 != 0) {
      uVar7 = *(uint *)(&DAT_14027be90 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027c290 + (ulonglong)(uVar2 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_140279a90 + (ulonglong)(uVar8 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027c690 + (ulonglong)(uVar3 & 0xff) * 4) ^ *puVar1;
      uVar6 = *(uint *)(&DAT_14027c290 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_140279a90 + (ulonglong)(uVar3 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027be90 + (ulonglong)(uVar8 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027c690 + (ulonglong)(uVar2 & 0xff) * 4) ^ puVar1[1];
      uVar5 = *(uint *)(&DAT_140279a90 + (ulonglong)(uVar2 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027be90 + (ulonglong)(uVar3 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027c290 + (ulonglong)(uVar8 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027c690 + (ulonglong)(uVar4 & 0xff) * 4) ^ puVar1[2];
      uVar4 = *(uint *)(&DAT_140279a90 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027be90 + (ulonglong)(uVar2 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027c290 + (ulonglong)(uVar3 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027c690 + (ulonglong)(uVar8 & 0xff) * 4) ^ puVar1[3];
      uVar8 = *(uint *)(&DAT_14027be90 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027c290 + (ulonglong)(uVar5 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_140279a90 + (ulonglong)(uVar7 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027c690 + (ulonglong)(uVar6 & 0xff) * 4) ^ puVar1[4];
      uVar3 = *(uint *)(&DAT_14027c290 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_140279a90 + (ulonglong)(uVar6 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027be90 + (ulonglong)(uVar7 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027c690 + (ulonglong)(uVar5 & 0xff) * 4) ^ puVar1[5];
      uVar2 = *(uint *)(&DAT_140279a90 + (ulonglong)(uVar5 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027be90 + (ulonglong)(uVar6 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027c290 + (ulonglong)(uVar7 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027c690 + (ulonglong)(uVar4 & 0xff) * 4) ^ puVar1[6];
      uVar4 = *(uint *)(&DAT_140279a90 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027be90 + (ulonglong)(uVar5 >> 0x10 & 0xff) * 4) ^
              *(uint *)(&DAT_14027c290 + (ulonglong)(uVar6 >> 8 & 0xff) * 4) ^
              *(uint *)(&DAT_14027c690 + (ulonglong)(uVar7 & 0xff) * 4) ^ puVar1[7];
      puVar1 = puVar1 + 8;
    }
    uVar5 = *(uint *)(&DAT_140279e90 + (ulonglong)(uVar4 >> 0x10 & 0xff) * 4) & 0xff0000 ^
            *(uint *)(&DAT_140279e90 + (ulonglong)(uVar2 >> 8 & 0xff) * 4) & 0xff00 ^
            *(uint *)(&DAT_140279e90 + (ulonglong)(uVar8 >> 0x18) * 4) & 0xff000000 ^
            (uint)(byte)(&DAT_140279e90)[(ulonglong)(uVar3 & 0xff) * 4] ^ *puVar1;
    param_2[3] = (char)uVar5;
    *param_2 = (char)(uVar5 >> 0x18);
    param_2[1] = (char)(uVar5 >> 0x10);
    param_2[2] = (char)(uVar5 >> 8);
    uVar5 = *(uint *)(&DAT_140279e90 + (ulonglong)(uVar8 >> 0x10 & 0xff) * 4) & 0xff0000 ^
            *(uint *)(&DAT_140279e90 + (ulonglong)(uVar4 >> 8 & 0xff) * 4) & 0xff00 ^
            *(uint *)(&DAT_140279e90 + (ulonglong)(uVar3 >> 0x18) * 4) & 0xff000000 ^
            (uint)(byte)(&DAT_140279e90)[(ulonglong)(uVar2 & 0xff) * 4] ^ puVar1[1];
    param_2[7] = (char)uVar5;
    param_2[4] = (char)(uVar5 >> 0x18);
    param_2[5] = (char)(uVar5 >> 0x10);
    param_2[6] = (char)(uVar5 >> 8);
    uVar5 = *(uint *)(&DAT_140279e90 + (ulonglong)(uVar3 >> 0x10 & 0xff) * 4) & 0xff0000 ^
            *(uint *)(&DAT_140279e90 + (ulonglong)(uVar2 >> 0x18) * 4) & 0xff000000 ^
            *(uint *)(&DAT_140279e90 + (ulonglong)(uVar8 >> 8 & 0xff) * 4) & 0xff00 ^
            (uint)(byte)(&DAT_140279e90)[(ulonglong)(uVar4 & 0xff) * 4] ^ puVar1[2];
    param_2[0xb] = (char)uVar5;
    param_2[8] = (char)(uVar5 >> 0x18);
    param_2[9] = (char)(uVar5 >> 0x10);
    param_2[10] = (char)(uVar5 >> 8);
    uVar8 = *(uint *)(&DAT_140279e90 + (ulonglong)(uVar2 >> 0x10 & 0xff) * 4) & 0xff0000 ^
            *(uint *)(&DAT_140279e90 + (ulonglong)(uVar4 >> 0x18) * 4) & 0xff000000 ^
            *(uint *)(&DAT_140279e90 + (ulonglong)(uVar3 >> 8 & 0xff) * 4) & 0xff00 ^
            (uint)(byte)(&DAT_140279e90)[(ulonglong)(uVar8 & 0xff) * 4] ^ puVar1[3];
    param_2[0xf] = (char)uVar8;
    param_2[0xc] = (char)(uVar8 >> 0x18);
    param_2[0xd] = (char)(uVar8 >> 0x10);
    param_2[0xe] = (char)(uVar8 >> 8);
    return 0;
  }
  return 0x10;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401ecf20(longlong param_1,longlong param_2)

{
  undefined1 uVar1;
  undefined1 uVar2;
  int iVar3;
  int iVar4;
  longlong lVar5;
  uint uVar6;
  int *piVar7;
  uint uVar8;
  uint uVar9;
  undefined1 *puVar10;
  undefined1 *puVar11;
  uint uVar12;
  uint uVar13;
  uint uVar14;
  uint uVar15;
  uint uVar16;
  uint uVar17;
  uint uVar18;
  uint uVar19;
  undefined1 local_158 [16];
  longlong local_148;
  undefined1 auStack_13a [2];
  undefined1 local_138 [4];
  undefined1 local_134 [4];
  undefined1 local_130 [4];
  uint local_12c [5];
  int local_118;
  int local_114 [14];
  int local_dc;
  int local_d8;
  int local_d4;
  int local_d0;
  int local_cc;
  int local_c8;
  int local_c4;
  int local_c0;
  int local_bc;
  int local_b8;
  int local_b4;
  int local_b0;
  int local_ac;
  int local_a8;
  int local_a4;
  int local_a0;
  int local_9c;
  int local_98;
  int local_94;
  int local_90;
  int local_8c;
  int local_88;
  int local_84;
  int local_80;
  int local_7c;
  int local_78;
  int local_74;
  int local_70;
  int local_6c;
  int local_68;
  int local_64;
  int local_60;
  int local_5c;
  int local_58;
  int local_54;
  int local_50;
  int local_4c;
  int local_48;
  int local_44;
  int local_40;
  int local_3c;
  ulonglong local_38;
  
  local_38 = DAT_1403223c0 ^ (ulonglong)local_158;
  uVar6 = *(uint *)(param_1 + 0x1c);
  uVar17 = *(uint *)(param_1 + 8);
  uVar16 = *(uint *)(param_1 + 0xc);
  uVar8 = *(uint *)(param_1 + 0x10);
  iVar3 = *(int *)(param_1 + 0x14);
  uVar9 = *(uint *)(param_1 + 0x18);
  uVar13 = *(uint *)(param_1 + 0x20);
  iVar4 = *(int *)(param_1 + 0x24);
  lVar5 = 4;
  puVar10 = (undefined1 *)(param_2 + 2);
  local_148 = param_1;
  do {
    puVar11 = puVar10 + 0x10;
    uVar1 = puVar10[3];
    *(uint *)(puVar11 + (longlong)(local_158 + (0xe - param_2))) =
         CONCAT31(CONCAT21(CONCAT11(puVar10[-2],puVar10[-1]),*puVar10),puVar10[1]);
    uVar2 = puVar10[7];
    *(uint *)(puVar11 + (longlong)&local_148 + (2 - param_2)) =
         CONCAT31(CONCAT21(CONCAT11(puVar10[2],uVar1),puVar10[4]),puVar10[5]);
    uVar1 = puVar10[0xb];
    *(uint *)(puVar11 + (longlong)&local_148 + (6 - param_2)) =
         CONCAT31(CONCAT21(CONCAT11(puVar10[6],uVar2),puVar10[8]),puVar10[9]);
    lVar5 = lVar5 + -1;
    *(uint *)(puVar11 + (longlong)local_12c + (-0x12 - param_2)) =
         CONCAT31(CONCAT21(CONCAT11(puVar10[10],uVar1),puVar10[0xc]),puVar10[0xd]);
    puVar10 = puVar11;
  } while (lVar5 != 0);
  piVar7 = (int *)local_138;
  lVar5 = 0xc;
  do {
    uVar15 = piVar7[1];
    uVar14 = piVar7[2];
    uVar12 = piVar7[0xe];
    uVar19 = piVar7[3];
    uVar18 = piVar7[0xf];
    uVar12 = ((uVar12 >> 0x13 | uVar12 << 0xd) ^ (uVar12 >> 0x11 | uVar12 << 0xf) ^ uVar12 >> 10) +
             ((uVar15 >> 0x12 | uVar15 << 0xe) ^ (uVar15 >> 7 | uVar15 << 0x19) ^ uVar15 >> 3) +
             piVar7[9] + *piVar7;
    piVar7[0x10] = uVar12;
    uVar15 = ((uVar18 >> 0x13 | uVar18 << 0xd) ^ (uVar18 >> 0x11 | uVar18 << 0xf) ^ uVar18 >> 10) +
             ((uVar14 >> 0x12 | uVar14 << 0xe) ^ (uVar14 >> 7 | uVar14 << 0x19) ^ uVar14 >> 3) +
             piVar7[10] + uVar15;
    piVar7[0x11] = uVar15;
    piVar7[0x12] = ((uVar12 >> 0x13 | uVar12 * 0x2000) ^ (uVar12 >> 0x11 | uVar12 * 0x8000) ^
                   uVar12 >> 10) +
                   ((uVar19 >> 0x12 | uVar19 << 0xe) ^ (uVar19 >> 7 | uVar19 << 0x19) ^ uVar19 >> 3)
                   + piVar7[0xb] + uVar14;
    uVar14 = piVar7[4];
    piVar7[0x13] = ((uVar15 >> 0x13 | uVar15 * 0x2000) ^ (uVar15 >> 0x11 | uVar15 * 0x8000) ^
                   uVar15 >> 10) +
                   ((uVar14 >> 0x12 | uVar14 << 0xe) ^ (uVar14 >> 7 | uVar14 << 0x19) ^ uVar14 >> 3)
                   + piVar7[0xc] + uVar19;
    piVar7 = piVar7 + 4;
    lVar5 = lVar5 + -1;
  } while (lVar5 != 0);
  iVar4 = ((uVar6 ^ uVar13) & uVar9 ^ uVar13) +
          ((uVar9 >> 0x19 | uVar9 << 7) ^ (uVar9 >> 0xb | uVar9 << 0x15) ^
          (uVar9 >> 6 | uVar9 << 0x1a)) + (int)local_138 + 0x428a2f98 + iVar4;
  uVar19 = iVar3 + iVar4;
  uVar15 = ((uVar16 | uVar17) & uVar8 | uVar16 & uVar17) +
           iVar4 + ((uVar17 >> 0x16 | uVar17 << 10) ^ (uVar17 >> 0xd | uVar17 << 0x13) ^
                   (uVar17 >> 2 | uVar17 << 0x1e));
  iVar4 = ((uVar6 ^ uVar9) & uVar19 ^ uVar6) +
          ((uVar19 >> 0x19 | uVar19 * 0x80) ^ (uVar19 >> 0xb | uVar19 * 0x200000) ^
          (uVar19 >> 6 | uVar19 * 0x4000000)) + (int)local_134 + 0x71374491 + uVar13;
  uVar8 = uVar8 + iVar4;
  uVar14 = ((uVar17 | uVar15) & uVar16 | uVar17 & uVar15) +
           iVar4 + ((uVar15 >> 0x16 | uVar15 * 0x400) ^ (uVar15 >> 0xd | uVar15 * 0x80000) ^
                   (uVar15 >> 2 | uVar15 * 0x40000000));
  iVar4 = ((uVar19 ^ uVar9) & uVar8 ^ uVar9) +
          ((uVar8 >> 0x19 | uVar8 * 0x80) ^ (uVar8 >> 0xb | uVar8 * 0x200000) ^
          (uVar8 >> 6 | uVar8 * 0x4000000)) + (int)local_130 + -0x4a3f0431 + uVar6;
  uVar16 = uVar16 + iVar4;
  uVar12 = ((uVar14 | uVar15) & uVar17 | uVar14 & uVar15) +
           iVar4 + ((uVar14 >> 0x16 | uVar14 * 0x400) ^ (uVar14 >> 0xd | uVar14 * 0x80000) ^
                   (uVar14 >> 2 | uVar14 * 0x40000000));
  iVar4 = ((uVar19 ^ uVar8) & uVar16 ^ uVar19) +
          ((uVar16 >> 0x19 | uVar16 * 0x80) ^ (uVar16 >> 0xb | uVar16 * 0x200000) ^
          (uVar16 >> 6 | uVar16 * 0x4000000)) + local_12c[0] + -0x164a245b + uVar9;
  uVar17 = uVar17 + iVar4;
  uVar6 = ((uVar12 | uVar14) & uVar15 | uVar12 & uVar14) +
          iVar4 + ((uVar12 >> 0x16 | uVar12 * 0x400) ^ (uVar12 >> 0xd | uVar12 * 0x80000) ^
                  (uVar12 >> 2 | uVar12 * 0x40000000));
  iVar4 = ((uVar8 ^ uVar16) & uVar17 ^ uVar8) +
          ((uVar17 >> 0x19 | uVar17 * 0x80) ^ (uVar17 >> 0xb | uVar17 * 0x200000) ^
          (uVar17 >> 6 | uVar17 * 0x4000000)) + local_12c[1] + 0x3956c25b + uVar19;
  uVar15 = uVar15 + iVar4;
  uVar9 = ((uVar12 | uVar6) & uVar14 | uVar12 & uVar6) +
          iVar4 + ((uVar6 >> 0x16 | uVar6 * 0x400) ^ (uVar6 >> 0xd | uVar6 * 0x80000) ^
                  (uVar6 >> 2 | uVar6 * 0x40000000));
  iVar4 = ((uVar16 ^ uVar17) & uVar15 ^ uVar16) +
          ((uVar15 >> 0x19 | uVar15 * 0x80) ^ (uVar15 >> 0xb | uVar15 * 0x200000) ^
          (uVar15 >> 6 | uVar15 * 0x4000000)) + local_12c[2] + 0x59f111f1 + uVar8;
  uVar14 = uVar14 + iVar4;
  uVar8 = ((uVar9 | uVar6) & uVar12 | uVar9 & uVar6) +
          iVar4 + ((uVar9 >> 0x16 | uVar9 * 0x400) ^ (uVar9 >> 0xd | uVar9 * 0x80000) ^
                  (uVar9 >> 2 | uVar9 * 0x40000000));
  iVar4 = ((uVar17 ^ uVar15) & uVar14 ^ uVar17) +
          ((uVar14 >> 0x19 | uVar14 * 0x80) ^ (uVar14 >> 0xb | uVar14 * 0x200000) ^
          (uVar14 >> 6 | uVar14 * 0x4000000)) + local_12c[3] + -0x6dc07d5c + uVar16;
  uVar12 = uVar12 + iVar4;
  uVar19 = ((uVar9 | uVar8) & uVar6 | uVar9 & uVar8) +
           iVar4 + ((uVar8 >> 0x16 | uVar8 * 0x400) ^ (uVar8 >> 0xd | uVar8 * 0x80000) ^
                   (uVar8 >> 2 | uVar8 * 0x40000000));
  iVar4 = ((uVar14 ^ uVar15) & uVar12 ^ uVar15) +
          ((uVar12 >> 0x19 | uVar12 * 0x80) ^ (uVar12 >> 0xb | uVar12 * 0x200000) ^
          (uVar12 >> 6 | uVar12 * 0x4000000)) + local_12c[4] + -0x54e3a12b + uVar17;
  uVar6 = uVar6 + iVar4;
  uVar18 = ((uVar8 | uVar19) & uVar9 | uVar8 & uVar19) +
           iVar4 + ((uVar19 >> 0x16 | uVar19 * 0x400) ^ (uVar19 >> 0xd | uVar19 * 0x80000) ^
                   (uVar19 >> 2 | uVar19 * 0x40000000));
  iVar4 = ((uVar12 ^ uVar14) & uVar6 ^ uVar14) +
          ((uVar6 >> 0x19 | uVar6 * 0x80) ^ (uVar6 >> 0xb | uVar6 * 0x200000) ^
          (uVar6 >> 6 | uVar6 * 0x4000000)) + local_118 + -0x27f85568 + uVar15;
  uVar9 = uVar9 + iVar4;
  uVar13 = ((uVar19 | uVar18) & uVar8 | uVar19 & uVar18) +
           iVar4 + ((uVar18 >> 0x16 | uVar18 * 0x400) ^ (uVar18 >> 0xd | uVar18 * 0x80000) ^
                   (uVar18 >> 2 | uVar18 * 0x40000000));
  iVar4 = ((uVar12 ^ uVar6) & uVar9 ^ uVar12) +
          ((uVar9 >> 0x19 | uVar9 * 0x80) ^ (uVar9 >> 0xb | uVar9 * 0x200000) ^
          (uVar9 >> 6 | uVar9 * 0x4000000)) + local_114[0] + 0x12835b01 + uVar14;
  uVar8 = uVar8 + iVar4;
  uVar15 = ((uVar18 | uVar13) & uVar19 | uVar18 & uVar13) +
           iVar4 + ((uVar13 >> 0x16 | uVar13 * 0x400) ^ (uVar13 >> 0xd | uVar13 * 0x80000) ^
                   (uVar13 >> 2 | uVar13 * 0x40000000));
  iVar4 = ((uVar9 ^ uVar6) & uVar8 ^ uVar6) +
          ((uVar8 >> 0x19 | uVar8 * 0x80) ^ (uVar8 >> 0xb | uVar8 * 0x200000) ^
          (uVar8 >> 6 | uVar8 * 0x4000000)) + local_114[1] + 0x243185be + uVar12;
  uVar19 = uVar19 + iVar4;
  uVar14 = ((uVar15 | uVar13) & uVar18 | uVar15 & uVar13) +
           iVar4 + ((uVar15 >> 0x16 | uVar15 * 0x400) ^ (uVar15 >> 0xd | uVar15 * 0x80000) ^
                   (uVar15 >> 2 | uVar15 * 0x40000000));
  iVar4 = ((uVar9 ^ uVar8) & uVar19 ^ uVar9) +
          ((uVar19 >> 0x19 | uVar19 * 0x80) ^ (uVar19 >> 0xb | uVar19 * 0x200000) ^
          (uVar19 >> 6 | uVar19 * 0x4000000)) + local_114[2] + 0x550c7dc3 + uVar6;
  uVar18 = uVar18 + iVar4;
  uVar6 = ((uVar14 | uVar15) & uVar13 | uVar14 & uVar15) +
          iVar4 + ((uVar14 >> 0x16 | uVar14 * 0x400) ^ (uVar14 >> 0xd | uVar14 * 0x80000) ^
                  (uVar14 >> 2 | uVar14 * 0x40000000));
  iVar4 = ((uVar8 ^ uVar19) & uVar18 ^ uVar8) +
          ((uVar18 >> 0x19 | uVar18 * 0x80) ^ (uVar18 >> 0xb | uVar18 * 0x200000) ^
          (uVar18 >> 6 | uVar18 * 0x4000000)) + local_114[3] + 0x72be5d74 + uVar9;
  uVar13 = uVar13 + iVar4;
  uVar16 = ((uVar14 | uVar6) & uVar15 | uVar14 & uVar6) +
           iVar4 + ((uVar6 >> 0x16 | uVar6 * 0x400) ^ (uVar6 >> 0xd | uVar6 * 0x80000) ^
                   (uVar6 >> 2 | uVar6 * 0x40000000));
  iVar4 = ((uVar19 ^ uVar18) & uVar13 ^ uVar19) +
          ((uVar13 >> 0x19 | uVar13 * 0x80) ^ (uVar13 >> 0xb | uVar13 * 0x200000) ^
          (uVar13 >> 6 | uVar13 * 0x4000000)) + local_114[4] + -0x7f214e02 + uVar8;
  uVar15 = uVar15 + iVar4;
  uVar17 = ((uVar16 | uVar6) & uVar14 | uVar16 & uVar6) +
           iVar4 + ((uVar16 >> 0x16 | uVar16 * 0x400) ^ (uVar16 >> 0xd | uVar16 * 0x80000) ^
                   (uVar16 >> 2 | uVar16 * 0x40000000));
  iVar4 = ((uVar18 ^ uVar13) & uVar15 ^ uVar18) +
          ((uVar15 >> 0x19 | uVar15 * 0x80) ^ (uVar15 >> 0xb | uVar15 * 0x200000) ^
          (uVar15 >> 6 | uVar15 * 0x4000000)) + local_114[5] + -0x6423f959 + uVar19;
  uVar14 = uVar14 + iVar4;
  uVar12 = ((uVar16 | uVar17) & uVar6 | uVar16 & uVar17) +
           iVar4 + ((uVar17 >> 0x16 | uVar17 * 0x400) ^ (uVar17 >> 0xd | uVar17 * 0x80000) ^
                   (uVar17 >> 2 | uVar17 * 0x40000000));
  iVar4 = ((uVar15 ^ uVar13) & uVar14 ^ uVar13) +
          ((uVar14 >> 0x19 | uVar14 * 0x80) ^ (uVar14 >> 0xb | uVar14 * 0x200000) ^
          (uVar14 >> 6 | uVar14 * 0x4000000)) + local_114[6] + -0x3e640e8c + uVar18;
  uVar6 = uVar6 + iVar4;
  uVar19 = ((uVar17 | uVar12) & uVar16 | uVar17 & uVar12) +
           iVar4 + ((uVar12 >> 0x16 | uVar12 * 0x400) ^ (uVar12 >> 0xd | uVar12 * 0x80000) ^
                   (uVar12 >> 2 | uVar12 * 0x40000000));
  iVar4 = ((uVar14 ^ uVar15) & uVar6 ^ uVar15) +
          ((uVar6 >> 0x19 | uVar6 * 0x80) ^ (uVar6 >> 0xb | uVar6 * 0x200000) ^
          (uVar6 >> 6 | uVar6 * 0x4000000)) + local_114[7] + -0x1b64963f + uVar13;
  uVar16 = uVar16 + iVar4;
  uVar8 = ((uVar12 | uVar19) & uVar17 | uVar12 & uVar19) +
          iVar4 + ((uVar19 >> 0x16 | uVar19 * 0x400) ^ (uVar19 >> 0xd | uVar19 * 0x80000) ^
                  (uVar19 >> 2 | uVar19 * 0x40000000));
  iVar4 = ((uVar14 ^ uVar6) & uVar16 ^ uVar14) +
          ((uVar16 >> 0x19 | uVar16 * 0x80) ^ (uVar16 >> 0xb | uVar16 * 0x200000) ^
          (uVar16 >> 6 | uVar16 * 0x4000000)) + local_114[8] + -0x1041b87a + uVar15;
  uVar17 = uVar17 + iVar4;
  uVar9 = ((uVar19 | uVar8) & uVar12 | uVar19 & uVar8) +
          iVar4 + ((uVar8 >> 0x16 | uVar8 * 0x400) ^ (uVar8 >> 0xd | uVar8 * 0x80000) ^
                  (uVar8 >> 2 | uVar8 * 0x40000000));
  iVar4 = ((uVar16 ^ uVar6) & uVar17 ^ uVar6) +
          ((uVar17 >> 0x19 | uVar17 * 0x80) ^ (uVar17 >> 0xb | uVar17 * 0x200000) ^
          (uVar17 >> 6 | uVar17 * 0x4000000)) + local_114[9] + 0xfc19dc6 + uVar14;
  uVar12 = uVar12 + iVar4;
  uVar13 = ((uVar9 | uVar8) & uVar19 | uVar9 & uVar8) +
           iVar4 + ((uVar9 >> 0x16 | uVar9 * 0x400) ^ (uVar9 >> 0xd | uVar9 * 0x80000) ^
                   (uVar9 >> 2 | uVar9 * 0x40000000));
  iVar4 = ((uVar16 ^ uVar17) & uVar12 ^ uVar16) +
          ((uVar12 >> 0x19 | uVar12 * 0x80) ^ (uVar12 >> 0xb | uVar12 * 0x200000) ^
          (uVar12 >> 6 | uVar12 * 0x4000000)) + local_114[10] + 0x240ca1cc + uVar6;
  uVar19 = uVar19 + iVar4;
  uVar6 = ((uVar13 | uVar9) & uVar8 | uVar13 & uVar9) +
          iVar4 + ((uVar13 >> 0x16 | uVar13 * 0x400) ^ (uVar13 >> 0xd | uVar13 * 0x80000) ^
                  (uVar13 >> 2 | uVar13 * 0x40000000));
  iVar4 = ((uVar17 ^ uVar12) & uVar19 ^ uVar17) +
          ((uVar19 >> 0x19 | uVar19 * 0x80) ^ (uVar19 >> 0xb | uVar19 * 0x200000) ^
          (uVar19 >> 6 | uVar19 * 0x4000000)) + local_114[0xb] + 0x2de92c6f + uVar16;
  uVar8 = uVar8 + iVar4;
  uVar16 = ((uVar13 | uVar6) & uVar9 | uVar13 & uVar6) +
           iVar4 + ((uVar6 >> 0x16 | uVar6 * 0x400) ^ (uVar6 >> 0xd | uVar6 * 0x80000) ^
                   (uVar6 >> 2 | uVar6 * 0x40000000));
  iVar4 = ((uVar12 ^ uVar19) & uVar8 ^ uVar12) +
          ((uVar8 >> 0x19 | uVar8 * 0x80) ^ (uVar8 >> 0xb | uVar8 * 0x200000) ^
          (uVar8 >> 6 | uVar8 * 0x4000000)) + local_114[0xc] + 0x4a7484aa + uVar17;
  uVar9 = uVar9 + iVar4;
  uVar17 = ((uVar16 | uVar6) & uVar13 | uVar16 & uVar6) +
           iVar4 + ((uVar16 >> 0x16 | uVar16 * 0x400) ^ (uVar16 >> 0xd | uVar16 * 0x80000) ^
                   (uVar16 >> 2 | uVar16 * 0x40000000));
  iVar4 = ((uVar19 ^ uVar8) & uVar9 ^ uVar19) +
          ((uVar9 >> 0x19 | uVar9 * 0x80) ^ (uVar9 >> 0xb | uVar9 * 0x200000) ^
          (uVar9 >> 6 | uVar9 * 0x4000000)) + local_114[0xd] + 0x5cb0a9dc + uVar12;
  uVar13 = uVar13 + iVar4;
  uVar15 = ((uVar16 | uVar17) & uVar6 | uVar16 & uVar17) +
           iVar4 + ((uVar17 >> 0x16 | uVar17 * 0x400) ^ (uVar17 >> 0xd | uVar17 * 0x80000) ^
                   (uVar17 >> 2 | uVar17 * 0x40000000));
  iVar4 = ((uVar9 ^ uVar8) & uVar13 ^ uVar8) +
          ((uVar13 >> 0x19 | uVar13 * 0x80) ^ (uVar13 >> 0xb | uVar13 * 0x200000) ^
          (uVar13 >> 6 | uVar13 * 0x4000000)) + local_dc + 0x76f988da + uVar19;
  uVar6 = uVar6 + iVar4;
  uVar14 = ((uVar17 | uVar15) & uVar16 | uVar17 & uVar15) +
           iVar4 + ((uVar15 >> 0x16 | uVar15 * 0x400) ^ (uVar15 >> 0xd | uVar15 * 0x80000) ^
                   (uVar15 >> 2 | uVar15 * 0x40000000));
  iVar4 = ((uVar13 ^ uVar9) & uVar6 ^ uVar9) +
          ((uVar6 >> 0x19 | uVar6 * 0x80) ^ (uVar6 >> 0xb | uVar6 * 0x200000) ^
          (uVar6 >> 6 | uVar6 * 0x4000000)) + local_d8 + -0x67c1aeae + uVar8;
  uVar16 = uVar16 + iVar4;
  uVar8 = ((uVar15 | uVar14) & uVar17 | uVar15 & uVar14) +
          iVar4 + ((uVar14 >> 0x16 | uVar14 * 0x400) ^ (uVar14 >> 0xd | uVar14 * 0x80000) ^
                  (uVar14 >> 2 | uVar14 * 0x40000000));
  iVar4 = ((uVar13 ^ uVar6) & uVar16 ^ uVar13) +
          ((uVar16 >> 0x19 | uVar16 * 0x80) ^ (uVar16 >> 0xb | uVar16 * 0x200000) ^
          (uVar16 >> 6 | uVar16 * 0x4000000)) + local_d4 + -0x57ce3993 + uVar9;
  uVar17 = uVar17 + iVar4;
  uVar9 = ((uVar14 | uVar8) & uVar15 | uVar14 & uVar8) +
          iVar4 + ((uVar8 >> 0x16 | uVar8 * 0x400) ^ (uVar8 >> 0xd | uVar8 * 0x80000) ^
                  (uVar8 >> 2 | uVar8 * 0x40000000));
  iVar4 = ((uVar16 ^ uVar6) & uVar17 ^ uVar6) +
          ((uVar17 >> 0x19 | uVar17 * 0x80) ^ (uVar17 >> 0xb | uVar17 * 0x200000) ^
          (uVar17 >> 6 | uVar17 * 0x4000000)) + local_d0 + -0x4ffcd838 + uVar13;
  uVar15 = uVar15 + iVar4;
  uVar13 = ((uVar9 | uVar8) & uVar14 | uVar9 & uVar8) +
           iVar4 + ((uVar9 >> 0x16 | uVar9 * 0x400) ^ (uVar9 >> 0xd | uVar9 * 0x80000) ^
                   (uVar9 >> 2 | uVar9 * 0x40000000));
  iVar4 = ((uVar16 ^ uVar17) & uVar15 ^ uVar16) +
          ((uVar15 >> 0x19 | uVar15 * 0x80) ^ (uVar15 >> 0xb | uVar15 * 0x200000) ^
          (uVar15 >> 6 | uVar15 * 0x4000000)) + local_cc + -0x40a68039 + uVar6;
  uVar14 = uVar14 + iVar4;
  uVar6 = ((uVar13 | uVar9) & uVar8 | uVar13 & uVar9) +
          iVar4 + ((uVar13 >> 0x16 | uVar13 * 0x400) ^ (uVar13 >> 0xd | uVar13 * 0x80000) ^
                  (uVar13 >> 2 | uVar13 * 0x40000000));
  iVar4 = ((uVar17 ^ uVar15) & uVar14 ^ uVar17) +
          ((uVar14 >> 0x19 | uVar14 * 0x80) ^ (uVar14 >> 0xb | uVar14 * 0x200000) ^
          (uVar14 >> 6 | uVar14 * 0x4000000)) + local_c8 + -0x391ff40d + uVar16;
  uVar8 = uVar8 + iVar4;
  uVar16 = ((uVar13 | uVar6) & uVar9 | uVar13 & uVar6) +
           iVar4 + ((uVar6 >> 0x16 | uVar6 * 0x400) ^ (uVar6 >> 0xd | uVar6 * 0x80000) ^
                   (uVar6 >> 2 | uVar6 * 0x40000000));
  iVar4 = ((uVar15 ^ uVar14) & uVar8 ^ uVar15) +
          ((uVar8 >> 0x19 | uVar8 * 0x80) ^ (uVar8 >> 0xb | uVar8 * 0x200000) ^
          (uVar8 >> 6 | uVar8 * 0x4000000)) + local_c4 + -0x2a586eb9 + uVar17;
  uVar9 = uVar9 + iVar4;
  uVar17 = ((uVar16 | uVar6) & uVar13 | uVar16 & uVar6) +
           iVar4 + ((uVar16 >> 0x16 | uVar16 * 0x400) ^ (uVar16 >> 0xd | uVar16 * 0x80000) ^
                   (uVar16 >> 2 | uVar16 * 0x40000000));
  iVar4 = ((uVar14 ^ uVar8) & uVar9 ^ uVar14) +
          ((uVar9 >> 0x19 | uVar9 * 0x80) ^ (uVar9 >> 0xb | uVar9 * 0x200000) ^
          (uVar9 >> 6 | uVar9 * 0x4000000)) + local_c0 + 0x6ca6351 + uVar15;
  uVar13 = uVar13 + iVar4;
  uVar15 = ((uVar16 | uVar17) & uVar6 | uVar16 & uVar17) +
           iVar4 + ((uVar17 >> 0x16 | uVar17 * 0x400) ^ (uVar17 >> 0xd | uVar17 * 0x80000) ^
                   (uVar17 >> 2 | uVar17 * 0x40000000));
  iVar4 = ((uVar9 ^ uVar8) & uVar13 ^ uVar8) +
          ((uVar13 >> 0x19 | uVar13 * 0x80) ^ (uVar13 >> 0xb | uVar13 * 0x200000) ^
          (uVar13 >> 6 | uVar13 * 0x4000000)) + local_bc + 0x14292967 + uVar14;
  uVar6 = uVar6 + iVar4;
  uVar14 = ((uVar17 | uVar15) & uVar16 | uVar17 & uVar15) +
           iVar4 + ((uVar15 >> 0x16 | uVar15 * 0x400) ^ (uVar15 >> 0xd | uVar15 * 0x80000) ^
                   (uVar15 >> 2 | uVar15 * 0x40000000));
  iVar4 = ((uVar13 ^ uVar9) & uVar6 ^ uVar9) +
          ((uVar6 >> 0x19 | uVar6 * 0x80) ^ (uVar6 >> 0xb | uVar6 * 0x200000) ^
          (uVar6 >> 6 | uVar6 * 0x4000000)) + local_b8 + 0x27b70a85 + uVar8;
  uVar16 = uVar16 + iVar4;
  uVar8 = ((uVar15 | uVar14) & uVar17 | uVar15 & uVar14) +
          iVar4 + ((uVar14 >> 0x16 | uVar14 * 0x400) ^ (uVar14 >> 0xd | uVar14 * 0x80000) ^
                  (uVar14 >> 2 | uVar14 * 0x40000000));
  iVar4 = ((uVar13 ^ uVar6) & uVar16 ^ uVar13) +
          ((uVar16 >> 0x19 | uVar16 * 0x80) ^ (uVar16 >> 0xb | uVar16 * 0x200000) ^
          (uVar16 >> 6 | uVar16 * 0x4000000)) + local_b4 + 0x2e1b2138 + uVar9;
  uVar17 = uVar17 + iVar4;
  uVar9 = ((uVar14 | uVar8) & uVar15 | uVar14 & uVar8) +
          iVar4 + ((uVar8 >> 0x16 | uVar8 * 0x400) ^ (uVar8 >> 0xd | uVar8 * 0x80000) ^
                  (uVar8 >> 2 | uVar8 * 0x40000000));
  iVar4 = ((uVar16 ^ uVar6) & uVar17 ^ uVar6) +
          ((uVar17 >> 0x19 | uVar17 * 0x80) ^ (uVar17 >> 0xb | uVar17 * 0x200000) ^
          (uVar17 >> 6 | uVar17 * 0x4000000)) + local_b0 + 0x4d2c6dfc + uVar13;
  uVar15 = uVar15 + iVar4;
  uVar13 = ((uVar9 | uVar8) & uVar14 | uVar9 & uVar8) +
           iVar4 + ((uVar9 >> 0x16 | uVar9 * 0x400) ^ (uVar9 >> 0xd | uVar9 * 0x80000) ^
                   (uVar9 >> 2 | uVar9 * 0x40000000));
  iVar4 = ((uVar16 ^ uVar17) & uVar15 ^ uVar16) +
          ((uVar15 >> 0x19 | uVar15 * 0x80) ^ (uVar15 >> 0xb | uVar15 * 0x200000) ^
          (uVar15 >> 6 | uVar15 * 0x4000000)) + local_ac + 0x53380d13 + uVar6;
  uVar14 = uVar14 + iVar4;
  uVar6 = ((uVar13 | uVar9) & uVar8 | uVar13 & uVar9) +
          iVar4 + ((uVar13 >> 0x16 | uVar13 * 0x400) ^ (uVar13 >> 0xd | uVar13 * 0x80000) ^
                  (uVar13 >> 2 | uVar13 * 0x40000000));
  iVar4 = ((uVar17 ^ uVar15) & uVar14 ^ uVar17) +
          ((uVar14 >> 0x19 | uVar14 * 0x80) ^ (uVar14 >> 0xb | uVar14 * 0x200000) ^
          (uVar14 >> 6 | uVar14 * 0x4000000)) + local_a8 + 0x650a7354 + uVar16;
  uVar8 = uVar8 + iVar4;
  uVar16 = ((uVar13 | uVar6) & uVar9 | uVar13 & uVar6) +
           iVar4 + ((uVar6 >> 0x16 | uVar6 * 0x400) ^ (uVar6 >> 0xd | uVar6 * 0x80000) ^
                   (uVar6 >> 2 | uVar6 * 0x40000000));
  iVar4 = ((uVar15 ^ uVar14) & uVar8 ^ uVar15) +
          ((uVar8 >> 0x19 | uVar8 * 0x80) ^ (uVar8 >> 0xb | uVar8 * 0x200000) ^
          (uVar8 >> 6 | uVar8 * 0x4000000)) + local_a4 + 0x766a0abb + uVar17;
  uVar9 = uVar9 + iVar4;
  uVar17 = ((uVar16 | uVar6) & uVar13 | uVar16 & uVar6) +
           iVar4 + ((uVar16 >> 0x16 | uVar16 * 0x400) ^ (uVar16 >> 0xd | uVar16 * 0x80000) ^
                   (uVar16 >> 2 | uVar16 * 0x40000000));
  iVar4 = ((uVar14 ^ uVar8) & uVar9 ^ uVar14) +
          ((uVar9 >> 0x19 | uVar9 * 0x80) ^ (uVar9 >> 0xb | uVar9 * 0x200000) ^
          (uVar9 >> 6 | uVar9 * 0x4000000)) + local_a0 + -0x7e3d36d2 + uVar15;
  uVar13 = uVar13 + iVar4;
  uVar15 = ((uVar16 | uVar17) & uVar6 | uVar16 & uVar17) +
           iVar4 + ((uVar17 >> 0x16 | uVar17 * 0x400) ^ (uVar17 >> 0xd | uVar17 * 0x80000) ^
                   (uVar17 >> 2 | uVar17 * 0x40000000));
  iVar4 = ((uVar9 ^ uVar8) & uVar13 ^ uVar8) +
          ((uVar13 >> 0x19 | uVar13 * 0x80) ^ (uVar13 >> 0xb | uVar13 * 0x200000) ^
          (uVar13 >> 6 | uVar13 * 0x4000000)) + local_9c + -0x6d8dd37b + uVar14;
  uVar6 = uVar6 + iVar4;
  uVar14 = ((uVar17 | uVar15) & uVar16 | uVar17 & uVar15) +
           iVar4 + ((uVar15 >> 0x16 | uVar15 * 0x400) ^ (uVar15 >> 0xd | uVar15 * 0x80000) ^
                   (uVar15 >> 2 | uVar15 * 0x40000000));
  iVar4 = ((uVar13 ^ uVar9) & uVar6 ^ uVar9) +
          ((uVar6 >> 0x19 | uVar6 * 0x80) ^ (uVar6 >> 0xb | uVar6 * 0x200000) ^
          (uVar6 >> 6 | uVar6 * 0x4000000)) + local_98 + -0x5d40175f + uVar8;
  uVar16 = uVar16 + iVar4;
  uVar8 = ((uVar15 | uVar14) & uVar17 | uVar15 & uVar14) +
          iVar4 + ((uVar14 >> 0x16 | uVar14 * 0x400) ^ (uVar14 >> 0xd | uVar14 * 0x80000) ^
                  (uVar14 >> 2 | uVar14 * 0x40000000));
  iVar4 = ((uVar13 ^ uVar6) & uVar16 ^ uVar13) +
          ((uVar16 >> 0x19 | uVar16 * 0x80) ^ (uVar16 >> 0xb | uVar16 * 0x200000) ^
          (uVar16 >> 6 | uVar16 * 0x4000000)) + local_94 + -0x57e599b5 + uVar9;
  uVar17 = uVar17 + iVar4;
  uVar9 = ((uVar14 | uVar8) & uVar15 | uVar14 & uVar8) +
          iVar4 + ((uVar8 >> 0x16 | uVar8 * 0x400) ^ (uVar8 >> 0xd | uVar8 * 0x80000) ^
                  (uVar8 >> 2 | uVar8 * 0x40000000));
  iVar4 = ((uVar16 ^ uVar6) & uVar17 ^ uVar6) +
          ((uVar17 >> 0x19 | uVar17 * 0x80) ^ (uVar17 >> 0xb | uVar17 * 0x200000) ^
          (uVar17 >> 6 | uVar17 * 0x4000000)) + local_90 + -0x3db47490 + uVar13;
  uVar15 = uVar15 + iVar4;
  uVar13 = ((uVar9 | uVar8) & uVar14 | uVar9 & uVar8) +
           iVar4 + ((uVar9 >> 0x16 | uVar9 * 0x400) ^ (uVar9 >> 0xd | uVar9 * 0x80000) ^
                   (uVar9 >> 2 | uVar9 * 0x40000000));
  iVar4 = ((uVar16 ^ uVar17) & uVar15 ^ uVar16) +
          ((uVar15 >> 0x19 | uVar15 * 0x80) ^ (uVar15 >> 0xb | uVar15 * 0x200000) ^
          (uVar15 >> 6 | uVar15 * 0x4000000)) + local_8c + -0x3893ae5d + uVar6;
  uVar14 = uVar14 + iVar4;
  uVar6 = ((uVar13 | uVar9) & uVar8 | uVar13 & uVar9) +
          iVar4 + ((uVar13 >> 0x16 | uVar13 * 0x400) ^ (uVar13 >> 0xd | uVar13 * 0x80000) ^
                  (uVar13 >> 2 | uVar13 * 0x40000000));
  iVar4 = ((uVar17 ^ uVar15) & uVar14 ^ uVar17) +
          ((uVar14 >> 0x19 | uVar14 * 0x80) ^ (uVar14 >> 0xb | uVar14 * 0x200000) ^
          (uVar14 >> 6 | uVar14 * 0x4000000)) + local_88 + -0x2e6d17e7 + uVar16;
  uVar8 = uVar8 + iVar4;
  uVar16 = ((uVar13 | uVar6) & uVar9 | uVar13 & uVar6) +
           iVar4 + ((uVar6 >> 0x16 | uVar6 * 0x400) ^ (uVar6 >> 0xd | uVar6 * 0x80000) ^
                   (uVar6 >> 2 | uVar6 * 0x40000000));
  iVar4 = ((uVar15 ^ uVar14) & uVar8 ^ uVar15) +
          ((uVar8 >> 0x19 | uVar8 * 0x80) ^ (uVar8 >> 0xb | uVar8 * 0x200000) ^
          (uVar8 >> 6 | uVar8 * 0x4000000)) + local_84 + -0x2966f9dc + uVar17;
  uVar9 = uVar9 + iVar4;
  uVar17 = ((uVar16 | uVar6) & uVar13 | uVar16 & uVar6) +
           iVar4 + ((uVar16 >> 0x16 | uVar16 * 0x400) ^ (uVar16 >> 0xd | uVar16 * 0x80000) ^
                   (uVar16 >> 2 | uVar16 * 0x40000000));
  iVar4 = ((uVar14 ^ uVar8) & uVar9 ^ uVar14) +
          ((uVar9 >> 0x19 | uVar9 * 0x80) ^ (uVar9 >> 0xb | uVar9 * 0x200000) ^
          (uVar9 >> 6 | uVar9 * 0x4000000)) + local_80 + -0xbf1ca7b + uVar15;
  uVar13 = uVar13 + iVar4;
  uVar15 = ((uVar16 | uVar17) & uVar6 | uVar16 & uVar17) +
           iVar4 + ((uVar17 >> 0x16 | uVar17 * 0x400) ^ (uVar17 >> 0xd | uVar17 * 0x80000) ^
                   (uVar17 >> 2 | uVar17 * 0x40000000));
  iVar4 = ((uVar9 ^ uVar8) & uVar13 ^ uVar8) +
          ((uVar13 >> 0x19 | uVar13 * 0x80) ^ (uVar13 >> 0xb | uVar13 * 0x200000) ^
          (uVar13 >> 6 | uVar13 * 0x4000000)) + local_7c + 0x106aa070 + uVar14;
  uVar6 = uVar6 + iVar4;
  uVar14 = ((uVar17 | uVar15) & uVar16 | uVar17 & uVar15) +
           iVar4 + ((uVar15 >> 0x16 | uVar15 * 0x400) ^ (uVar15 >> 0xd | uVar15 * 0x80000) ^
                   (uVar15 >> 2 | uVar15 * 0x40000000));
  iVar4 = ((uVar13 ^ uVar9) & uVar6 ^ uVar9) +
          ((uVar6 >> 0x19 | uVar6 * 0x80) ^ (uVar6 >> 0xb | uVar6 * 0x200000) ^
          (uVar6 >> 6 | uVar6 * 0x4000000)) + local_78 + 0x19a4c116 + uVar8;
  uVar16 = uVar16 + iVar4;
  uVar8 = ((uVar15 | uVar14) & uVar17 | uVar15 & uVar14) +
          iVar4 + ((uVar14 >> 0x16 | uVar14 * 0x400) ^ (uVar14 >> 0xd | uVar14 * 0x80000) ^
                  (uVar14 >> 2 | uVar14 * 0x40000000));
  iVar4 = ((uVar13 ^ uVar6) & uVar16 ^ uVar13) +
          ((uVar16 >> 0x19 | uVar16 * 0x80) ^ (uVar16 >> 0xb | uVar16 * 0x200000) ^
          (uVar16 >> 6 | uVar16 * 0x4000000)) + local_74 + 0x1e376c08 + uVar9;
  uVar17 = uVar17 + iVar4;
  uVar9 = ((uVar14 | uVar8) & uVar15 | uVar14 & uVar8) +
          iVar4 + ((uVar8 >> 0x16 | uVar8 * 0x400) ^ (uVar8 >> 0xd | uVar8 * 0x80000) ^
                  (uVar8 >> 2 | uVar8 * 0x40000000));
  iVar4 = ((uVar16 ^ uVar6) & uVar17 ^ uVar6) +
          ((uVar17 >> 0x19 | uVar17 * 0x80) ^ (uVar17 >> 0xb | uVar17 * 0x200000) ^
          (uVar17 >> 6 | uVar17 * 0x4000000)) + local_70 + 0x2748774c + uVar13;
  uVar15 = uVar15 + iVar4;
  uVar13 = ((uVar9 | uVar8) & uVar14 | uVar9 & uVar8) +
           iVar4 + ((uVar9 >> 0x16 | uVar9 * 0x400) ^ (uVar9 >> 0xd | uVar9 * 0x80000) ^
                   (uVar9 >> 2 | uVar9 * 0x40000000));
  iVar4 = ((uVar16 ^ uVar17) & uVar15 ^ uVar16) +
          ((uVar15 >> 0x19 | uVar15 * 0x80) ^ (uVar15 >> 0xb | uVar15 * 0x200000) ^
          (uVar15 >> 6 | uVar15 * 0x4000000)) + local_6c + 0x34b0bcb5 + uVar6;
  uVar14 = uVar14 + iVar4;
  uVar6 = ((uVar13 | uVar9) & uVar8 | uVar13 & uVar9) +
          iVar4 + ((uVar13 >> 0x16 | uVar13 * 0x400) ^ (uVar13 >> 0xd | uVar13 * 0x80000) ^
                  (uVar13 >> 2 | uVar13 * 0x40000000));
  iVar4 = ((uVar17 ^ uVar15) & uVar14 ^ uVar17) +
          ((uVar14 >> 0x19 | uVar14 * 0x80) ^ (uVar14 >> 0xb | uVar14 * 0x200000) ^
          (uVar14 >> 6 | uVar14 * 0x4000000)) + local_68 + 0x391c0cb3 + uVar16;
  uVar8 = uVar8 + iVar4;
  uVar12 = ((uVar13 | uVar6) & uVar9 | uVar13 & uVar6) +
           iVar4 + ((uVar6 >> 0x16 | uVar6 * 0x400) ^ (uVar6 >> 0xd | uVar6 * 0x80000) ^
                   (uVar6 >> 2 | uVar6 * 0x40000000));
  iVar4 = ((uVar15 ^ uVar14) & uVar8 ^ uVar15) +
          ((uVar8 >> 0x19 | uVar8 * 0x80) ^ (uVar8 >> 0xb | uVar8 * 0x200000) ^
          (uVar8 >> 6 | uVar8 * 0x4000000)) + local_64 + 0x4ed8aa4a + uVar17;
  uVar9 = uVar9 + iVar4;
  uVar19 = ((uVar12 | uVar6) & uVar13 | uVar12 & uVar6) +
           iVar4 + ((uVar12 >> 0x16 | uVar12 * 0x400) ^ (uVar12 >> 0xd | uVar12 * 0x80000) ^
                   (uVar12 >> 2 | uVar12 * 0x40000000));
  iVar4 = ((uVar14 ^ uVar8) & uVar9 ^ uVar14) +
          ((uVar9 >> 0x19 | uVar9 * 0x80) ^ (uVar9 >> 0xb | uVar9 * 0x200000) ^
          (uVar9 >> 6 | uVar9 * 0x4000000)) + local_60 + 0x5b9cca4f + uVar15;
  uVar13 = uVar13 + iVar4;
  uVar16 = ((uVar12 | uVar19) & uVar6 | uVar12 & uVar19) +
           iVar4 + ((uVar19 >> 0x16 | uVar19 * 0x400) ^ (uVar19 >> 0xd | uVar19 * 0x80000) ^
                   (uVar19 >> 2 | uVar19 * 0x40000000));
  iVar4 = ((uVar9 ^ uVar8) & uVar13 ^ uVar8) +
          ((uVar13 >> 0x19 | uVar13 * 0x80) ^ (uVar13 >> 0xb | uVar13 * 0x200000) ^
          (uVar13 >> 6 | uVar13 * 0x4000000)) + local_5c + 0x682e6ff3 + uVar14;
  uVar6 = uVar6 + iVar4;
  uVar14 = ((uVar19 | uVar16) & uVar12 | uVar19 & uVar16) +
           iVar4 + ((uVar16 >> 0x16 | uVar16 * 0x400) ^ (uVar16 >> 0xd | uVar16 * 0x80000) ^
                   (uVar16 >> 2 | uVar16 * 0x40000000));
  iVar4 = ((uVar13 ^ uVar9) & uVar6 ^ uVar9) +
          ((uVar6 >> 0x19 | uVar6 * 0x80) ^ (uVar6 >> 0xb | uVar6 * 0x200000) ^
          (uVar6 >> 6 | uVar6 * 0x4000000)) + local_58 + 0x748f82ee + uVar8;
  uVar12 = uVar12 + iVar4;
  uVar15 = ((uVar16 | uVar14) & uVar19 | uVar16 & uVar14) +
           iVar4 + ((uVar14 >> 0x16 | uVar14 * 0x400) ^ (uVar14 >> 0xd | uVar14 * 0x80000) ^
                   (uVar14 >> 2 | uVar14 * 0x40000000));
  iVar4 = ((uVar13 ^ uVar6) & uVar12 ^ uVar13) +
          ((uVar12 >> 0x19 | uVar12 * 0x80) ^ (uVar12 >> 0xb | uVar12 * 0x200000) ^
          (uVar12 >> 6 | uVar12 * 0x4000000)) + local_54 + 0x78a5636f + uVar9;
  uVar19 = uVar19 + iVar4;
  uVar17 = ((uVar14 | uVar15) & uVar16 | uVar14 & uVar15) +
           iVar4 + ((uVar15 >> 0x16 | uVar15 * 0x400) ^ (uVar15 >> 0xd | uVar15 * 0x80000) ^
                   (uVar15 >> 2 | uVar15 * 0x40000000));
  iVar4 = ((uVar12 ^ uVar6) & uVar19 ^ uVar6) +
          ((uVar19 >> 0x19 | uVar19 * 0x80) ^ (uVar19 >> 0xb | uVar19 * 0x200000) ^
          (uVar19 >> 6 | uVar19 * 0x4000000)) + local_50 + -0x7b3787ec + uVar13;
  uVar16 = uVar16 + iVar4;
  uVar8 = ((uVar17 | uVar15) & uVar14 | uVar17 & uVar15) +
          iVar4 + ((uVar17 >> 0x16 | uVar17 * 0x400) ^ (uVar17 >> 0xd | uVar17 * 0x80000) ^
                  (uVar17 >> 2 | uVar17 * 0x40000000));
  iVar4 = ((uVar12 ^ uVar19) & uVar16 ^ uVar12) +
          ((uVar16 >> 0x19 | uVar16 * 0x80) ^ (uVar16 >> 0xb | uVar16 * 0x200000) ^
          (uVar16 >> 6 | uVar16 * 0x4000000)) + local_4c + -0x7338fdf8 + uVar6;
  uVar14 = uVar14 + iVar4;
  uVar6 = ((uVar8 | uVar17) & uVar15 | uVar8 & uVar17) +
          iVar4 + ((uVar8 >> 0x16 | uVar8 * 0x400) ^ (uVar8 >> 0xd | uVar8 * 0x80000) ^
                  (uVar8 >> 2 | uVar8 * 0x40000000));
  iVar4 = ((uVar19 ^ uVar16) & uVar14 ^ uVar19) +
          ((uVar14 >> 0x19 | uVar14 * 0x80) ^ (uVar14 >> 0xb | uVar14 * 0x200000) ^
          (uVar14 >> 6 | uVar14 * 0x4000000)) + local_48 + -0x6f410006 + uVar12;
  uVar15 = uVar15 + iVar4;
  uVar13 = ((uVar8 | uVar6) & uVar17 | uVar8 & uVar6) +
           iVar4 + ((uVar6 >> 0x16 | uVar6 * 0x400) ^ (uVar6 >> 0xd | uVar6 * 0x80000) ^
                   (uVar6 >> 2 | uVar6 * 0x40000000));
  iVar4 = ((uVar16 ^ uVar14) & uVar15 ^ uVar16) +
          ((uVar15 >> 0x19 | uVar15 * 0x80) ^ (uVar15 >> 0xb | uVar15 * 0x200000) ^
          (uVar15 >> 6 | uVar15 * 0x4000000)) + local_44 + -0x5baf9315 + uVar19;
  uVar17 = uVar17 + iVar4;
  uVar9 = ((uVar13 | uVar6) & uVar8 | uVar13 & uVar6) +
          iVar4 + ((uVar13 >> 0x16 | uVar13 * 0x400) ^ (uVar13 >> 0xd | uVar13 * 0x80000) ^
                  (uVar13 >> 2 | uVar13 * 0x40000000));
  iVar4 = ((uVar14 ^ uVar15) & uVar17 ^ uVar14) +
          ((uVar17 >> 0x19 | uVar17 * 0x80) ^ (uVar17 >> 0xb | uVar17 * 0x200000) ^
          (uVar17 >> 6 | uVar17 * 0x4000000)) + local_40 + -0x41065c09 + uVar16;
  uVar8 = uVar8 + iVar4;
  uVar16 = ((uVar13 | uVar9) & uVar6 | uVar13 & uVar9) +
           iVar4 + ((uVar9 >> 0x16 | uVar9 * 0x400) ^ (uVar9 >> 0xd | uVar9 * 0x80000) ^
                   (uVar9 >> 2 | uVar9 * 0x40000000));
  iVar4 = ((uVar17 ^ uVar15) & uVar8 ^ uVar15) +
          ((uVar8 >> 0x19 | uVar8 * 0x80) ^ (uVar8 >> 0xb | uVar8 * 0x200000) ^
          (uVar8 >> 6 | uVar8 * 0x4000000)) + local_3c + -0x398e870e + uVar14;
  *(int *)(local_148 + 8) =
       *(int *)(local_148 + 8) +
       ((uVar9 | uVar16) & uVar13 | uVar9 & uVar16) +
       iVar4 + ((uVar16 >> 0x16 | uVar16 * 0x400) ^ (uVar16 >> 0xd | uVar16 * 0x80000) ^
               (uVar16 >> 2 | uVar16 * 0x40000000));
  *(int *)(local_148 + 0xc) = *(int *)(local_148 + 0xc) + uVar16;
  *(int *)(local_148 + 0x10) = *(int *)(local_148 + 0x10) + uVar9;
  *(int *)(local_148 + 0x14) = *(int *)(local_148 + 0x14) + uVar13;
  *(int *)(local_148 + 0x18) = *(int *)(local_148 + 0x18) + uVar6 + iVar4;
  *(int *)(local_148 + 0x1c) = *(int *)(local_148 + 0x1c) + uVar8;
  *(int *)(local_148 + 0x20) = *(int *)(local_148 + 0x20) + uVar17;
  *(int *)(local_148 + 0x24) = *(int *)(local_148 + 0x24) + uVar15;
  return 0;
}



undefined8 FUN_1401ee8e0(undefined8 *param_1)

{
  if (param_1 == (undefined8 *)0x0) {
    return 0x10;
  }
  *(undefined4 *)(param_1 + 1) = 0x6a09e667;
  *(undefined4 *)((longlong)param_1 + 0xc) = 0xbb67ae85;
  *(undefined4 *)(param_1 + 2) = 0x3c6ef372;
  *(undefined4 *)((longlong)param_1 + 0x14) = 0xa54ff53a;
  *(undefined4 *)(param_1 + 3) = 0x510e527f;
  *(undefined4 *)(param_1 + 5) = 0;
  *param_1 = 0;
  *(undefined4 *)((longlong)param_1 + 0x1c) = 0x9b05688c;
  *(undefined4 *)(param_1 + 4) = 0x1f83d9ab;
  *(undefined4 *)((longlong)param_1 + 0x24) = 0x5be0cd19;
  return 0;
}



undefined8 FUN_1401ee930(longlong *param_1,void *param_2,uint param_3)

{
  undefined8 uVar1;
  uint uVar2;
  
  if (((param_1 != (longlong *)0x0) && (param_2 != (void *)0x0)) && (*(uint *)(param_1 + 5) < 0x41))
  {
    while( true ) {
      while( true ) {
        if (param_3 == 0) {
          return 0;
        }
        if (((int)param_1[5] == 0) && (0x3f < param_3)) break;
        uVar2 = 0x40 - (int)param_1[5];
        if (param_3 < uVar2) {
          uVar2 = param_3;
        }
        memcpy((void *)((ulonglong)*(uint *)(param_1 + 5) + 0x2c + (longlong)param_1),param_2,
               (ulonglong)uVar2);
        *(uint *)(param_1 + 5) = (int)param_1[5] + uVar2;
        param_2 = (void *)((longlong)param_2 + (ulonglong)uVar2);
        param_3 = param_3 - uVar2;
        if ((int)param_1[5] == 0x40) {
          uVar1 = FUN_1401ecf20(param_1,(longlong)param_1 + 0x2c);
          if ((int)uVar1 != 0) {
            return uVar1;
          }
          *param_1 = *param_1 + 0x200;
          *(undefined4 *)(param_1 + 5) = 0;
        }
      }
      uVar1 = FUN_1401ecf20(param_1,param_2);
      if ((int)uVar1 != 0) break;
      *param_1 = *param_1 + 0x200;
      param_2 = (void *)((longlong)param_2 + 0x40);
      param_3 = param_3 - 0x40;
    }
    return uVar1;
  }
  return 0x10;
}



undefined8 FUN_1401eea10(longlong *param_1,undefined1 *param_2)

{
  uint uVar1;
  uint uVar2;
  
  if ((param_1 != (longlong *)0x0) && (param_2 != (undefined1 *)0x0)) {
    uVar1 = *(uint *)(param_1 + 5);
    if (uVar1 < 0x40) {
      *param_1 = *param_1 + (ulonglong)(uVar1 * 8);
      *(undefined1 *)((ulonglong)uVar1 + 0x2c + (longlong)param_1) = 0x80;
      *(int *)(param_1 + 5) = (int)param_1[5] + 1;
      uVar2 = *(uint *)(param_1 + 5);
      uVar1 = uVar2;
      if (0x38 < uVar2) {
        while (uVar1 < 0x40) {
          *(undefined1 *)((ulonglong)uVar2 + 0x2c + (longlong)param_1) = 0;
          *(int *)(param_1 + 5) = (int)param_1[5] + 1;
          uVar2 = *(uint *)(param_1 + 5);
          uVar1 = *(uint *)(param_1 + 5);
        }
        FUN_1401ecf20(param_1,(longlong)param_1 + 0x2c);
        *(undefined4 *)(param_1 + 5) = 0;
      }
      uVar1 = *(uint *)(param_1 + 5);
      while (uVar1 < 0x38) {
        *(undefined1 *)((ulonglong)*(uint *)(param_1 + 5) + 0x2c + (longlong)param_1) = 0;
        *(int *)(param_1 + 5) = (int)param_1[5] + 1;
        uVar1 = *(uint *)(param_1 + 5);
      }
      *(undefined1 *)((longlong)param_1 + 100) = *(undefined1 *)((longlong)param_1 + 7);
      *(undefined1 *)((longlong)param_1 + 0x65) = *(undefined1 *)((longlong)param_1 + 6);
      *(undefined1 *)((longlong)param_1 + 0x66) = *(undefined1 *)((longlong)param_1 + 5);
      *(undefined1 *)((longlong)param_1 + 0x67) = *(undefined1 *)((longlong)param_1 + 4);
      *(undefined1 *)(param_1 + 0xd) = *(undefined1 *)((longlong)param_1 + 3);
      *(undefined1 *)((longlong)param_1 + 0x69) = *(undefined1 *)((longlong)param_1 + 2);
      *(undefined1 *)((longlong)param_1 + 0x6a) = *(undefined1 *)((longlong)param_1 + 1);
      *(char *)((longlong)param_1 + 0x6b) = (char)*param_1;
      FUN_1401ecf20(param_1,(longlong)param_1 + 0x2c);
      *param_2 = *(undefined1 *)((longlong)param_1 + 0xb);
      param_2[1] = *(undefined1 *)((longlong)param_1 + 10);
      param_2[2] = *(undefined1 *)((longlong)param_1 + 9);
      param_2[3] = (char)param_1[1];
      param_2[4] = *(undefined1 *)((longlong)param_1 + 0xf);
      param_2[5] = *(undefined1 *)((longlong)param_1 + 0xe);
      param_2[6] = *(undefined1 *)((longlong)param_1 + 0xd);
      param_2[7] = *(undefined1 *)((longlong)param_1 + 0xc);
      param_2[8] = *(undefined1 *)((longlong)param_1 + 0x13);
      param_2[9] = *(undefined1 *)((longlong)param_1 + 0x12);
      param_2[10] = *(undefined1 *)((longlong)param_1 + 0x11);
      param_2[0xb] = (char)param_1[2];
      param_2[0xc] = *(undefined1 *)((longlong)param_1 + 0x17);
      param_2[0xd] = *(undefined1 *)((longlong)param_1 + 0x16);
      param_2[0xe] = *(undefined1 *)((longlong)param_1 + 0x15);
      param_2[0xf] = *(undefined1 *)((longlong)param_1 + 0x14);
      param_2[0x10] = *(undefined1 *)((longlong)param_1 + 0x1b);
      param_2[0x11] = *(undefined1 *)((longlong)param_1 + 0x1a);
      param_2[0x12] = *(undefined1 *)((longlong)param_1 + 0x19);
      param_2[0x13] = (char)param_1[3];
      param_2[0x14] = *(undefined1 *)((longlong)param_1 + 0x1f);
      param_2[0x15] = *(undefined1 *)((longlong)param_1 + 0x1e);
      param_2[0x16] = *(undefined1 *)((longlong)param_1 + 0x1d);
      param_2[0x17] = *(undefined1 *)((longlong)param_1 + 0x1c);
      param_2[0x18] = *(undefined1 *)((longlong)param_1 + 0x23);
      param_2[0x19] = *(undefined1 *)((longlong)param_1 + 0x22);
      param_2[0x1a] = *(undefined1 *)((longlong)param_1 + 0x21);
      param_2[0x1b] = (char)param_1[4];
      param_2[0x1c] = *(undefined1 *)((longlong)param_1 + 0x27);
      param_2[0x1d] = *(undefined1 *)((longlong)param_1 + 0x26);
      param_2[0x1e] = *(undefined1 *)((longlong)param_1 + 0x25);
      param_2[0x1f] = *(undefined1 *)((longlong)param_1 + 0x24);
      return 0;
    }
  }
  return 0x10;
}



void FUN_1401eebe0(void *param_1,size_t param_2)

{
  if ((param_1 != (void *)0x0) && (param_2 != 0)) {
    memset(param_1,0,param_2);
  }
  return;
}



undefined8 FUN_1401eec00(undefined8 *param_1)

{
  undefined8 *puVar1;
  undefined1 *puVar2;
  int iVar3;
  int iVar4;
  undefined8 local_res10 [3];
  
  iVar4 = 0;
  puVar2 = (undefined1 *)register0x00000020;
  puVar1 = param_1;
  while( true ) {
    if (puVar1 == (undefined8 *)0x0) {
      return 0;
    }
    iVar3 = (*DAT_140379350)();
    if (iVar3 != 0) break;
    puVar1 = *(undefined8 **)(puVar2 + 0x10);
    iVar4 = iVar4 + 1;
    puVar2 = puVar2 + 8;
  }
  for (; iVar4 != 0; iVar4 = iVar4 + -1) {
    (*DAT_140379360)(*param_1);
    param_1 = *(undefined8 **)((longlong)register0x00000020 + 0x10);
    register0x00000020 = (BADSPACEBASE *)((longlong)register0x00000020 + 8);
  }
  return 0xd;
}



void FUN_1401eec90(longlong param_1)

{
  undefined1 *puVar1;
  longlong local_res10 [3];
  
  puVar1 = (undefined1 *)register0x00000020;
  while (param_1 != 0) {
    (*DAT_140379360)();
    param_1 = *(longlong *)(puVar1 + 0x10);
    puVar1 = puVar1 + 8;
  }
  return;
}



undefined4
FUN_1401eece0(longlong param_1,undefined4 param_2,int param_3,undefined4 param_4,undefined8 param_5)

{
  int iVar1;
  undefined4 uVar2;
  void *_Memory;
  undefined8 *puVar3;
  ulonglong _Size;
  ulonglong uVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  
  if (param_1 == 0) {
    return 0x10;
  }
  uVar4 = 0;
  _Size = uVar4;
  if (param_3 != 0) {
    puVar3 = &param_5;
    iVar1 = param_3;
    do {
      if (0xe < iVar1 - 1U) {
        return 0x10;
      }
      iVar1 = *(int *)(puVar3 + 1);
      _Size = (ulonglong)((int)_Size + 1);
      puVar3 = puVar3 + 3;
    } while (iVar1 != 0);
  }
  if ((int)_Size == 0) {
    return 2;
  }
  _Memory = calloc(0x38,_Size);
  if (_Memory == (void *)0x0) {
    return 0xd;
  }
  puVar3 = &param_5;
  if (param_3 != 0) {
    puVar5 = (undefined8 *)((longlong)_Memory + 8);
    uVar6 = param_5;
    do {
      if (0xe < param_3 - 1U) {
        uVar2 = 0x10;
        goto LAB_1401eedfa;
      }
      *(int *)(puVar5 + -1) = param_3;
      *(undefined4 *)(puVar5 + 1) = param_4;
      *puVar5 = uVar6;
      param_3 = *(int *)(puVar3 + 1);
      param_4 = *(undefined4 *)(puVar3 + 2);
      uVar6 = puVar3[3];
      puVar3 = puVar3 + 3;
      uVar4 = (ulonglong)((int)uVar4 + 1);
      puVar5 = puVar5 + 7;
    } while (param_3 != 0);
  }
  uVar2 = FUN_1401eee20(param_1,param_2,_Memory,uVar4,1);
LAB_1401eedfa:
  free(_Memory);
  return uVar2;
}



undefined8 FUN_1401eee20(char *param_1,uint param_2,longlong param_3,uint param_4,int param_5)

{
  byte bVar1;
  int iVar2;
  undefined4 *puVar3;
  undefined8 uVar4;
  int *piVar5;
  uint uVar6;
  ulonglong uVar7;
  byte *pbVar8;
  longlong lVar9;
  bool bVar10;
  uint local_res8;
  undefined4 uVar11;
  uint local_38;
  uint local_34;
  uint local_30;
  undefined4 local_2c;
  longlong local_28;
  
  uVar7 = (ulonglong)param_4;
  if ((param_1 == (char *)0x0) || (param_3 == 0)) {
    return 0x10;
  }
  if ((param_2 < 2) || ((*param_1 != '0' && (*param_1 != '1')))) {
    return 7;
  }
  bVar1 = param_1[1];
  local_34 = 1;
  if (bVar1 < 0x80) {
    local_res8 = (uint)bVar1;
    local_34 = 2;
  }
  else if ((char)bVar1 < '\0') {
    if (bVar1 < 0x81) {
      return 7;
    }
    if (0x83 < bVar1) {
      return 7;
    }
    uVar6 = bVar1 & 0x7f;
    local_34 = 2;
    if (param_2 < uVar6 + 2) {
      return 7;
    }
    local_res8 = 0;
    if ((bVar1 & 0x7f) != 0) {
      pbVar8 = (byte *)(param_1 + 2);
      local_34 = uVar6 + 2;
      do {
        bVar1 = *pbVar8;
        pbVar8 = pbVar8 + 1;
        local_res8 = local_res8 << 8 | (uint)bVar1;
        uVar6 = uVar6 - 1;
      } while (uVar6 != 0);
    }
  }
  else {
    local_res8 = (uint)param_1;
  }
  if (param_2 < local_res8 + local_34) {
    return 7;
  }
  if (param_4 != 0) {
    puVar3 = (undefined4 *)(param_3 + 0x14);
    do {
      *puVar3 = 0;
      puVar3 = puVar3 + 0xe;
      uVar7 = uVar7 - 1;
    } while (uVar7 != 0);
  }
  local_30 = 0;
  local_28 = 0;
  if (param_4 != 0) {
    do {
      lVar9 = local_28 * 0x38;
      local_2c = *(undefined4 *)(lVar9 + 0x10 + param_3);
      iVar2 = *(int *)(lVar9 + param_3);
      puVar3 = *(undefined4 **)(lVar9 + 8 + param_3);
      if ((param_5 == 0) && (*(int *)(lVar9 + 0x14 + param_3) == 1)) goto LAB_1401ef020;
      if (iVar2 == 0) break;
      local_38 = local_res8;
      switch(iVar2) {
      case 1:
        uVar4 = FUN_1401f75f0(param_1 + local_34);
        if ((int)uVar4 != 0) {
          return uVar4;
        }
        uVar4 = FUN_1401f75d0(&local_38);
        break;
      case 2:
        uVar4 = FUN_1401f7440(param_1 + local_34,local_res8);
        if ((int)uVar4 == 0) {
          uVar4 = FUN_1401f7340(puVar3);
          break;
        }
        goto LAB_1401ef004;
      case 3:
        uVar4 = FUN_1401f72e0(param_1 + local_34,local_res8);
        if ((int)uVar4 != 0) goto LAB_1401ef004;
        uVar4 = FUN_1401f7290(*puVar3);
        break;
      case 4:
        uVar4 = FUN_1401f7130(param_1 + local_34,local_res8,puVar3,&local_2c);
        if ((int)uVar4 != 0) goto LAB_1401ef004;
        *(undefined4 *)(lVar9 + 0x10 + param_3) = local_2c;
        uVar4 = FUN_1401f70e0();
        break;
      case 5:
        uVar4 = FUN_1401f6fe0(param_1 + local_34,local_res8,puVar3,&local_2c);
        if ((int)uVar4 != 0) goto LAB_1401ef004;
        *(undefined4 *)(lVar9 + 0x10 + param_3) = local_2c;
        uVar4 = FUN_1401f6f90();
        break;
      case 6:
        if (((local_res8 < 2) || (param_1[local_34] != '\x05')) || (param_1[local_34 + 1] != '\0'))
        {
          if (param_5 != 0) {
            return 7;
          }
          goto LAB_1401ef020;
        }
        local_38 = 2;
        goto LAB_1401eefc8;
      case 7:
        uVar4 = FUN_1401f6e10(param_1 + local_34,local_res8,puVar3,&local_2c);
        if ((int)uVar4 != 0) goto LAB_1401ef004;
        *(undefined4 *)(lVar9 + 0x10 + param_3) = local_2c;
        uVar4 = FUN_1401f6ce0(puVar3);
        break;
      case 8:
        uVar4 = FUN_1401f6ba0(param_1 + local_34,local_res8,puVar3,&local_2c);
        if ((int)uVar4 != 0) goto LAB_1401ef004;
        *(undefined4 *)(lVar9 + 0x10 + param_3) = local_2c;
        uVar4 = FUN_1401f6b00(puVar3);
        break;
      case 9:
        uVar4 = FUN_1401f6960(param_1 + local_34,local_res8,puVar3,&local_2c);
        if ((int)uVar4 != 0) goto LAB_1401ef004;
        *(undefined4 *)(lVar9 + 0x10 + param_3) = local_2c;
        uVar4 = FUN_1401f68c0(puVar3);
        break;
      case 10:
        uVar4 = FUN_1401f66c0(param_1 + local_34,local_res8,puVar3,&local_2c);
        if ((int)uVar4 != 0) goto LAB_1401ef004;
        *(undefined4 *)(lVar9 + 0x10 + param_3) = local_2c;
        uVar4 = FUN_1401f65b0(puVar3);
        break;
      case 0xb:
        uVar4 = FUN_1401f62b0(param_1 + local_34);
        iVar2 = (int)uVar4;
        goto joined_r0x0001401ef2c6;
      case 0xc:
        uVar4 = FUN_1401f5cc0(param_1 + local_34);
        iVar2 = (int)uVar4;
joined_r0x0001401ef2c6:
        if (iVar2 == 0) goto LAB_1401eefc8;
LAB_1401ef004:
        if (param_5 != 0) {
          return uVar4;
        }
        goto LAB_1401ef020;
      case 0xd:
      case 0xf:
        if (iVar2 == 0xf) {
          bVar10 = (param_1[local_34] & 0x3fU) == 0x31;
LAB_1401ef2a2:
          if (!bVar10) {
            return 7;
          }
        }
        else if (iVar2 == 0xd) {
          bVar10 = (param_1[local_34] & 0x3fU) == 0x30;
          goto LAB_1401ef2a2;
        }
        uVar11 = 1;
        goto LAB_1401ef244;
      case 0xe:
        uVar11 = 0;
LAB_1401ef244:
        uVar4 = FUN_1401eee20(param_1 + local_34,local_res8,puVar3,local_2c,uVar11);
        if ((int)uVar4 == 0) {
          uVar4 = FUN_1401f6030(puVar3);
          break;
        }
        goto LAB_1401ef004;
      default:
        return 0x10;
      }
      if ((int)uVar4 != 0) {
        return uVar4;
      }
LAB_1401eefc8:
      local_34 = local_34 + local_38;
      local_res8 = local_res8 - local_38;
      *(undefined4 *)(lVar9 + 0x14 + param_3) = 1;
      if (param_5 == 0) {
        local_30 = 0xffffffff;
        local_28 = -1;
      }
LAB_1401ef020:
      local_30 = local_30 + 1;
      local_28 = local_28 + 1;
    } while (local_30 < param_4);
  }
  uVar6 = 0;
  if (param_4 != 0) {
    piVar5 = (int *)(param_3 + 0x14);
    do {
      if (*piVar5 == 0) {
        return 7;
      }
      uVar6 = uVar6 + 1;
      piVar5 = piVar5 + 0xe;
    } while (uVar6 < param_4);
  }
  return 0;
}



undefined4
FUN_1401ef360(longlong param_1,longlong param_2,int param_3,undefined4 param_4,undefined8 param_5)

{
  int iVar1;
  undefined4 uVar2;
  void *_Memory;
  undefined8 *puVar3;
  ulonglong _Size;
  ulonglong uVar4;
  undefined8 *puVar5;
  undefined8 uVar6;
  bool bVar7;
  
  if ((param_1 == 0) || (param_2 == 0)) {
    return 0x10;
  }
  uVar4 = 0;
  _Size = uVar4;
  if (param_3 != 0) {
    puVar3 = &param_5;
    bVar7 = param_3 == 0;
    iVar1 = param_3;
    do {
      if ((bVar7 || iVar1 < 0) || ((0xb < iVar1 && (2 < iVar1 - 0xdU)))) {
        return 0x10;
      }
      iVar1 = *(int *)(puVar3 + 1);
      _Size = (ulonglong)((int)_Size + 1);
      puVar3 = puVar3 + 3;
      bVar7 = iVar1 == 0;
    } while (!bVar7);
  }
  if ((int)_Size == 0) {
    return 2;
  }
  _Memory = calloc(0x38,_Size);
  if (_Memory == (void *)0x0) {
    return 0xd;
  }
  puVar3 = &param_5;
  bVar7 = param_3 == 0;
  if (!bVar7) {
    puVar5 = (undefined8 *)((longlong)_Memory + 8);
    uVar6 = param_5;
    do {
      if ((bVar7 || param_3 < 0) || ((0xb < param_3 && (2 < param_3 - 0xdU)))) {
        uVar2 = 0x10;
        goto LAB_1401ef48f;
      }
      *(int *)(puVar5 + -1) = param_3;
      *(undefined4 *)(puVar5 + 1) = param_4;
      *puVar5 = uVar6;
      param_3 = *(int *)(puVar3 + 1);
      param_4 = *(undefined4 *)(puVar3 + 2);
      uVar6 = puVar3[3];
      puVar3 = puVar3 + 3;
      uVar4 = (ulonglong)((int)uVar4 + 1);
      puVar5 = puVar5 + 7;
      bVar7 = param_3 == 0;
    } while (!bVar7);
  }
  uVar2 = FUN_1401f7630(_Memory,uVar4,param_1,param_2,0xd);
LAB_1401ef48f:
  free(_Memory);
  return uVar2;
}



ulonglong FUN_1401ef4c0(longlong param_1,int param_2,undefined8 param_3,int param_4)

{
  int iVar1;
  uint uVar2;
  ulonglong uVar3;
  byte *_Memory;
  bool bVar4;
  int local_res8 [2];
  
  if (param_1 == 0) {
    return 0x10;
  }
  bVar4 = param_2 < 0;
  if (bVar4) {
    param_2 = -param_2;
  }
  if (0x1fe < param_2 - 2U) {
    return 0x17;
  }
  uVar3 = FUN_1401e9d00(param_4);
  if ((int)uVar3 == 0) {
    _Memory = calloc(1,(longlong)param_2);
    if (_Memory == (byte *)0x0) {
      uVar3 = 0xd;
    }
    else {
      do {
        iVar1 = (**(code **)(&DAT_14032b338 + (longlong)param_4 * 0x50))(_Memory,param_2,param_3);
        if (iVar1 != param_2) {
          free(_Memory);
          return 9;
        }
        *_Memory = *_Memory | 0xc0;
        _Memory[(longlong)param_2 - 1] = _Memory[(longlong)param_2 - 1] | bVar4 * '\x02' | 1U;
        uVar2 = (*DAT_1403793e0)(param_1,_Memory,param_2);
        if ((uVar2 != 0) || (uVar2 = (*DAT_140379488)(param_1,local_res8), uVar2 != 0)) {
          free(_Memory);
          return (ulonglong)uVar2;
        }
      } while (local_res8[0] == 0);
      free(_Memory);
      uVar3 = 0;
    }
  }
  return uVar3;
}



undefined8
FUN_1401ef620(void *param_1,uint param_2,int param_3,ulonglong param_4,undefined8 param_5,
             int param_6,undefined1 *param_7,uint *param_8)

{
  uint uVar1;
  int iVar2;
  undefined8 uVar3;
  char *pcVar4;
  uint uVar5;
  uint uVar6;
  ulonglong uVar7;
  char *_Dst;
  uint uVar8;
  
  if (param_3 != 1) {
    if (param_3 != 2) {
      return 0x18;
    }
    uVar3 = FUN_1401e9d00(param_6);
    if ((int)uVar3 != 0) {
      return uVar3;
    }
  }
  uVar3 = 0;
  uVar8 = (uint)((param_4 & 7) != 0) + ((uint)(param_4 >> 3) & 0x1fffffff);
  if (uVar8 < param_2 + 0xb) {
    return 0x16;
  }
  if (*param_8 < uVar8) {
    *param_8 = uVar8;
    uVar3 = 6;
  }
  else {
    _Dst = param_7 + 2;
    uVar5 = uVar8 - param_2;
    uVar6 = uVar5 - 3;
    if (param_3 == 2) {
      uVar1 = (**(code **)(&DAT_14032b338 + (longlong)param_6 * 0x50))(_Dst,uVar6,param_5);
      if (uVar1 != uVar6) {
        return 9;
      }
      uVar7 = 0;
      pcVar4 = _Dst;
      if (uVar6 != 0) {
        do {
          if (*pcVar4 == '\0') {
            do {
              iVar2 = (**(code **)(&DAT_14032b338 + (longlong)param_6 * 0x50))
                                (_Dst + uVar7,1,param_5);
              if (iVar2 != 1) {
                return 9;
              }
            } while (*pcVar4 == '\0');
          }
          uVar1 = (int)uVar7 + 1;
          uVar7 = (ulonglong)uVar1;
          pcVar4 = pcVar4 + 1;
        } while (uVar1 < uVar6);
      }
    }
    else {
      memset(_Dst,0xff,(ulonglong)uVar6);
    }
    *param_7 = 0;
    param_7[1] = (char)param_3;
    param_7[uVar5 - 1] = 0;
    memcpy(param_7 + uVar5,param_1,(ulonglong)param_2);
    *param_8 = uVar8;
  }
  return uVar3;
}



ulonglong FUN_1401ef7f0(void *param_1,uint param_2,byte *param_3,undefined4 param_4,uint param_5,
                       undefined8 param_6,int param_7,int param_8,undefined1 *param_9,uint *param_10
                       )

{
  uint uVar1;
  uint uVar2;
  ulonglong uVar3;
  byte *_Memory;
  void *_Memory_00;
  byte *_Memory_01;
  byte *pbVar4;
  ulonglong uVar5;
  uint uVar6;
  int iVar7;
  uint uVar8;
  uint *puVar9;
  undefined4 uVar10;
  uint local_58 [6];
  
  if (((param_1 != (void *)0x0) && (param_9 != (undefined1 *)0x0)) && (param_10 != (uint *)0x0)) {
    uVar3 = FUN_1401efb80(param_8);
    if (((int)uVar3 == 0) && (uVar3 = FUN_1401e9d00(param_7), (int)uVar3 == 0)) {
      uVar1 = *(uint *)(&DAT_14032bd1c + (longlong)param_8 * 0x80);
      uVar3 = (ulonglong)uVar1;
      uVar6 = (uint)((param_5 & 7) != 0) + (param_5 >> 3);
      if ((uVar1 * 2 < uVar6 - 2) && (iVar7 = uVar6 + uVar1 * -2, param_2 <= iVar7 - 2U)) {
        _Memory = malloc((ulonglong)uVar6);
        _Memory_00 = malloc((ulonglong)uVar6);
        _Memory_01 = malloc(uVar3);
        if (_Memory != (byte *)0x0) {
          if ((_Memory_00 != (void *)0x0) && (_Memory_01 != (byte *)0x0)) {
            if (param_3 == (byte *)0x0) {
              param_4 = 0;
              param_3 = _Memory;
            }
            puVar9 = local_58;
            local_58[0] = uVar6;
            uVar2 = FUN_1401f7cf0(param_8,param_3,param_4,_Memory,puVar9);
            uVar10 = (undefined4)((ulonglong)puVar9 >> 0x20);
            uVar5 = (ulonglong)uVar2;
            if (uVar2 == 0) {
              uVar2 = (iVar7 - param_2) - 2;
              local_58[0] = uVar1;
              memset(_Memory + uVar3,0,(ulonglong)uVar2);
              local_58[0] = local_58[0] + uVar2;
              _Memory[local_58[0]] = 1;
              local_58[0] = local_58[0] + 1;
              memcpy(_Memory + local_58[0],param_1,(ulonglong)param_2);
              local_58[0] = local_58[0] + param_2;
              uVar2 = (**(code **)(&DAT_14032b338 + (longlong)param_7 * 0x50))
                                (_Memory_01,uVar3,param_6);
              if (uVar2 == uVar1) {
                uVar8 = (uVar6 - uVar1) - 1;
                uVar2 = FUN_1401f7b30(param_8,_Memory_01,uVar1,_Memory_00,CONCAT44(uVar10,uVar8));
                uVar5 = (ulonglong)uVar2;
                if (uVar2 == 0) {
                  if (uVar8 != 0) {
                    uVar5 = (ulonglong)uVar8;
                    pbVar4 = _Memory;
                    do {
                      *pbVar4 = *pbVar4 ^ pbVar4[(longlong)_Memory_00 - (longlong)_Memory];
                      uVar5 = uVar5 - 1;
                      pbVar4 = pbVar4 + 1;
                    } while (uVar5 != 0);
                  }
                  uVar2 = FUN_1401f7b30(param_8,_Memory,uVar8,_Memory_00,uVar1);
                  uVar5 = (ulonglong)uVar2;
                  if (uVar2 == 0) {
                    if (uVar1 != 0) {
                      pbVar4 = _Memory_01;
                      uVar5 = uVar3;
                      do {
                        *pbVar4 = *pbVar4 ^ pbVar4[(longlong)_Memory_00 - (longlong)_Memory_01];
                        uVar5 = uVar5 - 1;
                        pbVar4 = pbVar4 + 1;
                      } while (uVar5 != 0);
                    }
                    if (*param_10 < uVar6) {
                      *param_10 = uVar6;
                      uVar5 = 6;
                    }
                    else {
                      *param_9 = 0;
                      local_58[0] = 1;
                      memcpy(param_9 + 1,_Memory_01,uVar3);
                      local_58[0] = local_58[0] + uVar1;
                      memcpy(param_9 + local_58[0],_Memory,(ulonglong)uVar8);
                      local_58[0] = (local_58[0] - 1) + (uVar6 - uVar1);
                      *param_10 = local_58[0];
                      uVar5 = 0;
                    }
                  }
                }
              }
              else {
                uVar5 = 9;
              }
            }
            free(_Memory_01);
            free(_Memory_00);
            free(_Memory);
            return uVar5;
          }
          free(_Memory);
        }
        if (_Memory_00 != (void *)0x0) {
          free(_Memory_00);
        }
        if (_Memory_01 != (byte *)0x0) {
          free(_Memory_01);
        }
        uVar3 = 0xd;
      }
      else {
        uVar3 = 0x16;
      }
    }
    return uVar3;
  }
  return 0x10;
}



undefined8 FUN_1401efb80(uint param_1)

{
  EnterCriticalSection((LPCRITICAL_SECTION)&DAT_1403792c0);
  if ((param_1 < 0x20) && ((&DAT_14032bd10)[(longlong)(int)param_1 * 0x10] != 0)) {
    LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_1403792c0);
    return 0;
  }
  LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_1403792c0);
  return 0xb;
}



undefined8
FUN_1401efbe0(char *param_1,uint param_2,int param_3,ulonglong param_4,void *param_5,uint *param_6,
             undefined4 *param_7)

{
  char *pcVar1;
  uint uVar2;
  ulonglong uVar3;
  uint uVar4;
  uint uVar5;
  
  uVar5 = (uint)((param_4 & 7) != 0) + ((uint)(param_4 >> 3) & 0x1fffffff);
  *param_7 = 0;
  if ((uVar5 < param_2) || (uVar5 < 0xb)) {
    return 0x16;
  }
  if ((*param_1 == '\0') && (param_1[1] == (char)param_3)) {
    uVar2 = 2;
    uVar3 = 2;
    if (param_3 == 2) {
      if (2 < uVar5) {
        pcVar1 = param_1 + 2;
        do {
          uVar2 = (uint)uVar3;
          if (*pcVar1 == '\0') break;
          uVar2 = uVar2 + 1;
          uVar3 = (ulonglong)uVar2;
          pcVar1 = pcVar1 + 1;
        } while (uVar2 < uVar5);
      }
      uVar4 = uVar2 - 2;
      if ((uVar2 + 1 < uVar5) && (7 < uVar4)) {
LAB_1401efc9b:
        uVar5 = (param_2 - uVar4) - 3;
        uVar2 = *param_6;
        *param_6 = uVar5;
        if (uVar2 < uVar5) {
          return 6;
        }
        memcpy(param_5,param_1 + (uVar4 + 3),(ulonglong)uVar5);
        *param_7 = 1;
        return 0;
      }
    }
    else {
      if (2 < uVar5 - 1) {
        pcVar1 = param_1 + 2;
        do {
          if (*pcVar1 != -1) break;
          uVar2 = (int)uVar3 + 1;
          uVar3 = (ulonglong)uVar2;
          pcVar1 = pcVar1 + 1;
        } while (uVar2 < uVar5 - 1);
      }
      if (param_1[uVar3] == '\0') {
        uVar4 = (int)uVar3 - 2;
        goto LAB_1401efc9b;
      }
    }
  }
  return 7;
}



ulonglong FUN_1401efd10(char *param_1,uint param_2,byte *param_3,undefined4 param_4,uint param_5,
                       int param_6,void *param_7,uint *param_8,undefined4 *param_9)

{
  uint uVar1;
  uint uVar2;
  int iVar3;
  ulonglong uVar4;
  byte *_Memory;
  void *_Memory_00;
  byte *_Memory_01;
  byte *pbVar5;
  ulonglong uVar6;
  uint uVar7;
  uint uVar8;
  uint uVar9;
  ulonglong uVar10;
  undefined8 in_stack_ffffffffffffffa8;
  undefined4 uVar11;
  uint local_48 [4];
  
  uVar11 = (undefined4)((ulonglong)in_stack_ffffffffffffffa8 >> 0x20);
  if ((((param_1 == (char *)0x0) || (param_7 == (void *)0x0)) || (param_8 == (uint *)0x0)) ||
     (param_9 == (undefined4 *)0x0)) {
    return 0x10;
  }
  *param_9 = 0;
  uVar4 = FUN_1401efb80(param_6);
  if ((int)uVar4 != 0) {
    return uVar4;
  }
  uVar1 = *(uint *)(&DAT_14032bd1c + (longlong)param_6 * 0x80);
  uVar4 = (ulonglong)uVar1;
  uVar8 = (uint)((param_5 & 7) != 0) + (param_5 >> 3);
  if ((uVar8 - 2 <= uVar1 * 2) || (param_2 != uVar8)) {
    return 0x16;
  }
  _Memory = malloc((ulonglong)uVar8);
  _Memory_00 = malloc((ulonglong)uVar8);
  _Memory_01 = malloc(uVar4);
  if (_Memory != (byte *)0x0) {
    if ((_Memory_00 != (void *)0x0) && (_Memory_01 != (byte *)0x0)) {
      if (*param_1 == '\0') {
        local_48[0] = 1;
        memcpy(_Memory_01,param_1 + 1,uVar4);
        local_48[0] = local_48[0] + uVar1;
        uVar9 = (uVar8 - uVar1) - 1;
        uVar10 = (ulonglong)uVar9;
        memcpy(_Memory,param_1 + local_48[0],(ulonglong)uVar9);
        local_48[0] = (local_48[0] - 1) + (uVar8 - uVar1);
        uVar7 = FUN_1401f7b30(param_6,_Memory,uVar9,_Memory_00,CONCAT44(uVar11,uVar1));
        if (uVar7 == 0) {
          if (uVar1 != 0) {
            pbVar5 = _Memory_01;
            uVar6 = uVar4;
            do {
              *pbVar5 = *pbVar5 ^ pbVar5[(longlong)_Memory_00 - (longlong)_Memory_01];
              uVar6 = uVar6 - 1;
              pbVar5 = pbVar5 + 1;
            } while (uVar6 != 0);
          }
          uVar7 = FUN_1401f7b30(param_6,_Memory_01,uVar1,_Memory_00,uVar9);
          if (uVar7 == 0) {
            if (uVar9 != 0) {
              pbVar5 = _Memory;
              do {
                *pbVar5 = *pbVar5 ^ pbVar5[(longlong)_Memory_00 - (longlong)_Memory];
                uVar10 = uVar10 - 1;
                pbVar5 = pbVar5 + 1;
              } while (uVar10 != 0);
            }
            if (param_3 == (byte *)0x0) {
              param_4 = 0;
              param_3 = _Memory;
            }
            local_48[0] = uVar8;
            uVar7 = FUN_1401f7cf0(param_6,param_3,param_4,_Memory_01,local_48);
            if (uVar7 == 0) {
              iVar3 = memcmp(_Memory_01,_Memory,uVar4);
              uVar2 = uVar1;
              if (iVar3 == 0) {
                for (; (uVar2 < uVar9 && (_Memory[uVar2] == 0)); uVar2 = uVar2 + 1) {
                }
                if ((uVar2 == uVar9) || (_Memory[uVar2] != 1)) {
                  uVar7 = 7;
                  local_48[0] = uVar2;
                  goto LAB_1401f0010;
                }
                local_48[0] = uVar2 + 1;
                uVar9 = ((uVar8 - local_48[0]) - uVar1) - 1;
                uVar7 = *param_8;
                *param_8 = uVar9;
                if (uVar7 < uVar9) {
                  uVar7 = 6;
                  goto LAB_1401f0010;
                }
                memcpy(param_7,_Memory + local_48[0],(ulonglong)uVar9);
                local_48[0] = uVar2 + (uVar8 - uVar1);
                *param_9 = 1;
              }
              uVar7 = 0;
            }
          }
        }
      }
      else {
        uVar7 = 0;
      }
LAB_1401f0010:
      free(_Memory_01);
      free(_Memory_00);
      free(_Memory);
      return (ulonglong)uVar7;
    }
    free(_Memory);
  }
  if (_Memory_00 != (void *)0x0) {
    free(_Memory_00);
  }
  if (_Memory_01 != (byte *)0x0) {
    free(_Memory_01);
  }
  return 0xd;
}



void FUN_1401f0090(longlong param_1)

{
  *(undefined1 *)(param_1 + 0x30) = 0;
  return;
}



void FUN_1401f00a0(longlong param_1)

{
  FUN_14018aee0(param_1 + 0x388);
  return;
}



void FUN_1401f00f0(longlong param_1)

{
  char cVar1;
  undefined8 uVar2;
  
  if (((*(char *)(param_1 + 0x30) == '\0') && (*(longlong **)(param_1 + 0x18) != (longlong *)0x0))
     && (**(longlong **)(param_1 + 0x18) != 0)) {
    cVar1 = FUN_140185860();
    if (cVar1 == '\0') {
      *(undefined1 *)(param_1 + 0x30) = 1;
      *(undefined4 *)(param_1 + 0x34) = 0;
      uVar2 = FUN_14018aee0(param_1 + 0x388);
      *(undefined4 *)(param_1 + 0x38) = 0;
      *(undefined8 *)(param_1 + 0x28) = uVar2;
    }
  }
  return;
}



void FUN_1401f0150(longlong param_1)

{
  FUN_140156b50(param_1 + 0x310);
  if ((*(longlong **)(param_1 + 0x18) != (longlong *)0x0) && (**(longlong **)(param_1 + 0x18) != 0))
  {
    FUN_1401855c0();
  }
  if ((*(longlong **)(param_1 + 0x20) != (longlong *)0x0) && (**(longlong **)(param_1 + 0x20) != 0))
  {
    FUN_1401855c0();
  }
  FUN_140156be0(param_1 + 0x310);
  return;
}



void FUN_1401f01c0(longlong param_1)

{
  int iVar1;
  undefined8 uVar2;
  undefined **local_18;
  undefined4 local_10;
  undefined2 local_c;
  
  *(undefined1 *)(param_1 + 0x2c0) = 1;
  local_18 = Proud::AddrPort::vftable;
  local_10 = DAT_14032e660;
  local_c = DAT_14032e664;
  uVar2 = 0;
  if (*(undefined8 **)(param_1 + 0x18) != (undefined8 *)0x0) {
    uVar2 = **(undefined8 **)(param_1 + 0x18);
  }
  iVar1 = FUN_140187440(uVar2,&DAT_14032e400,600,&local_18);
  if (iVar1 != 0) {
    *(undefined1 *)(param_1 + 0x2c0) = 0;
    *(undefined1 *)(param_1 + 0x30) = 0;
  }
  return;
}



void FUN_1401f0230(longlong param_1)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar3 = 0;
  lVar2 = lVar3;
  if (*(longlong **)(param_1 + 0x20) != (longlong *)0x0) {
    lVar2 = **(longlong **)(param_1 + 0x20);
  }
  if (*(char *)(lVar2 + 0x80) == '\0') {
    *(undefined1 *)(param_1 + 0x300) = 1;
    if (*(longlong **)(param_1 + 0x20) != (longlong *)0x0) {
      lVar3 = **(longlong **)(param_1 + 0x20);
    }
    iVar1 = FUN_1401865a0(lVar3,600);
    if (iVar1 != 0) {
      *(undefined1 *)(param_1 + 0x300) = 0;
      *(undefined1 *)(param_1 + 0x30) = 0;
    }
  }
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401f0290(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  bool bVar2;
  double dVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  longlong lVar6;
  
  uVar5 = 0xfffffffffffffffe;
  lVar1 = param_1 + 0x310;
  lVar6 = lVar1;
  FUN_140156b50(lVar1);
  bVar2 = true;
  if (*(char *)(param_1 + 0x30) != '\0') {
    *(int *)(param_1 + 0x34) = *(int *)(param_1 + 0x34) + 1;
    if (*(int *)(param_1 + 0x34) == 1) {
      FUN_1401f01c0(param_1);
      FUN_1401f0230(param_1);
    }
    else {
      dVar3 = (double)FUN_14018aee0(param_1 + 0x388);
      if ((_DAT_140320d90 < dVar3 - *(double *)(param_1 + 0x28)) ||
         (*(char *)(param_1 + 0x48) != '\0')) {
        uVar4 = FUN_1401f00a0(param_1);
        *(undefined8 *)(param_1 + 0x40) = uVar4;
        *(undefined1 *)(param_1 + 0x48) = 0;
        *(undefined1 *)(param_1 + 0x30) = 0;
        FUN_140156be0(lVar1);
        bVar2 = false;
        (**(code **)(**(longlong **)(param_1 + 0x3b0) + 0x10))
                  (*(longlong **)(param_1 + 0x3b0),uVar4,param_3,param_4,uVar5,lVar6,0);
      }
    }
  }
  if (bVar2) {
    FUN_140156be0(lVar1);
  }
  return;
}



void FUN_1401f0370(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  char cVar1;
  int iVar2;
  longlong lVar3;
  undefined8 uVar4;
  undefined8 local_40;
  undefined8 local_38;
  int local_30;
  undefined8 local_28;
  undefined4 local_20;
  undefined **local_18;
  undefined4 local_10;
  undefined2 local_c;
  
  uVar4 = 0xfffffffffffffffe;
  if (*(char *)(param_1 + 0x380) != '\0') {
    do {
      FUN_1401f0290(param_1);
      local_18 = Proud::AddrPort::vftable;
      local_40 = 0;
      local_28 = 0;
      local_38 = 0;
      local_30 = 5;
      local_20 = 0;
      local_10 = DAT_140320450;
      local_c = DAT_140320454;
      cVar1 = FUN_14018b2f0(*(undefined8 *)(param_1 + 0x308),&local_40,10,param_4,uVar4);
      if (cVar1 != '\0') {
        FUN_140156b50(param_1 + 0x310);
        if ((int)local_38 < 1) {
          *(undefined1 *)(param_1 + 0x48) = 1;
        }
        if (local_30 == 1) {
          if (*(char *)(param_1 + 0x30) == '\0') {
            *(undefined1 *)(param_1 + 0x2c0) = 0;
          }
          else if (0 < (int)local_38) {
            *(int *)(param_1 + 0x38) = *(int *)(param_1 + 0x38) + (int)local_38;
            FUN_1401f01c0(param_1);
            goto LAB_1401f045b;
          }
        }
        else {
LAB_1401f045b:
          if (local_30 == 2) {
            if (*(char *)(param_1 + 0x30) == '\0') {
LAB_1401f04ba:
              *(undefined1 *)(param_1 + 0x300) = 0;
            }
            else {
              lVar3 = 0;
              if (*(longlong **)(param_1 + 0x20) != (longlong *)0x0) {
                lVar3 = **(longlong **)(param_1 + 0x20);
              }
              if (*(char *)(lVar3 + 0x80) == '\0') {
                *(undefined1 *)(param_1 + 0x300) = 1;
                lVar3 = 0;
                if (*(longlong **)(param_1 + 0x20) != (longlong *)0x0) {
                  lVar3 = **(longlong **)(param_1 + 0x20);
                }
                iVar2 = FUN_1401865a0(lVar3,600);
                if (iVar2 != 0) {
                  *(undefined1 *)(param_1 + 0x30) = 0;
                  goto LAB_1401f04ba;
                }
              }
            }
          }
        }
        FUN_140156be0(param_1 + 0x310);
      }
    } while (*(char *)(param_1 + 0x380) != '\0');
  }
  return;
}



void FUN_1401f0500(undefined8 param_1)

{
  DWORD DVar1;
  
  DVar1 = GetCurrentThreadId();
  FUN_1401ac7d0(DVar1,"PNSendSpeedMeasurer");
  FUN_1401f0370(param_1);
  return;
}



undefined8 *
FUN_1401f0530(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  void *pvVar2;
  longlong *plVar3;
  undefined4 uVar4;
  longlong lVar5;
  longlong lVar6;
  longlong *local_res10;
  longlong *local_res18;
  longlong *local_res20;
  undefined8 uVar7;
  
  uVar7 = 0xfffffffffffffffe;
  *param_1 = Proud::CSendSpeedMeasurer::vftable;
  param_1[1] = Proud::CSendSpeedMeasurer::vftable;
  param_1[2] = Proud::CSendSpeedMeasurer::vftable;
  lVar6 = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  param_1[0x61] = 0;
  uVar4 = FUN_14015a430();
  FUN_140156a70(param_1 + 0x62,uVar4,1,param_4,uVar7);
  param_1[0x69] = 0;
  FUN_14018ae00(param_1 + 0x71);
  local_res10 = operator_new(0xa8);
  lVar5 = lVar6;
  if (local_res10 != (longlong *)0x0) {
    lVar5 = FUN_14018c020(local_res10,param_1 + 1,1);
  }
  param_1[0x61] = lVar5;
  *(undefined1 *)(param_1 + 9) = 0;
  param_1[0x76] = param_2;
  *(undefined1 *)(param_1 + 0x70) = 1;
  *(undefined1 *)(param_1 + 0x58) = 0;
  *(undefined1 *)(param_1 + 0x60) = 0;
  local_res10 = (longlong *)FUN_140156940(0x400);
  lVar5 = lVar6;
  if (local_res10 != (longlong *)0x0) {
    lVar5 = FUN_140185b00(local_res10,1,param_1);
  }
  if (lVar5 == 0) {
    local_res10 = (longlong *)0x0;
  }
  else {
    local_res10 = (longlong *)FUN_140156940(0x10);
    local_res10[1] = 1;
    *local_res10 = lVar5;
  }
  plVar1 = local_res10;
  FUN_140161a50(param_1 + 3,&local_res10);
  plVar3 = local_res10;
  if (plVar1 != (longlong *)0x0) {
    plVar1 = plVar1 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      lVar5 = *local_res10;
      if (lVar5 != 0) {
        FUN_1401859b0(lVar5);
        FUN_140156970(lVar5);
      }
      FUN_140156970(plVar3);
    }
  }
  lVar5 = lVar6;
  if ((longlong *)param_1[3] != (longlong *)0x0) {
    lVar5 = *(longlong *)param_1[3];
  }
  FUN_140187680(lVar5);
  lVar5 = lVar6;
  if ((longlong *)param_1[3] != (longlong *)0x0) {
    lVar5 = *(longlong *)param_1[3];
  }
  FUN_140186b50(lVar5,0);
  lVar5 = lVar6;
  if ((longlong *)param_1[3] != (longlong *)0x0) {
    lVar5 = *(longlong *)param_1[3];
  }
  FUN_140186e00(lVar5,4);
  local_res18 = (longlong *)FUN_140156940(0x400);
  lVar5 = lVar6;
  if (local_res18 != (longlong *)0x0) {
    lVar5 = FUN_140185b00(local_res18,2,param_1);
  }
  if (lVar5 == 0) {
    local_res18 = (longlong *)0x0;
  }
  else {
    local_res18 = (longlong *)FUN_140156940(0x10);
    local_res18[1] = 1;
    *local_res18 = lVar5;
  }
  plVar1 = local_res18;
  FUN_140161a50(param_1 + 4,&local_res18);
  plVar3 = local_res18;
  if (plVar1 != (longlong *)0x0) {
    plVar1 = plVar1 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      lVar5 = *local_res18;
      if (lVar5 != 0) {
        FUN_1401859b0(lVar5);
        FUN_140156970(lVar5);
      }
      FUN_140156970(plVar3);
    }
  }
  lVar5 = lVar6;
  if ((longlong *)param_1[4] != (longlong *)0x0) {
    lVar5 = *(longlong *)param_1[4];
  }
  FUN_140187680(lVar5);
  lVar5 = lVar6;
  if ((longlong *)param_1[3] != (longlong *)0x0) {
    lVar5 = *(longlong *)param_1[3];
  }
  FUN_140184cc0(lVar5,param_1 + 2);
  lVar5 = lVar6;
  if ((longlong *)param_1[3] != (longlong *)0x0) {
    lVar5 = *(longlong *)param_1[3];
  }
  FUN_14018c430(param_1[0x61],lVar5);
  lVar5 = lVar6;
  if ((longlong *)param_1[4] != (longlong *)0x0) {
    lVar5 = *(longlong *)param_1[4];
  }
  FUN_140184cc0(lVar5,param_1 + 2);
  lVar5 = lVar6;
  if ((longlong *)param_1[4] != (longlong *)0x0) {
    lVar5 = *(longlong *)param_1[4];
  }
  FUN_14018c430(param_1[0x61],lVar5);
  param_1[5] = 0;
  *(undefined1 *)(param_1 + 6) = 0;
  param_1[8] = 0;
  FUN_14018ae50(param_1 + 0x71);
  local_res20 = operator_new(0x28);
  lVar5 = lVar6;
  if (local_res20 != (longlong *)0x0) {
    lVar5 = FUN_140182680(local_res20,FUN_1401f0500,param_1);
  }
  if (lVar5 == 0) {
    local_res20 = (longlong *)0x0;
  }
  else {
    local_res20 = (longlong *)FUN_140156940(0x10);
    local_res20[1] = 1;
    *local_res20 = lVar5;
  }
  plVar1 = local_res20;
  FUN_14018da90(param_1 + 0x69,&local_res20);
  plVar3 = local_res20;
  if (plVar1 != (longlong *)0x0) {
    plVar1 = plVar1 + 1;
    *plVar1 = *plVar1 + -1;
    if (*plVar1 == 0) {
      pvVar2 = (void *)*local_res20;
      if (pvVar2 != (void *)0x0) {
        FUN_140182790(pvVar2);
        operator_delete(pvVar2);
      }
      FUN_140156970(plVar3);
    }
  }
  if ((longlong *)param_1[0x69] != (longlong *)0x0) {
    lVar6 = *(longlong *)param_1[0x69];
  }
  FUN_140182870(lVar6);
  return param_1;
}



void FUN_1401f0920(longlong param_1)

{
  FUN_1401f0c00(param_1 + -8);
  return;
}



void FUN_1401f0930(longlong param_1)

{
  FUN_1401f0c00(param_1 + -0x10);
  return;
}



void FUN_1401f0940(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  undefined8 uVar2;
  undefined8 local_res8;
  undefined8 local_res10;
  undefined8 uVar3;
  longlong lVar4;
  
  uVar3 = 0xfffffffffffffffe;
  lVar1 = param_1 + 0x310;
  while( true ) {
    lVar4 = lVar1;
    FUN_140156b50(lVar1);
    if (DAT_140328940 != '\0') {
      FUN_140156be0(lVar1);
      return;
    }
    if ((*(char *)(param_1 + 0x2c0) == '\0') && (*(char *)(param_1 + 0x300) == '\0')) break;
    FUN_140156be0(lVar4);
    Sleep(10);
  }
  *(undefined1 *)(param_1 + 0x30) = 0;
  uVar2 = 0;
  local_res8 = 0;
  FUN_140161a50(param_1 + 0x18,&local_res8,param_3,param_4,uVar3,lVar4,1);
  local_res10 = 0;
  FUN_140161a50(param_1 + 0x20,&local_res10);
  FUN_140156be0(lVar4);
  *(undefined1 *)(param_1 + 0x380) = 0;
  if (*(undefined8 **)(param_1 + 0x348) != (undefined8 *)0x0) {
    uVar2 = **(undefined8 **)(param_1 + 0x348);
  }
  FUN_140182710(uVar2);
  return;
}



void FUN_1401f0a20(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  void *pvVar1;
  undefined8 *puVar2;
  longlong *plVar3;
  longlong lVar4;
  undefined8 local_res10;
  undefined8 local_res18 [2];
  undefined8 uVar5;
  
  uVar5 = 0xfffffffffffffffe;
  *param_1 = Proud::CSendSpeedMeasurer::vftable;
  param_1[1] = Proud::CSendSpeedMeasurer::vftable;
  param_1[2] = Proud::CSendSpeedMeasurer::vftable;
  FUN_1401f0150();
  FUN_1401f0940(param_1);
  local_res10 = 0;
  FUN_140161a50(param_1 + 4,&local_res10,param_3,param_4,uVar5);
  local_res18[0] = 0;
  FUN_140161a50(param_1 + 3,local_res18);
  pvVar1 = (void *)param_1[0x61];
  if (pvVar1 != (void *)0x0) {
    FUN_14018c200(pvVar1);
    operator_delete(pvVar1);
  }
  param_1[0x61] = 0;
  if ((param_1[0x69] != 0) &&
     (*(longlong *)(param_1[0x69] + 8) = *(longlong *)(param_1[0x69] + 8) + -1,
     *(longlong *)(param_1[0x69] + 8) == 0)) {
    puVar2 = (undefined8 *)param_1[0x69];
    pvVar1 = (void *)*puVar2;
    if (pvVar1 != (void *)0x0) {
      FUN_140182790(pvVar1);
      operator_delete(pvVar1);
    }
    FUN_140156970(puVar2);
  }
  FUN_140156c00(param_1 + 0x62);
  pvVar1 = (void *)param_1[0x61];
  if (pvVar1 != (void *)0x0) {
    FUN_14018c200(pvVar1);
    operator_delete(pvVar1);
  }
  if ((param_1[4] != 0) &&
     (*(longlong *)(param_1[4] + 8) = *(longlong *)(param_1[4] + 8) + -1,
     *(longlong *)(param_1[4] + 8) == 0)) {
    plVar3 = (longlong *)param_1[4];
    lVar4 = *plVar3;
    if (lVar4 != 0) {
      FUN_1401859b0(lVar4);
      FUN_140156970(lVar4);
    }
    FUN_140156970(plVar3);
  }
  if ((param_1[3] != 0) &&
     (*(longlong *)(param_1[3] + 8) = *(longlong *)(param_1[3] + 8) + -1,
     *(longlong *)(param_1[3] + 8) == 0)) {
    plVar3 = (longlong *)param_1[3];
    lVar4 = *plVar3;
    if (lVar4 != 0) {
      FUN_1401859b0(lVar4);
      FUN_140156970(lVar4);
    }
    FUN_140156970(plVar3);
  }
  param_1[2] = Proud::ICompletionContext::vftable;
  param_1[1] = Proud::ICompletionPortEventSink::vftable;
  *param_1 = Proud::IFastSocketDelegate::vftable;
  return;
}



void * FUN_1401f0c00(void *param_1,uint param_2)

{
  FUN_1401f0a20();
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void FUN_1401f0c30(longlong *param_1)

{
  longlong lVar1;
  undefined1 local_68 [8];
  undefined1 local_60;
  undefined4 local_5c;
  undefined1 local_50 [72];
  
  if (param_1[3] != 0) {
    FUN_140156300(local_50,PTR_u_Collection_object_can_use_fast_h_140320e48);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_50,(ThrowInfo *)&DAT_14031d928);
  }
  if (*param_1 == 0) {
    FUN_14019c9e0(local_68);
    local_5c = 0;
    local_60 = 0;
    lVar1 = FUN_14019c950(local_68);
    *param_1 = lVar1;
  }
  return;
}



void FUN_1401f0ca0(longlong *param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  longlong *plVar2;
  uint uVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  undefined8 uVar6;
  double dVar7;
  undefined **local_30;
  longlong *local_28;
  longlong local_20;
  undefined8 local_18;
  undefined8 local_10;
  
  plVar2 = (longlong *)
           (**(code **)(**(longlong **)*param_1 + 0x38))
                     (*(longlong **)*param_1,param_2,param_3,param_4,0xfffffffffffffffe);
  uVar4 = 0;
  local_28 = (longlong *)0x0;
  local_20 = 0;
  local_18 = 0;
  local_10 = 0;
  local_30 = Proud::CUncompressedFrameNumberArray::vftable;
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  uVar5 = uVar4;
  if (*(ulonglong **)(param_2 + 0x20) != (ulonglong *)0x0) {
    uVar5 = **(ulonglong **)(param_2 + 0x20);
  }
  local_28 = plVar2;
  FUN_1401ac1d0(uVar5,&local_30);
  if (0 < (int)local_18) {
    iVar1 = (int)local_18 + -1;
    if ((iVar1 < 0) || ((int)local_18 <= iVar1)) {
                    // WARNING: Subroutine does not return
      FUN_1401566e0();
    }
    *(undefined4 *)(*param_1 + 0xe4) = *(undefined4 *)(local_20 + (longlong)iVar1 * 4);
    uVar6 = (**(code **)(**(longlong **)*param_1 + 0x18))();
    *(undefined8 *)(*param_1 + 0xe8) = uVar6;
    *(int *)(*param_1 + 0x30) = *(int *)(*param_1 + 0x30) + 1;
  }
  FUN_1401e9240(*param_1 + 8,*(undefined4 *)(param_2 + 0x34));
  *(undefined4 *)(*param_1 + 0xe0) = *(undefined4 *)(param_2 + 0x34);
  uVar5 = uVar4;
  if (0 < (int)local_18) {
    do {
      if (((longlong)uVar5 < 0) || ((int)local_18 <= (int)uVar4)) {
                    // WARNING: Subroutine does not return
        FUN_1401566e0();
      }
      FUN_1401e9200(*param_1 + 8,*(undefined4 *)(local_20 + uVar5 * 4));
      uVar3 = (int)uVar4 + 1;
      uVar4 = (ulonglong)uVar3;
      uVar5 = uVar5 + 1;
    } while ((int)uVar3 < (int)local_18);
  }
  dVar7 = (double)*(int *)(*param_1 + 0x14);
  *(int *)(*param_1 + 0x14) = (int)(((double)*(int *)(param_2 + 0x30) - dVar7) * 0.9 + dVar7) + 1;
  local_30 = Proud::CFastArray<>::vftable;
  if (local_20 != 0) {
    if (local_28 == (longlong *)0x0) {
      FUN_140156970(local_20);
    }
    else {
      (**(code **)(*local_28 + 0x18))();
    }
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x0001401f1423)
// WARNING: Removing unreachable block (ram,0x0001401f142b)
// WARNING: Removing unreachable block (ram,0x0001401f142f)
// WARNING: Removing unreachable block (ram,0x0001401f1439)

void FUN_1401f0e40(longlong param_1,int param_2,int param_3)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  undefined8 uVar5;
  longlong *plVar6;
  void *pvVar7;
  ulonglong uVar8;
  int iVar9;
  longlong lVar10;
  ulonglong uVar11;
  int iVar12;
  longlong lVar13;
  longlong lVar14;
  int iVar15;
  int local_res10 [2];
  int local_res18 [2];
  char *local_res20;
  longlong *local_128;
  void *local_120;
  ulonglong local_118;
  longlong local_110;
  longlong local_108;
  longlong *local_f8;
  undefined **local_f0 [3];
  undefined **local_d8 [3];
  undefined **local_c0 [3];
  undefined8 local_a8;
  undefined **local_a0 [3];
  undefined **local_88 [3];
  undefined1 local_70 [24];
  undefined1 local_58 [32];
  
  local_a8 = 0xfffffffffffffffe;
  if (1 < param_2 - param_3) {
    std::_Container_base12::_Container_base12((_Container_base12 *)&local_128);
    local_128 = operator_new(0x10);
    if (local_128 == (longlong *)0x0) {
      local_f8 = local_128;
      std::exception::exception((exception *)local_d8,(char **)&local_f8);
      local_d8[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
      _CxxThrowException(local_d8,(ThrowInfo *)&DAT_14031d988);
    }
    *local_128 = 0;
    local_128[1] = 0;
    *local_128 = (longlong)&local_128;
    local_120 = (void *)0x0;
    local_118 = 0;
    local_110 = 0;
    local_108 = 0;
    local_res18[0] = param_2 + -1;
    local_res10[0] = param_3;
    FUN_1401621f0(&local_128,local_res10);
    FUN_1401621f0(&local_128,local_res18);
    lVar10 = local_108;
    while (lVar14 = 0, uVar8 = local_118, lVar10 != 0) {
      uVar5 = FUN_14015f290(&local_128,local_70);
      plVar6 = (longlong *)FUN_1401622e0(uVar5,local_58,1);
      lVar13 = lVar14;
      if ((longlong *)*plVar6 != (longlong *)0x0) {
        lVar13 = *(longlong *)*plVar6;
      }
      uVar8 = (ulonglong)plVar6[2] >> 2;
      if (*(ulonglong *)(lVar13 + 0x10) <= uVar8) {
        uVar8 = uVar8 - *(ulonglong *)(lVar13 + 0x10);
      }
      iVar15 = *(int *)(*(longlong *)(*(longlong *)(lVar13 + 8) + uVar8 * 8) +
                       (ulonglong)((uint)plVar6[2] & 3) * 4);
      if ((lVar10 != 0) && (lVar10 = lVar10 + -1, local_108 = lVar10, lVar10 == 0)) {
        local_110 = lVar14;
      }
      local_res10[0] = iVar15;
      uVar5 = FUN_14015f290(&local_128,local_58);
      plVar6 = (longlong *)FUN_1401622e0(uVar5,local_70,1);
      lVar13 = lVar14;
      if ((longlong *)*plVar6 != (longlong *)0x0) {
        lVar13 = *(longlong *)*plVar6;
      }
      uVar8 = (ulonglong)plVar6[2] >> 2;
      if (*(ulonglong *)(lVar13 + 0x10) <= uVar8) {
        uVar8 = uVar8 - *(ulonglong *)(lVar13 + 0x10);
      }
      iVar2 = *(int *)(*(longlong *)(*(longlong *)(lVar13 + 8) + uVar8 * 8) +
                      (ulonglong)((uint)plVar6[2] & 3) * 4);
      lVar13 = (longlong)iVar2;
      if ((lVar10 != 0) && (lVar10 = lVar10 + -1, local_108 = lVar10, lVar10 == 0)) {
        local_110 = lVar14;
      }
      iVar12 = iVar2 + 1;
      iVar3 = *(int *)(param_1 + lVar13 * 4);
      if (iVar12 <= iVar15) {
        iVar9 = iVar15;
        if ((iVar12 < iVar15) && (lVar10 = local_108, iVar12 <= iVar15)) {
LAB_1401f1007:
          do {
            if (iVar3 < *(int *)(param_1 + (longlong)iVar12 * 4)) {
              if (iVar9 < iVar12) break;
              do {
                if (*(int *)(param_1 + (longlong)iVar9 * 4) < iVar3) {
                  if (iVar9 < iVar12) goto LAB_1401f1055;
                  uVar4 = *(undefined4 *)(param_1 + (longlong)iVar12 * 4);
                  *(undefined4 *)(param_1 + (longlong)iVar12 * 4) =
                       *(undefined4 *)(param_1 + (longlong)iVar9 * 4);
                  *(undefined4 *)(param_1 + (longlong)iVar9 * 4) = uVar4;
                  break;
                }
                iVar9 = iVar9 + -1;
              } while (iVar12 <= iVar9);
            }
            else {
              iVar12 = iVar12 + 1;
              if (iVar12 <= iVar9) goto LAB_1401f1007;
            }
          } while (iVar12 < iVar9);
        }
LAB_1401f1055:
        if (iVar2 <= iVar9) {
          iVar3 = *(int *)(param_1 + (longlong)iVar9 * 4);
          if (iVar3 < *(int *)(param_1 + lVar13 * 4)) {
            uVar4 = *(undefined4 *)(param_1 + lVar13 * 4);
            *(int *)(param_1 + lVar13 * 4) = iVar3;
            *(undefined4 *)(param_1 + (longlong)iVar9 * 4) = uVar4;
            lVar10 = local_108;
          }
          if (iVar2 < iVar9) {
            std::_Container_base12::_Orphan_all((_Container_base12 *)&local_128);
            if ((((int)local_110 + (int)local_108 & 3U) == 0) && (local_118 <= local_108 + 4U >> 2))
            {
              FUN_14015f2b0(&local_128,1);
            }
            uVar8 = local_108 + local_110;
            uVar11 = uVar8 >> 2;
            if (local_118 <= uVar11) {
              uVar11 = uVar11 - local_118;
            }
            if (*(longlong *)((longlong)local_120 + uVar11 * 8) == 0) {
              pvVar7 = operator_new(0x10);
              if (pvVar7 == (void *)0x0) {
                local_res20 = (char *)0x0;
                std::exception::exception((exception *)local_a0,&local_res20);
                local_a0[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
                _CxxThrowException(local_a0,(ThrowInfo *)&DAT_14031d988);
              }
              *(void **)((longlong)local_120 + uVar11 * 8) = pvVar7;
            }
            piVar1 = (int *)(*(longlong *)((longlong)local_120 + uVar11 * 8) +
                            (ulonglong)((uint)uVar8 & 3) * 4);
            if (piVar1 != (int *)0x0) {
              *piVar1 = iVar2;
            }
            local_108 = local_108 + 1;
            std::_Container_base12::_Orphan_all((_Container_base12 *)&local_128);
            if ((((char)local_108 + (char)local_110 & 3U) == 0) &&
               (local_118 <= local_108 + 4U >> 2)) {
              FUN_14015f2b0(&local_128,1);
            }
            uVar8 = local_108 + local_110;
            uVar11 = uVar8 >> 2;
            if (local_118 <= uVar11) {
              uVar11 = uVar11 - local_118;
            }
            if (*(longlong *)((longlong)local_120 + uVar11 * 8) == 0) {
              local_res20 = operator_new(0x10);
              if (local_res20 == (char *)0x0) {
                std::exception::exception((exception *)local_c0,&local_res20);
                local_c0[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
                _CxxThrowException(local_c0,(ThrowInfo *)&DAT_14031d988);
              }
              *(char **)((longlong)local_120 + uVar11 * 8) = local_res20;
            }
            piVar1 = (int *)(*(longlong *)((longlong)local_120 + uVar11 * 8) +
                            (ulonglong)((uint)uVar8 & 3) * 4);
            if (piVar1 != (int *)0x0) {
              *piVar1 = iVar9 + -1;
            }
            lVar10 = local_108 + 1;
            iVar15 = local_res10[0];
            local_108 = lVar10;
          }
        }
        if (iVar9 < iVar15) {
          std::_Container_base12::_Orphan_all((_Container_base12 *)&local_128);
          if ((((int)local_110 + (int)local_108 & 3U) == 0) && (local_118 <= local_108 + 4U >> 2)) {
            FUN_14015f2b0(&local_128,1);
          }
          uVar8 = local_108 + local_110;
          uVar11 = uVar8 >> 2;
          if (local_118 <= uVar11) {
            uVar11 = uVar11 - local_118;
          }
          if (*(longlong *)((longlong)local_120 + uVar11 * 8) == 0) {
            pvVar7 = operator_new(0x10);
            if (pvVar7 == (void *)0x0) {
              local_res20 = (char *)0x0;
              std::exception::exception((exception *)local_f0,&local_res20);
              local_f0[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
              _CxxThrowException(local_f0,(ThrowInfo *)&DAT_14031d988);
            }
            *(void **)((longlong)local_120 + uVar11 * 8) = pvVar7;
          }
          piVar1 = (int *)(*(longlong *)((longlong)local_120 + uVar11 * 8) +
                          (ulonglong)((uint)uVar8 & 3) * 4);
          if (piVar1 != (int *)0x0) {
            *piVar1 = iVar9 + 1;
          }
          local_108 = local_108 + 1;
          std::_Container_base12::_Orphan_all((_Container_base12 *)&local_128);
          if ((((char)local_108 + (char)local_110 & 3U) == 0) && (local_118 <= local_108 + 4U >> 2))
          {
            FUN_14015f2b0(&local_128,1);
          }
          uVar8 = local_108 + local_110;
          uVar11 = uVar8 >> 2;
          if (local_118 <= uVar11) {
            uVar11 = uVar11 - local_118;
          }
          if (*(longlong *)((longlong)local_120 + uVar11 * 8) == 0) {
            pvVar7 = operator_new(0x10);
            if (pvVar7 == (void *)0x0) {
              local_res20 = (char *)0x0;
              std::exception::exception((exception *)local_88,&local_res20);
              local_88[0] = std::bad_alloc::vftable;
                    // WARNING: Subroutine does not return
              _CxxThrowException(local_88,(ThrowInfo *)&DAT_14031d988);
            }
            *(void **)((longlong)local_120 + uVar11 * 8) = pvVar7;
          }
          piVar1 = (int *)(*(longlong *)((longlong)local_120 + uVar11 * 8) +
                          (ulonglong)((uint)uVar8 & 3) * 4);
          if (piVar1 != (int *)0x0) {
            *piVar1 = iVar15;
          }
          lVar10 = local_108 + 1;
          local_108 = lVar10;
        }
      }
    }
    while (uVar8 != 0) {
      uVar8 = uVar8 - 1;
      if (*(longlong *)((longlong)local_120 + uVar8 * 8) != 0) {
        operator_delete(*(void **)((longlong)local_120 + uVar8 * 8));
      }
    }
    if (local_120 != (void *)0x0) {
      operator_delete(local_120);
    }
    local_118 = 0;
    local_120 = (void *)0x0;
    std::_Container_base12::_Orphan_all((_Container_base12 *)&local_128);
    operator_delete(local_128);
    local_128 = (longlong *)0x0;
    std::_Container_base12::~_Container_base12((_Container_base12 *)&local_128);
  }
  return;
}



void FUN_1401f1500(longlong *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  undefined8 *puVar3;
  longlong *plVar4;
  undefined8 uVar5;
  longlong *plVar6;
  longlong lVar7;
  void *_Dst;
  int iVar8;
  longlong *plVar9;
  longlong lVar10;
  int iVar11;
  int iVar12;
  longlong *local_70;
  longlong *local_68;
  undefined8 local_60;
  undefined8 local_58;
  longlong local_50;
  longlong local_48;
  longlong *local_40;
  longlong *local_38;
  undefined4 local_30;
  undefined4 local_2c;
  
  iVar11 = (int)param_1[6];
  do {
    if (iVar11 < 1) {
      return;
    }
    plVar9 = (longlong *)0x0;
    local_38 = (longlong *)(**(code **)(**(longlong **)*param_1 + 0x38))();
    local_48 = 0;
    local_50 = 0;
    local_58 = 0;
    local_40 = (longlong *)0x0;
    local_2c = 0;
    local_60 = 2;
    uVar5 = (**(code **)(**(longlong **)*param_1 + 0x38))();
    plVar6 = (longlong *)FUN_14016b910(&local_70,uVar5);
    plVar1 = local_38;
    plVar4 = local_40;
    plVar2 = (longlong *)*plVar6;
    if (plVar2 != (longlong *)0x0) {
      plVar2[1] = plVar2[1] + 1;
      plVar9 = plVar2;
    }
    if (local_40 != (longlong *)0x0) {
      plVar2 = local_40 + 1;
      *plVar2 = *plVar2 + -1;
      if (*plVar2 == 0) {
        puVar3 = (undefined8 *)*local_40;
        *puVar3 = Proud::CFastArray<>::vftable;
        if (puVar3[2] != 0) {
          if ((longlong *)puVar3[1] == (longlong *)0x0) {
            FUN_140156970(puVar3[2]);
          }
          else {
            (**(code **)(*(longlong *)puVar3[1] + 0x18))();
          }
        }
        (**(code **)(*plVar1 + 0x18))(plVar1,puVar3);
        (**(code **)(*local_38 + 0x18))(local_38,plVar4);
      }
    }
    plVar4 = local_68;
    plVar2 = local_70;
    lVar10 = 0;
    local_38 = (longlong *)plVar6[1];
    local_40 = plVar9;
    if (local_70 != (longlong *)0x0) {
      plVar1 = local_70 + 1;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        puVar3 = (undefined8 *)*local_70;
        *puVar3 = Proud::CFastArray<>::vftable;
        if (puVar3[2] != 0) {
          if ((longlong *)puVar3[1] == (longlong *)0x0) {
            FUN_140156970(puVar3[2]);
          }
          else {
            (**(code **)(*(longlong *)puVar3[1] + 0x18))();
          }
        }
        (**(code **)(*plVar4 + 0x18))(plVar4,puVar3);
        (**(code **)(*local_68 + 0x18))(local_68,plVar2);
      }
    }
    iVar12 = 0;
    iVar11 = (int)param_1[6];
    lVar7 = lVar10;
    if (iVar11 != 0) {
      lVar7 = param_1[5];
    }
    if (iVar11 < 0x7d1) {
      FUN_14015db00(lVar7,iVar11,0);
    }
    else {
      FUN_1401f0e40();
    }
    iVar8 = 0;
    iVar11 = 0;
    if (0 < (int)param_1[6]) {
      do {
        if ((lVar10 < 0) || ((int)param_1[6] <= iVar8)) {
                    // WARNING: Subroutine does not return
          FUN_1401566e0();
        }
        if (local_40 == (longlong *)0x0) {
          lVar7 = 0;
        }
        else {
          lVar7 = *local_40;
        }
        FUN_1401ac080(lVar7,*(undefined4 *)(param_1[5] + lVar10 * 4));
        iVar12 = iVar11 + 1;
        lVar7 = FUN_14015ae70(&local_40);
        if (DAT_14032e66c <= *(int *)(lVar7 + 0x18)) break;
        iVar8 = iVar8 + 1;
        lVar10 = lVar10 + 1;
        iVar11 = iVar12;
      } while (iVar8 < (int)param_1[6]);
    }
    local_30 = (undefined4)param_1[0x17];
    local_2c = (undefined4)param_1[2];
    FUN_1401e8de0(*param_1 + 8,&local_60);
    *(undefined8 *)(*param_1 + 0x18) = 0;
    if (iVar12 < 0) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    iVar11 = (int)param_1[6];
    if (iVar11 <= iVar12) {
      iVar12 = iVar11;
    }
    if (0 < iVar11 - iVar12) {
      lVar10 = 0;
      if (iVar11 == 0) {
        _Dst = (void *)0x0;
      }
      else {
        lVar10 = param_1[5];
        _Dst = (void *)param_1[5];
      }
      memmove(_Dst,(void *)(lVar10 + (longlong)iVar12 * 4),(longlong)(iVar11 - iVar12) << 2);
    }
    FUN_14015cb30(param_1 + 3,(int)param_1[6] - iVar12);
    plVar4 = local_38;
    plVar2 = local_40;
    if (local_40 != (longlong *)0x0) {
      plVar1 = local_40 + 1;
      *plVar1 = *plVar1 + -1;
      if (*plVar1 == 0) {
        puVar3 = (undefined8 *)*local_40;
        *puVar3 = Proud::CFastArray<>::vftable;
        if (puVar3[2] != 0) {
          if ((longlong *)puVar3[1] == (longlong *)0x0) {
            FUN_140156970(puVar3[2]);
          }
          else {
            (**(code **)(*(longlong *)puVar3[1] + 0x18))();
          }
        }
        (**(code **)(*plVar4 + 0x18))(plVar4,puVar3);
        (**(code **)(*local_38 + 0x18))(local_38,plVar2);
      }
    }
    FUN_1401560e0(&local_58);
    if ((local_50 != 0) && (local_48 < 0)) {
                    // WARNING: Subroutine does not return
      FUN_1401566b0();
    }
    iVar11 = (int)param_1[6];
  } while( true );
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1401f1830(undefined8 *param_1)

{
  double dVar1;
  int iVar2;
  double dVar3;
  
  dVar3 = (double)(**(code **)(**(longlong **)*param_1 + 0x18))();
  if ((double)param_1[0x16] == 0.0) {
    param_1[0x16] = dVar3;
  }
  dVar1 = (double)param_1[0x16];
  if (_DAT_1403222a8 < dVar3 - dVar1) {
    iVar2 = *(int *)(param_1 + 0x15);
    param_1[0x16] = dVar3;
    *(undefined4 *)(param_1 + 0x15) = 0;
    *(int *)(param_1 + 0x17) =
         (int)(((double)iVar2 - (double)*(int *)(param_1 + 0x17)) * (0.1 / (dVar3 - dVar1)) +
              (double)*(int *)(param_1 + 0x17));
  }
  if (DAT_1403222b8 * 0.2 < dVar3 - (double)param_1[1]) {
    FUN_1401f1500(param_1);
    param_1[1] = dVar3;
  }
  return;
}



undefined8 *
FUN_1401f1910(longlong *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  longlong *plVar1;
  undefined8 *puVar2;
  
  plVar1 = (longlong *)*param_1;
  if (plVar1 == (longlong *)0x0) {
    puVar2 = (undefined8 *)FUN_140156940(0x48);
  }
  else {
    puVar2 = (undefined8 *)(**(code **)(*plVar1 + 8))(plVar1,0x48);
  }
  if (puVar2 != (undefined8 *)0x0) {
    FUN_1401e8ec0(puVar2 + 2,param_2);
  }
  puVar2[1] = param_3;
  *puVar2 = param_4;
  param_1[3] = param_1[3] + 1;
  return puVar2;
}



void FUN_1401f19a0(longlong param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong lVar3;
  longlong *plVar4;
  int iVar5;
  longlong lVar6;
  undefined1 local_98 [144];
  
  if (*(longlong *)(param_1 + 0x58) != 0) {
    do {
      lVar2 = *(longlong *)(param_1 + 0x48);
      if (lVar2 == 0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      if (*(int *)(lVar2 + 0x14) != *(int *)(param_1 + 0x10)) {
        return;
      }
      lVar3 = *(longlong *)(lVar2 + 0x18);
      if ((lVar3 == 0) && (*(longlong *)(lVar2 + 0x20) == 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401561e0();
      }
      if (*(longlong *)(lVar2 + 0x20) == 0) {
        if (lVar3 == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        lVar6 = 0;
        if (*(int *)(lVar3 + 0x18) != 0) {
          lVar6 = *(longlong *)(lVar3 + 0x10);
        }
      }
      else {
        lVar6 = *(longlong *)(lVar2 + 0x20);
        if (*(longlong *)(lVar2 + 0x20) == 0) {
          FUN_140156300(local_98,PTR_u_ArrayWithExternalBuffer_is_unini_1403200d0);
                    // WARNING: Subroutine does not return
          _CxxThrowException(local_98,(ThrowInfo *)&DAT_14031d928);
        }
      }
      FUN_1401aea00(param_1 + 0x60,lVar6);
      if (*(longlong *)(lVar2 + 0x18) == 0) {
        if (*(longlong *)(lVar2 + 0x20) == 0) {
                    // WARNING: Subroutine does not return
          FUN_1401561e0();
        }
        iVar5 = *(int *)(lVar2 + 0x28);
      }
      else {
        iVar5 = *(int *)(*(longlong *)(lVar2 + 0x18) + 0x18);
      }
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + iVar5;
      plVar4 = *(longlong **)(param_1 + 0x48);
      if (plVar4 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        FUN_14004ea80(0x80004005);
      }
      lVar2 = *plVar4;
      *(longlong *)(param_1 + 0x48) = lVar2;
      if (lVar2 == 0) {
        *(undefined8 *)(param_1 + 0x50) = 0;
      }
      else {
        *(undefined8 *)(lVar2 + 8) = 0;
      }
      if (plVar4[6] != 0) {
        plVar1 = (longlong *)(plVar4[6] + 8);
        *plVar1 = *plVar1 + -1;
        if (*plVar1 == 0) {
          FUN_140161ae0(plVar4 + 6,plVar4[6]);
        }
      }
      FUN_1401560e0(plVar4 + 3);
      if (plVar4[4] != 0) {
        if (*(int *)((longlong)plVar4 + 0x2c) < 0) {
                    // WARNING: Subroutine does not return
          FUN_1401566b0();
        }
        *(undefined4 *)(plVar4 + 5) = 0;
      }
      plVar1 = *(longlong **)(param_1 + 0x40);
      if (plVar1 == (longlong *)0x0) {
        FUN_140156970(plVar4);
      }
      else {
        (**(code **)(*plVar1 + 0x10))(plVar1,plVar4);
      }
      *(longlong *)(param_1 + 0x58) = *(longlong *)(param_1 + 0x58) + -1;
      *(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
    } while (*(longlong *)(param_1 + 0x58) != 0);
  }
  return;
}



void FUN_1401f1b50(longlong param_1,longlong param_2,undefined8 param_3)

{
  undefined8 uVar1;
  
  if (param_2 != 0) {
    uVar1 = FUN_1401f1910(param_1,param_3,*(undefined8 *)(param_2 + 8),param_2);
    if (*(undefined8 **)(param_2 + 8) != (undefined8 *)0x0) {
      **(undefined8 **)(param_2 + 8) = uVar1;
      *(undefined8 *)(param_2 + 8) = uVar1;
      return;
    }
    *(undefined8 *)(param_1 + 8) = uVar1;
    *(undefined8 *)(param_2 + 8) = uVar1;
    return;
  }
  uVar1 = FUN_1401f1910(param_1,param_3,0,*(undefined8 *)(param_1 + 8));
  if (*(longlong *)(param_1 + 8) != 0) {
    *(undefined8 *)(*(longlong *)(param_1 + 8) + 8) = uVar1;
    *(undefined8 *)(param_1 + 8) = uVar1;
    return;
  }
  *(undefined8 *)(param_1 + 0x10) = uVar1;
  *(undefined8 *)(param_1 + 8) = uVar1;
  return;
}



undefined8 *
FUN_1401f1bf0(undefined8 *param_1,undefined8 param_2,undefined4 param_3,longlong param_4)

{
  undefined1 local_60 [72];
  
  param_1[4] = 0;
  param_1[5] = 0;
  param_1[6] = 0;
  param_1[7] = 0;
  param_1[3] = Proud::ReliableUdpReceiver::AcksToSend::vftable;
  param_1[8] = 0;
  param_1[0xb] = 0;
  param_1[9] = 0;
  param_1[10] = 0;
  FUN_1401f0c30();
  FUN_1401ae900(param_1 + 0xc,(longlong)DAT_140320d1c);
  if (param_4 == 0) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  if (0 < *(int *)((longlong)param_1 + 0x34)) {
    FUN_140156300(local_60,PTR_u_Collection_object_can_use_fast_h_140320e48);
                    // WARNING: Subroutine does not return
    _CxxThrowException(local_60,(ThrowInfo *)&DAT_14031d928);
  }
  param_1[4] = param_4;
  *(undefined4 *)((longlong)param_1 + 0x3c) = 1;
  param_1[0x14] = 0;
  *(undefined4 *)(param_1 + 0x15) = 0;
  param_1[0x16] = 0;
  *(undefined4 *)(param_1 + 0x17) = DAT_140322294;
  *(undefined4 *)((longlong)param_1 + 0xbc) = 0;
  *param_1 = param_2;
  *(undefined4 *)(param_1 + 2) = param_3;
  *(undefined4 *)((longlong)param_1 + 0x14) = param_3;
  param_1[1] = 0;
  return param_1;
}



void FUN_1401f1d00(undefined8 *param_1,longlong param_2)

{
  longlong *plVar1;
  int iVar2;
  int iVar3;
  undefined8 uVar4;
  undefined8 *puVar5;
  undefined8 local_40;
  undefined8 local_38;
  longlong local_30;
  longlong local_28;
  longlong local_20;
  undefined8 local_18;
  undefined4 local_c;
  
  puVar5 = (undefined8 *)param_1[9];
  do {
    if (puVar5 == (undefined8 *)0x0) {
      uVar4 = (**(code **)(**(longlong **)*param_1 + 0x38))();
      local_18 = *(undefined8 *)(param_2 + 0x28);
      local_28 = 0;
      local_30 = 0;
      local_38 = 0;
      local_20 = 0;
      local_40 = 0;
      local_c = 0;
      FUN_1401ac450(param_2,&local_40,uVar4);
      uVar4 = FUN_1401f1910(param_1 + 8,&local_40,param_1[10],0);
      if ((undefined8 *)param_1[10] == (undefined8 *)0x0) {
        param_1[9] = uVar4;
      }
      else {
        *(undefined8 *)param_1[10] = uVar4;
      }
      param_1[10] = uVar4;
      if (local_20 != 0) {
        plVar1 = (longlong *)(local_20 + 8);
        *plVar1 = *plVar1 + -1;
        if (*plVar1 == 0) {
          FUN_140161ae0(&local_20,local_20);
        }
      }
      FUN_1401560e0(&local_38);
      if ((local_30 != 0) && (local_28 < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
LAB_1401f1e94:
      *(int *)(param_1 + 0x15) = *(int *)(param_1 + 0x15) + 1;
      return;
    }
    iVar2 = *(int *)((longlong)puVar5 + 0x14);
    iVar3 = *(int *)(param_2 + 4);
    if (iVar2 == iVar3) {
      return;
    }
    if ((iVar3 != iVar2) && (0x7fffffff < (uint)(iVar3 - iVar2))) {
      uVar4 = (**(code **)(**(longlong **)*param_1 + 0x38))();
      local_18 = *(undefined8 *)(param_2 + 0x28);
      local_28 = 0;
      local_30 = 0;
      local_38 = 0;
      local_20 = 0;
      local_40 = 0;
      local_c = 0;
      FUN_1401ac450(param_2,&local_40,uVar4);
      FUN_1401f1b50(param_1 + 8,puVar5,&local_40);
      if (local_20 != 0) {
        plVar1 = (longlong *)(local_20 + 8);
        *plVar1 = *plVar1 + -1;
        if (*plVar1 == 0) {
          FUN_140161ae0(&local_20,local_20);
        }
      }
      FUN_1401560e0(&local_38);
      if ((local_30 != 0) && (local_28 < 0)) {
                    // WARNING: Subroutine does not return
        FUN_1401566b0();
      }
      goto LAB_1401f1e94;
    }
    puVar5 = (undefined8 *)*puVar5;
  } while( true );
}



void FUN_1401f1eb0(undefined8 *param_1,longlong param_2)

{
  char cVar1;
  
  *(int *)((longlong)param_1 + 0xbc) = *(int *)((longlong)param_1 + 0xbc) + 1;
  cVar1 = (**(code **)(**(longlong **)*param_1 + 0x10))();
  if (cVar1 == '\0') {
    if ((*(int *)(param_2 + 4) == *(int *)(param_1 + 2)) ||
       ((uint)(*(int *)(param_2 + 4) - *(int *)(param_1 + 2)) < 0x80000000)) {
      FUN_14015dfd0(param_1 + 3,*(undefined4 *)(param_1 + 6),param_2 + 4,1);
      *(int *)((longlong)param_1 + 0xa4) = *(int *)((longlong)param_1 + 0xa4) + 1;
    }
  }
  *(undefined4 *)((longlong)param_1 + 0x14) = *(undefined4 *)(param_2 + 4);
  if ((*(int *)(param_2 + 4) == *(int *)(param_1 + 2)) ||
     ((uint)(*(int *)(param_2 + 4) - *(int *)(param_1 + 2)) < 0x80000000)) {
    FUN_1401f1d00(param_1,param_2);
    FUN_1401f19a0(param_1);
  }
  return;
}



void FUN_1401f1f40(undefined8 param_1,int *param_2)

{
  if (*param_2 == 1) {
    FUN_1401f1eb0();
  }
  else if (*param_2 == 2) {
    FUN_1401f0ca0();
    return;
  }
  return;
}



undefined8 FUN_1401f1f70(longlong param_1,uint param_2)

{
  int iVar1;
  void *pvVar2;
  uint uVar3;
  ulonglong uVar4;
  longlong lVar5;
  int iVar6;
  
  if (*(int *)(param_1 + 4) < (int)param_2) {
    uVar3 = param_2 & 0x8000001f;
    if ((int)uVar3 < 0) {
      uVar3 = (uVar3 - 1 | 0xffffffe0) + 1;
    }
    iVar6 = param_2 + (0x40 - uVar3);
    pvVar2 = realloc(*(void **)(param_1 + 0x10),(longlong)iVar6 << 2);
    if (pvVar2 == (void *)0x0) {
      return 0xfffffffe;
    }
    iVar1 = *(int *)(param_1 + 4);
    uVar4 = (ulonglong)iVar1;
    *(void **)(param_1 + 0x10) = pvVar2;
    *(int *)(param_1 + 4) = iVar6;
    if (iVar1 < iVar6) {
      lVar5 = uVar4 << 2;
      do {
        uVar3 = (int)uVar4 + 1;
        uVar4 = (ulonglong)uVar3;
        *(undefined4 *)(lVar5 + *(longlong *)(param_1 + 0x10)) = 0;
        lVar5 = lVar5 + 4;
      } while ((int)uVar3 < *(int *)(param_1 + 4));
    }
  }
  return 0;
}



void FUN_1401f2010(int *param_1)

{
  int iVar1;
  
  iVar1 = *param_1;
  if (0 < iVar1) {
    do {
      if (*(int *)(*(longlong *)(param_1 + 4) + -4 + (longlong)*param_1 * 4) != 0) break;
      iVar1 = *param_1 + -1;
      *param_1 = iVar1;
    } while (0 < iVar1);
    iVar1 = *param_1;
  }
  if (iVar1 == 0) {
    param_1[2] = 0;
  }
  return;
}



undefined8 FUN_1401f2050(int *param_1,int param_2,int *param_3)

{
  undefined8 uVar1;
  byte bVar2;
  uint uVar3;
  uint uVar4;
  uint *puVar5;
  uint uVar6;
  
  if ((((param_1 == param_3) || (uVar1 = FUN_1401ea0b0(param_1,param_3), (int)uVar1 == 0)) &&
      ((param_2 / 0x1c + 1 + *param_3 <= param_3[1] ||
       (uVar1 = FUN_1401f1f70(param_3), (int)uVar1 == 0)))) &&
     ((param_2 < 0x1c || (uVar1 = FUN_1401f4100(param_3,param_2 / 0x1c), (int)uVar1 == 0)))) {
    if (param_2 % 0x1c != 0) {
      puVar5 = *(uint **)(param_3 + 4);
      uVar4 = 0;
      bVar2 = (byte)(param_2 % 0x1c);
      uVar6 = uVar4;
      if (0 < *param_3) {
        do {
          uVar6 = uVar6 + 1;
          uVar3 = *puVar5 >> (0x1c - bVar2 & 0x1f) & (1 << (bVar2 & 0x1f)) - 1U;
          *puVar5 = (*puVar5 << (bVar2 & 0x1f) | uVar4) & 0xfffffff;
          puVar5 = puVar5 + 1;
          uVar4 = uVar3;
        } while ((int)uVar6 < *param_3);
        if (uVar3 != 0) {
          *(uint *)(*(longlong *)(param_3 + 4) + (longlong)*param_3 * 4) = uVar3;
          *param_3 = *param_3 + 1;
        }
      }
    }
    FUN_1401f2010(param_3);
    uVar1 = 0;
  }
  return uVar1;
}



void FUN_1401f2150(undefined4 *param_1)

{
  undefined4 *puVar1;
  int iVar2;
  
  puVar1 = *(undefined4 **)(param_1 + 4);
  iVar2 = 0;
  param_1[2] = 0;
  *param_1 = 0;
  if (0 < (int)param_1[1]) {
    do {
      *puVar1 = 0;
      iVar2 = iVar2 + 1;
      puVar1 = puVar1 + 1;
    } while (iVar2 < (int)param_1[1]);
  }
  return;
}



undefined8 FUN_1401f2180(int *param_1,int *param_2)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  uint *puVar5;
  longlong lVar6;
  
  iVar1 = *param_1;
  if (*param_2 < iVar1) {
    return 1;
  }
  if (iVar1 < *param_2) {
    return 0xffffffff;
  }
  puVar5 = (uint *)(*(longlong *)(param_1 + 4) + (longlong)(iVar1 + -1) * 4);
  iVar4 = 0;
  if (0 < iVar1) {
    lVar6 = (*(longlong *)(param_2 + 4) + (longlong)(iVar1 + -1) * 4) - (longlong)puVar5;
    do {
      uVar2 = *puVar5;
      uVar3 = *(uint *)(lVar6 + (longlong)puVar5);
      if (uVar2 >= uVar3 && uVar2 != uVar3) {
        return 1;
      }
      if (uVar2 < uVar3) {
        return 0xffffffff;
      }
      iVar4 = iVar4 + 1;
      puVar5 = puVar5 + -1;
    } while (iVar4 < iVar1);
  }
  return 0;
}



void FUN_1401f21e0(undefined1 *param_1,int param_2)

{
  undefined1 uVar1;
  longlong lVar2;
  undefined1 *puVar3;
  undefined1 *puVar4;
  
  lVar2 = (longlong)(param_2 + -1);
  if (0 < param_2 + -1) {
    puVar3 = param_1;
    do {
      uVar1 = *puVar3;
      puVar4 = puVar3 + 1;
      *puVar3 = param_1[lVar2];
      param_1[lVar2] = uVar1;
      lVar2 = lVar2 + -1;
      puVar3 = puVar4;
    } while ((longlong)puVar4 - (longlong)param_1 < lVar2);
  }
  return;
}



undefined8 FUN_1401f2230(int *param_1,uint param_2,longlong param_3,uint *param_4)

{
  undefined4 uVar1;
  undefined8 uVar2;
  int iVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  longlong lVar6;
  int local_28 [2];
  int local_20;
  longlong local_18;
  
  uVar5 = (ulonglong)param_2;
  if (param_2 == 0) {
    return 0xfffffffd;
  }
  if ((param_2 == 1) || (*param_1 == 0)) {
    if (param_4 != (uint *)0x0) {
      *param_4 = 0;
    }
    if (param_3 != 0) {
      uVar2 = FUN_1401ea0b0(param_1,param_3);
      return uVar2;
    }
  }
  else {
    if ((param_2 & param_2 - 1) == 0) {
      iVar3 = 0;
      do {
        if (param_2 == 1 << ((byte)iVar3 & 0x1f)) {
          if (param_4 != (uint *)0x0) {
            *param_4 = (1 << ((byte)iVar3 & 0x1f)) - 1U & **(uint **)(param_1 + 4);
          }
          if (param_3 == 0) {
            return 0;
          }
          uVar2 = FUN_1401f23e0(param_1,iVar3,param_3,0);
          return uVar2;
        }
        iVar3 = iVar3 + 1;
      } while (iVar3 < 0x1c);
    }
    if (param_2 == 3) {
      uVar2 = FUN_1401f7e00(param_1,param_3,param_4);
      return uVar2;
    }
    uVar2 = FUN_1401f4190(local_28);
    if ((int)uVar2 != 0) {
      return uVar2;
    }
    local_28[0] = *param_1;
    local_20 = param_1[2];
    uVar4 = 0;
    lVar6 = (longlong)(local_28[0] + -1);
    if (-1 < local_28[0] + -1) {
      do {
        uVar4 = (ulonglong)*(uint *)(*(longlong *)(param_1 + 4) + lVar6 * 4) | uVar4 << 0x1c;
        if (uVar4 < uVar5) {
          uVar1 = 0;
        }
        else {
          uVar1 = (undefined4)(uVar4 / uVar5);
          uVar4 = uVar4 - (uVar4 / uVar5 & 0xffffffff) * uVar5;
        }
        lVar6 = lVar6 + -1;
        *(undefined4 *)(local_18 + 4 + lVar6 * 4) = uVar1;
      } while (-1 < lVar6);
    }
    if (param_4 != (uint *)0x0) {
      *param_4 = (uint)uVar4;
    }
    if (param_3 != 0) {
      FUN_1401f2010(local_28);
      FUN_1401f4050(local_28,param_3);
    }
    FUN_1401ea010(local_28);
  }
  return 0;
}



void FUN_1401f23b0(undefined8 param_1,undefined8 param_2)

{
  int iVar1;
  
  iVar1 = FUN_1401e9fb0();
  if (iVar1 == 0) {
    FUN_1401ea0b0(param_2,param_1);
  }
  return;
}



ulonglong FUN_1401f23e0(undefined8 param_1,int param_2,int *param_3,longlong param_4)

{
  uint *puVar1;
  uint uVar2;
  ulonglong uVar3;
  byte bVar4;
  uint uVar5;
  int iVar6;
  undefined1 local_28 [32];
  
  if (param_2 < 1) {
    uVar2 = FUN_1401ea0b0(param_1,param_3);
    uVar3 = (ulonglong)uVar2;
    if (param_4 != 0) {
      FUN_1401f2150(param_4);
    }
  }
  else {
    uVar3 = FUN_1401e9fb0(local_28);
    if ((int)uVar3 == 0) {
      if (param_4 != 0) {
        uVar2 = FUN_1401f7ef0(param_1,param_2,local_28);
        if (uVar2 != 0) {
          FUN_1401ea010(local_28);
          return (ulonglong)uVar2;
        }
      }
      uVar2 = FUN_1401ea0b0(param_1,param_3);
      uVar3 = (ulonglong)uVar2;
      if (uVar2 == 0) {
        if (0x1b < param_2) {
          FUN_1401f4080(param_3,param_2 / 0x1c);
        }
        if (param_2 % 0x1c != 0) {
          uVar2 = 0;
          bVar4 = (byte)(param_2 % 0x1c);
          iVar6 = *param_3 + -1;
          puVar1 = (uint *)(*(longlong *)(param_3 + 4) + (longlong)iVar6 * 4);
          for (; -1 < iVar6; iVar6 = iVar6 + -1) {
            uVar5 = uVar2 << (0x1c - bVar4 & 0x1f);
            uVar2 = *puVar1 & (1 << (bVar4 & 0x1f)) - 1U;
            *puVar1 = *puVar1 >> (bVar4 & 0x1f) | uVar5;
            puVar1 = puVar1 + -1;
          }
        }
        FUN_1401f2010(param_3);
        if (param_4 != 0) {
          FUN_1401f4050(local_28,param_4);
        }
        FUN_1401ea010(local_28);
        uVar3 = 0;
      }
      else {
        FUN_1401ea010(local_28);
      }
    }
  }
  return uVar3;
}



undefined8 FUN_1401f2560(int *param_1,uint *param_2,int *param_3)

{
  int iVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  uint uVar5;
  undefined8 uVar6;
  uint *puVar7;
  uint *_Dst;
  ulonglong uVar8;
  uint uVar9;
  int *piVar10;
  longlong lVar11;
  int *piVar12;
  
  iVar1 = *param_1;
  uVar2 = *param_2;
  uVar8 = (ulonglong)uVar2;
  if ((iVar1 <= param_3[1]) || (uVar6 = FUN_1401f1f70(param_3), (int)uVar6 == 0)) {
    iVar3 = *param_3;
    _Dst = *(uint **)(param_3 + 4);
    uVar5 = 0;
    *param_3 = iVar1;
    piVar10 = *(int **)(param_1 + 4);
    piVar12 = *(int **)(param_2 + 4);
    puVar7 = _Dst;
    uVar9 = 0;
    if (0 < (int)uVar2) {
      do {
        iVar4 = *piVar10;
        _Dst = puVar7 + 1;
        piVar10 = piVar10 + 1;
        uVar5 = (iVar4 - *piVar12) - uVar5;
        *puVar7 = uVar5 & 0xfffffff;
        uVar5 = uVar5 >> 0x1f;
        uVar8 = uVar8 - 1;
        puVar7 = _Dst;
        piVar12 = piVar12 + 1;
        uVar9 = uVar2;
      } while (uVar8 != 0);
    }
    if ((int)uVar9 < iVar1) {
      lVar11 = (longlong)piVar10 - (longlong)_Dst;
      uVar8 = (ulonglong)(iVar1 - uVar9);
      puVar7 = _Dst;
      do {
        _Dst = puVar7 + 1;
        uVar5 = *(int *)(lVar11 + (longlong)puVar7) - uVar5;
        *puVar7 = uVar5;
        *puVar7 = *puVar7 & 0xfffffff;
        uVar5 = uVar5 >> 0x1f;
        uVar8 = uVar8 - 1;
        puVar7 = _Dst;
      } while (uVar8 != 0);
    }
    if (*param_3 < iVar3) {
      memset(_Dst,0,(ulonglong)(uint)(iVar3 - *param_3) << 2);
    }
    FUN_1401f2010(param_3);
    uVar6 = 0;
  }
  return uVar6;
}



undefined8 FUN_1401f2660(uint *param_1,uint *param_2,int *param_3)

{
  int iVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  undefined8 uVar5;
  int *piVar6;
  uint uVar7;
  uint uVar8;
  int *piVar9;
  longlong lVar10;
  uint *puVar11;
  uint *puVar12;
  ulonglong uVar13;
  uint uVar14;
  uint *puVar15;
  
  uVar14 = *param_1;
  uVar4 = *param_2;
  puVar15 = param_2;
  uVar7 = uVar4;
  if ((int)uVar4 < (int)uVar14) {
    puVar15 = param_1;
    uVar7 = uVar14;
    uVar14 = uVar4;
  }
  if (((int)(uVar7 + 1) <= param_3[1]) || (uVar5 = FUN_1401f1f70(param_3), (int)uVar5 == 0)) {
    iVar1 = *param_3;
    puVar12 = *(uint **)(param_3 + 4);
    *param_3 = uVar7 + 1;
    piVar6 = *(int **)(param_1 + 4);
    piVar9 = *(int **)(param_2 + 4);
    uVar4 = 0;
    uVar8 = 0;
    if (0 < (int)uVar14) {
      uVar13 = (ulonglong)uVar14;
      puVar11 = puVar12;
      do {
        iVar2 = *piVar9;
        puVar12 = puVar11 + 1;
        piVar9 = piVar9 + 1;
        iVar3 = *piVar6;
        piVar6 = piVar6 + 1;
        uVar4 = iVar2 + iVar3 + uVar4;
        *puVar11 = uVar4 & 0xfffffff;
        uVar4 = uVar4 >> 0x1c;
        uVar13 = uVar13 - 1;
        puVar11 = puVar12;
        uVar8 = uVar14;
      } while (uVar13 != 0);
    }
    if (uVar14 != uVar7) {
      lVar10 = (longlong)(int)uVar8;
      while (lVar10 < (int)uVar7) {
        lVar10 = lVar10 + 1;
        uVar4 = uVar4 + *(int *)(*(longlong *)(puVar15 + 4) + -4 + lVar10 * 4);
        *puVar12 = uVar4;
        *puVar12 = *puVar12 & 0xfffffff;
        uVar4 = uVar4 >> 0x1c;
        puVar12 = puVar12 + 1;
      }
    }
    *puVar12 = uVar4;
    if (*param_3 < iVar1) {
      memset(puVar12 + 1,0,(ulonglong)(uint)(iVar1 - *param_3) << 2);
    }
    FUN_1401f2010(param_3);
    uVar5 = 0;
  }
  return uVar5;
}



undefined8 FUN_1401f2790(uint *param_1,uint *param_2,undefined8 param_3,uint param_4)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  undefined8 uVar4;
  ulonglong uVar5;
  longlong lVar6;
  uint *puVar7;
  uint uVar8;
  ulonglong uVar9;
  uint uVar10;
  int iVar11;
  uint *puVar12;
  uint *puVar13;
  uint uVar14;
  ulonglong uVar15;
  uint local_48 [4];
  longlong local_38;
  
  if ((int)param_4 < 0x200) {
    uVar14 = *param_2;
    if ((int)*param_1 < (int)*param_2) {
      uVar14 = *param_1;
    }
    if ((int)uVar14 < 0x100) {
      uVar4 = FUN_1401f28f0();
      return uVar4;
    }
  }
  uVar4 = FUN_1401f4190(local_48);
  if ((int)uVar4 == 0) {
    uVar14 = *param_1;
    iVar11 = 0;
    lVar6 = 0;
    uVar2 = param_4;
    if (0 < (longlong)(int)uVar14) {
      do {
        puVar7 = *(uint **)(param_2 + 4);
        uVar9 = 0;
        uVar8 = 0;
        uVar3 = uVar2;
        if ((int)*param_2 < (int)uVar2) {
          uVar3 = *param_2;
        }
        uVar15 = (ulonglong)uVar3;
        uVar1 = *(uint *)(*(longlong *)(param_1 + 4) + lVar6 * 4);
        puVar13 = (uint *)(local_38 + (longlong)iVar11 * 4);
        puVar12 = puVar13;
        uVar10 = 0;
        if (0 < (int)uVar3) {
          do {
            uVar8 = *puVar7;
            puVar13 = puVar12 + 1;
            puVar7 = puVar7 + 1;
            uVar5 = (ulonglong)uVar8 * (ulonglong)uVar1 + (ulonglong)*puVar12 + (uVar9 & 0xffffffff)
            ;
            uVar9 = uVar5 >> 0x1c;
            uVar8 = (uint)uVar9;
            uVar15 = uVar15 - 1;
            *puVar12 = (uint)uVar5 & 0xfffffff;
            puVar12 = puVar13;
            uVar10 = uVar3;
          } while (uVar15 != 0);
        }
        if ((int)(uVar10 + iVar11) < (int)param_4) {
          *puVar13 = uVar8;
        }
        lVar6 = lVar6 + 1;
        iVar11 = iVar11 + 1;
        uVar2 = uVar2 - 1;
      } while (lVar6 < (int)uVar14);
    }
    local_48[0] = param_4;
    FUN_1401f2010(local_48);
    FUN_1401f4050(local_48,param_3);
    FUN_1401ea010(local_48);
    uVar4 = 0;
  }
  return uVar4;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Type propagation algorithm not settling

undefined8 FUN_1401f28f0(int *param_1,int *param_2,int *param_3,int param_4)

{
  int iVar1;
  int iVar2;
  longlong lVar3;
  longlong lVar4;
  uint uVar5;
  uint uVar6;
  undefined8 uVar7;
  int iVar8;
  ulonglong uVar9;
  int iVar10;
  void *_Dst;
  uint *puVar11;
  uint *puVar12;
  ulonglong uVar13;
  ulonglong uVar14;
  int iVar15;
  undefined1 auStack_878 [32];
  int *local_858;
  uint auStack_84c [513];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_878;
  local_858 = param_3;
  if ((param_4 <= param_3[1]) || (uVar7 = FUN_1401f1f70(param_3), (int)uVar7 == 0)) {
    iVar2 = *param_1;
    iVar15 = *param_2 + iVar2;
    if (param_4 < iVar15) {
      iVar15 = param_4;
    }
    uVar9 = 0;
    if (0 < iVar15) {
      lVar3 = *(longlong *)(param_1 + 4);
      lVar4 = *(longlong *)(param_2 + 4);
      iVar1 = *param_2 + -1;
      uVar13 = uVar9;
      uVar14 = uVar9;
      do {
        iVar10 = (int)uVar9;
        iVar8 = iVar10;
        if (iVar1 < iVar10) {
          iVar8 = iVar1;
        }
        puVar11 = (uint *)(lVar3 + (longlong)(iVar10 - iVar8) * 4);
        puVar12 = (uint *)(lVar4 + (longlong)iVar8 * 4);
        uVar5 = iVar2 - (iVar10 - iVar8);
        uVar6 = iVar8 + 1U;
        if ((int)uVar5 < (int)(iVar8 + 1U)) {
          uVar6 = uVar5;
        }
        uVar9 = (ulonglong)uVar6;
        if (0 < (int)uVar6) {
          do {
            uVar6 = *puVar12;
            uVar5 = *puVar11;
            puVar12 = puVar12 + -1;
            puVar11 = puVar11 + 1;
            uVar13 = uVar13 + (ulonglong)uVar6 * (ulonglong)uVar5;
            uVar9 = uVar9 - 1;
          } while (uVar9 != 0);
        }
        uVar14 = uVar14 + 1;
        uVar9 = (ulonglong)(iVar10 + 1);
        uVar6 = (uint)uVar13;
        uVar13 = uVar13 >> 0x1c;
        auStack_84c[uVar14] = uVar6 & 0xfffffff;
        param_3 = local_858;
      } while ((longlong)uVar14 < (longlong)iVar15);
    }
    iVar2 = *param_3;
    _Dst = *(void **)(param_3 + 4);
    uVar5 = iVar15 + 1;
    *param_3 = iVar15;
    uVar6 = 0;
    if (0 < (int)uVar5) {
      memcpy(_Dst,auStack_84c + 1,(ulonglong)uVar5 << 2);
      _Dst = (void *)((longlong)_Dst + (ulonglong)uVar5 * 4);
      uVar6 = uVar5;
    }
    if ((int)uVar6 < iVar2) {
      memset(_Dst,0,(ulonglong)(iVar2 - uVar6) << 2);
    }
    FUN_1401f2010(param_3);
    uVar7 = 0;
  }
  return uVar7;
}



undefined4 FUN_1401f2a90(int *param_1,int *param_2,undefined8 param_3)

{
  int iVar1;
  int iVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  uint uVar5;
  uint uVar6;
  ulonglong uVar7;
  undefined4 uVar8;
  uint local_c8 [4];
  undefined4 *local_b8;
  undefined1 local_b0 [24];
  uint local_98 [4];
  undefined4 *local_88;
  undefined1 local_80 [24];
  int local_68 [4];
  undefined4 *local_58;
  int local_50 [4];
  undefined4 *local_40;
  undefined1 local_38 [32];
  
  iVar1 = *param_2;
  if (*param_1 < *param_2) {
    iVar1 = *param_1;
  }
  uVar8 = 0xfffffffe;
  uVar5 = iVar1 >> 1;
  iVar1 = FUN_1401f4190(local_c8,uVar5);
  if (iVar1 == 0) {
    iVar1 = FUN_1401f4190(local_68,*param_1 - uVar5);
    if (iVar1 == 0) {
      iVar1 = FUN_1401f4190(local_98,uVar5);
      if (iVar1 == 0) {
        iVar1 = FUN_1401f4190(local_50,*param_2 - uVar5);
        if (iVar1 == 0) {
          iVar1 = uVar5 * 2;
          iVar2 = FUN_1401f4190(local_b0,iVar1);
          if (iVar2 == 0) {
            iVar2 = FUN_1401f4190(local_38,iVar1);
            if (iVar2 == 0) {
              iVar2 = FUN_1401f4190(local_80,iVar1);
              if (iVar2 == 0) {
                puVar4 = *(undefined4 **)(param_1 + 4);
                puVar3 = *(undefined4 **)(param_2 + 4);
                local_68[0] = *param_1 - uVar5;
                local_50[0] = *param_2 - uVar5;
                if (0 < (int)uVar5) {
                  uVar7 = (ulonglong)uVar5;
                  do {
                    *local_b8 = *puVar4;
                    puVar4 = puVar4 + 1;
                    *local_88 = *puVar3;
                    puVar3 = puVar3 + 1;
                    uVar7 = uVar7 - 1;
                    local_b8 = local_b8 + 1;
                    local_88 = local_88 + 1;
                  } while (uVar7 != 0);
                }
                uVar6 = uVar5;
                if ((int)uVar5 < *param_1) {
                  do {
                    uVar6 = uVar6 + 1;
                    *local_58 = *puVar4;
                    puVar4 = puVar4 + 1;
                    local_58 = local_58 + 1;
                  } while ((int)uVar6 < *param_1);
                }
                uVar6 = uVar5;
                if ((int)uVar5 < *param_2) {
                  do {
                    uVar6 = uVar6 + 1;
                    *local_40 = *puVar3;
                    puVar3 = puVar3 + 1;
                    local_40 = local_40 + 1;
                  } while ((int)uVar6 < *param_2);
                }
                local_c8[0] = uVar5;
                local_98[0] = uVar5;
                FUN_1401f2010(local_c8);
                FUN_1401f2010(local_98);
                iVar2 = FUN_1401eaa70(local_c8,local_98,local_38);
                if ((((((iVar2 == 0) &&
                       (iVar2 = FUN_1401eaa70(local_68,local_50,local_80), iVar2 == 0)) &&
                      (iVar2 = FUN_1401f2660(local_68,local_c8,local_b0), iVar2 == 0)) &&
                     ((iVar2 = FUN_1401f2660(local_50,local_98,local_c8), iVar2 == 0 &&
                      (iVar2 = FUN_1401eaa70(local_b0,local_c8,local_b0), iVar2 == 0)))) &&
                    ((iVar2 = FUN_1401ea6f0(local_38,local_80,local_c8), iVar2 == 0 &&
                     ((iVar2 = FUN_1401f2560(local_b0,local_c8,local_b0), iVar2 == 0 &&
                      (iVar2 = FUN_1401f4100(local_b0,uVar5), iVar2 == 0)))))) &&
                   ((iVar1 = FUN_1401f4100(local_80,iVar1), iVar1 == 0 &&
                    (iVar1 = FUN_1401ea6f0(local_38,local_b0,local_b0), iVar1 == 0)))) {
                  iVar1 = FUN_1401ea6f0(local_b0,local_80,param_3);
                  uVar8 = 0xfffffffe;
                  if (iVar1 == 0) {
                    uVar8 = 0;
                  }
                }
                FUN_1401ea010(local_80);
              }
              FUN_1401ea010(local_38);
            }
            FUN_1401ea010(local_b0);
          }
          FUN_1401ea010(local_50);
        }
        FUN_1401ea010(local_98);
      }
      FUN_1401ea010(local_68);
    }
    FUN_1401ea010(local_c8);
  }
  return uVar8;
}



ulonglong FUN_1401f2d70(int *param_1,int *param_2,undefined8 param_3)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  ulonglong uVar4;
  int iVar5;
  undefined1 local_158 [24];
  undefined1 local_140 [24];
  undefined1 local_128 [24];
  undefined1 local_110 [24];
  undefined1 local_f8 [24];
  undefined1 local_e0 [24];
  undefined1 local_c8 [24];
  undefined1 local_b0 [24];
  undefined1 local_98 [24];
  undefined1 local_80 [24];
  undefined1 local_68 [24];
  undefined1 local_50 [24];
  undefined1 local_38 [32];
  
  uVar4 = FUN_1401f42b0(local_38,local_f8,local_128,local_110,local_b0,local_50,local_e0,local_98,
                        local_68,local_c8,local_80,local_158,local_140,0);
  if ((int)uVar4 == 0) {
    iVar1 = *param_2;
    if (*param_1 < *param_2) {
      iVar1 = *param_1;
    }
    iVar1 = iVar1 / 3;
    iVar5 = iVar1 * 0x1c;
    uVar3 = FUN_1401f7ef0(param_1,iVar5,local_50);
    uVar4 = (ulonglong)uVar3;
    if (uVar3 == 0) {
      uVar3 = FUN_1401ea0b0(param_1,local_e0);
      uVar4 = (ulonglong)uVar3;
      if (uVar3 == 0) {
        FUN_1401f4080(local_e0,iVar1);
        FUN_1401f7ef0(local_e0,iVar5,local_e0);
        uVar3 = FUN_1401ea0b0(param_1,local_98);
        uVar4 = (ulonglong)uVar3;
        if (uVar3 == 0) {
          iVar2 = iVar1 * 2;
          FUN_1401f4080(local_98,iVar2);
          uVar3 = FUN_1401f7ef0(param_2,iVar5,local_68);
          uVar4 = (ulonglong)uVar3;
          if (uVar3 == 0) {
            uVar3 = FUN_1401ea0b0(param_2,local_c8);
            uVar4 = (ulonglong)uVar3;
            if (uVar3 == 0) {
              FUN_1401f4080(local_c8,iVar1);
              FUN_1401f7ef0(local_c8,iVar5,local_c8);
              uVar3 = FUN_1401ea0b0(param_2,local_80);
              uVar4 = (ulonglong)uVar3;
              if (uVar3 == 0) {
                FUN_1401f4080(local_80,iVar2);
                uVar3 = FUN_1401eaa70(local_50,local_68,local_38);
                uVar4 = (ulonglong)uVar3;
                if (uVar3 == 0) {
                  uVar3 = FUN_1401eaa70(local_98,local_80,local_b0);
                  uVar4 = (ulonglong)uVar3;
                  if (uVar3 == 0) {
                    uVar3 = FUN_1401f4b00(local_50,local_158);
                    uVar4 = (ulonglong)uVar3;
                    if (uVar3 == 0) {
                      uVar3 = FUN_1401ea6f0(local_158,local_e0,local_158);
                      uVar4 = (ulonglong)uVar3;
                      if (uVar3 == 0) {
                        uVar3 = FUN_1401f4b00(local_158,local_158);
                        uVar4 = (ulonglong)uVar3;
                        if (uVar3 == 0) {
                          uVar3 = FUN_1401ea6f0(local_158,local_98,local_158);
                          uVar4 = (ulonglong)uVar3;
                          if (uVar3 == 0) {
                            uVar3 = FUN_1401f4b00(local_68,local_140);
                            uVar4 = (ulonglong)uVar3;
                            if (uVar3 == 0) {
                              uVar3 = FUN_1401ea6f0(local_140,local_c8,local_140);
                              uVar4 = (ulonglong)uVar3;
                              if (uVar3 == 0) {
                                uVar3 = FUN_1401f4b00(local_140,local_140);
                                uVar4 = (ulonglong)uVar3;
                                if (uVar3 == 0) {
                                  uVar3 = FUN_1401ea6f0(local_140,local_80,local_140);
                                  uVar4 = (ulonglong)uVar3;
                                  if (uVar3 == 0) {
                                    uVar3 = FUN_1401eaa70(local_158,local_140,local_f8);
                                    uVar4 = (ulonglong)uVar3;
                                    if (uVar3 == 0) {
                                      uVar3 = FUN_1401f4b00(local_98,local_158);
                                      uVar4 = (ulonglong)uVar3;
                                      if (uVar3 == 0) {
                                        uVar3 = FUN_1401ea6f0(local_158,local_e0,local_158);
                                        uVar4 = (ulonglong)uVar3;
                                        if (uVar3 == 0) {
                                          uVar3 = FUN_1401f4b00(local_158,local_158);
                                          uVar4 = (ulonglong)uVar3;
                                          if (uVar3 == 0) {
                                            uVar3 = FUN_1401ea6f0(local_158,local_50,local_158);
                                            uVar4 = (ulonglong)uVar3;
                                            if (uVar3 == 0) {
                                              uVar3 = FUN_1401f4b00(local_80,local_140);
                                              uVar4 = (ulonglong)uVar3;
                                              if (uVar3 == 0) {
                                                uVar3 = FUN_1401ea6f0(local_140,local_c8,local_140);
                                                uVar4 = (ulonglong)uVar3;
                                                if (uVar3 == 0) {
                                                  uVar3 = FUN_1401f4b00(local_140,local_140);
                                                  uVar4 = (ulonglong)uVar3;
                                                  if (uVar3 == 0) {
                                                    uVar3 = FUN_1401ea6f0(local_140,local_68,
                                                                          local_140);
                                                    uVar4 = (ulonglong)uVar3;
                                                    if (uVar3 == 0) {
                                                      uVar3 = FUN_1401eaa70(local_158,local_140,
                                                                            local_110);
                                                      uVar4 = (ulonglong)uVar3;
                                                      if (uVar3 == 0) {
                                                        uVar3 = FUN_1401ea6f0(local_98,local_e0,
                                                                              local_158);
                                                        uVar4 = (ulonglong)uVar3;
                                                        if (uVar3 == 0) {
                                                          uVar3 = FUN_1401ea6f0(local_158,local_50,
                                                                                local_158);
                                                          uVar4 = (ulonglong)uVar3;
                                                          if (uVar3 == 0) {
                                                            uVar3 = FUN_1401ea6f0(local_80,local_c8,
                                                                                  local_140);
                                                            uVar4 = (ulonglong)uVar3;
                                                            if (uVar3 == 0) {
                                                              uVar3 = FUN_1401ea6f0(local_140,
                                                                                    local_68,
                                                  local_140);
                                                  uVar4 = (ulonglong)uVar3;
                                                  if (uVar3 == 0) {
                                                    uVar3 = FUN_1401eaa70(local_158,local_140,
                                                                          local_128);
                                                    uVar4 = (ulonglong)uVar3;
                                                    if (uVar3 == 0) {
                                                      uVar3 = FUN_1401ea8b0(local_f8,local_b0,
                                                                            local_f8);
                                                      uVar4 = (ulonglong)uVar3;
                                                      if (uVar3 == 0) {
                                                        uVar3 = FUN_1401ea8b0(local_110,local_38,
                                                                              local_110);
                                                        uVar4 = (ulonglong)uVar3;
                                                        if (uVar3 == 0) {
                                                          uVar3 = FUN_1401eb190(local_f8,local_f8);
                                                          uVar4 = (ulonglong)uVar3;
                                                          if (uVar3 == 0) {
                                                            uVar3 = FUN_1401eb190(local_110,
                                                                                  local_110);
                                                            uVar4 = (ulonglong)uVar3;
                                                            if (uVar3 == 0) {
                                                              uVar3 = FUN_1401ea8b0(local_128,
                                                                                    local_38,
                                                  local_128);
                                                  uVar4 = (ulonglong)uVar3;
                                                  if (uVar3 == 0) {
                                                    uVar3 = FUN_1401ea8b0(local_128,local_b0,
                                                                          local_128);
                                                    uVar4 = (ulonglong)uVar3;
                                                    if (uVar3 == 0) {
                                                      uVar3 = FUN_1401ea8b0(local_f8,local_128,
                                                                            local_f8);
                                                      uVar4 = (ulonglong)uVar3;
                                                      if (uVar3 == 0) {
                                                        uVar3 = FUN_1401ea8b0(local_110,local_128,
                                                                              local_110);
                                                        uVar4 = (ulonglong)uVar3;
                                                        if (uVar3 == 0) {
                                                          uVar3 = FUN_1401f2050(local_38,3,local_158
                                                                               );
                                                          uVar4 = (ulonglong)uVar3;
                                                          if (uVar3 == 0) {
                                                            uVar3 = FUN_1401ea8b0(local_f8,local_158
                                                                                  ,local_f8);
                                                            uVar4 = (ulonglong)uVar3;
                                                            if (uVar3 == 0) {
                                                              uVar3 = FUN_1401f2050(local_b0,3,
                                                                                    local_158);
                                                              uVar4 = (ulonglong)uVar3;
                                                              if (uVar3 == 0) {
                                                                uVar3 = FUN_1401ea8b0(local_110,
                                                                                      local_158,
                                                                                      local_110);
                                                                uVar4 = (ulonglong)uVar3;
                                                                if (uVar3 == 0) {
                                                                  uVar3 = FUN_1401eab20(local_128,3,
                                                                                        local_128);
                                                                  uVar4 = (ulonglong)uVar3;
                                                                  if (uVar3 == 0) {
                                                                    uVar3 = FUN_1401ea8b0(local_128,
                                                                                          local_f8,
                                                  local_128);
                                                  uVar4 = (ulonglong)uVar3;
                                                  if (uVar3 == 0) {
                                                    uVar3 = FUN_1401ea8b0(local_128,local_110,
                                                                          local_128);
                                                    uVar4 = (ulonglong)uVar3;
                                                    if (uVar3 == 0) {
                                                      uVar3 = FUN_1401ea8b0(local_f8,local_128,
                                                                            local_f8);
                                                      uVar4 = (ulonglong)uVar3;
                                                      if (uVar3 == 0) {
                                                        uVar3 = FUN_1401ea8b0(local_110,local_128,
                                                                              local_110);
                                                        uVar4 = (ulonglong)uVar3;
                                                        if (uVar3 == 0) {
                                                          uVar3 = FUN_1401f7e00(local_f8,local_f8,0)
                                                          ;
                                                          uVar4 = (ulonglong)uVar3;
                                                          if (uVar3 == 0) {
                                                            uVar3 = FUN_1401f7e00(local_110,
                                                                                  local_110,0);
                                                            uVar4 = (ulonglong)uVar3;
                                                            if (uVar3 == 0) {
                                                              uVar3 = FUN_1401f4100(local_f8,iVar1);
                                                              uVar4 = (ulonglong)uVar3;
                                                              if (uVar3 == 0) {
                                                                uVar3 = FUN_1401f4100(local_128,
                                                                                      iVar2);
                                                                uVar4 = (ulonglong)uVar3;
                                                                if (uVar3 == 0) {
                                                                  uVar3 = FUN_1401f4100(local_110,
                                                                                        iVar1 * 3);
                                                                  uVar4 = (ulonglong)uVar3;
                                                                  if (uVar3 == 0) {
                                                                    uVar3 = FUN_1401f4100(local_b0,
                                                  iVar1 * 4);
                                                  uVar4 = (ulonglong)uVar3;
                                                  if (uVar3 == 0) {
                                                    uVar3 = FUN_1401ea6f0(local_38,local_f8,param_3)
                                                    ;
                                                    uVar4 = (ulonglong)uVar3;
                                                    if (uVar3 == 0) {
                                                      uVar3 = FUN_1401ea6f0(local_128,local_110,
                                                                            local_158);
                                                      uVar4 = (ulonglong)uVar3;
                                                      if (uVar3 == 0) {
                                                        uVar3 = FUN_1401ea6f0(local_b0,local_158,
                                                                              local_158);
                                                        uVar4 = (ulonglong)uVar3;
                                                        if (uVar3 == 0) {
                                                          uVar3 = FUN_1401ea6f0(local_158,param_3,
                                                                                param_3);
                                                          uVar4 = (ulonglong)uVar3;
                                                        }
                                                      }
                                                    }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    FUN_1401f4270(local_38,local_f8,local_128,local_110,local_b0,local_50,local_e0,local_98,local_68
                  ,local_c8,local_80,local_158,local_140,0);
  }
  return uVar4;
}



undefined8 FUN_1401f3510(int *param_1,undefined8 param_2)

{
  uint uVar1;
  int iVar2;
  undefined8 uVar3;
  int iVar4;
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lVar8;
  uint *puVar9;
  uint *puVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  longlong lVar13;
  int iVar14;
  longlong lVar15;
  int local_48 [4];
  longlong local_38;
  
  lVar5 = (longlong)*param_1;
  iVar2 = *param_1 * 2 + 1;
  uVar3 = FUN_1401f4190(local_48,iVar2);
  if ((int)uVar3 == 0) {
    if (0 < lVar5) {
      lVar6 = 0;
      lVar8 = 1;
      iVar14 = 1;
      lVar7 = lVar6;
      lVar15 = lVar5;
      do {
        uVar11 = (ulonglong)*(uint *)(lVar7 + *(longlong *)(param_1 + 4)) *
                 (ulonglong)*(uint *)(lVar7 + *(longlong *)(param_1 + 4)) +
                 (ulonglong)*(uint *)(local_38 + lVar6);
        uVar12 = uVar11 >> 0x1c;
        *(uint *)(local_38 + lVar6) = (uint)uVar11 & 0xfffffff;
        uVar1 = *(uint *)(lVar7 + *(longlong *)(param_1 + 4));
        puVar10 = (uint *)(local_38 + (longlong)iVar14 * 4);
        if (lVar8 < lVar5) {
          puVar9 = puVar10;
          lVar13 = lVar8;
          do {
            lVar13 = lVar13 + 1;
            puVar10 = puVar9 + 1;
            uVar11 = (ulonglong)*puVar9 +
                     (ulonglong)*(uint *)(*(longlong *)(param_1 + 4) + -4 + lVar13 * 4) *
                     (ulonglong)uVar1 * 2 + (uVar12 & 0xffffffff);
            uVar12 = uVar11 >> 0x1c & 0xffffffff;
            *puVar9 = (uint)uVar11 & 0xfffffff;
            puVar9 = puVar10;
          } while (lVar13 < lVar5);
        }
        iVar4 = (int)uVar12;
        while (iVar4 != 0) {
          uVar11 = (ulonglong)*puVar10 + (uVar12 & 0xffffffff);
          uVar12 = uVar11 >> 0x1c;
          *puVar10 = (uint)uVar11 & 0xfffffff;
          puVar10 = puVar10 + 1;
          iVar4 = (int)uVar12;
        }
        iVar14 = iVar14 + 2;
        lVar6 = lVar6 + 8;
        lVar7 = lVar7 + 4;
        lVar8 = lVar8 + 1;
        lVar15 = lVar15 + -1;
      } while (lVar15 != 0);
    }
    local_48[0] = iVar2;
    FUN_1401f2010(local_48);
    FUN_1401f4050(local_48,param_2);
    FUN_1401ea010(local_48);
    uVar3 = 0;
  }
  return uVar3;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401f3680(int *param_1,int *param_2)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  uint uVar4;
  undefined8 uVar5;
  int iVar6;
  uint *puVar7;
  uint *puVar8;
  int iVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  int iVar13;
  longlong lVar14;
  ulonglong uVar15;
  ulonglong uVar16;
  ulonglong uVar17;
  uint uVar18;
  undefined1 auStack_878 [32];
  int *local_858;
  uint auStack_84c [513];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_878;
  iVar3 = *param_1 * 2;
  local_858 = param_2;
  if ((iVar3 <= param_2[1]) || (uVar5 = FUN_1401f1f70(param_2,iVar3), (int)uVar5 == 0)) {
    uVar12 = 0;
    lVar14 = (longlong)iVar3;
    if (0 < lVar14) {
      lVar2 = *(longlong *)(param_1 + 4);
      iVar1 = *param_1;
      uVar11 = uVar12;
      uVar15 = uVar12;
      uVar17 = uVar12;
      do {
        iVar6 = iVar1 + -1;
        iVar13 = (int)uVar11;
        iVar9 = iVar13;
        if (iVar6 < iVar13) {
          iVar9 = iVar6;
        }
        iVar6 = iVar13 - iVar9;
        puVar8 = (uint *)(lVar2 + (longlong)iVar6 * 4);
        puVar7 = (uint *)(lVar2 + (longlong)iVar9 * 4);
        uVar4 = iVar1 - iVar6;
        uVar18 = iVar9 + 1U;
        if ((int)uVar4 < (int)(iVar9 + 1U)) {
          uVar18 = uVar4;
        }
        uVar4 = (iVar9 - iVar6) + 1 >> 1;
        if ((int)uVar4 <= (int)uVar18) {
          uVar18 = uVar4;
        }
        uVar16 = uVar12;
        if (0 < (int)uVar18) {
          uVar10 = (ulonglong)uVar18;
          do {
            uVar18 = *puVar7;
            uVar4 = *puVar8;
            puVar7 = puVar7 + -1;
            puVar8 = puVar8 + 1;
            uVar16 = uVar16 + (ulonglong)uVar18 * (ulonglong)uVar4;
            uVar10 = uVar10 - 1;
          } while (uVar10 != 0);
        }
        uVar16 = uVar17 + uVar16 * 2;
        if ((uVar11 & 1) == 0) {
          uVar11 = (ulonglong)*(uint *)(lVar2 + ((longlong)iVar13 >> 1) * 4);
          uVar16 = uVar16 + uVar11 * uVar11;
        }
        uVar15 = uVar15 + 1;
        uVar11 = (ulonglong)(iVar13 + 1);
        uVar17 = uVar16 >> 0x1c;
        auStack_84c[uVar15] = (uint)uVar16 & 0xfffffff;
        param_2 = local_858;
      } while ((longlong)uVar15 < lVar14);
    }
    iVar1 = *param_2;
    puVar8 = *(uint **)(param_2 + 4);
    *param_2 = *param_1 * 2;
    puVar7 = puVar8;
    iVar6 = 0;
    if (0 < lVar14) {
      do {
        lVar2 = uVar12 + 1;
        uVar12 = uVar12 + 1;
        puVar8 = puVar7 + 1;
        *puVar7 = auStack_84c[lVar2] & 0xfffffff;
        puVar7 = puVar8;
        iVar6 = iVar3;
      } while ((longlong)uVar12 < lVar14);
    }
    if (iVar6 < iVar1) {
      memset(puVar8,0,(ulonglong)(uint)(iVar1 - iVar6) << 2);
    }
    FUN_1401f2010(param_2);
    uVar5 = 0;
  }
  return uVar5;
}



undefined4 FUN_1401f3850(int *param_1,undefined8 param_2)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 *puVar3;
  undefined4 uVar4;
  uint uVar5;
  uint uVar6;
  ulonglong uVar7;
  undefined1 local_a8 [24];
  uint local_90 [4];
  undefined4 *local_80;
  undefined1 local_78 [24];
  int local_60 [4];
  undefined4 *local_50;
  undefined1 local_48 [24];
  undefined1 local_30 [24];
  
  uVar5 = *param_1 >> 1;
  uVar4 = 0xfffffffe;
  iVar2 = FUN_1401f4190(local_90,uVar5);
  if (iVar2 == 0) {
    iVar2 = FUN_1401f4190(local_60,*param_1 - uVar5);
    if (iVar2 == 0) {
      iVar2 = FUN_1401f4190(local_a8,*param_1 * 2);
      if (iVar2 == 0) {
        iVar2 = FUN_1401f4190(local_30,*param_1 * 2);
        if (iVar2 == 0) {
          iVar2 = FUN_1401f4190(local_48,uVar5 * 2);
          if (iVar2 == 0) {
            iVar2 = FUN_1401f4190(local_78,(*param_1 - uVar5) * 2);
            if (iVar2 == 0) {
              puVar3 = *(undefined4 **)(param_1 + 4);
              if (0 < (int)uVar5) {
                uVar7 = (ulonglong)uVar5;
                do {
                  uVar1 = *puVar3;
                  puVar3 = puVar3 + 1;
                  uVar7 = uVar7 - 1;
                  *local_80 = uVar1;
                  local_80 = local_80 + 1;
                } while (uVar7 != 0);
              }
              uVar6 = uVar5;
              if ((int)uVar5 < *param_1) {
                do {
                  uVar6 = uVar6 + 1;
                  *local_50 = *puVar3;
                  puVar3 = puVar3 + 1;
                  local_50 = local_50 + 1;
                } while ((int)uVar6 < *param_1);
              }
              local_60[0] = *param_1 - uVar5;
              local_90[0] = uVar5;
              FUN_1401f2010(local_90);
              iVar2 = FUN_1401eabe0(local_90,local_48);
              if (iVar2 == 0) {
                iVar2 = FUN_1401eabe0(local_60,local_78);
                if (iVar2 == 0) {
                  iVar2 = FUN_1401f2660(local_60,local_90,local_a8);
                  if (iVar2 == 0) {
                    iVar2 = FUN_1401eabe0(local_a8,local_a8);
                    if (iVar2 == 0) {
                      iVar2 = FUN_1401f2660(local_48,local_78,local_30);
                      if (iVar2 == 0) {
                        iVar2 = FUN_1401f2560(local_a8,local_30,local_a8);
                        if (iVar2 == 0) {
                          iVar2 = FUN_1401f4100(local_a8,uVar5);
                          if (iVar2 == 0) {
                            iVar2 = FUN_1401f4100(local_78,uVar5 * 2);
                            if (iVar2 == 0) {
                              iVar2 = FUN_1401ea6f0(local_48,local_a8,local_a8);
                              if (iVar2 == 0) {
                                iVar2 = FUN_1401ea6f0(local_a8,local_78,param_2);
                                uVar4 = 0xfffffffe;
                                if (iVar2 == 0) {
                                  uVar4 = 0;
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
              FUN_1401ea010(local_78);
            }
            FUN_1401ea010(local_48);
          }
          FUN_1401ea010(local_30);
        }
        FUN_1401ea010(local_a8);
      }
      FUN_1401ea010(local_60);
    }
    FUN_1401ea010(local_90);
  }
  return uVar4;
}



ulonglong FUN_1401f3a90(int *param_1,undefined8 param_2)

{
  int iVar1;
  uint uVar2;
  ulonglong uVar3;
  undefined1 local_f8 [24];
  undefined1 local_e0 [24];
  undefined1 local_c8 [24];
  undefined1 local_b0 [24];
  undefined1 local_98 [24];
  undefined1 local_80 [24];
  undefined1 local_68 [24];
  undefined1 local_50 [24];
  undefined1 local_38 [32];
  
  uVar3 = FUN_1401f42b0(local_38,local_b0,local_e0,local_c8,local_80,local_50,local_98,local_68,
                        local_f8,0);
  if ((int)uVar3 == 0) {
    iVar1 = *param_1 / 3;
    uVar2 = FUN_1401f7ef0(param_1,iVar1 * 0x1c,local_50);
    uVar3 = (ulonglong)uVar2;
    if (uVar2 == 0) {
      uVar2 = FUN_1401ea0b0(param_1,local_98);
      uVar3 = (ulonglong)uVar2;
      if (uVar2 == 0) {
        FUN_1401f4080(local_98,iVar1);
        FUN_1401f7ef0(local_98,iVar1 * 0x1c,local_98);
        uVar2 = FUN_1401ea0b0(param_1,local_68);
        uVar3 = (ulonglong)uVar2;
        if (uVar2 == 0) {
          FUN_1401f4080(local_68,iVar1 * 2);
          uVar2 = FUN_1401eabe0(local_50,local_38);
          uVar3 = (ulonglong)uVar2;
          if (uVar2 == 0) {
            uVar2 = FUN_1401eabe0(local_68,local_80);
            uVar3 = (ulonglong)uVar2;
            if (uVar2 == 0) {
              uVar2 = FUN_1401f4b00(local_50,local_f8);
              uVar3 = (ulonglong)uVar2;
              if (uVar2 == 0) {
                uVar2 = FUN_1401ea6f0(local_f8,local_98,local_f8);
                uVar3 = (ulonglong)uVar2;
                if (uVar2 == 0) {
                  uVar2 = FUN_1401f4b00(local_f8,local_f8);
                  uVar3 = (ulonglong)uVar2;
                  if (uVar2 == 0) {
                    uVar2 = FUN_1401ea6f0(local_f8,local_68,local_f8);
                    uVar3 = (ulonglong)uVar2;
                    if (uVar2 == 0) {
                      uVar2 = FUN_1401eabe0(local_f8,local_b0);
                      uVar3 = (ulonglong)uVar2;
                      if (uVar2 == 0) {
                        uVar2 = FUN_1401f4b00(local_68,local_f8);
                        uVar3 = (ulonglong)uVar2;
                        if (uVar2 == 0) {
                          uVar2 = FUN_1401ea6f0(local_f8,local_98,local_f8);
                          uVar3 = (ulonglong)uVar2;
                          if (uVar2 == 0) {
                            uVar2 = FUN_1401f4b00(local_f8,local_f8);
                            uVar3 = (ulonglong)uVar2;
                            if (uVar2 == 0) {
                              uVar2 = FUN_1401ea6f0(local_f8,local_50,local_f8);
                              uVar3 = (ulonglong)uVar2;
                              if (uVar2 == 0) {
                                uVar2 = FUN_1401eabe0(local_f8,local_c8);
                                uVar3 = (ulonglong)uVar2;
                                if (uVar2 == 0) {
                                  uVar2 = FUN_1401ea6f0(local_68,local_98,local_f8);
                                  uVar3 = (ulonglong)uVar2;
                                  if (uVar2 == 0) {
                                    uVar2 = FUN_1401ea6f0(local_f8,local_50,local_f8);
                                    uVar3 = (ulonglong)uVar2;
                                    if (uVar2 == 0) {
                                      uVar2 = FUN_1401eabe0(local_f8,local_e0);
                                      uVar3 = (ulonglong)uVar2;
                                      if (uVar2 == 0) {
                                        uVar2 = FUN_1401ea8b0(local_b0,local_80,local_b0);
                                        uVar3 = (ulonglong)uVar2;
                                        if (uVar2 == 0) {
                                          uVar2 = FUN_1401ea8b0(local_c8,local_38,local_c8);
                                          uVar3 = (ulonglong)uVar2;
                                          if (uVar2 == 0) {
                                            uVar2 = FUN_1401eb190(local_b0,local_b0);
                                            uVar3 = (ulonglong)uVar2;
                                            if (uVar2 == 0) {
                                              uVar2 = FUN_1401eb190(local_c8,local_c8);
                                              uVar3 = (ulonglong)uVar2;
                                              if (uVar2 == 0) {
                                                uVar2 = FUN_1401ea8b0(local_e0,local_38,local_e0);
                                                uVar3 = (ulonglong)uVar2;
                                                if (uVar2 == 0) {
                                                  uVar2 = FUN_1401ea8b0(local_e0,local_80,local_e0);
                                                  uVar3 = (ulonglong)uVar2;
                                                  if (uVar2 == 0) {
                                                    uVar2 = FUN_1401ea8b0(local_b0,local_e0,local_b0
                                                                         );
                                                    uVar3 = (ulonglong)uVar2;
                                                    if (uVar2 == 0) {
                                                      uVar2 = FUN_1401ea8b0(local_c8,local_e0,
                                                                            local_c8);
                                                      uVar3 = (ulonglong)uVar2;
                                                      if (uVar2 == 0) {
                                                        uVar2 = FUN_1401f2050(local_38,3,local_f8);
                                                        uVar3 = (ulonglong)uVar2;
                                                        if (uVar2 == 0) {
                                                          uVar2 = FUN_1401ea8b0(local_b0,local_f8,
                                                                                local_b0);
                                                          uVar3 = (ulonglong)uVar2;
                                                          if (uVar2 == 0) {
                                                            uVar2 = FUN_1401f2050(local_80,3,
                                                                                  local_f8);
                                                            uVar3 = (ulonglong)uVar2;
                                                            if (uVar2 == 0) {
                                                              uVar2 = FUN_1401ea8b0(local_c8,
                                                  local_f8,local_c8);
                                                  uVar3 = (ulonglong)uVar2;
                                                  if (uVar2 == 0) {
                                                    uVar2 = FUN_1401eab20(local_e0,3,local_e0);
                                                    uVar3 = (ulonglong)uVar2;
                                                    if (uVar2 == 0) {
                                                      uVar2 = FUN_1401ea8b0(local_e0,local_b0,
                                                                            local_e0);
                                                      uVar3 = (ulonglong)uVar2;
                                                      if (uVar2 == 0) {
                                                        uVar2 = FUN_1401ea8b0(local_e0,local_c8,
                                                                              local_e0);
                                                        uVar3 = (ulonglong)uVar2;
                                                        if (uVar2 == 0) {
                                                          uVar2 = FUN_1401ea8b0(local_b0,local_e0,
                                                                                local_b0);
                                                          uVar3 = (ulonglong)uVar2;
                                                          if (uVar2 == 0) {
                                                            uVar2 = FUN_1401ea8b0(local_c8,local_e0,
                                                                                  local_c8);
                                                            uVar3 = (ulonglong)uVar2;
                                                            if (uVar2 == 0) {
                                                              uVar2 = FUN_1401f7e00(local_b0,
                                                  local_b0,0);
                                                  uVar3 = (ulonglong)uVar2;
                                                  if (uVar2 == 0) {
                                                    uVar2 = FUN_1401f7e00(local_c8,local_c8,0);
                                                    uVar3 = (ulonglong)uVar2;
                                                    if (uVar2 == 0) {
                                                      uVar2 = FUN_1401f4100(local_b0,iVar1);
                                                      uVar3 = (ulonglong)uVar2;
                                                      if (uVar2 == 0) {
                                                        uVar2 = FUN_1401f4100(local_e0,iVar1 * 2);
                                                        uVar3 = (ulonglong)uVar2;
                                                        if (uVar2 == 0) {
                                                          uVar2 = FUN_1401f4100(local_c8,iVar1 * 3);
                                                          uVar3 = (ulonglong)uVar2;
                                                          if (uVar2 == 0) {
                                                            uVar2 = FUN_1401f4100(local_80,iVar1 * 4
                                                                                 );
                                                            uVar3 = (ulonglong)uVar2;
                                                            if (uVar2 == 0) {
                                                              uVar2 = FUN_1401ea6f0(local_38,
                                                  local_b0,param_2);
                                                  uVar3 = (ulonglong)uVar2;
                                                  if (uVar2 == 0) {
                                                    uVar2 = FUN_1401ea6f0(local_e0,local_c8,local_f8
                                                                         );
                                                    uVar3 = (ulonglong)uVar2;
                                                    if (uVar2 == 0) {
                                                      uVar2 = FUN_1401ea6f0(local_80,local_f8,
                                                                            local_f8);
                                                      uVar3 = (ulonglong)uVar2;
                                                      if (uVar2 == 0) {
                                                        uVar2 = FUN_1401ea6f0(local_f8,param_2,
                                                                              param_2);
                                                        uVar3 = (ulonglong)uVar2;
                                                      }
                                                    }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    FUN_1401f4270(local_38,local_b0,local_e0,local_c8,local_80,local_50,local_98,local_68,local_f8,0
                 );
  }
  return uVar3;
}



void FUN_1401f4050(undefined8 *param_1,undefined8 *param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  uVar1 = *param_1;
  uVar2 = param_1[1];
  uVar3 = param_1[2];
  *param_1 = *param_2;
  param_1[1] = param_2[1];
  param_1[2] = param_2[2];
  *param_2 = uVar1;
  param_2[1] = uVar2;
  param_2[2] = uVar3;
  return;
}



void FUN_1401f4080(int *param_1,int param_2)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  
  if (0 < param_2) {
    if (*param_1 <= param_2) {
      FUN_1401f2150();
      return;
    }
    puVar3 = *(undefined4 **)(param_1 + 4);
    iVar1 = 0;
    puVar4 = puVar3 + param_2;
    puVar2 = puVar3;
    if (0 < *param_1 - param_2) {
      do {
        iVar1 = iVar1 + 1;
        puVar3 = puVar2 + 1;
        *puVar2 = *puVar4;
        puVar4 = puVar4 + 1;
        puVar2 = puVar3;
      } while (iVar1 < *param_1 - param_2);
    }
    if (iVar1 < *param_1) {
      do {
        *puVar3 = 0;
        iVar1 = iVar1 + 1;
        puVar3 = puVar3 + 1;
      } while (iVar1 < *param_1);
    }
    *param_1 = *param_1 - param_2;
  }
  return;
}



undefined8 FUN_1401f4100(int *param_1,uint param_2)

{
  int iVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  ulonglong uVar4;
  undefined4 *puVar5;
  undefined4 *puVar6;
  
  if (0 < (int)param_2) {
    if ((param_1[1] < (int)(*param_1 + param_2)) && (uVar3 = FUN_1401f1f70(), (int)uVar3 != 0)) {
      return uVar3;
    }
    *param_1 = *param_1 + param_2;
    iVar1 = *param_1;
    puVar6 = (undefined4 *)
             (*(longlong *)(param_1 + 4) + -4 + ((longlong)iVar1 - (longlong)(int)param_2) * 4);
    if ((int)param_2 <= iVar1 + -1) {
      uVar4 = (ulonglong)(((iVar1 + -1) - param_2) + 1);
      puVar5 = (undefined4 *)(*(longlong *)(param_1 + 4) + -4 + (longlong)iVar1 * 4);
      do {
        uVar2 = *puVar6;
        puVar6 = puVar6 + -1;
        uVar4 = uVar4 - 1;
        *puVar5 = uVar2;
        puVar5 = puVar5 + -1;
      } while (uVar4 != 0);
    }
    if (0 < (int)param_2) {
      memset(*(void **)(param_1 + 4),0,(ulonglong)param_2 << 2);
    }
  }
  return 0;
}



undefined8 FUN_1401f4190(undefined4 *param_1,uint param_2)

{
  void *pvVar1;
  longlong lVar2;
  int iVar3;
  uint uVar4;
  
  uVar4 = param_2 & 0x8000001f;
  if ((int)uVar4 < 0) {
    uVar4 = (uVar4 - 1 | 0xffffffe0) + 1;
  }
  iVar3 = param_2 + (0x40 - uVar4);
  pvVar1 = malloc((longlong)iVar3 * 4);
  *(void **)(param_1 + 4) = pvVar1;
  if (pvVar1 != (void *)0x0) {
    param_1[1] = iVar3;
    *param_1 = 0;
    param_1[2] = 0;
    lVar2 = 0;
    if (0 < iVar3) {
      do {
        lVar2 = lVar2 + 1;
        *(undefined4 *)(*(longlong *)(param_1 + 4) + -4 + lVar2 * 4) = 0;
      } while (lVar2 < iVar3);
    }
    return 0;
  }
  return 0xfffffffe;
}



undefined8 FUN_1401f4240(longlong param_1,longlong param_2)

{
  undefined8 uVar1;
  
  if ((param_1 != param_2) && (uVar1 = FUN_1401ea0b0(), (int)uVar1 != 0)) {
    return uVar1;
  }
  *(undefined4 *)(param_2 + 8) = 0;
  return 0;
}



void FUN_1401f4270(longlong param_1)

{
  undefined1 *puVar1;
  longlong local_res10 [3];
  
  puVar1 = (undefined1 *)register0x00000020;
  while (param_1 != 0) {
    FUN_1401ea010();
    param_1 = *(longlong *)(puVar1 + 0x10);
    puVar1 = puVar1 + 8;
  }
  return;
}



undefined8 FUN_1401f42b0(longlong param_1)

{
  longlong lVar1;
  undefined1 *puVar2;
  int iVar3;
  int iVar4;
  longlong local_res10 [3];
  
  iVar4 = 0;
  puVar2 = (undefined1 *)register0x00000020;
  lVar1 = param_1;
  while( true ) {
    if (lVar1 == 0) {
      return 0;
    }
    iVar3 = FUN_1401e9fb0();
    if (iVar3 != 0) break;
    lVar1 = *(longlong *)(puVar2 + 0x10);
    iVar4 = iVar4 + 1;
    puVar2 = puVar2 + 8;
  }
  for (; iVar4 != 0; iVar4 = iVar4 + -1) {
    FUN_1401ea010(param_1);
    param_1 = *(longlong *)((longlong)register0x00000020 + 0x10);
    register0x00000020 = (BADSPACEBASE *)((longlong)register0x00000020 + 8);
  }
  return 0xfffffffe;
}



ulonglong FUN_1401f4330(undefined8 param_1,longlong param_2,undefined8 param_3)

{
  uint uVar1;
  ulonglong uVar2;
  undefined1 local_28 [8];
  int local_20;
  
  uVar2 = FUN_1401e9fb0(local_28);
  if ((int)uVar2 == 0) {
    uVar1 = FUN_1401eac60(param_1,param_2,0,local_28);
    if (uVar1 != 0) {
      FUN_1401ea010(local_28);
      return (ulonglong)uVar1;
    }
    if (local_20 == *(int *)(param_2 + 8)) {
      uVar2 = 0;
      FUN_1401f4050(local_28,param_3);
    }
    else {
      uVar1 = FUN_1401ea6f0(param_2,local_28,param_3);
      uVar2 = (ulonglong)uVar1;
    }
    FUN_1401ea010(local_28);
  }
  return uVar2;
}



ulonglong FUN_1401f43e0(undefined8 param_1,int *param_2,undefined8 param_3)

{
  uint uVar1;
  int iVar2;
  ulonglong uVar3;
  int *piVar4;
  int *piVar5;
  int *piVar6;
  bool bVar7;
  int local_c8 [4];
  byte *local_b8;
  int local_b0 [4];
  byte *local_a0;
  int local_98 [4];
  byte *local_88;
  int local_80 [4];
  byte *local_70;
  int local_68 [4];
  byte *local_58;
  int local_50 [4];
  byte *local_40;
  int local_38 [4];
  byte *local_28;
  int local_20 [4];
  byte *local_10;
  
  if ((param_2[2] == 1) || (*param_2 == 0)) {
    return 0xfffffffd;
  }
  uVar3 = FUN_1401f42b0(local_20,local_38,local_98,local_b0,local_68,local_50,local_c8,local_80,0);
  if ((int)uVar3 != 0) {
    return uVar3;
  }
  uVar1 = FUN_1401f4330(param_1,param_2,local_20);
  uVar3 = (ulonglong)uVar1;
  if (uVar1 == 0) {
    uVar1 = FUN_1401ea0b0(param_2,local_38);
    uVar3 = (ulonglong)uVar1;
    if (uVar1 == 0) {
      if ((((local_20[0] < 1) || ((*local_10 & 1) != 0)) || (local_38[0] < 1)) ||
         ((*local_28 & 1) != 0)) {
        uVar1 = FUN_1401ea0b0(local_20,local_98);
        uVar3 = (ulonglong)uVar1;
        if (uVar1 == 0) {
          uVar1 = FUN_1401ea0b0(local_38,local_b0);
          uVar3 = (ulonglong)uVar1;
          if (uVar1 == 0) {
            FUN_1401f4bb0(local_68,1);
            FUN_1401f4bb0(local_80,1);
            do {
              bVar7 = local_98[0] == 0;
              while ((bVar7 || local_98[0] < 0 || ((*local_88 & 1) != 0))) {
                while ((0 < local_b0[0] && ((*local_a0 & 1) == 0))) {
                  uVar1 = FUN_1401eb190(local_b0,local_b0);
                  uVar3 = (ulonglong)uVar1;
                  if (uVar1 != 0) goto LAB_1401f47c9;
                  if (((0 < local_c8[0]) && ((*local_b8 & 1) != 0)) ||
                     ((0 < local_80[0] && ((*local_70 & 1) != 0)))) {
                    uVar1 = FUN_1401ea6f0(local_c8,local_38,local_c8);
                    uVar3 = (ulonglong)uVar1;
                    if (uVar1 != 0) goto LAB_1401f47c9;
                    uVar1 = FUN_1401ea8b0(local_80,local_20,local_80);
                    uVar3 = (ulonglong)uVar1;
                    if (uVar1 != 0) goto LAB_1401f47c9;
                  }
                  uVar1 = FUN_1401eb190(local_c8,local_c8);
                  uVar3 = (ulonglong)uVar1;
                  if (uVar1 != 0) goto LAB_1401f47c9;
                  uVar1 = FUN_1401eb190(local_80,local_80);
                  uVar3 = (ulonglong)uVar1;
                  if (uVar1 != 0) goto LAB_1401f47c9;
                }
                iVar2 = FUN_1401ea200(local_98,local_b0);
                if (iVar2 == -1) {
                  uVar1 = FUN_1401ea8b0(local_b0,local_98,local_b0);
                  uVar3 = (ulonglong)uVar1;
                  if (uVar1 != 0) goto LAB_1401f47c9;
                  uVar1 = FUN_1401ea8b0(local_c8,local_68,local_c8);
                  uVar3 = (ulonglong)uVar1;
                  if (uVar1 != 0) goto LAB_1401f47c9;
                  piVar6 = local_80;
                  piVar5 = local_50;
                  piVar4 = local_80;
                }
                else {
                  uVar1 = FUN_1401ea8b0(local_98,local_b0,local_98);
                  uVar3 = (ulonglong)uVar1;
                  if (uVar1 != 0) goto LAB_1401f47c9;
                  uVar1 = FUN_1401ea8b0(local_68,local_c8,local_68);
                  uVar3 = (ulonglong)uVar1;
                  if (uVar1 != 0) goto LAB_1401f47c9;
                  piVar6 = local_50;
                  piVar5 = local_80;
                  piVar4 = local_50;
                }
                uVar1 = FUN_1401ea8b0(piVar4,piVar5,piVar6);
                uVar3 = (ulonglong)uVar1;
                if (uVar1 != 0) goto LAB_1401f47c9;
                bVar7 = false;
                if (local_98[0] == 0) {
                  iVar2 = FUN_1401ea230(local_b0,1);
                  if (iVar2 != 0) goto LAB_1401f44af;
                  iVar2 = FUN_1401ea230(local_c8,0);
                  goto joined_r0x0001401f4750;
                }
              }
              uVar1 = FUN_1401eb190(local_98,local_98);
              uVar3 = (ulonglong)uVar1;
              if (uVar1 != 0) break;
              if (((0 < local_68[0]) && ((*local_58 & 1) != 0)) ||
                 ((0 < local_50[0] && ((*local_40 & 1) != 0)))) {
                uVar1 = FUN_1401ea6f0(local_68,local_38,local_68);
                uVar3 = (ulonglong)uVar1;
                if (uVar1 != 0) break;
                uVar1 = FUN_1401ea8b0(local_50,local_20,local_50);
                uVar3 = (ulonglong)uVar1;
                if (uVar1 != 0) break;
              }
              uVar1 = FUN_1401eb190(local_68,local_68);
              uVar3 = (ulonglong)uVar1;
              if (uVar1 != 0) break;
              uVar1 = FUN_1401eb190(local_50,local_50);
              uVar3 = (ulonglong)uVar1;
            } while (uVar1 == 0);
          }
        }
      }
      else {
LAB_1401f44af:
        uVar3 = 0xfffffffd;
      }
    }
  }
  goto LAB_1401f47c9;
joined_r0x0001401f4750:
  if (iVar2 != -1) goto LAB_1401f477b;
  uVar1 = FUN_1401ea6f0(local_c8,param_2,local_c8);
  uVar3 = (ulonglong)uVar1;
  if (uVar1 != 0) goto LAB_1401f47c9;
  iVar2 = FUN_1401ea230(local_c8,0);
  goto joined_r0x0001401f4750;
LAB_1401f477b:
  iVar2 = FUN_1401f2180(local_c8,param_2);
  while (iVar2 != -1) {
    uVar1 = FUN_1401ea8b0(local_c8,param_2,local_c8);
    uVar3 = (ulonglong)uVar1;
    if (uVar1 != 0) goto LAB_1401f47c9;
    iVar2 = FUN_1401f2180(local_c8,param_2);
  }
  FUN_1401f4050(local_c8,param_3);
  uVar3 = 0;
LAB_1401f47c9:
  FUN_1401f4270(local_20,local_38,local_98,local_b0,local_68,local_50,local_c8,local_80,0);
  return uVar3;
}



ulonglong FUN_1401f4830(longlong param_1,int *param_2,longlong param_3)

{
  undefined4 uVar1;
  uint uVar2;
  int iVar3;
  ulonglong uVar4;
  int *piVar5;
  int *piVar6;
  int *piVar7;
  bool bVar8;
  int local_98 [2];
  int local_90;
  byte *local_88;
  int local_80 [4];
  byte *local_70;
  int local_68 [4];
  byte *local_58;
  int local_50 [4];
  byte *local_40;
  undefined1 local_38 [24];
  undefined1 local_20 [24];
  
  if ((0 < *param_2) && ((**(byte **)(param_2 + 4) & 1) == 0)) {
    return 0xfffffffd;
  }
  uVar4 = FUN_1401f42b0(local_38,local_20,local_80,local_68,local_50,local_98,0);
  if ((int)uVar4 != 0) {
    return uVar4;
  }
  uVar2 = FUN_1401ea0b0(param_2,local_38);
  uVar4 = (ulonglong)uVar2;
  if (uVar2 == 0) {
    uVar2 = FUN_1401f4330(param_1,param_2,local_20);
    uVar4 = (ulonglong)uVar2;
    if (uVar2 == 0) {
      uVar2 = FUN_1401ea0b0(local_38,local_80);
      uVar4 = (ulonglong)uVar2;
      if (uVar2 == 0) {
        uVar2 = FUN_1401ea0b0(local_20,local_68);
        uVar4 = (ulonglong)uVar2;
        if (uVar2 == 0) {
          FUN_1401f4bb0(local_98,1);
          do {
            bVar8 = local_80[0] == 0;
            while ((bVar8 || local_80[0] < 0 || ((*local_70 & 1) != 0))) {
              while ((0 < local_68[0] && ((*local_58 & 1) == 0))) {
                uVar2 = FUN_1401eb190(local_68,local_68);
                uVar4 = (ulonglong)uVar2;
                if (uVar2 != 0) goto LAB_1401f4aaf;
                if ((0 < local_98[0]) && ((*local_88 & 1) != 0)) {
                  uVar2 = FUN_1401ea8b0(local_98,local_38,local_98);
                  uVar4 = (ulonglong)uVar2;
                  if (uVar2 != 0) goto LAB_1401f4aaf;
                }
                uVar2 = FUN_1401eb190(local_98,local_98);
                uVar4 = (ulonglong)uVar2;
                if (uVar2 != 0) goto LAB_1401f4aaf;
              }
              iVar3 = FUN_1401ea200(local_80,local_68);
              if (iVar3 == -1) {
                uVar2 = FUN_1401ea8b0(local_68,local_80,local_68);
                uVar4 = (ulonglong)uVar2;
                if (uVar2 != 0) goto LAB_1401f4aaf;
                piVar7 = local_98;
                piVar6 = local_50;
                piVar5 = local_98;
              }
              else {
                uVar2 = FUN_1401ea8b0(local_80,local_68,local_80);
                uVar4 = (ulonglong)uVar2;
                if (uVar2 != 0) goto LAB_1401f4aaf;
                piVar7 = local_50;
                piVar6 = local_98;
                piVar5 = local_50;
              }
              uVar2 = FUN_1401ea8b0(piVar5,piVar6,piVar7);
              uVar4 = (ulonglong)uVar2;
              if (uVar2 != 0) goto LAB_1401f4aaf;
              bVar8 = false;
              if (local_80[0] == 0) {
                iVar3 = FUN_1401ea230(local_68,1);
                if (iVar3 == 0) {
                  uVar1 = *(undefined4 *)(param_1 + 8);
                  goto joined_r0x0001401f4a7a;
                }
                uVar4 = 0xfffffffd;
                goto LAB_1401f4aaf;
              }
            }
            uVar2 = FUN_1401eb190(local_80,local_80);
            uVar4 = (ulonglong)uVar2;
            if (uVar2 != 0) break;
            if ((0 < local_50[0]) && ((*local_40 & 1) != 0)) {
              uVar2 = FUN_1401ea8b0(local_50,local_38,local_50);
              uVar4 = (ulonglong)uVar2;
              if (uVar2 != 0) break;
            }
            uVar2 = FUN_1401eb190(local_50,local_50);
            uVar4 = (ulonglong)uVar2;
          } while (uVar2 == 0);
        }
      }
    }
  }
  goto LAB_1401f4aaf;
  while( true ) {
    uVar2 = FUN_1401ea6f0(local_98,param_2,local_98);
    uVar4 = (ulonglong)uVar2;
    if (uVar2 != 0) break;
joined_r0x0001401f4a7a:
    if (local_90 != 1) {
      FUN_1401f4050(local_98,param_3);
      *(undefined4 *)(param_3 + 8) = uVar1;
      uVar4 = 0;
      break;
    }
  }
LAB_1401f4aaf:
  FUN_1401f4270(local_38,local_20,local_80,local_68,local_50,local_98,0);
  return uVar4;
}



undefined8 FUN_1401f4b00(int *param_1,int *param_2)

{
  int iVar1;
  uint uVar2;
  undefined8 uVar3;
  uint *puVar4;
  uint *puVar5;
  uint *puVar6;
  int iVar7;
  uint uVar8;
  
  if ((param_2[1] < *param_1 + 1) && (uVar3 = FUN_1401f1f70(param_2), (int)uVar3 != 0)) {
    return uVar3;
  }
  iVar1 = *param_2;
  *param_2 = *param_1;
  puVar6 = *(uint **)(param_1 + 4);
  iVar7 = 0;
  puVar4 = *(uint **)(param_2 + 4);
  uVar8 = 0;
  if (0 < *param_1) {
    do {
      uVar2 = *puVar6;
      iVar7 = iVar7 + 1;
      puVar5 = puVar4 + 1;
      puVar6 = puVar6 + 1;
      *puVar4 = uVar2 * 2 & 0xfffffff | uVar8;
      puVar4 = puVar5;
      uVar8 = uVar2 >> 0x1b;
    } while (iVar7 < *param_1);
    if (uVar2 >> 0x1b != 0) {
      *puVar5 = 1;
      *param_2 = *param_2 + 1;
    }
  }
  iVar7 = *param_2;
  if (iVar7 < iVar1) {
    memset((void *)(*(longlong *)(param_2 + 4) + (longlong)iVar7 * 4),0,
           (ulonglong)(uint)(iVar1 - iVar7) << 2);
  }
  param_2[2] = param_1[2];
  return 0;
}



void FUN_1401f4bb0(uint *param_1,uint param_2)

{
  FUN_1401f2150();
  **(uint **)(param_1 + 4) = param_2 & 0xfffffff;
  *param_1 = (uint)(**(int **)(param_1 + 4) != 0);
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401f4bf0(uint *param_1,uint *param_2,int param_3)

{
  uint uVar1;
  int iVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  ulonglong *puVar5;
  ulonglong *puVar6;
  ulonglong *puVar7;
  uint *puVar8;
  int iVar9;
  uint *_Dst;
  ulonglong uVar10;
  uint uVar11;
  ulonglong uVar12;
  int iVar13;
  uint uVar14;
  undefined1 auStack_1078 [32];
  uint local_1058;
  int local_1054;
  uint *local_1050;
  ulonglong local_1048 [512];
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_1078;
  uVar14 = *param_1;
  local_1058 = uVar14;
  local_1054 = param_3;
  local_1050 = param_1;
  if (((int)(*param_2 + 1) <= (int)param_1[1]) || (uVar4 = FUN_1401f1f70(), (int)uVar4 == 0)) {
    _Dst = *(uint **)(param_1 + 4);
    iVar9 = 0;
    puVar7 = local_1048;
    uVar11 = 0;
    if (0 < (int)*param_1) {
      uVar11 = *param_1;
      uVar10 = (ulonglong)uVar11;
      puVar6 = puVar7;
      puVar8 = _Dst;
      do {
        uVar1 = *puVar8;
        puVar7 = puVar6 + 1;
        puVar8 = puVar8 + 1;
        uVar10 = uVar10 - 1;
        *puVar6 = (ulonglong)uVar1;
        puVar6 = puVar7;
      } while (uVar10 != 0);
    }
    uVar1 = *param_2;
    iVar2 = uVar1 * 2 + 1;
    if ((int)uVar11 < iVar2) {
      memset(puVar7,0,(ulonglong)(iVar2 - uVar11) << 3);
    }
    uVar11 = 0;
    if (0 < (int)uVar1) {
      puVar6 = local_1048;
      puVar7 = local_1048;
      uVar10 = (ulonglong)uVar1;
      do {
        puVar6 = puVar6 + 1;
        uVar3 = puVar6[-1];
        puVar8 = *(uint **)(param_2 + 4);
        if (0 < (int)uVar1) {
          uVar12 = (ulonglong)uVar1;
          puVar5 = puVar7;
          do {
            uVar14 = *puVar8;
            puVar8 = puVar8 + 1;
            *puVar5 = *puVar5 + (ulonglong)uVar14 * (ulonglong)((int)uVar3 * local_1054 & 0xfffffff)
            ;
            uVar12 = uVar12 - 1;
            puVar5 = puVar5 + 1;
          } while (uVar12 != 0);
        }
        puVar7 = puVar7 + 1;
        *puVar6 = *puVar6 + (puVar6[-1] >> 0x1c);
        uVar10 = uVar10 - 1;
        param_1 = local_1050;
        uVar14 = local_1058;
        uVar11 = uVar1;
      } while (uVar10 != 0);
    }
    iVar13 = uVar11 + 1;
    puVar7 = local_1048 + (int)uVar11;
    if (iVar13 <= iVar2) {
      uVar10 = (ulonglong)((iVar2 - iVar13) + 1);
      puVar6 = local_1048 + iVar13;
      do {
        uVar3 = *puVar7;
        puVar7 = puVar7 + 1;
        *puVar6 = *puVar6 + (uVar3 >> 0x1c);
        uVar10 = uVar10 - 1;
        puVar6 = puVar6 + 1;
      } while (uVar10 != 0);
    }
    puVar7 = local_1048 + (int)uVar1;
    puVar8 = _Dst;
    if (0 < (int)(uVar1 + 1)) {
      do {
        uVar10 = *puVar7;
        iVar9 = iVar9 + 1;
        _Dst = puVar8 + 1;
        puVar7 = puVar7 + 1;
        *puVar8 = (uint)uVar10 & 0xfffffff;
        puVar8 = _Dst;
      } while (iVar9 < (int)(*param_2 + 1));
    }
    if (iVar9 < (int)uVar14) {
      memset(_Dst,0,(ulonglong)(uVar14 - iVar9) << 2);
    }
    *param_1 = *param_2 + 1;
    FUN_1401f2010(param_1);
    iVar9 = FUN_1401f2180(param_1,param_2);
    if (iVar9 == -1) {
      uVar4 = 0;
    }
    else {
      uVar4 = FUN_1401f2560(param_1,param_2,param_1);
    }
  }
  return uVar4;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_1401f4e40(undefined8 param_1,int *param_2,int *param_3,undefined8 param_4,int param_5)

{
  int *piVar1;
  int iVar2;
  uint uVar3;
  ulonglong uVar4;
  int *piVar5;
  int iVar6;
  int iVar7;
  ulonglong uVar8;
  int iVar9;
  undefined1 *puVar10;
  uint uVar11;
  code *pcVar12;
  undefined1 auStack_18c8 [32];
  undefined4 local_18a8;
  uint local_18a4;
  int local_18a0;
  int *local_1898;
  int local_1890;
  undefined1 local_1888 [24];
  uint local_1870;
  int *local_1868;
  undefined8 local_1860;
  undefined1 auStack_1858 [24];
  undefined1 local_1840 [6120];
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_18c8;
  local_1898 = param_3;
  local_1868 = param_2;
  local_1860 = param_4;
  iVar2 = FUN_1401ea260(param_2);
  if (iVar2 < 8) {
    iVar2 = 2;
  }
  else if (iVar2 < 0x25) {
    iVar2 = 3;
  }
  else if (iVar2 < 0x8d) {
    iVar2 = 4;
  }
  else if (iVar2 < 0x1c3) {
    iVar2 = 5;
  }
  else if (iVar2 < 0x518) {
    iVar2 = 6;
  }
  else {
    iVar2 = (0xdc9 < iVar2) + 7;
  }
  uVar4 = FUN_1401e9fb0(local_1840);
  if ((int)uVar4 != 0) {
    return uVar4;
  }
  iVar7 = iVar2 + -1;
  uVar11 = 1 << (sbyte)iVar2;
  iVar6 = 1 << ((byte)iVar7 & 0x1f);
  local_18a0 = iVar6;
  local_18a4 = uVar11;
  for (iVar9 = iVar6; iVar9 < (int)uVar11; iVar9 = iVar9 + 1) {
    uVar3 = FUN_1401e9fb0(auStack_1858 + (longlong)iVar9 * 0x18);
    if (uVar3 != 0) {
      if (iVar6 < iVar9) {
        uVar4 = (ulonglong)(uint)(iVar9 - local_18a0);
        puVar10 = auStack_1858 + (longlong)iVar6 * 0x18;
        do {
          FUN_1401ea010(puVar10);
          puVar10 = puVar10 + 0x18;
          uVar4 = uVar4 - 1;
        } while (uVar4 != 0);
      }
      FUN_1401ea010(local_1840);
      return (ulonglong)uVar3;
    }
    param_3 = local_1898;
  }
  if (param_5 == 0) {
    uVar3 = FUN_1401eb620();
    uVar4 = (ulonglong)uVar3;
    if (uVar3 != 0) goto LAB_1401f538d;
    if ((*param_3 * 2 + 1 < 0x200) && (*param_3 < 0x100)) {
      pcVar12 = FUN_1401f4bf0;
    }
    else {
      pcVar12 = FUN_1401eb750;
    }
  }
  else if (param_5 == 1) {
    FUN_1401f8280();
    pcVar12 = FUN_1401f8170;
  }
  else {
    uVar3 = FUN_1401f80d0(param_3,&local_18a8);
    uVar4 = (ulonglong)uVar3;
    if (uVar3 != 0) goto LAB_1401f538d;
    pcVar12 = FUN_1401f7fe0;
  }
  uVar3 = FUN_1401e9fb0(local_1888);
  uVar4 = (ulonglong)uVar3;
  uVar11 = local_18a4;
  if (uVar3 != 0) goto LAB_1401f538d;
  if (param_5 == 0) {
    uVar11 = FUN_1401eb680(local_1888,param_3);
    uVar4 = (ulonglong)uVar11;
    if (uVar11 != 0) goto LAB_1401f537e;
    uVar11 = FUN_1401eb500(param_1,local_1888,param_3);
  }
  else {
    FUN_1401f4bb0(local_1888,1);
    uVar11 = FUN_1401f4330(param_1,param_3,local_1840);
  }
  uVar4 = (ulonglong)uVar11;
  if (uVar11 == 0) {
    puVar10 = auStack_1858 + (longlong)local_18a0 * 0x18;
    uVar11 = FUN_1401ea0b0(local_1840,puVar10);
    piVar1 = local_1898;
    uVar4 = (ulonglong)uVar11;
    if (uVar11 == 0) {
      iVar9 = 0;
      if (0 < iVar7) {
        do {
          uVar11 = FUN_1401eabe0(puVar10,puVar10);
          uVar4 = (ulonglong)uVar11;
          if (uVar11 != 0) goto LAB_1401f537e;
          uVar11 = (*pcVar12)(puVar10,piVar1,local_18a8);
          uVar4 = (ulonglong)uVar11;
          if (uVar11 != 0) goto LAB_1401f537e;
          iVar9 = iVar9 + 1;
        } while (iVar9 < iVar7);
      }
      iVar9 = local_18a0 + 1;
      iVar7 = local_18a0;
      if (iVar9 < (int)local_18a4) {
        do {
          uVar11 = FUN_1401eaa70(auStack_1858 + (longlong)iVar7 * 0x18,local_1840,
                                 auStack_1858 + (longlong)iVar9 * 0x18);
          uVar4 = (ulonglong)uVar11;
          if (uVar11 != 0) goto LAB_1401f537e;
          uVar11 = (*pcVar12)(auStack_1858 + (longlong)iVar9 * 0x18,piVar1,local_18a8);
          uVar4 = (ulonglong)uVar11;
          if (uVar11 != 0) goto LAB_1401f537e;
          iVar9 = iVar9 + 1;
          iVar7 = iVar7 + 1;
        } while (iVar9 < (int)local_18a4);
      }
      iVar9 = 0;
      uVar4 = 0;
      iVar7 = 0;
      local_1890 = 1;
      uVar11 = 0;
      local_1898 = (int *)(longlong)(*local_1868 + -1);
      piVar5 = local_1898;
LAB_1401f5166:
      while( true ) {
        local_1890 = local_1890 + -1;
        uVar8 = uVar4;
        if (local_1890 == 0) {
          if (piVar5 == (int *)0xffffffffffffffff) {
            if (((iVar9 != 2) || (iVar7 < 1)) || (iVar2 = 0, iVar7 < 1)) goto LAB_1401f534e;
            goto LAB_1401f52e0;
          }
          piVar5 = (int *)((longlong)piVar5 + -1);
          uVar8 = (ulonglong)*(uint *)(*(longlong *)(local_1868 + 4) + 4 + (longlong)piVar5 * 4);
          local_1890 = 0x1c;
          local_1898 = piVar5;
        }
        local_1870 = (int)uVar8 * 2;
        uVar4 = (ulonglong)local_1870;
        uVar8 = uVar8 >> 0x1b;
        if (iVar9 == 0) goto code_r0x0001401f51af;
        if ((iVar9 != 1) || ((uVar8 & 1) != 0)) goto LAB_1401f51b3;
        uVar3 = FUN_1401eabe0(local_1888,local_1888);
        uVar4 = (ulonglong)uVar3;
        if (uVar3 != 0) break;
        uVar3 = (*pcVar12)(local_1888,piVar1,local_18a8);
        uVar4 = (ulonglong)uVar3;
        if (uVar3 != 0) break;
        uVar4 = (ulonglong)local_1870;
        piVar5 = local_1898;
      }
    }
  }
  goto LAB_1401f537e;
code_r0x0001401f51af:
  if ((uVar8 & 1) != 0) {
LAB_1401f51b3:
    iVar7 = iVar7 + 1;
    iVar9 = 2;
    uVar11 = uVar11 | ((uint)uVar8 & 1) << ((sbyte)iVar2 - (char)iVar7 & 0x1fU);
    piVar5 = local_1898;
    if (iVar7 == iVar2) {
      iVar7 = 0;
      if (iVar2 != 0) {
        do {
          uVar3 = FUN_1401eabe0(local_1888,local_1888);
          uVar4 = (ulonglong)uVar3;
          if (uVar3 != 0) goto LAB_1401f537e;
          uVar3 = (*pcVar12)(local_1888,piVar1,local_18a8);
          uVar4 = (ulonglong)uVar3;
          if (uVar3 != 0) goto LAB_1401f537e;
          iVar7 = iVar7 + 1;
        } while (iVar7 < iVar2);
      }
      uVar11 = FUN_1401eaa70(local_1888,auStack_1858 + (longlong)(int)uVar11 * 0x18,local_1888);
      uVar4 = (ulonglong)uVar11;
      if (uVar11 != 0) goto LAB_1401f537e;
      uVar11 = (*pcVar12)(local_1888,piVar1,local_18a8);
      uVar4 = (ulonglong)uVar11;
      if (uVar11 != 0) goto LAB_1401f537e;
      uVar4 = (ulonglong)local_1870;
      iVar7 = 0;
      iVar9 = 1;
      uVar11 = 0;
      piVar5 = local_1898;
    }
  }
  goto LAB_1401f5166;
  while( true ) {
    uVar3 = (*pcVar12)(local_1888,piVar1,local_18a8);
    uVar4 = (ulonglong)uVar3;
    if (uVar3 != 0) goto LAB_1401f537e;
    uVar11 = uVar11 * 2;
    if ((local_18a4 & uVar11) != 0) {
      uVar3 = FUN_1401eaa70(local_1888,local_1840,local_1888);
      uVar4 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401f537e;
      uVar3 = (*pcVar12)(local_1888,piVar1,local_18a8);
      uVar4 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401f537e;
    }
    iVar2 = iVar2 + 1;
    if (iVar7 <= iVar2) break;
LAB_1401f52e0:
    uVar3 = FUN_1401eabe0(local_1888,local_1888);
    uVar4 = (ulonglong)uVar3;
    if (uVar3 != 0) goto LAB_1401f537e;
  }
LAB_1401f534e:
  if (param_5 == 0) {
    uVar11 = (*pcVar12)(local_1888,piVar1,local_18a8);
    uVar4 = (ulonglong)uVar11;
    if (uVar11 != 0) goto LAB_1401f537e;
  }
  FUN_1401f4050(local_1888,local_1860);
  uVar4 = 0;
LAB_1401f537e:
  FUN_1401ea010(local_1888);
  uVar11 = local_18a4;
LAB_1401f538d:
  FUN_1401ea010(local_1840);
  if (local_18a0 < (int)uVar11) {
    puVar10 = auStack_1858 + (longlong)local_18a0 * 0x18;
    uVar8 = (ulonglong)(uVar11 - local_18a0);
    do {
      FUN_1401ea010(puVar10);
      puVar10 = puVar10 + 0x18;
      uVar8 = uVar8 - 1;
    } while (uVar8 != 0);
  }
  return uVar4;
}



undefined8 FUN_1401f5400(int *param_1)

{
  int iVar1;
  uint uVar2;
  uint *puVar3;
  int iVar4;
  
  iVar1 = *param_1;
  if (iVar1 == 0) {
    return 0;
  }
  if ((iVar1 != 1) && (1 < iVar1)) {
    iVar1 = FUN_1401ea260();
    iVar4 = 0x1c;
    uVar2 = 1;
    if (0x1c < iVar1) {
      puVar3 = (uint *)(*(longlong *)(param_1 + 4) + 4);
      do {
        if ((*puVar3 & uVar2) == 0) {
          return 0;
        }
        uVar2 = uVar2 * 2;
        if (0xfffffff < uVar2) {
          puVar3 = puVar3 + 1;
          uVar2 = 1;
        }
        iVar4 = iVar4 + 1;
      } while (iVar4 < iVar1);
    }
  }
  return 1;
}



undefined8 FUN_1401f5470(int *param_1)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  iVar1 = *param_1;
  if (iVar1 < 2) {
    return 0;
  }
  iVar3 = 1;
  if (1 < iVar1) {
    piVar2 = *(int **)(param_1 + 4);
    do {
      piVar2 = piVar2 + 1;
      if (*piVar2 != 0xfffffff) {
        return 0;
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 < iVar1);
  }
  return 1;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

ulonglong FUN_1401f54b0(undefined8 param_1,int *param_2,longlong param_3,undefined8 param_4,
                       int param_5)

{
  longlong lVar1;
  int iVar2;
  uint uVar3;
  ulonglong uVar4;
  longlong lVar5;
  int iVar6;
  int iVar7;
  ulonglong uVar8;
  int iVar9;
  undefined1 *puVar10;
  uint uVar11;
  code *pcVar12;
  undefined1 auStack_18d8 [32];
  uint local_18b8;
  int local_18b4;
  longlong local_18b0;
  int local_18a8;
  undefined1 local_18a0 [24];
  int *local_1888;
  uint local_1880;
  undefined1 local_1878 [24];
  undefined8 local_1860;
  undefined1 auStack_1858 [24];
  undefined1 local_1840 [6120];
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_18d8;
  local_18b0 = param_3;
  local_1888 = param_2;
  local_1860 = param_4;
  iVar2 = FUN_1401ea260(param_2);
  if (iVar2 < 8) {
    iVar2 = 2;
  }
  else if (iVar2 < 0x25) {
    iVar2 = 3;
  }
  else if (iVar2 < 0x8d) {
    iVar2 = 4;
  }
  else if (iVar2 < 0x1c3) {
    iVar2 = 5;
  }
  else if (iVar2 < 0x518) {
    iVar2 = 6;
  }
  else {
    iVar2 = (0xdc9 < iVar2) + 7;
  }
  uVar4 = FUN_1401e9fb0(local_1840);
  if ((int)uVar4 != 0) {
    return uVar4;
  }
  iVar7 = iVar2 + -1;
  uVar11 = 1 << (sbyte)iVar2;
  iVar6 = 1 << ((byte)iVar7 & 0x1f);
  local_18b4 = iVar6;
  local_18b8 = uVar11;
  for (iVar9 = iVar6; iVar9 < (int)uVar11; iVar9 = iVar9 + 1) {
    uVar3 = FUN_1401e9fb0(auStack_1858 + (longlong)iVar9 * 0x18);
    if (uVar3 != 0) {
      if (iVar6 < iVar9) {
        uVar4 = (ulonglong)(uint)(iVar9 - local_18b4);
        puVar10 = auStack_1858 + (longlong)iVar6 * 0x18;
        do {
          FUN_1401ea010(puVar10);
          puVar10 = puVar10 + 0x18;
          uVar4 = uVar4 - 1;
        } while (uVar4 != 0);
      }
      FUN_1401ea010(local_1840);
      return (ulonglong)uVar3;
    }
    param_3 = local_18b0;
  }
  uVar3 = FUN_1401e9fb0(local_1878);
  uVar4 = (ulonglong)uVar3;
  if (uVar3 != 0) goto LAB_1401f59b4;
  if (param_5 == 0) {
    uVar3 = FUN_1401f8570(local_1878,param_3);
    uVar4 = (ulonglong)uVar3;
    if (uVar3 == 0) {
      pcVar12 = FUN_1401f83f0;
LAB_1401f5662:
      uVar3 = FUN_1401f4330(param_1,param_3,local_1840);
      uVar4 = (ulonglong)uVar3;
      uVar11 = local_18b8;
      if (uVar3 == 0) {
        puVar10 = auStack_1858 + (longlong)local_18b4 * 0x18;
        uVar3 = FUN_1401ea0b0(local_1840,puVar10);
        lVar1 = local_18b0;
        uVar4 = (ulonglong)uVar3;
        uVar11 = local_18b8;
        if (uVar3 == 0) {
          iVar9 = 0;
          if (0 < iVar7) {
            do {
              uVar3 = FUN_1401eabe0(puVar10,puVar10);
              uVar4 = (ulonglong)uVar3;
              uVar11 = local_18b8;
              if (uVar3 != 0) goto LAB_1401f59aa;
              uVar3 = (*pcVar12)(puVar10,lVar1,local_1878);
              uVar4 = (ulonglong)uVar3;
              uVar11 = local_18b8;
              if (uVar3 != 0) goto LAB_1401f59aa;
              iVar9 = iVar9 + 1;
            } while (iVar9 < iVar7);
          }
          iVar9 = local_18b4 + 1;
          iVar7 = local_18b4;
          if (iVar9 < (int)local_18b8) {
            do {
              uVar3 = FUN_1401eaa70(auStack_1858 + (longlong)iVar7 * 0x18,local_1840,
                                    auStack_1858 + (longlong)iVar9 * 0x18);
              uVar4 = (ulonglong)uVar3;
              uVar11 = local_18b8;
              if (uVar3 != 0) goto LAB_1401f59aa;
              uVar3 = (*pcVar12)(auStack_1858 + (longlong)iVar9 * 0x18,lVar1,local_1878);
              uVar4 = (ulonglong)uVar3;
              uVar11 = local_18b8;
              if (uVar3 != 0) goto LAB_1401f59aa;
              iVar9 = iVar9 + 1;
              iVar7 = iVar7 + 1;
            } while (iVar9 < (int)local_18b8);
          }
          uVar3 = FUN_1401e9fb0(local_18a0);
          uVar4 = (ulonglong)uVar3;
          uVar11 = local_18b8;
          if (uVar3 == 0) {
            FUN_1401f4bb0(local_18a0,1);
            iVar9 = 0;
            uVar4 = 0;
            iVar7 = 0;
            local_18a8 = 1;
            uVar11 = 0;
            local_18b0 = (longlong)(*local_1888 + -1);
            lVar5 = local_18b0;
LAB_1401f57a5:
            while( true ) {
              local_18a8 = local_18a8 + -1;
              uVar8 = uVar4;
              if (local_18a8 == 0) {
                if (lVar5 == -1) {
                  if (((iVar9 != 2) || (iVar7 < 1)) || (iVar2 = 0, iVar7 < 1)) goto LAB_1401f598a;
                  goto LAB_1401f5920;
                }
                lVar5 = lVar5 + -1;
                uVar8 = (ulonglong)*(uint *)(*(longlong *)(local_1888 + 4) + 4 + lVar5 * 4);
                local_18a8 = 0x1c;
                local_18b0 = lVar5;
              }
              local_1880 = (int)uVar8 * 2;
              uVar4 = (ulonglong)local_1880;
              uVar8 = uVar8 >> 0x1b;
              if (iVar9 == 0) goto code_r0x0001401f57ee;
              if ((iVar9 != 1) || ((uVar8 & 1) != 0)) goto LAB_1401f57f2;
              uVar3 = FUN_1401eabe0(local_18a0,local_18a0);
              uVar4 = (ulonglong)uVar3;
              if (uVar3 != 0) break;
              uVar3 = (*pcVar12)(local_18a0,lVar1,local_1878);
              uVar4 = (ulonglong)uVar3;
              if (uVar3 != 0) break;
              uVar4 = (ulonglong)local_1880;
              lVar5 = local_18b0;
            }
            goto LAB_1401f599b;
          }
        }
      }
    }
  }
  else {
    uVar3 = FUN_1401f8380(param_3,local_1878);
    uVar4 = (ulonglong)uVar3;
    if (uVar3 == 0) {
      pcVar12 = FUN_1401f8290;
      goto LAB_1401f5662;
    }
  }
LAB_1401f59aa:
  FUN_1401ea010(local_1878);
LAB_1401f59b4:
  FUN_1401ea010(local_1840);
  if (local_18b4 < (int)uVar11) {
    puVar10 = auStack_1858 + (longlong)local_18b4 * 0x18;
    uVar8 = (ulonglong)(uVar11 - local_18b4);
    do {
      FUN_1401ea010(puVar10);
      puVar10 = puVar10 + 0x18;
      uVar8 = uVar8 - 1;
    } while (uVar8 != 0);
  }
  return uVar4;
  while( true ) {
    uVar3 = (*pcVar12)(local_18a0,lVar1,local_1878);
    uVar4 = (ulonglong)uVar3;
    if (uVar3 != 0) goto LAB_1401f599b;
    uVar11 = uVar11 * 2;
    if ((local_18b8 & uVar11) != 0) {
      uVar3 = FUN_1401eaa70(local_18a0,local_1840,local_18a0);
      uVar4 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401f599b;
      uVar3 = (*pcVar12)(local_18a0,lVar1,local_1878);
      uVar4 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401f599b;
    }
    iVar2 = iVar2 + 1;
    if (iVar7 <= iVar2) break;
LAB_1401f5920:
    uVar3 = FUN_1401eabe0(local_18a0,local_18a0);
    uVar4 = (ulonglong)uVar3;
    if (uVar3 != 0) goto LAB_1401f599b;
  }
LAB_1401f598a:
  FUN_1401f4050(local_18a0,local_1860);
  uVar4 = 0;
LAB_1401f599b:
  FUN_1401ea010(local_18a0);
  uVar11 = local_18b8;
  goto LAB_1401f59aa;
code_r0x0001401f57ee:
  if ((uVar8 & 1) != 0) {
LAB_1401f57f2:
    iVar7 = iVar7 + 1;
    iVar9 = 2;
    uVar11 = uVar11 | ((uint)uVar8 & 1) << ((sbyte)iVar2 - (char)iVar7 & 0x1fU);
    lVar5 = local_18b0;
    if (iVar7 == iVar2) {
      iVar7 = 0;
      if (iVar2 != 0) {
        do {
          uVar3 = FUN_1401eabe0(local_18a0,local_18a0);
          uVar4 = (ulonglong)uVar3;
          if (uVar3 != 0) goto LAB_1401f599b;
          uVar3 = (*pcVar12)(local_18a0,lVar1,local_1878);
          uVar4 = (ulonglong)uVar3;
          if (uVar3 != 0) goto LAB_1401f599b;
          iVar7 = iVar7 + 1;
        } while (iVar7 < iVar2);
      }
      uVar11 = FUN_1401eaa70(local_18a0,auStack_1858 + (longlong)(int)uVar11 * 0x18,local_18a0);
      uVar4 = (ulonglong)uVar11;
      if (uVar11 != 0) goto LAB_1401f599b;
      uVar11 = (*pcVar12)(local_18a0,lVar1,local_1878);
      uVar4 = (ulonglong)uVar11;
      if (uVar11 != 0) goto LAB_1401f599b;
      uVar4 = (ulonglong)local_1880;
      iVar7 = 0;
      iVar9 = 1;
      uVar11 = 0;
      lVar5 = local_18b0;
    }
  }
  goto LAB_1401f57a5;
}



bool FUN_1401f5a30(uint *param_1)

{
  uint uVar1;
  int *piVar2;
  ulonglong uVar3;
  int iVar4;
  
  uVar1 = *param_1;
  uVar3 = (ulonglong)uVar1;
  if (uVar1 != 0) {
    if (uVar1 == 1) {
      return true;
    }
    if (1 < (int)uVar1) {
      iVar4 = 0;
      if (0 < (int)uVar1) {
        piVar2 = *(int **)(param_1 + 4);
        iVar4 = 0;
        do {
          if (*piVar2 == 0xfffffff) {
            iVar4 = iVar4 + 1;
          }
          piVar2 = piVar2 + 1;
          uVar3 = uVar3 - 1;
        } while (uVar3 != 0);
      }
      return (int)uVar1 / 2 <= iVar4;
    }
  }
  return false;
}



ulonglong FUN_1401f5a80(undefined8 param_1,undefined8 param_2,undefined4 *param_3)

{
  int iVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  ulonglong uVar5;
  undefined1 local_68 [24];
  undefined1 local_50 [24];
  undefined1 local_38 [32];
  
  *param_3 = 0;
  iVar1 = FUN_1401ea230(param_2,1);
  if (iVar1 != 1) {
    return 0xfffffffd;
  }
  uVar5 = FUN_1401f23b0(local_50,param_1);
  if ((int)uVar5 != 0) {
    return uVar5;
  }
  uVar2 = FUN_1401ea930(local_50,1,local_50);
  uVar5 = (ulonglong)uVar2;
  if (uVar2 != 0) goto LAB_1401f5c12;
  uVar2 = FUN_1401f23b0(local_38,local_50);
  uVar5 = (ulonglong)uVar2;
  if (uVar2 != 0) goto LAB_1401f5c12;
  iVar1 = FUN_1401ea290(local_38);
  uVar2 = FUN_1401f23e0(local_38,iVar1,local_38,0);
  uVar5 = (ulonglong)uVar2;
  if (uVar2 == 0) {
    uVar2 = FUN_1401e9fb0(local_68);
    uVar5 = (ulonglong)uVar2;
    if (uVar2 == 0) {
      uVar2 = FUN_1401eb8c0(param_2,local_38,param_1,local_68);
      uVar5 = (ulonglong)uVar2;
      if (uVar2 == 0) {
        iVar3 = FUN_1401ea230(local_68,1);
        if ((iVar3 != 0) && (iVar3 = FUN_1401ea200(local_68,local_50), iVar3 != 0)) {
          iVar3 = 1;
          if (0 < iVar1 + -1) {
            do {
              iVar4 = FUN_1401ea200(local_68,local_50);
              if (iVar4 == 0) break;
              uVar2 = FUN_1401eb580(local_68,param_1,local_68);
              uVar5 = (ulonglong)uVar2;
              if ((uVar2 != 0) || (iVar4 = FUN_1401ea230(local_68,1), iVar4 == 0))
              goto LAB_1401f5bf8;
              iVar3 = iVar3 + 1;
            } while (iVar3 <= iVar1 + -1);
          }
          iVar1 = FUN_1401ea200(local_68,local_50);
          if (iVar1 != 0) goto LAB_1401f5bf8;
        }
        *param_3 = 1;
      }
LAB_1401f5bf8:
      FUN_1401ea010(local_68);
    }
  }
  FUN_1401ea010(local_38);
LAB_1401f5c12:
  FUN_1401ea010(local_50);
  return uVar5;
}



undefined8 FUN_1401f5c40(undefined8 param_1,undefined4 *param_2)

{
  undefined8 uVar1;
  undefined4 *puVar2;
  int local_res10 [2];
  
  *param_2 = 0;
  puVar2 = &DAT_14027dde0;
  while( true ) {
    uVar1 = FUN_1401eb240(param_1,*puVar2,local_res10);
    if ((int)uVar1 != 0) {
      return uVar1;
    }
    if (local_res10[0] == 0) break;
    puVar2 = puVar2 + 1;
    if (0x14027e1df < (longlong)puVar2) {
      return 0;
    }
  }
  *param_2 = 1;
  return 0;
}



undefined8 FUN_1401f5cc0(longlong param_1,uint *param_2,longlong param_3,uint param_4)

{
  undefined8 uVar1;
  int iVar2;
  undefined4 *puVar3;
  ulonglong uVar4;
  uint uVar5;
  ulonglong uVar6;
  undefined8 *puVar7;
  undefined4 local_res8 [2];
  uint local_48 [4];
  
  if (((param_1 == 0) || (param_2 == (uint *)0x0)) || (param_3 == 0)) {
    return 0x10;
  }
  if (*param_2 < 2) {
    return 7;
  }
  uVar6 = 0;
  if (param_4 != 0) {
    puVar3 = (undefined4 *)(param_3 + 0x14);
    uVar4 = (ulonglong)param_4;
    do {
      *puVar3 = 0;
      puVar3 = puVar3 + 0xe;
      uVar4 = uVar4 - 1;
    } while (uVar4 != 0);
  }
  if (param_4 != 0) {
    puVar7 = (undefined8 *)(param_3 + 8);
    uVar4 = uVar6;
    do {
      local_res8[0] = *(undefined4 *)(puVar7 + 1);
      uVar1 = *puVar7;
      switch(*(undefined4 *)(puVar7 + -1)) {
      case 2:
        iVar2 = FUN_1401f7440(param_1,*param_2,uVar1);
        if (iVar2 == 0) {
          iVar2 = FUN_1401f7340(uVar1,local_48);
          goto LAB_1401f5f95;
        }
        break;
      case 3:
        iVar2 = FUN_1401f72e0(param_1,*param_2,uVar1);
        if (iVar2 == 0) {
          iVar2 = FUN_1401f7290(local_res8[0],local_48);
          goto LAB_1401f5f95;
        }
        break;
      case 4:
        iVar2 = FUN_1401f7130(param_1,*param_2,uVar1,local_res8);
        if (iVar2 == 0) {
          iVar2 = FUN_1401f70e0(local_res8[0],local_48);
joined_r0x0001401f5f4f:
          if (iVar2 == 0) {
            *(undefined4 *)(uVar6 * 0x38 + 0x10 + param_3) = local_res8[0];
            *(undefined4 *)(uVar6 * 0x38 + 0x14 + param_3) = 1;
            *param_2 = local_48[0];
            return 0;
          }
        }
        break;
      case 5:
        iVar2 = FUN_1401f6fe0(param_1,*param_2,uVar1,local_res8);
        if (iVar2 == 0) {
          iVar2 = FUN_1401f6f90(local_res8[0],local_48);
          goto joined_r0x0001401f5f4f;
        }
        break;
      case 6:
        if (((*param_2 == 2) && (*(char *)(uVar4 + param_1) == '\x05')) &&
           (*(char *)(uVar4 + 1 + param_1) == '\0')) {
          *param_2 = 2;
          *(undefined4 *)(uVar6 * 0x38 + 0x14 + param_3) = 1;
          return 0;
        }
        break;
      case 7:
        iVar2 = FUN_1401f6e10(param_1,*param_2,uVar1,local_res8);
        if (iVar2 == 0) {
          iVar2 = FUN_1401f6ce0(uVar1,local_res8[0],local_48);
          goto joined_r0x0001401f5f4f;
        }
        break;
      case 8:
        iVar2 = FUN_1401f6ba0(param_1,*param_2,uVar1,local_res8);
        if (iVar2 == 0) {
          iVar2 = FUN_1401f6b00(uVar1,local_res8[0],local_48);
          goto joined_r0x0001401f5f4f;
        }
        break;
      case 9:
        iVar2 = FUN_1401f6960(param_1,*param_2,uVar1,local_res8);
        if (iVar2 == 0) {
          iVar2 = FUN_1401f68c0(uVar1,local_res8[0],local_48);
          goto joined_r0x0001401f5f4f;
        }
        break;
      case 10:
        iVar2 = FUN_1401f66c0(param_1,*param_2,uVar1,local_res8);
        if (iVar2 == 0) {
          iVar2 = FUN_1401f65b0(uVar1,local_res8[0],local_48);
          goto joined_r0x0001401f5f4f;
        }
        break;
      case 0xb:
        local_48[0] = *param_2;
        iVar2 = FUN_1401f62b0(param_1,local_48,uVar1);
LAB_1401f5f95:
        if (iVar2 == 0) {
          *(undefined4 *)(uVar6 * 0x38 + 0x14 + param_3) = 1;
          *param_2 = local_48[0];
          return 0;
        }
        break;
      default:
        return 0x10;
      case 0xd:
      case 0xe:
      case 0xf:
        iVar2 = FUN_1401eee20(param_1,*param_2,uVar1,local_res8[0],1);
        if (iVar2 == 0) {
          iVar2 = FUN_1401f6030(uVar1,local_res8[0],local_48);
          goto LAB_1401f5f95;
        }
      }
      uVar5 = (int)uVar6 + 1;
      uVar6 = (ulonglong)uVar5;
      uVar4 = uVar4 + 1;
      puVar7 = puVar7 + 7;
    } while (uVar5 < param_4);
  }
  return 7;
}



undefined8 FUN_1401f6030(longlong param_1,uint param_2,int *param_3)

{
  undefined4 uVar1;
  undefined4 *puVar2;
  undefined8 uVar3;
  uint uVar4;
  int iVar5;
  uint uVar6;
  undefined8 *puVar7;
  int local_res8 [2];
  uint local_res10;
  
  if ((param_1 == 0) || (param_3 == (int *)0x0)) {
    return 0x10;
  }
  uVar6 = 0;
  uVar4 = 0;
  if (param_2 != 0) {
    puVar7 = (undefined8 *)(param_1 + 8);
    local_res10 = param_2;
    do {
      uVar1 = *(undefined4 *)(puVar7 + 1);
      puVar2 = (undefined4 *)*puVar7;
      if (*(int *)(puVar7 + -1) == 0) break;
      switch(*(int *)(puVar7 + -1)) {
      case 1:
        uVar3 = FUN_1401f75d0(local_res8);
        break;
      case 2:
        uVar3 = FUN_1401f7340(puVar2,local_res8);
        break;
      case 3:
        uVar3 = FUN_1401f7290(*puVar2,local_res8);
        break;
      case 4:
        uVar3 = FUN_1401f70e0(uVar1,local_res8);
        break;
      case 5:
        uVar3 = FUN_1401f6f90(uVar1,local_res8);
        break;
      case 6:
        uVar4 = uVar4 + 2;
        goto LAB_1401f6177;
      case 7:
        uVar3 = FUN_1401f6ce0(puVar2,uVar1,local_res8);
        break;
      case 8:
        uVar3 = FUN_1401f6b00(puVar2,uVar1,local_res8);
        break;
      case 9:
        uVar3 = FUN_1401f68c0(puVar2,uVar1,local_res8);
        break;
      case 10:
        uVar3 = FUN_1401f65b0(puVar2,uVar1,local_res8);
        break;
      case 0xb:
        uVar3 = FUN_1401f85b0(puVar2,local_res8);
        break;
      default:
        goto LAB_1401f61c5;
      case 0xd:
      case 0xe:
      case 0xf:
        uVar3 = FUN_1401f6030(puVar2,uVar1,local_res8);
      }
      if ((int)uVar3 != 0) {
        return uVar3;
      }
      uVar4 = uVar4 + local_res8[0];
LAB_1401f6177:
      uVar6 = uVar6 + 1;
      puVar7 = puVar7 + 7;
    } while (uVar6 < local_res10);
    if (0x7f < uVar4) {
      if (uVar4 < 0x100) {
        iVar5 = uVar4 + 3;
      }
      else if (uVar4 < 0x10000) {
        iVar5 = uVar4 + 4;
      }
      else {
        if (0xffffff < uVar4) {
LAB_1401f61c5:
          return 0x10;
        }
        iVar5 = uVar4 + 5;
      }
      goto LAB_1401f61c0;
    }
  }
  iVar5 = uVar4 + 2;
LAB_1401f61c0:
  *param_3 = iVar5;
  return 0;
}



undefined8 FUN_1401f6220(undefined1 param_1)

{
  switch(param_1) {
  case 0x30:
    return 0;
  case 0x31:
    return 1;
  case 0x32:
    return 2;
  case 0x33:
    return 3;
  case 0x34:
    return 4;
  case 0x35:
    return 5;
  case 0x36:
    return 6;
  case 0x37:
    return 7;
  case 0x38:
    return 8;
  case 0x39:
    return 9;
  default:
    return 100;
  }
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined4 FUN_1401f62b0(longlong param_1,uint *param_2,uint *param_3)

{
  byte bVar1;
  int iVar2;
  int iVar3;
  undefined1 *puVar4;
  uint uVar5;
  uint uVar6;
  undefined1 auStack_88 [32];
  undefined1 local_68 [4];
  undefined1 local_64;
  undefined1 local_63;
  undefined1 local_62;
  undefined1 local_61;
  undefined1 local_60;
  undefined1 local_5f;
  char local_5e;
  undefined1 local_5d;
  char local_5c;
  undefined1 local_5b;
  undefined1 local_5a;
  undefined1 local_59;
  undefined1 local_58;
  ulonglong local_48;
  
  local_48 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  if (((param_1 == 0) || (param_2 == (uint *)0x0)) || (param_3 == (uint *)0x0)) {
    return 0x10;
  }
  if (*param_2 < 2) {
    return 7;
  }
  bVar1 = *(byte *)(param_1 + 1);
  if (0x1f < bVar1) {
    return 7;
  }
  if (*param_2 < bVar1 + 2) {
    return 7;
  }
  uVar5 = 0;
  uVar6 = uVar5;
  if (bVar1 != 0) {
    puVar4 = local_68;
    uVar6 = 0;
    do {
      iVar2 = FUN_1401f6ac0(puVar4[(param_1 - (longlong)local_68) + 2]);
      if (iVar2 == -1) {
        return 7;
      }
      *puVar4 = (char)iVar2;
      uVar6 = uVar6 + 1;
      puVar4 = puVar4 + 1;
    } while (uVar6 < *(byte *)(param_1 + 1));
  }
  *param_2 = uVar6 + 2;
  iVar2 = FUN_1401f6220(local_68[0]);
  iVar2 = iVar2 * 5;
  iVar3 = FUN_1401f6220(local_68[1]);
  uVar6 = iVar3 + iVar2 * 2;
  *param_3 = uVar6;
  if (uVar6 < 100) {
    iVar2 = FUN_1401f6220(local_68[2]);
    iVar2 = iVar2 * 5;
    iVar3 = FUN_1401f6220(local_68[3]);
    uVar6 = iVar3 + iVar2 * 2;
    param_3[1] = uVar6;
    if (0xc < uVar6) {
      return 7;
    }
    iVar2 = FUN_1401f6220(local_64);
    iVar2 = iVar2 * 5;
    iVar3 = FUN_1401f6220(local_63);
    uVar6 = iVar3 + iVar2 * 2;
    param_3[2] = uVar6;
    if (0x1f < uVar6) {
      return 7;
    }
    iVar2 = FUN_1401f6220(local_62);
    iVar2 = iVar2 * 5;
    iVar3 = FUN_1401f6220(local_61);
    uVar6 = iVar3 + iVar2 * 2;
    param_3[3] = uVar6;
    if (0x17 < uVar6) {
      return 7;
    }
    iVar2 = FUN_1401f6220(local_60);
    iVar2 = iVar2 * 5;
    iVar3 = FUN_1401f6220(local_5f);
    uVar6 = iVar3 + iVar2 * 2;
    param_3[4] = uVar6;
    if (0x3b < uVar6) {
      return 7;
    }
    param_3[7] = 0;
    param_3[8] = 0;
    param_3[5] = 0;
    param_3[6] = 0;
    if (local_5e == 'Z') {
      return 0;
    }
    if (local_5e == '+') {
      uVar6 = 0;
    }
    else {
      if (local_5e != '-') {
        iVar2 = FUN_1401f6220();
        iVar2 = iVar2 * 5;
        iVar3 = FUN_1401f6220(local_5d);
        uVar6 = iVar3 + iVar2 * 2;
        param_3[5] = uVar6;
        if (0x3b < uVar6) {
          return 7;
        }
        if (local_5c == 'Z') {
          return 0;
        }
        if (local_5c != '+') {
          if (local_5c != '-') {
            return 7;
          }
          uVar5 = 1;
        }
        param_3[6] = uVar5;
        iVar2 = FUN_1401f6220(local_5b);
        iVar2 = iVar2 * 5;
        iVar3 = FUN_1401f6220(local_5a);
        uVar6 = iVar3 + iVar2 * 2;
        param_3[7] = uVar6;
        if (0x17 < uVar6) {
          return 7;
        }
        iVar2 = FUN_1401f6220(local_59);
        goto LAB_1401f64d8;
      }
      uVar6 = 1;
    }
    param_3[6] = uVar6;
    iVar2 = FUN_1401f6220(local_5d);
    iVar2 = iVar2 * 5;
    iVar3 = FUN_1401f6220(local_5c);
    uVar6 = iVar3 + iVar2 * 2;
    param_3[7] = uVar6;
    if (uVar6 < 0x18) {
      iVar2 = FUN_1401f6220(local_5b);
      local_58 = local_5a;
LAB_1401f64d8:
      iVar2 = iVar2 * 5;
      iVar3 = FUN_1401f6220(local_58);
      uVar6 = iVar3 + iVar2 * 2;
      param_3[8] = uVar6;
      if (0x3b < uVar6) {
        return 7;
      }
      return 0;
    }
  }
  return 7;
}



undefined8 FUN_1401f6580(ushort param_1)

{
  if (param_1 < 0x80) {
    return 1;
  }
  if (param_1 < 0x800) {
    return 2;
  }
  return 3;
}



undefined8 FUN_1401f65b0(ushort *param_1,uint param_2,int *param_3)

{
  ushort uVar1;
  uint uVar2;
  int iVar3;
  uint uVar4;
  
  if ((param_1 == (ushort *)0x0) || (param_3 == (int *)0x0)) {
    return 0x10;
  }
  uVar2 = 0;
  uVar4 = 0;
  if (param_2 != 0) {
    do {
      uVar1 = *param_1;
      if (0x10ffff < uVar1) {
        return 0x10;
      }
      if (uVar1 < 0x80) {
        iVar3 = 1;
      }
      else if (uVar1 < 0x800) {
        iVar3 = 2;
      }
      else {
        iVar3 = 3;
      }
      uVar4 = uVar4 + 1;
      uVar2 = uVar2 + iVar3;
      param_1 = param_1 + 1;
    } while (uVar4 < param_2);
    if (0x7f < uVar2) {
      if (uVar2 < 0x100) {
        *param_3 = uVar2 + 3;
        return 0;
      }
      if (0xffff < uVar2) {
        if (0xffffff < uVar2) {
          return 0x10;
        }
        *param_3 = uVar2 + 5;
        return 0;
      }
      *param_3 = uVar2 + 4;
      return 0;
    }
  }
  *param_3 = uVar2 + 2;
  return 0;
}



undefined8 FUN_1401f66c0(byte *param_1,uint param_2,ushort *param_3,uint *param_4)

{
  byte bVar1;
  undefined8 uVar2;
  uint uVar3;
  ushort uVar4;
  uint uVar5;
  byte *pbVar6;
  longlong lVar7;
  uint uVar8;
  
  if (((param_1 == (byte *)0x0) || (param_3 == (ushort *)0x0)) || (param_4 == (uint *)0x0)) {
    return 0x10;
  }
  if ((1 < param_2) && ((*param_1 & 0x1f) == 0xc)) {
    bVar1 = param_1[1];
    if ((char)bVar1 < '\0') {
      uVar5 = bVar1 & 0x7f;
      if ((bVar1 & 0x7f) == 0) {
        return 7;
      }
      if (3 < uVar5) {
        return 7;
      }
      if (param_2 < uVar5 + 1) {
        return 7;
      }
      uVar3 = 0;
      pbVar6 = param_1 + 2;
      uVar8 = uVar5 + 2;
      do {
        bVar1 = *pbVar6;
        pbVar6 = pbVar6 + 1;
        uVar3 = uVar3 << 8 | (uint)bVar1;
        uVar5 = uVar5 - 1;
      } while (uVar5 != 0);
    }
    else {
      uVar8 = 2;
      uVar3 = bVar1 & 0x7f;
    }
    if (uVar3 + uVar8 <= param_2) {
      uVar3 = 0;
      lVar7 = (longlong)(int)uVar8;
      do {
        if (param_2 <= uVar8) {
          uVar2 = 0;
LAB_1401f6813:
          *param_4 = uVar3;
          return uVar2;
        }
        uVar4 = (ushort)param_1[lVar7];
        uVar8 = uVar8 + 1;
        uVar5 = 0;
        if ((char)param_1[lVar7] < '\0') {
          do {
            if (4 < uVar5) {
              return 7;
            }
            uVar5 = uVar5 + 1;
            uVar4 = (uVar4 & 0x7f) * 2;
          } while ((char)uVar4 < '\0');
          if (4 < uVar5) {
            return 7;
          }
        }
        if (param_2 < (uVar5 - 1) + uVar8) {
          return 7;
        }
        uVar4 = uVar4 >> ((byte)uVar5 & 0x1f);
        if (1 < uVar5) {
          uVar5 = uVar5 - 1;
        }
        while (lVar7 = lVar7 + 1, uVar5 != 0) {
          uVar5 = uVar5 - 1;
          if ((param_1[lVar7] & 0xc0) != 0x80) {
            return 7;
          }
          uVar8 = uVar8 + 1;
          uVar4 = uVar4 << 6 | (ushort)(param_1[lVar7] & 0x3f);
        }
        if (*param_4 < uVar3) {
          uVar2 = 6;
          goto LAB_1401f6813;
        }
        *param_3 = uVar4;
        param_3 = param_3 + 1;
        uVar3 = uVar3 + 1;
      } while( true );
    }
  }
  return 7;
}



undefined4 FUN_1401f6850(int param_1)

{
  int *piVar1;
  int iVar2;
  
  iVar2 = 0;
  piVar1 = &DAT_14027e1e0;
  do {
    if (*piVar1 == param_1) {
      return (&DAT_14027e1e4)[(longlong)iVar2 * 2];
    }
    piVar1 = piVar1 + 2;
    iVar2 = iVar2 + 1;
  } while ((longlong)piVar1 < 0x14027e430);
  return 0xffffffff;
}



undefined4 FUN_1401f6880(int param_1)

{
  int *piVar1;
  int iVar2;
  
  iVar2 = 0;
  piVar1 = &DAT_14027e1e4;
  do {
    if (*piVar1 == param_1) {
      return (&DAT_14027e1e0)[(longlong)iVar2 * 2];
    }
    piVar1 = piVar1 + 2;
    iVar2 = iVar2 + 1;
  } while ((longlong)piVar1 < 0x14027e434);
  return 0xffffffff;
}



undefined8 FUN_1401f68c0(byte *param_1,uint param_2,int *param_3)

{
  longlong lVar1;
  uint uVar2;
  
  if ((param_3 != (int *)0x0) && (param_1 != (byte *)0x0)) {
    uVar2 = 0;
    if (param_2 != 0) {
      do {
        lVar1 = 0;
        while ((&DAT_14027e1e0)[lVar1 * 2] != (uint)*param_1) {
          lVar1 = lVar1 + 1;
          if (0x49 < lVar1) {
            return 0x10;
          }
        }
        if ((&DAT_14027e1e4)[lVar1 * 2] == -1) {
          return 0x10;
        }
        uVar2 = uVar2 + 1;
        param_1 = param_1 + 1;
      } while (uVar2 < param_2);
    }
    if (param_2 < 0x80) {
      *param_3 = param_2 + 2;
      return 0;
    }
    if (param_2 < 0x100) {
      *param_3 = param_2 + 3;
      return 0;
    }
    if (param_2 < 0x10000) {
      *param_3 = param_2 + 4;
      return 0;
    }
    if (param_2 < 0x1000000) {
      *param_3 = param_2 + 5;
      return 0;
    }
  }
  return 0x10;
}



undefined8 FUN_1401f6960(byte *param_1,uint param_2,undefined1 *param_3,uint *param_4)

{
  byte bVar1;
  int iVar2;
  uint uVar3;
  byte *pbVar4;
  uint uVar5;
  uint uVar6;
  
  if (((param_1 == (byte *)0x0) || (param_3 == (undefined1 *)0x0)) || (param_4 == (uint *)0x0)) {
    return 0x10;
  }
  if ((param_2 < 2) || ((*param_1 & 0x1f) != 0x13)) {
    return 7;
  }
  bVar1 = param_1[1];
  uVar5 = 0;
  if ((char)bVar1 < '\0') {
    uVar3 = bVar1 & 0x7f;
    if ((bVar1 & 0x7f) == 0) {
      return 7;
    }
    if (3 < uVar3) {
      return 7;
    }
    if (param_2 < uVar3 + 1) {
      return 7;
    }
    uVar6 = 0;
    pbVar4 = param_1 + 2;
    iVar2 = uVar3 + 2;
    do {
      bVar1 = *pbVar4;
      pbVar4 = pbVar4 + 1;
      uVar6 = uVar6 << 8 | (uint)bVar1;
      uVar3 = uVar3 - 1;
    } while (uVar3 != 0);
  }
  else {
    iVar2 = 2;
    uVar6 = bVar1 & 0x7f;
  }
  if (*param_4 < uVar6) {
    *param_4 = uVar6;
    return 6;
  }
  if (param_2 < uVar6 + iVar2) {
    return 7;
  }
  if (uVar6 != 0) {
    param_1 = param_1 + iVar2;
    do {
      iVar2 = FUN_1401f6880(*param_1);
      param_1 = param_1 + 1;
      if (iVar2 == -1) {
        return 0x10;
      }
      uVar5 = uVar5 + 1;
      *param_3 = (char)iVar2;
      param_3 = param_3 + 1;
    } while (uVar5 < uVar6);
  }
  *param_4 = uVar5;
  return 0;
}



undefined4 FUN_1401f6a90(int param_1)

{
  int *piVar1;
  int iVar2;
  
  iVar2 = 0;
  piVar1 = &DAT_14027e430;
  do {
    if (*piVar1 == param_1) {
      return (&DAT_14027e434)[(longlong)iVar2 * 2];
    }
    piVar1 = piVar1 + 2;
    iVar2 = iVar2 + 1;
  } while ((longlong)piVar1 < 0x14027e760);
  return 0xffffffff;
}



undefined4 FUN_1401f6ac0(int param_1)

{
  int *piVar1;
  int iVar2;
  
  iVar2 = 0;
  piVar1 = &DAT_14027e434;
  do {
    if (*piVar1 == param_1) {
      return (&DAT_14027e430)[(longlong)iVar2 * 2];
    }
    piVar1 = piVar1 + 2;
    iVar2 = iVar2 + 1;
  } while ((longlong)piVar1 < 0x14027e764);
  return 0xffffffff;
}



undefined8 FUN_1401f6b00(byte *param_1,uint param_2,int *param_3)

{
  longlong lVar1;
  uint uVar2;
  
  if ((param_3 != (int *)0x0) && (param_1 != (byte *)0x0)) {
    uVar2 = 0;
    if (param_2 != 0) {
      do {
        lVar1 = 0;
        while ((&DAT_14027e430)[lVar1 * 2] != (uint)*param_1) {
          lVar1 = lVar1 + 1;
          if (0x65 < lVar1) {
            return 0x10;
          }
        }
        if ((&DAT_14027e434)[lVar1 * 2] == -1) {
          return 0x10;
        }
        uVar2 = uVar2 + 1;
        param_1 = param_1 + 1;
      } while (uVar2 < param_2);
    }
    if (param_2 < 0x80) {
      *param_3 = param_2 + 2;
      return 0;
    }
    if (param_2 < 0x100) {
      *param_3 = param_2 + 3;
      return 0;
    }
    if (param_2 < 0x10000) {
      *param_3 = param_2 + 4;
      return 0;
    }
    if (param_2 < 0x1000000) {
      *param_3 = param_2 + 5;
      return 0;
    }
  }
  return 0x10;
}



undefined8 FUN_1401f6ba0(byte *param_1,uint param_2,undefined1 *param_3,uint *param_4)

{
  byte bVar1;
  int iVar2;
  uint uVar3;
  byte *pbVar4;
  uint uVar5;
  uint uVar6;
  
  if (((param_1 == (byte *)0x0) || (param_3 == (undefined1 *)0x0)) || (param_4 == (uint *)0x0)) {
    return 0x10;
  }
  if ((param_2 < 2) || ((*param_1 & 0x1f) != 0x16)) {
    return 7;
  }
  bVar1 = param_1[1];
  uVar5 = 0;
  if ((char)bVar1 < '\0') {
    uVar3 = bVar1 & 0x7f;
    if ((bVar1 & 0x7f) == 0) {
      return 7;
    }
    if (3 < uVar3) {
      return 7;
    }
    if (param_2 < uVar3 + 1) {
      return 7;
    }
    uVar6 = 0;
    pbVar4 = param_1 + 2;
    iVar2 = uVar3 + 2;
    do {
      bVar1 = *pbVar4;
      pbVar4 = pbVar4 + 1;
      uVar6 = uVar6 << 8 | (uint)bVar1;
      uVar3 = uVar3 - 1;
    } while (uVar3 != 0);
  }
  else {
    iVar2 = 2;
    uVar6 = bVar1 & 0x7f;
  }
  if (*param_4 < uVar6) {
    *param_4 = uVar6;
    return 6;
  }
  if (param_2 < uVar6 + iVar2) {
    return 7;
  }
  if (uVar6 != 0) {
    param_1 = param_1 + iVar2;
    do {
      iVar2 = FUN_1401f6ac0(*param_1);
      param_1 = param_1 + 1;
      if (iVar2 == -1) {
        return 0x10;
      }
      uVar5 = uVar5 + 1;
      *param_3 = (char)iVar2;
      param_3 = param_3 + 1;
    } while (uVar5 < uVar6);
  }
  *param_4 = uVar5;
  return 0;
}



int FUN_1401f6cd0(uint param_1)

{
  int iVar1;
  
  iVar1 = 0;
  for (; param_1 != 0; param_1 = param_1 >> 1) {
    iVar1 = iVar1 + 1;
  }
  return iVar1;
}



undefined8 FUN_1401f6ce0(uint *param_1,uint param_2,int *param_3)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  uint uVar5;
  
  if ((((param_1 == (uint *)0x0) || (param_3 == (int *)0x0)) || (param_2 < 2)) ||
     ((uVar3 = *param_1, 3 < uVar3 || ((uVar3 < 2 && (0x27 < param_1[1])))))) {
    return 0x10;
  }
  uVar5 = 1;
  uVar4 = 0;
  uVar3 = param_1[1] + uVar3 * 0x28;
  if (1 < param_2) {
    param_1 = param_1 + 2;
    do {
      uVar2 = 0;
      for (uVar1 = uVar3; uVar1 != 0; uVar1 = uVar1 >> 1) {
        uVar2 = uVar2 + 1;
      }
      uVar4 = uVar4 + (uint)(uVar3 == 0) + (uint)(uVar2 != (uVar2 / 7) * 7) + uVar2 / 7;
      if (uVar5 < param_2 - 1) {
        uVar3 = *param_1;
      }
      uVar5 = uVar5 + 1;
      param_1 = param_1 + 1;
    } while (uVar5 < param_2);
    if (0x7f < uVar4) {
      if (uVar4 < 0x100) {
        *param_3 = uVar4 + 3;
        return 0;
      }
      if (0xffff < uVar4) {
        return 0x10;
      }
      *param_3 = uVar4 + 4;
      return 0;
    }
  }
  *param_3 = uVar4 + 2;
  return 0;
}



undefined8 FUN_1401f6e10(byte *param_1,uint param_2,uint *param_3,uint *param_4)

{
  byte bVar1;
  byte *pbVar2;
  uint uVar3;
  uint uVar4;
  uint uVar5;
  int iVar6;
  longlong lVar7;
  
  if (((param_1 == (byte *)0x0) || (param_3 == (uint *)0x0)) || (param_4 == (uint *)0x0)) {
    return 0x10;
  }
  if (2 < param_2) {
    if (*param_4 < 2) {
      return 6;
    }
    if ((*param_1 & 0x1f) == 6) {
      bVar1 = param_1[1];
      if (bVar1 < 0x80) {
        uVar4 = (uint)bVar1;
        iVar6 = 2;
      }
      else {
        if (bVar1 < 0x81) {
          return 7;
        }
        if (0x82 < bVar1) {
          return 7;
        }
        uVar4 = 0;
        uVar3 = bVar1 & 0x7f;
        if ((bVar1 & 0x7f) == 0) {
          return 7;
        }
        pbVar2 = param_1 + 2;
        iVar6 = uVar3 + 2;
        do {
          bVar1 = *pbVar2;
          pbVar2 = pbVar2 + 1;
          uVar4 = uVar4 << 8 | (uint)bVar1;
          uVar3 = uVar3 - 1;
        } while (uVar3 != 0);
      }
      if ((uVar4 != 0) && (uVar4 + iVar6 <= param_2)) {
        uVar3 = 0;
        uVar5 = 0;
        lVar7 = 0;
        if (uVar4 != 0) {
          param_1 = param_1 + iVar6;
          do {
            bVar1 = *param_1;
            uVar4 = uVar4 - 1;
            param_1 = param_1 + 1;
            uVar5 = bVar1 & 0x7f | uVar5 << 7;
            if ((bVar1 & 0x80) == 0) {
              if (*param_4 <= uVar3) {
                return 6;
              }
              if (uVar3 == 0) {
                uVar3 = 2;
                lVar7 = 2;
                *param_3 = uVar5 / 0x28;
                param_3[1] = uVar5 % 0x28;
              }
              else {
                param_3[lVar7] = uVar5;
                uVar3 = uVar3 + 1;
                lVar7 = lVar7 + 1;
              }
              uVar5 = 0;
            }
          } while (uVar4 != 0);
        }
        *param_4 = uVar3;
        return 0;
      }
    }
  }
  return 7;
}



undefined8 FUN_1401f6f90(uint param_1,int *param_2)

{
  if (param_2 != (int *)0x0) {
    if (param_1 < 0x80) {
      *param_2 = param_1 + 2;
      return 0;
    }
    if (param_1 < 0x100) {
      *param_2 = param_1 + 3;
      return 0;
    }
    if (param_1 < 0x10000) {
      *param_2 = param_1 + 4;
      return 0;
    }
    if (param_1 < 0x1000000) {
      *param_2 = param_1 + 5;
      return 0;
    }
  }
  return 0x10;
}



undefined8 FUN_1401f6fe0(byte *param_1,uint param_2,byte *param_3,uint *param_4)

{
  byte bVar1;
  ulonglong uVar2;
  uint uVar3;
  uint uVar4;
  int iVar5;
  byte *pbVar6;
  
  if (((param_1 == (byte *)0x0) || (param_3 == (byte *)0x0)) || (param_4 == (uint *)0x0)) {
    return 0x10;
  }
  if ((param_2 < 2) || ((*param_1 & 0x1f) != 4)) {
    return 7;
  }
  bVar1 = param_1[1];
  uVar2 = 0;
  if ((char)bVar1 < '\0') {
    uVar3 = bVar1 & 0x7f;
    if ((bVar1 & 0x7f) == 0) {
      return 7;
    }
    if (3 < uVar3) {
      return 7;
    }
    if (param_2 < uVar3 + 1) {
      return 7;
    }
    pbVar6 = param_1 + 2;
    iVar5 = uVar3 + 2;
    do {
      bVar1 = *pbVar6;
      pbVar6 = pbVar6 + 1;
      uVar2 = (ulonglong)((int)uVar2 << 8 | (uint)bVar1);
      uVar3 = uVar3 - 1;
    } while (uVar3 != 0);
  }
  else {
    iVar5 = 2;
    uVar2 = (ulonglong)(bVar1 & 0x7f);
  }
  uVar3 = (uint)uVar2;
  if (*param_4 < uVar3) {
    *param_4 = uVar3;
    return 6;
  }
  if (param_2 < uVar3 + iVar5) {
    return 7;
  }
  uVar4 = 0;
  if (uVar3 != 0) {
    pbVar6 = param_3;
    do {
      uVar2 = uVar2 - 1;
      *pbVar6 = (param_1 + ((longlong)iVar5 - (longlong)param_3))[(longlong)pbVar6];
      pbVar6 = pbVar6 + 1;
      uVar4 = uVar3;
    } while (uVar2 != 0);
  }
  *param_4 = uVar4;
  return 0;
}



undefined8 FUN_1401f70e0(ulonglong param_1,int *param_2)

{
  uint uVar1;
  
  if (param_2 != (int *)0x0) {
    uVar1 = ((param_1 & 7) != 0) + 1 + ((uint)(param_1 >> 3) & 0x1fffffff);
    if (uVar1 < 0x80) {
      *param_2 = uVar1 + 2;
      return 0;
    }
    if (uVar1 < 0x100) {
      *param_2 = uVar1 + 3;
      return 0;
    }
    if (uVar1 < 0x10000) {
      *param_2 = uVar1 + 4;
      return 0;
    }
  }
  return 0x10;
}



undefined8 FUN_1401f7130(byte *param_1,uint param_2,longlong param_3,uint *param_4)

{
  byte bVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  byte *pbVar5;
  uint uVar6;
  
  if ((((param_1 == (byte *)0x0) || (param_3 == 0)) || (param_4 == (uint *)0x0)) || (param_2 < 4)) {
    return 0x10;
  }
  if ((*param_1 & 0x1f) == 3) {
    bVar1 = param_1[1];
    uVar4 = 0;
    if ((char)bVar1 < '\0') {
      uVar2 = bVar1 & 0x7f;
      if ((bVar1 & 0x7f) == 0) {
        return 7;
      }
      if (2 < uVar2) {
        return 7;
      }
      uVar3 = 0;
      pbVar5 = param_1 + 2;
      uVar6 = uVar2 + 2;
      do {
        bVar1 = *pbVar5;
        pbVar5 = pbVar5 + 1;
        uVar3 = uVar3 << 8 | (uint)bVar1;
        uVar2 = uVar2 - 1;
      } while (uVar2 != 0);
    }
    else {
      uVar6 = 2;
      uVar3 = bVar1 & 0x7f;
    }
    if ((uVar3 != 0) && (uVar3 + uVar6 <= param_2)) {
      uVar3 = (uVar3 * 8 + -8) - (param_1[uVar6] & 7);
      if (*param_4 < uVar3) {
        *param_4 = uVar3;
        return 6;
      }
      if (uVar3 != 0) {
        param_1 = param_1 + (int)(uVar6 + 1);
        do {
          *(bool *)param_3 = (*param_1 & (byte)(1 << (7U - (char)(uVar4 & 7) & 0x1f))) != 0;
          if ((uVar4 & 7) == 7) {
            param_1 = param_1 + 1;
          }
          uVar4 = uVar4 + 1;
          param_3 = param_3 + 1;
        } while (uVar4 < uVar3);
      }
      *param_4 = uVar3;
      return 0;
    }
  }
  return 7;
}



undefined4 FUN_1401f7290(uint param_1,int *param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  int iVar3;
  
  if (param_2 == (int *)0x0) {
    return 0x10;
  }
  iVar3 = 0;
  uVar2 = (ulonglong)param_1;
  if (param_1 != 0) {
    do {
      iVar3 = iVar3 + 1;
      uVar1 = uVar2 >> 8;
      uVar2 = uVar2 >> 8;
    } while ((int)uVar1 != 0);
    if (iVar3 != 0) goto LAB_1401f72c2;
  }
  iVar3 = 1;
LAB_1401f72c2:
  *param_2 = ((param_1 >> (iVar3 * 8 - 1U & 0x1f) & 1) != 0) + 2 + iVar3;
  return 0;
}



undefined8 FUN_1401f72e0(byte *param_1,uint param_2,uint *param_3)

{
  byte bVar1;
  uint uVar2;
  uint uVar3;
  
  if ((param_3 != (uint *)0x0) && (param_1 != (byte *)0x0)) {
    if ((1 < param_2) && ((*param_1 & 0x1f) == 2)) {
      bVar1 = param_1[1];
      uVar3 = (uint)bVar1;
      if (bVar1 + 2 <= param_2) {
        uVar2 = 0;
        if (bVar1 != 0) {
          param_1 = param_1 + 2;
          do {
            bVar1 = *param_1;
            param_1 = param_1 + 1;
            uVar2 = uVar2 << 8 | (uint)bVar1;
            uVar3 = uVar3 - 1;
          } while (uVar3 != 0);
        }
        *param_3 = uVar2;
        return 0;
      }
    }
    return 7;
  }
  return 0x10;
}



undefined8 FUN_1401f7340(longlong param_1,int *param_2)

{
  int iVar1;
  uint uVar2;
  int iVar3;
  ulonglong uVar4;
  
  if ((param_1 != 0) && (param_2 != (int *)0x0)) {
    iVar1 = (*DAT_1403793a0)(param_1,0);
    if (iVar1 == -1) {
      uVar2 = (*DAT_1403793a8)(param_1);
      uVar2 = (8 - (uVar2 & 7)) + uVar2;
      iVar1 = (*DAT_1403793b0)(param_1);
      iVar3 = (*DAT_1403793a8)(param_1);
      if ((iVar1 + 1 == iVar3) && (uVar4 = (*DAT_1403793a8)(param_1), (uVar4 & 7) == 0)) {
        uVar2 = uVar2 - 1;
      }
      uVar2 = uVar2 >> 3;
    }
    else {
      uVar4 = (*DAT_1403793a8)();
      if (((uVar4 & 7) == 0) || (iVar1 = (*DAT_1403793a0)(param_1,0), iVar1 == 0)) {
        iVar1 = (*DAT_1403793d0)(param_1);
        uVar2 = iVar1 + 1;
      }
      else {
        uVar2 = (*DAT_1403793d0)(param_1);
      }
    }
    iVar1 = uVar2 + 1;
    if (0x7f < uVar2) {
      for (; uVar2 != 0; uVar2 = uVar2 >> 8) {
        iVar1 = iVar1 + 1;
      }
    }
    *param_2 = iVar1 + 1;
    return 0;
  }
  return 0x10;
}



undefined8 FUN_1401f7440(byte *param_1,uint param_2,longlong param_3)

{
  uint uVar1;
  byte bVar2;
  int iVar3;
  undefined4 uVar4;
  undefined8 uVar5;
  uint uVar6;
  ulonglong uVar7;
  uint uVar8;
  byte *pbVar9;
  undefined8 local_res18 [2];
  
  if ((param_3 == 0) || (param_1 == (byte *)0x0)) {
    return 0x10;
  }
  if ((param_2 < 3) || ((*param_1 & 0x1f) != 2)) {
    return 7;
  }
  bVar2 = param_1[1];
  uVar7 = 2;
  if ((char)bVar2 < '\0') {
    uVar6 = bVar2 & 0x7f;
    if (((uVar6 + 2 <= param_2) && (uVar6 < 5)) && ((bVar2 & 0x7f) != 0)) {
      uVar8 = 0;
      pbVar9 = param_1 + 2;
      uVar1 = uVar6 + 2;
      uVar7 = (ulonglong)uVar1;
      do {
        bVar2 = *pbVar9;
        pbVar9 = pbVar9 + 1;
        uVar8 = uVar8 << 8 | (uint)bVar2;
        uVar6 = uVar6 - 1;
      } while (uVar6 != 0);
      if (uVar8 + uVar1 <= param_2) {
        uVar5 = (*DAT_1403793e0)(param_3,param_1 + uVar7);
        if ((int)uVar5 != 0) {
          return uVar5;
        }
        goto LAB_1401f7534;
      }
    }
  }
  else if (bVar2 + 2 <= param_2) {
    uVar5 = (*DAT_1403793e0)(param_3,param_1 + 2,(uint)bVar2);
    if ((int)uVar5 != 0) {
      return uVar5;
    }
LAB_1401f7534:
    if ((param_1[uVar7] & 0x80) == 0) {
      return 0;
    }
    iVar3 = (*DAT_140379350)(local_res18);
    if (iVar3 == 0) {
      uVar4 = (*DAT_1403793a8)(param_3);
      iVar3 = (*DAT_1403793b8)(local_res18[0],uVar4);
      if ((iVar3 == 0) && (iVar3 = (*DAT_1403793f8)(param_3,local_res18[0],param_3), iVar3 == 0)) {
        (*DAT_140379360)(local_res18[0]);
        return 0;
      }
      (*DAT_140379360)(local_res18[0]);
    }
    return 0xd;
  }
  return 7;
}



undefined8 FUN_1401f75d0(undefined4 *param_1)

{
  if (param_1 == (undefined4 *)0x0) {
    return 0x10;
  }
  *param_1 = 3;
  return 0;
}



undefined8 FUN_1401f75f0(char *param_1,int param_2,uint *param_3)

{
  char cVar1;
  
  if ((((param_1 != (char *)0x0) && (param_3 != (uint *)0x0)) && (param_2 == 3)) &&
     (((*param_1 == '\x01' && (param_1[1] == '\x01')) &&
      ((cVar1 = param_1[2], cVar1 == '\0' || (cVar1 == -1)))))) {
    *param_3 = (uint)(cVar1 == -1);
    return 0;
  }
  return 0x10;
}



undefined8 FUN_1401f7630(longlong param_1,uint param_2,char *param_3,uint *param_4,int param_5)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 *puVar3;
  undefined8 uVar4;
  ulonglong uVar5;
  uint uVar6;
  uint uVar7;
  undefined8 *puVar8;
  uint local_28;
  uint local_24;
  uint local_20;
  
  if (((param_1 == 0) || (param_3 == (char *)0x0)) || (param_4 == (uint *)0x0)) {
    return 0x10;
  }
  uVar6 = 0;
  local_20 = 0;
  if (param_2 != 0) {
    puVar8 = (undefined8 *)(param_1 + 8);
    do {
      uVar1 = *(undefined4 *)(puVar8 + 1);
      puVar3 = (undefined4 *)*puVar8;
      if (*(int *)(puVar8 + -1) == 0) break;
      switch(*(int *)(puVar8 + -1)) {
      case 1:
        uVar4 = FUN_1401f75d0(&local_28);
        break;
      case 2:
        uVar4 = FUN_1401f7340(puVar3,&local_28);
        break;
      case 3:
        uVar4 = FUN_1401f7290(*puVar3,&local_28);
        break;
      case 4:
        uVar4 = FUN_1401f70e0(uVar1,&local_28);
        break;
      case 5:
        uVar4 = FUN_1401f6f90(uVar1,&local_28);
        break;
      case 6:
        uVar6 = uVar6 + 2;
        goto LAB_1401f777f;
      case 7:
        uVar4 = FUN_1401f6ce0(puVar3,uVar1,&local_28);
        break;
      case 8:
        uVar4 = FUN_1401f6b00(puVar3,uVar1,&local_28);
        break;
      case 9:
        uVar4 = FUN_1401f68c0(puVar3,uVar1,&local_28);
        break;
      case 10:
        uVar4 = FUN_1401f65b0(puVar3,uVar1,&local_28);
        break;
      case 0xb:
        uVar4 = FUN_1401f85b0(puVar3,&local_28);
        break;
      default:
        goto LAB_1401f7aa7;
      case 0xd:
      case 0xe:
      case 0xf:
        uVar4 = FUN_1401f6030(puVar3,uVar1,&local_28);
      }
      if ((int)uVar4 != 0) {
        return uVar4;
      }
      uVar6 = uVar6 + local_28;
LAB_1401f777f:
      puVar8 = puVar8 + 7;
      local_20 = local_20 + 1;
    } while (local_20 < param_2);
  }
  if (uVar6 < 0x80) {
    uVar7 = uVar6 + 2;
  }
  else if (uVar6 < 0x100) {
    uVar7 = uVar6 + 3;
  }
  else if (uVar6 < 0x10000) {
    uVar7 = uVar6 + 4;
  }
  else {
    if (0xffffff < uVar6) {
LAB_1401f7aa7:
      return 0x10;
    }
    uVar7 = uVar6 + 5;
  }
  if (*param_4 < uVar7) {
    *param_4 = uVar7;
    return 6;
  }
  *param_3 = (param_5 != 0xd) + '0';
  uVar7 = 1;
  uVar5 = 1;
  local_28 = 1;
  if (uVar6 < 0x80) {
    param_3[1] = (char)uVar6;
    local_28 = uVar7;
  }
  else {
    if (uVar6 < 0x100) {
      param_3[1] = -0x7f;
      local_28 = uVar7;
    }
    else {
      if (uVar6 < 0x10000) {
        param_3[1] = -0x7e;
        local_28 = uVar7;
      }
      else {
        if (0xffffff < uVar6) goto LAB_1401f7884;
        param_3[1] = -0x7d;
        local_28 = 2;
        param_3[2] = (char)(uVar6 >> 0x10);
      }
      local_28 = local_28 + 1;
      param_3[local_28] = (char)(uVar6 >> 8);
    }
    local_28 = local_28 + 1;
    param_3[local_28] = (char)uVar6;
  }
  local_28 = local_28 + 1;
  uVar5 = (ulonglong)local_28;
LAB_1401f7884:
  *param_4 = *param_4 - (int)uVar5;
  uVar6 = 0;
  if (param_2 != 0) {
    puVar8 = (undefined8 *)(param_1 + 8);
    do {
      iVar2 = *(int *)(puVar8 + -1);
      uVar1 = *(undefined4 *)(puVar8 + 1);
      puVar3 = (undefined4 *)*puVar8;
      if (iVar2 == 0) break;
      switch(iVar2) {
      case 1:
        local_24 = *param_4;
        uVar4 = FUN_1401f9b10(*puVar3,param_3 + uVar5,&local_24);
        break;
      case 2:
        local_24 = *param_4;
        uVar4 = FUN_1401f9870(puVar3,param_3 + uVar5,&local_24);
        break;
      case 3:
        local_24 = *param_4;
        uVar4 = FUN_1401f9750(*puVar3,param_3 + uVar5,&local_24);
        break;
      case 4:
        local_24 = *param_4;
        uVar4 = FUN_1401f95e0(puVar3,uVar1,param_3 + uVar5,&local_24);
        break;
      case 5:
        local_24 = *param_4;
        uVar4 = FUN_1401f94b0(puVar3,uVar1,param_3 + uVar5,&local_24);
        break;
      case 6:
        param_3[uVar5] = '\x05';
        param_3[local_28 + 1] = '\0';
        local_28 = local_28 + 2;
        *param_4 = *param_4 - 2;
        goto LAB_1401f7a79;
      case 7:
        local_24 = *param_4;
        uVar4 = FUN_1401f9250(puVar3,uVar1,param_3 + uVar5,&local_24);
        break;
      case 8:
        local_24 = *param_4;
        uVar4 = FUN_1401f9120(puVar3,uVar1,param_3 + uVar5,&local_24);
        break;
      case 9:
        local_24 = *param_4;
        uVar4 = FUN_1401f8ff0(puVar3,uVar1,param_3 + uVar5,&local_24);
        break;
      case 10:
        local_24 = *param_4;
        uVar4 = FUN_1401f8df0(puVar3,uVar1,param_3 + uVar5,&local_24);
        break;
      case 0xb:
        local_24 = *param_4;
        uVar4 = FUN_1401f8a60(puVar3,param_3 + uVar5,&local_24);
        break;
      default:
        goto LAB_1401f7aa7;
      case 0xd:
        local_24 = *param_4;
        uVar4 = FUN_1401f7630(puVar3,uVar1,param_3 + uVar5,&local_24,iVar2);
        break;
      case 0xe:
        local_24 = *param_4;
        uVar4 = FUN_1401f8960(puVar3,uVar1,param_3 + uVar5,&local_24);
        break;
      case 0xf:
        local_24 = *param_4;
        uVar4 = FUN_1401f8670(puVar3,uVar1,param_3 + uVar5,&local_24);
      }
      if ((int)uVar4 != 0) {
        return uVar4;
      }
      local_28 = local_28 + local_24;
      *param_4 = *param_4 - local_24;
LAB_1401f7a79:
      uVar5 = (ulonglong)local_28;
      puVar8 = puVar8 + 7;
      uVar6 = uVar6 + 1;
    } while (uVar6 < param_2);
  }
  *param_4 = (uint)uVar5;
  return 0;
}



ulonglong FUN_1401f7b30(int param_1,longlong param_2,undefined4 param_3,undefined1 *param_4,
                       int param_5)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  ulonglong uVar4;
  undefined1 *_Memory;
  undefined1 *_Memory_00;
  longlong lVar5;
  undefined1 *puVar6;
  longlong lVar7;
  int iVar8;
  
  if ((param_2 == 0) || (param_4 == (undefined1 *)0x0)) {
    return 0x10;
  }
  uVar4 = FUN_1401efb80(param_1);
  if ((int)uVar4 != 0) {
    return uVar4;
  }
  lVar7 = (longlong)param_1 * 0x80;
  uVar1 = *(uint *)(&DAT_14032bd1c + lVar7);
  _Memory = malloc(0x70);
  _Memory_00 = malloc((ulonglong)uVar1);
  if (_Memory == (undefined1 *)0x0) {
    _Memory = _Memory_00;
    if (_Memory_00 == (undefined1 *)0x0) {
      return 0xd;
    }
  }
  else if (_Memory_00 != (undefined1 *)0x0) {
    iVar2 = 0;
    while (param_5 != 0) {
      _Memory_00[3] = (char)iVar2;
      *_Memory_00 = (char)((uint)iVar2 >> 0x18);
      _Memory_00[1] = (char)((uint)iVar2 >> 0x10);
      iVar8 = iVar2 + 1;
      _Memory_00[2] = (char)((uint)iVar2 >> 8);
      uVar3 = (**(code **)(lVar7 + 0x14032bd68))(_Memory);
      uVar4 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401f7c9c;
      uVar3 = (**(code **)(lVar7 + 0x14032bd70))(_Memory,param_2,param_3);
      uVar4 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401f7c9c;
      uVar3 = (**(code **)(lVar7 + 0x14032bd70))(_Memory,_Memory_00,4);
      uVar4 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401f7c9c;
      uVar3 = (**(code **)(lVar7 + 0x14032bd78))(_Memory,_Memory_00);
      uVar4 = (ulonglong)uVar3;
      if (uVar3 != 0) goto LAB_1401f7c9c;
      uVar3 = 0;
      iVar2 = iVar8;
      if (uVar1 != 0) {
        lVar5 = (longlong)_Memory_00 - (longlong)param_4;
        puVar6 = param_4;
        do {
          if (param_5 == 0) goto LAB_1401f7c9a;
          uVar3 = uVar3 + 1;
          param_4 = puVar6 + 1;
          *puVar6 = puVar6[lVar5];
          param_5 = param_5 + -1;
          puVar6 = param_4;
        } while (uVar3 < uVar1);
      }
    }
LAB_1401f7c9a:
    uVar4 = 0;
LAB_1401f7c9c:
    free(_Memory_00);
    free(_Memory);
    return uVar4;
  }
  free(_Memory);
  return 0xd;
}



ulonglong FUN_1401f7cf0(int param_1,longlong param_2,undefined4 param_3,longlong param_4,
                       uint *param_5)

{
  uint uVar1;
  ulonglong uVar2;
  void *_Memory;
  longlong lVar3;
  
  if ((param_2 != 0) && (param_4 != 0)) {
    if (param_5 != (uint *)0x0) {
      uVar2 = FUN_1401efb80(param_1);
      if ((int)uVar2 == 0) {
        lVar3 = (longlong)param_1 * 0x80;
        if (*param_5 < *(uint *)(&DAT_14032bd1c + lVar3)) {
          *param_5 = *(uint *)(&DAT_14032bd1c + lVar3);
          uVar2 = 6;
        }
        else {
          _Memory = malloc(0x70);
          if (_Memory == (void *)0x0) {
            uVar2 = 0xd;
          }
          else {
            uVar1 = (**(code **)(lVar3 + 0x14032bd68))(_Memory);
            uVar2 = (ulonglong)uVar1;
            if (uVar1 == 0) {
              uVar1 = (**(code **)(lVar3 + 0x14032bd70))(_Memory,param_2,param_3);
              uVar2 = (ulonglong)uVar1;
              if (uVar1 == 0) {
                uVar1 = (**(code **)(lVar3 + 0x14032bd78))(_Memory,param_4);
                uVar2 = (ulonglong)uVar1;
                *param_5 = *(uint *)(&DAT_14032bd1c + lVar3);
              }
            }
            free(_Memory);
          }
        }
      }
      return uVar2;
    }
    return 0x10;
  }
  return 0x10;
}



undefined8 FUN_1401f7e00(int *param_1,longlong param_2,undefined4 *param_3)

{
  undefined8 uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  longlong lVar5;
  int local_28 [2];
  int local_20;
  longlong local_18;
  
  uVar1 = FUN_1401f4190(local_28,*param_1);
  if ((int)uVar1 == 0) {
    local_28[0] = *param_1;
    local_20 = param_1[2];
    uVar2 = 0;
    lVar5 = (longlong)(local_28[0] + -1);
    if (-1 < local_28[0] + -1) {
      do {
        uVar2 = (ulonglong)*(uint *)(*(longlong *)(param_1 + 4) + lVar5 * 4) | uVar2 << 0x1c;
        if (uVar2 < 3) {
          uVar3 = 0;
        }
        else {
          uVar3 = uVar2 * 0x5555555 >> 0x1c;
          uVar2 = uVar2 + uVar3 * -3;
          if (2 < uVar2) {
            uVar4 = uVar2 / 3;
            uVar2 = uVar2 % 3;
            uVar3 = uVar3 + uVar4;
          }
        }
        lVar5 = lVar5 + -1;
        *(int *)(local_18 + 4 + lVar5 * 4) = (int)uVar3;
      } while (-1 < lVar5);
    }
    if (param_3 != (undefined4 *)0x0) {
      *param_3 = (int)uVar2;
    }
    if (param_2 != 0) {
      FUN_1401f2010(local_28);
      FUN_1401f4050(local_28,param_2);
    }
    FUN_1401ea010(local_28);
    uVar1 = 0;
  }
  return uVar1;
}



undefined8 FUN_1401f7ef0(int *param_1,uint param_2,int *param_3)

{
  uint *puVar1;
  int iVar2;
  undefined8 uVar3;
  int iVar4;
  longlong lVar5;
  
  if ((int)param_2 < 1) {
    FUN_1401f2150(param_3);
    return 0;
  }
  if (*param_1 * 0x1c <= (int)param_2) {
    uVar3 = FUN_1401ea0b0(param_1,param_3);
    return uVar3;
  }
  uVar3 = FUN_1401ea0b0(param_1,param_3);
  if ((int)uVar3 == 0) {
    iVar2 = (int)param_2 / 0x1c;
    iVar4 = (uint)(param_2 != iVar2 * 0x1c) + iVar2;
    if (iVar4 < *param_3) {
      lVar5 = (longlong)iVar4 << 2;
      do {
        iVar4 = iVar4 + 1;
        *(undefined4 *)(lVar5 + *(longlong *)(param_3 + 4)) = 0;
        lVar5 = lVar5 + 4;
      } while (iVar4 < *param_3);
    }
    puVar1 = (uint *)(*(longlong *)(param_3 + 4) + (longlong)iVar2 * 4);
    *puVar1 = *puVar1 & (1 << ((char)param_2 + (char)(param_2 / 0x1c) * -0x1c & 0x1fU)) - 1U;
    FUN_1401f2010(param_3);
    uVar3 = 0;
  }
  return uVar3;
}



ulonglong FUN_1401f7fe0(undefined8 param_1,undefined8 param_2,int param_3)

{
  undefined4 uVar1;
  uint uVar2;
  int iVar3;
  ulonglong uVar4;
  undefined1 local_28 [32];
  
  uVar4 = FUN_1401e9fb0(local_28);
  if ((int)uVar4 == 0) {
    uVar1 = FUN_1401ea260(param_2);
    uVar2 = FUN_1401f23e0(param_1,uVar1,local_28,param_1);
    while (uVar4 = (ulonglong)uVar2, uVar2 == 0) {
      if (param_3 != 1) {
        uVar2 = FUN_1401eab20(local_28,param_3,local_28);
        uVar4 = (ulonglong)uVar2;
        if (uVar2 != 0) break;
      }
      uVar2 = FUN_1401f2660(param_1,local_28,param_1);
      uVar4 = (ulonglong)uVar2;
      if ((uVar2 != 0) || (iVar3 = FUN_1401f2180(param_1,param_2), iVar3 == -1)) break;
      FUN_1401f2560(param_1,param_2,param_1);
      uVar2 = FUN_1401f23e0(param_1,uVar1,local_28,param_1);
    }
    FUN_1401ea010(local_28);
  }
  return uVar4;
}



ulonglong FUN_1401f80d0(undefined8 param_1,undefined4 *param_2)

{
  undefined4 uVar1;
  uint uVar2;
  ulonglong uVar3;
  undefined1 local_28 [16];
  undefined4 *local_18;
  
  uVar3 = FUN_1401e9fb0(local_28);
  if ((int)uVar3 == 0) {
    uVar1 = FUN_1401ea260(param_1);
    uVar2 = FUN_1401ea300(local_28,uVar1);
    if ((uVar2 != 0) || (uVar2 = FUN_1401f2560(local_28,param_1,local_28), uVar2 != 0)) {
      FUN_1401ea010(local_28);
      return (ulonglong)uVar2;
    }
    *param_2 = *local_18;
    FUN_1401ea010(local_28);
    uVar3 = 0;
  }
  return uVar3;
}



undefined8 FUN_1401f8170(int *param_1,uint *param_2,ulonglong param_3)

{
  uint uVar1;
  int iVar2;
  undefined8 uVar3;
  ulonglong uVar4;
  uint *puVar5;
  uint *puVar6;
  uint uVar7;
  uint *puVar9;
  ulonglong uVar10;
  ulonglong uVar8;
  
  uVar1 = *param_2;
  if (((int)(uVar1 * 2) <= param_1[1]) || (uVar3 = FUN_1401f1f70(), (int)uVar3 == 0)) {
    while( true ) {
      puVar6 = *(uint **)(param_1 + 4);
      puVar9 = puVar6 + (int)uVar1;
      puVar5 = puVar6;
      uVar8 = 0;
      uVar10 = (ulonglong)uVar1;
      uVar7 = 0;
      if (0 < (int)uVar1) {
        do {
          uVar7 = *puVar9;
          puVar6 = puVar5 + 1;
          puVar9 = puVar9 + 1;
          uVar4 = (ulonglong)uVar7 * (param_3 & 0xffffffff) + (ulonglong)*puVar5 +
                  (uVar8 & 0xffffffff);
          uVar8 = uVar4 >> 0x1c;
          uVar7 = (uint)uVar8;
          uVar10 = uVar10 - 1;
          *puVar5 = (uint)uVar4 & 0xfffffff;
          puVar5 = puVar6;
        } while (uVar10 != 0);
      }
      *puVar6 = uVar7;
      iVar2 = uVar1 + 1;
      if ((int)(uVar1 + 1) < *param_1) {
        do {
          puVar6 = puVar6 + 1;
          *puVar6 = 0;
          iVar2 = iVar2 + 1;
        } while (iVar2 < *param_1);
      }
      FUN_1401f2010(param_1);
      iVar2 = FUN_1401f2180(param_1,param_2);
      if (iVar2 == -1) break;
      FUN_1401f2560(param_1,param_2,param_1);
    }
    uVar3 = 0;
  }
  return uVar3;
}



void FUN_1401f8280(longlong param_1,int *param_2)

{
  *param_2 = 0x10000000 - **(int **)(param_1 + 0x10);
  return;
}



ulonglong FUN_1401f8290(undefined8 param_1,undefined8 param_2,undefined8 param_3)

{
  undefined4 uVar1;
  uint uVar2;
  int iVar3;
  ulonglong uVar4;
  undefined1 local_28 [32];
  
  uVar4 = FUN_1401e9fb0(local_28);
  if ((int)uVar4 == 0) {
    uVar1 = FUN_1401ea260(param_2);
    uVar2 = FUN_1401f23e0(param_1,uVar1,local_28,param_1);
    uVar4 = (ulonglong)uVar2;
    if (uVar2 == 0) {
      while( true ) {
        uVar2 = FUN_1401eaa70(local_28,param_3,local_28);
        uVar4 = (ulonglong)uVar2;
        if (uVar2 != 0) break;
        uVar2 = FUN_1401f2660(param_1,local_28,param_1);
        uVar4 = (ulonglong)uVar2;
        if ((uVar2 != 0) || (iVar3 = FUN_1401f2180(param_1,param_2), iVar3 == -1)) break;
        FUN_1401f2560(param_1,param_2,param_1);
        uVar2 = FUN_1401f23e0(param_1,uVar1,local_28,param_1);
        uVar4 = (ulonglong)uVar2;
        if (uVar2 != 0) break;
      }
    }
    FUN_1401ea010(local_28);
  }
  return uVar4;
}



ulonglong FUN_1401f8380(undefined8 param_1,undefined8 param_2)

{
  undefined4 uVar1;
  uint uVar2;
  ulonglong uVar3;
  undefined1 local_28 [32];
  
  uVar3 = FUN_1401e9fb0(local_28);
  if ((int)uVar3 == 0) {
    uVar1 = FUN_1401ea260(param_1);
    uVar2 = FUN_1401ea300(local_28,uVar1);
    if (uVar2 == 0) {
      uVar2 = FUN_1401f2560(local_28,param_1,param_2);
    }
    uVar3 = (ulonglong)uVar2;
    FUN_1401ea010(local_28);
  }
  return uVar3;
}



ulonglong FUN_1401f83f0(undefined8 param_1,uint *param_2,undefined8 param_3)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  ulonglong uVar4;
  undefined1 local_28 [32];
  
  uVar3 = *param_2;
  uVar4 = FUN_1401f23b0(local_28,param_1);
  if ((int)uVar4 != 0) {
    return uVar4;
  }
  FUN_1401f4080(local_28,uVar3 - 1);
  if (uVar3 < 0x8000001) {
    uVar1 = FUN_1401f9b50(local_28,param_3,local_28,uVar3);
  }
  else {
    uVar1 = FUN_1401eaa70();
  }
  uVar4 = (ulonglong)uVar1;
  if (uVar1 == 0) {
    FUN_1401f4080(local_28,uVar3 + 1);
    uVar1 = FUN_1401f7ef0(param_1,(uVar3 + 1) * 0x1c,param_1);
    uVar4 = (ulonglong)uVar1;
    if (uVar1 == 0) {
      uVar1 = FUN_1401f2790(local_28,param_2,local_28,uVar3 + 1);
      uVar4 = (ulonglong)uVar1;
      if (uVar1 == 0) {
        uVar1 = FUN_1401ea8b0(param_1,local_28,param_1);
        uVar4 = (ulonglong)uVar1;
        if (uVar1 == 0) {
          iVar2 = FUN_1401ea230(param_1,0);
          if (iVar2 == -1) {
            FUN_1401f4bb0(local_28,1);
            uVar3 = FUN_1401f4100(local_28,uVar3 + 1);
            uVar4 = (ulonglong)uVar3;
            if (uVar3 != 0) goto LAB_1401f8549;
            uVar3 = FUN_1401ea6f0(param_1,local_28,param_1);
            uVar4 = (ulonglong)uVar3;
            if (uVar3 != 0) goto LAB_1401f8549;
          }
          iVar2 = FUN_1401ea200(param_1,param_2);
          while (iVar2 != -1) {
            uVar3 = FUN_1401f2560(param_1,param_2,param_1);
            uVar4 = (ulonglong)uVar3;
            if (uVar3 != 0) break;
            iVar2 = FUN_1401ea200(param_1,param_2);
          }
        }
      }
    }
  }
LAB_1401f8549:
  FUN_1401ea010(local_28);
  return uVar4;
}



void FUN_1401f8570(undefined8 param_1,int *param_2)

{
  int iVar1;
  
  iVar1 = FUN_1401ea300(param_1,*param_2 * 0x38);
  if (iVar1 == 0) {
    FUN_1401eac60(param_1,param_2,param_1,0);
  }
  return;
}



undefined8 FUN_1401f85b0(longlong param_1,undefined4 *param_2)

{
  if ((param_2 == (undefined4 *)0x0) || (param_1 == 0)) {
    return 0x10;
  }
  if ((*(int *)(param_1 + 0x1c) == 0) && (*(int *)(param_1 + 0x20) == 0)) {
    *param_2 = 0xf;
    return 0;
  }
  *param_2 = 0x13;
  return 0;
}



int FUN_1401f85e0(undefined8 *param_1,undefined8 *param_2)

{
  void *_Buf2;
  void *_Buf1;
  uint uVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  
  uVar3 = *(uint *)(param_1 + 1);
  uVar4 = *(uint *)(param_2 + 1);
  _Buf2 = (void *)*param_2;
  _Buf1 = (void *)*param_1;
  uVar1 = uVar4;
  if (uVar3 < uVar4) {
    uVar1 = uVar3;
  }
  iVar2 = memcmp(_Buf1,_Buf2,(ulonglong)uVar1);
  if ((iVar2 == 0) && (uVar3 != uVar4)) {
    if (uVar4 < uVar3) {
      for (; uVar4 < uVar3; uVar4 = uVar4 + 1) {
        if (*(char *)((ulonglong)uVar4 + (longlong)_Buf1) != '\0') {
          return 1;
        }
      }
    }
    else {
      for (; uVar3 < uVar4; uVar3 = uVar3 + 1) {
        if (*(char *)((ulonglong)uVar3 + (longlong)_Buf2) != '\0') {
          return -1;
        }
      }
    }
  }
  return iVar2;
}



int FUN_1401f8670(int *param_1,uint param_2,void *param_3,uint *param_4)

{
  byte bVar1;
  int *piVar2;
  int iVar3;
  void *_Src;
  void *_Base;
  uint uVar4;
  uint *puVar5;
  ulonglong _Count;
  ulonglong uVar6;
  uint uVar7;
  byte *pbVar8;
  uint uVar9;
  
  uVar9 = 1;
  _Count = (ulonglong)param_2;
  piVar2 = param_1;
  if (1 < param_2) {
    do {
      if (piVar2[0xe] != *piVar2) {
        return 0x10;
      }
      uVar9 = uVar9 + 1;
      piVar2 = piVar2 + 0xe;
    } while (uVar9 < param_2);
  }
  _Src = calloc(1,(ulonglong)*param_4);
  if (_Src != (void *)0x0) {
    iVar3 = FUN_1401f7630(param_1,_Count,_Src,param_4,0xf);
    if (iVar3 == 0) {
      _Base = calloc(_Count,0x10);
      if (_Base == (void *)0x0) {
        free(_Src);
        iVar3 = 0xd;
      }
      else {
        uVar6 = (longlong)_Src + 2;
        if (0x7f < *(byte *)((longlong)_Src + 1)) {
          uVar6 = uVar6 + (*(byte *)((longlong)_Src + 1) & 0x7f);
        }
        uVar9 = (int)uVar6 - (int)_Src;
        if (uVar6 < (ulonglong)*param_4 + (longlong)_Src) {
          puVar5 = (uint *)((longlong)_Base + 8);
          do {
            *(ulonglong *)(puVar5 + -2) = uVar6;
            bVar1 = *(byte *)(uVar6 + 1);
            iVar3 = 2;
            if (bVar1 < 0x80) {
              *puVar5 = (uint)bVar1;
            }
            else {
              uVar4 = bVar1 & 0x7f;
              *puVar5 = 0;
              if ((bVar1 & 0x7f) != 0) {
                uVar7 = 0;
                pbVar8 = (byte *)(uVar6 + 2);
                iVar3 = uVar4 + 2;
                do {
                  bVar1 = *pbVar8;
                  pbVar8 = pbVar8 + 1;
                  uVar7 = uVar7 << 8 | (uint)bVar1;
                  uVar4 = uVar4 - 1;
                  *puVar5 = uVar7;
                } while (uVar4 != 0);
              }
            }
            *puVar5 = *puVar5 + iVar3;
            uVar4 = *puVar5;
            puVar5 = puVar5 + 4;
            uVar6 = uVar6 + uVar4;
          } while (uVar6 < (ulonglong)*param_4 + (longlong)_Src);
        }
        qsort(_Base,_Count,0x10,FUN_1401f85e0);
        memcpy(param_3,_Src,(ulonglong)uVar9);
        if (param_2 != 0) {
          puVar5 = (uint *)((longlong)_Base + 8);
          do {
            memcpy((void *)((ulonglong)uVar9 + (longlong)param_3),*(void **)(puVar5 + -2),
                   (ulonglong)*puVar5);
            uVar9 = uVar9 + *puVar5;
            puVar5 = puVar5 + 4;
            _Count = _Count - 1;
          } while (_Count != 0);
        }
        free(_Base);
        free(_Src);
        iVar3 = 0;
      }
      return iVar3;
    }
    free(_Src);
    return iVar3;
  }
  return 0xd;
}



undefined8 FUN_1401f8870(undefined4 param_1)

{
  switch(param_1) {
  case 1:
    return 1;
  case 2:
  case 3:
    return 2;
  case 4:
    return 3;
  case 5:
    return 4;
  case 6:
    return 5;
  case 7:
    return 6;
  case 8:
    return 0x16;
  case 9:
    return 0x13;
  case 10:
    return 0xc;
  case 0xb:
    return 0x17;
  default:
    return 0xffffffff;
  case 0xd:
    return 0x30;
  case 0xe:
  case 0xf:
    return 0x31;
  }
}



int FUN_1401f8920(undefined4 *param_1,undefined4 *param_2)

{
  int iVar1;
  int iVar2;
  
  iVar1 = FUN_1401f8870(*param_1);
  iVar2 = FUN_1401f8870(*param_2);
  if (iVar1 - iVar2 == 0) {
    return param_1[5] - param_2[5];
  }
  return iVar1 - iVar2;
}



undefined4 FUN_1401f8960(undefined8 *param_1,uint param_2,undefined8 param_3,undefined8 param_4)

{
  undefined4 uVar1;
  void *_Base;
  undefined8 *puVar2;
  undefined8 *puVar3;
  uint uVar4;
  
  _Base = calloc((ulonglong)param_2,0x38);
  if (_Base == (void *)0x0) {
    uVar1 = 0xd;
  }
  else {
    uVar4 = 0;
    puVar2 = param_1;
    if (param_2 != 0) {
      do {
        puVar3 = puVar2 + 7;
        *(undefined8 *)((longlong)_Base + (-0x38 - (longlong)param_1) + (longlong)puVar3) = *puVar2;
        *(undefined8 *)((longlong)_Base + (-0x30 - (longlong)param_1) + (longlong)puVar3) =
             puVar2[1];
        *(undefined8 *)((longlong)_Base + (-0x28 - (longlong)param_1) + (longlong)puVar3) =
             puVar2[2];
        *(undefined8 *)((longlong)_Base + (-0x20 - (longlong)param_1) + (longlong)puVar3) =
             puVar2[3];
        *(undefined8 *)((longlong)_Base + (-0x18 - (longlong)param_1) + (longlong)puVar3) =
             puVar2[4];
        *(undefined8 *)((longlong)_Base + (-0x10 - (longlong)param_1) + (longlong)puVar3) =
             puVar2[5];
        *(undefined8 *)((longlong)_Base + (-8 - (longlong)param_1) + (longlong)puVar3) = puVar2[6];
        *(uint *)((longlong)_Base + (-0x24 - (longlong)param_1) + (longlong)puVar3) = uVar4;
        uVar4 = uVar4 + 1;
        puVar2 = puVar3;
      } while (uVar4 < param_2);
    }
    qsort(_Base,(ulonglong)param_2,0x38,FUN_1401f8920);
    uVar1 = FUN_1401f7630(_Base,param_2,param_3,param_4,0xe);
    free(_Base);
  }
  return uVar1;
}



undefined8 FUN_1401f8a60(uint *param_1,undefined1 *param_2,uint *param_3)

{
  undefined1 uVar1;
  undefined8 uVar2;
  uint uVar3;
  uint local_res8 [2];
  
  if (((param_1 != (uint *)0x0) && (param_2 != (undefined1 *)0x0)) && (param_3 != (uint *)0x0)) {
    uVar2 = FUN_1401f85b0(param_1,local_res8);
    if ((int)uVar2 == 0) {
      if (*param_3 < local_res8[0]) {
        *param_3 = local_res8[0];
        return 6;
      }
      *param_2 = 0x17;
      uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8
                                       [(uint)((int)((ulonglong)*param_1 / 10) +
                                              (int)(((ulonglong)*param_1 / 10) / 10) * -10)]);
      param_2[2] = uVar1;
      uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8[*param_1 % 10]);
      param_2[3] = uVar1;
      uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8
                                       [(uint)((int)((ulonglong)param_1[1] / 10) +
                                              (int)(((ulonglong)param_1[1] / 10) / 10) * -10)]);
      param_2[4] = uVar1;
      uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8[param_1[1] % 10]);
      param_2[5] = uVar1;
      uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8
                                       [(uint)((int)((ulonglong)param_1[2] / 10) +
                                              (int)(((ulonglong)param_1[2] / 10) / 10) * -10)]);
      param_2[6] = uVar1;
      uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8[param_1[2] % 10]);
      param_2[7] = uVar1;
      uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8
                                       [(uint)((int)((ulonglong)param_1[3] / 10) +
                                              (int)(((ulonglong)param_1[3] / 10) / 10) * -10)]);
      param_2[8] = uVar1;
      uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8[param_1[3] % 10]);
      param_2[9] = uVar1;
      uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8
                                       [(uint)((int)((ulonglong)param_1[4] / 10) +
                                              (int)(((ulonglong)param_1[4] / 10) / 10) * -10)]);
      param_2[10] = uVar1;
      uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8[param_1[4] % 10]);
      param_2[0xb] = uVar1;
      uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8
                                       [(uint)((int)((ulonglong)param_1[5] / 10) +
                                              (int)(((ulonglong)param_1[5] / 10) / 10) * -10)]);
      param_2[0xc] = uVar1;
      uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8[param_1[5] % 10]);
      param_2[0xd] = uVar1;
      if ((param_1[8] == 0) && (param_1[7] == 0)) {
        uVar1 = FUN_1401f6a90(0x5a);
        uVar3 = 0xf;
        param_2[0xe] = uVar1;
      }
      else {
        uVar2 = 0x2b;
        if (param_1[6] != 0) {
          uVar2 = 0x2d;
        }
        uVar1 = FUN_1401f6a90(uVar2);
        param_2[0xe] = uVar1;
        uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8
                                         [(uint)((int)((ulonglong)param_1[7] / 10) +
                                                (int)(((ulonglong)param_1[7] / 10) / 10) * -10)]);
        param_2[0xf] = uVar1;
        uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8[param_1[7] % 10]);
        param_2[0x10] = uVar1;
        uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8[(param_1[8] / 10) % 10]);
        param_2[0x11] = uVar1;
        uVar1 = FUN_1401f6a90((int)(char)PTR_DAT_1403222e8[param_1[8] % 10]);
        uVar3 = 0x13;
        param_2[0x12] = uVar1;
      }
      param_2[1] = (char)uVar3 + -2;
      *param_3 = uVar3;
      uVar2 = 0;
    }
    return uVar2;
  }
  return 0x10;
}



undefined8 FUN_1401f8df0(ushort *param_1,uint param_2,undefined1 *param_3,uint *param_4)

{
  undefined1 uVar1;
  int iVar2;
  undefined8 uVar3;
  undefined1 uVar4;
  uint uVar5;
  byte *pbVar6;
  byte *pbVar7;
  ulonglong uVar8;
  ushort *puVar9;
  uint uVar10;
  
  uVar8 = (ulonglong)param_2;
  if (((param_1 == (ushort *)0x0) || (param_3 == (undefined1 *)0x0)) || (param_4 == (uint *)0x0)) {
    return 0x10;
  }
  uVar5 = 0;
  uVar10 = 0;
  puVar9 = param_1;
  if (param_2 == 0) {
LAB_1401f8ea7:
    uVar10 = uVar5 + 2;
LAB_1401f8eaa:
    if (*param_4 < uVar10) {
      *param_4 = uVar5;
      return 6;
    }
    *param_3 = 0xc;
    uVar4 = (undefined1)uVar5;
    if (uVar5 < 0x80) {
      param_3[1] = uVar4;
      uVar10 = 2;
    }
    else if (uVar5 < 0x100) {
      param_3[1] = 0x81;
      uVar10 = 3;
      param_3[2] = uVar4;
    }
    else {
      uVar1 = (undefined1)(uVar5 >> 8);
      if (uVar5 < 0x10000) {
        param_3[1] = 0x82;
        uVar10 = 4;
        param_3[2] = uVar1;
        param_3[3] = uVar4;
      }
      else {
        if (0xffffff < uVar5) goto LAB_1401f8fbe;
        param_3[1] = 0x83;
        uVar10 = 5;
        param_3[2] = (char)(uVar5 >> 0x10);
        param_3[3] = uVar1;
        param_3[4] = uVar4;
      }
    }
    if (param_2 != 0) {
      pbVar6 = param_3 + (int)uVar10;
      do {
        iVar2 = FUN_1401f6580(*param_1);
        if (iVar2 == 1) {
          uVar10 = uVar10 + 1;
          pbVar7 = pbVar6 + 1;
          *pbVar6 = (byte)*param_1;
        }
        else if (iVar2 == 2) {
          uVar10 = uVar10 + 2;
          *pbVar6 = (byte)(*param_1 >> 6) & 0x1f | 0xc0;
          pbVar7 = pbVar6 + 2;
          pbVar6[1] = (byte)*param_1 & 0x3f | 0x80;
        }
        else {
          pbVar7 = pbVar6;
          if (iVar2 == 3) {
            uVar10 = uVar10 + 3;
            *pbVar6 = (byte)(*param_1 >> 0xc) | 0xe0;
            pbVar6[1] = (byte)(*param_1 >> 6) & 0x3f | 0x80;
            pbVar7 = pbVar6 + 3;
            pbVar6[2] = (byte)*param_1 & 0x3f | 0x80;
          }
        }
        param_1 = param_1 + 1;
        uVar8 = uVar8 - 1;
        pbVar6 = pbVar7;
      } while (uVar8 != 0);
    }
    *param_4 = uVar10;
    uVar3 = 0;
  }
  else {
    do {
      if (0x1ffff < *puVar9) goto LAB_1401f8fbe;
      iVar2 = FUN_1401f6580(*puVar9);
      uVar10 = uVar10 + 1;
      uVar5 = uVar5 + iVar2;
      puVar9 = puVar9 + 1;
    } while (uVar10 < param_2);
    if (uVar5 < 0x80) goto LAB_1401f8ea7;
    if (uVar5 < 0x100) {
      uVar10 = uVar5 + 3;
      goto LAB_1401f8eaa;
    }
    if (uVar5 < 0x10000) {
      uVar10 = uVar5 + 4;
      goto LAB_1401f8eaa;
    }
    if (uVar5 < 0x1000000) {
      uVar10 = uVar5 + 5;
      goto LAB_1401f8eaa;
    }
LAB_1401f8fbe:
    uVar3 = 0x10;
  }
  return uVar3;
}



undefined8 FUN_1401f8ff0(undefined1 *param_1,uint param_2,undefined1 *param_3,uint *param_4)

{
  undefined1 uVar1;
  undefined1 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  ulonglong uVar5;
  uint uVar6;
  undefined1 *puVar7;
  uint local_res8 [2];
  
  uVar5 = (ulonglong)param_2;
  if (((param_1 != (undefined1 *)0x0) && (param_3 != (undefined1 *)0x0)) && (param_4 != (uint *)0x0)
     ) {
    uVar3 = FUN_1401f68c0(param_1,uVar5,local_res8);
    if ((int)uVar3 == 0) {
      if (*param_4 < local_res8[0]) {
        *param_4 = local_res8[0];
        return 6;
      }
      *param_3 = 0x13;
      uVar2 = (undefined1)param_2;
      if (param_2 < 0x80) {
        param_3[1] = uVar2;
        uVar6 = 2;
      }
      else if (param_2 < 0x100) {
        param_3[1] = 0x81;
        uVar6 = 3;
        param_3[2] = uVar2;
      }
      else {
        uVar1 = (undefined1)(param_2 >> 8);
        if (param_2 < 0x10000) {
          param_3[1] = 0x82;
          uVar6 = 4;
          param_3[2] = uVar1;
          param_3[3] = uVar2;
        }
        else {
          if (0xffffff < param_2) {
            return 0x10;
          }
          param_3[1] = 0x83;
          uVar6 = 5;
          param_3[2] = (char)(param_2 >> 0x10);
          param_3[3] = uVar1;
          param_3[4] = uVar2;
        }
      }
      lVar4 = (longlong)(int)uVar6;
      if (param_2 != 0) {
        uVar6 = uVar6 + param_2;
        puVar7 = param_3 + lVar4;
        do {
          uVar2 = FUN_1401f6850(*param_1);
          param_1 = param_1 + 1;
          uVar5 = uVar5 - 1;
          *puVar7 = uVar2;
          puVar7 = puVar7 + 1;
        } while (uVar5 != 0);
      }
      *param_4 = uVar6;
      uVar3 = 0;
    }
    return uVar3;
  }
  return 0x10;
}



undefined8 FUN_1401f9120(undefined1 *param_1,uint param_2,undefined1 *param_3,uint *param_4)

{
  undefined1 uVar1;
  undefined1 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  ulonglong uVar5;
  uint uVar6;
  undefined1 *puVar7;
  uint local_res8 [2];
  
  uVar5 = (ulonglong)param_2;
  if (((param_1 != (undefined1 *)0x0) && (param_3 != (undefined1 *)0x0)) && (param_4 != (uint *)0x0)
     ) {
    uVar3 = FUN_1401f6b00(param_1,uVar5,local_res8);
    if ((int)uVar3 == 0) {
      if (*param_4 < local_res8[0]) {
        *param_4 = local_res8[0];
        return 6;
      }
      *param_3 = 0x16;
      uVar2 = (undefined1)param_2;
      if (param_2 < 0x80) {
        param_3[1] = uVar2;
        uVar6 = 2;
      }
      else if (param_2 < 0x100) {
        param_3[1] = 0x81;
        uVar6 = 3;
        param_3[2] = uVar2;
      }
      else {
        uVar1 = (undefined1)(param_2 >> 8);
        if (param_2 < 0x10000) {
          param_3[1] = 0x82;
          uVar6 = 4;
          param_3[2] = uVar1;
          param_3[3] = uVar2;
        }
        else {
          if (0xffffff < param_2) {
            return 0x10;
          }
          param_3[1] = 0x83;
          uVar6 = 5;
          param_3[2] = (char)(param_2 >> 0x10);
          param_3[3] = uVar1;
          param_3[4] = uVar2;
        }
      }
      lVar4 = (longlong)(int)uVar6;
      if (param_2 != 0) {
        uVar6 = uVar6 + param_2;
        puVar7 = param_3 + lVar4;
        do {
          uVar2 = FUN_1401f6a90(*param_1);
          param_1 = param_1 + 1;
          uVar5 = uVar5 - 1;
          *puVar7 = uVar2;
          puVar7 = puVar7 + 1;
        } while (uVar5 != 0);
      }
      *param_4 = uVar6;
      uVar3 = 0;
    }
    return uVar3;
  }
  return 0x10;
}



undefined8 FUN_1401f9250(int *param_1,undefined8 param_2,undefined1 *param_3,uint *param_4)

{
  undefined1 uVar1;
  uint uVar2;
  undefined8 uVar3;
  ulonglong uVar4;
  byte bVar5;
  ulonglong uVar6;
  int *piVar7;
  uint uVar8;
  byte bVar9;
  undefined1 *puVar10;
  uint uVar11;
  ulonglong uVar12;
  uint uVar13;
  uint *puVar14;
  int iVar15;
  uint uVar16;
  uint local_res8 [2];
  
  if (((param_1 != (int *)0x0) && (param_3 != (undefined1 *)0x0)) && (param_4 != (uint *)0x0)) {
    uVar3 = FUN_1401f6ce0(param_1,param_2,local_res8);
    if ((int)uVar3 == 0) {
      if (*param_4 < local_res8[0]) {
        *param_4 = local_res8[0];
        return 6;
      }
      uVar13 = 0;
      iVar15 = param_1[1] + *param_1 * 0x28;
      uVar8 = 1;
      uVar16 = (uint)param_2;
      if (1 < uVar16) {
        piVar7 = param_1 + 2;
        do {
          uVar2 = FUN_1401f6cd0(iVar15);
          uVar13 = uVar13 + (uint)(iVar15 == 0) + (uint)(uVar2 != (uVar2 / 7) * 7) + uVar2 / 7;
          if (uVar8 < uVar16 - 1) {
            iVar15 = *piVar7;
          }
          uVar8 = uVar8 + 1;
          piVar7 = piVar7 + 1;
        } while (uVar8 < uVar16);
      }
      uVar8 = 1;
      *param_3 = 6;
      local_res8[0] = 1;
      uVar4 = 1;
      if (0x7f < uVar13) {
        if (uVar13 < 0x100) {
          param_3[1] = 0x81;
        }
        else {
          if (0xffff < uVar13) {
            return 0x10;
          }
          param_3[1] = 0x82;
          local_res8[0] = 2;
          param_3[2] = (char)(uVar13 >> 8);
        }
        local_res8[0] = local_res8[0] + 1;
        uVar4 = (ulonglong)local_res8[0];
      }
      param_3[uVar4] = (char)uVar13;
      local_res8[0] = local_res8[0] + 1;
      uVar4 = (ulonglong)local_res8[0];
      uVar13 = param_1[1] + *param_1 * 0x28;
      if (1 < uVar16) {
        puVar14 = (uint *)(param_1 + 2);
        do {
          uVar6 = (ulonglong)uVar13;
          if (uVar13 == 0) {
            param_3[uVar4] = 0;
            uVar4 = (ulonglong)(local_res8[0] + 1);
            uVar2 = local_res8[0] + 1;
          }
          else {
            uVar11 = (uint)uVar4;
            uVar12 = (ulonglong)(int)uVar11;
            bVar9 = 0;
            uVar2 = local_res8[0];
            do {
              local_res8[0] = uVar2;
              bVar5 = (byte)uVar6;
              uVar6 = uVar6 >> 7;
              bVar5 = bVar5 & 0x7f | bVar9;
              bVar9 = 0x80;
              param_3[uVar4] = bVar5;
              uVar2 = local_res8[0] + 1;
              uVar4 = (ulonglong)uVar2;
            } while ((int)uVar6 != 0);
            if (uVar11 < local_res8[0]) {
              puVar10 = param_3 + uVar12;
              do {
                uVar1 = *puVar10;
                uVar11 = (int)uVar12 + 1;
                uVar12 = (ulonglong)uVar11;
                *puVar10 = param_3[local_res8[0]];
                param_3[local_res8[0]] = uVar1;
                local_res8[0] = local_res8[0] - 1;
                puVar10 = puVar10 + 1;
              } while (uVar11 < local_res8[0]);
            }
          }
          local_res8[0] = uVar2;
          if (uVar8 < uVar16 - 1) {
            uVar13 = *puVar14;
          }
          uVar8 = uVar8 + 1;
          puVar14 = puVar14 + 1;
        } while (uVar8 < uVar16);
      }
      *param_4 = (uint)uVar4;
      uVar3 = 0;
    }
    return uVar3;
  }
  return 0x10;
}



undefined8 FUN_1401f94b0(undefined1 *param_1,uint param_2,undefined1 *param_3,uint *param_4)

{
  undefined1 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  undefined1 *puVar4;
  ulonglong uVar5;
  undefined1 uVar6;
  uint uVar7;
  uint local_res8 [2];
  
  uVar5 = (ulonglong)param_2;
  if (((param_1 == (undefined1 *)0x0) || (param_3 == (undefined1 *)0x0)) || (param_4 == (uint *)0x0)
     ) {
LAB_1401f95b9:
    uVar2 = 0x10;
  }
  else {
    uVar2 = FUN_1401f6f90(uVar5,local_res8);
    if ((int)uVar2 != 0) {
      return uVar2;
    }
    if (*param_4 < local_res8[0]) {
      *param_4 = local_res8[0];
      return 6;
    }
    *param_3 = 4;
    uVar6 = (undefined1)param_2;
    if (param_2 < 0x80) {
      param_3[1] = uVar6;
      uVar7 = 2;
    }
    else if (param_2 < 0x100) {
      param_3[1] = 0x81;
      uVar7 = 3;
      param_3[2] = uVar6;
    }
    else {
      uVar1 = (undefined1)(param_2 >> 8);
      if (param_2 < 0x10000) {
        param_3[1] = 0x82;
        uVar7 = 4;
        param_3[2] = uVar1;
        param_3[3] = uVar6;
      }
      else {
        if (0xffffff < param_2) goto LAB_1401f95b9;
        param_3[1] = 0x83;
        uVar7 = 5;
        param_3[2] = (char)(param_2 >> 0x10);
        param_3[3] = uVar1;
        param_3[4] = uVar6;
      }
    }
    lVar3 = (longlong)(int)uVar7;
    if (param_2 != 0) {
      uVar7 = uVar7 + param_2;
      puVar4 = param_3 + lVar3;
      do {
        uVar6 = *param_1;
        param_1 = param_1 + 1;
        uVar5 = uVar5 - 1;
        *puVar4 = uVar6;
        puVar4 = puVar4 + 1;
      } while (uVar5 != 0);
    }
    *param_4 = uVar7;
    uVar2 = 0;
  }
  return uVar2;
}



undefined8 FUN_1401f95e0(char *param_1,uint param_2,undefined1 *param_3,uint *param_4)

{
  undefined8 uVar1;
  undefined1 uVar2;
  uint uVar3;
  byte bVar4;
  uint uVar5;
  ulonglong uVar6;
  uint uVar7;
  byte *pbVar8;
  uint local_res8 [2];
  
  if (((param_1 != (char *)0x0) && (param_3 != (undefined1 *)0x0)) && (param_4 != (uint *)0x0)) {
    uVar1 = FUN_1401f70e0(param_2,local_res8);
    if ((int)uVar1 == 0) {
      if (*param_4 < local_res8[0]) {
        *param_4 = local_res8[0];
        return 6;
      }
      uVar7 = 0;
      *param_3 = 3;
      uVar5 = 1;
      uVar3 = ((param_2 & 7) != 0) + 1 + (param_2 >> 3);
      uVar2 = (undefined1)uVar3;
      if (uVar3 < 0x80) {
        param_3[1] = uVar2;
        uVar5 = 2;
      }
      else if (uVar3 < 0x100) {
        param_3[1] = 0x81;
        uVar5 = 3;
        param_3[2] = uVar2;
      }
      else if (uVar3 < 0x10000) {
        param_3[1] = 0x82;
        uVar5 = 4;
        param_3[2] = (char)(uVar3 >> 8);
        param_3[3] = uVar2;
      }
      uVar6 = (ulonglong)(uVar5 + 1);
      bVar4 = 0;
      param_3[uVar5] = -(char)param_2 & 7;
      if (param_2 != 0) {
        pbVar8 = param_3 + (int)(uVar5 + 1);
        do {
          bVar4 = bVar4 | (*param_1 != '\0') << (7U - (char)(uVar7 & 7) & 0x1f);
          if ((uVar7 & 7) == 7) {
            *pbVar8 = bVar4;
            pbVar8 = pbVar8 + 1;
            uVar6 = (ulonglong)((int)uVar6 + 1);
            bVar4 = 0;
          }
          uVar7 = uVar7 + 1;
          param_1 = param_1 + 1;
        } while (uVar7 < param_2);
      }
      if ((param_2 & 7) != 0) {
        param_3[uVar6] = bVar4;
        uVar6 = (ulonglong)((int)uVar6 + 1);
      }
      *param_4 = (uint)uVar6;
      uVar1 = 0;
    }
    return uVar1;
  }
  return 0x10;
}



undefined8 FUN_1401f9750(ulonglong param_1,undefined1 *param_2,uint *param_3)

{
  ulonglong uVar1;
  undefined8 uVar2;
  longlong lVar3;
  undefined1 *puVar4;
  int iVar5;
  uint uVar6;
  ulonglong uVar7;
  uint uVar8;
  ulonglong uVar9;
  uint local_res10 [2];
  
  uVar7 = param_1 & 0xffffffff;
  if ((param_2 == (undefined1 *)0x0) || (param_3 == (uint *)0x0)) {
    return 0x10;
  }
  uVar2 = FUN_1401f7290(param_1,local_res10);
  if ((int)uVar2 != 0) {
    return uVar2;
  }
  if (*param_3 < local_res10[0]) {
    *param_3 = local_res10[0];
    return 6;
  }
  uVar8 = 0;
  iVar5 = 0;
  uVar9 = uVar7;
  if ((uint)param_1 != 0) {
    do {
      iVar5 = iVar5 + 1;
      uVar1 = uVar9 >> 8;
      uVar9 = uVar9 >> 8;
    } while ((int)uVar1 != 0);
    if (iVar5 != 0) goto LAB_1401f97d5;
  }
  iVar5 = 1;
LAB_1401f97d5:
  uVar6 = iVar5 + (uint)(((uint)param_1 >> (iVar5 * 8 - 1U & 0x1f) & 1) != 0);
  if (uVar6 < 5) {
    for (; uVar8 < 4 - uVar6; uVar8 = uVar8 + 1) {
      uVar7 = (ulonglong)(uint)((int)uVar7 << 8);
    }
  }
  *param_2 = 2;
  uVar8 = 2;
  param_2[1] = (char)uVar6;
  if (uVar6 == 5) {
    param_2[2] = 0;
    uVar6 = 4;
    uVar8 = 3;
  }
  lVar3 = (longlong)(int)uVar8;
  if (uVar6 != 0) {
    uVar9 = (ulonglong)uVar6;
    uVar8 = uVar8 + uVar6;
    puVar4 = param_2 + lVar3;
    do {
      uVar9 = uVar9 - 1;
      *puVar4 = (char)(uVar7 >> 0x18);
      puVar4 = puVar4 + 1;
      uVar7 = (ulonglong)(uint)((int)uVar7 << 8);
    } while (uVar9 != 0);
  }
  *param_3 = uVar8;
  return 0;
}



ulonglong FUN_1401f9870(longlong param_1,undefined1 *param_2,uint *param_3)

{
  bool bVar1;
  undefined1 uVar2;
  int iVar3;
  uint uVar4;
  int iVar5;
  ulonglong uVar6;
  undefined1 uVar7;
  int iVar8;
  undefined1 *puVar9;
  uint local_res8 [2];
  undefined8 local_res20;
  
  if (((param_1 == 0) || (param_2 == (undefined1 *)0x0)) || (param_3 == (uint *)0x0)) {
    return 0x10;
  }
  uVar6 = FUN_1401f7340(param_1,local_res8);
  if ((int)uVar6 == 0) {
    if (*param_3 < local_res8[0]) {
      *param_3 = local_res8[0];
      return 6;
    }
    iVar3 = (*DAT_1403793a0)(param_1,0);
    if (iVar3 == -1) {
      uVar4 = (*DAT_1403793a8)(param_1);
      uVar4 = (uVar4 - (uVar4 & 7)) + 8 >> 3;
      iVar3 = (*DAT_1403793b0)(param_1);
      iVar5 = (*DAT_1403793a8)(param_1);
      bVar1 = false;
      if ((iVar3 + 1 == iVar5) &&
         (uVar6 = (*DAT_1403793a8)(param_1), bVar1 = false, (uVar6 & 7) == 0)) {
        uVar4 = uVar4 - 1;
      }
    }
    else {
      uVar6 = (*DAT_1403793a8)();
      if (((uVar6 & 7) == 0) || (iVar3 = (*DAT_1403793a0)(param_1,0), iVar3 == 0)) {
        iVar3 = (*DAT_1403793d0)(param_1);
        uVar4 = iVar3 + 1;
        bVar1 = true;
      }
      else {
        uVar4 = (*DAT_1403793d0)(param_1);
        bVar1 = false;
      }
    }
    *param_2 = 2;
    uVar7 = (undefined1)uVar4;
    if (uVar4 < 0x80) {
      param_2[1] = uVar7;
      puVar9 = param_2 + 2;
    }
    else if (uVar4 < 0x100) {
      param_2[1] = 0x81;
      param_2[2] = uVar7;
      puVar9 = param_2 + 3;
    }
    else {
      uVar2 = (undefined1)(uVar4 >> 8);
      if (uVar4 < 0x10000) {
        param_2[1] = 0x82;
        puVar9 = param_2 + 4;
        param_2[2] = uVar2;
        param_2[3] = uVar7;
      }
      else {
        if (0xffffff < uVar4) {
          return 0x10;
        }
        param_2[1] = 0x83;
        param_2[2] = (char)(uVar4 >> 0x10);
        puVar9 = param_2 + 5;
        param_2[3] = uVar2;
        param_2[4] = uVar7;
      }
    }
    if (bVar1) {
      *puVar9 = 0;
      puVar9 = puVar9 + 1;
    }
    iVar3 = (*DAT_1403793a0)(param_1,0);
    if (iVar3 == 1) {
      uVar6 = (*DAT_1403793d8)(param_1,puVar9);
      if ((int)uVar6 != 0) {
        return uVar6;
      }
    }
    else {
      iVar3 = (*DAT_1403793a0)(param_1,0);
      if (iVar3 != 0) {
        iVar3 = (*DAT_140379350)(&local_res20);
        if (iVar3 == 0) {
          uVar4 = (*DAT_1403793a8)(param_1);
          iVar8 = (8 - (uVar4 & 7)) + uVar4;
          iVar3 = (*DAT_1403793b0)(param_1);
          iVar5 = (*DAT_1403793a8)(param_1);
          if ((iVar3 + 1 == iVar5) && (uVar6 = (*DAT_1403793a8)(param_1), (uVar6 & 7) == 0)) {
            iVar8 = iVar8 + -8;
          }
          iVar3 = (*DAT_1403793b8)(local_res20,iVar8);
          if ((iVar3 == 0) &&
             (iVar3 = (*DAT_1403793e8)(local_res20,param_1,local_res20), iVar3 == 0)) {
            uVar4 = (*DAT_1403793d8)(local_res20,puVar9);
            if (uVar4 != 0) {
              (*DAT_140379360)();
              return (ulonglong)uVar4;
            }
            (*DAT_140379360)(local_res20);
            *param_3 = local_res8[0];
            return 0;
          }
          (*DAT_140379360)(local_res20);
        }
        return 0xd;
      }
    }
    *param_3 = local_res8[0];
    uVar6 = 0;
  }
  return uVar6;
}



undefined8 FUN_1401f9b10(int param_1,undefined2 *param_2,uint *param_3)

{
  uint uVar1;
  
  if ((param_3 != (uint *)0x0) && (param_2 != (undefined2 *)0x0)) {
    uVar1 = *param_3;
    *param_3 = 3;
    if (uVar1 < 3) {
      return 6;
    }
    *param_2 = 0x101;
    *(char *)(param_2 + 1) = -(param_1 != 0);
    return 0;
  }
  return 0x10;
}



undefined8 FUN_1401f9b50(int *param_1,int *param_2,undefined8 param_3,int param_4)

{
  int iVar1;
  uint uVar2;
  int iVar3;
  undefined8 uVar4;
  ulonglong uVar5;
  longlong lVar6;
  int iVar7;
  uint *puVar8;
  uint *puVar9;
  uint uVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  uint *puVar13;
  int local_48 [4];
  longlong local_38;
  
  iVar3 = *param_2;
  iVar1 = *param_1;
  if (iVar3 + 1 + iVar1 < 0x200) {
    if (iVar1 < iVar3) {
      iVar3 = iVar1;
    }
    if (iVar3 < 0x100) {
      uVar4 = FUN_1401f9cb0(param_1,param_2,param_3,param_4);
      return uVar4;
    }
  }
  uVar4 = FUN_1401f4190(local_48);
  if ((int)uVar4 == 0) {
    iVar3 = *param_1;
    iVar1 = *param_2;
    local_48[0] = iVar1 + 1 + iVar3;
    lVar6 = 0;
    uVar11 = (longlong)param_4;
    if (0 < iVar3) {
      do {
        iVar7 = (int)uVar11;
        uVar11 = 0;
        uVar10 = 0;
        uVar2 = *(uint *)(*(longlong *)(param_1 + 4) + lVar6 * 4);
        puVar9 = (uint *)(local_38 + (longlong)param_4 * 4);
        puVar13 = (uint *)(*(longlong *)(param_2 + 4) + (longlong)iVar7 * 4);
        if (iVar7 < iVar1) {
          uVar12 = (ulonglong)(uint)(iVar1 - iVar7);
          puVar8 = puVar9;
          do {
            uVar10 = *puVar13;
            puVar9 = puVar8 + 1;
            puVar13 = puVar13 + 1;
            uVar5 = (ulonglong)uVar10 * (ulonglong)uVar2 + (ulonglong)*puVar8 +
                    (uVar11 & 0xffffffff);
            uVar11 = uVar5 >> 0x1c;
            uVar10 = (uint)uVar11;
            uVar12 = uVar12 - 1;
            *puVar8 = (uint)uVar5 & 0xfffffff;
            puVar8 = puVar9;
          } while (uVar12 != 0);
        }
        lVar6 = lVar6 + 1;
        *puVar9 = uVar10;
        uVar11 = (ulonglong)(iVar7 - 1);
      } while (lVar6 < iVar3);
    }
    FUN_1401f2010(local_48);
    FUN_1401f4050(local_48,param_3);
    FUN_1401ea010(local_48);
    uVar4 = 0;
  }
  return uVar4;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8 FUN_1401f9cb0(int *param_1,int *param_2,int *param_3,int param_4)

{
  int iVar1;
  int iVar2;
  int iVar3;
  longlong lVar4;
  longlong lVar5;
  uint uVar6;
  uint uVar7;
  undefined8 uVar8;
  int iVar9;
  ulonglong uVar10;
  longlong lVar11;
  void *_Dst;
  int iVar12;
  uint *puVar13;
  uint *puVar14;
  ulonglong uVar15;
  longlong lVar16;
  longlong lVar17;
  undefined1 auStack_888 [40];
  undefined8 local_860;
  undefined1 auStack_858 [2048];
  ulonglong local_58;
  
  local_58 = DAT_1403223c0 ^ (ulonglong)auStack_888;
  lVar17 = (longlong)param_4;
  local_860 = param_3;
  if ((*param_2 + *param_1 <= param_3[1]) || (uVar8 = FUN_1401f1f70(param_3), (int)uVar8 == 0)) {
    iVar3 = *param_1;
    iVar2 = iVar3 + *param_2;
    uVar15 = 0;
    lVar11 = (longlong)iVar2;
    if (lVar17 < lVar11) {
      lVar4 = *(longlong *)(param_1 + 4);
      lVar5 = *(longlong *)(param_2 + 4);
      iVar1 = *param_2 + -1;
      lVar16 = lVar17;
      iVar12 = param_4;
      do {
        iVar9 = iVar12;
        if (iVar1 < iVar12) {
          iVar9 = iVar1;
        }
        puVar13 = (uint *)(lVar4 + (longlong)(iVar12 - iVar9) * 4);
        puVar14 = (uint *)(lVar5 + (longlong)iVar9 * 4);
        uVar6 = iVar3 - (iVar12 - iVar9);
        uVar7 = iVar9 + 1U;
        if ((int)uVar6 < (int)(iVar9 + 1U)) {
          uVar7 = uVar6;
        }
        uVar10 = (ulonglong)uVar7;
        if (0 < (int)uVar7) {
          do {
            uVar7 = *puVar14;
            uVar6 = *puVar13;
            puVar14 = puVar14 + -1;
            puVar13 = puVar13 + 1;
            uVar15 = uVar15 + (ulonglong)uVar7 * (ulonglong)uVar6;
            uVar10 = uVar10 - 1;
          } while (uVar10 != 0);
        }
        lVar16 = lVar16 + 1;
        iVar12 = iVar12 + 1;
        uVar7 = (uint)uVar15;
        uVar15 = uVar15 >> 0x1c;
        *(uint *)(auStack_858 + lVar16 * 4 + -4) = uVar7 & 0xfffffff;
        param_3 = local_860;
      } while (lVar16 < lVar11);
    }
    iVar3 = *param_3;
    *param_3 = iVar2;
    _Dst = (void *)(*(longlong *)(param_3 + 4) + lVar17 * 4);
    if (lVar17 < lVar11) {
      lVar11 = lVar11 - lVar17;
      memcpy(_Dst,auStack_858 + lVar17 * 4,lVar11 * 4);
      param_4 = param_4 + (int)lVar11;
      _Dst = (void *)((longlong)_Dst + lVar11 * 4);
    }
    if (param_4 < iVar3) {
      memset(_Dst,0,(ulonglong)(uint)(iVar3 - param_4) << 2);
    }
    FUN_1401f2010(param_3);
    uVar8 = 0;
  }
  return uVar8;
}



ulonglong FUN_1401f9e54(undefined8 param_1,undefined4 *param_2,undefined8 param_3,int param_4)

{
  uint uVar1;
  ulonglong uVar2;
  undefined8 local_68;
  int local_60;
  undefined8 local_58;
  undefined4 local_50;
  undefined4 local_4c;
  undefined8 local_38;
  undefined8 local_30;
  
  local_50 = *param_2;
  local_38 = 0;
  local_30 = 0;
  local_68 = param_3;
  local_60 = param_4;
  local_58 = param_1;
  uVar2 = FUN_1401fa18c(&local_68,"1.2.3",0x58);
  if ((int)uVar2 == 0) {
    uVar1 = FUN_1401fa2ec(&local_68,4);
    uVar2 = (ulonglong)uVar1;
    if (uVar1 == 1) {
      *param_2 = local_4c;
      uVar2 = FUN_1401fb85c(&local_68);
    }
    else {
      FUN_1401fb85c(&local_68);
      if ((uVar1 == 2) || ((uVar1 == 0xfffffffb && (local_60 == 0)))) {
        uVar2 = 0xfffffffd;
      }
    }
  }
  return uVar2;
}



ulonglong FUN_1401f9ef8(undefined8 param_1,undefined4 *param_2,undefined8 param_3,undefined4 param_4
                       ,undefined4 param_5)

{
  uint uVar1;
  ulonglong uVar2;
  undefined8 local_68;
  undefined4 local_60;
  undefined8 local_58;
  undefined4 local_50;
  undefined4 local_4c;
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  
  local_50 = *param_2;
  local_38 = 0;
  local_30 = 0;
  local_28 = 0;
  local_68 = param_3;
  local_60 = param_4;
  local_58 = param_1;
  uVar2 = FUN_1401fdf40(&local_68,param_5,"1.2.3",0x58);
  if ((int)uVar2 == 0) {
    uVar1 = FUN_1401fbff0(&local_68,4);
    uVar2 = (ulonglong)uVar1;
    if (uVar1 == 1) {
      *param_2 = local_4c;
      uVar2 = FUN_1401fc840(&local_68);
    }
    else {
      FUN_1401fc840(&local_68);
      if (uVar1 == 0) {
        uVar2 = 0xfffffffb;
      }
    }
  }
  return uVar2;
}



void FUN_1401f9fa8(void)

{
  FUN_1401f9ef8();
  return;
}



undefined8 FUN_1401f9fdc(longlong param_1)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  if ((param_1 != 0) && (puVar2 = *(undefined8 **)(param_1 + 0x28), puVar2 != (undefined8 *)0x0)) {
    *(undefined4 *)((longlong)puVar2 + 0x1c) = 0;
    *(undefined4 *)(param_1 + 0x1c) = 0;
    *(undefined4 *)(param_1 + 0xc) = 0;
    *(undefined8 *)(param_1 + 0x20) = 0;
    *(undefined4 *)(param_1 + 0x4c) = 1;
    *puVar2 = 0;
    *(undefined4 *)((longlong)puVar2 + 0xc) = 0;
    puVar2[4] = 0;
    *(undefined8 *)((longlong)puVar2 + 0x2c) = 0;
    *(undefined4 *)((longlong)puVar2 + 0x34) = 0;
    puVar2[8] = 0;
    puVar1 = puVar2 + 0xa9;
    puVar2[0x10] = puVar1;
    puVar2[0xc] = puVar1;
    puVar2[0xb] = puVar1;
    *(undefined4 *)((longlong)puVar2 + 0x14) = 0x8000;
    return 0;
  }
  return 0xfffffffe;
}



undefined8 FUN_1401fa09c(longlong param_1,uint param_2,char *param_3,int param_4)

{
  code *pcVar1;
  longlong lVar2;
  undefined8 uVar3;
  
  if (((param_3 == (char *)0x0) || (*param_3 != '1')) || (param_4 != 0x58)) {
    return 0xfffffffa;
  }
  if (param_1 != 0) {
    *(undefined8 *)(param_1 + 0x20) = 0;
    if (*(longlong *)(param_1 + 0x30) == 0) {
      *(undefined8 *)(param_1 + 0x40) = 0;
      *(code **)(param_1 + 0x30) = FUN_1401fdfac;
    }
    pcVar1 = *(code **)(param_1 + 0x38);
    if (pcVar1 == (code *)0x0) {
      pcVar1 = FUN_1401fdfcc;
    }
    *(code **)(param_1 + 0x38) = pcVar1;
    lVar2 = (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x40),1,0x2548);
    if (lVar2 == 0) {
      return 0xfffffffc;
    }
    *(longlong *)(param_1 + 0x28) = lVar2;
    if ((int)param_2 < 0) {
      *(undefined4 *)(lVar2 + 8) = 0;
      param_2 = -param_2;
    }
    else {
      *(int *)(lVar2 + 8) = ((int)param_2 >> 4) + 1;
      if ((int)param_2 < 0x30) {
        param_2 = param_2 & 0xf;
      }
    }
    if (param_2 - 8 < 8) {
      *(undefined8 *)(lVar2 + 0x38) = 0;
      *(uint *)(lVar2 + 0x28) = param_2;
      uVar3 = FUN_1401f9fdc(param_1);
      return uVar3;
    }
    (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40));
    *(undefined8 *)(param_1 + 0x28) = 0;
  }
  return 0xfffffffe;
}



void FUN_1401fa18c(undefined8 param_1,undefined8 param_2,undefined4 param_3)

{
  FUN_1401fa09c(param_1,0xf,param_2,param_3);
  return;
}



void FUN_1401fa1ac(longlong param_1)

{
  *(undefined4 *)(param_1 + 0x68) = 9;
  *(undefined4 *)(param_1 + 0x6c) = 5;
  *(undefined **)(param_1 + 0x58) = &DAT_14027e790;
  *(undefined **)(param_1 + 0x60) = &DAT_14027ef90;
  return;
}



undefined8 FUN_1401fa1dc(longlong param_1,int param_2)

{
  longlong lVar1;
  int iVar2;
  longlong lVar3;
  uint uVar4;
  uint uVar5;
  
  lVar1 = *(longlong *)(param_1 + 0x28);
  if (*(longlong *)(lVar1 + 0x38) == 0) {
    lVar3 = (**(code **)(param_1 + 0x30))
                      (*(undefined8 *)(param_1 + 0x40),
                       1 << ((byte)*(undefined4 *)(lVar1 + 0x28) & 0x1f),1);
    *(longlong *)(lVar1 + 0x38) = lVar3;
    if (lVar3 == 0) {
      return 1;
    }
  }
  if (*(int *)(lVar1 + 0x2c) == 0) {
    *(undefined8 *)(lVar1 + 0x30) = 0;
    *(int *)(lVar1 + 0x2c) = 1 << ((byte)*(undefined4 *)(lVar1 + 0x28) & 0x1f);
  }
  uVar4 = param_2 - *(int *)(param_1 + 0x18);
  uVar5 = *(uint *)(lVar1 + 0x2c);
  if (uVar4 < uVar5) {
    uVar5 = uVar5 - *(int *)(lVar1 + 0x34);
    if (uVar4 < uVar5) {
      uVar5 = uVar4;
    }
    memcpy((void *)((ulonglong)*(uint *)(lVar1 + 0x34) + *(longlong *)(lVar1 + 0x38)),
           (void *)(*(longlong *)(param_1 + 0x10) - (ulonglong)uVar4),(ulonglong)uVar5);
    uVar4 = uVar4 - uVar5;
    if (uVar4 == 0) {
      *(int *)(lVar1 + 0x34) = *(int *)(lVar1 + 0x34) + uVar5;
      uVar4 = *(uint *)(lVar1 + 0x34);
      if (*(uint *)(lVar1 + 0x34) == *(uint *)(lVar1 + 0x2c)) {
        uVar4 = 0;
      }
      *(uint *)(lVar1 + 0x34) = uVar4;
      if (*(uint *)(lVar1 + 0x2c) <= *(uint *)(lVar1 + 0x30)) {
        return 0;
      }
      iVar2 = *(uint *)(lVar1 + 0x30) + uVar5;
      goto LAB_1401fa2b8;
    }
    memcpy(*(void **)(lVar1 + 0x38),(void *)(*(longlong *)(param_1 + 0x10) - (ulonglong)uVar4),
           (ulonglong)uVar4);
    *(uint *)(lVar1 + 0x34) = uVar4;
  }
  else {
    memcpy(*(void **)(lVar1 + 0x38),(void *)(*(longlong *)(param_1 + 0x10) - (ulonglong)uVar5),
           (ulonglong)uVar5);
    *(undefined4 *)(lVar1 + 0x34) = 0;
  }
  iVar2 = *(int *)(lVar1 + 0x2c);
LAB_1401fa2b8:
  *(int *)(lVar1 + 0x30) = iVar2;
  return 0;
}



int FUN_1401fa2ec(longlong *param_1,int param_2)

{
  byte bVar1;
  uint *puVar2;
  char cVar3;
  uint uVar4;
  int iVar5;
  char *pcVar6;
  byte bVar7;
  ushort uVar8;
  uint uVar9;
  uint uVar10;
  ulonglong uVar11;
  longlong lVar12;
  uint uVar13;
  ulonglong uVar14;
  uint uVar15;
  byte *pbVar16;
  ulonglong uVar17;
  undefined2 uVar18;
  undefined1 *puVar19;
  uint uVar20;
  ulonglong uVar21;
  int iVar22;
  uint uVar23;
  uint uVar24;
  uint uVar25;
  int local_res8;
  uint local_res18;
  uint local_res20;
  undefined2 local_68;
  undefined1 local_66;
  undefined1 local_65;
  undefined4 local_64;
  uint local_60;
  byte *local_58;
  undefined1 *local_50;
  
  if ((((param_1 == (longlong *)0x0) || (puVar2 = (uint *)param_1[5], puVar2 == (uint *)0x0)) ||
      (param_1[2] == 0)) || ((*param_1 == 0 && ((int)param_1[1] != 0)))) {
    return -2;
  }
  uVar25 = *puVar2;
  uVar23 = puVar2[0x10];
  uVar15 = puVar2[0x11];
  local_res8 = 0;
  if (uVar25 == 0xb) {
    uVar25 = 0xc;
  }
  *puVar2 = uVar25;
  local_res20 = *(uint *)(param_1 + 3);
  uVar17 = (ulonglong)local_res20;
  local_58 = (byte *)*param_1;
  uVar25 = *(uint *)(param_1 + 1);
  local_50 = (undefined1 *)param_1[2];
  uVar14 = uVar17;
  local_60 = uVar25;
LAB_1401fa372:
  uVar21 = 0;
  uVar11 = 0x10;
  pbVar16 = local_58;
LAB_1401fa377:
  local_res18 = (uint)uVar14;
  puVar19 = local_50;
LAB_1401fa37f:
  uVar13 = 7;
LAB_1401fa384:
  do {
    uVar9 = (uint)uVar11;
    uVar4 = *puVar2;
    uVar20 = (uint)uVar21;
    uVar24 = (uint)uVar14;
    uVar10 = local_64;
    if ((int)uVar4 < 0xf) {
      if (uVar4 == 0xe) {
LAB_1401faa60:
        uVar4 = puVar2[0x12];
        if (uVar4 != 0) {
          if (uVar25 < uVar4) {
            uVar4 = uVar25;
          }
          if (uVar24 < uVar4) {
            uVar4 = uVar24;
          }
          uVar13 = uVar25;
          if (uVar4 != 0) {
            memcpy(puVar19,local_58,(ulonglong)uVar4);
            local_58 = local_58 + uVar4;
            uVar25 = uVar25 - uVar4;
            local_res18 = local_res18 - uVar4;
            local_50 = local_50 + uVar4;
            puVar2[0x12] = puVar2[0x12] - uVar4;
            goto LAB_1401faab6;
          }
          goto LAB_1401fa7da;
        }
        *puVar2 = 0xb;
        pbVar16 = local_58;
        goto LAB_1401fa384;
      }
      if ((int)uVar4 <= (int)uVar13) {
        if (uVar4 == uVar13) goto LAB_1401fa75a;
        if (uVar4 == 0) {
          uVar4 = uVar23;
          if (puVar2[2] != uVar20) goto LAB_1401fa866;
          *puVar2 = 0xc;
          goto LAB_1401fa37f;
        }
        if (uVar4 == 1) goto LAB_1401fa40f;
        if (uVar4 == 2) goto LAB_1401fa4af;
        if (uVar4 == 3) goto LAB_1401fa535;
        if (uVar4 == 4) goto LAB_1401fa593;
        if (uVar4 == 5) goto LAB_1401fa5b3;
        if (uVar4 != 6) {
          return -2;
        }
        goto LAB_1401fa6c1;
      }
      if (uVar4 == 8) goto LAB_1401fa9be;
      if (uVar4 == 9) {
        for (; uVar15 < 0x20; uVar15 = uVar15 + 8) {
          uVar13 = uVar25;
          if (uVar25 == 0) goto LAB_1401fa7da;
          bVar1 = *pbVar16;
          pbVar16 = pbVar16 + 1;
          uVar25 = uVar25 - 1;
          uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
          local_58 = pbVar16;
        }
        uVar23 = (uVar23 >> 8 & 0xff00) + ((uVar23 & 0xff00) + uVar23 * 0x10000) * 0x100 +
                 (uVar23 >> 0x18);
        puVar2[6] = uVar23;
        *(uint *)((longlong)param_1 + 0x4c) = uVar23;
        *puVar2 = 10;
        uVar23 = uVar20;
        uVar15 = uVar20;
LAB_1401fab22:
        if (puVar2[3] == uVar20) {
          param_1[2] = (longlong)puVar19;
          *(uint *)(param_1 + 3) = uVar24;
          *param_1 = (longlong)pbVar16;
          *(uint *)(param_1 + 1) = uVar25;
          puVar2[0x10] = uVar23;
          puVar2[0x11] = uVar15;
          return 2;
        }
        uVar13 = FUN_1401fe8a0(0,0,0);
        uVar17 = (ulonglong)local_res20;
        uVar14 = (ulonglong)local_res18;
        uVar21 = 0;
        puVar2[6] = uVar13;
        *(uint *)((longlong)param_1 + 0x4c) = uVar13;
        *puVar2 = 0xb;
        uVar11 = 0x10;
        puVar19 = local_50;
LAB_1401fab58:
        uVar13 = uVar25;
        uVar10 = local_64;
        if (param_2 == 5) goto LAB_1401fa7da;
      }
      else {
        if (uVar4 == 10) goto LAB_1401fab22;
        if (uVar4 == 0xb) goto LAB_1401fab58;
        if (uVar4 != 0xc) {
          if (uVar4 != 0xd) {
            return -2;
          }
          uVar23 = uVar23 >> (sbyte)(uVar15 & 7);
          for (uVar15 = uVar15 - (uVar15 & 7); uVar15 < 0x20; uVar15 = uVar15 + 8) {
            uVar13 = uVar25;
            if (uVar25 == 0) goto LAB_1401fa7da;
            bVar1 = *pbVar16;
            pbVar16 = pbVar16 + 1;
            uVar25 = uVar25 - 1;
            uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
            local_58 = pbVar16;
          }
          if ((uVar23 & 0xffff) == ~uVar23 >> 0x10) {
            puVar2[0x12] = uVar23 & 0xffff;
            *puVar2 = 0xe;
            uVar13 = 7;
            uVar23 = uVar20;
            uVar15 = uVar20;
            goto LAB_1401faa60;
          }
          pcVar6 = "invalid stored block lengths";
          goto LAB_1401fa984;
        }
      }
      if (puVar2[1] != (uint)uVar21) {
        uVar13 = 7;
        *puVar2 = 0x18;
        uVar23 = uVar23 >> (sbyte)(uVar15 & 7);
        uVar15 = uVar15 - (uVar15 & 7);
        goto LAB_1401fa384;
      }
      goto LAB_1401faba2;
    }
    if (0x16 < (int)uVar4) {
      uVar13 = uVar25;
      if (uVar4 == 0x17) {
        if (uVar24 == 0) goto LAB_1401fa7da;
        *puVar19 = (char)puVar2[0x12];
        local_50 = puVar19 + 1;
        uVar14 = (ulonglong)(uVar24 - 1);
        *puVar2 = 0x12;
        goto LAB_1401fa377;
      }
      if (uVar4 == 0x18) {
        uVar13 = uVar23;
        uVar4 = uVar15;
        if (puVar2[2] != uVar20) goto LAB_1401fb674;
        goto LAB_1401fb70c;
      }
      if (uVar4 == 0x19) goto LAB_1401fb712;
      if (uVar4 == 0x1a) goto LAB_1401fb7b8;
      if (uVar4 != 0x1b) {
        if (uVar4 == 0x1c) {
          return -4;
        }
        return -2;
      }
      local_res8 = -3;
      goto LAB_1401fa7da;
    }
    if (uVar4 == 0x16) goto LAB_1401fb57c;
    if (uVar4 != 0xf) {
      if (uVar4 == 0x10) goto LAB_1401fad73;
      if (uVar4 == 0x11) goto LAB_1401fae64;
      if (uVar4 == 0x12) goto LAB_1401fb185;
      if (uVar4 == 0x13) goto LAB_1401fb35a;
      if (uVar4 == 0x14) goto LAB_1401fb3a8;
      if (uVar4 != 0x15) {
        return -2;
      }
      goto LAB_1401fb514;
    }
    for (; uVar15 < 0xe; uVar15 = uVar15 + 8) {
      uVar13 = uVar25;
      if (uVar25 == 0) goto LAB_1401fa7da;
      bVar1 = *pbVar16;
      pbVar16 = pbVar16 + 1;
      uVar25 = uVar25 - 1;
      uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
      local_58 = pbVar16;
    }
    uVar15 = uVar15 - 0xe;
    uVar24 = uVar23 >> 10;
    uVar13 = (uVar23 & 0x1f) + 0x101;
    uVar4 = (uVar23 >> 5 & 0x1f) + 1;
    uVar23 = uVar23 >> 0xe;
    puVar2[0x1d] = uVar13;
    puVar2[0x1e] = uVar4;
    puVar2[0x1c] = (uVar24 & 0xf) + 4;
    if ((0x11e < uVar13) || (0x1e < uVar4)) {
      pcVar6 = "too many length or distance symbols";
      goto LAB_1401fa91a;
    }
    puVar2[0x1f] = uVar20;
    *puVar2 = 0x10;
LAB_1401fad73:
    while (uVar4 = uVar23, puVar2[0x1f] < puVar2[0x1c]) {
      for (; uVar15 < 3; uVar15 = uVar15 + 8) {
        uVar23 = uVar4;
        uVar13 = uVar25;
        if (uVar25 == 0) goto LAB_1401fa7da;
        bVar1 = *pbVar16;
        pbVar16 = pbVar16 + 1;
        bVar7 = (byte)uVar15;
        uVar25 = uVar25 - 1;
        uVar4 = uVar4 + ((uint)bVar1 << (bVar7 & 0x1f));
        local_58 = pbVar16;
      }
      uVar23 = uVar4 >> 3;
      *(ushort *)
       ((longlong)puVar2 +
       (ulonglong)*(ushort *)(&DAT_14027f010 + (ulonglong)puVar2[0x1f] * 2) * 2 + 0x88) =
           (ushort)uVar4 & 7;
      puVar2[0x1f] = puVar2[0x1f] + 1;
      uVar15 = uVar15 - 3;
    }
    while (puVar2[0x1f] < 0x13) {
      *(short *)((longlong)puVar2 +
                (ulonglong)*(ushort *)(&DAT_14027f010 + (ulonglong)puVar2[0x1f] * 2) * 2 + 0x88) =
           (short)uVar21;
      puVar2[0x1f] = puVar2[0x1f] + 1;
    }
    puVar2[0x1a] = 7;
    *(uint **)(puVar2 + 0x20) = puVar2 + 0x152;
    *(uint **)(puVar2 + 0x16) = puVar2 + 0x152;
    local_res8 = FUN_1401fe438(0,puVar2 + 0x22,0x13,puVar2 + 0x20,puVar2 + 0x1a,puVar2 + 0xc2);
    uVar21 = 0;
    uVar11 = 0x10;
    puVar19 = local_50;
    if (local_res8 != 0) {
      uVar17 = (ulonglong)local_res20;
      uVar14 = (ulonglong)local_res18;
      param_1[4] = (longlong)"invalid code lengths set";
      *puVar2 = 0x1b;
      goto LAB_1401fa37f;
    }
    puVar2[0x1f] = 0;
    *puVar2 = 0x11;
LAB_1401fae64:
    if (puVar2[0x1f] < puVar2[0x1e] + puVar2[0x1d]) {
      do {
        for (; uVar10 = *(uint *)(*(longlong *)(puVar2 + 0x16) +
                                 (ulonglong)((1 << ((byte)puVar2[0x1a] & 0x1f)) - 1U & uVar23) * 4),
            uVar15 < (uVar10 >> 8 & 0xff); uVar15 = uVar15 + 8) {
          uVar13 = uVar25;
          if (uVar25 == 0) goto LAB_1401fa7da;
          bVar1 = *pbVar16;
          pbVar16 = pbVar16 + 1;
          uVar25 = uVar25 - 1;
          uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
          local_58 = pbVar16;
        }
        uVar8 = (ushort)(uVar10 >> 0x10);
        local_64._1_1_ = (byte)(uVar10 >> 8);
        local_64 = uVar10;
        if (uVar8 < (ushort)uVar11) {
          if (uVar15 < (uVar10 >> 8 & 0xff)) {
            do {
              uVar13 = 0;
              if (uVar25 == 0) goto LAB_1401fa7da;
              bVar1 = *pbVar16;
              pbVar16 = pbVar16 + 1;
              bVar7 = (byte)uVar15;
              uVar15 = uVar15 + 8;
              uVar25 = uVar25 - 1;
              uVar23 = uVar23 + ((uint)bVar1 << (bVar7 & 0x1f));
              local_58 = pbVar16;
            } while (uVar15 < local_64._1_1_);
          }
          uVar23 = uVar23 >> (local_64._1_1_ & 0x1f);
          uVar15 = uVar15 - local_64._1_1_;
          *(ushort *)((longlong)puVar2 + (ulonglong)puVar2[0x1f] * 2 + 0x88) = uVar8;
          puVar2[0x1f] = puVar2[0x1f] + 1;
        }
        else {
          if (uVar8 == (ushort)uVar11) {
            for (; uVar15 < local_64._1_1_ + 2; uVar15 = uVar15 + 8) {
              uVar13 = uVar25;
              if (uVar25 == 0) goto LAB_1401fa7da;
              bVar1 = *pbVar16;
              pbVar16 = pbVar16 + 1;
              uVar25 = uVar25 - 1;
              uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
              local_58 = pbVar16;
            }
            uVar15 = uVar15 - local_64._1_1_;
            uVar23 = uVar23 >> (local_64._1_1_ & 0x1f);
            if (puVar2[0x1f] == 0) {
              param_1[4] = (longlong)"invalid bit length repeat";
              *puVar2 = 0x1b;
              goto LAB_1401fa8b5;
            }
            uVar18 = *(undefined2 *)((longlong)puVar2 + (ulonglong)(puVar2[0x1f] - 1) * 2 + 0x88);
            iVar22 = (uVar23 & 3) + 3;
            uVar15 = uVar15 - 2;
            uVar23 = uVar23 >> 2;
          }
          else {
            if (uVar8 == 0x11) {
              for (; uVar15 < local_64._1_1_ + 3; uVar15 = uVar15 + 8) {
                uVar13 = uVar25;
                if (uVar25 == 0) goto LAB_1401fa7da;
                bVar1 = *pbVar16;
                pbVar16 = pbVar16 + 1;
                uVar25 = uVar25 - 1;
                uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
                local_58 = pbVar16;
              }
              iVar5 = -3;
              uVar23 = uVar23 >> (local_64._1_1_ & 0x1f);
              iVar22 = (uVar23 & 7) + 3;
              uVar23 = uVar23 >> 3;
            }
            else {
              for (; uVar15 < local_64._1_1_ + 7; uVar15 = uVar15 + 8) {
                uVar13 = uVar25;
                if (uVar25 == 0) goto LAB_1401fa7da;
                bVar1 = *pbVar16;
                pbVar16 = pbVar16 + 1;
                uVar25 = uVar25 - 1;
                uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
                local_58 = pbVar16;
              }
              iVar5 = -7;
              uVar23 = uVar23 >> (local_64._1_1_ & 0x1f);
              iVar22 = (uVar23 & 0x7f) + 0xb;
              uVar23 = uVar23 >> 7;
            }
            uVar18 = (undefined2)uVar21;
            uVar15 = uVar15 + (iVar5 - (uint)local_64._1_1_);
          }
          if (puVar2[0x1e] + puVar2[0x1d] < iVar22 + puVar2[0x1f]) {
            param_1[4] = (longlong)"invalid bit length repeat";
            *puVar2 = 0x1b;
            break;
          }
          for (; iVar22 != 0; iVar22 = iVar22 + -1) {
            *(undefined2 *)((longlong)puVar2 + (ulonglong)puVar2[0x1f] * 2 + 0x88) = uVar18;
            puVar2[0x1f] = puVar2[0x1f] + 1;
          }
          uVar11 = 0x10;
        }
      } while (puVar2[0x1f] < puVar2[0x1e] + puVar2[0x1d]);
    }
    uVar17 = (ulonglong)local_res20;
    uVar14 = (ulonglong)local_res18;
    uVar11 = 0x10;
    uVar13 = 7;
  } while (*puVar2 == 0x1b);
  *(uint **)(puVar2 + 0x20) = puVar2 + 0x152;
  *(uint **)(puVar2 + 0x16) = puVar2 + 0x152;
  puVar2[0x1a] = 9;
  local_res8 = FUN_1401fe438(1,puVar2 + 0x22,puVar2[0x1d],puVar2 + 0x20,puVar2 + 0x1a,puVar2 + 0xc2)
  ;
  if (local_res8 != 0) {
    param_1[4] = (longlong)"invalid literal/lengths set";
    *puVar2 = 0x1b;
    pbVar16 = local_58;
    goto LAB_1401fa8b1;
  }
  *(undefined8 *)(puVar2 + 0x18) = *(undefined8 *)(puVar2 + 0x20);
  puVar2[0x1b] = 6;
  local_res8 = FUN_1401fe438(2,(longlong)puVar2 + (ulonglong)puVar2[0x1d] * 2 + 0x88,puVar2[0x1e],
                             puVar2 + 0x20,puVar2 + 0x1b,puVar2 + 0xc2);
  uVar17 = (ulonglong)local_res20;
  uVar14 = (ulonglong)local_res18;
  uVar21 = 0;
  puVar19 = local_50;
  pbVar16 = local_58;
  if (local_res8 != 0) {
    pcVar6 = "invalid distances set";
    goto LAB_1401fa91a;
  }
  *puVar2 = 0x12;
  uVar24 = local_res18;
LAB_1401fb185:
  if ((5 < uVar25) && (0x101 < uVar24)) {
    param_1[2] = (longlong)puVar19;
    *(uint *)(param_1 + 3) = uVar24;
    *param_1 = (longlong)pbVar16;
    *(uint *)(param_1 + 1) = uVar25;
    puVar2[0x10] = uVar23;
    puVar2[0x11] = uVar15;
    FUN_1401fdfd8(param_1,uVar17 & 0xffffffff);
    local_58 = (byte *)*param_1;
    local_50 = (undefined1 *)param_1[2];
    local_res18 = *(uint *)(param_1 + 3);
    uVar25 = *(uint *)(param_1 + 1);
    uVar23 = puVar2[0x10];
    uVar15 = puVar2[0x11];
LAB_1401faab6:
    uVar14 = (ulonglong)local_res18;
    uVar17 = (ulonglong)local_res20;
    goto LAB_1401fa372;
  }
  uVar10 = *(uint *)(*(longlong *)(puVar2 + 0x16) +
                    (ulonglong)((1 << ((byte)puVar2[0x1a] & 0x1f)) - 1U & uVar23) * 4);
  for (; uVar15 < (uVar10 >> 8 & 0xff); uVar15 = uVar15 + 8) {
    uVar13 = uVar25;
    uVar10 = local_64;
    if (uVar25 == 0) goto LAB_1401fa7da;
    bVar1 = *pbVar16;
    pbVar16 = pbVar16 + 1;
    uVar25 = uVar25 - 1;
    uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
    uVar10 = *(uint *)(*(longlong *)(puVar2 + 0x16) +
                      (ulonglong)((1 << ((byte)puVar2[0x1a] & 0x1f)) - 1U & uVar23) * 4);
    local_58 = pbVar16;
  }
  cVar3 = (char)uVar10;
  uVar13 = uVar10;
  if ((cVar3 != '\0') && ((uVar10 & 0xf0) == 0)) {
    bVar1 = (byte)(uVar10 >> 8);
    uVar13 = *(uint *)(*(longlong *)(puVar2 + 0x16) +
                      (ulonglong)
                      ((((1 << (cVar3 + bVar1 & 0x1f)) - 1U & uVar23) >> (bVar1 & 0x1f)) +
                      (uVar10 >> 0x10)) * 4);
    uVar4 = (uVar13 >> 8 & 0xff) + (uVar10 >> 8 & 0xff);
    for (; uVar15 < uVar4; uVar15 = uVar15 + 8) {
      uVar13 = uVar25;
      if (uVar25 == 0) goto LAB_1401fa7da;
      uVar23 = uVar23 + ((uint)*pbVar16 << ((byte)uVar15 & 0x1f));
      pbVar16 = pbVar16 + 1;
      uVar25 = uVar25 - 1;
      uVar13 = *(uint *)(*(longlong *)(puVar2 + 0x16) +
                        (ulonglong)
                        ((((1 << (cVar3 + bVar1 & 0x1f)) - 1U & uVar23) >> (bVar1 & 0x1f)) +
                        (uVar10 >> 0x10)) * 4);
      uVar4 = (uVar13 >> 8 & 0xff) + (uint)bVar1;
      local_58 = pbVar16;
    }
    uVar23 = uVar23 >> (bVar1 & 0x1f);
    uVar15 = uVar15 - bVar1;
    local_64 = uVar10;
  }
  uVar23 = uVar23 >> ((byte)(uVar13 >> 8) & 0x1f);
  uVar15 = uVar15 - (uVar13 >> 8 & 0xff);
  puVar2[0x12] = uVar13 >> 0x10;
  if ((char)uVar13 == '\0') {
    *puVar2 = 0x17;
    goto LAB_1401fa8b1;
  }
  if ((uVar13 & 0x20) != 0) {
    *puVar2 = 0xb;
    goto LAB_1401fa8b1;
  }
  if ((uVar13 & 0x40) != 0) {
    param_1[4] = (longlong)"invalid literal/length code";
    *puVar2 = 0x1b;
    goto LAB_1401fa8b1;
  }
  *puVar2 = 0x13;
  puVar2[0x14] = uVar13 & 0xf;
LAB_1401fb35a:
  uVar4 = puVar2[0x14];
  if (uVar4 != 0) {
    if (uVar15 < uVar4) {
      do {
        uVar13 = 0;
        uVar10 = local_64;
        if (uVar25 == 0) goto LAB_1401fa7da;
        bVar1 = *pbVar16;
        pbVar16 = pbVar16 + 1;
        bVar7 = (byte)uVar15;
        uVar15 = uVar15 + 8;
        uVar25 = uVar25 - 1;
        uVar23 = uVar23 + ((uint)bVar1 << (bVar7 & 0x1f));
        local_58 = pbVar16;
      } while (uVar15 < puVar2[0x14]);
    }
    uVar13 = (1 << ((byte)uVar4 & 0x1f)) - 1U & uVar23;
    uVar23 = uVar23 >> ((byte)uVar4 & 0x1f);
    puVar2[0x12] = puVar2[0x12] + uVar13;
    uVar15 = uVar15 - uVar4;
  }
  *puVar2 = 0x14;
LAB_1401fb3a8:
  uVar10 = *(uint *)(*(longlong *)(puVar2 + 0x18) +
                    (ulonglong)((1 << ((byte)puVar2[0x1b] & 0x1f)) - 1U & uVar23) * 4);
  for (; uVar15 < (uVar10 >> 8 & 0xff); uVar15 = uVar15 + 8) {
    uVar13 = uVar25;
    uVar10 = local_64;
    if (uVar25 == 0) goto LAB_1401fa7da;
    bVar1 = *pbVar16;
    pbVar16 = pbVar16 + 1;
    uVar25 = uVar25 - 1;
    uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
    uVar10 = *(uint *)(*(longlong *)(puVar2 + 0x18) +
                      (ulonglong)((1 << ((byte)puVar2[0x1b] & 0x1f)) - 1U & uVar23) * 4);
    local_58 = pbVar16;
  }
  uVar13 = uVar10;
  if ((uVar10 & 0xf0) == 0) {
    bVar1 = (byte)(uVar10 >> 8);
    uVar13 = *(uint *)(*(longlong *)(puVar2 + 0x18) +
                      (ulonglong)
                      ((((1 << ((char)uVar10 + bVar1 & 0x1f)) - 1U & uVar23) >> (bVar1 & 0x1f)) +
                      (uVar10 >> 0x10)) * 4);
    uVar4 = (uVar13 >> 8 & 0xff) + (uVar10 >> 8 & 0xff);
    for (; uVar15 < uVar4; uVar15 = uVar15 + 8) {
      uVar13 = uVar25;
      if (uVar25 == 0) goto LAB_1401fa7da;
      uVar23 = uVar23 + ((uint)*pbVar16 << ((byte)uVar15 & 0x1f));
      pbVar16 = pbVar16 + 1;
      uVar25 = uVar25 - 1;
      uVar13 = *(uint *)(*(longlong *)(puVar2 + 0x18) +
                        (ulonglong)
                        ((((1 << ((char)uVar10 + bVar1 & 0x1f)) - 1U & uVar23) >> (bVar1 & 0x1f)) +
                        (uVar10 >> 0x10)) * 4);
      uVar4 = (uVar13 >> 8 & 0xff) + (uint)bVar1;
      local_58 = pbVar16;
    }
    uVar23 = uVar23 >> (bVar1 & 0x1f);
    uVar15 = uVar15 - bVar1;
    local_64 = uVar10;
  }
  uVar17 = (ulonglong)local_res20;
  uVar14 = (ulonglong)local_res18;
  uVar23 = uVar23 >> ((byte)(uVar13 >> 8) & 0x1f);
  uVar15 = uVar15 - (uVar13 >> 8 & 0xff);
  if ((uVar13 & 0x40) != 0) {
    param_1[4] = (longlong)"invalid distance code";
    *puVar2 = 0x1b;
    goto LAB_1401fac8c;
  }
  *puVar2 = 0x15;
  puVar2[0x13] = uVar13 >> 0x10;
  uVar21 = 0;
  puVar2[0x14] = uVar13 & 0xf;
  puVar19 = local_50;
LAB_1401fb514:
  uVar24 = (uint)uVar14;
  uVar4 = puVar2[0x14];
  if (uVar4 != 0) {
    if (uVar15 < uVar4) {
      do {
        uVar13 = 0;
        uVar10 = local_64;
        if (uVar25 == 0) goto LAB_1401fa7da;
        bVar1 = *pbVar16;
        pbVar16 = pbVar16 + 1;
        bVar7 = (byte)uVar15;
        uVar15 = uVar15 + 8;
        uVar25 = uVar25 - 1;
        uVar23 = uVar23 + ((uint)bVar1 << (bVar7 & 0x1f));
        local_58 = pbVar16;
      } while (uVar15 < puVar2[0x14]);
    }
    uVar13 = (1 << ((byte)uVar4 & 0x1f)) - 1U & uVar23;
    uVar23 = uVar23 >> ((byte)uVar4 & 0x1f);
    puVar2[0x13] = puVar2[0x13] + uVar13;
    uVar15 = uVar15 - uVar4;
  }
  if ((puVar2[0xc] - uVar24) + (int)uVar17 < puVar2[0x13]) {
    pcVar6 = "invalid distance too far back";
    goto LAB_1401fa91a;
  }
  *puVar2 = 0x16;
LAB_1401fb57c:
  uVar13 = uVar25;
  uVar10 = local_64;
  if (uVar24 == 0) goto LAB_1401fa7da;
  uVar4 = puVar2[0x13];
  uVar13 = (int)uVar17 - uVar24;
  if (uVar13 < uVar4) {
    uVar4 = uVar4 - uVar13;
    uVar10 = puVar2[0xd];
    if (uVar10 < uVar4) {
      uVar4 = uVar4 - uVar10;
      uVar10 = puVar2[0xb] - uVar4;
    }
    else {
      uVar10 = uVar10 - uVar4;
    }
    uVar13 = puVar2[0x12];
    lVar12 = (ulonglong)uVar10 + *(longlong *)(puVar2 + 0xe);
    if (uVar4 <= uVar13) goto LAB_1401fb5cc;
  }
  else {
    lVar12 = (longlong)puVar19 - (ulonglong)uVar4;
    uVar13 = puVar2[0x12];
  }
  uVar4 = uVar13;
  uVar13 = uVar4;
LAB_1401fb5cc:
  if (uVar24 < uVar4) {
    uVar4 = uVar24;
  }
  local_res18 = uVar24 - uVar4;
  uVar14 = (ulonglong)local_res18;
  lVar12 = lVar12 - (longlong)puVar19;
  puVar2[0x12] = uVar13 - uVar4;
  do {
    uVar13 = uVar4;
    *puVar19 = puVar19[lVar12];
    puVar19 = puVar19 + 1;
    uVar4 = uVar13 - 1;
  } while (uVar13 - 1 != 0);
  uVar11 = (ulonglong)(uVar13 + 0xf);
  uVar13 = uVar13 + 6;
  local_50 = puVar19;
  if (puVar2[0x12] == (uint)uVar21) {
    *puVar2 = 0x12;
  }
  goto LAB_1401fa384;
LAB_1401fb674:
  if (0x1f < uVar15) goto code_r0x0001401fb679;
  uVar13 = uVar25;
  if (uVar25 == 0) goto LAB_1401fa7da;
  bVar1 = *pbVar16;
  pbVar16 = pbVar16 + 1;
  uVar25 = uVar25 - 1;
  uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
  uVar15 = uVar15 + 8;
  local_58 = pbVar16;
  goto LAB_1401fb674;
code_r0x0001401fb679:
  uVar24 = (int)uVar17 - uVar24;
  *(int *)((longlong)param_1 + 0x1c) = *(int *)((longlong)param_1 + 0x1c) + uVar24;
  puVar2[7] = puVar2[7] + uVar24;
  if (uVar24 != 0) {
    if (puVar2[4] == uVar20) {
      uVar13 = FUN_1401fe8a0(puVar2[6],(longlong)puVar19 - (ulonglong)uVar24);
    }
    else {
      uVar13 = FUN_1401ff42c();
    }
    uVar14 = (ulonglong)local_res18;
    uVar21 = 0;
    puVar2[6] = uVar13;
    uVar11 = 0x10;
    *(uint *)((longlong)param_1 + 0x4c) = uVar13;
    puVar19 = local_50;
  }
  local_res20 = (uint)uVar14;
  uVar17 = uVar14 & 0xffffffff;
  uVar13 = (uint)uVar21;
  uVar10 = ((uVar23 & 0xff00) + uVar23 * 0x10000) * 0x100 + (uVar23 >> 8 & 0xff00) +
           (uVar23 >> 0x18);
  if (puVar2[4] != uVar13) {
    uVar10 = uVar23;
  }
  uVar4 = uVar13;
  if (uVar10 == puVar2[6]) {
LAB_1401fb70c:
    uVar15 = uVar4;
    uVar23 = uVar13;
    *puVar2 = 0x19;
LAB_1401fb712:
    uVar24 = (uint)uVar21;
    uVar13 = uVar23;
    uVar4 = uVar15;
    if ((puVar2[2] != uVar24) && (puVar2[4] != uVar24)) {
      for (; uVar15 < 0x20; uVar15 = uVar15 + 8) {
        uVar13 = uVar25;
        uVar10 = local_64;
        if (uVar25 == 0) goto LAB_1401fa7da;
        bVar1 = *pbVar16;
        pbVar16 = pbVar16 + 1;
        uVar25 = uVar25 - 1;
        uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
        local_58 = pbVar16;
      }
      uVar13 = uVar24;
      uVar4 = uVar24;
      if (uVar23 != puVar2[7]) {
        pcVar6 = "incorrect length check";
        goto LAB_1401fa984;
      }
    }
    uVar15 = uVar4;
    uVar23 = uVar13;
    *puVar2 = 0x1a;
LAB_1401fb7b8:
    local_res8 = 1;
    uVar13 = uVar25;
    uVar10 = local_64;
LAB_1401fa7da:
    local_64 = uVar10;
    *(uint *)(param_1 + 1) = uVar13;
    param_1[2] = (longlong)local_50;
    *(uint *)(param_1 + 3) = local_res18;
    *param_1 = (longlong)local_58;
    puVar2[0x10] = uVar23;
    iVar22 = 0;
    puVar2[0x11] = uVar15;
    if (((puVar2[0xb] != 0) || (((int)*puVar2 < 0x18 && (local_res20 != *(uint *)(param_1 + 3)))))
       && (iVar5 = FUN_1401fa1dc(param_1,local_res20), iVar5 != 0)) {
      *puVar2 = 0x1c;
      return -4;
    }
    local_res20 = local_res20 - (int)param_1[3];
    iVar5 = local_60 - (int)param_1[1];
    *(int *)((longlong)param_1 + 0x1c) = *(int *)((longlong)param_1 + 0x1c) + local_res20;
    *(int *)((longlong)param_1 + 0xc) = *(int *)((longlong)param_1 + 0xc) + iVar5;
    puVar2[7] = puVar2[7] + local_res20;
    if ((puVar2[2] != 0) && (local_res20 != 0)) {
      if (puVar2[4] == 0) {
        uVar25 = FUN_1401fe8a0(puVar2[6],param_1[2] - (ulonglong)local_res20,local_res20);
      }
      else {
        uVar25 = FUN_1401ff42c();
      }
      puVar2[6] = uVar25;
      *(uint *)((longlong)param_1 + 0x4c) = uVar25;
    }
    if (*puVar2 == 0xb) {
      iVar22 = 0x80;
    }
    *(uint *)(param_1 + 9) = (-(uint)(puVar2[1] != 0) & 0x40) + iVar22 + puVar2[0x11];
    if (((iVar5 != 0) || (local_res20 != 0)) && (param_2 != 4)) {
      return local_res8;
    }
    if (local_res8 == 0) {
      return -5;
    }
    return local_res8;
  }
  pcVar6 = "incorrect data check";
  goto LAB_1401fa984;
LAB_1401fa866:
  uVar23 = uVar4;
  if (uVar9 <= uVar15) goto code_r0x0001401fa86a;
  uVar13 = uVar25;
  if (uVar25 == 0) goto LAB_1401fa7da;
  bVar1 = *pbVar16;
  pbVar16 = pbVar16 + 1;
  uVar25 = uVar25 - 1;
  uVar4 = uVar4 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
  uVar15 = uVar15 + 8;
  local_58 = pbVar16;
  goto LAB_1401fa866;
code_r0x0001401fa86a:
  if (((puVar2[2] & 2) != 0) && (uVar4 == 0x8b1f)) {
    uVar23 = FUN_1401ff42c(0,0,0);
    puVar2[6] = uVar23;
    local_68 = 0x8b1f;
    uVar23 = FUN_1401ff42c(puVar2[6],&local_68,2);
    *puVar2 = 1;
    puVar2[6] = uVar23;
LAB_1401fa8a8:
    uVar23 = 0;
    uVar15 = uVar23;
LAB_1401fa8b1:
    uVar21 = 0;
    puVar19 = local_50;
LAB_1401fa8b5:
    uVar17 = (ulonglong)local_res20;
    uVar14 = (ulonglong)local_res18;
LAB_1401fa8bd:
    uVar11 = 0x10;
    goto LAB_1401fa37f;
  }
  puVar2[4] = uVar20;
  if (*(longlong *)(puVar2 + 8) != 0) {
    *(undefined4 *)(*(longlong *)(puVar2 + 8) + 0x40) = 0xffffffff;
  }
  if ((puVar2[2] & 1) != 0) {
    uVar13 = (uVar4 & 0xff) * 0x100 + (uVar4 >> 8);
    if (uVar13 == (uVar13 / 0x1f) * 0x1f) {
      if (((byte)uVar4 & 0xf) == 8) {
        uVar23 = uVar4 >> 4;
        uVar15 = uVar15 - 4;
        uVar13 = (uVar23 & 0xf) + 8;
        if (uVar13 <= puVar2[10]) {
          puVar2[5] = 1 << (sbyte)uVar13;
          uVar23 = FUN_1401fe8a0(0,0,0);
          puVar2[6] = uVar23;
          *(uint *)((longlong)param_1 + 0x4c) = uVar23;
          *puVar2 = ~(uVar4 >> 0xc) & 2 | 9;
          goto LAB_1401fa8a8;
        }
        pcVar6 = "invalid window size";
      }
      else {
        pcVar6 = "unknown compression method";
      }
LAB_1401fa91a:
      param_1[4] = (longlong)pcVar6;
      *puVar2 = 0x1b;
      goto LAB_1401fa8bd;
    }
    uVar11 = 0x10;
  }
  pcVar6 = "incorrect header check";
  goto LAB_1401fa984;
LAB_1401fa40f:
  if (uVar9 <= uVar15) goto code_r0x0001401fa413;
  uVar13 = uVar25;
  if (uVar25 == 0) goto LAB_1401fa7da;
  bVar1 = *pbVar16;
  pbVar16 = pbVar16 + 1;
  uVar25 = uVar25 - 1;
  uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
  uVar15 = uVar15 + 8;
  local_58 = pbVar16;
  goto LAB_1401fa40f;
code_r0x0001401fa413:
  puVar2[4] = uVar23;
  if ((char)uVar23 == '\b') {
    if ((uVar23 & 0xe000) == 0) {
      if (*(uint **)(puVar2 + 8) != (uint *)0x0) {
        **(uint **)(puVar2 + 8) = uVar23 >> 8 & 1;
      }
      if ((puVar2[4] & 0x200) != 0) {
        local_68 = (undefined2)uVar23;
        uVar23 = FUN_1401ff42c(puVar2[6],&local_68,2);
        uVar21 = 0;
        puVar2[6] = uVar23;
      }
      uVar23 = (uint)uVar21;
      *puVar2 = 2;
      uVar15 = uVar23;
LAB_1401fa4af:
      do {
        if (0x1f < uVar15) goto code_r0x0001401fa4b4;
        uVar13 = uVar25;
        uVar10 = local_64;
        if (uVar25 == 0) goto LAB_1401fa7da;
        bVar1 = *pbVar16;
        pbVar16 = pbVar16 + 1;
        uVar25 = uVar25 - 1;
        uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
        uVar15 = uVar15 + 8;
        local_58 = pbVar16;
      } while( true );
    }
    pcVar6 = "unknown header flags set";
  }
  else {
    pcVar6 = "unknown compression method";
  }
LAB_1401fa984:
  param_1[4] = (longlong)pcVar6;
  *puVar2 = 0x1b;
  goto LAB_1401fa37f;
code_r0x0001401fa4b4:
  if (*(longlong *)(puVar2 + 8) != 0) {
    *(uint *)(*(longlong *)(puVar2 + 8) + 4) = uVar23;
  }
  if ((puVar2[4] & 0x200) != 0) {
    local_68 = (undefined2)uVar23;
    local_65 = (undefined1)(uVar23 >> 0x18);
    local_66 = (undefined1)(uVar23 >> 0x10);
    uVar23 = FUN_1401ff42c(puVar2[6],&local_68,4);
    uVar21 = 0;
    puVar2[6] = uVar23;
  }
  uVar23 = (uint)uVar21;
  *puVar2 = 3;
  uVar11 = 0x10;
  uVar15 = uVar23;
LAB_1401fa535:
  do {
    uVar9 = (uint)uVar11;
    if (uVar9 <= uVar15) break;
    uVar13 = uVar25;
    uVar10 = local_64;
    if (uVar25 == 0) goto LAB_1401fa7da;
    bVar1 = *pbVar16;
    pbVar16 = pbVar16 + 1;
    uVar25 = uVar25 - 1;
    uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
    uVar15 = uVar15 + 8;
    local_58 = pbVar16;
  } while( true );
  if (*(longlong *)(puVar2 + 8) != 0) {
    *(uint *)(*(longlong *)(puVar2 + 8) + 8) = uVar23 & 0xff;
    *(uint *)(*(longlong *)(puVar2 + 8) + 0xc) = uVar23 >> 8;
  }
  if ((puVar2[4] & 0x200) != 0) {
    local_68 = (undefined2)uVar23;
    uVar23 = FUN_1401ff42c(puVar2[6],&local_68,2);
    uVar21 = 0;
    puVar2[6] = uVar23;
    uVar9 = 0x10;
  }
  uVar23 = (uint)uVar21;
  *puVar2 = 4;
  uVar15 = uVar23;
LAB_1401fa593:
  if ((puVar2[4] & 0x400) == 0) {
    if (*(longlong *)(puVar2 + 8) != 0) {
      *(ulonglong *)(*(longlong *)(puVar2 + 8) + 0x10) = uVar21;
    }
  }
  else {
    for (; uVar15 < uVar9; uVar15 = uVar15 + 8) {
      uVar13 = uVar25;
      uVar10 = local_64;
      if (uVar25 == 0) goto LAB_1401fa7da;
      bVar1 = *pbVar16;
      pbVar16 = pbVar16 + 1;
      uVar25 = uVar25 - 1;
      uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
      local_58 = pbVar16;
    }
    puVar2[0x12] = uVar23;
    if (*(longlong *)(puVar2 + 8) != 0) {
      *(uint *)(*(longlong *)(puVar2 + 8) + 0x18) = uVar23;
    }
    if ((puVar2[4] & 0x200) != 0) {
      local_68 = (undefined2)uVar23;
      uVar23 = FUN_1401ff42c(puVar2[6],&local_68,2);
      uVar21 = 0;
      puVar2[6] = uVar23;
    }
    uVar23 = (uint)uVar21;
    uVar15 = uVar23;
  }
  *puVar2 = 5;
LAB_1401fa5b3:
  if ((puVar2[4] & 0x400) != 0) {
    uVar13 = puVar2[0x12];
    if (uVar25 < puVar2[0x12]) {
      uVar13 = uVar25;
    }
    if (uVar13 != 0) {
      lVar12 = *(longlong *)(puVar2 + 8);
      if ((lVar12 != 0) && (*(longlong *)(lVar12 + 0x10) != 0)) {
        uVar10 = *(int *)(lVar12 + 0x18) - puVar2[0x12];
        uVar4 = uVar13;
        if (*(uint *)(lVar12 + 0x1c) < uVar13 + uVar10) {
          uVar4 = *(uint *)(lVar12 + 0x1c) - uVar10;
        }
        memcpy((void *)((ulonglong)uVar10 + *(longlong *)(lVar12 + 0x10)),pbVar16,(ulonglong)uVar4);
      }
      if ((puVar2[4] & 0x200) != 0) {
        uVar4 = FUN_1401ff42c(puVar2[6],pbVar16,uVar13);
        puVar2[6] = uVar4;
      }
      puVar2[0x12] = puVar2[0x12] - uVar13;
      uVar25 = uVar25 - uVar13;
      pbVar16 = pbVar16 + uVar13;
      uVar21 = 0;
      local_58 = pbVar16;
    }
    uVar13 = uVar25;
    uVar10 = local_64;
    if (puVar2[0x12] != (uint)uVar21) goto LAB_1401fa7da;
  }
  puVar2[0x12] = (uint)uVar21;
  *puVar2 = 6;
LAB_1401fa6c1:
  if ((puVar2[4] & 0x800) == 0) {
    if (*(longlong *)(puVar2 + 8) != 0) {
      *(ulonglong *)(*(longlong *)(puVar2 + 8) + 0x20) = uVar21;
    }
  }
  else {
    uVar13 = uVar25;
    uVar10 = local_64;
    if (uVar25 == 0) goto LAB_1401fa7da;
    uVar14 = uVar21 & 0xffffffff;
    do {
      lVar12 = *(longlong *)(puVar2 + 8);
      bVar1 = *pbVar16;
      uVar13 = (int)uVar14 + 1;
      uVar14 = (ulonglong)uVar13;
      pbVar16 = pbVar16 + 1;
      if (((lVar12 != 0) && (*(longlong *)(lVar12 + 0x20) != 0)) &&
         (puVar2[0x12] < *(uint *)(lVar12 + 0x28))) {
        *(byte *)((ulonglong)puVar2[0x12] + *(longlong *)(lVar12 + 0x20)) = bVar1;
        puVar2[0x12] = puVar2[0x12] + 1;
      }
    } while ((bVar1 != 0) && (uVar13 < uVar25));
    if ((puVar2[4] & 0x200) != 0) {
      uVar4 = FUN_1401ff42c(puVar2[6],local_58,uVar14);
      uVar21 = 0;
      puVar2[6] = uVar4;
    }
    uVar25 = uVar25 - uVar13;
    pbVar16 = local_58 + uVar14;
    uVar13 = uVar25;
    uVar10 = local_64;
    local_58 = pbVar16;
    if (bVar1 != 0) goto LAB_1401fa7da;
  }
  puVar2[0x12] = (uint)uVar21;
  *puVar2 = 7;
LAB_1401fa75a:
  if ((puVar2[4] & 0x1000) == 0) {
    if (*(longlong *)(puVar2 + 8) != 0) {
      *(ulonglong *)(*(longlong *)(puVar2 + 8) + 0x30) = uVar21;
    }
  }
  else {
    uVar13 = uVar25;
    uVar10 = local_64;
    if (uVar25 == 0) goto LAB_1401fa7da;
    uVar14 = uVar21 & 0xffffffff;
    do {
      lVar12 = *(longlong *)(puVar2 + 8);
      bVar1 = *pbVar16;
      uVar13 = (int)uVar14 + 1;
      uVar14 = (ulonglong)uVar13;
      pbVar16 = pbVar16 + 1;
      if (((lVar12 != 0) && (*(longlong *)(lVar12 + 0x30) != 0)) &&
         (puVar2[0x12] < *(uint *)(lVar12 + 0x38))) {
        *(byte *)((ulonglong)puVar2[0x12] + *(longlong *)(lVar12 + 0x30)) = bVar1;
        puVar2[0x12] = puVar2[0x12] + 1;
      }
    } while ((bVar1 != 0) && (uVar13 < uVar25));
    if ((puVar2[4] & 0x200) != 0) {
      uVar4 = FUN_1401ff42c(puVar2[6],local_58,uVar14);
      uVar21 = 0;
      puVar2[6] = uVar4;
    }
    uVar25 = uVar25 - uVar13;
    local_58 = local_58 + uVar14;
    uVar13 = uVar25;
    uVar10 = local_64;
    if (bVar1 != 0) goto LAB_1401fa7da;
  }
  uVar17 = (ulonglong)local_res20;
  uVar14 = (ulonglong)local_res18;
  *puVar2 = 8;
  uVar11 = 0x10;
  puVar19 = local_50;
  pbVar16 = local_58;
LAB_1401fa9be:
  if ((puVar2[4] & 0x200) != 0) {
    for (; uVar15 < (uint)uVar11; uVar15 = uVar15 + 8) {
      uVar13 = uVar25;
      uVar10 = local_64;
      if (uVar25 == 0) goto LAB_1401fa7da;
      bVar1 = *pbVar16;
      pbVar16 = pbVar16 + 1;
      uVar25 = uVar25 - 1;
      uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
      local_58 = pbVar16;
    }
    if (uVar23 != (ushort)puVar2[6]) {
      pcVar6 = "header crc mismatch";
      goto LAB_1401fa984;
    }
    uVar23 = (uint)uVar21;
    uVar15 = uVar23;
  }
  if (*(longlong *)(puVar2 + 8) != 0) {
    *(uint *)(*(longlong *)(puVar2 + 8) + 0x3c) = (int)puVar2[4] >> 9 & 1;
    *(undefined4 *)(*(longlong *)(puVar2 + 8) + 0x40) = 1;
  }
  uVar13 = FUN_1401ff42c(0,0,0);
  puVar2[6] = uVar13;
  *(uint *)((longlong)param_1 + 0x4c) = uVar13;
  *puVar2 = 0xb;
LAB_1401fac8c:
  uVar14 = (ulonglong)local_res18;
  uVar17 = (ulonglong)local_res20;
  uVar21 = 0;
  puVar19 = local_50;
  goto LAB_1401fa8bd;
LAB_1401faba2:
  if (2 < uVar15) goto code_r0x0001401faba7;
  uVar13 = uVar25;
  uVar10 = local_64;
  if (uVar25 == 0) goto LAB_1401fa7da;
  bVar1 = *pbVar16;
  pbVar16 = pbVar16 + 1;
  uVar25 = uVar25 - 1;
  uVar23 = uVar23 + ((uint)bVar1 << ((byte)uVar15 & 0x1f));
  uVar15 = uVar15 + 8;
  local_58 = pbVar16;
  goto LAB_1401faba2;
code_r0x0001401faba7:
  puVar2[1] = uVar23 & 1;
  uVar13 = uVar23 >> 1 & 3;
  if (uVar13 == 0) {
    *puVar2 = 0xd;
  }
  else if (uVar13 == 1) {
    FUN_1401fa1ac(puVar2);
    *puVar2 = 0x12;
  }
  else if (uVar13 == 2) {
    *puVar2 = 0xf;
  }
  else if (uVar13 == 3) {
    param_1[4] = (longlong)"invalid block type";
    *puVar2 = 0x1b;
  }
  uVar23 = uVar23 >> 3;
  uVar15 = uVar15 - 3;
  goto LAB_1401fa37f;
}



undefined8 FUN_1401fb85c(longlong param_1)

{
  undefined8 uVar1;
  
  if (((param_1 == 0) || (*(longlong *)(param_1 + 0x28) == 0)) ||
     (*(code **)(param_1 + 0x38) == (code *)0x0)) {
    uVar1 = 0xfffffffe;
  }
  else {
    if (*(longlong *)(*(longlong *)(param_1 + 0x28) + 0x38) != 0) {
      (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40));
    }
    (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40),*(undefined8 *)(param_1 + 0x28));
    *(undefined8 *)(param_1 + 0x28) = 0;
    uVar1 = 0;
  }
  return uVar1;
}



undefined8 FUN_1401fb8bc(longlong param_1,void *param_2,uint param_3)

{
  int *piVar1;
  undefined4 uVar2;
  int iVar3;
  undefined8 uVar4;
  ulonglong _Size;
  
  _Size = (ulonglong)param_3;
  if ((param_1 == 0) || (piVar1 = *(int **)(param_1 + 0x28), piVar1 == (int *)0x0)) {
    return 0xfffffffe;
  }
  if (piVar1[2] == 0) {
    if (*piVar1 != 10) goto LAB_1401fb936;
  }
  else if (*piVar1 != 10) {
    return 0xfffffffe;
  }
  uVar2 = FUN_1401fe8a0(0,0,0);
  iVar3 = FUN_1401fe8a0(uVar2,param_2,_Size);
  if (iVar3 != piVar1[6]) {
    return 0xfffffffd;
  }
LAB_1401fb936:
  iVar3 = FUN_1401fa1dc(param_1,*(undefined4 *)(param_1 + 0x18));
  if (iVar3 == 0) {
    if ((uint)piVar1[0xb] < param_3) {
      memcpy(*(void **)(piVar1 + 0xe),(void *)((_Size - (uint)piVar1[0xb]) + (longlong)param_2),
             (ulonglong)(uint)piVar1[0xb]);
      piVar1[0xc] = piVar1[0xb];
    }
    else {
      memcpy((void *)((longlong)*(void **)(piVar1 + 0xe) + ((uint)piVar1[0xb] - _Size)),param_2,
             _Size);
      piVar1[0xc] = param_3;
    }
    piVar1[3] = 1;
    uVar4 = 0;
  }
  else {
    *piVar1 = 0x1c;
    uVar4 = 0xfffffffc;
  }
  return uVar4;
}



uint FUN_1401fb9dc(uint *param_1,byte *param_2,uint param_3)

{
  uint uVar1;
  uint uVar2;
  
  uVar1 = *param_1;
  uVar2 = 0;
  if (param_3 != 0) {
    do {
      if (3 < uVar1) break;
      if (*param_2 == (byte)~-(uVar1 < 2)) {
        uVar1 = uVar1 + 1;
      }
      else if (*param_2 == 0) {
        uVar1 = 4 - uVar1;
      }
      else {
        uVar1 = 0;
      }
      uVar2 = uVar2 + 1;
      param_2 = param_2 + 1;
    } while (uVar2 < param_3);
  }
  *param_1 = uVar1;
  return uVar2;
}



undefined8 FUN_1401fba3c(longlong *param_1)

{
  int *piVar1;
  undefined8 uVar2;
  uint uVar3;
  uint uVar4;
  int iVar5;
  undefined4 uVar6;
  undefined4 uVar7;
  undefined1 *puVar8;
  undefined1 local_res8 [8];
  
  if ((param_1 == (longlong *)0x0) || (piVar1 = (int *)param_1[5], piVar1 == (int *)0x0)) {
    uVar2 = 0xfffffffe;
  }
  else if (((int)param_1[1] == 0) && ((uint)piVar1[0x11] < 8)) {
    uVar2 = 0xfffffffb;
  }
  else {
    if (*piVar1 != 0x1d) {
      iVar5 = 0;
      *piVar1 = 0x1d;
      uVar3 = piVar1[0x11] & 7;
      piVar1[0x10] = piVar1[0x10] << (sbyte)uVar3;
      uVar3 = piVar1[0x11] - uVar3;
      piVar1[0x11] = uVar3;
      if (7 < uVar3) {
        uVar4 = piVar1[0x10];
        puVar8 = local_res8;
        do {
          uVar3 = uVar3 - 8;
          uVar4 = uVar4 >> 8;
          *puVar8 = (char)piVar1[0x10];
          puVar8 = puVar8 + 1;
          iVar5 = iVar5 + 1;
          piVar1[0x10] = uVar4;
          piVar1[0x11] = uVar3;
        } while (7 < uVar3);
      }
      piVar1[0x1f] = 0;
      FUN_1401fb9dc(piVar1 + 0x1f,local_res8,iVar5);
    }
    uVar3 = FUN_1401fb9dc(piVar1 + 0x1f,*param_1,(int)param_1[1]);
    *(int *)((longlong)param_1 + 0xc) = *(int *)((longlong)param_1 + 0xc) + uVar3;
    *(uint *)(param_1 + 1) = (int)param_1[1] - uVar3;
    uVar7 = *(undefined4 *)((longlong)param_1 + 0xc);
    *param_1 = *param_1 + (ulonglong)uVar3;
    if (piVar1[0x1f] == 4) {
      uVar6 = *(undefined4 *)((longlong)param_1 + 0x1c);
      FUN_1401f9fdc(param_1);
      *(undefined4 *)((longlong)param_1 + 0xc) = uVar7;
      *(undefined4 *)((longlong)param_1 + 0x1c) = uVar6;
      *piVar1 = 0xb;
      uVar2 = 0;
    }
    else {
      uVar2 = 0xfffffffd;
    }
  }
  return uVar2;
}



undefined8 FUN_1401fbb6c(void *param_1,void *param_2)

{
  void *_Src;
  ulonglong uVar1;
  void *_Dst;
  void *_Dst_00;
  
  if ((((param_1 != (void *)0x0) && (param_2 != (void *)0x0)) &&
      (_Src = *(void **)((longlong)param_2 + 0x28), _Src != (void *)0x0)) &&
     ((*(code **)((longlong)param_2 + 0x30) != (code *)0x0 &&
      (*(longlong *)((longlong)param_2 + 0x38) != 0)))) {
    _Dst = (void *)(**(code **)((longlong)param_2 + 0x30))
                             (*(undefined8 *)((longlong)param_2 + 0x40),1,0x2548);
    if (_Dst != (void *)0x0) {
      _Dst_00 = (void *)0x0;
      if ((*(longlong *)((longlong)_Src + 0x38) == 0) ||
         (_Dst_00 = (void *)(**(code **)((longlong)param_2 + 0x30))
                                      (*(undefined8 *)((longlong)param_2 + 0x40),
                                       1 << ((byte)*(undefined4 *)((longlong)_Src + 0x28) & 0x1f),1)
         , _Dst_00 != (void *)0x0)) {
        memcpy(param_1,param_2,0x58);
        memcpy(_Dst,_Src,0x2548);
        uVar1 = *(ulonglong *)((longlong)_Src + 0x58);
        if (((longlong)_Src + 0x548U <= uVar1) && (uVar1 <= (longlong)_Src + 0x2544U)) {
          *(longlong *)((longlong)_Dst + 0x58) =
               (longlong)_Dst + ((longlong)((uVar1 - (longlong)_Src) + -0x548) >> 2) * 4 + 0x548;
          *(longlong *)((longlong)_Dst + 0x60) =
               (longlong)_Dst +
               ((*(longlong *)((longlong)_Src + 0x60) - (longlong)_Src) + -0x548 >> 2) * 4 + 0x548;
        }
        *(longlong *)((longlong)_Dst + 0x80) =
             (longlong)_Dst +
             ((*(longlong *)((longlong)_Src + 0x80) - (longlong)_Src) + -0x548 >> 2) * 4 + 0x548;
        if (_Dst_00 != (void *)0x0) {
          memcpy(_Dst_00,*(void **)((longlong)_Src + 0x38),
                 (ulonglong)(uint)(1 << ((byte)*(undefined4 *)((longlong)_Src + 0x28) & 0x1f)));
        }
        *(void **)((longlong)_Dst + 0x38) = _Dst_00;
        *(void **)((longlong)param_1 + 0x28) = _Dst;
        return 0;
      }
      (**(code **)((longlong)param_2 + 0x38))(*(undefined8 *)((longlong)param_2 + 0x40),_Dst);
    }
    return 0xfffffffc;
  }
  return 0xfffffffe;
}



undefined8 FUN_1401fbcf0(longlong param_1,void *param_2,uint param_3)

{
  longlong lVar1;
  longlong lVar2;
  undefined4 uVar3;
  uint uVar4;
  undefined8 uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  
  uVar7 = 0;
  if ((((param_1 == 0) || (lVar2 = *(longlong *)(param_1 + 0x28), lVar2 == 0)) ||
      (param_2 == (void *)0x0)) ||
     ((*(int *)(lVar2 + 0x2c) == 2 ||
      ((*(int *)(lVar2 + 0x2c) == 1 && (*(int *)(lVar2 + 8) != 0x2a)))))) {
    uVar5 = 0xfffffffe;
  }
  else {
    if (*(int *)(lVar2 + 0x2c) != 0) {
      uVar3 = FUN_1401fe8a0(*(undefined4 *)(param_1 + 0x4c));
      *(undefined4 *)(param_1 + 0x4c) = uVar3;
    }
    if (2 < param_3) {
      uVar4 = *(int *)(lVar2 + 0x44) - 0x106;
      if (uVar4 < param_3) {
        param_2 = (void *)((longlong)param_2 + (ulonglong)(param_3 - uVar4));
        param_3 = uVar4;
      }
      memcpy(*(void **)(lVar2 + 0x50),param_2,(ulonglong)param_3);
      *(uint *)(lVar2 + 0x94) = param_3;
      *(uint *)(lVar2 + 0x84) = param_3;
      uVar4 = (uint)**(byte **)(lVar2 + 0x50);
      *(uint *)(lVar2 + 0x70) = uVar4;
      *(uint *)(lVar2 + 0x70) =
           (uVar4 << ((byte)*(undefined4 *)(lVar2 + 0x80) & 0x1f) ^
           (uint)(*(byte **)(lVar2 + 0x50))[1]) & *(uint *)(lVar2 + 0x7c);
      uVar8 = uVar7;
      do {
        lVar1 = uVar8 + 2;
        uVar6 = *(uint *)(lVar2 + 0x4c) & uVar8;
        uVar8 = uVar8 + 1;
        uVar4 = ((uint)*(byte *)(lVar1 + *(longlong *)(lVar2 + 0x50)) ^
                *(int *)(lVar2 + 0x70) << ((byte)*(undefined4 *)(lVar2 + 0x80) & 0x1f)) &
                *(uint *)(lVar2 + 0x7c);
        *(uint *)(lVar2 + 0x70) = uVar4;
        *(undefined2 *)(*(longlong *)(lVar2 + 0x60) + uVar6 * 2) =
             *(undefined2 *)(*(longlong *)(lVar2 + 0x68) + (ulonglong)uVar4 * 2);
        *(short *)(*(longlong *)(lVar2 + 0x68) + (ulonglong)*(uint *)(lVar2 + 0x70) * 2) =
             (short)uVar7;
        uVar4 = (int)uVar7 + 1;
        uVar7 = (ulonglong)uVar4;
      } while (uVar4 <= param_3 - 3);
    }
    uVar5 = 0;
  }
  return uVar5;
}



void FUN_1401fbf40(longlong param_1,undefined4 param_2)

{
  *(char *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
       (char)((uint)param_2 >> 8);
  *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
  *(char *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = (char)param_2;
  *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
  return;
}



void FUN_1401fbf70(longlong param_1)

{
  longlong *plVar1;
  int *piVar2;
  longlong lVar3;
  uint uVar4;
  
  uVar4 = *(uint *)(*(longlong *)(param_1 + 0x28) + 0x28);
  if (*(uint *)(param_1 + 0x18) < uVar4) {
    uVar4 = *(uint *)(param_1 + 0x18);
  }
  if (uVar4 != 0) {
    memcpy(*(void **)(param_1 + 0x10),*(void **)(*(longlong *)(param_1 + 0x28) + 0x20),
           (ulonglong)uVar4);
    *(longlong *)(param_1 + 0x10) = *(longlong *)(param_1 + 0x10) + (ulonglong)uVar4;
    plVar1 = (longlong *)(*(longlong *)(param_1 + 0x28) + 0x20);
    *plVar1 = *plVar1 + (ulonglong)uVar4;
    *(int *)(param_1 + 0x1c) = *(int *)(param_1 + 0x1c) + uVar4;
    *(int *)(param_1 + 0x18) = *(int *)(param_1 + 0x18) - uVar4;
    piVar2 = (int *)(*(longlong *)(param_1 + 0x28) + 0x28);
    *piVar2 = *piVar2 - uVar4;
    lVar3 = *(longlong *)(param_1 + 0x28);
    if (*(int *)(lVar3 + 0x28) == 0) {
      *(undefined8 *)(lVar3 + 0x20) = *(undefined8 *)(lVar3 + 0x10);
    }
  }
  return;
}



ulonglong FUN_1401fbff0(longlong *param_1,uint param_2)

{
  byte bVar1;
  int iVar2;
  undefined8 *puVar3;
  int *piVar4;
  undefined4 uVar5;
  int iVar6;
  uint uVar7;
  uint uVar8;
  undefined1 uVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  uint uVar12;
  
  if (((param_1 == (longlong *)0x0) ||
      (puVar3 = (undefined8 *)param_1[5], puVar3 == (undefined8 *)0x0)) || (4 < param_2)) {
    return 0xfffffffe;
  }
  if (((param_1[2] == 0) || ((*param_1 == 0 && ((int)param_1[1] != 0)))) ||
     ((*(int *)(puVar3 + 1) == 0x29a && (param_2 != 4)))) {
    param_1[4] = (longlong)"stream error";
    return 0xfffffffe;
  }
  if ((int)param_1[3] == 0) {
    param_1[4] = (longlong)"buffer error";
    return 0xfffffffb;
  }
  iVar6 = *(int *)(puVar3 + 8);
  uVar12 = 1;
  *puVar3 = param_1;
  *(uint *)(puVar3 + 8) = param_2;
  if (*(int *)(puVar3 + 1) == 0x2a) {
    if (*(int *)((longlong)puVar3 + 0x2c) == 2) {
      uVar5 = FUN_1401ff42c(0,0,0);
      *(undefined4 *)((longlong)param_1 + 0x4c) = uVar5;
      *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) = 0x1f;
      *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
      *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) = 0x8b;
      *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
      *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) = 8;
      piVar4 = (int *)puVar3[6];
      *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
      if (piVar4 == (int *)0x0) {
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) = 0;
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) = 0;
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) = 0;
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) = 0;
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) = 0;
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        if (*(int *)((longlong)puVar3 + 0xac) == 9) {
          uVar9 = 2;
        }
        else if ((1 < *(int *)(puVar3 + 0x16)) || (uVar9 = 0, *(int *)((longlong)puVar3 + 0xac) < 2)
                ) {
          uVar9 = 4;
        }
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) = uVar9;
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) = 0xb;
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        *(undefined4 *)(puVar3 + 1) = 0x71;
      }
      else {
        *(byte *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
             (-(*(longlong *)(piVar4 + 0xc) != 0) & 0x10U) + (-(piVar4[0xf] != 0) & 2U) +
             (-(*(longlong *)(piVar4 + 8) != 0) & 8U) + (-(*(longlong *)(piVar4 + 4) != 0) & 4U) +
             (*piVar4 != 0);
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
             *(undefined1 *)(puVar3[6] + 4);
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
             *(undefined1 *)(puVar3[6] + 5);
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
             *(undefined1 *)(puVar3[6] + 6);
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
             *(undefined1 *)(puVar3[6] + 7);
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        if (*(int *)((longlong)puVar3 + 0xac) == 9) {
          uVar9 = 2;
        }
        else if ((1 < *(int *)(puVar3 + 0x16)) || (uVar9 = 0, *(int *)((longlong)puVar3 + 0xac) < 2)
                ) {
          uVar9 = 4;
        }
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) = uVar9;
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
             *(undefined1 *)(puVar3[6] + 0xc);
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        uVar10 = (ulonglong)*(uint *)(puVar3 + 5);
        if (*(longlong *)(puVar3[6] + 0x10) != 0) {
          *(undefined1 *)(uVar10 + puVar3[2]) = *(undefined1 *)(puVar3[6] + 0x18);
          *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
               *(undefined1 *)(puVar3[6] + 0x19);
          *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
          uVar10 = (ulonglong)*(uint *)(puVar3 + 5);
        }
        if (*(int *)(puVar3[6] + 0x3c) != 0) {
          uVar5 = FUN_1401ff42c(*(undefined4 *)((longlong)param_1 + 0x4c),puVar3[2],uVar10);
          *(undefined4 *)((longlong)param_1 + 0x4c) = uVar5;
        }
        *(undefined4 *)(puVar3 + 7) = 0;
        *(undefined4 *)(puVar3 + 1) = 0x45;
      }
    }
    else {
      uVar7 = 0;
      if (((*(int *)(puVar3 + 0x16) < 2) && (iVar2 = *(int *)((longlong)puVar3 + 0xac), 1 < iVar2))
         && (uVar7 = uVar12, 5 < iVar2)) {
        uVar7 = (iVar2 != 6) + 2;
      }
      uVar7 = (*(int *)(puVar3 + 9) + -8) * 0x1000 + 0x800U | uVar7 << 6;
      if (*(int *)((longlong)puVar3 + 0x94) != 0) {
        uVar7 = uVar7 | 0x20;
      }
      *(undefined4 *)(puVar3 + 1) = 0x71;
      FUN_1401fbf40(puVar3,(uVar7 / 0x1f + 1) * 0x1f);
      if (*(int *)((longlong)puVar3 + 0x94) != 0) {
        FUN_1401fbf40();
        FUN_1401fbf40();
      }
      uVar5 = FUN_1401fe8a0(0,0,0);
      *(undefined4 *)((longlong)param_1 + 0x4c) = uVar5;
    }
  }
  if (*(int *)(puVar3 + 1) == 0x45) {
    if (*(longlong *)(puVar3[6] + 0x10) != 0) {
      uVar7 = *(uint *)(puVar3 + 5);
      if (*(uint *)(puVar3 + 7) < (uint)*(ushort *)(puVar3[6] + 0x18)) {
        do {
          uVar8 = *(uint *)(puVar3 + 5);
          if (uVar8 == *(uint *)(puVar3 + 3)) {
            if ((*(int *)(puVar3[6] + 0x3c) != 0) && (uVar7 < uVar8)) {
              uVar5 = FUN_1401ff42c(*(undefined4 *)((longlong)param_1 + 0x4c),
                                    (ulonglong)uVar7 + puVar3[2],uVar8 - uVar7);
              *(undefined4 *)((longlong)param_1 + 0x4c) = uVar5;
            }
            FUN_1401fbf70(param_1);
            uVar7 = *(uint *)(puVar3 + 5);
            uVar8 = uVar7;
            if (uVar7 == *(uint *)(puVar3 + 3)) break;
          }
          *(undefined1 *)((ulonglong)uVar8 + puVar3[2]) =
               *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 7) + *(longlong *)(puVar3[6] + 0x10));
          *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
          *(int *)(puVar3 + 7) = *(int *)(puVar3 + 7) + 1;
        } while (*(uint *)(puVar3 + 7) < (uint)*(ushort *)(puVar3[6] + 0x18));
      }
      if ((*(int *)(puVar3[6] + 0x3c) != 0) && (uVar7 < *(uint *)(puVar3 + 5))) {
        uVar5 = FUN_1401ff42c(*(undefined4 *)((longlong)param_1 + 0x4c),(ulonglong)uVar7 + puVar3[2]
                              ,*(uint *)(puVar3 + 5) - uVar7);
        *(undefined4 *)((longlong)param_1 + 0x4c) = uVar5;
      }
      if (*(int *)(puVar3 + 7) != *(int *)(puVar3[6] + 0x18)) goto LAB_1401fc434;
      *(undefined4 *)(puVar3 + 7) = 0;
    }
    *(undefined4 *)(puVar3 + 1) = 0x49;
  }
LAB_1401fc434:
  if (*(int *)(puVar3 + 1) == 0x49) {
    if (*(longlong *)(puVar3[6] + 0x20) != 0) {
      uVar10 = (ulonglong)*(uint *)(puVar3 + 5);
      do {
        uVar7 = *(uint *)(puVar3 + 5);
        uVar11 = (ulonglong)uVar7;
        if (uVar7 == *(uint *)(puVar3 + 3)) {
          if ((*(int *)(puVar3[6] + 0x3c) != 0) && ((uint)uVar10 < uVar7)) {
            uVar5 = FUN_1401ff42c(*(undefined4 *)((longlong)param_1 + 0x4c),uVar10 + puVar3[2],
                                  uVar7 - (uint)uVar10);
            *(undefined4 *)((longlong)param_1 + 0x4c) = uVar5;
          }
          FUN_1401fbf70(param_1);
          uVar10 = (ulonglong)*(uint *)(puVar3 + 5);
          uVar11 = uVar10;
          uVar7 = uVar12;
          if (*(uint *)(puVar3 + 5) == *(uint *)(puVar3 + 3)) break;
        }
        bVar1 = *(byte *)(*(longlong *)(puVar3[6] + 0x20) + (ulonglong)*(uint *)(puVar3 + 7));
        *(uint *)(puVar3 + 7) = *(uint *)(puVar3 + 7) + 1;
        *(byte *)(uVar11 + puVar3[2]) = bVar1;
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        uVar7 = (uint)bVar1;
      } while (bVar1 != 0);
      if (*(int *)(puVar3[6] + 0x3c) != 0) {
        if ((uint)uVar10 < *(uint *)(puVar3 + 5)) {
          uVar5 = FUN_1401ff42c(*(undefined4 *)((longlong)param_1 + 0x4c),uVar10 + puVar3[2],
                                *(uint *)(puVar3 + 5) - (uint)uVar10);
          *(undefined4 *)((longlong)param_1 + 0x4c) = uVar5;
        }
      }
      if (uVar7 != 0) goto LAB_1401fc4f2;
      *(undefined4 *)(puVar3 + 7) = 0;
    }
    *(undefined4 *)(puVar3 + 1) = 0x5b;
  }
LAB_1401fc4f2:
  if (*(int *)(puVar3 + 1) == 0x5b) {
    if (*(longlong *)(puVar3[6] + 0x30) != 0) {
      uVar10 = (ulonglong)*(uint *)(puVar3 + 5);
      do {
        uVar7 = *(uint *)(puVar3 + 5);
        uVar11 = (ulonglong)uVar7;
        if (uVar7 == *(uint *)(puVar3 + 3)) {
          if ((*(int *)(puVar3[6] + 0x3c) != 0) && ((uint)uVar10 < uVar7)) {
            uVar5 = FUN_1401ff42c(*(undefined4 *)((longlong)param_1 + 0x4c),uVar10 + puVar3[2],
                                  uVar7 - (uint)uVar10);
            *(undefined4 *)((longlong)param_1 + 0x4c) = uVar5;
          }
          FUN_1401fbf70(param_1);
          uVar10 = (ulonglong)*(uint *)(puVar3 + 5);
          uVar11 = uVar10;
          uVar7 = uVar12;
          if (*(uint *)(puVar3 + 5) == *(uint *)(puVar3 + 3)) break;
        }
        bVar1 = *(byte *)(*(longlong *)(puVar3[6] + 0x30) + (ulonglong)*(uint *)(puVar3 + 7));
        *(uint *)(puVar3 + 7) = *(uint *)(puVar3 + 7) + 1;
        *(byte *)(uVar11 + puVar3[2]) = bVar1;
        *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        uVar7 = (uint)bVar1;
      } while (bVar1 != 0);
      if (*(int *)(puVar3[6] + 0x3c) != 0) {
        if ((uint)uVar10 < *(uint *)(puVar3 + 5)) {
          uVar5 = FUN_1401ff42c(*(undefined4 *)((longlong)param_1 + 0x4c),uVar10 + puVar3[2],
                                *(uint *)(puVar3 + 5) - (uint)uVar10);
          *(undefined4 *)((longlong)param_1 + 0x4c) = uVar5;
        }
      }
      if (uVar7 != 0) goto LAB_1401fc5ad;
    }
    *(undefined4 *)(puVar3 + 1) = 0x67;
  }
LAB_1401fc5ad:
  if (*(int *)(puVar3 + 1) == 0x67) {
    if (*(int *)(puVar3[6] + 0x3c) != 0) {
      if (*(uint *)(puVar3 + 3) < *(int *)(puVar3 + 5) + 2U) {
        FUN_1401fbf70(param_1);
      }
      if (*(uint *)(puVar3 + 3) < *(uint *)(puVar3 + 5) + 2) goto LAB_1401fc611;
      *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
           *(undefined1 *)((longlong)param_1 + 0x4c);
      *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
      *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
           *(undefined1 *)((longlong)param_1 + 0x4d);
      *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
      uVar5 = FUN_1401ff42c(0,0,0);
      *(undefined4 *)((longlong)param_1 + 0x4c) = uVar5;
    }
    *(undefined4 *)(puVar3 + 1) = 0x71;
  }
LAB_1401fc611:
  if (*(int *)(puVar3 + 5) == 0) {
    if ((((int)param_1[1] == 0) && ((int)param_2 <= iVar6)) && (param_2 != 4)) goto LAB_1401fc63d;
LAB_1401fc64d:
    if (*(int *)(puVar3 + 1) == 0x29a) {
      if ((int)param_1[1] != 0) {
LAB_1401fc63d:
        param_1[4] = (longlong)"buffer error";
        return 0xfffffffb;
      }
LAB_1401fc665:
      if ((*(int *)((longlong)puVar3 + 0x9c) != 0) ||
         ((param_2 != 0 && (*(int *)(puVar3 + 1) != 0x29a)))) goto LAB_1401fc67f;
    }
    else {
      if ((int)param_1[1] == 0) goto LAB_1401fc665;
LAB_1401fc67f:
      iVar6 = (*(code *)(&PTR_FUN_14027f088)[(longlong)*(int *)((longlong)puVar3 + 0xac) * 2])
                        (puVar3);
      if ((iVar6 == 2) || (iVar6 == 3)) {
        *(undefined4 *)(puVar3 + 1) = 0x29a;
      }
      if ((iVar6 == 0) || (iVar6 == 2)) {
        if ((int)param_1[3] != 0) {
          return 0;
        }
        goto LAB_1401fc623;
      }
      if (iVar6 == 1) {
        if (param_2 == 1) {
          FUN_140200c1c();
        }
        else {
          FUN_140200b7c(puVar3,0,0,0);
          if (param_2 == 3) {
            *(undefined2 *)(puVar3[0xd] + (ulonglong)(*(int *)((longlong)puVar3 + 0x74) - 1) * 2) =
                 0;
            memset((void *)puVar3[0xd],0,(ulonglong)(*(int *)((longlong)puVar3 + 0x74) - 1) * 2);
          }
        }
        FUN_1401fbf70(param_1);
        if ((int)param_1[3] == 0) goto LAB_1401fc623;
      }
    }
    if (param_2 == 4) {
      if (0 < *(int *)((longlong)puVar3 + 0x2c)) {
        if (*(int *)((longlong)puVar3 + 0x2c) == 2) {
          *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
               *(undefined1 *)((longlong)param_1 + 0x4c);
          *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
               *(undefined1 *)((longlong)param_1 + 0x4d);
          *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
               *(undefined1 *)((longlong)param_1 + 0x4e);
          *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
               *(undefined1 *)((longlong)param_1 + 0x4f);
          *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
               *(undefined1 *)((longlong)param_1 + 0xc);
          *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
               *(undefined1 *)((longlong)param_1 + 0xd);
          *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
               *(undefined1 *)((longlong)param_1 + 0xe);
          *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(puVar3 + 5) + puVar3[2]) =
               *(undefined1 *)((longlong)param_1 + 0xf);
          *(int *)(puVar3 + 5) = *(int *)(puVar3 + 5) + 1;
        }
        else {
          FUN_1401fbf40(puVar3,*(undefined2 *)((longlong)param_1 + 0x4e));
          FUN_1401fbf40();
        }
        FUN_1401fbf70(param_1);
        if (0 < *(int *)((longlong)puVar3 + 0x2c)) {
          *(int *)((longlong)puVar3 + 0x2c) = -*(int *)((longlong)puVar3 + 0x2c);
        }
        return (ulonglong)(*(int *)(puVar3 + 5) == 0);
      }
      return 1;
    }
  }
  else {
    FUN_1401fbf70(param_1);
    if ((int)param_1[3] != 0) goto LAB_1401fc64d;
LAB_1401fc623:
    *(undefined4 *)(puVar3 + 8) = 0xffffffff;
  }
  return 0;
}



undefined8 FUN_1401fc840(longlong param_1)

{
  int iVar1;
  longlong lVar2;
  undefined8 uVar3;
  
  uVar3 = 0;
  if (((param_1 == 0) || (lVar2 = *(longlong *)(param_1 + 0x28), lVar2 == 0)) ||
     (((iVar1 = *(int *)(lVar2 + 8), iVar1 != 0x2a &&
       (((iVar1 != 0x45 && (iVar1 != 0x49)) && (iVar1 != 0x5b)))) &&
      (((iVar1 != 0x67 && (iVar1 != 0x71)) && (iVar1 != 0x29a)))))) {
    uVar3 = 0xfffffffe;
  }
  else {
    if (*(longlong *)(lVar2 + 0x10) != 0) {
      (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40));
    }
    if (*(longlong *)(*(longlong *)(param_1 + 0x28) + 0x68) != 0) {
      (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40));
    }
    if (*(longlong *)(*(longlong *)(param_1 + 0x28) + 0x60) != 0) {
      (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40));
    }
    if (*(longlong *)(*(longlong *)(param_1 + 0x28) + 0x50) != 0) {
      (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40));
    }
    (**(code **)(param_1 + 0x38))(*(undefined8 *)(param_1 + 0x40),*(undefined8 *)(param_1 + 0x28));
    *(undefined8 *)(param_1 + 0x28) = 0;
    if (iVar1 == 0x71) {
      uVar3 = 0xfffffffd;
    }
  }
  return uVar3;
}



undefined8 FUN_1401fc920(void *param_1,void *param_2)

{
  void *_Src;
  undefined8 *_Dst;
  undefined8 uVar1;
  longlong lVar2;
  
  if (((param_2 == (void *)0x0) || (param_1 == (void *)0x0)) ||
     (_Src = *(void **)((longlong)param_2 + 0x28), _Src == (void *)0x0)) {
    uVar1 = 0xfffffffe;
  }
  else {
    memcpy(param_1,param_2,0x58);
    _Dst = (undefined8 *)
           (**(code **)((longlong)param_1 + 0x30))
                     (*(undefined8 *)((longlong)param_1 + 0x40),1,0x1718);
    if (_Dst != (undefined8 *)0x0) {
      *(undefined8 **)((longlong)param_1 + 0x28) = _Dst;
      memcpy(_Dst,_Src,0x1718);
      *_Dst = param_1;
      uVar1 = (**(code **)((longlong)param_1 + 0x30))
                        (*(undefined8 *)((longlong)param_1 + 0x40),
                         *(undefined4 *)((longlong)_Dst + 0x44),2);
      _Dst[10] = uVar1;
      uVar1 = (**(code **)((longlong)param_1 + 0x30))
                        (*(undefined8 *)((longlong)param_1 + 0x40),
                         *(undefined4 *)((longlong)_Dst + 0x44),2);
      _Dst[0xc] = uVar1;
      uVar1 = (**(code **)((longlong)param_1 + 0x30))
                        (*(undefined8 *)((longlong)param_1 + 0x40),
                         *(undefined4 *)((longlong)_Dst + 0x74),2);
      _Dst[0xd] = uVar1;
      lVar2 = (**(code **)((longlong)param_1 + 0x30))
                        (*(undefined8 *)((longlong)param_1 + 0x40),*(undefined4 *)(_Dst + 0x2de),4);
      _Dst[2] = lVar2;
      if ((((void *)_Dst[10] != (void *)0x0) && (_Dst[0xc] != 0)) &&
         ((_Dst[0xd] != 0 && (lVar2 != 0)))) {
        memcpy((void *)_Dst[10],*(void **)((longlong)_Src + 0x50),
               (ulonglong)(uint)(*(int *)((longlong)_Dst + 0x44) * 2));
        memcpy((void *)_Dst[0xc],*(void **)((longlong)_Src + 0x60),
               (ulonglong)*(uint *)((longlong)_Dst + 0x44) * 2);
        memcpy((void *)_Dst[0xd],*(void **)((longlong)_Src + 0x68),
               (ulonglong)*(uint *)((longlong)_Dst + 0x74) * 2);
        memcpy((void *)_Dst[2],*(void **)((longlong)_Src + 0x10),(ulonglong)*(uint *)(_Dst + 3));
        _Dst[4] = (*(longlong *)((longlong)_Src + 0x20) - *(longlong *)((longlong)_Src + 0x10)) +
                  _Dst[2];
        _Dst[0x2df] = lVar2 + ((ulonglong)*(uint *)(_Dst + 0x2de) & 0xfffffffffffffffe);
        _Dst[0x168] = (longlong)_Dst + 0xbc;
        _Dst[0x2dd] = _Dst[2] + (ulonglong)*(uint *)(_Dst + 0x2de) * 3;
        _Dst[0x16b] = _Dst + 0x136;
        _Dst[0x16e] = (longlong)_Dst + 0xaa4;
        return 0;
      }
      FUN_1401fc840(param_1);
    }
    uVar1 = 0xfffffffc;
  }
  return uVar1;
}



uint FUN_1401fcb00(longlong *param_1,void *param_2,uint param_3)

{
  uint uVar1;
  undefined4 uVar2;
  uint uVar3;
  
  uVar1 = *(uint *)(param_1 + 1);
  uVar3 = uVar1;
  if (param_3 < uVar1) {
    uVar3 = param_3;
  }
  if (uVar3 == 0) {
    return 0;
  }
  *(uint *)(param_1 + 1) = uVar1 - uVar3;
  if (*(int *)(param_1[5] + 0x2c) == 1) {
    uVar2 = FUN_1401fe8a0(*(undefined4 *)((longlong)param_1 + 0x4c),*param_1,uVar3);
  }
  else {
    if (*(int *)(param_1[5] + 0x2c) != 2) goto LAB_1401fcb65;
    uVar2 = FUN_1401ff42c(*(undefined4 *)((longlong)param_1 + 0x4c),*param_1,uVar3);
  }
  *(undefined4 *)((longlong)param_1 + 0x4c) = uVar2;
LAB_1401fcb65:
  memcpy(param_2,(void *)*param_1,(ulonglong)uVar3);
  *param_1 = *param_1 + (ulonglong)uVar3;
  *(int *)((longlong)param_1 + 0xc) = *(int *)((longlong)param_1 + 0xc) + uVar3;
  return uVar3;
}



void FUN_1401fcba0(longlong param_1)

{
  ushort uVar1;
  longlong lVar2;
  
  *(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x44) * 2;
  *(undefined2 *)(*(longlong *)(param_1 + 0x68) + (ulonglong)(*(int *)(param_1 + 0x74) - 1) * 2) = 0
  ;
  memset(*(void **)(param_1 + 0x68),0,(ulonglong)(*(int *)(param_1 + 0x74) - 1) * 2);
  lVar2 = (longlong)*(int *)(param_1 + 0xac);
  *(uint *)(param_1 + 0xa8) = (uint)*(ushort *)(&DAT_14027f082 + lVar2 * 0x10);
  *(uint *)(param_1 + 0xb4) = (uint)*(ushort *)(&DAT_14027f080 + lVar2 * 0x10);
  *(uint *)(param_1 + 0xb8) = (uint)*(ushort *)(&DAT_14027f084 + lVar2 * 0x10);
  uVar1 = *(ushort *)(&DAT_14027f086 + lVar2 * 0x10);
  *(undefined4 *)(param_1 + 0x84) = 0;
  *(uint *)(param_1 + 0xa4) = (uint)uVar1;
  *(undefined4 *)(param_1 + 0x9c) = 0;
  *(undefined8 *)(param_1 + 0x90) = 0;
  *(undefined4 *)(param_1 + 0x70) = 0;
  *(undefined4 *)(param_1 + 0xa0) = 2;
  *(undefined4 *)(param_1 + 0x88) = 2;
  return;
}



uint FUN_1401fcc50(longlong param_1,uint param_2)

{
  char *pcVar1;
  ushort uVar2;
  uint uVar3;
  char *pcVar4;
  int iVar5;
  uint uVar6;
  ulonglong uVar7;
  uint uVar8;
  ulonglong uVar9;
  uint uVar10;
  char *pcVar11;
  char *pcVar12;
  uint uVar13;
  char cVar14;
  char cVar15;
  
  uVar13 = *(uint *)(param_1 + 0x94);
  uVar10 = *(uint *)(param_1 + 0xa4);
  uVar7 = (ulonglong)(int)*(uint *)(param_1 + 0xa0);
  uVar9 = (ulonglong)param_2;
  pcVar1 = (char *)((ulonglong)uVar13 + *(longlong *)(param_1 + 0x50));
  if (*(int *)(param_1 + 0x44) - 0x106U < uVar13) {
    uVar13 = (uVar13 - *(int *)(param_1 + 0x44)) + 0x106;
  }
  else {
    uVar13 = 0;
  }
  cVar14 = pcVar1[uVar7 - 1];
  cVar15 = pcVar1[uVar7];
  if (*(uint *)(param_1 + 0xb4) <= *(uint *)(param_1 + 0xa0)) {
    uVar10 = uVar10 >> 2;
  }
  uVar3 = *(uint *)(param_1 + 0x9c);
  uVar8 = *(uint *)(param_1 + 0xb8);
  if (uVar3 < *(uint *)(param_1 + 0xb8)) {
    uVar8 = uVar3;
  }
  do {
    iVar5 = (int)uVar7;
    pcVar4 = (char *)(uVar9 + *(longlong *)(param_1 + 0x50));
    if ((((pcVar4[iVar5] == cVar15) && (pcVar4[(longlong)iVar5 + -1] == cVar14)) &&
        (*pcVar4 == *pcVar1)) && (pcVar4[1] == pcVar1[1])) {
      pcVar4 = pcVar4 + 2;
      pcVar11 = pcVar1 + 2;
      while (((((pcVar12 = pcVar11 + 1, *pcVar12 == pcVar4[1] &&
                (pcVar12 = pcVar11 + 2, *pcVar12 == pcVar4[2])) &&
               ((pcVar12 = pcVar11 + 3, *pcVar12 == pcVar4[3] &&
                ((pcVar12 = pcVar11 + 4, *pcVar12 == pcVar4[4] &&
                 (pcVar12 = pcVar11 + 5, *pcVar12 == pcVar4[5])))))) &&
              (pcVar12 = pcVar11 + 6, *pcVar12 == pcVar4[6])) &&
             (pcVar12 = pcVar11 + 7, *pcVar12 == pcVar4[7]))) {
        pcVar4 = pcVar4 + 8;
        pcVar12 = pcVar11 + 8;
        if ((*pcVar12 != *pcVar4) || (pcVar11 = pcVar12, pcVar1 + 0x102 <= pcVar12)) break;
      }
      uVar6 = ((int)pcVar12 - (int)(pcVar1 + 0x102)) + 0x102;
      if (iVar5 < (int)uVar6) {
        *(int *)(param_1 + 0x98) = (int)uVar9;
        uVar7 = (ulonglong)uVar6;
        if ((int)uVar8 <= (int)uVar6) {
LAB_1401fcdbf:
          if (uVar6 <= uVar3) {
            uVar3 = uVar6;
          }
          return uVar3;
        }
        cVar14 = pcVar1[(longlong)(int)uVar6 + -1];
        cVar15 = pcVar1[(int)uVar6];
      }
    }
    uVar6 = (uint)uVar7;
    uVar2 = *(ushort *)(*(longlong *)(param_1 + 0x60) + (*(uint *)(param_1 + 0x4c) & uVar9) * 2);
    uVar9 = (ulonglong)uVar2;
    if ((uVar2 <= uVar13) || (uVar10 = uVar10 - 1, uVar10 == 0)) goto LAB_1401fcdbf;
  } while( true );
}



uint FUN_1401fcdf0(longlong param_1,uint param_2)

{
  uint uVar1;
  uint uVar2;
  char *pcVar3;
  char *pcVar4;
  char *pcVar5;
  char *pcVar6;
  
  pcVar3 = (char *)((ulonglong)*(uint *)(param_1 + 0x94) + *(longlong *)(param_1 + 0x50));
  pcVar6 = (char *)((ulonglong)param_2 + *(longlong *)(param_1 + 0x50));
  if ((*pcVar6 == *pcVar3) && (pcVar6[1] == pcVar3[1])) {
    pcVar6 = pcVar6 + 2;
    pcVar4 = pcVar3 + 2;
    while (((((pcVar5 = pcVar4 + 1, *pcVar5 == pcVar6[1] &&
              (pcVar5 = pcVar4 + 2, *pcVar5 == pcVar6[2])) &&
             (pcVar5 = pcVar4 + 3, *pcVar5 == pcVar6[3])) &&
            ((pcVar5 = pcVar4 + 4, *pcVar5 == pcVar6[4] &&
             (pcVar5 = pcVar4 + 5, *pcVar5 == pcVar6[5])))) &&
           ((pcVar5 = pcVar4 + 6, *pcVar5 == pcVar6[6] &&
            (pcVar5 = pcVar4 + 7, *pcVar5 == pcVar6[7]))))) {
      pcVar6 = pcVar6 + 8;
      pcVar5 = pcVar4 + 8;
      if ((*pcVar5 != *pcVar6) || (pcVar4 = pcVar5, pcVar3 + 0x102 <= pcVar5)) break;
    }
    uVar2 = ((int)pcVar5 - (int)(pcVar3 + 0x102)) + 0x102;
    if (2 < (int)uVar2) {
      *(uint *)(param_1 + 0x98) = param_2;
      uVar1 = *(uint *)(param_1 + 0x9c);
      if (uVar2 <= *(uint *)(param_1 + 0x9c)) {
        uVar1 = uVar2;
      }
      return uVar1;
    }
  }
  return 2;
}



void FUN_1401fcee0(longlong *param_1)

{
  uint uVar1;
  ushort uVar2;
  int iVar3;
  ulonglong _Size;
  ushort *puVar4;
  uint uVar5;
  ulonglong uVar6;
  
  uVar1 = *(uint *)((longlong)param_1 + 0x44);
  _Size = (ulonglong)uVar1;
  while( true ) {
    iVar3 = ((int)param_1[0xb] - *(int *)((longlong)param_1 + 0x9c)) -
            *(uint *)((longlong)param_1 + 0x94);
    if ((uVar1 - 0x106) + *(int *)((longlong)param_1 + 0x44) <= *(uint *)((longlong)param_1 + 0x94))
    {
      memcpy((void *)param_1[10],(void *)(param_1[10] + _Size),_Size);
      uVar6 = (ulonglong)*(uint *)((longlong)param_1 + 0x74);
      *(uint *)(param_1 + 0x13) = (int)param_1[0x13] - uVar1;
      *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) - uVar1;
      *(int *)((longlong)param_1 + 0x84) = *(int *)((longlong)param_1 + 0x84) - uVar1;
      puVar4 = (ushort *)(param_1[0xd] + uVar6 * 2);
      do {
        puVar4 = puVar4 + -1;
        uVar2 = 0;
        if (uVar1 <= *puVar4) {
          uVar2 = *puVar4 - (short)uVar1;
        }
        uVar5 = (int)uVar6 - 1;
        uVar6 = (ulonglong)uVar5;
        *puVar4 = uVar2;
      } while (uVar5 != 0);
      puVar4 = (ushort *)(param_1[0xc] + _Size * 2);
      uVar5 = uVar1;
      do {
        puVar4 = puVar4 + -1;
        uVar2 = 0;
        if (uVar1 <= *puVar4) {
          uVar2 = *puVar4 - (short)uVar1;
        }
        uVar5 = uVar5 - 1;
        *puVar4 = uVar2;
      } while (uVar5 != 0);
      iVar3 = iVar3 + uVar1;
    }
    if (*(int *)(*param_1 + 8) == 0) break;
    iVar3 = FUN_1401fcb00(*param_1,(ulonglong)*(uint *)((longlong)param_1 + 0x9c) +
                                   (ulonglong)*(uint *)((longlong)param_1 + 0x94) + param_1[10],
                          iVar3);
    *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) + iVar3;
    if (2 < *(uint *)((longlong)param_1 + 0x9c)) {
      uVar5 = (uint)*(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x94) + param_1[10]);
      *(uint *)(param_1 + 0xe) = uVar5;
      *(uint *)(param_1 + 0xe) =
           (uVar5 << ((byte)(int)param_1[0x10] & 0x1f) ^
           (uint)*(byte *)((ulonglong)(*(uint *)((longlong)param_1 + 0x94) + 1) + param_1[10])) &
           *(uint *)((longlong)param_1 + 0x7c);
    }
    if (0x105 < *(uint *)((longlong)param_1 + 0x9c)) {
      return;
    }
    if (*(int *)(*param_1 + 8) == 0) {
      return;
    }
  }
  return;
}



undefined4 FUN_1401fd030(longlong *param_1,int param_2)

{
  int *piVar1;
  uint uVar2;
  uint uVar3;
  longlong lVar4;
  longlong lVar5;
  undefined4 uVar6;
  uint uVar7;
  uint uVar8;
  
  uVar3 = (int)param_1[3] - 5;
  uVar2 = 0xffff;
  if (uVar3 < 0xffff) {
    uVar2 = uVar3;
  }
  lVar5 = 0;
  do {
    uVar3 = *(uint *)((longlong)param_1 + 0x9c);
    uVar6 = 1;
    if (uVar3 < 2) {
      FUN_1401fcee0(param_1);
      uVar3 = *(uint *)((longlong)param_1 + 0x9c);
      if (uVar3 == 0) {
        if (param_2 == 0) {
          return 0;
        }
        uVar2 = *(uint *)((longlong)param_1 + 0x84);
        if (-1 < (int)uVar2) {
          lVar5 = (ulonglong)uVar2 + param_1[10];
        }
        FUN_140200e3c(param_1,lVar5,*(int *)((longlong)param_1 + 0x94) - uVar2,param_2 == 4);
        *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
        FUN_1401fbf70(*param_1);
        if (*(int *)(*param_1 + 0x18) != 0) {
          if (param_2 == 4) {
            uVar6 = 3;
          }
          return uVar6;
        }
        if (param_2 == 4) {
          return 2;
        }
        return 0;
      }
    }
    uVar8 = *(uint *)((longlong)param_1 + 0x84);
    piVar1 = (int *)((longlong)param_1 + 0x94);
    *piVar1 = *piVar1 + uVar3;
    uVar3 = *(uint *)((longlong)param_1 + 0x94);
    uVar7 = uVar8 + uVar2;
    *(undefined4 *)((longlong)param_1 + 0x9c) = 0;
    if ((*piVar1 == 0) || (uVar7 <= uVar3)) {
      *(uint *)((longlong)param_1 + 0x94) = uVar7;
      *(uint *)((longlong)param_1 + 0x9c) = uVar3 - uVar7;
      lVar4 = lVar5;
      if (-1 < (int)uVar8) {
        lVar4 = (ulonglong)uVar8 + param_1[10];
      }
      FUN_140200e3c(param_1,lVar4,uVar7 - uVar8,0);
      *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
      FUN_1401fbf70(*param_1);
      if (*(int *)(*param_1 + 0x18) == 0) {
        return 0;
      }
    }
    uVar3 = *(uint *)((longlong)param_1 + 0x84);
    uVar8 = *(int *)((longlong)param_1 + 0x94) - uVar3;
    if (*(int *)((longlong)param_1 + 0x44) - 0x106U <= uVar8) {
      lVar4 = lVar5;
      if (-1 < (int)uVar3) {
        lVar4 = (ulonglong)uVar3 + param_1[10];
      }
      FUN_140200e3c(param_1,lVar4,uVar8,0);
      *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
      FUN_1401fbf70(*param_1);
      if (*(int *)(*param_1 + 0x18) == 0) {
        return 0;
      }
    }
  } while( true );
}



undefined4 FUN_1401fd1f0(longlong *param_1,int param_2)

{
  longlong *plVar1;
  short *psVar2;
  longlong lVar3;
  undefined4 uVar4;
  byte bVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  short sVar9;
  ushort uVar10;
  uint uVar11;
  bool bVar12;
  
  uVar7 = 0;
  uVar8 = uVar7;
  do {
    uVar11 = *(uint *)((longlong)param_1 + 0x9c);
    if (uVar11 < 0x106) {
      FUN_1401fcee0(param_1);
      uVar11 = *(uint *)((longlong)param_1 + 0x9c);
      if ((uVar11 < 0x106) && (param_2 == 0)) {
        return 0;
      }
      if (uVar11 == 0) {
        uVar11 = *(uint *)((longlong)param_1 + 0x84);
        if (-1 < (int)uVar11) {
          uVar7 = (ulonglong)uVar11 + param_1[10];
        }
        FUN_140200e3c(param_1,uVar7,*(int *)((longlong)param_1 + 0x94) - uVar11,param_2 == 4);
        *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
        FUN_1401fbf70(*param_1);
        if (*(int *)(*param_1 + 0x18) != 0) {
          uVar4 = 1;
          if (param_2 == 4) {
            uVar4 = 3;
          }
          return uVar4;
        }
        if (param_2 == 4) {
          return 2;
        }
        return 0;
      }
    }
    if (2 < uVar11) {
      uVar11 = ((uint)*(byte *)((ulonglong)(*(uint *)((longlong)param_1 + 0x94) + 2) + param_1[10])
               ^ (int)param_1[0xe] << ((byte)(int)param_1[0x10] & 0x1f)) &
               *(uint *)((longlong)param_1 + 0x7c);
      *(uint *)(param_1 + 0xe) = uVar11;
      *(undefined2 *)
       (param_1[0xc] +
       (ulonglong)(*(uint *)((longlong)param_1 + 0x94) & *(uint *)((longlong)param_1 + 0x4c)) * 2) =
           *(undefined2 *)(param_1[0xd] + (ulonglong)uVar11 * 2);
      uVar8 = (ulonglong)
              *(ushort *)
               (param_1[0xc] +
               (ulonglong)
               (*(uint *)((longlong)param_1 + 0x94) & *(uint *)((longlong)param_1 + 0x4c)) * 2);
      *(undefined2 *)(param_1[0xd] + (ulonglong)*(uint *)(param_1 + 0xe) * 2) =
           *(undefined2 *)((longlong)param_1 + 0x94);
    }
    if ((((int)uVar8 != 0) &&
        (uVar11 = *(int *)((longlong)param_1 + 0x94) - (int)uVar8,
        uVar11 <= *(int *)((longlong)param_1 + 0x44) - 0x106U)) && ((int)param_1[0x16] != 2)) {
      if ((int)param_1[0x16] == 3) {
        if (uVar11 != 1) goto LAB_1401fd31e;
        uVar4 = FUN_1401fcdf0(param_1,uVar8);
      }
      else {
        uVar4 = FUN_1401fcc50(param_1,uVar8);
      }
      *(undefined4 *)(param_1 + 0x11) = uVar4;
    }
LAB_1401fd31e:
    if (*(uint *)(param_1 + 0x11) < 3) {
      bVar5 = *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x94) + param_1[10]);
      *(undefined2 *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) = 0;
      *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar5;
      *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
      psVar2 = (short *)((longlong)param_1 + (ulonglong)bVar5 * 4 + 0xbc);
      *psVar2 = *psVar2 + 1;
      bVar12 = *(int *)((longlong)param_1 + 0x16f4) == (int)param_1[0x2de] + -1;
      *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) + -1;
LAB_1401fd50b:
      *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
    }
    else {
      sVar9 = *(short *)((longlong)param_1 + 0x94) - (short)param_1[0x13];
      lVar3 = param_1[0x11];
      *(short *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) = sVar9;
      bVar5 = (char)lVar3 - 3;
      *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar5;
      *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
      uVar10 = sVar9 - 1;
      psVar2 = (short *)((longlong)param_1 + (ulonglong)(byte)(&DAT_140281b20)[bVar5] * 4 + 0x4c0);
      *psVar2 = *psVar2 + 1;
      if (uVar10 < 0x100) {
        bVar5 = (&DAT_140281920)[uVar10];
      }
      else {
        bVar5 = (&DAT_140281a20)[uVar10 >> 7];
      }
      psVar2 = (short *)((longlong)param_1 + (longlong)(int)(uint)bVar5 * 4 + 0x9b0);
      *psVar2 = *psVar2 + 1;
      bVar12 = *(int *)((longlong)param_1 + 0x16f4) == (int)param_1[0x2de] + -1;
      uVar11 = *(uint *)(param_1 + 0x11);
      *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) - uVar11;
      if ((uVar11 <= *(uint *)(param_1 + 0x15)) && (2 < *(uint *)((longlong)param_1 + 0x9c))) {
        *(uint *)(param_1 + 0x11) = uVar11 - 1;
        do {
          *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
          uVar11 = ((uint)*(byte *)((ulonglong)(*(uint *)((longlong)param_1 + 0x94) + 2) +
                                   param_1[10]) ^
                   (int)param_1[0xe] << ((byte)(int)param_1[0x10] & 0x1f)) &
                   *(uint *)((longlong)param_1 + 0x7c);
          *(uint *)(param_1 + 0xe) = uVar11;
          *(undefined2 *)
           (param_1[0xc] +
           (ulonglong)(*(uint *)((longlong)param_1 + 0x94) & *(uint *)((longlong)param_1 + 0x4c)) *
           2) = *(undefined2 *)(param_1[0xd] + (ulonglong)uVar11 * 2);
          uVar8 = (ulonglong)
                  *(ushort *)
                   (param_1[0xc] +
                   (ulonglong)
                   (*(uint *)((longlong)param_1 + 0x94) & *(uint *)((longlong)param_1 + 0x4c)) * 2);
          *(undefined2 *)(param_1[0xd] + (ulonglong)*(uint *)(param_1 + 0xe) * 2) =
               *(undefined2 *)((longlong)param_1 + 0x94);
          plVar1 = param_1 + 0x11;
          *(int *)plVar1 = (int)*plVar1 + -1;
        } while ((int)*plVar1 != 0);
        goto LAB_1401fd50b;
      }
      *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + uVar11;
      *(undefined4 *)(param_1 + 0x11) = 0;
      uVar11 = (uint)*(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x94) + param_1[10]);
      *(uint *)(param_1 + 0xe) = uVar11;
      *(uint *)(param_1 + 0xe) =
           (uVar11 << ((byte)(int)param_1[0x10] & 0x1f) ^
           (uint)*(byte *)((ulonglong)(*(uint *)((longlong)param_1 + 0x94) + 1) + param_1[10])) &
           *(uint *)((longlong)param_1 + 0x7c);
    }
    if (bVar12) {
      uVar11 = *(uint *)((longlong)param_1 + 0x84);
      uVar6 = uVar7;
      if (-1 < (int)uVar11) {
        uVar6 = (ulonglong)uVar11 + param_1[10];
      }
      FUN_140200e3c(param_1,uVar6,*(int *)((longlong)param_1 + 0x94) - uVar11,0);
      *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
      FUN_1401fbf70(*param_1);
      if (*(int *)(*param_1 + 0x18) == 0) {
        return 0;
      }
    }
  } while( true );
}



undefined4 FUN_1401fd610(longlong *param_1,int param_2)

{
  longlong *plVar1;
  short *psVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  longlong lVar6;
  undefined4 uVar7;
  byte bVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  short sVar11;
  ushort uVar12;
  uint uVar13;
  uint uVar14;
  ulonglong uVar15;
  
  uVar10 = 0;
  uVar15 = uVar10;
LAB_1401fd642:
  do {
    uVar13 = *(uint *)((longlong)param_1 + 0x9c);
    if (uVar13 < 0x106) {
      FUN_1401fcee0(param_1);
      uVar13 = *(uint *)((longlong)param_1 + 0x9c);
      if ((uVar13 < 0x106) && (param_2 == 0)) {
        return 0;
      }
      if (uVar13 == 0) {
        if ((int)param_1[0x12] != 0) {
          bVar8 = *(byte *)((ulonglong)(*(int *)((longlong)param_1 + 0x94) - 1) + param_1[10]);
          *(undefined2 *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) = 0
          ;
          *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar8;
          *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
          psVar2 = (short *)((longlong)param_1 + (ulonglong)bVar8 * 4 + 0xbc);
          *psVar2 = *psVar2 + 1;
          *(undefined4 *)(param_1 + 0x12) = 0;
        }
        uVar13 = *(uint *)((longlong)param_1 + 0x84);
        if (-1 < (int)uVar13) {
          uVar10 = (ulonglong)uVar13 + param_1[10];
        }
        FUN_140200e3c(param_1,uVar10,*(int *)((longlong)param_1 + 0x94) - uVar13,param_2 == 4);
        *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
        FUN_1401fbf70(*param_1);
        if (*(int *)(*param_1 + 0x18) != 0) {
          uVar7 = 1;
          if (param_2 == 4) {
            uVar7 = 3;
          }
          return uVar7;
        }
        if (param_2 == 4) {
          return 2;
        }
        return 0;
      }
    }
    if (2 < uVar13) {
      uVar13 = ((uint)*(byte *)((ulonglong)(*(uint *)((longlong)param_1 + 0x94) + 2) + param_1[10])
               ^ (int)param_1[0xe] << ((byte)(int)param_1[0x10] & 0x1f)) &
               *(uint *)((longlong)param_1 + 0x7c);
      *(uint *)(param_1 + 0xe) = uVar13;
      *(undefined2 *)
       (param_1[0xc] +
       (ulonglong)(*(uint *)((longlong)param_1 + 0x94) & *(uint *)((longlong)param_1 + 0x4c)) * 2) =
           *(undefined2 *)(param_1[0xd] + (ulonglong)uVar13 * 2);
      uVar15 = (ulonglong)
               *(ushort *)
                (param_1[0xc] +
                (ulonglong)
                (*(uint *)((longlong)param_1 + 0x94) & *(uint *)((longlong)param_1 + 0x4c)) * 2);
      *(undefined2 *)(param_1[0xd] + (ulonglong)*(uint *)(param_1 + 0xe) * 2) =
           *(undefined2 *)((longlong)param_1 + 0x94);
    }
    uVar13 = *(uint *)(param_1 + 0x11);
    *(undefined4 *)(param_1 + 0x11) = 2;
    *(uint *)(param_1 + 0x14) = uVar13;
    *(int *)((longlong)param_1 + 0x8c) = (int)param_1[0x13];
    if ((((int)uVar15 != 0) && (uVar13 < *(uint *)(param_1 + 0x15))) &&
       (uVar13 = *(int *)((longlong)param_1 + 0x94) - (int)uVar15,
       uVar13 <= *(int *)((longlong)param_1 + 0x44) - 0x106U)) {
      if ((int)param_1[0x16] != 2) {
        if ((int)param_1[0x16] == 3) {
          if (uVar13 != 1) goto LAB_1401fd75e;
          uVar7 = FUN_1401fcdf0(param_1,uVar15);
        }
        else {
          uVar7 = FUN_1401fcc50(param_1,uVar15);
        }
        *(undefined4 *)(param_1 + 0x11) = uVar7;
      }
LAB_1401fd75e:
      if ((*(uint *)(param_1 + 0x11) < 6) &&
         (((int)param_1[0x16] == 1 ||
          ((*(uint *)(param_1 + 0x11) == 3 &&
           (0x1000 < (uint)(*(int *)((longlong)param_1 + 0x94) - (int)param_1[0x13]))))))) {
        *(undefined4 *)(param_1 + 0x11) = 2;
      }
    }
    if ((*(uint *)(param_1 + 0x14) < 3) || (*(uint *)(param_1 + 0x14) < *(uint *)(param_1 + 0x11)))
    {
      if ((int)param_1[0x12] == 0) {
        *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
        *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) + -1;
        *(undefined4 *)(param_1 + 0x12) = 1;
        goto LAB_1401fd642;
      }
      bVar8 = *(byte *)((ulonglong)(*(int *)((longlong)param_1 + 0x94) - 1) + param_1[10]);
      *(undefined2 *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) = 0;
      *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar8;
      *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
      psVar2 = (short *)((longlong)param_1 + (ulonglong)bVar8 * 4 + 0xbc);
      *psVar2 = *psVar2 + 1;
      if (*(int *)((longlong)param_1 + 0x16f4) == (int)param_1[0x2de] + -1) {
        uVar13 = *(uint *)((longlong)param_1 + 0x84);
        uVar9 = uVar10;
        if (-1 < (int)uVar13) {
          uVar9 = (ulonglong)uVar13 + param_1[10];
        }
        FUN_140200e3c(param_1,uVar9,*(int *)((longlong)param_1 + 0x94) - uVar13,0);
        *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
        FUN_1401fbf70(*param_1);
      }
      *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
      *(int *)((longlong)param_1 + 0x9c) = *(int *)((longlong)param_1 + 0x9c) + -1;
      iVar3 = *(int *)(*param_1 + 0x18);
    }
    else {
      iVar3 = *(int *)((longlong)param_1 + 0x94);
      iVar4 = *(int *)((longlong)param_1 + 0x9c);
      sVar11 = (short)iVar3 - *(short *)((longlong)param_1 + 0x8c);
      bVar8 = (char)param_1[0x14] - 3;
      *(short *)(param_1[0x2df] + (ulonglong)*(uint *)((longlong)param_1 + 0x16f4) * 2) =
           sVar11 + -1;
      *(byte *)((ulonglong)*(uint *)((longlong)param_1 + 0x16f4) + param_1[0x2dd]) = bVar8;
      *(int *)((longlong)param_1 + 0x16f4) = *(int *)((longlong)param_1 + 0x16f4) + 1;
      uVar12 = sVar11 - 2;
      psVar2 = (short *)((longlong)param_1 + (ulonglong)(byte)(&DAT_140281b20)[bVar8] * 4 + 0x4c0);
      *psVar2 = *psVar2 + 1;
      if (uVar12 < 0x100) {
        bVar8 = (&DAT_140281920)[uVar12];
      }
      else {
        bVar8 = (&DAT_140281a20)[uVar12 >> 7];
      }
      psVar2 = (short *)((longlong)param_1 + (longlong)(int)(uint)bVar8 * 4 + 0x9b0);
      *psVar2 = *psVar2 + 1;
      lVar6 = param_1[0x2de];
      iVar5 = *(int *)((longlong)param_1 + 0x16f4);
      *(int *)((longlong)param_1 + 0x9c) =
           *(int *)((longlong)param_1 + 0x9c) + (1 - (int)param_1[0x14]);
      *(int *)(param_1 + 0x14) = (int)param_1[0x14] + -2;
      do {
        *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
        uVar13 = *(uint *)((longlong)param_1 + 0x94);
        if (uVar13 <= (uint)(iVar3 + -3 + iVar4)) {
          uVar14 = ((uint)*(byte *)((ulonglong)(uVar13 + 2) + param_1[10]) ^
                   (int)param_1[0xe] << ((byte)(int)param_1[0x10] & 0x1f)) &
                   *(uint *)((longlong)param_1 + 0x7c);
          *(uint *)(param_1 + 0xe) = uVar14;
          *(undefined2 *)
           (param_1[0xc] + (ulonglong)(uVar13 & *(uint *)((longlong)param_1 + 0x4c)) * 2) =
               *(undefined2 *)(param_1[0xd] + (ulonglong)uVar14 * 2);
          uVar15 = (ulonglong)
                   *(ushort *)
                    (param_1[0xc] +
                    (ulonglong)
                    (*(uint *)((longlong)param_1 + 0x94) & *(uint *)((longlong)param_1 + 0x4c)) * 2)
          ;
          *(undefined2 *)(param_1[0xd] + (ulonglong)*(uint *)(param_1 + 0xe) * 2) =
               *(undefined2 *)((longlong)param_1 + 0x94);
        }
        plVar1 = param_1 + 0x14;
        *(int *)plVar1 = (int)*plVar1 + -1;
      } while ((int)*plVar1 != 0);
      *(int *)((longlong)param_1 + 0x94) = *(int *)((longlong)param_1 + 0x94) + 1;
      *(undefined4 *)(param_1 + 0x12) = 0;
      *(undefined4 *)(param_1 + 0x11) = 2;
      if (iVar5 != (int)lVar6 + -1) goto LAB_1401fd642;
      uVar13 = *(uint *)((longlong)param_1 + 0x84);
      uVar9 = uVar10;
      if (-1 < (int)uVar13) {
        uVar9 = (ulonglong)uVar13 + param_1[10];
      }
      FUN_140200e3c(param_1,uVar9,*(int *)((longlong)param_1 + 0x94) - uVar13,0);
      *(undefined4 *)((longlong)param_1 + 0x84) = *(undefined4 *)((longlong)param_1 + 0x94);
      FUN_1401fbf70(*param_1);
      iVar3 = *(int *)(*param_1 + 0x18);
    }
    if (iVar3 == 0) {
      return 0;
    }
  } while( true );
}



undefined8 FUN_1401fdb10(longlong param_1)

{
  longlong lVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  
  if ((((param_1 == 0) || (lVar1 = *(longlong *)(param_1 + 0x28), lVar1 == 0)) ||
      (*(longlong *)(param_1 + 0x30) == 0)) || (*(longlong *)(param_1 + 0x38) == 0)) {
    uVar3 = 0xfffffffe;
  }
  else {
    *(undefined4 *)(param_1 + 0x1c) = 0;
    *(undefined4 *)(param_1 + 0xc) = 0;
    *(undefined8 *)(param_1 + 0x20) = 0;
    *(undefined4 *)(param_1 + 0x48) = 2;
    *(undefined4 *)(lVar1 + 0x28) = 0;
    *(undefined8 *)(lVar1 + 0x20) = *(undefined8 *)(lVar1 + 0x10);
    if (*(int *)(lVar1 + 0x2c) < 0) {
      *(int *)(lVar1 + 0x2c) = -*(int *)(lVar1 + 0x2c);
    }
    *(uint *)(lVar1 + 8) = (-(uint)(*(int *)(lVar1 + 0x2c) != 0) & 0xffffffb9) + 0x71;
    if (*(int *)(lVar1 + 0x2c) == 2) {
      uVar2 = FUN_1401ff42c();
    }
    else {
      uVar2 = FUN_1401fe8a0(0,0,0);
    }
    *(undefined4 *)(param_1 + 0x4c) = uVar2;
    *(undefined4 *)(lVar1 + 0x40) = 0;
    FUN_14020078c(lVar1);
    FUN_1401fcba0(lVar1);
    uVar3 = 0;
  }
  return uVar3;
}



undefined4 FUN_1401fdbd0(longlong param_1,uint param_2,uint param_3)

{
  longlong lVar1;
  undefined4 uVar2;
  longlong lVar3;
  
  uVar2 = 0;
  if ((param_1 != 0) && (lVar1 = *(longlong *)(param_1 + 0x28), lVar1 != 0)) {
    if (param_2 == 0xffffffff) {
      param_2 = 6;
    }
    if ((param_2 < 10) && (param_3 < 5)) {
      lVar3 = (longlong)(int)param_2;
      if (((&PTR_FUN_14027f088)[(longlong)*(int *)(lVar1 + 0xac) * 2] !=
           (&PTR_FUN_14027f088)[lVar3 * 2]) && (*(int *)(param_1 + 0xc) != 0)) {
        uVar2 = FUN_1401fbff0(param_1,1);
      }
      if (*(uint *)(lVar1 + 0xac) != param_2) {
        *(uint *)(lVar1 + 0xac) = param_2;
        *(uint *)(lVar1 + 0xa8) = (uint)*(ushort *)(&DAT_14027f082 + lVar3 * 0x10);
        *(uint *)(lVar1 + 0xb4) = (uint)*(ushort *)(&DAT_14027f080 + lVar3 * 0x10);
        *(uint *)(lVar1 + 0xb8) = (uint)*(ushort *)(&DAT_14027f084 + lVar3 * 0x10);
        *(uint *)(lVar1 + 0xa4) = (uint)*(ushort *)(&DAT_14027f086 + lVar3 * 0x10);
      }
      *(uint *)(lVar1 + 0xb0) = param_3;
      return uVar2;
    }
  }
  return 0xfffffffe;
}



undefined8
FUN_1401fdcd0(longlong param_1,uint param_2,int param_3,int param_4,int param_5,uint param_6,
             char *param_7,int param_8)

{
  uint uVar1;
  int iVar2;
  undefined8 uVar3;
  code *pcVar4;
  longlong *plVar5;
  longlong lVar6;
  int iVar7;
  undefined4 uVar8;
  
  uVar8 = 1;
  if (((param_7 == (char *)0x0) || (*param_7 != '1')) || (param_8 != 0x58)) {
    uVar3 = 0xfffffffa;
  }
  else {
    if (param_1 != 0) {
      *(undefined8 *)(param_1 + 0x20) = 0;
      if (*(longlong *)(param_1 + 0x30) == 0) {
        *(undefined8 *)(param_1 + 0x40) = 0;
        *(code **)(param_1 + 0x30) = FUN_1401fdfac;
      }
      pcVar4 = *(code **)(param_1 + 0x38);
      if (pcVar4 == (code *)0x0) {
        pcVar4 = FUN_1401fdfcc;
      }
      *(code **)(param_1 + 0x38) = pcVar4;
      if (param_2 == 0xffffffff) {
        param_2 = 6;
      }
      if (param_4 < 0) {
        param_4 = -param_4;
        uVar8 = 0;
      }
      else if (0xf < param_4) {
        uVar8 = 2;
        param_4 = param_4 + -0x10;
      }
      if (((param_5 - 1U < 9) && (param_3 == 8)) &&
         ((param_4 - 8U < 8 && ((param_2 < 10 && (param_6 < 5)))))) {
        if (param_4 == 8) {
          param_4 = 9;
        }
        plVar5 = (longlong *)(**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x40),1,0x1718)
        ;
        if (plVar5 != (longlong *)0x0) {
          *(longlong **)(param_1 + 0x28) = plVar5;
          *(undefined4 *)((longlong)plVar5 + 0x2c) = uVar8;
          *(int *)(plVar5 + 9) = param_4;
          *plVar5 = param_1;
          plVar5[6] = 0;
          iVar7 = 1 << ((byte)param_4 & 0x1f);
          *(int *)((longlong)plVar5 + 0x44) = iVar7;
          *(int *)(plVar5 + 0xf) = param_5 + 7;
          *(int *)((longlong)plVar5 + 0x4c) = iVar7 + -1;
          iVar2 = 1 << ((byte)(param_5 + 7) & 0x1f);
          *(int *)((longlong)plVar5 + 0x74) = iVar2;
          *(int *)((longlong)plVar5 + 0x7c) = iVar2 + -1;
          *(uint *)(plVar5 + 0x10) = (param_5 + 9U) / 3;
          lVar6 = (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x40),iVar7,2);
          plVar5[10] = lVar6;
          lVar6 = (**(code **)(param_1 + 0x30))
                            (*(undefined8 *)(param_1 + 0x40),
                             *(undefined4 *)((longlong)plVar5 + 0x44),2);
          plVar5[0xc] = lVar6;
          lVar6 = (**(code **)(param_1 + 0x30))
                            (*(undefined8 *)(param_1 + 0x40),
                             *(undefined4 *)((longlong)plVar5 + 0x74),2);
          iVar2 = 1 << ((char)param_5 + 6U & 0x1f);
          plVar5[0xd] = lVar6;
          *(int *)(plVar5 + 0x2de) = iVar2;
          lVar6 = (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x40),iVar2,4);
          plVar5[2] = lVar6;
          uVar1 = *(uint *)(plVar5 + 0x2de);
          *(uint *)(plVar5 + 3) = uVar1 << 2;
          if ((((plVar5[10] != 0) && (plVar5[0xc] != 0)) && (plVar5[0xd] != 0)) && (lVar6 != 0)) {
            *(uint *)((longlong)plVar5 + 0xac) = param_2;
            *(uint *)(plVar5 + 0x16) = param_6;
            *(undefined1 *)((longlong)plVar5 + 0x3c) = 8;
            plVar5[0x2df] = lVar6 + (ulonglong)(uVar1 >> 1) * 2;
            plVar5[0x2dd] = lVar6 + (ulonglong)uVar1 * 3;
            uVar3 = FUN_1401fdb10(param_1);
            return uVar3;
          }
          *(undefined4 *)(plVar5 + 1) = 0x29a;
          *(char **)(param_1 + 0x20) = "insufficient memory";
          FUN_1401fc840(param_1);
        }
        return 0xfffffffc;
      }
    }
    uVar3 = 0xfffffffe;
  }
  return uVar3;
}



void FUN_1401fdf40(void)

{
  FUN_1401fdcd0();
  return;
}



void FUN_1401fdfac(undefined8 param_1,int param_2,int param_3)

{
                    // WARNING: Could not recover jumptable at 0x0001401fdfb2. Too many branches
                    // WARNING: Treating indirect jump as call
  malloc((ulonglong)(uint)(param_2 * param_3));
  return;
}



void FUN_1401fdfcc(undefined8 param_1,void *param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001401fdfcf. Too many branches
                    // WARNING: Treating indirect jump as call
  free(param_2);
  return;
}



void FUN_1401fdfd8(longlong *param_1,int param_2)

{
  uint uVar1;
  undefined4 uVar2;
  uint uVar3;
  undefined4 uVar4;
  undefined4 *puVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lVar8;
  uint uVar9;
  uint uVar10;
  char *pcVar11;
  ulonglong uVar12;
  uint uVar13;
  uint uVar14;
  byte *pbVar15;
  byte *pbVar16;
  longlong lVar17;
  undefined1 *puVar18;
  undefined1 *puVar19;
  undefined1 *puVar20;
  undefined1 *puVar21;
  longlong lVar22;
  undefined1 *puVar23;
  uint uVar24;
  int iVar25;
  uint uVar26;
  byte *pbVar27;
  int local_68;
  
  puVar5 = (undefined4 *)param_1[5];
  lVar17 = *(longlong *)(puVar5 + 0x16);
  lVar6 = *(longlong *)(puVar5 + 0x18);
  uVar1 = puVar5[0xd];
  uVar14 = puVar5[0x10];
  uVar24 = puVar5[0x11];
  lVar8 = param_1[3];
  puVar18 = (undefined1 *)(param_1[2] + -1);
  uVar2 = puVar5[0x1a];
  pbVar15 = (byte *)(*param_1 + -1);
  local_68 = (int)puVar18 - (param_2 - (int)lVar8);
  iVar25 = puVar5[0xb];
  uVar3 = puVar5[0xc];
  lVar7 = *(longlong *)(puVar5 + 0xe);
  pbVar27 = pbVar15 + ((int)param_1[1] - 5);
  uVar4 = puVar5[0x1b];
  puVar19 = puVar18;
LAB_1401fe092:
  if (uVar24 < 0xf) {
    pbVar16 = pbVar15 + 1;
    pbVar15 = pbVar15 + 2;
    uVar14 = uVar14 + ((uint)*pbVar16 << ((byte)uVar24 & 0x1f)) +
             ((uint)*pbVar15 << ((byte)uVar24 + 8 & 0x1f));
    uVar24 = uVar24 + 0x10;
  }
  uVar9 = uVar14 & (1 << ((byte)uVar2 & 0x1f)) - 1U;
  while( true ) {
    uVar9 = *(uint *)(lVar17 + (ulonglong)uVar9 * 4);
    uVar14 = uVar14 >> ((byte)(uVar9 >> 8) & 0x1f);
    uVar24 = uVar24 - (uVar9 >> 8 & 0xff);
    if ((byte)uVar9 == 0) break;
    pbVar16 = pbVar15;
    if ((uVar9 & 0x10) != 0) {
      uVar26 = uVar9 >> 0x10;
      uVar9 = uVar9 & 0xf;
      if (uVar9 != 0) {
        if (uVar24 < uVar9) {
          pbVar15 = pbVar15 + 1;
          uVar14 = uVar14 + ((uint)*pbVar15 << ((byte)uVar24 & 0x1f));
          uVar24 = uVar24 + 8;
        }
        uVar10 = (1 << (sbyte)uVar9) - 1U & uVar14;
        uVar14 = uVar14 >> (sbyte)uVar9;
        uVar26 = uVar26 + uVar10;
        uVar24 = uVar24 - uVar9;
        pbVar16 = pbVar15;
      }
      if (uVar24 < 0xf) {
        pbVar15 = pbVar16 + 1;
        pbVar16 = pbVar16 + 2;
        uVar14 = uVar14 + ((uint)*pbVar15 << ((byte)uVar24 & 0x1f)) +
                 ((uint)*pbVar16 << ((byte)uVar24 + 8 & 0x1f));
        uVar24 = uVar24 + 0x10;
      }
      uVar9 = *(uint *)(lVar6 + (ulonglong)((1 << ((byte)uVar4 & 0x1f)) - 1U & uVar14) * 4);
      goto LAB_1401fe199;
    }
    if ((uVar9 & 0x40) != 0) {
      if ((uVar9 & 0x20) == 0) {
        pcVar11 = "invalid literal/length code";
        goto LAB_1401fe3c4;
      }
      *puVar5 = 0xb;
      goto LAB_1401fe3d0;
    }
    uVar9 = ((1 << ((byte)uVar9 & 0x1f)) - 1U & uVar14) + (uVar9 >> 0x10);
  }
  puVar19[1] = (char)(uVar9 >> 0x10);
  puVar20 = puVar19 + 1;
  goto LAB_1401fe388;
LAB_1401fe199:
  uVar14 = uVar14 >> ((byte)(uVar9 >> 8) & 0x1f);
  uVar24 = uVar24 - (uVar9 >> 8 & 0xff);
  if ((uVar9 & 0x10) != 0) goto code_r0x0001401fe1b6;
  if ((uVar9 & 0x40) != 0) {
    pcVar11 = "invalid distance code";
    goto LAB_1401fe3c4;
  }
  uVar9 = *(uint *)(lVar6 + (ulonglong)
                            (((1 << ((byte)uVar9 & 0x1f)) - 1U & uVar14) + (uVar9 >> 0x10)) * 4);
  goto LAB_1401fe199;
code_r0x0001401fe1b6:
  uVar13 = uVar9 & 0xf;
  pbVar15 = pbVar16;
  uVar10 = uVar24;
  if (uVar24 < uVar13) {
    pbVar15 = pbVar16 + 1;
    uVar10 = uVar24 + 8;
    uVar14 = uVar14 + ((uint)*pbVar15 << ((byte)uVar24 & 0x1f));
    if (uVar10 < uVar13) {
      pbVar15 = pbVar16 + 2;
      uVar14 = uVar14 + ((uint)*pbVar15 << ((byte)uVar10 & 0x1f));
      uVar10 = uVar24 + 0x10;
    }
  }
  uVar24 = uVar10 - uVar13;
  uVar10 = (1 << (sbyte)uVar13) - 1U & uVar14;
  uVar14 = uVar14 >> (sbyte)uVar13;
  uVar10 = (uVar9 >> 0x10) + uVar10;
  uVar9 = (int)puVar19 - local_68;
  if (uVar10 <= uVar9) {
    puVar20 = puVar19 + -(ulonglong)uVar10;
    do {
      puVar23 = puVar19;
      puVar21 = puVar20;
      puVar19 = puVar23 + 3;
      puVar23[1] = puVar21[1];
      uVar26 = uVar26 - 3;
      puVar23[2] = puVar21[2];
      *puVar19 = puVar21[3];
      puVar20 = puVar21 + 3;
    } while (2 < uVar26);
    puVar20 = puVar19;
    if (uVar26 != 0) {
      puVar23[4] = puVar21[4];
      puVar20 = puVar23 + 4;
      if (1 < uVar26) {
        puVar23[5] = puVar21[5];
        puVar20 = puVar23 + 5;
      }
    }
    goto LAB_1401fe388;
  }
  uVar9 = uVar10 - uVar9;
  if (uVar3 < uVar9) {
    pcVar11 = "invalid distance too far back";
    pbVar16 = pbVar15;
LAB_1401fe3c4:
    param_1[4] = (longlong)pcVar11;
    *puVar5 = 0x1b;
LAB_1401fe3d0:
    *(int *)(param_1 + 3) = ((int)(puVar18 + ((int)lVar8 - 0x101)) - (int)puVar19) + 0x101;
    lVar17 = (longlong)pbVar16 - (ulonglong)(uVar24 >> 3);
    iVar25 = uVar24 + (uVar24 >> 3) * -8;
    *param_1 = lVar17 + 1;
    *(int *)(param_1 + 1) = ((int)pbVar27 - (int)lVar17) + 5;
    param_1[2] = (longlong)(puVar19 + 1);
    puVar5[0x11] = iVar25;
    puVar5[0x10] = (1 << ((byte)iVar25 & 0x1f)) - 1U & uVar14;
    return;
  }
  lVar22 = lVar7 + -1;
  if (uVar1 == 0) {
    puVar21 = (undefined1 *)(lVar22 + (ulonglong)(iVar25 - uVar9));
    if (uVar9 < uVar26) {
      uVar26 = uVar26 - uVar9;
      do {
        puVar21 = puVar21 + 1;
        puVar19 = puVar19 + 1;
        uVar9 = uVar9 - 1;
        *puVar19 = *puVar21;
      } while (uVar9 != 0);
LAB_1401fe2c0:
      puVar21 = puVar19 + -(ulonglong)uVar10;
    }
  }
  else if (uVar1 < uVar9) {
    uVar13 = uVar9 - uVar1;
    puVar21 = (undefined1 *)(lVar22 + (ulonglong)((uVar1 - uVar9) + iVar25));
    if (uVar13 < uVar26) {
      uVar26 = uVar26 - uVar13;
      lVar22 = (longlong)puVar21 - (longlong)puVar19;
      do {
        puVar19 = puVar19 + 1;
        uVar13 = uVar13 - 1;
        *puVar19 = puVar19[lVar22];
      } while (uVar13 != 0);
      puVar21 = (undefined1 *)(lVar7 + -1);
      if (uVar1 < uVar26) {
        uVar26 = uVar26 - uVar1;
        uVar9 = uVar1;
        do {
          puVar21 = puVar21 + 1;
          puVar19 = puVar19 + 1;
          uVar9 = uVar9 - 1;
          *puVar19 = *puVar21;
        } while (uVar9 != 0);
        goto LAB_1401fe2c0;
      }
    }
  }
  else {
    puVar21 = (undefined1 *)(lVar22 + (ulonglong)(uVar1 - uVar9));
    if (uVar9 < uVar26) {
      uVar26 = uVar26 - uVar9;
      do {
        puVar21 = puVar21 + 1;
        puVar19 = puVar19 + 1;
        uVar9 = uVar9 - 1;
        *puVar19 = *puVar21;
      } while (uVar9 != 0);
      goto LAB_1401fe2c0;
    }
  }
  if (2 < uVar26) {
    uVar12 = (ulonglong)((uVar26 - 3) / 3 + 1);
    puVar20 = puVar19;
    puVar23 = puVar21;
    do {
      puVar21 = puVar23 + 3;
      puVar19 = puVar20 + 3;
      puVar20[1] = puVar23[1];
      uVar26 = uVar26 - 3;
      uVar12 = uVar12 - 1;
      puVar20[2] = puVar23[2];
      *puVar19 = *puVar21;
      puVar20 = puVar19;
      puVar23 = puVar21;
    } while (uVar12 != 0);
  }
  puVar20 = puVar19;
  if (uVar26 != 0) {
    puVar19[1] = puVar21[1];
    puVar20 = puVar19 + 1;
    if (1 < uVar26) {
      puVar19[2] = puVar21[2];
      puVar20 = puVar19 + 2;
    }
  }
LAB_1401fe388:
  pbVar16 = pbVar15;
  puVar19 = puVar20;
  if ((pbVar27 <= pbVar15) || (puVar18 + ((int)lVar8 - 0x101) <= puVar20)) goto LAB_1401fe3d0;
  goto LAB_1401fe092;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined8
FUN_1401fe438(int param_1,ushort *param_2,uint param_3,longlong *param_4,uint *param_5,
             undefined *param_6)

{
  byte bVar1;
  ushort uVar2;
  ushort *puVar3;
  undefined8 uVar4;
  byte bVar5;
  longlong lVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  uint uVar10;
  uint uVar11;
  uint uVar12;
  int iVar13;
  char cVar14;
  uint uVar15;
  uint uVar16;
  int iVar17;
  int iVar18;
  uint uVar19;
  byte bVar21;
  ulonglong uVar22;
  uint uVar23;
  undefined *puVar24;
  undefined4 local_d8;
  longlong local_d0;
  uint local_c8;
  uint local_c4;
  uint local_c0;
  uint local_bc;
  undefined *local_b0;
  ushort local_80 [32];
  ulonglong local_40;
  ulonglong uVar20;
  
  local_40 = DAT_1403223c0 ^ (ulonglong)&local_d8;
  uVar22 = 0;
  uVar23 = 1;
  puVar3 = local_80;
  for (lVar6 = 0x10; lVar6 != 0; lVar6 = lVar6 + -1) {
    *puVar3 = 0;
    puVar3 = puVar3 + 1;
  }
  if (param_3 != 0) {
    uVar8 = (ulonglong)param_3;
    puVar3 = param_2;
    do {
      uVar2 = *puVar3;
      puVar3 = puVar3 + 1;
      local_80[uVar2] = local_80[uVar2] + 1;
      uVar8 = uVar8 - 1;
    } while (uVar8 != 0);
  }
  uVar10 = 0xf;
  local_c4 = 0xffffffff;
  puVar3 = local_80 + 0xf;
  do {
    if (*puVar3 != 0) break;
    uVar10 = uVar10 - 1;
    puVar3 = puVar3 + -1;
  } while (uVar10 != 0);
  uVar16 = *param_5;
  if (uVar10 < *param_5) {
    uVar16 = uVar10;
  }
  if (uVar10 == 0) {
    *(undefined4 *)*param_4 = 0x140;
    *param_4 = *param_4 + 4;
    *(undefined4 *)*param_4 = 0x140;
    *param_4 = *param_4 + 4;
    *param_5 = 1;
LAB_1401fe506:
    uVar4 = 0;
  }
  else {
    puVar3 = local_80;
    uVar15 = uVar23;
    do {
      puVar3 = puVar3 + 1;
      if (*puVar3 != 0) break;
      uVar15 = uVar15 + 1;
    } while (uVar15 < 0x10);
    uVar8 = (ulonglong)uVar16;
    uVar11 = uVar23;
    if (uVar16 < uVar15) {
      uVar8 = (ulonglong)uVar15;
    }
    do {
      uVar23 = uVar23 * 2 - (uint)local_80[uVar11];
      if ((int)uVar23 < 0) goto LAB_1401fe875;
      uVar11 = uVar11 + 1;
    } while (uVar11 < 0x10);
    if (((int)uVar23 < 1) || ((param_1 != 0 && (uVar10 == 1)))) {
      local_80[0x11] = 0;
      lVar6 = 0xe;
      uVar7 = uVar22;
      do {
        lVar6 = lVar6 + -1;
        *(short *)((longlong)local_80 + uVar7 + 0x24) =
             *(short *)((longlong)local_80 + uVar7 + 2) +
             *(short *)((longlong)local_80 + uVar7 + 0x22);
        uVar7 = uVar7 + 2;
      } while (lVar6 != 0);
      puVar3 = param_2;
      uVar7 = uVar22;
      if (param_3 != 0) {
        do {
          if (*puVar3 != 0) {
            *(short *)(param_6 + (ulonglong)local_80[(ulonglong)*puVar3 + 0x10] * 2) = (short)uVar7;
            local_80[(ulonglong)*puVar3 + 0x10] = local_80[(ulonglong)*puVar3 + 0x10] + 1;
          }
          uVar23 = (int)uVar7 + 1;
          puVar3 = puVar3 + 1;
          uVar7 = (ulonglong)uVar23;
        } while (uVar23 < param_3);
      }
      if (param_1 == 0) {
        local_b0 = param_6;
        iVar13 = 0x13;
        puVar24 = param_6;
      }
      else if (param_1 == 1) {
        iVar13 = 0x100;
        local_b0 = &DAT_14027efee;
        puVar24 = &UNK_14027efae;
      }
      else {
        iVar13 = -1;
        local_b0 = &DAT_14027f270;
        puVar24 = &DAT_14027f230;
      }
      local_d0 = *param_4;
      uVar16 = (uint)uVar8;
      bVar5 = (byte)uVar8;
      local_bc = 1 << (bVar5 & 0x1f);
      uVar23 = local_bc - 1;
      local_c0 = 0;
      uVar7 = uVar22;
      uVar9 = uVar22;
      local_c8 = local_bc;
      if ((param_1 != 1) || (uVar7 = 0, uVar9 = 0, local_bc < 0x5b0)) {
LAB_1401fe658:
        cVar14 = (char)uVar15;
        bVar21 = (byte)uVar22;
        bVar1 = cVar14 - bVar21;
        uVar2 = *(ushort *)(param_6 + uVar9 * 2);
        if ((int)(uint)uVar2 < iVar13) {
          local_d8._0_2_ = (ushort)bVar1 << 8;
        }
        else if (iVar13 < (int)(uint)uVar2) {
          local_d8._0_2_ = CONCAT11(bVar1,local_b0[(ulonglong)*(ushort *)(param_6 + uVar9 * 2) * 2])
          ;
          uVar2 = *(ushort *)(puVar24 + (ulonglong)*(ushort *)(param_6 + uVar9 * 2) * 2);
        }
        else {
          local_d8 = CONCAT31((uint3)bVar1,0x60);
          uVar2 = 0;
        }
        uVar12 = (uint)uVar7;
        local_d8 = CONCAT22(uVar2,(ushort)local_d8);
        iVar17 = 1 << (cVar14 - bVar21 & 0x1f);
        uVar7 = (ulonglong)((uVar12 >> (bVar21 & 0x1f)) + local_bc);
        uVar11 = local_bc;
        do {
          uVar7 = (ulonglong)(uint)((int)uVar7 - iVar17);
          uVar11 = uVar11 - iVar17;
          *(uint *)(local_d0 + uVar7 * 4) = local_d8;
        } while (uVar11 != 0);
        for (uVar11 = 1 << (cVar14 - 1U & 0x1f); (uVar12 & uVar11) != 0; uVar11 = uVar11 >> 1) {
        }
        uVar19 = 0;
        if (uVar11 != 0) {
          uVar19 = uVar11 + (uVar11 - 1 & uVar12);
        }
        uVar7 = (ulonglong)uVar19;
        local_c0 = local_c0 + 1;
        uVar9 = (ulonglong)local_c0;
        puVar3 = local_80 + uVar15;
        *puVar3 = *puVar3 - 1;
        if (*puVar3 != 0) goto LAB_1401fe722;
        if (uVar15 != uVar10) {
          uVar15 = (uint)param_2[*(ushort *)(param_6 + uVar9 * 2)];
          goto LAB_1401fe722;
        }
        local_d8._0_2_ = CONCAT11(cVar14 - bVar21,0x40);
        local_d8 = (uint)(ushort)local_d8;
        while (uVar19 != 0) {
          uVar10 = (uint)uVar7;
          if (((int)uVar22 != 0) && ((uVar23 & uVar10) != local_c4)) {
            local_d0 = *param_4;
            uVar22 = 0;
            local_d8._0_2_ = CONCAT11(bVar5,(undefined1)local_d8);
            local_d8 = (uint)(ushort)local_d8;
            uVar15 = uVar16;
          }
          *(uint *)(local_d0 + (uVar7 >> ((byte)uVar22 & 0x3f)) * 4) = local_d8;
          for (uVar11 = 1 << ((char)uVar15 - 1U & 0x1f); (uVar10 & uVar11) != 0;
              uVar11 = uVar11 >> 1) {
          }
          uVar19 = 0;
          if (uVar11 != 0) {
            uVar19 = uVar11 + (uVar11 - 1 & uVar10);
          }
          uVar7 = (ulonglong)uVar19;
        }
        *param_4 = *param_4 + (ulonglong)local_c8 * 4;
        *param_5 = uVar16;
        goto LAB_1401fe506;
      }
LAB_1401fe649:
      uVar4 = 1;
    }
    else {
LAB_1401fe875:
      uVar4 = 0xffffffff;
    }
  }
  return uVar4;
LAB_1401fe722:
  if (uVar16 < uVar15) {
    uVar19 = uVar23 & uVar19;
    uVar20 = (ulonglong)uVar19;
    if (uVar19 == local_c4) goto LAB_1401fe658;
    if ((int)uVar22 == 0) {
      uVar22 = uVar8;
    }
    local_d0 = local_d0 + (ulonglong)local_bc * 4;
    iVar18 = uVar15 - (int)uVar22;
    uVar11 = (int)uVar22 + iVar18;
    for (iVar17 = 1 << ((byte)iVar18 & 0x1f);
        (uVar11 < uVar10 && (uVar9 = (ulonglong)uVar11, 0 < (int)(iVar17 - (uint)local_80[uVar9])));
        iVar17 = (iVar17 - (uint)local_80[uVar9]) * 2) {
      uVar11 = uVar11 + 1;
      iVar18 = iVar18 + 1;
    }
    local_bc = 1 << ((byte)iVar18 & 0x1f);
    local_c8 = local_c8 + local_bc;
    if ((param_1 != 1) || (local_c8 < 0x5b0)) {
      *(byte *)(*param_4 + uVar20 * 4) = (byte)iVar18;
      uVar9 = (ulonglong)local_c0;
      *(byte *)(*param_4 + 1 + uVar20 * 4) = bVar5;
      *(short *)(*param_4 + 2 + uVar20 * 4) = (short)(local_d0 - *param_4 >> 2);
      local_c4 = uVar19;
      goto LAB_1401fe658;
    }
    goto LAB_1401fe649;
  }
  goto LAB_1401fe658;
}



uint FUN_1401fe8a0(uint param_1,byte *param_2,uint param_3)

{
  byte bVar1;
  int iVar2;
  ulonglong uVar3;
  uint uVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  int iVar8;
  int iVar9;
  int iVar10;
  int iVar11;
  int iVar12;
  int iVar13;
  int iVar14;
  int iVar15;
  int iVar16;
  int iVar17;
  int iVar18;
  int iVar19;
  byte *pbVar20;
  
  uVar4 = param_1 & 0xffff;
  param_1 = param_1 >> 0x10;
  if (param_3 == 1) {
    uVar4 = uVar4 + *param_2;
    if (0xfff0 < uVar4) {
      uVar4 = uVar4 - 0xfff1;
    }
    param_1 = param_1 + uVar4;
    if (0xfff0 < param_1) {
      param_1 = param_1 - 0xfff1;
    }
  }
  else {
    if (param_2 == (byte *)0x0) {
      return 1;
    }
    if (param_3 < 0x10) {
      for (; param_3 != 0; param_3 = param_3 - 1) {
        bVar1 = *param_2;
        param_2 = param_2 + 1;
        uVar4 = uVar4 + bVar1;
        param_1 = param_1 + uVar4;
      }
      if (0xfff0 < uVar4) {
        uVar4 = uVar4 - 0xfff1;
      }
      return (param_1 + (param_1 / 0xfff1) * 0xf) * 0x10000 | uVar4;
    }
    if (0x15af < param_3) {
      uVar3 = (ulonglong)param_3 / 0x15b0;
      do {
        param_3 = param_3 - 0x15b0;
        iVar2 = 0x15b;
        pbVar20 = param_2;
        do {
          param_2 = pbVar20 + 0x10;
          iVar5 = uVar4 + *pbVar20;
          iVar6 = iVar5 + (uint)pbVar20[1];
          iVar7 = iVar6 + (uint)pbVar20[2];
          iVar8 = iVar7 + (uint)pbVar20[3];
          iVar9 = iVar8 + (uint)pbVar20[4];
          iVar10 = iVar9 + (uint)pbVar20[5];
          iVar11 = iVar10 + (uint)pbVar20[6];
          iVar12 = iVar11 + (uint)pbVar20[7];
          iVar13 = iVar12 + (uint)pbVar20[8];
          iVar14 = iVar13 + (uint)pbVar20[9];
          iVar15 = iVar14 + (uint)pbVar20[10];
          iVar16 = iVar15 + (uint)pbVar20[0xb];
          iVar17 = iVar16 + (uint)pbVar20[0xc];
          iVar18 = iVar17 + (uint)pbVar20[0xd];
          iVar19 = iVar18 + (uint)pbVar20[0xe];
          uVar4 = iVar19 + (uint)pbVar20[0xf];
          param_1 = param_1 + iVar5 + iVar6 + iVar7 + iVar8 + iVar9 + iVar10 + iVar11 + iVar12 +
                    iVar13 + iVar14 + iVar15 + iVar16 + iVar17 + iVar18 + iVar19 + uVar4;
          iVar2 = iVar2 + -1;
          pbVar20 = param_2;
        } while (iVar2 != 0);
        uVar4 = uVar4 % 0xfff1;
        param_1 = param_1 % 0xfff1;
        uVar3 = uVar3 - 1;
      } while (uVar3 != 0);
    }
    if (param_3 != 0) {
      if (0xf < param_3) {
        uVar3 = (ulonglong)(param_3 >> 4);
        pbVar20 = param_2;
        do {
          param_3 = param_3 - 0x10;
          param_2 = pbVar20 + 0x10;
          iVar2 = uVar4 + *pbVar20;
          iVar5 = iVar2 + (uint)pbVar20[1];
          iVar6 = iVar5 + (uint)pbVar20[2];
          iVar7 = iVar6 + (uint)pbVar20[3];
          iVar8 = iVar7 + (uint)pbVar20[4];
          iVar9 = iVar8 + (uint)pbVar20[5];
          iVar10 = iVar9 + (uint)pbVar20[6];
          iVar11 = iVar10 + (uint)pbVar20[7];
          iVar12 = iVar11 + (uint)pbVar20[8];
          iVar13 = iVar12 + (uint)pbVar20[9];
          iVar14 = iVar13 + (uint)pbVar20[10];
          iVar15 = iVar14 + (uint)pbVar20[0xb];
          iVar16 = iVar15 + (uint)pbVar20[0xc];
          iVar17 = iVar16 + (uint)pbVar20[0xd];
          iVar18 = iVar17 + (uint)pbVar20[0xe];
          uVar4 = iVar18 + (uint)pbVar20[0xf];
          param_1 = param_1 + iVar2 + iVar5 + iVar6 + iVar7 + iVar8 + iVar9 + iVar10 + iVar11 +
                    iVar12 + iVar13 + iVar14 + iVar15 + iVar16 + iVar17 + iVar18 + uVar4;
          uVar3 = uVar3 - 1;
          pbVar20 = param_2;
        } while (uVar3 != 0);
      }
      for (; param_3 != 0; param_3 = param_3 - 1) {
        bVar1 = *param_2;
        param_2 = param_2 + 1;
        uVar4 = uVar4 + bVar1;
        param_1 = param_1 + uVar4;
      }
      uVar4 = uVar4 % 0xfff1;
      param_1 = param_1 % 0xfff1;
    }
  }
  return param_1 << 0x10 | uVar4;
}



uint FUN_1401feb80(uint param_1,uint param_2,uint param_3)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  
  uVar1 = (param_1 & 0xffff) + 0xfff0 + (param_2 & 0xffff);
  uVar3 = (param_1 & 0xffff) * (param_3 % 0xfff1);
  uVar3 = uVar3 + 0xfff1 +
          (((param_1 >> 0x10) + (uVar3 / 0xfff1) * -0xfff1 + (param_2 >> 0x10)) - param_3 % 0xfff1);
  uVar2 = uVar1;
  if ((0xfff1 < uVar1) && (uVar2 = uVar1 - 0xfff1, 0xfff1 < uVar2)) {
    uVar2 = uVar1 - 0x1ffe2;
  }
  if (0x1ffe2 < uVar3) {
    uVar3 = uVar3 - 0x1ffe2;
  }
  if (0xfff1 < uVar3) {
    uVar3 = uVar3 - 0xfff1;
  }
  return uVar3 << 0x10 | uVar2;
}



uint FUN_1401fec2c(uint param_1,uint *param_2,uint param_3)

{
  uint *puVar1;
  ulonglong uVar2;
  uint uVar3;
  ulonglong uVar4;
  
  param_1 = ~param_1;
  for (; (uVar4 = (ulonglong)param_3, param_3 != 0 && (((ulonglong)param_2 & 3) != 0));
      param_2 = (uint *)((longlong)param_2 + 1)) {
    param_1 = *(uint *)(&DAT_14027f2b0 + (ulonglong)(byte)((byte)*param_2 ^ (byte)param_1) * 4) ^
              param_1 >> 8;
    param_3 = param_3 - 1;
  }
  if (0x1f < param_3) {
    uVar2 = (ulonglong)(param_3 >> 5);
    puVar1 = param_2;
    do {
      param_1 = param_1 ^ *puVar1;
      uVar3 = *(uint *)(&DAT_14027f6b0 + (ulonglong)(byte)(param_1 >> 0x10) * 4) ^
              *(uint *)(&DAT_14027fab0 + (ulonglong)(byte)(param_1 >> 8) * 4) ^
              *(uint *)(&DAT_14027f2b0 + (ulonglong)(param_1 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027feb0 + (ulonglong)(param_1 & 0xff) * 4) ^ puVar1[1];
      uVar3 = *(uint *)(&DAT_14027f6b0 + (ulonglong)(byte)(uVar3 >> 0x10) * 4) ^
              *(uint *)(&DAT_14027fab0 + (ulonglong)(byte)(uVar3 >> 8) * 4) ^
              *(uint *)(&DAT_14027f2b0 + (ulonglong)(uVar3 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027feb0 + (ulonglong)(uVar3 & 0xff) * 4) ^ puVar1[2];
      uVar3 = *(uint *)(&DAT_14027f6b0 + (ulonglong)(byte)(uVar3 >> 0x10) * 4) ^
              *(uint *)(&DAT_14027fab0 + (ulonglong)(byte)(uVar3 >> 8) * 4) ^
              *(uint *)(&DAT_14027f2b0 + (ulonglong)(uVar3 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027feb0 + (ulonglong)(uVar3 & 0xff) * 4) ^ puVar1[3];
      uVar3 = *(uint *)(&DAT_14027f6b0 + (ulonglong)(byte)(uVar3 >> 0x10) * 4) ^
              *(uint *)(&DAT_14027fab0 + (ulonglong)(byte)(uVar3 >> 8) * 4) ^
              *(uint *)(&DAT_14027f2b0 + (ulonglong)(uVar3 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027feb0 + (ulonglong)(uVar3 & 0xff) * 4) ^ puVar1[4];
      uVar3 = *(uint *)(&DAT_14027f6b0 + (ulonglong)(byte)(uVar3 >> 0x10) * 4) ^
              *(uint *)(&DAT_14027fab0 + (ulonglong)(byte)(uVar3 >> 8) * 4) ^
              *(uint *)(&DAT_14027f2b0 + (ulonglong)(uVar3 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027feb0 + (ulonglong)(uVar3 & 0xff) * 4) ^ puVar1[5];
      param_2 = puVar1 + 8;
      uVar4 = (ulonglong)((int)uVar4 - 0x20);
      uVar3 = *(uint *)(&DAT_14027f6b0 + (ulonglong)(byte)(uVar3 >> 0x10) * 4) ^
              *(uint *)(&DAT_14027fab0 + (ulonglong)(byte)(uVar3 >> 8) * 4) ^
              *(uint *)(&DAT_14027f2b0 + (ulonglong)(uVar3 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027feb0 + (ulonglong)(uVar3 & 0xff) * 4) ^ puVar1[6];
      uVar3 = *(uint *)(&DAT_14027f6b0 + (ulonglong)(byte)(uVar3 >> 0x10) * 4) ^
              *(uint *)(&DAT_14027fab0 + (ulonglong)(byte)(uVar3 >> 8) * 4) ^
              *(uint *)(&DAT_14027f2b0 + (ulonglong)(uVar3 >> 0x18) * 4) ^
              *(uint *)(&DAT_14027feb0 + (ulonglong)(uVar3 & 0xff) * 4) ^ puVar1[7];
      param_1 = *(uint *)(&DAT_14027f6b0 + (ulonglong)(byte)(uVar3 >> 0x10) * 4) ^
                *(uint *)(&DAT_14027fab0 + (ulonglong)(byte)(uVar3 >> 8) * 4) ^
                *(uint *)(&DAT_14027f2b0 + (ulonglong)(uVar3 >> 0x18) * 4) ^
                *(uint *)(&DAT_14027feb0 + (ulonglong)(uVar3 & 0xff) * 4);
      uVar2 = uVar2 - 1;
      puVar1 = param_2;
    } while (uVar2 != 0);
  }
  if (3 < (uint)uVar4) {
    uVar2 = uVar4 >> 2;
    do {
      param_1 = param_1 ^ *param_2;
      uVar4 = (ulonglong)((int)uVar4 - 4);
      param_2 = param_2 + 1;
      param_1 = *(uint *)(&DAT_14027f6b0 + (ulonglong)(byte)(param_1 >> 0x10) * 4) ^
                *(uint *)(&DAT_14027fab0 + (ulonglong)(byte)(param_1 >> 8) * 4) ^
                *(uint *)(&DAT_14027f2b0 + (ulonglong)(param_1 >> 0x18) * 4) ^
                *(uint *)(&DAT_14027feb0 + (ulonglong)(param_1 & 0xff) * 4);
      uVar2 = uVar2 - 1;
    } while (uVar2 != 0);
  }
  uVar3 = (uint)uVar4;
  while (uVar3 != 0) {
    uVar3 = *param_2;
    param_2 = (uint *)((longlong)param_2 + 1);
    param_1 = *(uint *)(&DAT_14027f2b0 + (ulonglong)(byte)((byte)uVar3 ^ (byte)param_1) * 4) ^
              param_1 >> 8;
    uVar3 = (int)uVar4 - 1;
    uVar4 = (ulonglong)uVar3;
  }
  return ~param_1;
}



int FUN_1401fef3c(uint param_1,byte *param_2,uint param_3)

{
  uint *puVar1;
  uint *puVar2;
  ulonglong uVar3;
  uint uVar4;
  uint uVar5;
  ulonglong uVar6;
  
  uVar4 = ~(((param_1 & 0xff00) + param_1 * 0x10000) * 0x100 + (param_1 >> 8 & 0xff00) +
           (param_1 >> 0x18));
  for (; (uVar6 = (ulonglong)param_3, param_3 != 0 && (((ulonglong)param_2 & 3) != 0));
      param_2 = param_2 + 1) {
    uVar4 = *(uint *)(&DAT_1402802b0 + ((ulonglong)(uVar4 >> 0x18) ^ (ulonglong)*param_2) * 4) ^
            uVar4 << 8;
    param_3 = param_3 - 1;
  }
  puVar2 = (uint *)(param_2 + -4);
  if (0x1f < param_3) {
    uVar3 = (ulonglong)(param_3 >> 5);
    puVar1 = puVar2;
    do {
      uVar4 = uVar4 ^ puVar1[1];
      uVar4 = *(uint *)(&DAT_140280ab0 + (ulonglong)(byte)(uVar4 >> 0x10) * 4) ^
              *(uint *)(&DAT_1402806b0 + (ulonglong)(byte)(uVar4 >> 8) * 4) ^
              *(uint *)(&DAT_140280eb0 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_1402802b0 + (ulonglong)(uVar4 & 0xff) * 4) ^ puVar1[2];
      uVar4 = *(uint *)(&DAT_140280ab0 + (ulonglong)(byte)(uVar4 >> 0x10) * 4) ^
              *(uint *)(&DAT_1402806b0 + (ulonglong)(byte)(uVar4 >> 8) * 4) ^
              *(uint *)(&DAT_140280eb0 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_1402802b0 + (ulonglong)(uVar4 & 0xff) * 4) ^ puVar1[3];
      uVar4 = *(uint *)(&DAT_140280ab0 + (ulonglong)(byte)(uVar4 >> 0x10) * 4) ^
              *(uint *)(&DAT_1402806b0 + (ulonglong)(byte)(uVar4 >> 8) * 4) ^
              *(uint *)(&DAT_140280eb0 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_1402802b0 + (ulonglong)(uVar4 & 0xff) * 4) ^ puVar1[4];
      uVar4 = *(uint *)(&DAT_140280ab0 + (ulonglong)(byte)(uVar4 >> 0x10) * 4) ^
              *(uint *)(&DAT_1402806b0 + (ulonglong)(byte)(uVar4 >> 8) * 4) ^
              *(uint *)(&DAT_140280eb0 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_1402802b0 + (ulonglong)(uVar4 & 0xff) * 4) ^ puVar1[5];
      uVar4 = *(uint *)(&DAT_140280ab0 + (ulonglong)(byte)(uVar4 >> 0x10) * 4) ^
              *(uint *)(&DAT_1402806b0 + (ulonglong)(byte)(uVar4 >> 8) * 4) ^
              *(uint *)(&DAT_140280eb0 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_1402802b0 + (ulonglong)(uVar4 & 0xff) * 4) ^ puVar1[6];
      puVar2 = puVar1 + 8;
      uVar6 = (ulonglong)((int)uVar6 - 0x20);
      uVar4 = *(uint *)(&DAT_140280ab0 + (ulonglong)(byte)(uVar4 >> 0x10) * 4) ^
              *(uint *)(&DAT_1402806b0 + (ulonglong)(byte)(uVar4 >> 8) * 4) ^
              *(uint *)(&DAT_140280eb0 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_1402802b0 + (ulonglong)(uVar4 & 0xff) * 4) ^ puVar1[7];
      uVar4 = *(uint *)(&DAT_140280ab0 + (ulonglong)(byte)(uVar4 >> 0x10) * 4) ^
              *(uint *)(&DAT_1402806b0 + (ulonglong)(byte)(uVar4 >> 8) * 4) ^
              *(uint *)(&DAT_140280eb0 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_1402802b0 + (ulonglong)(uVar4 & 0xff) * 4) ^ *puVar2;
      uVar4 = *(uint *)(&DAT_140280ab0 + (ulonglong)(byte)(uVar4 >> 0x10) * 4) ^
              *(uint *)(&DAT_1402806b0 + (ulonglong)(byte)(uVar4 >> 8) * 4) ^
              *(uint *)(&DAT_140280eb0 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_1402802b0 + (ulonglong)(uVar4 & 0xff) * 4);
      uVar3 = uVar3 - 1;
      puVar1 = puVar2;
    } while (uVar3 != 0);
  }
  if (3 < (uint)uVar6) {
    uVar3 = uVar6 >> 2;
    do {
      puVar2 = puVar2 + 1;
      uVar6 = (ulonglong)((int)uVar6 - 4);
      uVar4 = uVar4 ^ *puVar2;
      uVar4 = *(uint *)(&DAT_140280ab0 + (ulonglong)(byte)(uVar4 >> 0x10) * 4) ^
              *(uint *)(&DAT_1402806b0 + (ulonglong)(byte)(uVar4 >> 8) * 4) ^
              *(uint *)(&DAT_140280eb0 + (ulonglong)(uVar4 >> 0x18) * 4) ^
              *(uint *)(&DAT_1402802b0 + (ulonglong)(uVar4 & 0xff) * 4);
      uVar3 = uVar3 - 1;
    } while (uVar3 != 0);
  }
  puVar2 = puVar2 + 1;
  uVar5 = (uint)uVar6;
  while (uVar5 != 0) {
    uVar5 = *puVar2;
    puVar2 = (uint *)((longlong)puVar2 + 1);
    uVar4 = *(uint *)(&DAT_1402802b0 + ((ulonglong)(uVar4 >> 0x18) ^ (ulonglong)(byte)uVar5) * 4) ^
            uVar4 << 8;
    uVar5 = (int)uVar6 - 1;
    uVar6 = (ulonglong)uVar5;
  }
  uVar4 = ~uVar4;
  return ((uVar4 & 0xff00) + uVar4 * 0x10000) * 0x100 + (uVar4 >> 8 & 0xff00) + (uVar4 >> 0x18);
}



uint FUN_1401ff2dc(uint *param_1,uint param_2)

{
  uint uVar1;
  
  uVar1 = 0;
  for (; param_2 != 0; param_2 = param_2 >> 1) {
    if ((param_2 & 1) != 0) {
      uVar1 = uVar1 ^ *param_1;
    }
    param_1 = param_1 + 1;
  }
  return uVar1;
}



void FUN_1401ff2fc(undefined4 *param_1,longlong param_2)

{
  undefined4 uVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar2 = param_2 - (longlong)param_1;
  lVar3 = 0x20;
  do {
    uVar1 = FUN_1401ff2dc(param_2,*(undefined4 *)(lVar2 + (longlong)param_1));
    *param_1 = uVar1;
    param_1 = param_1 + 1;
    lVar3 = lVar3 + -1;
  } while (lVar3 != 0);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

uint FUN_1401ff33c(uint param_1,uint param_2,uint param_3)

{
  longlong lVar1;
  int iVar2;
  undefined1 auStack_138 [32];
  int local_118 [32];
  undefined1 local_98 [128];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_138;
  if (param_3 != 0) {
    iVar2 = 1;
    local_118[0] = -0x12477ce0;
    lVar1 = 1;
    do {
      local_118[lVar1] = iVar2;
      lVar1 = lVar1 + 1;
      iVar2 = iVar2 * 2;
    } while (lVar1 < 0x20);
    FUN_1401ff2fc(local_98,local_118);
    FUN_1401ff2fc(local_118,local_98);
    do {
      FUN_1401ff2fc(local_98,local_118);
      if ((param_3 & 1) != 0) {
        param_1 = FUN_1401ff2dc(local_98,param_1);
      }
      if ((int)param_3 >> 1 == 0) break;
      FUN_1401ff2fc(local_118,local_98);
      if (((int)param_3 >> 1 & 1U) != 0) {
        param_1 = FUN_1401ff2dc(local_118,param_1);
      }
      param_3 = (int)param_3 >> 2;
    } while (param_3 != 0);
    param_1 = param_1 ^ param_2;
  }
  return param_1;
}



undefined8 FUN_1401ff42c(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  if (param_2 == 0) {
    return 0;
  }
  uVar1 = FUN_1401fec2c();
  return uVar1;
}



void FUN_1401ff44c(longlong param_1)

{
  undefined2 *puVar1;
  longlong lVar2;
  
  puVar1 = (undefined2 *)(param_1 + 0xbc);
  lVar2 = 0x11e;
  do {
    *puVar1 = 0;
    puVar1 = puVar1 + 2;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  puVar1 = (undefined2 *)(param_1 + 0x9b0);
  lVar2 = 0x1e;
  do {
    *puVar1 = 0;
    puVar1 = puVar1 + 2;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  puVar1 = (undefined2 *)(param_1 + 0xaa4);
  lVar2 = 0x13;
  do {
    *puVar1 = 0;
    puVar1 = puVar1 + 2;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
  *(undefined2 *)(param_1 + 0x4bc) = 1;
  *(undefined8 *)(param_1 + 0x1700) = 0;
  *(undefined4 *)(param_1 + 0x1708) = 0;
  *(undefined4 *)(param_1 + 0x16f4) = 0;
  return;
}



void FUN_1401ff4cc(longlong param_1,longlong param_2,int param_3)

{
  ushort uVar1;
  ushort uVar2;
  int iVar3;
  int iVar4;
  longlong lVar5;
  int iVar6;
  longlong lVar7;
  
  iVar3 = *(int *)(param_1 + 0xba8 + (longlong)param_3 * 4);
  while( true ) {
    iVar6 = param_3 * 2;
    if (*(int *)(param_1 + 0x149c) < iVar6) break;
    if (iVar6 < *(int *)(param_1 + 0x149c)) {
      lVar5 = (longlong)*(int *)(param_1 + 0xbac + (longlong)iVar6 * 4);
      lVar7 = (longlong)*(int *)(param_1 + 0xba8 + (longlong)iVar6 * 4);
      uVar1 = *(ushort *)(param_2 + lVar7 * 4);
      uVar2 = *(ushort *)(param_2 + lVar5 * 4);
      if ((uVar2 < uVar1) ||
         ((uVar2 == uVar1 &&
          (*(byte *)(lVar5 + 0x14a4 + param_1) <= *(byte *)(lVar7 + 0x14a4 + param_1))))) {
        iVar6 = iVar6 + 1;
      }
    }
    iVar4 = *(int *)(param_1 + 0xba8 + (longlong)iVar6 * 4);
    uVar1 = *(ushort *)(param_2 + (longlong)iVar4 * 4);
    uVar2 = *(ushort *)(param_2 + (longlong)iVar3 * 4);
    if ((uVar2 < uVar1) ||
       ((uVar2 == uVar1 &&
        (*(byte *)((longlong)iVar3 + 0x14a4 + param_1) <=
         *(byte *)((longlong)iVar4 + 0x14a4 + param_1))))) break;
    *(int *)(param_1 + 0xba8 + (longlong)param_3 * 4) = iVar4;
    param_3 = iVar6;
  }
  *(int *)(param_1 + 0xba8 + (longlong)param_3 * 4) = iVar3;
  return;
}



void FUN_1401ff58c(longlong param_1,longlong *param_2)

{
  short *psVar1;
  short sVar2;
  ushort uVar3;
  int iVar4;
  longlong *plVar5;
  longlong lVar6;
  longlong lVar7;
  longlong lVar8;
  uint uVar9;
  uint uVar10;
  longlong lVar11;
  ulonglong uVar12;
  uint uVar13;
  ulonglong uVar14;
  int *piVar15;
  undefined2 *puVar16;
  longlong lVar17;
  int iVar18;
  longlong lVar19;
  int iVar20;
  longlong lVar21;
  int iVar22;
  
  plVar5 = (longlong *)param_2[2];
  lVar7 = param_2[1];
  lVar6 = *param_2;
  lVar8 = plVar5[2];
  lVar19 = *plVar5;
  lVar21 = plVar5[1];
  uVar13 = *(uint *)(plVar5 + 3);
  uVar14 = (ulonglong)(int)uVar13;
  puVar16 = (undefined2 *)(param_1 + 0xb88);
  for (lVar11 = 0x10; lVar11 != 0; lVar11 = lVar11 + -1) {
    *puVar16 = 0;
    puVar16 = puVar16 + 1;
  }
  *(undefined2 *)
   (lVar6 + 2 + (longlong)*(int *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x14a0) * 4) * 4)
       = 0;
  iVar18 = 0;
  iVar22 = *(int *)(param_1 + 0x14a0) + 1;
  lVar11 = (longlong)iVar22;
  if (lVar11 < 0x23d) {
    lVar17 = 0x23d - lVar11;
    piVar15 = (int *)(param_1 + 0xba8 + lVar11 * 4);
    iVar22 = iVar22 + (int)lVar17;
    do {
      iVar4 = *piVar15;
      lVar11 = (longlong)iVar4;
      uVar10 = *(ushort *)(lVar6 + 2 + (ulonglong)*(ushort *)(lVar6 + 2 + lVar11 * 4) * 4) + 1;
      if ((int)uVar13 < (int)uVar10) {
        iVar18 = iVar18 + 1;
        uVar10 = uVar13;
      }
      *(short *)(lVar6 + 2 + lVar11 * 4) = (short)uVar10;
      if (iVar4 <= (int)lVar7) {
        psVar1 = (short *)(param_1 + 0xb88 + (longlong)(int)uVar10 * 2);
        *psVar1 = *psVar1 + 1;
        iVar20 = 0;
        if ((int)lVar8 <= iVar4) {
          iVar20 = *(int *)(lVar21 + (lVar11 - (int)lVar8) * 4);
        }
        uVar9 = (uint)*(ushort *)(lVar6 + lVar11 * 4);
        *(int *)(param_1 + 0x1700) = *(int *)(param_1 + 0x1700) + (iVar20 + uVar10) * uVar9;
        if (lVar19 != 0) {
          *(int *)(param_1 + 0x1704) =
               *(int *)(param_1 + 0x1704) +
               ((uint)*(ushort *)(lVar19 + 2 + lVar11 * 4) + iVar20) * uVar9;
        }
      }
      piVar15 = piVar15 + 1;
      lVar17 = lVar17 + -1;
    } while (lVar17 != 0);
  }
  if (iVar18 != 0) {
    do {
      uVar12 = (ulonglong)(int)(uVar13 - 1);
      sVar2 = *(short *)(param_1 + 0xb88 + uVar12 * 2);
      uVar10 = uVar13 - 1;
      while (sVar2 == 0) {
        uVar10 = (int)uVar12 - 1;
        uVar12 = (ulonglong)uVar10;
        sVar2 = *(short *)(param_1 + 0xb88 + (longlong)(int)uVar10 * 2);
      }
      iVar18 = iVar18 + -2;
      psVar1 = (short *)(param_1 + 0xb88 + (longlong)(int)uVar10 * 2);
      *psVar1 = *psVar1 + -1;
      psVar1 = (short *)(param_1 + 0xb8a + (longlong)(int)uVar10 * 2);
      *psVar1 = *psVar1 + 2;
      psVar1 = (short *)(param_1 + 0xb88 + uVar14 * 2);
      *psVar1 = *psVar1 + -1;
    } while (0 < iVar18);
    lVar19 = (longlong)iVar22;
    while (uVar13 != 0) {
      uVar13 = (uint)uVar14;
      uVar3 = *(ushort *)(param_1 + 0xb88 + (longlong)(int)uVar13 * 2);
      uVar10 = (uint)uVar3;
      if (uVar3 != 0) {
        piVar15 = (int *)(param_1 + 0xba8 + lVar19 * 4);
        do {
          piVar15 = piVar15 + -1;
          lVar19 = lVar19 + -1;
          if (*piVar15 <= (int)lVar7) {
            lVar21 = (longlong)*piVar15;
            uVar9 = (uint)*(ushort *)(lVar6 + 2 + lVar21 * 4);
            if (uVar9 != uVar13) {
              *(int *)(param_1 + 0x1700) =
                   *(int *)(param_1 + 0x1700) +
                   (uVar13 - uVar9) * (uint)*(ushort *)(lVar6 + lVar21 * 4);
              *(short *)(lVar6 + 2 + lVar21 * 4) = (short)uVar14;
            }
            uVar10 = uVar10 - 1;
          }
        } while (uVar10 != 0);
      }
      uVar13 = uVar13 - 1;
      uVar14 = (ulonglong)uVar13;
    }
  }
  return;
}



// Library Function - Single Match
//  scan_tree
// 
// Libraries: Visual Studio 2010 Release, Visual Studio 2015 Release

void scan_tree(longlong param_1,longlong param_2,int param_3)

{
  short *psVar1;
  ushort uVar2;
  int iVar3;
  longlong lVar4;
  ushort *puVar5;
  uint uVar6;
  uint uVar7;
  uint uVar8;
  int iVar9;
  int iVar10;
  
  uVar2 = *(ushort *)(param_2 + 2);
  uVar6 = 0xffffffff;
  iVar10 = 0;
  iVar3 = 7;
  iVar9 = 4;
  if (uVar2 == 0) {
    iVar3 = 0x8a;
    iVar9 = 3;
  }
  lVar4 = (longlong)param_3;
  *(undefined2 *)(param_2 + 6 + lVar4 * 4) = 0xffff;
  if (-1 < lVar4) {
    puVar5 = (ushort *)(param_2 + 6);
    lVar4 = lVar4 + 1;
    uVar7 = (uint)uVar2;
    do {
      iVar10 = iVar10 + 1;
      uVar2 = *puVar5;
      uVar8 = (uint)uVar2;
      if ((iVar3 <= iVar10) || (uVar7 != uVar8)) {
        if (iVar10 < iVar9) {
          psVar1 = (short *)(param_1 + 0xaa4 + (longlong)(int)uVar7 * 4);
          *psVar1 = *psVar1 + (short)iVar10;
        }
        else if (uVar7 == 0) {
          if (iVar10 < 0xb) {
            *(short *)(param_1 + 0xae8) = *(short *)(param_1 + 0xae8) + 1;
          }
          else {
            *(short *)(param_1 + 0xaec) = *(short *)(param_1 + 0xaec) + 1;
          }
        }
        else {
          if (uVar7 != uVar6) {
            psVar1 = (short *)(param_1 + 0xaa4 + (longlong)(int)uVar7 * 4);
            *psVar1 = *psVar1 + 1;
          }
          *(short *)(param_1 + 0xae4) = *(short *)(param_1 + 0xae4) + 1;
        }
        iVar10 = 0;
        uVar6 = uVar7;
        if (uVar2 == 0) {
          iVar3 = 0x8a;
        }
        else {
          if (uVar7 != uVar8) {
            iVar3 = 7;
            iVar9 = 4;
            goto LAB_1401ff860;
          }
          iVar3 = 6;
        }
        iVar9 = 3;
      }
LAB_1401ff860:
      puVar5 = puVar5 + 2;
      lVar4 = lVar4 + -1;
      uVar7 = uVar8;
    } while (lVar4 != 0);
  }
  return;
}



void FUN_1401ff88c(longlong param_1,longlong param_2,int param_3)

{
  ushort uVar1;
  ushort uVar2;
  ushort uVar3;
  int iVar4;
  byte bVar5;
  int iVar6;
  longlong lVar7;
  ushort *puVar8;
  uint uVar9;
  uint uVar10;
  uint uVar11;
  short sVar12;
  int iVar13;
  longlong lVar15;
  int iVar16;
  int iVar14;
  
  uVar11 = 0xffffffff;
  iVar14 = 0;
  iVar4 = 7;
  iVar16 = 3;
  iVar6 = 4;
  if (*(ushort *)(param_2 + 2) == 0) {
    iVar4 = 0x8a;
    iVar6 = iVar16;
  }
  if (-1 < param_3) {
    puVar8 = (ushort *)(param_2 + 6);
    lVar15 = (longlong)param_3 + 1;
    uVar9 = (uint)*(ushort *)(param_2 + 2);
    do {
      iVar13 = iVar14 + 1;
      lVar7 = (longlong)(int)uVar9;
      uVar1 = *puVar8;
      uVar10 = (uint)uVar1;
      if ((iVar4 <= iVar13) || (uVar9 != uVar10)) {
        if (iVar13 < iVar6) {
          do {
            uVar11 = (uint)*(ushort *)(param_1 + 0xaa6 + lVar7 * 4);
            iVar6 = *(int *)(param_1 + 0x1714);
            if ((int)(0x10 - uVar11) < iVar6) {
              uVar3 = *(ushort *)(param_1 + 0xaa4 + lVar7 * 4);
              *(ushort *)(param_1 + 0x1710) =
                   *(ushort *)(param_1 + 0x1710) | uVar3 << ((byte)iVar6 & 0x1f);
              *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10))
                   = *(undefined1 *)(param_1 + 0x1710);
              *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
              *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10))
                   = *(undefined1 *)(param_1 + 0x1711);
              *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
              iVar6 = *(int *)(param_1 + 0x1714) + -0x10;
              *(ushort *)(param_1 + 0x1710) =
                   uVar3 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
            }
            else {
              *(ushort *)(param_1 + 0x1710) =
                   *(ushort *)(param_1 + 0x1710) |
                   *(short *)(param_1 + 0xaa4 + lVar7 * 4) << ((byte)iVar6 & 0x1f);
            }
            iVar13 = iVar13 + -1;
            *(uint *)(param_1 + 0x1714) = iVar6 + uVar11;
          } while (iVar13 != 0);
        }
        else {
          if (uVar9 == 0) {
            iVar6 = *(int *)(param_1 + 0x1714);
            sVar12 = (short)iVar13;
            bVar5 = (byte)iVar6;
            if (iVar13 < 0xb) {
              uVar3 = *(ushort *)(param_1 + 0xaea);
              if ((int)(0x10 - (uint)uVar3) < iVar6) {
                uVar2 = *(ushort *)(param_1 + 0xae8);
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | uVar2 << (bVar5 & 0x1f);
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1710);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1711);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                iVar6 = *(int *)(param_1 + 0x1714) + -0x10;
                *(ushort *)(param_1 + 0x1710) =
                     uVar2 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
              }
              else {
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | *(short *)(param_1 + 0xae8) << (bVar5 & 0x1f);
              }
              iVar6 = iVar6 + (uint)uVar3;
              *(int *)(param_1 + 0x1714) = iVar6;
              if (iVar6 < 0xe) {
                sVar12 = sVar12 + -3;
                iVar4 = iVar6 + 3;
LAB_1401ffd78:
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | sVar12 << ((byte)iVar6 & 0x1f);
              }
              else {
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | sVar12 - 3U << ((byte)iVar6 & 0x1f);
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1710);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1711);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                iVar4 = *(int *)(param_1 + 0x1714) + -0xd;
                *(ushort *)(param_1 + 0x1710) =
                     (ushort)(sVar12 - 3U) >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
              }
            }
            else {
              uVar3 = *(ushort *)(param_1 + 0xaee);
              if ((int)(0x10 - (uint)uVar3) < iVar6) {
                uVar2 = *(ushort *)(param_1 + 0xaec);
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | uVar2 << (bVar5 & 0x1f);
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1710);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1711);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                iVar6 = *(int *)(param_1 + 0x1714) + -0x10;
                *(ushort *)(param_1 + 0x1710) =
                     uVar2 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
              }
              else {
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | *(short *)(param_1 + 0xaec) << (bVar5 & 0x1f);
              }
              iVar6 = iVar6 + (uint)uVar3;
              *(int *)(param_1 + 0x1714) = iVar6;
              if (iVar6 < 10) {
                sVar12 = sVar12 + -0xb;
                iVar4 = iVar6 + 7;
                goto LAB_1401ffd78;
              }
              *(ushort *)(param_1 + 0x1710) =
                   *(ushort *)(param_1 + 0x1710) | sVar12 - 0xbU << ((byte)iVar6 & 0x1f);
              *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10))
                   = *(undefined1 *)(param_1 + 0x1710);
              *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
              *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10))
                   = *(undefined1 *)(param_1 + 0x1711);
              *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
              iVar4 = *(int *)(param_1 + 0x1714) + -9;
              *(ushort *)(param_1 + 0x1710) =
                   (ushort)(sVar12 - 0xbU) >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
            }
          }
          else {
            if (uVar9 != uVar11) {
              uVar11 = (uint)*(ushort *)(param_1 + 0xaa6 + lVar7 * 4);
              iVar6 = *(int *)(param_1 + 0x1714);
              if ((int)(0x10 - uVar11) < iVar6) {
                uVar3 = *(ushort *)(param_1 + 0xaa4 + lVar7 * 4);
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) | uVar3 << ((byte)iVar6 & 0x1f);
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1710);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                *(undefined1 *)
                 ((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                     *(undefined1 *)(param_1 + 0x1711);
                *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
                iVar6 = *(int *)(param_1 + 0x1714) + -0x10;
                *(ushort *)(param_1 + 0x1710) =
                     uVar3 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
              }
              else {
                *(ushort *)(param_1 + 0x1710) =
                     *(ushort *)(param_1 + 0x1710) |
                     *(short *)(param_1 + 0xaa4 + lVar7 * 4) << ((byte)iVar6 & 0x1f);
              }
              *(uint *)(param_1 + 0x1714) = iVar6 + uVar11;
              iVar13 = iVar14;
            }
            uVar3 = *(ushort *)(param_1 + 0xae6);
            iVar6 = *(int *)(param_1 + 0x1714);
            if ((int)(0x10 - (uint)uVar3) < iVar6) {
              uVar2 = *(ushort *)(param_1 + 0xae4);
              *(ushort *)(param_1 + 0x1710) =
                   *(ushort *)(param_1 + 0x1710) | uVar2 << ((byte)iVar6 & 0x1f);
              *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10))
                   = *(undefined1 *)(param_1 + 0x1710);
              *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
              *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10))
                   = *(undefined1 *)(param_1 + 0x1711);
              *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
              iVar6 = *(int *)(param_1 + 0x1714) + -0x10;
              *(ushort *)(param_1 + 0x1710) =
                   uVar2 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
            }
            else {
              *(ushort *)(param_1 + 0x1710) =
                   *(ushort *)(param_1 + 0x1710) |
                   *(short *)(param_1 + 0xae4) << ((byte)iVar6 & 0x1f);
            }
            iVar6 = iVar6 + (uint)uVar3;
            *(int *)(param_1 + 0x1714) = iVar6;
            if (iVar6 < 0xf) {
              sVar12 = (short)iVar13 + -3;
              iVar4 = iVar6 + 2;
              goto LAB_1401ffd78;
            }
            uVar3 = (short)iVar13 - 3;
            *(ushort *)(param_1 + 0x1710) =
                 *(ushort *)(param_1 + 0x1710) | uVar3 << ((byte)iVar6 & 0x1f);
            *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                 *(undefined1 *)(param_1 + 0x1710);
            *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
            *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                 *(undefined1 *)(param_1 + 0x1711);
            *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
            iVar4 = *(int *)(param_1 + 0x1714) + -0xe;
            *(ushort *)(param_1 + 0x1710) =
                 uVar3 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
          }
          *(int *)(param_1 + 0x1714) = iVar4;
        }
        iVar13 = 0;
        uVar11 = uVar9;
        if (uVar1 == 0) {
          iVar4 = 0x8a;
          iVar6 = iVar16;
        }
        else if (uVar9 == uVar10) {
          iVar4 = 6;
          iVar6 = iVar16;
        }
        else {
          iVar4 = 7;
          iVar6 = 4;
        }
      }
      iVar14 = iVar13;
      puVar8 = puVar8 + 2;
      lVar15 = lVar15 + -1;
      uVar9 = uVar10;
    } while (lVar15 != 0);
  }
  return;
}



void FUN_1401ffdec(longlong param_1,int param_2,int param_3,uint param_4)

{
  ushort uVar1;
  int iVar2;
  int iVar3;
  byte *pbVar4;
  ulonglong uVar5;
  
  iVar2 = *(int *)(param_1 + 0x1714);
  uVar5 = (ulonglong)param_4;
  if (iVar2 < 0xc) {
    *(ushort *)(param_1 + 0x1710) =
         *(ushort *)(param_1 + 0x1710) | (short)param_2 + -0x101 << ((byte)iVar2 & 0x1f);
    iVar2 = iVar2 + 5;
  }
  else {
    uVar1 = (short)param_2 - 0x101;
    *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar1 << ((byte)iVar2 & 0x1f);
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    iVar2 = *(int *)(param_1 + 0x1714) + -0xb;
    *(ushort *)(param_1 + 0x1710) = uVar1 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
  }
  *(int *)(param_1 + 0x1714) = iVar2;
  if (iVar2 < 0xc) {
    *(ushort *)(param_1 + 0x1710) =
         *(ushort *)(param_1 + 0x1710) | (short)param_3 + -1 << ((byte)iVar2 & 0x1f);
    iVar2 = iVar2 + 5;
  }
  else {
    uVar1 = (short)param_3 - 1;
    *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar1 << ((byte)iVar2 & 0x1f);
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    iVar2 = *(int *)(param_1 + 0x1714) + -0xb;
    *(ushort *)(param_1 + 0x1710) = uVar1 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
  }
  *(int *)(param_1 + 0x1714) = iVar2;
  if (iVar2 < 0xd) {
    *(ushort *)(param_1 + 0x1710) =
         *(ushort *)(param_1 + 0x1710) | (short)param_4 + -4 << ((byte)iVar2 & 0x1f);
    iVar2 = iVar2 + 4;
  }
  else {
    uVar1 = (short)param_4 - 4;
    *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar1 << ((byte)iVar2 & 0x1f);
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    iVar2 = *(int *)(param_1 + 0x1714) + -0xc;
    *(ushort *)(param_1 + 0x1710) = uVar1 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
  }
  *(int *)(param_1 + 0x1714) = iVar2;
  if (0 < (int)param_4) {
    pbVar4 = &DAT_140281400;
    do {
      iVar2 = *(int *)(param_1 + 0x1714);
      if (iVar2 < 0xe) {
        iVar3 = iVar2 + 3;
        *(ushort *)(param_1 + 0x1710) =
             *(ushort *)(param_1 + 0x1710) |
             *(short *)(param_1 + 0xaa6 + (ulonglong)*pbVar4 * 4) << ((byte)iVar2 & 0x1f);
      }
      else {
        uVar1 = *(ushort *)(param_1 + 0xaa6 + (ulonglong)*pbVar4 * 4);
        *(ushort *)(param_1 + 0x1710) =
             *(ushort *)(param_1 + 0x1710) | uVar1 << ((byte)iVar2 & 0x1f);
        *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
             *(undefined1 *)(param_1 + 0x1710);
        *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
        *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
             *(undefined1 *)(param_1 + 0x1711);
        *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
        iVar3 = *(int *)(param_1 + 0x1714) + -0xd;
        *(ushort *)(param_1 + 0x1710) = uVar1 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
      }
      pbVar4 = pbVar4 + 1;
      uVar5 = uVar5 - 1;
      *(int *)(param_1 + 0x1714) = iVar3;
    } while (uVar5 != 0);
  }
  FUN_1401ff88c(param_1,param_1 + 0xbc,param_2 + -1);
  FUN_1401ff88c(param_1,param_1 + 0x9b0,param_3 + -1);
  return;
}



void FUN_14020011c(longlong param_1,longlong param_2,longlong param_3)

{
  byte bVar1;
  byte bVar2;
  int iVar3;
  int iVar4;
  byte bVar5;
  ulonglong uVar6;
  longlong lVar7;
  uint uVar8;
  ulonglong uVar9;
  uint uVar10;
  ushort uVar11;
  ushort uVar12;
  uint uVar13;
  longlong lVar14;
  
  uVar9 = 0;
  if (*(int *)(param_1 + 0x16f4) != 0) {
    lVar14 = 0;
    do {
      iVar3 = *(int *)(param_1 + 0x1714);
      uVar12 = *(ushort *)(*(longlong *)(param_1 + 0x16f8) + lVar14);
      lVar14 = lVar14 + 2;
      bVar1 = *(byte *)(uVar9 + *(longlong *)(param_1 + 0x16e8));
      uVar8 = (int)uVar9 + 1;
      uVar9 = (ulonglong)uVar8;
      bVar5 = (byte)iVar3;
      if (uVar12 == 0) {
        lVar7 = (longlong)(int)(uint)bVar1;
        uVar13 = (uint)*(ushort *)(param_2 + 2 + lVar7 * 4);
        if ((int)(0x10 - uVar13) < iVar3) {
          uVar12 = *(ushort *)(param_2 + lVar7 * 4);
          *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar12 << (bVar5 & 0x1f);
          *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
               *(undefined1 *)(param_1 + 0x1710);
          *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
               *(undefined1 *)(param_1 + 0x1711);
          *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
          iVar3 = *(int *)(param_1 + 0x1714) + -0x10 + uVar13;
          *(ushort *)(param_1 + 0x1710) =
               uVar12 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
        }
        else {
          *(ushort *)(param_1 + 0x1710) =
               *(ushort *)(param_1 + 0x1710) | *(short *)(param_2 + lVar7 * 4) << (bVar5 & 0x1f);
          iVar3 = iVar3 + uVar13;
        }
LAB_14020048c:
        *(int *)(param_1 + 0x1714) = iVar3;
      }
      else {
        bVar2 = (&DAT_140281b20)[bVar1];
        uVar13 = bVar2 + 0x101;
        uVar10 = (uint)*(ushort *)(param_2 + 2 + (ulonglong)uVar13 * 4);
        if ((int)(0x10 - uVar10) < iVar3) {
          uVar11 = *(ushort *)(param_2 + (ulonglong)uVar13 * 4);
          *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar11 << (bVar5 & 0x1f);
          *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
               *(undefined1 *)(param_1 + 0x1710);
          *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
               *(undefined1 *)(param_1 + 0x1711);
          *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
          iVar3 = *(int *)(param_1 + 0x1714) + -0x10;
          *(ushort *)(param_1 + 0x1710) =
               uVar11 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
        }
        else {
          *(ushort *)(param_1 + 0x1710) =
               *(ushort *)(param_1 + 0x1710) |
               *(short *)(param_2 + (ulonglong)uVar13 * 4) << (bVar5 & 0x1f);
        }
        iVar3 = iVar3 + uVar10;
        *(int *)(param_1 + 0x1714) = iVar3;
        iVar4 = *(int *)(&DAT_1402812b0 + (ulonglong)bVar2 * 4);
        if (iVar4 != 0) {
          uVar11 = (ushort)bVar1 - (short)*(undefined4 *)(&DAT_140281c20 + (ulonglong)bVar2 * 4);
          if (0x10 - iVar4 < iVar3) {
            *(ushort *)(param_1 + 0x1710) =
                 *(ushort *)(param_1 + 0x1710) | uVar11 << ((byte)iVar3 & 0x1f);
            *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                 *(undefined1 *)(param_1 + 0x1710);
            *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
            *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                 *(undefined1 *)(param_1 + 0x1711);
            *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
            iVar3 = *(int *)(param_1 + 0x1714) + -0x10;
            *(ushort *)(param_1 + 0x1710) =
                 uVar11 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
          }
          else {
            *(ushort *)(param_1 + 0x1710) =
                 *(ushort *)(param_1 + 0x1710) | uVar11 << ((byte)iVar3 & 0x1f);
          }
          *(int *)(param_1 + 0x1714) = iVar3 + iVar4;
        }
        uVar13 = uVar12 - 1;
        if (uVar13 < 0x100) {
          bVar1 = (&DAT_140281920)[uVar13];
        }
        else {
          bVar1 = (&DAT_140281920)[(uVar13 >> 7) + 0x100];
        }
        uVar6 = (ulonglong)bVar1;
        uVar10 = (uint)*(ushort *)(param_3 + 2 + uVar6 * 4);
        iVar4 = *(int *)(param_1 + 0x1714);
        if ((int)(0x10 - uVar10) < iVar4) {
          uVar12 = *(ushort *)(param_3 + uVar6 * 4);
          *(ushort *)(param_1 + 0x1710) =
               *(ushort *)(param_1 + 0x1710) | uVar12 << ((byte)iVar4 & 0x1f);
          *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
               *(undefined1 *)(param_1 + 0x1710);
          *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
          *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
               *(undefined1 *)(param_1 + 0x1711);
          *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
          iVar4 = *(int *)(param_1 + 0x1714) + -0x10;
          *(ushort *)(param_1 + 0x1710) =
               uVar12 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
        }
        else {
          *(ushort *)(param_1 + 0x1710) =
               *(ushort *)(param_1 + 0x1710) |
               *(short *)(param_3 + uVar6 * 4) << ((byte)iVar4 & 0x1f);
        }
        iVar4 = iVar4 + uVar10;
        *(int *)(param_1 + 0x1714) = iVar4;
        iVar3 = *(int *)(&DAT_140281330 + uVar6 * 4);
        if (iVar3 != 0) {
          uVar12 = (short)uVar13 - (short)*(undefined4 *)(&DAT_140281ca0 + uVar6 * 4);
          if (0x10 - iVar3 < iVar4) {
            *(ushort *)(param_1 + 0x1710) =
                 *(ushort *)(param_1 + 0x1710) | uVar12 << ((byte)iVar4 & 0x1f);
            *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                 *(undefined1 *)(param_1 + 0x1710);
            *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
            *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
                 *(undefined1 *)(param_1 + 0x1711);
            *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
            iVar3 = *(int *)(param_1 + 0x1714) + -0x10 + iVar3;
            *(ushort *)(param_1 + 0x1710) =
                 uVar12 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
          }
          else {
            iVar3 = iVar4 + iVar3;
            *(ushort *)(param_1 + 0x1710) =
                 *(ushort *)(param_1 + 0x1710) | uVar12 << ((byte)iVar4 & 0x1f);
          }
          goto LAB_14020048c;
        }
      }
    } while (uVar8 < *(uint *)(param_1 + 0x16f4));
  }
  uVar12 = *(ushort *)(param_2 + 0x402);
  iVar3 = *(int *)(param_1 + 0x1714);
  if ((int)(0x10 - (uint)uVar12) < iVar3) {
    uVar11 = *(ushort *)(param_2 + 0x400);
    *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar11 << ((byte)iVar3 & 0x1f);
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    iVar3 = *(int *)(param_1 + 0x1714) + -0x10;
    *(ushort *)(param_1 + 0x1710) = uVar11 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
  }
  else {
    *(ushort *)(param_1 + 0x1710) =
         *(ushort *)(param_1 + 0x1710) | *(short *)(param_2 + 0x400) << ((byte)iVar3 & 0x1f);
  }
  *(uint *)(param_1 + 0x1714) = iVar3 + (uint)uVar12;
  *(uint *)(param_1 + 0x170c) = (uint)*(ushort *)(param_2 + 0x402);
  return;
}



void FUN_14020056c(longlong *param_1)

{
  uint uVar1;
  short *psVar3;
  longlong lVar4;
  ulonglong uVar5;
  ulonglong uVar2;
  
  uVar2 = 0;
  psVar3 = (short *)((longlong)param_1 + 0xbc);
  uVar5 = uVar2;
  do {
    uVar1 = (uint)uVar2;
    if (*psVar3 != 0) break;
    uVar5 = uVar5 + 1;
    uVar1 = uVar1 + 1;
    uVar2 = (ulonglong)uVar1;
    psVar3 = psVar3 + 2;
  } while ((longlong)uVar5 < 9);
  if (uVar1 == 9) {
    uVar1 = 0xe;
    psVar3 = (short *)((longlong)param_1 + 0xf4);
    lVar4 = 0xe;
    do {
      if (*psVar3 != 0) break;
      lVar4 = lVar4 + 1;
      uVar1 = uVar1 + 1;
      psVar3 = psVar3 + 2;
    } while (lVar4 < 0x20);
  }
  *(uint *)(*param_1 + 0x48) = (uint)(uVar1 == 0x20);
  return;
}



uint FUN_1402005dc(uint param_1,int param_2)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  
  uVar1 = 0;
  do {
    uVar2 = uVar1;
    param_2 = param_2 + -1;
    uVar3 = param_1 & 1;
    param_1 = param_1 >> 1;
    uVar1 = (uVar2 | uVar3) * 2;
  } while (0 < param_2);
  return uVar2 & 0x7fffffff | uVar3;
}



void FUN_1402005fc(longlong param_1)

{
  ushort uVar1;
  
  if (*(int *)(param_1 + 0x1714) == 0x10) {
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    uVar1 = 0;
    *(undefined4 *)(param_1 + 0x1714) = 0;
  }
  else {
    if (*(int *)(param_1 + 0x1714) < 8) {
      return;
    }
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(int *)(param_1 + 0x1714) = *(int *)(param_1 + 0x1714) + -8;
    uVar1 = (ushort)*(byte *)(param_1 + 0x1711);
  }
  *(ushort *)(param_1 + 0x1710) = uVar1;
  return;
}



void FUN_14020067c(longlong param_1)

{
  undefined1 uVar1;
  
  if (*(int *)(param_1 + 0x1714) < 9) {
    if (*(int *)(param_1 + 0x1714) < 1) goto LAB_1402006c3;
    uVar1 = *(undefined1 *)(param_1 + 0x1710);
  }
  else {
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    uVar1 = *(undefined1 *)(param_1 + 0x1711);
  }
  *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = uVar1;
  *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
LAB_1402006c3:
  *(undefined2 *)(param_1 + 0x1710) = 0;
  *(undefined4 *)(param_1 + 0x1714) = 0;
  return;
}



void FUN_1402006dc(longlong param_1,undefined1 *param_2,int param_3,int param_4)

{
  byte bVar1;
  
  FUN_14020067c();
  *(undefined4 *)(param_1 + 0x170c) = 8;
  if (param_4 != 0) {
    *(byte *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = (byte)param_3;
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    bVar1 = (byte)((uint)param_3 >> 8);
    *(byte *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = bVar1;
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(byte *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = ~(byte)param_3
    ;
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(byte *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = ~bVar1;
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
  }
  for (; param_3 != 0; param_3 = param_3 + -1) {
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) = *param_2
    ;
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    param_2 = param_2 + 1;
  }
  return;
}



void FUN_14020078c(longlong param_1)

{
  *(undefined4 *)(param_1 + 0x170c) = 8;
  *(longlong *)(param_1 + 0xb40) = param_1 + 0xbc;
  *(undefined ***)(param_1 + 0xb50) = &PTR_DAT_1403222f0;
  *(longlong *)(param_1 + 0xb58) = param_1 + 0x9b0;
  *(undefined ***)(param_1 + 0xb68) = &PTR_DAT_140322310;
  *(longlong *)(param_1 + 0xb70) = param_1 + 0xaa4;
  *(undefined **)(param_1 + 0xb80) = &DAT_140322330;
  *(undefined2 *)(param_1 + 0x1710) = 0;
  *(undefined4 *)(param_1 + 0x1714) = 0;
  FUN_1401ff44c();
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_14020080c(longlong param_1,int param_2,longlong param_3)

{
  ushort uVar1;
  undefined2 uVar2;
  short sVar3;
  longlong lVar4;
  longlong lVar5;
  undefined1 auStack_58 [32];
  short asStack_38 [16];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_58;
  lVar5 = 0;
  sVar3 = 0;
  lVar4 = 1;
  do {
    sVar3 = (sVar3 + *(short *)(param_3 + -2 + lVar4 * 2)) * 2;
    asStack_38[lVar4] = sVar3;
    lVar4 = lVar4 + 1;
  } while (lVar4 < 0x10);
  lVar4 = (longlong)param_2;
  if (-1 < param_2) {
    do {
      uVar1 = *(ushort *)(param_1 + 2 + lVar5 * 4);
      if (uVar1 != 0) {
        asStack_38[uVar1] = asStack_38[uVar1] + 1;
        uVar2 = FUN_1402005dc();
        *(undefined2 *)(param_1 + lVar5 * 4) = uVar2;
      }
      lVar5 = lVar5 + 1;
    } while (lVar5 <= lVar4);
  }
  return;
}



void FUN_1402008ac(longlong param_1,longlong *param_2)

{
  byte bVar1;
  longlong lVar2;
  byte bVar3;
  int iVar4;
  longlong lVar5;
  longlong lVar6;
  int iVar7;
  int iVar8;
  int iVar9;
  ulonglong uVar10;
  
  lVar2 = *param_2;
  iVar4 = *(int *)(param_2[2] + 0x14);
  uVar10 = (ulonglong)iVar4;
  lVar6 = *(longlong *)param_2[2];
  iVar7 = -1;
  *(undefined4 *)(param_1 + 0x149c) = 0;
  *(undefined4 *)(param_1 + 0x14a0) = 0x23d;
  iVar8 = 0;
  lVar5 = 0;
  if (0 < iVar4) {
    do {
      if (*(short *)(lVar2 + lVar5 * 4) == 0) {
        *(undefined2 *)(lVar2 + 2 + lVar5 * 4) = 0;
      }
      else {
        *(int *)(param_1 + 0x149c) = *(int *)(param_1 + 0x149c) + 1;
        *(int *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x149c) * 4) = iVar8;
        *(undefined1 *)(lVar5 + 0x14a4 + param_1) = 0;
        iVar7 = iVar8;
      }
      lVar5 = lVar5 + 1;
      iVar8 = iVar8 + 1;
    } while (lVar5 < (longlong)uVar10);
  }
  while (*(int *)(param_1 + 0x149c) < 2) {
    if (iVar7 < 2) {
      iVar7 = iVar7 + 1;
      iVar4 = iVar7;
    }
    else {
      iVar4 = 0;
    }
    *(int *)(param_1 + 0x149c) = *(int *)(param_1 + 0x149c) + 1;
    *(int *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x149c) * 4) = iVar4;
    lVar5 = (longlong)iVar4;
    *(undefined2 *)(lVar2 + lVar5 * 4) = 1;
    *(undefined1 *)(lVar5 + 0x14a4 + param_1) = 0;
    *(int *)(param_1 + 0x1700) = *(int *)(param_1 + 0x1700) + -1;
    if (lVar6 != 0) {
      *(int *)(param_1 + 0x1704) =
           *(int *)(param_1 + 0x1704) - (uint)*(ushort *)(lVar6 + 2 + lVar5 * 4);
    }
  }
  *(int *)(param_2 + 1) = iVar7;
  for (iVar4 = *(int *)(param_1 + 0x149c) / 2; 0 < iVar4; iVar4 = iVar4 + -1) {
    FUN_1401ff4cc(param_1,lVar2,iVar4);
  }
  do {
    iVar4 = *(int *)(param_1 + 0xbac);
    lVar5 = (longlong)iVar4;
    *(undefined4 *)(param_1 + 0xbac) =
         *(undefined4 *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x149c) * 4);
    *(int *)(param_1 + 0x149c) = *(int *)(param_1 + 0x149c) + -1;
    FUN_1401ff4cc(param_1,lVar2,1);
    *(int *)(param_1 + 0x14a0) = *(int *)(param_1 + 0x14a0) + -1;
    iVar8 = *(int *)(param_1 + 0xbac);
    lVar6 = (longlong)iVar8;
    iVar9 = (int)uVar10;
    *(int *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x14a0) * 4) = iVar4;
    *(int *)(param_1 + 0x14a0) = *(int *)(param_1 + 0x14a0) + -1;
    *(int *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x14a0) * 4) = iVar8;
    *(short *)(lVar2 + (longlong)iVar9 * 4) =
         *(short *)(lVar2 + lVar6 * 4) + *(short *)(lVar2 + lVar5 * 4);
    bVar3 = *(byte *)(lVar5 + 0x14a4 + param_1);
    bVar1 = *(byte *)(lVar6 + 0x14a4 + param_1);
    if (bVar3 < bVar1) {
      bVar3 = bVar1;
    }
    *(byte *)((longlong)iVar9 + 0x14a4 + param_1) = bVar3 + 1;
    *(short *)(lVar2 + 2 + lVar6 * 4) = (short)uVar10;
    *(short *)(lVar2 + 2 + lVar5 * 4) = (short)uVar10;
    *(int *)(param_1 + 0xbac) = iVar9;
    uVar10 = (ulonglong)(iVar9 + 1);
    FUN_1401ff4cc(param_1,lVar2,1);
  } while (1 < *(int *)(param_1 + 0x149c));
  *(int *)(param_1 + 0x14a0) = *(int *)(param_1 + 0x14a0) + -1;
  *(undefined4 *)(param_1 + 0xba8 + (longlong)*(int *)(param_1 + 0x14a0) * 4) =
       *(undefined4 *)(param_1 + 0xbac);
  FUN_1401ff58c();
  FUN_14020080c(lVar2,iVar7,param_1 + 0xb88);
  return;
}



int FUN_140200aec(longlong param_1)

{
  longlong lVar1;
  int iVar2;
  
  scan_tree(param_1,param_1 + 0xbc,*(undefined4 *)(param_1 + 0xb48));
  scan_tree(param_1,param_1 + 0x9b0,*(undefined4 *)(param_1 + 0xb60));
  FUN_1402008ac(param_1,param_1 + 0xb70);
  iVar2 = 0x12;
  lVar1 = 0x12;
  do {
    if (*(short *)(param_1 + 0xaa6 + (ulonglong)(byte)(&DAT_140281400)[lVar1] * 4) != 0) break;
    lVar1 = lVar1 + -1;
    iVar2 = iVar2 + -1;
  } while (2 < lVar1);
  *(int *)(param_1 + 0x1700) = *(int *)(param_1 + 0x1700) + iVar2 * 3 + 0x11;
  return iVar2;
}



void FUN_140200b7c(longlong param_1,undefined8 param_2,undefined8 param_3,ushort param_4)

{
  int iVar1;
  int iVar2;
  
  iVar1 = *(int *)(param_1 + 0x1714);
  if (iVar1 < 0xe) {
    iVar2 = iVar1 + 3;
    *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | param_4 << ((byte)iVar1 & 0x1f);
  }
  else {
    *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | param_4 << ((byte)iVar1 & 0x1f);
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    iVar2 = *(int *)(param_1 + 0x1714) + -0xd;
    *(ushort *)(param_1 + 0x1710) = param_4 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
  }
  *(int *)(param_1 + 0x1714) = iVar2;
  FUN_1402006dc(param_1,param_2,param_3,1);
  return;
}



void FUN_140200c1c(longlong param_1)

{
  ushort uVar1;
  int iVar2;
  int iVar3;
  
  iVar2 = *(int *)(param_1 + 0x1714);
  *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | 2 << ((byte)iVar2 & 0x1f);
  if (iVar2 < 0xe) {
    iVar2 = iVar2 + 3;
  }
  else {
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(ushort *)(param_1 + 0x1710) = 2 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
    iVar2 = *(int *)(param_1 + 0x1714) + -0xd;
  }
  *(int *)(param_1 + 0x1714) = iVar2;
  uVar1 = 0;
  *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | 0 << ((byte)iVar2 & 0x1f);
  if (iVar2 < 10) {
    iVar2 = iVar2 + 7;
  }
  else {
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1710);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
         *(undefined1 *)(param_1 + 0x1711);
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
    *(ushort *)(param_1 + 0x1710) = 0 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
    iVar2 = *(int *)(param_1 + 0x1714) + -9;
  }
  *(int *)(param_1 + 0x1714) = iVar2;
  FUN_1402005fc(param_1);
  iVar2 = *(int *)(param_1 + 0x1714);
  if ((*(int *)(param_1 + 0x170c) - iVar2) + 0xb < 9) {
    if (iVar2 < 0xe) {
      iVar3 = iVar2 + 3;
      *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | 2 << ((byte)iVar2 & 0x1f);
    }
    else {
      *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | 2 << ((byte)iVar2 & 0x1f);
      *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
           *(undefined1 *)(param_1 + 0x1710);
      *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
      *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
           *(undefined1 *)(param_1 + 0x1711);
      *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
      iVar3 = *(int *)(param_1 + 0x1714) + -0xd;
      *(ushort *)(param_1 + 0x1710) = 2 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
    }
    *(int *)(param_1 + 0x1714) = iVar3;
    if (iVar3 < 10) {
      iVar2 = iVar3 + 7;
      *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar1 << ((byte)iVar3 & 0x1f);
    }
    else {
      *(ushort *)(param_1 + 0x1710) = *(ushort *)(param_1 + 0x1710) | uVar1 << ((byte)iVar3 & 0x1f);
      *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
           *(undefined1 *)(param_1 + 0x1710);
      *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
      *(undefined1 *)((ulonglong)*(uint *)(param_1 + 0x28) + *(longlong *)(param_1 + 0x10)) =
           *(undefined1 *)(param_1 + 0x1711);
      *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
      iVar2 = *(int *)(param_1 + 0x1714) + -9;
      *(ushort *)(param_1 + 0x1710) = uVar1 >> (0x10U - (char)*(int *)(param_1 + 0x1714) & 0x1f);
    }
    *(int *)(param_1 + 0x1714) = iVar2;
    FUN_1402005fc(param_1);
  }
  *(undefined4 *)(param_1 + 0x170c) = 7;
  return;
}



void FUN_140200e3c(longlong *param_1,longlong param_2,int param_3,int param_4)

{
  short sVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  uint uVar5;
  undefined *puVar6;
  longlong *plVar7;
  
  iVar2 = 0;
  if (*(int *)((longlong)param_1 + 0xac) < 1) {
    uVar5 = param_3 + 5;
  }
  else {
    if ((param_3 != 0) && (*(int *)(*param_1 + 0x48) == 2)) {
      FUN_14020056c();
    }
    FUN_1402008ac(param_1,param_1 + 0x168);
    FUN_1402008ac(param_1,param_1 + 0x16b);
    iVar2 = FUN_140200aec(param_1);
    uVar4 = (int)param_1[0x2e0] + 10U >> 3;
    uVar5 = *(int *)((longlong)param_1 + 0x1704) + 10U >> 3;
    if (uVar4 < uVar5) goto LAB_140200ed1;
  }
  uVar4 = uVar5;
  uVar5 = uVar4;
LAB_140200ed1:
  if ((uVar4 < param_3 + 4U) || (param_2 == 0)) {
    sVar1 = (short)param_4;
    if (((int)param_1[0x16] == 4) || (uVar5 == uVar4)) {
      iVar2 = *(int *)((longlong)param_1 + 0x1714);
      if (iVar2 < 0xe) {
        *(ushort *)(param_1 + 0x2e2) =
             *(ushort *)(param_1 + 0x2e2) | sVar1 + 2 << ((byte)iVar2 & 0x1f);
        iVar2 = iVar2 + 3;
      }
      else {
        *(ushort *)(param_1 + 0x2e2) =
             *(ushort *)(param_1 + 0x2e2) | sVar1 + 2U << ((byte)iVar2 & 0x1f);
        *(char *)((ulonglong)*(uint *)(param_1 + 5) + param_1[2]) = (char)param_1[0x2e2];
        *(int *)(param_1 + 5) = (int)param_1[5] + 1;
        *(undefined1 *)((ulonglong)*(uint *)(param_1 + 5) + param_1[2]) =
             *(undefined1 *)((longlong)param_1 + 0x1711);
        *(int *)(param_1 + 5) = (int)param_1[5] + 1;
        iVar2 = *(int *)((longlong)param_1 + 0x1714) + -0xd;
        *(ushort *)(param_1 + 0x2e2) =
             (ushort)(sVar1 + 2U) >> (0x10U - (char)*(int *)((longlong)param_1 + 0x1714) & 0x1f);
      }
      *(int *)((longlong)param_1 + 0x1714) = iVar2;
      plVar7 = (longlong *)&DAT_1402818a0;
      puVar6 = &DAT_140281420;
    }
    else {
      iVar3 = *(int *)((longlong)param_1 + 0x1714);
      if (iVar3 < 0xe) {
        *(ushort *)(param_1 + 0x2e2) =
             *(ushort *)(param_1 + 0x2e2) | sVar1 + 4 << ((byte)iVar3 & 0x1f);
        iVar3 = iVar3 + 3;
      }
      else {
        *(ushort *)(param_1 + 0x2e2) =
             *(ushort *)(param_1 + 0x2e2) | sVar1 + 4U << ((byte)iVar3 & 0x1f);
        *(char *)((ulonglong)*(uint *)(param_1 + 5) + param_1[2]) = (char)param_1[0x2e2];
        *(int *)(param_1 + 5) = (int)param_1[5] + 1;
        *(undefined1 *)((ulonglong)*(uint *)(param_1 + 5) + param_1[2]) =
             *(undefined1 *)((longlong)param_1 + 0x1711);
        *(int *)(param_1 + 5) = (int)param_1[5] + 1;
        iVar3 = *(int *)((longlong)param_1 + 0x1714) + -0xd;
        *(ushort *)(param_1 + 0x2e2) =
             (ushort)(sVar1 + 4U) >> (0x10U - (char)*(int *)((longlong)param_1 + 0x1714) & 0x1f);
      }
      *(int *)((longlong)param_1 + 0x1714) = iVar3;
      FUN_1401ffdec(param_1,(int)param_1[0x169] + 1,(int)param_1[0x16c] + 1,iVar2 + 1);
      plVar7 = param_1 + 0x136;
      puVar6 = (undefined *)((longlong)param_1 + 0xbc);
    }
    FUN_14020011c(param_1,puVar6,plVar7);
  }
  else {
    FUN_140200b7c(param_1,param_2,param_3,param_4);
  }
  FUN_1401ff44c(param_1);
  if (param_4 != 0) {
    FUN_14020067c();
  }
  return;
}



// Library Function - Single Match
//  public: __cdecl ATL::CAtlBaseModule::~CAtlBaseModule(void) __ptr64
// 
// Library: Visual Studio

void __thiscall ATL::CAtlBaseModule::~CAtlBaseModule(CAtlBaseModule *this)

{
  DeleteCriticalSection((LPCRITICAL_SECTION)(this + 0x28));
  if (*(void **)(this + 0x50) != (void *)0x0) {
    free(*(void **)(this + 0x50));
    *(undefined8 *)(this + 0x50) = 0;
  }
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined4 *)(this + 0x5c) = 0;
  return;
}



// Library Function - Single Match
//  public: struct HINSTANCE__ * __ptr64 __cdecl ATL::CAtlBaseModule::GetHInstanceAt(int) __ptr64
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release

HINSTANCE__ * __thiscall ATL::CAtlBaseModule::GetHInstanceAt(CAtlBaseModule *this,int param_1)

{
  code *pcVar1;
  HINSTANCE__ *pHVar2;
  
  EnterCriticalSection((LPCRITICAL_SECTION)(this + 0x28));
  if ((*(int *)(this + 0x58) < param_1) || (param_1 < 0)) {
    LeaveCriticalSection((LPCRITICAL_SECTION)(this + 0x28));
    pHVar2 = (HINSTANCE__ *)0x0;
  }
  else {
    if (param_1 == *(int *)(this + 0x58)) {
      pHVar2 = *(HINSTANCE__ **)(this + 0x10);
    }
    else {
      if (*(int *)(this + 0x58) <= param_1) {
        RaiseException(0xc000008c,1,0,(ULONG_PTR *)0x0);
        pcVar1 = (code *)swi(3);
        pHVar2 = (HINSTANCE__ *)(*pcVar1)();
        return pHVar2;
      }
      pHVar2 = *(HINSTANCE__ **)(*(longlong *)(this + 0x50) + (longlong)param_1 * 8);
    }
    LeaveCriticalSection((LPCRITICAL_SECTION)(this + 0x28));
  }
  return pHVar2;
}



// Library Function - Single Match
//  public: __cdecl ATL::CAtlBaseModule::CAtlBaseModule(void) __ptr64
// 
// Library: Visual Studio 2010 Release

CAtlBaseModule * __thiscall ATL::CAtlBaseModule::CAtlBaseModule(CAtlBaseModule *this)

{
  DWORD DVar1;
  BOOL BVar2;
  DWORD DVar3;
  
  memset(this + 0x28,0,0x28);
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined4 *)(this + 0x5c) = 0;
  *(IMAGE_DOS_HEADER **)(this + 0x10) = &IMAGE_DOS_HEADER_140000000;
  *(IMAGE_DOS_HEADER **)(this + 8) = &IMAGE_DOS_HEADER_140000000;
  *(undefined4 *)this = 0x60;
  *(undefined4 *)(this + 0x18) = 0xa00;
  *(undefined **)(this + 0x20) = &DAT_140281d38;
  BVar2 = InitializeCriticalSectionAndSpinCount((LPCRITICAL_SECTION)(this + 0x28),0);
  if (BVar2 == 0) {
    DVar3 = GetLastError();
    DVar1 = DVar3 & 0xffff | 0x80070000;
    if ((int)DVar3 < 1) {
      DVar1 = DVar3;
    }
    if ((int)DVar1 < 0) {
      DAT_14032ecb0 = 1;
    }
  }
  return this;
}



void FUN_1402011cc(longlong param_1,LPVOID param_2)

{
  if (param_2 != (LPVOID)0x0) {
    HeapFree(*(HANDLE *)(param_1 + 8),0,param_2);
  }
  return;
}



// Library Function - Single Match
//  public: virtual void * __ptr64 __cdecl ATL::CWin32Heap::Reallocate(void * __ptr64,unsigned
// __int64) __ptr64
// 
// Libraries: Visual Studio 2010 Release, Visual Studio 2012 Release

void * __thiscall ATL::CWin32Heap::Reallocate(CWin32Heap *this,void *param_1,__uint64 param_2)

{
  void *pvVar1;
  
  if (param_1 == (void *)0x0) {
                    // WARNING: Could not recover jumptable at 0x0001402011ff. Too many branches
                    // WARNING: Treating indirect jump as call
    pvVar1 = (void *)(*(code *)**(undefined8 **)this)(this,param_2);
    return pvVar1;
  }
  if (param_2 == 0) {
    (**(code **)(*(longlong *)this + 8))();
    return (void *)0x0;
  }
                    // WARNING: Could not recover jumptable at 0x000140201224. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = (void *)HeapReAlloc(*(undefined8 *)(this + 8),0,param_1,param_2);
  return pvVar1;
}



// Library Function - Single Match
//  public: virtual void * __ptr64 __cdecl ATL::CWin32Heap::`scalar deleting destructor'(unsigned
// int) __ptr64
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release, Visual Studio 2012 Release

void * __thiscall ATL::CWin32Heap::_scalar_deleting_destructor_(CWin32Heap *this,uint param_1)

{
  *(undefined ***)this = &PTR_LAB_140281d48;
  if ((this[0x10] != (CWin32Heap)0x0) && (*(HANDLE *)(this + 8) != (HANDLE)0x0)) {
    HeapDestroy(*(HANDLE *)(this + 8));
  }
  if ((param_1 & 1) != 0) {
    operator_delete(this);
  }
  return this;
}



longlong FUN_140201294(longlong param_1)

{
  LOCK();
  *(int *)(param_1 + 0x20) = *(int *)(param_1 + 0x20) + 1;
  UNLOCK();
  return param_1 + 0x10;
}



// public: __cdecl std::_Mutex::_Mutex(enum std::_Uninitialized) __ptr64

_Mutex * __thiscall std::_Mutex::_Mutex(_Mutex *this,_Uninitialized param_1)

{
                    // 0x2012a0  1  ??0_Mutex@std@@QEAA@W4_Uninitialized@1@@Z
                    // 0x2012a0  2  ??4_Init_locks@std@@QEAAAEAV01@AEBV01@@Z
  return this;
}



undefined8 * FUN_1402012a4(undefined8 *param_1,byte param_2)

{
  *param_1 = &PTR_Allocate_140281d70;
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



// Library Function - Single Match
//  public: virtual struct ATL::CStringData * __ptr64 __cdecl ATL::CAtlStringMgr::Allocate(int,int)
// __ptr64
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release

CStringData * __thiscall ATL::CAtlStringMgr::Allocate(CAtlStringMgr *this,int param_1,int param_2)

{
  undefined1 auVar1 [16];
  CStringData *pCVar2;
  uint uVar3;
  ulonglong uVar4;
  
  uVar3 = param_1 + 8U & 0xfffffff8;
  if (uVar3 == 0) {
    uVar4 = 0;
  }
  else {
    auVar1._8_8_ = 0;
    auVar1._0_8_ = (longlong)(int)uVar3;
    if (SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar1,0) <
        (ulonglong)(longlong)param_2) {
      return (CStringData *)0x0;
    }
    uVar4 = (longlong)(int)uVar3 * (longlong)param_2;
    if (0xffffffffffffffe7 < uVar4) {
      return (CStringData *)0x0;
    }
  }
  pCVar2 = (CStringData *)
           (**(code **)**(undefined8 **)(this + 8))(*(undefined8 **)(this + 8),uVar4 + 0x18);
  if (pCVar2 == (CStringData *)0x0) {
    return (CStringData *)0x0;
  }
  *(undefined4 *)(pCVar2 + 8) = 0;
  *(CAtlStringMgr **)pCVar2 = this;
  *(undefined4 *)(pCVar2 + 0x10) = 1;
  *(uint *)(pCVar2 + 0xc) = uVar3 - 1;
  return pCVar2;
}



// Library Function - Single Match
//  public: virtual struct ATL::CStringData * __ptr64 __cdecl ATL::CAtlStringMgr::Reallocate(struct
// ATL::CStringData * __ptr64,int,int) __ptr64
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release

CStringData * __thiscall
ATL::CAtlStringMgr::Reallocate(CAtlStringMgr *this,CStringData *param_1,int param_2,int param_3)

{
  CStringData *pCVar1;
  uint uVar2;
  uint uVar3;
  ulonglong uVar4;
  
  uVar2 = param_2 + 8U & 0xfffffff8;
  uVar4 = (ulonglong)uVar2 * (ulonglong)(uint)param_3;
  if (((uVar4 < 0x100000000) && (uVar3 = (uint)uVar4, uVar3 < 0xffffffe8)) &&
     (pCVar1 = (CStringData *)
               (**(code **)(**(longlong **)(this + 8) + 0x10))
                         (*(longlong **)(this + 8),param_1,uVar3 + 0x18),
     pCVar1 != (CStringData *)0x0)) {
    *(uint *)(pCVar1 + 0xc) = uVar2 - 1;
    return pCVar1;
  }
  return (CStringData *)0x0;
}



void * __cdecl operator_new(__uint64 param_1)

{
  void *pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001402018fe. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = operator_new(param_1);
  return pvVar1;
}



int __thiscall std::basic_streambuf<>::sync(basic_streambuf<> *this)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x00014020139e. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = sync(this);
  return iVar1;
}



void __thiscall std::basic_streambuf<>::_Unlock(basic_streambuf<> *this)

{
                    // WARNING: Could not recover jumptable at 0x0001402013a4. Too many branches
                    // WARNING: Treating indirect jump as call
  _Unlock(this);
  return;
}



void __thiscall std::basic_streambuf<>::_Lock(basic_streambuf<> *this)

{
                    // WARNING: Could not recover jumptable at 0x0001402013aa. Too many branches
                    // WARNING: Treating indirect jump as call
  _Lock(this);
  return;
}



__int64 __thiscall std::basic_streambuf<>::showmanyc(basic_streambuf<> *this)

{
  __int64 _Var1;
  
                    // WARNING: Could not recover jumptable at 0x0001402013b0. Too many branches
                    // WARNING: Treating indirect jump as call
  _Var1 = showmanyc(this);
  return _Var1;
}



int __thiscall std::basic_streambuf<>::uflow(basic_streambuf<> *this)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001402013b6. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = uflow(this);
  return iVar1;
}



__int64 __thiscall
std::basic_streambuf<>::xsgetn(basic_streambuf<> *this,char *param_1,__int64 param_2)

{
  __int64 _Var1;
  
                    // WARNING: Could not recover jumptable at 0x0001402013bc. Too many branches
                    // WARNING: Treating indirect jump as call
  _Var1 = xsgetn(this,param_1,param_2);
  return _Var1;
}



__int64 __thiscall
std::basic_streambuf<>::xsputn(basic_streambuf<> *this,char *param_1,__int64 param_2)

{
  __int64 _Var1;
  
                    // WARNING: Could not recover jumptable at 0x0001402013c2. Too many branches
                    // WARNING: Treating indirect jump as call
  _Var1 = xsputn(this,param_1,param_2);
  return _Var1;
}



basic_streambuf<> * __thiscall
std::basic_streambuf<>::setbuf(basic_streambuf<> *this,char *param_1,__int64 param_2)

{
  basic_streambuf<> *pbVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001402013c8. Too many branches
                    // WARNING: Treating indirect jump as call
  pbVar1 = setbuf(this,param_1,param_2);
  return pbVar1;
}



void __thiscall std::basic_streambuf<>::imbue(basic_streambuf<> *this,locale *param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001402013ce. Too many branches
                    // WARNING: Treating indirect jump as call
  imbue(this,param_1);
  return;
}



void FUN_1402013e0(undefined8 param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001402013e2. Too many branches
                    // WARNING: Treating indirect jump as call
  (*(code *)PTR_FUN_140322380)(param_1,0);
  return;
}



// Library Function - Single Match
//  void __cdecl _com_issue_errorex(long,struct IUnknown * __ptr64,struct _GUID const & __ptr64)
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release, Visual Studio 2012 Release

void __cdecl _com_issue_errorex(long param_1,IUnknown *param_2,_GUID *param_3)

{
  HRESULT HVar1;
  int iVar2;
  undefined8 local_res10;
  longlong *local_res20;
  
  local_res10 = 0;
  if ((param_2 != (IUnknown *)0x0) &&
     (HVar1 = (*param_2->lpVtbl->QueryInterface)(param_2,(IID *)&DAT_140281da0,&local_res20),
     -1 < HVar1)) {
    iVar2 = (**(code **)(*local_res20 + 0x18))(local_res20,param_3);
    (**(code **)(*local_res20 + 0x10))();
    if ((iVar2 == 0) && (iVar2 = Ordinal_200(0,&local_res10), iVar2 != 0)) {
      local_res10 = 0;
    }
  }
  (*(code *)PTR_FUN_140322380)(param_1,local_res10);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Function: __chkstk replaced with injection: alloca_probe

longlong FUN_140201490(LPCSTR param_1)

{
  ulonglong uVar1;
  int iVar2;
  int iVar3;
  DWORD DVar4;
  void *_Memory;
  longlong lVar5;
  ulonglong uVar6;
  undefined1 *puVar7;
  undefined1 auStackY_68 [32];
  int local_38;
  int iStack_34;
  void *local_30;
  ulonglong local_28;
  
  puVar7 = auStackY_68;
  local_28 = DAT_1403223c0 ^ (ulonglong)&local_38;
  if (param_1 == (LPCSTR)0x0) {
    lVar5 = 0;
  }
  else {
    iVar2 = lstrlenA(param_1);
    iVar2 = iVar2 + 1;
    iStack_34 = iVar2;
    iVar3 = MultiByteToWideChar(0,0,param_1,iVar2,(LPWSTR)0x0,0);
    local_38 = iVar3;
    if (iVar3 == 0) {
      DVar4 = GetLastError();
      if (0 < (int)DVar4) {
        DVar4 = DVar4 & 0xffff | 0x80070000;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(DVar4);
    }
    if (iVar3 < 0x1000) {
      uVar1 = (longlong)iVar3 * 2;
      uVar6 = uVar1 + 0xf;
      if (uVar6 <= uVar1) {
        uVar6 = 0xffffffffffffff0;
      }
      _Memory = (void *)((longlong)&local_38 + -(uVar6 & 0xfffffffffffffff0));
      puVar7 = auStackY_68 + -(uVar6 & 0xfffffffffffffff0);
    }
    else {
      _Memory = malloc((longlong)iVar3 * 2);
      puVar7 = auStackY_68;
    }
    local_30 = _Memory;
    if (_Memory == (void *)0x0) {
                    // WARNING: Subroutine does not return
      *(undefined **)(puVar7 + -8) = &UNK_14020157f;
      FUN_1402013e0(0x8007000e);
    }
    *(int *)(puVar7 + 0x28) = iVar3;
    *(void **)(puVar7 + 0x20) = _Memory;
    *(undefined8 *)(puVar7 + -8) = 0x140201599;
    iVar2 = MultiByteToWideChar(0,0,param_1,iVar2,*(LPWSTR *)(puVar7 + 0x20),*(int *)(puVar7 + 0x28)
                               );
    if (iVar2 == 0) {
      if (0xfff < iVar3) {
        *(undefined8 *)(puVar7 + -8) = 0x1402015ad;
        free(_Memory);
      }
      *(undefined8 *)(puVar7 + -8) = 0x1402015b3;
      DVar4 = GetLastError();
      if (0 < (int)DVar4) {
        DVar4 = DVar4 & 0xffff | 0x80070000;
      }
                    // WARNING: Subroutine does not return
      *(undefined **)(puVar7 + -8) = &UNK_1402015c6;
      FUN_1402013e0(DVar4);
    }
    *(undefined8 *)(puVar7 + -8) = 0x1402015d0;
    lVar5 = Ordinal_2(_Memory);
    if (0xfff < iVar3) {
      *(undefined8 *)(puVar7 + -8) = 0x1402015e3;
      free(_Memory);
    }
    if (lVar5 == 0) {
                    // WARNING: Subroutine does not return
      *(undefined **)(puVar7 + -8) = &UNK_1402015f2;
      FUN_1402013e0(0x8007000e);
    }
  }
  *(undefined8 *)(puVar7 + -8) = 0x140201602;
  return lVar5;
}



LPSTR FUN_140201620(LPCWSTR param_1)

{
  WCHAR WVar1;
  int iVar2;
  DWORD DVar3;
  LPSTR lpMultiByteStr;
  longlong lVar4;
  LPCWSTR pWVar5;
  
  lpMultiByteStr = (LPSTR)0x0;
  if (param_1 != (LPCWSTR)0x0) {
    lVar4 = -1;
    pWVar5 = param_1;
    do {
      if (lVar4 == 0) break;
      lVar4 = lVar4 + -1;
      WVar1 = *pWVar5;
      pWVar5 = pWVar5 + 1;
    } while (WVar1 != L'\0');
    iVar2 = WideCharToMultiByte(0,0,param_1,~(uint)lVar4,(LPSTR)0x0,0,(LPCSTR)0x0,(LPBOOL)0x0);
    if (iVar2 == 0) {
      DVar3 = GetLastError();
      if (0 < (int)DVar3) {
        DVar3 = DVar3 & 0xffff | 0x80070000;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(DVar3);
    }
    lpMultiByteStr = operator_new((longlong)iVar2);
    if (lpMultiByteStr == (LPSTR)0x0) {
                    // WARNING: Subroutine does not return
      FUN_1402013e0(0x8007000e);
    }
    iVar2 = WideCharToMultiByte(0,0,param_1,~(uint)lVar4,lpMultiByteStr,iVar2,(LPCSTR)0x0,
                                (LPBOOL)0x0);
    if (iVar2 == 0) {
      operator_delete(lpMultiByteStr);
      DVar3 = GetLastError();
      if (0 < (int)DVar3) {
        DVar3 = DVar3 & 0xffff | 0x80070000;
      }
                    // WARNING: Subroutine does not return
      FUN_1402013e0(DVar3);
    }
  }
  return lpMultiByteStr;
}



// Library Function - Single Match
//  public: virtual __cdecl _com_error::~_com_error(void) __ptr64
// 
// Libraries: Visual Studio 2005 Release, Visual Studio 2010 Release, Visual Studio 2012 Release

void __thiscall _com_error::~_com_error(_com_error *this)

{
  *(undefined ***)this = &PTR_FUN_140281dd8;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 0x10))();
  }
  if (*(HLOCAL *)(this + 0x18) != (HLOCAL)0x0) {
    LocalFree(*(HLOCAL *)(this + 0x18));
  }
  return;
}



void FUN_140201770(undefined4 param_1,undefined8 param_2)

{
  undefined **local_28;
  undefined4 local_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_10 = 0;
  local_28 = &PTR_FUN_140281dd8;
  local_20 = param_1;
  local_18 = param_2;
                    // WARNING: Subroutine does not return
  _CxxThrowException(&local_28,(ThrowInfo *)&DAT_14031d810);
}



// Library Function - Single Match
//  public: __cdecl _com_error::_com_error(class _com_error const & __ptr64) __ptr64
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release, Visual Studio 2012 Release

_com_error * __thiscall _com_error::_com_error(_com_error *this,_com_error *param_1)

{
  longlong *plVar1;
  
  *(undefined ***)this = &PTR_FUN_140281dd8;
  *(undefined4 *)(this + 8) = *(undefined4 *)(param_1 + 8);
  plVar1 = *(longlong **)(param_1 + 0x10);
  *(undefined8 *)(this + 0x18) = 0;
  *(longlong **)(this + 0x10) = plVar1;
  if (plVar1 != (longlong *)0x0) {
    (**(code **)(*plVar1 + 8))(plVar1);
  }
  return this;
}



undefined8 * FUN_1402017f0(undefined8 *param_1,uint param_2)

{
  *param_1 = &PTR_FUN_140281dd8;
  if ((longlong *)param_1[2] != (longlong *)0x0) {
    (**(code **)(*(longlong *)param_1[2] + 0x10))();
  }
  if ((HLOCAL)param_1[3] != (HLOCAL)0x0) {
    LocalFree((HLOCAL)param_1[3]);
  }
  if ((param_2 & 1) != 0) {
    operator_delete(param_1);
  }
  return param_1;
}



void __cdecl operator_delete(void *param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140201844. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(param_1);
  return;
}



// WARNING: This is an inlined function
// Library Function - Single Match
//  __security_check_cookie
// 
// Libraries: Visual Studio 2005 Debug, Visual Studio 2005 Release, Visual Studio 2010 Debug, Visual
// Studio 2010 Release

void __cdecl __security_check_cookie(uintptr_t _StackCookie)

{
  if ((_StackCookie == DAT_1403223c0) && ((short)(_StackCookie >> 0x30) == 0)) {
    return;
  }
                    // WARNING: Subroutine does not return
  __report_gsfailure(_StackCookie);
}



void __cdecl free(void *_Memory)

{
                    // WARNING: Could not recover jumptable at 0x000140201880. Too many branches
                    // WARNING: Treating indirect jump as call
  free(_Memory);
  return;
}



void * __cdecl malloc(size_t _Size)

{
  void *pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140201886. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = malloc(_Size);
  return pvVar1;
}



void __cdecl operator_delete__(void *param_1)

{
                    // WARNING: Could not recover jumptable at 0x00014020188c. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete__(param_1);
  return;
}



// Library Function - Single Match
//  public: virtual void * __ptr64 __cdecl type_info::`vector deleting destructor'(unsigned int)
// __ptr64
// 
// Library: Visual Studio 2010 Release

void * __thiscall type_info::_vector_deleting_destructor_(type_info *this,uint param_1)

{
  if ((param_1 & 2) == 0) {
    type_info::_type_info_dtor_internal_method(this);
    if ((param_1 & 1) != 0) {
      operator_delete(this);
    }
  }
  else {
    _eh_vector_destructor_iterator_
              (this,0x18,*(int *)(this + -8),type_info::_type_info_dtor_internal_method);
    if ((param_1 & 1) != 0) {
      operator_delete(this + -8);
    }
    this = this + -8;
  }
  return this;
}



void * __cdecl operator_new(__uint64 param_1)

{
  void *pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001402018fe. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = operator_new(param_1);
  return pvVar1;
}



void _purecall(void)

{
                    // WARNING: Could not recover jumptable at 0x000140201910. Too many branches
                    // WARNING: Treating indirect jump as call
  _purecall();
  return;
}



char * __thiscall std::exception::what(exception *this)

{
  char *pcVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140201916. Too many branches
                    // WARNING: Treating indirect jump as call
  pcVar1 = what(this);
  return pcVar1;
}



// Library Function - Single Match
//  _onexit
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release, Visual Studio 2012 Release

_onexit_t __cdecl _onexit(_onexit_t _Func)

{
  _onexit_t p_Var1;
  PVOID pvVar2;
  PVOID local_res10;
  PVOID local_res18 [2];
  
  local_res10 = DecodePointer(DAT_1403794e8);
  if (local_res10 == (PVOID)0xffffffffffffffff) {
    p_Var1 = _onexit(_Func);
  }
  else {
    _lock(8);
    local_res10 = DecodePointer(DAT_1403794e8);
    local_res18[0] = DecodePointer(DAT_1403794e0);
    pvVar2 = EncodePointer(_Func);
    p_Var1 = (_onexit_t)__dllonexit(pvVar2,&local_res10,local_res18);
    DAT_1403794e8 = EncodePointer(local_res10);
    DAT_1403794e0 = EncodePointer(local_res18[0]);
    _unlock(8);
  }
  return p_Var1;
}



// Library Function - Single Match
//  atexit
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release, Visual Studio 2012 Release

int __cdecl atexit(_func_5014 *param_1)

{
  _onexit_t p_Var1;
  
  p_Var1 = _onexit((_onexit_t)param_1);
  return (p_Var1 != (_onexit_t)0x0) - 1;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1402019e4(void)

{
  atexit(FUN_140202204);
  _DAT_14032e71c = DAT_14032eca4;
  _DAT_14032e718 =
       __getmainargs(&DAT_14032e700,&DAT_14032e710,&DAT_14032e708,DAT_14032eca0,&DAT_14032e71c);
  if (_DAT_14032e718 < 0) {
    _amsg_exit(8);
  }
  return;
}



// Library Function - Single Match
//  __tmainCRTStartup
// 
// Library: Visual Studio 2010 Release

ulonglong __tmainCRTStartup(void)

{
  void *pvVar1;
  bool bVar2;
  void *pvVar3;
  int iVar4;
  BOOL BVar5;
  void *pvVar6;
  ulonglong uVar7;
  bool bVar8;
  
  pvVar1 = StackBase;
  bVar2 = false;
  while( true ) {
    pvVar6 = (void *)0x0;
    LOCK();
    bVar8 = DAT_1403794d0 == (void *)0x0;
    pvVar3 = pvVar1;
    if (!bVar8) {
      pvVar6 = DAT_1403794d0;
      pvVar3 = DAT_1403794d0;
    }
    DAT_1403794d0 = pvVar3;
    UNLOCK();
    if (bVar8) goto LAB_140201a92;
    if (pvVar6 == pvVar1) break;
    Sleep(1000);
  }
  bVar2 = true;
LAB_140201a92:
  if (DAT_1403794c8 == 1) {
    _amsg_exit(0x1f);
  }
  else if (DAT_1403794c8 == 0) {
    DAT_1403794c8 = 1;
    iVar4 = _initterm_e(&DAT_140259df8,&DAT_140259e10);
    if (iVar4 != 0) {
      return 0xff;
    }
  }
  else {
    DAT_14032e724 = 1;
  }
  if (DAT_1403794c8 == 1) {
    _initterm(&DAT_140259a68,&DAT_140259df0);
    DAT_1403794c8 = 2;
  }
  if (!bVar2) {
    LOCK();
    DAT_1403794d0 = (void *)0x0;
    UNLOCK();
  }
  if ((DAT_1403794d8 != (code *)0x0) &&
     (BVar5 = _IsNonwritableInCurrentImage((PBYTE)&DAT_1403794d8), BVar5 != 0)) {
    (*DAT_1403794d8)(0,2);
  }
  *(undefined8 *)__initenv_exref = DAT_14032e708;
  uVar7 = FUN_1400a1140(DAT_14032e700,DAT_14032e710,DAT_14032e708);
  DAT_14032e720 = (uint)uVar7;
  if (DAT_14032e704 != 0) {
    if (DAT_14032e724 == 0) {
      _cexit();
      uVar7 = (ulonglong)DAT_14032e720;
    }
    return uVar7;
  }
                    // WARNING: Subroutine does not return
  exit(DAT_14032e720);
}



// WARNING: Removing unreachable block (ram,0x000140201bde)

undefined8 FUN_140201bcc(void)

{
  DAT_14032e704 = 0;
  __set_app_type(1);
  DAT_1403794e0 = EncodePointer((PVOID)0xffffffffffffffff);
  DAT_1403794e8 = DAT_1403794e0;
  *(undefined4 *)_fmode_exref = DAT_14032ecac;
  *(undefined4 *)_commode_exref = DAT_14032eca8;
  FUN_1402021cc();
  FUN_140202320();
  if (DAT_1403223ec == 0) {
    __setusermatherr(FUN_140202320);
  }
  if (DAT_1403223e8 == -1) {
    _configthreadlocale(-1);
  }
  return 0;
}



void entry(void)

{
  __security_init_cookie();
  __tmainCRTStartup();
  return;
}



void __stdcall _CxxThrowException(void *pExceptionObject,ThrowInfo *pThrowInfo)

{
                    // WARNING: Could not recover jumptable at 0x000140201cae. Too many branches
                    // WARNING: Subroutine does not return
                    // WARNING: Treating indirect jump as call
  _CxxThrowException(pExceptionObject,pThrowInfo);
  return;
}



void * __cdecl memcpy(void *_Dst,void *_Src,size_t _Size)

{
  void *pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140201cb4. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = memcpy(_Dst,_Src,_Size);
  return pvVar1;
}



void __CxxFrameHandler3(void)

{
                    // WARNING: Could not recover jumptable at 0x000140201cba. Too many branches
                    // WARNING: Subroutine does not return
                    // WARNING: Treating indirect jump as call
  __CxxFrameHandler3();
  return;
}



undefined8 FUN_140201cc0(longlong param_1,undefined8 param_2,undefined8 param_3,longlong param_4)

{
  uint uVar1;
  longlong lVar2;
  uint uVar3;
  
  lVar2 = *(longlong *)(param_4 + 0x38);
  __GSHandlerCheckCommon(param_2,param_4,lVar2 + 4);
  uVar1 = *(uint *)(lVar2 + 4);
  uVar3 = uVar1 & 2;
  if ((*(uint *)(param_1 + 4) & 0x66) == 0) {
    uVar3 = uVar1 & 1;
  }
  if (uVar3 != 0) {
                    // WARNING: Subroutine does not return
    __CxxFrameHandler3(param_1,param_2,param_3,param_4);
  }
  return 1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// Library Function - Single Match
//  __GSHandlerCheckCommon
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release, Visual Studio 2019 Release

longlong __GSHandlerCheckCommon(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x10);
  lVar2 = (ulonglong)*(uint *)(lVar1 + 8) + *(longlong *)(param_2 + 8);
  if ((*(byte *)(lVar2 + 3) & 0xf) != 0) {
    lVar1 = (longlong)(int)(*(byte *)(lVar2 + 3) & 0xfffffff0);
  }
  return lVar1;
}



// Library Function - Single Match
//  __GSHandlerCheck
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release, Visual Studio 2012 Release,
// Visual Studio 2019 Release

undefined8
__GSHandlerCheck(undefined8 param_1,undefined8 param_2,undefined8 param_3,longlong param_4)

{
  __GSHandlerCheckCommon(param_2,param_4,*(undefined8 *)(param_4 + 0x38));
  return 1;
}



// WARNING: This is an inlined function
// Library Function - Single Match
//  __chkstk
// 
// Libraries: Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio 2012

void __chkstk(void)

{
  undefined1 *in_RAX;
  undefined1 *puVar1;
  undefined1 *puVar2;
  undefined1 local_res8 [32];
  
  puVar1 = local_res8 + -(longlong)in_RAX;
  if (local_res8 < in_RAX) {
    puVar1 = (undefined1 *)0x0;
  }
  if (puVar1 < StackLimit) {
    puVar2 = StackLimit;
    do {
      puVar2 = puVar2 + -0x1000;
      *puVar2 = 0;
    } while ((undefined1 *)((ulonglong)puVar1 & 0xfffffffffffff000) != puVar2);
  }
  return;
}



errno_t __cdecl wmemcpy_s(wchar_t *_S1,rsize_t _N1,wchar_t *_S2,rsize_t _N)

{
  errno_t eVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140201e3e. Too many branches
                    // WARNING: Treating indirect jump as call
  eVar1 = wmemcpy_s(_S1,_N1,_S2,_N);
  return eVar1;
}



void * __cdecl memset(void *_Dst,int _Val,size_t _Size)

{
  void *pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140201e44. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = memset(_Dst,_Val,_Size);
  return pvVar1;
}



int __cdecl memcmp(void *_Buf1,void *_Buf2,size_t _Size)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140201e4a. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = memcmp(_Buf1,_Buf2,_Size);
  return iVar1;
}



void __RTDynamicCast(void)

{
                    // WARNING: Could not recover jumptable at 0x000140201e50. Too many branches
                    // WARNING: Treating indirect jump as call
  __RTDynamicCast();
  return;
}



double __cdecl ceil(double _X)

{
  double dVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140201e56. Too many branches
                    // WARNING: Treating indirect jump as call
  dVar1 = ceil(_X);
  return dVar1;
}



double __cdecl floor(double _X)

{
  double dVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140201e5c. Too many branches
                    // WARNING: Treating indirect jump as call
  dVar1 = floor(_X);
  return dVar1;
}



// Library Function - Single Match
//  void __cdecl __ArrayUnwind(void * __ptr64,unsigned __int64,int,void (__cdecl*)(void * __ptr64))
// 
// Library: Visual Studio 2010 Release

void __cdecl __ArrayUnwind(void *param_1,__uint64 param_2,int param_3,_func_void_void_ptr *param_4)

{
  while( true ) {
    param_3 = param_3 + -1;
    if (param_3 < 0) break;
    param_1 = (void *)((longlong)param_1 - param_2);
    (*param_4)(param_1);
  }
  return;
}



// Library Function - Single Match
//  void __cdecl `eh vector destructor iterator'(void * __ptr64,unsigned __int64,int,void
// (__cdecl*)(void * __ptr64))
// 
// Library: Visual Studio 2010 Release

void __cdecl
_eh_vector_destructor_iterator_
          (void *param_1,__uint64 param_2,int param_3,_func_void_void_ptr *param_4)

{
  void *pvVar1;
  uint uVar2;
  ulonglong uVar3;
  
  uVar3 = (ulonglong)param_3;
  pvVar1 = (void *)(uVar3 * param_2 + (longlong)param_1);
  while( true ) {
    uVar2 = (int)uVar3 - 1;
    uVar3 = (ulonglong)uVar2;
    if ((int)uVar2 < 0) break;
    pvVar1 = (void *)((longlong)pvVar1 - param_2);
    (*param_4)(pvVar1);
  }
  return;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

EXCEPTION_DISPOSITION
__C_specific_handler
          (_EXCEPTION_RECORD *ExceptionRecord,void *EstablisherFrame,_CONTEXT *ContextRecord,
          _DISPATCHER_CONTEXT *DispatcherContext)

{
  EXCEPTION_DISPOSITION EVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140201f0e. Too many branches
                    // WARNING: Treating indirect jump as call
  EVar1 = __C_specific_handler(ExceptionRecord,EstablisherFrame,ContextRecord,DispatcherContext);
  return EVar1;
}



// Library Function - Single Match
//  void __cdecl `eh vector constructor iterator'(void * __ptr64,unsigned __int64,int,void
// (__cdecl*)(void * __ptr64),void (__cdecl*)(void * __ptr64))
// 
// Library: Visual Studio 2010 Release

void __cdecl
_eh_vector_constructor_iterator_
          (void *param_1,__uint64 param_2,int param_3,_func_void_void_ptr *param_4,
          _func_void_void_ptr *param_5)

{
  int iVar1;
  
  for (iVar1 = 0; iVar1 < param_3; iVar1 = iVar1 + 1) {
    (*param_4)(param_1);
    param_1 = (void *)((longlong)param_1 + param_2);
  }
  return;
}



// Library Function - Single Match
//  __GSHandlerCheck_SEH
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release, Visual Studio 2019 Release

EXCEPTION_DISPOSITION
__GSHandlerCheck_SEH
          (_EXCEPTION_RECORD *param_1,void *param_2,_CONTEXT *param_3,_DISPATCHER_CONTEXT *param_4)

{
  uint *puVar1;
  uint uVar2;
  EXCEPTION_DISPOSITION EVar3;
  uint uVar4;
  
  puVar1 = *(uint **)(param_4 + 0x38) + (ulonglong)**(uint **)(param_4 + 0x38) * 4 + 1;
  __GSHandlerCheckCommon(param_2,param_4,puVar1);
  uVar2 = *puVar1;
  EVar3 = ExceptionContinueSearch;
  uVar4 = uVar2 & 2;
  if ((param_1->ExceptionFlags & 0x66) == 0) {
    uVar4 = uVar2 & 1;
  }
  if (uVar4 != 0) {
    EVar3 = __C_specific_handler(param_1,param_2,param_3,param_4);
  }
  return EVar3;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address
// Library Function - Single Match
//  __report_gsfailure
// 
// Libraries: Visual Studio 2005 Debug, Visual Studio 2005 Release, Visual Studio 2010 Debug, Visual
// Studio 2010 Release

void __cdecl __report_gsfailure(uintptr_t _StackCookie)

{
  HANDLE hProcess;
  DWORD64 unaff_retaddr;
  uintptr_t local_res8 [4];
  PVOID local_48;
  ulonglong local_40;
  PRUNTIME_FUNCTION local_38;
  DWORD64 local_30;
  DWORD64 local_28;
  undefined8 local_20;
  undefined8 local_18;
  
  local_res8[0] = _StackCookie;
  RtlCaptureContext(&DAT_14032e7d0);
  local_30 = DAT_14032e8c8;
  local_38 = RtlLookupFunctionEntry(DAT_14032e8c8,&local_28,(PUNWIND_HISTORY_TABLE)0x0);
  if (local_38 == (PRUNTIME_FUNCTION)0x0) {
    _DAT_14032e868 = local_res8;
    DAT_14032e8c8 = unaff_retaddr;
  }
  else {
    RtlVirtualUnwind(0,local_28,local_30,local_38,(PCONTEXT)&DAT_14032e7d0,&local_48,&local_40,
                     (PKNONVOLATILE_CONTEXT_POINTERS)0x0);
  }
  _DAT_14032e740 = DAT_14032e8c8;
  _DAT_14032e850 = local_res8[0];
  _DAT_14032e730 = 0xc0000409;
  _DAT_14032e734 = 1;
  local_20 = DAT_1403223c0;
  local_18 = DAT_1403223c8;
  DAT_14032e7c8 = IsDebuggerPresent();
  __crt_debugger_hook(1);
  SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)0x0);
  UnhandledExceptionFilter((_EXCEPTION_POINTERS *)&PTR_DAT_140281df0);
  if (DAT_14032e7c8 == 0) {
    __crt_debugger_hook(1);
  }
  hProcess = GetCurrentProcess();
  TerminateProcess(hProcess,0xc0000409);
  return;
}



void __cdecl _unlock(int _File)

{
                    // WARNING: Could not recover jumptable at 0x000140202156. Too many branches
                    // WARNING: Treating indirect jump as call
  _unlock(_File);
  return;
}



void __dllonexit(void)

{
                    // WARNING: Could not recover jumptable at 0x00014020215c. Too many branches
                    // WARNING: Treating indirect jump as call
  __dllonexit();
  return;
}



void __cdecl _lock(int _File)

{
                    // WARNING: Could not recover jumptable at 0x000140202162. Too many branches
                    // WARNING: Treating indirect jump as call
  _lock(_File);
  return;
}



undefined8 FUN_140202168(undefined8 *param_1)

{
  int iVar1;
  int *piVar2;
  
  piVar2 = (int *)*param_1;
  if (((*piVar2 == -0x1f928c9d) && (piVar2[6] == 4)) &&
     ((iVar1 = piVar2[8], iVar1 == 0x19930520 ||
      (((iVar1 == 0x19930521 || (iVar1 == 0x19930522)) || (iVar1 == 0x1994000)))))) {
                    // WARNING: Subroutine does not return
    terminate();
  }
  return 0;
}



undefined8 FUN_1402021ac(void)

{
  SetUnhandledExceptionFilter(FUN_140202168);
  return 0;
}



void __cdecl _amsg_exit(int param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001402021c4. Too many branches
                    // WARNING: Treating indirect jump as call
  _amsg_exit(param_1);
  return;
}



void FUN_1402021cc(void)

{
  undefined8 *puVar1;
  
  for (puVar1 = &DAT_1402a6c90; puVar1 < &DAT_1402a6c90; puVar1 = puVar1 + 1) {
    if ((code *)*puVar1 != (code *)0x0) {
      (*(code *)*puVar1)();
    }
  }
  return;
}



void FUN_140202204(void)

{
  undefined8 *puVar1;
  
  for (puVar1 = &DAT_1402a6ca0; puVar1 < &DAT_1402a6ca0; puVar1 = puVar1 + 1) {
    if ((code *)*puVar1 != (code *)0x0) {
      (*(code *)*puVar1)();
    }
  }
  return;
}



int __cdecl _XcptFilter(ulong _ExceptionNum,_EXCEPTION_POINTERS *_ExceptionPtr)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x00014020223c. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = _XcptFilter(_ExceptionNum,_ExceptionPtr);
  return iVar1;
}



// Library Function - Single Match
//  _ValidateImageBase
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release

BOOL __cdecl _ValidateImageBase(PBYTE pImageBase)

{
  uint uVar1;
  
  if (*(short *)pImageBase != 0x5a4d) {
    return 0;
  }
  uVar1 = 0;
  if (*(int *)(pImageBase + *(int *)(pImageBase + 0x3c)) == 0x4550) {
    uVar1 = (uint)((short)*(int *)((longlong)(pImageBase + *(int *)(pImageBase + 0x3c)) + 0x18) ==
                  0x20b);
  }
  return uVar1;
}



// Library Function - Single Match
//  _FindPESection
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release, Visual Studio 2019 Release

PIMAGE_SECTION_HEADER __cdecl _FindPESection(PBYTE pImageBase,DWORD_PTR rva)

{
  int iVar1;
  PIMAGE_SECTION_HEADER p_Var2;
  uint uVar3;
  
  iVar1 = *(int *)(pImageBase + 0x3c);
  uVar3 = 0;
  p_Var2 = (PIMAGE_SECTION_HEADER)
           (pImageBase +
           (ulonglong)*(ushort *)(pImageBase + (longlong)iVar1 + 0x14) + 0x18 + (longlong)iVar1);
  if (*(ushort *)(pImageBase + (longlong)iVar1 + 6) != 0) {
    do {
      if ((p_Var2->VirtualAddress <= rva) &&
         (rva < (p_Var2->Misc).PhysicalAddress + p_Var2->VirtualAddress)) {
        return p_Var2;
      }
      uVar3 = uVar3 + 1;
      p_Var2 = p_Var2 + 1;
    } while (uVar3 < *(ushort *)(pImageBase + (longlong)iVar1 + 6));
  }
  return (PIMAGE_SECTION_HEADER)0x0;
}



// Library Function - Single Match
//  _IsNonwritableInCurrentImage
// 
// Library: Visual Studio 2010 Release

BOOL __cdecl _IsNonwritableInCurrentImage(PBYTE pTarget)

{
  BOOL BVar1;
  uint uVar2;
  PIMAGE_SECTION_HEADER p_Var3;
  IMAGE_DOS_HEADER *pImageBase;
  
  pImageBase = &IMAGE_DOS_HEADER_140000000;
  BVar1 = _ValidateImageBase((PBYTE)&IMAGE_DOS_HEADER_140000000);
  uVar2 = 0;
  if (BVar1 != 0) {
    p_Var3 = _FindPESection((PBYTE)pImageBase,(longlong)pTarget - (longlong)pImageBase);
    uVar2 = 0;
    if (p_Var3 != (PIMAGE_SECTION_HEADER)0x0) {
      uVar2 = ~(p_Var3->Characteristics >> 0x1f) & 1;
    }
  }
  return uVar2;
}



void _initterm(void)

{
                    // WARNING: Could not recover jumptable at 0x000140202312. Too many branches
                    // WARNING: Treating indirect jump as call
  _initterm();
  return;
}



void _initterm_e(void)

{
                    // WARNING: Could not recover jumptable at 0x000140202318. Too many branches
                    // WARNING: Treating indirect jump as call
  _initterm_e();
  return;
}



undefined8 FUN_140202320(void)

{
  return 0;
}



// Library Function - Single Match
//  __security_init_cookie
// 
// Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release

void __cdecl __security_init_cookie(void)

{
  _FILETIME _Var1;
  DWORD DVar2;
  DWORD DVar3;
  DWORD DVar4;
  _FILETIME local_res8;
  LARGE_INTEGER local_res10;
  
  local_res8.dwLowDateTime = 0;
  local_res8.dwHighDateTime = 0;
  if (DAT_1403223c0 == 0x2b992ddfa232) {
    GetSystemTimeAsFileTime(&local_res8);
    _Var1 = local_res8;
    DVar2 = GetCurrentProcessId();
    DVar3 = GetCurrentThreadId();
    DVar4 = GetTickCount();
    QueryPerformanceCounter(&local_res10);
    DAT_1403223c0 =
         (local_res10.QuadPart ^
         (ulonglong)_Var1 ^ (ulonglong)DVar2 ^ (ulonglong)DVar3 ^ (ulonglong)DVar4) & 0xffffffffffff
    ;
    if (DAT_1403223c0 == 0x2b992ddfa232) {
      DAT_1403223c0 = 0x2b992ddfa233;
    }
  }
  DAT_1403223c8 = ~DAT_1403223c0;
  return;
}



void __cdecl terminate(void)

{
                    // WARNING: Could not recover jumptable at 0x0001402023d8. Too many branches
                    // WARNING: Subroutine does not return
                    // WARNING: Treating indirect jump as call
  terminate();
  return;
}



void __cdecl __crt_debugger_hook(int param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001402023de. Too many branches
                    // WARNING: Treating indirect jump as call
  __crt_debugger_hook(param_1);
  return;
}



void __thiscall type_info::_type_info_dtor_internal_method(type_info *this)

{
                    // WARNING: Could not recover jumptable at 0x0001402023e4. Too many branches
                    // WARNING: Treating indirect jump as call
  _type_info_dtor_internal_method(this);
  return;
}



void MiniDumpWriteDump(void)

{
                    // WARNING: Could not recover jumptable at 0x0001402023ea. Too many branches
                    // WARNING: Treating indirect jump as call
  MiniDumpWriteDump();
  return;
}



void __stdcall
GetAcceptExSockaddrs
          (PVOID lpOutputBuffer,DWORD dwReceiveDataLength,DWORD dwLocalAddressLength,
          DWORD dwRemoteAddressLength,sockaddr **LocalSockaddr,LPINT LocalSockaddrLength,
          sockaddr **RemoteSockaddr,LPINT RemoteSockaddrLength)

{
                    // WARNING: Could not recover jumptable at 0x0001402023f0. Too many branches
                    // WARNING: Treating indirect jump as call
  GetAcceptExSockaddrs
            (lpOutputBuffer,dwReceiveDataLength,dwLocalAddressLength,dwRemoteAddressLength,
             LocalSockaddr,LocalSockaddrLength,RemoteSockaddr,RemoteSockaddrLength);
  return;
}



void Ordinal_151(void)

{
                    // WARNING: Could not recover jumptable at 0x0001402023f6. Too many branches
                    // WARNING: Treating indirect jump as call
  Ordinal_151();
  return;
}



PEXCEPTION_ROUTINE __stdcall
RtlVirtualUnwind(DWORD HandlerType,DWORD64 ImageBase,DWORD64 ControlPc,
                PRUNTIME_FUNCTION FunctionEntry,PCONTEXT ContextRecord,PVOID *HandlerData,
                PDWORD64 EstablisherFrame,PKNONVOLATILE_CONTEXT_POINTERS ContextPointers)

{
  PEXCEPTION_ROUTINE puVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001402023fc. Too many branches
                    // WARNING: Treating indirect jump as call
  puVar1 = RtlVirtualUnwind(HandlerType,ImageBase,ControlPc,FunctionEntry,ContextRecord,HandlerData,
                            EstablisherFrame,ContextPointers);
  return puVar1;
}



PRUNTIME_FUNCTION __stdcall
RtlLookupFunctionEntry(DWORD64 ControlPc,PDWORD64 ImageBase,PUNWIND_HISTORY_TABLE HistoryTable)

{
  PRUNTIME_FUNCTION p_Var1;
  
                    // WARNING: Could not recover jumptable at 0x000140202402. Too many branches
                    // WARNING: Treating indirect jump as call
  p_Var1 = RtlLookupFunctionEntry(ControlPc,ImageBase,HistoryTable);
  return p_Var1;
}



undefined8 FUN_140202410(LPWSTR param_1,int param_2,LPCSTR param_3,int param_4)

{
  MultiByteToWideChar(0,1,param_3,param_4,param_1,param_2);
  return 0;
}



undefined8 FUN_140202440(LPSTR param_1,int param_2,LPCWSTR param_3,int param_4)

{
  WideCharToMultiByte(0,0,param_3,param_4,param_1,param_2,(LPCSTR)0x0,(LPBOOL)0x0);
  return 0;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140202470(int *param_1,LPWSTR param_2)

{
  char cVar1;
  longlong lVar2;
  longlong lVar3;
  char *pcVar4;
  char *pcVar5;
  undefined1 auStackY_168 [32];
  char local_138 [16];
  char local_128 [256];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStackY_168;
  memset(local_128,0,0xff);
  local_138[0] = '\0';
  local_138[1] = '\0';
  local_138[2] = '\0';
  local_138[3] = '\0';
  local_138[4] = '\0';
  local_138[5] = '\0';
  local_138[6] = '\0';
  local_138[7] = '\0';
  local_138[8] = '\0';
  local_138[9] = 0;
  _itoa_s(*param_1,local_138,10,10);
  strcpy_s(local_128,0xff,local_138);
  lVar3 = 1;
  do {
    _itoa_s(param_1[lVar3],local_138,10,10);
    lVar2 = -1;
    pcVar4 = local_128;
    do {
      pcVar5 = pcVar4;
      if (lVar2 == 0) break;
      lVar2 = lVar2 + -1;
      pcVar5 = pcVar4 + 1;
      cVar1 = *pcVar4;
      pcVar4 = pcVar5;
    } while (cVar1 != '\0');
    lVar2 = -1;
    pcVar5[-1] = ',';
    pcVar5[0] = '\0';
    pcVar4 = local_128;
    do {
      pcVar5 = pcVar4;
      if (lVar2 == 0) break;
      lVar2 = lVar2 + -1;
      pcVar5 = pcVar4 + 1;
      cVar1 = *pcVar4;
      pcVar4 = pcVar5;
    } while (cVar1 != '\0');
    lVar2 = 0;
    do {
      cVar1 = local_138[lVar2];
      pcVar5[lVar2 + -1] = cVar1;
      lVar2 = lVar2 + 1;
    } while (cVar1 != '\0');
    lVar3 = lVar3 + 1;
    if (9 < lVar3) {
      MultiByteToWideChar(0,1,local_128,0x32,param_2,0x32);
      return;
    }
  } while( true );
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined1 * FUN_1402025b0(undefined1 *param_1,LPCWSTR param_2)

{
  char cVar1;
  WCHAR WVar2;
  longlong lVar3;
  ulonglong uVar4;
  LPCWSTR pWVar5;
  char *pcVar6;
  undefined1 auStackY_478 [32];
  CHAR local_428 [1024];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStackY_478;
  local_428[0] = '\0';
  memset(local_428 + 1,0,0x3ff);
  if (7 < *(ulonglong *)(param_2 + 0xc)) {
    param_2 = *(LPCWSTR *)param_2;
  }
  lVar3 = -1;
  pWVar5 = param_2;
  do {
    if (lVar3 == 0) break;
    lVar3 = lVar3 + -1;
    WVar2 = *pWVar5;
    pWVar5 = pWVar5 + 1;
  } while (WVar2 != L'\0');
  WideCharToMultiByte(0,0,param_2,~(uint)lVar3,local_428,0x400,(LPCSTR)0x0,(LPBOOL)0x0);
  uVar4 = 0xffffffffffffffff;
  *(undefined8 *)(param_1 + 0x18) = 0xf;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *param_1 = 0;
  pcVar6 = local_428;
  do {
    if (uVar4 == 0) break;
    uVar4 = uVar4 - 1;
    cVar1 = *pcVar6;
    pcVar6 = pcVar6 + 1;
  } while (cVar1 != '\0');
  FUN_14004d4d0(param_1,local_428,~uVar4 - 1);
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

undefined2 * FUN_1402026a0(undefined2 *param_1,LPCSTR param_2)

{
  char cVar1;
  WCHAR WVar2;
  longlong lVar3;
  ulonglong uVar4;
  LPCSTR pCVar5;
  WCHAR *pWVar6;
  undefined1 auStackY_868 [32];
  WCHAR local_828;
  undefined1 local_826 [2046];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStackY_868;
  local_828 = L'\0';
  memset(local_826,0,0x7fe);
  if (0xf < *(ulonglong *)(param_2 + 0x18)) {
    param_2 = *(LPCSTR *)param_2;
  }
  lVar3 = -1;
  pCVar5 = param_2;
  do {
    if (lVar3 == 0) break;
    lVar3 = lVar3 + -1;
    cVar1 = *pCVar5;
    pCVar5 = pCVar5 + 1;
  } while (cVar1 != '\0');
  MultiByteToWideChar(0,1,param_2,~(uint)lVar3,&local_828,0x400);
  uVar4 = 0xffffffffffffffff;
  *(undefined8 *)(param_1 + 0xc) = 7;
  *(undefined8 *)(param_1 + 8) = 0;
  *param_1 = 0;
  pWVar6 = &local_828;
  do {
    if (uVar4 == 0) break;
    uVar4 = uVar4 - 1;
    WVar2 = *pWVar6;
    pWVar6 = pWVar6 + 1;
  } while (WVar2 != L'\0');
  FUN_140056dd0(param_1,&local_828,~uVar4 - 1);
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140202780(undefined8 param_1,short *param_2)

{
  ulonglong uVar1;
  short sVar2;
  code *pcVar3;
  short *psVar4;
  undefined2 *puVar5;
  undefined2 *puVar6;
  longlong lVar7;
  int iVar8;
  ulonglong uVar9;
  uint uVar10;
  undefined1 auStack_88 [32];
  undefined8 local_68;
  undefined2 local_60;
  undefined6 uStack_5e;
  ulonglong local_50;
  ulonglong local_48;
  ulonglong local_38;
  ulonglong uVar11;
  
  local_68 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_88;
  lVar7 = -1;
  psVar4 = param_2;
  do {
    if (lVar7 == 0) break;
    lVar7 = lVar7 + -1;
    sVar2 = *psVar4;
    psVar4 = psVar4 + 1;
  } while (sVar2 != 0);
  local_48 = 7;
  uVar9 = 0;
  local_50 = 0;
  local_60 = 0;
  uVar11 = uVar9;
  if (0 < (int)~(uint)lVar7) {
    do {
      iVar8 = 0;
      psVar4 = &DAT_140289584;
      do {
        if (*param_2 == *psVar4) {
          if (uVar9 == 0) break;
          FUN_140147520(param_1,&local_60);
          puVar5 = (undefined2 *)CONCAT62(uStack_5e,local_60);
          puVar6 = &local_60;
          if (7 < local_48) {
            puVar6 = puVar5;
          }
          if (puVar6 <= &DAT_140288b80) {
            puVar6 = &local_60;
            if (7 < local_48) {
              puVar6 = puVar5;
            }
            if ((undefined2 *)((longlong)&DAT_140288b80 + 1) <= puVar6 + local_50) {
              puVar6 = &local_60;
              if (7 < local_48) {
                puVar6 = puVar5;
              }
              uVar9 = (longlong)&DAT_140288b80 - (longlong)puVar6 >> 1;
              if (local_50 < uVar9) {
                std::_Xout_of_range("invalid string position");
                pcVar3 = (code *)swi(3);
                (*pcVar3)();
                return;
              }
              FUN_140056a70(&local_60,uVar9,0xffffffffffffffff);
              FUN_140056a70(&local_60,0,uVar9);
              uVar9 = local_50;
              break;
            }
          }
          local_50 = 0;
          puVar6 = &local_60;
          if (7 < local_48) {
            puVar6 = puVar5;
          }
          *puVar6 = 0;
          uVar9 = local_50;
          break;
        }
        iVar8 = iVar8 + 1;
        psVar4 = psVar4 + 1;
      } while ((longlong)psVar4 < 0x140289586);
      if (((iVar8 == 1) && (sVar2 = *param_2, sVar2 != 0)) && ((uVar9 != 0 || (sVar2 != 0x20)))) {
        if (-uVar9 - 1 < 2) {
          std::_Xlength_error("string too long");
          pcVar3 = (code *)swi(3);
          (*pcVar3)();
          return;
        }
        uVar1 = uVar9 + 1;
        if (0x7ffffffffffffffe < uVar1) {
          std::_Xlength_error("string too long");
          pcVar3 = (code *)swi(3);
          (*pcVar3)();
          return;
        }
        if (local_48 < uVar1) {
          FUN_140056c60(&local_60,uVar1,uVar9);
          uVar9 = local_50;
        }
        else if (uVar1 == 0) {
          local_50 = 0;
          puVar5 = &local_60;
          if (7 < local_48) {
            puVar5 = (undefined2 *)CONCAT62(uStack_5e,local_60);
          }
          *puVar5 = 0;
          uVar9 = local_50;
        }
        if (uVar1 != 0) {
          puVar5 = &local_60;
          if (7 < local_48) {
            puVar5 = (undefined2 *)CONCAT62(uStack_5e,local_60);
          }
          puVar5[uVar9] = sVar2;
          puVar5 = &local_60;
          if (7 < local_48) {
            puVar5 = (undefined2 *)CONCAT62(uStack_5e,local_60);
          }
          local_50 = uVar1;
          puVar5[uVar1] = 0;
          uVar9 = local_50;
        }
      }
      uVar10 = (int)uVar11 + 1;
      uVar11 = (ulonglong)uVar10;
      param_2 = param_2 + 1;
    } while ((int)uVar10 < (int)~(uint)lVar7);
    if (uVar9 != 0) {
      FUN_140147520(param_1,&local_60);
      puVar5 = (undefined2 *)CONCAT62(uStack_5e,local_60);
      puVar6 = &local_60;
      if (7 < local_48) {
        puVar6 = puVar5;
      }
      if (puVar6 < (undefined2 *)((longlong)&DAT_140288b80 + 1)) {
        puVar6 = &local_60;
        if (7 < local_48) {
          puVar6 = puVar5;
        }
        if (&DAT_140288b80 < puVar6 + local_50) {
          puVar6 = &local_60;
          if (7 < local_48) {
            puVar6 = puVar5;
          }
          uVar9 = (longlong)&DAT_140288b80 - (longlong)puVar6 >> 1;
          if (local_50 < uVar9) {
            std::_Xout_of_range("invalid string position");
            pcVar3 = (code *)swi(3);
            (*pcVar3)();
            return;
          }
          FUN_140056a70(&local_60,uVar9,0xffffffffffffffff);
          FUN_140056a70(&local_60,0,uVar9);
          goto LAB_140202a91;
        }
      }
      local_50 = 0;
      puVar6 = &local_60;
      if (7 < local_48) {
        puVar6 = puVar5;
      }
      *puVar6 = 0;
    }
  }
LAB_140202a91:
  if (7 < local_48) {
    operator_delete((void *)CONCAT62(uStack_5e,local_60));
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie
// WARNING: Globals starting with '_' overlap smaller symbols at the same address

undefined1 * FUN_140202ae0(undefined1 *param_1)

{
  char cVar1;
  ulonglong uVar2;
  char *pcVar3;
  undefined1 auStack_c8 [32];
  uint local_a8;
  uint local_a0;
  uint local_98;
  uint local_90;
  uint local_88;
  uint local_80;
  uint local_78;
  uint local_70;
  uint local_68;
  uint local_60;
  undefined4 local_58;
  char local_50 [56];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStack_c8;
  local_70 = (uint)DAT_14032f19d;
  local_80 = (uint)DAT_14032f19b;
  local_88 = (uint)DAT_14032f19a;
  local_78 = (uint)DAT_14032f19c;
  local_90 = (uint)DAT_14032f199;
  local_a0 = (uint)_DAT_14032f196;
  local_a8 = (uint)DAT_14032f194;
  local_50[0] = '\0';
  local_50[1] = '\0';
  local_50[2] = '\0';
  local_50[3] = '\0';
  local_50[4] = '\0';
  local_50[5] = '\0';
  local_50[6] = '\0';
  local_50[7] = '\0';
  local_50[8] = '\0';
  local_50[9] = '\0';
  local_50[10] = '\0';
  local_50[0xb] = '\0';
  local_50[0xc] = '\0';
  local_50[0xd] = '\0';
  local_50[0xe] = '\0';
  local_50[0xf] = '\0';
  local_50[0x10] = '\0';
  local_50[0x11] = '\0';
  local_50[0x12] = '\0';
  local_50[0x13] = '\0';
  local_50[0x14] = '\0';
  local_50[0x15] = '\0';
  local_50[0x16] = '\0';
  local_50[0x17] = '\0';
  local_50[0x18] = '\0';
  local_50[0x19] = '\0';
  local_50[0x1a] = '\0';
  local_50[0x1b] = '\0';
  local_50[0x1c] = '\0';
  local_50[0x1d] = '\0';
  local_50[0x1e] = '\0';
  local_50[0x1f] = '\0';
  local_50[0x20] = '\0';
  local_50[0x21] = '\0';
  local_50[0x22] = '\0';
  local_50[0x23] = '\0';
  local_50[0x24] = '\0';
  local_50[0x25] = '\0';
  local_50[0x26] = '\0';
  local_50[0x27] = '\0';
  local_50[0x28] = '\0';
  local_50[0x29] = '\0';
  local_50[0x2a] = '\0';
  local_50[0x2b] = '\0';
  local_50[0x2c] = '\0';
  local_50[0x2d] = '\0';
  local_50[0x2e] = '\0';
  local_50[0x2f] = '\0';
  local_50[0x30] = '\0';
  local_50[0x31] = 0;
  local_60 = (uint)DAT_14032f19f;
  local_98 = (uint)DAT_14032f198;
  local_68 = (uint)DAT_14032f19e;
  local_58 = 0;
  sprintf_s(local_50,0x32,"%.8X-%.4X-%.4X-%.2X%.2X-%.2X%.2X%.2X%.2X%.2X%.2X");
  uVar2 = 0xffffffffffffffff;
  *(undefined8 *)(param_1 + 0x18) = 0xf;
  *(undefined8 *)(param_1 + 0x10) = 0;
  *param_1 = 0;
  pcVar3 = local_50;
  do {
    if (uVar2 == 0) break;
    uVar2 = uVar2 - 1;
    cVar1 = *pcVar3;
    pcVar3 = pcVar3 + 1;
  } while (cVar1 != '\0');
  FUN_14004d4d0(param_1,local_50,~uVar2 - 1);
  return param_1;
}



void FUN_140202c40(int *param_1)

{
  wchar_t *pwVar1;
  wchar_t *pwVar2;
  int iVar3;
  wchar_t *_Str;
  longlong lVar4;
  wchar_t *pwVar5;
  uint uVar6;
  wchar_t *local_40;
  wchar_t *local_38;
  undefined8 local_30;
  ulonglong uVar7;
  
  uVar7 = 0;
  local_40 = (wchar_t *)0x0;
  local_38 = (wchar_t *)0x0;
  local_30 = 0;
  FUN_140202780(&local_40);
  pwVar2 = local_38;
  pwVar1 = local_40;
  lVar4 = (longlong)local_38 - (longlong)local_40;
  pwVar5 = local_40;
  do {
    if (lVar4 / 0x28 == uVar7) break;
    _Str = pwVar5;
    if (7 < *(ulonglong *)(pwVar5 + 0xc)) {
      _Str = *(wchar_t **)pwVar5;
    }
    iVar3 = _wtoi(_Str);
    *param_1 = iVar3;
    uVar6 = (int)uVar7 + 1;
    uVar7 = (ulonglong)uVar6;
    pwVar5 = pwVar5 + 0x14;
    param_1 = param_1 + 1;
  } while (uVar6 < 10);
  pwVar5 = pwVar1;
  if (pwVar1 != (wchar_t *)0x0) {
    for (; pwVar5 != pwVar2; pwVar5 = pwVar5 + 0x14) {
      if (7 < *(ulonglong *)(pwVar5 + 0xc)) {
        operator_delete(*(void **)pwVar5);
      }
      pwVar5[0xc] = L'\a';
      pwVar5[0xd] = L'\0';
      pwVar5[0xe] = L'\0';
      pwVar5[0xf] = L'\0';
      pwVar5[8] = L'\0';
      pwVar5[9] = L'\0';
      pwVar5[10] = L'\0';
      pwVar5[0xb] = L'\0';
      *pwVar5 = L'\0';
    }
    operator_delete(pwVar1);
  }
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140202d50(char *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined1 auStackY_448 [32];
  char local_418 [1024];
  ulonglong local_18;
  
  local_18 = DAT_1403223c0 ^ (ulonglong)auStackY_448;
  local_res10 = param_2;
  local_res18 = param_3;
  local_res20 = param_4;
  _vsnprintf_s(local_418,0x400,0xffffffffffffffff,param_1,(va_list)&local_res10);
  return;
}



// WARNING: Function: __chkstk replaced with injection: alloca_probe
// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140202de0(longlong param_1,wchar_t *param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined1 auStack_1048 [32];
  wchar_t local_1028;
  undefined1 local_1026 [4094];
  ulonglong local_28;
  undefined8 uStack_18;
  
  uStack_18 = 0x140202dfb;
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_1048;
  local_res18 = param_3;
  local_res20 = param_4;
  EnterCriticalSection(DAT_14032f298);
  local_1028 = L'\0';
  memset(local_1026,0,0xffe);
  iVar1 = _vscwprintf(param_2,(va_list)&local_res18);
  vswprintf_s(&local_1028,(longlong)(iVar1 + 1),param_2,(va_list)&local_res18);
  if ((*(FILE **)(param_1 + 0xb8) != (FILE *)0x0) && (*(int *)(param_1 + 0x10) != 0)) {
    fwprintf(*(FILE **)(param_1 + 0xb8),L"%s");
  }
  LeaveCriticalSection(DAT_14032f298);
  return;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140202ec0(longlong param_1,char *param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined1 auStack_248 [32];
  char local_228 [512];
  ulonglong local_28;
  
  local_28 = DAT_1403223c0 ^ (ulonglong)auStack_248;
  local_res18 = param_3;
  local_res20 = param_4;
  EnterCriticalSection(DAT_14032f298);
  iVar1 = _vscprintf(param_2,(va_list)&local_res18);
  vsprintf_s(local_228,(longlong)(iVar1 + 1),param_2,(va_list)&local_res18);
  if ((*(byte *)(param_1 + 0x10) & 2) != 0) {
    printf("%s");
  }
  if ((*(byte *)(param_1 + 0x10) & 4) != 0) {
    OutputDebugStringA(local_228);
  }
  if ((*(FILE **)(param_1 + 0xb8) != (FILE *)0x0) && ((*(byte *)(param_1 + 0x10) & 8) != 0)) {
    fprintf(*(FILE **)(param_1 + 0xb8),"%s");
  }
  LeaveCriticalSection(DAT_14032f298);
  return;
}



void FUN_140202fb0(longlong param_1)

{
  undefined8 *puVar1;
  longlong lVar2;
  
  EnterCriticalSection(DAT_14032f298);
  if (*(FILE **)(param_1 + 0xb8) != (FILE *)0x0) {
    fclose(*(FILE **)(param_1 + 0xb8));
  }
  puVar1 = (undefined8 *)(param_1 + 200);
  lVar2 = 4;
  do {
    if ((FILE *)*puVar1 != (FILE *)0x0) {
      fclose((FILE *)*puVar1);
    }
    puVar1 = puVar1 + 1;
    lVar2 = lVar2 + -1;
  } while (lVar2 != 0);
                    // WARNING: Could not recover jumptable at 0x000140203010. Too many branches
                    // WARNING: Treating indirect jump as call
  LeaveCriticalSection(DAT_14032f298);
  return;
}



void FUN_140203020(undefined8 *param_1)

{
  DWORD DVar1;
  
  DVar1 = timeGetTime();
  if ((0x32 < DVar1 - *(int *)(param_1 + 1)) && (DAT_14032f258 != 0)) {
    FUN_140202ec0(DAT_14032f258,"% 9d [ ms ] %s\n",DVar1 - *(int *)(param_1 + 1),*param_1);
  }
  return;
}



undefined8 * FUN_140203070(undefined8 *param_1)

{
  DWORD DVar1;
  
  *param_1 = "AgentSession->Process";
  DVar1 = timeGetTime();
  *(DWORD *)(param_1 + 1) = DVar1;
  return param_1;
}



void FUN_1402030a0(undefined8 *param_1)

{
  LPCRITICAL_SECTION lpCriticalSection;
  
  *param_1 = MBCLog::vftable;
  param_1[1] = MBCLog::vftable;
  FUN_140202fb0();
  if (7 < (ulonglong)param_1[0x15]) {
    operator_delete((void *)param_1[0x12]);
  }
  param_1[0x15] = 7;
  param_1[0x14] = 0;
  *(undefined2 *)(param_1 + 0x12) = 0;
  if (7 < (ulonglong)param_1[0x10]) {
    operator_delete((void *)param_1[0xd]);
  }
  param_1[0x10] = 7;
  param_1[0xf] = 0;
  *(undefined2 *)(param_1 + 0xd) = 0;
  if (7 < (ulonglong)param_1[0xb]) {
    operator_delete((void *)param_1[8]);
  }
  param_1[0xb] = 7;
  param_1[10] = 0;
  *(undefined2 *)(param_1 + 8) = 0;
  if (7 < (ulonglong)param_1[6]) {
    operator_delete((void *)param_1[3]);
  }
  lpCriticalSection = DAT_14032f298;
  param_1[6] = 7;
  param_1[5] = 0;
  *(undefined2 *)(param_1 + 3) = 0;
  param_1[1] = MBMultiThreadSync<>::vftable;
  if (lpCriticalSection != (LPCRITICAL_SECTION)0x0) {
    DeleteCriticalSection(lpCriticalSection);
    operator_delete(lpCriticalSection);
  }
  DAT_14032f298 = (LPCRITICAL_SECTION)0x0;
  DAT_14032f258 = 0;
  *param_1 = MBISingleton<>::vftable;
  return;
}



undefined8 * FUN_1402031c0(undefined8 *param_1)

{
  LPCRITICAL_SECTION p_Var1;
  LPCRITICAL_SECTION lpCriticalSection;
  
  *param_1 = MBISingleton<>::vftable;
  param_1[1] = MBMultiThreadSync<>::vftable;
  p_Var1 = DAT_14032f298;
  if ((DAT_14032f298 == (LPCRITICAL_SECTION)0x0) &&
     (lpCriticalSection = operator_new(0x28), p_Var1 = (LPCRITICAL_SECTION)0x0,
     lpCriticalSection != (LPCRITICAL_SECTION)0x0)) {
    InitializeCriticalSection(lpCriticalSection);
    p_Var1 = lpCriticalSection;
  }
  DAT_14032f298 = p_Var1;
  *param_1 = MBCLog::vftable;
  param_1[1] = MBCLog::vftable;
  param_1[6] = 7;
  param_1[5] = 0;
  *(undefined2 *)(param_1 + 3) = 0;
  param_1[0xb] = 7;
  param_1[10] = 0;
  *(undefined2 *)(param_1 + 8) = 0;
  param_1[0x10] = 7;
  param_1[0xf] = 0;
  *(undefined2 *)(param_1 + 0xd) = 0;
  param_1[0x15] = 7;
  param_1[0x14] = 0;
  *(undefined2 *)(param_1 + 0x12) = 0;
  param_1[0x17] = 0;
  *(undefined4 *)(param_1 + 2) = 0xe;
  param_1[0x19] = 0;
  param_1[0x1a] = 0;
  param_1[0x1b] = 0;
  param_1[0x1c] = 0;
  return param_1;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_1402032d0(longlong param_1,wchar_t *param_2,undefined8 param_3,undefined8 param_4)

{
  int iVar1;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined1 auStack_458 [32];
  undefined8 local_438;
  wchar_t local_428 [516];
  ulonglong local_20;
  
  local_438 = 0xfffffffffffffffe;
  local_20 = DAT_1403223c0 ^ (ulonglong)auStack_458;
  local_res18 = param_3;
  local_res20 = param_4;
  EnterCriticalSection(DAT_14032f298);
  if ((DAT_140379238 & 1) == 0) {
    DAT_140379238 = DAT_140379238 | 1;
    FUN_1402041b0();
    atexit((_func_5014 *)&LAB_140257cb0);
  }
  if ((DAT_140379230 == 200) && ((DAT_140379238 & 1) == 0)) {
    DAT_140379238 = DAT_140379238 | 1;
    FUN_1402041b0();
    atexit((_func_5014 *)&LAB_140257cb0);
    if (DAT_140379230 == 1000) goto LAB_140203414;
  }
  iVar1 = _vscwprintf(param_2,(va_list)&local_res18);
  vswprintf_s(local_428,(longlong)(iVar1 + 1),param_2,(va_list)&local_res18);
  wcscat_s(local_428,0x200,L"\n");
  if ((*(byte *)(param_1 + 0x10) & 4) != 0) {
    OutputDebugStringW(local_428);
  }
  if ((*(byte *)(param_1 + 0x10) & 2) != 0) {
    wprintf(L"%s");
  }
  if ((*(FILE **)(param_1 + 0xb8) != (FILE *)0x0) && ((*(byte *)(param_1 + 0x10) & 8) != 0)) {
    fwprintf(*(FILE **)(param_1 + 0xb8),L"%s");
  }
LAB_140203414:
  LeaveCriticalSection(DAT_14032f298);
  return;
}



void FUN_140203450(longlong param_1)

{
  errno_t eVar1;
  
  EnterCriticalSection(DAT_14032f298);
  if ((DAT_140379238 & 1) == 0) {
    DAT_140379238 = DAT_140379238 | 1;
    FUN_1402041b0();
    atexit((_func_5014 *)&LAB_140257cb0);
  }
  if (DAT_140379230 != 200) {
    if ((DAT_140379238 & 1) == 0) {
      DAT_140379238 = DAT_140379238 | 1;
      FUN_1402041b0();
      atexit((_func_5014 *)&LAB_140257cb0);
    }
    if (DAT_140379230 != 1000) goto LAB_1402034ea;
  }
  _wsetlocale(0,L"korean");
LAB_1402034ea:
  setlocale(0,(char *)0x0);
  printf("Locale is: %s\n");
  eVar1 = fopen_s((FILE **)(param_1 + 0xb8),"DBC Serve2.log","w");
  if (eVar1 != 0) {
    *(undefined8 *)(param_1 + 0xb8) = 0;
    FUN_1402032d0(param_1,L"MBLOG open error");
  }
  if (DAT_14032f258 != 0) {
    FUN_140202ec0(DAT_14032f258,"MBLOG %s writting\n","DBC Serve2.log");
  }
                    // WARNING: Could not recover jumptable at 0x00014020356e. Too many branches
                    // WARNING: Treating indirect jump as call
  LeaveCriticalSection(DAT_14032f298);
  return;
}



void FUN_1402037f0(void)

{
  printf("-----------------------------------------\n");
  printf("Active Service                      : %s\n");
  printf("Active Service AuthDll32            : %s\n");
  printf("Active Service AuthDll64            : %s\n");
  printf("Active Service BillingDll           : %s\n");
  printf("Active Service ServerMode           : %s\n");
  printf("Active Service BillingServerMode    : %s\n");
  printf("Active Service AntiHack             : %s\n");
  printf("Active Service AntiHack Log         : %s\n");
  printf("Active Service nProtect Use         : %s\n");
  printf("Active Service nProtect_Log Use     : %s\n");
  printf("Active Service XTrap Use            : %s\n");
  printf("Active Service BetaZone             : %s\n");
  printf("Active Service ChannelLimitCount    : %d\n");
  printf("Active Service WorldUserLimitCount  : %d\n");
  printf("Active Service AuthURL              : %s\n");
  printf("Active Service BillingURL           : %s\n");
  printf("Active Service BillingIDC           : %s\n");
  printf("Active Service IP                   : %s\n");
  printf("Active Service Port                 : %d\n");
  printf("Active Service Skip Auth            : %s\n");
  printf("Active Service Free Cash            : %s\n");
  printf("Active Service Skip Abuse Nick      : %s\n");
  printf("Active Service Product Name         : %s\n");
  printf("Active Billing Service Product Name : %s\n");
  printf("Active Use Second Pass              : %s\n");
  printf("Active Aes Auth Key                 : %s\n");
  printf("Active Hide Channel                 : %s\n");
  printf("Active Skip Billing                 : %s\n");
  printf("Active Enc XML                      : %s\n");
                    // WARNING: Could not recover jumptable at 0x000140203b71. Too many branches
                    // WARNING: Treating indirect jump as call
  printf("-----------------------------------------\n");
  return;
}



void FUN_140203b80(longlong param_1)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  char *pcVar4;
  char *pcVar5;
  bool bVar6;
  
  lVar2 = *(longlong *)(param_1 + 0xa0);
  if (lVar2 == param_1 + 0x58) {
    return;
  }
  do {
    lVar3 = 8;
    pcVar4 = (char *)(*(longlong *)(lVar2 + 0x20) + 0x10);
    bVar6 = pcVar4 == (char *)0x0;
    pcVar5 = "content";
    do {
      if (lVar3 == 0) break;
      lVar3 = lVar3 + -1;
      bVar6 = *pcVar4 == *pcVar5;
      pcVar4 = pcVar4 + 1;
      pcVar5 = pcVar5 + 1;
    } while (bVar6);
    if (bVar6) {
      pcVar4 = (char *)(*(longlong *)(lVar2 + 0x30) + 0x10);
      if (pcVar4 == (char *)0x0) {
        return;
      }
      iVar1 = _stricmp(pcVar4,"dev");
      if (iVar1 == 0) {
        DAT_140378dc8 = 1000;
        return;
      }
      iVar1 = _stricmp(pcVar4,"kor_beta");
      if (iVar1 == 0) {
        DAT_140378dc8 = 200;
        return;
      }
      iVar1 = _stricmp(pcVar4,"kor");
      if (iVar1 == 0) {
        DAT_140378dc8 = 100;
        return;
      }
      iVar1 = _stricmp(pcVar4,"usa_beta");
      if (iVar1 == 0) {
        DAT_140378dc8 = 0xc9;
        return;
      }
      iVar1 = _stricmp(pcVar4,"usa");
      if (iVar1 == 0) {
        DAT_140378dc8 = 0x65;
        return;
      }
      iVar1 = _stricmp(pcVar4,"tw_beta");
      if (iVar1 == 0) {
        DAT_140378dc8 = 0xca;
        return;
      }
      iVar1 = _stricmp(pcVar4,"tw");
      if (iVar1 != 0) {
        iVar1 = _stricmp(pcVar4,"jpn_beta");
        if (iVar1 == 0) {
          DAT_140378dc8 = 0xcb;
          return;
        }
        iVar1 = _stricmp(pcVar4,"jpn");
        if (iVar1 == 0) {
          DAT_140378dc8 = 0x67;
          return;
        }
        iVar1 = _stricmp(pcVar4,"chn_beta");
        if (iVar1 == 0) {
          DAT_140378dc8 = 0xcc;
          return;
        }
        iVar1 = _stricmp(pcVar4,"chn");
        if (iVar1 != 0) {
          return;
        }
        DAT_140378dc8 = 0x68;
        return;
      }
      DAT_140378dc8 = 0x66;
      return;
    }
    lVar2 = *(longlong *)(lVar2 + 0x48);
    if (lVar2 == param_1 + 0x58) {
      return;
    }
  } while( true );
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140203de0(void)

{
  if (0xf < DAT_140379220) {
    operator_delete((void *)CONCAT71(DAT_140379208._1_7_,(undefined1)DAT_140379208));
  }
  DAT_140379220 = 0xf;
  _DAT_140379218 = 0;
  DAT_140379208._0_1_ = 0;
  if (0xf < DAT_1403791f8) {
    operator_delete((void *)CONCAT71(DAT_1403791e0._1_7_,(undefined1)DAT_1403791e0));
  }
  DAT_1403791f8 = 0xf;
  _DAT_1403791f0 = 0;
  DAT_1403791e0._0_1_ = 0;
  if (0xf < DAT_1403791d0) {
    operator_delete((void *)CONCAT71(DAT_1403791b8._1_7_,(undefined1)DAT_1403791b8));
  }
  DAT_1403791d0 = 0xf;
  _DAT_1403791c8 = 0;
  DAT_1403791b8._0_1_ = 0;
  if (0xf < DAT_1403791a8) {
    operator_delete((void *)CONCAT71(DAT_140379190._1_7_,(undefined1)DAT_140379190));
  }
  DAT_1403791a8 = 0xf;
  _DAT_1403791a0 = 0;
  DAT_140379190._0_1_ = 0;
  if (0xf < DAT_140379180) {
    operator_delete((void *)CONCAT71(DAT_140379168._1_7_,(undefined1)DAT_140379168));
  }
  DAT_140379180 = 0xf;
  _DAT_140379178 = 0;
  DAT_140379168._0_1_ = 0;
  if (0xf < DAT_140379158) {
    operator_delete((void *)CONCAT71(DAT_140379140._1_7_,(undefined1)DAT_140379140));
  }
  DAT_140379158 = 0xf;
  _DAT_140379150 = 0;
  DAT_140379140._0_1_ = 0;
  if (0xf < DAT_140379130) {
    operator_delete((void *)CONCAT71(DAT_140379118._1_7_,(undefined1)DAT_140379118));
  }
  DAT_140379130 = 0xf;
  _DAT_140379128 = 0;
  DAT_140379118._0_1_ = 0;
  if (0xf < DAT_140379108) {
    operator_delete((void *)CONCAT71(DAT_1403790f0._1_7_,(undefined1)DAT_1403790f0));
  }
  DAT_140379108 = 0xf;
  _DAT_140379100 = 0;
  DAT_1403790f0._0_1_ = 0;
  if (0xf < DAT_1403790e0) {
    operator_delete((void *)CONCAT71(DAT_1403790c8._1_7_,(undefined1)DAT_1403790c8));
  }
  DAT_1403790e0 = 0xf;
  _DAT_1403790d8 = 0;
  DAT_1403790c8._0_1_ = 0;
  if (0xf < DAT_1403790b8) {
    operator_delete((void *)CONCAT71(DAT_1403790a0._1_7_,(undefined1)DAT_1403790a0));
  }
  DAT_1403790b8 = 0xf;
  _DAT_1403790b0 = 0;
  DAT_1403790a0._0_1_ = 0;
  if (0xf < DAT_140379090) {
    operator_delete((void *)CONCAT71(DAT_140379078._1_7_,(undefined1)DAT_140379078));
  }
  DAT_140379090 = 0xf;
  _DAT_140379088 = 0;
  DAT_140379078._0_1_ = 0;
  if (0xf < DAT_140379068) {
    operator_delete((void *)CONCAT71(DAT_140379050._1_7_,(undefined1)DAT_140379050));
  }
  DAT_140379068 = 0xf;
  _DAT_140379060 = 0;
  DAT_140379050._0_1_ = 0;
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140204030(void)

{
  void *pvVar1;
  void *pvVar2;
  
  if (0xf < DAT_140379038) {
    operator_delete((void *)CONCAT71(DAT_140379020._1_7_,(undefined1)DAT_140379020));
  }
  pvVar2 = DAT_140379008;
  DAT_140379038 = 0xf;
  _DAT_140379030 = 0;
  DAT_140379020._0_1_ = 0;
  pvVar1 = DAT_140379000;
  if (DAT_140379000 != (void *)0x0) {
    for (; pvVar1 != pvVar2; pvVar1 = (void *)((longlong)pvVar1 + 0x230)) {
      FUN_140146830(pvVar1);
    }
    operator_delete(DAT_140379000);
  }
  DAT_140379000 = (void *)0x0;
  DAT_140379008 = (void *)0x0;
  _DAT_140379010 = 0;
  FUN_140146830(&DAT_140378dd0);
  if (0xf < DAT_140378db8) {
    operator_delete((void *)CONCAT71(DAT_140378da0._1_7_,(undefined1)DAT_140378da0));
  }
  DAT_140378db8 = 0xf;
  _DAT_140378db0 = 0;
  DAT_140378da0._0_1_ = 0;
  return;
}



void FUN_140204120(longlong param_1)

{
  char cVar1;
  longlong lVar2;
  longlong lVar3;
  ulonglong uVar4;
  char *pcVar5;
  char *pcVar6;
  bool bVar7;
  
  lVar2 = *(longlong *)(param_1 + 0xa0);
  if (lVar2 == param_1 + 0x58) {
    return;
  }
  do {
    lVar3 = 8;
    pcVar5 = (char *)(*(longlong *)(lVar2 + 0x20) + 0x10);
    bVar7 = pcVar5 == (char *)0x0;
    pcVar6 = "country";
    do {
      if (lVar3 == 0) break;
      lVar3 = lVar3 + -1;
      bVar7 = *pcVar5 == *pcVar6;
      pcVar5 = pcVar5 + 1;
      pcVar6 = pcVar6 + 1;
    } while (bVar7);
    if (bVar7) {
      pcVar5 = (char *)(*(longlong *)(lVar2 + 0x30) + 0x10);
      if (pcVar5 == (char *)0x0) {
        return;
      }
      uVar4 = 0xffffffffffffffff;
      pcVar6 = pcVar5;
      break;
    }
    lVar2 = *(longlong *)(lVar2 + 0x48);
    if (lVar2 == param_1 + 0x58) {
      return;
    }
  } while( true );
  while( true ) {
    uVar4 = uVar4 - 1;
    cVar1 = *pcVar6;
    pcVar6 = pcVar6 + 1;
    if (cVar1 == '\0') break;
    if (uVar4 == 0) break;
  }
  FUN_14004d4d0(&DAT_140378da0,pcVar5,~uVar4 - 1);
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

undefined8 * FUN_1402041b0(void)

{
  undefined8 in_R9;
  
  DAT_140379068 = 0xf;
  _DAT_140379060 = 0;
  DAT_140379050._0_1_ = 0;
  DAT_140379090 = 0xf;
  _DAT_140379088 = 0;
  DAT_140379078._0_1_ = 0;
  DAT_1403790b8 = 0xf;
  _DAT_1403790b0 = 0;
  DAT_1403790a0._0_1_ = 0;
  DAT_1403790e0 = 0xf;
  _DAT_1403790d8 = 0;
  DAT_1403790c8._0_1_ = 0;
  DAT_140379108 = 0xf;
  _DAT_140379100 = 0;
  DAT_1403790f0._0_1_ = 0;
  DAT_140379130 = 0xf;
  _DAT_140379128 = 0;
  DAT_140379118._0_1_ = 0;
  DAT_140379158 = 0xf;
  _DAT_140379150 = 0;
  DAT_140379140._0_1_ = 0;
  DAT_140379180 = 0xf;
  _DAT_140379178 = 0;
  DAT_140379168._0_1_ = 0;
  DAT_1403791a8 = 0xf;
  _DAT_1403791a0 = 0;
  DAT_140379190._0_1_ = 0;
  DAT_1403791d0 = 0xf;
  _DAT_1403791c8 = 0;
  DAT_1403791b8._0_1_ = 0;
  DAT_1403791f8 = 0xf;
  _DAT_1403791f0 = 0;
  DAT_1403791e0._0_1_ = 0;
  DAT_140379220 = 0xf;
  _DAT_140379218 = 0;
  DAT_140379208._0_1_ = 0;
  FUN_14004d4d0(&DAT_140379208,&DAT_1402943e0,3,in_R9,0xfffffffffffffffe);
  DAT_140379230 = 1000;
  return &DAT_140379050;
}



// WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie

void FUN_140204320(longlong param_1)

{
  longlong lVar1;
  char cVar2;
  longlong lVar3;
  longlong lVar4;
  int iVar5;
  longlong lVar6;
  longlong lVar7;
  ulonglong uVar8;
  char **ppcVar9;
  char *******_Str2;
  char *pcVar10;
  char *pcVar11;
  char *pcVar12;
  char *pcVar13;
  char *pcVar14;
  char *pcVar15;
  char *pcVar16;
  char *pcVar17;
  bool bVar18;
  undefined1 auStack_348 [32];
  char *local_328;
  char *local_320;
  char *local_318;
  char *local_310;
  char *local_308;
  char *local_300;
  char *local_2f8;
  char *local_2f0;
  char *local_2e8;
  char *local_2e0;
  char *local_2d8;
  char *local_2d0;
  char *local_2c8;
  char *local_2c0;
  char *local_2b8;
  char *local_2b0;
  char *local_2a8;
  char *local_2a0;
  char *local_298;
  char *local_290;
  char *local_288;
  char *local_280;
  char *local_278;
  undefined8 local_270;
  undefined1 local_268 [40];
  undefined1 local_240 [40];
  undefined1 local_218 [40];
  undefined1 local_1f0 [40];
  undefined1 local_1c8 [40];
  undefined1 local_1a0 [40];
  undefined1 local_178 [40];
  undefined1 local_150 [40];
  undefined1 local_128 [40];
  int local_100;
  undefined1 local_f8 [40];
  undefined1 local_d0 [40];
  undefined1 local_a8 [40];
  undefined1 local_80;
  undefined1 local_7f;
  undefined1 local_7e;
  undefined1 local_7d;
  undefined1 local_7c;
  undefined1 local_7b;
  undefined1 local_7a;
  undefined1 local_79;
  undefined1 local_78;
  undefined1 local_77;
  undefined1 local_76;
  undefined1 local_75;
  undefined4 local_74;
  undefined4 local_70;
  undefined1 local_6c;
  char ******local_68 [3];
  ulonglong local_50;
  undefined4 local_40;
  ulonglong local_38;
  
  local_270 = 0xfffffffffffffffe;
  local_38 = DAT_1403223c0 ^ (ulonglong)auStack_348;
  lVar1 = param_1 + 0x58;
  pcVar16 = (char *)0x0;
  lVar3 = *(longlong *)(param_1 + 0xa0);
  for (lVar7 = lVar3; lVar4 = lVar3, lVar7 != lVar1; lVar7 = *(longlong *)(lVar7 + 0x48)) {
    pcVar10 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 8;
    pcVar11 = "country";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_328 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
      goto joined_r0x0001402043bd;
    }
  }
  local_328 = (char *)0x0;
joined_r0x0001402043bd:
  do {
    lVar7 = lVar3;
    if (lVar4 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0xc;
    pcVar11 = "auth_dll_32";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_320 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
      goto joined_r0x0001402043fd;
    }
    lVar4 = *(longlong *)(lVar4 + 0x48);
  } while( true );
  local_320 = (char *)0x0;
joined_r0x0001402043fd:
  do {
    lVar4 = lVar3;
    if (lVar7 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0xc;
    pcVar11 = "auth_dll_64";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_2c0 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
      goto joined_r0x00014020443b;
    }
    lVar7 = *(longlong *)(lVar7 + 0x48);
  } while( true );
  local_2c0 = (char *)0x0;
joined_r0x00014020443b:
  do {
    lVar7 = lVar3;
    if (lVar4 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0xc;
    pcVar11 = "billing_dll";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_290 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
      goto joined_r0x00014020447b;
    }
    lVar4 = *(longlong *)(lVar4 + 0x48);
  } while( true );
  local_290 = (char *)0x0;
joined_r0x00014020447b:
  do {
    lVar4 = lVar3;
    if (lVar7 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0xc;
    pcVar11 = "server_mode";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_300 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
      goto joined_r0x0001402044bd;
    }
    lVar7 = *(longlong *)(lVar7 + 0x48);
  } while( true );
  local_300 = (char *)0x0;
joined_r0x0001402044bd:
  do {
    lVar7 = lVar3;
    if (lVar4 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0x14;
    pcVar11 = "billing_server_mode";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_2b0 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
      goto joined_r0x0001402044fb;
    }
    lVar4 = *(longlong *)(lVar4 + 0x48);
  } while( true );
  local_2b0 = (char *)0x0;
joined_r0x0001402044fb:
  do {
    lVar4 = lVar3;
    if (lVar7 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 10;
    pcVar11 = "xtrap_use";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_2e8 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
      goto joined_r0x00014020453d;
    }
    lVar7 = *(longlong *)(lVar7 + 0x48);
  } while( true );
  local_2e8 = (char *)0x0;
joined_r0x00014020453d:
  do {
    lVar7 = lVar3;
    if (lVar4 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0xd;
    pcVar11 = "antihack_use";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_318 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
      goto joined_r0x00014020457d;
    }
    lVar4 = *(longlong *)(lVar4 + 0x48);
  } while( true );
  local_318 = (char *)0x0;
joined_r0x00014020457d:
  do {
    lVar4 = lVar3;
    if (lVar7 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0xd;
    pcVar11 = "antihack_log";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_310 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
      goto joined_r0x0001402045bd;
    }
    lVar7 = *(longlong *)(lVar7 + 0x48);
  } while( true );
  local_310 = (char *)0x0;
joined_r0x0001402045bd:
  do {
    lVar7 = lVar3;
    if (lVar4 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0xd;
    pcVar11 = "nprotect_use";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_2f8 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
      goto joined_r0x0001402045fd;
    }
    lVar4 = *(longlong *)(lVar4 + 0x48);
  } while( true );
  local_2f8 = (char *)0x0;
joined_r0x0001402045fd:
  do {
    lVar4 = lVar3;
    if (lVar7 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0x11;
    pcVar11 = "nprotect_log_use";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_308 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
      goto joined_r0x00014020463d;
    }
    lVar7 = *(longlong *)(lVar7 + 0x48);
  } while( true );
  local_308 = (char *)0x0;
joined_r0x00014020463d:
  do {
    lVar7 = lVar3;
    if (lVar4 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 9;
    pcVar11 = "betazone";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_2d8 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
      goto joined_r0x00014020467d;
    }
    lVar4 = *(longlong *)(lVar4 + 0x48);
  } while( true );
  local_2d8 = (char *)0x0;
joined_r0x00014020467d:
  do {
    lVar4 = lVar3;
    if (lVar7 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0x14;
    pcVar11 = "channel_limit_count";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_2c8 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
      goto joined_r0x0001402046bb;
    }
    lVar7 = *(longlong *)(lVar7 + 0x48);
  } while( true );
  local_2c8 = (char *)0x0;
joined_r0x0001402046bb:
  do {
    lVar7 = lVar3;
    if (lVar4 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0x17;
    pcVar11 = "world_user_limit_count";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_2b8 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
      goto joined_r0x0001402046fb;
    }
    lVar4 = *(longlong *)(lVar4 + 0x48);
  } while( true );
  local_2b8 = (char *)0x0;
joined_r0x0001402046fb:
  do {
    lVar4 = lVar3;
    if (lVar7 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 9;
    pcVar11 = "auth_url";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_2f0 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
      goto joined_r0x00014020473d;
    }
    lVar7 = *(longlong *)(lVar7 + 0x48);
  } while( true );
  local_2f0 = (char *)0x0;
joined_r0x00014020473d:
  do {
    lVar7 = lVar3;
    if (lVar4 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0xc;
    pcVar11 = "billing_url";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_278 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
      goto joined_r0x00014020477b;
    }
    lVar4 = *(longlong *)(lVar4 + 0x48);
  } while( true );
  local_278 = (char *)0x0;
joined_r0x00014020477b:
  do {
    lVar4 = lVar3;
    if (lVar7 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0xc;
    pcVar11 = "billing_idc";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_2e0 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
      goto joined_r0x0001402047bd;
    }
    lVar7 = *(longlong *)(lVar7 + 0x48);
  } while( true );
  local_2e0 = (char *)0x0;
joined_r0x0001402047bd:
  do {
    lVar7 = lVar3;
    if (lVar4 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 8;
    pcVar11 = "auth_ip";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_2a0 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
      goto joined_r0x0001402047fb;
    }
    lVar4 = *(longlong *)(lVar4 + 0x48);
  } while( true );
  local_2a0 = (char *)0x0;
joined_r0x0001402047fb:
  do {
    lVar4 = lVar3;
    if (lVar7 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 10;
    pcVar11 = "auth_port";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_2d0 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
      goto joined_r0x00014020483d;
    }
    lVar7 = *(longlong *)(lVar7 + 0x48);
  } while( true );
  local_2d0 = (char *)0x0;
joined_r0x00014020483d:
  do {
    lVar7 = lVar3;
    if (lVar4 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 10;
    pcVar11 = "skip_auth";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_2a8 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
      goto joined_r0x00014020487b;
    }
    lVar4 = *(longlong *)(lVar4 + 0x48);
  } while( true );
  local_2a8 = (char *)0x0;
joined_r0x00014020487b:
  do {
    lVar4 = lVar3;
    if (lVar7 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 10;
    pcVar11 = "free_cash";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_298 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
      goto joined_r0x0001402048bb;
    }
    lVar7 = *(longlong *)(lVar7 + 0x48);
  } while( true );
  local_298 = (char *)0x0;
joined_r0x0001402048bb:
  do {
    lVar7 = lVar3;
    if (lVar4 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0x10;
    pcVar11 = "skip_abuse_nick";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_288 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
      goto joined_r0x0001402048fb;
    }
    lVar4 = *(longlong *)(lVar4 + 0x48);
  } while( true );
  local_288 = (char *)0x0;
joined_r0x0001402048fb:
  do {
    lVar4 = lVar3;
    if (lVar7 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0xd;
    pcVar11 = "product_name";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      local_280 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
      goto joined_r0x00014020493b;
    }
    lVar7 = *(longlong *)(lVar7 + 0x48);
  } while( true );
  local_280 = (char *)0x0;
joined_r0x00014020493b:
  do {
    lVar7 = lVar3;
    pcVar10 = pcVar16;
    if (lVar4 == lVar1) break;
    pcVar10 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
    bVar18 = pcVar10 == (char *)0x0;
    lVar6 = 0x15;
    pcVar11 = "billing_product_name";
    do {
      if (lVar6 == 0) break;
      lVar6 = lVar6 + -1;
      bVar18 = *pcVar10 == *pcVar11;
      pcVar10 = pcVar10 + 1;
      pcVar11 = pcVar11 + 1;
    } while (bVar18);
    if (bVar18) {
      pcVar10 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
      break;
    }
    lVar4 = *(longlong *)(lVar4 + 0x48);
  } while( true );
joined_r0x000140204976:
  lVar4 = lVar3;
  pcVar11 = pcVar16;
  if (lVar7 == lVar1) goto joined_r0x0001402049b6;
  pcVar11 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
  bVar18 = pcVar11 == (char *)0x0;
  lVar6 = 0xc;
  pcVar12 = "second_pass";
  do {
    if (lVar6 == 0) break;
    lVar6 = lVar6 + -1;
    bVar18 = *pcVar11 == *pcVar12;
    pcVar11 = pcVar11 + 1;
    pcVar12 = pcVar12 + 1;
  } while (bVar18);
  if (bVar18) {
    pcVar11 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
    goto joined_r0x0001402049b6;
  }
  lVar7 = *(longlong *)(lVar7 + 0x48);
  goto joined_r0x000140204976;
joined_r0x0001402049b6:
  lVar7 = lVar3;
  pcVar12 = pcVar16;
  if (lVar4 == lVar1) goto joined_r0x0001402049f6;
  pcVar12 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
  bVar18 = pcVar12 == (char *)0x0;
  lVar6 = 0xd;
  pcVar13 = "aes_auth_key";
  do {
    if (lVar6 == 0) break;
    lVar6 = lVar6 + -1;
    bVar18 = *pcVar12 == *pcVar13;
    pcVar12 = pcVar12 + 1;
    pcVar13 = pcVar13 + 1;
  } while (bVar18);
  if (bVar18) {
    pcVar12 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
    goto joined_r0x0001402049f6;
  }
  lVar4 = *(longlong *)(lVar4 + 0x48);
  goto joined_r0x0001402049b6;
joined_r0x0001402049f6:
  lVar4 = lVar3;
  pcVar13 = pcVar16;
  if (lVar7 == lVar1) goto joined_r0x000140204a36;
  pcVar13 = (char *)(*(longlong *)(lVar7 + 0x20) + 0x10);
  bVar18 = pcVar13 == (char *)0x0;
  lVar6 = 0xd;
  pcVar14 = "hide_channel";
  do {
    if (lVar6 == 0) break;
    lVar6 = lVar6 + -1;
    bVar18 = *pcVar13 == *pcVar14;
    pcVar13 = pcVar13 + 1;
    pcVar14 = pcVar14 + 1;
  } while (bVar18);
  if (bVar18) {
    pcVar13 = (char *)(*(longlong *)(lVar7 + 0x30) + 0x10);
    goto joined_r0x000140204a36;
  }
  lVar7 = *(longlong *)(lVar7 + 0x48);
  goto joined_r0x0001402049f6;
joined_r0x000140204a36:
  pcVar14 = pcVar16;
  if (lVar4 == lVar1) goto joined_r0x000140204a73;
  pcVar14 = (char *)(*(longlong *)(lVar4 + 0x20) + 0x10);
  bVar18 = pcVar14 == (char *)0x0;
  lVar7 = 0xd;
  pcVar15 = "skip_billing";
  do {
    if (lVar7 == 0) break;
    lVar7 = lVar7 + -1;
    bVar18 = *pcVar14 == *pcVar15;
    pcVar14 = pcVar14 + 1;
    pcVar15 = pcVar15 + 1;
  } while (bVar18);
  if (bVar18) {
    pcVar14 = (char *)(*(longlong *)(lVar4 + 0x30) + 0x10);
    goto joined_r0x000140204a73;
  }
  lVar4 = *(longlong *)(lVar4 + 0x48);
  goto joined_r0x000140204a36;
joined_r0x000140204a73:
  if (lVar3 == lVar1) goto LAB_140204ab0;
  pcVar15 = (char *)(*(longlong *)(lVar3 + 0x20) + 0x10);
  bVar18 = pcVar15 == (char *)0x0;
  lVar7 = 0xc;
  pcVar17 = "enc_xml_use";
  do {
    if (lVar7 == 0) break;
    lVar7 = lVar7 + -1;
    bVar18 = *pcVar15 == *pcVar17;
    pcVar15 = pcVar15 + 1;
    pcVar17 = pcVar17 + 1;
  } while (bVar18);
  if (bVar18) {
    pcVar16 = (char *)(*(longlong *)(lVar3 + 0x30) + 0x10);
    goto LAB_140204ab0;
  }
  lVar3 = *(longlong *)(lVar3 + 0x48);
  goto joined_r0x000140204a73;
LAB_140204ab0:
  FUN_1401466b0();
  pcVar15 = local_328;
  if (local_328 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar17 = local_328;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar17;
      pcVar17 = pcVar17 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_68,local_328,~uVar8 - 1);
    iVar5 = _stricmp(pcVar15,"dev");
    if (iVar5 == 0) {
      local_40 = 1000;
    }
    else {
      iVar5 = _stricmp(pcVar15,"kor_beta");
      if (iVar5 == 0) {
        local_40 = 200;
      }
      else {
        iVar5 = _stricmp(pcVar15,"kor");
        if (iVar5 == 0) {
          local_40 = 100;
        }
        else {
          iVar5 = _stricmp(pcVar15,"usa_beta");
          if (iVar5 == 0) {
            local_40 = 0xc9;
          }
          else {
            iVar5 = _stricmp(pcVar15,"usa");
            if (iVar5 == 0) {
              local_40 = 0x65;
            }
            else {
              iVar5 = _stricmp(pcVar15,"tw_beta");
              if (iVar5 == 0) {
                local_40 = 0xca;
              }
              else {
                iVar5 = _stricmp(pcVar15,"tw");
                if (iVar5 == 0) {
                  local_40 = 0x66;
                }
                else {
                  iVar5 = _stricmp(pcVar15,"jpn_beta");
                  if (iVar5 == 0) {
                    local_40 = 0xcb;
                  }
                  else {
                    iVar5 = _stricmp(pcVar15,"jpn");
                    if (iVar5 == 0) {
                      local_40 = 0x67;
                    }
                    else {
                      iVar5 = _stricmp(pcVar15,"chn_beta");
                      if (iVar5 == 0) {
                        local_40 = 0xcc;
                      }
                      else {
                        iVar5 = _stricmp(pcVar15,"chn");
                        if (iVar5 == 0) {
                          local_40 = 0x68;
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (local_320 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar15 = local_320;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar15;
      pcVar15 = pcVar15 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_268,local_320,~uVar8 - 1);
  }
  if (local_2c0 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar15 = local_2c0;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar15;
      pcVar15 = pcVar15 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_240,local_2c0,~uVar8 - 1);
  }
  if (local_290 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar15 = local_290;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar15;
      pcVar15 = pcVar15 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_218,local_290,~uVar8 - 1);
  }
  if (local_300 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar15 = local_300;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar15;
      pcVar15 = pcVar15 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_1f0,local_300,~uVar8 - 1);
  }
  if (local_2b0 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar15 = local_2b0;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar15;
      pcVar15 = pcVar15 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_1c8,local_2b0,~uVar8 - 1);
  }
  if (local_2f0 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar15 = local_2f0;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar15;
      pcVar15 = pcVar15 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_1a0,local_2f0,~uVar8 - 1);
  }
  if (local_278 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar15 = local_278;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar15;
      pcVar15 = pcVar15 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_178,local_278,~uVar8 - 1);
  }
  if (local_2e0 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar15 = local_2e0;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar15;
      pcVar15 = pcVar15 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_150,local_2e0,~uVar8 - 1);
  }
  if (local_2a0 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar15 = local_2a0;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar15;
      pcVar15 = pcVar15 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_128,local_2a0,~uVar8 - 1);
  }
  if (local_2d0 != (char *)0x0) {
    local_100 = atoi(local_2d0);
  }
  if (local_280 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar15 = local_280;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar15;
      pcVar15 = pcVar15 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_f8,local_280,~uVar8 - 1);
  }
  if (pcVar10 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar15 = pcVar10;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar15;
      pcVar15 = pcVar15 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_d0,pcVar10,~uVar8 - 1);
  }
  if (pcVar12 != (char *)0x0) {
    uVar8 = 0xffffffffffffffff;
    pcVar10 = pcVar12;
    do {
      if (uVar8 == 0) break;
      uVar8 = uVar8 - 1;
      cVar2 = *pcVar10;
      pcVar10 = pcVar10 + 1;
    } while (cVar2 != '\0');
    FUN_14004d4d0(local_a8,pcVar12,~uVar8 - 1);
  }
  if (local_318 != (char *)0x0) {
    iVar5 = atoi(local_318);
    local_80 = 0 < iVar5;
  }
  if (local_310 != (char *)0x0) {
    iVar5 = atoi(local_310);
    local_7f = 0 < iVar5;
  }
  if (local_308 != (char *)0x0) {
    iVar5 = atoi(local_308);
    local_7e = 0 < iVar5;
  }
  if (local_2f8 != (char *)0x0) {
    iVar5 = atoi(local_2f8);
    local_7d = 0 < iVar5;
  }
  if (local_2e8 != (char *)0x0) {
    iVar5 = atoi(local_2e8);
    local_7c = 0 < iVar5;
  }
  if (local_2d8 != (char *)0x0) {
    iVar5 = atoi(local_2d8);
    local_7b = 0 < iVar5;
  }
  if (local_2c8 != (char *)0x0) {
    local_320 = (char *)CONCAT44(local_320._4_4_,1);
    iVar5 = atoi(local_2c8);
    local_328 = (char *)CONCAT44(local_328._4_4_,iVar5);
    ppcVar9 = &local_320;
    if (0 < iVar5) {
      ppcVar9 = &local_328;
    }
    local_74 = *(undefined4 *)ppcVar9;
  }
  if (local_2b8 != (char *)0x0) {
    local_328 = (char *)((ulonglong)local_328 & 0xffffffff00000000);
    iVar5 = atoi(local_2b8);
    local_320 = (char *)CONCAT44(local_320._4_4_,iVar5);
    ppcVar9 = &local_328;
    if (-1 < iVar5) {
      ppcVar9 = &local_320;
    }
    local_70 = *(undefined4 *)ppcVar9;
  }
  if (local_2a8 != (char *)0x0) {
    iVar5 = atoi(local_2a8);
    local_7a = 0 < iVar5;
  }
  if (local_298 != (char *)0x0) {
    iVar5 = atoi(local_298);
    local_75 = 0 < iVar5;
  }
  if (local_288 != (char *)0x0) {
    iVar5 = atoi(local_288);
    local_79 = 0 < iVar5;
  }
  if (pcVar11 != (char *)0x0) {
    iVar5 = atoi(pcVar11);
    local_78 = 0 < iVar5;
  }
  if (pcVar13 != (char *)0x0) {
    iVar5 = atoi(pcVar13);
    local_77 = 0 < iVar5;
  }
  if (pcVar14 != (char *)0x0) {
    iVar5 = atoi(pcVar14);
    local_76 = 0 < iVar5;
  }
  if (pcVar16 != (char *)0x0) {
    iVar5 = atoi(pcVar16);
    local_6c = 0 < iVar5;
  }
  _Str2 = local_68;
  if (0xf < local_50) {
    _Str2 = (char *******)local_68[0];
  }
  pcVar16 = (char *)&DAT_140378da0;
  if (0xf < DAT_140378db8) {
    pcVar16 = DAT_140378da0;
  }
  iVar5 = _stricmp(pcVar16,(char *)_Str2);
  if (iVar5 == 0) {
    FUN_140146a90(&DAT_140378dd0,local_268);
    FUN_1402037f0(&DAT_140378da0);
  }
  FUN_140146d20(&DAT_140379000,local_268);
  FUN_140146830(local_268);
  return;
}



void FUN_1402050b0(void)

{
  char cVar1;
  int iVar2;
  longlong *plVar3;
  longlong lVar4;
  undefined8 *puVar5;
  char *pcVar6;
  char *pcVar7;
  bool bVar8;
  undefined **local_98 [5];
  longlong *local_70;
  undefined8 *local_60;
  void *local_58;
  undefined8 *local_38;
  void *local_30;
  undefined8 local_18;
  
  local_18 = 0xfffffffffffffffe;
  puVar5 = &DAT_140379020;
  if (0xf < DAT_140379038) {
    puVar5 = DAT_140379020;
  }
  FUN_14014a910(local_98,puVar5);
  DAT_140325ab8 = 0;
  cVar1 = FUN_14014a9e0(local_98,local_60 + 2);
  plVar3 = local_70;
  if (cVar1 == '\0') {
    printf("File [ %s ] Error : %d - %s");
    local_98[0] = TiXmlDocument::vftable;
    if (local_38 != &DAT_14032f048) {
      operator_delete__(local_30);
    }
    local_98[0] = TiXmlNode::vftable;
    while (local_70 != (longlong *)0x0) {
      plVar3 = (longlong *)local_70[10];
      (**(code **)*local_70)(local_70,1);
      local_70 = plVar3;
    }
    if (local_60 != &DAT_14032f048) {
      operator_delete__(local_58);
      return;
    }
    return;
  }
  for (; plVar3 != (longlong *)0x0; plVar3 = (longlong *)plVar3[10]) {
    bVar8 = (char *)(plVar3[7] + 0x10) == (char *)0x0;
    lVar4 = 8;
    pcVar6 = (char *)(plVar3[7] + 0x10);
    pcVar7 = "service";
    do {
      if (lVar4 == 0) break;
      lVar4 = lVar4 + -1;
      bVar8 = *pcVar6 == *pcVar7;
      pcVar6 = pcVar6 + 1;
      pcVar7 = pcVar7 + 1;
    } while (bVar8);
    if (bVar8) goto LAB_1402051f6;
  }
  goto LAB_140205312;
LAB_1402051f6:
  while (lVar4 = (**(code **)(*plVar3 + 0x30))(plVar3), lVar4 == 0) {
    do {
      plVar3 = (longlong *)plVar3[10];
      if (plVar3 == (longlong *)0x0) goto LAB_140205312;
      bVar8 = (char *)(plVar3[7] + 0x10) == (char *)0x0;
      lVar4 = 8;
      pcVar6 = (char *)(plVar3[7] + 0x10);
      pcVar7 = "service";
      do {
        if (lVar4 == 0) break;
        lVar4 = lVar4 + -1;
        bVar8 = *pcVar6 == *pcVar7;
        pcVar6 = pcVar6 + 1;
        pcVar7 = pcVar7 + 1;
      } while (bVar8);
    } while (!bVar8);
  }
  lVar4 = (**(code **)(*plVar3 + 0x30))(plVar3);
  if (lVar4 != 0) {
    for (plVar3 = *(longlong **)(lVar4 + 0x28); plVar3 != (longlong *)0x0;
        plVar3 = (longlong *)plVar3[10]) {
      lVar4 = (**(code **)(*plVar3 + 0x30))(plVar3);
      if (lVar4 != 0) {
        for (plVar3 = (longlong *)(**(code **)(*plVar3 + 0x30))(plVar3); plVar3 != (longlong *)0x0;
            plVar3 = (longlong *)(**(code **)(*plVar3 + 0x30))(plVar3)) {
          pcVar6 = (char *)(plVar3[7] + 0x10);
          iVar2 = _stricmp(pcVar6,"active_area");
          if (iVar2 == 0) {
            FUN_140204120(plVar3);
          }
          else {
            iVar2 = _stricmp(pcVar6,"area");
            if (iVar2 == 0) {
              FUN_140204320(plVar3);
            }
            else {
              iVar2 = _stricmp(pcVar6,"active_content");
              if (iVar2 == 0) {
                FUN_140203b80(plVar3);
              }
            }
          }
          do {
            plVar3 = (longlong *)plVar3[10];
            if (plVar3 == (longlong *)0x0) goto LAB_140205312;
            lVar4 = (**(code **)(*plVar3 + 0x30))(plVar3);
          } while (lVar4 == 0);
        }
        break;
      }
    }
  }
LAB_140205312:
  local_98[0] = TiXmlDocument::vftable;
  if (local_38 != &DAT_14032f048) {
    operator_delete__(local_30);
  }
  local_98[0] = TiXmlNode::vftable;
  while (local_70 != (longlong *)0x0) {
    plVar3 = (longlong *)local_70[10];
    (**(code **)*local_70)(local_70,1);
    local_70 = plVar3;
  }
  if (local_60 != &DAT_14032f048) {
    operator_delete__(local_58);
  }
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

undefined8 * FUN_1402053b0(void)

{
  undefined8 in_R9;
  
  DAT_140378db8 = 0xf;
  _DAT_140378db0 = 0;
  DAT_140378da0._0_1_ = 0;
  FUN_14004d4d0(&DAT_140378da0,&DAT_1402943e0,3,in_R9,0xfffffffffffffffe);
  FUN_1401466b0(&DAT_140378dd0);
  DAT_140379000 = 0;
  DAT_140379008 = 0;
  _DAT_140379010 = 0;
  DAT_140379038 = 0xf;
  _DAT_140379030 = 0;
  DAT_140379020._0_1_ = 0;
  FUN_14004d4d0(&DAT_140379020,"option\\service_control.xml",0x1a);
  DAT_140378dc8 = 100;
  FUN_1402050b0();
  return &DAT_140378da0;
}



undefined8 * FUN_140205480(void)

{
  if ((DAT_140379238 & 1) == 0) {
    DAT_140379238 = DAT_140379238 | 1;
    FUN_1402041b0();
    atexit((_func_5014 *)&LAB_140257cb0);
  }
  return &DAT_140379050;
}



undefined8 * FUN_1402054d0(void)

{
  if ((DAT_14037923c & 1) == 0) {
    DAT_14037923c = DAT_14037923c | 1;
    FUN_1402053b0();
    atexit((_func_5014 *)&LAB_140257ca0);
  }
  return &DAT_140378da0;
}



void FUN_140205510(longlong param_1)

{
  double dVar1;
  
  if (*(char *)(param_1 + 0x20) == '\0') {
    dVar1 = (double)(**(code **)(**(longlong **)(param_1 + 8) + 8))();
    dVar1 = dVar1 * (double)*(float *)(param_1 + 0x24);
    *(double *)(param_1 + 0x18) = dVar1;
    *(double *)(param_1 + 0x10) = dVar1 + *(double *)(param_1 + 0x10);
  }
  return;
}



void FUN_140205550(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  *param_1 = Magi::Timer::vftable;
  (**(code **)(*(longlong *)param_1[1] + 0x18))
            ((longlong *)param_1[1],param_1,param_3,param_4,0xfffffffffffffffe);
  *param_1 = IObserver::vftable;
  return;
}



undefined8 *
FUN_1402055a0(undefined8 *param_1,longlong *param_2,undefined8 param_3,undefined8 param_4)

{
  *param_1 = Magi::Timer::vftable;
  param_1[1] = param_2;
  param_1[2] = 0;
  param_1[3] = 0;
  *(undefined1 *)(param_1 + 4) = 0;
  *(undefined4 *)((longlong)param_1 + 0x24) = 0x3f800000;
  (**(code **)(*param_2 + 0x10))(param_2,param_1,param_2,param_4,0xfffffffffffffffe);
  return param_1;
}



double FUN_140205600(longlong param_1)

{
  LARGE_INTEGER local_res8 [4];
  
  QueryPerformanceCounter(local_res8);
  return (double)local_res8[0].QuadPart * *(double *)(param_1 + 8);
}



undefined8 * FUN_140205630(undefined8 *param_1)

{
  BOOL BVar1;
  LARGE_INTEGER local_res8 [4];
  
  *param_1 = TimeSourceHRWin32::vftable;
  BVar1 = QueryPerformanceFrequency(local_res8);
  if (BVar1 == 0) {
    *(undefined1 *)(param_1 + 2) = 0;
    GetLastError();
    return param_1;
  }
  *(undefined1 *)(param_1 + 2) = 1;
  param_1[1] = 1.0 / (double)local_res8[0].QuadPart;
  return param_1;
}



void FUN_140205690(longlong param_1,longlong *param_2,undefined8 param_3)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  
  puVar1 = *(undefined8 **)(param_1 + 0x10);
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1);
    *(undefined8 *)(param_1 + 0x10) = 0;
  }
  *(longlong **)(param_1 + 0x10) = param_2;
  if (param_2 != (longlong *)0x0) {
    uVar2 = (**(code **)(*param_2 + 8))(param_2);
    *(undefined8 *)(param_1 + 0x30) = uVar2;
    *(undefined8 *)(param_1 + 0x38) = uVar2;
  }
  *(undefined8 *)(param_1 + 0x90) = param_3;
  return;
}



void FUN_140205700(longlong param_1,longlong param_2)

{
  longlong *_Src;
  longlong *plVar1;
  longlong lVar2;
  longlong *_Dst;
  
  _Dst = *(longlong **)(param_1 + 0x70);
  _Src = *(longlong **)(param_1 + 0x78);
  if (_Dst == _Src) {
    return;
  }
  while (*_Dst != param_2) {
    _Dst = _Dst + 1;
    if (_Dst == _Src) goto LAB_140205758;
  }
  plVar1 = _Dst;
  if (_Dst == _Src) {
    return;
  }
  while (plVar1 = plVar1 + 1, plVar1 != _Src) {
    if (*plVar1 != param_2) {
      *_Dst = *plVar1;
      _Dst = _Dst + 1;
    }
  }
LAB_140205758:
  if (_Dst == _Src) {
    return;
  }
  lVar2 = *(longlong *)(param_1 + 0x78) - (longlong)_Src >> 3;
  memmove(_Dst,_Src,lVar2 * 8);
  *(longlong **)(param_1 + 0x78) = _Dst + lVar2;
  return;
}



void FUN_1402057a0(longlong param_1,longlong param_2)

{
  ulonglong *puVar1;
  longlong *plVar2;
  longlong *plVar3;
  longlong local_res10 [3];
  
  if (param_2 == 0) {
    return;
  }
  plVar2 = *(longlong **)(param_1 + 0x78);
  puVar1 = (ulonglong *)(param_1 + 0x70);
  local_res10[0] = param_2;
  if ((local_res10 < plVar2) && (plVar3 = (longlong *)*puVar1, plVar3 <= local_res10)) {
    if (plVar2 == *(longlong **)(param_1 + 0x80)) {
      FUN_14013b810(puVar1);
    }
    if (*(undefined8 **)(param_1 + 0x78) != (undefined8 *)0x0) {
      **(undefined8 **)(param_1 + 0x78) =
           *(undefined8 *)(*puVar1 + ((longlong)local_res10 - (longlong)plVar3 >> 3) * 8);
      *(longlong *)(param_1 + 0x78) = *(longlong *)(param_1 + 0x78) + 8;
      return;
    }
  }
  else {
    if (plVar2 == *(longlong **)(param_1 + 0x80)) {
      FUN_14013b810(puVar1);
    }
    if (*(longlong **)(param_1 + 0x78) != (longlong *)0x0) {
      **(longlong **)(param_1 + 0x78) = param_2;
    }
  }
  *(longlong *)(param_1 + 0x78) = *(longlong *)(param_1 + 0x78) + 8;
  return;
}



void FUN_1402058a0(longlong param_1,double param_2)

{
  ulonglong *puVar1;
  double *pdVar2;
  double *pdVar3;
  void *_Dst;
  undefined4 uVar4;
  undefined4 uVar5;
  double local_res10;
  
  uVar4 = SUB84(param_2,0);
  uVar5 = (undefined4)((ulonglong)param_2 >> 0x20);
  local_res10 = param_2;
  if (param_2 < 0.0) {
    uVar4 = 0x9999999a;
    uVar5 = 0x3fa99999;
    local_res10 = 0.05;
  }
  pdVar2 = *(double **)(param_1 + 0x58);
  puVar1 = (ulonglong *)(param_1 + 0x50);
  if ((&local_res10 < pdVar2) && (pdVar3 = (double *)*puVar1, pdVar3 <= &local_res10)) {
    if (pdVar2 == *(double **)(param_1 + 0x60)) {
      FUN_14013b810(puVar1);
    }
    if (*(undefined8 **)(param_1 + 0x58) != (undefined8 *)0x0) {
      **(undefined8 **)(param_1 + 0x58) =
           *(undefined8 *)(*puVar1 + ((longlong)&local_res10 - (longlong)pdVar3 >> 3) * 8);
    }
  }
  else {
    if (pdVar2 == *(double **)(param_1 + 0x60)) {
      FUN_14013b810(puVar1);
    }
    if (*(undefined8 **)(param_1 + 0x58) != (undefined8 *)0x0) {
      **(undefined8 **)(param_1 + 0x58) = CONCAT44(uVar5,uVar4);
    }
  }
  *(longlong *)(param_1 + 0x58) = *(longlong *)(param_1 + 0x58) + 8;
  _Dst = (void *)*puVar1;
  if ((ulonglong)*(uint *)(param_1 + 0x40) <
      (ulonglong)(*(longlong *)(param_1 + 0x58) - (longlong)_Dst >> 3)) {
    memmove(_Dst,(void *)((longlong)_Dst + 8),
            *(longlong *)(param_1 + 0x58) - ((longlong)_Dst + 8) & 0xfffffffffffffff8);
    *(longlong *)(param_1 + 0x58) = *(longlong *)(param_1 + 0x58) + -8;
  }
  return;
}



double FUN_1402059a0(longlong param_1)

{
  double dVar1;
  double dVar2;
  
  if (*(longlong **)(param_1 + 0x10) == (longlong *)0x0) {
    dVar2 = 0.0;
  }
  else {
    dVar2 = (double)(**(code **)(**(longlong **)(param_1 + 0x10) + 8))();
  }
  dVar1 = dVar2 - *(double *)(param_1 + 0x38);
  if (*(double *)(param_1 + 0x90) <= dVar1 && dVar1 != *(double *)(param_1 + 0x90)) {
    dVar1 = *(double *)(*(longlong *)(param_1 + 0x58) + -8);
  }
  *(double *)(param_1 + 0x38) = dVar2;
  return dVar1;
}



void FUN_1402059f0(longlong param_1)

{
  double dVar1;
  double *pdVar2;
  longlong lVar3;
  undefined8 *puVar4;
  double dVar5;
  double dVar6;
  
  dVar1 = 0.0;
  if (*(longlong **)(param_1 + 0x10) == (longlong *)0x0) {
    dVar5 = 0.0;
  }
  else {
    dVar5 = (double)(**(code **)(**(longlong **)(param_1 + 0x10) + 8))();
  }
  dVar6 = dVar5 - *(double *)(param_1 + 0x38);
  if (*(double *)(param_1 + 0x90) <= dVar6 && dVar6 != *(double *)(param_1 + 0x90)) {
    dVar6 = *(double *)(*(longlong *)(param_1 + 0x58) + -8);
  }
  *(double *)(param_1 + 0x38) = dVar5;
  FUN_1402058a0(param_1,dVar6);
  pdVar2 = *(double **)(param_1 + 0x50);
  if (pdVar2 != *(double **)(param_1 + 0x58)) {
    dVar1 = 0.0;
    do {
      dVar1 = dVar1 + *pdVar2;
      pdVar2 = pdVar2 + 1;
    } while (pdVar2 != *(double **)(param_1 + 0x58));
  }
  lVar3 = *(longlong *)(param_1 + 0x58) - *(longlong *)(param_1 + 0x50) >> 3;
  dVar5 = (double)lVar3;
  if (lVar3 < 0) {
    dVar5 = dVar5 + 1.8446744073709552e+19;
  }
  puVar4 = *(undefined8 **)(param_1 + 0x70);
  *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + 1;
  *(double *)(param_1 + 0x20) = dVar1 / dVar5;
  *(double *)(param_1 + 0x18) = dVar1 / dVar5 + *(double *)(param_1 + 0x18);
  if (puVar4 != *(undefined8 **)(param_1 + 0x78)) {
    do {
      (**(code **)(*(longlong *)*puVar4 + 8))();
      puVar4 = puVar4 + 1;
    } while (puVar4 != *(undefined8 **)(param_1 + 0x78));
  }
  return;
}



void FUN_140205ad0(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  
  *param_1 = Clock::vftable;
  param_1[1] = Clock::vftable;
  puVar1 = (undefined8 *)param_1[2];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1,param_3,param_4,0xfffffffffffffffe);
    param_1[2] = 0;
  }
  if ((void *)param_1[0xe] != (void *)0x0) {
    operator_delete((void *)param_1[0xe]);
  }
  param_1[0xe] = 0;
  param_1[0xf] = 0;
  param_1[0x10] = 0;
  if ((void *)param_1[10] != (void *)0x0) {
    operator_delete((void *)param_1[10]);
  }
  param_1[10] = 0;
  param_1[0xb] = 0;
  param_1[0xc] = 0;
  param_1[1] = MBISingleton<>::vftable;
  DAT_14032f250 = 0;
  *param_1 = ISubject::vftable;
  return;
}



void FUN_140205b80(longlong param_1,undefined8 param_2)

{
  void *_Dst;
  
  *(undefined8 *)(param_1 + 0x48) = param_2;
  *(undefined4 *)(param_1 + 0x40) = 1;
  _Dst = *(void **)(param_1 + 0x50);
  if (_Dst != *(void **)(param_1 + 0x58)) {
    memmove(_Dst,*(void **)(param_1 + 0x58),0);
    *(void **)(param_1 + 0x58) = _Dst;
  }
  FUN_14012fb60((undefined8 *)(param_1 + 0x50),param_1 + 0x48);
  return;
}



undefined8 *
FUN_140205c00(undefined8 *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 *puVar1;
  double *pdVar2;
  longlong lVar3;
  double dVar4;
  double dVar5;
  
  *param_1 = Clock::vftable;
  param_1[1] = Clock::vftable;
  param_1[2] = 0;
  param_1[3] = 0;
  param_1[4] = 0;
  *(undefined4 *)(param_1 + 5) = 0;
  param_1[6] = 0;
  param_1[7] = 0;
  param_1[10] = 0;
  param_1[0xb] = 0;
  param_1[0xc] = 0;
  param_1[0xe] = 0;
  param_1[0xf] = 0;
  param_1[0x10] = 0;
  param_1[0x12] = 0x3fc999999999999a;
  puVar1 = (undefined8 *)param_1[2];
  if (puVar1 != (undefined8 *)0x0) {
    (**(code **)*puVar1)(puVar1,1,param_3,param_4,0xfffffffffffffffe);
    param_1[2] = 0;
  }
  param_1[2] = 0;
  param_1[0x12] = 0x3fe0000000000000;
  FUN_140205b80(param_1,0x3f9eb851eb851eb8);
  dVar5 = 0.0;
  pdVar2 = (double *)param_1[10];
  if (pdVar2 != (double *)param_1[0xb]) {
    do {
      dVar5 = dVar5 + *pdVar2;
      pdVar2 = pdVar2 + 1;
    } while (pdVar2 != (double *)param_1[0xb]);
  }
  lVar3 = (longlong)(param_1[0xb] - param_1[10]) >> 3;
  dVar4 = (double)lVar3;
  if (lVar3 < 0) {
    dVar4 = dVar4 + 1.8446744073709552e+19;
  }
  param_1[4] = dVar5 / dVar4;
  return param_1;
}



void Unwind_140205d10(undefined8 param_1,longlong param_2)

{
  FUN_140050680(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140205d20(undefined8 param_1,longlong param_2)

{
  FUN_140050680(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140205d30(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x48) + 8);
  return;
}



void Unwind_140205d40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x70);
  return;
}



void Unwind_140205d50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140205d60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140205d70(undefined8 param_1,longlong param_2)

{
  FUN_140154be0(param_2 + 0x28);
  return;
}



void Unwind_140205d80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x28);
  return;
}



void Unwind_140205d90(undefined8 param_1,longlong param_2)

{
  FUN_140154bf0(param_2 + 0x38);
  return;
}



void Unwind_140205da0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140205db0(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x50);
  return;
}



void Unwind_140205dc0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140205dd0(undefined8 param_1,longlong param_2)

{
  FUN_140154bf0(param_2 + 0x28);
  return;
}



void Unwind_140205de0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x28);
  return;
}



void Unwind_140205df0(undefined8 param_1,longlong param_2)

{
  FUN_140154be0(param_2 + 0x38);
  return;
}



void Unwind_140205e00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140205e10(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0xa0);
  return;
}



void Unwind_140205e20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140205e30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140205e40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140205e50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140205e57. Too many branches
                    // WARNING: Treating indirect jump as call
  std::exception::~exception(*(exception **)(param_2 + 0x30));
  return;
}



void Unwind_140205e60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(longlong *)(param_2 + 0x30) + 0x40);
  return;
}



void Unwind_140205e70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20);
  return;
}



void Unwind_140205e80(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x40);
  return;
}



void Unwind_140205e90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140205ea0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140205ea7. Too many branches
                    // WARNING: Treating indirect jump as call
  std::exception::~exception(*(exception **)(param_2 + 0x40));
  return;
}



void Unwind_140205eb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(longlong *)(param_2 + 0x40) + 0x40);
  return;
}



void Unwind_140205ec0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140205ec7. Too many branches
                    // WARNING: Treating indirect jump as call
  std::exception::~exception(*(exception **)(param_2 + 0x50));
  return;
}



void Unwind_140205ed0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(longlong *)(param_2 + 0x50) + 0x40);
  return;
}



void Unwind_140205ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x58);
  return;
}



void Unwind_140205ef0(void)

{
  DAT_140328528 = DAT_140328528 & 0xfffffffe;
  return;
}



void Unwind_140205f10(undefined8 param_1,longlong param_2)

{
  FUN_140156970(*(undefined8 *)(param_2 + 0x50),0x80);
  return;
}



void Unwind_140205f30(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(*(longlong *)(param_2 + 0x80) + 0xc80);
  return;
}



void Unwind_140205f50(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140205f60(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(*(longlong *)(param_2 + 0xd0) + 0xc80);
  return;
}



void Unwind_140205f80(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xa0);
  return;
}



void Unwind_140205f90(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0xa0);
  return;
}



void Unwind_140205fa0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xde0);
  return;
}



void Unwind_140205fb0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xdd0);
  return;
}



void Unwind_140205fd0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x150);
  return;
}



void Unwind_140205fe0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xdd0);
  return;
}



void Unwind_140206000(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x150);
  return;
}



void Unwind_140206010(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xdd0);
  return;
}



void Unwind_140206030(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1a60);
  return;
}



void Unwind_140206050(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_140206060(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x30);
  return;
}



void Unwind_140206070(void)

{
  DAT_140328718 = DAT_140328718 & 0xfffffffe;
  return;
}



void Unwind_140206090(void)

{
  DAT_140328718 = DAT_140328718 & 0xfffffffe;
  return;
}



void Unwind_1402060b0(void)

{
  DAT_140328718 = DAT_140328718 & 0xfffffffe;
  return;
}



void Unwind_1402060d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_1402060e0(undefined8 param_1,longlong param_2)

{
  FUN_140158390(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402060f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140206100(void)

{
  DAT_1403287c4 = DAT_1403287c4 & 0xfffffffe;
  return;
}



void Unwind_140206120(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x60),
                *(longlong *)(param_2 + 0x50) + (longlong)*(int *)(param_2 + 0x58) * 8);
  return;
}



void Unwind_140206150(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x20));
  return;
}



void Unwind_140206160(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x28),
                *(longlong *)(param_2 + 0xd8) + (longlong)*(int *)(param_2 + 200) * 8);
  return;
}



void Unwind_140206190(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x28);
  return;
}



void Unwind_1402061a0(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x50);
  return;
}



void Unwind_1402061b0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x20) & 1) != 0) {
    *(uint *)(param_2 + 0x20) = *(uint *)(param_2 + 0x20) & 0xfffffffe;
    thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x40));
  }
  return;
}



void Unwind_1402061e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402061f0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x50) & 1) != 0) {
    *(uint *)(param_2 + 0x50) = *(uint *)(param_2 + 0x50) & 0xfffffffe;
    thunk_FUN_140050520(*(undefined8 *)(param_2 + 0x40));
  }
  return;
}



void Unwind_140206220(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x68) & 1) != 0) {
    *(uint *)(param_2 + 0x68) = *(uint *)(param_2 + 0x68) & 0xfffffffe;
    thunk_FUN_140050520(*(undefined8 *)(param_2 + 0x60));
  }
  return;
}



void Unwind_140206250(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x70);
  return;
}



void Unwind_140206260(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140206270(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x28);
  return;
}



void Unwind_140206280(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x20);
  return;
}



void Unwind_140206290(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_1402062a0(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x50);
  return;
}



void Unwind_1402062b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_1402062c0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x38));
  return;
}



void Unwind_1402062d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20);
  return;
}



void Unwind_1402062e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_1402062f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140206300(void)

{
  DAT_140328818 = DAT_140328818 & 0xfffffffe;
  return;
}



void Unwind_140206320(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x20);
  return;
}



void Unwind_140206330(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x28);
  return;
}



void Unwind_140206340(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140206350(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140206360(undefined8 param_1,longlong param_2)

{
  FUN_14018b000(param_2 + 0x30);
  return;
}



void Unwind_140206370(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140206380(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140206390(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x40) + 0x120);
  return;
}



void Unwind_1402063b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_1402063c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_1402063d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_1402063e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_1402063f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140206400(undefined8 param_1,longlong param_2)

{
  FUN_14013c0b0(param_2 + 0x60);
  return;
}



void Unwind_140206410(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140206420(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140206430(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_140206440(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140206450(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(param_2 + 0x78);
  return;
}



void Unwind_140206460(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140206470(undefined8 param_1,longlong param_2)

{
  FUN_14015bdd0(param_2 + 0x28);
  return;
}



undefined8 Catch_All_140206480(void)

{
  return 0x1401617e3;
}



undefined8 Catch_All_1402064a0(void)

{
  return 0x140161a43;
}



void Unwind_1402064c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402064d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_1402064e0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x58) & 1) != 0) {
    *(uint *)(param_2 + 0x58) = *(uint *)(param_2 + 0x58) & 0xfffffffe;
    thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x40));
  }
  return;
}



void Unwind_140206510(undefined8 param_1,longlong param_2)

{
  FUN_140161a30(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140206520(undefined8 param_1,longlong param_2)

{
  FUN_14015be10(*(longlong *)(param_2 + 0x40) + 0x60);
  return;
}



void Unwind_140206530(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3c8);
  return;
}



void Unwind_140206540(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x260);
  return;
}



void Unwind_140206550(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206560(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd8);
  return;
}



void Unwind_140206570(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206580(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206590(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402065a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_1402065b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x50);
  return;
}



void Unwind_1402065c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x268);
  return;
}



void Unwind_1402065d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_1402065e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd8);
  return;
}



void Unwind_1402065f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206600(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206610(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140206620(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206630(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3b8);
  return;
}



void Unwind_140206640(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 600);
  return;
}



void Unwind_140206650(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206660(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd8);
  return;
}



void Unwind_140206670(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206680(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206690(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x3c8));
  return;
}



void Unwind_1402066a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_1402066b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3c8);
  return;
}



void Unwind_1402066c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x270);
  return;
}



void Unwind_1402066d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_1402066e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd8);
  return;
}



void Unwind_1402066f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206700(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206710(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140206720(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206730(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3b8);
  return;
}



void Unwind_140206740(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_140206750(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_140206760(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_140206770(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_140206780(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_140206790(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_1402067a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_1402067b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_1402067c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2d8);
  return;
}



void Unwind_1402067d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402067e0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x60);
  return;
}



void Unwind_1402067f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3b8);
  return;
}



void Unwind_140206800(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2e8);
  return;
}



void Unwind_140206810(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x3c8));
  return;
}



void Unwind_140206820(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3b8);
  return;
}



void Unwind_140206830(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2e0);
  return;
}



void Unwind_140206840(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x3c8));
  return;
}



void Unwind_140206850(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x50);
  return;
}



void Unwind_140206860(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3b8);
  return;
}



void Unwind_140206870(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x298);
  return;
}



void Unwind_140206880(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140206890(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x50);
  return;
}



void Unwind_1402068a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3c8);
  return;
}



void Unwind_1402068b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2a8);
  return;
}



void Unwind_1402068c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402068d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3c8);
  return;
}



void Unwind_1402068e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3b8);
  return;
}



void Unwind_1402068f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2b8);
  return;
}



void Unwind_140206900(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140206910(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3c8);
  return;
}



void Unwind_140206920(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2c8);
  return;
}



void Unwind_140206930(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140206940(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3c8);
  return;
}



void Unwind_140206950(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2d0);
  return;
}



void Unwind_140206960(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140206970(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3c8);
  return;
}



void Unwind_140206980(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3b8);
  return;
}



void Unwind_140206990(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x290);
  return;
}



void Unwind_1402069a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402069b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3b8);
  return;
}



void Unwind_1402069c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2c0);
  return;
}



void Unwind_1402069d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402069e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x50);
  return;
}



void Unwind_1402069f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2a0);
  return;
}



void Unwind_140206a00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140206a10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3b8);
  return;
}



void Unwind_140206a20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x278);
  return;
}



void Unwind_140206a30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x3c8));
  return;
}



void Unwind_140206a40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3c8);
  return;
}



void Unwind_140206a50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2b0);
  return;
}



void Unwind_140206a60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140206a70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc0);
  return;
}



void Unwind_140206a80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x280);
  return;
}



void Unwind_140206a90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140206aa0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3c8);
  return;
}



void Unwind_140206ab0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x288);
  return;
}



void Unwind_140206ac0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140206ad0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140206ae0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_140206af0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140206b00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_140206b10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x160);
  return;
}



void Unwind_140206b20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x50);
  return;
}



void Unwind_140206b30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd0);
  return;
}



void Unwind_140206b40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_140206b50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x178);
  return;
}



void Unwind_140206b60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x48);
  return;
}



void Unwind_140206b70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_140206b80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_140206b90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe0);
  return;
}



void Unwind_140206ba0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x100);
  return;
}



void Unwind_140206bb0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140206bc0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x90);
  return;
}



void Unwind_140206bd0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_140206be0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x20);
  return;
}



void Unwind_140206bf0(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x20);
  return;
}



void Unwind_140206c00(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd80);
  return;
}



void Unwind_140206c20(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x100);
  return;
}



void Unwind_140206c30(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd80);
  return;
}



void Unwind_140206c50(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x58) + 8);
  return;
}



void Unwind_140206c60(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x20);
  return;
}



void Unwind_140206c70(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x20);
  return;
}



void Unwind_140206c80(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd80);
  return;
}



void Unwind_140206ca0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x100);
  return;
}



void Unwind_140206cb0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd80);
  return;
}



void Unwind_140206cd0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x58) + 8);
  return;
}



void Unwind_140206ce0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x28);
  return;
}



void Unwind_140206cf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x20);
  return;
}



void Unwind_140206d00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140206d10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20);
  return;
}



void Unwind_140206d20(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x70);
  return;
}



void Unwind_140206d30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140206d40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140206d50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140206d60(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x40);
  return;
}



void Unwind_140206d70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_140206d80(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd50);
  return;
}



void Unwind_140206da0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xd0);
  return;
}



void Unwind_140206db0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd50);
  return;
}



void Unwind_140206dd0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



undefined * Catch_140206de0(undefined8 param_1,longlong param_2)

{
  LPCWSTR lpOutputString;
  
  lpOutputString = (LPCWSTR)(**(code **)(**(longlong **)(param_2 + 0x70) + 8))();
  OutputDebugStringW(lpOutputString);
  uRam0000000000000000 = 1;
  return &DAT_14016a573;
}



undefined * Catch_140206e20(undefined8 param_1,longlong param_2)

{
  LPCWSTR lpOutputString;
  
  lpOutputString = (LPCWSTR)(**(code **)(**(longlong **)(param_2 + 0x68) + 8))();
  OutputDebugStringW(lpOutputString);
  uRam0000000000000000 = 1;
  return &DAT_14016a4b7;
}



undefined * Catch_140206e60(undefined8 param_1,longlong param_2)

{
  LPCWSTR lpOutputString;
  
  lpOutputString = (LPCWSTR)(**(code **)(**(longlong **)(param_2 + 0x40) + 8))();
  OutputDebugStringW(lpOutputString);
  uRam0000000000000000 = 1;
  return &DAT_14016aa42;
}



void Unwind_140206ea0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x20);
  return;
}



void Unwind_140206eb0(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x20);
  return;
}



void Unwind_140206ec0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140206ed0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd40);
  return;
}



void Unwind_140206ef0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xc0);
  return;
}



void Unwind_140206f00(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd40);
  return;
}



void Unwind_140206f20(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xa0) + 8);
  return;
}



void Unwind_140206f30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_140206f40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140206f50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_140206f60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140206f70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_140206f80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140206f90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_140206fa0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140206fb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_140206fc0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140206fd0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x80),
                *(longlong *)(param_2 + 0x78) + (longlong)*(int *)(param_2 + 0x70) * 8);
  return;
}



void Unwind_140207000(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x98),
                *(longlong *)(param_2 + 0x90) + (longlong)*(int *)(param_2 + 0x88) * 8);
  return;
}



void Unwind_140207030(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0xb0),
                *(longlong *)(param_2 + 0xa8) + (longlong)*(int *)(param_2 + 0xa0) * 8);
  return;
}



void Unwind_140207060(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140207067. Too many branches
                    // WARNING: Treating indirect jump as call
  std::_Container_base12::~_Container_base12(*(_Container_base12 **)(param_2 + 0x40));
  return;
}



void Unwind_140207070(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x88) & 1) != 0) {
    *(uint *)(param_2 + 0x88) = *(uint *)(param_2 + 0x88) & 0xfffffffe;
    FUN_14016b5d0(*(undefined8 *)(param_2 + 0x80));
  }
  return;
}



void Unwind_1402070a0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_1402070b0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_1402070c0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x60);
  return;
}



void Unwind_1402070d0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xe0) + 8);
  return;
}



void Unwind_1402070e0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x60);
  return;
}



void Unwind_1402070f0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xd0) + 8);
  return;
}



void Unwind_140207100(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140207110(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140207120(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140207130(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x20);
  return;
}



void Unwind_140207140(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_140207150(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_140207160(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140207170(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140207180(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x20);
  return;
}



void Unwind_140207190(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x20);
  return;
}



void Unwind_1402071a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_1402071b0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd40);
  return;
}



void Unwind_1402071d0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xc0);
  return;
}



void Unwind_1402071e0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd40);
  return;
}



void Unwind_140207200(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x48) + 8);
  return;
}



void Unwind_140207210(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140207220(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x68),*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140207240(undefined8 param_1,longlong param_2)

{
  FUN_140161920(param_2 + 0x68);
  return;
}



void Unwind_140207250(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140207260(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140207267. Too many branches
                    // WARNING: Treating indirect jump as call
  std::_Container_base12::~_Container_base12((_Container_base12 *)(param_2 + 0x20));
  return;
}



void Unwind_140207270(undefined8 param_1,longlong param_2)

{
  FUN_14016b8b0(param_2 + 0x20);
  return;
}



void Unwind_140207280(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140207287. Too many branches
                    // WARNING: Treating indirect jump as call
  std::_Container_base12::~_Container_base12((_Container_base12 *)(param_2 + 0x20));
  return;
}



void Unwind_140207290(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0x50);
  return;
}



void Unwind_1402072a0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x60) & 1) != 0) {
    *(uint *)(param_2 + 0x60) = *(uint *)(param_2 + 0x60) & 0xfffffffe;
    FUN_140161860(*(undefined8 *)(param_2 + 0x58));
  }
  return;
}



void Unwind_1402072d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_1402072e0(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0x160);
  return;
}



void Unwind_1402072f0(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0x50);
  return;
}



void Unwind_140207300(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_140207310(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140207320(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140207330(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140207340(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_140207350(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xc0);
  return;
}



void Unwind_140207360(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_140207370(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd0);
  return;
}



void Unwind_140207380(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe0);
  return;
}



void Unwind_140207390(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x100);
  return;
}



void Unwind_1402073a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_1402073b0(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0xb0);
  return;
}



void Unwind_1402073c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 200);
  return;
}



void Unwind_1402073d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_1402073e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402073f0(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0xa0);
  return;
}



void Unwind_140207400(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb8);
  return;
}



void Unwind_140207410(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140207420(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x70) + 0x120);
  return;
}



void Unwind_140207440(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140207450(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140207460(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140207470(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140207480(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140207490(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_1402074a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc0);
  return;
}



void Unwind_1402074b0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x58);
  return;
}



void Unwind_1402074c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_1402074d0(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0x50);
  return;
}



void Unwind_1402074e0(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0x20);
  return;
}



void Unwind_1402074f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa0);
  return;
}



void Unwind_140207500(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x48);
  return;
}



void Unwind_140207510(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



undefined8 Catch_All_140207520(void)

{
  return 0x140170493;
}



void Unwind_140207540(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x50) + 0x120);
  return;
}



void Unwind_140207560(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0xd0),0x400);
  return;
}



void Unwind_140207580(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x30);
  return;
}



void Unwind_140207590(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd0);
  return;
}



void Unwind_1402075a0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x60);
  return;
}



void Unwind_1402075b0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0xe8);
  return;
}



void Unwind_1402075c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_1402075d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_1402075e0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_1402075f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_140207600(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140207610(undefined8 param_1,longlong param_2)

{
  FUN_14016fe00(param_2 + 0x60U & 0xffffffffffffffc0);
  return;
}



void Unwind_140207640(undefined8 param_1,longlong param_2)

{
  FUN_14016dbd0(param_2 + 0x60U & 0xffffffffffffffc0);
  return;
}



undefined8 Catch_All_140207670(void)

{
  return 0x140170ff3;
}



void Unwind_140207690(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(*(undefined8 *)(param_2 + 0x1a0));
  return;
}



void Unwind_1402076a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_1402076b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x38),0x180);
  return;
}



void Unwind_1402076d0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x38);
  return;
}



void Unwind_1402076e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_1402076f0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x90);
  return;
}



void Unwind_140207700(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x48);
  return;
}



void Unwind_140207710(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x78);
  return;
}



void Unwind_140207720(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 200);
  return;
}



void Unwind_140207730(undefined8 param_1,longlong param_2)

{
  FUN_1401a37f0(param_2 + 0x60);
  return;
}



void Unwind_140207740(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb8);
  return;
}



void Unwind_140207750(undefined8 param_1,longlong param_2)

{
  FUN_140170fe0(*(undefined8 *)(param_2 + 0x20));
  return;
}



void Unwind_140207760(undefined8 param_1,longlong param_2)

{
  FUN_140170fe0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140207770(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x30);
  return;
}



void Unwind_140207780(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x70),0x180);
  return;
}



void Unwind_1402077a0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x50);
  return;
}



void Unwind_1402077b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_1402077c0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xb8);
  return;
}



void Unwind_1402077d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_1402077e0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x58);
  return;
}



void Unwind_1402077f0(undefined8 param_1,longlong param_2)

{
  FUN_1401a37f0(param_2 + 0x70);
  return;
}



void Unwind_140207800(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x100);
  return;
}



void Unwind_140207810(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x78);
  return;
}



void Unwind_140207820(undefined8 param_1,longlong param_2)

{
  FUN_1401a37f0(param_2 + 0xb0);
  return;
}



void Unwind_140207830(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xe10);
  return;
}



void Unwind_140207850(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 400);
  return;
}



void Unwind_140207860(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xe10);
  return;
}



void Unwind_140207880(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x60) + 8);
  return;
}



void Unwind_140207890(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x28);
  return;
}



void Unwind_1402078a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_1402078b0(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0x80);
  return;
}



void Unwind_1402078c0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x80) + 0x120);
  return;
}



void Unwind_1402078e0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402078f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_1401617d0(*(longlong *)(param_2 + 0x48) + 0x38);
  return;
}



void Unwind_140207900(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140207910(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140207920(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140207930(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140207940(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_140207950(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x38);
  return;
}



void Unwind_140207960(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x78);
  return;
}



void Unwind_140207970(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_140207980(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_140207990(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_1402079a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x78);
  return;
}



void Unwind_1402079b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1a8);
  return;
}



void Unwind_1402079c0(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(param_2 + 0xb0);
  return;
}



void Unwind_1402079d0(undefined8 param_1,longlong param_2)

{
  FUN_140140da0(param_2 + 0x58);
  return;
}



void Unwind_1402079e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_1402079f0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x138);
  return;
}



void Unwind_140207a00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 400);
  return;
}



void Unwind_140207a10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x50);
  return;
}



void Unwind_140207a20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140207a30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x170);
  return;
}



void Unwind_140207a40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x180);
  return;
}



void Unwind_140207a50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x160);
  return;
}



void Unwind_140207a60(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xd8);
  return;
}



void Unwind_140207a70(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x88);
  return;
}



void Unwind_140207a80(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140207a90(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140207aa0(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 800);
  return;
}



void Unwind_140207ab0(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x3b0);
  return;
}



void Unwind_140207ac0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x38));
  return;
}



void Unwind_140207ad0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x38));
  return;
}



void Unwind_140207ae0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x128));
  return;
}



void Unwind_140207af0(undefined8 param_1,longlong param_2)

{
  FUN_140161860(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140207b00(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_140207b10(undefined8 param_1,longlong param_2)

{
  FUN_140174690(*(longlong *)(param_2 + 0x20) + 0x18);
  return;
}



void Unwind_140207b20(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140207b30(undefined8 param_1,longlong param_2)

{
  FUN_140174690(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_140207b40(undefined8 param_1,longlong param_2)

{
  FUN_140174710(*(longlong *)(param_2 + 0x40) + 0x20);
  return;
}



void Unwind_140207b50(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x40) + 0x28);
  return;
}



void Unwind_140207b60(undefined8 param_1,longlong param_2)

{
  FUN_140050680(*(longlong *)(param_2 + 0x40) + 0x50);
  return;
}



void Unwind_140207b70(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x40) + 0x78);
  return;
}



void Unwind_140207b80(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x48) + 8);
  return;
}



void Unwind_140207b90(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(*(longlong *)(param_2 + 0x80) + 8);
  return;
}



void Unwind_140207ba0(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(*(longlong *)(param_2 + 0x80) + 0x30);
  return;
}



void Unwind_140207bb0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140207bc0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140207bd0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x50) & 1) != 0) {
    *(uint *)(param_2 + 0x50) = *(uint *)(param_2 + 0x50) & 0xfffffffe;
    FUN_140171c70(*(undefined8 *)(param_2 + 0x48));
  }
  return;
}



void Unwind_140207c00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140207c10(undefined8 param_1,longlong param_2)

{
  FUN_140171c70(param_2 + 0x50);
  return;
}



void Unwind_140207c20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140207c30(undefined8 param_1,longlong param_2)

{
  FUN_14015c1b0(param_2 + 0x48);
  return;
}



void Unwind_140207c40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140207c50(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0xa0);
  return;
}



void Unwind_140207c60(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0xb8) + 0x120);
  return;
}



void Unwind_140207c80(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0xb0);
  return;
}



void Unwind_140207c90(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0xb0) + 0x120);
  return;
}



void Unwind_140207cb0(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0x20);
  return;
}



void Unwind_140207cc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 200);
  return;
}



void Unwind_140207cd0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140207ce0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(*(longlong *)(param_2 + 0x50) + 8);
  return;
}



void Unwind_140207cf0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(*(longlong *)(param_2 + 0x50) + 0x18);
  return;
}



void Unwind_140207d00(undefined8 param_1,longlong param_2)

{
  FUN_140174710(*(longlong *)(param_2 + 0x50) + 0x20);
  return;
}



void Unwind_140207d10(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x50) + 0x28);
  return;
}



void Unwind_140207d20(undefined8 param_1,longlong param_2)

{
  FUN_140050680(*(longlong *)(param_2 + 0x50) + 0x50);
  return;
}



void Unwind_140207d30(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x50) + 0x78);
  return;
}



void Unwind_140207d40(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x38);
  return;
}



void Unwind_140207d50(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x48);
  return;
}



void Unwind_140207d60(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x30);
  return;
}



void Unwind_140207d70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x160),0x60);
  return;
}



void Unwind_140207d90(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x20),*(undefined8 *)(param_2 + 0x160));
  return;
}



void Unwind_140207db0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x160);
  return;
}



void Unwind_140207dc0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140207dd0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x160);
  return;
}



void Unwind_140207de0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140207df0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140207e00(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x40);
  return;
}



void Unwind_140207e10(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x40);
  return;
}



void Unwind_140207e20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140207e30(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xe50);
  return;
}



void Unwind_140207e50(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x1d0);
  return;
}



void Unwind_140207e60(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xe50);
  return;
}



void Unwind_140207e80(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_140207e90(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x98);
  return;
}



void Unwind_140207ea0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0xa8);
  return;
}



void Unwind_140207eb0(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x90);
  return;
}



void Unwind_140207ec0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x20);
  return;
}



void Unwind_140207ed0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140207ee0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x98);
  return;
}



void Unwind_140207ef0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0xa8);
  return;
}



void Unwind_140207f00(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0xb0);
  return;
}



void Unwind_140207f10(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xb8);
  return;
}



void Unwind_140207f20(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0xe0);
  return;
}



void Unwind_140207f30(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x108);
  return;
}



void Unwind_140207f40(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_140207f50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140207f60(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 200);
  return;
}



void Unwind_140207f70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d0);
  return;
}



void Unwind_140207f80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140207f90(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x118);
  return;
}



void Unwind_140207fa0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xf0);
  return;
}



void Unwind_140207fb0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x40);
  return;
}



void Unwind_140207fc0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x90);
  return;
}



void Unwind_140207fd0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x140);
  return;
}



undefined8 Catch_140207fe0(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x1c0);
  if (*(longlong *)(lVar1 + 0x758) != 0) {
    FUN_1401562a0(param_2 + 0x40,*(undefined8 *)(param_2 + 0x160));
    *(undefined4 *)(param_2 + 0x58) = *(undefined4 *)(*(longlong *)(param_2 + 0x1c8) + 0x70);
    plVar2 = *(longlong **)(lVar1 + 0x758);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x40);
    FUN_140156260(param_2 + 0x40);
  }
  return 0x14017734c;
}



void Unwind_140208050(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x40);
  return;
}



undefined8 Catch_140208060(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x1c0);
  if (*(longlong *)(lVar1 + 0x758) != 0) {
    FUN_140156550(param_2 + 0x40,*(undefined8 *)(param_2 + 0x150));
    *(undefined4 *)(param_2 + 0x58) = *(undefined4 *)(*(longlong *)(param_2 + 0x1c8) + 0x70);
    plVar2 = *(longlong **)(lVar1 + 0x758);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x40);
    FUN_140156260(param_2 + 0x40);
  }
  return 0x14017734c;
}



void Unwind_1402080d0(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x40);
  return;
}



undefined8 Catch_1402080e0(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x1c0);
  if (*(longlong *)(lVar1 + 0x758) != 0) {
    FUN_1401565d0(param_2 + 0x40,*(undefined8 *)(param_2 + 0x178));
    *(undefined4 *)(param_2 + 0x58) = *(undefined4 *)(*(longlong *)(param_2 + 0x1c8) + 0x70);
    plVar2 = *(longlong **)(lVar1 + 0x758);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x40);
    FUN_140156260(param_2 + 0x40);
  }
  return 0x14017734c;
}



void Unwind_140208150(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x40);
  return;
}



undefined8 Catch_All_140208160(void)

{
  return 0x1401778a3;
}



void Unwind_140208180(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(*(longlong *)(param_2 + 0x48) + 8);
  return;
}



void Unwind_140208190(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402081a0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402081b0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x70),*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402081d0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(*(longlong *)(param_2 + 0x78) + 8);
  return;
}



void Unwind_1402081e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xa0);
  return;
}



void Unwind_1402081f0(undefined8 param_1,longlong param_2)

{
  FUN_14015bdb0(param_2 + 0x2d0);
  return;
}



void Unwind_140208200(undefined8 param_1,longlong param_2)

{
  FUN_14015bdb0(param_2 + 0x480);
  return;
}



void Unwind_140208210(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_140208220(undefined8 param_1,longlong param_2)

{
  FUN_140174d30(param_2 + 0x120);
  return;
}



void Unwind_140208230(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x128);
  return;
}



void Unwind_140208240(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x60) + 8);
  return;
}



void Unwind_140208250(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x60) + 8);
  return;
}



void Unwind_140208260(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_140208270(undefined8 param_1,longlong param_2)

{
  FUN_140174d30(param_2 + 0x120);
  return;
}



void Unwind_140208280(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x128);
  return;
}



void Unwind_140208290(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x78) + 8);
  return;
}



void Unwind_1402082a0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x78) + 8);
  return;
}



void Unwind_1402082b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_1402082c0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_1402082d0(undefined8 param_1,longlong param_2)

{
  FUN_14015bdb0(param_2 + 0x120);
  return;
}



void Unwind_1402082e0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x1120);
  return;
}



void Unwind_1402082f0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x2a30);
  return;
}



void Unwind_140208310(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x1db0);
  return;
}



void Unwind_140208320(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x2a30);
  return;
}



void Unwind_140208340(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xc0);
  return;
}



void Unwind_140208350(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1da0);
  return;
}



void Unwind_140208370(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x78) + 8);
  return;
}



void Unwind_140208380(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140208390(undefined8 param_1,longlong param_2)

{
  FUN_1401883e0(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402083a0(undefined8 param_1,longlong param_2)

{
  FUN_1401a56e0(*(longlong *)(param_2 + 0x80) + 0x60);
  return;
}



void Unwind_1402083b0(undefined8 param_1,longlong param_2)

{
  FUN_14015a470(*(longlong *)(param_2 + 0x80) + 0x68);
  return;
}



void Unwind_1402083c0(undefined8 param_1,longlong param_2)

{
  FUN_14015a4b0(*(longlong *)(param_2 + 0x80) + 0x70);
  return;
}



void Unwind_1402083d0(undefined8 param_1,longlong param_2)

{
  FUN_1401ab800(*(longlong *)(param_2 + 0x80) + 0x78);
  return;
}



void Unwind_1402083e0(undefined8 param_1,longlong param_2)

{
  FUN_1401af530(*(longlong *)(param_2 + 0x80) + 0xa8);
  return;
}



void Unwind_140208400(undefined8 param_1,longlong param_2)

{
  FUN_14015a420(*(longlong *)(param_2 + 0x80) + 0xb0);
  return;
}



void Unwind_140208420(undefined8 param_1,longlong param_2)

{
  FUN_140177d20(*(longlong *)(param_2 + 0x80) + 0xb8);
  return;
}



void Unwind_140208440(undefined8 param_1,longlong param_2)

{
  FUN_14015a530(*(longlong *)(param_2 + 0x80) + 0x118);
  return;
}



void Unwind_140208460(undefined8 param_1,longlong param_2)

{
  FUN_14015a4f0(*(longlong *)(param_2 + 0x80) + 0x120);
  return;
}



void Unwind_140208480(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x80) + 0x128);
  return;
}



void Unwind_1402084a0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x80) + 0x160);
  return;
}



void Unwind_1402084c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(longlong *)(param_2 + 0x80) + 0x210);
  return;
}



void Unwind_1402084e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(longlong *)(param_2 + 0x80) + 0x218);
  return;
}



void Unwind_140208500(undefined8 param_1,longlong param_2)

{
  FUN_1401b2400(*(longlong *)(param_2 + 0x80) + 0x280);
  return;
}



void Unwind_140208520(undefined8 param_1,longlong param_2)

{
  FUN_140171e00(*(longlong *)(param_2 + 0x80) + 0x2d8);
  return;
}



void Unwind_140208540(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140161a30(*(longlong *)(param_2 + 0x80) + 0x388);
  return;
}



void Unwind_140208560(undefined8 param_1,longlong param_2)

{
  FUN_14015c010(*(longlong *)(param_2 + 0x80) + 0x3e0);
  return;
}



void Unwind_140208580(undefined8 param_1,longlong param_2)

{
  FUN_140177890(*(longlong *)(param_2 + 0x80) + 0x400);
  return;
}



void Unwind_1402085a0(undefined8 param_1,longlong param_2)

{
  FUN_140177ed0(*(longlong *)(param_2 + 0x80) + 0x458);
  return;
}



void Unwind_1402085c0(undefined8 param_1,longlong param_2)

{
  FUN_14015ae50(*(longlong *)(param_2 + 0x80) + 0x478);
  return;
}



void Unwind_1402085e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140157bd0(*(longlong *)(param_2 + 0x80) + 0x480);
  return;
}



void Unwind_140208600(undefined8 param_1,longlong param_2)

{
  FUN_140156cd0(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140208610(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156cd0(*(longlong *)(param_2 + 0x80) + 0x4a8);
  return;
}



void Unwind_140208630(undefined8 param_1,longlong param_2)

{
  FUN_14016b5f0(*(longlong *)(param_2 + 0x80) + 0x6c8);
  return;
}



void Unwind_140208650(undefined8 param_1,longlong param_2)

{
  FUN_140170480(*(longlong *)(param_2 + 0x80) + 0x6f0);
  return;
}



void Unwind_140208670(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x80) + 0x748);
  return;
}



void Unwind_140208690(undefined8 param_1,longlong param_2)

{
  FUN_140161920(*(longlong *)(param_2 + 0x80) + 0x750);
  return;
}



void Unwind_1402086b0(undefined8 param_1,longlong param_2)

{
  FUN_14015bfe0(*(longlong *)(param_2 + 0x80) + 0x788);
  return;
}



void Unwind_1402086d0(undefined8 param_1,longlong param_2)

{
  FUN_14015bfe0(*(longlong *)(param_2 + 0x80) + 0x790);
  return;
}



void Unwind_1402086f0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x80) + 0x798);
  return;
}



void Unwind_140208710(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x80) + 2000);
  return;
}



void Unwind_140208730(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14015c7a0(*(longlong *)(param_2 + 0x80) + 0x808);
  return;
}



void Unwind_140208750(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14015c8b0(*(longlong *)(param_2 + 0x80) + 0x828);
  return;
}



void Unwind_140208770(undefined8 param_1,longlong param_2)

{
  FUN_14015a5c0(*(longlong *)(param_2 + 0x80) + 0x840);
  return;
}



void Unwind_140208790(undefined8 param_1,longlong param_2)

{
  FUN_1401aa280(*(longlong *)(param_2 + 0x80) + 0xc48);
  return;
}



void Unwind_1402087b0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x80) + 0xc50);
  return;
}



void Unwind_1402087d0(undefined8 param_1,longlong param_2)

{
  FUN_1401b2400(*(longlong *)(param_2 + 0x80) + 0xc78);
  return;
}



void Unwind_1402087f0(undefined8 param_1,longlong param_2)

{
  FUN_140187ae0(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140208800(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140187ae0(*(longlong *)(param_2 + 0x80) + 0xcd0);
  return;
}



void Unwind_140208820(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140161a30(*(longlong *)(param_2 + 0x80) + 0x16e8);
  return;
}



void Unwind_140208840(undefined8 param_1,longlong param_2)

{
  thunk_FUN_1401b2400(*(longlong *)(param_2 + 0x80) + 0x1740);
  return;
}



void Unwind_140208860(undefined8 param_1,longlong param_2)

{
  FUN_14015c040(*(longlong *)(param_2 + 0x80) + 0x17a0);
  return;
}



void Unwind_140208880(undefined8 param_1,longlong param_2)

{
  FUN_14015c080(*(longlong *)(param_2 + 0x80) + 0x17c8);
  return;
}



void Unwind_1402088a0(undefined8 param_1,longlong param_2)

{
  FUN_14015c180(*(longlong *)(param_2 + 0x80) + 0x17f0);
  return;
}



void Unwind_1402088c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x80) + 0x1808);
  return;
}



void Unwind_1402088e0(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(*(longlong *)(param_2 + 0x80) + 0x1848);
  return;
}



void Unwind_140208900(undefined8 param_1,longlong param_2)

{
  FUN_140161920(param_2 + 0x88);
  return;
}



void Unwind_140208910(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140208920(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_140208930(undefined8 param_1,longlong param_2)

{
  FUN_140174d30(param_2 + 0x28);
  return;
}



void Unwind_140208940(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x170),*(undefined8 *)(param_2 + 0x160));
  return;
}



void Unwind_140208970(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(*(longlong *)(param_2 + 0x178) + 8);
  return;
}



void Unwind_140208980(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_140208990(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x160) + 8);
  return;
}



void Unwind_1402089a0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x88);
  return;
}



void Unwind_1402089b0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x98);
  return;
}



void Unwind_1402089c0(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x80);
  return;
}



void Unwind_1402089d0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x50);
  return;
}



void Unwind_1402089e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_1402089f0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x30);
  return;
}



void Unwind_140208a00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140208a10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140208a20(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x88);
  return;
}



void Unwind_140208a30(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x98);
  return;
}



void Unwind_140208a40(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0xa0);
  return;
}



void Unwind_140208a50(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xa8);
  return;
}



void Unwind_140208a60(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0xd0);
  return;
}



void Unwind_140208a70(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xf8);
  return;
}



void Unwind_140208a80(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x38) + 8);
  return;
}



void Unwind_140208a90(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(param_2 + 0x30);
  return;
}



void Unwind_140208aa0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_1401617d0(param_2 + 0x60);
  return;
}



void Unwind_140208ab0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x80);
  return;
}



void Unwind_140208ac0(undefined8 param_1,longlong param_2)

{
  FUN_140171c70(param_2 + 0x60);
  return;
}



void Unwind_140208ad0(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0x50);
  return;
}



void Unwind_140208ae0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140208af0(undefined8 param_1,longlong param_2)

{
  FUN_140171c70(param_2 + 0xa0);
  return;
}



void Unwind_140208b00(undefined8 param_1,longlong param_2)

{
  FUN_140174790(param_2 + 0x90);
  return;
}



void Unwind_140208b10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140208b20(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_140208b30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140208b40(undefined8 param_1,longlong param_2)

{
  FUN_140171c70(param_2 + 0xa0);
  return;
}



void Unwind_140208b50(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(undefined8 *)(param_2 + 0x228));
  return;
}



void Unwind_140208b60(undefined8 param_1,longlong param_2)

{
  FUN_140171c70(param_2 + 0x80);
  return;
}



void Unwind_140208b70(undefined8 param_1,longlong param_2)

{
  FUN_140171c70(param_2 + 0xd8);
  return;
}



void Unwind_140208b80(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0x88);
  return;
}



void Unwind_140208b90(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0x128);
  return;
}



void Unwind_140208ba0(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0x130);
  return;
}



void Unwind_140208bb0(undefined8 param_1,longlong param_2)

{
  FUN_140161860(param_2 + 0xf8);
  return;
}



undefined * Catch_140208bc0(undefined8 param_1,longlong param_2)

{
  int *piVar1;
  undefined *puVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  undefined8 uVar5;
  undefined *puVar6;
  
  FUN_1401568c0();
  *(undefined **)(param_2 + 0x108) = PTR_DAT_1403200a0;
  uVar5 = (**(code **)(**(longlong **)(param_2 + 0x3e0) + 8))();
  *(longlong *)(param_2 + 0x5a0) = param_2 + 0x5a8;
  FUN_140142dc0(param_2 + 0x5a0,uVar5,3);
  memcpy((void *)(param_2 + 0x410),(void *)(param_2 + 0x5a0),0x108);
  uVar3 = (**(code **)**(undefined8 **)(param_2 + 0xb0))();
  uVar4 = (**(code **)**(undefined8 **)(param_2 + 0xa8))();
  FUN_14004ce50(param_2 + 0x108,&DAT_140261210,uVar4,uVar3,param_2 + 0x410);
  if (*(void **)(param_2 + 0x5a0) != (void *)(param_2 + 0x5a8)) {
    free(*(void **)(param_2 + 0x5a0));
  }
  puVar2 = *(undefined **)(param_2 + 0x108);
  puVar6 = puVar2;
  if (puVar2 == (undefined *)0x0) {
    puVar6 = PTR_DAT_1403200a0;
  }
  FUN_140196a90(*(undefined8 *)(*(longlong *)(param_2 + 0x150) + 0x17f0),1,puVar6);
  if (((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) &&
     (puVar2 + -8 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    *(undefined8 *)(param_2 + 0x340) = uVar5;
    FUN_140156b50(uVar5);
    *(undefined1 *)(param_2 + 0x348) = 1;
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
    FUN_140156be0(uVar5);
    *(undefined1 *)(param_2 + 0x348) = 0;
  }
  *(undefined **)(param_2 + 0x108) = PTR_DAT_1403200a0;
  return &DAT_14017b3ce;
}



void Unwind_140208d20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x108);
  return;
}



void Unwind_140208d30(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x5a0);
  return;
}



void Unwind_140208d40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x340);
  return;
}



void Unwind_140208d50(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 600);
  return;
}



void Unwind_140208d60(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x280);
  return;
}



void Unwind_140208d70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x110);
  return;
}



void Unwind_140208d80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 800);
  return;
}



void Unwind_140208d90(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x70) & 1) != 0) {
    *(uint *)(param_2 + 0x70) = *(uint *)(param_2 + 0x70) & 0xfffffffe;
    FUN_1401858d0(param_2 + 0x1d8);
  }
  return;
}



void Unwind_140208dc0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x70) & 2) != 0) {
    *(uint *)(param_2 + 0x70) = *(uint *)(param_2 + 0x70) & 0xfffffffd;
    FUN_1401858d0(param_2 + 0x2f8);
  }
  return;
}



void Unwind_140208df0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x70) & 4) != 0) {
    *(uint *)(param_2 + 0x70) = *(uint *)(param_2 + 0x70) & 0xfffffffb;
    FUN_1401858d0(param_2 + 0x188);
  }
  return;
}



void Unwind_140208e20(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x70) & 8) != 0) {
    *(uint *)(param_2 + 0x70) = *(uint *)(param_2 + 0x70) & 0xfffffff7;
    FUN_1401858d0(param_2 + 0x2a8);
  }
  return;
}



void Unwind_140208e50(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x70) & 0x10) != 0) {
    *(uint *)(param_2 + 0x70) = *(uint *)(param_2 + 0x70) & 0xffffffef;
    FUN_1401858d0(param_2 + 0x1b0);
  }
  return;
}



void Unwind_140208e80(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x70) & 0x20) != 0) {
    *(uint *)(param_2 + 0x70) = *(uint *)(param_2 + 0x70) & 0xffffffdf;
    FUN_1401858d0(param_2 + 0x230);
  }
  return;
}



void Unwind_140208eb0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x70) & 0x40) != 0) {
    *(uint *)(param_2 + 0x70) = *(uint *)(param_2 + 0x70) & 0xffffffbf;
    FUN_1401858d0(param_2 + 0x160);
  }
  return;
}



void Unwind_140208ee0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x70) & 0x80) != 0) {
    *(uint *)(param_2 + 0x70) = *(uint *)(param_2 + 0x70) & 0xffffff7f;
    FUN_1401858d0(param_2 + 0x2d0);
  }
  return;
}



void Unwind_140208f10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x118);
  return;
}



void Unwind_140208f20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x140);
  return;
}



void Unwind_140208f30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x330);
  return;
}



void Unwind_140208f40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x200);
  return;
}



void Unwind_140208f50(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_140208f60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140208f70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x130);
  return;
}



void Unwind_140208f80(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x48);
  return;
}



void Unwind_140208f90(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x58);
  return;
}



void Unwind_140208fa0(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x40);
  return;
}



void Unwind_140208fb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x20),0x60);
  return;
}



void Unwind_140208fd0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x28),*(undefined8 *)(param_2 + 0x20));
  return;
}



void Unwind_140208ff0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x20);
  return;
}



void Unwind_140209000(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140209010(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x150);
  return;
}



void Unwind_140209020(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x48);
  return;
}



void Unwind_140209030(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x58);
  return;
}



void Unwind_140209040(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0x60);
  return;
}



void Unwind_140209050(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x68);
  return;
}



void Unwind_140209060(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x90);
  return;
}



void Unwind_140209070(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xb8);
  return;
}



void Unwind_140209080(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x28) + 8);
  return;
}



void Unwind_140209090(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_1402090a0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_1402090b0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_1402090c0(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x20);
  return;
}



void Unwind_1402090d0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_1402090e0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_1402090f0(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0x40);
  return;
}



void Unwind_140209100(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x48);
  return;
}



void Unwind_140209110(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x70);
  return;
}



void Unwind_140209120(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x98);
  return;
}



void Unwind_140209130(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x150) + 8);
  return;
}



void Unwind_140209140(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x188));
  return;
}



void Unwind_140209150(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x120);
  return;
}



void Unwind_140209160(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_140209170(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_140209180(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x20);
  return;
}



void Unwind_140209190(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x180),0x60);
  return;
}



void Unwind_1402091b0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 400),*(undefined8 *)(param_2 + 0x180));
  return;
}



void Unwind_1402091e0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x180);
  return;
}



void Unwind_1402091f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_140209200(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_140209210(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_140209220(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0x40);
  return;
}



void Unwind_140209230(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x48);
  return;
}



void Unwind_140209240(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x70);
  return;
}



void Unwind_140209250(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x98);
  return;
}



void Unwind_140209260(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x180) + 8);
  return;
}



void Unwind_140209270(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(param_2 + 0x28);
  return;
}



void Unwind_140209280(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(param_2 + 0x50);
  return;
}



void Unwind_140209290(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x98);
  return;
}



void Unwind_1402092a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0xa0);
  return;
}



void Unwind_1402092b0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x38);
  return;
}



void Unwind_1402092c0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xa8) + 8);
  return;
}



void Unwind_1402092d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402092e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402092f0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(*(undefined8 *)(param_2 + 0x188));
  return;
}



void Unwind_140209300(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x120);
  return;
}



void Unwind_140209310(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_140209320(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_140209330(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x20);
  return;
}



void Unwind_140209340(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x180),0x60);
  return;
}



void Unwind_140209360(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 400),*(undefined8 *)(param_2 + 0x180));
  return;
}



void Unwind_140209390(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x180);
  return;
}



void Unwind_1402093a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_1402093b0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_1402093c0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_1402093d0(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0x40);
  return;
}



void Unwind_1402093e0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x48);
  return;
}



void Unwind_1402093f0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x70);
  return;
}



void Unwind_140209400(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x98);
  return;
}



void Unwind_140209410(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x180) + 8);
  return;
}



void Unwind_140209420(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_140209430(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_140209440(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x20);
  return;
}



void Unwind_140209450(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_140209460(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_140209470(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0x40);
  return;
}



void Unwind_140209480(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x48);
  return;
}



void Unwind_140209490(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x70);
  return;
}



void Unwind_1402094a0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x98);
  return;
}



void Unwind_1402094b0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x140) + 8);
  return;
}



void Unwind_1402094c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402094d0(undefined8 param_1,longlong param_2)

{
  FUN_140171c70(param_2 + 0x60);
  return;
}



void Unwind_1402094e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_1402094f0(undefined8 param_1,longlong param_2)

{
  FUN_140171c70(param_2 + 0x90);
  return;
}



void Unwind_140209500(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_140209510(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_140209520(undefined8 param_1,longlong param_2)

{
  FUN_14015bdb0(param_2 + 0xe0);
  return;
}



void Unwind_140209530(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_140209540(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x68);
  return;
}



void Unwind_140209550(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x90);
  return;
}



void Unwind_140209560(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x38),0xf8);
  return;
}



void Unwind_140209580(undefined8 param_1,longlong param_2)

{
  FUN_140171c70(param_2 + 0x38);
  return;
}



void Unwind_140209590(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402095a0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x40);
  return;
}



void Unwind_1402095b0(undefined8 param_1,longlong param_2)

{
  FUN_140171c70(param_2 + 0x30);
  return;
}



void Unwind_1402095c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_1402095d0(undefined8 param_1,longlong param_2)

{
  FUN_140171c70(param_2 + 0x90);
  return;
}



void Unwind_1402095e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x118);
  return;
}



void Unwind_1402095f0(undefined8 param_1,longlong param_2)

{
  FUN_14015ae50(param_2 + 0x1a0);
  return;
}



void Unwind_140209600(undefined8 param_1,longlong param_2)

{
  FUN_14015dc10(param_2 + 0x30);
  return;
}



void Unwind_140209610(undefined8 param_1,longlong param_2)

{
  FUN_14015dc10(param_2 + 0x30);
  return;
}



void Unwind_140209620(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x60);
  return;
}



void Unwind_140209630(undefined8 param_1,longlong param_2)

{
  FUN_14016b9f0(param_2 + 0x58);
  return;
}



void Unwind_140209640(undefined8 param_1,longlong param_2)

{
  FUN_14016b5d0(param_2 + 0x20);
  return;
}



void Unwind_140209650(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xf0);
  return;
}



void Unwind_140209660(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x98);
  return;
}



void Unwind_140209670(undefined8 param_1,longlong param_2)

{
  FUN_14016b9f0(param_2 + 0x90);
  return;
}



void Unwind_140209680(undefined8 param_1,longlong param_2)

{
  FUN_14016b5d0(param_2 + 0x20);
  return;
}



void Unwind_140209690(undefined8 param_1,longlong param_2)

{
  FUN_14015dc10(param_2 + 200);
  return;
}



void Unwind_1402096a0(undefined8 param_1,longlong param_2)

{
  FUN_14015dc10(param_2 + 200);
  return;
}



void Unwind_1402096b0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x98);
  return;
}



void Unwind_1402096c0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 400) + 8);
  return;
}



void Unwind_1402096d0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 400) + 8);
  return;
}



void Unwind_1402096e0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x60);
  return;
}



void Unwind_1402096f0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 400) + 8);
  return;
}



void Unwind_140209700(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x48);
  return;
}



void Unwind_140209710(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140209720(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



void Unwind_140209730(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x80);
  return;
}



void Unwind_140209740(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xb8);
  return;
}



void Unwind_140209750(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x90);
  return;
}



void Unwind_140209760(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 400);
  return;
}



void Unwind_140209770(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140209780(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_140209790(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x198);
  return;
}



void Unwind_1402097a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_1402097b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x90);
  return;
}



void Unwind_1402097c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_1402097d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402097e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



void Unwind_1402097f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_140209800(undefined8 param_1,longlong param_2)

{
  FUN_1401883e0(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140209810(undefined8 param_1,longlong param_2)

{
  FUN_1401a56e0(*(longlong *)(param_2 + 0x70) + 0x60);
  return;
}



void Unwind_140209820(undefined8 param_1,longlong param_2)

{
  FUN_14015a470(*(longlong *)(param_2 + 0x70) + 0x68);
  return;
}



void Unwind_140209830(undefined8 param_1,longlong param_2)

{
  FUN_14015a4b0(*(longlong *)(param_2 + 0x70) + 0x70);
  return;
}



void Unwind_140209840(undefined8 param_1,longlong param_2)

{
  FUN_1401ab800(*(longlong *)(param_2 + 0x70) + 0x78);
  return;
}



void Unwind_140209850(undefined8 param_1,longlong param_2)

{
  FUN_1401af530(*(longlong *)(param_2 + 0x70) + 0xa8);
  return;
}



void Unwind_140209870(undefined8 param_1,longlong param_2)

{
  FUN_14015a420(*(longlong *)(param_2 + 0x70) + 0xb0);
  return;
}



void Unwind_140209890(undefined8 param_1,longlong param_2)

{
  FUN_140177d20(*(longlong *)(param_2 + 0x70) + 0xb8);
  return;
}



void Unwind_1402098b0(undefined8 param_1,longlong param_2)

{
  FUN_14015a530(*(longlong *)(param_2 + 0x70) + 0x118);
  return;
}



void Unwind_1402098d0(undefined8 param_1,longlong param_2)

{
  FUN_14015a4f0(*(longlong *)(param_2 + 0x70) + 0x120);
  return;
}



void Unwind_1402098f0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x70) + 0x128);
  return;
}



void Unwind_140209910(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x70) + 0x160);
  return;
}



void Unwind_140209930(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(longlong *)(param_2 + 0x70) + 0x210);
  return;
}



void Unwind_140209950(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(longlong *)(param_2 + 0x70) + 0x218);
  return;
}



void Unwind_140209970(undefined8 param_1,longlong param_2)

{
  FUN_1401b2400(*(longlong *)(param_2 + 0x70) + 0x280);
  return;
}



void Unwind_140209990(undefined8 param_1,longlong param_2)

{
  FUN_140171e00(*(longlong *)(param_2 + 0x70) + 0x2d8);
  return;
}



void Unwind_1402099b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140161a30(*(longlong *)(param_2 + 0x70) + 0x388);
  return;
}



void Unwind_1402099d0(undefined8 param_1,longlong param_2)

{
  FUN_14015c010(*(longlong *)(param_2 + 0x70) + 0x3e0);
  return;
}



void Unwind_1402099f0(undefined8 param_1,longlong param_2)

{
  FUN_140177890(*(longlong *)(param_2 + 0x70) + 0x400);
  return;
}



void Unwind_140209a10(undefined8 param_1,longlong param_2)

{
  FUN_140177ed0(*(longlong *)(param_2 + 0x70) + 0x458);
  return;
}



void Unwind_140209a30(undefined8 param_1,longlong param_2)

{
  FUN_14015ae50(*(longlong *)(param_2 + 0x70) + 0x478);
  return;
}



void Unwind_140209a50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140157bd0(*(longlong *)(param_2 + 0x70) + 0x480);
  return;
}



void Unwind_140209a70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156cd0(*(longlong *)(param_2 + 0x70) + 0x4a8);
  return;
}



void Unwind_140209a90(undefined8 param_1,longlong param_2)

{
  FUN_14016b5f0(*(longlong *)(param_2 + 0x70) + 0x6c8);
  return;
}



void Unwind_140209ab0(undefined8 param_1,longlong param_2)

{
  FUN_140170480(*(longlong *)(param_2 + 0x70) + 0x6f0);
  return;
}



void Unwind_140209ad0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x70) + 0x748);
  return;
}



void Unwind_140209af0(undefined8 param_1,longlong param_2)

{
  FUN_140161920(*(longlong *)(param_2 + 0x70) + 0x750);
  return;
}



void Unwind_140209b10(undefined8 param_1,longlong param_2)

{
  FUN_14015bfe0(*(longlong *)(param_2 + 0x70) + 0x788);
  return;
}



void Unwind_140209b30(undefined8 param_1,longlong param_2)

{
  FUN_14015bfe0(*(longlong *)(param_2 + 0x70) + 0x790);
  return;
}



void Unwind_140209b50(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x70) + 0x798);
  return;
}



void Unwind_140209b70(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x70) + 2000);
  return;
}



void Unwind_140209b90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14015c7a0(*(longlong *)(param_2 + 0x70) + 0x808);
  return;
}



void Unwind_140209bb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14015c8b0(*(longlong *)(param_2 + 0x70) + 0x828);
  return;
}



void Unwind_140209bd0(undefined8 param_1,longlong param_2)

{
  FUN_14015a5c0(*(longlong *)(param_2 + 0x70) + 0x840);
  return;
}



void Unwind_140209bf0(undefined8 param_1,longlong param_2)

{
  FUN_1401aa280(*(longlong *)(param_2 + 0x70) + 0xc48);
  return;
}



void Unwind_140209c10(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x70) + 0xc50);
  return;
}



void Unwind_140209c30(undefined8 param_1,longlong param_2)

{
  FUN_1401b2400(*(longlong *)(param_2 + 0x70) + 0xc78);
  return;
}



void Unwind_140209c50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140187ae0(*(longlong *)(param_2 + 0x70) + 0xcd0);
  return;
}



void Unwind_140209c70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140161a30(*(longlong *)(param_2 + 0x70) + 0x16e8);
  return;
}



void Unwind_140209c90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_1401b2400(*(longlong *)(param_2 + 0x70) + 0x1740);
  return;
}



void Unwind_140209cb0(undefined8 param_1,longlong param_2)

{
  FUN_14015c040(*(longlong *)(param_2 + 0x70) + 0x17a0);
  return;
}



void Unwind_140209cd0(undefined8 param_1,longlong param_2)

{
  FUN_14015c080(*(longlong *)(param_2 + 0x70) + 0x17c8);
  return;
}



void Unwind_140209cf0(undefined8 param_1,longlong param_2)

{
  FUN_14015c180(*(longlong *)(param_2 + 0x70) + 0x17f0);
  return;
}



void Unwind_140209d10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x70) + 0x1808);
  return;
}



void Unwind_140209d30(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(*(longlong *)(param_2 + 0x70) + 0x1848);
  return;
}



void Unwind_140209d50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140209d60(undefined8 param_1,longlong param_2)

{
  FUN_140170fe0(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140209d70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_140209d80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xe0);
  return;
}



void Unwind_140209d90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_140209da0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x68);
  return;
}



void Unwind_140209db0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_140209dc0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x40) + 0x28);
  return;
}



void Unwind_140209dd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x28),0x60);
  return;
}



void Unwind_140209df0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x58) & 1) != 0) {
    *(uint *)(param_2 + 0x58) = *(uint *)(param_2 + 0x58) & 0xfffffffe;
    FUN_14013c530(*(undefined8 *)(param_2 + 0x50));
  }
  return;
}



void Unwind_140209e20(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x100) & 1) != 0) {
    *(uint *)(param_2 + 0x100) = *(uint *)(param_2 + 0x100) & 0xfffffffe;
    thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x108));
  }
  return;
}



void Unwind_140209e50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x110);
  return;
}



void Unwind_140209e60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x98);
  return;
}



void Unwind_140209e70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x118);
  return;
}



void Unwind_140209e80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x78);
  return;
}



void Unwind_140209e90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x28);
  return;
}



void Unwind_140209ea0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_140209eb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x48);
  return;
}



void Unwind_140209ec0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_140209ed0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_140209ee0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_140209ef0(undefined8 param_1,longlong param_2)

{
  FUN_140158390(param_2 + 0x38);
  return;
}



void Unwind_140209f00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20);
  return;
}



void Unwind_140209f10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xa8);
  return;
}



void Unwind_140209f20(undefined8 param_1,longlong param_2)

{
  FUN_140158390(param_2 + 0x40);
  return;
}



void Unwind_140209f30(undefined8 param_1,longlong param_2)

{
  FUN_1401ac760(*(longlong *)(param_2 + 0x40) + 0x20);
  return;
}



void Unwind_140209f40(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x40);
  return;
}



void Unwind_140209f50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140209f60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140209f70(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x70) & 1) != 0) {
    *(uint *)(param_2 + 0x70) = *(uint *)(param_2 + 0x70) & 0xfffffffe;
    thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x68));
  }
  return;
}



void Unwind_140209fa0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140209fb0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140209fc0(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x40);
  return;
}



void Unwind_140209fd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x20);
  return;
}



void Unwind_140209fe0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140209ff0(void)

{
  FUN_140187ae0(&DAT_140328980);
  return;
}



void Unwind_14020a000(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020a010(void)

{
  DAT_1403293a0 = DAT_1403293a0 & 0xfffffffe;
  return;
}



void FUN_14020a030(undefined8 *param_1,longlong param_2)

{
  FUN_1401839b0(*(undefined4 *)*param_1,param_1,*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14020a060(undefined8 param_1,longlong param_2)

{
  FUN_140156930(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020a070(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020a080(void)

{
  DAT_1403293e8 = DAT_1403293e8 & 0xfffffffe;
  return;
}



void Unwind_14020a0a0(undefined8 param_1,longlong param_2)

{
  FUN_140156930(*(undefined8 *)(param_2 + 0xd0));
  return;
}



void Unwind_14020a0b0(undefined8 param_1,longlong param_2)

{
  FUN_1401858b0(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020a0c0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x90) + 0x28);
  return;
}



void Unwind_14020a0d0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x90) + 0x140);
  return;
}



void Unwind_14020a0f0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x90) + 0x200);
  return;
}



void Unwind_14020a110(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x90) + 0x2c0);
  return;
}



void Unwind_14020a130(undefined8 param_1,longlong param_2)

{
  FUN_1401858b0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020a140(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0x28);
  return;
}



void Unwind_14020a150(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x40) + 0x140);
  return;
}



void Unwind_14020a170(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x40) + 0x200);
  return;
}



void Unwind_14020a190(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x40) + 0x2c0);
  return;
}



void Unwind_14020a1b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20);
  return;
}



void Unwind_14020a1c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020a1d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020a1e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x30));
  return;
}



void Unwind_14020a1f0(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x50);
  return;
}



void Unwind_14020a200(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x20);
  return;
}



void Unwind_14020a210(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_14020a220(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_14020a230(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_14020a240(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x88);
  return;
}



void Unwind_14020a250(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x80);
  return;
}



void Unwind_14020a260(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020a270(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020a280(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020a290(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020a2a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020a2b0(void)

{
  DAT_140329ea8 = DAT_140329ea8 & 0xfffffffe;
  return;
}



void Unwind_14020a2d0(undefined8 param_1,longlong param_2)

{
  FUN_1401af530(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020a2e0(undefined8 param_1,longlong param_2)

{
  FUN_140188020(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_14020a2f0(undefined8 param_1,longlong param_2)

{
  FUN_140188060(*(longlong *)(param_2 + 0x40) + 0x30);
  return;
}



void Unwind_14020a300(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xb0);
  return;
}



void Unwind_14020a310(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0xb0);
  return;
}



void Unwind_14020a320(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x160);
  return;
}



void Unwind_14020a330(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1a70);
  return;
}



void Unwind_14020a350(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xdf0);
  return;
}



void Unwind_14020a360(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1a70);
  return;
}



void Unwind_14020a380(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xde0);
  return;
}



void Unwind_14020a3a0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020a3b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x118);
  return;
}



void Unwind_14020a3c0(undefined8 param_1,longlong param_2)

{
  FUN_14015bdb0(param_2 + 0x230);
  return;
}



void Unwind_14020a3d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_14020a3e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x138);
  return;
}



void Unwind_14020a3f0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xc0);
  return;
}



void Unwind_14020a400(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020a410(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x60);
  return;
}



void Unwind_14020a420(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_14020a430(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xe8) + 8);
  return;
}



void Unwind_14020a440(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_14020a450(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xf0);
  return;
}



void Unwind_14020a460(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x180);
  return;
}



void Unwind_14020a470(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x180);
  return;
}



void Unwind_14020a480(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x1070);
  return;
}



void Unwind_14020a490(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1060);
  return;
}



void Unwind_14020a4b0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x3e0);
  return;
}



void Unwind_14020a4c0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1060);
  return;
}



void Unwind_14020a4e0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1060);
  return;
}



void Unwind_14020a500(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x3e0);
  return;
}



void Unwind_14020a510(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1060);
  return;
}



void Unwind_14020a530(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1cf0);
  return;
}



void Unwind_14020a550(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x48) + 8);
  return;
}



void Unwind_14020a560(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14020a570(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x60);
  return;
}



void Unwind_14020a580(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x128);
  return;
}



void Unwind_14020a590(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x48) + 8);
  return;
}



void Unwind_14020a5a0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x48) + 8);
  return;
}



void Unwind_14020a5b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_14020a5c0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x60);
  return;
}



void Unwind_14020a5d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020a5e0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x60);
  return;
}



void Unwind_14020a5f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_14020a600(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020a610(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x58);
  return;
}



void Unwind_14020a620(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020a630(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_14020a640(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020a650(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x58);
  return;
}



void Unwind_14020a660(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020a670(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020a680(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020a690(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020a6a0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x58);
  return;
}



void Unwind_14020a6b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_14020a6c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020a6d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020a6e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020a6f0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x58);
  return;
}



void Unwind_14020a700(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_14020a710(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020a720(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020a730(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x70);
  return;
}



void Unwind_14020a740(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x48);
  return;
}



void Unwind_14020a750(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa8);
  return;
}



void Unwind_14020a760(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020a770(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xc0);
  return;
}



void Unwind_14020a780(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_14020a790(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_14020a7a0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x38) + 8);
  return;
}



void Unwind_14020a7b0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x38) + 8);
  return;
}



void Unwind_14020a7c0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xf0);
  return;
}



void Unwind_14020a7d0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0xf0);
  return;
}



void Unwind_14020a7e0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x1a0);
  return;
}



void Unwind_14020a7f0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xe30);
  return;
}



void Unwind_14020a800(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xe30);
  return;
}



void Unwind_14020a810(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x38) + 8);
  return;
}



void Unwind_14020a820(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x38) + 8);
  return;
}



void Unwind_14020a830(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x38) + 8);
  return;
}



void Unwind_14020a840(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x38) + 8);
  return;
}



void Unwind_14020a850(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x38) + 8);
  return;
}



void Unwind_14020a860(undefined8 param_1,longlong param_2)

{
  FUN_1401a56e0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020a870(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd0);
  return;
}



void Unwind_14020a880(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14018b0c0(*(longlong *)(param_2 + 0x80) + 0x38);
  return;
}



void Unwind_14020a890(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x80) + 0x50);
  return;
}



void Unwind_14020a8a0(undefined8 param_1,longlong param_2)

{
  FUN_1401a9270(*(longlong *)(param_2 + 0x80) + 0x88);
  return;
}



void Unwind_14020a8c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14018b0c0(*(longlong *)(param_2 + 0x40) + 0x38);
  return;
}



void Unwind_14020a8d0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0x50);
  return;
}



void Unwind_14020a8e0(undefined8 param_1,longlong param_2)

{
  FUN_1401a9270(*(longlong *)(param_2 + 0x40) + 0x88);
  return;
}



void Unwind_14020a900(undefined8 param_1,longlong param_2)

{
  FUN_1401a37f0(param_2 + 0x58);
  return;
}



void Unwind_14020a910(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020a920(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020a930(undefined8 param_1,longlong param_2)

{
  FUN_1401a37f0(param_2 + 0x98);
  return;
}



void Unwind_14020a940(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020a950(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020a960(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020a970(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020a980(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14020a990(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



undefined * Catch_14020a9a0(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0xd0);
  if (*(longlong *)(*(longlong *)(lVar1 + 0x148) + 0x758) != 0) {
    FUN_140156550(param_2 + 0x40,*(undefined8 *)(param_2 + 0x90));
    *(undefined4 *)(param_2 + 0x58) = *(undefined4 *)(*(longlong *)(param_2 + 0xd8) + 0x30);
    plVar2 = *(longlong **)(*(longlong *)(lVar1 + 0x148) + 0x758);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x40);
    FUN_140156260(param_2 + 0x40);
  }
  return &DAT_14018d78c;
}



void Unwind_14020aa20(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x40);
  return;
}



undefined * Catch_14020aa30(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0xd0);
  if (*(longlong *)(*(longlong *)(lVar1 + 0x148) + 0x758) != 0) {
    FUN_1401562a0(param_2 + 0x40,*(undefined8 *)(param_2 + 0xa0));
    *(undefined4 *)(param_2 + 0x58) = *(undefined4 *)(*(longlong *)(param_2 + 0xd8) + 0x30);
    plVar2 = *(longlong **)(*(longlong *)(lVar1 + 0x148) + 0x758);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x40);
    FUN_140156260(param_2 + 0x40);
  }
  return &DAT_14018d78c;
}



void Unwind_14020aab0(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x40);
  return;
}



undefined * Catch_14020aac0(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0xd0);
  if (*(longlong *)(*(longlong *)(lVar1 + 0x148) + 0x758) != 0) {
    FUN_1401565d0(param_2 + 0x40,*(undefined8 *)(param_2 + 0x98));
    *(undefined4 *)(param_2 + 0x58) = *(undefined4 *)(*(longlong *)(param_2 + 0xd8) + 0x30);
    plVar2 = *(longlong **)(*(longlong *)(lVar1 + 0x148) + 0x758);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x40);
    FUN_140156260(param_2 + 0x40);
  }
  return &DAT_14018d78c;
}



void Unwind_14020ab40(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x40);
  return;
}



void Unwind_14020ab50(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x70),
                *(longlong *)(param_2 + 0x60) + (longlong)*(int *)(param_2 + 0x68) * 0x48);
  return;
}



void Unwind_14020ab80(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x78),
                *(longlong *)(param_2 + 0x60) + (longlong)*(int *)(param_2 + 0x70) * 0x48);
  return;
}



void Unwind_14020abb0(undefined8 param_1,longlong param_2)

{
  FUN_1401ae8e0(param_2 + 0x50);
  return;
}



void Unwind_14020abc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_14020abd0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020abe0(undefined8 param_1,longlong param_2)

{
  FUN_1401a37f0(param_2 + 0x130);
  return;
}



void Unwind_14020abf0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020ac00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x128);
  return;
}



void Unwind_14020ac10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_14020ac20(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x78);
  return;
}



void Unwind_14020ac30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xc0);
  return;
}



void Unwind_14020ac40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xa0);
  return;
}



void Unwind_14020ac50(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x50);
  return;
}



void Unwind_14020ac60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xa8);
  return;
}



void Unwind_14020ac70(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x78);
  return;
}



void Unwind_14020ac80(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x78);
  return;
}



void Unwind_14020ac90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_14020aca0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xd0);
  return;
}



void Unwind_14020acb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_14020acc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc0);
  return;
}



void Unwind_14020acd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_14020ace0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_14020acf0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_14020ad00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_14020ad10(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xc0) + 8);
  return;
}



void Unwind_14020ad20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x80);
  return;
}



void Unwind_14020ad30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14020ad40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_14020ad50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_14020ad60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 200);
  return;
}



void Unwind_14020ad70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb8);
  return;
}



void Unwind_14020ad80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xa8);
  return;
}



void Unwind_14020ad90(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x38);
  return;
}



void Unwind_14020ada0(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x38);
  return;
}



void Unwind_14020adb0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd70);
  return;
}



void Unwind_14020add0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xf0);
  return;
}



void Unwind_14020ade0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd70);
  return;
}



void Unwind_14020ae00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x80);
  return;
}



void Unwind_14020ae10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020ae20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xe0);
  return;
}



void Unwind_14020ae30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_14020ae40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_14020ae50(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xe0) + 8);
  return;
}



void Unwind_14020ae60(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x40);
  return;
}



void Unwind_14020ae70(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x40);
  return;
}



void Unwind_14020ae80(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd80);
  return;
}



void Unwind_14020aea0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x100);
  return;
}



void Unwind_14020aeb0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd80);
  return;
}



void Unwind_14020aed0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_14020aee0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_14020aef0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_14020af00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_14020af10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_14020af20(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xf0) + 8);
  return;
}



void Unwind_14020af30(undefined8 param_1,longlong param_2)

{
  FUN_14018d0c0(param_2 + 0x38);
  return;
}



void Unwind_14020af40(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x68);
  return;
}



void Unwind_14020af50(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020af60(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020af70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb8);
  return;
}



void Unwind_14020af80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x90);
  return;
}



void Unwind_14020af90(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x170);
  return;
}



void Unwind_14020afa0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x170);
  return;
}



void Unwind_14020afb0(undefined8 param_1,longlong param_2)

{
  FUN_140153c80(param_2 + 0xa0);
  return;
}



void Unwind_14020afc0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xeb0);
  return;
}



void Unwind_14020afd0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xea0);
  return;
}



void Unwind_14020aff0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x220);
  return;
}



void Unwind_14020b000(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xea0);
  return;
}



void Unwind_14020b020(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xea0);
  return;
}



void Unwind_14020b040(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x220);
  return;
}



void Unwind_14020b050(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xea0);
  return;
}



void Unwind_14020b070(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1b30);
  return;
}



void Unwind_14020b090(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x28) + 8);
  return;
}



void Unwind_14020b0a0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020b0b0(undefined8 param_1,longlong param_2)

{
  FUN_14018d100(param_2 + 0x70);
  return;
}



void Unwind_14020b0c0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x98);
  return;
}



void Unwind_14020b0d0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x38) + 8);
  return;
}



void Unwind_14020b0e0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x38) + 8);
  return;
}



void Unwind_14020b0f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd8);
  return;
}



void Unwind_14020b100(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x100);
  return;
}



void Unwind_14020b110(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x100);
  return;
}



void Unwind_14020b120(undefined8 param_1,longlong param_2)

{
  FUN_140153c80(param_2 + 0xf0);
  return;
}



void Unwind_14020b130(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x1b0);
  return;
}



void Unwind_14020b140(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xe40);
  return;
}



void Unwind_14020b150(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xe40);
  return;
}



void Unwind_14020b160(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020b170(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x38) + 8);
  return;
}



void Unwind_14020b180(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x38) + 8);
  return;
}



void Unwind_14020b190(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x38);
  return;
}



void Unwind_14020b1a0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_14020b1b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_14020b1c0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_14020b1d0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xa0);
  return;
}



void Unwind_14020b1e0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0xa0);
  return;
}



void Unwind_14020b1f0(undefined8 param_1,longlong param_2)

{
  FUN_140153c80(param_2 + 0x80);
  return;
}



void Unwind_14020b200(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x150);
  return;
}



void Unwind_14020b210(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xde0);
  return;
}



void Unwind_14020b220(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xde0);
  return;
}



void Unwind_14020b230(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



void Unwind_14020b240(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_14020b250(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_14020b260(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x78);
  return;
}



void Unwind_14020b270(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x40);
  return;
}



void Unwind_14020b280(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_14020b290(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd60);
  return;
}



void Unwind_14020b2b0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xe0);
  return;
}



void Unwind_14020b2c0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd60);
  return;
}



void Unwind_14020b2e0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_14020b2f0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_14020b300(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x30);
  return;
}



void Unwind_14020b310(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14020b320(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd40);
  return;
}



void Unwind_14020b340(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xc0);
  return;
}



void Unwind_14020b350(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd40);
  return;
}



void Unwind_14020b370(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_14020b380(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x78);
  return;
}



void Unwind_14020b390(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x40);
  return;
}



void Unwind_14020b3a0(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x40);
  return;
}



void Unwind_14020b3b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_14020b3c0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd60);
  return;
}



void Unwind_14020b3e0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xe0);
  return;
}



void Unwind_14020b3f0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd60);
  return;
}



void Unwind_14020b410(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_14020b420(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x98);
  return;
}



void Unwind_14020b430(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x48);
  return;
}



void Unwind_14020b440(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x20);
  return;
}



void Unwind_14020b450(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x20);
  return;
}



void Unwind_14020b460(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x70);
  return;
}



void Unwind_14020b470(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xc0);
  return;
}



void Unwind_14020b480(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xd0);
  return;
}



void Unwind_14020b490(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xb0) + 8);
  return;
}



void Unwind_14020b4a0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x20);
  return;
}



void Unwind_14020b4b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x78);
  return;
}



void Unwind_14020b4c0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_14020b4d0(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x30);
  return;
}



void Unwind_14020b4e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_14020b4f0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd60);
  return;
}



void Unwind_14020b510(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xe0);
  return;
}



void Unwind_14020b520(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd60);
  return;
}



void Unwind_14020b540(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x88);
  return;
}



void Unwind_14020b550(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x68) + 8);
  return;
}



void Unwind_14020b560(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x88),
                *(longlong *)(param_2 + 0x80) + (longlong)*(int *)(param_2 + 0x78) * 8);
  return;
}



void Unwind_14020b590(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0xa0),
                *(longlong *)(param_2 + 0x98) + (longlong)*(int *)(param_2 + 0x90) * 8);
  return;
}



void Unwind_14020b5c0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x28),
                *(longlong *)(param_2 + 0x118) + (longlong)*(int *)(param_2 + 0x108) * 8);
  return;
}



void Unwind_14020b5f0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0xb8),
                *(longlong *)(param_2 + 0xb0) + (longlong)*(int *)(param_2 + 0xa8) * 8);
  return;
}



void Unwind_14020b620(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020b630(undefined8 param_1,longlong param_2)

{
  FUN_14016dbd0(*(longlong *)(param_2 + 0x40) + 0x38);
  return;
}



void Unwind_14020b640(undefined8 param_1,longlong param_2)

{
  FUN_14016dbd0(*(longlong *)(param_2 + 0x40) + 0x60);
  return;
}



void Unwind_14020b650(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(*(longlong *)(param_2 + 0x40) + 0x88);
  return;
}



void Unwind_14020b670(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(*(longlong *)(param_2 + 0x40) + 0x90);
  return;
}



void Unwind_14020b690(undefined8 param_1,longlong param_2)

{
  FUN_1401ac760(*(longlong *)(param_2 + 0x40) + 0x150);
  return;
}



void Unwind_14020b6b0(undefined8 param_1,longlong param_2)

{
  FUN_140182800(*(longlong *)(param_2 + 0x40) + 0x158);
  return;
}



void Unwind_14020b6d0(undefined8 param_1,longlong param_2)

{
  FUN_14018d670(*(longlong *)(param_2 + 0x40) + 0x160);
  return;
}



void Unwind_14020b6f0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14020b700(undefined8 param_1,longlong param_2)

{
  FUN_14016dbd0(*(longlong *)(param_2 + 0x60) + 0x38);
  return;
}



void Unwind_14020b710(undefined8 param_1,longlong param_2)

{
  FUN_14016dbd0(*(longlong *)(param_2 + 0x60) + 0x60);
  return;
}



void Unwind_14020b720(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(*(longlong *)(param_2 + 0x60) + 0x88);
  return;
}



void Unwind_14020b740(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(*(longlong *)(param_2 + 0x60) + 0x90);
  return;
}



void Unwind_14020b760(undefined8 param_1,longlong param_2)

{
  FUN_1401ac760(*(longlong *)(param_2 + 0x60) + 0x150);
  return;
}



void Unwind_14020b780(undefined8 param_1,longlong param_2)

{
  FUN_140182800(*(longlong *)(param_2 + 0x60) + 0x158);
  return;
}



void Unwind_14020b7a0(undefined8 param_1,longlong param_2)

{
  FUN_14018d670(*(longlong *)(param_2 + 0x60) + 0x160);
  return;
}



void Unwind_14020b7c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020b7d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020b7e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020b7f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x90),0x780);
  return;
}



void Unwind_14020b810(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_14020b820(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa8);
  return;
}



void Unwind_14020b830(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020b840(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020b850(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_14020b860(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x30);
  return;
}



void Unwind_14020b870(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x80);
  return;
}



void Unwind_14020b880(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf8);
  return;
}



void Unwind_14020b890(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x58);
  return;
}



void Unwind_14020b8a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x90);
  return;
}



void Unwind_14020b8b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14020b8c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc0);
  return;
}



void Unwind_14020b8d0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x68);
  return;
}



void Unwind_14020b8e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020b8f0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x68);
  return;
}



void Unwind_14020b900(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc0);
  return;
}



void Unwind_14020b910(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x68);
  return;
}



void Unwind_14020b920(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020b930(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x68);
  return;
}



void Unwind_14020b940(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x90);
  return;
}



void Unwind_14020b950(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 200);
  return;
}



void Unwind_14020b960(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x20);
  return;
}



void Unwind_14020b970(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_14020b980(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x40);
  return;
}



undefined * Catch_14020b990(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  
  plVar1 = *(longlong **)(*(longlong *)(*(longlong *)(param_2 + 0xb8) + 0x148) + 0x758);
  (**(code **)(*plVar1 + 0x20))(plVar1,*(undefined8 *)(param_2 + 0x140));
  FUN_1401544a0(param_2 + 0x40);
  FUN_140153d90(param_2 + 0x40);
  FUN_140154600(param_2 + 0x40,0x800);
  FUN_140154600(param_2 + 0x40,0);
  FUN_14004fd90(param_2 + 0x40,9);
  *(undefined8 *)(param_2 + 0x120) = 0;
  *(undefined8 *)(param_2 + 0x128) = 0;
  *(undefined8 *)(param_2 + 0x130) = 0;
  *(undefined8 *)(param_2 + 0x138) = 0;
  *(undefined ***)(param_2 + 0x118) = Proud::ByteArray::vftable;
  FUN_140155b20(param_2 + 0x40,0);
  FUN_1401858d0(param_2 + 0x118);
  lVar2 = *(longlong *)(param_2 + 0x30);
  uVar3 = (**(code **)(*(longlong *)(lVar2 + 0x108) + 0x10))();
  *(undefined8 *)(param_2 + 0xb8) = uVar3;
  FUN_140156b50(uVar3);
  *(undefined1 *)(param_2 + 0xc0) = 1;
  uVar4 = FUN_1401570d0(param_2 + 0x1a0,param_2 + 0x40);
  *(undefined8 *)(param_2 + 0x30) = 0;
  *(undefined1 *)(param_2 + 0x38) = 1;
  FUN_1401a3610(*(undefined8 *)(lVar2 + 0x748),uVar4,param_2 + 0x30);
  FUN_140156dc0(param_2 + 0x1a0);
  FUN_140156be0(uVar3);
  *(longlong *)(param_2 + 0x30) = param_2 + 0x48;
  FUN_1401560e0(param_2 + 0x48);
  if ((*(longlong *)(param_2 + 0x50) != 0) && (*(int *)(param_2 + 0x5c) < 0)) {
                    // WARNING: Subroutine does not return
    FUN_1401566b0();
  }
  return &DAT_140192e83;
}



void Unwind_14020bb00(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x40);
  return;
}



void Unwind_14020bb10(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x40);
  return;
}



void Unwind_14020bb20(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x118);
  return;
}



void Unwind_14020bb30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb8);
  return;
}



void Unwind_14020bb40(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x1a0);
  return;
}



void Unwind_14020bb50(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020bb60(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xf0);
  return;
}



void Unwind_14020bb70(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0xf0);
  return;
}



void Unwind_14020bb80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb8);
  return;
}



void Unwind_14020bb90(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x1a0);
  return;
}



void Unwind_14020bba0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020bbb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020bbc0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x60);
  return;
}



void Unwind_14020bbd0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0xb0);
  return;
}



void Unwind_14020bbe0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_14020bbf0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_14020bc00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020bc10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_14020bc20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x1e8),0x60);
  return;
}



void Unwind_14020bc40(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x30),*(undefined8 *)(param_2 + 0x1e8));
  return;
}



void Unwind_14020bc60(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x1e8);
  return;
}



void Unwind_14020bc70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



undefined * Catch_14020bc80(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x1d0);
  if (*(longlong *)(*(longlong *)(lVar1 + 0x148) + 0x758) != 0) {
    FUN_140156550(param_2 + 0x40,*(undefined8 *)(param_2 + 0x98));
    *(undefined4 *)(param_2 + 0x58) = *(undefined4 *)(*(longlong *)(param_2 + 0x1d8) + 0x30);
    plVar2 = *(longlong **)(*(longlong *)(lVar1 + 0x148) + 0x758);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x40);
    FUN_140156260(param_2 + 0x40);
  }
  return &DAT_1401933e7;
}



void Unwind_14020bd00(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x40);
  return;
}



undefined * Catch_14020bd10(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x1d0);
  if (*(longlong *)(*(longlong *)(lVar1 + 0x148) + 0x758) != 0) {
    FUN_1401562a0(param_2 + 0x40,*(undefined8 *)(param_2 + 0xa0));
    *(undefined4 *)(param_2 + 0x58) = *(undefined4 *)(*(longlong *)(param_2 + 0x1d8) + 0x30);
    plVar2 = *(longlong **)(*(longlong *)(lVar1 + 0x148) + 0x758);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x40);
    FUN_140156260(param_2 + 0x40);
  }
  return &DAT_1401933e7;
}



void Unwind_14020bd90(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x40);
  return;
}



undefined * Catch_14020bda0(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x1d0);
  if (*(longlong *)(*(longlong *)(lVar1 + 0x148) + 0x758) != 0) {
    FUN_1401565d0(param_2 + 0x40,*(undefined8 *)(param_2 + 0x90));
    *(undefined4 *)(param_2 + 0x58) = *(undefined4 *)(*(longlong *)(param_2 + 0x1d8) + 0x30);
    plVar2 = *(longlong **)(*(longlong *)(lVar1 + 0x148) + 0x758);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x40);
    FUN_140156260(param_2 + 0x40);
  }
  return &DAT_1401933e7;
}



void Unwind_14020be20(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x40);
  return;
}



void Unwind_14020be30(undefined8 param_1,longlong param_2)

{
  FUN_1401ae8e0(param_2 + 0x30);
  return;
}



void Unwind_14020be40(undefined8 param_1,longlong param_2)

{
  FUN_14018c560(param_2 + 0x40);
  return;
}



void Unwind_14020be50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_14020be60(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xb0);
  return;
}



void Unwind_14020be70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x90);
  return;
}



void Unwind_14020be80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_14020be90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd8);
  return;
}



undefined8 Catch_14020bea0(undefined8 param_1,longlong param_2)

{
  int *piVar1;
  undefined *puVar2;
  undefined8 uVar3;
  undefined *puVar4;
  
  FUN_1401568c0();
  *(undefined **)(param_2 + 0x68) = PTR_DAT_1403200a0;
  uVar3 = (**(code **)(**(longlong **)(param_2 + 0x138) + 8))();
  *(longlong *)(param_2 + 0x160) = param_2 + 0x168;
  FUN_140142dc0(param_2 + 0x160,uVar3,3);
  FUN_14004ce50(param_2 + 0x68,L"std.exception(%s)",*(undefined8 *)(param_2 + 0x160));
  if (*(void **)(param_2 + 0x160) != (void *)(param_2 + 0x168)) {
    free(*(void **)(param_2 + 0x160));
  }
  puVar2 = *(undefined **)(param_2 + 0x68);
  puVar4 = puVar2;
  if (puVar2 == (undefined *)0x0) {
    puVar4 = PTR_DAT_1403200a0;
  }
  FUN_140192f20(*(undefined8 *)(param_2 + 0x48),L"Proud::CNetThreads_S::TcpListenerProc",puVar4,0);
  if (((puVar2 != (undefined *)0x0) && (puVar2 != PTR_DAT_1403200a0)) &&
     (puVar2 + -8 != (undefined *)0x0)) {
    uVar3 = FUN_1401568c0();
    *(undefined8 *)(param_2 + 0x128) = uVar3;
    FUN_140156b50(uVar3);
    *(undefined1 *)(param_2 + 0x130) = 1;
    piVar1 = (int *)(puVar2 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar2 + -8);
    }
    FUN_140156be0(uVar3);
  }
  return 0x1401939b1;
}



void Unwind_14020bfa0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_14020bfb0(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x160);
  return;
}



void Unwind_14020bfc0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x128);
  return;
}



undefined8 Catch_14020bfd0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  int *piVar2;
  undefined *puVar3;
  longlong lVar4;
  longlong *plVar5;
  undefined8 uVar6;
  undefined *puVar7;
  
  FUN_1401568c0();
  *(undefined **)(param_2 + 0x60) = PTR_DAT_1403200a0;
  plVar5 = (longlong *)FUN_1400010f0(*(undefined8 *)(param_2 + 0x120),param_2 + 0x78);
  uVar6 = 0;
  if ((undefined8 *)*plVar5 != (undefined8 *)0x0) {
    uVar6 = *(undefined8 *)*plVar5;
  }
  FUN_14004ce50(param_2 + 0x60,L"_com_error(%s)",uVar6);
  plVar5 = *(longlong **)(param_2 + 0x78);
  if (plVar5 != (longlong *)0x0) {
    LOCK();
    plVar1 = plVar5 + 2;
    lVar4 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if (((int)lVar4 == 1) && (plVar5 != (longlong *)0x0)) {
      if (*plVar5 != 0) {
        Ordinal_6();
      }
      if ((void *)plVar5[1] != (void *)0x0) {
        operator_delete__((void *)plVar5[1]);
      }
      operator_delete(plVar5);
    }
  }
  puVar3 = *(undefined **)(param_2 + 0x60);
  puVar7 = puVar3;
  if (puVar3 == (undefined *)0x0) {
    puVar7 = PTR_DAT_1403200a0;
  }
  FUN_140192f20(*(undefined8 *)(param_2 + 0x48),L"Proud::CNetThreads_S::TcpListenerProc",puVar7,0);
  if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_1403200a0)) &&
     (puVar3 + -8 != (undefined *)0x0)) {
    uVar6 = FUN_1401568c0();
    *(undefined8 *)(param_2 + 0x140) = uVar6;
    FUN_140156b50(uVar6);
    *(undefined1 *)(param_2 + 0x148) = 1;
    piVar2 = (int *)(puVar3 + -4);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_140156970(puVar3 + -8);
    }
    FUN_140156be0(uVar6);
  }
  return 0x1401939b1;
}



void Unwind_14020c0e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_14020c0f0(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x78);
  return;
}



void Unwind_14020c100(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x140);
  return;
}



undefined8 Catch_14020c110(undefined8 param_1,longlong param_2)

{
  FUN_140192f20(*(undefined8 *)(param_2 + 0x48),L"Proud::CNetThreads_S::TcpListenerProc",L"void*",0)
  ;
  return 0x1401939b1;
}



void Unwind_14020c150(undefined8 param_1,longlong param_2)

{
  FUN_1401ae8e0(param_2 + 0x20);
  return;
}



void Unwind_14020c160(undefined8 param_1,longlong param_2)

{
  FUN_1401ab4b0(param_2 + 0x60);
  return;
}



void Unwind_14020c170(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020c180(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020c190(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020c1a0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_14020c1b0(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x58);
  return;
}



void Unwind_14020c1c0(undefined8 param_1,longlong param_2)

{
  FUN_140174d30(param_2 + 0x28);
  return;
}



void Unwind_14020c1d0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_14020c1e0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x1a8) + 8);
  return;
}



void Unwind_14020c1f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020c200(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x50);
  return;
}



void Unwind_14020c210(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xc0) + 8);
  return;
}



void Unwind_14020c220(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x50);
  return;
}



void Unwind_14020c230(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020c240(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xb8) + 8);
  return;
}



void Unwind_14020c250(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x40);
  return;
}



void Unwind_14020c260(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020c270(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x40);
  return;
}



void Unwind_14020c280(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020c290(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020c2a0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x40);
  return;
}



void Unwind_14020c2b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x90);
  return;
}



void Unwind_14020c2c0(undefined8 param_1,longlong param_2)

{
  FUN_1401a37f0(param_2 + 0xa0);
  return;
}



void Unwind_14020c2d0(undefined8 param_1,longlong param_2)

{
  FUN_14018da70(param_2 + 0x58);
  return;
}



void Unwind_14020c2e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x50);
  return;
}



void Unwind_14020c2f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf8);
  return;
}



void Unwind_14020c300(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd8);
  return;
}



undefined * Catch_14020c310(undefined8 param_1,longlong param_2)

{
  FUN_140192740(*(undefined8 *)(param_2 + 0x1c0),*(undefined8 *)(param_2 + 0x40),
                L"Proud::CNetThreads_S::NetWorkerThread_UdpRecvCompletionCase",L"std.exception");
  return &DAT_140194e23;
}



undefined * Catch_14020c350(undefined8 param_1,longlong param_2)

{
  FUN_140192740(*(undefined8 *)(param_2 + 0x1c0),*(undefined8 *)(param_2 + 0x40),
                L"Proud::CNetThreads_S::NetWorkerThread_UdpRecvCompletionCase",L"_com_error");
  return &DAT_140194e23;
}



undefined * Catch_14020c390(undefined8 param_1,longlong param_2)

{
  FUN_140192740(*(undefined8 *)(param_2 + 0x1c0),*(undefined8 *)(param_2 + 0x40),
                L"Proud::CNetThreads_S::NetWorkerThread_UdpRecvCompletionCase",L"void*");
  return &DAT_140194e23;
}



void Unwind_14020c3d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe8);
  return;
}



void Unwind_14020c3e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x140);
  return;
}



void Unwind_14020c3f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x130);
  return;
}



void Unwind_14020c400(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x150);
  return;
}



void Unwind_14020c410(undefined8 param_1,longlong param_2)

{
  FUN_1401a37f0(param_2 + 0x180);
  return;
}



void Unwind_14020c420(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020c430(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe0);
  return;
}



void Unwind_14020c440(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x58);
  return;
}



void Unwind_14020c450(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x178);
  return;
}



void Unwind_14020c460(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x50);
  return;
}



void Unwind_14020c470(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x100);
  return;
}



void Unwind_14020c480(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd0);
  return;
}



void Unwind_14020c490(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_14020c4a0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xa8);
  return;
}



void Unwind_14020c4b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14020c4c0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x80);
  return;
}



undefined8 Catch_14020c4d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  uVar1 = (**(code **)(**(longlong **)(param_2 + 0x48) + 8))();
  *(longlong *)(param_2 + 0x50) = param_2 + 0x58;
  FUN_140142dc0(param_2 + 0x50,uVar1,3);
  FUN_140192740(*(undefined8 *)(param_2 + 0x28),*(undefined8 *)(param_2 + 0x20),
                L"Proud::CNetThreads_S::NetWorkerThread_PerRemoteClient",
                *(undefined8 *)(param_2 + 0x50));
  if (*(void **)(param_2 + 0x50) != (void *)(param_2 + 0x58)) {
    free(*(void **)(param_2 + 0x50));
  }
  return 0x1401956d6;
}



void Unwind_14020c540(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x50);
  return;
}



undefined8 Catch_14020c550(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined8 uVar4;
  
  plVar3 = (longlong *)FUN_1400010f0(*(undefined8 *)(param_2 + 0x40),param_2 + 0x30);
  uVar4 = 0;
  if ((undefined8 *)*plVar3 != (undefined8 *)0x0) {
    uVar4 = *(undefined8 *)*plVar3;
  }
  FUN_140192740(*(undefined8 *)(param_2 + 0x28),*(undefined8 *)(param_2 + 0x20),
                L"Proud::CNetThreads_S::NetWorkerThread_PerRemoteClient",uVar4);
  plVar3 = *(longlong **)(param_2 + 0x30);
  if (plVar3 != (longlong *)0x0) {
    LOCK();
    plVar1 = plVar3 + 2;
    lVar2 = *plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
    if (((int)lVar2 == 1) && (plVar3 != (longlong *)0x0)) {
      if (*plVar3 != 0) {
        Ordinal_6();
      }
      if ((void *)plVar3[1] != (void *)0x0) {
        operator_delete__((void *)plVar3[1]);
      }
      operator_delete(plVar3);
    }
  }
  return 0x1401956d6;
}



void Unwind_14020c5e0(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x30);
  return;
}



undefined8 Catch_14020c5f0(undefined8 param_1,longlong param_2)

{
  FUN_140192740(*(undefined8 *)(param_2 + 0x28),*(undefined8 *)(param_2 + 0x20),
                L"Proud::CNetThreads_S::NetWorkerThread_PerRemoteClient",L"void*");
  return 0x1401956d6;
}



void Unwind_14020c630(undefined8 param_1,longlong param_2)

{
  FUN_1401ae8e0(param_2 + 0x138);
  return;
}



void Unwind_14020c640(undefined8 param_1,longlong param_2)

{
  FUN_14018cc90(param_2 + 0x70);
  return;
}



void Unwind_14020c650(undefined8 param_1,longlong param_2)

{
  FUN_140190f40(param_2 + 0x48);
  return;
}



void Unwind_14020c660(undefined8 param_1,longlong param_2)

{
  FUN_14018ccd0(param_2 + 0x20);
  return;
}



void Unwind_14020c670(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x148);
  return;
}



void Unwind_14020c680(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd0);
  return;
}



void Unwind_14020c690(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x140) + 8);
  return;
}



void Unwind_14020c6a0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 200));
  return;
}



void Unwind_14020c6b0(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(param_2 + 0x28);
  return;
}



void Unwind_14020c6c0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 200));
  return;
}



void Unwind_14020c6d0(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(param_2 + 0x30);
  return;
}



void Unwind_14020c6e0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x38));
  return;
}



void Unwind_14020c6f0(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(param_2 + 0x38);
  return;
}



void Unwind_14020c700(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020c710(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0xb0));
  return;
}



void Unwind_14020c720(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(param_2 + 0x20);
  return;
}



undefined8 Catch_All_14020c730(void)

{
  return 0x1401965e3;
}



void Unwind_14020c750(undefined8 param_1,longlong param_2)

{
  FUN_1401965d0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020c760(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020c770(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0xc0));
  return;
}



void Unwind_14020c780(undefined8 param_1,longlong param_2)

{
  FUN_140196790(param_2 + 0xc0);
  return;
}



void Unwind_14020c790(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x28),*(undefined8 *)(param_2 + 0xd8));
  return;
}



void Unwind_14020c7b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020c7c0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x28));
  return;
}



void Unwind_14020c7d0(undefined8 param_1,longlong param_2)

{
  FUN_140196790(param_2 + 0x20);
  return;
}



void Unwind_14020c7e0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x50),*(undefined8 *)(param_2 + 0x28));
  return;
}



void Unwind_14020c800(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_14020c810(undefined8 param_1,longlong param_2)

{
  FUN_140158390(param_2 + 0xa8);
  return;
}



void Unwind_14020c820(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x160);
  return;
}



void Unwind_14020c830(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14020c840(undefined8 param_1,longlong param_2)

{
  FUN_140196fa0(param_2 + 0x78);
  return;
}



void Unwind_14020c850(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe8);
  return;
}



void Unwind_14020c860(undefined8 param_1,longlong param_2)

{
  FUN_140196790(param_2 + 0x58);
  return;
}



void Unwind_14020c870(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x150),*(undefined8 *)(param_2 + 0x148));
  return;
}



void Unwind_14020c8a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x48);
  return;
}



void Unwind_14020c8b0(undefined8 param_1,longlong param_2)

{
  FUN_140196790(param_2 + 0x50);
  return;
}



void Unwind_14020c8c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_14020c8d0(undefined8 param_1,longlong param_2)

{
  FUN_140158390(param_2 + 0x70);
  return;
}



void Unwind_14020c8e0(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x270);
  return;
}



void Unwind_14020c8f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x120);
  return;
}



void Unwind_14020c900(undefined8 param_1,longlong param_2)

{
  FUN_140158390(param_2 + 0xe0);
  return;
}



void Unwind_14020c910(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x130);
  return;
}



void Unwind_14020c920(undefined8 param_1,longlong param_2)

{
  FUN_1401962f0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020c930(undefined8 param_1,longlong param_2)

{
  FUN_1401ac760(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_14020c940(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_14020c950(undefined8 param_1,longlong param_2)

{
  FUN_140182790(*(longlong *)(param_2 + 0x40) + 0x58);
  return;
}



void Unwind_14020c960(undefined8 param_1,longlong param_2)

{
  FUN_140196fa0(*(longlong *)(param_2 + 0x40) + 0x88);
  return;
}



void Unwind_14020c980(undefined8 param_1,longlong param_2)

{
  FUN_1401962f0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020c990(undefined8 param_1,longlong param_2)

{
  FUN_1401ac760(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_14020c9a0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_14020c9b0(undefined8 param_1,longlong param_2)

{
  FUN_1401962f0(param_2 + 0x48);
  return;
}



void Unwind_14020c9c0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_14020c9d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020c9e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x90),0x400);
  return;
}



void Unwind_14020ca00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x90),0x400);
  return;
}



void Unwind_14020ca20(undefined8 param_1,longlong param_2)

{
  FUN_140182790(*(longlong *)(param_2 + 0x60) + 8);
  return;
}



void Unwind_14020ca30(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x60) + 0x30);
  return;
}



void Unwind_14020ca40(undefined8 param_1,longlong param_2)

{
  FUN_140197c70(*(longlong *)(param_2 + 0x60) + 0x68);
  return;
}



void Unwind_14020ca50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020ca60(undefined8 param_1,longlong param_2)

{
  FUN_140182790(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_14020ca70(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0x30);
  return;
}



void Unwind_14020ca80(undefined8 param_1,longlong param_2)

{
  FUN_140197c70(*(longlong *)(param_2 + 0x40) + 0x68);
  return;
}



void Unwind_14020ca90(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x30);
  return;
}



void Unwind_14020caa0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x58);
  return;
}



void Unwind_14020cab0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x60);
  return;
}



undefined * Catch_14020cac0(undefined8 param_1,longlong param_2)

{
  (**(code **)(**(longlong **)(param_2 + 0x78) + 8))();
  return &DAT_140199eb2;
}



void Unwind_14020caf0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x30);
  return;
}



void Unwind_14020cb00(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x58);
  return;
}



void Unwind_14020cb10(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x60);
  return;
}



undefined * Catch_14020cb20(undefined8 param_1,longlong param_2)

{
  (**(code **)(**(longlong **)(param_2 + 0x70) + 8))();
  return &DAT_14019a166;
}



undefined * Catch_14020cb50(undefined8 param_1,longlong param_2)

{
  (**(code **)(**(longlong **)(param_2 + 0x30) + 8))();
  return &DAT_14019a45d;
}



undefined * Catch_14020cb80(undefined8 param_1,longlong param_2)

{
  (**(code **)(**(longlong **)(param_2 + 0x38) + 8))();
  return &DAT_14019a682;
}



void Unwind_14020cbb0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020cbc0(void)

{
  DAT_140329fc0 = DAT_140329fc0 & 0xfffffffe;
  return;
}



void Unwind_14020cbe0(undefined8 param_1,longlong param_2)

{
  FUN_140144680(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020cbf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140157bd0(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_14020cc00(undefined8 param_1,longlong param_2)

{
  FUN_14019a6d0(*(longlong *)(param_2 + 0x40) + 0x30);
  return;
}



void Unwind_14020cc10(undefined8 param_1,longlong param_2)

{
  FUN_14015ae50(*(longlong *)(param_2 + 0x40) + 0x48);
  return;
}



void Unwind_14020cc20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x40) + 0x50);
  return;
}



void Unwind_14020cc30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x40) + 0x60);
  return;
}



void Unwind_14020cc40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156cd0(*(longlong *)(param_2 + 0x40) + 0x68);
  return;
}



void Unwind_14020cc50(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0x98);
  return;
}



void Unwind_14020cc70(undefined8 param_1,longlong param_2)

{
  FUN_140143e10(param_2 + 0x50);
  return;
}



void Unwind_14020cc80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020cc90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_14020cca0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x50);
  return;
}



void Unwind_14020ccb0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_14020ccc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x158);
  return;
}



void Unwind_14020ccd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_14020cce0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020ccf0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_14020cd00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020cd10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020cd20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14020cd30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020cd40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020cd50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_14020cd60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_14020cd70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020cd80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020cd90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020cda0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14020cdb0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020cdc0(undefined8 param_1,longlong param_2)

{
  FUN_140144680(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14020cdd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140157bd0(*(longlong *)(param_2 + 0x70) + 0x10);
  return;
}



void Unwind_14020cde0(undefined8 param_1,longlong param_2)

{
  FUN_14019a6d0(*(longlong *)(param_2 + 0x70) + 0x30);
  return;
}



void Unwind_14020cdf0(undefined8 param_1,longlong param_2)

{
  FUN_14015ae50(*(longlong *)(param_2 + 0x70) + 0x48);
  return;
}



void Unwind_14020ce00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x70) + 0x50);
  return;
}



void Unwind_14020ce10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x70) + 0x60);
  return;
}



void Unwind_14020ce20(undefined8 param_1,longlong param_2)

{
  FUN_140156cd0(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14020ce30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156cd0(*(longlong *)(param_2 + 0x70) + 0x68);
  return;
}



void Unwind_14020ce40(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x70) + 0x98);
  return;
}



void Unwind_14020ce60(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14020ce70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x48),0x80);
  return;
}



void Unwind_14020ce90(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x38);
  return;
}



undefined8 Catch_All_14020cea0(void)

{
  return 0x14019d793;
}



void Unwind_14020cec0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020ced0(undefined8 param_1,longlong param_2)

{
  FUN_140171c70(param_2 + 0x90);
  return;
}



void Unwind_14020cee0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x68),0xd0);
  return;
}



void Unwind_14020cf00(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x60) & 1) != 0) {
    *(uint *)(param_2 + 0x60) = *(uint *)(param_2 + 0x60) & 0xfffffffe;
    FUN_140174690(*(undefined8 *)(param_2 + 0x58));
  }
  return;
}



void Unwind_14020cf30(undefined8 param_1,longlong param_2)

{
  FUN_140174d30(param_2 + 0x28);
  return;
}



void Unwind_14020cf40(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_14020cf50(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x150) + 8);
  return;
}



void Unwind_14020cf60(undefined8 param_1,longlong param_2)

{
  FUN_14015a4b0(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14020cf70(undefined8 param_1,longlong param_2)

{
  FUN_1401ab800(*(longlong *)(param_2 + 0x80) + 8);
  return;
}



void Unwind_14020cf80(undefined8 param_1,longlong param_2)

{
  FUN_14015a420(*(longlong *)(param_2 + 0x80) + 0x38);
  return;
}



void Unwind_14020cf90(undefined8 param_1,longlong param_2)

{
  FUN_14019ccc0(*(longlong *)(param_2 + 0x80) + 0x110);
  return;
}



void Unwind_14020cfb0(undefined8 param_1,longlong param_2)

{
  FUN_140177d20(*(longlong *)(param_2 + 0x80) + 0x40);
  return;
}



void Unwind_14020cfc0(undefined8 param_1,longlong param_2)

{
  FUN_1401a37a0(*(longlong *)(param_2 + 0x80) + 0xc0);
  return;
}



void Unwind_14020cfe0(undefined8 param_1,longlong param_2)

{
  FUN_14019ca00(*(longlong *)(param_2 + 0x80) + 0x108);
  return;
}



void Unwind_14020d000(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x80) + 0x128);
  return;
}



void Unwind_14020d020(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x80) + 0x1f0);
  return;
}



void Unwind_14020d040(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x80) + 0x1f8);
  return;
}



void Unwind_14020d060(undefined8 param_1,longlong param_2)

{
  FUN_14019ce30(*(longlong *)(param_2 + 0x80) + 0x228);
  return;
}



void Unwind_14020d080(undefined8 param_1,longlong param_2)

{
  FUN_14015bdd0(*(longlong *)(param_2 + 0x80) + 0x240);
  return;
}



void Unwind_14020d0a0(undefined8 param_1,longlong param_2)

{
  FUN_140177ed0(*(longlong *)(param_2 + 0x80) + 0x268);
  return;
}



void Unwind_14020d0c0(undefined8 param_1,longlong param_2)

{
  FUN_14015a5c0(*(longlong *)(param_2 + 0x80) + 0x288);
  return;
}



void Unwind_14020d0e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14019d780(*(longlong *)(param_2 + 0x80) + 0x6a0);
  return;
}



void Unwind_14020d100(undefined8 param_1,longlong param_2)

{
  FUN_1401a4e40(*(longlong *)(param_2 + 0x80) + 0x700);
  return;
}



void Unwind_14020d120(undefined8 param_1,longlong param_2)

{
  FUN_14019caf0(*(longlong *)(param_2 + 0x80) + 0x750);
  return;
}



void Unwind_14020d140(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(longlong *)(param_2 + 0x80) + 0x760);
  return;
}



void Unwind_14020d160(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14020d170(undefined8 param_1,longlong param_2)

{
  FUN_14015a4b0(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14020d180(undefined8 param_1,longlong param_2)

{
  FUN_1401ab800(*(longlong *)(param_2 + 0x60) + 8);
  return;
}



void Unwind_14020d190(undefined8 param_1,longlong param_2)

{
  FUN_14015a420(*(longlong *)(param_2 + 0x60) + 0x38);
  return;
}



void Unwind_14020d1a0(undefined8 param_1,longlong param_2)

{
  FUN_14019ccc0(*(longlong *)(param_2 + 0x60) + 0x110);
  return;
}



void Unwind_14020d1c0(undefined8 param_1,longlong param_2)

{
  FUN_140177d20(*(longlong *)(param_2 + 0x60) + 0x40);
  return;
}



void Unwind_14020d1d0(undefined8 param_1,longlong param_2)

{
  FUN_1401a37a0(*(longlong *)(param_2 + 0x60) + 0xc0);
  return;
}



void Unwind_14020d1f0(undefined8 param_1,longlong param_2)

{
  FUN_14019ca00(*(longlong *)(param_2 + 0x60) + 0x108);
  return;
}



void Unwind_14020d210(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x60) + 0x128);
  return;
}



void Unwind_14020d230(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x60) + 0x1f0);
  return;
}



void Unwind_14020d250(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x60) + 0x1f8);
  return;
}



void Unwind_14020d270(undefined8 param_1,longlong param_2)

{
  FUN_14019ce30(*(longlong *)(param_2 + 0x60) + 0x228);
  return;
}



void Unwind_14020d290(undefined8 param_1,longlong param_2)

{
  FUN_14015bdd0(*(longlong *)(param_2 + 0x60) + 0x240);
  return;
}



void Unwind_14020d2b0(undefined8 param_1,longlong param_2)

{
  FUN_140177ed0(*(longlong *)(param_2 + 0x60) + 0x268);
  return;
}



void Unwind_14020d2d0(undefined8 param_1,longlong param_2)

{
  FUN_14015a5c0(*(longlong *)(param_2 + 0x60) + 0x288);
  return;
}



void Unwind_14020d2f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14019d780(*(longlong *)(param_2 + 0x60) + 0x6a0);
  return;
}



void Unwind_14020d310(undefined8 param_1,longlong param_2)

{
  FUN_1401a4e40(*(longlong *)(param_2 + 0x60) + 0x700);
  return;
}



void Unwind_14020d330(undefined8 param_1,longlong param_2)

{
  FUN_14019caf0(*(longlong *)(param_2 + 0x60) + 0x750);
  return;
}



void Unwind_14020d350(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(longlong *)(param_2 + 0x60) + 0x760);
  return;
}



void Unwind_14020d370(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x68);
  return;
}



void Unwind_14020d380(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14019eb60(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020d390(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14019eb60(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_14020d3a0(undefined8 param_1,longlong param_2)

{
  FUN_14019e790(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020d3b0(undefined8 param_1,longlong param_2)

{
  FUN_1401a0110(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_14020d3c0(undefined8 param_1,longlong param_2)

{
  FUN_14019e800(*(longlong *)(param_2 + 0x40) + 0x198);
  return;
}



void Unwind_14020d3e0(undefined8 param_1,longlong param_2)

{
  FUN_14015bdb0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020d3f0(undefined8 param_1,longlong param_2)

{
  FUN_14019e800(*(longlong *)(param_2 + 0x40) + 0x678);
  return;
}



void Unwind_14020d410(undefined8 param_1,longlong param_2)

{
  FUN_14019e770(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020d420(undefined8 param_1,longlong param_2)

{
  FUN_14019e890(*(undefined8 *)(param_2 + 0x50));
  return;
}



undefined8 Catch_All_14020d430(void)

{
  return 0x1401a03a3;
}



undefined8 Catch_All_14020d450(void)

{
  return 0x1401a03c3;
}



void Unwind_14020d470(undefined8 param_1,longlong param_2)

{
  FUN_1401a03b0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020d480(undefined8 param_1,longlong param_2)

{
  FUN_1401a03b0(*(undefined8 *)(param_2 + 0x20));
  return;
}



void Unwind_14020d490(undefined8 param_1,longlong param_2)

{
  FUN_14019e790(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14020d4a0(undefined8 param_1,longlong param_2)

{
  FUN_1401a0110(*(longlong *)(param_2 + 0x50) + 0x18);
  return;
}



void Unwind_14020d4b0(undefined8 param_1,longlong param_2)

{
  FUN_14019e800(*(longlong *)(param_2 + 0x50) + 0x198);
  return;
}



void Catch_All_14020d4d0(undefined8 param_1,longlong param_2)

{
  FUN_1401b0d90(*(undefined8 *)(param_2 + 0x40),*(undefined8 *)(param_2 + 0x48),0);
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_14020d500(undefined8 param_1,longlong param_2)

{
  FUN_14015eab0(*(undefined8 *)(param_2 + 0x50),*(undefined8 *)(param_2 + 0x58),0);
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_14020d530(undefined8 param_1,longlong param_2)

{
  FUN_14019e790(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_14020d540(undefined8 param_1,longlong param_2)

{
  FUN_1401a0110(*(longlong *)(param_2 + 0xb0) + 0x18);
  return;
}



void Unwind_14020d550(undefined8 param_1,longlong param_2)

{
  FUN_14019e800(*(longlong *)(param_2 + 0xb0) + 0x198);
  return;
}



void Unwind_14020d570(undefined8 param_1,longlong param_2)

{
  FUN_14019e790(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020d580(undefined8 param_1,longlong param_2)

{
  FUN_1401a0110(*(longlong *)(param_2 + 0x90) + 0x18);
  return;
}



void Unwind_14020d590(undefined8 param_1,longlong param_2)

{
  FUN_14019e800(*(longlong *)(param_2 + 0x90) + 0x198);
  return;
}



void Unwind_14020d5b0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x48),*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020d5d0(undefined8 param_1,longlong param_2)

{
  FUN_1401a0390(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14020d5e0(undefined8 param_1,longlong param_2)

{
  FUN_1401a0390(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_14020d5f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020d600(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x88),*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14020d630(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x38);
  return;
}



void Unwind_14020d640(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020d650(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020d660(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020d670(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020d680(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020d690(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020d6a0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020d6b0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020d6c0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020d6d0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020d6e0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020d6f0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020d700(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020d710(undefined8 param_1,longlong param_2)

{
  FUN_1401a0390(*(undefined8 *)(param_2 + 0x130));
  return;
}



void Unwind_14020d720(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_14020d730(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020d740(undefined8 param_1,longlong param_2)

{
  FUN_1401a0390(*(undefined8 *)(param_2 + 0x138));
  return;
}



void Unwind_14020d750(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_14020d760(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14019ed20(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020d770(undefined8 param_1,longlong param_2)

{
  FUN_1401a2f10(*(longlong *)(param_2 + 0x40) + 0x20);
  return;
}



void Unwind_14020d780(undefined8 param_1,longlong param_2)

{
  FUN_1401a0230(*(longlong *)(param_2 + 0x40) + 0x80);
  return;
}



void Unwind_14020d7a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14019ed20(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020d7b0(undefined8 param_1,longlong param_2)

{
  FUN_1401a2f10(*(longlong *)(param_2 + 0x40) + 0x20);
  return;
}



void Unwind_14020d7c0(undefined8 param_1,longlong param_2)

{
  FUN_1401a0230(*(longlong *)(param_2 + 0x40) + 0x80);
  return;
}



void Unwind_14020d7e0(undefined8 param_1,longlong param_2)

{
  FUN_1401a03b0(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14020d7f0(undefined8 param_1,longlong param_2)

{
  FUN_1401a2ee0(*(longlong *)(param_2 + 0x80) + 8);
  return;
}



void Unwind_14020d800(void)

{
  FUN_140156c00(&DAT_14032a038);
  return;
}



void Unwind_14020d810(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020d820(undefined8 param_1,longlong param_2)

{
  FUN_1401a8260(*(longlong *)(param_2 + 0x50) + 0x48);
  return;
}



void Unwind_14020d830(undefined8 param_1,longlong param_2)

{
  FUN_1401ae940(*(longlong *)(param_2 + 0x50) + 200);
  return;
}



void Unwind_14020d850(undefined8 param_1,longlong param_2)

{
  FUN_14018c560(*(longlong *)(param_2 + 0x50) + 0x110);
  return;
}



void Unwind_14020d870(undefined8 param_1,longlong param_2)

{
  FUN_1401a8260(*(longlong *)(param_2 + 0x40) + 0x48);
  return;
}



void Unwind_14020d880(undefined8 param_1,longlong param_2)

{
  FUN_1401ae940(*(longlong *)(param_2 + 0x40) + 200);
  return;
}



void Unwind_14020d8a0(undefined8 param_1,longlong param_2)

{
  FUN_14018c560(*(longlong *)(param_2 + 0x40) + 0x110);
  return;
}



void Unwind_14020d8c0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x130);
  return;
}



void Unwind_14020d8d0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x80);
  return;
}



void Unwind_14020d8e0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x80);
  return;
}



void Unwind_14020d8f0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x28) + 8);
  return;
}



void Unwind_14020d900(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xdb0);
  return;
}



void Unwind_14020d920(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x1a0);
  return;
}



void Unwind_14020d930(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xf0);
  return;
}



void Unwind_14020d940(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0xf0);
  return;
}



void Unwind_14020d950(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_14020d960(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_14020d970(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_14020d980(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xe20);
  return;
}



void Unwind_14020d9a0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x28) & 1) != 0) {
    *(uint *)(param_2 + 0x28) = *(uint *)(param_2 + 0x28) & 0xfffffffe;
    thunk_FUN_140050520(*(undefined8 *)(param_2 + 0x40));
  }
  return;
}



void Unwind_14020d9d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x20);
  return;
}



void Unwind_14020d9e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020d9f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20);
  return;
}



void Unwind_14020da00(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x70);
  return;
}



void Unwind_14020da10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020da20(undefined8 param_1,longlong param_2)

{
  FUN_14015a420(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020da30(undefined8 param_1,longlong param_2)

{
  FUN_1401a3ba0(*(longlong *)(param_2 + 0x40) + 0x90);
  return;
}



void Unwind_14020da50(undefined8 param_1,longlong param_2)

{
  FUN_1401a3830(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_14020da60(undefined8 param_1,longlong param_2)

{
  FUN_1401a3870(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_14020da70(undefined8 param_1,longlong param_2)

{
  FUN_1401a37a0(*(longlong *)(param_2 + 0x40) + 0x40);
  return;
}



void Unwind_14020da80(undefined8 param_1,longlong param_2)

{
  FUN_14019ca00(*(longlong *)(param_2 + 0x40) + 0x88);
  return;
}



void Unwind_14020daa0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0xa8);
  return;
}



void Unwind_14020dac0(undefined8 param_1,longlong param_2)

{
  FUN_14015ae50(*(longlong *)(param_2 + 0x40) + 0xe0);
  return;
}



void Unwind_14020dae0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x40) + 0x150);
  return;
}



void Unwind_14020db00(undefined8 param_1,longlong param_2)

{
  FUN_1401a3bd0(*(longlong *)(param_2 + 0x40) + 0x168);
  return;
}



void Unwind_14020db20(undefined8 param_1,longlong param_2)

{
  FUN_1401a3c00(*(longlong *)(param_2 + 0x40) + 0x170);
  return;
}



void Unwind_14020db40(undefined8 param_1,longlong param_2)

{
  FUN_1401a3c90(*(longlong *)(param_2 + 0x40) + 0x178);
  return;
}



void Unwind_14020db60(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x40);
  return;
}



void Unwind_14020db70(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x40);
  return;
}



void Unwind_14020db80(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd60);
  return;
}



void Unwind_14020dba0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xe0);
  return;
}



void Unwind_14020dbb0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd60);
  return;
}



void Unwind_14020dbd0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_14020dbe0(undefined8 param_1,longlong param_2)

{
  FUN_14015a420(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14020dbf0(undefined8 param_1,longlong param_2)

{
  FUN_1401a3ba0(*(longlong *)(param_2 + 0x80) + 0x90);
  return;
}



void Unwind_14020dc10(undefined8 param_1,longlong param_2)

{
  FUN_1401a3830(*(longlong *)(param_2 + 0x80) + 8);
  return;
}



void Unwind_14020dc20(undefined8 param_1,longlong param_2)

{
  FUN_1401a3870(*(longlong *)(param_2 + 0x80) + 0x10);
  return;
}



void Unwind_14020dc30(undefined8 param_1,longlong param_2)

{
  FUN_1401a37a0(*(longlong *)(param_2 + 0x80) + 0x40);
  return;
}



void Unwind_14020dc40(undefined8 param_1,longlong param_2)

{
  FUN_14019ca00(*(longlong *)(param_2 + 0x80) + 0x88);
  return;
}



void Unwind_14020dc60(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x80) + 0xa8);
  return;
}



void Unwind_14020dc80(undefined8 param_1,longlong param_2)

{
  FUN_14015ae50(*(longlong *)(param_2 + 0x80) + 0xe0);
  return;
}



void Unwind_14020dca0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x80) + 0x150);
  return;
}



void Unwind_14020dcc0(undefined8 param_1,longlong param_2)

{
  FUN_1401a3bd0(*(longlong *)(param_2 + 0x80) + 0x168);
  return;
}



void Unwind_14020dce0(undefined8 param_1,longlong param_2)

{
  FUN_1401a3c00(*(longlong *)(param_2 + 0x80) + 0x170);
  return;
}



void Unwind_14020dd00(undefined8 param_1,longlong param_2)

{
  FUN_1401a3c90(*(longlong *)(param_2 + 0x80) + 0x178);
  return;
}



void Unwind_14020dd20(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14020dd30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x88),0x400);
  return;
}



void Unwind_14020dd50(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x88);
  return;
}



void Unwind_14020dd60(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14020dd70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020dd80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_14020dd90(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_14020dda0(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(*(longlong *)(param_2 + 0x40) + 0x88);
  return;
}



void Unwind_14020ddc0(undefined8 param_1,longlong param_2)

{
  FUN_1401a5830(param_2 + 0x40);
  return;
}



void Unwind_14020ddd0(undefined8 param_1,longlong param_2)

{
  FUN_1401a5830(param_2 + 0x38);
  return;
}



void Unwind_14020dde0(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x60);
  return;
}



undefined * Catch_All_14020ddf0(undefined8 param_1,longlong param_2)

{
  *(undefined4 *)(param_2 + 0x30) = 0;
  return &DAT_1401a5b27;
}



void Unwind_14020de20(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x58) & 1) != 0) {
    *(uint *)(param_2 + 0x58) = *(uint *)(param_2 + 0x58) & 0xfffffffe;
    thunk_FUN_140050520(*(undefined8 *)(param_2 + 0x40));
  }
  return;
}



void Unwind_14020de50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x50),0x400);
  return;
}



void Unwind_14020de70(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x50);
  return;
}



void Unwind_14020de80(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x58);
  return;
}



void Unwind_14020de90(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x60);
  return;
}



void Unwind_14020dea0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x28);
  return;
}



void Unwind_14020deb0(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x70);
  return;
}



void Unwind_14020dec0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x20);
  return;
}



void Unwind_14020ded0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x48);
  return;
}



void Unwind_14020dee0(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x100);
  return;
}



void Unwind_14020def0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x40);
  return;
}



void Unwind_14020df00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x58);
  return;
}



void Unwind_14020df10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020df20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020df30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020df40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020df50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020df60(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x40);
  return;
}



void Unwind_14020df70(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x60);
  return;
}



void Unwind_14020df80(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x60);
  return;
}



void Unwind_14020df90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



undefined8 Catch_14020dfa0(undefined8 param_1,longlong param_2)

{
  undefined4 *puVar1;
  longlong *plVar2;
  
  puVar1 = *(undefined4 **)(param_2 + 0x50);
  plVar2 = *(longlong **)(puVar1 + 4);
  if ((plVar2 != (longlong *)0x0) && (*plVar2 != 0)) {
    FUN_1401855c0();
  }
  *puVar1 = 3;
  return 0x1401a6e2a;
}



void Unwind_14020dfe0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_14020dff0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_14020e000(undefined8 param_1,longlong param_2)

{
  FUN_1401a56e0(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_14020e010(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(longlong *)(param_2 + 0x40) + 0x20);
  return;
}



void Unwind_14020e020(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0x30);
  return;
}



void Unwind_14020e030(undefined8 param_1,longlong param_2)

{
  FUN_140182790(*(longlong *)(param_2 + 0x40) + 0x88);
  return;
}



void Unwind_14020e050(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020e060(void)

{
  DAT_14032a140 = DAT_14032a140 & 0xfffffffe;
  return;
}



void Unwind_14020e080(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020e090(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020e0a0(undefined8 param_1,longlong param_2)

{
  FUN_1401ac760(*(longlong *)(param_2 + 0x40) + 0x48);
  return;
}



void Unwind_14020e0b0(undefined8 param_1,longlong param_2)

{
  FUN_140187ae0(param_2 + 0x60);
  return;
}



void Unwind_14020e0c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140187ae0(param_2 + 0x60);
  return;
}



void Unwind_14020e0d0(undefined8 param_1,longlong param_2)

{
  FUN_1401a7280(param_2 + 0x40);
  return;
}



void Unwind_14020e0e0(undefined8 param_1,longlong param_2)

{
  FUN_1401a7250(param_2 + 0x30);
  return;
}



void Unwind_14020e0f0(undefined8 param_1,longlong param_2)

{
  FUN_14016dbd0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020e100(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_14020e110(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(param_2 + 0x80);
  return;
}



void Unwind_14020e120(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x70);
  return;
}



void Unwind_14020e130(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xcf0);
  return;
}



void Unwind_14020e150(undefined8 param_1,longlong param_2)

{
  FUN_1401a7cc0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020e160(undefined8 param_1,longlong param_2)

{
  FUN_1401a9270(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_14020e170(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x38);
  return;
}



void Unwind_14020e180(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x20);
  return;
}



void Unwind_14020e190(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x28);
  return;
}



void Unwind_14020e1a0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x160) + 8);
  return;
}



void Unwind_14020e1b0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x28);
  return;
}



void Unwind_14020e1c0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x160) + 8);
  return;
}



void Unwind_14020e1d0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x28);
  return;
}



void Unwind_14020e1e0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x160) + 8);
  return;
}



void Unwind_14020e1f0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x28);
  return;
}



void Unwind_14020e200(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x160) + 8);
  return;
}



void Unwind_14020e210(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x28);
  return;
}



void Unwind_14020e220(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x160) + 8);
  return;
}



void Unwind_14020e230(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x28);
  return;
}



void Unwind_14020e240(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x160) + 8);
  return;
}



void Unwind_14020e250(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x28);
  return;
}



void Unwind_14020e260(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x160) + 8);
  return;
}



void Unwind_14020e270(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x80);
  return;
}



void Unwind_14020e280(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x170) + 8);
  return;
}



void Unwind_14020e290(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x28);
  return;
}



void Unwind_14020e2a0(undefined8 param_1,longlong param_2)

{
  FUN_1401a8b30(*(undefined8 *)(param_2 + 0x20));
  return;
}



void Unwind_14020e2b0(undefined8 param_1,longlong param_2)

{
  FUN_1401a8b30(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14020e2c0(undefined8 param_1,longlong param_2)

{
  FUN_1401a03b0(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_14020e2d0(undefined8 param_1,longlong param_2)

{
  FUN_1401a9270(*(longlong *)(param_2 + 0x40) + 0x70);
  return;
}



undefined * Catch_14020e2e0(undefined8 param_1,longlong param_2)

{
  (**(code **)(**(longlong **)(param_2 + 0x28) + 8))();
  return &DAT_1401a9e60;
}



void Unwind_14020e310(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x20);
  return;
}



undefined * Catch_14020e320(undefined8 param_1,longlong param_2)

{
  (**(code **)(**(longlong **)(param_2 + 0x48) + 8))();
  return &DAT_1401aa0e8;
}



void Unwind_14020e350(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020e360(void)

{
  DAT_14032b220 = DAT_14032b220 & 0xfffffffe;
  return;
}



void Unwind_14020e380(undefined8 param_1,longlong param_2)

{
  FUN_1401aa280(param_2 + 0x108);
  return;
}



void Unwind_14020e390(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_14020e3a0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x78);
  return;
}



void Unwind_14020e3b0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x50);
  return;
}



void Unwind_14020e3c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_14020e3d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_14020e3e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_14020e3f0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x78);
  return;
}



void Unwind_14020e400(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x50);
  return;
}



void Unwind_14020e410(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_14020e420(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_14020e430(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_14020e440(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x78);
  return;
}



void Unwind_14020e450(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x50);
  return;
}



void Unwind_14020e460(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_14020e470(undefined8 param_1,longlong param_2)

{
  FUN_140161a30(*(longlong *)(param_2 + 0x70) + 8);
  return;
}



void Unwind_14020e480(undefined8 param_1,longlong param_2)

{
  FUN_14015be10(*(longlong *)(param_2 + 0x70) + 0x60);
  return;
}



void Unwind_14020e490(undefined8 param_1,longlong param_2)

{
  FUN_14015da50(*(longlong *)(param_2 + 0x70) + 200);
  return;
}



void Unwind_14020e4b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x68),0x60);
  return;
}



void Unwind_14020e4d0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x60) & 1) != 0) {
    *(uint *)(param_2 + 0x60) = *(uint *)(param_2 + 0x60) & 0xfffffffe;
    FUN_140174790(*(undefined8 *)(param_2 + 0x58));
  }
  return;
}



void Unwind_14020e500(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x20);
  return;
}



void Unwind_14020e510(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xf8) + 8);
  return;
}



void Unwind_14020e520(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xf8) + 8);
  return;
}



void Unwind_14020e530(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xf8) + 8);
  return;
}



void Unwind_14020e540(undefined8 param_1,longlong param_2)

{
  FUN_140157080(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_14020e550(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_14020e560(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020e570(undefined8 param_1,longlong param_2)

{
  FUN_140157080(*(longlong *)(param_2 + 0x50) + 8);
  return;
}



void Unwind_14020e580(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x50) + 8);
  return;
}



void Unwind_14020e590(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14018ce90(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_14020e5a0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xd50);
  return;
}



void Unwind_14020e5b0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x19d0);
  return;
}



void Unwind_14020e5d0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xc0);
  return;
}



void Unwind_14020e5e0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd40);
  return;
}



void Unwind_14020e600(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x80) & 1) != 0) {
    *(uint *)(param_2 + 0x80) = *(uint *)(param_2 + 0x80) & 0xfffffffe;
    FUN_140050680(*(undefined8 *)(param_2 + 0x88));
  }
  return;
}



void Unwind_14020e630(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x50) & 1) != 0) {
    *(uint *)(param_2 + 0x50) = *(uint *)(param_2 + 0x50) & 0xfffffffe;
    FUN_14016b5d0(*(undefined8 *)(param_2 + 0x58));
  }
  return;
}



void Unwind_14020e660(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x28);
  return;
}



void Unwind_14020e670(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x30);
  return;
}



void Unwind_14020e680(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x28);
  return;
}



void Unwind_14020e690(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x30);
  return;
}



void Unwind_14020e6a0(undefined8 param_1,longlong param_2)

{
  FUN_14016b5d0(param_2 + 0x28);
  return;
}



void Unwind_14020e6b0(undefined8 param_1,longlong param_2)

{
  FUN_14016b5d0(param_2 + 0x28);
  return;
}



void Unwind_14020e6c0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14020e6d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_1401aedd0(*(longlong *)(param_2 + 0x50) + 0x38);
  return;
}



void Unwind_14020e6e0(undefined8 param_1,longlong param_2)

{
  FUN_14016dbd0(*(longlong *)(param_2 + 0x50) + 0x50);
  return;
}



void Unwind_14020e6f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020e700(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14020e710(undefined8 param_1,longlong param_2)

{
  thunk_FUN_1401aedd0(*(longlong *)(param_2 + 0x70) + 0x38);
  return;
}



void Unwind_14020e720(undefined8 param_1,longlong param_2)

{
  FUN_14016dbd0(*(longlong *)(param_2 + 0x70) + 0x50);
  return;
}



void Unwind_14020e730(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_14020e740(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(param_2 + 0x80);
  return;
}



void Unwind_14020e750(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020e760(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14020e770(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x28);
  return;
}



void Unwind_14020e780(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(*(undefined8 *)(param_2 + 0x38));
  return;
}



void Unwind_14020e790(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020e7a0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14020e7b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020e7c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020e7d0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14020e7e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020e7f0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x60) & 1) != 0) {
    *(uint *)(param_2 + 0x60) = *(uint *)(param_2 + 0x60) & 0xfffffffe;
    thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x68));
  }
  return;
}



undefined8 Catch_All_14020e820(void)

{
  return 0x1401b2413;
}



void Unwind_14020e840(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xb8);
  return;
}



void Unwind_14020e850(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x2a0);
  return;
}



void Unwind_14020e860(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x2d8);
  return;
}



void Unwind_14020e870(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_14020e880(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2c8);
  return;
}



void Unwind_14020e890(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x440);
  return;
}



void Unwind_14020e8a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x170);
  return;
}



void Unwind_14020e8b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x440);
  return;
}



void Unwind_14020e8c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x440);
  return;
}



void Unwind_14020e8d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020e8e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x440);
  return;
}



void Unwind_14020e8f0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xb8);
  return;
}



void Unwind_14020e900(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_14020e910(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2d0);
  return;
}



void Unwind_14020e920(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x440);
  return;
}



void Unwind_14020e930(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x170);
  return;
}



void Unwind_14020e940(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x440);
  return;
}



void Unwind_14020e950(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x440);
  return;
}



void Unwind_14020e960(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020e970(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x440);
  return;
}



void Unwind_14020e980(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_14020e990(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_14020e9a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x98);
  return;
}



void Unwind_14020e9b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_14020e9c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x98);
  return;
}



void Unwind_14020e9d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_14020e9e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x98);
  return;
}



void Unwind_14020e9f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x370);
  return;
}



void Unwind_14020ea00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020ea10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_14020ea20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x380);
  return;
}



void Unwind_14020ea30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020ea40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xe8);
  return;
}



void Unwind_14020ea50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x378);
  return;
}



void Unwind_14020ea60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020ea70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xe8);
  return;
}



void Unwind_14020ea80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x340);
  return;
}



void Unwind_14020ea90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020eaa0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xe8);
  return;
}



void Unwind_14020eab0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x350);
  return;
}



void Unwind_14020eac0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020ead0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_14020eae0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x360);
  return;
}



void Unwind_14020eaf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020eb00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_14020eb10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x348);
  return;
}



void Unwind_14020eb20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020eb30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_14020eb40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x318);
  return;
}



void Unwind_14020eb50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020eb60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_14020eb70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x368);
  return;
}



void Unwind_14020eb80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020eb90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_14020eba0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x328);
  return;
}



void Unwind_14020ebb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020ebc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_14020ebd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x358);
  return;
}



void Unwind_14020ebe0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020ebf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_14020ec00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x338);
  return;
}



void Unwind_14020ec10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020ec20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_14020ec30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x300);
  return;
}



void Unwind_14020ec40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020ec50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_14020ec60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x308);
  return;
}



void Unwind_14020ec70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020ec80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_14020ec90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x310);
  return;
}



void Unwind_14020eca0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020ecb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x420);
  return;
}



void Unwind_14020ecc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_14020ecd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 800);
  return;
}



void Unwind_14020ece0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020ecf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x420);
  return;
}



void Unwind_14020ed00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_14020ed10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x330);
  return;
}



void Unwind_14020ed20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_14020ed30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b8);
  return;
}



void Unwind_14020ed40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xe0);
  return;
}



void Unwind_14020ed50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ed60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



void Unwind_14020ed70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ed80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ed90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14020eda0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020edb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14020edc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd8);
  return;
}



void Unwind_14020edd0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ede0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



void Unwind_14020edf0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ee00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ee10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14020ee20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ee30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14020ee40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xe8);
  return;
}



void Unwind_14020ee50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ee60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



void Unwind_14020ee70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ee80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ee90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14020eea0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020eeb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14020eec0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd0);
  return;
}



void Unwind_14020eed0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



void Unwind_14020eee0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020eef0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ef00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ef10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14020ef20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020ef30(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x48);
  return;
}



void Unwind_14020ef40(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x80) + 8);
  return;
}



void Unwind_14020ef50(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x48);
  return;
}



void Unwind_14020ef60(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xa0) + 8);
  return;
}



void Unwind_14020ef70(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x40);
  return;
}



void Unwind_14020ef80(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_14020ef90(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x30);
  return;
}



void Unwind_14020efa0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd50);
  return;
}



void Unwind_14020efc0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xd0);
  return;
}



void Unwind_14020efd0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd50);
  return;
}



void Unwind_14020eff0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_14020f000(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x20);
  return;
}



void Unwind_14020f010(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x20);
  return;
}



void Unwind_14020f020(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd50);
  return;
}



void Unwind_14020f040(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xd0);
  return;
}



void Unwind_14020f050(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd50);
  return;
}



void Unwind_14020f070(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x48) + 8);
  return;
}



void Unwind_14020f080(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x20);
  return;
}



void Unwind_14020f090(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x20);
  return;
}



void Unwind_14020f0a0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd50);
  return;
}



void Unwind_14020f0c0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xd0);
  return;
}



void Unwind_14020f0d0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd50);
  return;
}



void Unwind_14020f0f0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x78) + 8);
  return;
}



void Unwind_14020f100(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14020f110(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x88);
  return;
}



void Unwind_14020f120(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x88);
  return;
}



void Unwind_14020f130(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xe0) + 8);
  return;
}



void Unwind_14020f140(undefined8 param_1,longlong param_2)

{
  FUN_14015bdd0(param_2 + 0x50);
  return;
}



void Unwind_14020f150(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14020f160(undefined8 param_1,longlong param_2)

{
  FUN_14015e710(param_2 + 0x38);
  return;
}



void Unwind_14020f170(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020f180(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020f190(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14020f1a0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x78);
  return;
}



void Unwind_14020f1b0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x80);
  return;
}



undefined8 Catch_14020f1c0(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x70);
  plVar2 = *(longlong **)(lVar1 + 0x1580);
  if (plVar2 != (longlong *)0x0) {
    (**(code **)(*plVar2 + 0x20))(plVar2,*(undefined8 *)(param_2 + 0x28));
  }
  *(undefined8 *)(param_2 + 0x88) = 0;
  FUN_1401d43e0(lVar1 + 0x1520,param_2 + 0x88);
  *(undefined1 *)(lVar1 + 0x1528) = 1;
  return 0x1401baf40;
}



void Unwind_14020f220(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x88);
  return;
}



void Unwind_14020f230(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x50),0x2c0);
  return;
}



void Unwind_14020f250(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x58),*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14020f270(undefined8 param_1,longlong param_2)

{
  FUN_1401b10e0(param_2 + 0x58);
  return;
}



void Unwind_14020f280(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x48);
  return;
}



void Unwind_14020f290(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xa8) + 8);
  return;
}



void Unwind_14020f2a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020f2b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020f2c0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x70) & 1) != 0) {
    *(uint *)(param_2 + 0x70) = *(uint *)(param_2 + 0x70) & 0xfffffffe;
    FUN_1401b11e0(*(undefined8 *)(param_2 + 0x68));
  }
  return;
}



void Unwind_14020f2f0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0xc0) & 1) != 0) {
    *(uint *)(param_2 + 0xc0) = *(uint *)(param_2 + 0xc0) & 0xfffffffe;
    thunk_FUN_14004f990(*(undefined8 *)(param_2 + 200));
  }
  return;
}



void Unwind_14020f320(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd0);
  return;
}



void Unwind_14020f330(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020f340(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020f350(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x60);
  return;
}



void Unwind_14020f360(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x30),*(undefined8 *)(param_2 + 0x28));
  return;
}



void Unwind_14020f380(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_14020f390(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x28));
  return;
}



void Unwind_14020f3a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_14020f3b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020f3c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_14020f3d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



void Unwind_14020f3e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14020f3f0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x70),*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14020f410(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020f420(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020f430(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020f440(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_14020f450(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14020f460(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020f470(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020f480(undefined8 param_1,longlong param_2)

{
  FUN_1401bcd80(param_2 + 0x68);
  return;
}



void Unwind_14020f490(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x130);
  return;
}



void Unwind_14020f4a0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x50);
  return;
}



void Unwind_14020f4b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_14020f4c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb0);
  return;
}



void Unwind_14020f4d0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x48);
  return;
}



void Unwind_14020f4e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14020f4f0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x80);
  return;
}



void Unwind_14020f500(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x80);
  return;
}



void Unwind_14020f510(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xe0);
  return;
}



void Unwind_14020f520(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_14020f530(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xe0) + 8);
  return;
}



void Unwind_14020f540(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_14020f550(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0xd8);
  return;
}



void Unwind_14020f560(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd0);
  return;
}



void Unwind_14020f570(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x68);
  return;
}



void Unwind_14020f580(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14020f590(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x78);
  return;
}



void Unwind_14020f5a0(undefined8 param_1,longlong param_2)

{
  FUN_1401bead0(param_2 + 0x48);
  return;
}



void Unwind_14020f5b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_14020f5c0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x178),*(undefined8 *)(param_2 + 0x160));
  return;
}



void Unwind_14020f5f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 200);
  return;
}



void Unwind_14020f600(undefined8 param_1,longlong param_2)

{
  FUN_1401962f0(param_2 + 0x68);
  return;
}



void Unwind_14020f610(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14020f620(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa0);
  return;
}



void Unwind_14020f630(undefined8 param_1,longlong param_2)

{
  FUN_140158390(param_2 + 0x98);
  return;
}



void Unwind_14020f640(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb8);
  return;
}



void Unwind_14020f650(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe0);
  return;
}



void Unwind_14020f660(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_14020f670(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x48);
  return;
}



void Unwind_14020f680(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



undefined8 Catch_All_14020f690(void)

{
  return 0x1401c05b3;
}



void Unwind_14020f6b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



void Unwind_14020f6c0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0xf0);
  return;
}



void Unwind_14020f6d0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0xe8);
  return;
}



undefined * Catch_14020f6e0(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x250);
  if (*(longlong *)(lVar1 + 0x1580) != 0) {
    FUN_1401562a0(param_2 + 0x60,*(undefined8 *)(param_2 + 0x1b0));
    *(undefined4 *)(param_2 + 0x78) = *(undefined4 *)(*(longlong *)(param_2 + 0x30) + 0x28);
    plVar2 = *(longlong **)(lVar1 + 0x1580);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x60);
    FUN_140156260(param_2 + 0x60);
  }
  return &DAT_1401c0e29;
}



void Unwind_14020f750(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x60);
  return;
}



undefined * Catch_14020f760(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x250);
  if (*(longlong *)(lVar1 + 0x1580) != 0) {
    FUN_140156550(param_2 + 0x60,*(undefined8 *)(param_2 + 0x1b8));
    *(undefined4 *)(param_2 + 0x78) = *(undefined4 *)(*(longlong *)(param_2 + 0x30) + 0x28);
    plVar2 = *(longlong **)(lVar1 + 0x1580);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x60);
    FUN_140156260(param_2 + 0x60);
  }
  return &DAT_1401c0e29;
}



void Unwind_14020f7d0(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x60);
  return;
}



undefined * Catch_14020f7e0(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x250);
  if (*(longlong *)(lVar1 + 0x1580) != 0) {
    FUN_1401565d0(param_2 + 0x60,*(undefined8 *)(param_2 + 0x188));
    *(undefined4 *)(param_2 + 0x78) = *(undefined4 *)(*(longlong *)(param_2 + 0x30) + 0x28);
    plVar2 = *(longlong **)(lVar1 + 0x1580);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x60);
    FUN_140156260(param_2 + 0x60);
  }
  return &DAT_1401c0e29;
}



void Unwind_14020f850(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x60);
  return;
}



void Unwind_14020f860(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0xc0),0x60);
  return;
}



void Unwind_14020f880(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 600);
  return;
}



undefined * Catch_14020f890(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x250);
  if (*(longlong *)(lVar1 + 0x1580) != 0) {
    FUN_1401562a0(param_2 + 0x60,*(undefined8 *)(param_2 + 0x170));
    *(undefined4 *)(param_2 + 0x78) = *(undefined4 *)(*(longlong *)(param_2 + 0x30) + 0x28);
    plVar2 = *(longlong **)(lVar1 + 0x1580);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x60);
    FUN_140156260(param_2 + 0x60);
  }
  return &DAT_1401c0d25;
}



void Unwind_14020f900(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x60);
  return;
}



undefined * Catch_14020f910(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x250);
  if (*(longlong *)(lVar1 + 0x1580) != 0) {
    FUN_140156550(param_2 + 0x60,*(undefined8 *)(param_2 + 400));
    *(undefined4 *)(param_2 + 0x78) = *(undefined4 *)(*(longlong *)(param_2 + 0x30) + 0x28);
    plVar2 = *(longlong **)(lVar1 + 0x1580);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x60);
    FUN_140156260(param_2 + 0x60);
  }
  return &DAT_1401c0d2a;
}



void Unwind_14020f980(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x60);
  return;
}



undefined * Catch_14020f990(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x250);
  if (*(longlong *)(lVar1 + 0x1580) != 0) {
    FUN_1401565d0(param_2 + 0x60,*(undefined8 *)(param_2 + 0x1a0));
    *(undefined4 *)(param_2 + 0x78) = *(undefined4 *)(*(longlong *)(param_2 + 0x30) + 0x28);
    plVar2 = *(longlong **)(lVar1 + 0x1580);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x60);
    FUN_140156260(param_2 + 0x60);
  }
  return &DAT_1401c0d2f;
}



void Unwind_14020fa00(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x60);
  return;
}



void Unwind_14020fa10(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x60);
  return;
}



void Unwind_14020fa20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 600),0x60);
  return;
}



void Unwind_14020fa40(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0xf0);
  return;
}



void Unwind_14020fa50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_14020fa60(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x120);
  return;
}



void Unwind_14020fa70(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x30);
  return;
}



void Unwind_14020fa80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xc0);
  return;
}



void Unwind_14020fa90(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x60);
  return;
}



void Unwind_14020faa0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x148);
  return;
}



void Unwind_14020fab0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0xe8);
  return;
}



void Unwind_14020fac0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xf8);
  return;
}



void Unwind_14020fad0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0xe0);
  return;
}



undefined8 Catch_14020fae0(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x250);
  if (*(longlong *)(lVar1 + 0x1580) != 0) {
    FUN_1401562a0(param_2 + 0x60,*(undefined8 *)(param_2 + 0x178));
    *(undefined4 *)(param_2 + 0x78) = *(undefined4 *)(*(longlong *)(param_2 + 0x48) + 0x70);
    plVar2 = *(longlong **)(lVar1 + 0x1580);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x60);
    FUN_140156260(param_2 + 0x60);
  }
  return 0x1401c1606;
}



void Unwind_14020fb50(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x60);
  return;
}



undefined8 Catch_14020fb60(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x250);
  if (*(longlong *)(lVar1 + 0x1580) != 0) {
    FUN_140156550(param_2 + 0x60,*(undefined8 *)(param_2 + 0x198));
    *(undefined4 *)(param_2 + 0x78) = *(undefined4 *)(*(longlong *)(param_2 + 0x48) + 0x70);
    plVar2 = *(longlong **)(lVar1 + 0x1580);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x60);
    FUN_140156260(param_2 + 0x60);
  }
  return 0x1401c1606;
}



void Unwind_14020fbd0(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x60);
  return;
}



undefined8 Catch_14020fbe0(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x250);
  if (*(longlong *)(lVar1 + 0x1580) != 0) {
    FUN_1401565d0(param_2 + 0x60,*(undefined8 *)(param_2 + 0x1a8));
    *(undefined4 *)(param_2 + 0x78) = *(undefined4 *)(*(longlong *)(param_2 + 0x48) + 0x70);
    plVar2 = *(longlong **)(lVar1 + 0x1580);
    (**(code **)(*plVar2 + 0x20))(plVar2,param_2 + 0x60);
    FUN_140156260(param_2 + 0x60);
  }
  return 0x1401c1606;
}



void Unwind_14020fc50(undefined8 param_1,longlong param_2)

{
  FUN_140156260(param_2 + 0x60);
  return;
}



void Unwind_14020fc60(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14020fc70(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14020fc80(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x68);
  return;
}



void Unwind_14020fc90(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14020fca0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x68);
  return;
}



void Unwind_14020fcb0(undefined8 param_1,longlong param_2)

{
  FUN_1401bcd80(param_2 + 0x20);
  return;
}



void Unwind_14020fcc0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020fcd0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x70) & 1) != 0) {
    *(uint *)(param_2 + 0x70) = *(uint *)(param_2 + 0x70) & 0xfffffffe;
    FUN_1401c18f0(*(undefined8 *)(param_2 + 0x68));
  }
  return;
}



void Unwind_14020fd00(undefined8 param_1,longlong param_2)

{
  FUN_1401c18f0(param_2 + 0x50);
  return;
}



void Unwind_14020fd10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020fd20(undefined8 param_1,longlong param_2)

{
  FUN_1401c18f0(param_2 + 0x70);
  return;
}



void Unwind_14020fd30(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_14020fd40(undefined8 param_1,longlong param_2)

{
  FUN_1401c18f0(param_2 + 0xa8);
  return;
}



void Unwind_14020fd50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020fd60(undefined8 param_1,longlong param_2)

{
  FUN_1401c18f0(param_2 + 0x88);
  return;
}



void Unwind_14020fd70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14020fd80(undefined8 param_1,longlong param_2)

{
  FUN_1401c18f0(param_2 + 0xa0);
  return;
}



void Unwind_14020fd90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x118);
  return;
}



void Unwind_14020fda0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_14020fdb0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x38);
  return;
}



void Unwind_14020fdc0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x108);
  return;
}



void Unwind_14020fdd0(undefined8 param_1,longlong param_2)

{
  FUN_14015bdb0(param_2 + 0x2f0);
  return;
}



void Unwind_14020fde0(undefined8 param_1,longlong param_2)

{
  FUN_1401b0a60(param_2 + 0xd8);
  return;
}



void Unwind_14020fdf0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x38);
  return;
}



void Unwind_14020fe00(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x60),*(undefined8 *)(param_2 + 0x138));
  return;
}



void Unwind_14020fe20(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x60) + 8);
  return;
}



void Unwind_14020fe30(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(*(longlong *)(param_2 + 0x60) + 0xc80);
  return;
}



undefined * Catch_14020fe50(undefined8 param_1,longlong param_2)

{
  LPCWSTR lpOutputString;
  
  lpOutputString = (LPCWSTR)(**(code **)(**(longlong **)(param_2 + 0x150) + 8))();
  OutputDebugStringW(lpOutputString);
  uRam0000000000000000 = 1;
  return &DAT_1401c337f;
}



void Unwind_14020fe90(undefined8 param_1,longlong param_2)

{
  FUN_14018d100(param_2 + 0x38);
  return;
}



void Unwind_14020fea0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x70);
  return;
}



void Unwind_14020feb0(undefined8 param_1,longlong param_2)

{
  FUN_140153c80(param_2 + 0x108);
  return;
}



void Unwind_14020fec0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x12c0);
  return;
}



void Unwind_14020fed0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x12b0);
  return;
}



void Unwind_14020fef0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x630);
  return;
}



void Unwind_14020ff00(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x12b0);
  return;
}



void Unwind_14020ff20(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(*(longlong *)(param_2 + 0x60) + 0xc80);
  return;
}



void Unwind_14020ff40(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14020ff50(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 8000);
  return;
}



void Unwind_14020ff70(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x60) + 8);
  return;
}



void Unwind_14020ff80(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x1f50);
  return;
}



void Unwind_14020ff90(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x240);
  return;
}



void Unwind_14020ffa0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x240);
  return;
}



void Unwind_14020ffb0(undefined8 param_1,longlong param_2)

{
  FUN_14018d0c0(param_2 + 0x38);
  return;
}



void Unwind_14020ffc0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x12c0);
  return;
}



void Unwind_14020ffd0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x70);
  return;
}



void Unwind_14020ffe0(undefined8 param_1,longlong param_2)

{
  FUN_140153c80(param_2 + 0x108);
  return;
}



void Unwind_14020fff0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x12b0);
  return;
}



void Unwind_140210010(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x630);
  return;
}



void Unwind_140210020(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x12b0);
  return;
}



void Unwind_140210040(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(*(longlong *)(param_2 + 0x60) + 0xc80);
  return;
}



void Unwind_140210060(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x60) + 8);
  return;
}



void Unwind_140210070(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x60) + 8);
  return;
}



void Unwind_140210080(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140210090(undefined8 param_1,longlong param_2)

{
  FUN_14015bdb0(param_2 + 0x40);
  return;
}



undefined8 Catch_All_1402100a0(void)

{
  return 0x1401c45c3;
}



void Unwind_1402100c0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_1402100d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402100e0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x98));
  return;
}



void Unwind_1402100f0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x80) & 1) != 0) {
    *(uint *)(param_2 + 0x80) = *(uint *)(param_2 + 0x80) & 0xfffffffe;
    FUN_1401c18f0(*(undefined8 *)(param_2 + 0x88));
  }
  return;
}



void Unwind_140210120(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x60),*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140210140(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140210150(undefined8 param_1,longlong param_2)

{
  FUN_1401ab1a0(param_2 + 0x38);
  return;
}



void Unwind_140210160(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x40);
  return;
}



void Unwind_140210170(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x180) + 8);
  return;
}



void Unwind_140210180(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xa8);
  return;
}



void Unwind_140210190(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_1402101a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x208);
  return;
}



void Unwind_1402101b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x48);
  return;
}



void Unwind_1402101c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x78);
  return;
}



void Unwind_1402101d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_1402101e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x98);
  return;
}



void Unwind_1402101f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_140210200(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x50);
  return;
}



void Unwind_140210210(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 200);
  return;
}



void Unwind_140210220(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb8);
  return;
}



void Unwind_140210230(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_140210240(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x30));
  return;
}



void Unwind_140210250(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x30);
  return;
}



void Unwind_140210260(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x20));
  return;
}



void Unwind_140210270(undefined8 param_1,longlong param_2)

{
  FUN_1401b1190(param_2 + 0x20);
  return;
}



void Unwind_140210280(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x28));
  return;
}



void Unwind_140210290(undefined8 param_1,longlong param_2)

{
  FUN_1401b2420(param_2 + 0x28);
  return;
}



void Unwind_1402102a0(undefined8 param_1,longlong param_2)

{
  FUN_1401883e0(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_1402102b0(undefined8 param_1,longlong param_2)

{
  FUN_1401af540(*(longlong *)(param_2 + 0xb0) + 0x60);
  return;
}



void Unwind_1402102c0(undefined8 param_1,longlong param_2)

{
  FUN_1401af580(*(longlong *)(param_2 + 0xb0) + 0x68);
  return;
}



void Unwind_1402102d0(undefined8 param_1,longlong param_2)

{
  FUN_1401af530(*(longlong *)(param_2 + 0xb0) + 0x70);
  return;
}



void Unwind_1402102e0(undefined8 param_1,longlong param_2)

{
  FUN_1401a56e0(*(longlong *)(param_2 + 0xb0) + 0x78);
  return;
}



void Unwind_1402102f0(undefined8 param_1,longlong param_2)

{
  FUN_1401a3870(*(longlong *)(param_2 + 0xb0) + 0x88);
  return;
}



void Unwind_140210310(undefined8 param_1,longlong param_2)

{
  FUN_1401a3830(*(longlong *)(param_2 + 0xb0) + 0x90);
  return;
}



void Unwind_140210330(undefined8 param_1,longlong param_2)

{
  FUN_1401b0810(*(longlong *)(param_2 + 0xb0) + 0xa0);
  return;
}



void Unwind_140210350(undefined8 param_1,longlong param_2)

{
  FUN_14015a530(*(longlong *)(param_2 + 0xb0) + 0x98);
  return;
}



void Unwind_140210370(undefined8 param_1,longlong param_2)

{
  FUN_14015a5c0(*(longlong *)(param_2 + 0xb0) + 0xd8);
  return;
}



void Unwind_140210390(undefined8 param_1,longlong param_2)

{
  FUN_14015ae50(*(longlong *)(param_2 + 0xb0) + 0x4e0);
  return;
}



void Unwind_1402103b0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0xb0) + 0x518);
  return;
}



void Unwind_1402103d0(undefined8 param_1,longlong param_2)

{
  FUN_1401b2420(*(longlong *)(param_2 + 0xb0) + 0x5d0);
  return;
}



void Unwind_1402103f0(undefined8 param_1,longlong param_2)

{
  FUN_1401b10e0(*(longlong *)(param_2 + 0xb0) + 0x5d8);
  return;
}



void Unwind_140210410(undefined8 param_1,longlong param_2)

{
  FUN_1401c45b0(*(longlong *)(param_2 + 0xb0) + 0x5e0);
  return;
}



void Unwind_140210430(undefined8 param_1,longlong param_2)

{
  FUN_1401beaa0(*(longlong *)(param_2 + 0xb0) + 0x6e0);
  return;
}



void Unwind_140210450(undefined8 param_1,longlong param_2)

{
  FUN_14015a5c0(*(longlong *)(param_2 + 0xb0) + 0x708);
  return;
}



void Unwind_140210470(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140187ae0(*(longlong *)(param_2 + 0xb0) + 0xb08);
  return;
}



void Unwind_140210490(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(longlong *)(param_2 + 0xb0) + 0x1520);
  return;
}



void Unwind_1402104b0(undefined8 param_1,longlong param_2)

{
  FUN_1401beaa0(*(longlong *)(param_2 + 0xb0) + 0x1530);
  return;
}



void Unwind_1402104d0(undefined8 param_1,longlong param_2)

{
  FUN_1401af640(*(longlong *)(param_2 + 0xb0) + 0x1550);
  return;
}



void Unwind_1402104f0(undefined8 param_1,longlong param_2)

{
  FUN_1401b1190(*(longlong *)(param_2 + 0xb0) + 0x1570);
  return;
}



void Unwind_140210510(undefined8 param_1,longlong param_2)

{
  FUN_140143e10(*(longlong *)(param_2 + 0xb0) + 0x1588);
  return;
}



void Unwind_140210530(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(longlong *)(param_2 + 0xb0) + 0x15d8);
  return;
}



void Unwind_140210550(undefined8 param_1,longlong param_2)

{
  FUN_1401c4c70(*(longlong *)(param_2 + 0xb0) + 0x15e0);
  return;
}



void Unwind_140210570(undefined8 param_1,longlong param_2)

{
  FUN_1401c4c70(*(longlong *)(param_2 + 0xb0) + 0x1600);
  return;
}



void Unwind_140210590(undefined8 param_1,longlong param_2)

{
  FUN_1401c05a0(*(longlong *)(param_2 + 0xb0) + 0x1650);
  return;
}



void Unwind_1402105b0(undefined8 param_1,longlong param_2)

{
  FUN_1401c05a0(*(longlong *)(param_2 + 0xb0) + 0x16a8);
  return;
}



void Unwind_1402105d0(undefined8 param_1,longlong param_2)

{
  FUN_1401bea70(*(longlong *)(param_2 + 0xb0) + 0x1700);
  return;
}



void Unwind_1402105f0(undefined8 param_1,longlong param_2)

{
  FUN_1401c05a0(*(longlong *)(param_2 + 0xb0) + 0x1720);
  return;
}



void Unwind_140210610(undefined8 param_1,longlong param_2)

{
  FUN_1401bead0(*(longlong *)(param_2 + 0xb0) + 0x17b0);
  return;
}



void Unwind_140210630(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156cd0(*(longlong *)(param_2 + 0xb0) + 0x17d0);
  return;
}



void Unwind_140210650(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140157bd0(*(longlong *)(param_2 + 0xb0) + 0x17f0);
  return;
}



void Unwind_140210670(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156cd0(*(longlong *)(param_2 + 0xb0) + 0x1818);
  return;
}



void Unwind_140210690(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140157bd0(*(longlong *)(param_2 + 0xb0) + 0x1838);
  return;
}



void Unwind_1402106b0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x38);
  return;
}



void Unwind_1402106c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402106d0(undefined8 param_1,longlong param_2)

{
  FUN_1401b1190(param_2 + 0xb8);
  return;
}



void Unwind_1402106e0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0xc0);
  return;
}



void Unwind_1402106f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 200));
  return;
}



void Unwind_140210700(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140210710(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140210720(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x40);
  return;
}



void Unwind_140210730(undefined8 param_1,longlong param_2)

{
  FUN_1401ab1a0(param_2 + 0x38);
  return;
}



void Unwind_140210740(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x40);
  return;
}



void Unwind_140210750(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x180) + 8);
  return;
}



void Unwind_140210760(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(*(undefined8 *)(param_2 + 0x148));
  return;
}



void Unwind_140210770(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_140210780(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_140210790(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x20);
  return;
}



void Unwind_1402107a0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_1402107b0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_1402107c0(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0x40);
  return;
}



void Unwind_1402107d0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x48);
  return;
}



void Unwind_1402107e0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x70);
  return;
}



void Unwind_1402107f0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x98);
  return;
}



void Unwind_140210800(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x150) + 8);
  return;
}



void Unwind_140210810(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140210820(undefined8 param_1,longlong param_2)

{
  FUN_1401ab1a0(param_2 + 0x70);
  return;
}



void Unwind_140210830(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x218),*(undefined8 *)(param_2 + 0x200));
  return;
}



void Unwind_140210860(undefined8 param_1,longlong param_2)

{
  FUN_140157080(*(longlong *)(param_2 + 0x68) + 8);
  return;
}



void Unwind_140210870(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x78);
  return;
}



void Unwind_140210880(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(*(longlong *)(param_2 + 0x208) + 8);
  return;
}



void Unwind_140210890(undefined8 param_1,longlong param_2)

{
  FUN_140174690(*(longlong *)(param_2 + 0x208) + 0x18);
  return;
}



void Unwind_1402108a0(undefined8 param_1,longlong param_2)

{
  FUN_140174710(*(longlong *)(param_2 + 0x208) + 0x20);
  return;
}



void Unwind_1402108b0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x208) + 0x28);
  return;
}



void Unwind_1402108c0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(*(longlong *)(param_2 + 0x208) + 0x50);
  return;
}



void Unwind_1402108d0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x208) + 0x78);
  return;
}



void Unwind_1402108e0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x210) + 8);
  return;
}



void Unwind_1402108f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140210900(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x200));
  return;
}



void Unwind_140210910(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140210920(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x200));
  return;
}



void Unwind_140210930(undefined8 param_1,longlong param_2)

{
  thunk_FUN_1401617d0(*(longlong *)(param_2 + 0x218) + 0x38);
  return;
}



void Unwind_140210940(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140210950(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x200));
  return;
}



void Unwind_140210960(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x218) + 0x10);
  return;
}



void Unwind_140210970(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x218) + 0x28);
  return;
}



void Unwind_140210980(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x200) + 8);
  return;
}



void Unwind_140210990(undefined8 param_1,longlong param_2)

{
  FUN_1401b1190(param_2 + 0x50);
  return;
}



void Unwind_1402109a0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x58);
  return;
}



void Unwind_1402109b0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x48);
  return;
}



void Unwind_1402109c0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x30);
  return;
}



void Unwind_1402109d0(undefined8 param_1,longlong param_2)

{
  FUN_140143e10(param_2 + 0x120);
  return;
}



void Unwind_1402109e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x120);
  return;
}



void Unwind_1402109f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_140210a00(undefined8 param_1,longlong param_2)

{
  FUN_1401c18f0(param_2 + 0x48);
  return;
}



void Unwind_140210a10(undefined8 param_1,longlong param_2)

{
  FUN_1401c18f0(param_2 + 0x58);
  return;
}



void Unwind_140210a20(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x40);
  return;
}



void Unwind_140210a30(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140210a40(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x50);
  return;
}



void Unwind_140210a50(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x88);
  return;
}



void Unwind_140210a60(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x98);
  return;
}



void Unwind_140210a70(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x80);
  return;
}



void Unwind_140210a80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_140210a90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_140210aa0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xa0);
  return;
}



void Unwind_140210ab0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x78);
  return;
}



void Unwind_140210ac0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140210ad0(undefined8 param_1,longlong param_2)

{
  FUN_1401bcd80(param_2 + 0x198);
  return;
}



void Unwind_140210ae0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x38);
  return;
}



void Unwind_140210af0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x48);
  return;
}



void Unwind_140210b00(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x30);
  return;
}



void Unwind_140210b10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x120);
  return;
}



void Unwind_140210b20(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x188);
  return;
}



void Unwind_140210b30(undefined8 param_1,longlong param_2)

{
  FUN_1401c18f0(param_2 + 0x170);
  return;
}



void Unwind_140210b40(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x38);
  return;
}



void Unwind_140210b50(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x48);
  return;
}



void Unwind_140210b60(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x30);
  return;
}



void Unwind_140210b70(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x38);
  return;
}



void Unwind_140210b80(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x48);
  return;
}



void Unwind_140210b90(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0x50);
  return;
}



void Unwind_140210ba0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x58);
  return;
}



void Unwind_140210bb0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x80);
  return;
}



void Unwind_140210bc0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xa8);
  return;
}



void Unwind_140210bd0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x130) + 8);
  return;
}



void Unwind_140210be0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140210bf0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x170);
  return;
}



void Unwind_140210c00(undefined8 param_1,longlong param_2)

{
  FUN_1401bcd80(param_2 + 0x30);
  return;
}



void Unwind_140210c10(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x58);
  return;
}



void Unwind_140210c20(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x68);
  return;
}



void Unwind_140210c30(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x50);
  return;
}



void Unwind_140210c40(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x28);
  return;
}



void Unwind_140210c50(undefined8 param_1,longlong param_2)

{
  FUN_1401883e0(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140210c60(undefined8 param_1,longlong param_2)

{
  FUN_1401af540(*(longlong *)(param_2 + 0x90) + 0x60);
  return;
}



void Unwind_140210c70(undefined8 param_1,longlong param_2)

{
  FUN_1401af580(*(longlong *)(param_2 + 0x90) + 0x68);
  return;
}



void Unwind_140210c80(undefined8 param_1,longlong param_2)

{
  FUN_1401af530(*(longlong *)(param_2 + 0x90) + 0x70);
  return;
}



void Unwind_140210c90(undefined8 param_1,longlong param_2)

{
  FUN_1401a56e0(*(longlong *)(param_2 + 0x90) + 0x78);
  return;
}



void Unwind_140210ca0(undefined8 param_1,longlong param_2)

{
  FUN_1401a3870(*(longlong *)(param_2 + 0x90) + 0x88);
  return;
}



void Unwind_140210cc0(undefined8 param_1,longlong param_2)

{
  FUN_1401a3830(*(longlong *)(param_2 + 0x90) + 0x90);
  return;
}



void Unwind_140210ce0(undefined8 param_1,longlong param_2)

{
  FUN_1401b0810(*(longlong *)(param_2 + 0x90) + 0xa0);
  return;
}



void Unwind_140210d00(undefined8 param_1,longlong param_2)

{
  FUN_14015a530(*(longlong *)(param_2 + 0x90) + 0x98);
  return;
}



void Unwind_140210d20(undefined8 param_1,longlong param_2)

{
  FUN_14015a5c0(*(longlong *)(param_2 + 0x90) + 0xd8);
  return;
}



void Unwind_140210d40(undefined8 param_1,longlong param_2)

{
  FUN_14015ae50(*(longlong *)(param_2 + 0x90) + 0x4e0);
  return;
}



void Unwind_140210d60(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x90) + 0x518);
  return;
}



void Unwind_140210d80(undefined8 param_1,longlong param_2)

{
  FUN_1401b2420(*(longlong *)(param_2 + 0x90) + 0x5d0);
  return;
}



void Unwind_140210da0(undefined8 param_1,longlong param_2)

{
  FUN_1401b10e0(*(longlong *)(param_2 + 0x90) + 0x5d8);
  return;
}



void Unwind_140210dc0(undefined8 param_1,longlong param_2)

{
  FUN_1401c45b0(*(longlong *)(param_2 + 0x90) + 0x5e0);
  return;
}



void Unwind_140210de0(undefined8 param_1,longlong param_2)

{
  FUN_1401beaa0(*(longlong *)(param_2 + 0x90) + 0x6e0);
  return;
}



void Unwind_140210e00(undefined8 param_1,longlong param_2)

{
  FUN_14015a5c0(*(longlong *)(param_2 + 0x90) + 0x708);
  return;
}



void Unwind_140210e20(undefined8 param_1,longlong param_2)

{
  FUN_140187ae0(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140210e30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140187ae0(*(longlong *)(param_2 + 0x90) + 0xb08);
  return;
}



void Unwind_140210e50(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(longlong *)(param_2 + 0x90) + 0x1520);
  return;
}



void Unwind_140210e70(undefined8 param_1,longlong param_2)

{
  FUN_1401beaa0(*(longlong *)(param_2 + 0x90) + 0x1530);
  return;
}



void Unwind_140210e90(undefined8 param_1,longlong param_2)

{
  FUN_1401af640(*(longlong *)(param_2 + 0x90) + 0x1550);
  return;
}



void Unwind_140210eb0(undefined8 param_1,longlong param_2)

{
  FUN_1401b1190(*(longlong *)(param_2 + 0x90) + 0x1570);
  return;
}



void Unwind_140210ed0(undefined8 param_1,longlong param_2)

{
  FUN_140143e10(*(longlong *)(param_2 + 0x90) + 0x1588);
  return;
}



void Unwind_140210ef0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(longlong *)(param_2 + 0x90) + 0x15d8);
  return;
}



void Unwind_140210f10(undefined8 param_1,longlong param_2)

{
  FUN_1401c4c70(*(longlong *)(param_2 + 0x90) + 0x15e0);
  return;
}



void Unwind_140210f30(undefined8 param_1,longlong param_2)

{
  FUN_1401c4c70(*(longlong *)(param_2 + 0x90) + 0x1600);
  return;
}



void Unwind_140210f50(undefined8 param_1,longlong param_2)

{
  FUN_1401c05a0(*(longlong *)(param_2 + 0x90) + 0x1650);
  return;
}



void Unwind_140210f70(undefined8 param_1,longlong param_2)

{
  FUN_1401c05a0(*(longlong *)(param_2 + 0x90) + 0x16a8);
  return;
}



void Unwind_140210f90(undefined8 param_1,longlong param_2)

{
  FUN_1401bea70(*(longlong *)(param_2 + 0x90) + 0x1700);
  return;
}



void Unwind_140210fb0(undefined8 param_1,longlong param_2)

{
  FUN_1401c05a0(*(longlong *)(param_2 + 0x90) + 0x1720);
  return;
}



void Unwind_140210fd0(undefined8 param_1,longlong param_2)

{
  FUN_1401bead0(*(longlong *)(param_2 + 0x90) + 0x17b0);
  return;
}



void Unwind_140210ff0(undefined8 param_1,longlong param_2)

{
  FUN_140156cd0(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140211000(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156cd0(*(longlong *)(param_2 + 0x90) + 0x17d0);
  return;
}



void Unwind_140211020(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140157bd0(*(longlong *)(param_2 + 0x90) + 0x17f0);
  return;
}



void Unwind_140211040(undefined8 param_1,longlong param_2)

{
  FUN_140156cd0(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140211050(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156cd0(*(longlong *)(param_2 + 0x90) + 0x1818);
  return;
}



void Unwind_140211070(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140157bd0(*(longlong *)(param_2 + 0x90) + 0x1838);
  return;
}



void Unwind_140211090(undefined8 param_1,longlong param_2)

{
  FUN_1401b10e0(param_2 + 0x98);
  return;
}



void Unwind_1402110a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402110b0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_1402110c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x120);
  return;
}



void Unwind_1402110d0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x38);
  return;
}



void Unwind_1402110e0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x48);
  return;
}



void Unwind_1402110f0(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x30);
  return;
}



void Unwind_140211100(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x180),0x60);
  return;
}



void Unwind_140211120(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x20),*(undefined8 *)(param_2 + 0x180));
  return;
}



void Unwind_140211140(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x180);
  return;
}



void Unwind_140211150(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140211160(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x130);
  return;
}



void Unwind_140211170(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x38);
  return;
}



void Unwind_140211180(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x48);
  return;
}



void Unwind_140211190(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0x50);
  return;
}



void Unwind_1402111a0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x58);
  return;
}



void Unwind_1402111b0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x80);
  return;
}



void Unwind_1402111c0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xa8);
  return;
}



void Unwind_1402111d0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x180) + 8);
  return;
}



void Unwind_1402111e0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(*(undefined8 *)(param_2 + 400));
  return;
}



void Unwind_1402111f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x120);
  return;
}



void Unwind_140211200(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x38);
  return;
}



void Unwind_140211210(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x48);
  return;
}



void Unwind_140211220(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x30);
  return;
}



void Unwind_140211230(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x180),0x60);
  return;
}



void Unwind_140211250(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x198),*(undefined8 *)(param_2 + 0x180));
  return;
}



void Unwind_140211280(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x180);
  return;
}



void Unwind_140211290(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_1402112a0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x38);
  return;
}



void Unwind_1402112b0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x48);
  return;
}



void Unwind_1402112c0(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0x50);
  return;
}



void Unwind_1402112d0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x58);
  return;
}



void Unwind_1402112e0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x80);
  return;
}



void Unwind_1402112f0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xa8);
  return;
}



void Unwind_140211300(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x180) + 8);
  return;
}



void Unwind_140211310(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x120);
  return;
}



void Unwind_140211320(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x38);
  return;
}



void Unwind_140211330(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x48);
  return;
}



void Unwind_140211340(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x30);
  return;
}



void Unwind_140211350(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x180),0x60);
  return;
}



void Unwind_140211370(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x198),*(undefined8 *)(param_2 + 0x180));
  return;
}



void Unwind_1402113a0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x180);
  return;
}



void Unwind_1402113b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_1402113c0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x38);
  return;
}



void Unwind_1402113d0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x48);
  return;
}



void Unwind_1402113e0(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0x50);
  return;
}



void Unwind_1402113f0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x58);
  return;
}



void Unwind_140211400(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x80);
  return;
}



void Unwind_140211410(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xa8);
  return;
}



void Unwind_140211420(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x180) + 8);
  return;
}



void Unwind_140211430(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140211440(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140211450(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140211460(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_140211470(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_140211480(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140211490(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_1402114a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_1402114b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe0);
  return;
}



void Unwind_1402114c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x100);
  return;
}



void Unwind_1402114d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x120);
  return;
}



void Unwind_1402114e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_1402114f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140211500(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x98);
  return;
}



void Unwind_140211510(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xa8);
  return;
}



void Unwind_140211520(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xc0);
  return;
}



void Unwind_140211530(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140211540(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140211550(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_140211560(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_140211570(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd0);
  return;
}



void Unwind_140211580(undefined8 param_1,longlong param_2)

{
  FUN_1401ab4b0(param_2 + 0x50);
  return;
}



void Unwind_140211590(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0xd8);
  return;
}



void Unwind_1402115a0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0xe8);
  return;
}



void Unwind_1402115b0(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0xd0);
  return;
}



void Unwind_1402115c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x2c8),0x60);
  return;
}



void Unwind_1402115e0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x238),*(undefined8 *)(param_2 + 0x2c8));
  return;
}



void Unwind_140211610(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x2c8);
  return;
}



void Unwind_140211620(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_140211630(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_140211640(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa8);
  return;
}



void Unwind_140211650(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2c0);
  return;
}



void Unwind_140211660(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x208);
  return;
}



void Unwind_140211670(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c0);
  return;
}



void Unwind_140211680(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_140211690(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 200);
  return;
}



void Unwind_1402116a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa0);
  return;
}



void Unwind_1402116b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x228);
  return;
}



void Unwind_1402116c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d0);
  return;
}



void Unwind_1402116d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1e0);
  return;
}



void Unwind_1402116e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1f8);
  return;
}



void Unwind_1402116f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x218);
  return;
}



void Unwind_140211700(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0xd8);
  return;
}



void Unwind_140211710(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0xe8);
  return;
}



void Unwind_140211720(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0xf0);
  return;
}



void Unwind_140211730(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xf8);
  return;
}



void Unwind_140211740(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x120);
  return;
}



void Unwind_140211750(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x148);
  return;
}



void Unwind_140211760(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x2b0) + 8);
  return;
}



void Unwind_140211770(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x38);
  return;
}



void Unwind_140211780(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x48);
  return;
}



void Unwind_140211790(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x30);
  return;
}



void Unwind_1402117a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x178),0x60);
  return;
}



void Unwind_1402117c0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x20),*(undefined8 *)(param_2 + 0x178));
  return;
}



void Unwind_1402117e0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x178);
  return;
}



void Unwind_1402117f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140211800(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x38);
  return;
}



void Unwind_140211810(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x48);
  return;
}



void Unwind_140211820(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0x50);
  return;
}



void Unwind_140211830(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x58);
  return;
}



void Unwind_140211840(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x80);
  return;
}



void Unwind_140211850(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xa8);
  return;
}



void Unwind_140211860(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x178) + 8);
  return;
}



void Unwind_140211870(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x40));
  return;
}



void Unwind_140211880(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x50) + 0x70);
  return;
}



void Unwind_140211890(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402118a0(void)

{
  DAT_14032b2f8 = DAT_14032b2f8 & 0xfffffffe;
  return;
}



void Unwind_1402118c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402118d0(undefined8 param_1,longlong param_2)

{
  FUN_14019c990(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402118e0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402118f0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140211900(undefined8 param_1,longlong param_2)

{
  FUN_14019c990(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140211910(undefined8 param_1,longlong param_2)

{
  thunk_FUN_1401617d0(*(longlong *)(param_2 + 0x40) + 0x38);
  return;
}



void Unwind_140211920(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140211930(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140211940(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140211950(void)

{
  DAT_14032e3a0 = DAT_14032e3a0 & 0xfffffffe;
  return;
}



void Unwind_140211970(undefined8 param_1,longlong param_2)

{
  FUN_1401d3f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140211980(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x50);
  return;
}



void Unwind_140211990(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402119a0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x28);
  return;
}



void Unwind_1402119b0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_1402119c0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0xf8);
  return;
}



void Unwind_1402119d0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x60);
  return;
}



void Unwind_1402119e0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x50) + 8);
  return;
}



void Unwind_1402119f0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x50) + 8);
  return;
}



void Unwind_140211a00(undefined8 param_1,longlong param_2)

{
  FUN_1401d3f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140211a10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_140211a20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140211a30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140211a40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_140211a50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140211a60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140211a70(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_140211a80(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x30);
  return;
}



void Unwind_140211a90(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x80);
  return;
}



void Unwind_140211aa0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xd10);
  return;
}



void Unwind_140211ab0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140211ac0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_140211ad0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x70) + 8);
  return;
}



void Unwind_140211ae0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x20);
  return;
}



void Unwind_140211af0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x50);
  return;
}



void Unwind_140211b00(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xe0) + 8);
  return;
}



void Unwind_140211b10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140211b20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_140211b30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140211b40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_140211b50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_140211b60(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x38);
  return;
}



void Unwind_140211b70(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x38);
  return;
}



void Unwind_140211b80(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd70);
  return;
}



void Unwind_140211ba0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xf0);
  return;
}



void Unwind_140211bb0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd70);
  return;
}



void Unwind_140211bd0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x28) + 8);
  return;
}



void Unwind_140211be0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x40);
  return;
}



void Unwind_140211bf0(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x40);
  return;
}



void Unwind_140211c00(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x128) + 8);
  return;
}



void Unwind_140211c10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140211c20(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140211c30(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x60);
  return;
}



void Unwind_140211c40(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x70),*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140211c60(undefined8 param_1,longlong param_2)

{
  FUN_14018d100(param_2 + 0x90);
  return;
}



void Unwind_140211c70(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x68);
  return;
}



void Unwind_140211c80(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x40);
  return;
}



void Unwind_140211c90(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x40);
  return;
}



void Unwind_140211ca0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0xc0);
  return;
}



void Unwind_140211cb0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x1d8) + 8);
  return;
}



void Unwind_140211cc0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x1d8) + 8);
  return;
}



void Unwind_140211cd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_140211ce0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x160);
  return;
}



void Unwind_140211cf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140211d00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x150);
  return;
}



void Unwind_140211d10(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xc0);
  return;
}



void Unwind_140211d20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_140211d30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b0);
  return;
}



void Unwind_140211d40(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x70);
  return;
}



void Unwind_140211d50(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x98);
  return;
}



undefined * Catch_140211d60(undefined8 param_1,longlong param_2)

{
  int *piVar1;
  longlong lVar2;
  undefined *puVar3;
  longlong *plVar4;
  undefined8 uVar5;
  
  FUN_1401568c0();
  *(undefined **)(param_2 + 0xe8) = PTR_DAT_1403200a0;
  lVar2 = *(longlong *)(param_2 + 0x28);
  FUN_1401c8a70(*(undefined8 *)(lVar2 + 0x108),5,3,param_2 + 0xe8);
  puVar3 = *(undefined **)(param_2 + 0xe8);
  if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_1403200a0)) &&
     (puVar3 + -8 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    *(undefined8 *)(param_2 + 0x1d0) = uVar5;
    FUN_140156b50(uVar5);
    *(undefined1 *)(param_2 + 0x1d8) = 1;
    piVar1 = (int *)(puVar3 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar3 + -8);
    }
    FUN_140156be0(uVar5);
  }
  if (*(longlong *)(*(longlong *)(lVar2 + 0x108) + 0x1580) != 0) {
    plVar4 = *(longlong **)(*(longlong *)(lVar2 + 0x108) + 0x1580);
    (**(code **)(*plVar4 + 0x20))(plVar4,*(undefined8 *)(param_2 + 0x1f0));
  }
  FUN_1401d3870(lVar2,4);
  return &DAT_1401d777c;
}



void Unwind_140211e40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xe8);
  return;
}



void Unwind_140211e50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d0);
  return;
}



void Unwind_140211e60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x28);
  return;
}



void Unwind_140211e70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c0);
  return;
}



void Unwind_140211e80(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x100);
  return;
}



void Unwind_140211e90(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x128);
  return;
}



undefined * Catch_140211ea0(undefined8 param_1,longlong param_2)

{
  int *piVar1;
  longlong lVar2;
  undefined *puVar3;
  longlong *plVar4;
  undefined8 uVar5;
  
  FUN_1401568c0();
  *(undefined **)(param_2 + 0xf0) = PTR_DAT_1403200a0;
  lVar2 = *(longlong *)(param_2 + 0x28);
  FUN_1401c8a70(*(undefined8 *)(lVar2 + 0x108),5,3,param_2 + 0xf0);
  puVar3 = *(undefined **)(param_2 + 0xf0);
  if (((puVar3 != (undefined *)0x0) && (puVar3 != PTR_DAT_1403200a0)) &&
     (puVar3 + -8 != (undefined *)0x0)) {
    uVar5 = FUN_1401568c0();
    *(undefined8 *)(param_2 + 0x1f8) = uVar5;
    FUN_140156b50(uVar5);
    *(undefined1 *)(param_2 + 0x200) = 1;
    piVar1 = (int *)(puVar3 + -4);
    *piVar1 = *piVar1 + -1;
    if (*piVar1 == 0) {
      FUN_140156970(puVar3 + -8);
    }
    FUN_140156be0(uVar5);
  }
  if (*(longlong *)(*(longlong *)(lVar2 + 0x108) + 0x1580) != 0) {
    plVar4 = *(longlong **)(*(longlong *)(lVar2 + 0x108) + 0x1580);
    (**(code **)(*plVar4 + 0x20))(plVar4,*(undefined8 *)(param_2 + 0x1e0));
  }
  FUN_1401d3870(lVar2,4);
  return &DAT_1401d773c;
}



void Unwind_140211f80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_140211f90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1f8);
  return;
}



void Unwind_140211fa0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_140211fb0(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x30);
  return;
}



void Unwind_140211fc0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x210);
  return;
}



void Unwind_140211fd0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xf8) + 8);
  return;
}



void Unwind_140211fe0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x20);
  return;
}



void Unwind_140211ff0(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x20);
  return;
}



void Unwind_140212000(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd30);
  return;
}



void Unwind_140212020(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xb0);
  return;
}



void Unwind_140212030(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd30);
  return;
}



void Unwind_140212050(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x50) + 8);
  return;
}



void Unwind_140212060(undefined8 param_1,longlong param_2)

{
  FUN_140190f40(param_2 + 0x30);
  return;
}



void Unwind_140212070(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x110);
  return;
}



void Unwind_140212080(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x68);
  return;
}



void Unwind_140212090(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x90);
  return;
}



void Unwind_1402120a0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xb8);
  return;
}



void Unwind_1402120b0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x50) + 8);
  return;
}



void Unwind_1402120c0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x38);
  return;
}



void Unwind_1402120d0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x60);
  return;
}



void Unwind_1402120e0(undefined8 param_1,longlong param_2)

{
  FUN_14016b9f0(param_2 + 0x58);
  return;
}



void Unwind_1402120f0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x130);
  return;
}



void Unwind_140212100(undefined8 param_1,longlong param_2)

{
  FUN_140190f40(param_2 + 0x90);
  return;
}



void Unwind_140212110(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_140212120(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xe8);
  return;
}



void Unwind_140212130(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_140212140(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x60);
  return;
}



void Unwind_140212150(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xe0) + 8);
  return;
}



void Unwind_140212160(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xe0) + 8);
  return;
}



void Unwind_140212170(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x80);
  return;
}



void Unwind_140212180(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x170) + 8);
  return;
}



void Unwind_140212190(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x38);
  return;
}



void Unwind_1402121a0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x48);
  return;
}



void Unwind_1402121b0(undefined8 param_1,longlong param_2)

{
  FUN_14016b9f0(param_2 + 0x40);
  return;
}



void Unwind_1402121c0(undefined8 param_1,longlong param_2)

{
  FUN_140190f40(param_2 + 0xa8);
  return;
}



void Unwind_1402121d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_1402121e0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xd8);
  return;
}



void Unwind_1402121f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x100);
  return;
}



void Unwind_140212200(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x48);
  return;
}



void Unwind_140212210(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x118) + 8);
  return;
}



void Unwind_140212220(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x170) + 8);
  return;
}



void Unwind_140212230(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa0);
  return;
}



void Unwind_140212240(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x48);
  return;
}



void Unwind_140212250(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140212260(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_140212270(undefined8 param_1,longlong param_2)

{
  FUN_14015a470(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140212280(undefined8 param_1,longlong param_2)

{
  FUN_1401d37b0(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140212290(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_1402122a0(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(*(longlong *)(param_2 + 0x40) + 0x78);
  return;
}



void Unwind_1402122b0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0x88);
  return;
}



void Unwind_1402122d0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0x1c8);
  return;
}



void Unwind_1402122f0(undefined8 param_1,longlong param_2)

{
  FUN_1401a9270(*(longlong *)(param_2 + 0x40) + 0x208);
  return;
}



void Unwind_140212310(undefined8 param_1,longlong param_2)

{
  FUN_1401bea70(*(longlong *)(param_2 + 0x40) + 0x228);
  return;
}



void Unwind_140212330(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(longlong *)(param_2 + 0x40) + 0x290);
  return;
}



void Unwind_140212350(undefined8 param_1,longlong param_2)

{
  thunk_FUN_1401d4060(*(longlong *)(param_2 + 0x40) + 0x298);
  return;
}



void Unwind_140212370(undefined8 param_1,longlong param_2)

{
  FUN_1401d3f70(*(longlong *)(param_2 + 0x40) + 0x2b0);
  return;
}



void Unwind_140212390(undefined8 param_1,longlong param_2)

{
  FUN_1401d4200(*(longlong *)(param_2 + 0x40) + 0x2b8);
  return;
}



void Unwind_1402123b0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_1402123c0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_1402123d0(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x20);
  return;
}



void Unwind_1402123e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x150),0x60);
  return;
}



void Unwind_140212400(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x160),*(undefined8 *)(param_2 + 0x150));
  return;
}



void Unwind_140212430(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x150);
  return;
}



void Unwind_140212440(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_140212450(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_140212460(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_140212470(undefined8 param_1,longlong param_2)

{
  FUN_140174710(param_2 + 0x40);
  return;
}



void Unwind_140212480(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x48);
  return;
}



void Unwind_140212490(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x70);
  return;
}



void Unwind_1402124a0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x98);
  return;
}



void Unwind_1402124b0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x150) + 8);
  return;
}



void Unwind_1402124c0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x40);
  return;
}



void Unwind_1402124d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_1402124e0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0xa0);
  return;
}



void Unwind_1402124f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 200);
  return;
}



void Unwind_140212500(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x48);
  return;
}



void Unwind_140212510(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x100);
  return;
}



void Unwind_140212520(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x160);
  return;
}



void Unwind_140212530(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x130);
  return;
}



void Unwind_140212540(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140212550(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_140212560(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140212570(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x120);
  return;
}



void Unwind_140212580(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe0);
  return;
}



void Unwind_140212590(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_1402125a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_1402125b0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(param_2 + 0x48);
  return;
}



void Unwind_1402125c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_1402125d0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x28);
  return;
}



void Unwind_1402125e0(undefined8 param_1,longlong param_2)

{
  FUN_140174690(param_2 + 0x38);
  return;
}



void Unwind_1402125f0(undefined8 param_1,longlong param_2)

{
  FUN_140174b20(param_2 + 0x20);
  return;
}



void Unwind_140212600(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x20);
  return;
}



void Unwind_140212610(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x90);
  return;
}



void Unwind_140212620(undefined8 param_1,longlong param_2)

{
  FUN_1401ab1a0(param_2 + 0x88);
  return;
}



void Unwind_140212630(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x90);
  return;
}



void Unwind_140212640(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x1e0) + 8);
  return;
}



void Unwind_140212650(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



void Unwind_140212660(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x1e0) + 8);
  return;
}



void Unwind_140212670(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x20);
  return;
}



void Unwind_140212680(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x90);
  return;
}



void Unwind_140212690(undefined8 param_1,longlong param_2)

{
  FUN_1401ab1a0(param_2 + 0x88);
  return;
}



void Unwind_1402126a0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x90);
  return;
}



void Unwind_1402126b0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x238) + 8);
  return;
}



void Unwind_1402126c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



void Unwind_1402126d0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x238) + 8);
  return;
}



void Unwind_1402126e0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x50);
  return;
}



void Unwind_1402126f0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xd0) + 8);
  return;
}



void Unwind_140212700(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x50);
  return;
}



void Unwind_140212710(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xd0) + 8);
  return;
}



void Unwind_140212720(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd0);
  return;
}



void Unwind_140212730(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x50);
  return;
}



void Unwind_140212740(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140212750(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x30);
  return;
}



void Unwind_140212760(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xb0) + 8);
  return;
}



void Unwind_140212770(undefined8 param_1,longlong param_2)

{
  FUN_14018da70(param_2 + 0x40);
  return;
}



void Unwind_140212780(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x138);
  return;
}



void Unwind_140212790(undefined8 param_1,longlong param_2)

{
  FUN_140190f40(param_2 + 0x58);
  return;
}



void Unwind_1402127a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xc0);
  return;
}



void Unwind_1402127b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



void Unwind_1402127c0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0x20);
  return;
}



void Unwind_1402127d0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x80);
  return;
}



void Unwind_1402127e0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xe0) + 8);
  return;
}



void Unwind_1402127f0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0xe8),*(undefined8 *)(param_2 + 0xe0));
  return;
}



void Unwind_140212820(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xe0) + 8);
  return;
}



void Unwind_140212830(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb8);
  return;
}



void Unwind_140212840(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140212850(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb0);
  return;
}



void Unwind_140212860(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140212870(undefined8 param_1,longlong param_2)

{
  FUN_140190f40(param_2 + 0x58);
  return;
}



void Unwind_140212880(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc0);
  return;
}



void Unwind_140212890(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



undefined * Catch_1402128a0(undefined8 param_1,longlong param_2)

{
  LPCSTR lpOutputString;
  
  lpOutputString = (LPCSTR)(**(code **)(**(longlong **)(param_2 + 0x38) + 8))();
  OutputDebugStringA(lpOutputString);
  uRam0000000000000000 = 1;
  return &DAT_1401dbee2;
}



void Unwind_1402128e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



undefined * Catch_1402128f0(undefined8 param_1,longlong param_2)

{
  LPCSTR lpOutputString;
  
  lpOutputString = (LPCSTR)(**(code **)(**(longlong **)(param_2 + 0x38) + 8))();
  OutputDebugStringA(lpOutputString);
  uRam0000000000000000 = 1;
  return &DAT_1401dc03f;
}



void Unwind_140212930(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140212940(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140212950(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140212960(undefined8 param_1,longlong param_2)

{
  FUN_1401b2420(param_2 + 0x60);
  return;
}



void Unwind_140212970(undefined8 param_1,longlong param_2)

{
  FUN_14015a470(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140212980(undefined8 param_1,longlong param_2)

{
  FUN_1401d37b0(*(longlong *)(param_2 + 0x70) + 8);
  return;
}



void Unwind_140212990(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x70) + 0x10);
  return;
}



void Unwind_1402129a0(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(*(longlong *)(param_2 + 0x70) + 0x78);
  return;
}



void Unwind_1402129b0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x70) + 0x88);
  return;
}



void Unwind_1402129d0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x70) + 0x1c8);
  return;
}



void Unwind_1402129f0(undefined8 param_1,longlong param_2)

{
  FUN_1401a9270(*(longlong *)(param_2 + 0x70) + 0x208);
  return;
}



void Unwind_140212a10(undefined8 param_1,longlong param_2)

{
  FUN_1401bea70(*(longlong *)(param_2 + 0x70) + 0x228);
  return;
}



void Unwind_140212a30(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(longlong *)(param_2 + 0x70) + 0x290);
  return;
}



void Unwind_140212a50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_1401d4060(*(longlong *)(param_2 + 0x70) + 0x298);
  return;
}



void Unwind_140212a70(undefined8 param_1,longlong param_2)

{
  FUN_1401d3f70(*(longlong *)(param_2 + 0x70) + 0x2b0);
  return;
}



void Unwind_140212a90(undefined8 param_1,longlong param_2)

{
  FUN_1401d4200(*(longlong *)(param_2 + 0x70) + 0x2b8);
  return;
}



void Unwind_140212ab0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140212ac0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140212ad0(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(param_2 + 0x78);
  return;
}



void Unwind_140212ae0(undefined8 param_1,longlong param_2)

{
  FUN_1401a5830(param_2 + 0x38);
  return;
}



void Unwind_140212af0(undefined8 param_1,longlong param_2)

{
  FUN_1401a5830(param_2 + 0x28);
  return;
}



void Unwind_140212b00(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x50);
  return;
}



undefined * Catch_All_140212b10(undefined8 param_1,longlong param_2)

{
  *(undefined4 *)(param_2 + 0x30) = 0;
  return &DAT_1401dd67d;
}



void Unwind_140212b40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140212b50(undefined8 param_1,longlong param_2)

{
  FUN_140158390(param_2 + 0x28);
  return;
}



void Unwind_140212b60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140212b70(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x50) & 1) != 0) {
    *(uint *)(param_2 + 0x50) = *(uint *)(param_2 + 0x50) & 0xfffffffe;
    thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  }
  return;
}



void Unwind_140212ba0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x78),
                *(longlong *)(param_2 + 0x60) + (longlong)*(int *)(param_2 + 0x70) * 8);
  return;
}



void Unwind_140212bd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140212be0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x30);
  return;
}



void Unwind_140212bf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x38);
  return;
}



void Unwind_140212c00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140212c10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140212c20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140212c30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140212c40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140212c50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x20);
  return;
}



void Unwind_140212c60(undefined8 param_1,longlong param_2)

{
  FUN_1401a56e0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140212c70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140212c80(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x40) + 0x2480);
  return;
}



void Unwind_140212ca0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(longlong *)(param_2 + 0x40) + 0x2488);
  return;
}



void Unwind_140212cc0(undefined8 param_1,longlong param_2)

{
  FUN_1401dd1d0(*(longlong *)(param_2 + 0x40) + 0x2510);
  return;
}



void Unwind_140212ce0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140212cf0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140212d00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140212d10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140212d20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x20);
  return;
}



void Unwind_140212d30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x28);
  return;
}



// Library Function - Single Match
//  int `public: class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class
// ATL::ChTraitsCRT<wchar_t> > > __cdecl CDatabase::GetDatabaseName(void)const __ptr64'::`1'::dtor$0
// 
// Library: Visual Studio 2005 Release

void Unwind_140212d40(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x88) & 1) != 0) {
    *(uint *)(param_2 + 0x88) = *(uint *)(param_2 + 0x88) & 0xfffffffe;
    thunk_FUN_140050520(*(undefined8 *)(param_2 + 0x78));
  }
  return;
}



void Unwind_140212d70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140212d80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140212d90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140212da0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140212db0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140212dc0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x50);
  return;
}



void Unwind_140212dd0(undefined8 param_1,longlong param_2)

{
  FUN_1401a56e0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140212de0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140212df0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_140212e00(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x58);
  return;
}



void Unwind_140212e10(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x48);
  return;
}



void Unwind_140212e20(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x28),*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140212e40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(undefined8 *)(param_2 + 0x28));
  return;
}



void Unwind_140212e50(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x28),*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140212e70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x68),0x400);
  return;
}



void Unwind_140212e90(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x68);
  return;
}



void Unwind_140212ea0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x70);
  return;
}



void Unwind_140212eb0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x78);
  return;
}



void Unwind_140212ec0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x20);
  return;
}



void Unwind_140212ed0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x78);
  return;
}



undefined8 Catch_All_140212ee0(void)

{
  return 0x1401dffe3;
}



void Unwind_140212f00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140212f10(undefined8 param_1,longlong param_2)

{
  FUN_140140da0(param_2 + 0x20);
  return;
}



void Unwind_140212f20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x48);
  return;
}



void Unwind_140212f30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_140212f40(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_140212f50(undefined8 param_1,longlong param_2)

{
  FUN_1401a56e0(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140212f60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(*(longlong *)(param_2 + 0x88) + 8);
  return;
}



void Unwind_140212f70(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0xf0);
  return;
}



void Unwind_140212f80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x70);
  return;
}



undefined8 Catch_All_140212f90(void)

{
  return 0x1401e0753;
}



void Unwind_140212fb0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_140212fc0(undefined8 param_1,longlong param_2)

{
  FUN_1401e0740(*(longlong *)(param_2 + 0x40) + 0x50);
  return;
}



void Unwind_140212fd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_1401dffd0(*(longlong *)(param_2 + 0x40) + 0xa8);
  return;
}



void Unwind_140212ff0(undefined8 param_1,longlong param_2)

{
  FUN_1401df300(*(longlong *)(param_2 + 0x40) + 0x100);
  return;
}



void Unwind_140213010(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x50) + 0x10);
  return;
}



void Unwind_140213020(undefined8 param_1,longlong param_2)

{
  FUN_1401e0740(*(longlong *)(param_2 + 0x50) + 0x50);
  return;
}



void Unwind_140213030(undefined8 param_1,longlong param_2)

{
  thunk_FUN_1401dffd0(*(longlong *)(param_2 + 0x50) + 0xa8);
  return;
}



void Unwind_140213050(undefined8 param_1,longlong param_2)

{
  FUN_1401df300(*(longlong *)(param_2 + 0x50) + 0x100);
  return;
}



void Unwind_140213070(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140213080(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x70);
  return;
}



void Unwind_140213090(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x20);
  return;
}



void Unwind_1402130a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe0);
  return;
}



void Unwind_1402130b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x80);
  return;
}



void Unwind_1402130c0(undefined8 param_1,longlong param_2)

{
  FUN_140154be0(param_2 + 0x108);
  return;
}



void Unwind_1402130d0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x30));
  return;
}



void Unwind_1402130e0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x30);
  return;
}



void Unwind_1402130f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd0);
  return;
}



void Unwind_140213100(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x130);
  return;
}



void Unwind_140213110(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xc0);
  return;
}



void Unwind_140213120(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x28);
  return;
}



void Unwind_140213130(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x90);
  return;
}



void Unwind_140213140(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x118);
  return;
}



void Unwind_140213150(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_140213160(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x60),0x400);
  return;
}



void Unwind_140213180(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x58);
  return;
}



void Unwind_140213190(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x230);
  return;
}



void Unwind_1402131a0(undefined8 param_1,longlong param_2)

{
  FUN_1401962d0(param_2 + 0x1a0);
  return;
}



void Unwind_1402131b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x60);
  return;
}



void Unwind_1402131c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x48);
  return;
}



void Unwind_1402131d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x38);
  return;
}



void Unwind_1402131e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x68);
  return;
}



void Unwind_1402131f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x40);
  return;
}



void Unwind_140213200(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x80);
  return;
}



void Unwind_140213210(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x78);
  return;
}



void Unwind_140213220(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x70);
  return;
}



void Unwind_140213230(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x118);
  return;
}



void Unwind_140213240(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 400);
  return;
}



void Unwind_140213250(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x108);
  return;
}



void Unwind_140213260(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe8);
  return;
}



void Unwind_140213270(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf8);
  return;
}



void Unwind_140213280(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x180);
  return;
}



void Unwind_140213290(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x138);
  return;
}



void Unwind_1402132a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x148);
  return;
}



void Unwind_1402132b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x170);
  return;
}



void Unwind_1402132c0(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x2c0);
  return;
}



void Unwind_1402132d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_1402132e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x160);
  return;
}



void Unwind_1402132f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x128);
  return;
}



void Unwind_140213300(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140213310(undefined8 param_1,longlong param_2)

{
  FUN_14015bdb0(param_2 + 0x30);
  return;
}



void Unwind_140213320(undefined8 param_1,longlong param_2)

{
  FUN_14015a420(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140213330(undefined8 param_1,longlong param_2)

{
  FUN_140185080(*(longlong *)(param_2 + 0x40) + 0x40);
  return;
}



void Unwind_140213340(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x40) + 0x128);
  return;
}



void Unwind_140213360(undefined8 param_1,longlong param_2)

{
  FUN_1401ae940(*(longlong *)(param_2 + 0x40) + 0x130);
  return;
}



void Unwind_140213380(undefined8 param_1,longlong param_2)

{
  FUN_1401a8260(*(longlong *)(param_2 + 0x40) + 0x170);
  return;
}



void Unwind_1402133a0(undefined8 param_1,longlong param_2)

{
  FUN_14015a420(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402133b0(undefined8 param_1,longlong param_2)

{
  FUN_140185080(*(longlong *)(param_2 + 0x60) + 0x40);
  return;
}



void Unwind_1402133c0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x60) + 0x128);
  return;
}



void Unwind_1402133e0(undefined8 param_1,longlong param_2)

{
  FUN_1401ae940(*(longlong *)(param_2 + 0x60) + 0x130);
  return;
}



void Unwind_140213400(undefined8 param_1,longlong param_2)

{
  FUN_1401a8260(*(longlong *)(param_2 + 0x60) + 0x170);
  return;
}



void Unwind_140213420(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x68),0x400);
  return;
}



void Unwind_140213440(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x68);
  return;
}



void Unwind_140213450(undefined8 param_1,longlong param_2)

{
  FUN_1401af5c0(*(undefined8 *)(param_2 + 0x20));
  return;
}



void Unwind_140213460(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x30);
  return;
}



void Unwind_140213470(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x30);
  return;
}



void Unwind_140213480(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x70);
  return;
}



void Unwind_140213490(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xd00);
  return;
}



void Unwind_1402134a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20);
  return;
}



void Unwind_1402134b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_1402134c0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x20) + 8);
  return;
}



void Unwind_1402134d0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x80);
  return;
}



void Unwind_1402134e0(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x80);
  return;
}



void Unwind_1402134f0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xe0) + 8);
  return;
}



void Unwind_140213500(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x50);
  return;
}



void Unwind_140213510(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x50);
  return;
}



void Unwind_140213520(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_140213530(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_140213540(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x100);
  return;
}



void Unwind_140213550(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x78);
  return;
}



void Unwind_140213560(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x78);
  return;
}



void Unwind_140213570(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x78);
  return;
}



void Unwind_140213580(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x100) + 8);
  return;
}



void Unwind_140213590(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x78);
  return;
}



void Unwind_1402135a0(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x78);
  return;
}



void Unwind_1402135b0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xc0) + 8);
  return;
}



void Unwind_1402135c0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x50);
  return;
}



void Unwind_1402135d0(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x50);
  return;
}



void Unwind_1402135e0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x120) + 8);
  return;
}



void Unwind_1402135f0(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x1a0);
  return;
}



void Unwind_140213600(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x4d0);
  return;
}



void Unwind_140213610(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x2b0);
  return;
}



void Unwind_140213620(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0x3c0);
  return;
}



void Unwind_140213630(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140213640(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_140213650(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_140213660(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x130);
  return;
}



void Unwind_140213670(undefined8 param_1,longlong param_2)

{
  FUN_1401bcd80(param_2 + 0x98);
  return;
}



void Unwind_140213680(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc0);
  return;
}



void Unwind_140213690(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa0);
  return;
}



void Unwind_1402136a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_1402136b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa8);
  return;
}



void Unwind_1402136c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 200);
  return;
}



void Unwind_1402136d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd8);
  return;
}



void Unwind_1402136e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_1402136f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x100);
  return;
}



void Unwind_140213700(undefined8 param_1,longlong param_2)

{
  FUN_1401bcd80(param_2 + 0x40);
  return;
}



void Unwind_140213710(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x40));
  return;
}



void Unwind_140213720(undefined8 param_1,longlong param_2)

{
  FUN_14015ae50(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_140213730(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140213740(undefined8 param_1,longlong param_2)

{
  FUN_1401bcd80(param_2 + 0x40);
  return;
}



void Unwind_140213750(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140213760(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_140213770(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140213780(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_140213790(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x188);
  return;
}



void Unwind_1402137a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xd0);
  return;
}



void Unwind_1402137b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xb0);
  return;
}



void Unwind_1402137c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xc0);
  return;
}



void Unwind_1402137d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe0);
  return;
}



void Unwind_1402137e0(undefined8 param_1,longlong param_2)

{
  FUN_1401bcd80(param_2 + 0xa0);
  return;
}



void Unwind_1402137f0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x80);
  return;
}



void Unwind_140213800(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140213810(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x70);
  return;
}



void Unwind_140213820(undefined8 param_1,longlong param_2)

{
  FUN_1401bcd80(param_2 + 0xf8);
  return;
}



void Unwind_140213830(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xe8);
  return;
}



void Unwind_140213840(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x68);
  return;
}



void Unwind_140213850(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_140213860(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x88);
  return;
}



void Unwind_140213870(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140213880(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x70);
  return;
}



void Unwind_140213890(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(param_2 + 0x20);
  return;
}



void Unwind_1402138a0(undefined8 param_1,longlong param_2)

{
  FUN_14015dc10(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_1402138b0(undefined8 param_1,longlong param_2)

{
  FUN_1401e69f0(*(longlong *)(param_2 + 0x40) + 0x40);
  return;
}



void Unwind_1402138c0(undefined8 param_1,longlong param_2)

{
  FUN_1401e6a20(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_1402138d0(undefined8 param_1,longlong param_2)

{
  FUN_1401ae940(*(longlong *)(param_2 + 0x40) + 0x30);
  return;
}



void Unwind_1402138e0(undefined8 param_1,longlong param_2)

{
  FUN_1401e69f0(*(longlong *)(param_2 + 0x40) + 0x70);
  return;
}



void Unwind_1402138f0(undefined8 param_1,longlong param_2)

{
  FUN_1401e33a0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140213900(undefined8 param_1,longlong param_2)

{
  FUN_1401af540(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140213910(undefined8 param_1,longlong param_2)

{
  FUN_1401af580(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140213920(undefined8 param_1,longlong param_2)

{
  FUN_1401a3830(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_140213930(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_140213940(undefined8 param_1,longlong param_2)

{
  FUN_1401bcd80(*(longlong *)(param_2 + 0x40) + 0x28);
  return;
}



void Unwind_140213950(undefined8 param_1,longlong param_2)

{
  FUN_14015a5c0(*(longlong *)(param_2 + 0x40) + 0x168);
  return;
}



void Unwind_140213970(undefined8 param_1,longlong param_2)

{
  FUN_1401c45b0(*(longlong *)(param_2 + 0x40) + 0x5b0);
  return;
}



void Unwind_140213990(undefined8 param_1,longlong param_2)

{
  FUN_1401e33a0(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402139a0(undefined8 param_1,longlong param_2)

{
  FUN_1401af540(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402139b0(undefined8 param_1,longlong param_2)

{
  FUN_1401af580(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_1402139c0(undefined8 param_1,longlong param_2)

{
  FUN_1401a3830(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_1402139d0(undefined8 param_1,longlong param_2)

{
  FUN_1401b11e0(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_1402139e0(undefined8 param_1,longlong param_2)

{
  FUN_1401bcd80(*(longlong *)(param_2 + 0x40) + 0x28);
  return;
}



void Unwind_1402139f0(undefined8 param_1,longlong param_2)

{
  FUN_14015a5c0(*(longlong *)(param_2 + 0x40) + 0x168);
  return;
}



void Unwind_140213a10(undefined8 param_1,longlong param_2)

{
  FUN_1401c45b0(*(longlong *)(param_2 + 0x40) + 0x5b0);
  return;
}



void Unwind_140213a30(undefined8 param_1,longlong param_2)

{
  FUN_1401e6b90(*(longlong *)(param_2 + 0x40) + 0x638);
  return;
}



void Unwind_140213a50(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x180);
  return;
}



void Unwind_140213a60(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xd0);
  return;
}



void Unwind_140213a70(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0xd0);
  return;
}



void Unwind_140213a80(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140213a90(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xe00);
  return;
}



void Unwind_140213ab0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xa0);
  return;
}



void Unwind_140213ac0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xd20);
  return;
}



void Unwind_140213ae0(undefined8 param_1,longlong param_2)

{
  FUN_14015a420(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140213af0(undefined8 param_1,longlong param_2)

{
  FUN_140185080(*(longlong *)(param_2 + 0x60) + 0x40);
  return;
}



void Unwind_140213b00(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x60) + 0x100);
  return;
}



void Unwind_140213b20(undefined8 param_1,longlong param_2)

{
  FUN_1401a3bd0(*(longlong *)(param_2 + 0x60) + 0x108);
  return;
}



void Unwind_140213b40(undefined8 param_1,longlong param_2)

{
  FUN_1401a3c00(*(longlong *)(param_2 + 0x60) + 0x110);
  return;
}



void Unwind_140213b60(undefined8 param_1,longlong param_2)

{
  FUN_1401a3c90(*(longlong *)(param_2 + 0x60) + 0x188);
  return;
}



void Unwind_140213b80(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140213b90(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140213ba0(undefined8 param_1,longlong param_2)

{
  FUN_14015a420(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140213bb0(undefined8 param_1,longlong param_2)

{
  FUN_140185080(*(longlong *)(param_2 + 0x40) + 0x40);
  return;
}



void Unwind_140213bc0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x40) + 0x100);
  return;
}



void Unwind_140213be0(undefined8 param_1,longlong param_2)

{
  FUN_1401a3bd0(*(longlong *)(param_2 + 0x40) + 0x108);
  return;
}



void Unwind_140213c00(undefined8 param_1,longlong param_2)

{
  FUN_1401a3c00(*(longlong *)(param_2 + 0x40) + 0x110);
  return;
}



void Unwind_140213c20(undefined8 param_1,longlong param_2)

{
  FUN_1401a3c90(*(longlong *)(param_2 + 0x40) + 0x188);
  return;
}



void Unwind_140213c40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x70),0x400);
  return;
}



void Unwind_140213c60(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x70);
  return;
}



void Unwind_140213c70(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x80);
  return;
}



void Unwind_140213c80(undefined8 param_1,longlong param_2)

{
  FUN_1401e6a20(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140213c90(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x150);
  return;
}



void Unwind_140213ca0(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xa0);
  return;
}



void Unwind_140213cb0(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0xa0);
  return;
}



void Unwind_140213cc0(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(param_2 + 0x20);
  return;
}



void Unwind_140213cd0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x48) + 8);
  return;
}



void Unwind_140213ce0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0xdd0);
  return;
}



void Unwind_140213d00(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xeb0);
  return;
}



void Unwind_140213d10(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x40);
  return;
}



void Unwind_140213d20(undefined8 param_1,longlong param_2)

{
  FUN_14015e530(param_2 + 0x40);
  return;
}



void Unwind_140213d30(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_140213d40(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1b30);
  return;
}



void Unwind_140213d60(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0xe00);
  return;
}



void Unwind_140213d70(undefined8 param_1,longlong param_2)

{
  FUN_140157080(param_2 + 0xe00);
  return;
}



void Unwind_140213d80(undefined8 param_1,longlong param_2)

{
  FUN_140153c80(param_2 + 0x68);
  return;
}



void Unwind_140213d90(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0x1b40);
  return;
}



void Unwind_140213da0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1b30);
  return;
}



void Unwind_140213dc0(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(param_2 + 0xeb0);
  return;
}



void Unwind_140213dd0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x1b30);
  return;
}



void Unwind_140213df0(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(*(longlong *)(param_2 + 0x30) + 0xc80);
  return;
}



void Unwind_140213e10(undefined8 param_1,longlong param_2)

{
  FUN_140156dc0(*(undefined8 *)(param_2 + 0x30));
  return;
}



void Unwind_140213e20(undefined8 param_1,longlong param_2)

{
  FUN_140156d90(param_2 + 0x27c0);
  return;
}



void Unwind_140213e40(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x30) + 8);
  return;
}



void Unwind_140213e50(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x38);
  return;
}



void Unwind_140213e60(undefined8 param_1,longlong param_2)

{
  FUN_14016b9f0(param_2 + 0x30);
  return;
}



void Unwind_140213e70(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x38);
  return;
}



void Unwind_140213e80(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x110) + 8);
  return;
}



void Unwind_140213e90(undefined8 param_1,longlong param_2)

{
  FUN_14016b5d0(param_2 + 0x68);
  return;
}



void Unwind_140213ea0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x38);
  return;
}



void Unwind_140213eb0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x110) + 8);
  return;
}



void Unwind_140213ec0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x38);
  return;
}



void Unwind_140213ed0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x110) + 8);
  return;
}



void Unwind_140213ee0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x38);
  return;
}



void Unwind_140213ef0(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x110) + 8);
  return;
}



void Unwind_140213f00(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x38);
  return;
}



void Unwind_140213f10(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x110) + 8);
  return;
}



void Unwind_140213f20(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x38);
  return;
}



void Unwind_140213f30(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x110) + 8);
  return;
}



void Unwind_140213f40(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x38);
  return;
}



void Unwind_140213f50(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x110) + 8);
  return;
}



void Unwind_140213f60(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x38);
  return;
}



void Unwind_140213f70(undefined8 param_1,longlong param_2)

{
  FUN_1401e5070(param_2 + 0x30);
  return;
}



void Unwind_140213f80(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x38);
  return;
}



void Unwind_140213f90(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xc0) + 8);
  return;
}



void Unwind_140213fa0(undefined8 param_1,longlong param_2)

{
  FUN_1401ae940(*(longlong *)(param_2 + 0x50) + 0x30);
  return;
}



void Unwind_140213fb0(undefined8 param_1,longlong param_2)

{
  FUN_1401e69f0(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140213fc0(undefined8 param_1,longlong param_2)

{
  FUN_1401e69f0(*(longlong *)(param_2 + 0x50) + 0x70);
  return;
}



void Unwind_140213fd0(undefined8 param_1,longlong param_2)

{
  FUN_1401e69f0(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140213fe0(undefined8 param_1,longlong param_2)

{
  FUN_1401a56e0(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140213ff0(undefined8 param_1,longlong param_2)

{
  FUN_14015a470(*(longlong *)(param_2 + 0x80) + 8);
  return;
}



void Unwind_140214000(undefined8 param_1,longlong param_2)

{
  FUN_14015a420(*(longlong *)(param_2 + 0x80) + 0x10);
  return;
}



void Unwind_140214010(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x80) + 0x18);
  return;
}



void Unwind_140214020(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x80) + 0x20);
  return;
}



void Unwind_140214030(undefined8 param_1,longlong param_2)

{
  FUN_14015bfe0(*(longlong *)(param_2 + 0x80) + 0x308);
  return;
}



void Unwind_140214050(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x80) + 0x310);
  return;
}



void Unwind_140214070(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(*(longlong *)(param_2 + 0x80) + 0x348);
  return;
}



void Unwind_140214090(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_1402140a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x88),0x400);
  return;
}



void Unwind_1402140c0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x88);
  return;
}



void Unwind_1402140d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156970(*(undefined8 *)(param_2 + 0x90),0x400);
  return;
}



void Unwind_1402140f0(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x90);
  return;
}



void Unwind_140214100(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x98));
  return;
}



void Unwind_140214110(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(param_2 + 0x98);
  return;
}



void Unwind_140214120(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140214130(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x50);
  return;
}



void Unwind_140214140(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x58);
  return;
}



void Unwind_140214150(undefined8 param_1,longlong param_2)

{
  FUN_1401a56e0(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140214160(undefined8 param_1,longlong param_2)

{
  FUN_14015a470(*(longlong *)(param_2 + 0x60) + 8);
  return;
}



void Unwind_140214170(undefined8 param_1,longlong param_2)

{
  FUN_14015a420(*(longlong *)(param_2 + 0x60) + 0x10);
  return;
}



void Unwind_140214180(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x60) + 0x18);
  return;
}



void Unwind_140214190(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(*(longlong *)(param_2 + 0x60) + 0x20);
  return;
}



void Unwind_1402141a0(undefined8 param_1,longlong param_2)

{
  FUN_14015bfe0(*(longlong *)(param_2 + 0x60) + 0x308);
  return;
}



void Unwind_1402141c0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x60) + 0x310);
  return;
}



void Unwind_1402141e0(undefined8 param_1,longlong param_2)

{
  FUN_1401620f0(*(longlong *)(param_2 + 0x60) + 0x348);
  return;
}



void Unwind_140214200(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x68);
  return;
}



void Unwind_140214210(undefined8 param_1,longlong param_2)

{
  FUN_1401617f0(param_2 + 0x70);
  return;
}



void Unwind_140214220(undefined8 param_1,longlong param_2)

{
  FUN_14015dc10(param_2 + 0x28);
  return;
}



void Unwind_140214230(undefined8 param_1,longlong param_2)

{
  FUN_14015dc10(param_2 + 0x28);
  return;
}



void Unwind_140214240(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x40);
  return;
}



void Unwind_140214250(undefined8 param_1,longlong param_2)

{
  FUN_14016b9f0(param_2 + 0x38);
  return;
}



void Unwind_140214260(undefined8 param_1,longlong param_2)

{
  FUN_14016b5d0(param_2 + 0x28);
  return;
}



void Unwind_140214270(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x40);
  return;
}



void Unwind_140214280(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xa0) + 8);
  return;
}



void Unwind_140214290(undefined8 param_1,longlong param_2)

{
  FUN_14015dc10(*(longlong *)(param_2 + 0x90) + 0x18);
  return;
}



void Unwind_1402142a0(undefined8 param_1,longlong param_2)

{
  FUN_1401e69f0(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_1402142b0(undefined8 param_1,longlong param_2)

{
  FUN_1401e69f0(*(longlong *)(param_2 + 0x90) + 0x40);
  return;
}



void Unwind_1402142c0(undefined8 param_1,longlong param_2)

{
  FUN_1401ae940(*(longlong *)(param_2 + 0x90) + 0x60);
  return;
}



void Unwind_1402142d0(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x30);
  return;
}



void Unwind_1402142e0(undefined8 param_1,longlong param_2)

{
  FUN_14016b9f0(param_2 + 0x28);
  return;
}



void Unwind_1402142f0(undefined8 param_1,longlong param_2)

{
  FUN_1401e5070(param_2 + 0x28);
  return;
}



void Unwind_140214300(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x30);
  return;
}



void Unwind_140214310(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x70) + 8);
  return;
}



void Unwind_140214320(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x30);
  return;
}



void Unwind_140214330(undefined8 param_1,longlong param_2)

{
  FUN_14016b9f0(param_2 + 0x28);
  return;
}



void Unwind_140214340(undefined8 param_1,longlong param_2)

{
  FUN_1401e5070(param_2 + 0x28);
  return;
}



void Unwind_140214350(undefined8 param_1,longlong param_2)

{
  FUN_140050680(param_2 + 0x30);
  return;
}



void Unwind_140214360(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x70) + 8);
  return;
}



undefined8 Catch_All_140214370(void)

{
  return 0x140201705;
}



void FUN_14021438b(void)

{
  _unlock(8);
  return;
}



void FUN_1402143a6(_EXCEPTION_POINTERS *param_1)

{
  _XcptFilter(param_1->ExceptionRecord->ExceptionCode,param_1);
  return;
}



// Library Function - Single Match
//  int `void __cdecl __ArrayUnwind(void * __ptr64,unsigned __int64,int,void (__cdecl*)(void *
// __ptr64))'::`1'::filt$0
// 
// Library: Visual Studio 2005 Release

undefined4
`void___cdecl___ArrayUnwind(void*___ptr64,unsigned___int64,int,void_(__cdecl*)(void*___ptr64))'::
__l1::filt_0(undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(param_2 + 0x38) = param_1;
  *(undefined8 *)(param_2 + 0x28) = param_1;
  *(undefined8 *)(param_2 + 0x30) = **(undefined8 **)(param_2 + 0x28);
  if (**(int **)(param_2 + 0x30) != -0x1f928c9d) {
    *(undefined4 *)(param_2 + 0x20) = 0;
    return *(undefined4 *)(param_2 + 0x20);
  }
                    // WARNING: Subroutine does not return
  terminate();
}



// Library Function - Single Match
//  int `void __cdecl `eh vector destructor iterator'(void * __ptr64,unsigned __int64,int,void
// (__cdecl*)(void * __ptr64))'::`1'::fin$0
// 
// Library: Visual Studio 2005 Release

void `void___cdecl_`eh_vector_destructor_iterator'(void*___ptr64,unsigned___int64,int,void_(__cdecl*)(void*___ptr64))'
     ::__l1::fin_0(undefined8 param_1,longlong param_2)

{
  if (*(int *)(param_2 + 0x20) == 0) {
    __ArrayUnwind(*(void **)(param_2 + 0x60),*(__uint64 *)(param_2 + 0x68),*(int *)(param_2 + 0x70),
                  *(_func_void_void_ptr **)(param_2 + 0x78));
  }
  return;
}



void FUN_140214431(undefined8 param_1,longlong param_2)

{
  if (*(int *)(param_2 + 0x20) == 0) {
    __ArrayUnwind(*(void **)(param_2 + 0x50),*(__uint64 *)(param_2 + 0x58),*(int *)(param_2 + 0x24),
                  *(_func_void_void_ptr **)(param_2 + 0x70));
  }
  return;
}



bool FUN_140214460(undefined8 *param_1)

{
  return *(int *)*param_1 == -0x3ffffffb;
}



void Unwind_140214490(undefined8 param_1,longlong param_2)

{
  FUN_1401481a0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402144a0(undefined8 param_1,longlong param_2)

{
  FUN_140145580(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402144b0(undefined8 param_1,longlong param_2)

{
  FUN_1401481a0(param_2 + 0x28);
  return;
}



void Unwind_1402144c0(undefined8 param_1,longlong param_2)

{
  FUN_140148060(param_2 + 0x28);
  return;
}



void Unwind_1402144d0(undefined8 param_1,longlong param_2)

{
  FUN_1401481a0(param_2 + 0x28);
  return;
}



void Unwind_1402144e0(undefined8 param_1,longlong param_2)

{
  FUN_1401481a0(param_2 + 0x28);
  return;
}



void Unwind_1402144f0(undefined8 param_1,longlong param_2)

{
  FUN_140002be0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140214500(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140214507. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x40));
  return;
}



void Unwind_140214510(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140214522. Too many branches
                    // WARNING: Treating indirect jump as call
  std::basic_ostream<>::~basic_ostream<>((basic_ostream<> *)(*(longlong *)(param_2 + 0x40) + -0x80))
  ;
  return;
}



void Catch_All_140214530(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_140214571(undefined8 param_1,longlong param_2)

{
  FUN_14012fc70(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140214591(undefined8 param_1,longlong param_2)

{
  FUN_14012fac0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402145a1(undefined8 param_1,longlong param_2)

{
  FUN_14012fb40(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_1402145b1(undefined8 param_1,longlong param_2)

{
  FUN_140045980(*(longlong *)(param_2 + 0x40) + 0x50);
  return;
}



void Unwind_1402145c1(undefined8 param_1,longlong param_2)

{
  FUN_140045980(*(longlong *)(param_2 + 0x40) + 0x70);
  return;
}



void Unwind_1402145e1(undefined8 param_1,longlong param_2)

{
  FUN_14012fac0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402145f1(undefined8 param_1,longlong param_2)

{
  FUN_14012fb40(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140214601(undefined8 param_1,longlong param_2)

{
  FUN_140045980(*(longlong *)(param_2 + 0x40) + 0x50);
  return;
}



void Unwind_140214611(undefined8 param_1,longlong param_2)

{
  FUN_140045980(*(longlong *)(param_2 + 0x40) + 0x70);
  return;
}



void Unwind_140214631(undefined8 param_1,longlong param_2)

{
  FUN_1401473c0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140214651(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x28);
  return;
}



void Unwind_140214671(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140147780(param_2 + 0x28);
  return;
}



void Unwind_140214691(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402146a1(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x28);
  return;
}



void Unwind_1402146b1(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x50);
  return;
}



void Unwind_1402146c1(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x78);
  return;
}



void Unwind_1402146d1(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0xa0);
  return;
}



void Unwind_1402146f1(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 200);
  return;
}



void Unwind_140214711(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0xf0);
  return;
}



void Unwind_140214731(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x118);
  return;
}



void Unwind_140214751(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x140);
  return;
}



void Unwind_140214771(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x168);
  return;
}



void Unwind_140214791(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 400);
  return;
}



void Unwind_1402147b1(undefined8 param_1,longlong param_2)

{
  FUN_140146830(param_2 + 0xe0);
  return;
}



void Unwind_1402147d1(undefined8 param_1,longlong param_2)

{
  FUN_140142c90(param_2 + 0x20);
  return;
}



void Unwind_1402147e1(undefined8 param_1,longlong param_2)

{
  FUN_140149770(param_2 + 0x20);
  return;
}



void Unwind_1402147f1(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x58);
  return;
}



void Unwind_140214801(undefined8 param_1,longlong param_2)

{
  FUN_140149770(param_2 + 0x20);
  return;
}



void Unwind_140214811(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x58);
  return;
}



void Unwind_140214831(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140214841(undefined8 param_1,longlong param_2)

{
  FUN_140146830(*(longlong *)(param_2 + 0x40) + 0x30);
  return;
}



void Unwind_140214851(undefined8 param_1,longlong param_2)

{
  FUN_140146cc0(*(longlong *)(param_2 + 0x40) + 0x260);
  return;
}



void Unwind_140214871(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x280);
  return;
}



void Unwind_140214891(void)

{
  DAT_140379238 = DAT_140379238 & 0xfffffffe;
  return;
}



void Unwind_1402148b1(void)

{
  DAT_14037923c = DAT_14037923c & 0xfffffffe;
  return;
}



void Unwind_1402148d1(undefined8 param_1,longlong param_2)

{
  FUN_1401473e0(param_2 + 0x430);
  return;
}



void Unwind_1402148e1(void)

{
  DAT_140379238 = DAT_140379238 & 0xfffffffe;
  return;
}



void Unwind_140214901(void)

{
  DAT_140379238 = DAT_140379238 & 0xfffffffe;
  return;
}



void Unwind_140214921(undefined8 param_1,longlong param_2)

{
  FUN_1401473e0(param_2 + 0x28);
  return;
}



void Unwind_140214931(void)

{
  DAT_140379238 = DAT_140379238 & 0xfffffffe;
  return;
}



void Unwind_140214951(void)

{
  DAT_140379238 = DAT_140379238 & 0xfffffffe;
  return;
}



void Unwind_140214970(undefined8 param_1,longlong param_2)

{
  FUN_14012fc70(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140214980(undefined8 param_1,longlong param_2)

{
  FUN_14009f910(param_2 + 0x40);
  return;
}



void Unwind_140214990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Catch_All_1402149a0(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_1402149c0(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_1402149e0(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214a00(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214a20(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214a40(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214a60(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214a80(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214aa0(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214ac0(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214ae0(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214b00(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214b20(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214b40(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214b60(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214b80(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214ba0(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214bc0(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214be0(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214c00(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214c20(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214c40(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214c60(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214c80(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214ca0(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214cc0(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214ce0(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214d00(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214d20(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214d40(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214d70(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214da0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214dd0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214e00(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214e30(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214e60(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214e90(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214ec0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214ef0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214f20(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214f50(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214f80(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214fb0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140214fe0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215010(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215040(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215070(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_1402150a0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_1402150d0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215100(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215130(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215160(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215190(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_1402151c0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_1402151f0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215220(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215250(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215280(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_1402152b0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_1402152e0(undefined8 param_1,longlong param_2)

{
  FUN_140002be0(param_2 + 0x28);
  return;
}



void Unwind_1402152f0(undefined8 param_1,longlong param_2)

{
  FUN_140002b90(param_2 + 0x28);
  return;
}



undefined * Catch_All_140215300(undefined8 param_1,longlong param_2)

{
  std::basic_ios<>::setstate
            ((basic_ios<> *)
             ((longlong)*(int *)(**(longlong **)(param_2 + 0x60) + 4) +
             (longlong)*(longlong **)(param_2 + 0x60)),4,true);
  return &DAT_140002b0d;
}



void Unwind_140215340(undefined8 param_1,longlong param_2)

{
  FUN_140002be0(param_2 + 0x28);
  return;
}



void Unwind_140215350(undefined8 param_1,longlong param_2)

{
  FUN_140002be0(param_2 + 0x28);
  return;
}



void Unwind_140215360(undefined8 param_1,longlong param_2)

{
  FUN_140002b90(param_2 + 0x28);
  return;
}



undefined * Catch_All_140215370(undefined8 param_1,longlong param_2)

{
  std::basic_ios<>::setstate
            ((basic_ios<> *)
             ((longlong)*(int *)(**(longlong **)(param_2 + 0x70) + 4) +
             (longlong)*(longlong **)(param_2 + 0x70)),4,true);
  return &DAT_140002974;
}



void Unwind_1402153b0(undefined8 param_1,longlong param_2)

{
  FUN_140002be0(param_2 + 0x28);
  return;
}



undefined8 Catch_1402153c0(undefined8 param_1,longlong param_2)

{
  (**(code **)(**(longlong **)(param_2 + 0x28) + 8))();
  printf("!!! EXCEPTION CmdQueue::CarryOut() %s\n");
  return 0x1400027ef;
}



void Unwind_140215400(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140215410(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140215420(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140215430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140215440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140215450(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140215460(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140215470(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140215477. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x28));
  return;
}



void Unwind_140215480(undefined8 param_1,longlong param_2)

{
  FUN_140149770(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140215490(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(*(longlong *)(param_2 + 0x40) + 0x38);
  return;
}



void Unwind_1402154a0(undefined8 param_1,longlong param_2)

{
  FUN_1401458d0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402154b0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_1402154c0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x28);
  return;
}



void Unwind_1402154d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402154d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402154e0(undefined8 param_1,longlong param_2)

{
  FUN_14004bd50(param_2 + 0x50);
  return;
}



void Unwind_1402154f0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x60) & 1) != 0) {
    *(uint *)(param_2 + 0x60) = *(uint *)(param_2 + 0x60) & 0xfffffffe;
    FUN_14004bd50(*(undefined8 *)(param_2 + 0x58));
  }
  return;
}



void Unwind_140215520(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Catch_All_140215530(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215550(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215570(void)

{
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215590(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x48));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_1402155c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402155d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_1402155e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(longlong *)(param_2 + 0x40) + 0x20);
  return;
}



void Unwind_1402155f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(longlong *)(param_2 + 0x40) + 0x38);
  return;
}



void Unwind_140215600(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x28));
  return;
}



void Unwind_140215610(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x30));
  return;
}



void Unwind_140215620(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x38));
  return;
}



undefined * Catch_140215630(void)

{
  return &DAT_140001e7d;
}



void Unwind_140215650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_140215660(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140215670(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140215680(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140215690(undefined8 param_1,longlong param_2)

{
  FUN_140149e40(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402156a0(undefined8 param_1,longlong param_2)

{
  FUN_140149920(*(longlong *)(param_2 + 0x40) + 0x58);
  return;
}



void Unwind_1402156b0(undefined8 param_1,longlong param_2)

{
  FUN_140149770(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402156c0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(*(longlong *)(param_2 + 0x50) + 0x20);
  return;
}



void Unwind_1402156d0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(*(longlong *)(param_2 + 0x50) + 0x30);
  return;
}



void Unwind_1402156e0(undefined8 param_1,longlong param_2)

{
  FUN_140144680(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402156f0(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x48) & 1) != 0) {
    *(uint *)(param_2 + 0x48) = *(uint *)(param_2 + 0x48) & 0xfffffffe;
    std::basic_ios<>::~basic_ios<>((basic_ios<> *)(*(longlong *)(param_2 + 0x40) + 0x88));
  }
  return;
}



void Unwind_140215720(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021572b. Too many branches
                    // WARNING: Treating indirect jump as call
  std::basic_ostream<>::~basic_ostream<>((basic_ostream<> *)(*(longlong *)(param_2 + 0x40) + 8));
  return;
}



void Unwind_140215740(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140215747. Too many branches
                    // WARNING: Treating indirect jump as call
  std::basic_streambuf<>::~basic_streambuf<>(*(basic_streambuf<> **)(param_2 + 0x28));
  return;
}



void Unwind_140215750(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140215760(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_140215770(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_140215780(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x40) + 0x10);
  return;
}



void Unwind_140215790(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x28);
  return;
}



void Unwind_1402157a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_1402157b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_1402157c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x28);
  return;
}



void Unwind_1402157d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_1402157e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_1402157f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_140215800(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x28);
  return;
}



void Unwind_140215810(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20);
  return;
}



void Unwind_140215820(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_140215830(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_140215840(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140215850(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140215860(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140215870(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140215880(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140215890(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_1402158a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_1402158b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_1402158c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_1402158d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_1402158e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x28);
  return;
}



void Unwind_1402158f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140215900(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140215910(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140215920(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140215930(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20);
  return;
}



void Unwind_140215940(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140215950(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140215960(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140215970(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140215980(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140215990(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_1402159a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_1402159b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_1402159c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_1402159d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_1402159e0(undefined8 param_1,longlong param_2)

{
  _eh_vector_destructor_iterator_((void *)(param_2 + 0xd0),8,10,thunk_FUN_14004f990);
  return;
}



void Unwind_140215a10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_140215a20(undefined8 param_1,longlong param_2)

{
  _eh_vector_destructor_iterator_((void *)(param_2 + 0x80),8,10,thunk_FUN_14004f990);
  return;
}



void Unwind_140215a50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x48);
  return;
}



void Unwind_140215a60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140215a70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140215a80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140215a90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140215aa0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140215ab0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140215ac0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140215ad0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215ae0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215af0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140215b00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140215b10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215b20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215b30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140215b40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215b50(undefined8 param_1,longlong param_2)

{
  if ((*(uint *)(param_2 + 0x70) & 1) != 0) {
    *(uint *)(param_2 + 0x70) = *(uint *)(param_2 + 0x70) & 0xfffffffe;
    thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x60));
  }
  return;
}



void Unwind_140215b80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215b90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215ba0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140215bb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140215bc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140215bd0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215be0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215bf0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215c00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140215c10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215c20(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x58);
  return;
}



void Unwind_140215c30(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x38);
  return;
}



void Unwind_140215c40(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x48);
  return;
}



void Unwind_140215c50(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x38);
  return;
}



void Unwind_140215c60(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x28);
  return;
}



void Unwind_140215c70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140215c80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140215c87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x20));
  return;
}



void Unwind_140215c90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140215c97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x20));
  return;
}



void Unwind_140215ca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140215ca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x2d0));
  return;
}



void Unwind_140215cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x2d0));
  return;
}



void Unwind_140215cc0(undefined8 param_1,longlong param_2)

{
  FUN_140002630(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140215cd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140215cd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140215ce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140215cf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140215cf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140215d00(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x50);
  return;
}



void Unwind_140215d10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x48);
  return;
}



void Unwind_140215d20(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x20);
  return;
}



void Unwind_140215d30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



undefined * Catch_All_140215d40(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  undefined8 uVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x68);
  *(longlong *)(param_2 + 0x68) = lVar1;
  uVar2 = FUN_140056bf0(lVar1 + 1);
  *(undefined8 *)(param_2 + 0x78) = uVar2;
  return &DAT_140056ce1;
}



void Catch_All_140215d70(undefined8 param_1,longlong param_2)

{
  undefined8 *puVar1;
  
  puVar1 = *(undefined8 **)(param_2 + 0x60);
  if (7 < (ulonglong)puVar1[3]) {
    operator_delete((void *)*puVar1);
  }
  puVar1[3] = 7;
  puVar1[2] = 0;
  *(undefined2 *)puVar1 = 0;
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



undefined * Catch_All_140215dc0(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  undefined8 uVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x78);
  *(longlong *)(param_2 + 0x78) = lVar1;
  uVar2 = FUN_14004d2c0(lVar1 + 1);
  *(undefined8 *)(param_2 + 0x88) = uVar2;
  return &DAT_14004d3ec;
}



void Catch_All_140215e00(undefined8 param_1,longlong param_2)

{
  undefined8 *puVar1;
  
  puVar1 = *(undefined8 **)(param_2 + 0x70);
  if (0xf < (ulonglong)puVar1[3]) {
    operator_delete((void *)*puVar1);
  }
  puVar1[3] = 0xf;
  puVar1[2] = 0;
  *(undefined1 *)puVar1 = 0;
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_140215e40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_140215e50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215e60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140215e70(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x58),*(undefined8 *)(param_2 + 0x60));
  return;
}



void Catch_All_140215e90(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x60);
  for (lVar2 = *(longlong *)(param_2 + 0x50); lVar2 != lVar1; lVar2 = lVar2 + 8) {
    FUN_14004f990();
  }
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140215ed0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x68));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



undefined8 Catch_All_140215f00(void)

{
  return 0x140045973;
}



void Unwind_140215f20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140215f27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140215f30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140215f37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140215f40(undefined8 param_1,longlong param_2)

{
  FUN_140047150(*(longlong *)(param_2 + 0x50) + 0xa8);
  return;
}



void Unwind_140215f60(undefined8 param_1,longlong param_2)

{
  FUN_14004d650(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140215f70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140157bd0(*(longlong *)(param_2 + 0x50) + 8);
  return;
}



void Unwind_140215f80(undefined8 param_1,longlong param_2)

{
  FUN_14013b430(*(longlong *)(param_2 + 0x50) + 0x28);
  return;
}



void Unwind_140215f90(undefined8 param_1,longlong param_2)

{
  FUN_14013b560(*(longlong *)(param_2 + 0x50) + 0x40);
  return;
}



void Unwind_140215fa0(undefined8 param_1,longlong param_2)

{
  FUN_14013ba20(*(longlong *)(param_2 + 0x50) + 0x80);
  return;
}



void Unwind_140215fc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156cd0(*(longlong *)(param_2 + 0x50) + 0xa8);
  return;
}



void Unwind_140215fe0(undefined8 param_1,longlong param_2)

{
  FUN_140045960(*(longlong *)(param_2 + 0x50) + 0xf8);
  return;
}



void Unwind_140216000(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x50) + 0x150);
  return;
}



void Unwind_140216020(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x58) + 0x10);
  return;
}



void Unwind_140216030(undefined8 param_1,longlong param_2)

{
  FUN_140047150(*(longlong *)(param_2 + 0x50) + 0xa8);
  return;
}



void Unwind_140216050(undefined8 param_1,longlong param_2)

{
  FUN_14004d650(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140216060(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140157bd0(*(longlong *)(param_2 + 0x50) + 8);
  return;
}



void Unwind_140216070(undefined8 param_1,longlong param_2)

{
  FUN_14013b430(*(longlong *)(param_2 + 0x50) + 0x28);
  return;
}



void Unwind_140216080(undefined8 param_1,longlong param_2)

{
  FUN_14013b560(*(longlong *)(param_2 + 0x50) + 0x40);
  return;
}



void Unwind_140216090(undefined8 param_1,longlong param_2)

{
  FUN_14013ba20(*(longlong *)(param_2 + 0x50) + 0x80);
  return;
}



void Unwind_1402160b0(undefined8 param_1,longlong param_2)

{
  FUN_140156cd0(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402160c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140156cd0(*(longlong *)(param_2 + 0x50) + 0xa8);
  return;
}



void Unwind_1402160e0(undefined8 param_1,longlong param_2)

{
  FUN_140045960(*(longlong *)(param_2 + 0x50) + 0xf8);
  return;
}



void Unwind_140216100(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140216110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x60);
  return;
}



void Unwind_140216120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140216130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x20);
  return;
}



void Unwind_140216140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140216150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x48);
  return;
}



void Unwind_140216160(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x48);
  return;
}



undefined * Catch_140216170(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  int iVar2;
  
  **(undefined1 **)(param_2 + 0xd8) = 0;
  uVar1 = *(undefined8 *)(param_2 + 200);
  Ordinal_8(uVar1);
  iVar2 = Ordinal_10(uVar1,param_2 + 0x28);
  if (iVar2 < 0) {
                    // WARNING: Subroutine does not return
    FUN_1402013e0(iVar2);
  }
  return &DAT_140002410;
}



void Unwind_1402161c0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x38);
  return;
}



void Unwind_1402161d0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x58);
  return;
}



void Unwind_1402161e0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x68);
  return;
}



void Unwind_1402161f0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x48);
  return;
}



void Unwind_140216200(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x68);
  return;
}



void Unwind_140216210(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x40);
  return;
}



void Unwind_140216220(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x50);
  return;
}



void Unwind_140216230(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x60);
  return;
}



void Unwind_140216240(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x70);
  return;
}



void Unwind_140216250(undefined8 param_1,longlong param_2)

{
  FUN_140149e40(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140216260(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(*(longlong *)(param_2 + 0x40) + 0x60);
  return;
}



void Unwind_140216270(undefined8 param_1,longlong param_2)

{
  FUN_140149e40(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140216280(undefined8 param_1,longlong param_2)

{
  FUN_140142c90(param_2 + 0x20);
  return;
}



void Unwind_140216290(undefined8 param_1,longlong param_2)

{
  FUN_140149770(param_2 + 0x20);
  return;
}



void Unwind_1402162a0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x58);
  return;
}



void Unwind_1402162b0(undefined8 param_1,longlong param_2)

{
  FUN_140149770(param_2 + 0x20);
  return;
}



void Unwind_1402162c0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x58);
  return;
}



void Unwind_1402162d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_1402162e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_1402162f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x20);
  return;
}



void Unwind_140216300(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140216310(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140216320(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140216330(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140216340(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140216350(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140216360(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_140216370(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x88);
  return;
}



void Unwind_140216380(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140216390(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_1402163a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402163b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402163c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402163d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x70);
  return;
}



void Unwind_1402163e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_1402163f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140216400(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140216410(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140216420(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140216430(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x78);
  return;
}



void Unwind_140216440(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140216450(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140216460(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140216470(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20);
  return;
}



void Unwind_140216480(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140216490(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x80);
  return;
}



void Unwind_1402164a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x78);
  return;
}



void Unwind_1402164b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_1402164c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_1402164d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_1402164e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x30);
  return;
}



void Unwind_1402164f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa8);
  return;
}



void Unwind_140216500(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_140216510(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140216520(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_140216530(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_140216540(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_140216550(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb0);
  return;
}



void Unwind_140216560(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_140216570(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140216580(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140216590(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_1402165a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_1402165b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 200);
  return;
}



void Unwind_1402165c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc0);
  return;
}



void Unwind_1402165d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_1402165e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_1402165f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x30);
  return;
}



void Unwind_140216600(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140216610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140216620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_140216630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x88);
  return;
}



void Unwind_140216640(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x50);
  return;
}



void Unwind_140216650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140216660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140216670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_140216680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x88);
  return;
}



void Unwind_140216690(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402166a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_1402166b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_1402166c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x88);
  return;
}



void Unwind_1402166d0(undefined8 param_1,longlong param_2)

{
  FUN_140002630(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402166e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_1402166f0(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x70);
  return;
}



void Unwind_140216700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x30));
  return;
}



void Unwind_140216710(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20);
  return;
}



void Unwind_140216720(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140216730(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_140216740(undefined8 param_1,longlong param_2)

{
  FUN_14004bd50(param_2 + 0x88);
  return;
}



void Unwind_140216750(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x28);
  return;
}



void Unwind_140216760(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140216770(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216777. Too many branches
                    // WARNING: Treating indirect jump as call
  std::exception::~exception(*(exception **)(param_2 + 0x40));
  return;
}



void Unwind_140216780(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x38);
  return;
}



void Unwind_140216790(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216797. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402167a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402167a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402167b0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x28);
  return;
}



void Unwind_1402167c0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x38);
  return;
}



void Unwind_1402167d0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x28);
  return;
}



void Unwind_1402167e0(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402167f0(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x28);
  return;
}



void Unwind_140216800(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x50);
  return;
}



void Unwind_140216810(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x78);
  return;
}



void Unwind_140216820(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0xa0);
  return;
}



void Unwind_140216840(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 200);
  return;
}



void Unwind_140216860(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0xf0);
  return;
}



void Unwind_140216880(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x118);
  return;
}



void Unwind_1402168a0(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x140);
  return;
}



void Unwind_1402168c0(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x170);
  return;
}



void Unwind_1402168e0(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x198);
  return;
}



void Unwind_140216900(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x1c0);
  return;
}



void Unwind_140216920(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x58);
  return;
}



void Unwind_140216930(undefined8 param_1,longlong param_2)

{
  FUN_140143b90(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140216940(undefined8 param_1,longlong param_2)

{
  FUN_140153870(*(longlong *)(param_2 + 0x40) + 0x48);
  return;
}



void Unwind_140216950(undefined8 param_1,longlong param_2)

{
  FUN_1401538c0(*(longlong *)(param_2 + 0x40) + 0x68);
  return;
}



void Unwind_140216960(undefined8 param_1,longlong param_2)

{
  FUN_140045980(*(longlong *)(param_2 + 0x40) + 0x98);
  return;
}



void Unwind_140216980(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(longlong *)(param_2 + 0x40) + 0xb8);
  return;
}



void Unwind_1402169a0(undefined8 param_1,longlong param_2)

{
  FUN_140144680(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402169b0(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(*(longlong *)(param_2 + 0x40) + 8);
  return;
}



void Unwind_1402169c0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x50),*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402169e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_1402169f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140216a00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_140216a10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140216a20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140216a30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140216a40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140216a50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140216a60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140216a70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140216a80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140216a90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_140216aa0(undefined8 param_1,longlong param_2)

{
  FUN_140045980(*(longlong *)(param_2 + 0x40) + 0xe);
  return;
}



void Unwind_140216ab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140216ac0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216ac7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216ad0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216ae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216af0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216af7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216b00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216b10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216b20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216b27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216b30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216b40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216b50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216b57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216b60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216b70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216b80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216b87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216b90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216ba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216bb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216bb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216bc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216bd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216be0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216be7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216bf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216c00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216c10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216c17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216c20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216c30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216c40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216c47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216c50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216c60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216c70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216c77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216c80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216c90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216ca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216ca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216cb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216cc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216cd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216cd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216ce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216cf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216d00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216d07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216d10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216d20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216d30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216d37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216d40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216d50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216d60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216d67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216d70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216d80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216d90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216d97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216da0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216db0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216dc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216dc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216dd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216de0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216df0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216df7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216e00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216e20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216e27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216e30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216e40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216e50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216e57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216e80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216e87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216e90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216ea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216eb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216eb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216ed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216ee0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216ee7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216ef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216f10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216f17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216f20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216f30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216f40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216f47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216f60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216f70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216f77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216f80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216f90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216fa0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216fa7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216fd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140216fd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140216fe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140216ff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140217000(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140217007. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140217010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140217020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140217030(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140217037. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140217040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140217050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140217060(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140217067. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140217070(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140217080(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140217090(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140217097. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_1402170a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402170b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402170c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402170c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_1402170d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402170e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402170e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_1402170f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140217100(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140217107. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140217110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140217120(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140217130(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140217137. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140217140(undefined8 param_1,longlong param_2)

{
  FUN_14009f910(param_2 + 0x28);
  return;
}



void Catch_All_140217150(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140217180(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_1402171b0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_1402171e0(undefined8 param_1,longlong param_2)

{
  FUN_140149920(param_2 + 0x30);
  return;
}



void Unwind_1402171f0(undefined8 param_1,longlong param_2)

{
  FUN_140149920(param_2 + 0x30);
  return;
}



void Unwind_140217200(undefined8 param_1,longlong param_2)

{
  FUN_140149920(param_2 + 0x30);
  return;
}



void Unwind_140217210(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140217217. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140217220(undefined8 param_1,longlong param_2)

{
  FUN_140149e40(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140217230(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x40);
  return;
}



void Unwind_140217240(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x50);
  return;
}



void Unwind_140217250(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x50);
  return;
}



void Unwind_140217260(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x58),*(undefined8 *)(param_2 + 0x60));
  return;
}



void Catch_All_140217280(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x60);
  for (lVar2 = *(longlong *)(param_2 + 0x50); lVar2 != lVar1; lVar2 = lVar2 + 0x230) {
    FUN_140146830();
  }
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_1402172c0(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x68));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_1402172f0(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(*(longlong *)(param_2 + 0x40) + 0x28);
  return;
}



void Unwind_140217300(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(*(longlong *)(param_2 + 0x40) + 0x50);
  return;
}



void Unwind_140217310(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x30),*(undefined8 *)(param_2 + 0x28));
  return;
}



void Catch_All_140217330(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x60);
  for (lVar2 = *(longlong *)(param_2 + 0x68); lVar2 != lVar1; lVar2 = lVar2 + 0x58) {
    FUN_140142600();
  }
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_140217370(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x58),*(undefined8 *)(param_2 + 0x60));
  return;
}



void Catch_All_140217390(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x60);
  for (lVar2 = *(longlong *)(param_2 + 0x50); lVar2 != lVar1; lVar2 = lVar2 + 0x58) {
    FUN_140142600();
  }
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_1402173d0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x58),*(undefined8 *)(param_2 + 0x60));
  return;
}



void Catch_All_1402173f0(undefined8 param_1,longlong param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  puVar1 = *(undefined8 **)(param_2 + 0x60);
  for (puVar2 = *(undefined8 **)(param_2 + 0x50); puVar2 != puVar1; puVar2 = puVar2 + 8) {
    if (7 < (ulonglong)puVar2[3]) {
      operator_delete((void *)*puVar2);
    }
    puVar2[3] = 7;
    puVar2[2] = 0;
    *(undefined2 *)puVar2 = 0;
  }
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140217450(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x48));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140217480(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_1402174b0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x58),*(undefined8 *)(param_2 + 0x60));
  return;
}



void Catch_All_1402174d0(undefined8 param_1,longlong param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  
  puVar1 = *(undefined8 **)(param_2 + 0x60);
  for (puVar2 = *(undefined8 **)(param_2 + 0x50); puVar2 != puVar1; puVar2 = puVar2 + 5) {
    if (7 < (ulonglong)puVar2[3]) {
      operator_delete((void *)*puVar2);
    }
    puVar2[3] = 7;
    puVar2[2] = 0;
    *(undefined2 *)puVar2 = 0;
  }
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Catch_All_140217530(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x58));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_140217560(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x48),*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140217580(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x48),*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402175a0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x58),*(undefined8 *)(param_2 + 0x60));
  return;
}



void Catch_All_1402175c0(undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)(param_2 + 0x60);
  for (lVar2 = *(longlong *)(param_2 + 0x50); lVar2 != lVar1; lVar2 = lVar2 + 0xa0) {
    FUN_140145d50();
  }
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_140217600(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140146560(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_140217610(undefined8 param_1,longlong param_2)

{
  FUN_140145d50(*(undefined8 *)(param_2 + 0xb8));
  return;
}



void Unwind_140217620(undefined8 param_1,longlong param_2)

{
  FUN_140045980(*(longlong *)(param_2 + 0xb8) + 0xd8);
  return;
}



void Catch_All_140217640(undefined8 param_1,longlong param_2)

{
  operator_delete(*(void **)(param_2 + 0x68));
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_140217670(undefined8 param_1,longlong param_2)

{
  FUN_140146690(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140217680(undefined8 param_1,longlong param_2)

{
  FUN_140142600(param_2 + 0x40);
  return;
}



void Unwind_140217690(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x30));
  return;
}



void Catch_All_1402176a0(void)

{
  FUN_140141ae0();
                    // WARNING: Subroutine does not return
  _CxxThrowException((void *)0x0,(ThrowInfo *)0x0);
}



void Unwind_1402176d0(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x30);
  return;
}



void Unwind_1402176e0(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x30);
  return;
}



void Unwind_1402176f0(undefined8 param_1,longlong param_2)

{
  FUN_140156c00(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140217700(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x48) + 0x10);
  return;
}



void Unwind_140217710(undefined8 param_1,longlong param_2)

{
  FUN_1401858d0(*(longlong *)(param_2 + 0x48) + 0x28);
  return;
}



void Unwind_140217720(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x13e8);
  return;
}



void Unwind_140217730(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1218);
  return;
}



void Unwind_140217740(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1348);
  return;
}



void Unwind_140217750(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1480);
  return;
}



void Unwind_140217760(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1200);
  return;
}



void Unwind_140217770(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a0);
  return;
}



void Unwind_140217780(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x21d8);
  return;
}



void Unwind_140217790(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402177a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1238);
  return;
}



void Unwind_1402177b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1358);
  return;
}



void Unwind_1402177c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1228);
  return;
}



void Unwind_1402177d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x110);
  return;
}



void Unwind_1402177e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2728);
  return;
}



void Unwind_1402177f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217800(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd00);
  return;
}



void Unwind_140217810(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2748);
  return;
}



void Unwind_140217820(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217830(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1248);
  return;
}



void Unwind_140217840(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1438);
  return;
}



void Unwind_140217850(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x480);
  return;
}



void Unwind_140217860(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2778);
  return;
}



void Unwind_140217870(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217880(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd30);
  return;
}



void Unwind_140217890(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2758);
  return;
}



void Unwind_1402178a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402178b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb60);
  return;
}



void Unwind_1402178c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1730);
  return;
}



void Unwind_1402178d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402178e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x310);
  return;
}



void Unwind_1402178f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1740);
  return;
}



void Unwind_140217900(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217910(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1368);
  return;
}



void Unwind_140217920(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2a0);
  return;
}



void Unwind_140217930(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1750);
  return;
}



void Unwind_140217940(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217950(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x250);
  return;
}



void Unwind_140217960(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1760);
  return;
}



void Unwind_140217970(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217980(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b8);
  return;
}



void Unwind_140217990(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 6000);
  return;
}



void Unwind_1402179a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402179b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x4c8);
  return;
}



void Unwind_1402179c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1780);
  return;
}



void Unwind_1402179d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402179e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x500);
  return;
}



void Unwind_1402179f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1790);
  return;
}



void Unwind_140217a00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217a10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f8);
  return;
}



void Unwind_140217a20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x17a0);
  return;
}



void Unwind_140217a30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217a40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x210);
  return;
}



void Unwind_140217a50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x17b0);
  return;
}



void Unwind_140217a60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217a70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x208);
  return;
}



void Unwind_140217a80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x17c0);
  return;
}



void Unwind_140217a90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217aa0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d8);
  return;
}



void Unwind_140217ab0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x17d0);
  return;
}



void Unwind_140217ac0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217ad0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x240);
  return;
}



void Unwind_140217ae0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x17e0);
  return;
}



void Unwind_140217af0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217b00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3f0);
  return;
}



void Unwind_140217b10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x17f0);
  return;
}



void Unwind_140217b20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217b30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 800);
  return;
}



void Unwind_140217b40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1800);
  return;
}



void Unwind_140217b50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217b60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x278);
  return;
}



void Unwind_140217b70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1810);
  return;
}



void Unwind_140217b80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217b90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x6e8);
  return;
}



void Unwind_140217ba0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1820);
  return;
}



void Unwind_140217bb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217bc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xcf8);
  return;
}



void Unwind_140217bd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1830);
  return;
}



void Unwind_140217be0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217bf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x460);
  return;
}



void Unwind_140217c00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1840);
  return;
}



void Unwind_140217c10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217c20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x230);
  return;
}



void Unwind_140217c30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1850);
  return;
}



void Unwind_140217c40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217c50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x150);
  return;
}



void Unwind_140217c60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1860);
  return;
}



void Unwind_140217c70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217c80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x4e0);
  return;
}



void Unwind_140217c90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1870);
  return;
}



void Unwind_140217ca0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217cb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x6e0);
  return;
}



void Unwind_140217cc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1880);
  return;
}



void Unwind_140217cd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217ce0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x330);
  return;
}



void Unwind_140217cf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1890);
  return;
}



void Unwind_140217d00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217d10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x4f0);
  return;
}



void Unwind_140217d20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x18a0);
  return;
}



void Unwind_140217d30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217d40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x5f0);
  return;
}



void Unwind_140217d50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x18b0);
  return;
}



void Unwind_140217d60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217d70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x400);
  return;
}



void Unwind_140217d80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x18c0);
  return;
}



void Unwind_140217d90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217da0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x288);
  return;
}



void Unwind_140217db0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x18d0);
  return;
}



void Unwind_140217dc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217dd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x4d0);
  return;
}



void Unwind_140217de0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x18e0);
  return;
}



void Unwind_140217df0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217e00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x340);
  return;
}



void Unwind_140217e10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x18f0);
  return;
}



void Unwind_140217e20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217e30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x670);
  return;
}



void Unwind_140217e40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1900);
  return;
}



void Unwind_140217e50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217e60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x510);
  return;
}



void Unwind_140217e70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1910);
  return;
}



void Unwind_140217e80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217e90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x4b0);
  return;
}



void Unwind_140217ea0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1920);
  return;
}



void Unwind_140217eb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217ec0(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x2880);
  return;
}



void Unwind_140217ed0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x350);
  return;
}



void Unwind_140217ee0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1930);
  return;
}



void Unwind_140217ef0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217f00(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x2780);
  return;
}



void Unwind_140217f10(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x2800);
  return;
}



void Unwind_140217f20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2f8);
  return;
}



void Unwind_140217f30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1940);
  return;
}



void Unwind_140217f40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217f50(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x2900);
  return;
}



void Unwind_140217f60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x600);
  return;
}



void Unwind_140217f70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1950);
  return;
}



void Unwind_140217f80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217f90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x520);
  return;
}



void Unwind_140217fa0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1960);
  return;
}



void Unwind_140217fb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217fc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x6b0);
  return;
}



void Unwind_140217fd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1970);
  return;
}



void Unwind_140217fe0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140217ff0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x13f8);
  return;
}



void Unwind_140218000(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1258);
  return;
}



void Unwind_140218010(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x160);
  return;
}



void Unwind_140218020(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1980);
  return;
}



void Unwind_140218030(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218040(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x410);
  return;
}



void Unwind_140218050(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1990);
  return;
}



void Unwind_140218060(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218070(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x360);
  return;
}



void Unwind_140218080(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x19a0);
  return;
}



void Unwind_140218090(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402180a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x470);
  return;
}



void Unwind_1402180b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x19b0);
  return;
}



void Unwind_1402180c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402180d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1268);
  return;
}



void Unwind_1402180e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x370);
  return;
}



void Unwind_1402180f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x19c0);
  return;
}



void Unwind_140218100(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218110(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1378);
  return;
}



void Unwind_140218120(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x420);
  return;
}



void Unwind_140218130(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x19d0);
  return;
}



void Unwind_140218140(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218150(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1288);
  return;
}



void Unwind_140218160(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1478);
  return;
}



void Unwind_140218170(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1278);
  return;
}



void Unwind_140218180(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x1650);
  return;
}



void Unwind_140218190(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x128);
  return;
}



void Unwind_1402181a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x19e0);
  return;
}



void Unwind_1402181b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402181c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x530);
  return;
}



void Unwind_1402181d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x19f0);
  return;
}



void Unwind_1402181e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402181f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xcb0);
  return;
}



void Unwind_140218200(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a00);
  return;
}



void Unwind_140218210(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218220(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x610);
  return;
}



void Unwind_140218230(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a10);
  return;
}



void Unwind_140218240(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218250(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x380);
  return;
}



void Unwind_140218260(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a20);
  return;
}



void Unwind_140218270(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218280(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x540);
  return;
}



void Unwind_140218290(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a30);
  return;
}



void Unwind_1402182a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402182b0(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x27e0);
  return;
}



void Unwind_1402182c0(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x27a0);
  return;
}



void Unwind_1402182d0(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x28c0);
  return;
}



void Unwind_1402182e0(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x2840);
  return;
}



void Unwind_1402182f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c0);
  return;
}



void Unwind_140218300(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a40);
  return;
}



void Unwind_140218310(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218320(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 5000);
  return;
}



void Unwind_140218330(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x4a0);
  return;
}



void Unwind_140218340(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a50);
  return;
}



void Unwind_140218350(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218360(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x680);
  return;
}



void Unwind_140218370(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a60);
  return;
}



void Unwind_140218380(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218390(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x170);
  return;
}



void Unwind_1402183a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a70);
  return;
}



void Unwind_1402183b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402183c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x550);
  return;
}



void Unwind_1402183d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a80);
  return;
}



void Unwind_1402183e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402183f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x620);
  return;
}



void Unwind_140218400(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a90);
  return;
}



void Unwind_140218410(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218420(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1298);
  return;
}



void Unwind_140218430(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x390);
  return;
}



void Unwind_140218440(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1aa0);
  return;
}



void Unwind_140218450(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218460(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x430);
  return;
}



void Unwind_140218470(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ab0);
  return;
}



void Unwind_140218480(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218490(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x12a8);
  return;
}



void Unwind_1402184a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1408);
  return;
}



void Unwind_1402184b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2b0);
  return;
}



void Unwind_1402184c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ac0);
  return;
}



void Unwind_1402184d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402184e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3a0);
  return;
}



void Unwind_1402184f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ad0);
  return;
}



void Unwind_140218500(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218510(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1398);
  return;
}



void Unwind_140218520(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2f0);
  return;
}



void Unwind_140218530(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ae0);
  return;
}



void Unwind_140218540(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218550(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b0);
  return;
}



void Unwind_140218560(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1af0);
  return;
}



void Unwind_140218570(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218580(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e8);
  return;
}



void Unwind_140218590(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b00);
  return;
}



void Unwind_1402185a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402185b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x300);
  return;
}



void Unwind_1402185c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b10);
  return;
}



void Unwind_1402185d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402185e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x560);
  return;
}



void Unwind_1402185f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b20);
  return;
}



void Unwind_140218600(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218610(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x6d0);
  return;
}



void Unwind_140218620(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b30);
  return;
}



void Unwind_140218630(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218640(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x570);
  return;
}



void Unwind_140218650(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b40);
  return;
}



void Unwind_140218660(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218670(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3b0);
  return;
}



void Unwind_140218680(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b50);
  return;
}



void Unwind_140218690(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402186a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1448);
  return;
}



void Unwind_1402186b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x12b8);
  return;
}



void Unwind_1402186c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x140);
  return;
}



void Unwind_1402186d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b60);
  return;
}



void Unwind_1402186e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402186f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd38);
  return;
}



void Unwind_140218700(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b70);
  return;
}



void Unwind_140218710(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218720(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x630);
  return;
}



void Unwind_140218730(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b80);
  return;
}



void Unwind_140218740(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218750(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x2820);
  return;
}



void Unwind_140218760(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x440);
  return;
}



void Unwind_140218770(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b90);
  return;
}



void Unwind_140218780(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218790(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3c0);
  return;
}



void Unwind_1402187a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ba0);
  return;
}



void Unwind_1402187b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402187c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x12c8);
  return;
}



void Unwind_1402187d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x4c0);
  return;
}



void Unwind_1402187e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1bb0);
  return;
}



void Unwind_1402187f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218800(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x13a8);
  return;
}



void Unwind_140218810(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3d0);
  return;
}



void Unwind_140218820(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1bc0);
  return;
}



void Unwind_140218830(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218840(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x580);
  return;
}



void Unwind_140218850(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1bd0);
  return;
}



void Unwind_140218860(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218870(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x12d8);
  return;
}



void Unwind_140218880(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2c0);
  return;
}



void Unwind_140218890(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1be0);
  return;
}



void Unwind_1402188a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402188b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2e0);
  return;
}



void Unwind_1402188c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1bf0);
  return;
}



void Unwind_1402188d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402188e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x690);
  return;
}



void Unwind_1402188f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c00);
  return;
}



void Unwind_140218900(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218910(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa38);
  return;
}



void Unwind_140218920(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c10);
  return;
}



void Unwind_140218930(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218940(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x450);
  return;
}



void Unwind_140218950(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c20);
  return;
}



void Unwind_140218960(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218970(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3e0);
  return;
}



void Unwind_140218980(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c30);
  return;
}



void Unwind_140218990(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402189a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x490);
  return;
}



void Unwind_1402189b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c40);
  return;
}



void Unwind_1402189c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402189d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb70);
  return;
}



void Unwind_1402189e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c50);
  return;
}



void Unwind_1402189f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218a00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xce0);
  return;
}



void Unwind_140218a10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c60);
  return;
}



void Unwind_140218a20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218a30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x198);
  return;
}



void Unwind_140218a40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c70);
  return;
}



void Unwind_140218a50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218a60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x13b8);
  return;
}



void Unwind_140218a70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x12e8);
  return;
}



void Unwind_140218a80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1418);
  return;
}



void Unwind_140218a90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x298);
  return;
}



void Unwind_140218aa0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c80);
  return;
}



void Unwind_140218ab0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218ac0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd10);
  return;
}



void Unwind_140218ad0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c90);
  return;
}



void Unwind_140218ae0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218af0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb80);
  return;
}



void Unwind_140218b00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ca0);
  return;
}



void Unwind_140218b10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218b20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc60);
  return;
}



void Unwind_140218b30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1cb0);
  return;
}



void Unwind_140218b40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218b50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb90);
  return;
}



void Unwind_140218b60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1cc0);
  return;
}



void Unwind_140218b70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218b80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xcd0);
  return;
}



void Unwind_140218b90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1cd0);
  return;
}



void Unwind_140218ba0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218bb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x12f8);
  return;
}



void Unwind_140218bc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x168);
  return;
}



void Unwind_140218bd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ce0);
  return;
}



void Unwind_140218be0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218bf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x590);
  return;
}



void Unwind_140218c00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1cf0);
  return;
}



void Unwind_140218c10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218c20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x640);
  return;
}



void Unwind_140218c30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d00);
  return;
}



void Unwind_140218c40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140218c50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_140218c60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d10);
  return;
}



void Unwind_140218c70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218c80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_140218c90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d20);
  return;
}



void Unwind_140218ca0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218cb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd20);
  return;
}



void Unwind_140218cc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d30);
  return;
}



void Unwind_140218cd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218ce0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1468);
  return;
}



void Unwind_140218cf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2d0);
  return;
}



void Unwind_140218d00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d40);
  return;
}



void Unwind_140218d10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218d20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x13c8);
  return;
}



void Unwind_140218d30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1308);
  return;
}



void Unwind_140218d40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x270);
  return;
}



void Unwind_140218d50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d50);
  return;
}



void Unwind_140218d60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218d70(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x2860);
  return;
}



void Unwind_140218d80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x5a0);
  return;
}



void Unwind_140218d90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d60);
  return;
}



void Unwind_140218da0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218db0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x6c0);
  return;
}



void Unwind_140218dc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d70);
  return;
}



void Unwind_140218dd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218de0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x5b0);
  return;
}



void Unwind_140218df0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d80);
  return;
}



void Unwind_140218e00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218e10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x650);
  return;
}



void Unwind_140218e20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d90);
  return;
}



void Unwind_140218e30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218e40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x5c0);
  return;
}



void Unwind_140218e50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1da0);
  return;
}



void Unwind_140218e60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218e70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xba0);
  return;
}



void Unwind_140218e80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1db0);
  return;
}



void Unwind_140218e90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218ea0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1318);
  return;
}



void Unwind_140218eb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x100);
  return;
}



void Unwind_140218ec0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1dc0);
  return;
}



void Unwind_140218ed0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218ee0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x108);
  return;
}



void Unwind_140218ef0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1dd0);
  return;
}



void Unwind_140218f00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218f10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x6a0);
  return;
}



void Unwind_140218f20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1de0);
  return;
}



void Unwind_140218f30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218f40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x218);
  return;
}



void Unwind_140218f50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1df0);
  return;
}



void Unwind_140218f60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218f70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x308);
  return;
}



void Unwind_140218f80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e00);
  return;
}



void Unwind_140218f90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218fa0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1428);
  return;
}



void Unwind_140218fb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x318);
  return;
}



void Unwind_140218fc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e10);
  return;
}



void Unwind_140218fd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140218fe0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2a8);
  return;
}



void Unwind_140218ff0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e20);
  return;
}



void Unwind_140219000(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219010(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x328);
  return;
}



void Unwind_140219020(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e30);
  return;
}



void Unwind_140219030(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219040(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x5d0);
  return;
}



void Unwind_140219050(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e40);
  return;
}



void Unwind_140219060(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219070(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x660);
  return;
}



void Unwind_140219080(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e50);
  return;
}



void Unwind_140219090(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402190a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x338);
  return;
}



void Unwind_1402190b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e60);
  return;
}



void Unwind_1402190c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402190d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x5e0);
  return;
}



void Unwind_1402190e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e70);
  return;
}



void Unwind_1402190f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219100(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x348);
  return;
}



void Unwind_140219110(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e80);
  return;
}



void Unwind_140219120(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219130(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2b8);
  return;
}



void Unwind_140219140(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e90);
  return;
}



void Unwind_140219150(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219160(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x358);
  return;
}



void Unwind_140219170(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ea0);
  return;
}



void Unwind_140219180(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219190(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_1402191a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1eb0);
  return;
}



void Unwind_1402191b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402191c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_1402191d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ec0);
  return;
}



void Unwind_1402191e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402191f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x13d8);
  return;
}



void Unwind_140219200(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1328);
  return;
}



void Unwind_140219210(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c8);
  return;
}



void Unwind_140219220(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ed0);
  return;
}



void Unwind_140219230(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219240(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc70);
  return;
}



void Unwind_140219250(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ee0);
  return;
}



void Unwind_140219260(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219270(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d0);
  return;
}



void Unwind_140219280(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ef0);
  return;
}



void Unwind_140219290(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402192a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xbb0);
  return;
}



void Unwind_1402192b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f00);
  return;
}



void Unwind_1402192c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402192d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x290);
  return;
}



void Unwind_1402192e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f10);
  return;
}



void Unwind_1402192f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219300(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xca8);
  return;
}



void Unwind_140219310(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f20);
  return;
}



void Unwind_140219320(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219330(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xbc0);
  return;
}



void Unwind_140219340(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f30);
  return;
}



void Unwind_140219350(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219360(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x368);
  return;
}



void Unwind_140219370(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 8000);
  return;
}



void Unwind_140219380(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219390(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x378);
  return;
}



void Unwind_1402193a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1718);
  return;
}



void Unwind_1402193b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402193c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x260);
  return;
}



void Unwind_1402193d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1738);
  return;
}



void Unwind_1402193e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402193f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x4d8);
  return;
}



void Unwind_140219400(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1758);
  return;
}



void Unwind_140219410(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219420(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2c8);
  return;
}



void Unwind_140219430(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1778);
  return;
}



void Unwind_140219440(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219450(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1208);
  return;
}



void Unwind_140219460(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1458);
  return;
}



void Unwind_140219470(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1338);
  return;
}



void Unwind_140219480(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x280);
  return;
}



void Unwind_140219490(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1798);
  return;
}



void Unwind_1402194a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402194b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x4e8);
  return;
}



void Unwind_1402194c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x17b8);
  return;
}



void Unwind_1402194d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402194e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x388);
  return;
}



void Unwind_1402194f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x17d8);
  return;
}



void Unwind_140219500(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219510(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x398);
  return;
}



void Unwind_140219520(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x17f8);
  return;
}



void Unwind_140219530(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219540(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3a8);
  return;
}



void Unwind_140219550(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1818);
  return;
}



void Unwind_140219560(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219570(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3b8);
  return;
}



void Unwind_140219580(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1838);
  return;
}



void Unwind_140219590(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402195a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3c8);
  return;
}



void Unwind_1402195b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1858);
  return;
}



void Unwind_1402195c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402195d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3d8);
  return;
}



void Unwind_1402195e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1878);
  return;
}



void Unwind_1402195f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219600(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1210);
  return;
}



void Unwind_140219610(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc80);
  return;
}



void Unwind_140219620(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1898);
  return;
}



void Unwind_140219630(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219640(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x4f8);
  return;
}



void Unwind_140219650(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x18b8);
  return;
}



void Unwind_140219660(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219670(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1240);
  return;
}



void Unwind_140219680(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1230);
  return;
}



void Unwind_140219690(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1220);
  return;
}



void Unwind_1402196a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x138);
  return;
}



void Unwind_1402196b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x18d8);
  return;
}



void Unwind_1402196c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402196d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x508);
  return;
}



void Unwind_1402196e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x18f8);
  return;
}



void Unwind_1402196f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219700(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1250);
  return;
}



void Unwind_140219710(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x518);
  return;
}



void Unwind_140219720(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1918);
  return;
}



void Unwind_140219730(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219740(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x528);
  return;
}



void Unwind_140219750(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1938);
  return;
}



void Unwind_140219760(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219770(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xbd0);
  return;
}



void Unwind_140219780(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1958);
  return;
}



void Unwind_140219790(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402197a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x538);
  return;
}



void Unwind_1402197b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1978);
  return;
}



void Unwind_1402197c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402197d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa48);
  return;
}



void Unwind_1402197e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1998);
  return;
}



void Unwind_1402197f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219800(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa58);
  return;
}



void Unwind_140219810(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x19b8);
  return;
}



void Unwind_140219820(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219830(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x548);
  return;
}



void Unwind_140219840(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x19d8);
  return;
}



void Unwind_140219850(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219860(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x558);
  return;
}



void Unwind_140219870(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x19f8);
  return;
}



void Unwind_140219880(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219890(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x238);
  return;
}



void Unwind_1402198a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a18);
  return;
}



void Unwind_1402198b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402198c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e0);
  return;
}



void Unwind_1402198d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a38);
  return;
}



void Unwind_1402198e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402198f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x568);
  return;
}



void Unwind_140219900(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a58);
  return;
}



void Unwind_140219910(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219920(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x578);
  return;
}



void Unwind_140219930(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a78);
  return;
}



void Unwind_140219940(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219950(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1260);
  return;
}



void Unwind_140219960(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x28a0);
  return;
}



void Unwind_140219970(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x248);
  return;
}



void Unwind_140219980(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a98);
  return;
}



void Unwind_140219990(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402199a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 1000);
  return;
}



void Unwind_1402199b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ab8);
  return;
}



void Unwind_1402199c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_1402199d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1280);
  return;
}



void Unwind_1402199e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1270);
  return;
}



void Unwind_1402199f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x3f8);
  return;
}



void Unwind_140219a00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ad8);
  return;
}



void Unwind_140219a10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219a20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xcb8);
  return;
}



void Unwind_140219a30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1af8);
  return;
}



void Unwind_140219a40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219a50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xbe0);
  return;
}



void Unwind_140219a60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b18);
  return;
}



void Unwind_140219a70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219a80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc90);
  return;
}



void Unwind_140219a90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b38);
  return;
}



void Unwind_140219aa0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219ab0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xbf0);
  return;
}



void Unwind_140219ac0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 7000);
  return;
}



void Unwind_140219ad0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219ae0(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x28e0);
  return;
}



void Unwind_140219af0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2d8);
  return;
}



void Unwind_140219b00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b78);
  return;
}



void Unwind_140219b10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219b20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xcc8);
  return;
}



void Unwind_140219b30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1b98);
  return;
}



void Unwind_140219b40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219b50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd08);
  return;
}



void Unwind_140219b60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1bb8);
  return;
}



void Unwind_140219b70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219b80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc00);
  return;
}



void Unwind_140219b90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1bd8);
  return;
}



void Unwind_140219ba0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219bb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x12b0);
  return;
}



void Unwind_140219bc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x12a0);
  return;
}



void Unwind_140219bd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1290);
  return;
}



void Unwind_140219be0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 600);
  return;
}



void Unwind_140219bf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1bf8);
  return;
}



void Unwind_140219c00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219c10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x12c0);
  return;
}



void Unwind_140219c20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x408);
  return;
}



void Unwind_140219c30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c18);
  return;
}



void Unwind_140219c40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219c50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xca0);
  return;
}



void Unwind_140219c60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c38);
  return;
}



void Unwind_140219c70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219c80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_140219c90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c58);
  return;
}



void Unwind_140219ca0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219cb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd18);
  return;
}



void Unwind_140219cc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c78);
  return;
}



void Unwind_140219cd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219ce0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x12e0);
  return;
}



void Unwind_140219cf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x12d0);
  return;
}



void Unwind_140219d00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x588);
  return;
}



void Unwind_140219d10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1c98);
  return;
}



void Unwind_140219d20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219d30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x12f0);
  return;
}



void Unwind_140219d40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc10);
  return;
}



void Unwind_140219d50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1cb8);
  return;
}



void Unwind_140219d60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219d70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x268);
  return;
}



void Unwind_140219d80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1cd8);
  return;
}



void Unwind_140219d90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219da0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x598);
  return;
}



void Unwind_140219db0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1cf8);
  return;
}



void Unwind_140219dc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219dd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f0);
  return;
}



void Unwind_140219de0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d18);
  return;
}



void Unwind_140219df0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219e00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x418);
  return;
}



void Unwind_140219e10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d38);
  return;
}



void Unwind_140219e20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219e30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x428);
  return;
}



void Unwind_140219e40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d58);
  return;
}



void Unwind_140219e50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219e60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x120);
  return;
}



void Unwind_140219e70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d78);
  return;
}



void Unwind_140219e80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219e90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x438);
  return;
}



void Unwind_140219ea0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1d98);
  return;
}



void Unwind_140219eb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219ec0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xcd8);
  return;
}



void Unwind_140219ed0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1db8);
  return;
}



void Unwind_140219ee0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219ef0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x448);
  return;
}



void Unwind_140219f00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1dd8);
  return;
}



void Unwind_140219f10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219f20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc20);
  return;
}



void Unwind_140219f30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1df8);
  return;
}



void Unwind_140219f40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219f50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x148);
  return;
}



void Unwind_140219f60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e18);
  return;
}



void Unwind_140219f70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219f80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x220);
  return;
}



void Unwind_140219f90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e38);
  return;
}



void Unwind_140219fa0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219fb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x5a8);
  return;
}



void Unwind_140219fc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e58);
  return;
}



void Unwind_140219fd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140219fe0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x5b8);
  return;
}



void Unwind_140219ff0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e78);
  return;
}



void Unwind_14021a000(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a010(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xce8);
  return;
}



void Unwind_14021a020(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e98);
  return;
}



void Unwind_14021a030(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a040(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc30);
  return;
}



void Unwind_14021a050(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1eb8);
  return;
}



void Unwind_14021a060(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a070(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xcf0);
  return;
}



void Unwind_14021a080(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ed8);
  return;
}



void Unwind_14021a090(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a0a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_14021a0b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ef8);
  return;
}



void Unwind_14021a0c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a0d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_14021a0e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f18);
  return;
}



void Unwind_14021a0f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a100(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_14021a110(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f38);
  return;
}



void Unwind_14021a120(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a130(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_14021a140(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f58);
  return;
}



void Unwind_14021a150(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a160(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_14021a170(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f78);
  return;
}



void Unwind_14021a180(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a190(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x5c8);
  return;
}



void Unwind_14021a1a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f98);
  return;
}



void Unwind_14021a1b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a1c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc40);
  return;
}



void Unwind_14021a1d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1fb8);
  return;
}



void Unwind_14021a1e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a1f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xcc0);
  return;
}



void Unwind_14021a200(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1fd8);
  return;
}



void Unwind_14021a210(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a220(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc50);
  return;
}



void Unwind_14021a230(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1ff8);
  return;
}



void Unwind_14021a240(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a250(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb68);
  return;
}



void Unwind_14021a260(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2018);
  return;
}



void Unwind_14021a270(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a280(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb78);
  return;
}



void Unwind_14021a290(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2038);
  return;
}



void Unwind_14021a2a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a2b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb88);
  return;
}



void Unwind_14021a2c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2058);
  return;
}



void Unwind_14021a2d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a2e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_14021a2f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2078);
  return;
}



void Unwind_14021a300(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a310(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1320);
  return;
}



void Unwind_14021a320(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1310);
  return;
}



void Unwind_14021a330(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1300);
  return;
}



void Unwind_14021a340(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x118);
  return;
}



void Unwind_14021a350(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2098);
  return;
}



void Unwind_14021a360(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a370(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb98);
  return;
}



void Unwind_14021a380(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20b8);
  return;
}



void Unwind_14021a390(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a3a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xba8);
  return;
}



void Unwind_14021a3b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20d8);
  return;
}



void Unwind_14021a3c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a3d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 3000);
  return;
}



void Unwind_14021a3e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x20f8);
  return;
}



void Unwind_14021a3f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a400(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xbc8);
  return;
}



void Unwind_14021a410(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2118);
  return;
}



void Unwind_14021a420(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a430(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_14021a440(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2138);
  return;
}



void Unwind_14021a450(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a460(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x458);
  return;
}



void Unwind_14021a470(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2158);
  return;
}



void Unwind_14021a480(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a490(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x5d8);
  return;
}



void Unwind_14021a4a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2178);
  return;
}



void Unwind_14021a4b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a4c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x5e8);
  return;
}



void Unwind_14021a4d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2198);
  return;
}



void Unwind_14021a4e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a4f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x5f8);
  return;
}



void Unwind_14021a500(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x21b8);
  return;
}



void Unwind_14021a510(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a520(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x608);
  return;
}



void Unwind_14021a530(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1710);
  return;
}



void Unwind_14021a540(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a550(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1330);
  return;
}



void Unwind_14021a560(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xd28);
  return;
}



void Unwind_14021a570(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x21f8);
  return;
}



void Unwind_14021a580(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a590(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x618);
  return;
}



void Unwind_14021a5a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2218);
  return;
}



void Unwind_14021a5b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a5c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1360);
  return;
}



void Unwind_14021a5d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1350);
  return;
}



void Unwind_14021a5e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1340);
  return;
}



void Unwind_14021a5f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x178);
  return;
}



void Unwind_14021a600(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2238);
  return;
}



void Unwind_14021a610(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a620(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1370);
  return;
}



void Unwind_14021a630(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x468);
  return;
}



void Unwind_14021a640(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2258);
  return;
}



void Unwind_14021a650(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a660(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_14021a670(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2278);
  return;
}



void Unwind_14021a680(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a690(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x13b0);
  return;
}



void Unwind_14021a6a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x13a0);
  return;
}



void Unwind_14021a6b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1390);
  return;
}



void Unwind_14021a6c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1380);
  return;
}



void Unwind_14021a6d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x158);
  return;
}



void Unwind_14021a6e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2298);
  return;
}



void Unwind_14021a6f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a700(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x13c0);
  return;
}



void Unwind_14021a710(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xbd8);
  return;
}



void Unwind_14021a720(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x22b8);
  return;
}



void Unwind_14021a730(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a740(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xbe8);
  return;
}



void Unwind_14021a750(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x22d8);
  return;
}



void Unwind_14021a760(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a770(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xbf8);
  return;
}



void Unwind_14021a780(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x22f8);
  return;
}



void Unwind_14021a790(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a7a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc08);
  return;
}



void Unwind_14021a7b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2318);
  return;
}



void Unwind_14021a7c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a7d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x628);
  return;
}



void Unwind_14021a7e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2338);
  return;
}



void Unwind_14021a7f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a800(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x638);
  return;
}



void Unwind_14021a810(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2358);
  return;
}



void Unwind_14021a820(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a830(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x13f0);
  return;
}



void Unwind_14021a840(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x13e0);
  return;
}



void Unwind_14021a850(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x13d0);
  return;
}



void Unwind_14021a860(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x130);
  return;
}



void Unwind_14021a870(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2378);
  return;
}



void Unwind_14021a880(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a890(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc18);
  return;
}



void Unwind_14021a8a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2398);
  return;
}



void Unwind_14021a8b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a8c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc28);
  return;
}



void Unwind_14021a8d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x23b8);
  return;
}



void Unwind_14021a8e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a8f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc38);
  return;
}



void Unwind_14021a900(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x23d8);
  return;
}



void Unwind_14021a910(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a920(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x648);
  return;
}



void Unwind_14021a930(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x23f8);
  return;
}



void Unwind_14021a940(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a950(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc48);
  return;
}



void Unwind_14021a960(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2418);
  return;
}



void Unwind_14021a970(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a980(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc58);
  return;
}



void Unwind_14021a990(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2438);
  return;
}



void Unwind_14021a9a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a9b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc68);
  return;
}



void Unwind_14021a9c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2458);
  return;
}



void Unwind_14021a9d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021a9e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x200);
  return;
}



void Unwind_14021a9f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2478);
  return;
}



void Unwind_14021aa00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021aa10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc78);
  return;
}



void Unwind_14021aa20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2498);
  return;
}



void Unwind_14021aa30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021aa40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x658);
  return;
}



void Unwind_14021aa50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x24b8);
  return;
}



void Unwind_14021aa60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021aa70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x668);
  return;
}



void Unwind_14021aa80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x24d8);
  return;
}



void Unwind_14021aa90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021aaa0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x678);
  return;
}



void Unwind_14021aab0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x24f8);
  return;
}



void Unwind_14021aac0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021aad0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x688);
  return;
}



void Unwind_14021aae0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2518);
  return;
}



void Unwind_14021aaf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021ab00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x478);
  return;
}



void Unwind_14021ab10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2538);
  return;
}



void Unwind_14021ab20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021ab30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x698);
  return;
}



void Unwind_14021ab40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2558);
  return;
}



void Unwind_14021ab50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021ab60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x6a8);
  return;
}



void Unwind_14021ab70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2578);
  return;
}



void Unwind_14021ab80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021ab90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x228);
  return;
}



void Unwind_14021aba0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2598);
  return;
}



void Unwind_14021abb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021abc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x6b8);
  return;
}



void Unwind_14021abd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x25b8);
  return;
}



void Unwind_14021abe0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021abf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2e8);
  return;
}



void Unwind_14021ac00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x25d8);
  return;
}



void Unwind_14021ac10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021ac20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc88);
  return;
}



void Unwind_14021ac30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x25f8);
  return;
}



void Unwind_14021ac40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021ac50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xc98);
  return;
}



void Unwind_14021ac60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2618);
  return;
}



void Unwind_14021ac70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021ac80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1400);
  return;
}



void Unwind_14021ac90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x6c8);
  return;
}



void Unwind_14021aca0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2638);
  return;
}



void Unwind_14021acb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021acc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1410);
  return;
}



void Unwind_14021acd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x488);
  return;
}



void Unwind_14021ace0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2658);
  return;
}



void Unwind_14021acf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021ad00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1420);
  return;
}



void Unwind_14021ad10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x498);
  return;
}



void Unwind_14021ad20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2678);
  return;
}



void Unwind_14021ad30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021ad40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1470);
  return;
}



void Unwind_14021ad50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1460);
  return;
}



void Unwind_14021ad60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1450);
  return;
}



void Unwind_14021ad70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1440);
  return;
}



void Unwind_14021ad80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x1430);
  return;
}



void Unwind_14021ad90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1a8);
  return;
}



void Unwind_14021ada0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x2698);
  return;
}



void Unwind_14021adb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021adc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x4a8);
  return;
}



void Unwind_14021add0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x26b8);
  return;
}



void Unwind_14021ade0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021adf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x6d8);
  return;
}



void Unwind_14021ae00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x26d8);
  return;
}



void Unwind_14021ae10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021ae20(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x27c0);
  return;
}



void Unwind_14021ae30(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x2920);
  return;
}



void Unwind_14021ae40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x4b8);
  return;
}



void Unwind_14021ae50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x26f8);
  return;
}



void Unwind_14021ae60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_14021ae70(undefined8 param_1,longlong param_2)

{
  FUN_140145d50(param_2 + 0x40);
  return;
}



void Unwind_14021ae80(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x28),*(undefined8 *)(param_2 + 0x20));
  return;
}



void Unwind_14021aea0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x20),*(undefined8 *)(param_2 + 0x28));
  return;
}



void Unwind_14021aec0(undefined8 param_1,longlong param_2)

{
  FUN_1401460a0(param_2 + 0x58);
  return;
}



void Unwind_14021aed0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021aee0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_14021aef0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_14021af00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1e8);
  return;
}



void Unwind_14021af10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x98);
  return;
}



void Unwind_14021af20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021af30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021af40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021af50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021af60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021af70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021af80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x208);
  return;
}



void Unwind_14021af90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021afa0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x98);
  return;
}



void Unwind_14021afb0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021afc0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021afd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021afe0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021aff0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_14021b000(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b010(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x200);
  return;
}



void Unwind_14021b020(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021b030(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b040(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b050(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b060(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021b070(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b080(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b090(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b0a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f0);
  return;
}



void Unwind_14021b0b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b0c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021b0d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b0e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b0f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021b100(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b110(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b120(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x1f8);
  return;
}



void Unwind_14021b130(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b140(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021b150(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b160(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b170(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021b180(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_14021b190(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_14021b1a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b1b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x248);
  return;
}



void Unwind_14021b1c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021b1d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b1e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x240);
  return;
}



void Unwind_14021b1f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021b200(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_14021b210(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b220(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x250);
  return;
}



void Unwind_14021b230(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021b240(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b250(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x260);
  return;
}



void Unwind_14021b260(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021b270(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_14021b280(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b290(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 600);
  return;
}



void Unwind_14021b2a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021b2b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_14021b2c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b2d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x228);
  return;
}



void Unwind_14021b2e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021b2f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_14021b300(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b310(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x210);
  return;
}



void Unwind_14021b320(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021b330(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_14021b340(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b350(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x238);
  return;
}



void Unwind_14021b360(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_14021b370(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_14021b380(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b390(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x218);
  return;
}



void Unwind_14021b3a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_14021b3b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_14021b3c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b3d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x220);
  return;
}



void Unwind_14021b3e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_14021b3f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14021b400(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x230);
  return;
}



void Unwind_14021b410(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14021b420(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0xb0);
  return;
}



void Unwind_14021b430(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x88);
  return;
}



void Unwind_14021b440(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0xa0);
  return;
}



void Unwind_14021b450(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x78);
  return;
}



void Unwind_14021b460(undefined8 param_1,longlong param_2)

{
  FUN_1401452d0(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021b470(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x40) + 0x18);
  return;
}



void Unwind_14021b480(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x88);
  return;
}



void Unwind_14021b490(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x60);
  return;
}



void Unwind_14021b4a0(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x38);
  return;
}



void Unwind_14021b4b0(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x28);
  return;
}



void Unwind_14021b4c0(undefined8 param_1,longlong param_2)

{
  FUN_140141f00(param_2 + 0x28);
  return;
}



void Unwind_14021b4d0(undefined8 param_1,longlong param_2)

{
  FUN_1401425a0(param_2 + 0x28);
  return;
}



void Unwind_14021b4e0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x80),*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021b500(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x50);
  return;
}



void Unwind_14021b510(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x78);
  return;
}



void Unwind_14021b520(undefined8 param_1,longlong param_2)

{
  FUN_140142f10(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14021b530(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(*(longlong *)(param_2 + 0x48) + 8);
  return;
}



void Unwind_14021b540(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(*(longlong *)(param_2 + 0x48) + 0x30);
  return;
}



void Unwind_14021b550(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(*(longlong *)(param_2 + 0x48) + 0x58);
  return;
}



void Unwind_14021b560(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x48) + 0x90);
  return;
}



void Unwind_14021b580(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x48) + 0xb8);
  return;
}



void Unwind_14021b5a0(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x48) + 0xe0);
  return;
}



void Unwind_14021b5c0(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(*(longlong *)(param_2 + 0x48) + 0x108);
  return;
}



void Unwind_14021b5e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140141700(*(longlong *)(param_2 + 0x48) + 0x188);
  return;
}



void Unwind_14021b600(undefined8 param_1,longlong param_2)

{
  FUN_140141f00(*(longlong *)(param_2 + 0x48) + 0x1a8);
  return;
}



void Unwind_14021b620(undefined8 param_1,longlong param_2)

{
  FUN_140140da0(param_2 + 0x20);
  return;
}



void Unwind_14021b630(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x58);
  return;
}



void Unwind_14021b640(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x80);
  return;
}



void Unwind_14021b650(undefined8 param_1,longlong param_2)

{
  FUN_140142cd0(param_2 + 0xb0);
  return;
}



void Unwind_14021b660(undefined8 param_1,longlong param_2)

{
  FUN_14013c0b0(param_2 + 0x80);
  return;
}



void Unwind_14021b670(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14021b680(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14021b690(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x58);
  return;
}



void Unwind_14021b6a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14021b6b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14021b6c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14021b6d0(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(param_2 + 0x58);
  return;
}



void Unwind_14021b6e0(undefined8 param_1,longlong param_2)

{
  FUN_14013c530(param_2 + 0x20);
  return;
}



undefined * Catch_14021b6f0(undefined8 param_1,longlong param_2)

{
  char *_Str;
  
  _Str = (char *)(**(code **)(**(longlong **)(param_2 + 0x48) + 8))();
  puts(_Str);
  return &DAT_14013bf2d;
}



void Unwind_14021b720(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x38);
  return;
}



void Unwind_14021b730(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_14021b740(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_14021b750(undefined8 param_1,longlong param_2)

{
  FUN_14013c6b0(param_2 + 0x98);
  return;
}



void Unwind_14021b760(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_14021b770(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021b777. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xed0));
  return;
}



void Unwind_14021b780(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0xd0);
  return;
}



void Unwind_14021b790(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x68);
  return;
}



void Unwind_14021b7a0(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x60);
  return;
}



void Unwind_14021b7b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021b7b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_14021b7c0(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x58);
  return;
}



void Unwind_14021b7d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021b7d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14021b7e0(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x68);
  return;
}



void Unwind_14021b7f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021b7f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14021b800(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x60);
  return;
}



void Unwind_14021b810(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021b817. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_14021b820(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x58);
  return;
}



void Unwind_14021b830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021b840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_14021b850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_14021b860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_14021b870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_14021b880(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x60);
  return;
}



void Unwind_14021b890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x38);
  return;
}



void Unwind_14021b8a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x120);
  return;
}



void Unwind_14021b8b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x120);
  return;
}



void Unwind_14021b8c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_14021b8d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe0);
  return;
}



void Unwind_14021b8e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021b8f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_14021b900(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x100);
  return;
}



undefined * Catch_14021b910(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x138);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x58);
  FUN_1400a69d0(uVar2,uVar1,"DBWriteQueryServerOption.cpp",
                "CDBLobbyWriteQuery::DBReqReadWorldServer",0x98,"dbo.up_read_world_server");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x50),1);
  return &DAT_1400a0815;
}



undefined * Catch_14021b9a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x140);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x58);
  FUN_1400a6790(uVar2,plVar1,"DBWriteQueryServerOption.cpp",
                "CDBLobbyWriteQuery::DBReqReadWorldServer",0x9c,"dbo.up_read_world_server");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x50),1);
  return &DAT_1400a0815;
}



void Unwind_14021ba30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_14021ba40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_14021ba50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_14021ba60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_14021ba70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021ba80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_14021ba90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_14021baa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_14021bab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_14021bac0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x60);
  return;
}



void Unwind_14021bad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x38);
  return;
}



void Unwind_14021bae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x120);
  return;
}



void Unwind_14021baf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x120);
  return;
}



void Unwind_14021bb00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x120);
  return;
}



void Unwind_14021bb10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_14021bb20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xe0);
  return;
}



void Unwind_14021bb30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14021bb40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_14021bb50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x100);
  return;
}



undefined * Catch_14021bb60(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x138);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x58);
  FUN_1400a69d0(uVar2,uVar1,"DBWriteQueryServerOption.cpp",
                "CDBLobbyWriteQuery::DBReqReadRealTimeEvent",0x5e,"dbo.up_read_realtimeevent");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x50),1);
  return &DAT_1400a006b;
}



undefined * Catch_14021bbf0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x140);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x58);
  FUN_1400a6790(uVar2,plVar1,"DBWriteQueryServerOption.cpp",
                "CDBLobbyWriteQuery::DBReqReadRealTimeEvent",0x62,"dbo.up_read_realtimeevent");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x50),1);
  return &DAT_1400a006b;
}



void Unwind_14021bc80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_14021bc90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_14021bca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_14021bcb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_14021bcc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14021bcd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_14021bce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_14021bcf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14021bd00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_14021bd10(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x70);
  return;
}



void Unwind_14021bd20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_14021bd30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_14021bd40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14021bd50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_14021bd60(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x1d0);
  return;
}



void Unwind_14021bd70(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 400);
  return;
}



void Unwind_14021bd80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021bd90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x158);
  return;
}



void Unwind_14021bda0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf8);
  return;
}



void Unwind_14021bdb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf8);
  return;
}



void Unwind_14021bdc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x140);
  return;
}



void Unwind_14021bdd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x170);
  return;
}



undefined * Catch_14021bde0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(param_2 + 0x138);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  FUN_1400a69d0(*(undefined8 *)(param_2 + 0xf0),uVar1,"DBLobbyWriteQueryStatistics.cpp",
                "CDBLobbyWriteQuery::DBReqStatistics_CashItem",0x370,
                "dbo.up_read_cash_product_list_statistics");
  return &DAT_14009e6e5;
}



undefined * Catch_14021be60(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(param_2 + 0x130);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  FUN_1400a6790(*(undefined8 *)(param_2 + 0xf0),plVar1,"DBLobbyWriteQueryStatistics.cpp",
                "CDBLobbyWriteQuery::DBReqStatistics_CashItem",0x373,
                "dbo.up_read_cash_product_list_statistics");
  return &DAT_14009e6e5;
}



void Unwind_14021bee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_14021bef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_14021bf00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14021bf10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_14021bf20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14021bf30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_14021bf40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14021bf50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_14021bf60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x88);
  return;
}



void Unwind_14021bf70(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x50);
  return;
}



void Unwind_14021bf80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_14021bf90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14021bfa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_14021bfb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x88);
  return;
}



void Unwind_14021bfc0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x120);
  return;
}



void Unwind_14021bfd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021bfe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x108);
  return;
}



void Unwind_14021bff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_14021c000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_14021c010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_14021c020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



undefined * Catch_14021c030(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(param_2 + 0xf8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  FUN_1400a69d0(*(undefined8 *)(param_2 + 0xd0),uVar1,"DBLobbyWriteQueryStatistics.cpp",
                "CDBLobbyWriteQuery::DBReqStatistics_Dungeon",0x328,
                "dbo.up_read_dungeon_rank_statistics");
  return &DAT_14009dbfd;
}



undefined * Catch_14021c0b0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(param_2 + 0x100);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  FUN_1400a6790(*(undefined8 *)(param_2 + 0xd0),plVar1,"DBLobbyWriteQueryStatistics.cpp",
                "CDBLobbyWriteQuery::DBReqStatistics_Dungeon",0x32b,
                "dbo.up_read_dungeon_rank_statistics");
  return &DAT_14009dbfd;
}



void Unwind_14021c130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_14021c140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14021c150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_14021c160(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x88);
  return;
}



void Unwind_14021c170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14021c180(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_14021c190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14021c1a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_14021c1b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x88);
  return;
}



void Unwind_14021c1c0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x50);
  return;
}



void Unwind_14021c1d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_14021c1e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14021c1f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_14021c200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x88);
  return;
}



void Unwind_14021c210(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x120);
  return;
}



void Unwind_14021c220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021c230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe0);
  return;
}



undefined * Catch_14021c240(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(param_2 + 0xf8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  FUN_1400a69d0(*(undefined8 *)(param_2 + 0xd0),uVar1,"DBLobbyWriteQueryStatistics.cpp",
                "CDBLobbyWriteQuery::DBReqStatistics_Quest",0x2e6,"dbo.up_read_quest_statistics");
  return &DAT_14009d353;
}



undefined * Catch_14021c2c0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(param_2 + 0x100);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  FUN_1400a6790(*(undefined8 *)(param_2 + 0xd0),plVar1,"DBLobbyWriteQueryStatistics.cpp",
                "CDBLobbyWriteQuery::DBReqStatistics_Quest",0x2e9,"dbo.up_read_quest_statistics");
  return &DAT_14009d353;
}



void Unwind_14021c340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_14021c350(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14021c360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_14021c370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x88);
  return;
}



void Unwind_14021c380(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14021c390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_14021c3a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_14021c3b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_14021c3c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_14021c3d0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x60);
  return;
}



void Unwind_14021c3e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_14021c3f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_14021c400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_14021c410(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_14021c420(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x210);
  return;
}



void Unwind_14021c430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_14021c440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x180);
  return;
}



void Unwind_14021c450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c460(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c470(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c4a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c4b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c4c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c4d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c4e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c4f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c500(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c540(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



void Unwind_14021c570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x38);
  return;
}



undefined * Catch_14021c580(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1a0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  FUN_1400a69d0(*(undefined8 *)(param_2 + 0x170),uVar1,"DBLobbyWriteQueryStatistics.cpp",
                "CDBLobbyWriteQuery::DBReqStatistics_PVP",0x2aa,"dbo.up_get_duel_info_statistics");
  return &DAT_14009cbe1;
}



undefined * Catch_14021c600(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(param_2 + 0x198);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  FUN_1400a6790(*(undefined8 *)(param_2 + 0x170),plVar1,"DBLobbyWriteQueryStatistics.cpp",
                "CDBLobbyWriteQuery::DBReqStatistics_PVP",0x2ad,"dbo.up_get_duel_info_statistics");
  return &DAT_14009cbe1;
}



void Unwind_14021c680(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_14021c690(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_14021c6a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_14021c6b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_14021c6c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14021c6d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_14021c6e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_14021c6f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x110);
  return;
}



void Unwind_14021c700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x128);
  return;
}



void Unwind_14021c710(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xf0);
  return;
}



void Unwind_14021c720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_14021c730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_14021c740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x110);
  return;
}



void Unwind_14021c750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x128);
  return;
}



void Unwind_14021c760(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x300);
  return;
}



void Unwind_14021c770(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x340);
  return;
}



void Unwind_14021c780(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x400);
  return;
}



void Unwind_14021c790(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x3c0);
  return;
}



void Unwind_14021c7a0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x2c0);
  return;
}



void Unwind_14021c7b0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x280);
  return;
}



void Unwind_14021c7c0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x380);
  return;
}



void Unwind_14021c7d0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x480);
  return;
}



void Unwind_14021c7e0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x4c0);
  return;
}



void Unwind_14021c7f0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x440);
  return;
}



void Unwind_14021c800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021c810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x178);
  return;
}



void Unwind_14021c820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x178);
  return;
}



void Unwind_14021c830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x250);
  return;
}



void Unwind_14021c840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x268);
  return;
}



void Unwind_14021c850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x208);
  return;
}



void Unwind_14021c860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x238);
  return;
}



void Unwind_14021c870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x220);
  return;
}



void Unwind_14021c880(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1f0);
  return;
}



void Unwind_14021c890(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a8);
  return;
}



void Unwind_14021c8a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c0);
  return;
}



void Unwind_14021c8b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1d8);
  return;
}



void Unwind_14021c8c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x50);
  return;
}



void Unwind_14021c8d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x50);
  return;
}



void Unwind_14021c8e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x50);
  return;
}



undefined * Catch_14021c8f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(param_2 + 0x198);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  FUN_1400a69d0(*(undefined8 *)(param_2 + 0x170),uVar1,"DBLobbyWriteQueryStatistics.cpp",
                "CDBLobbyWriteQuery::DBReqStatistics_Auction",0x226,
                "dbo.up_read_all_auctionlist_statistics");
  *(undefined4 *)(param_2 + 0x34) = 0;
  return &DAT_14009bc8d;
}



undefined * Catch_14021c970(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(param_2 + 0x1a0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  FUN_1400a6790(*(undefined8 *)(param_2 + 0x170),plVar1,"DBLobbyWriteQueryStatistics.cpp",
                "CDBLobbyWriteQuery::DBReqStatistics_Auction",0x229,
                "dbo.up_read_all_auctionlist_statistics");
  *(undefined4 *)(param_2 + 0x34) = 0;
  return &DAT_14009bc8d;
}



void Unwind_14021c9f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14021ca00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_14021ca10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_14021ca20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf0);
  return;
}



void Unwind_14021ca30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x108);
  return;
}



void Unwind_14021ca40(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xd0);
  return;
}



void Unwind_14021ca50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_14021ca60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_14021ca70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf0);
  return;
}



void Unwind_14021ca80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x108);
  return;
}



void Unwind_14021ca90(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x380);
  return;
}



void Unwind_14021caa0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x340);
  return;
}



void Unwind_14021cab0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x3c0);
  return;
}



void Unwind_14021cac0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x300);
  return;
}



void Unwind_14021cad0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x2c0);
  return;
}



void Unwind_14021cae0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x280);
  return;
}



void Unwind_14021caf0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(param_2 + 0x400);
  return;
}



void Unwind_14021cb00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021cb10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x200);
  return;
}



void Unwind_14021cb20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 400);
  return;
}



void Unwind_14021cb30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x218);
  return;
}



void Unwind_14021cb40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x230);
  return;
}



void Unwind_14021cb50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x248);
  return;
}



void Unwind_14021cb60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x260);
  return;
}



void Unwind_14021cb70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x158);
  return;
}



void Unwind_14021cb80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1b0);
  return;
}



void Unwind_14021cb90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c8);
  return;
}



void Unwind_14021cba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1e8);
  return;
}



void Unwind_14021cbb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x178);
  return;
}



undefined * Catch_14021cbc0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(param_2 + 0x170);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  FUN_1400a69d0(*(undefined8 *)(param_2 + 0x150),uVar1,"DBLobbyWriteQueryStatistics.cpp",
                "CDBLobbyWriteQuery::DBReqStatistics_Item",0x1ad,
                "dbo.up_read_item_inventory_statistics");
  *(undefined4 *)(param_2 + 0x38) = 0;
  return &DAT_14009a5f0;
}



undefined * Catch_14021cc40(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(param_2 + 0x1a8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  FUN_1400a6790(*(undefined8 *)(param_2 + 0x150),plVar1,"DBLobbyWriteQueryStatistics.cpp",
                "CDBLobbyWriteQuery::DBReqStatistics_Item",0x1b0,
                "dbo.up_read_item_inventory_statistics");
  *(undefined4 *)(param_2 + 0x38) = 0;
  return &DAT_14009a5f0;
}



void Unwind_14021ccc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_14021ccd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_14021cce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021ccf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021ccf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14021cd00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021cd10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021cd20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14021cd30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021cd37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14021cd40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14021cd50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021cd60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cd70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cd80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021cd87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021cd90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cda0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021cdb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cdc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cdd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021cdd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021cde0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cdf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021ce00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ce10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ce20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021ce27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021ce30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ce40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021ce50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ce60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ce70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021ce77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021ce80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ce90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021cea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ceb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cec0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021cec7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021ced0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021cef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cf00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cf10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021cf17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021cf20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cf30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021cf40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cf50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cf60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021cf67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021cf70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021cf80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14021cf90(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetEatStatusUPdate"
                ,999,"dbo.up_update_pet_status");
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x118),1);
  return &DAT_140098cb5;
}



undefined * Catch_14021d030(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp",
                "CDBLobbyWriteQuery::DBReqPetEatStatusUPdate",0x3eb,"dbo.up_update_pet_status");
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x118),1);
  return &DAT_140098cb5;
}



void Unwind_14021d0d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14021d0e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14021d0f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021d100(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d107. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14021d110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14021d120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14021d140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14021d150(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d157. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14021d160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14021d170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d1a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d1a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14021d1b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d1c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d1d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d1e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d1f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d1f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14021d200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d240(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d247. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14021d250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d290(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d297. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14021d2a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d2b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d2c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d2d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d2e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d2e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14021d2f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d300(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d320(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d330(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d337. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14021d340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d350(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d380(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d387. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14021d390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d3a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d3b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d3c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d3d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d3d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14021d3e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021d3f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14021d400(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetStatusUpdate",
                0x3bb,"dbo.up_update_pet_stet");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14009803e;
}



undefined * Catch_14021d4a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x88);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetStatusUpdate",
                0x3bf,"dbo.up_update_pet_stet");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14009803e;
}



void Unwind_14021d540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14021d550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14021d560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021d570(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d577. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14021d580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14021d590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d5a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14021d5b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14021d5c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d5c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14021d5d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14021d5e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14021d5f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetTypeUpdate",
                0x38f,"dbo.up_update_pet_type");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140097341;
}



undefined * Catch_14021d690(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetTypeUpdate",
                0x393,"dbo.up_update_pet_type");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140097341;
}



void Unwind_14021d730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14021d740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14021d750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021d760(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d767. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021d770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14021d780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d790(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14021d7a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d7a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021d7b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14021d7c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d7d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021d7e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021d7f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d7f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14021d800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021d810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021d820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021d830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021d840(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d847. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14021d850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021d860(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14021d870(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetItemUpdate",
                0x36b,"dbo.up_pet_item_update");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140096f77;
}



undefined * Catch_14021d910(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetItemUpdate",
                0x36f,"dbo.up_pet_item_update");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140096f77;
}



void Unwind_14021d9b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14021d9c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14021d9d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021d9e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021d9e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021d9f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14021da00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021da10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14021da20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021da27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021da30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14021da40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14021da50(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp",
                "CDBLobbyWriteQuery::DBReqDeletePetInventoryItem",0x324,
                "dbo.up_delete_pet_inventory");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14009695b;
}



undefined * Catch_14021daf0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp",
                "CDBLobbyWriteQuery::DBReqDeletePetInventoryItem",0x328,
                "dbo.up_delete_pet_inventory");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14009695b;
}



void Unwind_14021db90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14021dba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14021dbb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021dbc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021dbc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021dbd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14021dbe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021dbf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14021dc00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021dc07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021dc10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14021dc20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021dc30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021dc40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021dc47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14021dc50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021dc60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021dc70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021dc80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021dc90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021dc97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14021dca0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021dcb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021dcc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021dcd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021dce0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021dce7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14021dcf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021dd00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14021dd10(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp",
                "CDBLobbyWriteQuery::DBReqMovePetInvetToInven",0x2fd,
                "dbo.up_item_move_pet_inventory_to_inventory");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400965b2;
}



undefined * Catch_14021ddb0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp",
                "CDBLobbyWriteQuery::DBReqMovePetInvetToInven",0x301,
                "dbo.up_item_move_pet_inventory_to_inventory");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400965b2;
}



void Unwind_14021de50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x218);
  return;
}



void Unwind_14021de60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14021de70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021de80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021de87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14021de90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021dea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_14021deb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021dec0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021dec7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_14021ded0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021dee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14021def0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021df00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021df10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021df17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xa0));
  return;
}



void Unwind_14021df20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021df30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xc0);
  return;
}



void Unwind_14021df40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021df50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021df60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021df67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14021df70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021df80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_14021df90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021dfa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021dfb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021dfb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14021dfc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021dfd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_14021dfe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021dff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021e000(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e007. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_14021e010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14021e020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 200);
  return;
}



undefined * Catch_14021e030(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x188);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x200);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp",
                "CDBLobbyWriteQuery::DBReqAddPetInventoryItem",0x24d,
                "dbo.up_create_pet_inventory_item");
  *(undefined4 *)(param_2 + 0x210) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x208),1);
  *(undefined2 *)(param_2 + 0x4c) = 0x98;
  return &DAT_140095435;
}



undefined * Catch_14021e0e0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x180);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x200);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp",
                "CDBLobbyWriteQuery::DBReqAddPetInventoryItem",0x252,
                "dbo.up_create_pet_inventory_item");
  *(undefined4 *)(param_2 + 0x210) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x208),1);
  *(undefined2 *)(param_2 + 0x4c) = 0x98;
  return &DAT_140095435;
}



void Unwind_14021e190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_14021e1a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_14021e1b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021e1c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e1c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021e1d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14021e1e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021e1f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14021e200(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e207. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021e210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14021e220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021e230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14021e240(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e247. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14021e250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14021e260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14021e270(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetNameUpdate",
                0x1ab,"dbo.up_update_pet_name");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_140094b1c;
}



undefined * Catch_14021e310(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xb0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetNameUpdate",
                0x1af,"dbo.up_update_pet_name");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_140094b1c;
}



void Unwind_14021e3b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14021e3c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14021e3d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021e3e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e3e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021e3f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14021e400(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021e410(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14021e420(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e427. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021e430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14021e440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021e450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021e460(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14021e470(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021e480(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e487. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14021e490(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021e4a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14021e4b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetExpUpdate",0x186
                ,"dbo.up_update_pet_exp");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140094663;
}



undefined * Catch_14021e550(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetExpUpdate",
                0x18a,"dbo.up_update_pet_exp");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140094663;
}



void Unwind_14021e5f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14021e600(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14021e610(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021e620(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e627. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021e630(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14021e640(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021e650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14021e660(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e667. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021e670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14021e680(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021e690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021e6a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021e6b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e6b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14021e6c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021e6d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021e6e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021e6f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14021e700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021e710(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e717. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14021e720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021e730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021e740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021e750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021e760(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e767. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14021e770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021e780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14021e790(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetLevelUpdate",
                0x161,"dbo.up_update_pet_level");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14009415b;
}



undefined * Catch_14021e830(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetLevelUpdate",
                0x165,"dbo.up_update_pet_level");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14009415b;
}



void Unwind_14021e8d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_14021e8e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_14021e8f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_14021e900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_14021e910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_14021e920(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x80);
  return;
}



void Unwind_14021e930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x148);
  return;
}



void Unwind_14021e940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_14021e950(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021e957. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x120));
  return;
}



void Unwind_14021e960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_14021e970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_14021e980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1e0);
  return;
}



void Unwind_14021e990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x210);
  return;
}



void Unwind_14021e9a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x360);
  return;
}



void Unwind_14021e9b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x240);
  return;
}



void Unwind_14021e9c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x450);
  return;
}



void Unwind_14021e9d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_14021e9e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x168);
  return;
}



void Unwind_14021e9f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x128);
  return;
}



void Unwind_14021ea00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x138);
  return;
}



void Unwind_14021ea10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x158);
  return;
}



void Unwind_14021ea20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x270);
  return;
}



void Unwind_14021ea30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x390);
  return;
}



void Unwind_14021ea40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2a0);
  return;
}



void Unwind_14021ea50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x420);
  return;
}



void Unwind_14021ea60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2d0);
  return;
}



void Unwind_14021ea70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3c0);
  return;
}



void Unwind_14021ea80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x300);
  return;
}



void Unwind_14021ea90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x480);
  return;
}



void Unwind_14021eaa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x330);
  return;
}



void Unwind_14021eab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3f0);
  return;
}



void Unwind_14021eac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1f8);
  return;
}



void Unwind_14021ead0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x228);
  return;
}



void Unwind_14021eae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 600);
  return;
}



void Unwind_14021eaf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x288);
  return;
}



void Unwind_14021eb00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2b8);
  return;
}



void Unwind_14021eb10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2e8);
  return;
}



void Unwind_14021eb20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x318);
  return;
}



void Unwind_14021eb30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x348);
  return;
}



void Unwind_14021eb40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x378);
  return;
}



void Unwind_14021eb50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3a8);
  return;
}



void Unwind_14021eb60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3d8);
  return;
}



void Unwind_14021eb70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x408);
  return;
}



void Unwind_14021eb80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x438);
  return;
}



undefined * Catch_14021eb90(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 400);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetRead",0x13a,
                "dbo.up_read_pet");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x118),1);
  return &DAT_1400938c8;
}



undefined * Catch_14021ec20(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x1d0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetRead",0x13e,
                "dbo.up_read_pet");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x118),1);
  return &DAT_1400938c8;
}



void Unwind_14021ecb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_14021ecc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_14021ecd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_14021ece0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_14021ecf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_14021ed00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_14021ed10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021ed20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021ed27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14021ed30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021ed40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021ed50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14021ed60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021ed67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14021ed70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14021ed80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021ed90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021eda0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021edb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021edb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021edc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021edd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021ede0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021edf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14021ee00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ee10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021ee17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021ee20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ee30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021ee40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ee50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ee60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021ee67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021ee70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ee80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021ee90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021eea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021eeb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021eeb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021eec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021eed0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021eee0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021eef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ef00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021ef07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021ef10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ef20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021ef30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ef40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ef50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021ef57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021ef60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ef70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021ef80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021ef90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021efa0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021efa7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021efb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021efc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021efd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021efe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021eff0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021eff7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f000(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f040(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f047. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f060(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f070(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f080(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f090(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f097. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f0a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f0b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f0c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f0d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f0e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f0e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f0f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f120(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f130(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f137. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f150(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f160(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f180(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f187. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f1a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f1b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f1c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f1d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f1d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f1e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f1f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f220(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f227. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f270(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f277. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f2a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f2b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f2c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f2c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f2d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f2e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f2f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f310(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f317. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f360(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f367. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f380(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f390(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f3a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f3b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f3b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f3c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f3d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f3e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f3f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f400(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f407. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f430(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f450(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f457. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f4a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f4a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f4b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f4c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14021f4d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetUpdate",0xc1,
                "dbo.up_update_pet");
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x118),1);
  return &DAT_1400927a3;
}



undefined * Catch_14021f570(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetUpdate",0xc5,
                "dbo.up_update_pet");
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x118),1);
  return &DAT_1400927a3;
}



void Unwind_14021f610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_14021f620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_14021f630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021f640(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f647. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14021f650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14021f660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14021f680(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f687. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14021f690(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14021f6a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f6b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f6c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f6c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f6d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f6e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f6f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f710(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f717. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f750(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f757. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f790(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f7a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f7a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f7b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f7c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f7d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f7e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f7f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f7f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f840(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f847. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f860(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f880(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f890(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f897. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f8a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f8b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f8c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f8d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f8e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f8e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f8f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f900(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f920(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f930(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f937. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f940(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f950(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f960(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f970(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f980(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f987. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f990(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f9a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021f9b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f9c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f9d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021f9d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021f9e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021f9f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021fa00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fa10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fa20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fa27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fa30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fa40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021fa50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fa60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fa70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fa77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fa80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fa90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021faa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fac0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fac7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021faf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fb00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fb10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fb17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fb20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fb30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021fb40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fb50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fb60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fb67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fb70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fb80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021fb90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fbb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fbb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fbc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fbd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021fbe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fbf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fc00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fc07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fc10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fc20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021fc30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fc40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fc50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fc57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fc60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fc70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021fc80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fc90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fcb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fcc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021fcd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fcf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fcf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fd00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fd10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021fd20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fd30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fd40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fd47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fd50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fd60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021fd70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fd80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fd90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fd97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fda0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fdb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14021fdc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fdd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14021fde0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fdf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021fdf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14021fe00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14021fe10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14021fe20(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetCreate",0x83,
                "dbo.up_create_pet");
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x118),1);
  return &DAT_1400907bc;
}



undefined * Catch_14021fec0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetCreate",0x87,
                "dbo.up_create_pet");
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x118),1);
  return &DAT_1400907bc;
}



void Unwind_14021ff60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14021ff70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14021ff80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14021ff90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014021ff97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14021ffa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14021ffb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14021ffc0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetDel",0x44,
                "dbo.up_delete_pet");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_14008e6f8;
}



undefined * Catch_140220060(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqPetDel",0x48,
                "dbo.up_delete_pet");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_14008e6f8;
}



void Unwind_140220100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140220110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140220120(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140220130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140220140(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220147. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140220150(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140220160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140220180(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220187. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140220190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402201a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402201b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402201c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402201d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402201d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402201e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402201f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220220(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220227. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140220230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220270(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220277. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140220280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402202a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402202b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402202c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402202c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402202d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402202e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402202f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220310(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220317. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140220320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220350(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220357. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140220360(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220390(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220397. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402203a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402203b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402203c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogSkill.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_LearnSkill",0x75,"dbo.up_insert_log_learnskill");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14008e480;
}



undefined * Catch_140220460(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogSkill.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_LearnSkill",0x79,"dbo.up_insert_log_learnskill");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14008e480;
}



void Unwind_140220500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140220510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140220520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140220530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140220540(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220547. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140220550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140220560(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140220580(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140220590(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220597. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_1402205a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402205b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402205c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402205d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402205d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402205e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402205f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220600(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220610(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220620(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220627. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140220630(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220640(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220660(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220667. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140220670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220680(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402206a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402206a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402206b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402206c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402206d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402206e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402206e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402206f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220730(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220737. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140220740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220770(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220780(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220787. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140220790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402207a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402207b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402207c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402207d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402207d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402207e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402207f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220820(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220827. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140220830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220870(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220877. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140220880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402208a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402208b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402208c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402208c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402208d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402208e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402208f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogQuest.cpp","CDBLobbyWriteQuery::DBReqLOG_QUEST",
                0x51,"dbo.up_insert_log_quest");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14008d883;
}



undefined * Catch_140220990(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogQuest.cpp","CDBLobbyWriteQuery::DBReqLOG_QUEST",
                0x55,"dbo.up_insert_log_quest");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14008d883;
}



void Unwind_140220a30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140220a40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140220a50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140220a60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140220a70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220a77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140220a80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140220a90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220aa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140220ab0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220ab7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140220ac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140220ad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220ae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220af0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220af7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140220b00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220b10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220b20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220b30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220b37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140220b40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220b50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220b60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220b70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220b80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220b87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140220b90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220ba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220bb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220bc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220bd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220bd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140220be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220bf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220c00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220c10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220c20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220c27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140220c30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220c40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220c50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220c60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220c67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140220c70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220c90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220ca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220ca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140220cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220cd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220ce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220cf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220cf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140220d00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220d10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220d20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220d30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220d40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220d47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140220d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220d70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220d80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220d90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220d97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140220da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220db0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140220dc0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogPVP.cpp","CDBLobbyWriteQuery::DBReqLOG_PVP_DEATH",
                0xf7,"dbo.up_insert_log_pvp_death");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14008c818;
}



undefined * Catch_140220e60(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogPVP.cpp","CDBLobbyWriteQuery::DBReqLOG_PVP_DEATH",
                0xfb,"dbo.up_insert_log_pvp_death");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14008c818;
}



void Unwind_140220f00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140220f10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140220f20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140220f30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140220f40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220f47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140220f50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140220f60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220f70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140220f80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220f87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140220f90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140220fa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220fc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140220fc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140220fd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140220fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140220ff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221000(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221007. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140221010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221040(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221047. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140221050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221060(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221070(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221080(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221090(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221097. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402210a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402210b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402210c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402210d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402210e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402210e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402210f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221120(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221130(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221137. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140221140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221150(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221160(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221170(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221177. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140221180(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402211a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402211b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402211c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402211c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402211d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402211e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402211f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221210(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221217. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140221220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221260(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221267. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140221270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402212a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402212b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402212b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402212c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402212d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402212e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402212f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221300(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221307. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140221310(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221330(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221350(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221357. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140221360(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221390(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402213a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402213a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402213b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402213c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402213d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402213e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402213f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402213f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140221400(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221420(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221430(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221440(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221447. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140221450(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221470(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221490(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221497. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402214a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402214b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402214c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402214d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402214e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402214e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402214f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221530(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221537. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140221540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221580(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221587. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140221590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402215a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402215b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402215c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402215d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402215d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402215e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402215f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140221600(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogPVP.cpp","CDBLobbyWriteQuery::DBReqLOG_PVP_RESULT",
                200,"dbo.up_insert_log_pvp_result");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14008b8fe;
}



undefined * Catch_1402216a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogPVP.cpp","CDBLobbyWriteQuery::DBReqLOG_PVP_RESULT"
                ,0xcc,"dbo.up_insert_log_pvp_result");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14008b8fe;
}



void Unwind_140221740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140221750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140221760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140221770(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140221780(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221787. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140221790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402217a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402217b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402217c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402217c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402217d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402217e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402217f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221800(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221807. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221840(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221847. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221860(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221880(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221887. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402218a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402218b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402218c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402218d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402218d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402218e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402218f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221920(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221927. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221940(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221960(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221970(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221977. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221980(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221990(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402219a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402219b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402219b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402219c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402219d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402219e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402219f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221a00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221a07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221a10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221a20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221a30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221a40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221a50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221a57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221a60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221a80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221a90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221a97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221aa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221ab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221ac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221ad0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221ad7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221ae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221af0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221b00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221b10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221b17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221b20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221b30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221b40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221b50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221b57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221b60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221b70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221b80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221b90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221b97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221ba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221bb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221bc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221bd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221bd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221bf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221c00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221c10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221c20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221c27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221c30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221c40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221c50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221c60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221c70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221c77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221c90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221ca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221cb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221cb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221cd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221ce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221cf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221cf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221d00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221d10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221d20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221d30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221d37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221d40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221d60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221d70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221d77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221d80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221d90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221da0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221db0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221db7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221dc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221dd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221de0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221df0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221df7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221e00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221e10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221e20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221e30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221e40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221e47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221e50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221e60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221e80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221e90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221e97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221eb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221ed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221ee0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221ee7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221ef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221f00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221f10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221f20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221f30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221f37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221f40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221f50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221f60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221f70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221f77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221f80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221f90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221fa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221fc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140221fc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140221fd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140221fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140221ff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222010(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222017. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140222020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140222040(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogPVP.cpp","CDBLobbyWriteQuery::DBReqLOG_PVP_BATTLE",
                0x8e,"dbo.up_insert_log_pvp_battle");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_140089ca9;
}



undefined * Catch_1402220e0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogPVP.cpp","CDBLobbyWriteQuery::DBReqLOG_PVP_BATTLE"
                ,0x92,"dbo.up_insert_log_pvp_battle");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_140089ca9;
}



void Unwind_140222180(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140222190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_1402221a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402221b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402221c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402221c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402221d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402221e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402221f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140222200(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222207. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140222210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140222220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222240(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222247. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140222250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222280(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222287. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140222290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402222a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402222b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402222c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402222d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402222d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402222e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402222f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222310(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222317. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140222320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222360(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222367. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140222370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222380(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222390(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402223a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_1402223b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402223c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402223c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402223d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402223e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402223f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222400(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222407. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140222410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140222430(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogPVP.cpp","CDBLobbyWriteQuery::DBReqLOG_PVP_ROOM",
                0x4b,"dbo.up_insert_log_pvp_room");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_140087684;
}



undefined * Catch_1402224d0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogPVP.cpp","CDBLobbyWriteQuery::DBReqLOG_PVP_ROOM",
                0x4f,"dbo.up_insert_log_pvp_room");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_140087684;
}



void Unwind_140222570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140222580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140222590(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402225a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402225b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402225b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402225c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402225d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402225e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402225f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402225f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140222600(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140222610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222630(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222637. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140222640(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}


undefined DAT_140086a8b;
undefined DAT_14008647a;
undefined DAT_140085bf4;
undefined DAT_1400851d0;
undefined DAT_140084823;
undefined DAT_1400840cc;
undefined DAT_140082e99;
undefined DAT_14008058a;
undefined DAT_14007f533;
undefined DAT_14007cdf7;
undefined DAT_14007c125;
undefined DAT_14007b8dc;
undefined DAT_14007a875;
undefined DAT_140077361;
undefined DAT_140074627;
undefined DAT_14007274d;
undefined DAT_1400718ca;
undefined DAT_14006ed62;
undefined DAT_14006e190;
undefined DAT_14006d226;
undefined DAT_14006b419;
undefined DAT_14006a8bf;
undefined DAT_140069ac7;
undefined DAT_14006858b;
undefined DAT_1400672b2;
undefined DAT_1400667bb;
undefined DAT_140065957;
undefined DAT_140061eed;
undefined DAT_1400611ec;
undefined DAT_140060ad8;
undefined DAT_14006083c;
undefined DAT_14011b824;
undefined DAT_14011b2cf;
undefined DAT_14011a889;
undefined DAT_140119e81;
undefined DAT_14011990f;
undefined DAT_1401192b7;
undefined DAT_140118bc2;
undefined DAT_14011880d;
undefined DAT_140117ff8;
undefined DAT_140117d78;
undefined DAT_140117afd;
undefined DAT_140116aa5;
undefined DAT_14011640c;
undefined DAT_140115790;
undefined DAT_140114faf;
undefined DAT_1401149f3;
undefined DAT_140113308;
undefined DAT_14011308b;
undefined DAT_140112bca;
undefined DAT_14011232a;
undefined DAT_140111b9b;
undefined DAT_1401117f2;
undefined DAT_1401110bc;
undefined DAT_140110d13;
undefined DAT_140110924;
undefined DAT_140110624;
undefined DAT_1401101ee;
undefined DAT_14010f8d2;
undefined DAT_14010f058;
undefined DAT_14010edd6;
undefined DAT_14010e708;
undefined DAT_14010de3f;
undefined DAT_14010d70e;
undefined DAT_14010cd7c;
undefined DAT_14010c9af;
undefined DAT_14010bc0f;
undefined DAT_14010b072;
undefined DAT_14010a93b;
undefined DAT_14010a588;
undefined DAT_14010a2fa;
undefined DAT_140109537;
undefined DAT_140108e8c;
undefined DAT_140108098;
undefined DAT_140107ced;
undefined DAT_140106c18;
undefined DAT_140105a44;
undefined DAT_140104992;
undefined DAT_1401045e8;
undefined DAT_140104245;
undefined DAT_140103135;
undefined DAT_140101368;
undefined DAT_1401010f3;
undefined DAT_1401008ff;
undefined DAT_1400ffc34;
undefined DAT_1400fecf2;
undefined DAT_1400fe940;
undefined DAT_1400fe598;
undefined DAT_1400fd3eb;
undefined DAT_1400fd03f;
undefined DAT_1400fc8b4;
undefined DAT_1400fc1bb;
undefined DAT_1400fbdc5;
undefined DAT_1400fb5ea;
undefined DAT_1400fa708;
undefined DAT_1400fa3bb;
undefined DAT_1400f94b7;
undefined DAT_1400f8897;
undefined DAT_1400f83b4;
undefined DAT_1400f7c74;
undefined DAT_1400f7534;
undefined DAT_1400f6df4;
undefined DAT_1400f66c2;
undefined DAT_1400f5e58;
undefined DAT_1400f5bdc;
undefined DAT_1400f5817;
undefined DAT_1400f4c54;
undefined DAT_1400f4514;
undefined DAT_1400f3dd7;
undefined DAT_1400f390b;
undefined DAT_1400f3515;
undefined DAT_1400f2aea;
undefined DAT_1400f2391;
undefined DAT_1400ef734;
undefined DAT_1400eec74;
undefined DAT_1400ee239;
undefined DAT_1400edc42;
undefined DAT_1400ed50c;
undefined DAT_1400ecc84;
undefined DAT_1400ec67c;
undefined DAT_1400ebd8c;
undefined DAT_1400eb67f;
undefined DAT_1400eb08b;
undefined DAT_1400eace1;
undefined DAT_1400ea336;
undefined DAT_1400e9e56;
undefined DAT_1400e9980;
undefined DAT_1400e86db;
undefined DAT_1400e76dc;
undefined DAT_1400e6d3b;
undefined DAT_1400e5e8f;
undefined DAT_1400e558e;
undefined DAT_1400e48c1;
undefined DAT_1400e4053;
undefined DAT_1400e2f64;
undefined DAT_1400e2525;
undefined DAT_1400e2111;
undefined DAT_1400e1d71;
undefined DAT_1400e19c9;
undefined DAT_1400e14de;
undefined DAT_1400e0fd2;
undefined DAT_1400e0a0a;
undefined DAT_1400dfa5a;
undefined DAT_1400de980;
undefined DAT_1400dda17;
undefined DAT_1400dc95d;
undefined DAT_1400dc2cb;
undefined DAT_1400dbdbb;
undefined DAT_1400db6fb;
undefined DAT_1400db228;
undefined DAT_1400d98f9;
undefined DAT_1400d8f5f;
undefined DAT_1400d872b;
undefined DAT_1400d7b0b;
undefined DAT_1400d759b;
undefined DAT_1400d6dab;
undefined DAT_1400d69fb;
undefined DAT_1400d6530;
undefined DAT_1400d5ea2;
undefined DAT_1400d5951;
undefined DAT_1400d54bb;
undefined DAT_1400d5005;
undefined DAT_1400d49ff;
undefined DAT_1400d3847;
undefined DAT_1400d2c71;
undefined DAT_1400d27a5;
undefined DAT_1400d21b2;
undefined DAT_1400d1c2e;
undefined DAT_1400cfec7;
undefined DAT_1400cf8d7;
undefined DAT_1400ceecb;
undefined DAT_1400ce9a4;
undefined DAT_1400ce1b7;
undefined DAT_1400cdcdd;
undefined DAT_1400cd6bd;
undefined DAT_1400cd0b1;
undefined DAT_1400ccb8d;
undefined DAT_1400cc246;
undefined DAT_1400cb2d8;
undefined DAT_1400cb061;
undefined DAT_1400caca2;
undefined DAT_1400ca7c8;
undefined DAT_1400ca424;
undefined DAT_1400c8ef3;
undefined DAT_1400c8296;
undefined DAT_1400c7edf;
undefined DAT_1400c7510;
undefined DAT_1400c6dfc;
undefined DAT_1400c5b91;
undefined DAT_1400c56db;
undefined DAT_1400c5328;
undefined DAT_1400c50a8;
undefined DAT_1400c3496;
undefined DAT_1400c116a;
undefined DAT_1400bfe6b;
undefined DAT_1400bfabb;
undefined DAT_1400bf70b;
undefined DAT_1400bf35b;
undefined DAT_1400befab;
undefined DAT_1400bebfb;
undefined DAT_1400be84b;
undefined DAT_1400be49b;
undefined DAT_1400be0e8;
undefined DAT_1400bde6b;
undefined DAT_1400bdab4;
undefined DAT_1400bd3a7;
undefined DAT_1400bcad1;
undefined DAT_1400bc711;
undefined DAT_1400bc351;
undefined DAT_1400bbf91;
undefined DAT_1400bbbd1;
undefined DAT_1400bb811;
undefined DAT_1400bb453;
undefined DAT_1400baaaf;
undefined DAT_1400ba124;
undefined DAT_1400b9c1b;
undefined DAT_1400b9867;
undefined DAT_1400b939b;
undefined DAT_1400b8feb;
undefined DAT_1400b8c37;
undefined DAT_1400b89c8;
undefined DAT_1400b874b;
undefined DAT_1400b8399;
undefined DAT_1400b7ecc;
undefined DAT_1400b7b15;
undefined DAT_1400b761c;
undefined DAT_1400b726b;
undefined DAT_1400b6eb8;
undefined DAT_1400b6c37;
undefined DAT_1400b676f;
undefined DAT_1400b6116;
undefined DAT_1400b55e8;
undefined DAT_1400b520b;
undefined DAT_1400b4e58;
undefined DAT_1400b4bd7;
undefined DAT_1400b470b;
undefined DAT_1400b4358;
undefined DAT_1400b40d4;
undefined DAT_1400b3738;
undefined DAT_1400b3358;
undefined DAT_1400b2fa0;
undefined DAT_1400b2281;
undefined DAT_1400afe91;
undefined DAT_1400af333;
undefined DAT_1400ad3a3;
undefined DAT_1400ab4b8;
undefined DAT_1400aaf15;
undefined DAT_1400a8efc;
undefined DAT_1400a8b41;
undefined DAT_1400a8738;
undefined DAT_1400a84bc;
undefined DAT_1400a7ffb;
undefined DAT_1400a7ac5;
undefined DAT_140095ce5;
undefined DAT_14005d16f;
undefined DAT_1400faf75;
undefined DAT_1400f149a;
undefined DAT_1400f0aea;
undefined DAT_1400f0136;
undefined DAT_1400e90ec;
undefined DAT_14032f0e8;
undefined DAT_14032f168;
undefined FUN_140257b30;
undefined LAB_140257b90;
undefined DAT_140379248;
undefined FUN_140257ba0;
undefined FUN_140257be0;
undefined FUN_140257c20;
undefined8 DAT_140327950;
undefined FUN_140257c60;
undefined FUN_140257d80;
undefined LAB_140257dc0;
undefined LAB_140257dd0;
undefined LAB_140257df0;
undefined DAT_140328478;
undefined LAB_140257de0;
undefined DAT_140328440;
undefined LAB_140257e80;
undefined LAB_140257e70;
undefined DAT_140328750;
undefined LAB_140257ed0;
undefined LAB_140257eb0;
undefined LAB_140257ea0;
undefined LAB_140257f70;
undefined LAB_140257f80;
undefined LAB_140257f90;
undefined LAB_140257fc0;
undefined LAB_140258000;
undefined LAB_140258010;
undefined LAB_140258050;
undefined FUN_140258070;
undefined LAB_1402580e0;
undefined LAB_140258100;
undefined DAT_14032a180;
undefined LAB_140258150;
undefined LAB_140258190;
undefined8 DAT_14032e3e0;
undefined LAB_1402581a0;
undefined DAT_14032e3e8;
undefined DAT_14032e658;
undefined LAB_1402581c0;
undefined1 DAT_14032e6f0;
undefined DAT_14032e6e0;
HANDLE DAT_14032e6e8;
undefined FUN_1402581cc;
FILE *DAT_14032f060;
undefined DAT_1403278d8;
undefined DAT_1403278e8;
undefined DAT_140327910;
undefined DAT_140327901;
undefined DAT_140327928;
undefined DAT_140327938;
ulonglong DAT_140327968;
undefined DAT_140327950;
undefined DAT_140327960;
void *DAT_14032f1a0;
undefined DAT_14032f1a8;
undefined DAT_14032f1b0;
void *DAT_14032f1c0;
undefined DAT_14032f1c8;
undefined DAT_14032f1d0;
void *DAT_14032f1e0;
undefined DAT_14032f1e8;
undefined DAT_14032f1f0;
longlong DAT_1403284e8;
longlong DAT_1403288c8;
undefined8 *DAT_140329398;
longlong *DAT_1403293e0;
undefined *PTR_vftable_140321570;
void *DAT_14032a030;
undefined DAT_14032b1f0;
undefined *PTR_vftable_1403221b0;
char DAT_14032e6f0;
undefined DAT_140322388;

void Unwind_140222650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222660(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140222680(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222687. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140222690(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402226a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402226b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogMonitor.cpp","CDBLobbyWriteQuery::DBReqLOG_CASH",
                0x11c,"dbo.up_insert_log_cash_info");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_140086a8b;
}



undefined * Catch_140222750(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogMonitor.cpp","CDBLobbyWriteQuery::DBReqLOG_CASH",
                0x120,"dbo.up_insert_log_cash_info");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_140086a8b;
}



void Unwind_1402227f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140222800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140222810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140222820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140222830(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222837. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140222840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140222850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140222870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140222880(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222887. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140222890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_1402228a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402228b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402228c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402228d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402228d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402228e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402228f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222910(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222917. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140222920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222960(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222967. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140222970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222980(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402229a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402229b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402229b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402229c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402229d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402229e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x78);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogMonitor.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_MONITOR_COMMAND",0xf5,
                "dbo.up_insert_log_monitor_command");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_14008647a;
}



undefined * Catch_140222a80(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogMonitor.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_MONITOR_COMMAND",0xf9,
                "dbo.up_insert_log_monitor_command");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_14008647a;
}



void Unwind_140222b20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140222b30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140222b40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140222b50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140222b60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222b67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140222b70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140222b80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140222b90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140222ba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140222bb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222bb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140222bc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140222bd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140222be0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222bf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222c00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222c07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140222c10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222c20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140222c30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222c40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222c50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222c57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140222c60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222c70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140222c80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222c90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222ca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222ca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140222cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140222cd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222ce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222cf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222cf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140222d00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222d10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140222d20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222d30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222d40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222d47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140222d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



undefined * Catch_140222d70(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x78);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogMonitor.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_MONITOR_USER",0xcc,"dbo.up_insert_log_monitor_user");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140085bf4;
}



undefined * Catch_140222e10(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogMonitor.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_MONITOR_USER",0xd0,"dbo.up_insert_log_monitor_user");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140085bf4;
}



void Unwind_140222eb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140222ec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140222ed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140222ee0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140222ef0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222ef7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140222f00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140222f10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222f20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140222f30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140222f40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222f47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140222f50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140222f60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222f70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222f80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222f90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222f97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140222fa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222fb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140222fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222fd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140222fe0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140222fe7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140222ff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140223000(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140223020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140223030(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223037. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140223040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140223050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140223070(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223077. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140223080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140223090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402230a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402230b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402230b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402230c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402230d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402230e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x78);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogMonitor.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_MONITOR_NOTICE",0xa2,
                "dbo.up_insert_log_monitor_notice");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400851d0;
}



undefined * Catch_140223180(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogMonitor.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_MONITOR_NOTICE",0xa6,
                "dbo.up_insert_log_monitor_notice");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400851d0;
}



void Unwind_140223220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140223230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140223240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140223250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140223260(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223267. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140223270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140223280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402232a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x78);
  return;
}



void Unwind_1402232b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402232c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402232c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402232d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402232e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402232f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223310(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223317. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140223320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223350(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223357. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140223360(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223390(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223397. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402233a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402233b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402233c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x90);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogMonitor.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_INQUIRY_CHATTING",0x78,
                "dbo.up_insert_log_inquiry_chatting");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_140084823;
}



undefined * Catch_140223460(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogMonitor.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_INQUIRY_CHATTING",0x7c,
                "dbo.up_insert_log_inquiry_chatting");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_140084823;
}



void Unwind_140223500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140223510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_140223520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140223530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x78);
  return;
}



void Unwind_140223540(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140223550(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223557. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223560(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140223570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223580(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140223590(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_1402235a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402235a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402235b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_1402235c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402235d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402235e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402235f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402235f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140223600(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223640(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223647. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140223650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223690(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223697. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402236a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402236b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402236c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402236d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402236d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402236e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402236f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223710(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223717. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140223720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223750(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223757. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140223760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223790(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223797. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402237a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402237b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402237c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402237d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402237e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402237e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402237f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223820(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223827. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140223830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223860(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223867. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140223870(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223890(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402238a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402238b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402238b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402238c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402238d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402238e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402238f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223900(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223907. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140223910(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140223930(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x90);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogMonitor.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_INQUIRY_COMPLETE",0x50,
                "dbo.up_insert_log_inquiry_complete");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400840cc;
}



undefined * Catch_1402239d0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogMonitor.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_INQUIRY_COMPLETE",0x54,
                "dbo.up_insert_log_inquiry_complete");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400840cc;
}



void Unwind_140223a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140223a80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140223a90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140223aa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140223ab0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223ab7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140223ac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140223ad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223ae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140223af0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140223b00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223b07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140223b10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140223b20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223b30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223b40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223b47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223b50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223b60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223b70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223b80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223b87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223b90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223ba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223bb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223bc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223bc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223bd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223bf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223c00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223c07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223c10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223c20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223c30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223c40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223c50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223c57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223c60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223c70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223c80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223c90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223ca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223ca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223cd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223ce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223cf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223cf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223d00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223d10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223d20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223d30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223d40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223d47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223d70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223d80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223d90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223d97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223db0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223dc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223dd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223de0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223de7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223df0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223e00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223e20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223e30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223e37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223e50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223e80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223e87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223ed0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223ed7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223ef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223f10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223f20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223f27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223f30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223f40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223f60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223f70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223f77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223f80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223f90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223fa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223fc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140223fc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140223fd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140223fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140223ff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224010(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224017. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224060(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224067. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224090(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402240a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402240b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402240b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402240c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402240d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402240e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402240f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224100(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224107. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224150(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224157. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402241a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402241a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402241b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402241c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402241d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402241e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402241f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402241f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224240(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224247. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224290(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224297. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402242a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402242b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402242c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402242d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402242e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402242e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402242f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224300(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224320(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224330(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224337. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224350(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224380(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224387. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402243a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402243b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402243c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402243d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402243d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402243e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402243f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224410(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224420(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224427. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224460(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224467. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402244a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402244b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402244b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402244c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402244d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402244e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogMail.cpp","CDBLobbyWriteQuery::DBReqLOG_ITEMMAIL",
                0x95,"dbo.up_insert_log_itemmail");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140082e99;
}



undefined * Catch_140224580(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogMail.cpp","CDBLobbyWriteQuery::DBReqLOG_ITEMMAIL",
                0x99,"dbo.up_insert_log_itemmail");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140082e99;
}



void Unwind_140224620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140224630(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140224640(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140224650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140224660(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224667. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140224670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140224680(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402246a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402246b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402246b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402246c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402246d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402246e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402246f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402246f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140224700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224710(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224730(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224740(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224747. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140224750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224770(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224790(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224797. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402247a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402247b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402247c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402247d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402247d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402247e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402247f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224810(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224817. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140224820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224850(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224857. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140224860(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224870(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224880(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224890(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224897. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402248a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402248b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402248c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402248d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402248d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402248e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402248f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224910(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224917. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140224920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224960(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224967. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140224970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224980(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402249a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402249b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402249b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402249c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402249d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402249e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogMail.cpp","CDBLobbyWriteQuery::DBReqLOG_Mail",0x50,
                "dbo.up_insert_log_mail");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14008058a;
}



undefined * Catch_140224a80(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogMail.cpp","CDBLobbyWriteQuery::DBReqLOG_Mail",0x54
                ,"dbo.up_insert_log_mail");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14008058a;
}



void Unwind_140224b20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1d8);
  return;
}



void Unwind_140224b30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1d0);
  return;
}



void Unwind_140224b40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140224b50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140224b60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224b67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140224b70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140224b80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224b90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140224ba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140224bb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224bb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140224bc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140224bd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224be0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224bf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224bf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224c00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224c10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224c20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224c30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224c37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224c40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224c50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224c60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224c70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224c77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224c90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224ca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224cb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224cb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224cd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224ce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224cf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224d00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224d07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224d10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224d20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224d30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224d40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224d47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224d70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224d80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224d90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224d97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224db0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224dc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224dd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224de0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224de7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224df0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224e00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224e20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224e30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224e37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224e50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224e80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224e87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224ed0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224ed7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224ef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224f10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224f20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224f27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224f30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224f40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224f60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224f70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224f77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224f80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224f90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224fa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224fc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140224fc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140224fd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140224fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140224ff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225010(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225017. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140225020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225060(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225067. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140225070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225090(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402250a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402250b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402250b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402250c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402250d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402250e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402250f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225100(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225107. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140225110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225150(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225157. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140225160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402251a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402251a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402251b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402251c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402251d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402251e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402251f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402251f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140225200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225240(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225247. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140225250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225290(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225297. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402252a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402252b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402252c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402252d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402252e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402252e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402252f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225300(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225320(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225330(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225337. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140225340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225350(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225380(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225387. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140225390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402253a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402253b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402253c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402253d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402253d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402253e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402253f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225410(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225420(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225427. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140225430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225460(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225470(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225477. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140225480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225490(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402254a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402254b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402254c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402254c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402254d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402254e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402254f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1c0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogItem.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_GuildStorageItem",0x23a,
                "dbo.up_insert_log_guild_storage_items");
  *(undefined4 *)(param_2 + 0x1c0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x1c8),1);
  return &DAT_14007f533;
}



undefined * Catch_140225590(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1c0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogItem.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_GuildStorageItem",0x23e,
                "dbo.up_insert_log_guild_storage_items");
  *(undefined4 *)(param_2 + 0x1c0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x1c8),1);
  return &DAT_14007f533;
}



void Unwind_140225630(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140225640(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140225650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140225660(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140225670(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225677. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140225680(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140225690(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402256a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402256b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402256c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402256c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402256d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402256e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402256f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225700(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225707. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140225710(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225730(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225740(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225747. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140225750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225770(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225780(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225787. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140225790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402257a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402257b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402257c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402257c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402257d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402257e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402257f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225810(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225817. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140225820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225860(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225867. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140225870(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225890(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402258a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402258b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402258b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402258c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402258d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402258e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402258f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402258f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140225900(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225910(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140225920(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_Inquiry",
                0x1f7,"dbo.up_insert_log_inquiry");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14007cdf7;
}



undefined * Catch_1402259c0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_Inquiry",
                0x1fb,"dbo.up_insert_log_inquiry");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14007cdf7;
}



void Unwind_140225a60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_140225a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_140225a80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140225a90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140225aa0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225aa7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140225ab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140225ac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225ad0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140225ae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140225af0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225af7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140225b00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140225b10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225b20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225b30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225b40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225b47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140225b50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225b60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225b70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225b80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225b90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225b97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140225ba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225bb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225bc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225bd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225be0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225be7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140225bf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225c00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225c10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225c20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225c30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225c37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140225c40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225c50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140225c60(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x78);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_PvpLadder",
                0x1c8,"dbo.up_insert_log_pvp_ladder");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_14007c125;
}



undefined * Catch_140225d00(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_PvpLadder"
                ,0x1cc,"dbo.up_insert_log_pvp_ladder");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_14007c125;
}



void Unwind_140225da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140225db0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140225dc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140225dd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140225de0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225de7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140225df0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140225e00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140225e20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140225e30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225e37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140225e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140225e50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225e80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225e87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140225e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225ec0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225ec7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140225ed0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225ef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225f00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225f07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140225f10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225f20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225f30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225f40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225f47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140225f50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225f60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225f70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225f80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225f87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140225f90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225fa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140225fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225fd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140225fd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140225fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140225ff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140226000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226020(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226027. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140226030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140226050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226070(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226077. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140226080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402260a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402260b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402260c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402260c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402260d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402260e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402260f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226100(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226110(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226117. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140226120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140226140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226160(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226167. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140226170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226180(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140226190(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_Account",
                0x19f,"dbo.up_insert_log_Account");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14007b8dc;
}



undefined * Catch_140226230(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_Account",
                0x1a3,"dbo.up_insert_log_Account");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14007b8dc;
}



void Unwind_1402262d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_1402262e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_1402262f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140226310(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226317. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140226320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140226330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140226350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140226360(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226367. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140226370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140226380(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226390(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402263a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402263a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402263b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402263c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402263d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402263e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402263e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402263f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226400(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226410(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226420(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226427. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226460(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226467. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402264a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402264a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402264b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402264c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402264d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402264e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402264e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402264f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226530(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226537. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226580(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226587. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402265a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402265b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402265c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_1402265d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402265e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402265e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402265f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226600(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226610(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226630(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226637. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226640(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226660(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226680(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226687. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226690(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402266a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402266b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402266c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402266d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402266d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402266e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402266f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226720(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226727. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226770(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226777. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402267a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402267b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402267c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402267c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402267d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402267e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402267f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226810(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226817. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226860(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226867. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226870(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226890(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402268a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402268b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402268b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402268c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402268d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402268e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402268f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226900(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226907. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226910(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226930(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226950(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226957. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402269a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402269a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402269b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402269c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402269d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402269e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402269f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402269f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226a00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226a10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226a20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226a30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226a40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226a47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226a50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226a60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226a70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226a80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226a90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226a97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226aa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226ab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226ac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226ad0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226ae0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226ae7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226af0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226b00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226b10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226b20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226b30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226b37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226b40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226b50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226b60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226b70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226b80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226b87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226b90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226ba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226bb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226bc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226bd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226bd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226bf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226c00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226c10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226c20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226c27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226c30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226c40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226c50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226c60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226c70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226c77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226c90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226ca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226cb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226cc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226cc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226cd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226ce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226cf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226d00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226d10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226d17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226d20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226d30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226d40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226d50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226d60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226d67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226d70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226d80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226d90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226da0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226db0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226db7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226dc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226dd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226de0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226df0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226e00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226e07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226e10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226e20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226e30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226e40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226e50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226e57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226e60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226e70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226e80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226e90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226ea0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226ea7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226eb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226ec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226ed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226ee0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226ef0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226ef7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226f00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226f10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226f20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226f30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226f40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140226f47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140226f50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140226f60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140226f70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140226f80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140226f90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140226fa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140226fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140226fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140226fd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140226fe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140226ff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140227000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140227010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140227020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140227030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140227040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140227050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140227060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



undefined * Catch_140227070(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_Pet",0x170,
                "dbo.up_insert_log_pet");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_14007a875;
}



undefined * Catch_140227110(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_Pet",0x174
                ,"dbo.up_insert_log_pet");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_14007a875;
}



void Unwind_1402271b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_1402271c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_1402271d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402271e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402271f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402271f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140227200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140227210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140227230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140227240(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227247. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140227250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140227260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227280(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227287. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402272a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402272b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402272c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402272c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402272d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402272e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402272f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227300(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227307. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227310(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227330(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227340(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227347. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227350(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227360(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227380(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227387. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402273a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402273b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402273c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402273c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402273d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402273e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402273f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227400(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227407. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227430(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227440(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227447. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227450(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227470(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227480(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227487. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227490(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402274a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402274b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402274c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402274d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402274d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402274e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402274f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227500(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227520(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227527. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227570(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227577. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402275a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402275b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402275c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402275c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402275d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402275e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402275f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227600(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227610(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227617. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227630(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227640(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227660(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227667. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227680(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402276a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402276b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402276b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402276c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402276d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402276e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402276f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227700(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227707. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227710(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227730(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227750(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227757. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227790(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402277a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402277a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402277b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402277c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402277d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402277e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402277f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402277f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227840(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227847. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227860(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227880(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227890(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227897. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402278a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402278b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402278c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402278d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402278e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402278e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402278f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227900(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227920(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227930(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227937. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227940(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227950(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227960(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227970(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227980(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227987. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227990(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402279a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402279b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402279c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402279d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402279d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402279e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402279f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227a00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227a10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227a20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227a27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227a30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227a40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227a50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227a60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227a70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227a77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227a80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227a90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227aa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227ab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227ac0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227ac7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227ad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227ae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227af0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227b00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227b10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227b17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227b20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227b30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227b40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227b50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227b60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227b67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227b70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227b80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227b90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227ba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140227bb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227bc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227bc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227bd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227bf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227c00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140227c10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227c20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227c27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227c30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227c40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227c50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227c60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140227c70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227c80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227c87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227c90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227ca0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227cb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227cc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227cd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227cd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227ce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227cf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140227d00(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_ITEMTRADE",
                0x11c,"dbo.up_insert_log_itemtrade");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140077361;
}



undefined * Catch_140227da0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_ITEMTRADE"
                ,0x120,"dbo.up_insert_log_itemtrade");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140077361;
}



void Unwind_140227e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140227e50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140227e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140227e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140227e80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227e87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140227e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140227ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140227ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140227ed0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227ed7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140227ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140227ef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227f10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227f17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227f20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227f30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227f40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227f50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227f57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227f60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227f70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227f80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227f90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227f97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227fa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227fb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140227fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227fd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140227fd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140227fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140227ff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228010(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228017. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228060(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228067. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228090(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402280a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402280b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402280b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402280c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402280d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402280e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402280f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228100(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228107. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228150(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228157. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402281a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402281a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402281b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402281c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402281d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402281e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402281f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402281f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228240(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228247. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228290(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228297. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402282a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402282b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402282c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402282d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402282e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402282e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402282f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228300(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228320(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228330(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228337. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228350(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228380(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228387. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402283a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402283b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402283c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402283d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402283d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402283e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402283f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228410(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228420(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228427. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228460(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228470(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228477. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228490(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402284a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402284b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402284c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402284c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402284d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402284e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402284f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228500(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228510(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228517. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228540(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228560(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228567. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228590(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402285a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402285b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402285b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402285c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402285d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402285e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_ITEM",0xd3,
                "dbo.up_insert_log_item");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140074627;
}



undefined * Catch_140228680(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_ITEM",0xd7
                ,"dbo.up_insert_log_item");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140074627;
}



void Unwind_140228720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140228730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140228740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140228750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140228760(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228767. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140228770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140228780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228790(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402287a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402287b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402287b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_1402287c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402287d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402287e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402287f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402287f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228830(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228837. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228870(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228877. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402288a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402288b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402288c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402288c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402288d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402288e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402288f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228900(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228907. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228910(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228930(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228950(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228957. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402289a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402289a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402289b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402289c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402289d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402289e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402289f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402289f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228a00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228a10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228a20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228a30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228a37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228a40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228a50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140228a60(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogItem.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_ITEM_ENCHANT",0x97,"dbo.up_insert_log_item_enchant");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14007274d;
}



undefined * Catch_140228b00(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogItem.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_ITEM_ENCHANT",0x9b,"dbo.up_insert_log_item_enchant");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14007274d;
}



void Unwind_140228ba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140228bb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140228bc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140228bd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140228be0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228be7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140228bf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140228c00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228c10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140228c20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140228c30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228c37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140228c40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140228c50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228c60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228c70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228c77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228c90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228ca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228cb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228cb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228cd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228ce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228cf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228cf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228d00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228d10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228d20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228d30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228d37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228d40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228d60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228d70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228d80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228d87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228d90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228db0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228dc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228dd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228dd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228de0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228df0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228e00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228e20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228e27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228e30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228e50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228e70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228e77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228e80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228ea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228ec0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228ec7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228ed0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228ef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228f10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228f17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228f20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228f30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228f40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228f60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228f67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228f70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228f80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228f90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228fa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228fb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140228fb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140228fc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228fd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140228fe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140228ff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229000(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229007. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229050(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229057. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229060(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229080(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229090(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402290a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402290a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402290b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402290c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402290d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402290e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402290f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402290f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229120(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229140(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229147. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229150(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229190(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229197. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402291a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402291b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402291c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402291d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402291e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402291e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402291f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229230(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229237. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229280(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229287. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402292a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402292b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402292c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402292d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402292d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402292e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402292f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229320(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229327. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229370(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229377. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229380(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402293a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402293b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402293c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402293c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402293d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402293e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402293f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229410(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229417. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229460(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229467. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402294a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402294b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402294b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402294c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402294d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402294e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402294f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229500(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229507. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229540(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229550(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229557. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229560(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229580(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229590(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402295a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402295a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402295b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402295c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402295d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402295e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402295f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402295f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229600(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229640(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229647. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229690(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229697. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402296a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402296b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402296c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_ITEMS",0x67
                ,"dbo.up_insert_log_items");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400718ca;
}



undefined * Catch_140229760(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogItem.cpp","CDBLobbyWriteQuery::DBReqLOG_ITEMS",
                0x6b,"dbo.up_insert_log_items");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400718ca;
}



void Unwind_140229800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140229810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140229820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140229830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140229840(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229847. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140229850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140229860(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140229880(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140229890(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229897. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_1402298a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402298b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402298c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402298d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402298d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402298e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402298f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229910(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229917. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229950(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229957. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402299a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402299a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402299b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402299c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402299d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402299e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402299f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402299f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229a00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229a10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229a20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229a30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229a40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229a47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229a50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229a60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229a70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229a80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229a90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229a97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140229aa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229ab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140229ac0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogGuild.cpp",
                "CDBLobbyWriteQuery::DBReqInsertGuildSkillLog",0x7b,
                "dbo.up_insert_log_learnguildskill");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14006ed62;
}



undefined * Catch_140229b60(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogGuild.cpp",
                "CDBLobbyWriteQuery::DBReqInsertGuildSkillLog",0x7f,
                "dbo.up_insert_log_learnguildskill");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14006ed62;
}



void Unwind_140229c00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140229c10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140229c20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140229c30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140229c40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229c47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140229c50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140229c60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229c70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140229c80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140229c90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229c97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140229ca0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140229cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229cc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229cd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229cd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140229ce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229cf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229d00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229d10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229d17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140229d20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229d30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229d40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229d50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229d57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140229d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229d70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229d80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229d90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229da0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229da7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140229db0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229dc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229dd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229de0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229df0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229df7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140229e00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229e10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229e20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229e30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140229e40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229e50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229e57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140229e60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229e70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229e80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229e90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229ea0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229ea7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140229eb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229ec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229ed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229ee0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229ee7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140229ef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229f00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229f10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229f20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229f27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140229f30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229f40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140229f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229f60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229f70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140229f77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140229f80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140229f90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140229fa0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogGuild.cpp",
                "CDBLobbyWriteQuery::DBReqInsertGuildLog",0x4f,"dbo.up_insert_log_guild");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14006e190;
}



undefined * Catch_14022a040(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogGuild.cpp",
                "CDBLobbyWriteQuery::DBReqInsertGuildLog",0x53,"dbo.up_insert_log_guild");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14006e190;
}



void Unwind_14022a0e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14022a0f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14022a100(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022a110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022a120(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a127. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14022a130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14022a140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022a160(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a167. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14022a170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022a180(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a1a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a1a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a1b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a1c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a1d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a1e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a1e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a1f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a220(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a227. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a270(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a277. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a2a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a2b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a2c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a2c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a2d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a2e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a2f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a310(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a317. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a350(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a357. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a360(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a390(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a3a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a3a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a3b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a3c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a3d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a3e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a3f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a3f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a400(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a420(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a430(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a440(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a447. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a450(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a470(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a490(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a497. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a4a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a4b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a4c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a4d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a4e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a4e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a4f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a530(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a537. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a580(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a587. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a5a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a5b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a5c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a5d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a5d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a5e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a5f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a600(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a610(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a620(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a627. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a630(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a640(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a660(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a670(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a677. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a680(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a690(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a6a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a6b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a6c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a6c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a6d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a6e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a6f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a710(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a717. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a760(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a767. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a790(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a7a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a7b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a7b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a7c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a7d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a7e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a7f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a800(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a807. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022a810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022a820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022a830(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogDungeon.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_DUNGEON_CLEAR",0x88,"dbo.up_insert_log_dungeon_clear")
  ;
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14006d226;
}



undefined * Catch_14022a8d0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogDungeon.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_DUNGEON_CLEAR",0x8c,"dbo.up_insert_log_dungeon_clear")
  ;
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14006d226;
}



void Unwind_14022a970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_14022a980(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_14022a990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022a9a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022a9b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a9b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14022a9c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14022a9d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022a9e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022a9f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022a9f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14022aa00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022aa10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022aa20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aa30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aa40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022aa47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022aa50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aa60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022aa70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aa80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aa90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022aa97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022aaa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022aac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aad0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aae0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022aae7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022aaf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ab00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ab10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ab20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ab30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ab37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022ab40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ab50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ab60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ab70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ab80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ab87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022ab90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022abb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022abc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022abd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022abd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022abe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022abf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022ac00(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogDungeon.cpp","CDBLobbyWriteQuery::DBReqLOG_DUNGEON"
                ,0x4c,"dbo.up_insert_log_dungeon");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14006b419;
}



undefined * Catch_14022aca0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogDungeon.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_DUNGEON",0x50,"dbo.up_insert_log_dungeon");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14006b419;
}



void Unwind_14022ad40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_14022ad50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_14022ad60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022ad70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022ad80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ad87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_14022ad90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022ada0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022adb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022adc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022adc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_14022add0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022ade0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022adf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ae00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ae07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022ae10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ae20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ae30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ae40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ae50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ae57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022ae60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ae70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ae80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ae90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aea0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022aea7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022aeb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022aed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aee0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022aee7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022aef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022af00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022af10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022af20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022af27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022af30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022af40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022af50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022af60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022af67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022af70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022af80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022af90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022afa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022afb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022afb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022afc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022afd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022afe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022aff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b000(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b007. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022b010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b050(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b057. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022b060(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022b080(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_CashBuy",0x16c,"dbo.up_insert_log_cashbuy");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14006a8bf;
}



undefined * Catch_14022b120(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_CashBuy",0x170,"dbo.up_insert_log_cashbuy");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14006a8bf;
}



void Unwind_14022b1c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_14022b1d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_14022b1e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022b1f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022b200(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b207. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14022b210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14022b220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022b240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022b250(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b257. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14022b260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022b270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b290(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b297. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b2a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b2b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b2c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b2d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b2e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b2e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b2f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b300(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b320(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b330(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b337. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b350(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b370(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b377. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b380(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b3a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b3b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b3b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b3c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b3d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b3e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b3f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b3f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b400(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b420(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b430(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b440(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b447. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b450(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b470(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b490(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b497. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b4a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b4b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b4c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b4d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b4e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b4e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b4f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_14022b530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b540(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b547. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b560(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b580(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b590(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b597. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b5a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b5b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b5c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b5d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b5e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b5e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b5f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b600(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b610(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b630(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b637. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b640(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b660(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b680(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b687. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b690(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b6a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b6b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b6c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b6d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b6d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022b6e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b6f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022b700(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_LoginOut",0x13e,"dbo.up_insert_log_loginout");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_140069ac7;
}



undefined * Catch_14022b7a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_LoginOut",0x142,"dbo.up_insert_log_loginout");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_140069ac7;
}



void Unwind_14022b840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_14022b850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_14022b860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022b870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022b880(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b887. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_14022b890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022b8a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b8b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022b8c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022b8d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b8d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_14022b8e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022b8f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b910(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b917. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022b920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b960(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b967. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022b970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b980(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b9a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b9a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022b9b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b9c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022b9d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022b9e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022b9e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022b9f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ba00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ba10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ba20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ba27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022ba30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ba40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ba50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ba60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ba70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ba77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022ba80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ba90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022baa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bac0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022bac7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022bad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022baf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bb00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bb10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022bb17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022bb20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bb30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022bb40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bb50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bb60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022bb67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022bb70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bb80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022bb90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bbb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022bbb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022bbc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bbd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022bbe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bbf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022bbf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022bc00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bc10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022bc20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bc30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bc40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022bc47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022bc50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bc60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022bc70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bc80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bc90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022bc97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022bca0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022bcb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022bcc0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_CHARACTER",0x109,"dbo.up_insert_log_character");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14006858b;
}



undefined * Catch_14022bd60(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_CHARACTER",0x10d,"dbo.up_insert_log_character");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_14006858b;
}



void Unwind_14022be00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_14022be10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_14022be20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022be30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022be37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022be40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022be50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022be60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022be70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022be77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022be80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022be90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022bea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022beb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022bec0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022bec7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022bed0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022bee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022bef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022bf00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022bf10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022bf17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022bf20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022bf30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022bf40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022bf50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022bf60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022bf67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022bf70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022bf80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022bf90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022bfa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022bfb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022bfb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022bfc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022bfd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022bfe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022bff0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022bff7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022c000(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022c010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022c030(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c037. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022c040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022c050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022c060(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_LEVEL_UP",0x7e,"dbo.up_insert_log_level_up");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400672b2;
}



undefined * Catch_14022c100(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_LEVEL_UP",0x82,"dbo.up_insert_log_level_up");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400672b2;
}



void Unwind_14022c1a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_14022c1b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_14022c1c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022c1d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022c1e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c1e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14022c1f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14022c200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022c220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022c230(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c237. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14022c240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022c250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c280(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c287. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c2a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c2b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c2c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c2c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c2d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c2e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c2f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c300(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c307. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c310(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c330(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c340(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c347. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c350(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c360(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c380(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c387. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c3a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c3b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c3c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c3d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c3d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c3e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c3f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c410(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c420(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c427. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c460(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c470(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c477. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c490(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c4a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c4b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c4c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c4c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c4d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c4e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022c4f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_PLAY_TIME",0x51,"dbo.up_insert_log_play_time");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400667bb;
}



undefined * Catch_14022c590(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_PLAY_TIME",0x55,"dbo.up_insert_log_play_time");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400667bb;
}



void Unwind_14022c630(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14022c640(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14022c650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022c660(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022c670(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c677. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14022c680(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14022c690(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c6a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022c6b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022c6c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c6c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14022c6d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022c6e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c6f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c700(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c707. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c710(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c730(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c740(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c747. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c770(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c780(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c787. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c7a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c7b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c7c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c7c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c7d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c7e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c7f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c810(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c817. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c860(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c867. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c870(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c890(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c8a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c8b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c8b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c8c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c8d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c8e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c8f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c900(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c907. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c910(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c930(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c950(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c957. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c9a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c9a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022c9b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c9c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022c9d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c9e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022c9f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022c9f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022ca00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ca10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ca20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ca30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ca40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ca47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022ca50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ca60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ca70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ca80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ca90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ca97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022caa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cad0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cae0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cae7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022caf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cb00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cb10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cb20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cb30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cb37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022cb40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cb50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cb60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cb70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cb80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cb87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022cb90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cbb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cbc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cbd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cbd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022cbe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cbf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cc00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cc10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cc20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cc27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022cc30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cc40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cc50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cc60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cc70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cc77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022cc80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cc90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ccb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ccc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ccc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022ccd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ccf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cd00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cd10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cd17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022cd20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cd30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cd40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cd50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cd60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cd67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022cd70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cd80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cd90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cda0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cdb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cdb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022cdc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cdd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cde0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cdf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ce00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ce07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022ce10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ce20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ce30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ce40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ce50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ce57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022ce60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ce70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ce80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ce90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cea0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cea7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022ceb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ced0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cee0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cef0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cef7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022cf00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cf10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cf20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cf30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cf40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cf47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022cf50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cf60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cf70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cf80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cf90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cf97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022cfa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cfb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022cfc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cfd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022cfe0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022cfe7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022cff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d000(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d030(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d037. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022d040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d070(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d080(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d087. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022d090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d0a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d0b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d0c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d0d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d0d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022d0e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d0f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d100(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d120(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d127. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022d130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d160(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d170(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d177. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022d180(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d1a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d1b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d1c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d1c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022d1d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d1e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d1f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d200(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d207. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022d210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d250(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d257. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14022d260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022d280(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLogAuction.cpp","CDBLobbyWriteQuery::DBReqLOG_Auction"
                ,0x6b,"dbo.up_insert_log_auction");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140065957;
}



undefined * Catch_14022d320(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLogAuction.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_Auction",0x6f,"dbo.up_insert_log_auction");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140065957;
}



void Unwind_14022d3c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022d3d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d3e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022d3f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022d400(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d407. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14022d410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022d420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_14022d430(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14022d440(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d447. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14022d450(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14022d460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d470(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d480(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d487. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14022d490(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d4a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d4b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d4c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d4d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d4d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14022d4e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d4f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d500(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d520(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d527. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14022d530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d570(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d577. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14022d580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d5a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d5b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d5c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d5c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14022d5d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d5e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d5f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d600(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d607. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14022d610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d640(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d647. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14022d650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d690(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d697. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14022d6a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022d6b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022d6c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x70);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryAuction.cpp",
                "CDBLobbyWriteQuery::DBReqAuctionItemSendMail",0x1d4,"dbo.up_insert_auctionsendmail"
               );
  *(undefined4 *)(param_2 + 0x40) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x78),1);
  return &DAT_140061eed;
}



undefined * Catch_14022d750(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xb8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x70);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryAuction.cpp",
                "CDBLobbyWriteQuery::DBReqAuctionItemSendMail",0x1d8,"dbo.up_insert_auctionsendmail"
               );
  *(undefined4 *)(param_2 + 0x40) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x78),1);
  return &DAT_140061eed;
}



void Unwind_14022d7e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14022d7f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14022d800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022d810(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d817. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022d820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022d830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022d850(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d857. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022d860(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022d870(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d880(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022d890(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d897. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022d8a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022d8b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d8c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022d8d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d8d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022d8e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022d8f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022d900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022d910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022d920(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022d927. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022d930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022d940(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022d950(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryAuction.cpp",
                "CDBLobbyWriteQuery::DBReqAuctionItemUpdate",0x172,"dbo.up_update_auctionarticle");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400611ec;
}



undefined * Catch_14022d9f0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryAuction.cpp",
                "CDBLobbyWriteQuery::DBReqAuctionItemUpdate",0x177,"dbo.up_update_auctionarticle");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400611ec;
}



void Unwind_14022da90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14022daa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14022dab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022dac0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022dac7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022dad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022dae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022daf0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryAuction.cpp",
                "CDBLobbyWriteQuery::DBReqAuctionItemDelete",0x146,"dbo.up_delete_auctionarticle");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140060ad8;
}



undefined * Catch_14022db90(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryAuction.cpp",
                "CDBLobbyWriteQuery::DBReqAuctionItemDelete",0x14b,"dbo.up_delete_auctionarticle");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140060ad8;
}



void Unwind_14022dc30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022dc40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022dc50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14022dc60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022dc67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_14022dc70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14022dc80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14022dc90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14022dca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022dca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_14022dcb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_14022dcc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022dcd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dce0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022dce7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022dcf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dd00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022dd10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dd20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022dd27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022dd30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dd40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022dd50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dd60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dd70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022dd77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022dd80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dd90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022dda0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022ddb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022ddc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ddc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022ddd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dde0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022ddf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022de00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022de10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022de17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022de20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022de30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022de40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022de50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022de60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022de67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022de70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022de80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022de90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022deb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022deb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022dec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022ded0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022dee0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022def0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022df00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022df07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022df10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022df20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022df30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022df40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022df50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022df57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022df60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022df70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022df80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022df90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dfa0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022dfa7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022dfb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dfc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022dfd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dfe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022dff0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022dff7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e000(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e040(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e047. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e060(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e070(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e080(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e090(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e097. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e0a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e0b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e0c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e0d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e0e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e0e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e0f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e120(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e130(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e137. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e150(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e160(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e180(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e187. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e1a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e1b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e1c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e1d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e1d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e1e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e1f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e220(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e227. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e270(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e277. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e2a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e2b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e2c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e2c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e2d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e2e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e2f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e310(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e317. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e360(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e367. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e380(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e390(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e3a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e3b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e3b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e3c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e3d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e3e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e3f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e400(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e407. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e430(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e450(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e457. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e4a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e4a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e4b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e4c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e4d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e4e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e4f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e4f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e540(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e547. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e560(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e580(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e590(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e597. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e5a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e5b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e5c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e5d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e5d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e5e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e5f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e600(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e610(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e617. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e630(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e640(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e650(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e657. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e6a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e6a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e6b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e6c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e6d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e6e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e6f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e6f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e710(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e730(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_14022e740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e750(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e757. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e790(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e7a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e7a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e7b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e7c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e7d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e7e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e7f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e7f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e840(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e847. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e860(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022e870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e880(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e890(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e897. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e8a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e8b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022e8b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_14022e8c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e8d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e8e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e8f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e920(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e930(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e960(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e970(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e9a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e9b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e9c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022e9d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



undefined * Catch_14022e9e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xc0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xb8);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryAuction.cpp","CDBLobbyWriteQuery::DBReqAuctionItemAdd"
                ,0x11e,"dbo.up_insert_auctionItem");
  *(undefined4 *)(param_2 + 0x48) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xb0),1);
  return &DAT_14006083c;
}



undefined * Catch_14022ea80(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 200);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xb8);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryAuction.cpp",
                "CDBLobbyWriteQuery::DBReqAuctionItemAdd",0x123,"dbo.up_insert_auctionItem");
  *(undefined4 *)(param_2 + 0x48) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xb0),1);
  return &DAT_14006083c;
}



void Unwind_14022eb20(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x48);
  return;
}



void Unwind_14022eb30(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xb8) + 8);
  return;
}



void Unwind_14022eb40(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x48);
  return;
}



void Unwind_14022eb50(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0xb0) + 8);
  return;
}



void Unwind_14022eb60(undefined8 param_1,longlong param_2)

{
  FUN_1400506c0(param_2 + 0x48);
  return;
}



void Unwind_14022eb70(undefined8 param_1,longlong param_2)

{
  FUN_140050650(*(longlong *)(param_2 + 0x90) + 8);
  return;
}



void Unwind_14022eb80(undefined8 param_1,longlong param_2)

{
  FUN_140145580(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022eb90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022eb97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022eba0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022eba7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022ebb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ebb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022ebc0(undefined8 param_1,longlong param_2)

{
  FUN_1401458d0(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022ebd0(undefined8 param_1,longlong param_2)

{
  FUN_14009e960(*(longlong *)(param_2 + 0x48) + 8);
  return;
}



void Unwind_14022ebe0(undefined8 param_1,longlong param_2)

{
  FUN_1401425a0(param_2 + 0x28);
  return;
}



void Unwind_14022ebf0(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x68),*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022ec10(undefined8 param_1,longlong param_2)

{
  FUN_140141ae0(param_2 + 0x48);
  return;
}



void Unwind_14022ec20(undefined8 param_1,longlong param_2)

{
  FUN_140140650(param_2 + 0x20);
  return;
}



void Unwind_14022ec30(undefined8 param_1,longlong param_2)

{
  FUN_140140650(param_2 + 0x68);
  return;
}



void Unwind_14022ec40(undefined8 param_1,longlong param_2)

{
  FUN_140142600(param_2 + 0xb0);
  return;
}



void Unwind_14022ec50(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x88);
  return;
}



void Unwind_14022ec60(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x110);
  return;
}



void Unwind_14022ec70(undefined8 param_1,longlong param_2)

{
  FUN_140141ae0(param_2 + 0x20);
  return;
}



void Unwind_14022ec80(undefined8 param_1,longlong param_2)

{
  FUN_14004d640(*(undefined8 *)(param_2 + 0x48),*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022eca0(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(*(longlong *)(param_2 + 0x48) + 8);
  return;
}



void Unwind_14022ecb0(undefined8 param_1,longlong param_2)

{
  FUN_140140650(param_2 + 0x88);
  return;
}



void Unwind_14022ecc0(undefined8 param_1,longlong param_2)

{
  FUN_140140650(param_2 + 0x110);
  return;
}



void Unwind_14022ecd0(undefined8 param_1,longlong param_2)

{
  FUN_140149e40(param_2 + 0x50);
  return;
}



void Unwind_14022ece0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0xb0);
  return;
}



void Unwind_14022ecf0(undefined8 param_1,longlong param_2)

{
  FUN_140142c90(param_2 + 0x50);
  return;
}



void Unwind_14022ed00(undefined8 param_1,longlong param_2)

{
  FUN_140149770(param_2 + 0x50);
  return;
}



void Unwind_14022ed10(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x88);
  return;
}



void Unwind_14022ed20(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x150);
  return;
}



void Unwind_14022ed30(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x110);
  return;
}



void Unwind_14022ed40(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x150);
  return;
}



void Unwind_14022ed50(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x110);
  return;
}



void Unwind_14022ed60(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x150);
  return;
}



void Unwind_14022ed70(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x110);
  return;
}



void Unwind_14022ed80(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x150);
  return;
}



void Unwind_14022ed90(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x110);
  return;
}



void Unwind_14022eda0(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x150);
  return;
}



void Unwind_14022edb0(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x110);
  return;
}



void Unwind_14022edc0(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x110);
  return;
}



void Unwind_14022edd0(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x110);
  return;
}



void Unwind_14022ede0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022edf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_14022ee00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_14022ee10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_14022ee20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_14022ee30(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x60);
  return;
}



void Unwind_14022ee40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x178);
  return;
}



void Unwind_14022ee50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022ee60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ee67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xe0));
  return;
}



void Unwind_14022ee70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xe0));
  return;
}



void Unwind_14022ee80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_14022ee90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



undefined * Catch_14022eea0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(param_2 + 0x108);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  FUN_1400a69d0(*(undefined8 *)(param_2 + 0x160),uVar1,"DBLobbyWriteQueryUser.cpp",
                "CDBLobbyWriteQuery::DBReqAuthPcRoomGrade",0x403,"dbo.up_get_pcroominfo");
  return &DAT_14011b824;
}



undefined * Catch_14022ef20(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(param_2 + 0x100);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  FUN_1400a6790(*(undefined8 *)(param_2 + 0x160),plVar1,"DBLobbyWriteQueryUser.cpp",
                "CDBLobbyWriteQuery::DBReqAuthPcRoomGrade",0x406,"dbo.up_get_pcroominfo");
  return &DAT_14011b824;
}



void Unwind_14022efa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_14022efb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_14022efc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_14022efd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_14022efe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022eff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_14022f000(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_14022f010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14022f020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_14022f030(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x70);
  return;
}



void Unwind_14022f040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x38);
  return;
}



void Unwind_14022f050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x170);
  return;
}



void Unwind_14022f060(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x48);
  return;
}



void Unwind_14022f070(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x140);
  return;
}



void Unwind_14022f080(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_14022f090(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x120);
  return;
}



void Unwind_14022f0a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x160);
  return;
}



void Unwind_14022f0b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x170);
  return;
}



void Unwind_14022f0c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_14022f0d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14022f0e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x100);
  return;
}



void Unwind_14022f0f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x130);
  return;
}



void Unwind_14022f100(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x150);
  return;
}



void Unwind_14022f110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x170);
  return;
}



undefined * Catch_14022f120(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x198);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x58);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqAuthPcRoomIP",
                0x3d0,"dbo.up_read_auth_pcroom");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  return &DAT_14011b2cf;
}



undefined * Catch_14022f1b0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x188);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x58);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqAuthPcRoomIP",
                0x3d4,"dbo.up_read_auth_pcroom");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  return &DAT_14011b2cf;
}



void Unwind_14022f240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_14022f250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_14022f260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14022f270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_14022f280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022f290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_14022f2a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_14022f2b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14022f2c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_14022f2d0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x70);
  return;
}



void Unwind_14022f2e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022f2f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x160);
  return;
}



void Unwind_14022f300(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_14022f310(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x110);
  return;
}



void Unwind_14022f320(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0xf0);
  return;
}



void Unwind_14022f330(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x150);
  return;
}



void Unwind_14022f340(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x130);
  return;
}



void Unwind_14022f350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x160);
  return;
}



void Unwind_14022f360(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x100);
  return;
}



void Unwind_14022f370(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x120);
  return;
}



void Unwind_14022f380(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x38);
  return;
}



void Unwind_14022f390(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x140);
  return;
}



undefined * Catch_14022f3a0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x180);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x60);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqAuthBlackListIP",
                0x390,"dbo.up_read_auth_blacklist");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x58),1);
  return &DAT_14011a889;
}



undefined * Catch_14022f430(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x178);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x60);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqAuthBlackListIP",
                0x394,"dbo.up_read_auth_blacklist");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x58),1);
  return &DAT_14011a889;
}



void Unwind_14022f4c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_14022f4d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_14022f4e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14022f4f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_14022f500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_14022f510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14022f520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022f530(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022f537. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14022f540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14022f550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022f560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022f570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022f580(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022f587. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14022f590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022f5a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022f5b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqSaveKeyMap",0x352,
                "dbo.up_save_keymap");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140119e81;
}



undefined * Catch_14022f650(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x88);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqSaveKeyMap",0x356
                ,"dbo.up_save_keymap");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140119e81;
}



void Unwind_14022f6f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14022f700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_14022f710(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_14022f720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_14022f730(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_14022f740(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x80);
  return;
}



void Unwind_14022f750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_14022f760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_14022f770(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_14022f780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_14022f790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_14022f7a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14022f7b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022f7b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x100));
  return;
}



void Unwind_14022f7c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14022f7d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14022f7e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x168);
  return;
}



undefined * Catch_14022f7f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x118);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqGetKeyMap",0x2ac,
                "dbo.up_get_keymap");
  *(undefined2 *)(param_2 + 0x18c) = 0x6c;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  return &DAT_14011990f;
}



undefined * Catch_14022f890(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x120);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqGetKeyMap",0x2b1,
                "dbo.up_get_keymap");
  *(undefined2 *)(param_2 + 0x18c) = 0x6c;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  return &DAT_14011990f;
}



void Unwind_14022f930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_14022f940(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_14022f950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_14022f960(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_14022f970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14022f980(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14022f990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022f9a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022f9a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022f9b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022f9c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022f9d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022f9e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022f9e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022f9f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022fa00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022fa10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022fa20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022fa27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022fa30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022fa40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022fa50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022fa60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022fa70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022fa77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022fa80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022fa90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022faa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022fab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022fac0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022fac7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022fad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14022fae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022faf0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqSaveIP",0x261,
                "dbo.up_save_ip");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1401192b7;
}



undefined * Catch_14022fb90(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqSaveIP",0x265,
                "dbo.up_save_ip");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1401192b7;
}



void Unwind_14022fc30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_14022fc40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_14022fc50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022fc60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022fc70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022fc77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022fc80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022fc90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022fca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022fcb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022fcc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022fcc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022fcd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022fce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022fcf0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqServerDownLogOut",
                0x238,"dbo.up_server_down_log_out");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_140118bc2;
}



undefined * Catch_14022fd90(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x78);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqServerDownLogOut"
                ,0x23c,"dbo.up_server_down_log_out");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_140118bc2;
}



void Unwind_14022fe30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14022fe40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14022fe50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14022fe60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022fe67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022fe70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14022fe80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022fe90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022fea0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022fea7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14022feb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14022fec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022fed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022fee0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022fee7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022fef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022ff00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ff10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022ff20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022ff30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ff37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022ff40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022ff50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ff60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022ff70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ff77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022ff80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022ff90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14022ffa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022ffb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022ffc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014022ffc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14022ffd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14022ffe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14022fff0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqSaveServerInfo",
                0x212,"dbo.up_save_server_info");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_14011880d;
}



undefined * Catch_140230090(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqSaveServerInfo",
                0x216,"dbo.up_save_server_info");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_14011880d;
}



void Unwind_140230130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140230140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140230150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140230160(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230167. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140230170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140230180(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140230190(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp",
                "CDBLobbyWriteQuery::DBReqSaveFirstCharacter",0x1e8,"dbo.up_save_first_character");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140117ff8;
}



undefined * Catch_140230230(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp",
                "CDBLobbyWriteQuery::DBReqSaveFirstCharacter",0x1ec,"dbo.up_save_first_character");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140117ff8;
}



void Unwind_1402302d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_1402302e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_1402302f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140230300(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230307. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140230310(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140230320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140230330(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqLogout",0x1c2,
                "dbo.up_save_logout");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140117d78;
}



undefined * Catch_1402303d0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqLogout",0x1c6,
                "dbo.up_save_logout");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140117d78;
}



void Unwind_140230470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140230480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140230490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402304a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402304a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402304b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402304c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402304d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402304e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402304e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402304f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140230500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140230510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230530(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230537. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140230540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140230560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230580(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230587. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140230590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402305a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402305b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402305c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402305c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402305d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402305e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402305f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230600(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230607. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140230610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140230630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230640(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230650(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230657. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140230660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140230680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402306a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402306a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402306b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402306c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402306d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402306e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402306f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402306f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140230700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230710(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140230720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230730(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140230740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230750(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230757. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140230760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140230780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230790(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402307a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402307a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402307b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402307c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402307d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402307e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402307e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402307f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140230810(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqLogoutLog",0x19c,
                "dbo.up_save_logout_log");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140117afd;
}



undefined * Catch_1402308b0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqLogoutLog",0x1a0,
                "dbo.up_save_logout_log");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140117afd;
}



void Unwind_140230950(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140230960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140230970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140230980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140230990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_1402309a0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x70);
  return;
}



void Unwind_1402309b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x188);
  return;
}



void Unwind_1402309c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402309d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402309d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402309e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402309f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140230a00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140230a10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230a17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140230a20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140230a30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140230a40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf0);
  return;
}



undefined * Catch_140230a50(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x108);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x170);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqGMAuth",0x16b,
                "dbo.up_auth_agentaccount");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x178),1);
  return &DAT_140116aa5;
}



undefined * Catch_140230ae0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x118);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x170);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqGMAuth",0x16f,
                "dbo.up_auth_agentaccount");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x178),1);
  return &DAT_140116aa5;
}



void Unwind_140230b70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140230b80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140230b90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140230ba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140230bb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140230bc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140230bd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140230be0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140230bf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140230c00(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xb0);
  return;
}



void Unwind_140230c10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140230c20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140230c30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230c37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140230c40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140230c50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140230c60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140230c70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230c77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140230c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140230c90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140230ca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140230cb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140230cc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230cc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140230cd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140230ce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140230cf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140230d00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230d07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140230d10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140230d20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140230d30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140230d40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230d47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140230d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140230d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140230d70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140230d80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230d87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140230d90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140230da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140230db0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_140230dc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_140230dd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_140230de0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_140230df0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_140230e00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



undefined * Catch_140230e10(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x150);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xa8);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqAuth",0x131,
                "dbo.up_get_auth_id");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xa0),1);
  return &DAT_14011640c;
}



undefined * Catch_140230ea0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x130);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xa8);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqAuth",0x135,
                "dbo.up_get_auth_id");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xa0),1);
  return &DAT_14011640c;
}



void Unwind_140230f30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140230f40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140230f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140230f60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140230f70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140230f80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140230f90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140230fa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140230fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140230fc0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xa0);
  return;
}



void Unwind_140230fd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140230fe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140230ff0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140230ff7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_140231000(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140231010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140231020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x120);
  return;
}



void Unwind_140231030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x150);
  return;
}



void Unwind_140231040(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x48);
  return;
}



void Unwind_140231050(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_140231060(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x88);
  return;
}



void Unwind_140231070(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_140231080(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x168);
  return;
}



void Unwind_140231090(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



void Unwind_1402310a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x60);
  return;
}



undefined * Catch_1402310b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x140);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqSecondPass",0xe9,
                "dbo.up_get_second_pass");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_140115790;
}



undefined * Catch_140231140(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x148);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqSecondPass",0xed,
                "dbo.up_get_second_pass");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_140115790;
}



void Unwind_1402311d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_1402311e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_1402311f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140231200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140231210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x178);
  return;
}



void Unwind_140231220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140231230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140231240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140231250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140231260(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x60);
  return;
}



void Unwind_140231270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140231280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140231290(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140231297. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402312a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402312b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402312c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402312d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402312d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402312e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402312f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



undefined * Catch_140231300(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x108);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x160);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqSetSecondPass",
                0xa7,"dbo.up_set_second_pass");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x168),1);
  return &DAT_140114faf;
}



undefined * Catch_140231390(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x118);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x160);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryUser.cpp","CDBLobbyWriteQuery::DBReqSetSecondPass",
                0xab,"dbo.up_set_second_pass");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x168),1);
  return &DAT_140114faf;
}



void Unwind_140231420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140231430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140231440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140231450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140231460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140231470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1c0);
  return;
}



void Unwind_140231480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1c8);
  return;
}



void Unwind_140231490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1e0);
  return;
}



void Unwind_1402314a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1f8);
  return;
}



void Unwind_1402314b0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x1c0);
  return;
}



void Unwind_1402314c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x240);
  return;
}



void Unwind_1402314d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x350));
  return;
}



void Unwind_1402314e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402314e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x140));
  return;
}



void Unwind_1402314f0(undefined8 param_1,longlong param_2)

{
  FUN_140001080(param_2 + 0x90);
  return;
}



void Unwind_140231500(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x350));
  return;
}



void Unwind_140231510(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140231517. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x90));
  return;
}



void Unwind_140231520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140231530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x268);
  return;
}



void Unwind_140231540(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140231550(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140231557. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x90));
  return;
}



void Unwind_140231560(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140231570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x278);
  return;
}



void Unwind_140231580(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_140231590(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_1402315a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402315a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402315b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_1402315c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2d8);
  return;
}



void Unwind_1402315d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402315e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402315f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402315f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xa0));
  return;
}



void Unwind_140231600(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140231610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x308);
  return;
}



void Unwind_140231620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140231630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140231640(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140231647. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140231650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140231660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2e8);
  return;
}



void Unwind_140231670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140231680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3b8);
  return;
}



void Unwind_140231690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_1402316a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402316a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402316b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_1402316c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 600);
  return;
}



void Unwind_1402316d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_1402316e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402316e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x98));
  return;
}



void Unwind_1402316f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_140231700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x248);
  return;
}



void Unwind_140231710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_140231720(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140231727. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xb0));
  return;
}



void Unwind_140231730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_140231740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2b0);
  return;
}



void Unwind_140231750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140231760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140231770(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140231777. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xa8));
  return;
}



void Unwind_140231780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140231790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2d0);
  return;
}



void Unwind_1402317a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402317b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402317c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402317c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_1402317d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402317e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2f0);
  return;
}



void Unwind_1402317f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140231800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140231810(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140231817. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140231820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140231830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x318);
  return;
}



void Unwind_140231840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140231850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140231860(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140231867. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140231870(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140231880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x270);
  return;
}



void Unwind_140231890(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x168));
  return;
}



void Unwind_1402318a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x168));
  return;
}



void Unwind_1402318b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402318b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402318c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x168));
  return;
}



void Unwind_1402318d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x280);
  return;
}



undefined * Catch_1402318e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(param_2 + 0x358);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  FUN_1400a69d0(*(undefined8 *)(param_2 + 0x160),uVar1,"DBLobbyWriteQueryUser.cpp",
                "CDBLobbyWriteQuery::DBReqADODataMappingTest",0x80,"dbo.up_ado_data_mapping");
  return &DAT_1401149f3;
}



undefined * Catch_140231960(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(param_2 + 0x338);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  FUN_1400a6790(*(undefined8 *)(param_2 + 0x160),plVar1,"DBLobbyWriteQueryUser.cpp",
                "CDBLobbyWriteQuery::DBReqADODataMappingTest",0x83,"dbo.up_ado_data_mapping");
  return &DAT_1401149f3;
}



void Unwind_1402319e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1c0);
  return;
}



void Unwind_1402319f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1c8);
  return;
}



void Unwind_140231a00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1e0);
  return;
}



void Unwind_140231a10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1f8);
  return;
}



void Unwind_140231a20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140231a30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140231a40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140231a50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140231a57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140231a60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140231a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140231a80(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryTitle.cpp",
                "CDBLobbyWriteQuery::DBReqUnEquipCharacterTitle",0x175,
                "dbo.up_unequip_character_title");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140113308;
}



undefined * Catch_140231b20(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryTitle.cpp",
                "CDBLobbyWriteQuery::DBReqUnEquipCharacterTitle",0x179,
                "dbo.up_unequip_character_title");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140113308;
}



void Unwind_140231bc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140231bd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140231be0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140231bf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140231bf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140231c00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140231c10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140231c20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140231c30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140231c37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140231c40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140231c50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140231c60(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryTitle.cpp",
                "CDBLobbyWriteQuery::DBReqEquipCharacterTitle",0x14f,"dbo.up_equip_character_title")
  ;
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14011308b;
}



undefined * Catch_140231d00(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryTitle.cpp",
                "CDBLobbyWriteQuery::DBReqEquipCharacterTitle",0x153,"dbo.up_equip_character_title")
  ;
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14011308b;
}



void Unwind_140231da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140231db0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140231dc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140231dd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140231de0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140231df0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140231e00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140231e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x230));
  return;
}



void Unwind_140231e20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140231e27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x238));
  return;
}



void Unwind_140231e30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x230));
  return;
}



void Unwind_140231e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140231e50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x178);
  return;
}



void Unwind_140231e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c0);
  return;
}



void Unwind_140231e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a8);
  return;
}



void Unwind_140231e80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 400);
  return;
}



undefined * Catch_140231e90(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x170);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x220);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryTitle.cpp",
                "CDBLobbyWriteQuery::DBReqReadCharacterTitleList",0x129,"dbo.up_read_title_list");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x88),1);
  return &DAT_140112bca;
}



undefined * Catch_140231f20(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x160);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x220);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryTitle.cpp",
                "CDBLobbyWriteQuery::DBReqReadCharacterTitleList",0x12d,"dbo.up_read_title_list");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x88),1);
  return &DAT_140112bca;
}



void Unwind_140231fb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140231fc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140231fd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140231fe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140231ff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140232000(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140232010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140232020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140232030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140232040(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140232050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140232060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x230));
  return;
}



void Unwind_140232070(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232077. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x238));
  return;
}



void Unwind_140232080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x230));
  return;
}



void Unwind_140232090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_1402320a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x178);
  return;
}



void Unwind_1402320b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c0);
  return;
}



void Unwind_1402320c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a8);
  return;
}



void Unwind_1402320d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 400);
  return;
}



undefined * Catch_1402320e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x170);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x220);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryTitle.cpp",
                "CDBLobbyWriteQuery::DBReqReadEquipCharacterTitle",0xca,"dbo.up_read_equip_title");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x88),1);
  return &DAT_14011232a;
}



undefined * Catch_140232170(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x160);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x220);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryTitle.cpp",
                "CDBLobbyWriteQuery::DBReqReadEquipCharacterTitle",0xce,"dbo.up_read_equip_title");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x88),1);
  return &DAT_14011232a;
}



void Unwind_140232200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140232210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140232220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140232230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140232240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140232250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140232260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140232270(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232277. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140232280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140232290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402322a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402322b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402322b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402322c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402322d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402322e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryTitle.cpp",
                "CDBLobbyWriteQuery::DBReqDelCharacterTitle",0x6d,"dbo.up_delete_character_title");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140111b9b;
}



undefined * Catch_140232380(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryTitle.cpp",
                "CDBLobbyWriteQuery::DBReqDelCharacterTitle",0x71,"dbo.up_delete_character_title");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140111b9b;
}



void Unwind_140232420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140232430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140232440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140232450(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232457. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140232460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140232470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140232480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140232490(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232497. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402324a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402324b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402324c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402324d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402324e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402324e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402324f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140232500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140232510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140232520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140232530(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232537. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140232540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140232550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140232560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140232570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140232580(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232587. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140232590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402325a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402325b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryTitle.cpp",
                "CDBLobbyWriteQuery::DBReqAddCharacterTitle",0x47,"dbo.up_add_character_title");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1401117f2;
}



undefined * Catch_140232650(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryTitle.cpp",
                "CDBLobbyWriteQuery::DBReqAddCharacterTitle",0x4b,"dbo.up_add_character_title");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1401117f2;
}



void Unwind_1402326f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140232700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140232710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140232720(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232727. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140232730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140232740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140232750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140232760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140232770(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232777. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140232780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140232790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402327a0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryStorage.cpp",
                "CDBLobbyWriteQuery::DBReqStorageUseableCountUpdate",0x46,
                "dbo.up_update_storage_useable_count");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1401110bc;
}



undefined * Catch_140232840(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryStorage.cpp",
                "CDBLobbyWriteQuery::DBReqStorageUseableCountUpdate",0x4a,
                "dbo.up_update_storage_useable_count");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1401110bc;
}



void Unwind_1402328e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_1402328f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140232900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140232910(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232917. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140232920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140232930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140232940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140232950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140232960(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232967. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140232970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140232980(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140232990(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQuerySkill.cpp","CDBLobbyWriteQuery::DBReqSkillLevelUpdate"
                ,0x15d,"dbo.up_update_skill_level");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140110d13;
}



undefined * Catch_140232a30(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQuerySkill.cpp",
                "CDBLobbyWriteQuery::DBReqSkillLevelUpdate",0x161,"dbo.up_update_skill_level");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140110d13;
}



void Unwind_140232ad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140232ae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140232af0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_140232b00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232b07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140232b10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_140232b20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



undefined * Catch_140232b30(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQuerySkill.cpp","CDBLobbyWriteQuery::DBReqSkillReset",0x12d
                ,"dbo.up_skill_reset");
  *(undefined4 *)(param_2 + 0x100) = 0;
  *(undefined2 *)(param_2 + 0x4c) = 0xa5;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140110924;
}



undefined * Catch_140232bd0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQuerySkill.cpp","CDBLobbyWriteQuery::DBReqSkillReset",
                0x132,"dbo.up_skill_reset");
  *(undefined4 *)(param_2 + 0x100) = 0;
  *(undefined2 *)(param_2 + 0x4c) = 0xa5;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140110924;
}



void Unwind_140232c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140232c90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140232ca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_140232cb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232cb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140232cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_140232cd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



undefined * Catch_140232ce0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQuerySkill.cpp","CDBLobbyWriteQuery::DBReqDeleteSkillAll",
                0xfa,"dbo.up_skill_delete_all");
  *(undefined4 *)(param_2 + 0x100) = 0;
  *(undefined2 *)(param_2 + 0x4c) = 0xa5;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140110624;
}



undefined * Catch_140232d80(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQuerySkill.cpp","CDBLobbyWriteQuery::DBReqDeleteSkillAll",
                0xff,"dbo.up_skill_delete_all");
  *(undefined4 *)(param_2 + 0x100) = 0;
  *(undefined2 *)(param_2 + 0x4c) = 0xa5;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140110624;
}



void Unwind_140232e30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140232e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140232e50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140232e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140232e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140232e80(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140232e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140232ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140232eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140232ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140232ed0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140232ee0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x260));
  return;
}



void Unwind_140232ef0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140232ef7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x268));
  return;
}



void Unwind_140232f00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x260));
  return;
}



void Unwind_140232f10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140232f20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1f0);
  return;
}



void Unwind_140232f30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x178);
  return;
}



void Unwind_140232f40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a8);
  return;
}



void Unwind_140232f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1d8);
  return;
}



void Unwind_140232f60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 400);
  return;
}



void Unwind_140232f70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c0);
  return;
}



undefined * Catch_140232f80(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(param_2 + 0x140);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  FUN_1400a69d0(*(undefined8 *)(param_2 + 0x250),uVar1,"DBLobbyWriteQuerySkill.cpp",
                "CDBLobbyWriteQuery::DBReqReadSkill",199,"dbo.up_read_skill");
  *(undefined2 *)(param_2 + 0x54) = 0x9c;
  return &DAT_1401101ee;
}



undefined * Catch_140233000(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(param_2 + 0x160);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  FUN_1400a6790(*(undefined8 *)(param_2 + 0x250),plVar1,"DBLobbyWriteQuerySkill.cpp",
                "CDBLobbyWriteQuery::DBReqReadSkill",0xcb,"dbo.up_read_skill");
  *(undefined2 *)(param_2 + 0x54) = 0x9c;
  return &DAT_1401101ee;
}



void Unwind_140233080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140233090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_1402330a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_1402330b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_1402330c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_1402330d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_1402330e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402330f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402330f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140233100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140233110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140233120(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140233130(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233137. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140233140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140233150(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140233160(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140233170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140233180(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233187. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140233190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402331a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402331b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402331c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402331d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402331d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402331e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402331f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140233200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140233210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140233220(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233227. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140233230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140233240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140233250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140233260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140233270(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233277. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140233280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140233290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402332a0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQuerySkill.cpp","CDBLobbyWriteQuery::DBReqSkillAdd",0x71,
                "dbo.up_insert_skill");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14010f8d2;
}



undefined * Catch_140233340(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQuerySkill.cpp","CDBLobbyWriteQuery::DBReqSkillAdd",0x75,
                "dbo.up_insert_skill");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14010f8d2;
}



void Unwind_1402333e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_1402333f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140233400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140233410(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233417. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140233420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140233430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140233440(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQuerySkill.cpp","CDBLobbyWriteQuery::DBReqDelSkill",0x44,
                "dbo.up_delete_skill");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_14010f058;
}



undefined * Catch_1402334e0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQuerySkill.cpp","CDBLobbyWriteQuery::DBReqDelSkill",0x48,
                "dbo.up_delete_skill");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_14010f058;
}



void Unwind_140233580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_140233590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402335a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_1402335b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402335b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_1402335c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_1402335d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_1402335e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_1402335f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140233600(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233607. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140233610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140233620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140233630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140233640(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233647. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140233650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140233660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



undefined * Catch_140233670(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  uVar1 = *(undefined8 *)(param_2 + 0xc0);
  FUN_140001210(uVar1);
  uVar2 = *(undefined8 *)(param_2 + 0x118);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar3 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a69d0(uVar3,uVar1,"DBLobbyWriteQueryQuickSlot.cpp",
                "CDBLobbyWriteQuery::DBReqSaveItemQuickSlotEx",0x18d,uVar2);
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar3,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_14010edd6;
}



undefined * Catch_140233710(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  plVar1 = *(longlong **)(param_2 + 0xa0);
  (**(code **)(*plVar1 + 8))(plVar1);
  uVar2 = *(undefined8 *)(param_2 + 0x118);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar3 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a6790(uVar3,plVar1,"DBLobbyWriteQueryQuickSlot.cpp",
                "CDBLobbyWriteQuery::DBReqSaveItemQuickSlotEx",0x191,uVar2);
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar3,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_14010edd6;
}



void Unwind_1402337b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402337c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_1402337d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_1402337e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_1402337f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140233800(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x80);
  return;
}



void Unwind_140233810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140233820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140233830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140233840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140233850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140233860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140233870(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233877. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x108));
  return;
}



void Unwind_140233880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140233890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_1402338a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x110);
  return;
}



void Unwind_1402338b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x148);
  return;
}



void Unwind_1402338c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x160);
  return;
}



undefined * Catch_1402338d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1a0);
  FUN_140001210(uVar1);
  uVar2 = *(undefined8 *)(param_2 + 0x58);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar3 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar3,uVar1,"DBLobbyWriteQueryQuickSlot.cpp",
                "CDBLobbyWriteQuery::DBReqReadQuickslotEx",0x15a,uVar2);
  *(undefined2 *)(param_2 + 0x1cc) = 0xa0;
  FUN_1400a1e10(uVar3,*(undefined8 *)(param_2 + 0x100),1);
  return &DAT_14010e708;
}



undefined * Catch_140233970(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  plVar1 = *(longlong **)(param_2 + 0x180);
  (**(code **)(*plVar1 + 8))(plVar1);
  uVar2 = *(undefined8 *)(param_2 + 0x58);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar3 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar3,plVar1,"DBLobbyWriteQueryQuickSlot.cpp",
                "CDBLobbyWriteQuery::DBReqReadQuickslotEx",0x15f,uVar2);
  *(undefined2 *)(param_2 + 0x1cc) = 0xa0;
  FUN_1400a1e10(uVar3,*(undefined8 *)(param_2 + 0x100),1);
  return &DAT_14010e708;
}



void Unwind_140233a10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140233a20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140233a30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140233a40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140233a50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_140233a60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140233a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140233a80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140233a90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140233aa0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233aa7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_140233ab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140233ac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140233ad0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140233ae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140233af0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233af7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140233b00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140233b10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140233b20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140233b30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233b37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140233b40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140233b50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



undefined * Catch_140233b60(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  uVar2 = *(undefined8 *)(param_2 + 0x118);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar3 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a69d0(uVar3,uVar1,"DBLobbyWriteQueryQuickSlot.cpp",
                "CDBLobbyWriteQuery::DBReqSaveItemQuickSlot",0x107,uVar2);
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar3,*(undefined8 *)(param_2 + 0x128),1);
  return &DAT_14010de3f;
}



undefined * Catch_140233c00(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  uVar2 = *(undefined8 *)(param_2 + 0x118);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar3 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a6790(uVar3,plVar1,"DBLobbyWriteQueryQuickSlot.cpp",
                "CDBLobbyWriteQuery::DBReqSaveItemQuickSlot",0x10b,uVar2);
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar3,*(undefined8 *)(param_2 + 0x128),1);
  return &DAT_14010de3f;
}



void Unwind_140233ca0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140233cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140233cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140233cd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140233ce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140233cf0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x80);
  return;
}



void Unwind_140233d00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140233d10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140233d20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140233d30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140233d40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x138);
  return;
}



void Unwind_140233d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x140);
  return;
}



void Unwind_140233d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140233d70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140233d80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233d87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x100));
  return;
}



void Unwind_140233d90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140233da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140233db0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x110);
  return;
}



void Unwind_140233dc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x158);
  return;
}



void Unwind_140233dd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x170);
  return;
}



undefined * Catch_140233de0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1b0);
  FUN_140001210(uVar1);
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar3 = *(undefined8 *)(param_2 + 0x58);
  FUN_1400a69d0(uVar3,uVar1,"DBLobbyWriteQueryQuickSlot.cpp",
                "CDBLobbyWriteQuery::DBReqReadQuickslot",0x7d,uVar2);
  *(undefined2 *)(param_2 + 0x1dc) = 0xa0;
  FUN_1400a1e10(uVar3,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_14010d70e;
}



undefined * Catch_140233e80(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  plVar1 = *(longlong **)(param_2 + 0x188);
  (**(code **)(*plVar1 + 8))(plVar1);
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar3 = *(undefined8 *)(param_2 + 0x58);
  FUN_1400a6790(uVar3,plVar1,"DBLobbyWriteQueryQuickSlot.cpp",
                "CDBLobbyWriteQuery::DBReqReadQuickslot",0x82,uVar2);
  *(undefined2 *)(param_2 + 0x1dc) = 0xa0;
  FUN_1400a1e10(uVar3,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_14010d70e;
}



void Unwind_140233f20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140233f30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140233f40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140233f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140233f60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140233f70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140233f80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140233f90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233f97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140233fa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140233fb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140233fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140233fd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140233fe0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140233fe7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140233ff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140234000(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140234010(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryQuest.cpp","CDBLobbyWriteQuery::DBReqQuestUpdateShow",
                0x16a,"dbo.up_update_quest_show");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_14010cd7c;
}



undefined * Catch_1402340b0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryQuest.cpp","CDBLobbyWriteQuery::DBReqQuestUpdateShow"
                ,0x16e,"dbo.up_update_quest_show");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_14010cd7c;
}



void Unwind_140234150(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140234160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140234170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140234180(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234187. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140234190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402341a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402341b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402341c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402341c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402341d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402341e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402341f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234210(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234217. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140234220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140234240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234260(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234267. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140234270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140234290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_1402342a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_1402342b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402342b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402342c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_1402342d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402342e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_1402342f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234300(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234307. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140234310(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140234330(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234350(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234357. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140234360(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140234380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234390(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_1402343a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402343a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402343b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_1402343c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402343d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_1402343e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402343e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402343f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140234400(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140234410(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xd8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xb0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryQuest.cpp","CDBLobbyWriteQuery::DBReqQuestUpdate",
                0x141,"dbo.up_update_quest");
  *(undefined4 *)(param_2 + 0x40) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xb8),1);
  return &DAT_14010c9af;
}



undefined * Catch_1402344b0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xe8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xb0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryQuest.cpp","CDBLobbyWriteQuery::DBReqQuestUpdate",
                0x145,"dbo.up_update_quest");
  *(undefined4 *)(param_2 + 0x40) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xb8),1);
  return &DAT_14010c9af;
}



void Unwind_140234550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140234560(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140234570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140234580(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140234590(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_1402345a0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xb0);
  return;
}



void Unwind_1402345b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_1402345c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_1402345d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_1402345e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_1402345f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x160);
  return;
}



void Unwind_140234600(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x340));
  return;
}



void Unwind_140234610(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234617. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x348));
  return;
}



void Unwind_140234620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x340));
  return;
}



void Unwind_140234630(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x168);
  return;
}



void Unwind_140234640(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x290);
  return;
}



void Unwind_140234650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2c0);
  return;
}



void Unwind_140234660(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2a8);
  return;
}



void Unwind_140234670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x218);
  return;
}



void Unwind_140234680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1d0);
  return;
}



void Unwind_140234690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x248);
  return;
}



void Unwind_1402346a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1e8);
  return;
}



void Unwind_1402346b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x200);
  return;
}



void Unwind_1402346c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x230);
  return;
}



void Unwind_1402346d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x260);
  return;
}



void Unwind_1402346e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x138);
  return;
}



void Unwind_1402346f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x180);
  return;
}



undefined * Catch_140234700(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1c0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x330);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryQuest.cpp","CDBLobbyWriteQuery::DBReqReadQuestList",
                0xff,"dbo.up_read_quest_list");
  *(undefined2 *)(param_2 + 0x54) = 0xa3;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x130),1);
  return &DAT_14010bc0f;
}



undefined * Catch_1402347a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x1b8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x330);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryQuest.cpp","CDBLobbyWriteQuery::DBReqReadQuestList",
                0x104,"dbo.up_read_quest_list");
  *(undefined2 *)(param_2 + 0x54) = 0xa3;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x130),1);
  return &DAT_14010bc0f;
}



void Unwind_140234840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140234850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140234860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140234870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140234880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140234890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_1402348a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402348b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402348b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402348c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402348d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402348e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402348f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402348f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140234900(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140234910(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140234920(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140234930(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140234940(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234947. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140234950(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140234960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140234970(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140234980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140234990(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234997. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402349a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402349b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402349c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402349d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402349e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402349e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402349f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140234a00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140234a10(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryQuest.cpp","CDBLobbyWriteQuery::DBReqQuestAdd",0x9f,
                "dbo.up_insert_quest");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14010b072;
}



undefined * Catch_140234ab0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryQuest.cpp","CDBLobbyWriteQuery::DBReqQuestAdd",0xa3,
                "dbo.up_insert_quest");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14010b072;
}



void Unwind_140234b50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140234b60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140234b70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140234b80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234b87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140234b90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140234ba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140234bb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140234bc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234bc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140234bd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140234be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140234bf0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryQuest.cpp","CDBLobbyWriteQuery::DBReqDelQuest",0x72,
                "dbo.up_delete_quest");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14010a93b;
}



undefined * Catch_140234c90(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryQuest.cpp","CDBLobbyWriteQuery::DBReqDelQuest",0x76,
                "dbo.up_delete_quest");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_14010a93b;
}



void Unwind_140234d30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140234d40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140234d50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140234d60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234d67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140234d70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140234d80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140234d90(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryQuest.cpp","CDBLobbyWriteQuery::DBReqAllDelQuest",0x46
                ,"dbo.up_all_delete_quest");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_14010a588;
}



undefined * Catch_140234e30(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryQuest.cpp","CDBLobbyWriteQuery::DBReqAllDelQuest",
                0x4a,"dbo.up_all_delete_quest");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_14010a588;
}



void Unwind_140234ed0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140234ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140234ef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140234f00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234f07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140234f10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140234f20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140234f30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140234f40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234f47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140234f50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140234f60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140234f70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140234f80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234f87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140234f90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140234fa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140234fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140234fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140234fd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140234fd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140234fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140234ff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140235000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140235010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140235020(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235027. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140235030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140235040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140235050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140235060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140235070(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235077. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140235080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140235090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402350a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402350b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402350b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402350c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402350d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402350e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402350f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140235100(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235107. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140235110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140235120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140235130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140235140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140235150(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235157. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140235160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140235170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140235180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140235190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402351a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402351a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402351b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402351c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402351d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailRewardItem",
                0x34a,"dbo.up_insert_item_mail_by_gm");
  *(undefined4 *)(param_2 + 0x40) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x70),1);
  return &DAT_14010a2fa;
}



undefined * Catch_140235260(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailRewardItem",
                0x34e,"dbo.up_insert_item_mail_by_gm");
  *(undefined4 *)(param_2 + 0x40) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x70),1);
  return &DAT_14010a2fa;
}



void Unwind_1402352f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140235300(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140235310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140235320(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140235330(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x70);
  return;
}



void Unwind_140235340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140235350(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140235360(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140235370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140235380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140235390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_1402353a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1e8));
  return;
}



void Unwind_1402353b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402353b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xf0));
  return;
}



void Unwind_1402353c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x1e8));
  return;
}



void Unwind_1402353d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_1402353e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x170);
  return;
}



undefined * Catch_1402353f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x148);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1d0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailNewMailExist",
                0x31e,"dbo.up_read_new_mail_exist");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x1d8),1);
  return &DAT_140109537;
}



undefined * Catch_140235480(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x120);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1d0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailNewMailExist"
                ,0x322,"dbo.up_read_new_mail_exist");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x1d8),1);
  return &DAT_140109537;
}



void Unwind_140235510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140235520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140235530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140235540(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140235550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140235560(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140235570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140235580(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235587. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140235590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402355a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402355b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402355c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402355c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402355d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402355e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402355f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235600(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235607. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140235610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140235630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235640(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235647. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140235650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140235670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235690(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235697. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402356a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402356b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402356c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402356d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402356e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402356e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402356f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140235710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235730(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235737. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140235740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140235760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235770(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235777. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140235780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402357a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402357b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402357c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402357c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402357d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402357e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402357f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235810(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235817. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140235820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140235840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235860(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235867. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140235870(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140235880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140235890(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x90);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x88);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailCreateItem",
                0x2d5,"dbo.up_insert_item_Mail");
  *(undefined4 *)(param_2 + 0x40) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_140108e8c;
}



undefined * Catch_140235930(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xb8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x88);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailCreateItem",
                0x2d9,"dbo.up_insert_item_Mail");
  *(undefined4 *)(param_2 + 0x40) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_140108e8c;
}



void Unwind_1402359d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_1402359e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_1402359f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140235a00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235a07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140235a10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140235a20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140235a30(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailReturn",0x27a,
                "dbo.up_mail_return");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140108098;
}



undefined * Catch_140235ad0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailReturn",0x27e
                ,"dbo.up_mail_return");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140108098;
}



void Unwind_140235b70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140235b80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140235b90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140235ba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140235bb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140235bc0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xb0);
  return;
}



void Unwind_140235bd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x228);
  return;
}



void Unwind_140235be0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140235bf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235bf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x130));
  return;
}



void Unwind_140235c00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140235c10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x200);
  return;
}



void Unwind_140235c20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x140));
  return;
}



void Unwind_140235c30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235c37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x90));
  return;
}



void Unwind_140235c40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x140));
  return;
}



void Unwind_140235c50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x130);
  return;
}



void Unwind_140235c60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2b0);
  return;
}



void Unwind_140235c70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x340);
  return;
}



void Unwind_140235c80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x280);
  return;
}



void Unwind_140235c90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_140235ca0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1e0);
  return;
}



void Unwind_140235cb0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x188);
  return;
}



void Unwind_140235cc0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x150);
  return;
}



void Unwind_140235cd0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x218);
  return;
}



void Unwind_140235ce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3a0);
  return;
}



void Unwind_140235cf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140235d00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x160);
  return;
}



void Unwind_140235d10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c0);
  return;
}



void Unwind_140235d20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x178);
  return;
}



void Unwind_140235d30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x198);
  return;
}



void Unwind_140235d40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x310);
  return;
}



void Unwind_140235d50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140235d60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d0);
  return;
}



void Unwind_140235d70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b0);
  return;
}



void Unwind_140235d80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1f0);
  return;
}



void Unwind_140235d90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x208);
  return;
}



void Unwind_140235da0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x370);
  return;
}



void Unwind_140235db0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x298);
  return;
}



void Unwind_140235dc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2c8);
  return;
}



void Unwind_140235dd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2f8);
  return;
}



void Unwind_140235de0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x328);
  return;
}



void Unwind_140235df0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x358);
  return;
}



undefined * Catch_140235e00(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x270);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x138);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailGoldPayment",
                0x254,"dbo.up_mail_gold_payment");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x148),1);
  return &DAT_140107ced;
}



undefined * Catch_140235e90(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x278);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x138);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailGoldPayment",
                600,"dbo.up_mail_gold_payment");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x148),1);
  return &DAT_140107ced;
}



void Unwind_140235f20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140235f30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140235f40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140235f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140235f60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140235f70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140235f80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140235f90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235f97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140235fa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140235fb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140235fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140235fd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140235fd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140235fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140235ff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140236000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236020(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140236027. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140236030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140236050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236070(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140236077. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140236080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402360a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402360b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402360b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402360c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402360d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402360e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402360f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402360f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140236100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140236120(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236140(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140236147. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140236150(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140236170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236190(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140236197. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402361a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402361b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402361c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402361d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402361d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402361e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402361f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140236200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236210(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140236217. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140236220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140236240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236260(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140236267. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140236270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140236290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402362a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402362b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402362b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402362c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402362d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402362e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402362f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402362f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140236300(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140236310(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140236320(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailItemMove",
                0x1ee,"dbo.up_mail_item_move");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140106c18;
}



undefined * Catch_1402363c0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailItemMove",
                0x1f2,"dbo.up_mail_item_move");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_140106c18;
}



void Unwind_140236460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140236470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140236480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140236490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_1402364a0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xb0);
  return;
}



void Unwind_1402364b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_1402364c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_1402364d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_1402364e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_1402364f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140236500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1a0);
  return;
}



void Unwind_140236510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140236520(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140236527. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x138));
  return;
}



void Unwind_140236530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140236540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x138);
  return;
}



void Unwind_140236550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x358);
  return;
}



void Unwind_140236560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x310);
  return;
}



void Unwind_140236570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2b0);
  return;
}



void Unwind_140236580(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140236590(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x180);
  return;
}



void Unwind_1402365a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b8);
  return;
}



void Unwind_1402365b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1f8);
  return;
}



void Unwind_1402365c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x148);
  return;
}



void Unwind_1402365d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x268);
  return;
}



void Unwind_1402365e0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_1402365f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x158);
  return;
}



void Unwind_140236600(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d8);
  return;
}



void Unwind_140236610(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x170);
  return;
}



void Unwind_140236620(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 400);
  return;
}



void Unwind_140236630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2e0);
  return;
}



void Unwind_140236640(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140236650(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c8);
  return;
}



void Unwind_140236660(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1a8);
  return;
}



void Unwind_140236670(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1e8);
  return;
}



void Unwind_140236680(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x208);
  return;
}



void Unwind_140236690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x340);
  return;
}



void Unwind_1402366a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x280);
  return;
}



void Unwind_1402366b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x298);
  return;
}



void Unwind_1402366c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2c8);
  return;
}



void Unwind_1402366d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2f8);
  return;
}



void Unwind_1402366e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x328);
  return;
}



undefined * Catch_1402366f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x250);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x140);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqReadNewMail",0x1b9
                ,"dbo.up_read_new_mail");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x130),1);
  return &DAT_140105a44;
}



undefined * Catch_140236780(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x260);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x140);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqReadNewMail",
                0x1bd,"dbo.up_read_new_mail");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x130),1);
  return &DAT_140105a44;
}



void Unwind_140236810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140236820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140236830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140236840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140236850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140236860(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140236870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140236880(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140236887. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140236890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402368a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402368b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402368c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402368d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402368d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402368e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402368f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140236900(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailOpenUpdate",
                0x152,"dbo.up_update_mail_open");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140104992;
}



undefined * Catch_1402369a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailOpenUpdate",
                0x156,"dbo.up_update_mail_open");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140104992;
}



void Unwind_140236a40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140236a50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140236a60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140236a70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140236a77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140236a80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140236a90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140236aa0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqClearMailUpdate",
                0x128,"dbo.up_update_clear_mail");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1401045e8;
}



undefined * Catch_140236b40(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqClearMailUpdate",
                300,"dbo.up_update_clear_mail");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1401045e8;
}



void Unwind_140236be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140236bf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140236c00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140236c10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140236c20(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xb0);
  return;
}



void Unwind_140236c30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140236c40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140236c50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140236c60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140236c70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140236c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1e0);
  return;
}



void Unwind_140236c90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140236ca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140236ca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x138));
  return;
}



void Unwind_140236cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140236cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x138);
  return;
}



void Unwind_140236cd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x370);
  return;
}



void Unwind_140236ce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x298);
  return;
}



void Unwind_140236cf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x328);
  return;
}



void Unwind_140236d00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x80);
  return;
}



void Unwind_140236d10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x180);
  return;
}



void Unwind_140236d20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c0);
  return;
}



void Unwind_140236d30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1f8);
  return;
}



void Unwind_140236d40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1a0);
  return;
}



void Unwind_140236d50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x268);
  return;
}



void Unwind_140236d60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x90);
  return;
}



void Unwind_140236d70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x158);
  return;
}



void Unwind_140236d80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x148);
  return;
}



void Unwind_140236d90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x170);
  return;
}



void Unwind_140236da0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 400);
  return;
}



void Unwind_140236db0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x388);
  return;
}



void Unwind_140236dc0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140236dd0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d0);
  return;
}



void Unwind_140236de0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b0);
  return;
}



void Unwind_140236df0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1e8);
  return;
}



void Unwind_140236e00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x208);
  return;
}



void Unwind_140236e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2f8);
  return;
}



void Unwind_140236e20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x358);
  return;
}



void Unwind_140236e30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x280);
  return;
}



void Unwind_140236e40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2b0);
  return;
}



void Unwind_140236e50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2e0);
  return;
}



void Unwind_140236e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x310);
  return;
}



void Unwind_140236e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x340);
  return;
}



undefined * Catch_140236e80(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x250);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x140);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqReadMail",0xff,
                "dbo.up_read_mail");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x130),1);
  return &DAT_140104245;
}



undefined * Catch_140236f10(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x260);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x140);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqReadMail",0x103,
                "dbo.up_read_mail");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x130),1);
  return &DAT_140104245;
}



void Unwind_140236fa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140236fb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140236fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140236fd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140236fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140236ff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237000(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237007. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237010(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140237020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140237060(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237067. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140237070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140237080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237090(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402370a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402370a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402370b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402370c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402370d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402370e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402370e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402370f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237120(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237127. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237160(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237167. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237180(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402371a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402371b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402371b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402371c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402371d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402371e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402371f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237200(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237207. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237250(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237257. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237290(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237297. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402372a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402372b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402372c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402372d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402372e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402372e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402372f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237300(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237320(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237327. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237370(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237377. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237380(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402373a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402373b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402373b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402373c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402373d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402373e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402373f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237400(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237407. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237430(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237440(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237447. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237450(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237470(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237490(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237497. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402374a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402374b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402374c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402374d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402374d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402374e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402374f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237500(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237520(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237527. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237560(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237567. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237590(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402375a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402375b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402375b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402375c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402375d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402375e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402375f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402375f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237600(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140237620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237640(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237647. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140237650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



undefined * Catch_140237670(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  uVar2 = *(undefined8 *)(param_2 + 0x70);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar3 = *(undefined8 *)(param_2 + 0xb0);
  FUN_1400a69d0(uVar3,uVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailAdd",0x97,
                uVar2);
  *(undefined4 *)(param_2 + 0x70) = 0;
  FUN_1400a1e10(uVar3,*(undefined8 *)(param_2 + 0xa8),1);
  return &DAT_140103135;
}



undefined * Catch_140237700(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  
  plVar1 = *(longlong **)(param_2 + 0xc0);
  (**(code **)(*plVar1 + 8))(plVar1);
  uVar2 = *(undefined8 *)(param_2 + 0x70);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar3 = *(undefined8 *)(param_2 + 0xb0);
  FUN_1400a6790(uVar3,plVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqMailAdd",0x9b,
                uVar2);
  *(undefined4 *)(param_2 + 0x70) = 0;
  FUN_1400a1e10(uVar3,*(undefined8 *)(param_2 + 0xa8),1);
  return &DAT_140103135;
}



void Unwind_140237790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_1402377a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_1402377b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402377c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402377c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402377d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402377e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402377f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqDelMail",0x47,
                "dbo.up_delete_mail");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140101368;
}



undefined * Catch_140237890(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryMail.cpp","CDBLobbyWriteQuery::DBReqDelMail",0x4b,
                "dbo.up_delete_mail");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_140101368;
}



void Unwind_140237930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_140237940(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_140237950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140237960(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237967. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140237970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237980(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402379a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402379b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402379b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402379c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402379d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402379e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402379f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402379f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140237a00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237a10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237a20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237a30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237a37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140237a40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237a50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237a60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237a70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237a77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140237a80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237a90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237aa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237ab0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237ab7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140237ac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237ad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140237ae0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x78);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLog.cpp","CDBLobbyWriteQuery::DBReqLOG_AUTH_LOGIN",
                0x196,"dbo.up_insert_log_auth_login");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_1401010f3;
}



undefined * Catch_140237b80(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLog.cpp","CDBLobbyWriteQuery::DBReqLOG_AUTH_LOGIN",
                0x19a,"dbo.up_insert_log_auth_login");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_1401010f3;
}



void Unwind_140237c20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140237c30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140237c40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140237c50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140237c60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237c67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140237c70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140237c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237c90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140237ca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140237cb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237cb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140237cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140237cd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237ce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237cf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237cf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140237d00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237d10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237d20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237d30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237d40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237d47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140237d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237d70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237d80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237d90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237d97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140237da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237db0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237dc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237dd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237dd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140237de0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237df0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237e00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237e10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237e17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140237e20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237e30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237e40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237e50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237e57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140237e60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237e70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237e80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237e90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237e97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140237ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237eb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140237ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237ed0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140237ed7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140237ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140237ef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140237f00(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLog.cpp","CDBLobbyWriteQuery::DBReqLOG_Chat",0x168,
                "dbo.up_insert_log_chat");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1401008ff;
}



undefined * Catch_140237fa0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLog.cpp","CDBLobbyWriteQuery::DBReqLOG_Chat",0x16c,
                "dbo.up_insert_log_chat");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1401008ff;
}



void Unwind_140238040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140238050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140238060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140238070(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140238080(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238087. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140238090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402380a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402380b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402380c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402380c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402380d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402380e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402380f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238100(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238107. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238150(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238157. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402381a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402381a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402381b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402381c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402381d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402381e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402381e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402381f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238220(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238227. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238270(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238277. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402382a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402382b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402382c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402382c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402382d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402382e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402382f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238310(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238317. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140238360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238370(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238377. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238380(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402383a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402383b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402383b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402383c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402383d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402383e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLog.cpp","CDBLobbyWriteQuery::DBReqLOG_Connection",
                0x13b,"dbo.up_insert_log_connection");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1400ffc34;
}



undefined * Catch_140238480(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLog.cpp","CDBLobbyWriteQuery::DBReqLOG_Connection",
                0x13f,"dbo.up_insert_log_connection");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1400ffc34;
}



void Unwind_140238520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_140238530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_140238540(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140238550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140238560(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238567. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140238580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238590(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402385a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402385b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402385b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402385c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402385d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402385e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLog.cpp","CDBLobbyWriteQuery::DBReqLOG_MCU",0x10c,
                "dbo.up_insert_log_mcu");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_1400fecf2;
}



undefined * Catch_140238680(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x78);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLog.cpp","CDBLobbyWriteQuery::DBReqLOG_MCU",0x110,
                "dbo.up_insert_log_mcu");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_1400fecf2;
}



void Unwind_140238720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_140238730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_140238740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140238750(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238757. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140238770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238790(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402387a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402387a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402387b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402387c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402387d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLog.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_PACKET_OVERLOAD",0xe7,
                "dbo.up_insert_log_packet_overload");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_1400fe940;
}



undefined * Catch_140238870(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x78);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLog.cpp",
                "CDBLobbyWriteQuery::DBReqLOG_PACKET_OVERLOAD",0xeb,
                "dbo.up_insert_log_packet_overload");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_1400fe940;
}



void Unwind_140238910(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140238920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140238930(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140238940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140238950(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238957. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140238960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140238970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140238990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402389a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402389a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402389b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402389c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402389d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402389e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402389e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402389f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238a00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238a10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238a20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238a27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238a30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238a40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238a50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238a60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238a67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238a80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238a90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238aa0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238aa7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238ab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238ac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238ad0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238ae0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238ae7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238af0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238b00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238b10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238b20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238b27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238b30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238b40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238b50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238b60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238b70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238b77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238b80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238b90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238ba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238bb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238bc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238bc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238bd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238bf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238c00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238c10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238c17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238c20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238c30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238c40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238c50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238c60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238c67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238c70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238c90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238ca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238ca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238cd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238ce0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238ce7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238cf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238d00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140238d10(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryLog.cpp","CDBLobbyWriteQuery::DBReqLOG_GOLD",0xc1,
                "dbo.up_insert_log_gold");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400fe598;
}



undefined * Catch_140238db0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryLog.cpp","CDBLobbyWriteQuery::DBReqLOG_GOLD",0xc5,
                "dbo.up_insert_log_gold");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400fe598;
}



void Unwind_140238e50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140238e60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140238e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140238e80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238e87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140238ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140238eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238ed0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140238ed7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140238ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140238ef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140238f00(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateUniAccountPlayTime",0x696,
                "up_update_uni_account_playtime");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400fd3eb;
}



undefined * Catch_140238fa0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateUniAccountPlayTime",0x69a,
                "up_update_uni_account_playtime");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400fd3eb;
}



void Unwind_140239040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140239050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140239060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140239070(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239077. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140239080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140239090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402390a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402390b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402390c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402390c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402390d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402390e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402390f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140239100(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140239110(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239117. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140239120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140239130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140239140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140239150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140239160(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239167. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140239170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140239180(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140239190(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateUniAccountInfo",0x66e,
                "dbo.up_update_uni_account_info");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400fd03f;
}



undefined * Catch_140239230(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateUniAccountInfo",0x672,
                "dbo.up_update_uni_account_info");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400fd03f;
}



void Unwind_1402392d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402392e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_1402392f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140239300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140239310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140239320(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140239330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140239340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140239350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140239360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140239370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140239380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x238));
  return;
}



void Unwind_140239390(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239397. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x110));
  return;
}



void Unwind_1402393a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x238));
  return;
}



void Unwind_1402393b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_1402393c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x198);
  return;
}



void Unwind_1402393d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x168);
  return;
}



void Unwind_1402393e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1b0);
  return;
}



void Unwind_1402393f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x180);
  return;
}



undefined * Catch_140239400(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x158);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x220);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqReadUniAccountInfo",0x63e,"dbo.up_read_uni_account_info");
  *(undefined2 *)(param_2 + 0x5c) = 0x95;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x228),1);
  return &DAT_1400fc8b4;
}



undefined * Catch_1402394a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x150);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x220);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqReadUniAccountInfo",0x643,"dbo.up_read_uni_account_info");
  *(undefined2 *)(param_2 + 0x5c) = 0x95;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x228),1);
  return &DAT_1400fc8b4;
}



void Unwind_140239540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140239550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140239560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140239570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140239580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140239590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_1402395a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402395b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402395b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402395c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402395d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402395e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402395f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402395f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140239600(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140239610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140239620(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqDeleteAccountStorageItem",0x5fe,
                "dbo.up_delete_account_storage_item");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400fc1bb;
}



undefined * Catch_1402396c0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqDeleteAccountStorageItem",0x602,
                "dbo.up_delete_account_storage_item");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400fc1bb;
}



void Unwind_140239760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1d8);
  return;
}



void Unwind_140239770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140239780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_140239790(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239797. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402397a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_1402397b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_1402397c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_1402397d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_1402397e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402397e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402397f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_140239800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140239810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_140239820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_140239830(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239837. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140239840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_140239850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140239860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_140239870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_140239880(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239887. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140239890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_1402398a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 200);
  return;
}



void Unwind_1402398b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_1402398c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_1402398d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402398d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_1402398e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x1d0));
  return;
}



void Unwind_1402398f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



undefined * Catch_140239900(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x140);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1c0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqCreateAccountStorageItem",0x5d2,
                "dbo.up_create_account_storage_item");
  *(undefined4 *)(param_2 + 0x1d0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x1c8),1);
  *(undefined2 *)(param_2 + 0x4c) = 0x98;
  return &DAT_1400fbdc5;
}



undefined * Catch_1402399b0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x160);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1c0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqCreateAccountStorageItem",0x5d7,
                "dbo.up_create_account_storage_item");
  *(undefined4 *)(param_2 + 0x1d0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x1c8),1);
  *(undefined2 *)(param_2 + 0x4c) = 0x98;
  return &DAT_1400fbdc5;
}



void Unwind_140239a60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140239a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140239a80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140239a90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239a97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140239aa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140239ab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140239ac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239ad0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239ae0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239ae7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140239af0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239b00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140239b10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140239b20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140239b30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239b37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140239b40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140239b50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140239b60(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateAccountStorageItem",0x579,
                "dbo.up_update_account_storage_item");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400fb5ea;
}



undefined * Catch_140239c00(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateAccountStorageItem",0x57d,
                "dbo.up_update_account_storage_item");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400fb5ea;
}



void Unwind_140239ca0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140239cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140239cc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140239cd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239cd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140239ce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239cf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140239d00(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqUpdateCashProduct"
                ,0x4b2,"dbo.up_update_cash_product_list");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400fa708;
}



undefined * Catch_140239da0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateCashProduct",0x4b6,"dbo.up_update_cash_product_list"
               );
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400fa708;
}



void Unwind_140239e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140239e50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_140239e60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239e67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140239e70(undefined8 param_1,longlong param_2)

{
  FUN_140001080(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140239e80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239e90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239e97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140239ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239eb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x130);
  return;
}



void Unwind_140239ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239ed0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239ed7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140239ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239ef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x160);
  return;
}



void Unwind_140239f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239f10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239f17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140239f20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239f30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140239f40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239f60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239f67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140239f70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239f80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x138);
  return;
}



void Unwind_140239f90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239fa0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239fa7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140239fb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239fc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x158);
  return;
}



void Unwind_140239fd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239fe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140239ff0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140239ff7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_14023a000(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023a010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x148);
  return;
}



void Unwind_14023a020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023a030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023a040(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023a047. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_14023a050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023a060(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x168);
  return;
}



void Unwind_14023a070(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023a080(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023a090(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023a097. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_14023a0a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023a0b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



undefined * Catch_14023a0c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1a8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x70);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqInsertCashProduct"
                ,0x482,"dbo.up_insert_cash_product_list");
  *(undefined4 *)(param_2 + 0x60) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x68),1);
  return &DAT_1400fa3bb;
}



undefined * Catch_14023a150(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x1d8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x70);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqInsertCashProduct",0x486,"dbo.up_insert_cash_product_list"
               );
  *(undefined4 *)(param_2 + 0x60) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x68),1);
  return &DAT_1400fa3bb;
}



void Unwind_14023a1e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_14023a1f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_14023a200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_14023a210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_14023a220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_14023a230(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xa0);
  return;
}



void Unwind_14023a240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_14023a250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_14023a260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_14023a270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_14023a280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x158);
  return;
}



void Unwind_14023a290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_14023a2a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023a2a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x128));
  return;
}



void Unwind_14023a2b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_14023a2c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_14023a2d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x238);
  return;
}



void Unwind_14023a2e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x268);
  return;
}



void Unwind_14023a2f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1d8);
  return;
}



void Unwind_14023a300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x220);
  return;
}



void Unwind_14023a310(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_14023a320(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x170);
  return;
}



void Unwind_14023a330(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x138);
  return;
}



void Unwind_14023a340(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x148);
  return;
}



void Unwind_14023a350(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x160);
  return;
}



void Unwind_14023a360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x280);
  return;
}



void Unwind_14023a370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1f0);
  return;
}



void Unwind_14023a380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x208);
  return;
}



undefined * Catch_14023a390(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x188);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x120);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqReadCashProductList",0x433,"dbo.up_read_cash_product_list"
               );
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x130),1);
  return &DAT_1400f94b7;
}



undefined * Catch_14023a420(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x1c8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x120);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqReadCashProductList",0x437,"dbo.up_read_cash_product_list"
               );
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x130),1);
  return &DAT_1400f94b7;
}



void Unwind_14023a4b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_14023a4c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_14023a4d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_14023a4e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_14023a4f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023a500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023a510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023a520(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023a527. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023a530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023a540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023a550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023a560(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023a567. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023a570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023a580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023a590(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023a5a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023a5b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023a5b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023a5c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023a5d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023a5e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqUpdateItemBinds",
                0x3b0,"dbo.up_upate_item_binds");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f8897;
}



undefined * Catch_14023a680(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqUpdateItemBinds",
                0x3b4,"dbo.up_upate_item_binds");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f8897;
}



void Unwind_14023a720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023a730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023a740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023a750(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023a757. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023a760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023a770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023a780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023a790(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023a797. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023a7a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023a7b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023a7c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023a7d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023a7d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023a7e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023a7f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023a800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023a810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023a820(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023a827. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023a830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023a840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023a850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023a860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023a870(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023a877. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023a880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023a890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023a8a0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqMoveEquipToCash",
                0x387,"dbo.up_item_move_equip_to_cash");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f83b4;
}



undefined * Catch_14023a940(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqMoveEquipToCash",
                0x38b,"dbo.up_item_move_equip_to_cash");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f83b4;
}



void Unwind_14023a9e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023a9f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023aa00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023aa10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023aa17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023aa20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023aa30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023aa40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023aa50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023aa57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023aa60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023aa70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023aa80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023aa90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023aa97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023aaa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023aab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023aac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023aad0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023aae0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023aae7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023aaf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ab00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ab10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ab20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ab30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ab37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023ab40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ab50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023ab60(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqMoveEquipToInventory",0x35b,
                "dbo.up_item_move_equip_to_inventory");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f7c74;
}



undefined * Catch_14023ac00(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqMoveEquipToInventory",0x35f,
                "dbo.up_item_move_equip_to_inventory");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f7c74;
}



void Unwind_14023aca0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023acb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023acc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023acd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023acd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023ace0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023acf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ad00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023ad10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ad17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023ad20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023ad30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ad40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ad50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ad57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023ad60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ad70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ad80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ad90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ada0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ada7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023adb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023adc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023add0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ade0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023adf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023adf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023ae00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ae10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023ae20(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqMoveInventoryToEquip",0x32f,
                "dbo.up_item_move_inventory_to_equip");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f7534;
}



undefined * Catch_14023aec0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqMoveInventoryToEquip",0x333,
                "dbo.up_item_move_inventory_to_equip");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f7534;
}



void Unwind_14023af60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023af70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023af80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023af90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023af97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023afa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023afb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023afc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023afd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023afd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023afe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023aff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023b000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b010(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b017. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023b020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023b040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b060(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b067. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023b070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023b090(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b0a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b0b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b0b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023b0c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b0d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023b0e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqMoveCashToEquip",
                0x303,"dbo.up_item_move_cash_to_equip");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f6df4;
}



undefined * Catch_14023b180(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqMoveCashToEquip",
                0x307,"dbo.up_item_move_cash_to_equip");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f6df4;
}



void Unwind_14023b220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023b230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023b240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023b250(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b257. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023b260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023b270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023b280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023b290(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b297. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023b2a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023b2b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023b2c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b2d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b2d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023b2e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b2f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023b300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b320(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b327. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023b330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023b350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b370(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b377. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023b380(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023b3a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b3b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b3c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b3c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023b3d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023b3e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023b3f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqMoveCashToEquipCostumePack",0x2d7,
                "dbo.up_item_move_cash_to_equip_costumepack");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f66c2;
}



undefined * Catch_14023b490(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqMoveCashToEquipCostumePack",0x2db,
                "dbo.up_item_move_cash_to_equip_costumepack");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f66c2;
}



void Unwind_14023b530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14023b540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14023b550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023b560(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b567. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023b570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023b580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023b590(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqItemRemainTimeUpdate",0x2ac,
                "dbo.up_update_remaintime_item");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400f5e58;
}



undefined * Catch_14023b630(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqItemRemainTimeUpdate",0x2b0,
                "dbo.up_update_remaintime_item");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400f5e58;
}



void Unwind_14023b6d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023b6e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023b6f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023b700(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b707. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023b710(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023b720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023b730(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023b740(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b747. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023b750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023b760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023b770(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqItemUpdate",0x284,
                "dbo.up_item_update");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f5bdc;
}



undefined * Catch_14023b810(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqItemUpdate",0x288
                ,"dbo.up_item_update");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f5bdc;
}



void Unwind_14023b8b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14023b8c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14023b8d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023b8e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b8e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14023b8f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14023b900(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023b910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14023b920(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14023b930(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b937. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14023b940(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14023b950(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023b960(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023b970(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023b980(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b987. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14023b990(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023b9a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023b9b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023b9c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023b9d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023b9d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14023b9e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023b9f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ba00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023ba10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023ba20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ba27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14023ba30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023ba40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ba50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023ba60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023ba70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ba77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14023ba80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023ba90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023baa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023bab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023bac0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023bac7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14023bad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023bae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023baf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023bb00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023bb10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023bb17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14023bb20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023bb30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023bb40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023bb50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023bb60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023bb67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14023bb70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023bb80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023bb90(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqItemUpdateItemCodeOption",0x23c,
                "dbo.up_item_update_itemcode_option");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400f5817;
}



undefined * Catch_14023bc30(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x88);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqItemUpdateItemCodeOption",0x240,
                "dbo.up_item_update_itemcode_option");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400f5817;
}



void Unwind_14023bcd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023bce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023bcf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023bd00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023bd07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023bd10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023bd20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023bd30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023bd40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023bd47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023bd50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023bd60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023bd70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023bd80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023bd87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023bd90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023bda0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023bdb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023bdc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023bdd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023bdd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023bde0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023bdf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023be00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023be10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023be20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023be27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023be30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023be40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023be50(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqItemPageUpdate",
                0x20e,"dbo.up_item_page_slot_update");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f4c54;
}



undefined * Catch_14023bef0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqItemPageUpdate",
                0x212,"dbo.up_item_page_slot_update");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f4c54;
}



void Unwind_14023bf90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023bfa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023bfb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023bfc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023bfc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023bfd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023bfe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023bff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023c000(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c007. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023c010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023c020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023c030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023c040(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c047. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023c050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023c060(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023c070(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023c080(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023c090(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c097. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023c0a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023c0b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023c0c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023c0d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023c0e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c0e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023c0f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023c100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023c110(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqItemPageOwnerUpdate",0x1e2,"dbo.up_item_page_owner_update"
               );
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f4514;
}



undefined * Catch_14023c1b0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqItemPageOwnerUpdate",0x1e6,"dbo.up_item_page_owner_update"
               );
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f4514;
}



void Unwind_14023c250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023c260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023c270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023c280(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c287. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023c290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023c2a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023c2b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023c2c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c2c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023c2d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023c2e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023c2f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14023c300(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c307. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023c310(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14023c320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023c330(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqItemOwnerUpdate",
                0x1b6,"dbo.up_item_owner_update");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f3dd7;
}



undefined * Catch_14023c3d0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqItemOwnerUpdate",
                0x1ba,"dbo.up_item_owner_update");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400f3dd7;
}



void Unwind_14023c470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14023c480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14023c490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023c4a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c4a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023c4b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023c4c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023c4d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023c4e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023c4f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c4f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023c500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023c510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023c520(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqItemDurUpdate",
                0x18c,"dbo.up_item_durability_update");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400f390b;
}



undefined * Catch_14023c5c0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqItemDurUpdate",
                400,"dbo.up_item_durability_update");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400f390b;
}



void Unwind_14023c660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x218);
  return;
}



void Unwind_14023c670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14023c680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c690(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c697. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023c6a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c6b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_14023c6c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c6d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c6d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_14023c6e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c6f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14023c700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c720(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c727. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xa0));
  return;
}



void Unwind_14023c730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xc0);
  return;
}



void Unwind_14023c750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c770(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c777. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14023c780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_14023c7a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c7b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c7c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c7c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14023c7d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c7e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_14023c7f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c810(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023c817. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_14023c820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_14023c830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 200);
  return;
}



undefined * Catch_14023c840(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x188);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x200);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqItemCreate",0x158,
                "dbo.up_create_item");
  *(undefined4 *)(param_2 + 0x210) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x208),1);
  *(undefined2 *)(param_2 + 0x4c) = 0x98;
  return &DAT_1400f3515;
}



undefined * Catch_14023c8f0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x180);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x200);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp","CDBLobbyWriteQuery::DBReqItemCreate",0x15d
                ,"dbo.up_create_item");
  *(undefined4 *)(param_2 + 0x210) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x208),1);
  *(undefined2 *)(param_2 + 0x4c) = 0x98;
  return &DAT_1400f3515;
}



void Unwind_14023c9a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_14023c9b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_14023c9c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_14023c9d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_14023c9e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_14023c9f0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x80);
  return;
}



void Unwind_14023ca00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023ca10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x158);
  return;
}



void Unwind_14023ca20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x128);
  return;
}



void Unwind_14023ca30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x140);
  return;
}



undefined * Catch_14023ca40(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x118);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1b0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqReadAllItemDropGroup",0xe3,
                "dbo.up_read_all_item_dropgroup");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x70),1);
  return &DAT_1400f2aea;
}



undefined * Catch_14023cad0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x120);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1b0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqReadAllItemDropGroup",0xe7,
                "dbo.up_read_all_item_dropgroup");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x70),1);
  return &DAT_1400f2aea;
}



void Unwind_14023cb60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_14023cb70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_14023cb80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_14023cb90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_14023cba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14023cbb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_14023cbc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_14023cbd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_14023cbe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_14023cbf0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xb0);
  return;
}



void Unwind_14023cc00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_14023cc10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_14023cc20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_14023cc30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_14023cc40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x130);
  return;
}



void Unwind_14023cc50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x2b0));
  return;
}



void Unwind_14023cc60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023cc67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x2b8));
  return;
}



void Unwind_14023cc70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x2b0));
  return;
}



void Unwind_14023cc80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x138);
  return;
}



void Unwind_14023cc90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c8);
  return;
}



void Unwind_14023cca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x210);
  return;
}



void Unwind_14023ccb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x240);
  return;
}



void Unwind_14023ccc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1f8);
  return;
}



void Unwind_14023ccd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x180);
  return;
}



void Unwind_14023cce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x228);
  return;
}



void Unwind_14023ccf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x198);
  return;
}



void Unwind_14023cd00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1b0);
  return;
}



void Unwind_14023cd10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1e0);
  return;
}



undefined * Catch_14023cd20(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x178);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x2a0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryInventory.cpp",
                "CDBLobbyWriteQuery::DBReqReadItemEquipSimple",0x2ac,"dbo.up_read_item_equip_simple"
               );
  *(undefined2 *)(param_2 + 0x8c) = 0xba;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x78),1);
  return &DAT_1400f2391;
}



undefined * Catch_14023cdc0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x150);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x2a0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryInventory.cpp",
                "CDBLobbyWriteQuery::DBReqReadItemEquipSimple",0x2b1,"dbo.up_read_item_equip_simple"
               );
  *(undefined2 *)(param_2 + 0x8c) = 0xba;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x78),1);
  return &DAT_1400f2391;
}



void Unwind_14023ce60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_14023ce70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_14023ce80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_14023ce90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_14023cea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ceb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xc0);
  return;
}



void Unwind_14023cec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 200);
  return;
}



void Unwind_14023ced0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe0);
  return;
}



void Unwind_14023cee0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf8);
  return;
}



void Unwind_14023cef0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xc0);
  return;
}



void Unwind_14023cf00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x158);
  return;
}



void Unwind_14023cf10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023cf20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023cf27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xa8));
  return;
}



void Unwind_14023cf30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023cf40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x178);
  return;
}



void Unwind_14023cf50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_14023cf60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023cf67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023cf70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_14023cf80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x168);
  return;
}



void Unwind_14023cf90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_14023cfa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_14023cfb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023cfb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xa0));
  return;
}



void Unwind_14023cfc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_14023cfd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x140);
  return;
}



void Unwind_14023cfe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_14023cff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_14023d000(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023d007. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x98));
  return;
}



void Unwind_14023d010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_14023d020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_14023d030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x220);
  return;
}



undefined * Catch_14023d040(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1b8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x280);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqInvenSlot",0xb7b,
                "dbo.up_read_item_inventory_slot");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x288),1);
  return &DAT_1400ef734;
}



undefined * Catch_14023d0d0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x1e8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x280);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqInvenSlot",0xb7f
                ,"dbo.up_read_item_inventory_slot");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x288),1);
  return &DAT_1400ef734;
}



void Unwind_14023d160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xc0);
  return;
}



void Unwind_14023d170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 200);
  return;
}



void Unwind_14023d180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe0);
  return;
}



void Unwind_14023d190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf8);
  return;
}



void Unwind_14023d1a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14023d1b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14023d1c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14023d1d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_14023d1e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_14023d1f0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_14023d200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_14023d210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x260));
  return;
}



void Unwind_14023d220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x260));
  return;
}



void Unwind_14023d230(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023d237. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x268));
  return;
}



void Unwind_14023d240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x260));
  return;
}



void Unwind_14023d250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_14023d260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1d8);
  return;
}



void Unwind_14023d270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1f0);
  return;
}



void Unwind_14023d280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x160);
  return;
}



void Unwind_14023d290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a8);
  return;
}



void Unwind_14023d2a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x178);
  return;
}



void Unwind_14023d2b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 400);
  return;
}



void Unwind_14023d2c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c0);
  return;
}



undefined * Catch_14023d2d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x140);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x250);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildLoadInfo",
                0xb34,"dbo.up_get_guild_load_info");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x88),1);
  return &DAT_1400eec74;
}



undefined * Catch_14023d360(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x148);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x250);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildLoadInfo",
                0xb38,"dbo.up_get_guild_load_info");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x88),1);
  return &DAT_1400eec74;
}



void Unwind_14023d3f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14023d400(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14023d410(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_14023d420(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_14023d430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023d440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_14023d450(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_14023d460(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14023d470(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_14023d480(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x70);
  return;
}



void Unwind_14023d490(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_14023d4a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_14023d4b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14023d4c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_14023d4d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_14023d4e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1b8));
  return;
}



void Unwind_14023d4f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1b8));
  return;
}



void Unwind_14023d500(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023d507. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xf0));
  return;
}



void Unwind_14023d510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x1b8));
  return;
}



void Unwind_14023d520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_14023d530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x148);
  return;
}



undefined * Catch_14023d540(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x130);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1a0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildTotalCnt",
                0xad6,"dbo.up_get_guild_total_count");
  *(undefined2 *)(param_2 + 0x54) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x1a8),1);
  return &DAT_1400ee239;
}



undefined * Catch_14023d5e0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x128);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1a0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildTotalCnt",
                0xadb,"dbo.up_get_guild_total_count");
  *(undefined2 *)(param_2 + 0x54) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x1a8),1);
  return &DAT_1400ee239;
}



void Unwind_14023d680(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_14023d690(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_14023d6a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14023d6b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_14023d6c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023d6d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023d6e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023d6f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023d6f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023d700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023d710(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023d720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023d730(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023d737. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023d740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023d750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023d760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023d770(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023d780(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023d787. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023d790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023d7a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023d7b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023d7c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023d7d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023d7d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023d7e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023d7f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023d800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023d810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023d820(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023d827. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023d830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023d840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023d850(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageItemUpdate",0xa97,
                "dbo.up_update_guild_storage_item");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400edc42;
}



undefined * Catch_14023d8f0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageItemUpdate",0xa9b,
                "dbo.up_update_guild_storage_item");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400edc42;
}



void Unwind_14023d990(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023d9a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023d9b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023d9c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023d9c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14023d9d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023d9e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023d9f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14023da00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023da07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14023da10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14023da20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023da30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023da40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023da50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023da57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14023da60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023da70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023da80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023da90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023daa0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023daa7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14023dab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023dac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023dad0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023dae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023daf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023daf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14023db00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023db10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023db20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023db30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023db40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023db47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14023db50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023db60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023db70(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageExtension",0xa6e,
                "dbo.up_guild_storage_extension");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400ed50c;
}



undefined * Catch_14023dc10(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageExtension",0xa72,
                "dbo.up_guild_storage_extension");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400ed50c;
}



void Unwind_14023dcb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023dcc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023dcd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023dce0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023dce7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023dcf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023dd00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023dd10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023dd20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023dd27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023dd30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023dd40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023dd50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023dd60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023dd70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023dd77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023dd80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023dd90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023dda0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ddb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ddc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ddc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023ddd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023dde0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023ddf0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqCreateGuildStorage",0xa3e,"dbo.up_create_guild_storage");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400ecc84;
}



undefined * Catch_14023de90(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqCreateGuildStorage",0xa42,"dbo.up_create_guild_storage");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400ecc84;
}



void Unwind_14023df30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_14023df40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_14023df50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023df60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023df67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14023df70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14023df80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023df90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14023dfa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14023dfb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023dfb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14023dfc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14023dfd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023dfe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023dff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_14023e000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023e010(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e017. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14023e020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023e030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023e040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023e050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023e060(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e067. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14023e070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023e080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023e090(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023e0a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023e0b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e0b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14023e0c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023e0d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023e0e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x90);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageChange",0xa10,
                "dbo.up_update_guild_storage_info");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1400ec67c;
}



undefined * Catch_14023e180(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageChange",0xa14,
                "dbo.up_update_guild_storage_info");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1400ec67c;
}



void Unwind_14023e220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023e230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14023e240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14023e250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_14023e260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_14023e270(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_14023e280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14023e290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14023e2a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_14023e2b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_14023e2c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_14023e2d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x238));
  return;
}



void Unwind_14023e2e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e2e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x110));
  return;
}



void Unwind_14023e2f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x238));
  return;
}



void Unwind_14023e300(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_14023e310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x198);
  return;
}



void Unwind_14023e320(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x168);
  return;
}



void Unwind_14023e330(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1b0);
  return;
}



void Unwind_14023e340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x180);
  return;
}



undefined * Catch_14023e350(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x158);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x220);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildStorageInfo"
                ,0x9db,"dbo.up_get_guild_storage_info");
  *(undefined2 *)(param_2 + 0x5c) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x228),1);
  return &DAT_1400ebd8c;
}



undefined * Catch_14023e3f0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x150);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x220);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageInfo",0x9e0,"dbo.up_get_guild_storage_info");
  *(undefined2 *)(param_2 + 0x5c) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x228),1);
  return &DAT_1400ebd8c;
}



void Unwind_14023e490(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14023e4a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14023e4b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_14023e4c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_14023e4d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023e4e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023e4f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023e500(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e507. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023e510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023e520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023e530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023e540(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e547. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023e550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023e560(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023e570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14023e580(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e587. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023e590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14023e5a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023e5b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14023e5c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14023e5d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e5d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023e5e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14023e5f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023e600(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageItemChangeCount",0x98e,
                "dbo.up_update_guild_storage_item_change_count");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400eb67f;
}



undefined * Catch_14023e6a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageItemChangeCount",0x992,
                "dbo.up_update_guild_storage_item_change_count");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400eb67f;
}



void Unwind_14023e740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023e750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023e760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023e770(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e777. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023e780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023e790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023e7a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023e7b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e7b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023e7c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023e7d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023e7e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStoragePopItem",0x960,"dbo.up_delet_guild_storage");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400eb08b;
}



undefined * Catch_14023e880(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStoragePopItem",0x964,"dbo.up_delet_guild_storage");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400eb08b;
}



void Unwind_14023e920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023e930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023e940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023e950(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e957. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023e960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023e970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023e980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023e990(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e997. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023e9a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023e9b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023e9c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023e9d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023e9e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023e9e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023e9f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ea00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ea10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ea20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ea30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ea37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023ea40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ea50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ea60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ea70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ea80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ea87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023ea90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023eaa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023eab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023eac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ead0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ead7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023eae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023eaf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023eb00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023eb10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023eb17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023eb20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023eb30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023eb40(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStoragePushItem",0x934,"dbo.up_insert_guild_storage")
  ;
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400eace1;
}



undefined * Catch_14023ebe0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStoragePushItem",0x938,"dbo.up_insert_guild_storage")
  ;
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400eace1;
}



void Unwind_14023ec80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023ec90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023eca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023ecb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ecb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023ecc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023ecd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ece0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023ecf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ecf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023ed00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023ed10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ed20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ed30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ed40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ed47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023ed50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ed60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023ed70(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStoragePayment",0x8d7,
                "dbo.up_update_guild_storage_payment");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400ea336;
}



undefined * Catch_14023ee10(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStoragePayment",0x8db,
                "dbo.up_update_guild_storage_payment");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400ea336;
}



void Unwind_14023eeb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023eec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023eed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023eee0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023eee7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023eef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023ef00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ef10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023ef20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ef27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023ef30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023ef40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ef50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ef60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ef70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ef77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023ef80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ef90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023efa0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageDeposit",0x8aa,
                "dbo.up_update_guild_storage_deposit");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400e9e56;
}



undefined * Catch_14023f040(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageDeposit",0x8ae,
                "dbo.up_update_guild_storage_deposit");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400e9e56;
}



void Unwind_14023f0e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14023f0f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14023f100(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023f110(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023f117. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023f120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023f130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023f140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023f150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023f160(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023f167. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023f170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023f180(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023f190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023f1a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023f1a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023f1b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023f1c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023f1d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023f1e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023f1e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023f1f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023f200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023f210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023f220(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023f227. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023f230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023f240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023f250(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageUseLogInsert",0x87d,
                "dbo.up_insert_guild_storage_use_log");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400e9980;
}



undefined * Catch_14023f2f0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageUseLogInsert",0x881,
                "dbo.up_insert_guild_storage_use_log");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400e9980;
}



void Unwind_14023f390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14023f3a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xc0);
  return;
}



void Unwind_14023f3b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 200);
  return;
}



void Unwind_14023f3c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe0);
  return;
}



void Unwind_14023f3d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf8);
  return;
}



void Unwind_14023f3e0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xc0);
  return;
}



void Unwind_14023f3f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xc0);
  return;
}



void Unwind_14023f400(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 200);
  return;
}



void Unwind_14023f410(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe0);
  return;
}



void Unwind_14023f420(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf8);
  return;
}



void Unwind_14023f430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1f0);
  return;
}



void Unwind_14023f440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_14023f450(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023f457. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x140));
  return;
}



void Unwind_14023f460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_14023f470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x140);
  return;
}



void Unwind_14023f480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x270);
  return;
}



void Unwind_14023f490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 600);
  return;
}



void Unwind_14023f4a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_14023f4b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d0);
  return;
}



void Unwind_14023f4c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x170);
  return;
}



void Unwind_14023f4d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 400);
  return;
}



void Unwind_14023f4e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x208);
  return;
}



void Unwind_14023f4f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x288);
  return;
}



void Unwind_14023f500(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_14023f510(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x150);
  return;
}



void Unwind_14023f520(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b0);
  return;
}



void Unwind_14023f530(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x160);
  return;
}



void Unwind_14023f540(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x180);
  return;
}



void Unwind_14023f550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2b8);
  return;
}



void Unwind_14023f560(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa0);
  return;
}



void Unwind_14023f570(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c0);
  return;
}



void Unwind_14023f580(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1a0);
  return;
}



void Unwind_14023f590(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1e0);
  return;
}



void Unwind_14023f5a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1f8);
  return;
}



undefined * Catch_14023f5b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x248);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x90);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildUseLog",
                0x7ae,"dbo.up_get_guild_storage_use_list");
  *(undefined2 *)(param_2 + 0x74) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x148),1);
  return &DAT_1400e86db;
}



undefined * Catch_14023f650(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x220);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x90);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildUseLog",
                0x7b3,"dbo.up_get_guild_storage_use_list");
  *(undefined2 *)(param_2 + 0x74) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x148),1);
  return &DAT_1400e86db;
}



void Unwind_14023f6f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xc0);
  return;
}



void Unwind_14023f700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 200);
  return;
}



void Unwind_14023f710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe0);
  return;
}



void Unwind_14023f720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf8);
  return;
}



void Unwind_14023f730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14023f740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_14023f750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_14023f760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_14023f770(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_14023f780(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xa0);
  return;
}



void Unwind_14023f790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_14023f7a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_14023f7b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_14023f7c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_14023f7d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_14023f7e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x230));
  return;
}



void Unwind_14023f7f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023f7f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x238));
  return;
}



void Unwind_14023f800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x230));
  return;
}



void Unwind_14023f810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x140);
  return;
}



void Unwind_14023f820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x178);
  return;
}



void Unwind_14023f830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c0);
  return;
}



void Unwind_14023f840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a8);
  return;
}



undefined * Catch_14023f850(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x170);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x220);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildSkillList",
                0x741,"dbo.up_get_guild_skill");
  *(undefined2 *)(param_2 + 0x74) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x120),1);
  return &DAT_1400e76dc;
}



undefined * Catch_14023f8f0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x168);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x220);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildSkillList",
                0x746,"dbo.up_get_guild_skill");
  *(undefined2 *)(param_2 + 0x74) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x120),1);
  return &DAT_1400e76dc;
}



void Unwind_14023f990(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_14023f9a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_14023f9b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_14023f9c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_14023f9d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023f9e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_14023f9f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_14023fa00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_14023fa10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_14023fa20(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xb0);
  return;
}



void Unwind_14023fa30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_14023fa40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_14023fa50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_14023fa60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_14023fa70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1a0);
  return;
}



void Unwind_14023fa80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14023fa90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023fa97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x138));
  return;
}



void Unwind_14023faa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14023fab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x198);
  return;
}



void Unwind_14023fac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023fad0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023fad7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14023fae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023faf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x178);
  return;
}



void Unwind_14023fb00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023fb10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023fb20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023fb27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_14023fb30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14023fb40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x188);
  return;
}



void Unwind_14023fb50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14023fb60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14023fb70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023fb77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14023fb80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14023fb90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x160);
  return;
}



void Unwind_14023fba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_14023fbb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_14023fbc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023fbc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14023fbd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_14023fbe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 400);
  return;
}



void Unwind_14023fbf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_14023fc00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_14023fc10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023fc17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xa0));
  return;
}



void Unwind_14023fc20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_14023fc30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x180);
  return;
}



void Unwind_14023fc40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x130));
  return;
}



void Unwind_14023fc50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x130));
  return;
}



void Unwind_14023fc60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023fc67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x98));
  return;
}



void Unwind_14023fc70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x130));
  return;
}



void Unwind_14023fc80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x138);
  return;
}



void Unwind_14023fc90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c0);
  return;
}



undefined * Catch_14023fca0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x240);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildSkillLearn",
                0x6ad,"dbo.up_insert_guild_skill");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  *(undefined2 *)(param_2 + 0x2cc) = 0xffff;
  return &DAT_1400e6d3b;
}



undefined * Catch_14023fd30(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x268);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildSkillLearn"
                ,0x6b2,"dbo.up_insert_guild_skill");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  *(undefined2 *)(param_2 + 0x2cc) = 0xffff;
  return &DAT_1400e6d3b;
}



void Unwind_14023fdd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_14023fde0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_14023fdf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_14023fe00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_14023fe10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14023fe20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14023fe30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14023fe40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023fe47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023fe50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14023fe60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023fe70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023fe80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023fe87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14023fe90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14023fea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023feb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023fec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_14023fed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023fee0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023fee7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023fef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ff00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ff10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ff20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ff30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ff37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023ff40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ff50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14023ff60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ff70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ff80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014023ff87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14023ff90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14023ffa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14023ffb0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildLevelUp",
                0x658,"dbo.up_update_guild_level");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400e5e8f;
}



undefined * Catch_140240050(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildLevelUp",
                0x65c,"dbo.up_update_guild_level");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400e5e8f;
}



void Unwind_1402400f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140240100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140240110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140240120(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140240130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140240140(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xb0);
  return;
}



void Unwind_140240150(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140240160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140240170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140240180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140240190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x140);
  return;
}



void Unwind_1402401a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_1402401b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402401b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x138));
  return;
}



void Unwind_1402401c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_1402401d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x138);
  return;
}



void Unwind_1402401e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x230);
  return;
}



void Unwind_1402401f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x218);
  return;
}



void Unwind_140240200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x248);
  return;
}



void Unwind_140240210(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140240220(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x198);
  return;
}



void Unwind_140240230(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x158);
  return;
}



void Unwind_140240240(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x178);
  return;
}



void Unwind_140240250(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b8);
  return;
}



void Unwind_140240260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x278);
  return;
}



void Unwind_140240270(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x98);
  return;
}



void Unwind_140240280(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x168);
  return;
}



void Unwind_140240290(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x148);
  return;
}



void Unwind_1402402a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x188);
  return;
}



void Unwind_1402402b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1a8);
  return;
}



undefined * Catch_1402402c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1d0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x90);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildIncreaseExpList",0x622,
                "dbo.up_get_guild_increase_exp");
  *(undefined2 *)(param_2 + 0x74) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x130),1);
  return &DAT_1400e558e;
}



undefined * Catch_140240360(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x210);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x90);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildIncreaseExpList",0x627,
                "dbo.up_get_guild_increase_exp");
  *(undefined2 *)(param_2 + 0x74) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x130),1);
  return &DAT_1400e558e;
}



void Unwind_140240400(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140240410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140240420(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140240430(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140240440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140240450(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140240460(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140240470(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140240477. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140240480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140240490(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402404a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402404b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402404b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402404c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402404d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402404e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402404f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140240500(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140240507. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140240510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140240520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140240530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140240540(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140240547. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140240550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140240560(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140240570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140240580(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140240587. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140240590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402405a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402405b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildIncreaseExp"
                ,0x5bf,"dbo.up_insert_guild_increase_exp");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400e48c1;
}



undefined * Catch_140240650(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildIncreaseExp",0x5c3,"dbo.up_insert_guild_increase_exp"
               );
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400e48c1;
}



void Unwind_1402406f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140240700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140240710(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140240720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140240730(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140240740(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x70);
  return;
}



void Unwind_140240750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140240760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140240770(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140240780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140240790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x188);
  return;
}



void Unwind_1402407a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x4a0));
  return;
}



void Unwind_1402407b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402407b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x4a8));
  return;
}



void Unwind_1402407c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x4a0));
  return;
}



void Unwind_1402407d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x170);
  return;
}



void Unwind_1402407e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x408);
  return;
}



void Unwind_1402407f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x438);
  return;
}



void Unwind_140240800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3f0);
  return;
}



void Unwind_140240810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x210);
  return;
}



void Unwind_140240820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x330);
  return;
}



void Unwind_140240830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c8);
  return;
}



void Unwind_140240840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3c0);
  return;
}



void Unwind_140240850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x270);
  return;
}



void Unwind_140240860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x360);
  return;
}



void Unwind_140240870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2a0);
  return;
}



void Unwind_140240880(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x420);
  return;
}



void Unwind_140240890(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2d0);
  return;
}



void Unwind_1402408a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x390);
  return;
}



void Unwind_1402408b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x300);
  return;
}



void Unwind_1402408c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1e0);
  return;
}



void Unwind_1402408d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1f8);
  return;
}



void Unwind_1402408e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x228);
  return;
}



void Unwind_1402408f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 600);
  return;
}



void Unwind_140240900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x288);
  return;
}



void Unwind_140240910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2b8);
  return;
}



void Unwind_140240920(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2e8);
  return;
}



void Unwind_140240930(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x318);
  return;
}



void Unwind_140240940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x348);
  return;
}



void Unwind_140240950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x378);
  return;
}



void Unwind_140240960(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3a8);
  return;
}



void Unwind_140240970(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3d8);
  return;
}



undefined * Catch_140240980(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1b0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x490);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqOtherCharacterEquipItem",0x589,
                "dbo.up_read_other_character_item_equip");
  *(undefined2 *)(param_2 + 0x54) = 0xc5;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x168),1);
  return &DAT_1400e4053;
}



undefined * Catch_140240a20(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 400);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x490);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqOtherCharacterEquipItem",0x58e,
                "dbo.up_read_other_character_item_equip");
  *(undefined2 *)(param_2 + 0x54) = 0xc5;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x168),1);
  return &DAT_1400e4053;
}



void Unwind_140240ac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140240ad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140240ae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140240af0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140240b00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140240b10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140240b20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140240b30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140240b40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140240b50(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x80);
  return;
}



void Unwind_140240b60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140240b70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140240b80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140240b90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140240ba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140240bb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140240bc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140240bc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x108));
  return;
}



void Unwind_140240bd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140240be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x140);
  return;
}



void Unwind_140240bf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_140240c00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_140240c10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140240c17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140240c20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_140240c30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140240c40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1b8);
  return;
}



void Unwind_140240c50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140240c60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x158);
  return;
}



void Unwind_140240c70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x178);
  return;
}



void Unwind_140240c80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x148);
  return;
}



void Unwind_140240c90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x168);
  return;
}



void Unwind_140240ca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1e8);
  return;
}



void Unwind_140240cb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x218);
  return;
}



void Unwind_140240cc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1d0);
  return;
}



undefined * Catch_140240cd0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1a8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqOtherCharacterInfo",0x51a,"dbo.up_get_other_character");
  *(undefined2 *)(param_2 + 0x23c) = 0xc3;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x58),1);
  return &DAT_1400e2f64;
}



undefined * Catch_140240d70(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x1a0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqOtherCharacterInfo",0x51f,"dbo.up_get_other_character");
  *(undefined2 *)(param_2 + 0x23c) = 0xc3;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x58),1);
  return &DAT_1400e2f64;
}



void Unwind_140240e10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140240e20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140240e30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140240e40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140240e50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140240e60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140240e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140240e80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140240e87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140240e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140240ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140240eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140240ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140240ed0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140240ed7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140240ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140240ef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140240f00(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildPermissionUpdate",0x4d5,
                "dbo.up_update_guild_permission");
  *(undefined4 *)(param_2 + 0xe8) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400e2525;
}



undefined * Catch_140240fa0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x88);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildPermissionUpdate",0x4d9,
                "dbo.up_update_guild_permission");
  *(undefined4 *)(param_2 + 0xe8) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400e2525;
}



void Unwind_140241040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140241050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140241060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140241070(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140241077. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140241080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140241090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402410a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402410b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402410b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402410c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402410d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402410e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildNoticeUpdate",0x49b,"dbo.up_update_guild_notice");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400e2111;
}



undefined * Catch_140241180(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildNoticeUpdate",0x49f,"dbo.up_update_guild_notice");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400e2111;
}



void Unwind_140241220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140241230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140241240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140241250(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140241257. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140241260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140241270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140241280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140241290(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140241297. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402412a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402412b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402412c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildIconUpdate",
                0x472,"dbo.up_update_guild_icon");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400e1d71;
}



undefined * Catch_140241360(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildIconUpdate"
                ,0x476,"dbo.up_update_guild_icon");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400e1d71;
}



void Unwind_140241400(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140241410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140241420(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140241430(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140241437. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140241440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140241450(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140241460(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140241470(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140241477. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140241480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140241490(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402414a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402414b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402414c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402414c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402414d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402414e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402414f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildMemberPermissionUpdate",1099,
                "dbo.up_update_guild_member_permission");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400e19c9;
}



undefined * Catch_140241590(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildMemberPermissionUpdate",0x44f,
                "dbo.up_update_guild_member_permission");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400e19c9;
}



void Unwind_140241630(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140241640(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_140241650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140241660(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140241667. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140241670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140241680(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140241690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402416a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402416a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402416b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402416c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402416d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402416e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402416e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402416f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140241700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140241710(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildMemberAliaseUpdate",0x421,
                "dbo.up_update_guild_member_aliase");
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400e14de;
}



undefined * Catch_1402417b0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xb0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildMemberAliaseUpdate",0x425,
                "dbo.up_update_guild_member_aliase");
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400e14de;
}



void Unwind_140241850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x158);
  return;
}



void Unwind_140241860(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140241870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x150));
  return;
}



void Unwind_140241880(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140241887. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140241890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x150));
  return;
}



void Unwind_1402418a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_1402418b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x150));
  return;
}



void Unwind_1402418c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402418c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_1402418d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x150));
  return;
}



void Unwind_1402418e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



undefined * Catch_1402418f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x140);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildIDForCharacterUpdate",0x3f3,
                "dbo.up_update_guild_id_for_character");
  *(undefined4 *)(param_2 + 0x150) = 0;
  *(undefined2 *)(param_2 + 0x4c) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x148),1);
  return &DAT_1400e0fd2;
}



undefined * Catch_140241990(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 200);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x140);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildIDForCharacterUpdate",0x3f8,
                "dbo.up_update_guild_id_for_character");
  *(undefined4 *)(param_2 + 0x150) = 0;
  *(undefined2 *)(param_2 + 0x4c) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x148),1);
  return &DAT_1400e0fd2;
}



void Unwind_140241a30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140241a40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_140241a50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_140241a60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf0);
  return;
}



void Unwind_140241a70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x108);
  return;
}



void Unwind_140241a80(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xd0);
  return;
}



void Unwind_140241a90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_140241aa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_140241ab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf0);
  return;
}



void Unwind_140241ac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x108);
  return;
}



void Unwind_140241ad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1b8);
  return;
}



void Unwind_140241ae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xc0));
  return;
}



void Unwind_140241af0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140241af7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x150));
  return;
}



void Unwind_140241b00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xc0));
  return;
}



void Unwind_140241b10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x150);
  return;
}



void Unwind_140241b20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x290);
  return;
}



void Unwind_140241b30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2c0);
  return;
}



void Unwind_140241b40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xa8);
  return;
}



void Unwind_140241b50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x198);
  return;
}



void Unwind_140241b60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x160);
  return;
}



void Unwind_140241b70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d0);
  return;
}



void Unwind_140241b80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x170);
  return;
}



void Unwind_140241b90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x230);
  return;
}



void Unwind_140241ba0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xb8);
  return;
}



void Unwind_140241bb0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1a8);
  return;
}



void Unwind_140241bc0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x188);
  return;
}



void Unwind_140241bd0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c0);
  return;
}



void Unwind_140241be0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1e0);
  return;
}



void Unwind_140241bf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x278);
  return;
}



void Unwind_140241c00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2d8);
  return;
}



void Unwind_140241c10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x248);
  return;
}



void Unwind_140241c20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x260);
  return;
}



undefined * Catch_140241c30(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x228);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xb0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqReadGuildMember",
                0x3bd,"dbo.up_read_guild_member");
  *(undefined2 *)(param_2 + 0x74) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x158),1);
  return &DAT_1400e0a0a;
}



undefined * Catch_140241cd0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x218);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xb0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqReadGuildMember"
                ,0x3c2,"dbo.up_read_guild_member");
  *(undefined2 *)(param_2 + 0x74) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x158),1);
  return &DAT_1400e0a0a;
}



void Unwind_140241d70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_140241d80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_140241d90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf0);
  return;
}



void Unwind_140241da0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x108);
  return;
}



void Unwind_140241db0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140241dc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140241dd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140241de0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140241df0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140241e00(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140241e10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140241e20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140241e30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140241e40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140241e50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140241e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140241e70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140241e77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x110));
  return;
}



void Unwind_140241e80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140241e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_140241ea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x388);
  return;
}



void Unwind_140241eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x280);
  return;
}



void Unwind_140241ec0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140241ed0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x168);
  return;
}



void Unwind_140241ee0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1e8);
  return;
}



void Unwind_140241ef0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x188);
  return;
}



void Unwind_140241f00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c8);
  return;
}



void Unwind_140241f10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x208);
  return;
}



void Unwind_140241f20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x370);
  return;
}



void Unwind_140241f30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2b0);
  return;
}



void Unwind_140241f40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x340);
  return;
}



void Unwind_140241f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x250);
  return;
}



void Unwind_140241f60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x358);
  return;
}



void Unwind_140241f70(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140241f80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x158);
  return;
}



void Unwind_140241f90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x128);
  return;
}



void Unwind_140241fa0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x178);
  return;
}



void Unwind_140241fb0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x198);
  return;
}



void Unwind_140241fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x310);
  return;
}



void Unwind_140241fd0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140241fe0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b8);
  return;
}



void Unwind_140241ff0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d8);
  return;
}



void Unwind_140242000(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1f8);
  return;
}



void Unwind_140242010(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x148);
  return;
}



void Unwind_140242020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x268);
  return;
}



void Unwind_140242030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x298);
  return;
}



void Unwind_140242040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2c8);
  return;
}



void Unwind_140242050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2f8);
  return;
}



void Unwind_140242060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x328);
  return;
}



undefined * Catch_140242070(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x238);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqReadGuild",0x353,
                "dbo.up_read_guild");
  *(undefined2 *)(param_2 + 0x3ac) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  return &DAT_1400dfa5a;
}



undefined * Catch_140242100(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x248);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqReadGuild",0x358
                ,"dbo.up_read_guild");
  *(undefined2 *)(param_2 + 0x3ac) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  return &DAT_1400dfa5a;
}



void Unwind_1402421a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_1402421b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_1402421c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_1402421d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_1402421e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402421f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140242200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140242210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140242220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140242230(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140242240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140242250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140242260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140242270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140242280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140242290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_1402422a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402422a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x110));
  return;
}



void Unwind_1402422b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_1402422c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_1402422d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x318);
  return;
}



void Unwind_1402422e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2d0);
  return;
}



void Unwind_1402422f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140242300(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1e8);
  return;
}



void Unwind_140242310(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x188);
  return;
}



void Unwind_140242320(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c8);
  return;
}



void Unwind_140242330(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x128);
  return;
}



void Unwind_140242340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x270);
  return;
}



void Unwind_140242350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2e8);
  return;
}



void Unwind_140242360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x228);
  return;
}



void Unwind_140242370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x300);
  return;
}



void Unwind_140242380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x240);
  return;
}



void Unwind_140242390(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 600);
  return;
}



void Unwind_1402423a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_1402423b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x158);
  return;
}



void Unwind_1402423c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x178);
  return;
}



void Unwind_1402423d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x198);
  return;
}



void Unwind_1402423e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b8);
  return;
}



void Unwind_1402423f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x288);
  return;
}



void Unwind_140242400(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140242410(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d8);
  return;
}



void Unwind_140242420(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1f8);
  return;
}



void Unwind_140242430(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x138);
  return;
}



void Unwind_140242440(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x148);
  return;
}



void Unwind_140242450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2b8);
  return;
}



undefined * Catch_140242460(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x220);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqIsExistGuild",
                0x2e9,"dbo.up_is_exist_guild");
  *(undefined2 *)(param_2 + 0x33c) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  return &DAT_1400de980;
}



undefined * Catch_140242500(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x208);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqIsExistGuild",
                0x2ee,"dbo.up_is_exist_guild");
  *(undefined2 *)(param_2 + 0x33c) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  return &DAT_1400de980;
}



void Unwind_1402425a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_1402425b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_1402425c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_1402425d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_1402425e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402425f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140242600(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140242610(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140242620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140242630(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xb0);
  return;
}



void Unwind_140242640(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x130);
  return;
}



void Unwind_140242650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140242660(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140242667. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xa0));
  return;
}



void Unwind_140242670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140242680(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x188);
  return;
}



void Unwind_140242690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_1402426a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402426a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402426b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_1402426c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x198);
  return;
}



void Unwind_1402426d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_1402426e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402426e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_1402426f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140242700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x150);
  return;
}



void Unwind_140242710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140242720(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140242727. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140242730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140242740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x170);
  return;
}



void Unwind_140242750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140242760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140242770(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140242777. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140242780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140242790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x180);
  return;
}



void Unwind_1402427a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_1402427b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_1402427c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402427c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x90));
  return;
}



void Unwind_1402427d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_1402427e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 400);
  return;
}



void Unwind_1402427f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_140242800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_140242810(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140242817. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_140242820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_140242830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140242840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x248);
  return;
}



undefined * Catch_140242850(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1e8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildMemberAdd",
                0x28f,"dbo.up_insert_guild_member");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x98),1);
  *(undefined2 *)(param_2 + 0x32c) = 0xffff;
  return &DAT_1400dda17;
}



undefined * Catch_1402428f0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x210);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildMemberAdd",
                0x294,"dbo.up_insert_guild_member");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x98),1);
  *(undefined2 *)(param_2 + 0x32c) = 0xffff;
  return &DAT_1400dda17;
}



void Unwind_140242990(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_1402429a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_1402429b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_1402429c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_1402429d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_1402429e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_1402429f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140242a00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140242a10(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140242a20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140242a30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140242a40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140242a50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140242a57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140242a60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140242a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_140242a80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140242a90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140242a97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140242aa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140242ab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140242ac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1b0);
  return;
}



undefined * Catch_140242ad0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x178);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildDisband",
                0x238,"dbo.up_guild_disband");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  *(undefined2 *)(param_2 + 0x1d4) = 0xffff;
  return &DAT_1400dc95d;
}



undefined * Catch_140242b70(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x170);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildDisband",
                0x23d,"dbo.up_guild_disband");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  *(undefined2 *)(param_2 + 0x1d4) = 0xffff;
  return &DAT_1400dc95d;
}



void Unwind_140242c10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140242c20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140242c30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140242c40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140242c50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140242c60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140242c70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140242c80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140242c87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140242c90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140242ca0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140242cb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140242cc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140242cc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140242cd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140242ce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140242cf0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildMemberLogoutTime",0x1ee,
                "dbo.up_update_guild_member_logout_time");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400dc2cb;
}



undefined * Catch_140242d90(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildMemberLogoutTime",0x1f2,
                "dbo.up_update_guild_member_logout_time");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400dc2cb;
}



void Unwind_140242e30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140242e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140242e50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140242e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140242e70(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140242e80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140242e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140242ea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140242eb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140242eb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140242ec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140242ed0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_140242ee0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140242ef0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140242ef7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140242f00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140242f10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140242f20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1b0);
  return;
}



undefined * Catch_140242f30(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x178);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildMemberRemove",0x1c1,"dbo.up_guild_member_remove");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  *(undefined2 *)(param_2 + 0x1dc) = 0xffff;
  return &DAT_1400dbdbb;
}



undefined * Catch_140242fd0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x170);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildMemberRemove",0x1c6,"dbo.up_guild_member_remove");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  *(undefined2 *)(param_2 + 0x1dc) = 0xffff;
  return &DAT_1400dbdbb;
}



void Unwind_140243070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140243080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140243090(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_1402430a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_1402430b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_1402430c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_1402430d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402430e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402430e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402430f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140243100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140243110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140243120(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140243127. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140243130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140243140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140243150(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildLeaderChange",0x178,"dbo.up_guild_leader_change");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400db6fb;
}



undefined * Catch_1402431f0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildLeaderChange",0x17c,"dbo.up_guild_leader_change");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400db6fb;
}



void Unwind_140243290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402432a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xc0);
  return;
}



void Unwind_1402432b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 200);
  return;
}



void Unwind_1402432c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe0);
  return;
}



void Unwind_1402432d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf8);
  return;
}



void Unwind_1402432e0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xc0);
  return;
}



void Unwind_1402432f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1c8);
  return;
}



void Unwind_140243300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140243310(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140243317. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x150));
  return;
}



void Unwind_140243320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140243330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1c0);
  return;
}



void Unwind_140243340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140243350(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140243357. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140243360(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140243370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1d0);
  return;
}



void Unwind_140243380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140243390(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140243397. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_1402433a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_1402433b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1a8);
  return;
}



void Unwind_1402433c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_1402433d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402433d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x98));
  return;
}



void Unwind_1402433e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_1402433f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 400);
  return;
}



void Unwind_140243400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140243410(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140243420(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140243427. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_140243430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140243440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1e8);
  return;
}



void Unwind_140243450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_140243460(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_140243470(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140243477. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x90));
  return;
}



void Unwind_140243480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_140243490(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x208);
  return;
}



void Unwind_1402434a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_1402434b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_1402434c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402434c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xa0));
  return;
}



void Unwind_1402434d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_1402434e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1f0);
  return;
}



void Unwind_1402434f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x158));
  return;
}



void Unwind_140243500(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x158));
  return;
}



void Unwind_140243510(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140243517. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xb0));
  return;
}



void Unwind_140243520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x158));
  return;
}



void Unwind_140243530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x150);
  return;
}



void Unwind_140243540(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x508);
  return;
}



void Unwind_140243550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x400);
  return;
}



void Unwind_140243560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4c0);
  return;
}



void Unwind_140243570(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140243580(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x210);
  return;
}



void Unwind_140243590(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x250);
  return;
}



void Unwind_1402435a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2b0);
  return;
}



void Unwind_1402435b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x270);
  return;
}



void Unwind_1402435c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x430);
  return;
}



void Unwind_1402435d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x520);
  return;
}



void Unwind_1402435e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x460);
  return;
}



void Unwind_1402435f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4f0);
  return;
}



void Unwind_140243600(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x388);
  return;
}



void Unwind_140243610(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3b8);
  return;
}



void Unwind_140243620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 1000);
  return;
}



void Unwind_140243630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x418);
  return;
}



void Unwind_140243640(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x60);
  return;
}



void Unwind_140243650(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x290);
  return;
}



void Unwind_140243660(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x230);
  return;
}



void Unwind_140243670(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x240);
  return;
}



void Unwind_140243680(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x260);
  return;
}



void Unwind_140243690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x448);
  return;
}



void Unwind_1402436a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_1402436b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x220);
  return;
}



void Unwind_1402436c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x280);
  return;
}



void Unwind_1402436d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2a0);
  return;
}



void Unwind_1402436e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2c0);
  return;
}



void Unwind_1402436f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x478);
  return;
}



void Unwind_140243700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4a8);
  return;
}



void Unwind_140243710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4d8);
  return;
}



undefined * Catch_140243720(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x350);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x148);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildCreate",
                0x14f,"dbo.up_create_guild");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x140),1);
  return &DAT_1400db228;
}



undefined * Catch_1402437b0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 800);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x148);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqGuildCreate",
                0x153,"dbo.up_create_guild");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x140),1);
  return &DAT_1400db228;
}



void Unwind_140243840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xc0);
  return;
}



void Unwind_140243850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 200);
  return;
}



void Unwind_140243860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe0);
  return;
}



void Unwind_140243870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf8);
  return;
}



void Unwind_140243880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140243890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_1402438a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_1402438b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_1402438c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_1402438d0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_1402438e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x130);
  return;
}



void Unwind_1402438f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_140243900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_140243910(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140243917. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x218));
  return;
}



void Unwind_140243920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_140243930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140243940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_140243950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_140243960(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140243967. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x218));
  return;
}



void Unwind_140243970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x210));
  return;
}



void Unwind_140243980(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x148);
  return;
}



void Unwind_140243990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 400);
  return;
}



void Unwind_1402439a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a8);
  return;
}



undefined * Catch_1402439b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x188);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x200);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqReadGuildByServerID",0xd7,"dbo.up_read_guild_server");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x88),1);
  return &DAT_1400d98f9;
}



undefined * Catch_140243a40(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x170);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x200);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqReadGuildByServerID",0xdb,"dbo.up_read_guild_server");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x88),1);
  return &DAT_1400d98f9;
}



void Unwind_140243ad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140243ae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140243af0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140243b00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140243b10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140243b20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140243b30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140243b40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140243b50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140243b60(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140243b70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140243b80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1e0));
  return;
}



void Unwind_140243b90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1e0));
  return;
}



void Unwind_140243ba0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140243ba7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x1e8));
  return;
}



void Unwind_140243bb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x1e0));
  return;
}



void Unwind_140243bc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140243bd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x160);
  return;
}



void Unwind_140243be0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x178);
  return;
}



undefined * Catch_140243bf0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x158);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1d0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqReadAllGuild",
                0x7c,"dbo.up_read_all_guild");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_1400d8f5f;
}



undefined * Catch_140243c80(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x148);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1d0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp","CDBLobbyWriteQuery::DBReqReadAllGuild",
                0x80,"dbo.up_read_all_guild");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_1400d8f5f;
}



void Unwind_140243d10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140243d20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140243d30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140243d40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140243d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140243d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140243d70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140243d80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140243d90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140243da0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xb0);
  return;
}



void Unwind_140243db0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x188);
  return;
}



void Unwind_140243dc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140243dd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140243dd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x90));
  return;
}



void Unwind_140243de0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140243df0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140243e00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2a0);
  return;
}



void Unwind_140243e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x210);
  return;
}



void Unwind_140243e20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 600);
  return;
}



void Unwind_140243e30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2b8);
  return;
}



void Unwind_140243e40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x228);
  return;
}



void Unwind_140243e50(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140243e60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1a0);
  return;
}



void Unwind_140243e70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x130);
  return;
}



void Unwind_140243e80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x140);
  return;
}



void Unwind_140243e90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x160);
  return;
}



void Unwind_140243ea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x240);
  return;
}



void Unwind_140243eb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140243ec0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 400);
  return;
}



void Unwind_140243ed0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x178);
  return;
}



void Unwind_140243ee0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b0);
  return;
}



void Unwind_140243ef0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x150);
  return;
}



void Unwind_140243f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x270);
  return;
}



undefined * Catch_140243f10(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1e8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x98);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryFriend.cpp","CDBLobbyWriteQuery::DBReqReadFriendList",
                0xff,"dbo.up_read_friend_list");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xa0),1);
  return &DAT_1400d872b;
}



undefined * Catch_140243fa0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x208);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x98);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryFriend.cpp","CDBLobbyWriteQuery::DBReqReadFriendList"
                ,0x103,"dbo.up_read_friend_list");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xa0),1);
  return &DAT_1400d872b;
}



void Unwind_140244030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140244040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140244050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140244060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140244070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140244080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140244090(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402440a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402440a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402440b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402440c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402440d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402440e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402440e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402440f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140244100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140244110(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryFriend.cpp","CDBLobbyWriteQuery::DBReqDelFriend",0x97,
                "dbo.up_del_friend");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400d7b0b;
}



undefined * Catch_1402441b0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryFriend.cpp","CDBLobbyWriteQuery::DBReqDelFriend",0x9b
                ,"dbo.up_del_friend");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400d7b0b;
}



void Unwind_140244250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140244260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140244270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140244280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140244290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_1402442a0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_1402442b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_1402442c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402442d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402442d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402442e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402442f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140244300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140244310(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140244317. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140244320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140244330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140244340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a0);
  return;
}



void Unwind_140244350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1d0);
  return;
}



void Unwind_140244360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x188);
  return;
}



undefined * Catch_140244370(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x160);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryFriend.cpp","CDBLobbyWriteQuery::DBReqFriendAdd",0x66,
                "dbo.up_add_friend");
  *(undefined2 *)(param_2 + 0x1fc) = 0xa8;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_1400d759b;
}



undefined * Catch_140244410(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x168);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryFriend.cpp","CDBLobbyWriteQuery::DBReqFriendAdd",0x6b
                ,"dbo.up_add_friend");
  *(undefined2 *)(param_2 + 0x1fc) = 0xa8;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_1400d759b;
}



void Unwind_1402444b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_1402444c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_1402444d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_1402444e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_1402444f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140244500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140244510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140244520(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140244527. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140244530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140244540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140244550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140244560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140244570(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140244577. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140244580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140244590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402445a0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBSetTimeSkillReset",0x140a,"dbo.up_set_timeskillreset");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400d6dab;
}



undefined * Catch_140244640(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBSetTimeSkillReset",0x140e,"dbo.up_set_timeskillreset");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400d6dab;
}



void Unwind_1402446e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_1402446f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140244700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140244710(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140244717. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140244720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140244730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140244740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140244750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140244760(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140244767. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140244770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140244780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140244790(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateDayPartyMission",0x13e3,
                "dbo.up_update_daypartymission");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400d69fb;
}



undefined * Catch_140244830(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateDayPartyMission",0x13e7,
                "dbo.up_update_daypartymission");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400d69fb;
}



void Unwind_1402448d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402448e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_1402448f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140244900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140244910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140244920(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xa0);
  return;
}



void Unwind_140244930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140244940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140244950(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140244957. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140244960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140244970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140244980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140244990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_1402449a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402449a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402449b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_1402449c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_1402449d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



undefined * Catch_1402449e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(param_2 + 0x138);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  FUN_1400a69d0(*(undefined8 *)(param_2 + 0x180),uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateExternCash",0x13be,"dbo.up_update_extern_cash");
  return &DAT_1400d6530;
}



undefined * Catch_140244a60(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(param_2 + 0x140);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  FUN_1400a6790(*(undefined8 *)(param_2 + 0x180),plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateExternCash",0x13c1,"dbo.up_update_extern_cash");
  return &DAT_1400d6530;
}



void Unwind_140244ae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140244af0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140244b00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140244b10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140244b20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140244b30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140244b40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140244b50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140244b60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140244b70(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x70);
  return;
}



void Unwind_140244b80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140244b90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140244ba0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140244ba7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xf0));
  return;
}



void Unwind_140244bb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140244bc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140244bd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf8);
  return;
}



undefined * Catch_140244be0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x130);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 400);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqExternCash",
                0x138a,"dbo.up_read_extern_cash");
  *(undefined2 *)(*(longlong *)(param_2 + 0x1a0) + 0xc) = 0x16f;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x198),1);
  return &DAT_1400d5ea2;
}



undefined * Catch_140244c80(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x110);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 400);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqExternCash",
                0x138f,"dbo.up_read_extern_cash");
  *(undefined2 *)(*(longlong *)(param_2 + 0x1a0) + 0xc) = 0x16f;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x198),1);
  return &DAT_1400d5ea2;
}



void Unwind_140244d20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140244d30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140244d40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140244d50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140244d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140244d70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140244d80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x60);
  return;
}



void Unwind_140244d90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x78);
  return;
}



void Unwind_140244da0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x40);
  return;
}



void Unwind_140244db0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x30);
  return;
}



void Unwind_140244dc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x138);
  return;
}



void Unwind_140244dd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140244de0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140244df0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140244e00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x60);
  return;
}



void Unwind_140244e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x78);
  return;
}



undefined * Catch_140244e20(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xc0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x120);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqBackupCharacterDelete",0x1356,
                "dbo.up_move_deletetable_character");
  *(undefined4 *)(param_2 + 0x120) = 0xffffffff;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x128),1);
  return &DAT_1400d5951;
}



undefined * Catch_140244ec0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xd0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x120);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqBackupCharacterDelete",0x135a,
                "dbo.up_move_deletetable_character");
  *(undefined4 *)(param_2 + 0x120) = 0xffffffff;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x128),1);
  return &DAT_1400d5951;
}



void Unwind_140244f60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140244f70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140244f80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x60);
  return;
}



void Unwind_140244f90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x78);
  return;
}



void Unwind_140244fa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140244fb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140244fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140244fd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140244fd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140244fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140244ff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140245000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140245010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140245020(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245027. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140245030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140245040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140245050(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterTutorialStepUpdate",0x1322,
                "dbo.up_update_character_tutorial_step");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400d54bb;
}



undefined * Catch_1402450f0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterTutorialStepUpdate",0x1326,
                "dbo.up_update_character_tutorial_step");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400d54bb;
}



void Unwind_140245190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x188);
  return;
}



void Unwind_1402451a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_1402451b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_1402451c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_1402451d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_1402451e0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x60);
  return;
}



void Unwind_1402451f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140245200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140245210(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245217. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140245220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140245240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140245250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140245260(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245267. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140245270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140245280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



undefined * Catch_140245290(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  uVar1 = *(undefined8 *)(param_2 + 0x110);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x170);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdatePCRoomRemainTime",0x12f9,
                "dbo.up_update_pcroom_remaintime");
  lVar3 = *(longlong *)(param_2 + 0x178);
  *(undefined2 *)(lVar3 + 0xc) = 0x152;
  FUN_1400a1e10(uVar2,lVar3,1);
  return &DAT_1400d5005;
}



undefined * Catch_140245330(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  plVar1 = *(longlong **)(param_2 + 0x120);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x170);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdatePCRoomRemainTime",0x12fe,
                "dbo.up_update_pcroom_remaintime");
  lVar3 = *(longlong *)(param_2 + 0x178);
  *(undefined2 *)(lVar3 + 0xc) = 0x152;
  FUN_1400a1e10(uVar2,lVar3,1);
  return &DAT_1400d5005;
}



void Unwind_1402453d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_1402453e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_1402453f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140245400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140245410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140245420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140245430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140245440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140245450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140245460(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140245470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140245480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140245490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402454a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402454a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402454b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_1402454c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_1402454d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402454e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402454f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402454f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140245500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140245510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140245520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245530(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245537. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140245540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140245560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245570(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245577. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140245580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402455a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402455b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402455b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402455c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402455d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402455e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402455f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245600(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245607. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140245610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140245630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245640(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245650(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245657. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140245660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140245680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402456a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402456a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402456b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402456c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402456d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402456e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402456e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402456f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140245710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245730(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245737. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140245740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140245760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245770(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245780(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245787. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140245790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402457a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402457b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402457c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402457d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402457d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402457e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402457f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



undefined * Catch_140245800(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x110);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqRewardItem",
                0x12d0,"dbo.up_insert_reward_item");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_1400d49ff;
}



undefined * Catch_140245890(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x130);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqRewardItem",
                0x12d4,"dbo.up_insert_reward_item");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_1400d49ff;
}



void Unwind_140245920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140245930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140245940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140245950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140245960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140245970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140245980(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140245990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_1402459a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_1402459b0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xb0);
  return;
}



void Unwind_1402459c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x188);
  return;
}



void Unwind_1402459d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402459e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402459f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402459f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x98));
  return;
}



void Unwind_140245a00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140245a10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x140);
  return;
}



void Unwind_140245a20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_140245a30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_140245a40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245a47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140245a50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_140245a60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140245a70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x280);
  return;
}



void Unwind_140245a80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x88);
  return;
}



void Unwind_140245a90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 400);
  return;
}



void Unwind_140245aa0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x170);
  return;
}



void Unwind_140245ab0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x148);
  return;
}



void Unwind_140245ac0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x160);
  return;
}



void Unwind_140245ad0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x268);
  return;
}



void Unwind_140245ae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x220);
  return;
}



void Unwind_140245af0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1f0);
  return;
}



void Unwind_140245b00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x250);
  return;
}



void Unwind_140245b10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x208);
  return;
}



void Unwind_140245b20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x238);
  return;
}



undefined * Catch_140245b30(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1d8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqReadReward",
                0x125f,"dbo.up_read_reward");
  *(undefined2 *)(param_2 + 100) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xa8),1);
  return &DAT_1400d3847;
}



undefined * Catch_140245bc0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x1e0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqReadReward",
                0x1264,"dbo.up_read_reward");
  *(undefined2 *)(param_2 + 100) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xa8),1);
  return &DAT_1400d3847;
}



void Unwind_140245c60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_140245c70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_140245c80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_140245c90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_140245ca0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140245cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140245cc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140245cd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245cd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140245ce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140245cf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140245d00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140245d10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140245d20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245d27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140245d30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140245d40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140245d50(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventPVPLadder",0x1210,
                "dbo.up_update_event_pvpladder");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400d2c71;
}



undefined * Catch_140245df0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventPVPLadder",0x1214,
                "dbo.up_update_event_pvpladder");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400d2c71;
}



void Unwind_140245e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x188);
  return;
}



void Unwind_140245ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140245eb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140245ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140245ed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140245ee0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x60);
  return;
}



void Unwind_140245ef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140245f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140245f10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245f17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140245f20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140245f30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140245f40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140245f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140245f60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140245f67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140245f70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140245f80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



undefined * Catch_140245f90(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  uVar1 = *(undefined8 *)(param_2 + 0x110);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x170);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqSavePCRoomPoint",0x11e7,"dbo.up_save_pc_room_point");
  lVar3 = *(longlong *)(param_2 + 0x178);
  *(undefined2 *)(lVar3 + 0xc) = 0x14b;
  FUN_1400a1e10(uVar2,lVar3,1);
  return &DAT_1400d27a5;
}



undefined * Catch_140246030(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  plVar1 = *(longlong **)(param_2 + 0x120);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x170);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqSavePCRoomPoint",0x11ec,"dbo.up_save_pc_room_point");
  lVar3 = *(longlong *)(param_2 + 0x178);
  *(undefined2 *)(lVar3 + 0xc) = 0x14b;
  FUN_1400a1e10(uVar2,lVar3,1);
  return &DAT_1400d27a5;
}



void Unwind_1402460d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_1402460e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_1402460f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140246100(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140246110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140246120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140246130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140246140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140246150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140246160(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x70);
  return;
}



void Unwind_140246170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140246180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140246190(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246197. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xf0));
  return;
}



void Unwind_1402461a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_1402461b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402461c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf8);
  return;
}



undefined * Catch_1402461d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x130);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 400);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqPCRoomPoint",
                0x11bd,"dbo.up_read_pc_room_point");
  *(undefined2 *)(*(longlong *)(param_2 + 0x1a0) + 0xc) = 0x14a;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x198),1);
  return &DAT_1400d21b2;
}



undefined * Catch_140246270(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x110);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 400);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqPCRoomPoint"
                ,0x11c2,"dbo.up_read_pc_room_point");
  *(undefined2 *)(*(longlong *)(param_2 + 0x1a0) + 0xc) = 0x14a;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x198),1);
  return &DAT_1400d21b2;
}



void Unwind_140246310(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140246320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140246330(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140246340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140246350(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140246360(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1b0);
  return;
}



void Unwind_140246370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1b8);
  return;
}



void Unwind_140246380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1d0);
  return;
}



void Unwind_140246390(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1e8);
  return;
}



void Unwind_1402463a0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x1b0);
  return;
}



void Unwind_1402463b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x230);
  return;
}



void Unwind_1402463c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402463d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402463d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x118));
  return;
}



void Unwind_1402463e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_1402463f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x368);
  return;
}



void Unwind_140246400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140246410(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246417. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x58));
  return;
}



void Unwind_140246420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140246430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2d0);
  return;
}



void Unwind_140246440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140246450(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246457. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x98));
  return;
}



void Unwind_140246460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140246470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2e0);
  return;
}



void Unwind_140246480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_140246490(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246497. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402464a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xb0));
  return;
}



void Unwind_1402464b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2f0);
  return;
}



void Unwind_1402464c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_1402464d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402464d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xb0));
  return;
}



void Unwind_1402464e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_1402464f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x350);
  return;
}



void Unwind_140246500(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140246510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140246520(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246527. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xa8));
  return;
}



void Unwind_140246530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140246540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2b8);
  return;
}



void Unwind_140246550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140246560(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246567. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140246570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140246580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2d8);
  return;
}



void Unwind_140246590(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_1402465a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_1402465b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402465b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_1402465c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_1402465d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x248);
  return;
}



void Unwind_1402465e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_1402465f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140246600(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246607. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_140246610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140246620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x268);
  return;
}



void Unwind_140246630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140246640(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140246650(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246657. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x90));
  return;
}



void Unwind_140246660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140246670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x288);
  return;
}



void Unwind_140246680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140246690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402466a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402466a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_1402466b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402466c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2a8);
  return;
}



void Unwind_1402466d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x148));
  return;
}



void Unwind_1402466e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x148));
  return;
}



void Unwind_1402466f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402466f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140246700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x148));
  return;
}



void Unwind_140246710(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x240);
  return;
}



void Unwind_140246720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x478);
  return;
}



void Unwind_140246730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2f8);
  return;
}



void Unwind_140246740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x250);
  return;
}



void Unwind_140246750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 1000);
  return;
}



void Unwind_140246760(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x308);
  return;
}



void Unwind_140246770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x260);
  return;
}



void Unwind_140246780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5a0);
  return;
}



void Unwind_140246790(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x150);
  return;
}



void Unwind_1402467a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x150);
  return;
}



void Unwind_1402467b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x448);
  return;
}



void Unwind_1402467c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x418);
  return;
}



void Unwind_1402467d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x318);
  return;
}



void Unwind_1402467e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x270);
  return;
}



void Unwind_1402467f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3a0);
  return;
}



void Unwind_140246800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x328);
  return;
}



void Unwind_140246810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x280);
  return;
}



void Unwind_140246820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x528);
  return;
}



void Unwind_140246830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x168);
  return;
}



void Unwind_140246840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x168);
  return;
}



void Unwind_140246850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3d0);
  return;
}



void Unwind_140246860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x400);
  return;
}



void Unwind_140246870(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x338);
  return;
}



void Unwind_140246880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x290);
  return;
}



void Unwind_140246890(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x430);
  return;
}



void Unwind_1402468a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x348);
  return;
}



void Unwind_1402468b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2a0);
  return;
}



void Unwind_1402468c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x588);
  return;
}



void Unwind_1402468d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x180);
  return;
}



void Unwind_1402468e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x180);
  return;
}



void Unwind_1402468f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x460);
  return;
}



void Unwind_140246900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x490);
  return;
}



void Unwind_140246910(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x358);
  return;
}



void Unwind_140246920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2b0);
  return;
}



void Unwind_140246930(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3b8);
  return;
}



void Unwind_140246940(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140246950(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140246960(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5e8);
  return;
}



void Unwind_140246970(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x198);
  return;
}



void Unwind_140246980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x198);
  return;
}



void Unwind_140246990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x388);
  return;
}



undefined * Catch_1402469a0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x4c0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x140);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqRewardCoupon"
                ,0x1189,"dbo.up_update_reward_coupon");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x138),1);
  return &DAT_1400d1c2e;
}



undefined * Catch_140246a30(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x4f0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x140);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqRewardCoupon",0x118d,"dbo.up_update_reward_coupon");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x138),1);
  return &DAT_1400d1c2e;
}



void Unwind_140246ac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1b0);
  return;
}



void Unwind_140246ad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1b8);
  return;
}



void Unwind_140246ae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1d0);
  return;
}



void Unwind_140246af0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1e8);
  return;
}



void Unwind_140246b00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140246b10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140246b20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140246b30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246b37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140246b40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140246b50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140246b60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140246b70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140246b80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246b87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140246b90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140246ba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140246bb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140246bc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140246bd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246bd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140246be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140246bf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140246c00(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateDayAttach",0x1109,"dbo.up_update_dayattach");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400cfec7;
}



undefined * Catch_140246ca0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateDayAttach",0x110d,"dbo.up_update_dayattach");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400cfec7;
}



void Unwind_140246d40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140246d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140246d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140246d70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140246d80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140246d90(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xa0);
  return;
}



void Unwind_140246da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x160);
  return;
}



void Unwind_140246db0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140246dc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246dc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140246dd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140246de0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140246df0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140246e00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140246e07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140246e10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140246e20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x130);
  return;
}



void Unwind_140246e30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x230);
  return;
}



void Unwind_140246e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140246e50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x170);
  return;
}



void Unwind_140246e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x120));
  return;
}



void Unwind_140246e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x148));
  return;
}



void Unwind_140246e80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140246e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140246ea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x158));
  return;
}



void Unwind_140246eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x168));
  return;
}



undefined * Catch_140246ec0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1f0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateCharacterName",0x10d8,"dbo.up_update_character_name"
               );
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x88),1);
  return &DAT_1400cf8d7;
}



undefined * Catch_140246f50(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x1a0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateCharacterName",0x10dc,"dbo.up_update_character_name"
               );
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x88),1);
  return &DAT_1400cf8d7;
}



void Unwind_140246fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140246ff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140247000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140247010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140247020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140247030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140247040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140247050(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140247057. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140247060(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140247070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140247080(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140247090(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402470a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402470a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402470b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402470c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402470d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateCashMileage",0x107e,"dbo.up_update_cash_mileage");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400ceecb;
}



undefined * Catch_140247170(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateCashMileage",0x1082,"dbo.up_update_cash_mileage");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400ceecb;
}



void Unwind_140247210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140247220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140247230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140247240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140247250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140247260(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x80);
  return;
}



void Unwind_140247270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140247280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140247290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_1402472a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_1402472b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_1402472c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_1402472d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402472d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x100));
  return;
}



void Unwind_1402472e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_1402472f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140247300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x150);
  return;
}



void Unwind_140247310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x198);
  return;
}



void Unwind_140247320(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x168);
  return;
}



undefined * Catch_140247330(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x148);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqReadBuff",
                0x1052,"dbo.up_read_buff");
  *(undefined2 *)(param_2 + 0x1bc) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400ce9a4;
}



undefined * Catch_1402473d0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x130);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqReadBuff",
                0x1057,"dbo.up_read_buff");
  *(undefined2 *)(param_2 + 0x1bc) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400ce9a4;
}



void Unwind_140247470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140247480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140247490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_1402474a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_1402474b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_1402474c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_1402474d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402474e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402474e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402474f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140247500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140247510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140247520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140247530(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140247537. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140247540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140247550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140247560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247570(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247580(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140247587. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140247590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402475a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402475b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqDeleteBuff",
                0x100f,"dbo.up_delete_buff");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400ce1b7;
}



undefined * Catch_140247650(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqDeleteBuff",
                0x1013,"dbo.up_delete_buff");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400ce1b7;
}



void Unwind_1402476f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140247700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140247710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140247720(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140247727. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140247730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140247740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140247750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140247760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140247770(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140247777. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140247780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140247790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402477a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402477b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402477c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402477c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402477d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402477e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402477f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247810(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140247817. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140247820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140247840(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqUpdateBuff",
                0xfe8,"dbo.up_update_buff");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400cdcdd;
}



undefined * Catch_1402478e0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x88);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqUpdateBuff",
                0xfec,"dbo.up_update_buff");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400cdcdd;
}



void Unwind_140247980(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140247990(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_1402479a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402479b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402479b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402479c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_1402479d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402479e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402479f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140247a00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140247a07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140247a10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140247a20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140247a30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247a40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247a50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140247a57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140247a60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140247a80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247a90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247aa0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140247aa7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140247ab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247ac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140247ad0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqInsertBuff",
                0xfc0,"dbo.up_insert_buff");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400cd6bd;
}



undefined * Catch_140247b70(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x88);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqInsertBuff",
                0xfc4,"dbo.up_insert_buff");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400cd6bd;
}



void Unwind_140247c10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140247c20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140247c30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140247c40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140247c47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140247c50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140247c60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140247c70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140247c80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140247c90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140247c97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140247ca0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140247cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140247cc0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventMailAttach",0xf98,
                "dbo.up_update_event_mailattach");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400cd0b1;
}



undefined * Catch_140247d60(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventMailAttach",0xf9c,
                "dbo.up_update_event_mailattach");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400cd0b1;
}



void Unwind_140247e00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140247e10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140247e20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140247e30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140247e40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140247e50(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x80);
  return;
}



void Unwind_140247e60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140247e70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140247e80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140247e90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140247ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140247eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247ec0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140247ec7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x100));
  return;
}



void Unwind_140247ed0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140247ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140247ef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a8);
  return;
}



void Unwind_140247f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c0);
  return;
}



void Unwind_140247f10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140247f20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x138);
  return;
}



void Unwind_140247f30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x118);
  return;
}



void Unwind_140247f40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x128);
  return;
}



void Unwind_140247f50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x148);
  return;
}



undefined * Catch_140247f60(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x180);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqReadInquiryCharacter",0xf6d,
                "dbo.up_read_Inquiry_character");
  *(undefined2 *)(param_2 + 0x1ec) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x58),1);
  return &DAT_1400ccb8d;
}



undefined * Catch_140247ff0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x188);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqReadInquiryCharacter",0xf72,
                "dbo.up_read_Inquiry_character");
  *(undefined2 *)(param_2 + 0x1ec) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x58),1);
  return &DAT_1400ccb8d;
}



void Unwind_140248090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_1402480a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_1402480b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_1402480c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_1402480d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_1402480e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_1402480f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140248100(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140248110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140248120(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140248130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140248140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140248150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140248160(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140248170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x160);
  return;
}



void Unwind_140248180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2a0);
  return;
}



void Unwind_140248190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2e8);
  return;
}



void Unwind_1402481a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x300);
  return;
}



void Unwind_1402481b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x270);
  return;
}



void Unwind_1402481c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2d0);
  return;
}



void Unwind_1402481d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x228);
  return;
}



void Unwind_1402481e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x240);
  return;
}



void Unwind_1402481f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 600);
  return;
}



void Unwind_140248200(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140248210(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x198);
  return;
}



void Unwind_140248220(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x140);
  return;
}



void Unwind_140248230(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d8);
  return;
}



void Unwind_140248240(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b8);
  return;
}



void Unwind_140248250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x288);
  return;
}



void Unwind_140248260(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140248270(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x188);
  return;
}



void Unwind_140248280(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x178);
  return;
}



void Unwind_140248290(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1a8);
  return;
}



void Unwind_1402482a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c8);
  return;
}



void Unwind_1402482b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2b8);
  return;
}



void Unwind_1402482c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_1402482d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x200);
  return;
}



void Unwind_1402482e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1e8);
  return;
}



void Unwind_1402482f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x150);
  return;
}



void Unwind_140248300(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x168);
  return;
}



undefined * Catch_140248310(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x220);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x118);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqReadInquiry",
                0xf31,"dbo.up_read_Inquiry");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x110),1);
  return &DAT_1400cc246;
}



undefined * Catch_1402483a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x218);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x118);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqReadInquiry"
                ,0xf35,"dbo.up_read_Inquiry");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x110),1);
  return &DAT_1400cc246;
}



void Unwind_140248430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140248440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140248450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140248460(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140248470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140248480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140248490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402484a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402484a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402484b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402484c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402484d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqDeleteInquiry",0xecc,"dbo.up_delete_Inquiry");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400cb2d8;
}



undefined * Catch_140248570(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqDeleteInquiry",0xed0,"dbo.up_delete_Inquiry");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400cb2d8;
}



void Unwind_140248610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140248620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140248630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140248640(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140248647. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140248650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140248660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140248670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140248680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140248690(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140248697. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402486a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402486b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402486c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateInquiry_Type",0xea8,"dbo.up_update_Inquiry_type");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400cb061;
}



undefined * Catch_140248760(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateInquiry_Type",0xeac,"dbo.up_update_Inquiry_type");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400cb061;
}



void Unwind_140248800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140248810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140248820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140248830(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140248837. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140248840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140248850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140248860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140248870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140248880(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140248887. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140248890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402488a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402488b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402488c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402488c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402488d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402488e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402488f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateInquiry",0xe83,"dbo.up_update_Inquiry");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400caca2;
}



undefined * Catch_140248990(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateInquiry",0xe87,"dbo.up_update_Inquiry");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400caca2;
}



void Unwind_140248a30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140248a40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140248a50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140248a60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140248a67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140248a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140248a80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140248a90(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAddInquiry_Count",0xe5d,"dbo.up_add_Inquiry_count");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400ca7c8;
}



undefined * Catch_140248b30(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAddInquiry_Count",0xe61,"dbo.up_add_Inquiry_count");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400ca7c8;
}



void Unwind_140248bd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140248be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_140248bf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_140248c00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf0);
  return;
}



void Unwind_140248c10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x108);
  return;
}



void Unwind_140248c20(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xd0);
  return;
}



void Unwind_140248c30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1c0);
  return;
}



void Unwind_140248c40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140248c50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140248c60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140248c67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xc0));
  return;
}



void Unwind_140248c70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140248c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1e0);
  return;
}



void Unwind_140248c90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140248ca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140248ca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140248cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140248cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1d0);
  return;
}



void Unwind_140248cd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_140248ce0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140248ce7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x80));
  return;
}



void Unwind_140248cf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xa0));
  return;
}



void Unwind_140248d00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x198);
  return;
}



void Unwind_140248d10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140248d20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140248d30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140248d37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xa0));
  return;
}



void Unwind_140248d40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140248d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1b8);
  return;
}



void Unwind_140248d60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140248d70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140248d77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_140248d80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140248d90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1e8);
  return;
}



void Unwind_140248da0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_140248db0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140248db7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x98));
  return;
}



void Unwind_140248dc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xa8));
  return;
}



void Unwind_140248dd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1d8);
  return;
}



void Unwind_140248de0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 200));
  return;
}



void Unwind_140248df0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140248df7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xa8));
  return;
}



void Unwind_140248e00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 200));
  return;
}



void Unwind_140248e10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xc0);
  return;
}



void Unwind_140248e20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x400);
  return;
}



void Unwind_140248e30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x310);
  return;
}



void Unwind_140248e40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x460);
  return;
}



void Unwind_140248e50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3d0);
  return;
}



void Unwind_140248e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x328);
  return;
}



void Unwind_140248e70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x358);
  return;
}



void Unwind_140248e80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x388);
  return;
}



void Unwind_140248e90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3b8);
  return;
}



void Unwind_140248ea0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140248eb0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1f0);
  return;
}



void Unwind_140248ec0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x210);
  return;
}



void Unwind_140248ed0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x270);
  return;
}



void Unwind_140248ee0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x230);
  return;
}



void Unwind_140248ef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 1000);
  return;
}



void Unwind_140248f00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x70);
  return;
}



void Unwind_140248f10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2b0);
  return;
}



void Unwind_140248f20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x250);
  return;
}



void Unwind_140248f30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x290);
  return;
}



void Unwind_140248f40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x200);
  return;
}



void Unwind_140248f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x418);
  return;
}



void Unwind_140248f60(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_140248f70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x220);
  return;
}



void Unwind_140248f80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x240);
  return;
}



void Unwind_140248f90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x260);
  return;
}



void Unwind_140248fa0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x280);
  return;
}



undefined * Catch_140248fb0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x2d0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xb8);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqInsertInquiry_by_gm",0xe39,"dbo.up_insert_Inquiry_by_gm");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xb0),1);
  return &DAT_1400ca424;
}



undefined * Catch_140249040(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x2d8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xb8);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqInsertInquiry_by_gm",0xe3d,"dbo.up_insert_Inquiry_by_gm");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xb0),1);
  return &DAT_1400ca424;
}



void Unwind_1402490d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_1402490e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_1402490f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xf0);
  return;
}



void Unwind_140249100(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x108);
  return;
}



void Unwind_140249110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140249120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_140249130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140249140(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249147. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140249150(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140249170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140249180(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249187. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140249190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_1402491a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402491b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402491c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402491d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402491d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_1402491e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402491f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140249200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140249210(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249217. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140249220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140249230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140249240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140249250(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249257. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140249260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140249270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140249280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140249290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402492a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402492a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_1402492b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402492c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402492d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402492e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402492e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_1402492f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140249300(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140249310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140249320(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140249330(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249337. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140249340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140249350(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140249360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140249370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_140249380(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249387. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_140249390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_1402493a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402493b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqInsertInquiry",0xde5,"dbo.up_insert_Inquiry");
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x118),1);
  return &DAT_1400c8ef3;
}



undefined * Catch_140249450(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x110);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqInsertInquiry",0xde9,"dbo.up_insert_Inquiry");
  *(undefined4 *)(param_2 + 0x110) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x118),1);
  return &DAT_1400c8ef3;
}



void Unwind_1402494f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_140249500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_140249510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140249520(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249527. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140249530(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140249540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140249550(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140249560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140249570(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249577. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140249580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140249590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402495a0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqInsertBlackIP",0xdb9,"dbo.up_insert_blacklist");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_1400c8296;
}



undefined * Catch_140249640(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x78);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqInsertBlackIP",0xdbd,"dbo.up_insert_blacklist");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_1400c8296;
}



void Unwind_1402496e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_1402496f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140249700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140249710(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249717. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140249720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140249730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140249740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140249750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140249760(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249767. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140249770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140249780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140249790(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402497a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402497b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402497b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402497c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402497d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402497e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402497f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249800(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249807. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140249810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140249830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249850(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249857. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140249860(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249870(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140249880(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249890(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402498a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402498a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402498b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402498c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402498d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateFortune",0xd90,"dbo.up_update_fortune");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400c7edf;
}



undefined * Catch_140249970(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x88);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateFortune",0xd94,"dbo.up_update_fortune");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400c7edf;
}



void Unwind_140249a10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140249a20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140249a30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140249a40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140249a50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140249a60(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x80);
  return;
}



void Unwind_140249a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140249a80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140249a90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140249aa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140249ab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140249ac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249ad0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249ad7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x100));
  return;
}



void Unwind_140249ae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249af0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140249b00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x150);
  return;
}



void Unwind_140249b10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x180);
  return;
}



void Unwind_140249b20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1b0);
  return;
}



void Unwind_140249b30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x168);
  return;
}



undefined * Catch_140249b40(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x148);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqReadFortune",
                0xd63,"dbo.up_read_fortune");
  *(undefined2 *)(param_2 + 0x1d4) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x58),1);
  return &DAT_1400c7510;
}



undefined * Catch_140249bd0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x120);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqReadFortune"
                ,0xd68,"dbo.up_read_fortune");
  *(undefined2 *)(param_2 + 0x1d4) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x58),1);
  return &DAT_1400c7510;
}



void Unwind_140249c70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140249c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140249c90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140249ca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140249cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140249cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140249cd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140249ce0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249ce7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140249cf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140249d00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140249d10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140249d20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140249d30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249d37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140249d40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140249d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140249d60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249d70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249d80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249d87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140249d90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140249db0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249dc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249dd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249dd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140249de0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249df0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140249e00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249e20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249e27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140249e30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140249e50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249e70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249e77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140249e80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249e90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140249ea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249ec0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249ec7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140249ed0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140249ef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249f10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249f17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140249f20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249f30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140249f40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249f60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249f67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140249f70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249f80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140249f90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249fa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249fb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140249fb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140249fc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249fd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140249fe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140249ff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a000(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a007. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024a010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a020(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14024a030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a050(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a057. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024a060(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14024a080(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a090(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a0a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a0a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024a0b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a0c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



undefined * Catch_14024a0d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqResetBattleInfo",0xd26,"dbo.up_update_battleinfo");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400c6dfc;
}



undefined * Catch_14024a170(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x88);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqResetBattleInfo",0xd2a,"dbo.up_update_battleinfo");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400c6dfc;
}



void Unwind_14024a210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14024a220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14024a230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024a240(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a247. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14024a250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024a260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024a270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024a280(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a287. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14024a290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024a2a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024a2b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14024a2c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a2c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024a2d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_14024a2e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024a2f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqCharacterRob"
                ,0xcf5,"dbo.up_character_rob");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400c5b91;
}



undefined * Catch_14024a390(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterRob",0xcf9,"dbo.up_character_rob");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400c5b91;
}



void Unwind_14024a430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024a440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024a450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024a460(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a467. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024a470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024a480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024a490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024a4a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024a4b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a4b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024a4c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024a4d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024a4e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateRearingTurn",0xccd,"dbo.up_update_rearing_turn");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400c56db;
}



undefined * Catch_14024a580(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateRearingTurn",0xcd1,"dbo.up_update_rearing_turn");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400c56db;
}



void Unwind_14024a620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024a630(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024a640(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024a650(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a657. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14024a660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024a670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024a680(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqDeleteRearingInfo",0xca6,"dbo.up_delete_rearing_info");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400c5328;
}



undefined * Catch_14024a720(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqDeleteRearingInfo",0xcaa,"dbo.up_delete_rearing_info");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400c5328;
}



void Unwind_14024a7c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14024a7d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14024a7e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024a7f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a7f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024a800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14024a810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024a820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14024a830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14024a840(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a847. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024a850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14024a860(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024a870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a880(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a890(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a897. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024a8a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a8b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024a8c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a8d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a8e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a8e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024a8f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a900(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024a910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a920(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a930(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a937. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024a940(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a950(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024a960(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a970(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a980(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a987. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024a990(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a9a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024a9b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a9c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a9d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024a9d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024a9e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024a9f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024aa00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aa10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aa20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024aa27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024aa30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aa40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024aa50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aa60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aa70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024aa77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024aa80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aa90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024aaa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aac0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024aac7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024aad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024aaf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ab00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ab10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ab17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024ab20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ab30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024ab40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ab50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ab60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ab67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024ab70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ab80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024ab90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024abb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024abb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024abc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024abd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024abe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024abf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ac00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ac07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024ac10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ac20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024ac30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ac40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ac50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ac57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024ac60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ac70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024ac80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ac90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024aca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024acb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024acc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024acd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ace0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024acf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024acf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024ad00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ad10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024ad20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ad30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ad40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ad47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024ad50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ad60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024ad70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ad80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ad90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ad97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024ada0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024adb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024adc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024add0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ade0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ade7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024adf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ae00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024ae10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ae20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ae30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ae37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024ae40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ae50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024ae60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ae70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ae80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ae87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024ae90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024aeb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aed0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024aed7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024aee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024aef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024af00(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateRearingInfo",0xc80,"dbo.up_update_rearing_info");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400c50a8;
}



undefined * Catch_14024afa0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x88);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateRearingInfo",0xc84,"dbo.up_update_rearing_info");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400c50a8;
}



void Unwind_14024b040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_14024b050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_14024b060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024b070(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024b080(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b087. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14024b090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_14024b0a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b0b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024b0c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024b0d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b0d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x78));
  return;
}



void Unwind_14024b0e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024b0f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b100(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b110(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b117. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b130(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b150(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b157. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b1a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b1a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b1b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b1c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b1d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b1e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b1e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b1f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b230(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b237. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b280(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b287. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b2a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b2b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b2c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b2d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b2d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b2e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b2f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b320(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b327. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b340(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b370(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b377. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b380(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b3a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b3b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b3c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b3c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b3d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b3e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b3f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b410(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b417. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b460(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b467. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b4a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b4b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b4b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b4c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b4d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b4e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b4f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b500(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b507. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b540(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b550(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b557. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b560(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b580(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b590(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b5a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b5a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b5b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b5c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b5d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b5e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b5f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b5f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b600(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b640(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b647. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b690(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b697. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b6a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b6b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b6c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b6d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b6e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b6e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b6f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b700(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b730(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b737. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b750(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b770(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b780(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b787. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b7a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b7b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b7c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b7d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b7d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b7e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b7f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b820(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b827. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b870(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b877. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024b8a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b8b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b8c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024b8c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024b8d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024b8e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024b8f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqInsertRearingInfo",0xc44,"dbo.up_insert_rearing_info");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400c3496;
}



undefined * Catch_14024b990(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xa8);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqInsertRearingInfo",0xc48,"dbo.up_insert_rearing_info");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400c3496;
}



void Unwind_14024ba30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_14024ba40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14024ba50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14024ba60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_14024ba70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_14024ba80(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_14024ba90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14024baa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14024bab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_14024bac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_14024bad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1a8);
  return;
}



void Unwind_14024bae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x118));
  return;
}



void Unwind_14024baf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024baf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x128));
  return;
}



void Unwind_14024bb00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x118));
  return;
}



void Unwind_14024bb10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_14024bb20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x440);
  return;
}



void Unwind_14024bb30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1e8);
  return;
}



void Unwind_14024bb40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x218);
  return;
}



void Unwind_14024bb50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x368);
  return;
}



void Unwind_14024bb60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x248);
  return;
}



void Unwind_14024bb70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x458);
  return;
}



void Unwind_14024bb80(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x110);
  return;
}



void Unwind_14024bb90(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x170);
  return;
}



void Unwind_14024bba0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x160);
  return;
}



void Unwind_14024bbb0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x180);
  return;
}



void Unwind_14024bbc0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 400);
  return;
}



void Unwind_14024bbd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x278);
  return;
}



void Unwind_14024bbe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x398);
  return;
}



void Unwind_14024bbf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2a8);
  return;
}



void Unwind_14024bc00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x428);
  return;
}



void Unwind_14024bc10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2d8);
  return;
}



void Unwind_14024bc20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3c8);
  return;
}



void Unwind_14024bc30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x308);
  return;
}



void Unwind_14024bc40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x488);
  return;
}



void Unwind_14024bc50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x338);
  return;
}



void Unwind_14024bc60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3f8);
  return;
}



void Unwind_14024bc70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x200);
  return;
}



void Unwind_14024bc80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x230);
  return;
}



void Unwind_14024bc90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x260);
  return;
}



void Unwind_14024bca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x290);
  return;
}



void Unwind_14024bcb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2c0);
  return;
}



void Unwind_14024bcc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2f0);
  return;
}



void Unwind_14024bcd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 800);
  return;
}



void Unwind_14024bce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x350);
  return;
}



void Unwind_14024bcf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x380);
  return;
}



void Unwind_14024bd00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3b0);
  return;
}



void Unwind_14024bd10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3e0);
  return;
}



void Unwind_14024bd20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x410);
  return;
}



undefined * Catch_14024bd30(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1b0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x130);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqReadRearingListInfo",0xc03,"dbo.up_read_rearing_listinfo")
  ;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x138),1);
  return &DAT_1400c116a;
}



undefined * Catch_14024bdc0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x1d0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x130);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqReadRearingListInfo",0xc07,"dbo.up_read_rearing_listinfo")
  ;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x138),1);
  return &DAT_1400c116a;
}



void Unwind_14024be50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14024be60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14024be70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_14024be80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_14024be90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024bea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024beb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024bec0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024bec7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024bed0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024bee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024bef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024bf00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024bf10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024bf17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024bf20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024bf30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024bf40(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterGuildPointUpdate",0xb93,
                "dbo.up_update_character_guild_point");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bfe6b;
}



undefined * Catch_14024bfe0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterGuildPointUpdate",0xb97,
                "dbo.up_update_character_guild_point");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bfe6b;
}



void Unwind_14024c080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024c090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024c0a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024c0b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024c0b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024c0c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024c0d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024c0e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c0f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c100(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024c107. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024c110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024c130(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterFatigueStorageUpdate",0xb66,
                "dbo.up_update_character_fatiguestorage");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bfabb;
}



undefined * Catch_14024c1d0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterFatigueStorageUpdate",0xb6a,
                "dbo.up_update_character_fatiguestorage");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bfabb;
}



void Unwind_14024c270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024c280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024c290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024c2a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024c2a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024c2b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024c2c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024c2d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c2e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c2f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024c2f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024c300(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c310(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024c320(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAdditionStatusMagicDefense",0xb3c,
                "dbo.up_update_character_addition_status_magicdefense");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bf70b;
}



undefined * Catch_14024c3c0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAdditionStatusMagicDefense",0xb40,
                "dbo.up_update_character_addition_status_magicdefense");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bf70b;
}



void Unwind_14024c460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024c470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024c480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024c490(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024c497. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024c4a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024c4b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024c4c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c4d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c4e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024c4e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024c4f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024c510(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAdditionStatusMagicAttack",0xb19,
                "dbo.up_update_character_addition_status_magicattack");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bf35b;
}



undefined * Catch_14024c5b0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAdditionStatusMagicAttack",0xb1d,
                "dbo.up_update_character_addition_status_magicattack");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bf35b;
}



void Unwind_14024c650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024c660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024c670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024c680(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024c687. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024c690(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024c6a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024c6b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c6c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c6d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024c6d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024c6e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c6f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024c700(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAdditionStatusPhysicDefense",0xaf6,
                "dbo.up_update_character_addition_status_physicdefense");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400befab;
}



undefined * Catch_14024c7a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAdditionStatusPhysicDefense",0xafa,
                "dbo.up_update_character_addition_status_physicdefense");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400befab;
}



void Unwind_14024c840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024c850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024c860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024c870(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024c877. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024c880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024c890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024c8a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c8b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c8c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024c8c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024c8d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024c8e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024c8f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAdditionStatusPhysicAttack",0xad4,
                "dbo.up_update_character_addition_status_physicattack");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bebfb;
}



undefined * Catch_14024c990(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAdditionStatusPhysicAttack",0xad8,
                "dbo.up_update_character_addition_status_physicattack");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bebfb;
}



void Unwind_14024ca30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024ca40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024ca50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024ca60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ca67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024ca70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024ca80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024ca90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024caa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024cab0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024cab7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024cac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024cad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024cae0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAdditionStatusMP",0xab1,
                "dbo.up_update_character_addition_status_mp");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400be84b;
}



undefined * Catch_14024cb80(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAdditionStatusMP",0xab5,
                "dbo.up_update_character_addition_status_mp");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400be84b;
}



void Unwind_14024cc20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024cc30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024cc40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024cc50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024cc57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024cc60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024cc70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024cc80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024cc90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024cca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024cca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024ccb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024ccc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024ccd0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAdditionStatusHP",0xa8f,
                "dbo.up_update_character_addition_status_hp");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400be49b;
}



undefined * Catch_14024cd70(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqAdditionStatusHP",0xa93,
                "dbo.up_update_character_addition_status_hp");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400be49b;
}



void Unwind_14024ce10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024ce20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024ce30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024ce40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ce47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14024ce50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024ce60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024ce70(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqDeleteCashEffectInfo",0xa6c,
                "dbo.up_delete_cash_effectinfo");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400be0e8;
}



undefined * Catch_14024cf10(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqDeleteCashEffectInfo",0xa70,
                "dbo.up_delete_cash_effectinfo");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400be0e8;
}



void Unwind_14024cfb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024cfc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024cfd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024cfe0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024cfe7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024cff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024d000(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024d010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024d020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024d030(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024d037. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024d040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024d050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024d060(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateCashEffectInfo",0xa46,
                "dbo.up_update_cash_effectinfo");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bde6b;
}



undefined * Catch_14024d100(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateCashEffectInfo",0xa4a,
                "dbo.up_update_cash_effectinfo");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bde6b;
}



void Unwind_14024d1a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14024d1b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14024d1c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024d1d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024d1d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14024d1e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024d1f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024d200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024d210(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024d217. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14024d220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024d230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024d240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14024d250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14024d260(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024d267. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024d270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14024d280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024d290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14024d2a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14024d2b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024d2b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024d2c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x80));
  return;
}



void Unwind_14024d2d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024d2e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xa0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqInsertCashEffectInfo",0xa1f,
                "dbo.up_insert_cash_effectinfo");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400bdab4;
}



undefined * Catch_14024d380(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqInsertCashEffectInfo",0xa23,
                "dbo.up_insert_cash_effectinfo");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400bdab4;
}



void Unwind_14024d420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_14024d430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_14024d440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_14024d450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_14024d460(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_14024d470(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xb0);
  return;
}



void Unwind_14024d480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_14024d490(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_14024d4a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_14024d4b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_14024d4c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x138);
  return;
}



void Unwind_14024d4d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x240));
  return;
}



void Unwind_14024d4e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024d4e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x248));
  return;
}



void Unwind_14024d4f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x240));
  return;
}



void Unwind_14024d500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x150);
  return;
}



void Unwind_14024d510(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a0);
  return;
}



void Unwind_14024d520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x188);
  return;
}



void Unwind_14024d530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1b8);
  return;
}



undefined * Catch_14024d540(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x170);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x230);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqReadCashEffectInfo",0x9f6,"dbo.up_select_cash_effectinfo")
  ;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x130),1);
  return &DAT_1400bd3a7;
}



undefined * Catch_14024d5d0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x180);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x230);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqReadCashEffectInfo",0x9fa,"dbo.up_select_cash_effectinfo")
  ;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x130),1);
  return &DAT_1400bd3a7;
}



void Unwind_14024d660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb0);
  return;
}



void Unwind_14024d670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xb8);
  return;
}



void Unwind_14024d680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd0);
  return;
}



void Unwind_14024d690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xe8);
  return;
}



void Unwind_14024d6a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024d6b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024d6c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024d6d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024d6d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024d6e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14024d6f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024d700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024d710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024d720(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024d727. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024d730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024d740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024d750(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventHearts",0x9a0,"dbo.up_update_event_hearts");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bcad1;
}



undefined * Catch_14024d7f0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventHearts",0x9a4,"dbo.up_update_event_hearts");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bcad1;
}



void Unwind_14024d890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024d8a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024d8b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024d8c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024d8c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024d8d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14024d8e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024d8f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024d900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024d910(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024d917. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024d920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024d930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024d940(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventInquiry",0x97b,"dbo.up_update_event_inquiry");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bc711;
}



undefined * Catch_14024d9e0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventInquiry",0x97f,"dbo.up_update_event_inquiry");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bc711;
}



void Unwind_14024da80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024da90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024daa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024dab0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024dab7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024dac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14024dad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024dae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024daf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024db00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024db07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024db10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024db20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024db30(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventDayPartyMission",0x955,
                "dbo.up_update_event_daypartymission");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bc351;
}



undefined * Catch_14024dbd0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventDayPartyMission",0x959,
                "dbo.up_update_event_daypartymission");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bc351;
}



void Unwind_14024dc70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024dc80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024dc90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024dca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024dca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024dcb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14024dcc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024dcd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024dce0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024dcf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024dcf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024dd00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024dd10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024dd20(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventFortune",0x92f,"dbo.up_update_event_fortune");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bbf91;
}



undefined * Catch_14024ddc0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventFortune",0x933,"dbo.up_update_event_fortune");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bbf91;
}



void Unwind_14024de60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024de70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024de80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024de90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024de97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024dea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14024deb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024dec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024ded0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024dee0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024dee7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024def0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024df00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024df10(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventFatigue",0x909,"dbo.up_update_event_fatigue");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bbbd1;
}



undefined * Catch_14024dfb0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateEventFatigue",0x90d,"dbo.up_update_event_fatigue");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bbbd1;
}



void Unwind_14024e050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024e060(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024e070(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024e080(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024e087. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024e090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14024e0a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024e0b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024e0c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024e0d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024e0d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024e0e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024e0f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024e100(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateInquiryCount",0x8e2,"dbo.up_update_inquiry_count");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bb811;
}



undefined * Catch_14024e1a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateInquiryCount",0x8e6,"dbo.up_update_inquiry_count");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bb811;
}



void Unwind_14024e240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024e250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024e260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024e270(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024e277. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024e280(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_14024e290(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024e2a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14024e2b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14024e2c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024e2c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_14024e2d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_14024e2e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024e2f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024e300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024e310(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024e317. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024e320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024e330(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024e340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024e350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024e360(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024e367. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024e370(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024e380(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024e390(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024e3a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024e3b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024e3b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024e3c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024e3d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024e3e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024e3f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024e400(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024e407. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_14024e410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024e420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024e430(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateDungeonRank",0x8bc,"dbo.up_update_dungeon_rank");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bb453;
}



undefined * Catch_14024e4d0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x88);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqUpdateDungeonRank",0x8c0,"dbo.up_update_dungeon_rank");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400bb453;
}



void Unwind_14024e570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_14024e580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14024e590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14024e5a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_14024e5b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_14024e5c0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_14024e5d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14024e5e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14024e5f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_14024e600(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_14024e610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_14024e620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x250));
  return;
}



void Unwind_14024e630(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024e637. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 600));
  return;
}



void Unwind_14024e640(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x250));
  return;
}



void Unwind_14024e650(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x130);
  return;
}



void Unwind_14024e660(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x170);
  return;
}



void Unwind_14024e670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a0);
  return;
}



void Unwind_14024e680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1d0);
  return;
}



void Unwind_14024e690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x188);
  return;
}



void Unwind_14024e6a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1b8);
  return;
}



undefined * Catch_14024e6b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x140);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x240);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqReadDungeonRank",0x88b,"dbo.up_read_dungeon_rank");
  *(undefined2 *)(param_2 + 0x54) = 0xb5;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x110),1);
  return &DAT_1400baaaf;
}



undefined * Catch_14024e750(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x160);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x240);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqReadDungeonRank",0x890,"dbo.up_read_dungeon_rank");
  *(undefined2 *)(param_2 + 0x54) = 0xb5;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x110),1);
  return &DAT_1400baaaf;
}



void Unwind_14024e7f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_14024e800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_14024e810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_14024e820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_14024e830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024e840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_14024e850(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_14024e860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_14024e870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_14024e880(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x80);
  return;
}



void Unwind_14024e890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_14024e8a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x1d8));
  return;
}



void Unwind_14024e8b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024e8b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_14024e8c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x1d8));
  return;
}



void Unwind_14024e8d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_14024e8e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x168);
  return;
}



undefined * Catch_14024e8f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x130);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1c0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqReadMoney",
                0x836,"dbo.up_read_money");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x1c8),1);
  return &DAT_1400ba124;
}



undefined * Catch_14024e980(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x128);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x1c0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqReadMoney",
                0x83a,"dbo.up_read_money");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x1c8),1);
  return &DAT_1400ba124;
}



void Unwind_14024ea10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_14024ea20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_14024ea30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_14024ea40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_14024ea50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024ea60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024ea70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024ea80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ea87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024ea90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024eaa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024eab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024eac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024ead0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ead7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024eae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024eaf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024eb00(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqSaveMoney",
                0x7f2,"dbo.up_save_money");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b9c1b;
}



undefined * Catch_14024eba0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqSaveMoney",
                0x7f6,"dbo.up_save_money");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b9c1b;
}



void Unwind_14024ec40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024ec50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024ec60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024ec70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ec77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024ec80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024ec90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024eca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024ecb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024ecc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ecc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024ecd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024ece0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024ecf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ed00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ed10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ed17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14024ed20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024ed30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024ed40(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqSaveInventoryStorageMoney",0x7c8,
                "dbo.up_save_inventory_storage_money");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b9867;
}



undefined * Catch_14024ede0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqSaveInventoryStorageMoney",0x7cc,
                "dbo.up_save_inventory_storage_money");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b9867;
}



void Unwind_14024ee80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024ee90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024eea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024eeb0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024eeb7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024eec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024eed0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024eee0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024eef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024ef00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024ef07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024ef10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024ef20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024ef30(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqIndividualRoomUpdate",0x7a0,
                "dbo.up_update_individual_room");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b939b;
}



undefined * Catch_14024efd0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqIndividualRoomUpdate",0x7a4,
                "dbo.up_update_individual_room");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b939b;
}



void Unwind_14024f070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024f080(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024f090(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024f0a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024f0a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024f0b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024f0c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024f0d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024f0e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024f0f0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024f0f7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024f100(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024f110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024f120(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqLobbyUpdate",
                0x776,"dbo.up_update_character_lobby");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b8feb;
}



undefined * Catch_14024f1c0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqLobbyUpdate"
                ,0x77a,"dbo.up_update_character_lobby");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b8feb;
}



void Unwind_14024f260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd8);
  return;
}



void Unwind_14024f270(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xd0);
  return;
}



void Unwind_14024f280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024f290(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024f297. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024f2a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024f2b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024f2c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x60);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterBlockUpdateByName",0x74d,
                "dbo.up_update_character_block_by_name");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_1400b8c37;
}



undefined * Catch_14024f360(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x68);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xc0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterBlockUpdateByName",0x751,
                "dbo.up_update_character_block_by_name");
  *(undefined4 *)(param_2 + 0xc0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 200),1);
  return &DAT_1400b8c37;
}



void Unwind_14024f400(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024f410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024f420(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024f430(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024f437. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14024f440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024f450(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024f460(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterBlockUpdate",0x728,
                "dbo.up_update_character_block");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b89c8;
}



undefined * Catch_14024f500(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterBlockUpdate",0x72c,
                "dbo.up_update_character_block");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b89c8;
}



void Unwind_14024f5a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024f5b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024f5c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024f5d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024f5d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024f5e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024f5f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024f600(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024f610(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024f620(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024f627. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024f630(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024f640(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024f650(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterStaminaUpdate",0x702,
                "dbo.up_update_character_Stamina");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b874b;
}



undefined * Catch_14024f6f0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterStaminaUpdate",0x706,
                "dbo.up_update_character_Stamina");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b874b;
}



void Unwind_14024f790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024f7a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024f7b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024f7c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024f7c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024f7d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024f7e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024f7f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024f800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024f810(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024f817. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024f820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024f830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024f840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024f850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024f860(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024f867. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14024f870(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024f880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024f890(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterSPUpdate",0x6d8,"dbo.up_update_character_sp");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b8399;
}



undefined * Catch_14024f930(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterSPUpdate",0x6dc,"dbo.up_update_character_sp");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b8399;
}



void Unwind_14024f9d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024f9e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024f9f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024fa00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024fa07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024fa10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024fa20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024fa30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024fa40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024fa50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024fa57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024fa60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024fa70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024fa80(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterJOBUpdate",0x6ad,"dbo.up_update_character_job");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b7ecc;
}



undefined * Catch_14024fb20(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterJOBUpdate",0x6b1,"dbo.up_update_character_job");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b7ecc;
}



void Unwind_14024fbc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_14024fbd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_14024fbe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024fbf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024fbf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14024fc00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024fc10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024fc20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024fc30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024fc40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024fc47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_14024fc50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024fc60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024fc70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024fc80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_14024fc90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024fca0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024fca7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024fcb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_14024fcc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024fcd0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x90);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterLevelUpdate",0x684,
                "dbo.up_update_character_level");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1400b7b15;
}



undefined * Catch_14024fd70(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterLevelUpdate",0x688,
                "dbo.up_update_character_level");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1400b7b15;
}



void Unwind_14024fe10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_14024fe20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_14024fe30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_14024fe40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024fe47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024fe50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_14024fe60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_14024fe70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024fe80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024fe90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014024fe97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_14024fea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_14024feb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_14024fec0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterHeartsUpdate",0x659,
                "dbo.up_update_character_hearts");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b761c;
}



undefined * Catch_14024ff60(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterHeartsUpdate",0x65d,
                "dbo.up_update_character_hearts");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b761c;
}



void Unwind_140250000(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140250010(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140250020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140250030(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140250037. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140250040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140250050(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140250060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250070(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250080(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140250087. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140250090(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402500a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402500b0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterGiveUpUpdate",0x62f,
                "dbo.up_update_character_give_up");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b726b;
}



undefined * Catch_140250150(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterGiveUpUpdate",0x633,
                "dbo.up_update_character_give_up");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b726b;
}



void Unwind_1402501f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140250200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140250210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140250220(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140250227. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140250230(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140250250(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterTutorialUpdate",0x603,
                "dbo.up_update_character_tutorial");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b6eb8;
}



undefined * Catch_1402502f0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterTutorialUpdate",0x607,
                "dbo.up_update_character_tutorial");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b6eb8;
}



void Unwind_140250390(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_1402503a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_1402503b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402503c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402503c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402503d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_1402503e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402503f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250410(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140250417. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140250420(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250430(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140250440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140250450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140250460(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140250467. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140250470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140250480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140250490(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterFirstLoginUpdate",0x5dd,
                "dbo.up_update_character_first_login");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b6c37;
}



undefined * Catch_140250530(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterFirstLoginUpdate",0x5e1,
                "dbo.up_update_character_first_login");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b6c37;
}



void Unwind_1402505d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_1402505e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_1402505f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140250600(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140250607. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140250610(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140250620(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140250630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250640(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250650(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140250657. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140250660(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250670(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140250680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140250690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402506a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402506a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402506b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402506c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402506d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterFatigueUpdate",0x5b1,
                "dbo.up_update_character_fatigue");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b676f;
}



undefined * Catch_140250770(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterFatigueUpdate",0x5b5,
                "dbo.up_update_character_fatigue");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b676f;
}



void Unwind_140250810(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140250820(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140250830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140250840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140250850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140250860(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xa0);
  return;
}



void Unwind_140250870(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140250880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140250890(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_1402508a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_1402508b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x160);
  return;
}



void Unwind_1402508c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_1402508d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_1402508e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402508e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x128));
  return;
}



void Unwind_1402508f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x90));
  return;
}



void Unwind_140250900(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140250910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x230);
  return;
}



void Unwind_140250920(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x218);
  return;
}



void Unwind_140250930(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x78);
  return;
}



void Unwind_140250940(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x130);
  return;
}



void Unwind_140250950(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x170);
  return;
}



void Unwind_140250960(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x140);
  return;
}



void Unwind_140250970(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x150);
  return;
}



void Unwind_140250980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1b8);
  return;
}



void Unwind_140250990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x200);
  return;
}



void Unwind_1402509a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1d0);
  return;
}



void Unwind_1402509b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1e8);
  return;
}



undefined * Catch_1402509c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x1b0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x80);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqSelectBattleRank",0x57f,"dbo.up_select_battle_rank");
  *(undefined2 *)(param_2 + 0x5c) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x120),1);
  return &DAT_1400b6116;
}



undefined * Catch_140250a60(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x1a0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x80);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqSelectBattleRank",0x584,"dbo.up_select_battle_rank");
  *(undefined2 *)(param_2 + 0x5c) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x120),1);
  return &DAT_1400b6116;
}



void Unwind_140250b00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140250b10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140250b20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140250b30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140250b40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140250b50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140250b60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140250b70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140250b77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140250b80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250b90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140250ba0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140250bb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140250bc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140250bd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140250bd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140250be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140250bf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140250c00(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x90);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterExperienceUpdate",0x52b,
                "dbo.up_update_character_experience");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1400b55e8;
}



undefined * Catch_140250ca0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterExperienceUpdate",0x52f,
                "dbo.up_update_character_experience");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1400b55e8;
}



void Unwind_140250d40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140250d50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140250d60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140250d70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140250d77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140250d80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140250d90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140250da0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250db0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250dc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140250dc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140250dd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250de0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140250df0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDicePointUpdate",0x501,
                "dbo.up_update_character_dice_point");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b520b;
}



undefined * Catch_140250e90(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDicePointUpdate",0x505,
                "dbo.up_update_character_dice_point");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b520b;
}



void Unwind_140250f30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140250f40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140250f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140250f60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140250f67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140250f70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140250f80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140250f90(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelWinUpdate",0x4da,
                "dbo.up_update_character_duel_win");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b4e58;
}



undefined * Catch_140251030(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelWinUpdate",0x4de,
                "dbo.up_update_character_duel_win");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b4e58;
}



void Unwind_1402510d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_1402510e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_1402510f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140251100(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251107. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140251110(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140251120(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140251130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140251140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140251150(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251157. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140251160(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140251170(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140251180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140251190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402511a0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402511a7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_1402511b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402511c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402511d0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelLadderUpdate",0x4b2,
                "dbo.up_update_character_duel_ladder");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b4bd7;
}



undefined * Catch_140251270(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelLadderUpdate",0x4b6,
                "dbo.up_update_character_duel_ladder");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b4bd7;
}



void Unwind_140251310(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140251320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140251330(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140251340(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251347. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140251350(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140251360(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140251370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140251380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140251390(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251397. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402513a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402513b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402513c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelPointUpdate",0x487,
                "dbo.up_update_character_duel_point");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b470b;
}



undefined * Catch_140251460(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelPointUpdate",0x48b,
                "dbo.up_update_character_duel_point");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b470b;
}



void Unwind_140251500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140251510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140251520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140251530(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251537. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140251540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140251550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140251560(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelLoseUpdate",0x45d,
                "dbo.up_update_character_duel_lose");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b4358;
}



undefined * Catch_140251600(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelLoseUpdate",0x461,
                "dbo.up_update_character_duel_lose");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b4358;
}



void Unwind_1402516a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_1402516b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_1402516c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_1402516d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402516d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_1402516e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402516f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140251700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140251710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140251720(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251727. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140251730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140251740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140251750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140251760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140251770(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251777. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140251780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140251790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402517a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402517b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_1402517c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402517d0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402517d7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402517e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402517f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140251800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140251810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140251820(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251827. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140251830(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140251840(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140251850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140251860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140251870(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251877. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140251880(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140251890(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402518a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402518b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402518c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402518c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402518d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_1402518e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402518f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x90);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelInfoUpdate",0x434,"dbo.up_update_duel_info");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1400b40d4;
}



undefined * Catch_140251990(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelInfoUpdate",0x438,"dbo.up_update_duel_info");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1400b40d4;
}



void Unwind_140251a30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140251a40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140251a50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140251a60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251a67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140251a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140251a80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140251a90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140251aa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140251ab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140251ac0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251ac7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140251ad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140251ae0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140251af0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x90);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelExperienceUpdate",0x406,
                "dbo.up_update_character_duel_Experience");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1400b3738;
}



undefined * Catch_140251b90(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelExperienceUpdate",0x40a,
                "dbo.up_update_character_duel_Experience");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe8),1);
  return &DAT_1400b3738;
}



void Unwind_140251c30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140251c40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140251c50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140251c60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251c67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140251c70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140251c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140251c90(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelDiscountUpdate",0x3db,
                "dbo.up_update_character_duel_disconnect");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b3358;
}



undefined * Catch_140251d30(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterDuelDiscountUpdate",0x3df,
                "dbo.up_update_character_duel_disconnect");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400b3358;
}



void Unwind_140251dd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140251de0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140251df0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140251e00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_140251e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x88);
  return;
}



void Unwind_140251e20(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x50);
  return;
}



void Unwind_140251e30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140251e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140251e50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_140251e60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x88);
  return;
}



void Unwind_140251e70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x158);
  return;
}



void Unwind_140251e80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x3f8));
  return;
}



void Unwind_140251e90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140251e97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x150));
  return;
}



void Unwind_140251ea0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x3f8));
  return;
}



void Unwind_140251eb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x160);
  return;
}



void Unwind_140251ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x358);
  return;
}



void Unwind_140251ed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x388);
  return;
}



void Unwind_140251ee0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2b0);
  return;
}



void Unwind_140251ef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a8);
  return;
}



void Unwind_140251f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x370);
  return;
}



void Unwind_140251f10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x220);
  return;
}



void Unwind_140251f20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2e0);
  return;
}



void Unwind_140251f30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x250);
  return;
}



void Unwind_140251f40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x340);
  return;
}



void Unwind_140251f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x280);
  return;
}



void Unwind_140251f60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x310);
  return;
}



void Unwind_140251f70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c0);
  return;
}



void Unwind_140251f80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1d8);
  return;
}



void Unwind_140251f90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x208);
  return;
}



void Unwind_140251fa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x238);
  return;
}



void Unwind_140251fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x268);
  return;
}



void Unwind_140251fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x298);
  return;
}



void Unwind_140251fd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2c8);
  return;
}



void Unwind_140251fe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2f8);
  return;
}



void Unwind_140251ff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x328);
  return;
}



undefined * Catch_140252000(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x170);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x3e0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqGetCharacterDuelInfo",0x3ae,"dbo.up_get_duel_info");
  *(undefined2 *)(param_2 + 0xec) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 1000),1);
  return &DAT_1400b2fa0;
}



undefined * Catch_1402520a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x198);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x3e0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqGetCharacterDuelInfo",0x3b3,"dbo.up_get_duel_info");
  *(undefined2 *)(param_2 + 0xec) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 1000),1);
  return &DAT_1400b2fa0;
}



void Unwind_140252140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140252150(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140252160(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x70);
  return;
}



void Unwind_140252170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x88);
  return;
}



void Unwind_140252180(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_140252190(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_1402521a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_1402521b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_1402521c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_1402521d0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x70);
  return;
}



void Unwind_1402521e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_1402521f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140252200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140252210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140252220(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x280);
  return;
}



void Unwind_140252230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x128));
  return;
}



void Unwind_140252240(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140252247. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x160));
  return;
}



void Unwind_140252250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x128));
  return;
}



void Unwind_140252260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x2d8);
  return;
}



void Unwind_140252270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x150));
  return;
}



void Unwind_140252280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x150));
  return;
}



void Unwind_140252290(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140252297. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x128));
  return;
}



void Unwind_1402522a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x150));
  return;
}



void Unwind_1402522b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x160);
  return;
}



void Unwind_1402522c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x880);
  return;
}



void Unwind_1402522d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x778);
  return;
}



void Unwind_1402522e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 1000);
  return;
}



void Unwind_1402522f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x658);
  return;
}



void Unwind_140252300(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x130);
  return;
}



void Unwind_140252310(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x308);
  return;
}



void Unwind_140252320(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c0);
  return;
}



void Unwind_140252330(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1e0);
  return;
}



void Unwind_140252340(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x298);
  return;
}



void Unwind_140252350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x418);
  return;
}



void Unwind_140252360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x868);
  return;
}



void Unwind_140252370(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x448);
  return;
}



void Unwind_140252380(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x688);
  return;
}



void Unwind_140252390(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x478);
  return;
}



void Unwind_1402523a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x7a8);
  return;
}



void Unwind_1402523b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4a8);
  return;
}



void Unwind_1402523c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6b8);
  return;
}



void Unwind_1402523d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4d8);
  return;
}



void Unwind_1402523e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x838);
  return;
}



void Unwind_1402523f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x508);
  return;
}



void Unwind_140252400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6e8);
  return;
}



void Unwind_140252410(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x330);
  return;
}



void Unwind_140252420(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x538);
  return;
}



void Unwind_140252430(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x7d8);
  return;
}



void Unwind_140252440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x568);
  return;
}



void Unwind_140252450(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x718);
  return;
}



void Unwind_140252460(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x598);
  return;
}



void Unwind_140252470(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x898);
  return;
}



void Unwind_140252480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5c8);
  return;
}



void Unwind_140252490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x748);
  return;
}



void Unwind_1402524a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3a0);
  return;
}



void Unwind_1402524b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x808);
  return;
}



void Unwind_1402524c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x628);
  return;
}



void Unwind_1402524d0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf8);
  return;
}



void Unwind_1402524e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2f0);
  return;
}



void Unwind_1402524f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x200);
  return;
}



void Unwind_140252500(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x220);
  return;
}



void Unwind_140252510(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2b8);
  return;
}



void Unwind_140252520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3b8);
  return;
}



void Unwind_140252530(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x118);
  return;
}



void Unwind_140252540(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 800);
  return;
}



void Unwind_140252550(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x240);
  return;
}



void Unwind_140252560(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x260);
  return;
}



void Unwind_140252570(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 400);
  return;
}



void Unwind_140252580(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3d0);
  return;
}



void Unwind_140252590(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x108);
  return;
}



void Unwind_1402525a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b0);
  return;
}



void Unwind_1402525b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1a0);
  return;
}



void Unwind_1402525c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d0);
  return;
}



void Unwind_1402525d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1f0);
  return;
}



void Unwind_1402525e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x400);
  return;
}



void Unwind_1402525f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x430);
  return;
}



void Unwind_140252600(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x460);
  return;
}



void Unwind_140252610(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x490);
  return;
}



void Unwind_140252620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4c0);
  return;
}



void Unwind_140252630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4f0);
  return;
}



void Unwind_140252640(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x520);
  return;
}



void Unwind_140252650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x550);
  return;
}



void Unwind_140252660(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x580);
  return;
}



void Unwind_140252670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5b0);
  return;
}



void Unwind_140252680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5e0);
  return;
}



void Unwind_140252690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x610);
  return;
}



void Unwind_1402526a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x640);
  return;
}



void Unwind_1402526b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x670);
  return;
}



void Unwind_1402526c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6a0);
  return;
}



void Unwind_1402526d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6d0);
  return;
}



void Unwind_1402526e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x700);
  return;
}



void Unwind_1402526f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x730);
  return;
}



void Unwind_140252700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x760);
  return;
}



void Unwind_140252710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x790);
  return;
}



void Unwind_140252720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x7c0);
  return;
}



void Unwind_140252730(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x7f0);
  return;
}



void Unwind_140252740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x820);
  return;
}



void Unwind_140252750(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x110);
  return;
}



void Unwind_140252760(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x230);
  return;
}



void Unwind_140252770(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x210);
  return;
}



void Unwind_140252780(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x250);
  return;
}



void Unwind_140252790(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x270);
  return;
}



void Unwind_1402527a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x850);
  return;
}



void Unwind_1402527b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x120);
  return;
}



void Unwind_1402527c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2a8);
  return;
}



void Unwind_1402527d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x288);
  return;
}



void Unwind_1402527e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2c8);
  return;
}



void Unwind_1402527f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2e0);
  return;
}



undefined * Catch_140252800(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x358);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqGetCharacterAll",0x356,"dbo.up_get_all_character");
  *(undefined2 *)(param_2 + 0x6c) = 0x68;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x158),1);
  return &DAT_1400b2281;
}



undefined * Catch_1402528a0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x360);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqGetCharacterAll",0x35b,"dbo.up_get_all_character");
  *(undefined2 *)(param_2 + 0x6c) = 0x68;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x158),1);
  return &DAT_1400b2281;
}



void Unwind_140252940(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140252950(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140252960(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140252970(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140252980(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140252990(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_1402529a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_1402529b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_1402529c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_1402529d0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x80);
  return;
}



void Unwind_1402529e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_1402529f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140252a00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140252a10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140252a20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x138);
  return;
}



void Unwind_140252a30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140252a40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140252a47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x100));
  return;
}



void Unwind_140252a50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140252a60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140252a70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x108));
  return;
}



void Unwind_140252a80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x108));
  return;
}



void Unwind_140252a90(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140252a97. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140252aa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x108));
  return;
}



void Unwind_140252ab0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140252ac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1a8);
  return;
}



void Unwind_140252ad0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x68);
  return;
}



void Unwind_140252ae0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x178);
  return;
}



void Unwind_140252af0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x148);
  return;
}



void Unwind_140252b00(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x168);
  return;
}



void Unwind_140252b10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x158);
  return;
}



void Unwind_140252b20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1f0);
  return;
}



void Unwind_140252b30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c0);
  return;
}



undefined * Catch_140252b40(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 400);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqGetCharacterSimple",0x29e,
                "dbo.up_get_character_simpleinfo");
  *(undefined2 *)(param_2 + 0x214) = 100;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  return &DAT_1400afe91;
}



undefined * Catch_140252be0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x198);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqGetCharacterSimple",0x2a3,
                "dbo.up_get_character_simpleinfo");
  *(undefined2 *)(param_2 + 0x214) = 100;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  return &DAT_1400afe91;
}



void Unwind_140252c80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x80);
  return;
}



void Unwind_140252c90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140252ca0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa0);
  return;
}



void Unwind_140252cb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb8);
  return;
}



void Unwind_140252cc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140252cd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140252ce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140252cf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140252d00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140252d10(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x60);
  return;
}



void Unwind_140252d20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140252d30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140252d40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140252d50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140252d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x160);
  return;
}



void Unwind_140252d70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_140252d80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140252d87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x130));
  return;
}



void Unwind_140252d90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_140252da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x170);
  return;
}



void Unwind_140252db0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x138));
  return;
}



void Unwind_140252dc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x138));
  return;
}



void Unwind_140252dd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140252dd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x100));
  return;
}



void Unwind_140252de0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x138));
  return;
}



void Unwind_140252df0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x130);
  return;
}



void Unwind_140252e00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 800);
  return;
}



void Unwind_140252e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x350);
  return;
}



void Unwind_140252e20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x7a0);
  return;
}



void Unwind_140252e30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x380);
  return;
}



void Unwind_140252e40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x118);
  return;
}



void Unwind_140252e50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 600);
  return;
}



void Unwind_140252e60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d8);
  return;
}



void Unwind_140252e70(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x298);
  return;
}



void Unwind_140252e80(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1f8);
  return;
}



void Unwind_140252e90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5c0);
  return;
}



void Unwind_140252ea0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3b0);
  return;
}



void Unwind_140252eb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6e0);
  return;
}



void Unwind_140252ec0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3e0);
  return;
}



void Unwind_140252ed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5f0);
  return;
}



void Unwind_140252ee0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x410);
  return;
}



void Unwind_140252ef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x770);
  return;
}



void Unwind_140252f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x440);
  return;
}



void Unwind_140252f10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x620);
  return;
}



void Unwind_140252f20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x470);
  return;
}



void Unwind_140252f30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x710);
  return;
}



void Unwind_140252f40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4a0);
  return;
}



void Unwind_140252f50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2e8);
  return;
}



void Unwind_140252f60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x650);
  return;
}



void Unwind_140252f70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4d0);
  return;
}



void Unwind_140252f80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 2000);
  return;
}



void Unwind_140252f90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x500);
  return;
}



void Unwind_140252fa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x680);
  return;
}



void Unwind_140252fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x530);
  return;
}



void Unwind_140252fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x740);
  return;
}



void Unwind_140252fd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x560);
  return;
}



void Unwind_140252fe0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6b0);
  return;
}



void Unwind_140252ff0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x110);
  return;
}



void Unwind_140253000(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x218);
  return;
}



void Unwind_140253010(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2c8);
  return;
}



void Unwind_140253020(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x238);
  return;
}



void Unwind_140253030(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x198);
  return;
}



void Unwind_140253040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x590);
  return;
}



void Unwind_140253050(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf8);
  return;
}



void Unwind_140253060(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1a8);
  return;
}



void Unwind_140253070(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x188);
  return;
}



void Unwind_140253080(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c8);
  return;
}



void Unwind_140253090(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1e8);
  return;
}



void Unwind_1402530a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x338);
  return;
}



void Unwind_1402530b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x368);
  return;
}



void Unwind_1402530c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x398);
  return;
}



void Unwind_1402530d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3c8);
  return;
}



void Unwind_1402530e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3f8);
  return;
}



void Unwind_1402530f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x428);
  return;
}



void Unwind_140253100(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x458);
  return;
}



void Unwind_140253110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x488);
  return;
}



void Unwind_140253120(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4b8);
  return;
}



void Unwind_140253130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4e8);
  return;
}



void Unwind_140253140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x518);
  return;
}



void Unwind_140253150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x548);
  return;
}



void Unwind_140253160(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x578);
  return;
}



void Unwind_140253170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5a8);
  return;
}



void Unwind_140253180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5d8);
  return;
}



void Unwind_140253190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x608);
  return;
}



void Unwind_1402531a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x638);
  return;
}



void Unwind_1402531b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x668);
  return;
}



void Unwind_1402531c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x698);
  return;
}



void Unwind_1402531d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6c8);
  return;
}



void Unwind_1402531e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6f8);
  return;
}



void Unwind_1402531f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x728);
  return;
}



void Unwind_140253200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x758);
  return;
}



void Unwind_140253210(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_140253220(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x208);
  return;
}



void Unwind_140253230(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x228);
  return;
}



void Unwind_140253240(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x248);
  return;
}



void Unwind_140253250(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x268);
  return;
}



void Unwind_140253260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x788);
  return;
}



void Unwind_140253270(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x108);
  return;
}



void Unwind_140253280(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x288);
  return;
}



void Unwind_140253290(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2b8);
  return;
}



void Unwind_1402532a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2d8);
  return;
}



void Unwind_1402532b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2a8);
  return;
}



undefined * Catch_1402532c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x318);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqGetCharacterByName",0x253,"dbo.up_get_character_by_name");
  *(undefined2 *)(param_2 + 0x7fc) = 100;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe0),1);
  return &DAT_1400af333;
}



undefined * Catch_140253360(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x300);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqGetCharacterByName",600,"dbo.up_get_character_by_name");
  *(undefined2 *)(param_2 + 0x7fc) = 100;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe0),1);
  return &DAT_1400af333;
}



void Unwind_140253400(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140253410(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140253420(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140253430(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140253440(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140253450(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140253460(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140253470(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140253480(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140253490(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x60);
  return;
}



void Unwind_1402534a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_1402534b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_1402534c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_1402534d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_1402534e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x160);
  return;
}



void Unwind_1402534f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_140253500(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140253507. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x130));
  return;
}



void Unwind_140253510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x100));
  return;
}



void Unwind_140253520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x170);
  return;
}



void Unwind_140253530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x138));
  return;
}



void Unwind_140253540(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x138));
  return;
}



void Unwind_140253550(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140253557. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x100));
  return;
}



void Unwind_140253560(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x138));
  return;
}



void Unwind_140253570(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x130);
  return;
}



void Unwind_140253580(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x338);
  return;
}



void Unwind_140253590(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x368);
  return;
}



void Unwind_1402535a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5d8);
  return;
}



void Unwind_1402535b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x398);
  return;
}



void Unwind_1402535c0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x118);
  return;
}



void Unwind_1402535d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b8);
  return;
}



void Unwind_1402535e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2c8);
  return;
}



void Unwind_1402535f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1e8);
  return;
}



void Unwind_140253600(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x268);
  return;
}



void Unwind_140253610(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x7e8);
  return;
}



void Unwind_140253620(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3c8);
  return;
}



void Unwind_140253630(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x608);
  return;
}



void Unwind_140253640(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3f8);
  return;
}



void Unwind_140253650(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x728);
  return;
}



void Unwind_140253660(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x428);
  return;
}



void Unwind_140253670(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x638);
  return;
}



void Unwind_140253680(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x458);
  return;
}



void Unwind_140253690(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x7b8);
  return;
}



void Unwind_1402536a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x488);
  return;
}



void Unwind_1402536b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x668);
  return;
}



void Unwind_1402536c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4b8);
  return;
}



void Unwind_1402536d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2e8);
  return;
}



void Unwind_1402536e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x758);
  return;
}



void Unwind_1402536f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4e8);
  return;
}



void Unwind_140253700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x698);
  return;
}



void Unwind_140253710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x518);
  return;
}



void Unwind_140253720(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x818);
  return;
}



void Unwind_140253730(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x548);
  return;
}



void Unwind_140253740(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6c8);
  return;
}



void Unwind_140253750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x578);
  return;
}



void Unwind_140253760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x788);
  return;
}



void Unwind_140253770(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5a8);
  return;
}



void Unwind_140253780(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6f8);
  return;
}



void Unwind_140253790(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x110);
  return;
}



void Unwind_1402537a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2a8);
  return;
}



void Unwind_1402537b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x228);
  return;
}



void Unwind_1402537c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x288);
  return;
}



void Unwind_1402537d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x248);
  return;
}



void Unwind_1402537e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x350);
  return;
}



void Unwind_1402537f0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf8);
  return;
}



void Unwind_140253800(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1a8);
  return;
}



void Unwind_140253810(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x188);
  return;
}



void Unwind_140253820(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x198);
  return;
}



void Unwind_140253830(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1f8);
  return;
}



void Unwind_140253840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x380);
  return;
}



void Unwind_140253850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3b0);
  return;
}



void Unwind_140253860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3e0);
  return;
}



void Unwind_140253870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x410);
  return;
}



void Unwind_140253880(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x440);
  return;
}



void Unwind_140253890(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x470);
  return;
}



void Unwind_1402538a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4a0);
  return;
}



void Unwind_1402538b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4d0);
  return;
}



void Unwind_1402538c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x500);
  return;
}



void Unwind_1402538d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x530);
  return;
}



void Unwind_1402538e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x560);
  return;
}



void Unwind_1402538f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x590);
  return;
}



void Unwind_140253900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5c0);
  return;
}



void Unwind_140253910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5f0);
  return;
}



void Unwind_140253920(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x620);
  return;
}



void Unwind_140253930(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x650);
  return;
}



void Unwind_140253940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x680);
  return;
}



void Unwind_140253950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6b0);
  return;
}



void Unwind_140253960(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6e0);
  return;
}



void Unwind_140253970(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x710);
  return;
}



void Unwind_140253980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x740);
  return;
}



void Unwind_140253990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x770);
  return;
}



void Unwind_1402539a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x7a0);
  return;
}



void Unwind_1402539b0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_1402539c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x218);
  return;
}



void Unwind_1402539d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x238);
  return;
}



void Unwind_1402539e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 600);
  return;
}



void Unwind_1402539f0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x278);
  return;
}



void Unwind_140253a00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 2000);
  return;
}



void Unwind_140253a10(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x108);
  return;
}



void Unwind_140253a20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x298);
  return;
}



void Unwind_140253a30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2b8);
  return;
}



void Unwind_140253a40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2d8);
  return;
}



void Unwind_140253a50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c8);
  return;
}



undefined * Catch_140253a60(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x330);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqGetCharacterByIDNumber",0x1ba,"dbo.up_get_character");
  *(undefined2 *)(param_2 + 0x83c) = 100;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe0),1);
  return &DAT_1400ad3a3;
}



undefined * Catch_140253b00(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x310);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqGetCharacterByIDNumber",0x1bf,"dbo.up_get_character");
  *(undefined2 *)(param_2 + 0x83c) = 100;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xe0),1);
  return &DAT_1400ad3a3;
}



void Unwind_140253ba0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140253bb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140253bc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140253bd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140253be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140253bf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140253c00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140253c10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140253c17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140253c20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140253c30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140253c40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140253c50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140253c57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140253c60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x58));
  return;
}



void Unwind_140253c70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



undefined * Catch_140253c80(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xc0);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x68);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp","CDBLobbyWriteQuery::DBReqDelCharacter"
                ,0x125,"dbo.up_delete_character");
  *(undefined4 *)(param_2 + 0x40) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  return &DAT_1400ab4b8;
}



undefined * Catch_140253d10(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xd0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x68);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqDelCharacter",0x129,"dbo.up_delete_character");
  *(undefined4 *)(param_2 + 0x40) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x60),1);
  return &DAT_1400ab4b8;
}



void Unwind_140253da0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140253db0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140253dc0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140253dd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140253de0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140253df0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x70);
  return;
}



void Unwind_140253e00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1f0);
  return;
}



void Unwind_140253e10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140253e20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140253e27. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x158));
  return;
}



void Unwind_140253e30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0xf8));
  return;
}



void Unwind_140253e40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1c8);
  return;
}



void Unwind_140253e50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140253e60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140253e67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xf8));
  return;
}



void Unwind_140253e70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x110));
  return;
}



void Unwind_140253e80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1d8);
  return;
}



void Unwind_140253e90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x118));
  return;
}



void Unwind_140253ea0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140253ea7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x110));
  return;
}



void Unwind_140253eb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x118));
  return;
}



void Unwind_140253ec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1b0);
  return;
}



void Unwind_140253ed0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x128));
  return;
}



void Unwind_140253ee0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140253ee7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x118));
  return;
}



void Unwind_140253ef0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x128));
  return;
}



void Unwind_140253f00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1d0);
  return;
}



void Unwind_140253f10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x138));
  return;
}



void Unwind_140253f20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x138));
  return;
}



void Unwind_140253f30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140253f37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x128));
  return;
}



void Unwind_140253f40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x138));
  return;
}



void Unwind_140253f50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x200);
  return;
}



void Unwind_140253f60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x148));
  return;
}



void Unwind_140253f70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x148));
  return;
}



void Unwind_140253f80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140253f87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x138));
  return;
}



void Unwind_140253f90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x148));
  return;
}



void Unwind_140253fa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x1b8);
  return;
}



void Unwind_140253fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x160));
  return;
}



void Unwind_140253fc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x160));
  return;
}



void Unwind_140253fd0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140253fd7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x148));
  return;
}



void Unwind_140253fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x160));
  return;
}



void Unwind_140253ff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x158);
  return;
}



void Unwind_140254000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x758);
  return;
}



void Unwind_140254010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3f8);
  return;
}



void Unwind_140254020(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x608);
  return;
}



void Unwind_140254030(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x428);
  return;
}



void Unwind_140254040(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6f8);
  return;
}



void Unwind_140254050(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x100);
  return;
}



void Unwind_140254060(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2a8);
  return;
}



void Unwind_140254070(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x268);
  return;
}



void Unwind_140254080(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x288);
  return;
}



void Unwind_140254090(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x218);
  return;
}



void Unwind_1402540a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x458);
  return;
}



void Unwind_1402540b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x638);
  return;
}



void Unwind_1402540c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x488);
  return;
}



void Unwind_1402540d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x7b8);
  return;
}



void Unwind_1402540e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4b8);
  return;
}



void Unwind_1402540f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x668);
  return;
}



void Unwind_140254100(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4e8);
  return;
}



void Unwind_140254110(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x728);
  return;
}



void Unwind_140254120(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x518);
  return;
}



void Unwind_140254130(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x698);
  return;
}



void Unwind_140254140(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x548);
  return;
}



void Unwind_140254150(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x788);
  return;
}



void Unwind_140254160(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2f0);
  return;
}



void Unwind_140254170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x368);
  return;
}



void Unwind_140254180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x578);
  return;
}



void Unwind_140254190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x590);
  return;
}



void Unwind_1402541a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6c8);
  return;
}



void Unwind_1402541b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x380);
  return;
}



void Unwind_1402541c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3b0);
  return;
}



void Unwind_1402541d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3e0);
  return;
}



void Unwind_1402541e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x410);
  return;
}



void Unwind_1402541f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x440);
  return;
}



void Unwind_140254200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x470);
  return;
}



void Unwind_140254210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4a0);
  return;
}



void Unwind_140254220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4d0);
  return;
}



void Unwind_140254230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x500);
  return;
}



void Unwind_140254240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x530);
  return;
}



void Unwind_140254250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x560);
  return;
}



void Unwind_140254260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5c0);
  return;
}



void Unwind_140254270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5f0);
  return;
}



void Unwind_140254280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x620);
  return;
}



void Unwind_140254290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x650);
  return;
}



void Unwind_1402542a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x680);
  return;
}



void Unwind_1402542b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6b0);
  return;
}



void Unwind_1402542c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6e0);
  return;
}



void Unwind_1402542d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x710);
  return;
}



void Unwind_1402542e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x740);
  return;
}



void Unwind_1402542f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x770);
  return;
}



void Unwind_140254300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x7a0);
  return;
}



void Unwind_140254310(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_140254320(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x238);
  return;
}



void Unwind_140254330(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x298);
  return;
}



void Unwind_140254340(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 600);
  return;
}



void Unwind_140254350(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2c8);
  return;
}



void Unwind_140254360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 2000);
  return;
}



void Unwind_140254370(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x108);
  return;
}



void Unwind_140254380(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x278);
  return;
}



void Unwind_140254390(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x2b8);
  return;
}



void Unwind_1402543a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x228);
  return;
}



void Unwind_1402543b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x248);
  return;
}



undefined * Catch_1402543c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x338);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x58);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterCreate",0xea,"dbo.up_create_character");
  *(undefined2 *)(param_2 + 0x7fc) = 0x8c;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x150),1);
  return &DAT_1400aaf15;
}



undefined * Catch_140254460(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x318);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x58);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryCharacter.cpp",
                "CDBLobbyWriteQuery::DBReqCharacterCreate",0xef,"dbo.up_create_character");
  *(undefined2 *)(param_2 + 0x7fc) = 0x8c;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x150),1);
  return &DAT_1400aaf15;
}



void Unwind_140254500(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x70);
  return;
}



void Unwind_140254510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x78);
  return;
}



void Unwind_140254520(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_140254530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xa8);
  return;
}



void Unwind_140254540(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140254550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140254560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140254570(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140254577. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140254580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140254590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_1402545a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402545b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402545c0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402545c7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_1402545d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_1402545e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402545f0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x88);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryBooth.cpp",
                "CDBLobbyWriteQuery::DBReqBoothUseableCountUpdate",0xbc,
                "dbo.up_update_booth_useable_count");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400a8efc;
}



undefined * Catch_140254690(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x80);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryBooth.cpp",
                "CDBLobbyWriteQuery::DBReqBoothUseableCountUpdate",0xc0,
                "dbo.up_update_booth_useable_count");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400a8efc;
}



void Unwind_140254730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf0);
  return;
}



void Unwind_140254740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140254750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140254760(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140254767. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_140254770(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x68));
  return;
}



void Unwind_140254780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140254790(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402547a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402547b0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402547b7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x68));
  return;
}



void Unwind_1402547c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_1402547d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_1402547e0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryBooth.cpp","CDBLobbyWriteQuery::DBReqSaveBoothItem",
                0x92,"dbo.up_save_item_booth");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400a8b41;
}



undefined * Catch_140254880(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x88);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xe0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryBooth.cpp","CDBLobbyWriteQuery::DBReqSaveBoothItem",
                0x96,"dbo.up_save_item_booth");
  *(undefined4 *)(param_2 + 0xe0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400a8b41;
}



void Unwind_140254920(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe8);
  return;
}



void Unwind_140254930(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xe0);
  return;
}



void Unwind_140254940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140254950(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140254957. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140254960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140254970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140254980(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x80);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryBooth.cpp","CDBLobbyWriteQuery::DBReqBoothCreate",0x47
                ,"dbo.up_create_booth");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400a8738;
}



undefined * Catch_140254a20(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x58);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xd0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryBooth.cpp","CDBLobbyWriteQuery::DBReqBoothCreate",
                0x4b,"dbo.up_create_booth");
  *(undefined4 *)(param_2 + 0xd0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xd8),1);
  return &DAT_1400a8738;
}



void Unwind_140254ac0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140254ad0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_140254ae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140254af0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140254af7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140254b00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140254b10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140254b20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140254b30(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140254b37. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140254b40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140254b50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140254b60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140254b70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140254b77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x50));
  return;
}



void Unwind_140254b80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140254b90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140254ba0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0xb8);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryBan.cpp","CDBLobbyWriteQuery::DBReqBanMemoUpdate",0xc2
                ,"dbo.up_update_ban_memo");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400a84bc;
}



undefined * Catch_140254c40(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0xb0);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x100);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryBan.cpp","CDBLobbyWriteQuery::DBReqBanMemoUpdate",
                0xc6,"dbo.up_update_ban_memo");
  *(undefined4 *)(param_2 + 0x100) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x108),1);
  return &DAT_1400a84bc;
}



void Unwind_140254ce0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x108);
  return;
}



void Unwind_140254cf0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x100);
  return;
}



void Unwind_140254d00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140254d10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140254d17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140254d20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140254d30(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



void Unwind_140254d40(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140254d50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140254d57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x48));
  return;
}



void Unwind_140254d60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x50));
  return;
}



void Unwind_140254d70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x40);
  return;
}



undefined * Catch_140254d80(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x98);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryBan.cpp","CDBLobbyWriteQuery::DBReqDelBan",0x98,
                "dbo.up_del_ban");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400a7ffb;
}



undefined * Catch_140254e20(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x90);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0xf0);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryBan.cpp","CDBLobbyWriteQuery::DBReqDelBan",0x9c,
                "dbo.up_del_ban");
  *(undefined4 *)(param_2 + 0xf0) = 0;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0xf8),1);
  return &DAT_1400a7ffb;
}



void Unwind_140254ec0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x48);
  return;
}



void Unwind_140254ed0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140254ee0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140254ef0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140254f00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140254f10(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140254f20(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_140254f30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140254f40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140254f47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x88));
  return;
}



void Unwind_140254f50(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x60));
  return;
}



void Unwind_140254f60(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x110);
  return;
}



void Unwind_140254f70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140254f80(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140254f87. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x60));
  return;
}



void Unwind_140254f90(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x70));
  return;
}



void Unwind_140254fa0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_140254fb0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140254fc0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140254fc7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x70));
  return;
}



void Unwind_140254fd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x78));
  return;
}



void Unwind_140254fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x88);
  return;
}



void Unwind_140254ff0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1c8);
  return;
}



void Unwind_140255000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x198);
  return;
}



void Unwind_140255010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x1b0);
  return;
}



undefined * Catch_140255020(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x170);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryBan.cpp","CDBLobbyWriteQuery::DBReqBanAdd",0x6b,
                "dbo.up_add_ban");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_1400a7ac5;
}



undefined * Catch_1402550b0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x178);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x50);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryBan.cpp","CDBLobbyWriteQuery::DBReqBanAdd",0x6f,
                "dbo.up_add_ban");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x80),1);
  return &DAT_1400a7ac5;
}



void Unwind_140255140(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140255150(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140255160(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140255170(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140255180(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x68);
  return;
}



void Unwind_140255190(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_1402551a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x90);
  return;
}



void Unwind_1402551b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_1402551c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_1402551d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_1402551e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_1402551f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255200(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255210(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255240(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255250(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255260(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255290(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_1402552a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_1402552b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_1402552c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_1402552d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_1402552e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_1402552f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255300(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255310(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255320(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255330(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255340(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255350(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x28);
  return;
}



void Unwind_140255360(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x40);
  return;
}



void Unwind_140255370(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_140255380(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x80);
  return;
}



void Unwind_140255390(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402553a0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402553b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402553c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x40);
  return;
}



void Unwind_1402553d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x40);
  return;
}



void Unwind_1402553e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x40);
  return;
}



void Unwind_1402553f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x40);
  return;
}



void Unwind_140255400(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x40);
  return;
}



void Unwind_140255410(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x40);
  return;
}



void Unwind_140255420(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x40);
  return;
}



void Unwind_140255430(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x40);
  return;
}



void Unwind_140255440(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x40);
  return;
}



void Unwind_140255450(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x58);
  return;
}



void Unwind_140255460(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140255470(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x80);
  return;
}



void Unwind_140255480(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_140255490(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x28);
  return;
}



void Unwind_1402554a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x40);
  return;
}



void Unwind_1402554b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_1402554c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_1402554d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_1402554e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_1402554f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140255500(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xa0);
  return;
}



void Unwind_140255510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140255520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140255530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140255540(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140255550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x130);
  return;
}



void Unwind_140255560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140255570(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140255577. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x120));
  return;
}



void Unwind_140255580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140255590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



undefined * Catch_1402555a0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x168);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x88);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqReadPetInventory",
                0x2cd,"dbo.up_read_pet_inventory");
  *(undefined2 *)(param_2 + 0x74) = 0x95;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x128),1);
  return &DAT_140095ce5;
}



undefined * Catch_140255640(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x158);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x88);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryPet.cpp","CDBLobbyWriteQuery::DBReqReadPetInventory",
                0x2d2,"dbo.up_read_pet_inventory");
  *(undefined2 *)(param_2 + 0x74) = 0x95;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x128),1);
  return &DAT_140095ce5;
}



void Unwind_1402556e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_1402556f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140255700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140255710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140255720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xf8);
  return;
}



void Unwind_140255730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140255740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140255750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140255760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140255770(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x60);
  return;
}



void Unwind_140255780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x170);
  return;
}



void Unwind_140255790(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4f0);
  return;
}



void Unwind_1402557a0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xf0);
  return;
}



void Unwind_1402557b0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1b8);
  return;
}



void Unwind_1402557c0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x118);
  return;
}



void Unwind_1402557d0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x178);
  return;
}



void Unwind_1402557e0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1d8);
  return;
}



void Unwind_1402557f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6b8);
  return;
}



void Unwind_140255800(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4c0);
  return;
}



void Unwind_140255810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2b0);
  return;
}



void Unwind_140255820(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5e0);
  return;
}



void Unwind_140255830(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2e0);
  return;
}



void Unwind_140255840(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x268);
  return;
}



void Unwind_140255850(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x310);
  return;
}



void Unwind_140255860(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x670);
  return;
}



void Unwind_140255870(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x340);
  return;
}



void Unwind_140255880(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x520);
  return;
}



void Unwind_140255890(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x370);
  return;
}



void Unwind_1402558a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x610);
  return;
}



void Unwind_1402558b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3a0);
  return;
}



void Unwind_1402558c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x550);
  return;
}



void Unwind_1402558d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3d0);
  return;
}



void Unwind_1402558e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x688);
  return;
}



void Unwind_1402558f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x400);
  return;
}



void Unwind_140255900(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x580);
  return;
}



void Unwind_140255910(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x430);
  return;
}



void Unwind_140255920(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x640);
  return;
}



void Unwind_140255930(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x460);
  return;
}



void Unwind_140255940(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5b0);
  return;
}



void Unwind_140255950(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x490);
  return;
}



void Unwind_140255960(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x6a0);
  return;
}



void Unwind_140255970(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x280);
  return;
}



void Unwind_140255980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x298);
  return;
}



void Unwind_140255990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2c8);
  return;
}



void Unwind_1402559a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x2f8);
  return;
}



void Unwind_1402559b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x328);
  return;
}



void Unwind_1402559c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x358);
  return;
}



void Unwind_1402559d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x388);
  return;
}



void Unwind_1402559e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x3b8);
  return;
}



void Unwind_1402559f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 1000);
  return;
}



void Unwind_140255a00(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xe0);
  return;
}



void Unwind_140255a10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x148);
  return;
}



void Unwind_140255a20(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x198);
  return;
}



void Unwind_140255a30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x158);
  return;
}



void Unwind_140255a40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x128);
  return;
}



void Unwind_140255a50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x208);
  return;
}



void Unwind_140255a60(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x418);
  return;
}



void Unwind_140255a70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x448);
  return;
}



void Unwind_140255a80(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x478);
  return;
}



void Unwind_140255a90(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4a8);
  return;
}



void Unwind_140255aa0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x4d8);
  return;
}



void Unwind_140255ab0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x508);
  return;
}



void Unwind_140255ac0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x538);
  return;
}



void Unwind_140255ad0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x568);
  return;
}



void Unwind_140255ae0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x598);
  return;
}



void Unwind_140255af0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5c8);
  return;
}



void Unwind_140255b00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x5f8);
  return;
}



void Unwind_140255b10(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x628);
  return;
}



void Unwind_140255b20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0xe8);
  return;
}



void Unwind_140255b30(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x188);
  return;
}



void Unwind_140255b40(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x138);
  return;
}



void Unwind_140255b50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1a8);
  return;
}



void Unwind_140255b60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x1c8);
  return;
}



void Unwind_140255b70(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x658);
  return;
}



undefined * Catch_140255b80(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x248);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x108);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryAuction.cpp",
                "CDBLobbyWriteQuery::DBReqReadAllAuctionList",0xbe,"dbo.up_read_all_auctionlist");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x110),1);
  return &DAT_14005d16f;
}



undefined * Catch_140255c10(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x220);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x108);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryAuction.cpp",
                "CDBLobbyWriteQuery::DBReqReadAllAuctionList",0xc2,"dbo.up_read_all_auctionlist");
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x110),1);
  return &DAT_14005d16f;
}



void Unwind_140255ca0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140255cb0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x68);
  return;
}



void Unwind_140255cc0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x80);
  return;
}



void Unwind_140255cd0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x98);
  return;
}



void Unwind_140255ce0(undefined8 param_1,longlong param_2)

{
  FUN_140144680(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140255cf0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(*(longlong *)(param_2 + 0x40) + 0x30);
  return;
}



void Unwind_140255d00(void)

{
  DAT_14037923c = DAT_14037923c & 0xfffffffe;
  return;
}



void Unwind_140255d20(undefined8 param_1,longlong param_2)

{
  FUN_140143b90(*(undefined8 *)(param_2 + 0x40));
  return;
}



void Unwind_140255d30(undefined8 param_1,longlong param_2)

{
  FUN_140153870(*(longlong *)(param_2 + 0x40) + 0x48);
  return;
}



void Unwind_140255d40(undefined8 param_1,longlong param_2)

{
  FUN_140156cd0(*(undefined8 *)(param_2 + 0x48));
  return;
}



void Unwind_140255d50(undefined8 param_1,longlong param_2)

{
  FUN_1401538c0(*(longlong *)(param_2 + 0x40) + 0x68);
  return;
}



void Unwind_140255d60(undefined8 param_1,longlong param_2)

{
  FUN_140045980(*(longlong *)(param_2 + 0x40) + 0x98);
  return;
}



void Unwind_140255d80(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x1b0);
  return;
}



void Unwind_140255d90(undefined8 param_1,longlong param_2)

{
  FUN_140149e40(param_2 + 0x30);
  return;
}



void Unwind_140255da0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x90);
  return;
}



void Unwind_140255db0(undefined8 param_1,longlong param_2)

{
  FUN_140142c90(param_2 + 0x30);
  return;
}



void Unwind_140255dc0(void)

{
  DAT_14037923c = DAT_14037923c & 0xfffffffe;
  return;
}



void Unwind_140255de0(undefined8 param_1,longlong param_2)

{
  FUN_140149770(param_2 + 0x30);
  return;
}



void Unwind_140255df0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x68);
  return;
}



void Unwind_140255e00(undefined8 param_1,longlong param_2)

{
  FUN_14013e2e0(param_2 + 0xc0);
  return;
}



void Unwind_140255e10(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x1d8);
  return;
}



void Unwind_140255e20(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140255e32. Too many branches
                    // WARNING: Treating indirect jump as call
  std::basic_ostream<>::~basic_ostream<>((basic_ostream<> *)(*(longlong *)(param_2 + 0x20) + -0x80))
  ;
  return;
}



void Unwind_140255e40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140255e47. Too many branches
                    // WARNING: Treating indirect jump as call
  std::basic_streambuf<>::~basic_streambuf<>(*(basic_streambuf<> **)(param_2 + 0xb0));
  return;
}



void Unwind_140255e50(undefined8 param_1,longlong param_2)

{
  FUN_140149770(param_2 + 0x30);
  return;
}



void Unwind_140255e60(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x68);
  return;
}



void Unwind_140255e70(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0xb8);
  return;
}



void Unwind_140255e80(undefined8 param_1,longlong param_2)

{
  FUN_140149e40(param_2 + 0x30);
  return;
}



void Unwind_140255e90(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x90);
  return;
}



void Unwind_140255ea0(undefined8 param_1,longlong param_2)

{
  FUN_140142c90(param_2 + 0x30);
  return;
}



void Unwind_140255eb0(void)

{
  DAT_14037923c = DAT_14037923c & 0xfffffffe;
  return;
}



void Unwind_140255ed0(undefined8 param_1,longlong param_2)

{
  FUN_140149770(param_2 + 0x30);
  return;
}



void Unwind_140255ee0(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x68);
  return;
}



void Unwind_140255ef0(undefined8 param_1,longlong param_2)

{
  FUN_140149770(param_2 + 0x30);
  return;
}



void Unwind_140255f00(undefined8 param_1,longlong param_2)

{
  FUN_140142c70(param_2 + 0x68);
  return;
}



void Unwind_140255f10(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x50);
  return;
}



void Unwind_140255f20(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0xb0);
  return;
}



void Unwind_140255f30(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x78);
  return;
}



void Unwind_140255f40(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x30);
  return;
}



void Unwind_140255f50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x50);
  return;
}



void Unwind_140255f60(undefined8 param_1,longlong param_2)

{
  FUN_140123420(param_2 + 0x38);
  return;
}



void Unwind_140255f70(undefined8 param_1,longlong param_2)

{
  FUN_1401232c0(param_2 + 0x50);
  return;
}



void Unwind_140255f80(undefined8 param_1,longlong param_2)

{
  FUN_140045980(param_2 + 0x5e);
  return;
}



void Unwind_140255f90(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x78);
  return;
}



void Unwind_140255fa0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x98);
  return;
}



void Unwind_140255fb0(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x30);
  return;
}



void Unwind_140255fc0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x48);
  return;
}



void Unwind_140255fd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x50);
  return;
}



void Unwind_140255fe0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140255ff0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140256000(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140256010(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140256020(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xa0);
  return;
}



void Unwind_140256030(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140256040(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140256050(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140256060(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140256070(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x130);
  return;
}



void Unwind_140256080(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140256090(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140256097. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x120));
  return;
}



void Unwind_1402560a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_1402560b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



undefined * Catch_1402560c0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x168);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x88);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqReadAccountStorageItem",0x52e,
                "dbo.up_read_account_storage");
  *(undefined2 *)(param_2 + 0x74) = 0x95;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x128),1);
  return &DAT_1400faf75;
}



undefined * Catch_140256160(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x158);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x88);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryItem.cpp",
                "CDBLobbyWriteQuery::DBReqReadAccountStorageItem",0x533,
                "dbo.up_read_account_storage");
  *(undefined2 *)(param_2 + 0x74) = 0x95;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x128),1);
  return &DAT_1400faf75;
}



void Unwind_140256200(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140256210(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140256220(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140256230(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140256240(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140256250(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140256260(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140256270(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140256280(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140256290(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_1402562a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_1402562b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_1402562c0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_1402562d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_1402562e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_1402562f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140256300(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140256307. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x118));
  return;
}



void Unwind_140256310(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140256320(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



undefined * Catch_140256330(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x140);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryInventory.cpp",
                "CDBLobbyWriteQuery::DBReqReadItemInventory",0x234,"dbo.up_read_item_inventory");
  *(undefined2 *)(param_2 + 0x5c) = 0xb3;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x110),1);
  return &DAT_1400f149a;
}



undefined * Catch_1402563d0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x148);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryInventory.cpp",
                "CDBLobbyWriteQuery::DBReqReadItemInventory",0x239,"dbo.up_read_item_inventory");
  *(undefined2 *)(param_2 + 0x5c) = 0xb3;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x110),1);
  return &DAT_1400f149a;
}



void Unwind_140256470(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140256480(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140256490(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_1402564a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_1402564b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_1402564c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_1402564d0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_1402564e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_1402564f0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140256500(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140256510(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140256520(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140256530(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140256540(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140256550(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x120);
  return;
}



void Unwind_140256560(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140256570(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140256577. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x118));
  return;
}



void Unwind_140256580(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140256590(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



undefined * Catch_1402565a0(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x140);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryInventory.cpp",
                "CDBLobbyWriteQuery::DBReqReadItemEquip",0x1aa,"dbo.up_read_item_equip");
  *(undefined2 *)(param_2 + 0x5c) = 0xb1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x110),1);
  return &DAT_1400f0aea;
}



undefined * Catch_140256640(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x148);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryInventory.cpp",
                "CDBLobbyWriteQuery::DBReqReadItemEquip",0x1af,"dbo.up_read_item_equip");
  *(undefined2 *)(param_2 + 0x5c) = 0xb1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x110),1);
  return &DAT_1400f0aea;
}



void Unwind_1402566e0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_1402566f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140256700(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140256710(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140256720(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x60);
  return;
}



void Unwind_140256730(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140256740(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140256750(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140256760(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_140256770(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0x90);
  return;
}



void Unwind_140256780(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140256790(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_1402567a0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_1402567b0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_1402567c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



void Unwind_1402567d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_1402567e0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001402567e7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x118));
  return;
}



void Unwind_1402567f0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x88));
  return;
}



void Unwind_140256800(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x118);
  return;
}



void Unwind_140256810(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0x188);
  return;
}



undefined * Catch_140256820(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x168);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryInventory.cpp","CDBLobbyWriteQuery::DBReqReadItemMail"
                ,0x9c,"dbo.up_read_item_mail");
  *(undefined2 *)(param_2 + 0x5c) = 0x95;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x110),1);
  return &DAT_1400f0136;
}



undefined * Catch_1402568c0(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x158);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x78);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryInventory.cpp",
                "CDBLobbyWriteQuery::DBReqReadItemMail",0xa1,"dbo.up_read_item_mail");
  *(undefined2 *)(param_2 + 0x5c) = 0x95;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x110),1);
  return &DAT_1400f0136;
}



void Unwind_140256960(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x90);
  return;
}



void Unwind_140256970(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x98);
  return;
}



void Unwind_140256980(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xb0);
  return;
}



void Unwind_140256990(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 200);
  return;
}



void Unwind_1402569a0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x58);
  return;
}



void Unwind_1402569b0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_1402569c0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_1402569d0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_1402569e0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_1402569f0(undefined8 param_1,longlong param_2)

{
  FUN_140002200(param_2 + 0xa0);
  return;
}



void Unwind_140256a00(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140256a10(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140256a20(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140256a30(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140256a40(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x130);
  return;
}



void Unwind_140256a50(undefined8 param_1,longlong param_2)

{
  Ordinal_9(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140256a60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140256a67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x128));
  return;
}



void Unwind_140256a70(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(*(undefined8 *)(param_2 + 0x98));
  return;
}



void Unwind_140256a80(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0x128);
  return;
}



undefined * Catch_140256a90(undefined8 param_1,longlong param_2)

{
  undefined8 uVar1;
  undefined8 uVar2;
  
  uVar1 = *(undefined8 *)(param_2 + 0x168);
  FUN_140001210(uVar1);
  printf("ADO_ON_ERROR : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x88);
  FUN_1400a69d0(uVar2,uVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageItemList",0x849,
                "dbo.up_get_guild_storage_item_list");
  *(undefined2 *)(param_2 + 0x74) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x120),1);
  return &DAT_1400e90ec;
}



undefined * Catch_140256b30(undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  
  plVar1 = *(longlong **)(param_2 + 0x158);
  (**(code **)(*plVar1 + 8))(plVar1);
  printf("ADO_ON_ERROR_STD : [ %s ] Proc [ %s ]\n");
  uVar2 = *(undefined8 *)(param_2 + 0x88);
  FUN_1400a6790(uVar2,plVar1,"DBLobbyWriteQueryGuild.cpp",
                "CDBLobbyWriteQuery::DBReqGuildStorageItemList",0x84e,
                "dbo.up_get_guild_storage_item_list");
  *(undefined2 *)(param_2 + 0x74) = 1;
  FUN_1400a1e10(uVar2,*(undefined8 *)(param_2 + 0x120),1);
  return &DAT_1400e90ec;
}



void Unwind_140256bd0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa0);
  return;
}



void Unwind_140256be0(undefined8 param_1,longlong param_2)

{
  FUN_140001f50(param_2 + 0xa8);
  return;
}



void Unwind_140256bf0(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xc0);
  return;
}



void Unwind_140256c00(undefined8 param_1,longlong param_2)

{
  Ordinal_9(param_2 + 0xd8);
  return;
}



void Unwind_140256c10(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x58);
  return;
}



void Unwind_140256c20(undefined8 param_1,longlong param_2)

{
  thunk_FUN_140050520(param_2 + 0x48);
  return;
}



void Unwind_140256c30(undefined8 param_1,longlong param_2)

{
  thunk_FUN_14004f990(param_2 + 0x40);
  return;
}



void Unwind_140256c40(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x90);
  return;
}



void Unwind_140256c50(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x78);
  return;
}



void Unwind_140256c60(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x68);
  return;
}



void Unwind_140256c70(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140256c77. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0xf0));
  return;
}



void Unwind_140256c80(undefined8 param_1,longlong param_2)

{
  FUN_14012fc70(*(undefined8 *)(param_2 + 0xf0));
  return;
}



void Unwind_140256c90(undefined8 param_1,longlong param_2)

{
  FUN_140203020(param_2 + 0x40);
  return;
}



void Unwind_140256ca0(undefined8 param_1,longlong param_2)

{
  FUN_1400504f0(param_2 + 0x40);
  return;
}



void Unwind_140256cb0(undefined8 param_1,longlong param_2)

{
  FUN_140145d50(param_2 + 0x90);
  return;
}



void Unwind_140256cc0(undefined8 param_1,longlong param_2)

{
  FUN_140142600(param_2 + 0x30);
  return;
}



void Unwind_140256cd0(void)

{
  DAT_14037923c = DAT_14037923c & 0xfffffffe;
  return;
}



void Unwind_140256cf0(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140256cf7. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x20));
  return;
}



void Unwind_140256d00(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140256d07. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x20));
  return;
}



void Unwind_140256d10(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140256d17. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x20));
  return;
}



void Unwind_140256d20(undefined8 param_1,longlong param_2)

{
  FUN_14004d090(param_2 + 0x38);
  return;
}



void Unwind_140256d30(undefined8 param_1,longlong param_2)

{
  FUN_14004d060(param_2 + 0x60);
  return;
}



void Unwind_140256d40(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140256d47. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x20));
  return;
}



void Unwind_140256d50(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140256d57. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x28));
  return;
}



void Unwind_140256d60(undefined8 param_1,longlong param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140256d67. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(*(void **)(param_2 + 0x28));
  return;
}



void Unwind_140256d70(undefined8 param_1,longlong param_2)

{
  FUN_1400a16e0(param_2 + 0x90);
  return;
}



void Unwind_140256d80(undefined8 param_1,longlong param_2)

{
  FUN_140148e50(param_2 + 0x2068);
  return;
}



void Unwind_140256d90(void)

{
  DAT_140379240 = DAT_140379240 & 0xfffffffe;
  return;
}



void Unwind_140256db0(void)

{
  FUN_1401476b0(&DAT_14032f200);
  return;
}



void FUN_140256dc0(void)

{
  BOOL BVar1;
  DWORD DVar2;
  
  strncpy(&DAT_14032f0e8,".\\Server_Log\\",0x80);
  BVar1 = CreateDirectoryA(&DAT_14032f0e8,(LPSECURITY_ATTRIBUTES)0x0);
  if (BVar1 == 0) {
    DVar2 = GetLastError();
    if (DVar2 != 0xb7) {
      printf("Couldn\'t create new svrlog directory[%u].\n");
    }
  }
  InitializeCriticalSection((LPCRITICAL_SECTION)&DAT_14032f168);
  atexit(FUN_140257b30);
  return;
}



void FUN_140256e30(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_140379248,uVar1,0);
  atexit((_func_5014 *)&LAB_140257b90);
  return;
}



void FUN_140256e80(void)

{
  FUN_140056dd0(&DAT_1403278d8,L"option\\total_option.enc",0x17);
  atexit(FUN_140257ba0);
  return;
}



void FUN_140256eb0(void)

{
  FUN_14004d4d0(&DAT_140327900,"option\\total_option.xml",0x17);
  atexit(FUN_140257be0);
  return;
}



void FUN_140256ee0(void)

{
  FUN_14004d4d0(&DAT_140327928,"option\\agent.xml",0x10);
  atexit(FUN_140257c20);
  return;
}



void FUN_140256f10(void)

{
  FUN_14004d4d0(&DAT_140327950,"option\\patch.xml",0x10);
  atexit(FUN_140257c60);
  return;
}



void FUN_140256f70(void)

{
  FUN_140147610();
  atexit(FUN_140257d80);
  return;
}



void FUN_140256f90(void)

{
  InitializeCriticalSection((LPCRITICAL_SECTION)&DAT_14032f220);
  atexit((_func_5014 *)&LAB_140257dc0);
  return;
}



void FUN_140256fc0(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_1403284b0,uVar1,1);
  atexit((_func_5014 *)&LAB_140257dd0);
  return;
}



void FUN_140257000(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_140328478,uVar1,0);
  atexit((_func_5014 *)&LAB_140257df0);
  return;
}



void FUN_140257030(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_140328440,uVar1,0);
  atexit((_func_5014 *)&LAB_140257de0);
  return;
}



void FUN_140257340(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_140328788,uVar1,0);
  atexit((_func_5014 *)&LAB_140257e80);
  return;
}



void FUN_140257370(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_140328750,uVar1,0);
  atexit((_func_5014 *)&LAB_140257e70);
  return;
}



void FUN_1402573a0(void)

{
  FUN_1401598d0(&DAT_140328890,&DAT_140281f00,0xffff);
  atexit((_func_5014 *)&LAB_140257ed0);
  return;
}



void FUN_1402573d0(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_140328858,uVar1,0);
  atexit((_func_5014 *)&LAB_140257eb0);
  return;
}



void FUN_140257400(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_140328820,uVar1,0);
  atexit((_func_5014 *)&LAB_140257ea0);
  return;
}



void FUN_140257460(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_1403288f0,uVar1,1);
  atexit((_func_5014 *)&LAB_140257f70);
  return;
}



void FUN_140257500(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_140328948,uVar1,1);
  atexit((_func_5014 *)&LAB_140257f80);
  return;
}



void FUN_140257530(void)

{
  FUN_140187aa0(&DAT_140328980);
  FUN_140187bc0(&DAT_140328980);
  atexit((_func_5014 *)&LAB_140257f90);
  return;
}



void FUN_140257570(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_1403293a8,uVar1,0);
  atexit((_func_5014 *)&LAB_140257fc0);
  return;
}



void FUN_1402575a0(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_1403293f0,uVar1,0);
  atexit((_func_5014 *)&LAB_140258000);
  return;
}



void FUN_1402575d0(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_140329eb0,uVar1,0);
  atexit((_func_5014 *)&LAB_140258010);
  return;
}



void FUN_140257640(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_140329fc8,uVar1,0);
  atexit((_func_5014 *)&LAB_140258050);
  return;
}



void FUN_140257680(void)

{
  undefined4 uVar1;
  undefined8 in_R9;
  undefined8 uVar2;
  
  uVar2 = 0xfffffffffffffffe;
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_14032a038,uVar1,1,in_R9,uVar2);
  FUN_140156b50(&DAT_14032a038);
  DAT_14032a030 = operator_new(8);
  if (DAT_14032a030 != (undefined8 *)0x0) {
    *DAT_14032a030 = 0;
  }
  FUN_140156be0(&DAT_14032a038);
  atexit(FUN_140258070);
  return;
}



void FUN_140257700(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_14032a148,uVar1,0);
  atexit((_func_5014 *)&LAB_1402580e0);
  return;
}



void FUN_140257730(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_14032a180,uVar1,1);
  atexit((_func_5014 *)&LAB_140258100);
  return;
}



void FUN_140257760(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_14032b228,uVar1,0);
  atexit((_func_5014 *)&LAB_140258150);
  return;
}



void FUN_1402577e0(void)

{
  undefined4 uVar1;
  
  uVar1 = FUN_14015a430();
  FUN_140156a70(&DAT_14032e3a8,uVar1,0);
  atexit((_func_5014 *)&LAB_140258190);
  return;
}



void FUN_140257810(void)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  undefined *puVar5;
  
  FUN_1401568c0();
  DAT_14032e3e0 = PTR_DAT_140320098;
  iVar2 = FUN_1401567e0(
                       "M-SEARCH * HTTP/1.1\r\nHost:239.255.255.250:1900\r\nST:upnp:rootdevice\r\nMan:\"ssdp:discover\"\r\nMX:3\r\n\r\n"
                       );
  if (DAT_14032e3e0 == (undefined *)0x0) {
    iVar4 = 0;
  }
  else if (DAT_14032e3e0 == PTR_DAT_140320098) {
    iVar4 = 0;
  }
  else {
    iVar4 = *(int *)(DAT_14032e3e0 + -8);
  }
  iVar3 = iVar2;
  if (iVar2 <= iVar4) {
    if (DAT_14032e3e0 == (undefined *)0x0) {
      iVar3 = 0;
    }
    else if (DAT_14032e3e0 == PTR_DAT_140320098) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(DAT_14032e3e0 + -8);
    }
  }
  iVar4 = 1;
  if (1 < iVar3) {
    iVar4 = iVar3;
  }
  if (DAT_14032e3e0 == (undefined *)0x0) {
    iVar3 = 0;
  }
  else if (DAT_14032e3e0 == PTR_DAT_140320098) {
    iVar3 = 0;
  }
  else {
    iVar3 = *(int *)(DAT_14032e3e0 + -8);
  }
  if (iVar3 < iVar4) {
    FUN_140124200(&DAT_14032e3e0);
  }
  FUN_1401242e0(&DAT_14032e3e0);
  puVar5 = DAT_14032e3e0;
  if (DAT_14032e3e0 == (undefined *)0x0) {
    puVar5 = PTR_DAT_140320098;
  }
  FUN_140156810(puVar5,
                "M-SEARCH * HTTP/1.1\r\nHost:239.255.255.250:1900\r\nST:upnp:rootdevice\r\nMan:\"ssdp:discover\"\r\nMX:3\r\n\r\n"
                ,iVar2);
  iVar4 = FUN_1401567e0();
  iVar2 = 0;
  if (0 < iVar4) {
    iVar2 = iVar4;
  }
  if (DAT_14032e3e0 == (undefined *)0x0) {
    iVar4 = 0;
  }
  else if (DAT_14032e3e0 == PTR_DAT_140320098) {
    iVar4 = 0;
  }
  else {
    iVar4 = *(int *)(DAT_14032e3e0 + -8);
  }
  if (iVar4 <= iVar2) {
    if (DAT_14032e3e0 == (undefined *)0x0) {
      iVar2 = 0;
    }
    else if (DAT_14032e3e0 == PTR_DAT_140320098) {
      iVar2 = 0;
    }
    else {
      iVar2 = *(int *)(DAT_14032e3e0 + -8);
    }
  }
  if (((DAT_14032e3e0 != PTR_DAT_140320098) && (DAT_14032e3e0 != (undefined *)0x0)) &&
     (piVar1 = (int *)(DAT_14032e3e0 + -8), piVar1 != (int *)0x0)) {
    *piVar1 = iVar2;
    *(undefined1 *)((longlong)iVar2 + 8 + (longlong)piVar1) = 0;
  }
  atexit((_func_5014 *)&LAB_1402581a0);
  return;
}



void FUN_140257960(void)

{
  undefined8 uVar1;
  undefined4 uVar2;
  undefined *local_res8 [4];
  
  FUN_1401568c0();
  local_res8[0] = PTR_DAT_140320098;
  uVar2 = FUN_1401567e0("239.255.255.250");
  uVar1 = FUN_1401243d0(local_res8,uVar2);
  FUN_140156810(uVar1,"239.255.255.250",uVar2);
  FUN_1401244c0(local_res8);
  FUN_140158bf0(&DAT_14032e3e8,local_res8,0x76c);
  return;
}



void FUN_1402579e0(void)

{
  undefined8 uVar1;
  undefined4 uVar2;
  undefined *local_res8 [4];
  
  FUN_1401568c0();
  local_res8[0] = PTR_DAT_1403200a0;
  uVar2 = FUN_140156740(L"211.214.161.39");
  uVar1 = FUN_14004f760(local_res8,uVar2);
  FUN_140156770(uVar1,L"211.214.161.39",uVar2);
  FUN_14004f380(local_res8);
  FUN_140158c60(&DAT_14032e658,local_res8,0x50);
  return;
}



void FUN_140257ab4(void)

{
  ATL::CAtlBaseModule::CAtlBaseModule((CAtlBaseModule *)&DAT_14032e680);
  atexit((_func_5014 *)&LAB_1402581c0);
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140257ad4(void)

{
  DAT_14032e6e8 = GetProcessHeap();
  DAT_14032e6f0 = 0;
  _DAT_14032e6e0 = &PTR_LAB_140281d48;
  atexit(FUN_1402581cc);
  return;
}



void FUN_140257b30(void)

{
  EnterCriticalSection((LPCRITICAL_SECTION)&DAT_14032f168);
  if (DAT_14032f060 != (FILE *)0x0) {
    fclose(DAT_14032f060);
  }
  LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_14032f168);
                    // WARNING: Could not recover jumptable at 0x000140257b6b. Too many branches
                    // WARNING: Treating indirect jump as call
  DeleteCriticalSection((LPCRITICAL_SECTION)&DAT_14032f168);
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140257ba0(void)

{
  if (7 < DAT_1403278f0) {
    operator_delete((void *)CONCAT62(DAT_1403278d8._2_6_,(undefined2)DAT_1403278d8));
  }
  DAT_1403278f0 = 7;
  _DAT_1403278e8 = 0;
  DAT_1403278d8._0_2_ = 0;
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140257be0(void)

{
  if (0xf < DAT_140327918) {
    operator_delete((void *)CONCAT71(_DAT_140327901,DAT_140327900));
  }
  DAT_140327918 = 0xf;
  _DAT_140327910 = 0;
  DAT_140327900 = 0;
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140257c20(void)

{
  if (0xf < DAT_140327940) {
    operator_delete((void *)CONCAT71(DAT_140327928._1_7_,(undefined1)DAT_140327928));
  }
  DAT_140327940 = 0xf;
  _DAT_140327938 = 0;
  DAT_140327928._0_1_ = 0;
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140257c60(void)

{
  if (0xf < DAT_140327968) {
    operator_delete((void *)CONCAT71(DAT_140327950._1_7_,(undefined1)DAT_140327950));
  }
  DAT_140327968 = 0xf;
  _DAT_140327960 = 0;
  DAT_140327950._0_1_ = 0;
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140257cc0(void)

{
  if (DAT_14032f1a0 != (void *)0x0) {
    operator_delete(DAT_14032f1a0);
  }
  DAT_14032f1a0 = (void *)0x0;
  _DAT_14032f1a8 = 0;
  _DAT_14032f1b0 = 0;
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140257d00(void)

{
  if (DAT_14032f1c0 != (void *)0x0) {
    operator_delete(DAT_14032f1c0);
  }
  DAT_14032f1c0 = (void *)0x0;
  _DAT_14032f1c8 = 0;
  _DAT_14032f1d0 = 0;
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_140257d40(void)

{
  if (DAT_14032f1e0 != (void *)0x0) {
    operator_delete(DAT_14032f1e0);
  }
  DAT_14032f1e0 = (void *)0x0;
  _DAT_14032f1e8 = 0;
  _DAT_14032f1f0 = 0;
  return;
}



void FUN_140257d80(void)

{
  undefined8 in_R9;
  undefined1 local_res8 [32];
  
  FUN_140147810(local_res8,*DAT_14032f208,DAT_14032f208,in_R9,0xfffffffffffffffe);
                    // WARNING: Could not recover jumptable at 0x000140257db0. Too many branches
                    // WARNING: Treating indirect jump as call
  operator_delete(DAT_14032f208);
  return;
}



void FUN_140257e00(void)

{
  longlong lVar1;
  
  lVar1 = DAT_1403284e8;
  while (lVar1 != 0) {
    DAT_1403284e8 = *(longlong *)(lVar1 + 0x38);
    *(undefined8 *)(lVar1 + 0x38) = 0;
    FUN_1401858d0(lVar1 + 8);
    FUN_140156970(lVar1);
    lVar1 = DAT_1403284e8;
  }
  DAT_1403284e8 = lVar1;
  return;
}



void FUN_140257ee0(void)

{
  longlong lVar1;
  
  lVar1 = DAT_1403288c8;
  if (DAT_1403288c8 != 0) {
    FUN_140156b50(DAT_1403288c8);
    *(longlong *)(DAT_1403288c8 + 0x40) = *(longlong *)(DAT_1403288c8 + 0x40) + -1;
    if (*(longlong *)(DAT_1403288c8 + 0x40) == 0) {
      FUN_140156be0(lVar1);
      FUN_14015ec10(DAT_1403288c8);
    }
    else {
      FUN_140156be0(lVar1);
    }
  }
  return;
}



void FUN_140257fa0(void)

{
  if (DAT_140329398 != (undefined8 *)0x0) {
    (**(code **)*DAT_140329398)(DAT_140329398,1);
  }
  return;
}



void FUN_140257fd0(void)

{
  if (DAT_1403293e0 != (longlong *)0x0) {
    (**(code **)(*DAT_1403293e0 + 0x20))(DAT_1403293e0,1);
  }
  DAT_1403293e0 = (longlong *)0x0;
  return;
}



void FUN_140258060(void)

{
  PTR_vftable_140321570 = (undefined *)Proud::ISendDest_S::vftable;
  return;
}



void FUN_140258070(void)

{
  void *pvVar1;
  
  FUN_140156b50(&DAT_14032a038);
  pvVar1 = DAT_14032a030;
  if (DAT_14032a030 != (void *)0x0) {
    FUN_1401a02c0(DAT_14032a030);
    operator_delete(pvVar1);
  }
  FUN_140156be0(&DAT_14032a038);
  FUN_140156c00(&DAT_14032a038);
  return;
}



void FUN_140258110(void)

{
  DeleteCriticalSection((LPCRITICAL_SECTION)&DAT_140379280);
  InitializeCriticalSection((LPCRITICAL_SECTION)&DAT_1403792c0);
  InitializeCriticalSection((LPCRITICAL_SECTION)&DAT_140379300);
                    // WARNING: Could not recover jumptable at 0x000140258146. Too many branches
                    // WARNING: Treating indirect jump as call
  InitializeCriticalSection((LPCRITICAL_SECTION)&DAT_14032b1f0);
  return;
}



void FUN_1402581b0(void)

{
  PTR_vftable_1403221b0 = (undefined *)Proud::ISendDest_C::vftable;
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void FUN_1402581cc(void)

{
  _DAT_14032e6e0 = &PTR_LAB_140281d48;
  if ((DAT_14032e6f0 != '\0') && (DAT_14032e6e8 != (HANDLE)0x0)) {
    HeapDestroy(DAT_14032e6e8);
  }
  return;
}



void FUN_140258200(void)

{
  PTR_PTR_140322350 = (undefined *)&PTR_Allocate_140281d70;
  return;
}



void FUN_140258210(void)

{
                    // WARNING: Could not recover jumptable at 0x000140258217. Too many branches
                    // WARNING: Treating indirect jump as call
  Ordinal_9(&DAT_140322388);
  return;
}


